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
/ test query with custom RDF handler
@Test public void testPassThroughHandler_SingleSourceQuery() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); try (RepositoryConnection conn = fedxRule.getRepository().getConnection()) { // SELECT query TupleQuery tq = conn .prepareTupleQuery("SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name . }"); tq.setBinding("name", l("Alan")); AtomicBoolean started = new AtomicBoolean(false); AtomicInteger numberOfResults = new AtomicInteger(0); tq.evaluate(new AbstractTupleQueryResultHandler() { @Override public void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException { if (started.get()) { throw new IllegalStateException("Must not start query result twice."); } started.set(true); /* * Expected trace is expected to come from some original repository (e.g. SPARQL) => we explicitly * do not expect QueryResults#report to be the second element (compare test * testPassThroughHandler_MultiSourceQuery) */ Assertions.assertNotEquals(QueryResults.class, new Exception().getStackTrace()[1].getClass()); } @Override public void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException { Assertions.assertEquals(bs.getValue("person"), iri("http://example.org/", "a")); numberOfResults.incrementAndGet(); }; }); Assertions.assertTrue(started.get()); Assertions.assertEquals(1, numberOfResults.get()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testWriteRDF() {\n\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.is_a(),NEURON), \"subclass\");\n\n\t\trunQuery(new LinkQueryTerm(MELANOCYTE),\"any link\");\n\t\t\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.part_of(),MELANOCYTE),\"part_of (class)\");\n\t\t\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.inheres_in(),\tnew LinkQueryTerm(relationVocabulary.part_of(),HUMAN_EYE)),\"phenotype in some part of the eye\");\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(MELANOCYTE),\"anything annotated to melanocyte\");\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(new LinkQueryTerm(relationVocabulary.inheres_in(),\tMELANOCYTE)),\"anything annotated to a melanocyte phenotype\");\n\t\t\n\t\tQueryTerm classQt =\tnew BooleanQueryTerm(new LinkQueryTerm(relationVocabulary.inheres_in(),NEURON),\tnew LinkQueryTerm(relationVocabulary.inheres_in(),BEHAVIOR));\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(classQt),\"boolean query\");\n\n\n\t}", "public static void main (String[] args) {\n EntityQuery query = new EntityQuery();\n Harvestable res = new OaiPmhResource();\n query.setFilter(\"test\", res);\n query.setAcl(\"diku\");\n query.setStartsWith(\"cf\",\"name\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"a\"));\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"x\"));\n\n query = new EntityQuery();\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"b\"));\n query.setQuery(\"usedBy=*library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"c\"));\n query.setQuery(\"(=library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"d\"));\n query.setQuery(\"usedBy=\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"e\"));\n query.setQuery(\"(usedBy!=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"f\"));\n query.setQuery(\"(usedBy==library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"g\"));\n query.setQuery(\"(usedBy===library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"h\"));\n }", "public void testDynamizePredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 100);\n\n part.setInsDyn(0.5);\n part.setDelDyn(0.1);\n \n part.dynamizePredicate(\"<http://dbpedia.org/ontology/deathPlace>\");\n\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n\n assertEquals(140,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "Object executeQuery(String sparqlQuery);", "@Test\n\tpublic void testSparqlQuery() throws OWLOntologyCreationException,\n\t\t\tIOException {\n\t\tInputStream ontStream = LDLPReasonerTest.class\n\t\t\t\t.getResourceAsStream(\"/data/university0-0.owl\");\n\t\tOWLOntologyManager manager = OWLManager.createOWLOntologyManager();\n\t\tOWLOntology ontology = manager\n\t\t\t\t.loadOntologyFromOntologyDocument(ontStream);\n\n\t\tInputStream queryStream = LDLPReasonerTest.class\n\t\t\t\t.getResourceAsStream(\"/data/lubm-query4.sparql\");\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tqueryStream));\n\t\tString line;\n\t\tString queryText = \"\";\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tqueryText = queryText + line + \"\\n\";\n\t\t}\n\n\t\tQuery query = QueryFactory.create(queryText, Syntax.syntaxARQ);\n\t\tLDLPReasoner reasoner = new LDLPReasoner(ontology);\n\t\tList<Literal> results = reasoner.executeQuery(query);\n\t\tSystem.out.println(results.size() + \" answers :\");\n\t\tfor (Literal result : results) {\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\tLDLPCompilerManager m = LDLPCompilerManager.getInstance();\n\n\t\t// m.dump();\n\n\t}", "@Test\n public void example13 () throws Exception {\n Map<String, Stmt> inputs = example2setup();\n conn.setNamespace(\"ex\", \"http://example.org/people/\");\n conn.setNamespace(\"ont\", \"http://example.org/ontology/\");\n String prefix = \"PREFIX ont: \" + \"<http://example.org/ontology/>\\n\";\n \n String queryString = \"select ?s ?p ?o where { ?s ?p ?o} \";\n TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"SELECT result:\", inputs.values(),\n statementSet(tupleQuery.evaluate()));\n \n assertTrue(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"Alice\\\" } \").evaluate());\n assertFalse(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"NOT Alice\\\" } \").evaluate());\n \n queryString = \"construct {?s ?p ?o} where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery constructQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Construct result\",\n mapKeep(new String[] {\"an\"}, inputs).values(),\n statementSet(constructQuery.evaluate()));\n \n queryString = \"describe ?s where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery describeQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Describe result\",\n mapKeep(new String[] {\"an\", \"at\"}, inputs).values(),\n statementSet(describeQuery.evaluate()));\n }", "@RequestMapping(value = \"/queryrdf\", method = {RequestMethod.GET, RequestMethod.POST})\n public void queryRdf(@RequestParam(\"query\") final String query,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_QUERY_AUTH, required = false) String auth,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_CV, required = false) final String vis,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_INFER, required = false) final String infer,\n @RequestParam(value = \"nullout\", required = false) final String nullout,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_RESULT_FORMAT, required = false) final String emit,\n @RequestParam(value = \"padding\", required = false) final String padding,\n @RequestParam(value = \"callback\", required = false) final String callback,\n final HttpServletRequest request,\n final HttpServletResponse response) {\n SailRepositoryConnection conn = null;\n final Thread queryThread = Thread.currentThread();\n auth = StringUtils.arrayToCommaDelimitedString(provider.getUserAuths(request));\n final Timer timer = new Timer();\n timer.schedule(new TimerTask() {\n\n @Override\n public void run() {\n log.debug(\"interrupting\");\n queryThread.interrupt();\n\n }\n }, QUERY_TIME_OUT_SECONDS * 1000);\n\n try {\n final ServletOutputStream os = response.getOutputStream();\n conn = repository.getConnection();\n\n final Boolean isBlankQuery = StringUtils.isEmpty(query);\n final ParsedOperation operation = QueryParserUtil.parseOperation(QueryLanguage.SPARQL, query, null);\n\n final Boolean requestedCallback = !StringUtils.isEmpty(callback);\n final Boolean requestedFormat = !StringUtils.isEmpty(emit);\n\n if (!isBlankQuery) {\n if (operation instanceof ParsedGraphQuery) {\n // Perform Graph Query\n final RDFHandler handler = new RDFXMLWriter(os);\n response.setContentType(\"text/xml\");\n performGraphQuery(query, conn, auth, infer, nullout, handler);\n } else if (operation instanceof ParsedTupleQuery) {\n // Perform Tuple Query\n TupleQueryResultHandler handler;\n\n if (requestedFormat && emit.equalsIgnoreCase(\"json\")) {\n handler = new SPARQLResultsJSONWriter(os);\n response.setContentType(\"application/json\");\n } else {\n handler = new SPARQLResultsXMLWriter(os);\n response.setContentType(\"text/xml\");\n }\n\n performQuery(query, conn, auth, infer, nullout, handler);\n } else if (operation instanceof ParsedUpdate) {\n // Perform Update Query\n performUpdate(query, conn, os, infer, vis);\n } else {\n throw new MalformedQueryException(\"Cannot process query. Query type not supported.\");\n }\n }\n\n if (requestedCallback) {\n os.print(\")\");\n }\n } catch (final Exception e) {\n log.error(\"Error running query\", e);\n throw new RuntimeException(e);\n } finally {\n if (conn != null) {\n try {\n conn.close();\n } catch (final RepositoryException e) {\n log.error(\"Error closing connection\", e);\n }\n }\n }\n\n timer.cancel();\n }", "public interface SparqlQueryService {\n\n\t/**\n\t * Generic method to invoke a supplied query regardless of its type. The\n\t * client has to inspect and cast the result object accordingly.\n\t * \n\t * @param name\n\t * @param params\n\t * @return\n\t */\n\tObject executeQuery(String sparqlQuery);\n\n\t/**\n\t * Generic method to invoke a query regardless of its type. The client has\n\t * to inspect and cast the result object accordingly.\n\t * \n\t * @param name\n\t * @param params\n\t * @return\n\t */\n\tObject callQuery(String name, Map<String, String> params);\n\n\t/**\n\t * Invocation of a SPARQL SELECT query. The resultant JSON structure is\n\t * serialized according to the W3C SPARQL 1.1 Query Results JSON Format.\n\t * \n\t * @see http://www.w3.org/TR/sparql11-query/#select\n\t * @param name\n\t * @param params\n\t * @return JSON result structure.\n\t */\n\tSparqlResultObject callSelectQuery(String name, Map<String, String> params);\n\n\t/**\n\t * Invocation of a SPARQL CONSTRUCT query resulting in new graph serialized\n\t * according to RDF/JSON format\n\t * (http://jena.apache.org/documentation/io/rdf-json.html).\n\t * \n\t * \n\t * @see http://www.w3.org/TR/sparql11-query/#construct\n\t * @param name\n\t * @param params\n\t * @return\n\t */\n\tGraph callConstructQuery(String name, Map<String, String> params);\n\n\t/**\n\t * Invocation of a SPARQL ASK query resulting in a boolean value.\n\t * \n\t * @see\n\t * \n\t * @param name\n\t * Unique name of the query.\n\t * @param params\n\t * Map of required parameter-value pairs.\n\t * @return true or false, depending whether the pattern matches.\n\t */\n\tBoolean callAskQuery(String name, Map<String, String> params);\n\n}", "public void test_afs_01() {\n String sourceT =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'\"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <owl:Class rdf:about='http://example.org/foo#A'>\"\n + \" </owl:Class>\"\n + \"</rdf:RDF>\";\n \n String sourceA =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' \"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <rdf:Description rdf:about='http://example.org/foo#x'>\"\n + \" <rdf:type rdf:resource='http://example.org/foo#A' />\"\n + \" </rdf:Description>\"\n + \"</rdf:RDF>\";\n \n Model tBox = ModelFactory.createDefaultModel();\n tBox.read(new ByteArrayInputStream(sourceT.getBytes()), \"http://example.org/foo\");\n \n Model aBox = ModelFactory.createDefaultModel();\n aBox.read(new ByteArrayInputStream(sourceA.getBytes()), \"http://example.org/foo\");\n \n Reasoner reasoner = ReasonerRegistry.getOWLReasoner();\n reasoner = reasoner.bindSchema(tBox);\n \n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM_RULE_INF);\n spec.setReasoner(reasoner);\n \n OntModel m = ModelFactory.createOntologyModel(spec, aBox);\n \n List inds = new ArrayList();\n for (Iterator i = m.listIndividuals(); i.hasNext();) {\n inds.add(i.next());\n }\n \n assertTrue(\"x should be an individual\", inds.contains(m.getResource(\"http://example.org/foo#x\")));\n \n }", "@Test\n public void queryWithOneInnerQueryCreate() throws IOException {\n BaseFuseClient fuseClient = new BaseFuseClient(\"http://localhost:8888/fuse\");\n //query request\n CreateQueryRequest request = new CreateQueryRequest();\n request.setId(\"1\");\n request.setName(\"test\");\n request.setQuery(Q1());\n //submit query\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .body(request)\n .post(\"/fuse/query\")\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1/cursor\"));\n assertEquals(1,queryResourceInfo.getInnerUrlResourceInfos().size());\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(201)\n .contentType(\"application/json;charset=UTF-8\");\n\n //get query resource by id\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .get(\"/fuse/query/\"+request.getId()+\"->\"+Q2().getName())\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(200)\n .contentType(\"application/json;charset=UTF-8\");\n\n\n }", "@Test\n\tpublic void testPassThroughHandler_MultiSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\n\t\t\t\t\t\t\t\"SELECT ?person ?interest WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name ; <http://xmlns.com/foaf/0.1/interest> ?interest }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace looks like this java.lang.Exception at\n\t\t\t\t\t * org.eclipse.rdf4j.federated.BasicTests$1.startQueryResult(BasicTests.java:276) at\n\t\t\t\t\t * org.eclipse.rdf4j.query.QueryResults.report(QueryResults.java:263) at\n\t\t\t\t\t * org.eclipse.rdf4j.federated.structures.FedXTupleQuery.evaluate(FedXTupleQuery.java:69)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertEquals(QueryResults.class.getName(),\n\t\t\t\t\t\t\tnew Exception().getStackTrace()[1].getClassName());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"person\"), iri(\"http://example.org/\", \"a\"));\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"interest\").stringValue(), \"SPARQL 1.1 Basic Federated Query\");\n\t\t\t\t\tnumberOfResults.incrementAndGet();\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(1, numberOfResults.get());\n\t\t}\n\t}", "public static void main( String[] args ) {\n\n Model m = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RDFS_INF);\n\n\n FileManager.get().readModel( m, owlFile );\n String myOntologyName = \"http://www.w3.org/2002/07/owl#\";\n String myOntologyNS = \"http://www.w3.org/2002/07/owl#\";\n////\n////\n// String rdfPrefix = \"PREFIX rdf: <\"+RDF.getURI()+\">\" ;\n// String myOntologyPrefix = \"PREFIX \"+myOntologyName+\": <\"+myOntologyNS+\">\" ;\n// String myOntologyPrefix1 = \"PREFIX \"+myOntologyName ;\n String myOntologyPrefix2 = \"prefix pizza: <http://www.w3.org/2002/07/owl#> \";\n//\n//\n//// String queryString = myOntologyPrefix + NL\n//// + rdfPrefix + NL +\n//// \"SELECT ?subject\" ;\n \n String queryString = rdfPrefix + myOntologyPrefix2 +\n// \t\t \"prefix pizza: <http://www.w3.org/2002/07/owl#> \"+ \n \t\t \"prefix rdfs: <\" + RDFS.getURI() + \"> \" +\n \t\t \"prefix owl: <\" + OWL.getURI() + \"> \" +\n// \t\t \"select ?o where {?s ?p ?o}\";\n \n//\t\t\t\t\t\t\"select ?s where {?s rdfs:label \"苹果\"@zh}\";\n \n// \"SELECT ?label WHERE { ?subject rdfs:label ?label }\" ;\n// \"SELECT DISTINCT ?predicate ?label WHERE { ?subject ?predicate ?object. ?predicate rdfs:label ?label .}\";\n// \"SELECT DISTINCT ?s WHERE {?s rdfs:label \\\"Italy\\\"@en}\" ;\n// \"SELECT DISTINCT ?s WHERE {?s rdfs:label \\\"苹果\\\"@zh}\" ;\n// \"SELECT DISTINCT ?s WHERE\" +\n// \"{?object rdfs:label \\\"水果\\\"@zh.\" +\n// \"?subject rdfs:subClassOf ?object.\" +\n// \"?subject rdfs:label ?s}\";\n //星号是转义字符,分号是转义字符\n\t\t\t\t\"SELECT DISTINCT ?e ?s WHERE {?entity a ?subject.?subject rdfs:subClassOf ?object.\"+\n \"?object rdfs:label \\\"富士苹果\\\"@zh.?entity rdfs:label ?e.?subject rdfs:label ?s}ORDER BY ?s\";\n \t\t\n\n \n \t\tcom.hp.hpl.jena.query.Query query = QueryFactory.create(queryString);\n \t\tQueryExecution qe = QueryExecutionFactory.create(query, m);\n \t\tcom.hp.hpl.jena.query.ResultSet results = qe.execSelect();\n\n \t\tResultSetFormatter.out(System.out, results, query);\n \t\tqe.close();\n\n// Query query = QueryFactory.create(queryString) ;\n\n query.serialize(new IndentedWriter(System.out,true)) ;\n System.out.println() ;\n\n\n\n QueryExecution qexec = QueryExecutionFactory.create(query, m) ;\n\n try {\n\n ResultSet rs = qexec.execSelect() ;\n\n\n for ( ; rs.hasNext() ; ){\n QuerySolution rb = rs.nextSolution() ;\n RDFNode y = rb.get(\"person\");\n System.out.print(\"name : \"+y+\"--- \");\n Resource z = (Resource) rb.getResource(\"person\");\n System.out.println(\"plus simplement \"+z.getLocalName());\n }\n }\n finally{\n qexec.close() ;\n }\n }", "void doTests() {\n\t\tString doc = \"\", r = \"\";\n\n\t\tDomeoPermissions dp3 = new DomeoPermissions(\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnew String[] { \"urn:group:uuid:4028808c3dccfe48013dccfe95ea0005 1\" });\n\t\tr = getDocument(\"1\", false, dp3);\n\n\t\tr = termQuery(\"domeo_!DOMEO_NS!_agents.@type\", \"foafx:Person\", 0, 10,\n\t\t\t\tfalse, dp3);\n\n\t\tr = phraseQuery(\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_context.ao_!DOMEO_NS!_hasSelector.ao_!DOMEO_NS!_suffix\",\n\t\t\t\t\"enabling application\", 0, 10, false, dp3);\n\n\t\tdp3 = new DomeoPermissions(\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnew String[] { \"urn:group:uuid:4028808c3dccfe48013dccfe95ea0005 1\" });\n\t\tr = query(\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_context.ao_!DOMEO_NS!_hasSelector.ao_!DOMEO_NS!_suffix\",\n\t\t\t\t\"enabling application\", 0, 10, false, dp3);\n\n\t\t// Test: Term (keyword) query\n\t\t// r = termQuery(\"domeo_!DOMEO_NS!_agents.@type\", \"foafx:Person\", 0, 10,\n\t\t// dp);\n\n\t\t// Test: Phrase query\n\t\tr = phraseQuery(\"dct_!DOMEO_NS!_description\", \"created automatically\",\n\t\t\t\t0, 10, false, dp3);\n\n\t\t// Test: Delete a document\n\t\t// r = deleteDocument(\"7TdnuBsjTjWaTcbW7RVP3Q\");\n\n\t\t// Test: Generic boolean query: 4 fields (3 keyword fields, 1 parsed\n\t\t// field)\n\n\t\tString[] fields = { \"ao_!DOMEO_NS!_item.@type\",\n\t\t\t\t\"ao_!DOMEO_NS!_item.@id\",\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_body.@type\",\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_body.cnt_!DOMEO_NS!_chars\" };\n\t\tString[] vals = { \"ao:Highlight\",\n\t\t\t\t\"urn:domeoclient:uuid:D3062173-8E53-41E9-9248-F0B8A7F65E5B\",\n\t\t\t\t\"cnt:ContentAsText\", \"paolo\" };\n\t\tString[] parsed = { \"term\", \"term\", \"term\", \"match\" };\n\t\tr = booleanQueryMultipleFields(fields, vals, parsed, \"and\", 0, 10,\n\t\t\t\tfalse, dp3);\n\n\t\t// Test: Single field boolean query\n\t\tr = booleanQuerySingleParsedField(\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_context.ao_!DOMEO_NS!_hasSelector.ao_!DOMEO_NS!_suffix\",\n\t\t\t\t\"formal biomedical ontologies\", \"or\", 0, 10, false, null);\n\n\t\t// Test: Retrieve a single doc by id\n\t\tr = getDocument(\"aviMdI48QkSGOhQL6ncMZw\", false, null);\n\n\t\t// Test: insert a document, return it's auto-assigned id\n\t\tdoc = \"{ \\\"f1\\\" : \\\"field value one\\\", \\\"f2\\\" : \\\"field value two\\\" }\";\n\t\tr = insertDocument(doc);\n\n\t\t// Test: insert a doc with specified id (replace if already present)\n\t\tdoc = \"{ \\\"f1\\\" : \\\"field value one\\\", \\\"f2\\\" : \\\"field value two\\\" }\";\n\t\tr = insertDocument(doc, \"5\");\n\t\tSystem.out.println(r);\n\n\t\t// Test: insert json document and try to remove it\n\t\tdoc = readSampleJsonDoc(\"/temp/sample_domeo_doc.json\");\n\t\tSystem.out.println(doc);\n\t\tr = insertDocument(doc);\n\t}", "Query query();", "@Test\n public void example10 () throws Exception {\n ValueFactory f = repo.getValueFactory();\n String exns = \"http://example.org/people/\";\n URI alice = f.createURI(exns, \"alice\");\n URI bob = f.createURI(exns, \"bob\");\n URI ted = f.createURI(exns, \"ted\"); \n URI person = f.createURI(\"http://example.org/ontology/Person\");\n URI name = f.createURI(\"http://example.org/ontology/name\");\n Literal alicesName = f.createLiteral(\"Alice\");\n Literal bobsName = f.createLiteral(\"Bob\");\n Literal tedsName = f.createLiteral(\"Ted\"); \n URI context1 = f.createURI(exns, \"cxt1\"); \n URI context2 = f.createURI(exns, \"cxt2\"); \n conn.add(alice, RDF.TYPE, person, context1);\n conn.add(alice, name, alicesName, context1);\n conn.add(bob, RDF.TYPE, person, context2);\n conn.add(bob, name, bobsName, context2);\n conn.add(ted, RDF.TYPE, person);\n conn.add(ted, name, tedsName);\n \n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2),\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(conn.getStatements(null, null, null, false)));\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2)\n }),\n statementSet(conn.getStatements(null, null, null, false, context1, context2)));\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2),\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(conn.getStatements(null, null, null, false, null, context2)));\n \n // testing named graph query\n DatasetImpl ds = new DatasetImpl();\n ds.addNamedGraph(context1);\n ds.addNamedGraph(context2);\n TupleQuery tupleQuery = conn.prepareTupleQuery(\n QueryLanguage.SPARQL, \"SELECT ?s ?p ?o ?g WHERE { GRAPH ?g {?s ?p ?o . } }\");\n tupleQuery.setDataset(ds);\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2)\n }),\n statementSet(tupleQuery.evaluate()));\n \n ds = new DatasetImpl();\n ds.addDefaultGraph(null);\n tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, \"SELECT ?s ?p ?o WHERE {?s ?p ?o . }\");\n tupleQuery.setDataset(ds);\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(tupleQuery.evaluate()));\n }", "public void testInsertPredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 10);\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n assertEquals(10,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "@Test\n\tpublic void queryTest(){\n\t\tQueryableRequestSpecification queryableRequestSpecification = SpecificationQuerier.query(requestSpecification);\n\t\tSystem.out.println(\"Printing specification parameters: \" +queryableRequestSpecification.getBaseUri());\n\t}", "@Test\n void testAndFilter() {\n Query q = newQueryFromEncoded(\"?query=trump\" +\n \"&model.type=all\" +\n \"&model.defaultIndex=text\" +\n \"&filter=%2B%28filterattribute%3Afrontpage_US_en-US%29\");\n assertEquals(\"AND text:trump |filterattribute:frontpage_US_en-US\",\n q.getModel().getQueryTree().toString());\n }", "@Test\n public void test() throws Exception {\n\n ModelObjectSearchService.addNoSQLServer(Address.class, new SolrRemoteServiceImpl(\"http://dr.dk\"));\n\n\n\n Address mock = NQL.mock(Address.class);\n NQL.search(mock).search(\n\n NQL.all(\n NQL.has(mock.getArea(), NQL.Comp.LIKE, \"Seb\"),\n NQL.has(\"SebastianRaw\")\n\n )\n\n ).addStats(mock.getZip()).getFirst();\n\n\n// System.out.println(\"inline query: \" + NQL.search(mock).search(mock.getA().getFunnyD(), NQL.Comp.EQUAL, 0.1d).());\n// System.out.println(\"normal query: \" + NQL.search(mock).search(mock.getArea(), NQL.Comp.EQUAL, \"area\").buildQuery());\n }", "private Nodes xPathQuery(String query)\r\n \t{\r\n \t\treturn document.query(query, context);\r\n \t}", "@Test\n public void testPhrase() {\n assertQ(req(\"q\",\"text:now-cow\", \"indent\",\"true\")\n ,\"//*[@numFound='1']\"\n );\n // should generate a query of (now OR cow) and match both docs\n assertQ(req(\"q\",\"text_np:now-cow\", \"indent\",\"true\")\n ,\"//*[@numFound='2']\"\n );\n }", "String query();", "@Test\n public void testSomeToStrings() {\n System.out.println(new JresBoolQuery()\n .must(new JresQueryStringQuery(\"stuff:true\").withDefaultOperator(\"AND\"))\n .should(\n new JresMatchQuery(\"color\", \"orange\"),\n new JresTermQuery(\"key\", \"abc123\")\n )\n .mustNot(new JresDisMaxQuery(\n new JresMatchQuery(\"color\", \"yellow\"),\n new JresMatchQuery(\"color\", \"green\")\n ))\n );\n }", "public static void main(String ...args) {\n Operation myOperation = Operation.alloc(\"http://example/special2\", \"special2\", \"Custom operation\");\n\n // Service endpoint names.\n String queryEndpoint = \"q\";\n String customEndpoint = \"x\";\n\n // Make a DataService with custom named for endpoints.\n // In this example, \"q\" for SPARQL query and \"x\" for our custom extension and no others.\n DatasetGraph dsg = DatasetGraphFactory.createTxnMem();\n DataService dataService = DataService.newBuilder(dsg)\n .addEndpoint(myOperation, customEndpoint)\n .addEndpoint(Operation.Query, queryEndpoint)\n .build();\n\n // This will be the code to handled for the operation.\n ActionService customHandler = new DemoService();\n\n FusekiServer server =\n FusekiServer.create().port(PORT)\n .verbose(true)\n // Register the new operation, and it's handler\n .registerOperation(myOperation, customHandler)\n\n // The DataService.\n .add(DATASET, dataService)\n\n // And build the server.\n .build();\n\n server.start();\n\n // Try some operations on the server using the service URL.\n String customOperationURL = SERVER_URL + DATASET + \"/\" + customEndpoint;\n String queryOperationURL = SERVER_URL + DATASET + \"/\" + queryEndpoint;\n\n Query query = QueryFactory.create(\"ASK{}\");\n\n try {\n\n // Try custom name - OK\n try ( QueryExecution qExec = QueryExecution.service(queryOperationURL, query) ) {\n qExec.execAsk();\n }\n\n // Try the usual default name, which is not configured in the DataService so expect a 404.\n try ( QueryExecution qExec = QueryExecution.service(SERVER_URL + DATASET + \"/sparql\", query) ) {\n qExec.execAsk();\n throw new RuntimeException(\"Didn't fail\");\n } catch (QueryExceptionHTTP ex) {\n if ( ex.getStatusCode() != HttpSC.NOT_FOUND_404 ) {\n throw new RuntimeException(\"Not a 404\", ex);\n }\n }\n\n // Make an HTTP GET to the custom operation.\n // Service endpoint name : GET\n String s1 = HttpOp.httpGetString(customOperationURL);\n if ( s1 == null )\n throw new RuntimeException(\"Failed: \"+customOperationURL);\n\n } finally {\n server.stop();\n }\n }", "@Test\n public void testParseInput() {\n LOGGER.info(\"parseInput\");\n rdfEntityManager = new RDFEntityManager();\n LOGGER.info(\"oneTimeSetup\");\n CacheInitializer.initializeCaches();\n DistributedRepositoryManager.addRepositoryPath(\n \"InferenceRules\",\n System.getenv(\"REPOSITORIES_TMPFS\") + \"/InferenceRules\");\n DistributedRepositoryManager.clearNamedRepository(\"InferenceRules\");\n try {\n final File unitTestRulesPath = new File(\"data/test-rules-1.rule\");\n bufferedInputStream = new BufferedInputStream(new FileInputStream(unitTestRulesPath));\n LOGGER.info(\"processing input: \" + unitTestRulesPath);\n } catch (final FileNotFoundException ex) {\n throw new TexaiException(ex);\n }\n ruleParser = new RuleParser(bufferedInputStream);\n ruleParser.initialize(rdfEntityManager);\n final URI variableURI = new URIImpl(Constants.TEXAI_NAMESPACE + \"?test\");\n assertEquals(\"http://texai.org/texai/?test\", variableURI.toString());\n assertEquals(\"?test\", RDFUtility.formatURIAsTurtle(variableURI));\n List<Rule> rules;\n try {\n rules = ruleParser.Rules();\n for (final Rule rule : rules) {\n LOGGER.info(\"rule: \" + rule.toString());\n rule.cascadePersist(rdfEntityManager, null);\n }\n } catch (ParseException ex) {\n LOGGER.info(StringUtils.getStackTraceAsString(ex));\n fail(ex.getMessage());\n }\n Iterator<Rule> rules_iter = rdfEntityManager.rdfEntityIterator(\n Rule.class,\n null); // overrideContext\n while (rules_iter.hasNext()) {\n final Rule loadedRule = rules_iter.next();\n assertNotNull(loadedRule);\n\n // (\n // description \"if there is a room then it is likely that a table is in the room\"\n // context: texai:InferenceRuleTestContext\n // if:\n // ?situation-localized rdf:type cyc:Situation-Localized .\n // ?room rdf:type cyc:RoomInAConstruction .\n // ?situation-localized cyc:situationConstituents ?room .\n // then:\n // _:in-completely-situation-localized rdf:type texai:InCompletelySituationLocalized .\n // ?situation-localized texai:likelySubSituations _:in-completely-situation-localized .\n // _:table rdf:type cyc:Table_PieceOfFurniture .\n // _:table texai:in-ContCompletely ?room .\n // )\n\n assertEquals(\"(\\ndescription \\\"if there is a room then it is likely that a table is in the room\\\"\\ncontext: texai:InferenceRuleTestContext\\nif:\\n ?situation-localized rdf:type cyc:Situation-Localized .\\n ?room rdf:type cyc:RoomInAConstruction .\\n ?situation-localized cyc:situationConstituents ?room .\\nthen:\\n _:in-completely-situation-localized rdf:type texai:InCompletelySituationLocalized .\\n ?situation-localized texai:likelySubSituations _:in-completely-situation-localized .\\n _:table rdf:type cyc:Table_PieceOfFurniture .\\n _:table texai:in-ContCompletely ?room .\\n)\", loadedRule.toString());\n LOGGER.info(\"loadedRule:\\n\" + loadedRule);\n }\n CacheManager.getInstance().shutdown();\n try {\n if (bufferedInputStream != null) {\n bufferedInputStream.close();\n }\n } catch (final Exception ex) {\n LOGGER.info(StringUtils.getStackTraceAsString(ex));\n }\n rdfEntityManager.close();\n DistributedRepositoryManager.shutDown();\n }", "@Test\n\tpublic void testQueryTypes() {\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\t\t// QueryType\n\t\tfinal IntrospectionFullType queryType = getFullType(introspection, schemaConfig.getQueryTypeName());\n\t\t// - check all queries are available\n\t\tfinal List<String> queryNames = new ArrayList<>();\n\t\tArrays.asList(Entity1.class, Entity2.class, Entity3.class, Entity4.class).stream().forEach(clazz -> {\n\t\t\tqueryNames.add(schemaConfig.getQueryGetByIdPrefix() + clazz.getSimpleName());\n\t\t\tqueryNames.add(schemaConfig.getQueryGetListPrefix() + clazz.getSimpleName());\n\t\t});\n\t\tqueryNames.forEach(queryName -> Assert.assertTrue(queryType.getFields().stream()\n\t\t\t\t.map(IntrospectionTypeField::getName).collect(Collectors.toList()).contains(queryName)));\n\n\t\t// - check one 'getSingle' query (other ones are built the same way)\n\t\tfinal IntrospectionTypeField getEntity1 = assertField(queryType, queryNames.get(0),\n\t\t\t\tIntrospectionTypeKindEnum.OBJECT, Entity1.class);\n\t\tAssert.assertEquals(1, getEntity1.getArgs().size());\n\t\tassertArg(getEntity1, \"id\", IntrospectionTypeKindEnum.NON_NULL, IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLID.getName());\n\n\t\t// - check one 'getAll' query (other ones are built the same way)\n\t\tfinal IntrospectionTypeField getAllEntity1 = assertField(queryType, queryNames.get(1),\n\t\t\t\tIntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, getAllEntity1.getArgs().size());\n\t\tassertArg(getAllEntity1, schemaConfig.getQueryGetListFilterAttributeName(),\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListFilterEntityTypeNameSuffix());\n\t\tassertArg(getAllEntity1, schemaConfig.getQueryGetListPagingAttributeName(),\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT, getPagingInputTypeName());\n\t\tassertArg(getAllEntity1, schemaConfig.getQueryGetListFilterAttributeOrderByName(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.INPUT_OBJECT, getOrderByInputTypeName());\n\t}", "private InputStream runSparqlQuery(String query) throws IOException {\n\t\ttry {\n\t\t\tString queryString = \"query=\" + URLEncoder.encode(query, \"UTF-8\")\n\t\t\t\t\t+ \"&format=json\";\n\t\t\tURL url = new URL(\"https://query.wikidata.org/sparql?\"\n\t\t\t\t\t+ queryString);\n\t\t\tHttpURLConnection connection = (HttpURLConnection) url\n\t\t\t\t\t.openConnection();\n\t\t\tconnection.setRequestMethod(\"GET\");\n\n\t\t\treturn connection.getInputStream();\n\t\t} catch (UnsupportedEncodingException | MalformedURLException e) {\n\t\t\tthrow new RuntimeException(e.getMessage(), e);\n\t\t}\n\t}", "public abstract String createQuery();", "public void queryData() throws SolrServerException {\n\t\tfinal SolrQuery query = new SolrQuery(\"*:*\");\r\n\t\tquery.setRows(2000);\r\n\t\t// 5. Executes the query\r\n\t\tfinal QueryResponse response = client.query(query);\r\n\r\n\t\t/*\t\tassertEquals(1, response.getResults().getNumFound());*/\r\n\r\n\t\t// 6. Gets the (output) Data Transfer Object.\r\n\t\t\r\n\t\t\r\n\t\r\n\t\tif (response.getResults().iterator().hasNext())\r\n\t\t{\r\n\t\t\tfinal SolrDocument output = response.getResults().iterator().next();\r\n\t\t\tfinal String from = (String) output.getFieldValue(\"from\");\r\n\t\t\tfinal String to = (String) output.getFieldValue(\"to\");\r\n\t\t\tfinal String body = (String) output.getFieldValue(\"body\");\r\n\t\t\t// 7.1 In case we are running as a Java application print out the query results.\r\n\t\t\tSystem.out.println(\"It works! I found the following book: \");\r\n\t\t\tSystem.out.println(\"--------------------------------------\");\r\n\t\t\tSystem.out.println(\"ID: \" + from);\r\n\t\t\tSystem.out.println(\"Title: \" + to);\r\n\t\t\tSystem.out.println(\"Author: \" + body);\r\n\t\t}\r\n\t\t\r\n\t\tSolrDocumentList list = response.getResults();\r\n\t\tSystem.out.println(\"list size is: \" + list.size());\r\n\r\n\r\n\r\n\t\t/*\t\t// 7. Otherwise asserts the query results using standard JUnit procedures.\r\n\t\tassertEquals(\"1\", id);\r\n\t\tassertEquals(\"Apache SOLR Essentials\", title);\r\n\t\tassertEquals(\"Andrea Gazzarini\", author);\r\n\t\tassertEquals(\"972-2-5A619-12A-X\", isbn);*/\r\n\t}", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query);", "@Test\n public void testQuery() throws Exception {\n StatefulKnowledgeSession session = getKbase().newStatefulKnowledgeSession();\n \n initializeTemplate(session);\n \n List<Person> persons = new ArrayList<Person>();\n persons.add(new Person(\"john\", \"john\", 25));\n persons.add(new Person(\"sarah\", \"john\", 35));\n \n session.execute(CommandFactory.newInsertElements(persons));\n assertEquals(2, session.getFactCount());\n \n QueryResults results = query(\"people over the age of x\", new Object[] {30});\n assertNotNull(results);\n }", "private void runQuery(QueryTerm qt, String name) {\n\t\tqt.setInferred(false);\n\t\tRDFQuery q = new RDFQuery(qt);\n\t\tSystem.out.println(\"=== \"+name+\" ===\\n* OBD Query:\\n \"+qt);\n\t\tSystem.out.println(\"\\n* Autogenerated SPARQL:\\n \"+q.toSPARQL()+\"\\n\\n\");\n\t\tfor (Node n : this.shard.getNodesByQuery(qt)){\n\t\t\tSystem.out.println(\"Node: \" + n.toString());\n\t\t}\n\t\n\t}", "@Override\n public final InputStream dereference(String uri, String contentType) throws IOException {\n if(uri==null){\n return null;\n }\n UriRef reference = new UriRef(uri);\n StringBuilder query = new StringBuilder();\n query.append(\"CONSTRUCT { \");\n query.append(reference);\n query.append(\" ?p ?o } WHERE { \");\n query.append(reference);\n query.append(\" ?p ?o }\");\n\n //String format = SupportedFormat.RDF_XML;\n return SparqlEndpointUtils.sendSparqlRequest(getAccessUri(),query.toString(),contentType);\n }", "IQuery getQuery();", "@Test\n public void test_singleRetrieve_withParens_ParamQuery() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"(samaccountname=mary.olowu)\");\n request.setParameters(parameters);\n\n Map<String, Object> recordMap = null;\n BridgeError unexpectedError = null;\n try {\n Record record = getAdapter().retrieve(request);\n recordMap = record.getRecord();\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertNotNull(recordMap);\n }", "private QueryResults query(String queryName, Object[] args) {\n Command command = CommandFactory.newQuery(\"persons\", queryName, args);\n String queryStr = template.requestBody(\"direct:marshall\", command, String.class);\n\n String json = template.requestBody(\"direct:test-session\", queryStr, String.class);\n ExecutionResults res = (ExecutionResults) template.requestBody(\"direct:unmarshall\", json);\n return (QueryResults) res.getValue(\"persons\");\n }", "@Test\n public void testQueries() {\n nuxeoClient.repository().createDocumentById(testWorkspaceId, new Document(\"file1\", \"File\"));\n nuxeoClient.repository().createDocumentById(testWorkspaceId, new Document(\"file2\", \"File\"));\n\n // Get descendants of Workspaces\n String query = \"select * from Document where ecm:path startswith '/default-domain/workspaces'\";\n Documents documents = nuxeoClient.repository().query(query, \"10\", \"0\", \"50\", \"ecm:path\", \"asc\", null);\n assertEquals(3, documents.size());\n\n // Get all the File documents\n // TODO\n\n // Content of a given Folder, using a page provider\n // TODO\n }", "@Test\n public void testSyntax() throws Exception {\n assertJQ(req(\"q\",\"*\", \"df\",\"doesnotexist_s\")\n ,\"/response/docs/[0]==\" // make sure we get something...\n );\n assertJQ(req(\"q\",\"doesnotexist_s:*\")\n ,\"/response/numFound==0\" // nothing should be found\n );\n assertJQ(req(\"q\",\"doesnotexist_s:( * * * )\")\n ,\"/response/numFound==0\" // nothing should be found\n );\n\n // length of date math caused issues...\n assertJQ(req(\"q\",\"foo_dt:\\\"2013-03-08T00:46:15Z/DAY+000MILLISECONDS+00SECONDS+00MINUTES+00HOURS+0000000000YEARS+6MONTHS+3DAYS\\\"\", \"debug\",\"query\")\n ,\"/debug/parsedquery=='foo_dt:2013-09-11T00:00:00Z'\"\n );\n }", "@Test\n public void testCorrectAllWithFilterDateAndFindBy()\n throws IOException {\n Client client = Client.create(new DefaultClientConfig());\n WebResource service = client.resource(getBaseURI()\n + \"PhotoAlbum04/\");\n String response = service.path(\"search\")\n .queryParam(\"type\", \"all\")\n .queryParam(\"findBy\", \"name\")\n .queryParam(\"keywords\", \"evento\")\n .queryParam(\"orderBy\", \"date\")\n .queryParam(\"dateFirst\", \"01/11/2012\")\n .queryParam(\"dateEnd\", \"02/11/2012\")\n .get(String.class);\n assertFalse(\"Assert error failed\",\n response.contains(\"Url syntax error\"));\n\n assertTrue(\"Assert file-dtos failed\",\n response.contains(\"File: Search with all parameters\"));\n assertTrue(\n \"Assert album-dtos failed\",\n response.contains(\"Album: Search with all parameters\"));\n }", "@Test\n public void test_singleRetrieve_withoutParens_ParamQuery() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n request.setParameters(parameters);\n\n Map<String, Object> recordMap = null;\n BridgeError expectedError = null;\n try {\n Record record = getAdapter().retrieve(request);\n } catch (BridgeError e) {\n expectedError = e;\n }\n\n assertNotNull(expectedError);\n }", "@Test\n public void queryTest() {\n // TODO: test query\n }", "public Query queryRule(String rule, Object... args) throws Exceptions.OsoException {\n Host new_host = host.clone();\n String pred = new_host.toPolarTerm(new Predicate(rule, Arrays.asList(args))).toString();\n return new Query(ffiPolar.newQueryFromTerm(pred), new_host);\n }", "public interface SPARQLService {\n // TODO: Create methods for at least CRUD \n}", "public static void querying(String constructQuery2) {\n\t\t//construct the new query\n\t\t//String constructQuery2 = prefix+\" \"+select+\" \"+selectValues+\" \"+where+openBracket+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket;\n\t\t//constructQuery2 = constructQuery2+\" UNION \"+\" \"+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket+closeBracket;\n\t\t\n\t\tSystem.out.println(constructQuery2);\n\t\tQuery query2 = QueryFactory.create(constructQuery2);\n\t\tQueryExecution qe2 = QueryExecutionFactory.sparqlService(\n\t\t\t\t\"http://localhost:3030/USNA/query\", query2);\n\t\t\n\t\tResultSet results1 = qe2.execSelect();\n\t\tif(constantOutput == \"\") {\n\t\t\tResultSetFormatter.out(System.out, results1);\n\t\t}else {\n\t\t\tString NS = \"http://www.usna.org/ns#\";\n\t\t\tModel rdfssExample = ModelFactory.createDefaultModel();\n\t\t\tString [] constant = constantOutput.trim().split(\" \");\n\t\t\t\n\t\t\tString [] headers = selectValues.split(\" \");\n\t\t System.out.println(\"--------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tfor(int i = 0; i< headers.length; i++) {\n\t\t\t\t//System.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t\tSystem.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"----------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\ttry {\n\t\t\t\t int count = 0;\n\t\t while ( results1.hasNext() ) {\n\t\t \t //Resource Response = rdfssExample.createResource(NS+constant[count]);\n\t\t \t \n\t\t QuerySolution soln = results1.nextSolution();\n\t\t Resource first = soln.getResource(headers[0].substring(1,headers[0].length()).trim());\n\t\t //Resource second = soln.getResource(headers[1].substring(1,headers[1].length()).trim());\n\t\t //Resource third = soln.getResource(headers[2].substring(1,headers[2].length()).trim());\n\t\t //Resource fourth = soln.getResource(headers[3].substring(1,headers[3].length()).trim());\n\t\t for(int i=0; i< constant.length; i++) {\n\t\t \t Resource Response = rdfssExample.createResource(NS+constant[i]);\n\t\t \t System.out.format(\"%10s %50s\",first, Response);\n\t\t \t System.out.println();\n\t\t\t\t\t //count++;\n\t\t }\n\t\t //System.out.format(\"%10s %50s\",first, Response);\n\t\t //System.out.format(\"%10s\",first);\n\t\t\t\t System.out.println();\n\t\t\t\t //count++;\n\t\t\t\t \n\t\t\t\t //System.out.println(count);\n\t\t \n\t\t }\n\t\t } finally {\n\t\t \t qe2.close();\n\t\t}\n\t\t\t \n\t\t}\t\t \n\t}", "@Test\n void testAndFilterWithoutExplicitIndex() {\n Query q = newQueryFromEncoded(\"?query=trump\" +\n \"&model.type=all\" +\n \"&model.defaultIndex=text\" +\n \"&filter=%2B%28filterTerm%29\");\n assertEquals(\"AND text:trump |text:filterTerm\",\n q.getModel().getQueryTree().toString());\n }", "public void test_sf_945436() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <C rdf:ID='x'>\" +\n \" <rdfs:label xml:lang=''>a_label</rdfs:label>\" +\n \" </C>\" +\n \" <owl:Class rdf:ID='C'>\" +\n \" </owl:Class>\" +\n \"</rdf:RDF>\";\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n m.read( new StringReader( SOURCE ), null );\n Individual x = m.getIndividual( \"http://jena.hpl.hp.com/test#x\" );\n assertEquals( \"Label on resource x\", \"a_label\", x.getLabel( null) );\n assertEquals( \"Label on resource x\", \"a_label\", x.getLabel( \"\" ) );\n assertSame( \"fr label on resource x\", null, x.getLabel( \"fr\" ) );\n }", "Query queryOn(Connection connection);", "public void test_der_02() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <owl:ObjectProperty rdf:ID='hasPublications'>\" +\n \" <rdfs:domain>\" +\n \" <owl:Class>\" +\n \" <owl:unionOf rdf:parseType='Collection'>\" +\n \" <owl:Class rdf:about='#Project'/>\" +\n \" <owl:Class rdf:about='#Task'/>\" +\n \" </owl:unionOf>\" +\n \" </owl:Class>\" +\n \" </rdfs:domain>\" +\n \" <rdfs:domain rdf:resource='#Dummy' />\" +\n \" <rdfs:range rdf:resource='#Publications'/>\" +\n \" </owl:ObjectProperty>\" +\n \" <owl:Class rdf:ID='Dummy'>\" +\n \" </owl:Class>\" +\n \"</rdf:RDF>\";\n String NS = \"http://jena.hpl.hp.com/test#\";\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.read(new ByteArrayInputStream( SOURCE.getBytes()), NS );\n \n OntClass dummy = m.getOntClass( NS + \"Dummy\" );\n // assert commented out - bug not accepted -ijd\n //TestUtil.assertIteratorValues( this, dummy.listDeclaredProperties(), \n // new Object[] {m.getObjectProperty( NS+\"hasPublications\")} );\n }", "@Test\n\tpublic void testPassThroughHandler_emptySingleSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name . }\");\n\t\t\ttq.setBinding(\"name\", l(\"notExist\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace is expected to come from some original repository (e.g. SPARQL) => we explicitly\n\t\t\t\t\t * do not expect QueryResults#report to be the second element (compare test\n\t\t\t\t\t * testPassThroughHandler_MultiSourceQuery)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertNotEquals(QueryResults.class, new Exception().getStackTrace()[1].getClass());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tthrow new IllegalStateException(\"Expected empty result\");\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(0, numberOfResults.get());\n\t\t}\n\t}", "private static List<Supplier> createSupplierData(ConsumerQuery query, boolean testing) {\n\t\tRepository repository;\n\t\t\n\t\t//use name of processes in query to retrieve subset of relevant supplier data from semantic infrastructure\n\t\tList<String> processNames = new ArrayList<String>();\t\n\n\t\tif (query.getProcesses() == null || query.getProcesses().isEmpty()) {\n\t\t\tSystem.err.println(\"There are no processes specified!\");\n\t\t} else {\n\t\t\n\t\tfor (Process process : query.getProcesses()) {\n\t\t\tprocessNames.add(process.getName());\n\t\t}\n\t\t}\n\t\t\t\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\n\t\tif (testing == false) {\n\n\t\t\tMap<String, String> headers = new HashMap<String, String>();\n\t\t\theaders.put(\"Authorization\", AUTHORISATION_TOKEN);\n\t\t\theaders.put(\"accept\", \"application/JSON\");\n\n\t\t\trepository = new SPARQLRepository(SPARQL_ENDPOINT );\n\n\t\t\trepository.initialize();\n\t\t\t((SPARQLRepository) repository).setAdditionalHttpHeaders(headers);\n\n\t\t} else {\n\n\t\t\t//connect to GraphDB\n\t\t\trepository = new HTTPRepository(GRAPHDB_SERVER, REPOSITORY_ID);\n\t\t\trepository.initialize();\n\t\t}\n\t\t\n\t\t//creates a SPARQL query that is run against the Semantic Infrastructure\n\t\tString strQuery = SparqlQuery.createQueryMVP(processNames);\n\t\t\n\t\t//System.out.println(strQuery);\n\n\t\t//open connection to GraphDB and run SPARQL query\n\t\tSet<SparqlRecord> recordSet = new HashSet<SparqlRecord>();\n\t\tSparqlRecord record;\n\t\ttry(RepositoryConnection conn = repository.getConnection()) {\n\n\t\t\tTupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, strQuery);\t\t\n\n\t\t\t//if querying the local KB, we need to set setIncludeInferred to false, otherwise inference will include irrelevant results.\n\t\t\t//when querying the Semantic Infrastructure the non-inference is set in the http parameters.\n\t\t\tif (testing == true) {\n\t\t\t\t//do not include inferred statements from the KB\n\t\t\t\ttupleQuery.setIncludeInferred(false);\n\t\t\t}\n\n\t\t\ttry (TupleQueryResult result = tupleQuery.evaluate()) {\t\t\t\n\n\t\t\t\twhile (result.hasNext()) {\n\n\t\t\t\t\tBindingSet solution = result.next();\n\n\t\t\t\t\t//omit the NamedIndividual types from the query result\n\t\t\t\t\tif (!solution.getValue(\"processType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")\n\t\t\t\t\t\t\t&& !solution.getValue(\"certificationType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")\n\t\t\t\t\t\t\t&& !solution.getValue(\"materialType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")) {\n\n\t\t\t\t\t\trecord = new SparqlRecord();\n\t\t\t\t\t\trecord.setSupplierId(solution.getValue(\"supplierId\").stringValue().replaceAll(\"\\\\s+\",\"\"));\n\t\t\t\t\t\trecord.setProcess(stripIRI(solution.getValue(\"processType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\t\t\t\t\t\trecord.setMaterial(stripIRI(solution.getValue(\"materialType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\t\t\t\t\t\trecord.setCertification(stripIRI(solution.getValue(\"certificationType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\n\t\t\t\t\t\trecordSet.add(record);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\tcatch (Exception e) {\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\tSystem.err.println(\"Wrong test data!\");\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\n\t\t}\n\n\t\t//close connection to KB repository\n\t\trepository.shutDown();\n\n\t\tlong stopTime = System.currentTimeMillis();\n\t\tlong elapsedTime = stopTime - startTime;\n\n\t\tif (testing == true ) {\n\t\tSystem.out.println(\"The SPARQL querying process took \" + elapsedTime/1000 + \" seconds.\");\n\t\t}\n\n\t\t//get unique supplier ids used for constructing the supplier structure below\n\t\tSet<String> supplierIds = new HashSet<String>();\n\t\tfor (SparqlRecord sr : recordSet) {\n\t\t\tsupplierIds.add(sr.getSupplierId());\n\t\t}\n\n\t\tCertification certification = null;\n\t\tSupplier supplier = null;\n\t\tList<Supplier> suppliersList = new ArrayList<Supplier>();\n\n\t\t//create a map of processes and materials relevant for each supplier\n\t\tMap<String, SetMultimap<Object, Object>> multimap = new HashMap<String, SetMultimap<Object, Object>>();\n\n\t\tfor (String id : supplierIds) {\n\t\t\tSetMultimap<Object, Object> map = HashMultimap.create();\n\n\t\t\tString supplierID = null;\n\n\t\t\tfor (SparqlRecord sr : recordSet) {\n\n\t\t\t\tif (sr.getSupplierId().equals(id)) {\n\n\t\t\t\t\tmap.put(sr.getProcess(), sr.getMaterial());\n\n\t\t\t\t\tsupplierID = sr.getSupplierId();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tmultimap.put(supplierID, map);\n\t\t}\t\t\n\n\t\tProcess process = null;\n\n\t\t//create supplier objects (supplier id, processes (including materials) and certifications) based on the multimap created in the previous step\n\t\tfor (String id : supplierIds) {\n\t\t\tSetMultimap<Object, Object> processAndMaterialMap = null;\n\n\t\t\tList<Certification> certifications = new ArrayList<Certification>();\n\t\t\tList<Process> processes = new ArrayList<Process>();\t\t\n\n\t\t\tfor (SparqlRecord sr : recordSet) {\n\n\t\t\t\tif (sr.getSupplierId().equals(id)) {\n\n\t\t\t\t\t//add certifications\n\t\t\t\t\tcertification = new Certification(sr.getCertification());\n\t\t\t\t\tif (!certifications.contains(certification)) {\n\t\t\t\t\t\tcertifications.add(certification);\n\t\t\t\t\t}\n\n\t\t\t\t\t//add processes and associated materials\n\t\t\t\t\tprocessAndMaterialMap = multimap.get(sr.getSupplierId());\n\n\t\t\t\t\tString processName = null;\n\n\t\t\t\t\tSet<Object> list = new HashSet<Object>();\n\n\t\t\t\t\t//iterate processAndMaterialMap and extract process and relevant materials for that process\n\t\t\t\t\tfor (Entry<Object, Collection<Object>> e : processAndMaterialMap.asMap().entrySet()) {\n\n\t\t\t\t\t\tSet<Material> materialsSet = new HashSet<Material>();\n\n\t\t\t\t\t\t//get list/set of materials\n\t\t\t\t\t\tlist = new HashSet<>(e.getValue());\n\n\t\t\t\t\t\t//transform to Set<Material>\n\t\t\t\t\t\tfor (Object o : list) {\n\t\t\t\t\t\t\tmaterialsSet.add(new Material((String)o));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tprocessName = (String) e.getKey();\n\n\t\t\t\t\t\t//add relevant set of materials together with process name\n\t\t\t\t\t\tprocess = new Process(processName, materialsSet);\n\n\t\t\t\t\t\t//add processes\n\t\t\t\t\t\tif (!processes.contains(process)) {\n\t\t\t\t\t\t\tprocesses.add(process);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tsupplier = new Supplier(id, processes, certifications );\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsuppliersList.add(supplier);\n\t\t}\n\n\t\treturn suppliersList;\n\n\t}", "public abstract Statement queryToRetrieveData();", "public QueryMatches interpret(ITMQLRuntime runtime, IContext context, IExpressionInterpreter<?> caller);", "@Test\n public void testCorrectAlbumWithFilterDateAndFindBy()\n throws IOException {\n Client client = Client.create(new DefaultClientConfig());\n WebResource service = client.resource(getBaseURI()\n + \"PhotoAlbum04/\");\n String response = service.path(\"search\")\n .queryParam(\"type\", \"album\")\n .queryParam(\"findBy\", \"name\")\n .queryParam(\"keywords\", \"evento\")\n .queryParam(\"orderBy\", \"date\")\n .queryParam(\"dateFirst\", \"01/11/2012\")\n .queryParam(\"dateEnd\", \"02/11/2012\")\n .get(String.class);\n assertFalse(\"Assert error failed\",\n response.contains(\"Url syntax error\"));\n assertFalse(\"Assert file-dtos error failed\",\n response.contains(\"file-dtos\"));\n\n assertTrue(\n \"Assert album-dtos failed\",\n response.contains(\"Album: Search with all parameters\"));\n }", "@Test\n public void testFromFollowedByQuery() throws Exception {\n final String text = \"rule X when Cheese() from $cheesery ?person( \\\"Mark\\\", 42; ) then end\";\n RuleDescr rule = ((RuleDescr) (parse(\"rule\", text)));\n TestCase.assertFalse(parser.getErrors().toString(), parser.hasErrors());\n PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n TestCase.assertEquals(\"Cheese\", pattern.getObjectType());\n TestCase.assertEquals(\"from $cheesery\", pattern.getSource().getText());\n TestCase.assertFalse(pattern.isQuery());\n pattern = ((PatternDescr) (getDescrs().get(1)));\n TestCase.assertEquals(\"person\", pattern.getObjectType());\n TestCase.assertTrue(pattern.isQuery());\n }", "public long query(Date timestamp, String user, String hostname, Long referral, String questionText, InputMode mode);", "@Override\r\n\tprotected boolean remoteQuery(String qstr) {\r\n\t\tif (queryBk.getPublishYear() == null || queryBk.getPublishYear().equals(\"\")) {\r\n\t\t\tif (queryBk.getPublisher() == null || queryBk.getPublisher().equals(\"\")) {\r\n\t\t\t\tif (queryBk.parseEdition() == -1 && queryBk.parseVolume() == -1) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t} // end if\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tDocumentBuilderFactory f;\r\n\t\tDocumentBuilder b;\r\n\t\tDocument doc;\r\n\t\ttry {\r\n\t\t\tf = DocumentBuilderFactory.newInstance();\r\n\t\t\tb = f.newDocumentBuilder();\r\n\t\t\tURL url = new URL(Config.PRIMO_X_BASE + qstr);\r\n\r\n\t\t\tURLConnection con = url.openConnection();\r\n\t\t\tcon.setConnectTimeout(3000);\r\n\t\t\tdoc = b.parse(con.getInputStream());\r\n\t\t\tqueryStr = Config.PRIMO_X_BASE + qstr;\r\n\t\t\tdebug += queryStr + \"\\n\";\r\n\r\n\t\t\tnodesRecord = doc.getElementsByTagName(\"record\");\r\n\r\n\t\t\t/*\r\n\t\t\t * After fetched a XML doc, store necessary tags from the XMLs for further\r\n\t\t\t * matching.\r\n\t\t\t */\r\n\r\n\t\t\tfor (int i = 0; i < nodesRecord.getLength(); i++) {\r\n\t\t\t\tnodesControl = doc.getElementsByTagName(\"control\").item(i).getChildNodes();\r\n\t\t\t\tnodesDisplay = doc.getElementsByTagName(\"display\").item(i).getChildNodes();\r\n\t\t\t\tnodesLink = doc.getElementsByTagName(\"links\").item(i).getChildNodes();\r\n\t\t\t\tnodesSearch = doc.getElementsByTagName(\"search\").item(i).getChildNodes();\r\n\t\t\t\tnodesDelivery = doc.getElementsByTagName(\"delivery\").item(i).getChildNodes();\r\n\t\t\t\tnodesFacet = doc.getElementsByTagName(\"facets\").item(i).getChildNodes();\r\n\r\n\t\t\t\t// Return true if the query item is of ISO doc no. and of\r\n\t\t\t\t// published by ISO\r\n\t\t\t\tif (matchIsoPublisher() && matchIsoDocNo()) {\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} // end if\r\n\r\n\t\t\t\tif (!strHandle.hasSomething(queryBk.getCreator())) {\r\n\t\t\t\t\tif (matchTitle() && matchPublisher() && matchYear()) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} // end if\r\n\t\t\t\t} // end if\r\n\r\n\t\t\t\tif (matchTitle() && matchAuthor()) {\r\n\r\n\t\t\t\t\tif ((matchEdition() && matchPublisher() && matchYear())) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else if (!strHandle.hasSomething(queryBk.getPublisher()) && matchYear()\r\n\t\t\t\t\t\t\t&& strHandle.hasSomething(queryBk.getPublishYear())) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else if (matchEdition() && queryBk.parseEdition() > 1) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * As Primo X-service only shows the first FRBRed record, check the rest records\r\n\t\t\t\t\t\t * involving the same frbrgroupid.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tString frbrid = \"\";\r\n\t\t\t\t\t\tfrbrid = getNodeValue(\"frbrgroupid\", nodesFacet);\r\n\t\t\t\t\t\tString frbr_qstr = qstr + \"&query=facet_frbrgroupid,exact,\" + frbrid;\r\n\t\t\t\t\t\t// System.out.println(\"FRBR:\" + Config.PRIMO_X_BASE +\r\n\t\t\t\t\t\t// frbr_qstr);\r\n\t\t\t\t\t\tDocument doc2 = b.parse(Config.PRIMO_X_BASE + frbr_qstr);\r\n\t\t\t\t\t\tnodesFrbrRecord = doc2.getElementsByTagName(\"record\");\r\n\r\n\t\t\t\t\t\tfor (int j = 0; j < nodesFrbrRecord.getLength(); j++) {\r\n\r\n\t\t\t\t\t\t\tnodesControl = doc2.getElementsByTagName(\"control\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesDisplay = doc2.getElementsByTagName(\"display\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesLink = doc2.getElementsByTagName(\"links\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesSearch = doc2.getElementsByTagName(\"search\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesDelivery = doc2.getElementsByTagName(\"delivery\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesFacet = doc2.getElementsByTagName(\"facets\").item(j).getChildNodes();\r\n\r\n\t\t\t\t\t\t\tif (!strHandle.hasSomething(queryBk.getPublishYear()) && queryBk.parseEdition() == -1\r\n\t\t\t\t\t\t\t\t\t&& !strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t} // end if\r\n\r\n\t\t\t\t\t\t\tif (matchEdition() && matchTitle() && matchAuthor() && matchPublisher() && matchYear()) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t} else if (matchEdition() && matchTitle() && matchAuthor() && matchYear()\r\n\t\t\t\t\t\t\t\t\t&& !strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t} // end if\r\n\t\t\t\t\t\t} // end for\r\n\t\t\t\t\t} // end if\r\n\t\t\t\t} // end if\r\n\t\t\t} // end for\r\n\t\t} // end try\r\n\r\n\t\tcatch (Exception e) {\r\n\t\t\tStringWriter errors = new StringWriter();\r\n\t\t\te.printStackTrace(new PrintWriter(errors));\r\n\t\t\tString errStr = \"PrimoQueryByNonISBN:remoteQuery()\" + errors.toString();\r\n\t\t\tSystem.out.println(errStr);\r\n\t\t\terrMsg = errStr;\r\n\t\t} // end catch\r\n\t\treturn false;\r\n\t}", "public void testDeletePredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 10);\n part.deletePredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 5);\n\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n\n assertEquals(5,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "@Test\r\n\tpublic void testPrepareGraphQuery3() throws Exception\r\n\t{\r\n\t\tStatement st1 = vf.createStatement(john, fname, johnfname, dirgraph);\r\n\t\tStatement st2 = vf.createStatement(john, lname, johnlname, dirgraph);\r\n\t\tStatement st3 = vf.createStatement(john, homeTel, johnhomeTel, dirgraph);\r\n\t\tStatement st4 = vf.createStatement(john, email, johnemail, dirgraph);\r\n\t\tStatement st5 = vf.createStatement(micah, fname, micahfname, dirgraph);\r\n\t\tStatement st6 = vf.createStatement(micah, lname, micahlname, dirgraph);\r\n\t\tStatement st7 = vf.createStatement(micah, homeTel, micahhomeTel, dirgraph);\r\n\t\tStatement st8 = vf.createStatement(fei, fname, feifname, dirgraph);\r\n\t\tStatement st9 = vf.createStatement(fei, lname, feilname, dirgraph);\r\n\t\tStatement st10 = vf.createStatement(fei, email, feiemail, dirgraph);\r\n\t\t\r\n\t\r\n\t\ttestWriterCon.add(st1);\r\n\t\ttestWriterCon.add(st2);\r\n\t\ttestWriterCon.add(st3);\r\n\t\ttestWriterCon.add(st4);\r\n\t\ttestWriterCon.add(st5);\r\n\t\ttestWriterCon.add(st6);\r\n\t\ttestWriterCon.add(st7);\r\n\t\ttestWriterCon.add(st8);\r\n\t\ttestWriterCon.add(st9);\r\n\t\ttestWriterCon.add(st10);\r\n\t\t\r\n\t\tAssert.assertTrue(testWriterCon.hasStatement(st1, false));\r\n\t\tAssert.assertFalse(testWriterCon.hasStatement(st1, false, (Resource)null));\r\n\t\tAssert.assertFalse(testWriterCon.hasStatement(st1, false, null));\r\n\t\tAssert.assertTrue(testWriterCon.hasStatement(st1, false, dirgraph));\r\n\t\t\r\n\t\t\r\n\t\tAssert.assertEquals(10, testAdminCon.size(dirgraph));\t\t\r\n\t\t\t\r\n\t\tString query = \" DESCRIBE <http://marklogicsparql.com/addressbook#firstName> \";\r\n\t\tGraphQuery queryObj = testReaderCon.prepareGraphQuery(query);\r\n\t\t\t\r\n\t\tGraphQueryResult result = queryObj.evaluate();\r\n\t\tresult.hasNext();\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(false)));\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testQuery1() {\n\t}", "@Test\n\tpublic void testPassThroughHandler_EmptyResult() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\n\t\t\t\t\t\t\t\"SELECT ?person ?interest WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name ; <http://xmlns.com/foaf/0.1/interest> ?interest }\");\n\t\t\ttq.setBinding(\"name\", l(\"NotExist\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\tAssertions.assertEquals(Lists.newArrayList(\"person\", \"interest\"), bindingNames);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tthrow new IllegalStateException(\"Expected empty result\");\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t}\n\t}", "private static Boolean specialQueries(String query) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n clickList = false;\n //newCorpus = true;\n\n if (query.equals(\"q\")) {\n\n System.exit(0);\n return true;\n }\n\n String[] subqueries = query.split(\"\\\\s+\"); //split around white space\n\n if (subqueries[0].equals(\"stem\")) //first term in subqueries tells computer what to do \n {\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n TokenProcessor processor = new NewTokenProcessor();\n if (subqueries.length > 1) //user meant to stem the token not to search stem\n {\n List<String> stems = processor.processToken(subqueries[1]);\n\n //clears list and repopulates it \n String stem = \"Stem of query '\" + subqueries[1] + \"' is '\" + stems.get(0) + \"'\";\n\n GUI.ResultsLabel.setText(stem);\n\n return true;\n }\n\n } else if (subqueries[0].equals(\"vocab\")) {\n List<String> vocabList = Disk_posIndex.getVocabulary();\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n\n int vocabCount = 0;\n for (String v : vocabList) {\n if (vocabCount < 1000) {\n vocabCount++;\n GUI.JListModel.addElement(v);\n }\n }\n GUI.ResultsLabel.setText(\"Total size of vocabulary: \" + vocabCount);\n return true;\n }\n\n return false;\n }", "CampusSearchQuery generateQuery();", "@Test\n @OperateOnDeployment(\"server\")\n public void shouldGetResourceByQuery() {\n given().header(\"Authorization\", \"Bearer access_token\").expect().statusCode(200).and().expect().body(\"size\",\n equalTo(1)).and().expect().body(\"items.item.name\", hasItem(\"Technologies\")).and().expect().body(\"items.item.sort\",\n hasItem(20)).when().get(getBaseTestUrl() + \"/1/categories/get/json/query;catName=Technologies?expand=\" +\n \"{\\\"branches\\\":[{\\\"trunk\\\":{\\\"name\\\":\\\"categories\\\"}}]})\");\n }", "public void test_hk_01() {\n // synthesise a mini-document\n String base = \"http://jena.hpl.hp.com/test#\";\n String doc =\n \"<rdf:RDF\"\n + \" xmlns:rdf=\\\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\\\"\"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <owl:Ontology rdf:about=\\\"\\\">\"\n + \" <owl:imports rdf:resource=\\\"http://www.w3.org/2002/07/owl\\\" />\"\n + \" </owl:Ontology>\"\n + \"</rdf:RDF>\";\n \n // read in the base ontology, which includes the owl language\n // definition\n // note OWL_MEM => no reasoner is used\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.getDocumentManager().setMetadataSearchPath( \"file:etc/ont-policy-test.rdf\", true );\n m.read(new ByteArrayInputStream(doc.getBytes()), base);\n \n // we need a resource corresponding to OWL Class but in m\n Resource owlClassRes = m.getResource(OWL.Class.getURI());\n \n // now can we see this as an OntClass?\n OntClass c = (OntClass) owlClassRes.as(OntClass.class);\n assertNotNull(\"OntClass c should not be null\", c);\n \n //(OntClass) (ontModel.getProfile().CLASS()).as(OntClass.class);\n \n }", "public Collection<URI> searchWithSPARQL(final String queryString)\n {\n if (DEBUG.SEARCH) Log.debug(\"searchWithSPARQL; queryString:\\n\" + Util.tags(queryString));\n \n final Collection<URI> resultSet = new ArrayList<URI>();\n final com.hp.hpl.jena.query.Query query = QueryFactory.create(queryString);\n \n if (DEBUG.SEARCH) Log.debug(\"QF created \" + Util.tag(query)\n + \"; memory=\" + Runtime.getRuntime().freeMemory()\n + \"\\n\" + query.toString().trim().replaceAll(\"\\n\\n\", \"\\n\"));\n\n final QueryExecution qe = QueryExecutionFactory.create(query, this); // 2nd arg is for Model or for FileManager?\n if (DEBUG.SEARCH) Log.debug(\"created QEF \" + qe + \"; memory=\" + Runtime.getRuntime().freeMemory());\n\n final ResultSet results = qe.execSelect();\n if (DEBUG.SEARCH) Log.debug(\"execSelect returned; memory=\" + Runtime.getRuntime().freeMemory());\n \n while (results.hasNext()) {\n final QuerySolution qs = results.nextSolution();\n if (DEBUG.SEARCH) {\n final String qss = qs.toString().replaceAll(\"<http://vue.tufts.edu\", \"...\"); // shorten debug output\n Log.debug(\"qSol \" + String.format(\"%.190s%s\", qss, qss.length() > 190 ? (\"...x\"+qss.length()) : \"\"));\n }\n if (false) {\n // debug debug all vars from query\n //Util.dumpIterator(qs.varNames());\n Iterator<String> vn = qs.varNames(); \n while (vn.hasNext()) {\n String v = vn.next();\n Log.debug(\"\\t\" + Util.tags(v) + \"=\" + Util.tags(qs.get(v)));\n }\n }\n try {\n resultSet.add(new URI(qs.getResource(\"rid\").getURI()));\n } catch (Throwable t) {\n Log.warn(\"handling QuerySolution \" + qs, t);\n }\n }\n qe.close();\n return resultSet;\n }", "@Test\n\tpublic void testShowResult() {\n\t\tConfigurationManager config = new ConfigurationManager();\n\t\tInvertedIndex index = new InvertedIndex();\n\t\tFileManager manager = new FileManager(config.getConfig().getFileName(), index);\n\t\tHashMap<String, String> parameters = new HashMap<String, String>();\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"asin\", \"ABCD\");\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"asin\", \"B00002243X\");\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 10);\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"query\", \"ASDAJKSDJHKASJK\");\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"query\", \"jumpers\");\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 8);\n\t}", "public interface Query {\n\n\t/**\n\t * @return ID of the given query\n\t */\n\tint queryID();\n\t\n\t/**\n\t * @return given query\n\t */\n\tString query();\n\t\n\t/**\n\t * @return list of relevant documents to the corresponding query\n\t */\n\tList<RelevanceInfo> listOfRelevantDocuments();\n\t\n\t/**\n\t * @return list of results to the corresponding query after running one of the retrieval models\n\t */\n\tList<Result> resultList();\n\t\n\t/**\n\t * @param resultList\n\t * @Effects adds results to the result list of the corresponding query\n\t */\n\tvoid putResultList(List<Result> resultList);\n}", "public static void main(String[] args) throws Exception {\n TDB.setOptimizerWarningFlag(false);\n\n final String DATASET_DIR_NAME = \"data0\";\n final Dataset data0 = TDBFactory.createDataset( DATASET_DIR_NAME );\n\n // show the currently registered names\n for (Iterator<String> it = data0.listNames(); it.hasNext(); ) {\n out.println(\"NAME=\"+it.next());\n }\n\n out.println(\"getting named model...\");\n /// this is the OWL portion\n final Model model = data0.getNamedModel( MY_NS );\n out.println(\"Model := \"+model);\n\n out.println(\"getting graph...\");\n /// this is the DATA in that MODEL\n final Graph graph = model.getGraph();\n out.println(\"Graph := \"+graph);\n\n if (graph.isEmpty()) {\n final Resource product1 = model.createResource( MY_NS +\"product/1\");\n final Property hasName = model.createProperty( MY_NS, \"#hasName\");\n final Statement stmt = model.createStatement(\n product1, hasName, model.createLiteral(\"Beach Ball\",\"en\") );\n out.println(\"Statement = \" + stmt);\n\n model.add(stmt);\n\n // just for fun\n out.println(\"Triple := \" + stmt.asTriple().toString());\n } else {\n out.println(\"Graph is not Empty; it has \"+graph.size()+\" Statements\");\n long t0, t1;\n t0 = System.currentTimeMillis();\n final Query q = QueryFactory.create(\n \"PREFIX exns: <\"+MY_NS+\"#>\\n\"+\n \"PREFIX exprod: <\"+MY_NS+\"product/>\\n\"+\n \" SELECT * \"\n // if you don't provide the Model to the\n // QueryExecutionFactory below, then you'll need\n // to specify the FROM;\n // you *can* always specify it, if you want\n // +\" FROM <\"+MY_NS+\">\\n\"\n // +\" WHERE { ?node <\"+MY_NS+\"#hasName> ?name }\"\n // +\" WHERE { ?node exns:hasName ?name }\"\n // +\" WHERE { exprod:1 exns:hasName ?name }\"\n +\" WHERE { ?res ?pred ?obj }\"\n );\n out.println(\"Query := \"+q);\n t1 = System.currentTimeMillis();\n out.println(\"QueryFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n try ( QueryExecution qExec = QueryExecutionFactory\n // if you query the whole DataSet,\n // you have to provide a FROM in the SparQL\n //.create(q, data0);\n .create(q, model) ) {\n t1 = System.currentTimeMillis();\n out.println(\"QueryExecutionFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n ResultSet rs = qExec.execSelect();\n t1 = System.currentTimeMillis();\n out.println(\"executeSelect.TIME=\"+(t1 - t0));\n while (rs.hasNext()) {\n QuerySolution sol = rs.next();\n out.println(\"Solution := \"+sol);\n for (Iterator<String> names = sol.varNames(); names.hasNext(); ) {\n final String name = names.next();\n out.println(\"\\t\"+name+\" := \"+sol.get(name));\n }\n }\n }\n }\n out.println(\"closing graph\");\n graph.close();\n out.println(\"closing model\");\n model.close();\n //out.println(\"closing DataSetGraph\");\n //dsg.close();\n out.println(\"closing DataSet\");\n data0.close();\n }", "public void test_anon_0() {\n String NS = \"http://example.org/foo#\";\n String sourceT =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'\"\n + \" xmlns:ex='http://example.org/foo#'\"\n + \" xmlns:owl='http://www.w3.org/2002/07/owl#'>\"\n + \" <owl:ObjectProperty rdf:about='http://example.org/foo#p' />\"\n + \" <owl:Class rdf:about='http://example.org/foo#A' />\"\n + \" <ex:A rdf:about='http://example.org/foo#x' />\"\n + \" <owl:Class rdf:about='http://example.org/foo#B'>\"\n + \" <owl:equivalentClass>\"\n + \" <owl:Restriction>\" \n + \" <owl:onProperty rdf:resource='http://example.org/foo#p' />\" \n + \" <owl:hasValue rdf:resource='http://example.org/foo#x' />\" \n + \" </owl:Restriction>\"\n + \" </owl:equivalentClass>\"\n + \" </owl:Class>\"\n + \"</rdf:RDF>\";\n \n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.read(new ByteArrayInputStream(sourceT.getBytes()), \"http://example.org/foo\");\n \n OntClass B = m.getOntClass( NS + \"B\");\n Restriction r = B.getEquivalentClass().asRestriction();\n HasValueRestriction hvr = r.asHasValueRestriction();\n RDFNode n = hvr.getHasValue();\n \n assertTrue( \"Should be an individual\", n instanceof Individual );\n }", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "public void test_dn_0() {\n OntModel schema = ModelFactory.createOntologyModel( OntModelSpec.OWL_LITE_MEM_RULES_INF, null );\n \n schema.read( \"file:doc/inference/data/owlDemoSchema.xml\", null );\n \n int count = 0;\n for (Iterator i = schema.listIndividuals(); i.hasNext(); ) {\n //Resource r = (Resource) i.next();\n i.next();\n count++;\n /* Debugging * /\n for (StmtIterator j = r.listProperties(RDF.type); j.hasNext(); ) {\n System.out.println( \"ind - \" + r + \" rdf:type = \" + j.nextStatement().getObject() );\n }\n System.out.println(\"----------\"); /**/\n }\n \n assertEquals( \"Expecting 6 individuals\", 6, count );\n }", "@Test\n void testRankFilter() {\n Query q = newQueryFromEncoded(\"?query=trump\" +\n \"&model.type=all\" +\n \"&model.defaultIndex=text\" +\n \"&filter=filterattribute%3Afrontpage_US_en-US\");\n assertEquals(\"RANK text:trump |filterattribute:frontpage_US_en-US\",\n q.getModel().getQueryTree().toString());\n }", "<K, R extends IResponse> R query(IQueryRequest<K> queryRequest);", "T getQueryInfo();", "@SuppressWarnings(\"unchecked\")\n\tprivate CompoundQuery handleQuery() throws Exception{\n\t\tif (this.resultant != null && this.resultant.getResultsContainer() != null){\n\t\t\t//compoundQuery = (CompoundQuery) resultant.getAssociatedQuery();\n\t\t\tViewable view = newCompoundQuery.getAssociatedView();\n\t\t\tResultsContainer resultsContainer = this.resultant.getResultsContainer();\n\t\t\tsampleCrit = null;\n\t Collection sampleIDs = new ArrayList(); \n\t\t\t//Get the samples from the resultset object\n\t\t\tif(resultsContainer!= null){\n\t\t\t\tCollection samples = null;\n\t\t\t\tif(resultsContainer != null &&resultsContainer instanceof DimensionalViewContainer){\t\t\t\t\n\t\t\t\t\tDimensionalViewContainer dimensionalViewContainer = (DimensionalViewContainer)resultsContainer;\n\t\t\t\t\t\tCopyNumberSingleViewResultsContainer copyNumberSingleViewContainer = dimensionalViewContainer.getCopyNumberSingleViewContainer();\n\t\t\t\t\t\tGeneExprSingleViewResultsContainer geneExprSingleViewContainer = dimensionalViewContainer.getGeneExprSingleViewContainer();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(copyNumberSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = copyNumberSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(geneExprSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = geneExprSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t \t\tsampleCrit = new SampleCriteria();\n\t\t \t\t\tsampleCrit.setSampleIDs(sampleIDs);\n\n AddConstrainsToQueriesHelper constrainedSamplesHandler= new AddConstrainsToQueriesHelper();\n constrainedSamplesHandler.constrainQueryWithSamples(newCompoundQuery,sampleCrit);\n\t\t\t\tnewCompoundQuery = getShowAllValuesQuery(newCompoundQuery);\n\t\t\t\tnewCompoundQuery.setAssociatedView(view);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn newCompoundQuery;\n\t\t}", "@Override\n public R visit(RDFLiteral n, A argu) {\n R _ret = null;\n n.sparqlString.accept(this, argu);\n n.nodeOptional.accept(this, argu);\n return _ret;\n }", "void filterQuery(ServerContext context, QueryRequest request, QueryResultHandler handler,\n RequestHandler next);", "public void xxtest_oh_01() {\n String NS = \"http://www.idi.ntnu.no/~herje/ja/\";\n Resource[] expected = new Resource[] {\n ResourceFactory.createResource( NS+\"reiseliv.owl#Reiseliv\" ),\n ResourceFactory.createResource( NS+\"hotell.owl#Hotell\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#Restaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteBadRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteDoRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#SkogRestaurant\" ),\n };\n \n test_oh_01scan( OntModelSpec.OWL_MEM, \"No inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_MINI_RULE_INF, \"Mini rule inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_RULE_INF, \"Full rule inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_MICRO_RULE_INF, \"Micro rule inf\", expected );\n }", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "@Test public void onePredicate() {\n query(\"//ul/li['']\", \"\");\n query(\"//ul/li['x']\", LI1 + '\\n' + LI2);\n query(\"//ul/li[<a b='{\" + _RANDOM_INTEGER.args() + \" }'/>]\", LI1 + '\\n' + LI2);\n\n query(\"//ul/li[0]\", \"\");\n query(\"//ul/li[1]\", LI1);\n query(\"//ul/li[2]\", LI2);\n query(\"//ul/li[3]\", \"\");\n query(\"//ul/li[last()]\", LI2);\n }", "private static void initSPARQLAnythingEngine() {\n\t\t// Register the JSON-LD parser factory for extension .json\n\t\tReaderRIOTFactory parserFactoryJsonLD = new RiotUtils.ReaderRIOTFactoryJSONLD();\n\t\tRDFParserRegistry.registerLangTriples(RiotUtils.JSON, parserFactoryJsonLD);\n\t\t// Setup FX executor\n\t\tJenaSystem.init();\n\t\tQC.setFactory(ARQ.getContext(), FacadeX.ExecutorFactory);\n\t}", "QueryResponse query(SolrParams solrParams) throws SolrServerException;", "@Test\n public void testRelWithHref() throws RepositoryException {\n assertExtract(\"/html/rdfa/rel-href.html\");\n logger.debug(dumpModelToTurtle());\n\n assertContains(RDFUtils.iri(baseIRI.toString(), \"#me\"), FOAF.getInstance().name, \"John Doe\");\n assertContains(RDFUtils.iri(baseIRI.toString(), \"#me\"), FOAF.getInstance().homepage,\n RDFUtils.iri(\"http://example.org/blog/\"));\n }", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query, Pagination pagination);", "public final void querySAX(String query, ContentHandler handler,\n\t\t\tAttributes atts) throws SQLException, SAXException {\n\t\tfinal Connection con = getConnection();\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = con.createStatement();\n\t\t\tDOMUtils.resultSet2ContentHandler(stmt.executeQuery(query),\n\t\t\t\t\thandler, atts);\n\t\t} finally {\n\t\t\tif (stmt != null)\n\t\t\t\tstmt.close();\n\t\t\tif (con != null)\n\t\t\t\tcon.close();\n\t\t}\n\t}", "@Test\n public void testGetResultSet() throws MainException {\n System.out.println(\"getResultSet\");\n String queryText = \"select * from infermieri\";\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n ResultSet result = instance.getResultSet(queryText);\n assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n }", "@Test\n\tpublic void testKeywordQuery(){\n\t\t//manager.getResponse(\"american football \"); //match multiple keywords\n//\t\tmanager.getResponse(\"list of Bond 007 movies\");\n//\tmanager.getResponse(\"Disney movies\");\n\t\t//manager.keywordQuery(\"Paul Brown Stadium location\");\n\t\t//manager.keywordQuery(\"0Francesco\");\n System.out.println(\"******* keyword query *******\");\n\t\t//manager.keywordQuery(\"sportspeople in tennis\");\n\t\t//manager.keywordSearch(\"list of movies starring Sean Connery\",ElasticIndex.analyzed,100 );\n//\t\tmanager.keywordSearch(\"movies starring Sean Connery\",ElasticIndex.notStemmed,100 );\n// manager.keywordSearch(\"musical movies tony award\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"movies directed by Woody Allen\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"United states professional sports teams\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"computer games developed by Ubisoft\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"computer games developed by Ubisoft\",ElasticIndex.notStemmed,100 );\n// manager.keywordSearch(\"movies academy award nominations\",ElasticIndex.notStemmed,100 );\n System.out.println(SearchResultUtil.toSummary(manager.keywordSearch(\"movies directed by Woody Allen\",ElasticIndex.notLowercased,20 )));\n //manager.keywordSearch(\"grammy best album in 2012\",ElasticIndex.notAnalyzed,100 );\n //(better than analyzed) manager.keywordSearch(\"grammy best album in 2012\",ElasticIndex.notStemmed,100 );\n System.out.println(\"*****************************\");\n\n\t\t//manager.keywordQuery(\"Disney movies\");\n\t}", "@Test\r\n\tpublic void testRuleSets2() throws Exception{\r\n\t\t\r\n\t\tAssert.assertEquals(0L, testAdminCon.size());\r\n\t\ttestAdminCon.add(micah, lname, micahlname, dirgraph1);\r\n\t\ttestAdminCon.add(micah, fname, micahfname, dirgraph1);\r\n\t\ttestAdminCon.add(micah, developPrototypeOf, semantics, dirgraph1);\r\n\t\ttestAdminCon.add(micah, type, sEngineer, dirgraph1);\r\n\t\ttestAdminCon.add(micah, worksFor, ml, dirgraph1);\r\n\t\t\r\n\t\ttestAdminCon.add(john, fname, johnfname,dirgraph);\r\n\t\ttestAdminCon.add(john, lname, johnlname,dirgraph);\r\n\t\ttestAdminCon.add(john, writeFuncSpecOf, inference, dirgraph);\r\n\t\ttestAdminCon.add(john, type, lEngineer, dirgraph);\r\n\t\ttestAdminCon.add(john, worksFor, ml, dirgraph);\r\n\t\t\r\n\t\ttestAdminCon.add(writeFuncSpecOf, subProperty, design, dirgraph1);\r\n\t\ttestAdminCon.add(developPrototypeOf, subProperty, design, dirgraph1);\r\n\t\ttestAdminCon.add(design, subProperty, develop, dirgraph1);\r\n\t\t\r\n\t\ttestAdminCon.add(lEngineer, subClass, engineer, dirgraph1);\r\n\t\ttestAdminCon.add(sEngineer, subClass, engineer, dirgraph1);\r\n\t\ttestAdminCon.add(engineer, subClass, employee, dirgraph1);\r\n\t\t\r\n\t\tString query = \"select (count (?s) as ?totalcount) where {?s ?p ?o .} \";\r\n\t\tTupleQuery tupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(SPARQLRuleset.RDFS_PLUS_FULL);\r\n\t\tTupleQueryResult result\t= tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(374, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\r\n\t\tRepositoryResult<Statement> resultg = testAdminCon.getStatements(null, null, null, true, dirgraph, dirgraph1);\r\n\t\t\r\n\t\tassertNotNull(\"Iterator should not be null\", resultg);\r\n\t\tassertTrue(\"Iterator should not be empty\", resultg.hasNext());\r\n\t\t\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(SPARQLRuleset.EQUIVALENT_CLASS);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(18, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(SPARQLRuleset.RDFS,SPARQLRuleset.INVERSE_OF);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(86, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(null,SPARQLRuleset.INVERSE_OF);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(18, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets((SPARQLRuleset)null, null);\r\n\t\ttupleQuery.setIncludeInferred(false);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(16, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t}", "private void init() throws JRException {\n if (result != null) {\n return;\n }\n if (endpointUrl == null) {\n throw new JRException(\"Endpoint URLs can't be null\");\n }\n if (sparqlStatement == null || sparqlStatement.length() == 0) {\n throw new JRException(\"SPARQL statements can't be null for \" + endpointUrl);\n }\n try {\n endpointObj = new SPARQLRepository(endpointUrl);\n endpointObj.initialize();\n } catch (Exception e) {\n throw new JRException(\"Exception initializing endpoint \" + endpointUrl, e);\n }\n try {\n conn = endpointObj.getConnection();\n log.info(\"Executing SPARQL: \" + sparqlStatement);\n TupleQuery q = conn.prepareTupleQuery(QueryLanguage.SPARQL, sparqlStatement);\n result = q.evaluate();\n log.debug(\"Bindings got, size: \" + result.getBindingNames().size());\n } catch (Exception e) {\n throw new JRException(\"Exception connecting to endpoint \" + endpointUrl, e);\n } finally {\n try {\n conn.close();\n } catch (RepositoryException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tString type = req.getParameter(\"type\");\n\t\tString concept = req.getParameter(\"concept\");\n\t\tif (type != null && type.equals(\"compare\")) {\n\t\t\tgetcompareResults(concept, resp);\n\t\t\treturn;\n\t\t}\n\t\tif (type != null && type.equals(\"freeb\")) {\n\t\t\ttry {\n\t\t\t\tcallFreebase(concept, resp);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tString query = req.getParameter(\"query\");\n\t\t// default dbpedia_query\n\t\tif (query == null) {\n\t\t\tquery = \"dbpedia_query\";\n\t\t}\n\t\t\n\t\tString chunk = req.getParameter(\"chunk\");\n\t\tint chunkNum = 1;\n\t\tif (chunk != null) {\n\t\t\tchunkNum = Integer.parseInt(chunk);\n\t\t}\n\t\tString cont = req.getParameter(\"cont\");\n\t\t// All string should be have CamelCase and words separated by underscore\n\t\t//if cont != null or concept contains '_' then camelize except if camelcase is not intended\n\t\tif ((cont == null && !concept.contains(\"_\"))) {\n\t\t\tString camel = req.getParameter(\"camel\");\n\t\t\tif (camel == null || !camel.contains(\"false\")) {\n\t\t\t\tconcept = toCamelCaseUnderscore(concept);\n\t\t\t} else {\n\t\t\t\tconcept = putUnderscore(concept);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Concept:: \" + concept);\n\t\t// SparqlEvaluator eval = SparqlEvaluator.getInstance();\n\t\t// RDFXMLProcessor eval = new RDFXMLProcessor();\n\t\tif (concept == null)\n\t\t\treturn;\n\t\t// List<JSONObject> js = eval.process(concept,query);\n\t\tSystem.out.println(\"Before Process\");\n\t\tSystem.out.println(chunkNum);\n\t\tList<JSONObject> js = new ArrayList<JSONObject>(); \n\t\t\n\t\ttry {\n\t\t\tjs = SparqlEvaluator.getInstance().process(concept,\n\t\t\t\t\tquery, chunkNum);\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\tresp.getWriter().print(\"\");\n\t\t}\n\t\tif (js.isEmpty()) {\n\t\t\tresp.getWriter().print(\"\");\n\t\t\treturn;\n\t\t}\n\t\tIterator<JSONObject> itr = js.iterator();\n\t\tSystem.out.println(\"Size of list :: \" + js.size());\n\n\t\tresp.setContentType(\"text/html; charset=UTF-8\");\n\n\t\tString dset = \"dbpedia\";\n\n\t\tString respout = \"{\\\"bindings\\\": [\";\n\t\tresp.getWriter().print(respout);\n\t\tSystem.out.println(respout);\n\n\t\t\n\t\trespout = \"{\\\"type\\\":\\\"num\\\",\\\"val\\\":\\\"\"\n\t\t\t+ SparqlEvaluator.getCacheNum(concept, query, dset)\n\t\t\t+ \"\\\"},\";\n\t\tresp.getWriter().print(respout);\n\t\tSystem.out.println(respout);\n\n\t\tboolean first = true;\n\t\tint count = 1;\n\t\twhile (itr.hasNext()) {\n\t\t\tif (!first) {\n\t\t\t\trespout = \",\"; resp.getWriter().print(respout); System.out.println(respout);\n\n\t\t\t}\n\t\t\tfirst = false;\n\t\t\tString nstr = itr.next().toString();\n\t\t\tresp.getWriter().print(nstr);\n\t\t\tSystem.out.println((count++) + \" :\" + nstr);\n\t\t}\n\t\tSystem.out.println(\"After loop\");\n\t\tresp.getWriter().print(\"]}\");\n\t\tSystem.out.println(\"Done\");\n\n\t}", "private RDF_Term testTerm(Node node, PrefixMap pmap, boolean asValue) {\n RDF_Term rt = ProtobufConvert.convert(node, pmap, asValue) ;\n\n if ( node == null) {\n assertTrue(rt.hasUndefined());\n return rt;\n }\n\n switch (rt.getTermCase()) {\n// message RDF_Term {\n// oneof term {\n// RDF_IRI iri = 1 ;\n// RDF_BNode bnode = 2 ;\n// RDF_Literal literal = 3 ;\n// RDF_PrefixName prefixName = 4 ;\n// RDF_VAR variable = 5 ;\n// RDF_Triple tripleTerm = 6 ;\n// RDF_ANY any = 7 ;\n// RDF_UNDEF undefined = 8 ;\n// RDF_REPEAT repeat = 9 ;\n//\n// // Value forms of literals.\n// int64 valInteger = 20 ;\n// double valDouble = 21 ;\n// RDF_Decimal valDecimal = 22 ;\n// }\n// }\n case IRI : {\n RDF_IRI iri = rt.getIri() ;\n assertEquals(node.getURI(), iri.getIri()) ;\n break;\n }\n case BNODE : {\n RDF_BNode bnode = rt.getBnode() ;\n assertEquals(node.getBlankNodeLabel(), bnode.getLabel()) ;\n break;\n }\n case LITERAL : {\n RDF_Literal lit = rt.getLiteral() ;\n assertEquals(node.getLiteralLexicalForm(), lit.getLex()) ;\n\n if (JenaRuntime.isRDF11) {\n // RDF 1.1\n if ( Util.isSimpleString(node) ) {\n assertTrue(lit.getSimple());\n // Protobug default is \"\"\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNullPB(lit.getLangtag()) ;\n } else if ( Util.isLangString(node) ) {\n assertFalse(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNotSame(\"\", lit.getLangtag()) ;\n }\n else {\n assertFalse(lit.getSimple());\n // Regular typed literal.\n assertTrue(lit.getDatatype() != null || lit.getDtPrefix() != null );\n assertNullPB(lit.getLangtag()) ;\n }\n } else {\n // RDF 1.0\n if ( node.getLiteralDatatype() == null ) {\n if ( Util.isLangString(node ) ) {\n assertFalse(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertNull(lit.getDtPrefix()) ;\n assertNotSame(\"\", lit.getLangtag()) ;\n } else {\n assertTrue(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNullPB(lit.getLangtag()) ;\n }\n } else {\n assertTrue(lit.getDatatype() != null || lit.getDtPrefix() != null );\n }\n }\n break;\n }\n case PREFIXNAME : {\n assertNotNull(rt.getPrefixName().getPrefix()) ;\n assertNotNull(rt.getPrefixName().getLocalName()) ;\n String x = pmap.expand(rt.getPrefixName().getPrefix(), rt.getPrefixName().getLocalName());\n assertEquals(node.getURI(),x);\n break;\n }\n case VARIABLE :\n assertEquals(node.getName(), rt.getVariable().getName());\n break;\n case TRIPLETERM : {\n RDF_Triple encTriple = rt.getTripleTerm();\n Triple t = node.getTriple();\n RDF_Term rt_s = testTerm(t.getSubject(), pmap, asValue);\n RDF_Term rt_p = testTerm(t.getPredicate(), pmap, asValue);\n RDF_Term rt_o = testTerm(t.getObject(), pmap, asValue);\n assertEquals(encTriple.getS(), rt_s);\n assertEquals(encTriple.getP(), rt_p);\n assertEquals(encTriple.getO(), rt_o);\n break;\n }\n case ANY :\n assertEquals(Node.ANY, node);\n case REPEAT :\n break;\n case UNDEFINED :\n assertNull(node);\n return rt;\n case VALINTEGER : {\n long x = rt.getValInteger();\n assertTrue(integerSubTypes.contains(node.getLiteralDatatype()));\n //assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDinteger);\n long x2 = Long.parseLong(node.getLiteralLexicalForm());\n assertEquals(x,x2);\n break;\n }\n case VALDOUBLE : {\n double x = rt.getValDouble();\n assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDdouble);\n double x2 = Double.parseDouble(node.getLiteralLexicalForm());\n assertEquals(x, x2, 0.01);\n break;\n }\n case VALDECIMAL : {\n assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDdecimal);\n NodeValue nv = NodeValue.makeNode(node);\n assertTrue(nv.isDecimal());\n\n long value = rt.getValDecimal().getValue() ;\n int scale = rt.getValDecimal().getScale() ;\n BigDecimal d = BigDecimal.valueOf(value, scale) ;\n assertEquals(nv.getDecimal(), d);\n break;\n }\n case TERM_NOT_SET :\n break;\n }\n\n // And reverse\n if ( ! asValue ) {\n // Value based does not preserve exact datatype or lexical form.\n Node n2 = ProtobufConvert.convert(rt, pmap);\n assertEquals(node, n2) ;\n }\n\n return rt;\n }", "SparqlResultObject callSelectQuery(String name, Map<String, String> params);", "@Override\n public void search(Uri uri) {\n }", "public static void createSimple() throws Exception {\n\t\t// create a sesame memory sail\n\t\tMemoryStore memoryStore = new MemoryStore();\n\n\t\t// create a lucenesail to wrap the memorystore\n\t\tLuceneSail lucenesail = new LuceneSail();\t\t\n\t\t// set this parameter to let the lucene index store its data in ram\n\t\tlucenesail.setParameter(LuceneSail.LUCENE_RAMDIR_KEY, \"true\");\n\t\t// set this parameter to store the lucene index on disk\n\t\t// lucenesail.setParameter(LuceneSail.LUCENE_DIR_KEY, \"./data/mydirectory\");\n\t\t\n\t\t// wrap memorystore in a lucenesail\n\t\tlucenesail.setDelegate(memoryStore);\n\t\t\n\t\t// create a Repository to access the sails\n\t\tSailRepository repository = new SailRepository(lucenesail);\n\t\trepository.initialize();\n\t\t\n\t\t// add some test data, the FOAF ont\n\t\tSailRepositoryConnection connection = repository.getConnection();\n\t\tconnection.begin();\n\t\ttry {\n//\t\t\tconnection.setAutoCommit(false);\n\t\t\tFile file = new File(\"/Users/sschenk/Downloads/foaf.rdfs\");\n\t\t\tSystem.out.println(file.exists());\n\t\t\tconnection.add(\n\t\t\t\t\tfile,\n\t\t\t\t\t\"\", \n\t\t\t\t\tRDFFormat.RDFXML);\n\t\t\tconnection.commit();\n\t\t\t\n\t\t\t// search for all resources that mention \"person\"\n\t\t\tString queryString = \"PREFIX search: <\"+LuceneSailSchema.NAMESPACE+\"> \\n\" +\n\t\t\t\t\t\"SELECT ?x ?score ?snippet WHERE {?x search:matches ?match. \\n\" +\n\t\t\t\t\t\"?match search:query \\\"person\\\"; \\n\" +\n\t\t\t\t\t\"search:score ?score; \\n\" +\n\t\t\t\t\t\"search:snippet ?snippet. }\" ;\n\t\t\tSystem.out.println(\"Running query: \\n\"+queryString);\n\t\t\tTupleQuery query = connection.prepareTupleQuery(QueryLanguage.SPARQL, queryString);\n\t\t\tTupleResult result = query.evaluate();\n\t\t\ttry { \n\t\t\t\t// print the results\n\t\t\t\twhile (result.hasNext()){\n\t\t\t\t\tBindingSet bindings = result.next();\n\t\t\t\t\tSystem.out.println(\"found match: \");\n\t\t\t\t\tfor (Binding binding : bindings) {\n\t\t\t\t\t\tSystem.out.println(\" \"+binding.getName()+\": \"+binding.getValue());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tresult.close();\n\t\t\t}\n\t\t} finally {\n\t\t\tconnection.close();\n\t\t\trepository.shutDown();\n\t\t}\n\t\t\n\t}", "@Test\n public void testNestedQueryModifiers() throws Exception {\n\n String subqq=\"_query_:\\\"{!v=$qq}\\\"\";\n\n assertJQ(req(\"q\",\"_query_:\\\"\\\\\\\"how brown\\\\\\\"~2\\\"\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n assertJQ(req(\"q\",subqq, \"qq\",\"\\\"how brown\\\"~2\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n // Should explicit slop override? It currently does not, but that could be considered a bug.\n assertJQ(req(\"q\",subqq+\"~1\", \"qq\",\"\\\"how brown\\\"~2\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n // Should explicit slop override? It currently does not, but that could be considered a bug.\n assertJQ(req(\"q\",\" {!v=$qq}~1\", \"qq\",\"\\\"how brown\\\"~2\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n assertJQ(req(\"fq\",\"id:1\", \"fl\",\"id,score\", \"q\", subqq+\"^3\", \"qq\",\"text:x^2\"\n , \"debug\",\"query\"\n )\n ,\"/debug/parsedquery_toString=='((text:x)^2.0)^3.0'\"\n );\n\n assertJQ(req(\"fq\",\"id:1\", \"fl\",\"id,score\", \"q\", \" {!v=$qq}^3\", \"qq\",\"text:x^2\"\n , \"debug\",\"query\"\n )\n ,\"/debug/parsedquery_toString=='((text:x)^2.0)^3.0'\"\n );\n\n }", "public void Query() {\n }", "public void test_sf_969475() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <owl:ObjectProperty rdf:ID='p0'>\" +\n \" <owl:inverseOf>\" +\n \" <owl:ObjectProperty rdf:ID='q0' />\" +\n \" </owl:inverseOf>\" +\n \" </owl:ObjectProperty>\" +\n \" <owl:ObjectProperty rdf:ID='p1'>\" +\n \" <owl:inverseOf>\" +\n \" <owl:ObjectProperty rdf:ID='q1' />\" +\n \" </owl:inverseOf>\" +\n \" </owl:ObjectProperty>\" +\n \"</rdf:RDF>\";\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n m.read( new StringReader( SOURCE ), null );\n \n ObjectProperty p0 = m.getObjectProperty( \"http://jena.hpl.hp.com/test#p0\");\n Object invP0 = p0.getInverseOf();\n \n assertEquals( m.getResource( \"http://jena.hpl.hp.com/test#q0\"), invP0 );\n assertTrue( \"Should be an ObjectProperty facet\", invP0 instanceof ObjectProperty );\n \n ObjectProperty q1 = m.getObjectProperty( \"http://jena.hpl.hp.com/test#q1\");\n Object invQ1 = q1.getInverse();\n \n assertEquals( m.getResource( \"http://jena.hpl.hp.com/test#p1\"), invQ1 );\n assertTrue( \"Should be an ObjectProperty facet\", invQ1 instanceof ObjectProperty );\n }", "@Test\n public void test002() {\n int total = response.extract().path(\"total\");\n\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The search query is: \" + total);\n System.out.println(\"------------------End of Test---------------------------\");\n\n }", "Message handle(Message query, String kind);", "void contactQueryResult(String queryId, Contact contact);" ]
[ "0.65154463", "0.646076", "0.64355", "0.63797855", "0.6370891", "0.61967933", "0.61506295", "0.60005015", "0.59948105", "0.59887075", "0.59583133", "0.59453565", "0.5918102", "0.5867251", "0.5818676", "0.58168083", "0.57458586", "0.57274145", "0.5702796", "0.56701165", "0.56323516", "0.55130166", "0.55035686", "0.55006266", "0.5434425", "0.5434329", "0.54279566", "0.54160553", "0.54070187", "0.54048485", "0.5389304", "0.5388929", "0.53705215", "0.5326313", "0.5302646", "0.52979785", "0.5296412", "0.5283325", "0.5282805", "0.5280931", "0.5275579", "0.5271636", "0.5266484", "0.526324", "0.5261075", "0.5251658", "0.5249595", "0.52485377", "0.52350414", "0.5231826", "0.5219762", "0.52163154", "0.5209154", "0.51973325", "0.51962095", "0.5179952", "0.5179261", "0.51673245", "0.51649934", "0.51623243", "0.51504153", "0.5141914", "0.51409763", "0.5138766", "0.5137049", "0.513068", "0.5128168", "0.5126868", "0.5124203", "0.5123935", "0.51230747", "0.5121433", "0.5104722", "0.5104701", "0.5095074", "0.5088106", "0.5078655", "0.507413", "0.50715667", "0.5062454", "0.50401497", "0.50384045", "0.5037696", "0.5034526", "0.502958", "0.5024172", "0.50218683", "0.50207937", "0.5019569", "0.50166625", "0.5001256", "0.4997402", "0.49898034", "0.49896985", "0.49855593", "0.4980816", "0.4975009", "0.4972233", "0.49710828", "0.49528483" ]
0.58087605
16
/ test query with custom RDF handler
@Test public void testPassThroughHandler_EmptyResult() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); try (RepositoryConnection conn = fedxRule.getRepository().getConnection()) { // SELECT query TupleQuery tq = conn .prepareTupleQuery( "SELECT ?person ?interest WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name ; <http://xmlns.com/foaf/0.1/interest> ?interest }"); tq.setBinding("name", l("NotExist")); AtomicBoolean started = new AtomicBoolean(false); tq.evaluate(new AbstractTupleQueryResultHandler() { @Override public void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException { if (started.get()) { throw new IllegalStateException("Must not start query result twice."); } started.set(true); Assertions.assertEquals(Lists.newArrayList("person", "interest"), bindingNames); } @Override public void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException { throw new IllegalStateException("Expected empty result"); }; }); Assertions.assertTrue(started.get()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testWriteRDF() {\n\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.is_a(),NEURON), \"subclass\");\n\n\t\trunQuery(new LinkQueryTerm(MELANOCYTE),\"any link\");\n\t\t\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.part_of(),MELANOCYTE),\"part_of (class)\");\n\t\t\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.inheres_in(),\tnew LinkQueryTerm(relationVocabulary.part_of(),HUMAN_EYE)),\"phenotype in some part of the eye\");\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(MELANOCYTE),\"anything annotated to melanocyte\");\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(new LinkQueryTerm(relationVocabulary.inheres_in(),\tMELANOCYTE)),\"anything annotated to a melanocyte phenotype\");\n\t\t\n\t\tQueryTerm classQt =\tnew BooleanQueryTerm(new LinkQueryTerm(relationVocabulary.inheres_in(),NEURON),\tnew LinkQueryTerm(relationVocabulary.inheres_in(),BEHAVIOR));\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(classQt),\"boolean query\");\n\n\n\t}", "public static void main (String[] args) {\n EntityQuery query = new EntityQuery();\n Harvestable res = new OaiPmhResource();\n query.setFilter(\"test\", res);\n query.setAcl(\"diku\");\n query.setStartsWith(\"cf\",\"name\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"a\"));\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"x\"));\n\n query = new EntityQuery();\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"b\"));\n query.setQuery(\"usedBy=*library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"c\"));\n query.setQuery(\"(=library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"d\"));\n query.setQuery(\"usedBy=\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"e\"));\n query.setQuery(\"(usedBy!=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"f\"));\n query.setQuery(\"(usedBy==library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"g\"));\n query.setQuery(\"(usedBy===library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"h\"));\n }", "public void testDynamizePredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 100);\n\n part.setInsDyn(0.5);\n part.setDelDyn(0.1);\n \n part.dynamizePredicate(\"<http://dbpedia.org/ontology/deathPlace>\");\n\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n\n assertEquals(140,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "Object executeQuery(String sparqlQuery);", "@Test\n\tpublic void testSparqlQuery() throws OWLOntologyCreationException,\n\t\t\tIOException {\n\t\tInputStream ontStream = LDLPReasonerTest.class\n\t\t\t\t.getResourceAsStream(\"/data/university0-0.owl\");\n\t\tOWLOntologyManager manager = OWLManager.createOWLOntologyManager();\n\t\tOWLOntology ontology = manager\n\t\t\t\t.loadOntologyFromOntologyDocument(ontStream);\n\n\t\tInputStream queryStream = LDLPReasonerTest.class\n\t\t\t\t.getResourceAsStream(\"/data/lubm-query4.sparql\");\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tqueryStream));\n\t\tString line;\n\t\tString queryText = \"\";\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tqueryText = queryText + line + \"\\n\";\n\t\t}\n\n\t\tQuery query = QueryFactory.create(queryText, Syntax.syntaxARQ);\n\t\tLDLPReasoner reasoner = new LDLPReasoner(ontology);\n\t\tList<Literal> results = reasoner.executeQuery(query);\n\t\tSystem.out.println(results.size() + \" answers :\");\n\t\tfor (Literal result : results) {\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\tLDLPCompilerManager m = LDLPCompilerManager.getInstance();\n\n\t\t// m.dump();\n\n\t}", "@Test\n public void example13 () throws Exception {\n Map<String, Stmt> inputs = example2setup();\n conn.setNamespace(\"ex\", \"http://example.org/people/\");\n conn.setNamespace(\"ont\", \"http://example.org/ontology/\");\n String prefix = \"PREFIX ont: \" + \"<http://example.org/ontology/>\\n\";\n \n String queryString = \"select ?s ?p ?o where { ?s ?p ?o} \";\n TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"SELECT result:\", inputs.values(),\n statementSet(tupleQuery.evaluate()));\n \n assertTrue(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"Alice\\\" } \").evaluate());\n assertFalse(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"NOT Alice\\\" } \").evaluate());\n \n queryString = \"construct {?s ?p ?o} where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery constructQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Construct result\",\n mapKeep(new String[] {\"an\"}, inputs).values(),\n statementSet(constructQuery.evaluate()));\n \n queryString = \"describe ?s where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery describeQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Describe result\",\n mapKeep(new String[] {\"an\", \"at\"}, inputs).values(),\n statementSet(describeQuery.evaluate()));\n }", "@RequestMapping(value = \"/queryrdf\", method = {RequestMethod.GET, RequestMethod.POST})\n public void queryRdf(@RequestParam(\"query\") final String query,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_QUERY_AUTH, required = false) String auth,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_CV, required = false) final String vis,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_INFER, required = false) final String infer,\n @RequestParam(value = \"nullout\", required = false) final String nullout,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_RESULT_FORMAT, required = false) final String emit,\n @RequestParam(value = \"padding\", required = false) final String padding,\n @RequestParam(value = \"callback\", required = false) final String callback,\n final HttpServletRequest request,\n final HttpServletResponse response) {\n SailRepositoryConnection conn = null;\n final Thread queryThread = Thread.currentThread();\n auth = StringUtils.arrayToCommaDelimitedString(provider.getUserAuths(request));\n final Timer timer = new Timer();\n timer.schedule(new TimerTask() {\n\n @Override\n public void run() {\n log.debug(\"interrupting\");\n queryThread.interrupt();\n\n }\n }, QUERY_TIME_OUT_SECONDS * 1000);\n\n try {\n final ServletOutputStream os = response.getOutputStream();\n conn = repository.getConnection();\n\n final Boolean isBlankQuery = StringUtils.isEmpty(query);\n final ParsedOperation operation = QueryParserUtil.parseOperation(QueryLanguage.SPARQL, query, null);\n\n final Boolean requestedCallback = !StringUtils.isEmpty(callback);\n final Boolean requestedFormat = !StringUtils.isEmpty(emit);\n\n if (!isBlankQuery) {\n if (operation instanceof ParsedGraphQuery) {\n // Perform Graph Query\n final RDFHandler handler = new RDFXMLWriter(os);\n response.setContentType(\"text/xml\");\n performGraphQuery(query, conn, auth, infer, nullout, handler);\n } else if (operation instanceof ParsedTupleQuery) {\n // Perform Tuple Query\n TupleQueryResultHandler handler;\n\n if (requestedFormat && emit.equalsIgnoreCase(\"json\")) {\n handler = new SPARQLResultsJSONWriter(os);\n response.setContentType(\"application/json\");\n } else {\n handler = new SPARQLResultsXMLWriter(os);\n response.setContentType(\"text/xml\");\n }\n\n performQuery(query, conn, auth, infer, nullout, handler);\n } else if (operation instanceof ParsedUpdate) {\n // Perform Update Query\n performUpdate(query, conn, os, infer, vis);\n } else {\n throw new MalformedQueryException(\"Cannot process query. Query type not supported.\");\n }\n }\n\n if (requestedCallback) {\n os.print(\")\");\n }\n } catch (final Exception e) {\n log.error(\"Error running query\", e);\n throw new RuntimeException(e);\n } finally {\n if (conn != null) {\n try {\n conn.close();\n } catch (final RepositoryException e) {\n log.error(\"Error closing connection\", e);\n }\n }\n }\n\n timer.cancel();\n }", "public interface SparqlQueryService {\n\n\t/**\n\t * Generic method to invoke a supplied query regardless of its type. The\n\t * client has to inspect and cast the result object accordingly.\n\t * \n\t * @param name\n\t * @param params\n\t * @return\n\t */\n\tObject executeQuery(String sparqlQuery);\n\n\t/**\n\t * Generic method to invoke a query regardless of its type. The client has\n\t * to inspect and cast the result object accordingly.\n\t * \n\t * @param name\n\t * @param params\n\t * @return\n\t */\n\tObject callQuery(String name, Map<String, String> params);\n\n\t/**\n\t * Invocation of a SPARQL SELECT query. The resultant JSON structure is\n\t * serialized according to the W3C SPARQL 1.1 Query Results JSON Format.\n\t * \n\t * @see http://www.w3.org/TR/sparql11-query/#select\n\t * @param name\n\t * @param params\n\t * @return JSON result structure.\n\t */\n\tSparqlResultObject callSelectQuery(String name, Map<String, String> params);\n\n\t/**\n\t * Invocation of a SPARQL CONSTRUCT query resulting in new graph serialized\n\t * according to RDF/JSON format\n\t * (http://jena.apache.org/documentation/io/rdf-json.html).\n\t * \n\t * \n\t * @see http://www.w3.org/TR/sparql11-query/#construct\n\t * @param name\n\t * @param params\n\t * @return\n\t */\n\tGraph callConstructQuery(String name, Map<String, String> params);\n\n\t/**\n\t * Invocation of a SPARQL ASK query resulting in a boolean value.\n\t * \n\t * @see\n\t * \n\t * @param name\n\t * Unique name of the query.\n\t * @param params\n\t * Map of required parameter-value pairs.\n\t * @return true or false, depending whether the pattern matches.\n\t */\n\tBoolean callAskQuery(String name, Map<String, String> params);\n\n}", "public void test_afs_01() {\n String sourceT =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'\"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <owl:Class rdf:about='http://example.org/foo#A'>\"\n + \" </owl:Class>\"\n + \"</rdf:RDF>\";\n \n String sourceA =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' \"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <rdf:Description rdf:about='http://example.org/foo#x'>\"\n + \" <rdf:type rdf:resource='http://example.org/foo#A' />\"\n + \" </rdf:Description>\"\n + \"</rdf:RDF>\";\n \n Model tBox = ModelFactory.createDefaultModel();\n tBox.read(new ByteArrayInputStream(sourceT.getBytes()), \"http://example.org/foo\");\n \n Model aBox = ModelFactory.createDefaultModel();\n aBox.read(new ByteArrayInputStream(sourceA.getBytes()), \"http://example.org/foo\");\n \n Reasoner reasoner = ReasonerRegistry.getOWLReasoner();\n reasoner = reasoner.bindSchema(tBox);\n \n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM_RULE_INF);\n spec.setReasoner(reasoner);\n \n OntModel m = ModelFactory.createOntologyModel(spec, aBox);\n \n List inds = new ArrayList();\n for (Iterator i = m.listIndividuals(); i.hasNext();) {\n inds.add(i.next());\n }\n \n assertTrue(\"x should be an individual\", inds.contains(m.getResource(\"http://example.org/foo#x\")));\n \n }", "@Test\n public void queryWithOneInnerQueryCreate() throws IOException {\n BaseFuseClient fuseClient = new BaseFuseClient(\"http://localhost:8888/fuse\");\n //query request\n CreateQueryRequest request = new CreateQueryRequest();\n request.setId(\"1\");\n request.setName(\"test\");\n request.setQuery(Q1());\n //submit query\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .body(request)\n .post(\"/fuse/query\")\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1/cursor\"));\n assertEquals(1,queryResourceInfo.getInnerUrlResourceInfos().size());\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(201)\n .contentType(\"application/json;charset=UTF-8\");\n\n //get query resource by id\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .get(\"/fuse/query/\"+request.getId()+\"->\"+Q2().getName())\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(200)\n .contentType(\"application/json;charset=UTF-8\");\n\n\n }", "@Test\n\tpublic void testPassThroughHandler_MultiSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\n\t\t\t\t\t\t\t\"SELECT ?person ?interest WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name ; <http://xmlns.com/foaf/0.1/interest> ?interest }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace looks like this java.lang.Exception at\n\t\t\t\t\t * org.eclipse.rdf4j.federated.BasicTests$1.startQueryResult(BasicTests.java:276) at\n\t\t\t\t\t * org.eclipse.rdf4j.query.QueryResults.report(QueryResults.java:263) at\n\t\t\t\t\t * org.eclipse.rdf4j.federated.structures.FedXTupleQuery.evaluate(FedXTupleQuery.java:69)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertEquals(QueryResults.class.getName(),\n\t\t\t\t\t\t\tnew Exception().getStackTrace()[1].getClassName());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"person\"), iri(\"http://example.org/\", \"a\"));\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"interest\").stringValue(), \"SPARQL 1.1 Basic Federated Query\");\n\t\t\t\t\tnumberOfResults.incrementAndGet();\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(1, numberOfResults.get());\n\t\t}\n\t}", "public static void main( String[] args ) {\n\n Model m = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RDFS_INF);\n\n\n FileManager.get().readModel( m, owlFile );\n String myOntologyName = \"http://www.w3.org/2002/07/owl#\";\n String myOntologyNS = \"http://www.w3.org/2002/07/owl#\";\n////\n////\n// String rdfPrefix = \"PREFIX rdf: <\"+RDF.getURI()+\">\" ;\n// String myOntologyPrefix = \"PREFIX \"+myOntologyName+\": <\"+myOntologyNS+\">\" ;\n// String myOntologyPrefix1 = \"PREFIX \"+myOntologyName ;\n String myOntologyPrefix2 = \"prefix pizza: <http://www.w3.org/2002/07/owl#> \";\n//\n//\n//// String queryString = myOntologyPrefix + NL\n//// + rdfPrefix + NL +\n//// \"SELECT ?subject\" ;\n \n String queryString = rdfPrefix + myOntologyPrefix2 +\n// \t\t \"prefix pizza: <http://www.w3.org/2002/07/owl#> \"+ \n \t\t \"prefix rdfs: <\" + RDFS.getURI() + \"> \" +\n \t\t \"prefix owl: <\" + OWL.getURI() + \"> \" +\n// \t\t \"select ?o where {?s ?p ?o}\";\n \n//\t\t\t\t\t\t\"select ?s where {?s rdfs:label \"苹果\"@zh}\";\n \n// \"SELECT ?label WHERE { ?subject rdfs:label ?label }\" ;\n// \"SELECT DISTINCT ?predicate ?label WHERE { ?subject ?predicate ?object. ?predicate rdfs:label ?label .}\";\n// \"SELECT DISTINCT ?s WHERE {?s rdfs:label \\\"Italy\\\"@en}\" ;\n// \"SELECT DISTINCT ?s WHERE {?s rdfs:label \\\"苹果\\\"@zh}\" ;\n// \"SELECT DISTINCT ?s WHERE\" +\n// \"{?object rdfs:label \\\"水果\\\"@zh.\" +\n// \"?subject rdfs:subClassOf ?object.\" +\n// \"?subject rdfs:label ?s}\";\n //星号是转义字符,分号是转义字符\n\t\t\t\t\"SELECT DISTINCT ?e ?s WHERE {?entity a ?subject.?subject rdfs:subClassOf ?object.\"+\n \"?object rdfs:label \\\"富士苹果\\\"@zh.?entity rdfs:label ?e.?subject rdfs:label ?s}ORDER BY ?s\";\n \t\t\n\n \n \t\tcom.hp.hpl.jena.query.Query query = QueryFactory.create(queryString);\n \t\tQueryExecution qe = QueryExecutionFactory.create(query, m);\n \t\tcom.hp.hpl.jena.query.ResultSet results = qe.execSelect();\n\n \t\tResultSetFormatter.out(System.out, results, query);\n \t\tqe.close();\n\n// Query query = QueryFactory.create(queryString) ;\n\n query.serialize(new IndentedWriter(System.out,true)) ;\n System.out.println() ;\n\n\n\n QueryExecution qexec = QueryExecutionFactory.create(query, m) ;\n\n try {\n\n ResultSet rs = qexec.execSelect() ;\n\n\n for ( ; rs.hasNext() ; ){\n QuerySolution rb = rs.nextSolution() ;\n RDFNode y = rb.get(\"person\");\n System.out.print(\"name : \"+y+\"--- \");\n Resource z = (Resource) rb.getResource(\"person\");\n System.out.println(\"plus simplement \"+z.getLocalName());\n }\n }\n finally{\n qexec.close() ;\n }\n }", "void doTests() {\n\t\tString doc = \"\", r = \"\";\n\n\t\tDomeoPermissions dp3 = new DomeoPermissions(\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnew String[] { \"urn:group:uuid:4028808c3dccfe48013dccfe95ea0005 1\" });\n\t\tr = getDocument(\"1\", false, dp3);\n\n\t\tr = termQuery(\"domeo_!DOMEO_NS!_agents.@type\", \"foafx:Person\", 0, 10,\n\t\t\t\tfalse, dp3);\n\n\t\tr = phraseQuery(\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_context.ao_!DOMEO_NS!_hasSelector.ao_!DOMEO_NS!_suffix\",\n\t\t\t\t\"enabling application\", 0, 10, false, dp3);\n\n\t\tdp3 = new DomeoPermissions(\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnew String[] { \"urn:group:uuid:4028808c3dccfe48013dccfe95ea0005 1\" });\n\t\tr = query(\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_context.ao_!DOMEO_NS!_hasSelector.ao_!DOMEO_NS!_suffix\",\n\t\t\t\t\"enabling application\", 0, 10, false, dp3);\n\n\t\t// Test: Term (keyword) query\n\t\t// r = termQuery(\"domeo_!DOMEO_NS!_agents.@type\", \"foafx:Person\", 0, 10,\n\t\t// dp);\n\n\t\t// Test: Phrase query\n\t\tr = phraseQuery(\"dct_!DOMEO_NS!_description\", \"created automatically\",\n\t\t\t\t0, 10, false, dp3);\n\n\t\t// Test: Delete a document\n\t\t// r = deleteDocument(\"7TdnuBsjTjWaTcbW7RVP3Q\");\n\n\t\t// Test: Generic boolean query: 4 fields (3 keyword fields, 1 parsed\n\t\t// field)\n\n\t\tString[] fields = { \"ao_!DOMEO_NS!_item.@type\",\n\t\t\t\t\"ao_!DOMEO_NS!_item.@id\",\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_body.@type\",\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_body.cnt_!DOMEO_NS!_chars\" };\n\t\tString[] vals = { \"ao:Highlight\",\n\t\t\t\t\"urn:domeoclient:uuid:D3062173-8E53-41E9-9248-F0B8A7F65E5B\",\n\t\t\t\t\"cnt:ContentAsText\", \"paolo\" };\n\t\tString[] parsed = { \"term\", \"term\", \"term\", \"match\" };\n\t\tr = booleanQueryMultipleFields(fields, vals, parsed, \"and\", 0, 10,\n\t\t\t\tfalse, dp3);\n\n\t\t// Test: Single field boolean query\n\t\tr = booleanQuerySingleParsedField(\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_context.ao_!DOMEO_NS!_hasSelector.ao_!DOMEO_NS!_suffix\",\n\t\t\t\t\"formal biomedical ontologies\", \"or\", 0, 10, false, null);\n\n\t\t// Test: Retrieve a single doc by id\n\t\tr = getDocument(\"aviMdI48QkSGOhQL6ncMZw\", false, null);\n\n\t\t// Test: insert a document, return it's auto-assigned id\n\t\tdoc = \"{ \\\"f1\\\" : \\\"field value one\\\", \\\"f2\\\" : \\\"field value two\\\" }\";\n\t\tr = insertDocument(doc);\n\n\t\t// Test: insert a doc with specified id (replace if already present)\n\t\tdoc = \"{ \\\"f1\\\" : \\\"field value one\\\", \\\"f2\\\" : \\\"field value two\\\" }\";\n\t\tr = insertDocument(doc, \"5\");\n\t\tSystem.out.println(r);\n\n\t\t// Test: insert json document and try to remove it\n\t\tdoc = readSampleJsonDoc(\"/temp/sample_domeo_doc.json\");\n\t\tSystem.out.println(doc);\n\t\tr = insertDocument(doc);\n\t}", "Query query();", "@Test\n public void example10 () throws Exception {\n ValueFactory f = repo.getValueFactory();\n String exns = \"http://example.org/people/\";\n URI alice = f.createURI(exns, \"alice\");\n URI bob = f.createURI(exns, \"bob\");\n URI ted = f.createURI(exns, \"ted\"); \n URI person = f.createURI(\"http://example.org/ontology/Person\");\n URI name = f.createURI(\"http://example.org/ontology/name\");\n Literal alicesName = f.createLiteral(\"Alice\");\n Literal bobsName = f.createLiteral(\"Bob\");\n Literal tedsName = f.createLiteral(\"Ted\"); \n URI context1 = f.createURI(exns, \"cxt1\"); \n URI context2 = f.createURI(exns, \"cxt2\"); \n conn.add(alice, RDF.TYPE, person, context1);\n conn.add(alice, name, alicesName, context1);\n conn.add(bob, RDF.TYPE, person, context2);\n conn.add(bob, name, bobsName, context2);\n conn.add(ted, RDF.TYPE, person);\n conn.add(ted, name, tedsName);\n \n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2),\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(conn.getStatements(null, null, null, false)));\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2)\n }),\n statementSet(conn.getStatements(null, null, null, false, context1, context2)));\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2),\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(conn.getStatements(null, null, null, false, null, context2)));\n \n // testing named graph query\n DatasetImpl ds = new DatasetImpl();\n ds.addNamedGraph(context1);\n ds.addNamedGraph(context2);\n TupleQuery tupleQuery = conn.prepareTupleQuery(\n QueryLanguage.SPARQL, \"SELECT ?s ?p ?o ?g WHERE { GRAPH ?g {?s ?p ?o . } }\");\n tupleQuery.setDataset(ds);\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2)\n }),\n statementSet(tupleQuery.evaluate()));\n \n ds = new DatasetImpl();\n ds.addDefaultGraph(null);\n tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, \"SELECT ?s ?p ?o WHERE {?s ?p ?o . }\");\n tupleQuery.setDataset(ds);\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(tupleQuery.evaluate()));\n }", "public void testInsertPredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 10);\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n assertEquals(10,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "@Test\n\tpublic void testPassThroughHandler_SingleSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name . }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace is expected to come from some original repository (e.g. SPARQL) => we explicitly\n\t\t\t\t\t * do not expect QueryResults#report to be the second element (compare test\n\t\t\t\t\t * testPassThroughHandler_MultiSourceQuery)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertNotEquals(QueryResults.class, new Exception().getStackTrace()[1].getClass());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"person\"), iri(\"http://example.org/\", \"a\"));\n\t\t\t\t\tnumberOfResults.incrementAndGet();\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(1, numberOfResults.get());\n\t\t}\n\t}", "@Test\n\tpublic void queryTest(){\n\t\tQueryableRequestSpecification queryableRequestSpecification = SpecificationQuerier.query(requestSpecification);\n\t\tSystem.out.println(\"Printing specification parameters: \" +queryableRequestSpecification.getBaseUri());\n\t}", "@Test\n void testAndFilter() {\n Query q = newQueryFromEncoded(\"?query=trump\" +\n \"&model.type=all\" +\n \"&model.defaultIndex=text\" +\n \"&filter=%2B%28filterattribute%3Afrontpage_US_en-US%29\");\n assertEquals(\"AND text:trump |filterattribute:frontpage_US_en-US\",\n q.getModel().getQueryTree().toString());\n }", "@Test\n public void test() throws Exception {\n\n ModelObjectSearchService.addNoSQLServer(Address.class, new SolrRemoteServiceImpl(\"http://dr.dk\"));\n\n\n\n Address mock = NQL.mock(Address.class);\n NQL.search(mock).search(\n\n NQL.all(\n NQL.has(mock.getArea(), NQL.Comp.LIKE, \"Seb\"),\n NQL.has(\"SebastianRaw\")\n\n )\n\n ).addStats(mock.getZip()).getFirst();\n\n\n// System.out.println(\"inline query: \" + NQL.search(mock).search(mock.getA().getFunnyD(), NQL.Comp.EQUAL, 0.1d).());\n// System.out.println(\"normal query: \" + NQL.search(mock).search(mock.getArea(), NQL.Comp.EQUAL, \"area\").buildQuery());\n }", "private Nodes xPathQuery(String query)\r\n \t{\r\n \t\treturn document.query(query, context);\r\n \t}", "@Test\n public void testPhrase() {\n assertQ(req(\"q\",\"text:now-cow\", \"indent\",\"true\")\n ,\"//*[@numFound='1']\"\n );\n // should generate a query of (now OR cow) and match both docs\n assertQ(req(\"q\",\"text_np:now-cow\", \"indent\",\"true\")\n ,\"//*[@numFound='2']\"\n );\n }", "String query();", "@Test\n public void testSomeToStrings() {\n System.out.println(new JresBoolQuery()\n .must(new JresQueryStringQuery(\"stuff:true\").withDefaultOperator(\"AND\"))\n .should(\n new JresMatchQuery(\"color\", \"orange\"),\n new JresTermQuery(\"key\", \"abc123\")\n )\n .mustNot(new JresDisMaxQuery(\n new JresMatchQuery(\"color\", \"yellow\"),\n new JresMatchQuery(\"color\", \"green\")\n ))\n );\n }", "public static void main(String ...args) {\n Operation myOperation = Operation.alloc(\"http://example/special2\", \"special2\", \"Custom operation\");\n\n // Service endpoint names.\n String queryEndpoint = \"q\";\n String customEndpoint = \"x\";\n\n // Make a DataService with custom named for endpoints.\n // In this example, \"q\" for SPARQL query and \"x\" for our custom extension and no others.\n DatasetGraph dsg = DatasetGraphFactory.createTxnMem();\n DataService dataService = DataService.newBuilder(dsg)\n .addEndpoint(myOperation, customEndpoint)\n .addEndpoint(Operation.Query, queryEndpoint)\n .build();\n\n // This will be the code to handled for the operation.\n ActionService customHandler = new DemoService();\n\n FusekiServer server =\n FusekiServer.create().port(PORT)\n .verbose(true)\n // Register the new operation, and it's handler\n .registerOperation(myOperation, customHandler)\n\n // The DataService.\n .add(DATASET, dataService)\n\n // And build the server.\n .build();\n\n server.start();\n\n // Try some operations on the server using the service URL.\n String customOperationURL = SERVER_URL + DATASET + \"/\" + customEndpoint;\n String queryOperationURL = SERVER_URL + DATASET + \"/\" + queryEndpoint;\n\n Query query = QueryFactory.create(\"ASK{}\");\n\n try {\n\n // Try custom name - OK\n try ( QueryExecution qExec = QueryExecution.service(queryOperationURL, query) ) {\n qExec.execAsk();\n }\n\n // Try the usual default name, which is not configured in the DataService so expect a 404.\n try ( QueryExecution qExec = QueryExecution.service(SERVER_URL + DATASET + \"/sparql\", query) ) {\n qExec.execAsk();\n throw new RuntimeException(\"Didn't fail\");\n } catch (QueryExceptionHTTP ex) {\n if ( ex.getStatusCode() != HttpSC.NOT_FOUND_404 ) {\n throw new RuntimeException(\"Not a 404\", ex);\n }\n }\n\n // Make an HTTP GET to the custom operation.\n // Service endpoint name : GET\n String s1 = HttpOp.httpGetString(customOperationURL);\n if ( s1 == null )\n throw new RuntimeException(\"Failed: \"+customOperationURL);\n\n } finally {\n server.stop();\n }\n }", "@Test\n public void testParseInput() {\n LOGGER.info(\"parseInput\");\n rdfEntityManager = new RDFEntityManager();\n LOGGER.info(\"oneTimeSetup\");\n CacheInitializer.initializeCaches();\n DistributedRepositoryManager.addRepositoryPath(\n \"InferenceRules\",\n System.getenv(\"REPOSITORIES_TMPFS\") + \"/InferenceRules\");\n DistributedRepositoryManager.clearNamedRepository(\"InferenceRules\");\n try {\n final File unitTestRulesPath = new File(\"data/test-rules-1.rule\");\n bufferedInputStream = new BufferedInputStream(new FileInputStream(unitTestRulesPath));\n LOGGER.info(\"processing input: \" + unitTestRulesPath);\n } catch (final FileNotFoundException ex) {\n throw new TexaiException(ex);\n }\n ruleParser = new RuleParser(bufferedInputStream);\n ruleParser.initialize(rdfEntityManager);\n final URI variableURI = new URIImpl(Constants.TEXAI_NAMESPACE + \"?test\");\n assertEquals(\"http://texai.org/texai/?test\", variableURI.toString());\n assertEquals(\"?test\", RDFUtility.formatURIAsTurtle(variableURI));\n List<Rule> rules;\n try {\n rules = ruleParser.Rules();\n for (final Rule rule : rules) {\n LOGGER.info(\"rule: \" + rule.toString());\n rule.cascadePersist(rdfEntityManager, null);\n }\n } catch (ParseException ex) {\n LOGGER.info(StringUtils.getStackTraceAsString(ex));\n fail(ex.getMessage());\n }\n Iterator<Rule> rules_iter = rdfEntityManager.rdfEntityIterator(\n Rule.class,\n null); // overrideContext\n while (rules_iter.hasNext()) {\n final Rule loadedRule = rules_iter.next();\n assertNotNull(loadedRule);\n\n // (\n // description \"if there is a room then it is likely that a table is in the room\"\n // context: texai:InferenceRuleTestContext\n // if:\n // ?situation-localized rdf:type cyc:Situation-Localized .\n // ?room rdf:type cyc:RoomInAConstruction .\n // ?situation-localized cyc:situationConstituents ?room .\n // then:\n // _:in-completely-situation-localized rdf:type texai:InCompletelySituationLocalized .\n // ?situation-localized texai:likelySubSituations _:in-completely-situation-localized .\n // _:table rdf:type cyc:Table_PieceOfFurniture .\n // _:table texai:in-ContCompletely ?room .\n // )\n\n assertEquals(\"(\\ndescription \\\"if there is a room then it is likely that a table is in the room\\\"\\ncontext: texai:InferenceRuleTestContext\\nif:\\n ?situation-localized rdf:type cyc:Situation-Localized .\\n ?room rdf:type cyc:RoomInAConstruction .\\n ?situation-localized cyc:situationConstituents ?room .\\nthen:\\n _:in-completely-situation-localized rdf:type texai:InCompletelySituationLocalized .\\n ?situation-localized texai:likelySubSituations _:in-completely-situation-localized .\\n _:table rdf:type cyc:Table_PieceOfFurniture .\\n _:table texai:in-ContCompletely ?room .\\n)\", loadedRule.toString());\n LOGGER.info(\"loadedRule:\\n\" + loadedRule);\n }\n CacheManager.getInstance().shutdown();\n try {\n if (bufferedInputStream != null) {\n bufferedInputStream.close();\n }\n } catch (final Exception ex) {\n LOGGER.info(StringUtils.getStackTraceAsString(ex));\n }\n rdfEntityManager.close();\n DistributedRepositoryManager.shutDown();\n }", "@Test\n\tpublic void testQueryTypes() {\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\t\t// QueryType\n\t\tfinal IntrospectionFullType queryType = getFullType(introspection, schemaConfig.getQueryTypeName());\n\t\t// - check all queries are available\n\t\tfinal List<String> queryNames = new ArrayList<>();\n\t\tArrays.asList(Entity1.class, Entity2.class, Entity3.class, Entity4.class).stream().forEach(clazz -> {\n\t\t\tqueryNames.add(schemaConfig.getQueryGetByIdPrefix() + clazz.getSimpleName());\n\t\t\tqueryNames.add(schemaConfig.getQueryGetListPrefix() + clazz.getSimpleName());\n\t\t});\n\t\tqueryNames.forEach(queryName -> Assert.assertTrue(queryType.getFields().stream()\n\t\t\t\t.map(IntrospectionTypeField::getName).collect(Collectors.toList()).contains(queryName)));\n\n\t\t// - check one 'getSingle' query (other ones are built the same way)\n\t\tfinal IntrospectionTypeField getEntity1 = assertField(queryType, queryNames.get(0),\n\t\t\t\tIntrospectionTypeKindEnum.OBJECT, Entity1.class);\n\t\tAssert.assertEquals(1, getEntity1.getArgs().size());\n\t\tassertArg(getEntity1, \"id\", IntrospectionTypeKindEnum.NON_NULL, IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLID.getName());\n\n\t\t// - check one 'getAll' query (other ones are built the same way)\n\t\tfinal IntrospectionTypeField getAllEntity1 = assertField(queryType, queryNames.get(1),\n\t\t\t\tIntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, getAllEntity1.getArgs().size());\n\t\tassertArg(getAllEntity1, schemaConfig.getQueryGetListFilterAttributeName(),\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListFilterEntityTypeNameSuffix());\n\t\tassertArg(getAllEntity1, schemaConfig.getQueryGetListPagingAttributeName(),\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT, getPagingInputTypeName());\n\t\tassertArg(getAllEntity1, schemaConfig.getQueryGetListFilterAttributeOrderByName(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.INPUT_OBJECT, getOrderByInputTypeName());\n\t}", "private InputStream runSparqlQuery(String query) throws IOException {\n\t\ttry {\n\t\t\tString queryString = \"query=\" + URLEncoder.encode(query, \"UTF-8\")\n\t\t\t\t\t+ \"&format=json\";\n\t\t\tURL url = new URL(\"https://query.wikidata.org/sparql?\"\n\t\t\t\t\t+ queryString);\n\t\t\tHttpURLConnection connection = (HttpURLConnection) url\n\t\t\t\t\t.openConnection();\n\t\t\tconnection.setRequestMethod(\"GET\");\n\n\t\t\treturn connection.getInputStream();\n\t\t} catch (UnsupportedEncodingException | MalformedURLException e) {\n\t\t\tthrow new RuntimeException(e.getMessage(), e);\n\t\t}\n\t}", "public abstract String createQuery();", "public void queryData() throws SolrServerException {\n\t\tfinal SolrQuery query = new SolrQuery(\"*:*\");\r\n\t\tquery.setRows(2000);\r\n\t\t// 5. Executes the query\r\n\t\tfinal QueryResponse response = client.query(query);\r\n\r\n\t\t/*\t\tassertEquals(1, response.getResults().getNumFound());*/\r\n\r\n\t\t// 6. Gets the (output) Data Transfer Object.\r\n\t\t\r\n\t\t\r\n\t\r\n\t\tif (response.getResults().iterator().hasNext())\r\n\t\t{\r\n\t\t\tfinal SolrDocument output = response.getResults().iterator().next();\r\n\t\t\tfinal String from = (String) output.getFieldValue(\"from\");\r\n\t\t\tfinal String to = (String) output.getFieldValue(\"to\");\r\n\t\t\tfinal String body = (String) output.getFieldValue(\"body\");\r\n\t\t\t// 7.1 In case we are running as a Java application print out the query results.\r\n\t\t\tSystem.out.println(\"It works! I found the following book: \");\r\n\t\t\tSystem.out.println(\"--------------------------------------\");\r\n\t\t\tSystem.out.println(\"ID: \" + from);\r\n\t\t\tSystem.out.println(\"Title: \" + to);\r\n\t\t\tSystem.out.println(\"Author: \" + body);\r\n\t\t}\r\n\t\t\r\n\t\tSolrDocumentList list = response.getResults();\r\n\t\tSystem.out.println(\"list size is: \" + list.size());\r\n\r\n\r\n\r\n\t\t/*\t\t// 7. Otherwise asserts the query results using standard JUnit procedures.\r\n\t\tassertEquals(\"1\", id);\r\n\t\tassertEquals(\"Apache SOLR Essentials\", title);\r\n\t\tassertEquals(\"Andrea Gazzarini\", author);\r\n\t\tassertEquals(\"972-2-5A619-12A-X\", isbn);*/\r\n\t}", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query);", "@Test\n public void testQuery() throws Exception {\n StatefulKnowledgeSession session = getKbase().newStatefulKnowledgeSession();\n \n initializeTemplate(session);\n \n List<Person> persons = new ArrayList<Person>();\n persons.add(new Person(\"john\", \"john\", 25));\n persons.add(new Person(\"sarah\", \"john\", 35));\n \n session.execute(CommandFactory.newInsertElements(persons));\n assertEquals(2, session.getFactCount());\n \n QueryResults results = query(\"people over the age of x\", new Object[] {30});\n assertNotNull(results);\n }", "private void runQuery(QueryTerm qt, String name) {\n\t\tqt.setInferred(false);\n\t\tRDFQuery q = new RDFQuery(qt);\n\t\tSystem.out.println(\"=== \"+name+\" ===\\n* OBD Query:\\n \"+qt);\n\t\tSystem.out.println(\"\\n* Autogenerated SPARQL:\\n \"+q.toSPARQL()+\"\\n\\n\");\n\t\tfor (Node n : this.shard.getNodesByQuery(qt)){\n\t\t\tSystem.out.println(\"Node: \" + n.toString());\n\t\t}\n\t\n\t}", "@Override\n public final InputStream dereference(String uri, String contentType) throws IOException {\n if(uri==null){\n return null;\n }\n UriRef reference = new UriRef(uri);\n StringBuilder query = new StringBuilder();\n query.append(\"CONSTRUCT { \");\n query.append(reference);\n query.append(\" ?p ?o } WHERE { \");\n query.append(reference);\n query.append(\" ?p ?o }\");\n\n //String format = SupportedFormat.RDF_XML;\n return SparqlEndpointUtils.sendSparqlRequest(getAccessUri(),query.toString(),contentType);\n }", "IQuery getQuery();", "@Test\n public void test_singleRetrieve_withParens_ParamQuery() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"(samaccountname=mary.olowu)\");\n request.setParameters(parameters);\n\n Map<String, Object> recordMap = null;\n BridgeError unexpectedError = null;\n try {\n Record record = getAdapter().retrieve(request);\n recordMap = record.getRecord();\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertNotNull(recordMap);\n }", "private QueryResults query(String queryName, Object[] args) {\n Command command = CommandFactory.newQuery(\"persons\", queryName, args);\n String queryStr = template.requestBody(\"direct:marshall\", command, String.class);\n\n String json = template.requestBody(\"direct:test-session\", queryStr, String.class);\n ExecutionResults res = (ExecutionResults) template.requestBody(\"direct:unmarshall\", json);\n return (QueryResults) res.getValue(\"persons\");\n }", "@Test\n public void testQueries() {\n nuxeoClient.repository().createDocumentById(testWorkspaceId, new Document(\"file1\", \"File\"));\n nuxeoClient.repository().createDocumentById(testWorkspaceId, new Document(\"file2\", \"File\"));\n\n // Get descendants of Workspaces\n String query = \"select * from Document where ecm:path startswith '/default-domain/workspaces'\";\n Documents documents = nuxeoClient.repository().query(query, \"10\", \"0\", \"50\", \"ecm:path\", \"asc\", null);\n assertEquals(3, documents.size());\n\n // Get all the File documents\n // TODO\n\n // Content of a given Folder, using a page provider\n // TODO\n }", "@Test\n public void testSyntax() throws Exception {\n assertJQ(req(\"q\",\"*\", \"df\",\"doesnotexist_s\")\n ,\"/response/docs/[0]==\" // make sure we get something...\n );\n assertJQ(req(\"q\",\"doesnotexist_s:*\")\n ,\"/response/numFound==0\" // nothing should be found\n );\n assertJQ(req(\"q\",\"doesnotexist_s:( * * * )\")\n ,\"/response/numFound==0\" // nothing should be found\n );\n\n // length of date math caused issues...\n assertJQ(req(\"q\",\"foo_dt:\\\"2013-03-08T00:46:15Z/DAY+000MILLISECONDS+00SECONDS+00MINUTES+00HOURS+0000000000YEARS+6MONTHS+3DAYS\\\"\", \"debug\",\"query\")\n ,\"/debug/parsedquery=='foo_dt:2013-09-11T00:00:00Z'\"\n );\n }", "@Test\n public void testCorrectAllWithFilterDateAndFindBy()\n throws IOException {\n Client client = Client.create(new DefaultClientConfig());\n WebResource service = client.resource(getBaseURI()\n + \"PhotoAlbum04/\");\n String response = service.path(\"search\")\n .queryParam(\"type\", \"all\")\n .queryParam(\"findBy\", \"name\")\n .queryParam(\"keywords\", \"evento\")\n .queryParam(\"orderBy\", \"date\")\n .queryParam(\"dateFirst\", \"01/11/2012\")\n .queryParam(\"dateEnd\", \"02/11/2012\")\n .get(String.class);\n assertFalse(\"Assert error failed\",\n response.contains(\"Url syntax error\"));\n\n assertTrue(\"Assert file-dtos failed\",\n response.contains(\"File: Search with all parameters\"));\n assertTrue(\n \"Assert album-dtos failed\",\n response.contains(\"Album: Search with all parameters\"));\n }", "@Test\n public void test_singleRetrieve_withoutParens_ParamQuery() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n request.setParameters(parameters);\n\n Map<String, Object> recordMap = null;\n BridgeError expectedError = null;\n try {\n Record record = getAdapter().retrieve(request);\n } catch (BridgeError e) {\n expectedError = e;\n }\n\n assertNotNull(expectedError);\n }", "@Test\n public void queryTest() {\n // TODO: test query\n }", "public Query queryRule(String rule, Object... args) throws Exceptions.OsoException {\n Host new_host = host.clone();\n String pred = new_host.toPolarTerm(new Predicate(rule, Arrays.asList(args))).toString();\n return new Query(ffiPolar.newQueryFromTerm(pred), new_host);\n }", "public interface SPARQLService {\n // TODO: Create methods for at least CRUD \n}", "public static void querying(String constructQuery2) {\n\t\t//construct the new query\n\t\t//String constructQuery2 = prefix+\" \"+select+\" \"+selectValues+\" \"+where+openBracket+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket;\n\t\t//constructQuery2 = constructQuery2+\" UNION \"+\" \"+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket+closeBracket;\n\t\t\n\t\tSystem.out.println(constructQuery2);\n\t\tQuery query2 = QueryFactory.create(constructQuery2);\n\t\tQueryExecution qe2 = QueryExecutionFactory.sparqlService(\n\t\t\t\t\"http://localhost:3030/USNA/query\", query2);\n\t\t\n\t\tResultSet results1 = qe2.execSelect();\n\t\tif(constantOutput == \"\") {\n\t\t\tResultSetFormatter.out(System.out, results1);\n\t\t}else {\n\t\t\tString NS = \"http://www.usna.org/ns#\";\n\t\t\tModel rdfssExample = ModelFactory.createDefaultModel();\n\t\t\tString [] constant = constantOutput.trim().split(\" \");\n\t\t\t\n\t\t\tString [] headers = selectValues.split(\" \");\n\t\t System.out.println(\"--------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tfor(int i = 0; i< headers.length; i++) {\n\t\t\t\t//System.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t\tSystem.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"----------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\ttry {\n\t\t\t\t int count = 0;\n\t\t while ( results1.hasNext() ) {\n\t\t \t //Resource Response = rdfssExample.createResource(NS+constant[count]);\n\t\t \t \n\t\t QuerySolution soln = results1.nextSolution();\n\t\t Resource first = soln.getResource(headers[0].substring(1,headers[0].length()).trim());\n\t\t //Resource second = soln.getResource(headers[1].substring(1,headers[1].length()).trim());\n\t\t //Resource third = soln.getResource(headers[2].substring(1,headers[2].length()).trim());\n\t\t //Resource fourth = soln.getResource(headers[3].substring(1,headers[3].length()).trim());\n\t\t for(int i=0; i< constant.length; i++) {\n\t\t \t Resource Response = rdfssExample.createResource(NS+constant[i]);\n\t\t \t System.out.format(\"%10s %50s\",first, Response);\n\t\t \t System.out.println();\n\t\t\t\t\t //count++;\n\t\t }\n\t\t //System.out.format(\"%10s %50s\",first, Response);\n\t\t //System.out.format(\"%10s\",first);\n\t\t\t\t System.out.println();\n\t\t\t\t //count++;\n\t\t\t\t \n\t\t\t\t //System.out.println(count);\n\t\t \n\t\t }\n\t\t } finally {\n\t\t \t qe2.close();\n\t\t}\n\t\t\t \n\t\t}\t\t \n\t}", "@Test\n void testAndFilterWithoutExplicitIndex() {\n Query q = newQueryFromEncoded(\"?query=trump\" +\n \"&model.type=all\" +\n \"&model.defaultIndex=text\" +\n \"&filter=%2B%28filterTerm%29\");\n assertEquals(\"AND text:trump |text:filterTerm\",\n q.getModel().getQueryTree().toString());\n }", "public void test_sf_945436() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <C rdf:ID='x'>\" +\n \" <rdfs:label xml:lang=''>a_label</rdfs:label>\" +\n \" </C>\" +\n \" <owl:Class rdf:ID='C'>\" +\n \" </owl:Class>\" +\n \"</rdf:RDF>\";\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n m.read( new StringReader( SOURCE ), null );\n Individual x = m.getIndividual( \"http://jena.hpl.hp.com/test#x\" );\n assertEquals( \"Label on resource x\", \"a_label\", x.getLabel( null) );\n assertEquals( \"Label on resource x\", \"a_label\", x.getLabel( \"\" ) );\n assertSame( \"fr label on resource x\", null, x.getLabel( \"fr\" ) );\n }", "Query queryOn(Connection connection);", "public void test_der_02() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <owl:ObjectProperty rdf:ID='hasPublications'>\" +\n \" <rdfs:domain>\" +\n \" <owl:Class>\" +\n \" <owl:unionOf rdf:parseType='Collection'>\" +\n \" <owl:Class rdf:about='#Project'/>\" +\n \" <owl:Class rdf:about='#Task'/>\" +\n \" </owl:unionOf>\" +\n \" </owl:Class>\" +\n \" </rdfs:domain>\" +\n \" <rdfs:domain rdf:resource='#Dummy' />\" +\n \" <rdfs:range rdf:resource='#Publications'/>\" +\n \" </owl:ObjectProperty>\" +\n \" <owl:Class rdf:ID='Dummy'>\" +\n \" </owl:Class>\" +\n \"</rdf:RDF>\";\n String NS = \"http://jena.hpl.hp.com/test#\";\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.read(new ByteArrayInputStream( SOURCE.getBytes()), NS );\n \n OntClass dummy = m.getOntClass( NS + \"Dummy\" );\n // assert commented out - bug not accepted -ijd\n //TestUtil.assertIteratorValues( this, dummy.listDeclaredProperties(), \n // new Object[] {m.getObjectProperty( NS+\"hasPublications\")} );\n }", "@Test\n\tpublic void testPassThroughHandler_emptySingleSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name . }\");\n\t\t\ttq.setBinding(\"name\", l(\"notExist\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace is expected to come from some original repository (e.g. SPARQL) => we explicitly\n\t\t\t\t\t * do not expect QueryResults#report to be the second element (compare test\n\t\t\t\t\t * testPassThroughHandler_MultiSourceQuery)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertNotEquals(QueryResults.class, new Exception().getStackTrace()[1].getClass());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tthrow new IllegalStateException(\"Expected empty result\");\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(0, numberOfResults.get());\n\t\t}\n\t}", "private static List<Supplier> createSupplierData(ConsumerQuery query, boolean testing) {\n\t\tRepository repository;\n\t\t\n\t\t//use name of processes in query to retrieve subset of relevant supplier data from semantic infrastructure\n\t\tList<String> processNames = new ArrayList<String>();\t\n\n\t\tif (query.getProcesses() == null || query.getProcesses().isEmpty()) {\n\t\t\tSystem.err.println(\"There are no processes specified!\");\n\t\t} else {\n\t\t\n\t\tfor (Process process : query.getProcesses()) {\n\t\t\tprocessNames.add(process.getName());\n\t\t}\n\t\t}\n\t\t\t\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\n\t\tif (testing == false) {\n\n\t\t\tMap<String, String> headers = new HashMap<String, String>();\n\t\t\theaders.put(\"Authorization\", AUTHORISATION_TOKEN);\n\t\t\theaders.put(\"accept\", \"application/JSON\");\n\n\t\t\trepository = new SPARQLRepository(SPARQL_ENDPOINT );\n\n\t\t\trepository.initialize();\n\t\t\t((SPARQLRepository) repository).setAdditionalHttpHeaders(headers);\n\n\t\t} else {\n\n\t\t\t//connect to GraphDB\n\t\t\trepository = new HTTPRepository(GRAPHDB_SERVER, REPOSITORY_ID);\n\t\t\trepository.initialize();\n\t\t}\n\t\t\n\t\t//creates a SPARQL query that is run against the Semantic Infrastructure\n\t\tString strQuery = SparqlQuery.createQueryMVP(processNames);\n\t\t\n\t\t//System.out.println(strQuery);\n\n\t\t//open connection to GraphDB and run SPARQL query\n\t\tSet<SparqlRecord> recordSet = new HashSet<SparqlRecord>();\n\t\tSparqlRecord record;\n\t\ttry(RepositoryConnection conn = repository.getConnection()) {\n\n\t\t\tTupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, strQuery);\t\t\n\n\t\t\t//if querying the local KB, we need to set setIncludeInferred to false, otherwise inference will include irrelevant results.\n\t\t\t//when querying the Semantic Infrastructure the non-inference is set in the http parameters.\n\t\t\tif (testing == true) {\n\t\t\t\t//do not include inferred statements from the KB\n\t\t\t\ttupleQuery.setIncludeInferred(false);\n\t\t\t}\n\n\t\t\ttry (TupleQueryResult result = tupleQuery.evaluate()) {\t\t\t\n\n\t\t\t\twhile (result.hasNext()) {\n\n\t\t\t\t\tBindingSet solution = result.next();\n\n\t\t\t\t\t//omit the NamedIndividual types from the query result\n\t\t\t\t\tif (!solution.getValue(\"processType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")\n\t\t\t\t\t\t\t&& !solution.getValue(\"certificationType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")\n\t\t\t\t\t\t\t&& !solution.getValue(\"materialType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")) {\n\n\t\t\t\t\t\trecord = new SparqlRecord();\n\t\t\t\t\t\trecord.setSupplierId(solution.getValue(\"supplierId\").stringValue().replaceAll(\"\\\\s+\",\"\"));\n\t\t\t\t\t\trecord.setProcess(stripIRI(solution.getValue(\"processType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\t\t\t\t\t\trecord.setMaterial(stripIRI(solution.getValue(\"materialType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\t\t\t\t\t\trecord.setCertification(stripIRI(solution.getValue(\"certificationType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\n\t\t\t\t\t\trecordSet.add(record);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\tcatch (Exception e) {\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\tSystem.err.println(\"Wrong test data!\");\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\n\t\t}\n\n\t\t//close connection to KB repository\n\t\trepository.shutDown();\n\n\t\tlong stopTime = System.currentTimeMillis();\n\t\tlong elapsedTime = stopTime - startTime;\n\n\t\tif (testing == true ) {\n\t\tSystem.out.println(\"The SPARQL querying process took \" + elapsedTime/1000 + \" seconds.\");\n\t\t}\n\n\t\t//get unique supplier ids used for constructing the supplier structure below\n\t\tSet<String> supplierIds = new HashSet<String>();\n\t\tfor (SparqlRecord sr : recordSet) {\n\t\t\tsupplierIds.add(sr.getSupplierId());\n\t\t}\n\n\t\tCertification certification = null;\n\t\tSupplier supplier = null;\n\t\tList<Supplier> suppliersList = new ArrayList<Supplier>();\n\n\t\t//create a map of processes and materials relevant for each supplier\n\t\tMap<String, SetMultimap<Object, Object>> multimap = new HashMap<String, SetMultimap<Object, Object>>();\n\n\t\tfor (String id : supplierIds) {\n\t\t\tSetMultimap<Object, Object> map = HashMultimap.create();\n\n\t\t\tString supplierID = null;\n\n\t\t\tfor (SparqlRecord sr : recordSet) {\n\n\t\t\t\tif (sr.getSupplierId().equals(id)) {\n\n\t\t\t\t\tmap.put(sr.getProcess(), sr.getMaterial());\n\n\t\t\t\t\tsupplierID = sr.getSupplierId();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tmultimap.put(supplierID, map);\n\t\t}\t\t\n\n\t\tProcess process = null;\n\n\t\t//create supplier objects (supplier id, processes (including materials) and certifications) based on the multimap created in the previous step\n\t\tfor (String id : supplierIds) {\n\t\t\tSetMultimap<Object, Object> processAndMaterialMap = null;\n\n\t\t\tList<Certification> certifications = new ArrayList<Certification>();\n\t\t\tList<Process> processes = new ArrayList<Process>();\t\t\n\n\t\t\tfor (SparqlRecord sr : recordSet) {\n\n\t\t\t\tif (sr.getSupplierId().equals(id)) {\n\n\t\t\t\t\t//add certifications\n\t\t\t\t\tcertification = new Certification(sr.getCertification());\n\t\t\t\t\tif (!certifications.contains(certification)) {\n\t\t\t\t\t\tcertifications.add(certification);\n\t\t\t\t\t}\n\n\t\t\t\t\t//add processes and associated materials\n\t\t\t\t\tprocessAndMaterialMap = multimap.get(sr.getSupplierId());\n\n\t\t\t\t\tString processName = null;\n\n\t\t\t\t\tSet<Object> list = new HashSet<Object>();\n\n\t\t\t\t\t//iterate processAndMaterialMap and extract process and relevant materials for that process\n\t\t\t\t\tfor (Entry<Object, Collection<Object>> e : processAndMaterialMap.asMap().entrySet()) {\n\n\t\t\t\t\t\tSet<Material> materialsSet = new HashSet<Material>();\n\n\t\t\t\t\t\t//get list/set of materials\n\t\t\t\t\t\tlist = new HashSet<>(e.getValue());\n\n\t\t\t\t\t\t//transform to Set<Material>\n\t\t\t\t\t\tfor (Object o : list) {\n\t\t\t\t\t\t\tmaterialsSet.add(new Material((String)o));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tprocessName = (String) e.getKey();\n\n\t\t\t\t\t\t//add relevant set of materials together with process name\n\t\t\t\t\t\tprocess = new Process(processName, materialsSet);\n\n\t\t\t\t\t\t//add processes\n\t\t\t\t\t\tif (!processes.contains(process)) {\n\t\t\t\t\t\t\tprocesses.add(process);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tsupplier = new Supplier(id, processes, certifications );\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsuppliersList.add(supplier);\n\t\t}\n\n\t\treturn suppliersList;\n\n\t}", "public abstract Statement queryToRetrieveData();", "public QueryMatches interpret(ITMQLRuntime runtime, IContext context, IExpressionInterpreter<?> caller);", "@Test\n public void testCorrectAlbumWithFilterDateAndFindBy()\n throws IOException {\n Client client = Client.create(new DefaultClientConfig());\n WebResource service = client.resource(getBaseURI()\n + \"PhotoAlbum04/\");\n String response = service.path(\"search\")\n .queryParam(\"type\", \"album\")\n .queryParam(\"findBy\", \"name\")\n .queryParam(\"keywords\", \"evento\")\n .queryParam(\"orderBy\", \"date\")\n .queryParam(\"dateFirst\", \"01/11/2012\")\n .queryParam(\"dateEnd\", \"02/11/2012\")\n .get(String.class);\n assertFalse(\"Assert error failed\",\n response.contains(\"Url syntax error\"));\n assertFalse(\"Assert file-dtos error failed\",\n response.contains(\"file-dtos\"));\n\n assertTrue(\n \"Assert album-dtos failed\",\n response.contains(\"Album: Search with all parameters\"));\n }", "@Test\n public void testFromFollowedByQuery() throws Exception {\n final String text = \"rule X when Cheese() from $cheesery ?person( \\\"Mark\\\", 42; ) then end\";\n RuleDescr rule = ((RuleDescr) (parse(\"rule\", text)));\n TestCase.assertFalse(parser.getErrors().toString(), parser.hasErrors());\n PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n TestCase.assertEquals(\"Cheese\", pattern.getObjectType());\n TestCase.assertEquals(\"from $cheesery\", pattern.getSource().getText());\n TestCase.assertFalse(pattern.isQuery());\n pattern = ((PatternDescr) (getDescrs().get(1)));\n TestCase.assertEquals(\"person\", pattern.getObjectType());\n TestCase.assertTrue(pattern.isQuery());\n }", "public long query(Date timestamp, String user, String hostname, Long referral, String questionText, InputMode mode);", "@Override\r\n\tprotected boolean remoteQuery(String qstr) {\r\n\t\tif (queryBk.getPublishYear() == null || queryBk.getPublishYear().equals(\"\")) {\r\n\t\t\tif (queryBk.getPublisher() == null || queryBk.getPublisher().equals(\"\")) {\r\n\t\t\t\tif (queryBk.parseEdition() == -1 && queryBk.parseVolume() == -1) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t} // end if\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tDocumentBuilderFactory f;\r\n\t\tDocumentBuilder b;\r\n\t\tDocument doc;\r\n\t\ttry {\r\n\t\t\tf = DocumentBuilderFactory.newInstance();\r\n\t\t\tb = f.newDocumentBuilder();\r\n\t\t\tURL url = new URL(Config.PRIMO_X_BASE + qstr);\r\n\r\n\t\t\tURLConnection con = url.openConnection();\r\n\t\t\tcon.setConnectTimeout(3000);\r\n\t\t\tdoc = b.parse(con.getInputStream());\r\n\t\t\tqueryStr = Config.PRIMO_X_BASE + qstr;\r\n\t\t\tdebug += queryStr + \"\\n\";\r\n\r\n\t\t\tnodesRecord = doc.getElementsByTagName(\"record\");\r\n\r\n\t\t\t/*\r\n\t\t\t * After fetched a XML doc, store necessary tags from the XMLs for further\r\n\t\t\t * matching.\r\n\t\t\t */\r\n\r\n\t\t\tfor (int i = 0; i < nodesRecord.getLength(); i++) {\r\n\t\t\t\tnodesControl = doc.getElementsByTagName(\"control\").item(i).getChildNodes();\r\n\t\t\t\tnodesDisplay = doc.getElementsByTagName(\"display\").item(i).getChildNodes();\r\n\t\t\t\tnodesLink = doc.getElementsByTagName(\"links\").item(i).getChildNodes();\r\n\t\t\t\tnodesSearch = doc.getElementsByTagName(\"search\").item(i).getChildNodes();\r\n\t\t\t\tnodesDelivery = doc.getElementsByTagName(\"delivery\").item(i).getChildNodes();\r\n\t\t\t\tnodesFacet = doc.getElementsByTagName(\"facets\").item(i).getChildNodes();\r\n\r\n\t\t\t\t// Return true if the query item is of ISO doc no. and of\r\n\t\t\t\t// published by ISO\r\n\t\t\t\tif (matchIsoPublisher() && matchIsoDocNo()) {\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} // end if\r\n\r\n\t\t\t\tif (!strHandle.hasSomething(queryBk.getCreator())) {\r\n\t\t\t\t\tif (matchTitle() && matchPublisher() && matchYear()) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} // end if\r\n\t\t\t\t} // end if\r\n\r\n\t\t\t\tif (matchTitle() && matchAuthor()) {\r\n\r\n\t\t\t\t\tif ((matchEdition() && matchPublisher() && matchYear())) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else if (!strHandle.hasSomething(queryBk.getPublisher()) && matchYear()\r\n\t\t\t\t\t\t\t&& strHandle.hasSomething(queryBk.getPublishYear())) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else if (matchEdition() && queryBk.parseEdition() > 1) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * As Primo X-service only shows the first FRBRed record, check the rest records\r\n\t\t\t\t\t\t * involving the same frbrgroupid.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tString frbrid = \"\";\r\n\t\t\t\t\t\tfrbrid = getNodeValue(\"frbrgroupid\", nodesFacet);\r\n\t\t\t\t\t\tString frbr_qstr = qstr + \"&query=facet_frbrgroupid,exact,\" + frbrid;\r\n\t\t\t\t\t\t// System.out.println(\"FRBR:\" + Config.PRIMO_X_BASE +\r\n\t\t\t\t\t\t// frbr_qstr);\r\n\t\t\t\t\t\tDocument doc2 = b.parse(Config.PRIMO_X_BASE + frbr_qstr);\r\n\t\t\t\t\t\tnodesFrbrRecord = doc2.getElementsByTagName(\"record\");\r\n\r\n\t\t\t\t\t\tfor (int j = 0; j < nodesFrbrRecord.getLength(); j++) {\r\n\r\n\t\t\t\t\t\t\tnodesControl = doc2.getElementsByTagName(\"control\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesDisplay = doc2.getElementsByTagName(\"display\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesLink = doc2.getElementsByTagName(\"links\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesSearch = doc2.getElementsByTagName(\"search\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesDelivery = doc2.getElementsByTagName(\"delivery\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesFacet = doc2.getElementsByTagName(\"facets\").item(j).getChildNodes();\r\n\r\n\t\t\t\t\t\t\tif (!strHandle.hasSomething(queryBk.getPublishYear()) && queryBk.parseEdition() == -1\r\n\t\t\t\t\t\t\t\t\t&& !strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t} // end if\r\n\r\n\t\t\t\t\t\t\tif (matchEdition() && matchTitle() && matchAuthor() && matchPublisher() && matchYear()) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t} else if (matchEdition() && matchTitle() && matchAuthor() && matchYear()\r\n\t\t\t\t\t\t\t\t\t&& !strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t} // end if\r\n\t\t\t\t\t\t} // end for\r\n\t\t\t\t\t} // end if\r\n\t\t\t\t} // end if\r\n\t\t\t} // end for\r\n\t\t} // end try\r\n\r\n\t\tcatch (Exception e) {\r\n\t\t\tStringWriter errors = new StringWriter();\r\n\t\t\te.printStackTrace(new PrintWriter(errors));\r\n\t\t\tString errStr = \"PrimoQueryByNonISBN:remoteQuery()\" + errors.toString();\r\n\t\t\tSystem.out.println(errStr);\r\n\t\t\terrMsg = errStr;\r\n\t\t} // end catch\r\n\t\treturn false;\r\n\t}", "public void testDeletePredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 10);\n part.deletePredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 5);\n\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n\n assertEquals(5,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "@Test\r\n\tpublic void testPrepareGraphQuery3() throws Exception\r\n\t{\r\n\t\tStatement st1 = vf.createStatement(john, fname, johnfname, dirgraph);\r\n\t\tStatement st2 = vf.createStatement(john, lname, johnlname, dirgraph);\r\n\t\tStatement st3 = vf.createStatement(john, homeTel, johnhomeTel, dirgraph);\r\n\t\tStatement st4 = vf.createStatement(john, email, johnemail, dirgraph);\r\n\t\tStatement st5 = vf.createStatement(micah, fname, micahfname, dirgraph);\r\n\t\tStatement st6 = vf.createStatement(micah, lname, micahlname, dirgraph);\r\n\t\tStatement st7 = vf.createStatement(micah, homeTel, micahhomeTel, dirgraph);\r\n\t\tStatement st8 = vf.createStatement(fei, fname, feifname, dirgraph);\r\n\t\tStatement st9 = vf.createStatement(fei, lname, feilname, dirgraph);\r\n\t\tStatement st10 = vf.createStatement(fei, email, feiemail, dirgraph);\r\n\t\t\r\n\t\r\n\t\ttestWriterCon.add(st1);\r\n\t\ttestWriterCon.add(st2);\r\n\t\ttestWriterCon.add(st3);\r\n\t\ttestWriterCon.add(st4);\r\n\t\ttestWriterCon.add(st5);\r\n\t\ttestWriterCon.add(st6);\r\n\t\ttestWriterCon.add(st7);\r\n\t\ttestWriterCon.add(st8);\r\n\t\ttestWriterCon.add(st9);\r\n\t\ttestWriterCon.add(st10);\r\n\t\t\r\n\t\tAssert.assertTrue(testWriterCon.hasStatement(st1, false));\r\n\t\tAssert.assertFalse(testWriterCon.hasStatement(st1, false, (Resource)null));\r\n\t\tAssert.assertFalse(testWriterCon.hasStatement(st1, false, null));\r\n\t\tAssert.assertTrue(testWriterCon.hasStatement(st1, false, dirgraph));\r\n\t\t\r\n\t\t\r\n\t\tAssert.assertEquals(10, testAdminCon.size(dirgraph));\t\t\r\n\t\t\t\r\n\t\tString query = \" DESCRIBE <http://marklogicsparql.com/addressbook#firstName> \";\r\n\t\tGraphQuery queryObj = testReaderCon.prepareGraphQuery(query);\r\n\t\t\t\r\n\t\tGraphQueryResult result = queryObj.evaluate();\r\n\t\tresult.hasNext();\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(false)));\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testQuery1() {\n\t}", "private static Boolean specialQueries(String query) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n clickList = false;\n //newCorpus = true;\n\n if (query.equals(\"q\")) {\n\n System.exit(0);\n return true;\n }\n\n String[] subqueries = query.split(\"\\\\s+\"); //split around white space\n\n if (subqueries[0].equals(\"stem\")) //first term in subqueries tells computer what to do \n {\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n TokenProcessor processor = new NewTokenProcessor();\n if (subqueries.length > 1) //user meant to stem the token not to search stem\n {\n List<String> stems = processor.processToken(subqueries[1]);\n\n //clears list and repopulates it \n String stem = \"Stem of query '\" + subqueries[1] + \"' is '\" + stems.get(0) + \"'\";\n\n GUI.ResultsLabel.setText(stem);\n\n return true;\n }\n\n } else if (subqueries[0].equals(\"vocab\")) {\n List<String> vocabList = Disk_posIndex.getVocabulary();\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n\n int vocabCount = 0;\n for (String v : vocabList) {\n if (vocabCount < 1000) {\n vocabCount++;\n GUI.JListModel.addElement(v);\n }\n }\n GUI.ResultsLabel.setText(\"Total size of vocabulary: \" + vocabCount);\n return true;\n }\n\n return false;\n }", "CampusSearchQuery generateQuery();", "@Test\n @OperateOnDeployment(\"server\")\n public void shouldGetResourceByQuery() {\n given().header(\"Authorization\", \"Bearer access_token\").expect().statusCode(200).and().expect().body(\"size\",\n equalTo(1)).and().expect().body(\"items.item.name\", hasItem(\"Technologies\")).and().expect().body(\"items.item.sort\",\n hasItem(20)).when().get(getBaseTestUrl() + \"/1/categories/get/json/query;catName=Technologies?expand=\" +\n \"{\\\"branches\\\":[{\\\"trunk\\\":{\\\"name\\\":\\\"categories\\\"}}]})\");\n }", "public void test_hk_01() {\n // synthesise a mini-document\n String base = \"http://jena.hpl.hp.com/test#\";\n String doc =\n \"<rdf:RDF\"\n + \" xmlns:rdf=\\\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\\\"\"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <owl:Ontology rdf:about=\\\"\\\">\"\n + \" <owl:imports rdf:resource=\\\"http://www.w3.org/2002/07/owl\\\" />\"\n + \" </owl:Ontology>\"\n + \"</rdf:RDF>\";\n \n // read in the base ontology, which includes the owl language\n // definition\n // note OWL_MEM => no reasoner is used\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.getDocumentManager().setMetadataSearchPath( \"file:etc/ont-policy-test.rdf\", true );\n m.read(new ByteArrayInputStream(doc.getBytes()), base);\n \n // we need a resource corresponding to OWL Class but in m\n Resource owlClassRes = m.getResource(OWL.Class.getURI());\n \n // now can we see this as an OntClass?\n OntClass c = (OntClass) owlClassRes.as(OntClass.class);\n assertNotNull(\"OntClass c should not be null\", c);\n \n //(OntClass) (ontModel.getProfile().CLASS()).as(OntClass.class);\n \n }", "public Collection<URI> searchWithSPARQL(final String queryString)\n {\n if (DEBUG.SEARCH) Log.debug(\"searchWithSPARQL; queryString:\\n\" + Util.tags(queryString));\n \n final Collection<URI> resultSet = new ArrayList<URI>();\n final com.hp.hpl.jena.query.Query query = QueryFactory.create(queryString);\n \n if (DEBUG.SEARCH) Log.debug(\"QF created \" + Util.tag(query)\n + \"; memory=\" + Runtime.getRuntime().freeMemory()\n + \"\\n\" + query.toString().trim().replaceAll(\"\\n\\n\", \"\\n\"));\n\n final QueryExecution qe = QueryExecutionFactory.create(query, this); // 2nd arg is for Model or for FileManager?\n if (DEBUG.SEARCH) Log.debug(\"created QEF \" + qe + \"; memory=\" + Runtime.getRuntime().freeMemory());\n\n final ResultSet results = qe.execSelect();\n if (DEBUG.SEARCH) Log.debug(\"execSelect returned; memory=\" + Runtime.getRuntime().freeMemory());\n \n while (results.hasNext()) {\n final QuerySolution qs = results.nextSolution();\n if (DEBUG.SEARCH) {\n final String qss = qs.toString().replaceAll(\"<http://vue.tufts.edu\", \"...\"); // shorten debug output\n Log.debug(\"qSol \" + String.format(\"%.190s%s\", qss, qss.length() > 190 ? (\"...x\"+qss.length()) : \"\"));\n }\n if (false) {\n // debug debug all vars from query\n //Util.dumpIterator(qs.varNames());\n Iterator<String> vn = qs.varNames(); \n while (vn.hasNext()) {\n String v = vn.next();\n Log.debug(\"\\t\" + Util.tags(v) + \"=\" + Util.tags(qs.get(v)));\n }\n }\n try {\n resultSet.add(new URI(qs.getResource(\"rid\").getURI()));\n } catch (Throwable t) {\n Log.warn(\"handling QuerySolution \" + qs, t);\n }\n }\n qe.close();\n return resultSet;\n }", "@Test\n\tpublic void testShowResult() {\n\t\tConfigurationManager config = new ConfigurationManager();\n\t\tInvertedIndex index = new InvertedIndex();\n\t\tFileManager manager = new FileManager(config.getConfig().getFileName(), index);\n\t\tHashMap<String, String> parameters = new HashMap<String, String>();\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"asin\", \"ABCD\");\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"asin\", \"B00002243X\");\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 10);\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"query\", \"ASDAJKSDJHKASJK\");\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"query\", \"jumpers\");\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 8);\n\t}", "public interface Query {\n\n\t/**\n\t * @return ID of the given query\n\t */\n\tint queryID();\n\t\n\t/**\n\t * @return given query\n\t */\n\tString query();\n\t\n\t/**\n\t * @return list of relevant documents to the corresponding query\n\t */\n\tList<RelevanceInfo> listOfRelevantDocuments();\n\t\n\t/**\n\t * @return list of results to the corresponding query after running one of the retrieval models\n\t */\n\tList<Result> resultList();\n\t\n\t/**\n\t * @param resultList\n\t * @Effects adds results to the result list of the corresponding query\n\t */\n\tvoid putResultList(List<Result> resultList);\n}", "public static void main(String[] args) throws Exception {\n TDB.setOptimizerWarningFlag(false);\n\n final String DATASET_DIR_NAME = \"data0\";\n final Dataset data0 = TDBFactory.createDataset( DATASET_DIR_NAME );\n\n // show the currently registered names\n for (Iterator<String> it = data0.listNames(); it.hasNext(); ) {\n out.println(\"NAME=\"+it.next());\n }\n\n out.println(\"getting named model...\");\n /// this is the OWL portion\n final Model model = data0.getNamedModel( MY_NS );\n out.println(\"Model := \"+model);\n\n out.println(\"getting graph...\");\n /// this is the DATA in that MODEL\n final Graph graph = model.getGraph();\n out.println(\"Graph := \"+graph);\n\n if (graph.isEmpty()) {\n final Resource product1 = model.createResource( MY_NS +\"product/1\");\n final Property hasName = model.createProperty( MY_NS, \"#hasName\");\n final Statement stmt = model.createStatement(\n product1, hasName, model.createLiteral(\"Beach Ball\",\"en\") );\n out.println(\"Statement = \" + stmt);\n\n model.add(stmt);\n\n // just for fun\n out.println(\"Triple := \" + stmt.asTriple().toString());\n } else {\n out.println(\"Graph is not Empty; it has \"+graph.size()+\" Statements\");\n long t0, t1;\n t0 = System.currentTimeMillis();\n final Query q = QueryFactory.create(\n \"PREFIX exns: <\"+MY_NS+\"#>\\n\"+\n \"PREFIX exprod: <\"+MY_NS+\"product/>\\n\"+\n \" SELECT * \"\n // if you don't provide the Model to the\n // QueryExecutionFactory below, then you'll need\n // to specify the FROM;\n // you *can* always specify it, if you want\n // +\" FROM <\"+MY_NS+\">\\n\"\n // +\" WHERE { ?node <\"+MY_NS+\"#hasName> ?name }\"\n // +\" WHERE { ?node exns:hasName ?name }\"\n // +\" WHERE { exprod:1 exns:hasName ?name }\"\n +\" WHERE { ?res ?pred ?obj }\"\n );\n out.println(\"Query := \"+q);\n t1 = System.currentTimeMillis();\n out.println(\"QueryFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n try ( QueryExecution qExec = QueryExecutionFactory\n // if you query the whole DataSet,\n // you have to provide a FROM in the SparQL\n //.create(q, data0);\n .create(q, model) ) {\n t1 = System.currentTimeMillis();\n out.println(\"QueryExecutionFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n ResultSet rs = qExec.execSelect();\n t1 = System.currentTimeMillis();\n out.println(\"executeSelect.TIME=\"+(t1 - t0));\n while (rs.hasNext()) {\n QuerySolution sol = rs.next();\n out.println(\"Solution := \"+sol);\n for (Iterator<String> names = sol.varNames(); names.hasNext(); ) {\n final String name = names.next();\n out.println(\"\\t\"+name+\" := \"+sol.get(name));\n }\n }\n }\n }\n out.println(\"closing graph\");\n graph.close();\n out.println(\"closing model\");\n model.close();\n //out.println(\"closing DataSetGraph\");\n //dsg.close();\n out.println(\"closing DataSet\");\n data0.close();\n }", "public void test_anon_0() {\n String NS = \"http://example.org/foo#\";\n String sourceT =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'\"\n + \" xmlns:ex='http://example.org/foo#'\"\n + \" xmlns:owl='http://www.w3.org/2002/07/owl#'>\"\n + \" <owl:ObjectProperty rdf:about='http://example.org/foo#p' />\"\n + \" <owl:Class rdf:about='http://example.org/foo#A' />\"\n + \" <ex:A rdf:about='http://example.org/foo#x' />\"\n + \" <owl:Class rdf:about='http://example.org/foo#B'>\"\n + \" <owl:equivalentClass>\"\n + \" <owl:Restriction>\" \n + \" <owl:onProperty rdf:resource='http://example.org/foo#p' />\" \n + \" <owl:hasValue rdf:resource='http://example.org/foo#x' />\" \n + \" </owl:Restriction>\"\n + \" </owl:equivalentClass>\"\n + \" </owl:Class>\"\n + \"</rdf:RDF>\";\n \n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.read(new ByteArrayInputStream(sourceT.getBytes()), \"http://example.org/foo\");\n \n OntClass B = m.getOntClass( NS + \"B\");\n Restriction r = B.getEquivalentClass().asRestriction();\n HasValueRestriction hvr = r.asHasValueRestriction();\n RDFNode n = hvr.getHasValue();\n \n assertTrue( \"Should be an individual\", n instanceof Individual );\n }", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "public void test_dn_0() {\n OntModel schema = ModelFactory.createOntologyModel( OntModelSpec.OWL_LITE_MEM_RULES_INF, null );\n \n schema.read( \"file:doc/inference/data/owlDemoSchema.xml\", null );\n \n int count = 0;\n for (Iterator i = schema.listIndividuals(); i.hasNext(); ) {\n //Resource r = (Resource) i.next();\n i.next();\n count++;\n /* Debugging * /\n for (StmtIterator j = r.listProperties(RDF.type); j.hasNext(); ) {\n System.out.println( \"ind - \" + r + \" rdf:type = \" + j.nextStatement().getObject() );\n }\n System.out.println(\"----------\"); /**/\n }\n \n assertEquals( \"Expecting 6 individuals\", 6, count );\n }", "@Test\n void testRankFilter() {\n Query q = newQueryFromEncoded(\"?query=trump\" +\n \"&model.type=all\" +\n \"&model.defaultIndex=text\" +\n \"&filter=filterattribute%3Afrontpage_US_en-US\");\n assertEquals(\"RANK text:trump |filterattribute:frontpage_US_en-US\",\n q.getModel().getQueryTree().toString());\n }", "<K, R extends IResponse> R query(IQueryRequest<K> queryRequest);", "T getQueryInfo();", "@SuppressWarnings(\"unchecked\")\n\tprivate CompoundQuery handleQuery() throws Exception{\n\t\tif (this.resultant != null && this.resultant.getResultsContainer() != null){\n\t\t\t//compoundQuery = (CompoundQuery) resultant.getAssociatedQuery();\n\t\t\tViewable view = newCompoundQuery.getAssociatedView();\n\t\t\tResultsContainer resultsContainer = this.resultant.getResultsContainer();\n\t\t\tsampleCrit = null;\n\t Collection sampleIDs = new ArrayList(); \n\t\t\t//Get the samples from the resultset object\n\t\t\tif(resultsContainer!= null){\n\t\t\t\tCollection samples = null;\n\t\t\t\tif(resultsContainer != null &&resultsContainer instanceof DimensionalViewContainer){\t\t\t\t\n\t\t\t\t\tDimensionalViewContainer dimensionalViewContainer = (DimensionalViewContainer)resultsContainer;\n\t\t\t\t\t\tCopyNumberSingleViewResultsContainer copyNumberSingleViewContainer = dimensionalViewContainer.getCopyNumberSingleViewContainer();\n\t\t\t\t\t\tGeneExprSingleViewResultsContainer geneExprSingleViewContainer = dimensionalViewContainer.getGeneExprSingleViewContainer();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(copyNumberSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = copyNumberSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(geneExprSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = geneExprSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t \t\tsampleCrit = new SampleCriteria();\n\t\t \t\t\tsampleCrit.setSampleIDs(sampleIDs);\n\n AddConstrainsToQueriesHelper constrainedSamplesHandler= new AddConstrainsToQueriesHelper();\n constrainedSamplesHandler.constrainQueryWithSamples(newCompoundQuery,sampleCrit);\n\t\t\t\tnewCompoundQuery = getShowAllValuesQuery(newCompoundQuery);\n\t\t\t\tnewCompoundQuery.setAssociatedView(view);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn newCompoundQuery;\n\t\t}", "@Override\n public R visit(RDFLiteral n, A argu) {\n R _ret = null;\n n.sparqlString.accept(this, argu);\n n.nodeOptional.accept(this, argu);\n return _ret;\n }", "void filterQuery(ServerContext context, QueryRequest request, QueryResultHandler handler,\n RequestHandler next);", "public void xxtest_oh_01() {\n String NS = \"http://www.idi.ntnu.no/~herje/ja/\";\n Resource[] expected = new Resource[] {\n ResourceFactory.createResource( NS+\"reiseliv.owl#Reiseliv\" ),\n ResourceFactory.createResource( NS+\"hotell.owl#Hotell\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#Restaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteBadRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteDoRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#SkogRestaurant\" ),\n };\n \n test_oh_01scan( OntModelSpec.OWL_MEM, \"No inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_MINI_RULE_INF, \"Mini rule inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_RULE_INF, \"Full rule inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_MICRO_RULE_INF, \"Micro rule inf\", expected );\n }", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "@Test public void onePredicate() {\n query(\"//ul/li['']\", \"\");\n query(\"//ul/li['x']\", LI1 + '\\n' + LI2);\n query(\"//ul/li[<a b='{\" + _RANDOM_INTEGER.args() + \" }'/>]\", LI1 + '\\n' + LI2);\n\n query(\"//ul/li[0]\", \"\");\n query(\"//ul/li[1]\", LI1);\n query(\"//ul/li[2]\", LI2);\n query(\"//ul/li[3]\", \"\");\n query(\"//ul/li[last()]\", LI2);\n }", "private static void initSPARQLAnythingEngine() {\n\t\t// Register the JSON-LD parser factory for extension .json\n\t\tReaderRIOTFactory parserFactoryJsonLD = new RiotUtils.ReaderRIOTFactoryJSONLD();\n\t\tRDFParserRegistry.registerLangTriples(RiotUtils.JSON, parserFactoryJsonLD);\n\t\t// Setup FX executor\n\t\tJenaSystem.init();\n\t\tQC.setFactory(ARQ.getContext(), FacadeX.ExecutorFactory);\n\t}", "QueryResponse query(SolrParams solrParams) throws SolrServerException;", "@Test\n public void testRelWithHref() throws RepositoryException {\n assertExtract(\"/html/rdfa/rel-href.html\");\n logger.debug(dumpModelToTurtle());\n\n assertContains(RDFUtils.iri(baseIRI.toString(), \"#me\"), FOAF.getInstance().name, \"John Doe\");\n assertContains(RDFUtils.iri(baseIRI.toString(), \"#me\"), FOAF.getInstance().homepage,\n RDFUtils.iri(\"http://example.org/blog/\"));\n }", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query, Pagination pagination);", "public final void querySAX(String query, ContentHandler handler,\n\t\t\tAttributes atts) throws SQLException, SAXException {\n\t\tfinal Connection con = getConnection();\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = con.createStatement();\n\t\t\tDOMUtils.resultSet2ContentHandler(stmt.executeQuery(query),\n\t\t\t\t\thandler, atts);\n\t\t} finally {\n\t\t\tif (stmt != null)\n\t\t\t\tstmt.close();\n\t\t\tif (con != null)\n\t\t\t\tcon.close();\n\t\t}\n\t}", "@Test\n public void testGetResultSet() throws MainException {\n System.out.println(\"getResultSet\");\n String queryText = \"select * from infermieri\";\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n ResultSet result = instance.getResultSet(queryText);\n assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n }", "@Test\n\tpublic void testKeywordQuery(){\n\t\t//manager.getResponse(\"american football \"); //match multiple keywords\n//\t\tmanager.getResponse(\"list of Bond 007 movies\");\n//\tmanager.getResponse(\"Disney movies\");\n\t\t//manager.keywordQuery(\"Paul Brown Stadium location\");\n\t\t//manager.keywordQuery(\"0Francesco\");\n System.out.println(\"******* keyword query *******\");\n\t\t//manager.keywordQuery(\"sportspeople in tennis\");\n\t\t//manager.keywordSearch(\"list of movies starring Sean Connery\",ElasticIndex.analyzed,100 );\n//\t\tmanager.keywordSearch(\"movies starring Sean Connery\",ElasticIndex.notStemmed,100 );\n// manager.keywordSearch(\"musical movies tony award\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"movies directed by Woody Allen\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"United states professional sports teams\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"computer games developed by Ubisoft\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"computer games developed by Ubisoft\",ElasticIndex.notStemmed,100 );\n// manager.keywordSearch(\"movies academy award nominations\",ElasticIndex.notStemmed,100 );\n System.out.println(SearchResultUtil.toSummary(manager.keywordSearch(\"movies directed by Woody Allen\",ElasticIndex.notLowercased,20 )));\n //manager.keywordSearch(\"grammy best album in 2012\",ElasticIndex.notAnalyzed,100 );\n //(better than analyzed) manager.keywordSearch(\"grammy best album in 2012\",ElasticIndex.notStemmed,100 );\n System.out.println(\"*****************************\");\n\n\t\t//manager.keywordQuery(\"Disney movies\");\n\t}", "@Test\r\n\tpublic void testRuleSets2() throws Exception{\r\n\t\t\r\n\t\tAssert.assertEquals(0L, testAdminCon.size());\r\n\t\ttestAdminCon.add(micah, lname, micahlname, dirgraph1);\r\n\t\ttestAdminCon.add(micah, fname, micahfname, dirgraph1);\r\n\t\ttestAdminCon.add(micah, developPrototypeOf, semantics, dirgraph1);\r\n\t\ttestAdminCon.add(micah, type, sEngineer, dirgraph1);\r\n\t\ttestAdminCon.add(micah, worksFor, ml, dirgraph1);\r\n\t\t\r\n\t\ttestAdminCon.add(john, fname, johnfname,dirgraph);\r\n\t\ttestAdminCon.add(john, lname, johnlname,dirgraph);\r\n\t\ttestAdminCon.add(john, writeFuncSpecOf, inference, dirgraph);\r\n\t\ttestAdminCon.add(john, type, lEngineer, dirgraph);\r\n\t\ttestAdminCon.add(john, worksFor, ml, dirgraph);\r\n\t\t\r\n\t\ttestAdminCon.add(writeFuncSpecOf, subProperty, design, dirgraph1);\r\n\t\ttestAdminCon.add(developPrototypeOf, subProperty, design, dirgraph1);\r\n\t\ttestAdminCon.add(design, subProperty, develop, dirgraph1);\r\n\t\t\r\n\t\ttestAdminCon.add(lEngineer, subClass, engineer, dirgraph1);\r\n\t\ttestAdminCon.add(sEngineer, subClass, engineer, dirgraph1);\r\n\t\ttestAdminCon.add(engineer, subClass, employee, dirgraph1);\r\n\t\t\r\n\t\tString query = \"select (count (?s) as ?totalcount) where {?s ?p ?o .} \";\r\n\t\tTupleQuery tupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(SPARQLRuleset.RDFS_PLUS_FULL);\r\n\t\tTupleQueryResult result\t= tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(374, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\r\n\t\tRepositoryResult<Statement> resultg = testAdminCon.getStatements(null, null, null, true, dirgraph, dirgraph1);\r\n\t\t\r\n\t\tassertNotNull(\"Iterator should not be null\", resultg);\r\n\t\tassertTrue(\"Iterator should not be empty\", resultg.hasNext());\r\n\t\t\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(SPARQLRuleset.EQUIVALENT_CLASS);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(18, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(SPARQLRuleset.RDFS,SPARQLRuleset.INVERSE_OF);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(86, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(null,SPARQLRuleset.INVERSE_OF);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(18, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets((SPARQLRuleset)null, null);\r\n\t\ttupleQuery.setIncludeInferred(false);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(16, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t}", "private void init() throws JRException {\n if (result != null) {\n return;\n }\n if (endpointUrl == null) {\n throw new JRException(\"Endpoint URLs can't be null\");\n }\n if (sparqlStatement == null || sparqlStatement.length() == 0) {\n throw new JRException(\"SPARQL statements can't be null for \" + endpointUrl);\n }\n try {\n endpointObj = new SPARQLRepository(endpointUrl);\n endpointObj.initialize();\n } catch (Exception e) {\n throw new JRException(\"Exception initializing endpoint \" + endpointUrl, e);\n }\n try {\n conn = endpointObj.getConnection();\n log.info(\"Executing SPARQL: \" + sparqlStatement);\n TupleQuery q = conn.prepareTupleQuery(QueryLanguage.SPARQL, sparqlStatement);\n result = q.evaluate();\n log.debug(\"Bindings got, size: \" + result.getBindingNames().size());\n } catch (Exception e) {\n throw new JRException(\"Exception connecting to endpoint \" + endpointUrl, e);\n } finally {\n try {\n conn.close();\n } catch (RepositoryException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tString type = req.getParameter(\"type\");\n\t\tString concept = req.getParameter(\"concept\");\n\t\tif (type != null && type.equals(\"compare\")) {\n\t\t\tgetcompareResults(concept, resp);\n\t\t\treturn;\n\t\t}\n\t\tif (type != null && type.equals(\"freeb\")) {\n\t\t\ttry {\n\t\t\t\tcallFreebase(concept, resp);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tString query = req.getParameter(\"query\");\n\t\t// default dbpedia_query\n\t\tif (query == null) {\n\t\t\tquery = \"dbpedia_query\";\n\t\t}\n\t\t\n\t\tString chunk = req.getParameter(\"chunk\");\n\t\tint chunkNum = 1;\n\t\tif (chunk != null) {\n\t\t\tchunkNum = Integer.parseInt(chunk);\n\t\t}\n\t\tString cont = req.getParameter(\"cont\");\n\t\t// All string should be have CamelCase and words separated by underscore\n\t\t//if cont != null or concept contains '_' then camelize except if camelcase is not intended\n\t\tif ((cont == null && !concept.contains(\"_\"))) {\n\t\t\tString camel = req.getParameter(\"camel\");\n\t\t\tif (camel == null || !camel.contains(\"false\")) {\n\t\t\t\tconcept = toCamelCaseUnderscore(concept);\n\t\t\t} else {\n\t\t\t\tconcept = putUnderscore(concept);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Concept:: \" + concept);\n\t\t// SparqlEvaluator eval = SparqlEvaluator.getInstance();\n\t\t// RDFXMLProcessor eval = new RDFXMLProcessor();\n\t\tif (concept == null)\n\t\t\treturn;\n\t\t// List<JSONObject> js = eval.process(concept,query);\n\t\tSystem.out.println(\"Before Process\");\n\t\tSystem.out.println(chunkNum);\n\t\tList<JSONObject> js = new ArrayList<JSONObject>(); \n\t\t\n\t\ttry {\n\t\t\tjs = SparqlEvaluator.getInstance().process(concept,\n\t\t\t\t\tquery, chunkNum);\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\tresp.getWriter().print(\"\");\n\t\t}\n\t\tif (js.isEmpty()) {\n\t\t\tresp.getWriter().print(\"\");\n\t\t\treturn;\n\t\t}\n\t\tIterator<JSONObject> itr = js.iterator();\n\t\tSystem.out.println(\"Size of list :: \" + js.size());\n\n\t\tresp.setContentType(\"text/html; charset=UTF-8\");\n\n\t\tString dset = \"dbpedia\";\n\n\t\tString respout = \"{\\\"bindings\\\": [\";\n\t\tresp.getWriter().print(respout);\n\t\tSystem.out.println(respout);\n\n\t\t\n\t\trespout = \"{\\\"type\\\":\\\"num\\\",\\\"val\\\":\\\"\"\n\t\t\t+ SparqlEvaluator.getCacheNum(concept, query, dset)\n\t\t\t+ \"\\\"},\";\n\t\tresp.getWriter().print(respout);\n\t\tSystem.out.println(respout);\n\n\t\tboolean first = true;\n\t\tint count = 1;\n\t\twhile (itr.hasNext()) {\n\t\t\tif (!first) {\n\t\t\t\trespout = \",\"; resp.getWriter().print(respout); System.out.println(respout);\n\n\t\t\t}\n\t\t\tfirst = false;\n\t\t\tString nstr = itr.next().toString();\n\t\t\tresp.getWriter().print(nstr);\n\t\t\tSystem.out.println((count++) + \" :\" + nstr);\n\t\t}\n\t\tSystem.out.println(\"After loop\");\n\t\tresp.getWriter().print(\"]}\");\n\t\tSystem.out.println(\"Done\");\n\n\t}", "private RDF_Term testTerm(Node node, PrefixMap pmap, boolean asValue) {\n RDF_Term rt = ProtobufConvert.convert(node, pmap, asValue) ;\n\n if ( node == null) {\n assertTrue(rt.hasUndefined());\n return rt;\n }\n\n switch (rt.getTermCase()) {\n// message RDF_Term {\n// oneof term {\n// RDF_IRI iri = 1 ;\n// RDF_BNode bnode = 2 ;\n// RDF_Literal literal = 3 ;\n// RDF_PrefixName prefixName = 4 ;\n// RDF_VAR variable = 5 ;\n// RDF_Triple tripleTerm = 6 ;\n// RDF_ANY any = 7 ;\n// RDF_UNDEF undefined = 8 ;\n// RDF_REPEAT repeat = 9 ;\n//\n// // Value forms of literals.\n// int64 valInteger = 20 ;\n// double valDouble = 21 ;\n// RDF_Decimal valDecimal = 22 ;\n// }\n// }\n case IRI : {\n RDF_IRI iri = rt.getIri() ;\n assertEquals(node.getURI(), iri.getIri()) ;\n break;\n }\n case BNODE : {\n RDF_BNode bnode = rt.getBnode() ;\n assertEquals(node.getBlankNodeLabel(), bnode.getLabel()) ;\n break;\n }\n case LITERAL : {\n RDF_Literal lit = rt.getLiteral() ;\n assertEquals(node.getLiteralLexicalForm(), lit.getLex()) ;\n\n if (JenaRuntime.isRDF11) {\n // RDF 1.1\n if ( Util.isSimpleString(node) ) {\n assertTrue(lit.getSimple());\n // Protobug default is \"\"\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNullPB(lit.getLangtag()) ;\n } else if ( Util.isLangString(node) ) {\n assertFalse(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNotSame(\"\", lit.getLangtag()) ;\n }\n else {\n assertFalse(lit.getSimple());\n // Regular typed literal.\n assertTrue(lit.getDatatype() != null || lit.getDtPrefix() != null );\n assertNullPB(lit.getLangtag()) ;\n }\n } else {\n // RDF 1.0\n if ( node.getLiteralDatatype() == null ) {\n if ( Util.isLangString(node ) ) {\n assertFalse(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertNull(lit.getDtPrefix()) ;\n assertNotSame(\"\", lit.getLangtag()) ;\n } else {\n assertTrue(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNullPB(lit.getLangtag()) ;\n }\n } else {\n assertTrue(lit.getDatatype() != null || lit.getDtPrefix() != null );\n }\n }\n break;\n }\n case PREFIXNAME : {\n assertNotNull(rt.getPrefixName().getPrefix()) ;\n assertNotNull(rt.getPrefixName().getLocalName()) ;\n String x = pmap.expand(rt.getPrefixName().getPrefix(), rt.getPrefixName().getLocalName());\n assertEquals(node.getURI(),x);\n break;\n }\n case VARIABLE :\n assertEquals(node.getName(), rt.getVariable().getName());\n break;\n case TRIPLETERM : {\n RDF_Triple encTriple = rt.getTripleTerm();\n Triple t = node.getTriple();\n RDF_Term rt_s = testTerm(t.getSubject(), pmap, asValue);\n RDF_Term rt_p = testTerm(t.getPredicate(), pmap, asValue);\n RDF_Term rt_o = testTerm(t.getObject(), pmap, asValue);\n assertEquals(encTriple.getS(), rt_s);\n assertEquals(encTriple.getP(), rt_p);\n assertEquals(encTriple.getO(), rt_o);\n break;\n }\n case ANY :\n assertEquals(Node.ANY, node);\n case REPEAT :\n break;\n case UNDEFINED :\n assertNull(node);\n return rt;\n case VALINTEGER : {\n long x = rt.getValInteger();\n assertTrue(integerSubTypes.contains(node.getLiteralDatatype()));\n //assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDinteger);\n long x2 = Long.parseLong(node.getLiteralLexicalForm());\n assertEquals(x,x2);\n break;\n }\n case VALDOUBLE : {\n double x = rt.getValDouble();\n assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDdouble);\n double x2 = Double.parseDouble(node.getLiteralLexicalForm());\n assertEquals(x, x2, 0.01);\n break;\n }\n case VALDECIMAL : {\n assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDdecimal);\n NodeValue nv = NodeValue.makeNode(node);\n assertTrue(nv.isDecimal());\n\n long value = rt.getValDecimal().getValue() ;\n int scale = rt.getValDecimal().getScale() ;\n BigDecimal d = BigDecimal.valueOf(value, scale) ;\n assertEquals(nv.getDecimal(), d);\n break;\n }\n case TERM_NOT_SET :\n break;\n }\n\n // And reverse\n if ( ! asValue ) {\n // Value based does not preserve exact datatype or lexical form.\n Node n2 = ProtobufConvert.convert(rt, pmap);\n assertEquals(node, n2) ;\n }\n\n return rt;\n }", "SparqlResultObject callSelectQuery(String name, Map<String, String> params);", "@Override\n public void search(Uri uri) {\n }", "public static void createSimple() throws Exception {\n\t\t// create a sesame memory sail\n\t\tMemoryStore memoryStore = new MemoryStore();\n\n\t\t// create a lucenesail to wrap the memorystore\n\t\tLuceneSail lucenesail = new LuceneSail();\t\t\n\t\t// set this parameter to let the lucene index store its data in ram\n\t\tlucenesail.setParameter(LuceneSail.LUCENE_RAMDIR_KEY, \"true\");\n\t\t// set this parameter to store the lucene index on disk\n\t\t// lucenesail.setParameter(LuceneSail.LUCENE_DIR_KEY, \"./data/mydirectory\");\n\t\t\n\t\t// wrap memorystore in a lucenesail\n\t\tlucenesail.setDelegate(memoryStore);\n\t\t\n\t\t// create a Repository to access the sails\n\t\tSailRepository repository = new SailRepository(lucenesail);\n\t\trepository.initialize();\n\t\t\n\t\t// add some test data, the FOAF ont\n\t\tSailRepositoryConnection connection = repository.getConnection();\n\t\tconnection.begin();\n\t\ttry {\n//\t\t\tconnection.setAutoCommit(false);\n\t\t\tFile file = new File(\"/Users/sschenk/Downloads/foaf.rdfs\");\n\t\t\tSystem.out.println(file.exists());\n\t\t\tconnection.add(\n\t\t\t\t\tfile,\n\t\t\t\t\t\"\", \n\t\t\t\t\tRDFFormat.RDFXML);\n\t\t\tconnection.commit();\n\t\t\t\n\t\t\t// search for all resources that mention \"person\"\n\t\t\tString queryString = \"PREFIX search: <\"+LuceneSailSchema.NAMESPACE+\"> \\n\" +\n\t\t\t\t\t\"SELECT ?x ?score ?snippet WHERE {?x search:matches ?match. \\n\" +\n\t\t\t\t\t\"?match search:query \\\"person\\\"; \\n\" +\n\t\t\t\t\t\"search:score ?score; \\n\" +\n\t\t\t\t\t\"search:snippet ?snippet. }\" ;\n\t\t\tSystem.out.println(\"Running query: \\n\"+queryString);\n\t\t\tTupleQuery query = connection.prepareTupleQuery(QueryLanguage.SPARQL, queryString);\n\t\t\tTupleResult result = query.evaluate();\n\t\t\ttry { \n\t\t\t\t// print the results\n\t\t\t\twhile (result.hasNext()){\n\t\t\t\t\tBindingSet bindings = result.next();\n\t\t\t\t\tSystem.out.println(\"found match: \");\n\t\t\t\t\tfor (Binding binding : bindings) {\n\t\t\t\t\t\tSystem.out.println(\" \"+binding.getName()+\": \"+binding.getValue());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tresult.close();\n\t\t\t}\n\t\t} finally {\n\t\t\tconnection.close();\n\t\t\trepository.shutDown();\n\t\t}\n\t\t\n\t}", "@Test\n public void testNestedQueryModifiers() throws Exception {\n\n String subqq=\"_query_:\\\"{!v=$qq}\\\"\";\n\n assertJQ(req(\"q\",\"_query_:\\\"\\\\\\\"how brown\\\\\\\"~2\\\"\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n assertJQ(req(\"q\",subqq, \"qq\",\"\\\"how brown\\\"~2\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n // Should explicit slop override? It currently does not, but that could be considered a bug.\n assertJQ(req(\"q\",subqq+\"~1\", \"qq\",\"\\\"how brown\\\"~2\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n // Should explicit slop override? It currently does not, but that could be considered a bug.\n assertJQ(req(\"q\",\" {!v=$qq}~1\", \"qq\",\"\\\"how brown\\\"~2\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n assertJQ(req(\"fq\",\"id:1\", \"fl\",\"id,score\", \"q\", subqq+\"^3\", \"qq\",\"text:x^2\"\n , \"debug\",\"query\"\n )\n ,\"/debug/parsedquery_toString=='((text:x)^2.0)^3.0'\"\n );\n\n assertJQ(req(\"fq\",\"id:1\", \"fl\",\"id,score\", \"q\", \" {!v=$qq}^3\", \"qq\",\"text:x^2\"\n , \"debug\",\"query\"\n )\n ,\"/debug/parsedquery_toString=='((text:x)^2.0)^3.0'\"\n );\n\n }", "public void Query() {\n }", "public void test_sf_969475() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <owl:ObjectProperty rdf:ID='p0'>\" +\n \" <owl:inverseOf>\" +\n \" <owl:ObjectProperty rdf:ID='q0' />\" +\n \" </owl:inverseOf>\" +\n \" </owl:ObjectProperty>\" +\n \" <owl:ObjectProperty rdf:ID='p1'>\" +\n \" <owl:inverseOf>\" +\n \" <owl:ObjectProperty rdf:ID='q1' />\" +\n \" </owl:inverseOf>\" +\n \" </owl:ObjectProperty>\" +\n \"</rdf:RDF>\";\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n m.read( new StringReader( SOURCE ), null );\n \n ObjectProperty p0 = m.getObjectProperty( \"http://jena.hpl.hp.com/test#p0\");\n Object invP0 = p0.getInverseOf();\n \n assertEquals( m.getResource( \"http://jena.hpl.hp.com/test#q0\"), invP0 );\n assertTrue( \"Should be an ObjectProperty facet\", invP0 instanceof ObjectProperty );\n \n ObjectProperty q1 = m.getObjectProperty( \"http://jena.hpl.hp.com/test#q1\");\n Object invQ1 = q1.getInverse();\n \n assertEquals( m.getResource( \"http://jena.hpl.hp.com/test#p1\"), invQ1 );\n assertTrue( \"Should be an ObjectProperty facet\", invQ1 instanceof ObjectProperty );\n }", "@Test\n public void test002() {\n int total = response.extract().path(\"total\");\n\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The search query is: \" + total);\n System.out.println(\"------------------End of Test---------------------------\");\n\n }", "Message handle(Message query, String kind);", "void contactQueryResult(String queryId, Contact contact);" ]
[ "0.65154463", "0.646076", "0.64355", "0.63797855", "0.6370891", "0.61967933", "0.61506295", "0.60005015", "0.59948105", "0.59887075", "0.59583133", "0.59453565", "0.5918102", "0.5867251", "0.5818676", "0.58168083", "0.58087605", "0.57458586", "0.57274145", "0.5702796", "0.56701165", "0.56323516", "0.55130166", "0.55035686", "0.55006266", "0.5434425", "0.5434329", "0.54279566", "0.54160553", "0.54070187", "0.54048485", "0.5389304", "0.5388929", "0.53705215", "0.5326313", "0.5302646", "0.52979785", "0.5296412", "0.5283325", "0.5282805", "0.5280931", "0.5275579", "0.5271636", "0.5266484", "0.526324", "0.5261075", "0.5251658", "0.5249595", "0.52485377", "0.52350414", "0.5231826", "0.5219762", "0.52163154", "0.5209154", "0.51973325", "0.51962095", "0.5179952", "0.5179261", "0.51673245", "0.51649934", "0.51504153", "0.5141914", "0.51409763", "0.5138766", "0.5137049", "0.513068", "0.5128168", "0.5126868", "0.5124203", "0.5123935", "0.51230747", "0.5121433", "0.5104722", "0.5104701", "0.5095074", "0.5088106", "0.5078655", "0.507413", "0.50715667", "0.5062454", "0.50401497", "0.50384045", "0.5037696", "0.5034526", "0.502958", "0.5024172", "0.50218683", "0.50207937", "0.5019569", "0.50166625", "0.5001256", "0.4997402", "0.49898034", "0.49896985", "0.49855593", "0.4980816", "0.4975009", "0.4972233", "0.49710828", "0.49528483" ]
0.51623243
60
/ test query with custom RDF handler
@Test public void testPassThroughHandler_emptySingleSourceQuery() throws Exception { prepareTest(Arrays.asList("/tests/basic/data01endpoint1.ttl", "/tests/basic/data01endpoint2.ttl")); try (RepositoryConnection conn = fedxRule.getRepository().getConnection()) { // SELECT query TupleQuery tq = conn .prepareTupleQuery("SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name . }"); tq.setBinding("name", l("notExist")); AtomicBoolean started = new AtomicBoolean(false); AtomicInteger numberOfResults = new AtomicInteger(0); tq.evaluate(new AbstractTupleQueryResultHandler() { @Override public void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException { if (started.get()) { throw new IllegalStateException("Must not start query result twice."); } started.set(true); /* * Expected trace is expected to come from some original repository (e.g. SPARQL) => we explicitly * do not expect QueryResults#report to be the second element (compare test * testPassThroughHandler_MultiSourceQuery) */ Assertions.assertNotEquals(QueryResults.class, new Exception().getStackTrace()[1].getClass()); } @Override public void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException { throw new IllegalStateException("Expected empty result"); }; }); Assertions.assertTrue(started.get()); Assertions.assertEquals(0, numberOfResults.get()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testWriteRDF() {\n\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.is_a(),NEURON), \"subclass\");\n\n\t\trunQuery(new LinkQueryTerm(MELANOCYTE),\"any link\");\n\t\t\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.part_of(),MELANOCYTE),\"part_of (class)\");\n\t\t\n\t\trunQuery(new LinkQueryTerm(relationVocabulary.inheres_in(),\tnew LinkQueryTerm(relationVocabulary.part_of(),HUMAN_EYE)),\"phenotype in some part of the eye\");\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(MELANOCYTE),\"anything annotated to melanocyte\");\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(new LinkQueryTerm(relationVocabulary.inheres_in(),\tMELANOCYTE)),\"anything annotated to a melanocyte phenotype\");\n\t\t\n\t\tQueryTerm classQt =\tnew BooleanQueryTerm(new LinkQueryTerm(relationVocabulary.inheres_in(),NEURON),\tnew LinkQueryTerm(relationVocabulary.inheres_in(),BEHAVIOR));\n\t\t\n\t\trunQuery(new AnnotationLinkQueryTerm(classQt),\"boolean query\");\n\n\n\t}", "public static void main (String[] args) {\n EntityQuery query = new EntityQuery();\n Harvestable res = new OaiPmhResource();\n query.setFilter(\"test\", res);\n query.setAcl(\"diku\");\n query.setStartsWith(\"cf\",\"name\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"a\"));\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"x\"));\n\n query = new EntityQuery();\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"b\"));\n query.setQuery(\"usedBy=*library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"c\"));\n query.setQuery(\"(=library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"d\"));\n query.setQuery(\"usedBy=\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"e\"));\n query.setQuery(\"(usedBy!=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"f\"));\n query.setQuery(\"(usedBy==library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"g\"));\n query.setQuery(\"(usedBy===library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"h\"));\n }", "public void testDynamizePredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 100);\n\n part.setInsDyn(0.5);\n part.setDelDyn(0.1);\n \n part.dynamizePredicate(\"<http://dbpedia.org/ontology/deathPlace>\");\n\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n\n assertEquals(140,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "Object executeQuery(String sparqlQuery);", "@Test\n\tpublic void testSparqlQuery() throws OWLOntologyCreationException,\n\t\t\tIOException {\n\t\tInputStream ontStream = LDLPReasonerTest.class\n\t\t\t\t.getResourceAsStream(\"/data/university0-0.owl\");\n\t\tOWLOntologyManager manager = OWLManager.createOWLOntologyManager();\n\t\tOWLOntology ontology = manager\n\t\t\t\t.loadOntologyFromOntologyDocument(ontStream);\n\n\t\tInputStream queryStream = LDLPReasonerTest.class\n\t\t\t\t.getResourceAsStream(\"/data/lubm-query4.sparql\");\n\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tqueryStream));\n\t\tString line;\n\t\tString queryText = \"\";\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tqueryText = queryText + line + \"\\n\";\n\t\t}\n\n\t\tQuery query = QueryFactory.create(queryText, Syntax.syntaxARQ);\n\t\tLDLPReasoner reasoner = new LDLPReasoner(ontology);\n\t\tList<Literal> results = reasoner.executeQuery(query);\n\t\tSystem.out.println(results.size() + \" answers :\");\n\t\tfor (Literal result : results) {\n\t\t\tSystem.out.println(result);\n\t\t}\n\t\tLDLPCompilerManager m = LDLPCompilerManager.getInstance();\n\n\t\t// m.dump();\n\n\t}", "@Test\n public void example13 () throws Exception {\n Map<String, Stmt> inputs = example2setup();\n conn.setNamespace(\"ex\", \"http://example.org/people/\");\n conn.setNamespace(\"ont\", \"http://example.org/ontology/\");\n String prefix = \"PREFIX ont: \" + \"<http://example.org/ontology/>\\n\";\n \n String queryString = \"select ?s ?p ?o where { ?s ?p ?o} \";\n TupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"SELECT result:\", inputs.values(),\n statementSet(tupleQuery.evaluate()));\n \n assertTrue(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"Alice\\\" } \").evaluate());\n assertFalse(\"Boolean result\",\n conn.prepareBooleanQuery(QueryLanguage.SPARQL,\n prefix + \n \"ask { ?s ont:name \\\"NOT Alice\\\" } \").evaluate());\n \n queryString = \"construct {?s ?p ?o} where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery constructQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Construct result\",\n mapKeep(new String[] {\"an\"}, inputs).values(),\n statementSet(constructQuery.evaluate()));\n \n queryString = \"describe ?s where { ?s ?p ?o . filter (?o = \\\"Alice\\\") } \";\n GraphQuery describeQuery = conn.prepareGraphQuery(QueryLanguage.SPARQL, queryString);\n assertSetsEqual(\"Describe result\",\n mapKeep(new String[] {\"an\", \"at\"}, inputs).values(),\n statementSet(describeQuery.evaluate()));\n }", "@RequestMapping(value = \"/queryrdf\", method = {RequestMethod.GET, RequestMethod.POST})\n public void queryRdf(@RequestParam(\"query\") final String query,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_QUERY_AUTH, required = false) String auth,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_CV, required = false) final String vis,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_INFER, required = false) final String infer,\n @RequestParam(value = \"nullout\", required = false) final String nullout,\n @RequestParam(value = RdfCloudTripleStoreConfiguration.CONF_RESULT_FORMAT, required = false) final String emit,\n @RequestParam(value = \"padding\", required = false) final String padding,\n @RequestParam(value = \"callback\", required = false) final String callback,\n final HttpServletRequest request,\n final HttpServletResponse response) {\n SailRepositoryConnection conn = null;\n final Thread queryThread = Thread.currentThread();\n auth = StringUtils.arrayToCommaDelimitedString(provider.getUserAuths(request));\n final Timer timer = new Timer();\n timer.schedule(new TimerTask() {\n\n @Override\n public void run() {\n log.debug(\"interrupting\");\n queryThread.interrupt();\n\n }\n }, QUERY_TIME_OUT_SECONDS * 1000);\n\n try {\n final ServletOutputStream os = response.getOutputStream();\n conn = repository.getConnection();\n\n final Boolean isBlankQuery = StringUtils.isEmpty(query);\n final ParsedOperation operation = QueryParserUtil.parseOperation(QueryLanguage.SPARQL, query, null);\n\n final Boolean requestedCallback = !StringUtils.isEmpty(callback);\n final Boolean requestedFormat = !StringUtils.isEmpty(emit);\n\n if (!isBlankQuery) {\n if (operation instanceof ParsedGraphQuery) {\n // Perform Graph Query\n final RDFHandler handler = new RDFXMLWriter(os);\n response.setContentType(\"text/xml\");\n performGraphQuery(query, conn, auth, infer, nullout, handler);\n } else if (operation instanceof ParsedTupleQuery) {\n // Perform Tuple Query\n TupleQueryResultHandler handler;\n\n if (requestedFormat && emit.equalsIgnoreCase(\"json\")) {\n handler = new SPARQLResultsJSONWriter(os);\n response.setContentType(\"application/json\");\n } else {\n handler = new SPARQLResultsXMLWriter(os);\n response.setContentType(\"text/xml\");\n }\n\n performQuery(query, conn, auth, infer, nullout, handler);\n } else if (operation instanceof ParsedUpdate) {\n // Perform Update Query\n performUpdate(query, conn, os, infer, vis);\n } else {\n throw new MalformedQueryException(\"Cannot process query. Query type not supported.\");\n }\n }\n\n if (requestedCallback) {\n os.print(\")\");\n }\n } catch (final Exception e) {\n log.error(\"Error running query\", e);\n throw new RuntimeException(e);\n } finally {\n if (conn != null) {\n try {\n conn.close();\n } catch (final RepositoryException e) {\n log.error(\"Error closing connection\", e);\n }\n }\n }\n\n timer.cancel();\n }", "public interface SparqlQueryService {\n\n\t/**\n\t * Generic method to invoke a supplied query regardless of its type. The\n\t * client has to inspect and cast the result object accordingly.\n\t * \n\t * @param name\n\t * @param params\n\t * @return\n\t */\n\tObject executeQuery(String sparqlQuery);\n\n\t/**\n\t * Generic method to invoke a query regardless of its type. The client has\n\t * to inspect and cast the result object accordingly.\n\t * \n\t * @param name\n\t * @param params\n\t * @return\n\t */\n\tObject callQuery(String name, Map<String, String> params);\n\n\t/**\n\t * Invocation of a SPARQL SELECT query. The resultant JSON structure is\n\t * serialized according to the W3C SPARQL 1.1 Query Results JSON Format.\n\t * \n\t * @see http://www.w3.org/TR/sparql11-query/#select\n\t * @param name\n\t * @param params\n\t * @return JSON result structure.\n\t */\n\tSparqlResultObject callSelectQuery(String name, Map<String, String> params);\n\n\t/**\n\t * Invocation of a SPARQL CONSTRUCT query resulting in new graph serialized\n\t * according to RDF/JSON format\n\t * (http://jena.apache.org/documentation/io/rdf-json.html).\n\t * \n\t * \n\t * @see http://www.w3.org/TR/sparql11-query/#construct\n\t * @param name\n\t * @param params\n\t * @return\n\t */\n\tGraph callConstructQuery(String name, Map<String, String> params);\n\n\t/**\n\t * Invocation of a SPARQL ASK query resulting in a boolean value.\n\t * \n\t * @see\n\t * \n\t * @param name\n\t * Unique name of the query.\n\t * @param params\n\t * Map of required parameter-value pairs.\n\t * @return true or false, depending whether the pattern matches.\n\t */\n\tBoolean callAskQuery(String name, Map<String, String> params);\n\n}", "public void test_afs_01() {\n String sourceT =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'\"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <owl:Class rdf:about='http://example.org/foo#A'>\"\n + \" </owl:Class>\"\n + \"</rdf:RDF>\";\n \n String sourceA =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' \"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <rdf:Description rdf:about='http://example.org/foo#x'>\"\n + \" <rdf:type rdf:resource='http://example.org/foo#A' />\"\n + \" </rdf:Description>\"\n + \"</rdf:RDF>\";\n \n Model tBox = ModelFactory.createDefaultModel();\n tBox.read(new ByteArrayInputStream(sourceT.getBytes()), \"http://example.org/foo\");\n \n Model aBox = ModelFactory.createDefaultModel();\n aBox.read(new ByteArrayInputStream(sourceA.getBytes()), \"http://example.org/foo\");\n \n Reasoner reasoner = ReasonerRegistry.getOWLReasoner();\n reasoner = reasoner.bindSchema(tBox);\n \n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM_RULE_INF);\n spec.setReasoner(reasoner);\n \n OntModel m = ModelFactory.createOntologyModel(spec, aBox);\n \n List inds = new ArrayList();\n for (Iterator i = m.listIndividuals(); i.hasNext();) {\n inds.add(i.next());\n }\n \n assertTrue(\"x should be an individual\", inds.contains(m.getResource(\"http://example.org/foo#x\")));\n \n }", "@Test\n public void queryWithOneInnerQueryCreate() throws IOException {\n BaseFuseClient fuseClient = new BaseFuseClient(\"http://localhost:8888/fuse\");\n //query request\n CreateQueryRequest request = new CreateQueryRequest();\n request.setId(\"1\");\n request.setName(\"test\");\n request.setQuery(Q1());\n //submit query\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .body(request)\n .post(\"/fuse/query\")\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1/cursor\"));\n assertEquals(1,queryResourceInfo.getInnerUrlResourceInfos().size());\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getInnerUrlResourceInfos().get(0).getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(201)\n .contentType(\"application/json;charset=UTF-8\");\n\n //get query resource by id\n given()\n .contentType(\"application/json\")\n .header(new Header(\"fuse-external-id\", \"test\"))\n .with().port(8888)\n .get(\"/fuse/query/\"+request.getId()+\"->\"+Q2().getName())\n .then()\n .assertThat()\n .body(new TestUtils.ContentMatcher(o -> {\n try {\n final QueryResourceInfo queryResourceInfo = fuseClient.unwrap(o.toString(), QueryResourceInfo.class);\n assertTrue(queryResourceInfo.getAsgUrl().endsWith(\"fuse/query/1->q2/asg\"));\n assertTrue(queryResourceInfo.getCursorStoreUrl().endsWith(\"fuse/query/1->q2/cursor\"));\n return fuseClient.unwrap(o.toString()) != null;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }))\n .statusCode(200)\n .contentType(\"application/json;charset=UTF-8\");\n\n\n }", "@Test\n\tpublic void testPassThroughHandler_MultiSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\n\t\t\t\t\t\t\t\"SELECT ?person ?interest WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name ; <http://xmlns.com/foaf/0.1/interest> ?interest }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace looks like this java.lang.Exception at\n\t\t\t\t\t * org.eclipse.rdf4j.federated.BasicTests$1.startQueryResult(BasicTests.java:276) at\n\t\t\t\t\t * org.eclipse.rdf4j.query.QueryResults.report(QueryResults.java:263) at\n\t\t\t\t\t * org.eclipse.rdf4j.federated.structures.FedXTupleQuery.evaluate(FedXTupleQuery.java:69)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertEquals(QueryResults.class.getName(),\n\t\t\t\t\t\t\tnew Exception().getStackTrace()[1].getClassName());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"person\"), iri(\"http://example.org/\", \"a\"));\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"interest\").stringValue(), \"SPARQL 1.1 Basic Federated Query\");\n\t\t\t\t\tnumberOfResults.incrementAndGet();\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(1, numberOfResults.get());\n\t\t}\n\t}", "public static void main( String[] args ) {\n\n Model m = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RDFS_INF);\n\n\n FileManager.get().readModel( m, owlFile );\n String myOntologyName = \"http://www.w3.org/2002/07/owl#\";\n String myOntologyNS = \"http://www.w3.org/2002/07/owl#\";\n////\n////\n// String rdfPrefix = \"PREFIX rdf: <\"+RDF.getURI()+\">\" ;\n// String myOntologyPrefix = \"PREFIX \"+myOntologyName+\": <\"+myOntologyNS+\">\" ;\n// String myOntologyPrefix1 = \"PREFIX \"+myOntologyName ;\n String myOntologyPrefix2 = \"prefix pizza: <http://www.w3.org/2002/07/owl#> \";\n//\n//\n//// String queryString = myOntologyPrefix + NL\n//// + rdfPrefix + NL +\n//// \"SELECT ?subject\" ;\n \n String queryString = rdfPrefix + myOntologyPrefix2 +\n// \t\t \"prefix pizza: <http://www.w3.org/2002/07/owl#> \"+ \n \t\t \"prefix rdfs: <\" + RDFS.getURI() + \"> \" +\n \t\t \"prefix owl: <\" + OWL.getURI() + \"> \" +\n// \t\t \"select ?o where {?s ?p ?o}\";\n \n//\t\t\t\t\t\t\"select ?s where {?s rdfs:label \"苹果\"@zh}\";\n \n// \"SELECT ?label WHERE { ?subject rdfs:label ?label }\" ;\n// \"SELECT DISTINCT ?predicate ?label WHERE { ?subject ?predicate ?object. ?predicate rdfs:label ?label .}\";\n// \"SELECT DISTINCT ?s WHERE {?s rdfs:label \\\"Italy\\\"@en}\" ;\n// \"SELECT DISTINCT ?s WHERE {?s rdfs:label \\\"苹果\\\"@zh}\" ;\n// \"SELECT DISTINCT ?s WHERE\" +\n// \"{?object rdfs:label \\\"水果\\\"@zh.\" +\n// \"?subject rdfs:subClassOf ?object.\" +\n// \"?subject rdfs:label ?s}\";\n //星号是转义字符,分号是转义字符\n\t\t\t\t\"SELECT DISTINCT ?e ?s WHERE {?entity a ?subject.?subject rdfs:subClassOf ?object.\"+\n \"?object rdfs:label \\\"富士苹果\\\"@zh.?entity rdfs:label ?e.?subject rdfs:label ?s}ORDER BY ?s\";\n \t\t\n\n \n \t\tcom.hp.hpl.jena.query.Query query = QueryFactory.create(queryString);\n \t\tQueryExecution qe = QueryExecutionFactory.create(query, m);\n \t\tcom.hp.hpl.jena.query.ResultSet results = qe.execSelect();\n\n \t\tResultSetFormatter.out(System.out, results, query);\n \t\tqe.close();\n\n// Query query = QueryFactory.create(queryString) ;\n\n query.serialize(new IndentedWriter(System.out,true)) ;\n System.out.println() ;\n\n\n\n QueryExecution qexec = QueryExecutionFactory.create(query, m) ;\n\n try {\n\n ResultSet rs = qexec.execSelect() ;\n\n\n for ( ; rs.hasNext() ; ){\n QuerySolution rb = rs.nextSolution() ;\n RDFNode y = rb.get(\"person\");\n System.out.print(\"name : \"+y+\"--- \");\n Resource z = (Resource) rb.getResource(\"person\");\n System.out.println(\"plus simplement \"+z.getLocalName());\n }\n }\n finally{\n qexec.close() ;\n }\n }", "void doTests() {\n\t\tString doc = \"\", r = \"\";\n\n\t\tDomeoPermissions dp3 = new DomeoPermissions(\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnew String[] { \"urn:group:uuid:4028808c3dccfe48013dccfe95ea0005 1\" });\n\t\tr = getDocument(\"1\", false, dp3);\n\n\t\tr = termQuery(\"domeo_!DOMEO_NS!_agents.@type\", \"foafx:Person\", 0, 10,\n\t\t\t\tfalse, dp3);\n\n\t\tr = phraseQuery(\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_context.ao_!DOMEO_NS!_hasSelector.ao_!DOMEO_NS!_suffix\",\n\t\t\t\t\"enabling application\", 0, 10, false, dp3);\n\n\t\tdp3 = new DomeoPermissions(\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnew String[] { \"urn:group:uuid:4028808c3dccfe48013dccfe95ea0005 1\" });\n\t\tr = query(\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_context.ao_!DOMEO_NS!_hasSelector.ao_!DOMEO_NS!_suffix\",\n\t\t\t\t\"enabling application\", 0, 10, false, dp3);\n\n\t\t// Test: Term (keyword) query\n\t\t// r = termQuery(\"domeo_!DOMEO_NS!_agents.@type\", \"foafx:Person\", 0, 10,\n\t\t// dp);\n\n\t\t// Test: Phrase query\n\t\tr = phraseQuery(\"dct_!DOMEO_NS!_description\", \"created automatically\",\n\t\t\t\t0, 10, false, dp3);\n\n\t\t// Test: Delete a document\n\t\t// r = deleteDocument(\"7TdnuBsjTjWaTcbW7RVP3Q\");\n\n\t\t// Test: Generic boolean query: 4 fields (3 keyword fields, 1 parsed\n\t\t// field)\n\n\t\tString[] fields = { \"ao_!DOMEO_NS!_item.@type\",\n\t\t\t\t\"ao_!DOMEO_NS!_item.@id\",\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_body.@type\",\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_body.cnt_!DOMEO_NS!_chars\" };\n\t\tString[] vals = { \"ao:Highlight\",\n\t\t\t\t\"urn:domeoclient:uuid:D3062173-8E53-41E9-9248-F0B8A7F65E5B\",\n\t\t\t\t\"cnt:ContentAsText\", \"paolo\" };\n\t\tString[] parsed = { \"term\", \"term\", \"term\", \"match\" };\n\t\tr = booleanQueryMultipleFields(fields, vals, parsed, \"and\", 0, 10,\n\t\t\t\tfalse, dp3);\n\n\t\t// Test: Single field boolean query\n\t\tr = booleanQuerySingleParsedField(\n\t\t\t\t\"ao_!DOMEO_NS!_item.ao_!DOMEO_NS!_context.ao_!DOMEO_NS!_hasSelector.ao_!DOMEO_NS!_suffix\",\n\t\t\t\t\"formal biomedical ontologies\", \"or\", 0, 10, false, null);\n\n\t\t// Test: Retrieve a single doc by id\n\t\tr = getDocument(\"aviMdI48QkSGOhQL6ncMZw\", false, null);\n\n\t\t// Test: insert a document, return it's auto-assigned id\n\t\tdoc = \"{ \\\"f1\\\" : \\\"field value one\\\", \\\"f2\\\" : \\\"field value two\\\" }\";\n\t\tr = insertDocument(doc);\n\n\t\t// Test: insert a doc with specified id (replace if already present)\n\t\tdoc = \"{ \\\"f1\\\" : \\\"field value one\\\", \\\"f2\\\" : \\\"field value two\\\" }\";\n\t\tr = insertDocument(doc, \"5\");\n\t\tSystem.out.println(r);\n\n\t\t// Test: insert json document and try to remove it\n\t\tdoc = readSampleJsonDoc(\"/temp/sample_domeo_doc.json\");\n\t\tSystem.out.println(doc);\n\t\tr = insertDocument(doc);\n\t}", "Query query();", "@Test\n public void example10 () throws Exception {\n ValueFactory f = repo.getValueFactory();\n String exns = \"http://example.org/people/\";\n URI alice = f.createURI(exns, \"alice\");\n URI bob = f.createURI(exns, \"bob\");\n URI ted = f.createURI(exns, \"ted\"); \n URI person = f.createURI(\"http://example.org/ontology/Person\");\n URI name = f.createURI(\"http://example.org/ontology/name\");\n Literal alicesName = f.createLiteral(\"Alice\");\n Literal bobsName = f.createLiteral(\"Bob\");\n Literal tedsName = f.createLiteral(\"Ted\"); \n URI context1 = f.createURI(exns, \"cxt1\"); \n URI context2 = f.createURI(exns, \"cxt2\"); \n conn.add(alice, RDF.TYPE, person, context1);\n conn.add(alice, name, alicesName, context1);\n conn.add(bob, RDF.TYPE, person, context2);\n conn.add(bob, name, bobsName, context2);\n conn.add(ted, RDF.TYPE, person);\n conn.add(ted, name, tedsName);\n \n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2),\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(conn.getStatements(null, null, null, false)));\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2)\n }),\n statementSet(conn.getStatements(null, null, null, false, context1, context2)));\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2),\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(conn.getStatements(null, null, null, false, null, context2)));\n \n // testing named graph query\n DatasetImpl ds = new DatasetImpl();\n ds.addNamedGraph(context1);\n ds.addNamedGraph(context2);\n TupleQuery tupleQuery = conn.prepareTupleQuery(\n QueryLanguage.SPARQL, \"SELECT ?s ?p ?o ?g WHERE { GRAPH ?g {?s ?p ?o . } }\");\n tupleQuery.setDataset(ds);\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(alice, RDF.TYPE, person, context1),\n new Stmt(alice, name, alicesName, context1),\n new Stmt(bob, RDF.TYPE, person, context2),\n new Stmt(bob, name, bobsName, context2)\n }),\n statementSet(tupleQuery.evaluate()));\n \n ds = new DatasetImpl();\n ds.addDefaultGraph(null);\n tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, \"SELECT ?s ?p ?o WHERE {?s ?p ?o . }\");\n tupleQuery.setDataset(ds);\n assertSetsEqual(\n stmts(new Stmt[] {\n new Stmt(ted, RDF.TYPE, person),\n new Stmt(ted, name, tedsName)\n }),\n statementSet(tupleQuery.evaluate()));\n }", "public void testInsertPredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 10);\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n assertEquals(10,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "@Test\n\tpublic void testPassThroughHandler_SingleSourceQuery() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\"SELECT ?person WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name . }\");\n\t\t\ttq.setBinding(\"name\", l(\"Alan\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\t\t\tAtomicInteger numberOfResults = new AtomicInteger(0);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Expected trace is expected to come from some original repository (e.g. SPARQL) => we explicitly\n\t\t\t\t\t * do not expect QueryResults#report to be the second element (compare test\n\t\t\t\t\t * testPassThroughHandler_MultiSourceQuery)\n\t\t\t\t\t */\n\t\t\t\t\tAssertions.assertNotEquals(QueryResults.class, new Exception().getStackTrace()[1].getClass());\n\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tAssertions.assertEquals(bs.getValue(\"person\"), iri(\"http://example.org/\", \"a\"));\n\t\t\t\t\tnumberOfResults.incrementAndGet();\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t\tAssertions.assertEquals(1, numberOfResults.get());\n\t\t}\n\t}", "@Test\n\tpublic void queryTest(){\n\t\tQueryableRequestSpecification queryableRequestSpecification = SpecificationQuerier.query(requestSpecification);\n\t\tSystem.out.println(\"Printing specification parameters: \" +queryableRequestSpecification.getBaseUri());\n\t}", "@Test\n void testAndFilter() {\n Query q = newQueryFromEncoded(\"?query=trump\" +\n \"&model.type=all\" +\n \"&model.defaultIndex=text\" +\n \"&filter=%2B%28filterattribute%3Afrontpage_US_en-US%29\");\n assertEquals(\"AND text:trump |filterattribute:frontpage_US_en-US\",\n q.getModel().getQueryTree().toString());\n }", "@Test\n public void test() throws Exception {\n\n ModelObjectSearchService.addNoSQLServer(Address.class, new SolrRemoteServiceImpl(\"http://dr.dk\"));\n\n\n\n Address mock = NQL.mock(Address.class);\n NQL.search(mock).search(\n\n NQL.all(\n NQL.has(mock.getArea(), NQL.Comp.LIKE, \"Seb\"),\n NQL.has(\"SebastianRaw\")\n\n )\n\n ).addStats(mock.getZip()).getFirst();\n\n\n// System.out.println(\"inline query: \" + NQL.search(mock).search(mock.getA().getFunnyD(), NQL.Comp.EQUAL, 0.1d).());\n// System.out.println(\"normal query: \" + NQL.search(mock).search(mock.getArea(), NQL.Comp.EQUAL, \"area\").buildQuery());\n }", "private Nodes xPathQuery(String query)\r\n \t{\r\n \t\treturn document.query(query, context);\r\n \t}", "@Test\n public void testPhrase() {\n assertQ(req(\"q\",\"text:now-cow\", \"indent\",\"true\")\n ,\"//*[@numFound='1']\"\n );\n // should generate a query of (now OR cow) and match both docs\n assertQ(req(\"q\",\"text_np:now-cow\", \"indent\",\"true\")\n ,\"//*[@numFound='2']\"\n );\n }", "String query();", "@Test\n public void testSomeToStrings() {\n System.out.println(new JresBoolQuery()\n .must(new JresQueryStringQuery(\"stuff:true\").withDefaultOperator(\"AND\"))\n .should(\n new JresMatchQuery(\"color\", \"orange\"),\n new JresTermQuery(\"key\", \"abc123\")\n )\n .mustNot(new JresDisMaxQuery(\n new JresMatchQuery(\"color\", \"yellow\"),\n new JresMatchQuery(\"color\", \"green\")\n ))\n );\n }", "public static void main(String ...args) {\n Operation myOperation = Operation.alloc(\"http://example/special2\", \"special2\", \"Custom operation\");\n\n // Service endpoint names.\n String queryEndpoint = \"q\";\n String customEndpoint = \"x\";\n\n // Make a DataService with custom named for endpoints.\n // In this example, \"q\" for SPARQL query and \"x\" for our custom extension and no others.\n DatasetGraph dsg = DatasetGraphFactory.createTxnMem();\n DataService dataService = DataService.newBuilder(dsg)\n .addEndpoint(myOperation, customEndpoint)\n .addEndpoint(Operation.Query, queryEndpoint)\n .build();\n\n // This will be the code to handled for the operation.\n ActionService customHandler = new DemoService();\n\n FusekiServer server =\n FusekiServer.create().port(PORT)\n .verbose(true)\n // Register the new operation, and it's handler\n .registerOperation(myOperation, customHandler)\n\n // The DataService.\n .add(DATASET, dataService)\n\n // And build the server.\n .build();\n\n server.start();\n\n // Try some operations on the server using the service URL.\n String customOperationURL = SERVER_URL + DATASET + \"/\" + customEndpoint;\n String queryOperationURL = SERVER_URL + DATASET + \"/\" + queryEndpoint;\n\n Query query = QueryFactory.create(\"ASK{}\");\n\n try {\n\n // Try custom name - OK\n try ( QueryExecution qExec = QueryExecution.service(queryOperationURL, query) ) {\n qExec.execAsk();\n }\n\n // Try the usual default name, which is not configured in the DataService so expect a 404.\n try ( QueryExecution qExec = QueryExecution.service(SERVER_URL + DATASET + \"/sparql\", query) ) {\n qExec.execAsk();\n throw new RuntimeException(\"Didn't fail\");\n } catch (QueryExceptionHTTP ex) {\n if ( ex.getStatusCode() != HttpSC.NOT_FOUND_404 ) {\n throw new RuntimeException(\"Not a 404\", ex);\n }\n }\n\n // Make an HTTP GET to the custom operation.\n // Service endpoint name : GET\n String s1 = HttpOp.httpGetString(customOperationURL);\n if ( s1 == null )\n throw new RuntimeException(\"Failed: \"+customOperationURL);\n\n } finally {\n server.stop();\n }\n }", "@Test\n public void testParseInput() {\n LOGGER.info(\"parseInput\");\n rdfEntityManager = new RDFEntityManager();\n LOGGER.info(\"oneTimeSetup\");\n CacheInitializer.initializeCaches();\n DistributedRepositoryManager.addRepositoryPath(\n \"InferenceRules\",\n System.getenv(\"REPOSITORIES_TMPFS\") + \"/InferenceRules\");\n DistributedRepositoryManager.clearNamedRepository(\"InferenceRules\");\n try {\n final File unitTestRulesPath = new File(\"data/test-rules-1.rule\");\n bufferedInputStream = new BufferedInputStream(new FileInputStream(unitTestRulesPath));\n LOGGER.info(\"processing input: \" + unitTestRulesPath);\n } catch (final FileNotFoundException ex) {\n throw new TexaiException(ex);\n }\n ruleParser = new RuleParser(bufferedInputStream);\n ruleParser.initialize(rdfEntityManager);\n final URI variableURI = new URIImpl(Constants.TEXAI_NAMESPACE + \"?test\");\n assertEquals(\"http://texai.org/texai/?test\", variableURI.toString());\n assertEquals(\"?test\", RDFUtility.formatURIAsTurtle(variableURI));\n List<Rule> rules;\n try {\n rules = ruleParser.Rules();\n for (final Rule rule : rules) {\n LOGGER.info(\"rule: \" + rule.toString());\n rule.cascadePersist(rdfEntityManager, null);\n }\n } catch (ParseException ex) {\n LOGGER.info(StringUtils.getStackTraceAsString(ex));\n fail(ex.getMessage());\n }\n Iterator<Rule> rules_iter = rdfEntityManager.rdfEntityIterator(\n Rule.class,\n null); // overrideContext\n while (rules_iter.hasNext()) {\n final Rule loadedRule = rules_iter.next();\n assertNotNull(loadedRule);\n\n // (\n // description \"if there is a room then it is likely that a table is in the room\"\n // context: texai:InferenceRuleTestContext\n // if:\n // ?situation-localized rdf:type cyc:Situation-Localized .\n // ?room rdf:type cyc:RoomInAConstruction .\n // ?situation-localized cyc:situationConstituents ?room .\n // then:\n // _:in-completely-situation-localized rdf:type texai:InCompletelySituationLocalized .\n // ?situation-localized texai:likelySubSituations _:in-completely-situation-localized .\n // _:table rdf:type cyc:Table_PieceOfFurniture .\n // _:table texai:in-ContCompletely ?room .\n // )\n\n assertEquals(\"(\\ndescription \\\"if there is a room then it is likely that a table is in the room\\\"\\ncontext: texai:InferenceRuleTestContext\\nif:\\n ?situation-localized rdf:type cyc:Situation-Localized .\\n ?room rdf:type cyc:RoomInAConstruction .\\n ?situation-localized cyc:situationConstituents ?room .\\nthen:\\n _:in-completely-situation-localized rdf:type texai:InCompletelySituationLocalized .\\n ?situation-localized texai:likelySubSituations _:in-completely-situation-localized .\\n _:table rdf:type cyc:Table_PieceOfFurniture .\\n _:table texai:in-ContCompletely ?room .\\n)\", loadedRule.toString());\n LOGGER.info(\"loadedRule:\\n\" + loadedRule);\n }\n CacheManager.getInstance().shutdown();\n try {\n if (bufferedInputStream != null) {\n bufferedInputStream.close();\n }\n } catch (final Exception ex) {\n LOGGER.info(StringUtils.getStackTraceAsString(ex));\n }\n rdfEntityManager.close();\n DistributedRepositoryManager.shutDown();\n }", "@Test\n\tpublic void testQueryTypes() {\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\t\t// QueryType\n\t\tfinal IntrospectionFullType queryType = getFullType(introspection, schemaConfig.getQueryTypeName());\n\t\t// - check all queries are available\n\t\tfinal List<String> queryNames = new ArrayList<>();\n\t\tArrays.asList(Entity1.class, Entity2.class, Entity3.class, Entity4.class).stream().forEach(clazz -> {\n\t\t\tqueryNames.add(schemaConfig.getQueryGetByIdPrefix() + clazz.getSimpleName());\n\t\t\tqueryNames.add(schemaConfig.getQueryGetListPrefix() + clazz.getSimpleName());\n\t\t});\n\t\tqueryNames.forEach(queryName -> Assert.assertTrue(queryType.getFields().stream()\n\t\t\t\t.map(IntrospectionTypeField::getName).collect(Collectors.toList()).contains(queryName)));\n\n\t\t// - check one 'getSingle' query (other ones are built the same way)\n\t\tfinal IntrospectionTypeField getEntity1 = assertField(queryType, queryNames.get(0),\n\t\t\t\tIntrospectionTypeKindEnum.OBJECT, Entity1.class);\n\t\tAssert.assertEquals(1, getEntity1.getArgs().size());\n\t\tassertArg(getEntity1, \"id\", IntrospectionTypeKindEnum.NON_NULL, IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLID.getName());\n\n\t\t// - check one 'getAll' query (other ones are built the same way)\n\t\tfinal IntrospectionTypeField getAllEntity1 = assertField(queryType, queryNames.get(1),\n\t\t\t\tIntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, getAllEntity1.getArgs().size());\n\t\tassertArg(getAllEntity1, schemaConfig.getQueryGetListFilterAttributeName(),\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListFilterEntityTypeNameSuffix());\n\t\tassertArg(getAllEntity1, schemaConfig.getQueryGetListPagingAttributeName(),\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT, getPagingInputTypeName());\n\t\tassertArg(getAllEntity1, schemaConfig.getQueryGetListFilterAttributeOrderByName(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.INPUT_OBJECT, getOrderByInputTypeName());\n\t}", "private InputStream runSparqlQuery(String query) throws IOException {\n\t\ttry {\n\t\t\tString queryString = \"query=\" + URLEncoder.encode(query, \"UTF-8\")\n\t\t\t\t\t+ \"&format=json\";\n\t\t\tURL url = new URL(\"https://query.wikidata.org/sparql?\"\n\t\t\t\t\t+ queryString);\n\t\t\tHttpURLConnection connection = (HttpURLConnection) url\n\t\t\t\t\t.openConnection();\n\t\t\tconnection.setRequestMethod(\"GET\");\n\n\t\t\treturn connection.getInputStream();\n\t\t} catch (UnsupportedEncodingException | MalformedURLException e) {\n\t\t\tthrow new RuntimeException(e.getMessage(), e);\n\t\t}\n\t}", "public abstract String createQuery();", "public void queryData() throws SolrServerException {\n\t\tfinal SolrQuery query = new SolrQuery(\"*:*\");\r\n\t\tquery.setRows(2000);\r\n\t\t// 5. Executes the query\r\n\t\tfinal QueryResponse response = client.query(query);\r\n\r\n\t\t/*\t\tassertEquals(1, response.getResults().getNumFound());*/\r\n\r\n\t\t// 6. Gets the (output) Data Transfer Object.\r\n\t\t\r\n\t\t\r\n\t\r\n\t\tif (response.getResults().iterator().hasNext())\r\n\t\t{\r\n\t\t\tfinal SolrDocument output = response.getResults().iterator().next();\r\n\t\t\tfinal String from = (String) output.getFieldValue(\"from\");\r\n\t\t\tfinal String to = (String) output.getFieldValue(\"to\");\r\n\t\t\tfinal String body = (String) output.getFieldValue(\"body\");\r\n\t\t\t// 7.1 In case we are running as a Java application print out the query results.\r\n\t\t\tSystem.out.println(\"It works! I found the following book: \");\r\n\t\t\tSystem.out.println(\"--------------------------------------\");\r\n\t\t\tSystem.out.println(\"ID: \" + from);\r\n\t\t\tSystem.out.println(\"Title: \" + to);\r\n\t\t\tSystem.out.println(\"Author: \" + body);\r\n\t\t}\r\n\t\t\r\n\t\tSolrDocumentList list = response.getResults();\r\n\t\tSystem.out.println(\"list size is: \" + list.size());\r\n\r\n\r\n\r\n\t\t/*\t\t// 7. Otherwise asserts the query results using standard JUnit procedures.\r\n\t\tassertEquals(\"1\", id);\r\n\t\tassertEquals(\"Apache SOLR Essentials\", title);\r\n\t\tassertEquals(\"Andrea Gazzarini\", author);\r\n\t\tassertEquals(\"972-2-5A619-12A-X\", isbn);*/\r\n\t}", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query);", "@Test\n public void testQuery() throws Exception {\n StatefulKnowledgeSession session = getKbase().newStatefulKnowledgeSession();\n \n initializeTemplate(session);\n \n List<Person> persons = new ArrayList<Person>();\n persons.add(new Person(\"john\", \"john\", 25));\n persons.add(new Person(\"sarah\", \"john\", 35));\n \n session.execute(CommandFactory.newInsertElements(persons));\n assertEquals(2, session.getFactCount());\n \n QueryResults results = query(\"people over the age of x\", new Object[] {30});\n assertNotNull(results);\n }", "private void runQuery(QueryTerm qt, String name) {\n\t\tqt.setInferred(false);\n\t\tRDFQuery q = new RDFQuery(qt);\n\t\tSystem.out.println(\"=== \"+name+\" ===\\n* OBD Query:\\n \"+qt);\n\t\tSystem.out.println(\"\\n* Autogenerated SPARQL:\\n \"+q.toSPARQL()+\"\\n\\n\");\n\t\tfor (Node n : this.shard.getNodesByQuery(qt)){\n\t\t\tSystem.out.println(\"Node: \" + n.toString());\n\t\t}\n\t\n\t}", "@Override\n public final InputStream dereference(String uri, String contentType) throws IOException {\n if(uri==null){\n return null;\n }\n UriRef reference = new UriRef(uri);\n StringBuilder query = new StringBuilder();\n query.append(\"CONSTRUCT { \");\n query.append(reference);\n query.append(\" ?p ?o } WHERE { \");\n query.append(reference);\n query.append(\" ?p ?o }\");\n\n //String format = SupportedFormat.RDF_XML;\n return SparqlEndpointUtils.sendSparqlRequest(getAccessUri(),query.toString(),contentType);\n }", "IQuery getQuery();", "@Test\n public void test_singleRetrieve_withParens_ParamQuery() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"(samaccountname=mary.olowu)\");\n request.setParameters(parameters);\n\n Map<String, Object> recordMap = null;\n BridgeError unexpectedError = null;\n try {\n Record record = getAdapter().retrieve(request);\n recordMap = record.getRecord();\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertNotNull(recordMap);\n }", "private QueryResults query(String queryName, Object[] args) {\n Command command = CommandFactory.newQuery(\"persons\", queryName, args);\n String queryStr = template.requestBody(\"direct:marshall\", command, String.class);\n\n String json = template.requestBody(\"direct:test-session\", queryStr, String.class);\n ExecutionResults res = (ExecutionResults) template.requestBody(\"direct:unmarshall\", json);\n return (QueryResults) res.getValue(\"persons\");\n }", "@Test\n public void testQueries() {\n nuxeoClient.repository().createDocumentById(testWorkspaceId, new Document(\"file1\", \"File\"));\n nuxeoClient.repository().createDocumentById(testWorkspaceId, new Document(\"file2\", \"File\"));\n\n // Get descendants of Workspaces\n String query = \"select * from Document where ecm:path startswith '/default-domain/workspaces'\";\n Documents documents = nuxeoClient.repository().query(query, \"10\", \"0\", \"50\", \"ecm:path\", \"asc\", null);\n assertEquals(3, documents.size());\n\n // Get all the File documents\n // TODO\n\n // Content of a given Folder, using a page provider\n // TODO\n }", "@Test\n public void testSyntax() throws Exception {\n assertJQ(req(\"q\",\"*\", \"df\",\"doesnotexist_s\")\n ,\"/response/docs/[0]==\" // make sure we get something...\n );\n assertJQ(req(\"q\",\"doesnotexist_s:*\")\n ,\"/response/numFound==0\" // nothing should be found\n );\n assertJQ(req(\"q\",\"doesnotexist_s:( * * * )\")\n ,\"/response/numFound==0\" // nothing should be found\n );\n\n // length of date math caused issues...\n assertJQ(req(\"q\",\"foo_dt:\\\"2013-03-08T00:46:15Z/DAY+000MILLISECONDS+00SECONDS+00MINUTES+00HOURS+0000000000YEARS+6MONTHS+3DAYS\\\"\", \"debug\",\"query\")\n ,\"/debug/parsedquery=='foo_dt:2013-09-11T00:00:00Z'\"\n );\n }", "@Test\n public void testCorrectAllWithFilterDateAndFindBy()\n throws IOException {\n Client client = Client.create(new DefaultClientConfig());\n WebResource service = client.resource(getBaseURI()\n + \"PhotoAlbum04/\");\n String response = service.path(\"search\")\n .queryParam(\"type\", \"all\")\n .queryParam(\"findBy\", \"name\")\n .queryParam(\"keywords\", \"evento\")\n .queryParam(\"orderBy\", \"date\")\n .queryParam(\"dateFirst\", \"01/11/2012\")\n .queryParam(\"dateEnd\", \"02/11/2012\")\n .get(String.class);\n assertFalse(\"Assert error failed\",\n response.contains(\"Url syntax error\"));\n\n assertTrue(\"Assert file-dtos failed\",\n response.contains(\"File: Search with all parameters\"));\n assertTrue(\n \"Assert album-dtos failed\",\n response.contains(\"Album: Search with all parameters\"));\n }", "@Test\n public void test_singleRetrieve_withoutParens_ParamQuery() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n request.setParameters(parameters);\n\n Map<String, Object> recordMap = null;\n BridgeError expectedError = null;\n try {\n Record record = getAdapter().retrieve(request);\n } catch (BridgeError e) {\n expectedError = e;\n }\n\n assertNotNull(expectedError);\n }", "@Test\n public void queryTest() {\n // TODO: test query\n }", "public Query queryRule(String rule, Object... args) throws Exceptions.OsoException {\n Host new_host = host.clone();\n String pred = new_host.toPolarTerm(new Predicate(rule, Arrays.asList(args))).toString();\n return new Query(ffiPolar.newQueryFromTerm(pred), new_host);\n }", "public interface SPARQLService {\n // TODO: Create methods for at least CRUD \n}", "public static void querying(String constructQuery2) {\n\t\t//construct the new query\n\t\t//String constructQuery2 = prefix+\" \"+select+\" \"+selectValues+\" \"+where+openBracket+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket;\n\t\t//constructQuery2 = constructQuery2+\" UNION \"+\" \"+openBracket+\" \"+local+\" \"+service+\" \"+openBracket+\" \"+remote+\" \"+closeBracket+closeBracket+closeBracket;\n\t\t\n\t\tSystem.out.println(constructQuery2);\n\t\tQuery query2 = QueryFactory.create(constructQuery2);\n\t\tQueryExecution qe2 = QueryExecutionFactory.sparqlService(\n\t\t\t\t\"http://localhost:3030/USNA/query\", query2);\n\t\t\n\t\tResultSet results1 = qe2.execSelect();\n\t\tif(constantOutput == \"\") {\n\t\t\tResultSetFormatter.out(System.out, results1);\n\t\t}else {\n\t\t\tString NS = \"http://www.usna.org/ns#\";\n\t\t\tModel rdfssExample = ModelFactory.createDefaultModel();\n\t\t\tString [] constant = constantOutput.trim().split(\" \");\n\t\t\t\n\t\t\tString [] headers = selectValues.split(\" \");\n\t\t System.out.println(\"--------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tfor(int i = 0; i< headers.length; i++) {\n\t\t\t\t//System.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t\tSystem.out.print(headers[i].substring(1,headers[i].length()).trim()+\"\\t\\t\\t\\t\\t\\t\");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"----------------------------------------------------------------------------------------------------------------------------------------------\");\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\ttry {\n\t\t\t\t int count = 0;\n\t\t while ( results1.hasNext() ) {\n\t\t \t //Resource Response = rdfssExample.createResource(NS+constant[count]);\n\t\t \t \n\t\t QuerySolution soln = results1.nextSolution();\n\t\t Resource first = soln.getResource(headers[0].substring(1,headers[0].length()).trim());\n\t\t //Resource second = soln.getResource(headers[1].substring(1,headers[1].length()).trim());\n\t\t //Resource third = soln.getResource(headers[2].substring(1,headers[2].length()).trim());\n\t\t //Resource fourth = soln.getResource(headers[3].substring(1,headers[3].length()).trim());\n\t\t for(int i=0; i< constant.length; i++) {\n\t\t \t Resource Response = rdfssExample.createResource(NS+constant[i]);\n\t\t \t System.out.format(\"%10s %50s\",first, Response);\n\t\t \t System.out.println();\n\t\t\t\t\t //count++;\n\t\t }\n\t\t //System.out.format(\"%10s %50s\",first, Response);\n\t\t //System.out.format(\"%10s\",first);\n\t\t\t\t System.out.println();\n\t\t\t\t //count++;\n\t\t\t\t \n\t\t\t\t //System.out.println(count);\n\t\t \n\t\t }\n\t\t } finally {\n\t\t \t qe2.close();\n\t\t}\n\t\t\t \n\t\t}\t\t \n\t}", "@Test\n void testAndFilterWithoutExplicitIndex() {\n Query q = newQueryFromEncoded(\"?query=trump\" +\n \"&model.type=all\" +\n \"&model.defaultIndex=text\" +\n \"&filter=%2B%28filterTerm%29\");\n assertEquals(\"AND text:trump |text:filterTerm\",\n q.getModel().getQueryTree().toString());\n }", "public void test_sf_945436() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <C rdf:ID='x'>\" +\n \" <rdfs:label xml:lang=''>a_label</rdfs:label>\" +\n \" </C>\" +\n \" <owl:Class rdf:ID='C'>\" +\n \" </owl:Class>\" +\n \"</rdf:RDF>\";\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n m.read( new StringReader( SOURCE ), null );\n Individual x = m.getIndividual( \"http://jena.hpl.hp.com/test#x\" );\n assertEquals( \"Label on resource x\", \"a_label\", x.getLabel( null) );\n assertEquals( \"Label on resource x\", \"a_label\", x.getLabel( \"\" ) );\n assertSame( \"fr label on resource x\", null, x.getLabel( \"fr\" ) );\n }", "Query queryOn(Connection connection);", "public void test_der_02() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <owl:ObjectProperty rdf:ID='hasPublications'>\" +\n \" <rdfs:domain>\" +\n \" <owl:Class>\" +\n \" <owl:unionOf rdf:parseType='Collection'>\" +\n \" <owl:Class rdf:about='#Project'/>\" +\n \" <owl:Class rdf:about='#Task'/>\" +\n \" </owl:unionOf>\" +\n \" </owl:Class>\" +\n \" </rdfs:domain>\" +\n \" <rdfs:domain rdf:resource='#Dummy' />\" +\n \" <rdfs:range rdf:resource='#Publications'/>\" +\n \" </owl:ObjectProperty>\" +\n \" <owl:Class rdf:ID='Dummy'>\" +\n \" </owl:Class>\" +\n \"</rdf:RDF>\";\n String NS = \"http://jena.hpl.hp.com/test#\";\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.read(new ByteArrayInputStream( SOURCE.getBytes()), NS );\n \n OntClass dummy = m.getOntClass( NS + \"Dummy\" );\n // assert commented out - bug not accepted -ijd\n //TestUtil.assertIteratorValues( this, dummy.listDeclaredProperties(), \n // new Object[] {m.getObjectProperty( NS+\"hasPublications\")} );\n }", "private static List<Supplier> createSupplierData(ConsumerQuery query, boolean testing) {\n\t\tRepository repository;\n\t\t\n\t\t//use name of processes in query to retrieve subset of relevant supplier data from semantic infrastructure\n\t\tList<String> processNames = new ArrayList<String>();\t\n\n\t\tif (query.getProcesses() == null || query.getProcesses().isEmpty()) {\n\t\t\tSystem.err.println(\"There are no processes specified!\");\n\t\t} else {\n\t\t\n\t\tfor (Process process : query.getProcesses()) {\n\t\t\tprocessNames.add(process.getName());\n\t\t}\n\t\t}\n\t\t\t\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\n\t\tif (testing == false) {\n\n\t\t\tMap<String, String> headers = new HashMap<String, String>();\n\t\t\theaders.put(\"Authorization\", AUTHORISATION_TOKEN);\n\t\t\theaders.put(\"accept\", \"application/JSON\");\n\n\t\t\trepository = new SPARQLRepository(SPARQL_ENDPOINT );\n\n\t\t\trepository.initialize();\n\t\t\t((SPARQLRepository) repository).setAdditionalHttpHeaders(headers);\n\n\t\t} else {\n\n\t\t\t//connect to GraphDB\n\t\t\trepository = new HTTPRepository(GRAPHDB_SERVER, REPOSITORY_ID);\n\t\t\trepository.initialize();\n\t\t}\n\t\t\n\t\t//creates a SPARQL query that is run against the Semantic Infrastructure\n\t\tString strQuery = SparqlQuery.createQueryMVP(processNames);\n\t\t\n\t\t//System.out.println(strQuery);\n\n\t\t//open connection to GraphDB and run SPARQL query\n\t\tSet<SparqlRecord> recordSet = new HashSet<SparqlRecord>();\n\t\tSparqlRecord record;\n\t\ttry(RepositoryConnection conn = repository.getConnection()) {\n\n\t\t\tTupleQuery tupleQuery = conn.prepareTupleQuery(QueryLanguage.SPARQL, strQuery);\t\t\n\n\t\t\t//if querying the local KB, we need to set setIncludeInferred to false, otherwise inference will include irrelevant results.\n\t\t\t//when querying the Semantic Infrastructure the non-inference is set in the http parameters.\n\t\t\tif (testing == true) {\n\t\t\t\t//do not include inferred statements from the KB\n\t\t\t\ttupleQuery.setIncludeInferred(false);\n\t\t\t}\n\n\t\t\ttry (TupleQueryResult result = tupleQuery.evaluate()) {\t\t\t\n\n\t\t\t\twhile (result.hasNext()) {\n\n\t\t\t\t\tBindingSet solution = result.next();\n\n\t\t\t\t\t//omit the NamedIndividual types from the query result\n\t\t\t\t\tif (!solution.getValue(\"processType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")\n\t\t\t\t\t\t\t&& !solution.getValue(\"certificationType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")\n\t\t\t\t\t\t\t&& !solution.getValue(\"materialType\").stringValue().equals(\"http://www.w3.org/2002/07/owl#NamedIndividual\")) {\n\n\t\t\t\t\t\trecord = new SparqlRecord();\n\t\t\t\t\t\trecord.setSupplierId(solution.getValue(\"supplierId\").stringValue().replaceAll(\"\\\\s+\",\"\"));\n\t\t\t\t\t\trecord.setProcess(stripIRI(solution.getValue(\"processType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\t\t\t\t\t\trecord.setMaterial(stripIRI(solution.getValue(\"materialType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\t\t\t\t\t\trecord.setCertification(stripIRI(solution.getValue(\"certificationType\").stringValue().replaceAll(\"\\\\s+\",\"\")));\n\n\t\t\t\t\t\trecordSet.add(record);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}\tcatch (Exception e) {\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\tSystem.err.println(\"Wrong test data!\");\n\t\t\t}\n\t\t\t\n\n\t\t\t\n\n\t\t}\n\n\t\t//close connection to KB repository\n\t\trepository.shutDown();\n\n\t\tlong stopTime = System.currentTimeMillis();\n\t\tlong elapsedTime = stopTime - startTime;\n\n\t\tif (testing == true ) {\n\t\tSystem.out.println(\"The SPARQL querying process took \" + elapsedTime/1000 + \" seconds.\");\n\t\t}\n\n\t\t//get unique supplier ids used for constructing the supplier structure below\n\t\tSet<String> supplierIds = new HashSet<String>();\n\t\tfor (SparqlRecord sr : recordSet) {\n\t\t\tsupplierIds.add(sr.getSupplierId());\n\t\t}\n\n\t\tCertification certification = null;\n\t\tSupplier supplier = null;\n\t\tList<Supplier> suppliersList = new ArrayList<Supplier>();\n\n\t\t//create a map of processes and materials relevant for each supplier\n\t\tMap<String, SetMultimap<Object, Object>> multimap = new HashMap<String, SetMultimap<Object, Object>>();\n\n\t\tfor (String id : supplierIds) {\n\t\t\tSetMultimap<Object, Object> map = HashMultimap.create();\n\n\t\t\tString supplierID = null;\n\n\t\t\tfor (SparqlRecord sr : recordSet) {\n\n\t\t\t\tif (sr.getSupplierId().equals(id)) {\n\n\t\t\t\t\tmap.put(sr.getProcess(), sr.getMaterial());\n\n\t\t\t\t\tsupplierID = sr.getSupplierId();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tmultimap.put(supplierID, map);\n\t\t}\t\t\n\n\t\tProcess process = null;\n\n\t\t//create supplier objects (supplier id, processes (including materials) and certifications) based on the multimap created in the previous step\n\t\tfor (String id : supplierIds) {\n\t\t\tSetMultimap<Object, Object> processAndMaterialMap = null;\n\n\t\t\tList<Certification> certifications = new ArrayList<Certification>();\n\t\t\tList<Process> processes = new ArrayList<Process>();\t\t\n\n\t\t\tfor (SparqlRecord sr : recordSet) {\n\n\t\t\t\tif (sr.getSupplierId().equals(id)) {\n\n\t\t\t\t\t//add certifications\n\t\t\t\t\tcertification = new Certification(sr.getCertification());\n\t\t\t\t\tif (!certifications.contains(certification)) {\n\t\t\t\t\t\tcertifications.add(certification);\n\t\t\t\t\t}\n\n\t\t\t\t\t//add processes and associated materials\n\t\t\t\t\tprocessAndMaterialMap = multimap.get(sr.getSupplierId());\n\n\t\t\t\t\tString processName = null;\n\n\t\t\t\t\tSet<Object> list = new HashSet<Object>();\n\n\t\t\t\t\t//iterate processAndMaterialMap and extract process and relevant materials for that process\n\t\t\t\t\tfor (Entry<Object, Collection<Object>> e : processAndMaterialMap.asMap().entrySet()) {\n\n\t\t\t\t\t\tSet<Material> materialsSet = new HashSet<Material>();\n\n\t\t\t\t\t\t//get list/set of materials\n\t\t\t\t\t\tlist = new HashSet<>(e.getValue());\n\n\t\t\t\t\t\t//transform to Set<Material>\n\t\t\t\t\t\tfor (Object o : list) {\n\t\t\t\t\t\t\tmaterialsSet.add(new Material((String)o));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tprocessName = (String) e.getKey();\n\n\t\t\t\t\t\t//add relevant set of materials together with process name\n\t\t\t\t\t\tprocess = new Process(processName, materialsSet);\n\n\t\t\t\t\t\t//add processes\n\t\t\t\t\t\tif (!processes.contains(process)) {\n\t\t\t\t\t\t\tprocesses.add(process);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\tsupplier = new Supplier(id, processes, certifications );\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsuppliersList.add(supplier);\n\t\t}\n\n\t\treturn suppliersList;\n\n\t}", "public abstract Statement queryToRetrieveData();", "public QueryMatches interpret(ITMQLRuntime runtime, IContext context, IExpressionInterpreter<?> caller);", "@Test\n public void testCorrectAlbumWithFilterDateAndFindBy()\n throws IOException {\n Client client = Client.create(new DefaultClientConfig());\n WebResource service = client.resource(getBaseURI()\n + \"PhotoAlbum04/\");\n String response = service.path(\"search\")\n .queryParam(\"type\", \"album\")\n .queryParam(\"findBy\", \"name\")\n .queryParam(\"keywords\", \"evento\")\n .queryParam(\"orderBy\", \"date\")\n .queryParam(\"dateFirst\", \"01/11/2012\")\n .queryParam(\"dateEnd\", \"02/11/2012\")\n .get(String.class);\n assertFalse(\"Assert error failed\",\n response.contains(\"Url syntax error\"));\n assertFalse(\"Assert file-dtos error failed\",\n response.contains(\"file-dtos\"));\n\n assertTrue(\n \"Assert album-dtos failed\",\n response.contains(\"Album: Search with all parameters\"));\n }", "@Test\n public void testFromFollowedByQuery() throws Exception {\n final String text = \"rule X when Cheese() from $cheesery ?person( \\\"Mark\\\", 42; ) then end\";\n RuleDescr rule = ((RuleDescr) (parse(\"rule\", text)));\n TestCase.assertFalse(parser.getErrors().toString(), parser.hasErrors());\n PatternDescr pattern = ((PatternDescr) (getDescrs().get(0)));\n TestCase.assertEquals(\"Cheese\", pattern.getObjectType());\n TestCase.assertEquals(\"from $cheesery\", pattern.getSource().getText());\n TestCase.assertFalse(pattern.isQuery());\n pattern = ((PatternDescr) (getDescrs().get(1)));\n TestCase.assertEquals(\"person\", pattern.getObjectType());\n TestCase.assertTrue(pattern.isQuery());\n }", "public long query(Date timestamp, String user, String hostname, Long referral, String questionText, InputMode mode);", "@Override\r\n\tprotected boolean remoteQuery(String qstr) {\r\n\t\tif (queryBk.getPublishYear() == null || queryBk.getPublishYear().equals(\"\")) {\r\n\t\t\tif (queryBk.getPublisher() == null || queryBk.getPublisher().equals(\"\")) {\r\n\t\t\t\tif (queryBk.parseEdition() == -1 && queryBk.parseVolume() == -1) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t} // end if\r\n\t\t\t} // end if\r\n\t\t} // end if\r\n\r\n\t\tDocumentBuilderFactory f;\r\n\t\tDocumentBuilder b;\r\n\t\tDocument doc;\r\n\t\ttry {\r\n\t\t\tf = DocumentBuilderFactory.newInstance();\r\n\t\t\tb = f.newDocumentBuilder();\r\n\t\t\tURL url = new URL(Config.PRIMO_X_BASE + qstr);\r\n\r\n\t\t\tURLConnection con = url.openConnection();\r\n\t\t\tcon.setConnectTimeout(3000);\r\n\t\t\tdoc = b.parse(con.getInputStream());\r\n\t\t\tqueryStr = Config.PRIMO_X_BASE + qstr;\r\n\t\t\tdebug += queryStr + \"\\n\";\r\n\r\n\t\t\tnodesRecord = doc.getElementsByTagName(\"record\");\r\n\r\n\t\t\t/*\r\n\t\t\t * After fetched a XML doc, store necessary tags from the XMLs for further\r\n\t\t\t * matching.\r\n\t\t\t */\r\n\r\n\t\t\tfor (int i = 0; i < nodesRecord.getLength(); i++) {\r\n\t\t\t\tnodesControl = doc.getElementsByTagName(\"control\").item(i).getChildNodes();\r\n\t\t\t\tnodesDisplay = doc.getElementsByTagName(\"display\").item(i).getChildNodes();\r\n\t\t\t\tnodesLink = doc.getElementsByTagName(\"links\").item(i).getChildNodes();\r\n\t\t\t\tnodesSearch = doc.getElementsByTagName(\"search\").item(i).getChildNodes();\r\n\t\t\t\tnodesDelivery = doc.getElementsByTagName(\"delivery\").item(i).getChildNodes();\r\n\t\t\t\tnodesFacet = doc.getElementsByTagName(\"facets\").item(i).getChildNodes();\r\n\r\n\t\t\t\t// Return true if the query item is of ISO doc no. and of\r\n\t\t\t\t// published by ISO\r\n\t\t\t\tif (matchIsoPublisher() && matchIsoDocNo()) {\r\n\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} // end if\r\n\r\n\t\t\t\tif (!strHandle.hasSomething(queryBk.getCreator())) {\r\n\t\t\t\t\tif (matchTitle() && matchPublisher() && matchYear()) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} // end if\r\n\t\t\t\t} // end if\r\n\r\n\t\t\t\tif (matchTitle() && matchAuthor()) {\r\n\r\n\t\t\t\t\tif ((matchEdition() && matchPublisher() && matchYear())) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else if (!strHandle.hasSomething(queryBk.getPublisher()) && matchYear()\r\n\t\t\t\t\t\t\t&& strHandle.hasSomething(queryBk.getPublishYear())) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else if (matchEdition() && queryBk.parseEdition() > 1) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * As Primo X-service only shows the first FRBRed record, check the rest records\r\n\t\t\t\t\t\t * involving the same frbrgroupid.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tString frbrid = \"\";\r\n\t\t\t\t\t\tfrbrid = getNodeValue(\"frbrgroupid\", nodesFacet);\r\n\t\t\t\t\t\tString frbr_qstr = qstr + \"&query=facet_frbrgroupid,exact,\" + frbrid;\r\n\t\t\t\t\t\t// System.out.println(\"FRBR:\" + Config.PRIMO_X_BASE +\r\n\t\t\t\t\t\t// frbr_qstr);\r\n\t\t\t\t\t\tDocument doc2 = b.parse(Config.PRIMO_X_BASE + frbr_qstr);\r\n\t\t\t\t\t\tnodesFrbrRecord = doc2.getElementsByTagName(\"record\");\r\n\r\n\t\t\t\t\t\tfor (int j = 0; j < nodesFrbrRecord.getLength(); j++) {\r\n\r\n\t\t\t\t\t\t\tnodesControl = doc2.getElementsByTagName(\"control\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesDisplay = doc2.getElementsByTagName(\"display\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesLink = doc2.getElementsByTagName(\"links\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesSearch = doc2.getElementsByTagName(\"search\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesDelivery = doc2.getElementsByTagName(\"delivery\").item(j).getChildNodes();\r\n\t\t\t\t\t\t\tnodesFacet = doc2.getElementsByTagName(\"facets\").item(j).getChildNodes();\r\n\r\n\t\t\t\t\t\t\tif (!strHandle.hasSomething(queryBk.getPublishYear()) && queryBk.parseEdition() == -1\r\n\t\t\t\t\t\t\t\t\t&& !strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t} // end if\r\n\r\n\t\t\t\t\t\t\tif (matchEdition() && matchTitle() && matchAuthor() && matchPublisher() && matchYear()) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t} else if (matchEdition() && matchTitle() && matchAuthor() && matchYear()\r\n\t\t\t\t\t\t\t\t\t&& !strHandle.hasSomething(queryBk.getPublisher())) {\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t} // end if\r\n\t\t\t\t\t\t} // end for\r\n\t\t\t\t\t} // end if\r\n\t\t\t\t} // end if\r\n\t\t\t} // end for\r\n\t\t} // end try\r\n\r\n\t\tcatch (Exception e) {\r\n\t\t\tStringWriter errors = new StringWriter();\r\n\t\t\te.printStackTrace(new PrintWriter(errors));\r\n\t\t\tString errStr = \"PrimoQueryByNonISBN:remoteQuery()\" + errors.toString();\r\n\t\t\tSystem.out.println(errStr);\r\n\t\t\terrMsg = errStr;\r\n\t\t} // end catch\r\n\t\treturn false;\r\n\t}", "public void testDeletePredicate() {\n part.insertPredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 10);\n part.deletePredicate(\"<http://dbpedia.org/ontology/deathPlace>\", 5);\n\n WebResource endpoint = part.getService();\n String checkquery= \"SELECT (COUNT(*) as ?no) \"\n + \"{?s <http://dbpedia.org/ontology/deathPlace> ?o }\";\n\n assertEquals(5,\n Integer.parseInt(\n endpoint.path(\"sparql\").queryParam(\"query\", checkquery)\n\t\t\t .accept(\"application/sparql-results+csv\")\n\t\t\t .get(String.class).replace(\"no\\n\", \"\").trim()));\n }", "@Test\r\n\tpublic void testPrepareGraphQuery3() throws Exception\r\n\t{\r\n\t\tStatement st1 = vf.createStatement(john, fname, johnfname, dirgraph);\r\n\t\tStatement st2 = vf.createStatement(john, lname, johnlname, dirgraph);\r\n\t\tStatement st3 = vf.createStatement(john, homeTel, johnhomeTel, dirgraph);\r\n\t\tStatement st4 = vf.createStatement(john, email, johnemail, dirgraph);\r\n\t\tStatement st5 = vf.createStatement(micah, fname, micahfname, dirgraph);\r\n\t\tStatement st6 = vf.createStatement(micah, lname, micahlname, dirgraph);\r\n\t\tStatement st7 = vf.createStatement(micah, homeTel, micahhomeTel, dirgraph);\r\n\t\tStatement st8 = vf.createStatement(fei, fname, feifname, dirgraph);\r\n\t\tStatement st9 = vf.createStatement(fei, lname, feilname, dirgraph);\r\n\t\tStatement st10 = vf.createStatement(fei, email, feiemail, dirgraph);\r\n\t\t\r\n\t\r\n\t\ttestWriterCon.add(st1);\r\n\t\ttestWriterCon.add(st2);\r\n\t\ttestWriterCon.add(st3);\r\n\t\ttestWriterCon.add(st4);\r\n\t\ttestWriterCon.add(st5);\r\n\t\ttestWriterCon.add(st6);\r\n\t\ttestWriterCon.add(st7);\r\n\t\ttestWriterCon.add(st8);\r\n\t\ttestWriterCon.add(st9);\r\n\t\ttestWriterCon.add(st10);\r\n\t\t\r\n\t\tAssert.assertTrue(testWriterCon.hasStatement(st1, false));\r\n\t\tAssert.assertFalse(testWriterCon.hasStatement(st1, false, (Resource)null));\r\n\t\tAssert.assertFalse(testWriterCon.hasStatement(st1, false, null));\r\n\t\tAssert.assertTrue(testWriterCon.hasStatement(st1, false, dirgraph));\r\n\t\t\r\n\t\t\r\n\t\tAssert.assertEquals(10, testAdminCon.size(dirgraph));\t\t\r\n\t\t\t\r\n\t\tString query = \" DESCRIBE <http://marklogicsparql.com/addressbook#firstName> \";\r\n\t\tGraphQuery queryObj = testReaderCon.prepareGraphQuery(query);\r\n\t\t\t\r\n\t\tGraphQueryResult result = queryObj.evaluate();\r\n\t\tresult.hasNext();\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(false)));\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testQuery1() {\n\t}", "@Test\n\tpublic void testPassThroughHandler_EmptyResult() throws Exception {\n\t\tprepareTest(Arrays.asList(\"/tests/basic/data01endpoint1.ttl\", \"/tests/basic/data01endpoint2.ttl\"));\n\n\t\ttry (RepositoryConnection conn = fedxRule.getRepository().getConnection()) {\n\n\t\t\t// SELECT query\n\t\t\tTupleQuery tq = conn\n\t\t\t\t\t.prepareTupleQuery(\n\t\t\t\t\t\t\t\"SELECT ?person ?interest WHERE { ?person <http://xmlns.com/foaf/0.1/name> ?name ; <http://xmlns.com/foaf/0.1/interest> ?interest }\");\n\t\t\ttq.setBinding(\"name\", l(\"NotExist\"));\n\n\t\t\tAtomicBoolean started = new AtomicBoolean(false);\n\n\t\t\ttq.evaluate(new AbstractTupleQueryResultHandler() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException {\n\t\t\t\t\tif (started.get()) {\n\t\t\t\t\t\tthrow new IllegalStateException(\"Must not start query result twice.\");\n\t\t\t\t\t}\n\t\t\t\t\tstarted.set(true);\n\n\t\t\t\t\tAssertions.assertEquals(Lists.newArrayList(\"person\", \"interest\"), bindingNames);\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void handleSolution(BindingSet bs) throws TupleQueryResultHandlerException {\n\t\t\t\t\tthrow new IllegalStateException(\"Expected empty result\");\n\t\t\t\t};\n\t\t\t});\n\n\t\t\tAssertions.assertTrue(started.get());\n\t\t}\n\t}", "private static Boolean specialQueries(String query) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n clickList = false;\n //newCorpus = true;\n\n if (query.equals(\"q\")) {\n\n System.exit(0);\n return true;\n }\n\n String[] subqueries = query.split(\"\\\\s+\"); //split around white space\n\n if (subqueries[0].equals(\"stem\")) //first term in subqueries tells computer what to do \n {\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n TokenProcessor processor = new NewTokenProcessor();\n if (subqueries.length > 1) //user meant to stem the token not to search stem\n {\n List<String> stems = processor.processToken(subqueries[1]);\n\n //clears list and repopulates it \n String stem = \"Stem of query '\" + subqueries[1] + \"' is '\" + stems.get(0) + \"'\";\n\n GUI.ResultsLabel.setText(stem);\n\n return true;\n }\n\n } else if (subqueries[0].equals(\"vocab\")) {\n List<String> vocabList = Disk_posIndex.getVocabulary();\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n\n int vocabCount = 0;\n for (String v : vocabList) {\n if (vocabCount < 1000) {\n vocabCount++;\n GUI.JListModel.addElement(v);\n }\n }\n GUI.ResultsLabel.setText(\"Total size of vocabulary: \" + vocabCount);\n return true;\n }\n\n return false;\n }", "CampusSearchQuery generateQuery();", "@Test\n @OperateOnDeployment(\"server\")\n public void shouldGetResourceByQuery() {\n given().header(\"Authorization\", \"Bearer access_token\").expect().statusCode(200).and().expect().body(\"size\",\n equalTo(1)).and().expect().body(\"items.item.name\", hasItem(\"Technologies\")).and().expect().body(\"items.item.sort\",\n hasItem(20)).when().get(getBaseTestUrl() + \"/1/categories/get/json/query;catName=Technologies?expand=\" +\n \"{\\\"branches\\\":[{\\\"trunk\\\":{\\\"name\\\":\\\"categories\\\"}}]})\");\n }", "public void test_hk_01() {\n // synthesise a mini-document\n String base = \"http://jena.hpl.hp.com/test#\";\n String doc =\n \"<rdf:RDF\"\n + \" xmlns:rdf=\\\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\\\"\"\n + \" xmlns:owl=\\\"http://www.w3.org/2002/07/owl#\\\">\"\n + \" <owl:Ontology rdf:about=\\\"\\\">\"\n + \" <owl:imports rdf:resource=\\\"http://www.w3.org/2002/07/owl\\\" />\"\n + \" </owl:Ontology>\"\n + \"</rdf:RDF>\";\n \n // read in the base ontology, which includes the owl language\n // definition\n // note OWL_MEM => no reasoner is used\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.getDocumentManager().setMetadataSearchPath( \"file:etc/ont-policy-test.rdf\", true );\n m.read(new ByteArrayInputStream(doc.getBytes()), base);\n \n // we need a resource corresponding to OWL Class but in m\n Resource owlClassRes = m.getResource(OWL.Class.getURI());\n \n // now can we see this as an OntClass?\n OntClass c = (OntClass) owlClassRes.as(OntClass.class);\n assertNotNull(\"OntClass c should not be null\", c);\n \n //(OntClass) (ontModel.getProfile().CLASS()).as(OntClass.class);\n \n }", "public Collection<URI> searchWithSPARQL(final String queryString)\n {\n if (DEBUG.SEARCH) Log.debug(\"searchWithSPARQL; queryString:\\n\" + Util.tags(queryString));\n \n final Collection<URI> resultSet = new ArrayList<URI>();\n final com.hp.hpl.jena.query.Query query = QueryFactory.create(queryString);\n \n if (DEBUG.SEARCH) Log.debug(\"QF created \" + Util.tag(query)\n + \"; memory=\" + Runtime.getRuntime().freeMemory()\n + \"\\n\" + query.toString().trim().replaceAll(\"\\n\\n\", \"\\n\"));\n\n final QueryExecution qe = QueryExecutionFactory.create(query, this); // 2nd arg is for Model or for FileManager?\n if (DEBUG.SEARCH) Log.debug(\"created QEF \" + qe + \"; memory=\" + Runtime.getRuntime().freeMemory());\n\n final ResultSet results = qe.execSelect();\n if (DEBUG.SEARCH) Log.debug(\"execSelect returned; memory=\" + Runtime.getRuntime().freeMemory());\n \n while (results.hasNext()) {\n final QuerySolution qs = results.nextSolution();\n if (DEBUG.SEARCH) {\n final String qss = qs.toString().replaceAll(\"<http://vue.tufts.edu\", \"...\"); // shorten debug output\n Log.debug(\"qSol \" + String.format(\"%.190s%s\", qss, qss.length() > 190 ? (\"...x\"+qss.length()) : \"\"));\n }\n if (false) {\n // debug debug all vars from query\n //Util.dumpIterator(qs.varNames());\n Iterator<String> vn = qs.varNames(); \n while (vn.hasNext()) {\n String v = vn.next();\n Log.debug(\"\\t\" + Util.tags(v) + \"=\" + Util.tags(qs.get(v)));\n }\n }\n try {\n resultSet.add(new URI(qs.getResource(\"rid\").getURI()));\n } catch (Throwable t) {\n Log.warn(\"handling QuerySolution \" + qs, t);\n }\n }\n qe.close();\n return resultSet;\n }", "@Test\n\tpublic void testShowResult() {\n\t\tConfigurationManager config = new ConfigurationManager();\n\t\tInvertedIndex index = new InvertedIndex();\n\t\tFileManager manager = new FileManager(config.getConfig().getFileName(), index);\n\t\tHashMap<String, String> parameters = new HashMap<String, String>();\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"asin\", \"ABCD\");\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"asin\", \"B00002243X\");\n\t\tcheckFindHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 10);\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"query\", \"ASDAJKSDJHKASJK\");\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 0);\n\t\tparameters.put(\"query\", \"jumpers\");\n\t\tcheckReviewSearchHandler(config.getConfig(), index, new RequestObject(\"\", \"\", parameters), 8);\n\t}", "public interface Query {\n\n\t/**\n\t * @return ID of the given query\n\t */\n\tint queryID();\n\t\n\t/**\n\t * @return given query\n\t */\n\tString query();\n\t\n\t/**\n\t * @return list of relevant documents to the corresponding query\n\t */\n\tList<RelevanceInfo> listOfRelevantDocuments();\n\t\n\t/**\n\t * @return list of results to the corresponding query after running one of the retrieval models\n\t */\n\tList<Result> resultList();\n\t\n\t/**\n\t * @param resultList\n\t * @Effects adds results to the result list of the corresponding query\n\t */\n\tvoid putResultList(List<Result> resultList);\n}", "public static void main(String[] args) throws Exception {\n TDB.setOptimizerWarningFlag(false);\n\n final String DATASET_DIR_NAME = \"data0\";\n final Dataset data0 = TDBFactory.createDataset( DATASET_DIR_NAME );\n\n // show the currently registered names\n for (Iterator<String> it = data0.listNames(); it.hasNext(); ) {\n out.println(\"NAME=\"+it.next());\n }\n\n out.println(\"getting named model...\");\n /// this is the OWL portion\n final Model model = data0.getNamedModel( MY_NS );\n out.println(\"Model := \"+model);\n\n out.println(\"getting graph...\");\n /// this is the DATA in that MODEL\n final Graph graph = model.getGraph();\n out.println(\"Graph := \"+graph);\n\n if (graph.isEmpty()) {\n final Resource product1 = model.createResource( MY_NS +\"product/1\");\n final Property hasName = model.createProperty( MY_NS, \"#hasName\");\n final Statement stmt = model.createStatement(\n product1, hasName, model.createLiteral(\"Beach Ball\",\"en\") );\n out.println(\"Statement = \" + stmt);\n\n model.add(stmt);\n\n // just for fun\n out.println(\"Triple := \" + stmt.asTriple().toString());\n } else {\n out.println(\"Graph is not Empty; it has \"+graph.size()+\" Statements\");\n long t0, t1;\n t0 = System.currentTimeMillis();\n final Query q = QueryFactory.create(\n \"PREFIX exns: <\"+MY_NS+\"#>\\n\"+\n \"PREFIX exprod: <\"+MY_NS+\"product/>\\n\"+\n \" SELECT * \"\n // if you don't provide the Model to the\n // QueryExecutionFactory below, then you'll need\n // to specify the FROM;\n // you *can* always specify it, if you want\n // +\" FROM <\"+MY_NS+\">\\n\"\n // +\" WHERE { ?node <\"+MY_NS+\"#hasName> ?name }\"\n // +\" WHERE { ?node exns:hasName ?name }\"\n // +\" WHERE { exprod:1 exns:hasName ?name }\"\n +\" WHERE { ?res ?pred ?obj }\"\n );\n out.println(\"Query := \"+q);\n t1 = System.currentTimeMillis();\n out.println(\"QueryFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n try ( QueryExecution qExec = QueryExecutionFactory\n // if you query the whole DataSet,\n // you have to provide a FROM in the SparQL\n //.create(q, data0);\n .create(q, model) ) {\n t1 = System.currentTimeMillis();\n out.println(\"QueryExecutionFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n ResultSet rs = qExec.execSelect();\n t1 = System.currentTimeMillis();\n out.println(\"executeSelect.TIME=\"+(t1 - t0));\n while (rs.hasNext()) {\n QuerySolution sol = rs.next();\n out.println(\"Solution := \"+sol);\n for (Iterator<String> names = sol.varNames(); names.hasNext(); ) {\n final String name = names.next();\n out.println(\"\\t\"+name+\" := \"+sol.get(name));\n }\n }\n }\n }\n out.println(\"closing graph\");\n graph.close();\n out.println(\"closing model\");\n model.close();\n //out.println(\"closing DataSetGraph\");\n //dsg.close();\n out.println(\"closing DataSet\");\n data0.close();\n }", "public void test_anon_0() {\n String NS = \"http://example.org/foo#\";\n String sourceT =\n \"<rdf:RDF \"\n + \" xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'\"\n + \" xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'\"\n + \" xmlns:ex='http://example.org/foo#'\"\n + \" xmlns:owl='http://www.w3.org/2002/07/owl#'>\"\n + \" <owl:ObjectProperty rdf:about='http://example.org/foo#p' />\"\n + \" <owl:Class rdf:about='http://example.org/foo#A' />\"\n + \" <ex:A rdf:about='http://example.org/foo#x' />\"\n + \" <owl:Class rdf:about='http://example.org/foo#B'>\"\n + \" <owl:equivalentClass>\"\n + \" <owl:Restriction>\" \n + \" <owl:onProperty rdf:resource='http://example.org/foo#p' />\" \n + \" <owl:hasValue rdf:resource='http://example.org/foo#x' />\" \n + \" </owl:Restriction>\"\n + \" </owl:equivalentClass>\"\n + \" </owl:Class>\"\n + \"</rdf:RDF>\";\n \n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n m.read(new ByteArrayInputStream(sourceT.getBytes()), \"http://example.org/foo\");\n \n OntClass B = m.getOntClass( NS + \"B\");\n Restriction r = B.getEquivalentClass().asRestriction();\n HasValueRestriction hvr = r.asHasValueRestriction();\n RDFNode n = hvr.getHasValue();\n \n assertTrue( \"Should be an individual\", n instanceof Individual );\n }", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "public void test_dn_0() {\n OntModel schema = ModelFactory.createOntologyModel( OntModelSpec.OWL_LITE_MEM_RULES_INF, null );\n \n schema.read( \"file:doc/inference/data/owlDemoSchema.xml\", null );\n \n int count = 0;\n for (Iterator i = schema.listIndividuals(); i.hasNext(); ) {\n //Resource r = (Resource) i.next();\n i.next();\n count++;\n /* Debugging * /\n for (StmtIterator j = r.listProperties(RDF.type); j.hasNext(); ) {\n System.out.println( \"ind - \" + r + \" rdf:type = \" + j.nextStatement().getObject() );\n }\n System.out.println(\"----------\"); /**/\n }\n \n assertEquals( \"Expecting 6 individuals\", 6, count );\n }", "@Test\n void testRankFilter() {\n Query q = newQueryFromEncoded(\"?query=trump\" +\n \"&model.type=all\" +\n \"&model.defaultIndex=text\" +\n \"&filter=filterattribute%3Afrontpage_US_en-US\");\n assertEquals(\"RANK text:trump |filterattribute:frontpage_US_en-US\",\n q.getModel().getQueryTree().toString());\n }", "<K, R extends IResponse> R query(IQueryRequest<K> queryRequest);", "T getQueryInfo();", "@SuppressWarnings(\"unchecked\")\n\tprivate CompoundQuery handleQuery() throws Exception{\n\t\tif (this.resultant != null && this.resultant.getResultsContainer() != null){\n\t\t\t//compoundQuery = (CompoundQuery) resultant.getAssociatedQuery();\n\t\t\tViewable view = newCompoundQuery.getAssociatedView();\n\t\t\tResultsContainer resultsContainer = this.resultant.getResultsContainer();\n\t\t\tsampleCrit = null;\n\t Collection sampleIDs = new ArrayList(); \n\t\t\t//Get the samples from the resultset object\n\t\t\tif(resultsContainer!= null){\n\t\t\t\tCollection samples = null;\n\t\t\t\tif(resultsContainer != null &&resultsContainer instanceof DimensionalViewContainer){\t\t\t\t\n\t\t\t\t\tDimensionalViewContainer dimensionalViewContainer = (DimensionalViewContainer)resultsContainer;\n\t\t\t\t\t\tCopyNumberSingleViewResultsContainer copyNumberSingleViewContainer = dimensionalViewContainer.getCopyNumberSingleViewContainer();\n\t\t\t\t\t\tGeneExprSingleViewResultsContainer geneExprSingleViewContainer = dimensionalViewContainer.getGeneExprSingleViewContainer();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(copyNumberSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = copyNumberSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(geneExprSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = geneExprSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t \t\tsampleCrit = new SampleCriteria();\n\t\t \t\t\tsampleCrit.setSampleIDs(sampleIDs);\n\n AddConstrainsToQueriesHelper constrainedSamplesHandler= new AddConstrainsToQueriesHelper();\n constrainedSamplesHandler.constrainQueryWithSamples(newCompoundQuery,sampleCrit);\n\t\t\t\tnewCompoundQuery = getShowAllValuesQuery(newCompoundQuery);\n\t\t\t\tnewCompoundQuery.setAssociatedView(view);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn newCompoundQuery;\n\t\t}", "@Override\n public R visit(RDFLiteral n, A argu) {\n R _ret = null;\n n.sparqlString.accept(this, argu);\n n.nodeOptional.accept(this, argu);\n return _ret;\n }", "void filterQuery(ServerContext context, QueryRequest request, QueryResultHandler handler,\n RequestHandler next);", "public void xxtest_oh_01() {\n String NS = \"http://www.idi.ntnu.no/~herje/ja/\";\n Resource[] expected = new Resource[] {\n ResourceFactory.createResource( NS+\"reiseliv.owl#Reiseliv\" ),\n ResourceFactory.createResource( NS+\"hotell.owl#Hotell\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#Restaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteBadRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#UteDoRestaurant\" ),\n ResourceFactory.createResource( NS+\"restaurant.owl#SkogRestaurant\" ),\n };\n \n test_oh_01scan( OntModelSpec.OWL_MEM, \"No inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_MINI_RULE_INF, \"Mini rule inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_RULE_INF, \"Full rule inf\", expected );\n test_oh_01scan( OntModelSpec.OWL_MEM_MICRO_RULE_INF, \"Micro rule inf\", expected );\n }", "@Override\n\tpublic void queryData() {\n\t\t\n\t}", "@Test public void onePredicate() {\n query(\"//ul/li['']\", \"\");\n query(\"//ul/li['x']\", LI1 + '\\n' + LI2);\n query(\"//ul/li[<a b='{\" + _RANDOM_INTEGER.args() + \" }'/>]\", LI1 + '\\n' + LI2);\n\n query(\"//ul/li[0]\", \"\");\n query(\"//ul/li[1]\", LI1);\n query(\"//ul/li[2]\", LI2);\n query(\"//ul/li[3]\", \"\");\n query(\"//ul/li[last()]\", LI2);\n }", "private static void initSPARQLAnythingEngine() {\n\t\t// Register the JSON-LD parser factory for extension .json\n\t\tReaderRIOTFactory parserFactoryJsonLD = new RiotUtils.ReaderRIOTFactoryJSONLD();\n\t\tRDFParserRegistry.registerLangTriples(RiotUtils.JSON, parserFactoryJsonLD);\n\t\t// Setup FX executor\n\t\tJenaSystem.init();\n\t\tQC.setFactory(ARQ.getContext(), FacadeX.ExecutorFactory);\n\t}", "QueryResponse query(SolrParams solrParams) throws SolrServerException;", "@Test\n public void testRelWithHref() throws RepositoryException {\n assertExtract(\"/html/rdfa/rel-href.html\");\n logger.debug(dumpModelToTurtle());\n\n assertContains(RDFUtils.iri(baseIRI.toString(), \"#me\"), FOAF.getInstance().name, \"John Doe\");\n assertContains(RDFUtils.iri(baseIRI.toString(), \"#me\"), FOAF.getInstance().homepage,\n RDFUtils.iri(\"http://example.org/blog/\"));\n }", "public ResultMap<BaseNode> queryRelatives(QName type, Direction direction, ObjectNode query, Pagination pagination);", "public final void querySAX(String query, ContentHandler handler,\n\t\t\tAttributes atts) throws SQLException, SAXException {\n\t\tfinal Connection con = getConnection();\n\t\tStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = con.createStatement();\n\t\t\tDOMUtils.resultSet2ContentHandler(stmt.executeQuery(query),\n\t\t\t\t\thandler, atts);\n\t\t} finally {\n\t\t\tif (stmt != null)\n\t\t\t\tstmt.close();\n\t\t\tif (con != null)\n\t\t\t\tcon.close();\n\t\t}\n\t}", "@Test\n public void testGetResultSet() throws MainException {\n System.out.println(\"getResultSet\");\n String queryText = \"select * from infermieri\";\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n ResultSet result = instance.getResultSet(queryText);\n assertNotNull(result);\n // TODO review the generated test code and remove the default call to fail.\n }", "@Test\n\tpublic void testKeywordQuery(){\n\t\t//manager.getResponse(\"american football \"); //match multiple keywords\n//\t\tmanager.getResponse(\"list of Bond 007 movies\");\n//\tmanager.getResponse(\"Disney movies\");\n\t\t//manager.keywordQuery(\"Paul Brown Stadium location\");\n\t\t//manager.keywordQuery(\"0Francesco\");\n System.out.println(\"******* keyword query *******\");\n\t\t//manager.keywordQuery(\"sportspeople in tennis\");\n\t\t//manager.keywordSearch(\"list of movies starring Sean Connery\",ElasticIndex.analyzed,100 );\n//\t\tmanager.keywordSearch(\"movies starring Sean Connery\",ElasticIndex.notStemmed,100 );\n// manager.keywordSearch(\"musical movies tony award\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"movies directed by Woody Allen\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"United states professional sports teams\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"computer games developed by Ubisoft\",ElasticIndex.analyzed,100 );\n// manager.keywordSearch(\"computer games developed by Ubisoft\",ElasticIndex.notStemmed,100 );\n// manager.keywordSearch(\"movies academy award nominations\",ElasticIndex.notStemmed,100 );\n System.out.println(SearchResultUtil.toSummary(manager.keywordSearch(\"movies directed by Woody Allen\",ElasticIndex.notLowercased,20 )));\n //manager.keywordSearch(\"grammy best album in 2012\",ElasticIndex.notAnalyzed,100 );\n //(better than analyzed) manager.keywordSearch(\"grammy best album in 2012\",ElasticIndex.notStemmed,100 );\n System.out.println(\"*****************************\");\n\n\t\t//manager.keywordQuery(\"Disney movies\");\n\t}", "@Test\r\n\tpublic void testRuleSets2() throws Exception{\r\n\t\t\r\n\t\tAssert.assertEquals(0L, testAdminCon.size());\r\n\t\ttestAdminCon.add(micah, lname, micahlname, dirgraph1);\r\n\t\ttestAdminCon.add(micah, fname, micahfname, dirgraph1);\r\n\t\ttestAdminCon.add(micah, developPrototypeOf, semantics, dirgraph1);\r\n\t\ttestAdminCon.add(micah, type, sEngineer, dirgraph1);\r\n\t\ttestAdminCon.add(micah, worksFor, ml, dirgraph1);\r\n\t\t\r\n\t\ttestAdminCon.add(john, fname, johnfname,dirgraph);\r\n\t\ttestAdminCon.add(john, lname, johnlname,dirgraph);\r\n\t\ttestAdminCon.add(john, writeFuncSpecOf, inference, dirgraph);\r\n\t\ttestAdminCon.add(john, type, lEngineer, dirgraph);\r\n\t\ttestAdminCon.add(john, worksFor, ml, dirgraph);\r\n\t\t\r\n\t\ttestAdminCon.add(writeFuncSpecOf, subProperty, design, dirgraph1);\r\n\t\ttestAdminCon.add(developPrototypeOf, subProperty, design, dirgraph1);\r\n\t\ttestAdminCon.add(design, subProperty, develop, dirgraph1);\r\n\t\t\r\n\t\ttestAdminCon.add(lEngineer, subClass, engineer, dirgraph1);\r\n\t\ttestAdminCon.add(sEngineer, subClass, engineer, dirgraph1);\r\n\t\ttestAdminCon.add(engineer, subClass, employee, dirgraph1);\r\n\t\t\r\n\t\tString query = \"select (count (?s) as ?totalcount) where {?s ?p ?o .} \";\r\n\t\tTupleQuery tupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(SPARQLRuleset.RDFS_PLUS_FULL);\r\n\t\tTupleQueryResult result\t= tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(374, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\r\n\t\tRepositoryResult<Statement> resultg = testAdminCon.getStatements(null, null, null, true, dirgraph, dirgraph1);\r\n\t\t\r\n\t\tassertNotNull(\"Iterator should not be null\", resultg);\r\n\t\tassertTrue(\"Iterator should not be empty\", resultg.hasNext());\r\n\t\t\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(SPARQLRuleset.EQUIVALENT_CLASS);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(18, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(SPARQLRuleset.RDFS,SPARQLRuleset.INVERSE_OF);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(86, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets(null,SPARQLRuleset.INVERSE_OF);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(18, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t\t\r\n\t\ttupleQuery = testAdminCon.prepareTupleQuery(QueryLanguage.SPARQL, query);\r\n\t\t((MarkLogicQuery) tupleQuery).setRulesets((SPARQLRuleset)null, null);\r\n\t\ttupleQuery.setIncludeInferred(false);\r\n\t\tresult = tupleQuery.evaluate();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(true)));\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tBindingSet solution = result.next();\r\n\t\t\t\tassertThat(solution.hasBinding(\"totalcount\"), is(equalTo(true)));\r\n\t\t\t\tValue count = solution.getValue(\"totalcount\");\r\n\t\t\t\tAssert.assertEquals(16, Integer.parseInt(count.stringValue()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t}", "private void init() throws JRException {\n if (result != null) {\n return;\n }\n if (endpointUrl == null) {\n throw new JRException(\"Endpoint URLs can't be null\");\n }\n if (sparqlStatement == null || sparqlStatement.length() == 0) {\n throw new JRException(\"SPARQL statements can't be null for \" + endpointUrl);\n }\n try {\n endpointObj = new SPARQLRepository(endpointUrl);\n endpointObj.initialize();\n } catch (Exception e) {\n throw new JRException(\"Exception initializing endpoint \" + endpointUrl, e);\n }\n try {\n conn = endpointObj.getConnection();\n log.info(\"Executing SPARQL: \" + sparqlStatement);\n TupleQuery q = conn.prepareTupleQuery(QueryLanguage.SPARQL, sparqlStatement);\n result = q.evaluate();\n log.debug(\"Bindings got, size: \" + result.getBindingNames().size());\n } catch (Exception e) {\n throw new JRException(\"Exception connecting to endpoint \" + endpointUrl, e);\n } finally {\n try {\n conn.close();\n } catch (RepositoryException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\n\t\tString type = req.getParameter(\"type\");\n\t\tString concept = req.getParameter(\"concept\");\n\t\tif (type != null && type.equals(\"compare\")) {\n\t\t\tgetcompareResults(concept, resp);\n\t\t\treturn;\n\t\t}\n\t\tif (type != null && type.equals(\"freeb\")) {\n\t\t\ttry {\n\t\t\t\tcallFreebase(concept, resp);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tString query = req.getParameter(\"query\");\n\t\t// default dbpedia_query\n\t\tif (query == null) {\n\t\t\tquery = \"dbpedia_query\";\n\t\t}\n\t\t\n\t\tString chunk = req.getParameter(\"chunk\");\n\t\tint chunkNum = 1;\n\t\tif (chunk != null) {\n\t\t\tchunkNum = Integer.parseInt(chunk);\n\t\t}\n\t\tString cont = req.getParameter(\"cont\");\n\t\t// All string should be have CamelCase and words separated by underscore\n\t\t//if cont != null or concept contains '_' then camelize except if camelcase is not intended\n\t\tif ((cont == null && !concept.contains(\"_\"))) {\n\t\t\tString camel = req.getParameter(\"camel\");\n\t\t\tif (camel == null || !camel.contains(\"false\")) {\n\t\t\t\tconcept = toCamelCaseUnderscore(concept);\n\t\t\t} else {\n\t\t\t\tconcept = putUnderscore(concept);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Concept:: \" + concept);\n\t\t// SparqlEvaluator eval = SparqlEvaluator.getInstance();\n\t\t// RDFXMLProcessor eval = new RDFXMLProcessor();\n\t\tif (concept == null)\n\t\t\treturn;\n\t\t// List<JSONObject> js = eval.process(concept,query);\n\t\tSystem.out.println(\"Before Process\");\n\t\tSystem.out.println(chunkNum);\n\t\tList<JSONObject> js = new ArrayList<JSONObject>(); \n\t\t\n\t\ttry {\n\t\t\tjs = SparqlEvaluator.getInstance().process(concept,\n\t\t\t\t\tquery, chunkNum);\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\tresp.getWriter().print(\"\");\n\t\t}\n\t\tif (js.isEmpty()) {\n\t\t\tresp.getWriter().print(\"\");\n\t\t\treturn;\n\t\t}\n\t\tIterator<JSONObject> itr = js.iterator();\n\t\tSystem.out.println(\"Size of list :: \" + js.size());\n\n\t\tresp.setContentType(\"text/html; charset=UTF-8\");\n\n\t\tString dset = \"dbpedia\";\n\n\t\tString respout = \"{\\\"bindings\\\": [\";\n\t\tresp.getWriter().print(respout);\n\t\tSystem.out.println(respout);\n\n\t\t\n\t\trespout = \"{\\\"type\\\":\\\"num\\\",\\\"val\\\":\\\"\"\n\t\t\t+ SparqlEvaluator.getCacheNum(concept, query, dset)\n\t\t\t+ \"\\\"},\";\n\t\tresp.getWriter().print(respout);\n\t\tSystem.out.println(respout);\n\n\t\tboolean first = true;\n\t\tint count = 1;\n\t\twhile (itr.hasNext()) {\n\t\t\tif (!first) {\n\t\t\t\trespout = \",\"; resp.getWriter().print(respout); System.out.println(respout);\n\n\t\t\t}\n\t\t\tfirst = false;\n\t\t\tString nstr = itr.next().toString();\n\t\t\tresp.getWriter().print(nstr);\n\t\t\tSystem.out.println((count++) + \" :\" + nstr);\n\t\t}\n\t\tSystem.out.println(\"After loop\");\n\t\tresp.getWriter().print(\"]}\");\n\t\tSystem.out.println(\"Done\");\n\n\t}", "private RDF_Term testTerm(Node node, PrefixMap pmap, boolean asValue) {\n RDF_Term rt = ProtobufConvert.convert(node, pmap, asValue) ;\n\n if ( node == null) {\n assertTrue(rt.hasUndefined());\n return rt;\n }\n\n switch (rt.getTermCase()) {\n// message RDF_Term {\n// oneof term {\n// RDF_IRI iri = 1 ;\n// RDF_BNode bnode = 2 ;\n// RDF_Literal literal = 3 ;\n// RDF_PrefixName prefixName = 4 ;\n// RDF_VAR variable = 5 ;\n// RDF_Triple tripleTerm = 6 ;\n// RDF_ANY any = 7 ;\n// RDF_UNDEF undefined = 8 ;\n// RDF_REPEAT repeat = 9 ;\n//\n// // Value forms of literals.\n// int64 valInteger = 20 ;\n// double valDouble = 21 ;\n// RDF_Decimal valDecimal = 22 ;\n// }\n// }\n case IRI : {\n RDF_IRI iri = rt.getIri() ;\n assertEquals(node.getURI(), iri.getIri()) ;\n break;\n }\n case BNODE : {\n RDF_BNode bnode = rt.getBnode() ;\n assertEquals(node.getBlankNodeLabel(), bnode.getLabel()) ;\n break;\n }\n case LITERAL : {\n RDF_Literal lit = rt.getLiteral() ;\n assertEquals(node.getLiteralLexicalForm(), lit.getLex()) ;\n\n if (JenaRuntime.isRDF11) {\n // RDF 1.1\n if ( Util.isSimpleString(node) ) {\n assertTrue(lit.getSimple());\n // Protobug default is \"\"\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNullPB(lit.getLangtag()) ;\n } else if ( Util.isLangString(node) ) {\n assertFalse(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNotSame(\"\", lit.getLangtag()) ;\n }\n else {\n assertFalse(lit.getSimple());\n // Regular typed literal.\n assertTrue(lit.getDatatype() != null || lit.getDtPrefix() != null );\n assertNullPB(lit.getLangtag()) ;\n }\n } else {\n // RDF 1.0\n if ( node.getLiteralDatatype() == null ) {\n if ( Util.isLangString(node ) ) {\n assertFalse(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertNull(lit.getDtPrefix()) ;\n assertNotSame(\"\", lit.getLangtag()) ;\n } else {\n assertTrue(lit.getSimple());\n assertNullPB(lit.getDatatype()) ;\n assertEquals(RDF_PrefixName.getDefaultInstance(), lit.getDtPrefix());\n assertNullPB(lit.getLangtag()) ;\n }\n } else {\n assertTrue(lit.getDatatype() != null || lit.getDtPrefix() != null );\n }\n }\n break;\n }\n case PREFIXNAME : {\n assertNotNull(rt.getPrefixName().getPrefix()) ;\n assertNotNull(rt.getPrefixName().getLocalName()) ;\n String x = pmap.expand(rt.getPrefixName().getPrefix(), rt.getPrefixName().getLocalName());\n assertEquals(node.getURI(),x);\n break;\n }\n case VARIABLE :\n assertEquals(node.getName(), rt.getVariable().getName());\n break;\n case TRIPLETERM : {\n RDF_Triple encTriple = rt.getTripleTerm();\n Triple t = node.getTriple();\n RDF_Term rt_s = testTerm(t.getSubject(), pmap, asValue);\n RDF_Term rt_p = testTerm(t.getPredicate(), pmap, asValue);\n RDF_Term rt_o = testTerm(t.getObject(), pmap, asValue);\n assertEquals(encTriple.getS(), rt_s);\n assertEquals(encTriple.getP(), rt_p);\n assertEquals(encTriple.getO(), rt_o);\n break;\n }\n case ANY :\n assertEquals(Node.ANY, node);\n case REPEAT :\n break;\n case UNDEFINED :\n assertNull(node);\n return rt;\n case VALINTEGER : {\n long x = rt.getValInteger();\n assertTrue(integerSubTypes.contains(node.getLiteralDatatype()));\n //assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDinteger);\n long x2 = Long.parseLong(node.getLiteralLexicalForm());\n assertEquals(x,x2);\n break;\n }\n case VALDOUBLE : {\n double x = rt.getValDouble();\n assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDdouble);\n double x2 = Double.parseDouble(node.getLiteralLexicalForm());\n assertEquals(x, x2, 0.01);\n break;\n }\n case VALDECIMAL : {\n assertEquals(node.getLiteralDatatype(), XSDDatatype.XSDdecimal);\n NodeValue nv = NodeValue.makeNode(node);\n assertTrue(nv.isDecimal());\n\n long value = rt.getValDecimal().getValue() ;\n int scale = rt.getValDecimal().getScale() ;\n BigDecimal d = BigDecimal.valueOf(value, scale) ;\n assertEquals(nv.getDecimal(), d);\n break;\n }\n case TERM_NOT_SET :\n break;\n }\n\n // And reverse\n if ( ! asValue ) {\n // Value based does not preserve exact datatype or lexical form.\n Node n2 = ProtobufConvert.convert(rt, pmap);\n assertEquals(node, n2) ;\n }\n\n return rt;\n }", "SparqlResultObject callSelectQuery(String name, Map<String, String> params);", "@Override\n public void search(Uri uri) {\n }", "public static void createSimple() throws Exception {\n\t\t// create a sesame memory sail\n\t\tMemoryStore memoryStore = new MemoryStore();\n\n\t\t// create a lucenesail to wrap the memorystore\n\t\tLuceneSail lucenesail = new LuceneSail();\t\t\n\t\t// set this parameter to let the lucene index store its data in ram\n\t\tlucenesail.setParameter(LuceneSail.LUCENE_RAMDIR_KEY, \"true\");\n\t\t// set this parameter to store the lucene index on disk\n\t\t// lucenesail.setParameter(LuceneSail.LUCENE_DIR_KEY, \"./data/mydirectory\");\n\t\t\n\t\t// wrap memorystore in a lucenesail\n\t\tlucenesail.setDelegate(memoryStore);\n\t\t\n\t\t// create a Repository to access the sails\n\t\tSailRepository repository = new SailRepository(lucenesail);\n\t\trepository.initialize();\n\t\t\n\t\t// add some test data, the FOAF ont\n\t\tSailRepositoryConnection connection = repository.getConnection();\n\t\tconnection.begin();\n\t\ttry {\n//\t\t\tconnection.setAutoCommit(false);\n\t\t\tFile file = new File(\"/Users/sschenk/Downloads/foaf.rdfs\");\n\t\t\tSystem.out.println(file.exists());\n\t\t\tconnection.add(\n\t\t\t\t\tfile,\n\t\t\t\t\t\"\", \n\t\t\t\t\tRDFFormat.RDFXML);\n\t\t\tconnection.commit();\n\t\t\t\n\t\t\t// search for all resources that mention \"person\"\n\t\t\tString queryString = \"PREFIX search: <\"+LuceneSailSchema.NAMESPACE+\"> \\n\" +\n\t\t\t\t\t\"SELECT ?x ?score ?snippet WHERE {?x search:matches ?match. \\n\" +\n\t\t\t\t\t\"?match search:query \\\"person\\\"; \\n\" +\n\t\t\t\t\t\"search:score ?score; \\n\" +\n\t\t\t\t\t\"search:snippet ?snippet. }\" ;\n\t\t\tSystem.out.println(\"Running query: \\n\"+queryString);\n\t\t\tTupleQuery query = connection.prepareTupleQuery(QueryLanguage.SPARQL, queryString);\n\t\t\tTupleResult result = query.evaluate();\n\t\t\ttry { \n\t\t\t\t// print the results\n\t\t\t\twhile (result.hasNext()){\n\t\t\t\t\tBindingSet bindings = result.next();\n\t\t\t\t\tSystem.out.println(\"found match: \");\n\t\t\t\t\tfor (Binding binding : bindings) {\n\t\t\t\t\t\tSystem.out.println(\" \"+binding.getName()+\": \"+binding.getValue());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tresult.close();\n\t\t\t}\n\t\t} finally {\n\t\t\tconnection.close();\n\t\t\trepository.shutDown();\n\t\t}\n\t\t\n\t}", "@Test\n public void testNestedQueryModifiers() throws Exception {\n\n String subqq=\"_query_:\\\"{!v=$qq}\\\"\";\n\n assertJQ(req(\"q\",\"_query_:\\\"\\\\\\\"how brown\\\\\\\"~2\\\"\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n assertJQ(req(\"q\",subqq, \"qq\",\"\\\"how brown\\\"~2\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n // Should explicit slop override? It currently does not, but that could be considered a bug.\n assertJQ(req(\"q\",subqq+\"~1\", \"qq\",\"\\\"how brown\\\"~2\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n // Should explicit slop override? It currently does not, but that could be considered a bug.\n assertJQ(req(\"q\",\" {!v=$qq}~1\", \"qq\",\"\\\"how brown\\\"~2\"\n , \"debug\",\"query\"\n )\n ,\"/response/docs/[0]/id=='1'\"\n );\n\n assertJQ(req(\"fq\",\"id:1\", \"fl\",\"id,score\", \"q\", subqq+\"^3\", \"qq\",\"text:x^2\"\n , \"debug\",\"query\"\n )\n ,\"/debug/parsedquery_toString=='((text:x)^2.0)^3.0'\"\n );\n\n assertJQ(req(\"fq\",\"id:1\", \"fl\",\"id,score\", \"q\", \" {!v=$qq}^3\", \"qq\",\"text:x^2\"\n , \"debug\",\"query\"\n )\n ,\"/debug/parsedquery_toString=='((text:x)^2.0)^3.0'\"\n );\n\n }", "public void Query() {\n }", "public void test_sf_969475() {\n String SOURCE=\n \"<?xml version='1.0'?>\" +\n \"<!DOCTYPE owl [\" +\n \" <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >\" +\n \" <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >\" +\n \" <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >\" +\n \" <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >\" +\n \" <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >\" +\n \" <!ENTITY base 'http://jena.hpl.hp.com/test' >\" +\n \" ]>\" +\n \"<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>\" +\n \" <owl:ObjectProperty rdf:ID='p0'>\" +\n \" <owl:inverseOf>\" +\n \" <owl:ObjectProperty rdf:ID='q0' />\" +\n \" </owl:inverseOf>\" +\n \" </owl:ObjectProperty>\" +\n \" <owl:ObjectProperty rdf:ID='p1'>\" +\n \" <owl:inverseOf>\" +\n \" <owl:ObjectProperty rdf:ID='q1' />\" +\n \" </owl:inverseOf>\" +\n \" </owl:ObjectProperty>\" +\n \"</rdf:RDF>\";\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n m.read( new StringReader( SOURCE ), null );\n \n ObjectProperty p0 = m.getObjectProperty( \"http://jena.hpl.hp.com/test#p0\");\n Object invP0 = p0.getInverseOf();\n \n assertEquals( m.getResource( \"http://jena.hpl.hp.com/test#q0\"), invP0 );\n assertTrue( \"Should be an ObjectProperty facet\", invP0 instanceof ObjectProperty );\n \n ObjectProperty q1 = m.getObjectProperty( \"http://jena.hpl.hp.com/test#q1\");\n Object invQ1 = q1.getInverse();\n \n assertEquals( m.getResource( \"http://jena.hpl.hp.com/test#p1\"), invQ1 );\n assertTrue( \"Should be an ObjectProperty facet\", invQ1 instanceof ObjectProperty );\n }", "@Test\n public void test002() {\n int total = response.extract().path(\"total\");\n\n\n System.out.println(\"------------------StartingTest---------------------------\");\n System.out.println(\"The search query is: \" + total);\n System.out.println(\"------------------End of Test---------------------------\");\n\n }", "Message handle(Message query, String kind);", "void contactQueryResult(String queryId, Contact contact);" ]
[ "0.65154463", "0.646076", "0.64355", "0.63797855", "0.6370891", "0.61967933", "0.61506295", "0.60005015", "0.59948105", "0.59887075", "0.59583133", "0.59453565", "0.5918102", "0.5867251", "0.5818676", "0.58168083", "0.58087605", "0.57458586", "0.57274145", "0.5702796", "0.56701165", "0.56323516", "0.55130166", "0.55035686", "0.55006266", "0.5434425", "0.5434329", "0.54279566", "0.54160553", "0.54070187", "0.54048485", "0.5389304", "0.5388929", "0.53705215", "0.5326313", "0.5302646", "0.52979785", "0.5296412", "0.5283325", "0.5282805", "0.5280931", "0.5275579", "0.5271636", "0.5266484", "0.526324", "0.5261075", "0.5251658", "0.5249595", "0.52485377", "0.5231826", "0.5219762", "0.52163154", "0.5209154", "0.51973325", "0.51962095", "0.5179952", "0.5179261", "0.51673245", "0.51649934", "0.51623243", "0.51504153", "0.5141914", "0.51409763", "0.5138766", "0.5137049", "0.513068", "0.5128168", "0.5126868", "0.5124203", "0.5123935", "0.51230747", "0.5121433", "0.5104722", "0.5104701", "0.5095074", "0.5088106", "0.5078655", "0.507413", "0.50715667", "0.5062454", "0.50401497", "0.50384045", "0.5037696", "0.5034526", "0.502958", "0.5024172", "0.50218683", "0.50207937", "0.5019569", "0.50166625", "0.5001256", "0.4997402", "0.49898034", "0.49896985", "0.49855593", "0.4980816", "0.4975009", "0.4972233", "0.49710828", "0.49528483" ]
0.52350414
49
Implementation of OTP generation should be here.For now its returning a static string.This should also sendout the OTP to the number
public String generateOTP(String username){ sendOTP(username); return new String("pass"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String generateOTP() {\n String values = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"; //characters to use in password\n Random random = new Random();\n char[] password = new char[6]; //setting password size to 6\n IntStream.range(0, password.length).forEach(i -> password[i] = values.charAt(random.nextInt(values.length())));\n return String.valueOf(password);\n }", "private String generateOtp() {\n\t\tString otp = TOTP.getOTP(SECRET);\n\t\treturn otp;\n\t}", "public int generateOTP(String key){\n int len =4;\n\n int OTP;\n String numbers = \"0123456789\";\n Random rndm_method = new Random();\n\n char[] otp = new char[len];\n\n for (int i = 0; i < len; i++)\n {\n otp[i] =\n numbers.charAt(rndm_method.nextInt(numbers.length()));\n }\n OTP = Integer.parseInt(String.valueOf(otp));\n otpCache.put(key, OTP);\n return OTP;\n }", "private String getToken() {\n\t\tString numbers = \"0123456789\";\n\t\tRandom rndm_method = new Random();\n String OTP = \"\";\n for (int i = 0; i < 4; i++)\n {\n \tOTP = OTP+numbers.charAt(rndm_method.nextInt(numbers.length()));\n \n }\n return OTP;\n\t}", "public String generateOTP(String key) {\n Random random = new Random();\n int otp = 100000 + random.nextInt(900000);\n otpCache.put(key, otp);\n return String.valueOf(otp);\n }", "private static String genString(){\n final String ALPHA_NUMERIC_STRING =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n int pwLength = 14; //The longer the password, the more likely the user is to change it.\n StringBuilder pw = new StringBuilder();\n while (pwLength-- != 0) {\n int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length());\n pw.append(ALPHA_NUMERIC_STRING.charAt(character));\n }\n return pw.toString(); //\n }", "@Override\n public void generateOTP(Long mobileNumber) {\n int otp = random.nextInt(8999) + 1000;\n\n // for testing purpose\n System.out.println(\"Generated OTP :: \" + otp);\n\n unRegisteredUsersMap.put(mobileNumber, otp);\n }", "@Override\n\tpublic String sendOTP(String toNumber, String fromNumber, String abc) {\n\t\tredisRepo.getHashOps();\n\t\tString value = redisRepo.getValue(toNumber, toNumber);\n\t\t\n\t\tif (value != null)\n\t\t\treturn value;\n\t\tString otp = generateOtp();\n\t\tSystem.out.println(\"Inside the sendOtp method\");\n\t\t\n\t\tif (value == null) {\n\t\t\tredisRepo.putKey(toNumber, toNumber, otp);\n\t\t\tSystem.out.println(redisRepo.expireKey(toNumber));\n\t\t}\n\t\t\n\t\ttwService.sendMessage(toNumber,fromNumber, otp);\n\t\t\n\t\treturn otp;\n\t}", "public StringBuilder generateOTPForRating(Long taskId);", "public String generateMP() {\n\t\t\tString characters = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789~`!@#$%^&*()-_=+[{]}\\\\|;:\\'\\\",<.>/?\";\n\t\t\tString pwd = RandomStringUtils.random(15, 0, 0, false, false, characters.toCharArray(), new SecureRandom());\n\t\t\treturn pwd;\n\t\t}", "public static String generateTOTP(String key, int returnDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n long timeInMilis = currentDateTime.getTimeInMillis();\n\n String steps = \"0\";\n long T = (timeInMilis - TIME_ZERO) / TIME_SLICE_X;\n steps = Long.toHexString(T).toUpperCase();\n\n // Just get a 16 digit string\n while (steps.length() < 16)\n steps = \"0\" + steps;\n return TOTP.generateTOTP(key, steps.toLowerCase(), returnDigits);\n }", "private String generateToken () {\n SecureRandom secureRandom = new SecureRandom();\n long longToken;\n String token = \"\";\n for ( int i = 0; i < 3; i++ ) {\n longToken = Math.abs( secureRandom.nextLong() );\n token = token.concat( Long.toString( longToken, 34 + i ) );//max value of radix is 36\n }\n return token;\n }", "public String generatePassword(){\n\t\treturn \"a\" + super.generatePassword() + \"1\";\n\t}", "public char[] generateOtp(int len);", "public void sendOTP(String username){\n }", "private static String accountNumberGenerator() {\n char[] chars = new char[10];\n for (int i = 0; i < 10; i++) {\n chars[i] = Character.forDigit(rnd.nextInt(10), 10);\n }\n return new String(chars);\n }", "private String generatePhone() {\n\t\tString ret = \"\";\n\t\tString[] areaCode = { \"051\", \"055\", \"045\", \"043\", \"053\" };\n\n\t\t// Gets an area code\n\t\tret = areaCode[(new Random()).nextInt(5)];\n\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tint n = (new Random()).nextInt(9);\n\n\t\t\t// Checks if the first number is 0\n\t\t\tif (i == 0 && n == 0) {\n\t\t\t\ti -= 1;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tret += n;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t}", "public String genUserToken()\n\t{\n\t\tString token = \"\";\n\t\tfor (int i = 0; i < 16; i++)\n\t\t{\n\t\t\ttoken = token + tokenGenerator.nextInt(10);\n\t\t}\n\t\treturn token;\n\t}", "private String genrateOrderTrakingnumber() {\n return UUID.randomUUID().toString();\n }", "public static String generateMobNum() {\n\t\tString number = RandomStringUtils.randomNumeric(10);\t\n\t\treturn (number);\n\t}", "public String generateString() {\n\t\tint maxLength = 9;\n\t\tRandom random = new Random();\n\t\tStringBuilder builder = new StringBuilder(maxLength);\n\n\t\t// Looping 9 times, one for each char\n\t\tfor (int i = 0; i < maxLength; i++) {\n\t\t\tbuilder.append(ALPHABET.charAt(random.nextInt(ALPHABET.length())));\n\t\t}\n\t\t// Generates a random ID that has may have a quintillion different combinations\n\t\t// (1/64^9)\n\t\treturn builder.toString();\n\t}", "protected static String generateToken()\n\t{\n\t\treturn UUID.randomUUID().toString();\n\t}", "private static String smsCode() {\n\t\t\tString random=new Random().nextInt(1000000)+\"\";\r\n\t\t\treturn random;\r\n\t\t}", "public static String generatePass(){\r\n \r\n String password = new Random().ints(10, 33, 122).collect(StringBuilder::new,\r\n StringBuilder::appendCodePoint, StringBuilder::append)\r\n .toString();\r\n return password;\r\n\r\n }", "public String createPassword() {\n while (i < length){\n temp += abc.charAt(random.nextInt(26));\n i++;\n }\n\n this.password = this.temp;\n this.temp = \"\";\n this.i = 0;\n return password;\n }", "public static String generateTOTP(String key, String time, int returnDigits, String crypto) throws GeneralSecurityException {\n String result = null;\n byte[] hash;\n\n // Using the counter\n // First 8 bytes are for the movingFactor\n // Complaint with base RFC 4226 (HOTP)\n while (time.length() < 16)\n time = \"0\" + time;\n\n // Get the HEX in a Byte[]\n byte[] msg = hexStr2Bytes(time);\n // Adding one byte to get the right conversion\n // byte[] k = hexStr2Bytes(key);\n byte[] k = hexStr2Bytes(key);\n hash = hmac_sha1(crypto, k, msg);\n // put selected bytes into result int\n int offset = hash[hash.length - 1] & 0xf;\n\n int binary = ((hash[offset] & 0x7f) << 24) | ((hash[offset + 1] & 0xff) << 16) | ((hash[offset + 2] & 0xff) << 8)\n | (hash[offset + 3] & 0xff);\n\n int otp = binary % DIGITS_POWER[returnDigits];\n\n result = Integer.toString(otp);\n while (result.length() < returnDigits) {\n result = \"0\" + result;\n }\n return result;\n }", "public String getOTP(String key) {\n try {\n return String.valueOf(otpCache.get(key));\n } catch (Exception e) {\n return \"\";\n }\n }", "public String generate(int length) {\r\n\t\tString chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\r\n\t\tString pass = \"\";\r\n\t\tfor (int x = 0; x < length; x++) {\r\n\t\t\tint i = (int) Math.floor(Math.random() * 62);\r\n\t\t\tpass += chars.charAt(i);\r\n\t\t}\r\n\r\n\t\treturn pass;\r\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tRandom ra=new Random();\r\n\t\t\t\tint val=ra.nextInt(999);\r\n\t\t\t\tSmsManager sms=SmsManager.getDefault();\r\n\t\t\t\tsms.sendTextMessage(txt_phone.getText().toString(), null, val+\"\", null, null);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tIntent i=new Intent(getApplicationContext(), OTP_Reg.class);\r\n\t\t\t\ti.putExtra(\"name\", txt_name.getText().toString());\r\n\t\t\t\ti.putExtra(\"phone\", txt_phone.getText().toString());\r\n\t\t\t\ti.putExtra(\"otp\", val+\"\");\r\n\t\t\t\t\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t}", "public String generaNumPatente() {\n String numeroPatente = \"\";\r\n try {\r\n int valorRetornado = patenteActual.getPatCodigo();\r\n StringBuffer numSecuencial = new StringBuffer(valorRetornado + \"\");\r\n int valRequerido = 6;\r\n int valRetorno = numSecuencial.length();\r\n int valNecesita = valRequerido - valRetorno;\r\n StringBuffer sb = new StringBuffer(valNecesita);\r\n for (int i = 0; i < valNecesita; i++) {\r\n sb.append(\"0\");\r\n }\r\n numeroPatente = \"AE-MPM-\" + sb.toString() + valorRetornado;\r\n } catch (Exception ex) {\r\n LOGGER.log(Level.SEVERE, null, ex);\r\n }\r\n return numeroPatente;\r\n }", "public String createPassword() {\n String alphabet= \"abcdefghijklmnopqrstuvwxyz\";\n int count=0;\n String randomPass=\"\";\n while (count<this.length){\n randomPass+=alphabet.charAt(this.randomNumber.nextInt(alphabet.length()-1));\n count++;\n }\n return randomPass;\n }", "public String generate() {\r\n String result = RandomStringUtils.random(8,true,true);\r\n return result;\r\n }", "@GetMapping(\"getotp\")\n\tpublic String sendOTP(@RequestParam String email,@RequestParam String otp) {\n\t\t\n\t\tString message = \"\"+otp;\n\t\temailServices.sendEmail(email, \"Password Reset : OTP\", \"toger\");\n\t\t\n\t\treturn null;\n\t}", "@Override\n public Response emailotpGeneratePost(OTPGenerationRequest otpGenerationRequest) {\n\n String userId = StringUtils.trim(otpGenerationRequest.getUserId());\n try {\n GenerationResponseDTO responseDTO = EndpointUtils.getEmailOTPService().generateEmailOTP(userId);\n OTPGenerateResponse response = new OTPGenerateResponse()\n .transactionId(responseDTO.getTransactionId())\n .emailOtp(responseDTO.getEmailOTP());\n return Response.ok(response).build();\n } catch (EmailOtpClientException e) {\n return EndpointUtils.handleBadRequestResponse(e, log);\n } catch (EmailOtpException e) {\n return EndpointUtils.handleServerErrorResponse(e, log);\n } catch (Throwable e) {\n return EndpointUtils.handleUnexpectedServerError(e, log);\n }\n }", "private String getTOTPCode(String secretKey){\n Base32 base32 = new Base32();\n byte[] bytes = base32.decode(secretKey);\n String hexKey = Hex.encodeHexString(bytes);\n\n return TOTP.getOTP(hexKey);\n }", "private String generateNewPassword() throws Exception\n {\n if(this.weblisketSession != null && \n this.weblisketSession.getId() != null)\n {\n int startIndex = this.weblisketSession.getId().length();\n if(startIndex >= 8)\n {\n return this.weblisketSession.getId().substring(startIndex - 8);\n }\n else\n {\n throw new Exception(\"Error Generating New Password\");\n }\n }\n else\n {\n throw new Exception(\"No Session Available For Generating New Password\");\n }\n }", "private String newPassword() {\n\t\tchar[] vet = new char[10];\n\t\tfor(int i=0; i<10; i++) {\n\t\t\tvet[i] = randomChar();\n\t\t}\n\t\treturn new String(vet);\n\t}", "public String generatePassword() {\n List<char[]> allAllowed = new ArrayList<>();\n if (uppercase) {\n allAllowed.add(UPPERCASE);\n }\n if (lowercase) {\n allAllowed.add(LOWERCASE);\n }\n if (numbers) {\n allAllowed.add(NUMBERS);\n }\n if (symbols) {\n allAllowed.add(SYMBOLS);\n }\n\n //Use cryptographically secure random number generator\n Random random = new SecureRandom();\n\n StringBuilder password = new StringBuilder();\n\n // Random chars\n for (int i = 0; i < length - allAllowed.size(); i++) {\n char[] characterType = allAllowed.get(random.nextInt(allAllowed.size()));\n password.append(characterType[random.nextInt(characterType.length)]);\n }\n\n //Ensure password policy is met by inserting required random chars in random positions\n for (char[] category : allAllowed) {\n password.insert(random.nextInt(password.length()), category[random.nextInt(category.length)]);\n }\n return password.toString();\n }", "private String getRandomPIN(int num) {\n\t\tStringBuilder randomPIN = new StringBuilder();\n\t\tfor (int i = 0; i < num; i++) {\n\t\t\trandomPIN.append((int) (Math.random() * 10));\n\t\t}\n\t\treturn randomPIN.toString();\n\t}", "public String generate(String user_id) {\n\t\t\n\t\tbyte[] buffer = new byte[5 + 5 * 5];\n\t\tnew Random().nextBytes(buffer);\n\t\tBase32 codec = new Base32();\n\t\tbyte[] secretKey = Arrays.copyOf(buffer, 10);\n\t\tbyte[] bEncodedKey = codec.encode(secretKey);\n\n\t\treturn new String(bEncodedKey);\n//\t\tString url = getQRBarcodeURL(user_id, HOST, encodedKey);\n/*\t\t\n \t\ttry {\n\t\t\tconn = dataSrc.getConnection();\n\t\t\tpreStmt = conn.prepareStatement(UpdateOTPKeyQuery);\n\t\t\tpreStmt.setString(1, encodedKey);\n\t\t\tpreStmt.setString(2, user_id);\n\t\t\tret = preStmt.executeUpdate();\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif(preStmt != null) preStmt.close();\n\t\t\t\tif(conn != null) conn.close();\n\t\t\t}catch(Exception e2) {\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t// Google OTP 앱에 userName@hostName 으로 저장됨\n\t\t// key를 입력하거나 생성된 QR코드를 바코드 스캔하여 등록\n\t\tmap.put(\"encodedKey\", encodedKey);\n\t\tmap.put(\"url\", url);\n\t\t*/\n//\t\treturn map;\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tSupplier<String>randomPassword=()->{\r\n\t\t\t\r\n\t\t\tString otp=\"\";\r\n\t\t\t\r\n\t\t\tSupplier<Integer>digit=()->(int)(Math.random()*10);\r\n\t\t\t\r\n\t\t\tString symbol=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ@#$\";\r\n\t\t\tSupplier<Character>character=()->symbol.charAt((int)(Math.random()*29));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i=0;i<=8;i++) {\r\n\t\t\t\tif(i%2==1) {\r\n\t\t\t\t\totp=otp+digit.get();\r\n\t\t\t\t}else {\r\n\t\t\t\t\totp=otp+character.get();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn otp;\r\n\t\t};\r\n\t\t\r\n\t\tSystem.out.println(\"Your 8 digit otp is :\"+randomPassword.get());\r\n\r\n\t}", "public String generateNumber(int length) {\n int maxNumber = Integer.parseInt(new String(new char[length]).replace(\"\\0\", \"9\"));\n int intAccountNumber = ThreadLocalRandom.current().nextInt(0, maxNumber + 1);\n int accountNumberLength = String.valueOf(intAccountNumber).length();\n StringBuilder stringBuilder = new StringBuilder();\n if (accountNumberLength < length) {\n stringBuilder.append(new String(new char[length - accountNumberLength]).replace(\"\\0\", \"0\"));\n }\n stringBuilder.append(intAccountNumber);\n return stringBuilder.toString();\n }", "public String getRandomNumberString() {\n Random rnd = new Random();\n int number = rnd.nextInt(899999) + 100000;\n\n // this will convert any number sequence into 6 character.\n String formatted_code = String.format(\"%06d\", number);\n\n return formatted_code;\n }", "public String generateTrackingNumber() {\n String randChars = \"ABCDEFGHIJ0123456789\";\n StringBuilder trackingNumber = new StringBuilder();\n Random rand = new Random();\n \n while(trackingNumber.length() < 12) {\n int i = (int) (rand.nextFloat() * randChars.length());\n trackingNumber.append(randChars.charAt(i));\n }\n String trackingNum = trackingNumber.toString();\n return trackingNum;\n }", "private String generate_uuid() {\n\n int random_length = 12;\n int time_length = 4;\n\n byte[] output_byte = new byte[random_length+time_length];\n\n //12 byte long secure random\n SecureRandom random = new SecureRandom();\n byte[] random_part = new byte[random_length];\n random.nextBytes(random_part);\n System.arraycopy(random_part, 0, output_byte, 0, random_length);\n\n //merged with 4 less significant bytes of time\n long currentTime = System.currentTimeMillis();\n for (int i=random_length; i<output_byte.length; i++){\n output_byte[i] = (byte)(currentTime & 0xFF);\n currentTime >>= 8;\n }\n\n //Converted to base64 byte\n String output = Base64.encodeBase64String(output_byte);\n Log.debug_value(\"UUID\", output);\n return output;\n\n }", "private String creatNewText() {\n\t\tRandom rnd = new Random();\n\t\treturn \"Some NEW teXt U9\" + Integer.toString(rnd.nextInt(999999));\n\t}", "public static String generateTOTP512(String key, int returnDigits) throws GeneralSecurityException {\n Calendar currentDateTime = getCalendar();\n long timeInMilis = currentDateTime.getTimeInMillis();\n\n String steps = \"0\";\n long T = (timeInMilis - TIME_ZERO) / TIME_SLICE_X;\n steps = Long.toHexString(T).toUpperCase();\n\n // Just get a 16 digit string\n while (steps.length() < 16)\n steps = \"0\" + steps;\n return TOTP.generateTOTP512(key, steps, returnDigits);\n }", "private String getTempPassword(int length) {\r\n\t\tRandom rand = new Random(9845936902l);\r\n\t\tchar[] buf = new char[length];\r\n\t\tfor (int idx = 0; idx < buf.length; ++idx)\r\n\t\t\tbuf[idx] = symbols[rand.nextInt(symbols.length)];\r\n\t\treturn new String(buf);\r\n\t}", "public String generatePassword(int size) {\n\n int wordIndx = getRandomWord();\n String newPassword = threeCharWords.get(wordIndx);\n return newPassword + getRandomNumber(size);\n\n\n }", "public String generateTransferencia() {\n\n MSequence seq = new MSequence(getCtx(), 5000048, get_TrxName());\n\n return Integer.toString(seq.getCurrentNext());\n }", "public void generateNewSecret() {\r\n \r\n //Get Random Number With Correct Digits\r\n int intRand = randomNumberGenerator.nextInt((int)(Math.pow(10, numDigits) - Math.pow(10, numDigits - 1))) + (int)Math.pow(10, numDigits - 1);\r\n \r\n //Set To String\r\n String strRand = String.valueOf(intRand);\r\n \r\n //Set Value\r\n secretNumber = convertNumToDigitArray(strRand);\r\n \r\n }", "public String generateAccountNumber() {\n // Set First part of AccountNumber\n String accountNumberFirst = \"1398\";\n\n // To Make Second, Third part Get each date and time\n String currentTime = getCurrentTime();\n\n // Get year, month, day\n String date = currentTime.split(\" \")[0];\n int year, month, day;\n year = Integer.parseInt(date.split(\"-\")[0]);\n month = Integer.parseInt(date.split(\"-\")[1]);\n day = Integer.parseInt(date.split(\"-\")[2]);\n\n // Get hour, minute, second\n String time = currentTime.split(\" \")[1];\n int hour, minute, second;\n hour = Integer.parseInt(time.split(\":\")[0]);\n minute = Integer.parseInt(time.split(\":\")[1]);\n second = Integer.parseInt(time.split(\":\")[2]);\n\n // Set Second part of AccountNumber\n String accountNumberSecond;\n accountNumberSecond = Integer.toString((year % 10)) + Integer.toString((month * second) % 10) + Integer.toString((day * minute + hour) % 10);\n\n // Set Third part of AccountNumber\n String accountNumberThird;\n accountNumberThird = Integer.toString((second * hour + minute) % 10) + Integer.toString((second * day + hour) % 10) + Integer.toString((day * month + second) % 10) + Integer.toString((second * minute + day) % 10);\n\n // Set Forth part of AccountNumber\n String accountNumberForth;\n int count = (int)accountDataRepository.count();\n if(count % 100 < 10) {\n accountNumberForth = \"0\" + Integer.toString(count % 100);\n }\n else {\n accountNumberForth = Integer.toString(count % 100);\n }\n\n // Generate AccountNumber\n String accountNumber = accountNumberFirst + \"-\" + accountNumberSecond + \"-\" + accountNumberThird + \"-\" + accountNumberForth;\n\n return accountNumber;\n }", "public static void main(String[] args) {\n\t\tString input=new Scanner(System.in).nextLine();\n\t\tSystem.out.println(otp(input));\n\n\t}", "private String generatePass(int passwdLength, int minDigits, List<Boolean> options)\n {\n PasswordGenerator pg = new PasswordGenerator(passwdLength, minDigits, options);\n\n return pg.generatePasswd();\n }", "private synchronized static String getNextNumber() {\n String toReturn;\n String number = String.valueOf(Math.round(Math.random() * 89999) + 10000);\n if(meetings.containsKey(number)) {\n toReturn = getNextNumber();\n } else {\n toReturn = number;\n }\n return toReturn;\n }", "private String generateNewCallId()\n {\n\n\t\t// Generate the variant number\n\t\tint variable = NumberUtils.getIntRandom();\n\n\t\t// Convert to hex value\n\t\tString hex = NumberUtils.toHexValue(variable);\n\n\t\t// Compose the final call id\n\t\treturn \"{2B073406-65D8-A7B2-5B13-B287\" + hex + \"}\";\n\t}", "public void generateCode() {\n code = java.util.UUID.randomUUID().toString();\n }", "private static String getRandString() {\r\n return DigestUtils.md5Hex(UUID.randomUUID().toString());\r\n }", "private int aleatorizarNumero() {\n\t\tint aux;\n\t\taux = r.getIntRand(13) + 1;\n\t\treturn aux;\n\t}", "public String generatePassword(Node node);", "public static long generateCode() {\n long code = (long) (100000 + Math.random() * 899999l);\n return code;\n }", "public static String generateCoupon() {\n \t\t// choose a Character random from this String\n\t\tString availableCharacters = \"ABCDEFGHIJKLMNPQRSTUVWXYZ\" + \"123456789\";\n\t\t// create StringBuffer \n\t\tStringBuilder sb = new StringBuilder(5);\n\t\tfor (int i = 0; i < 15; i++) {\n\t\t\t// generate a random number\n\t\t\tdouble indexDouble = availableCharacters.length() * Math.random();\n\t\t\tint index = (int)Math.round(indexDouble);\n\t\t\tif(index > 0 && index < 33) {\n\t\t\t\tsb.append(availableCharacters.charAt(index));\n\t\t\t}\n\t\t}\n\t\treturn sb.toString().substring(0,10);\t\t\n\t}", "public static String createRandomNum() {\n\t\tlogger.debug(\"Navigating to URL\");\n\t\tString num = \"\";\n\t\ttry {\n\t\t\tnum = RandomStringUtils.random(4, true, true);\n\t\t\tlogger.debug(\"Generated Random Number is : \" + num);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn num;\n\t}", "public static String randomNumberString() {\n\r\n Random random = new Random();\r\n int i = random.nextInt(999999);\r\n\r\n\r\n return String.format(\"%06d\", i);\r\n }", "public static String generate4DigitPin() {\n\t\tString longTime = String.valueOf(Calendar.getInstance().getTimeInMillis());\n\t\tint len = longTime.length();\n\n\t\treturn longTime.substring(len - 4);\n\t}", "public static String generateID(int num){\n StringBuilder str=new StringBuilder();//定义变长字符串\n Random random=new Random();\n for (int i = 0; i < num; i++) {\n str.append(random.nextInt(10));\n }\n return str.toString();\n }", "public static String generateToken() {\n return new Generex(PatternValidator.TOKEN_PATTERN).random();\n }", "public static String generateRandomInteger() {\n SecureRandom random = new SecureRandom();\n int aStart = 1;\n long aEnd = 999999999;\n long range = aEnd - (long) aStart + 1;\n long fraction = (long) (range * random.nextDouble());\n long randomNumber = fraction + (long) aStart;\n return String.valueOf(randomNumber);\n }", "public void sendMail() {\n String email = emailID.getText().toString();\n String subject = \"BlueBucket One-Time OTP\";\n otp=generateOTP();\n String message = \"\"+otp;\n\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }", "public static String generatePlate() {\n\t\t\n\t\tString s = \"\";\n\t\t\n\t\tfor (int i=0; i < 3; i++)\n\t\t\ts += generateLetter();\n\t\t\n\t\ts += '-';\n\t\t\n\t\tfor (int i=0; i < 4; i++)\n\t\t\ts += generateDigit();\n\t\t\n\t\treturn s;\n\t}", "public static int getRandomNumberString() {\n // It will generate 6 digit random Number.\n // from 0 to 999999\n Random rnd = new Random();\n int number = rnd.nextInt(999999);\n\n // this will convert any number sequence into 6 character.\n return number;\n }", "private String genNewAccountNumber(int clientId) {\r\n\t\t// keep 4 digits\r\n\t\tint acNumber = clientId * 1000 + (int) (Math.random() * 900);\r\n\t\treturn String.valueOf(acNumber);\r\n\t}", "public static String randomNumberGenerator() {\r\n\t\tint max = 999999999; // e.g. 714053349 (9 digits)\r\n\t\tRandom rand = new Random();\r\n\t\tint min = 0;\r\n\t\tint randomNum = rand.nextInt(max - min + 1) + min;\r\n\t\treturn Integer.toString(randomNum);\r\n\t}", "private\tString\tgenerateUUID(){\n\t\treturn\tUUID.randomUUID().toString().substring(0, 8).toUpperCase();\n\t}", "public String generatePhoneId() {\n String device = Build.DEVICE.equals(\"generic\") ? \"emulator\" : Build.DEVICE;\n String network = getNetwork();\n String carrier = (network == NETWORK_WIFI) ?\n getWifiCarrierName() : getTelephonyCarrierName();\n\n StringBuilder stringBuilder = new StringBuilder(ANDROID_STRING);\n stringBuilder.append('-').append(device).append('_')\n .append(Build.VERSION.RELEASE).append('_').append(network)\n .append('_').append(carrier).append('_').append(getTelephonyPhoneType())\n .append('_').append(isLandscape() ? \"Landscape\" : \"Portrait\");\n\n return stringBuilder.toString();\n }", "public static final String generateOrderId() {\n return generateOrderId(RANDOM.nextInt(1000));\n }", "public String generateToken(String username) {\n\t\tString token = username;\n\t\tLong l = Math.round(Math.random()*9);\n\t\ttoken = token + l.toString();\n\t\treturn token;\n\t}", "private String createRandCode() {\n final String ALPHA_STRING = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n StringBuilder builder = new StringBuilder();\n int cnt = CODE_LEN;\n while (cnt-- != 0) {\n int charPos = (int) (Math.random()*ALPHA_STRING.length());\n builder.append(ALPHA_STRING.charAt(charPos));\n }\n Log.i(\"GameCode\", \"createRandCode: \" + builder.toString());\n return builder.toString();\n }", "String generateUID();", "protected String generateKey(){\n Random bi= new Random();\n String returnable= \"\";\n for(int i =0;i<20;i++)\n returnable += bi.nextInt(10);\n return returnable;\n }", "private final String getRandomString() {\n StringBuffer sbRan = new StringBuffer(11);\n String alphaNum = \"1234567890abcdefghijklmnopqrstuvwxyz\";\n int num;\n for (int i = 0; i < 11; i++) {\n num = (int) (Math.random() * (alphaNum.length() - 1));\n sbRan.append(alphaNum.charAt(num));\n }\n return sbRan.toString();\n }", "public void makePassword() {\n String str = \"\";\r\n StringBuilder strBuilder = new StringBuilder(str);\r\n Random generator = new Random();\r\n int[] senha = new int[6];\r\n for (int i = 0; i < 6; i++) {\r\n senha[i] = generator.nextInt(10);\r\n strBuilder.append(Integer.toString(senha[i]));\r\n }\r\n str = strBuilder.toString();\r\n this.setPassword(str);\r\n //passwordList.add(l);\r\n }", "public static String generateNewPassword(String toMail){\n String newPassword = genString(); //generate a new password\n String newPasswordText = \"Hello, your new password for Household Manager is: \"+newPassword+\n \"\\n Please log in and change your password. You can do this by pressing 'My Profile'->'Edit Profile'\";\n sendMail(toMail,newPasswordText); //Send the new password to the users email.\n return newPassword; //return the new password\n }", "public String createVerificationCode() {\n\t\tverification = VerificationCode.generateWord();\r\n\t\treturn verification;\r\n\t}", "public void generateRandomPassword() {\n\t\tString randomPassword = \"\";\n\t\tchar[] chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\".toCharArray();\n\t\tjava.util.Random random = new java.util.Random();\n\t\tfor (int i = 0; i < 20; i++) {\n\t\t char c = chars[random.nextInt(chars.length)];\n\t\t randomPassword += c;\n\t\t}\n\t\tthis.password = randomPassword;\n\t}", "public static String generateRoomCode(int length) {\n StringBuilder result = new StringBuilder(length);\n for (int i = 0; i < length; ++i) {\n result.append((char)('A' + Math.floor(Math.random() * 26)));\n }\n return result.toString();\n }", "protected String generatePassword(int bytes) {\n \n Random r = new SecureRandom();\n byte[] tempBytes = new byte[bytes];\n r.nextBytes(tempBytes);\n return Base64.getEncoder().encodeToString(tempBytes);\n\n }", "private String newCode(int length) {\n Random rnd = new SecureRandom();\n StringBuilder code = new StringBuilder(length);\n do {\n code.setLength(0);\n while (code.length() < length) {\n if (rnd.nextBoolean()) { // append a new letter or digit?\n char letter = (char) ('a' + rnd.nextInt(26));\n code.append(rnd.nextBoolean() ? Character.toUpperCase(letter) : letter);\n } else {\n code.append(rnd.nextInt(10));\n }\n }\n } while (exists(code.toString()));\n return code.toString();\n }", "private static String generateRandomString(int size) {\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < size / 2; i++) sb.append((char) (64 + r.nextInt(26)));\n return sb.toString();\n }", "public static String generateResetCode() {\n return RandomStringUtils.randomNumeric(RESET_CODE_DIGIT_COUNT);\n }", "public String generateString() {\n List<Trip<String, String, String>> sequence = super.generateSequence(startTrip, endTrip);\n sequence = sequence.subList(1, sequence.size()-1);\n String generated = \"\";\n for (int i = 0; i<sequence.size()-2; i++) generated += sequence.get(i).getThird() + \" \";\n return generated.substring(0, generated.length()-1);\n }", "public String generateCustomer_Id() {\n\t\tString customer_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\twhile (registerDao.checkCustomerIdIfExist(customer_Id)) {\n\t\t\tcustomer_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\t}\n\t\treturn customer_Id;\n\t}", "private String createId() {\n int idLength = 5;\n String possibleChars = \"1234567890\";\n Random random = new Random();\n StringBuilder newString = new StringBuilder();\n\n for (int i = 0; i < idLength; i++) {\n int randomInt = random.nextInt(10);\n newString.append(possibleChars.charAt(randomInt));\n }\n\n return newString.toString();\n }", "@Override\n public void onCodeSent(String s, PhoneAuthProvider.ForceResendingToken forceResendingToken) {\n super.onCodeSent(s, forceResendingToken);\n // when we receive the OTP it\n // contains a unique id which\n // we are storing in our string\n // which we have already created.\n verificationId = s;\n }", "private String generateOrderNumber() {\n return OBJ_PREFIX + ID_GENERATOR.getAndIncrement();\n }", "private String genSenderID(String phoneNumber) {\r\n String sid = phoneNumber.replaceAll(senderIDRegex, \"\");\r\n return sid.length() > 11 ? sid.substring(sid.length() - 11, sid.length()) : sid;\r\n }", "public String generateLink_Id() {\n\t\tString Link_Id = \"L\" + String.valueOf(rand.genRandomDigits(7));\n\t\twhile (registerDao.checkLinkIdIfExist(Link_Id)) {\n\t\t\tLink_Id = \"C\" + String.valueOf(rand.genRandomDigits(7));\n\t\t}\n\t\treturn Link_Id;\n\t}", "public void verifyOTP() {\n HashMap<String, String> commonParams = new CommonParams.Builder()\n .add(AppConstant.KEY_COUNTRY_CODE, mCountryCode)\n .add(AppConstant.KEY_PHONE, mPhoneno)\n .add(AppConstant.KEY_OTP, mOTP).build().getMap();\n ApiInterface apiInterface = RestClient.getApiInterface();\n apiInterface.userVerifyOTP(\"bearer\" + \" \" + CommonData.getAccessToken(), commonParams)\n .enqueue(new ResponseResolver<CommonResponse>(OtpActivity.this, true, true) {\n @Override\n public void success(final CommonResponse commonResponse) {\n Log.d(\"debug\", commonResponse.getMessage());\n\n }\n\n @Override\n public void failure(final APIError error) {\n Log.d(\"debug\", error.getMessage());\n\n }\n });\n }", "public String createRegisterVerificationCode() {\n\t\tregisterVerification = VerificationCode.generateWord();\r\n\t\treturn registerVerification;\r\n\t}", "public static String createPassword()\r\n\t{\r\n\t\treturn getRandomPwd(4);\r\n\t}" ]
[ "0.7991348", "0.7828995", "0.7665652", "0.7566208", "0.7539688", "0.6972956", "0.6965129", "0.68898916", "0.6775808", "0.67721784", "0.66475844", "0.6635806", "0.6629027", "0.66252786", "0.65377647", "0.65203375", "0.6444745", "0.64400876", "0.642678", "0.6407414", "0.6396706", "0.6345254", "0.6332605", "0.6252236", "0.6249298", "0.62360317", "0.622167", "0.62171984", "0.61812925", "0.6170735", "0.6132408", "0.6105133", "0.6085296", "0.6075165", "0.6063655", "0.6046353", "0.60340124", "0.6025865", "0.59940684", "0.5989708", "0.59840256", "0.598312", "0.59733385", "0.59514034", "0.5947507", "0.5940982", "0.5922576", "0.59004253", "0.5876186", "0.5873771", "0.5871733", "0.586834", "0.5854624", "0.5849574", "0.5837878", "0.5832589", "0.58303976", "0.5820242", "0.5817868", "0.58108395", "0.5782723", "0.57790416", "0.57782245", "0.57640034", "0.57467425", "0.5739528", "0.57385737", "0.5735576", "0.5733936", "0.57299525", "0.5725419", "0.57248074", "0.57238954", "0.57235444", "0.57195437", "0.57137215", "0.5698463", "0.5677093", "0.5671406", "0.5663292", "0.565334", "0.5649584", "0.564929", "0.56400245", "0.56311595", "0.56102157", "0.5603923", "0.55996364", "0.55915445", "0.5583765", "0.55799544", "0.55791825", "0.5576816", "0.55709386", "0.5569394", "0.5566307", "0.5562447", "0.5555531", "0.5551749", "0.55462044" ]
0.7596856
3
Sending out the opt
public void sendOTP(String username){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendOption() throws IOException, InterruptedException {\n Object[] pValue = { WED_ZERO.lang.getInstruct().get(1)[4], WED_ZERO.lang.getInstruct().get(1)[5]};\n Object selectedValue = JOptionPane.showInputDialog(null,\n WED_ZERO.lang.getInstruct().get(1)[3], WED_ZERO.lang.getInstruct().get(1)[0], JOptionPane.INFORMATION_MESSAGE, null, pValue, pValue[0]);\n if(selectedValue==null)\n return;\n if(selectedValue.equals(pValue[0])) {\n this.processButtonState();\n if(Button.size()==0) {\n JOptionPane.showMessageDialog(Launch.frame, WED_ZERO.lang.getInstruct().get(1)[32]);\n return;\n }\n Object[] o2={WED_ZERO.lang.getInstruct().get(1)[7], WED_ZERO.lang.getInstruct().get(1)[8]};\n selectedValue = JOptionPane.showInputDialog(null,\n WED_ZERO.lang.getInstruct().get(1)[33], WED_ZERO.lang.getInstruct().get(1)[0], JOptionPane.INFORMATION_MESSAGE, null, o2, o2[0]);\n \n if(selectedValue==null) {\n this.sendOption();\n } else if(selectedValue.equals(o2[0])) {\n this.sendLAN();\n this.resetButton();\n } else if(selectedValue.equals(o2[1])) {\n this.compileFile();\n this.resetButton();\n }\n } else if(selectedValue.equals(pValue[1])) {\n Object[] o2={WED_ZERO.lang.getInstruct().get(1)[7], WED_ZERO.lang.getInstruct().get(1)[8]};\n selectedValue = JOptionPane.showInputDialog(null,\n WED_ZERO.lang.getInstruct().get(1)[6], WED_ZERO.lang.getInstruct().get(1)[0], JOptionPane.INFORMATION_MESSAGE, null, o2, o2[0]);\n if(selectedValue==null) {\n this.sendOption();\n } else if(selectedValue.equals(o2[0])) {\n this.recieveData();\n } else if(selectedValue.equals(o2[1])) {\n this.readFile();\n }\n }\n }", "void doOption(Option<T> opt) {\r\n\t\t\t\t\t\t\t\twriteLock.lock();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tbuffer.add(opt);\r\n\t\t\t\t\t\t\t\t\tPair<Integer, List<Option<T>>> of = Pair.of(buffer.size(), buffer);\r\n\t\t\t\t\t\t\t\t\tfor (SingleLaneExecutor<Pair<Integer, List<Option<T>>>> l : listeners) {\r\n\t\t\t\t\t\t\t\t\t\tl.add(of);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} finally {\r\n\t\t\t\t\t\t\t\t\twriteLock.unlock();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}", "void doOption(Option<T> opt) {\r\n\t\t\t\t\t\t\t\twriteLock.lock();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tbuffer.add(opt);\r\n\t\t\t\t\t\t\t\t\tfor (SingleLaneExecutor<Integer> l : listeners) {\r\n\t\t\t\t\t\t\t\t\t\tl.add(buffer.size());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} finally {\r\n\t\t\t\t\t\t\t\t\twriteLock.unlock();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}", "void doOption(Option<T> opt) {\r\n\t\t\t\t\t\t\t\twriteLock.lock();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tbuffer.add(opt);\r\n\t\t\t\t\t\t\t\t\tfor (SingleLaneExecutor<Integer> l : listeners) {\r\n\t\t\t\t\t\t\t\t\t\tl.add(buffer.tail());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} finally {\r\n\t\t\t\t\t\t\t\t\twriteLock.unlock();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}", "public void optionToWire(DNSOutput out) {\n out.writeByteArray(this.data);\n }", "void doOption(Option<T> opt) {\r\n\t\t\t\t\t\t\t\twriteLock.lock();\r\n\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\tbuffer.add(opt);\r\n\t\t\t\t\t\t\t\t\tPair<Integer, CircularBuffer<Option<T>>> of = Pair.of(buffer.tail(), buffer);\r\n\t\t\t\t\t\t\t\t\tfor (SingleLaneExecutor<Pair<Integer, CircularBuffer<Option<T>>>> l : listeners) {\r\n\t\t\t\t\t\t\t\t\t\tl.add(of);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} finally {\r\n\t\t\t\t\t\t\t\t\twriteLock.unlock();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}", "public void printOptions() {\n\t\t\n\t}", "String getOption();", "@Override\n\tpublic IKeyword option() { return option; }", "@Override\n\tprotected void lancerOption(int i) {\n\t\t\n\t}", "public void setOptions(){\n System.out.println(\"¿Que operacion desea realizar?\");\n System.out.println(\"\");\n System.out.println(\"1- Consultar sus datos\");\n System.out.println(\"2- Ingresar\");\n System.out.println(\"3- Retirar\");\n System.out.println(\"4- Transferencia\");\n System.out.println(\"5- Consultar saldo\");\n System.out.println(\"6- Cerrar\");\n System.out.println(\"\");\n}", "public int getOption() {\n return option;\n }", "public int getOption() {\n return option;\n }", "public String getOption()\r\n {\r\n return ((COSString)option.getObject( 0 ) ).getString();\r\n }", "public void action() {\n\t\tfor(int i=0; i<facade.getServiceOptions().getOptionsList().size();i++){\n\t\t\tReader reader= new Reader(facade.getOptionsList().get(i));\n\t\t\treader.print();\n\t\t}\n\t}", "public String SelectOption(String option) {\n int intOption = ValidateOption(option);\n String optionOutput = \"\";\n switch (intOption) {\n case 0:\n return QuitAppMessage;\n case 1:\n optionOutput = CheckoutOutputMessage;\n break;\n case 2:\n optionOutput = CheckoutMovieOutputMessage;\n break;\n case 3:\n optionOutput = ReturnOutputMessage;\n break;\n default:\n return InvalidOptionMessage;\n }\n\n return optionOutput;\n\n }", "private static void viewOptions() {\n\t\tlog.info(\"Enter 0 to Exit.\");\n\t\tlog.info(\"Enter 1 to Login.\");\n\t}", "private void deliverOptions()\n {\n int counter = 0;\n for(Option choice : options){\n counter++;\n System.out.println(\"#\" + counter + \" \" + choice.getText());\n }\n }", "@Override\n public boolean setOption( ControlOption tempTlv ){ \n\n boolean retVal = true; \n if( !super.setOption(tempTlv)){\n \n byte[] theValue = tempTlv.getValue();\n switch( tempTlv.getType()){\n case OPTION_SOCKS_OPERATION:\n theSocksOperation = theValue[0];\n break;\n case OPTION_HANDLER_ID:\n theHandlerId = SocketUtilities.byteArrayToInt(theValue);\n break;\n default:\n retVal = false;\n break;\n } \n }\n return retVal;\n }", "public String optionToString() {\n return new StringBuffer().append(\"<\").append(base16.toString(this.data)).append(\">\").toString();\n }", "public boolean sendAnalystOptions (GUICalcProgressBar progress, RJGUIController.XferAnalystView xfer) {\n\n\t\t// Make the analyst options\n\n\t\tAnalystOptions anopt = make_analyst_options (xfer);\n\n\t\t// Send to server\n\n\t\tString event_id = fcmain.mainshock_event_id;\n\t\tboolean f_disable = (xfer.x_autoEnableParam == AutoEnable.DISABLE);\n\n\t\tboolean f_success = ServerCmd.gui_send_analyst_opts (progress, event_id, f_disable, anopt);\n\n\t\treturn f_success;\n\t}", "public void printOptions() {\n String indent = \" \";\n System.out.println();\n System.out.println(\"+--------------------------- COMMANDS AND OPTIONS LIST ---------------------------+\");\n\n System.out.println();\n System.out.println(\"******* COMMANDS (scraper.[COMMAND]) *******\");\n System.out.println(\"The following interact with the RegistrationScraper class\");\n System.out.println();\n \n\n System.out.println();\n System.out.println(\"iterateAll() --> Scrape every SDSU department's class and store the data [Recommended before: printDepartmentCourses()]\");\n System.out.println(indent + \"@usage iterateAll()\");\n\n System.out.println();\n System.out.println(\"iterateOne() --> Scrape ONE department's class and store the data [Recommended before: printDepartmentCourses()]\");\n System.out.println(indent + \"@usage iterateOne(\\\"CS\\\")\");\n System.out.println(indent + \"@param department\");\n\n System.out.println();\n System.out.println(\"printDepartmentCourses() --> Display a formatted list of every stored class so far\");\n System.out.println(indent + \"@usage printDepartmentCourses()\");\n\n System.out.println();\n System.out.println(\"printArrListSizes() --> Display the sizes of all the data (to make sure they're all the same length)\");\n System.out.println(indent + \"@usage printArrListSizes()\");\n \n\n System.out.println();\n System.out.println(\"******* OPTIONS (custom.[COMMAND] *******\");\n System.out.println(\"The following interact with the HTML GET method\");\n System.out.println();\n \n\n System.out.println();\n System.out.println(\"setTerm() --> Set the semester term you want to search\");\n System.out.println(indent + \"@usage setTerm(\\\"Summer\\\", \\\"2017\\\")\");\n System.out.println(indent + \"@param season\");\n System.out.println(indent + indent + \"options: Fall, Spring, Winter, Summer\");\n System.out.println(indent + \"@param year\");\n System.out.println(indent + indent + \"options: 2015, 2016, 2017, etc.\");\n\n System.out.println();\n System.out.println(\"setDepartment() --> Set a single department you wish to search (use with iterateOne())\");\n System.out.println(indent + \"@usage setDepartment(\\\"CS\\\")\");\n System.out.println(indent + \"@param department\");\n System.out.println(indent + indent + \"options: AMIND, BIOL, CS, etc.\");\n\n System.out.println();\n System.out.println(\"setInstructor() --> Set the course number you want to return (ex. all \\\"xx-108\\\" classes)\");\n System.out.println(indent + \"@usage setInstructor(\\\"Kraft\\\")\");\n System.out.println(indent + \"@param last name\");\n\n System.out.println();\n System.out.println(\"setCourseNumber() --> Set the course number you want to return (ex. all \\\"xx-108\\\" classes)\");\n System.out.println(indent + \"@usage setCourseNumber(\\\"108\\\")\");\n System.out.println(indent + \"@param number\");\n\n System.out.println();\n System.out.println(\"setCourseNumber() --> Set the course number AND suffic you want to return (ex. all \\\"xx-451A\\\" classes)\");\n System.out.println(indent + \"@usage setTerm(\\\"451\\\", \\\"A\\\")\");\n System.out.println(indent + \"@param number\");\n System.out.println(indent + \"@param suffix\");\n System.out.println(indent + indent + \"options: A, B, C, etc.\");\n\n System.out.println();\n System.out.println(\"setScheduleNumber() --> Set the specific class you want to return\");\n System.out.println(indent + \"@usage setScheduleNumber(\\\"20019\\\")\");\n System.out.println(indent + \"@param number\");\n\n System.out.println();\n System.out.println(\"setUnits() --> Set the specific number of units\");\n System.out.println(indent + \"@usage setUnits(\\\"3\\\")\");\n System.out.println(indent + \"@param units\");\n\n System.out.println();\n System.out.println(\"setLocation() --> Set the facility location of the class\");\n System.out.println(indent + \"@usage setUnits(\\\"GMCS\\\")\");\n System.out.println(indent + \"@param facility\");\n\n System.out.println();\n System.out.println(\"setLocation() --> Set the facility AND room location of the class\");\n System.out.println(indent + \"@usage setUnits(\\\"GMCS\\\", \\\"311\\\")\");\n System.out.println(indent + \"@param facility\");\n System.out.println(indent + \"@param room number\");\n\n System.out.println();\n System.out.println(\"setServiceLearning() --> Toggle the 'Service Learning' option [only show Service Learning classes]\");\n System.out.println(indent + \"@usage setServiceLearning(true)\");\n System.out.println(indent + \"@param true/false\");\n\n System.out.println();\n System.out.println(\"setSpecialTopics() --> Toggle the 'Special Topics' option [only show Special Topics classes]\");\n System.out.println(indent + \"@usage setSpecialTopics(true)\");\n System.out.println(indent + \"@param true/false\");\n\n System.out.println();\n System.out.println(\"setHonors() --> Toggle the 'Honors' option [only show Honors classes]\");\n System.out.println(indent + \"@usage setHonors(true)\");\n System.out.println(indent + \"@param true/false\");\n \n System.out.println();\n System.out.println(\"setDistanceOnline() --> Toggle the 'Distance Online' option [only show Online classes]\");\n System.out.println(indent + \"@usage setDistanceOnline(true)\");\n System.out.println(indent + \"@param true/false\");\n\n System.out.println();\n System.out.println(\"setDistanceHybrid() --> Toggle the 'Distance Hybrid' option [only show Hybrid classes]\");\n System.out.println(indent + \"@usage setDistanceHybrid(true)\");\n System.out.println(indent + \"@param true/false\");\n\n System.out.println();\n System.out.println(\"setEvening() --> Toggle the 'Evening' option [only show Evening classes]\");\n System.out.println(indent + \"@usage setEvening(true)\");\n System.out.println(indent + \"@param true/false\");\n\n System.out.println();\n System.out.println(\"setMeetingType() --> Set your preferred meeting type\");\n System.out.println(indent + \"@usage setMeetingType(\\\"Lecture\\\")\");\n System.out.println(indent + \"@param type\");\n System.out.println(indent + indent + \"@options Activity, Discussion, Labratory, Lecture, \"+\n \"Nontraditional, ROTC, Seminar, Supervised\");\n \n System.out.println();\n System.out.println(\"setGenEd() --> Set the General Education requirements you want to show\");\n System.out.println(indent + \"@usage setGenEd(\\\"IIA2\\\")\");\n System.out.println(indent + \"@param true/false\");\n System.out.println(indent + indent + \"@options see general catalog\");\n\n System.out.println();\n System.out.println(\"setSession() --> Set the Summer Session you want to show\");\n System.out.println(indent + \"@usage setGenEd(\\\"S1\\\")\");\n System.out.println(indent + \"@param session\");\n System.out.println(indent + indent + \"@options S1, S2, T1\");\n\n System.out.println();\n System.out.println(\"+---------------------------------------------------------------------------------+\");\n System.out.println();\n\n }", "public void setOption( String opt )\r\n {\r\n option.set( 0, new COSString( opt ) );\r\n }", "public void testOptions() {\n OptionsOperator optionsOper = OptionsOperator.invoke();\n optionsOper.selectEditor();\n optionsOper.selectFontAndColors();\n optionsOper.selectKeymap();\n optionsOper.selectGeneral();\n // \"Manual Proxy Setting\"\n String hTTPProxyLabel = Bundle.getStringTrimmed(\n \"org.netbeans.core.ui.options.general.Bundle\", \"CTL_Use_HTTP_Proxy\");\n new JRadioButtonOperator(optionsOper, hTTPProxyLabel).push();\n // \"HTTP Proxy:\"\n String proxyHostLabel = Bundle.getStringTrimmed(\n \"org.netbeans.core.ui.options.general.Bundle\", \"CTL_Proxy_Host\");\n JLabelOperator jloHost = new JLabelOperator(optionsOper, proxyHostLabel);\n new JTextFieldOperator((JTextField) jloHost.getLabelFor()).setText(\"www-proxy.uk.oracle.com\"); // NOI18N\n // \"Port:\"\n String proxyPortLabel = Bundle.getStringTrimmed(\n \"org.netbeans.core.ui.options.general.Bundle\", \"CTL_Proxy_Port\");\n JLabelOperator jloPort = new JLabelOperator(optionsOper, proxyPortLabel);\n new JTextFieldOperator((JTextField) jloPort.getLabelFor()).setText(\"80\"); // NOI18N\n optionsOper.ok();\n }", "@Override\n protected void options()\n {\n super.options();\n addOption(Opt.APPLICATION_ID);\n addOption(Opt.SERVER_ID);\n addOption(Opt.CATEGORY);\n addOption(Opt.NAME, \"The name of the label\");\n }", "public static String options(Integer option) {\n\t\tString options = \"[status] for status - [quit] to close\";\n\t\tif(option == 1)\n\t\t\tSystem.out.println(options);\n\t\treturn options;\n\t}", "public String getOptions() {\n return this.options;\n }", "void write(StreamOption streamOpt);", "private void printOptionsMessage() {\n System.out.println(\"\\n\");\n System.out.print(\"Visible arrays: \");\n if (showArray == true) {\n System.out.println(\"On\");\n } else {\n System.out.println(\"Off\");\n }\n\n System.out.println(\"Selected Algorithms: \");\n if (selected[0] == true) {\n System.out.print(\" MergeSort\");\n }\n if (selected[1] == true) {\n System.out.print(\" QuickSort\");\n }\n if (selected[2] == true) {\n System.out.print(\" HeapSort\");\n }\n\n System.out.println();\n }", "@Test\n public void optionRequest() {\n str = METHOD_OPTION + URI_SAMPLE + \" \" + HTTP_VERSION + ENDL;\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n assertEquals(request.getMethod(), HttpMethod.OPTIONS);\n assertEquals(request.getUrn(), \"www.site.ru/news.html\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getHeader(null), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(null), \"\");\n }", "private static void printOption(){\r\n System.out.println(\"Select option what you want to do\");\r\n System.out.println(\"Input plain(default) / stylish / slide\");\r\n option = scan.nextLine();\r\n try{\r\n if(option.toLowerCase().equals(\"plain\")){\r\n }\r\n else if(option.toLowerCase().equals(\"stylish\")){\r\n }\r\n else if(option.toLowerCase().equals(\"slide\")){\r\n }\r\n else if(option.toLowerCase().equals(\"\")){\r\n option = \"plain\";\r\n }\r\n else{\r\n throw new Exception(\"Check option\\n\");\r\n }\r\n } catch(Exception e){\r\n e.printStackTrace();\r\n } finally {\r\n System.out.println(\"Option : \" + option);\r\n }\r\n }", "public String getOptInStatus() {\n return optInStatus;\n }", "public abstract Options getOptions();", "void storeOptionsFlow(OptionsFlow msg);", "public String toString()\n\t{\n\t\treturn \"connection type \" + connType + \" length \" + length + \" data \"\n\t\t\t\t+ (opt.length == 0 ? \"-\" : DataUnitBuilder.toHex(opt, \" \"));\n\t}", "@Test\n public void testOptions() throws IOException {\n\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n DataOutputStream out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(3); // count\n out.writeInt(372829489); // sys_uptime\n out.writeInt(582747597); // unix_secs\n out.writeInt(34); // package_sequence\n out.writeInt(12); // source_id\n\n // Options template 1\n out.writeShort(1); // flowset_id == 1\n out.writeShort(24); // length\n out.writeShort(258); // template_id\n out.writeShort(4); // Scope length\n out.writeShort(8); // Option length\n out.writeShort(3); // Scope field 1 type - \"Line Card\"\n out.writeShort(2); // Scope field 1 length\n out.writeShort(41); // Option field 1 type - TOTAL_PKTS_EXP\n out.writeShort(2); // Option field 1 length\n out.writeShort(42); // Option field 2 type - TOTAL_FLOWS_EXP\n out.writeShort(2); // Option field 2 length\n\n out.writeByte(0); // padding\n out.writeByte(0); // padding\n\n // Options template 2\n out.writeShort(1); // flowset_id == 1\n out.writeShort(26); // length\n out.writeShort(259); // template_id\n out.writeShort(8); // Scope length\n out.writeShort(8); // Option length\n out.writeShort(1); // Scope field 1 type - \"System\"\n out.writeShort(4); // Scope field 1 length\n out.writeShort(2); // Scope field 2 type - \"Interface\"\n out.writeShort(2); // Scope field 2 length\n out.writeShort(41); // Option field 1 type - TOTAL_PKTS_EXP\n out.writeShort(4); // Option field 1 length\n out.writeShort(42); // Option field 2 type - TOTAL_FLOWS_EXP\n out.writeShort(2); // Option field 2 length\n\n // Options data record set\n out.writeShort(259); // flowset_id == template_id 2\n out.writeShort(16); // length\n\n // Record\n out.writeInt(5);\n out.writeShort(7);\n out.writeInt(123);\n out.writeShort(3567);\n\n List<TSDRLogRecord> records = parseRecords(bos.toByteArray());\n assertEquals(1, records.size());\n\n Map<String, String> attrs = toMap(records.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(582747597L * 1000), records.get(0).getTimeStamp());\n assertEquals(\"9\", attrs.remove(\"version\"));\n assertEquals(\"372829489\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"34\", attrs.remove(\"package_sequence\"));\n assertEquals(\"12\", attrs.remove(\"source_id\"));\n\n assertEquals(\"123\", attrs.remove(\"TOTAL_PKTS_EXP\"));\n assertEquals(\"3567\", attrs.remove(\"TOTAL_FLOWS_EXP\"));\n assertEquals(\"Options record for System 5, Interface 7\", records.get(0).getRecordFullText());\n assertEmpty(attrs);\n\n // Second packet - 2 options data records\n\n bos = new ByteArrayOutputStream();\n out = new DataOutputStream(bos);\n\n // Header\n out.writeShort(9); // version\n out.writeShort(1); // count\n out.writeInt(372829490); // sys_uptime\n out.writeInt(582747598); // unix_secs\n out.writeInt(35); // package_sequence\n out.writeInt(12); // source_id\n\n // Options data record set\n out.writeShort(258); // flowset_id == template_id 1\n out.writeShort(16); // length\n\n // Record 1\n out.writeShort(1);\n out.writeShort(345);\n out.writeShort(10201);\n\n // Record 2\n out.writeShort(2);\n out.writeShort(690);\n out.writeShort(20402);\n\n records = parseRecords(bos.toByteArray());\n assertEquals(2, records.size());\n\n attrs = toMap(records.get(0).getRecordAttributes());\n assertEquals(Long.valueOf(582747598L * 1000), records.get(0).getTimeStamp());\n assertEquals(\"9\", attrs.remove(\"version\"));\n assertEquals(\"372829490\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"35\", attrs.remove(\"package_sequence\"));\n assertEquals(\"12\", attrs.remove(\"source_id\"));\n\n assertEquals(\"345\", attrs.remove(\"TOTAL_PKTS_EXP\"));\n assertEquals(\"10201\", attrs.remove(\"TOTAL_FLOWS_EXP\"));\n assertEquals(\"Options record for Line Card 1\", records.get(0).getRecordFullText());\n assertEmpty(attrs);\n\n attrs = toMap(records.get(1).getRecordAttributes());\n assertEquals(\"9\", attrs.remove(\"version\"));\n assertEquals(\"372829490\", attrs.remove(\"sys_uptime\"));\n assertEquals(\"35\", attrs.remove(\"package_sequence\"));\n assertEquals(\"12\", attrs.remove(\"source_id\"));\n\n assertEquals(\"690\", attrs.remove(\"TOTAL_PKTS_EXP\"));\n assertEquals(\"20402\", attrs.remove(\"TOTAL_FLOWS_EXP\"));\n assertEquals(\"Options record for Line Card 2\", records.get(1).getRecordFullText());\n assertEmpty(attrs);\n\n }", "public static void putOptionsTo(ByteBuffer dst, TcpTxContext tx, byte winScale) {\n\t\t\tdst.put((byte)3); // kind\n\t\t\tdst.put((byte)3); // length\n\t\t\tdst.put(winScale);\n\t\t\tdst.put((byte)0); // end of options\n\t\t\ttx.finishOptions();\t\t\t\n\t\t}", "public Map<ChannelOption<?>, Object> getOptions()\r\n/* 39: */ {\r\n/* 40: 64 */ return getOptions(\r\n/* 41: 65 */ super.getOptions(), new ChannelOption[] { ChannelOption.SO_RCVBUF, ChannelOption.SO_SNDBUF, ChannelOption.TCP_NODELAY, ChannelOption.SO_KEEPALIVE, ChannelOption.SO_REUSEADDR, ChannelOption.SO_LINGER, ChannelOption.IP_TOS, ChannelOption.ALLOW_HALF_CLOSURE });\r\n/* 42: */ }", "public Integer getOptEvent() {\n\t\treturn optEvent;\n\t}", "public String getOptionText() {\n return option;\n }", "public void setOptEvent(Integer optEvent) {\n\t\tthis.optEvent = optEvent;\n\t}", "private void processSpecialOption(ASpaceCopyUtil ascopy, String option) {\n if(option.contains(\"-refid_\")) {\n ascopy.setRefIdOption(option);\n } else if(option.contains(\"-term_\")) {\n ascopy.setTermTypeOption(option);\n }\n }", "public void setOptInStatus(String optInStatus) {\n this.optInStatus = optInStatus;\n }", "public String getValue(String opt) {\n return (String)m_commandLine.getValue(opt);\n }", "public void options() {\n\n audio.playSound(LDSound.SMALL_CLICK);\n if (canViewOptions()) {\n Logger.info(\"HUD Presenter: options\");\n uiStateManager.setState(GameUIState.OPTIONS);\n }\n }", "public char getopt() {\n\tif (opt_count >= opts.size())\n\t return OPT_EOF;\n\treturn ((Character) (opts.elementAt(opt_count++))).charValue();\n }", "private static void printRunOptions(){\n\t\tSystem.out.println(\"Run options:\");\n\t\tSystem.out.println(\" -simple <configFile> <pathToApplication> <synthesis(true/false)>\");\n\t\tSystem.out.println(\" -simpleSpeedup <configFile> <pathToApplication>\");\n\t\tSystem.out.println(\" -sweep <configFile> <pathToApplication> <sweepConfig> <parallelism(integer)> <synthesis(true/false)>\");\n\t\tSystem.out.println(\" -sweepRemote <configFile> <pathToApplication> <sweepConfig> <parallelism(integer)> <synthesis(true/false)> <hostAddress> <hostPort>\");\n\t\tSystem.out.println(\" -synthesize <configFile> <pathToApplication> <methodName> <scheduleCDFG(true/false)>\");\n\t\tSystem.out.println(\" -test <configFile> <pathToApplication>\");\n\t\tSystem.out.println(\" -speedup <configFile> <pathToApplication>\");\n\t\tSystem.out.println(\" -testCGRAVerilog <configFile> <pathToApplication>\");\n\t}", "private Tool unknownOption(String option) {\n printOutput(\"unknown option: '%s'%n\", option);\n printUsage();\n return doNothing();\n }", "Map getOptions();", "public void option() {\n ReusableActionsPageObjects.clickOnElement(driver, options, logger, \"user options.\");\n }", "private byte[] outgoingBytes() {\n\t\t// collect all options outgoing bytes.\n\t\tfor (Option o : options) {\n\t\t\toutWriter.write(o.outgoing(outStream, this));\n\t\t}\n\t\t\n\t\t// Convert to byte[] array for writing.\n\t\tbyte[] out = outStream.toByteArray();\n\t\toutStream.reset();\n\t\t\n\t\treturn out;\n\t}", "public static void selecting_opt_out_mode() throws Exception{\n\t Thread.sleep(8000);\n\t\tSwipe_Conter(10);\n\t\t Thread.sleep(10000);\n\t\t TouchAction ta=new TouchAction(Ad);\n\t\t ta.tap(480, 1369).perform();\n\t\t//Selecting Opt out mode option in privacy card\n\t\tSystem.out.println(\"Selecting Opt out mode option in privacy card\");\n\t\tlogStep(\"Selecting Opt out mode option in privacy card\");\n\t\t Thread.sleep(3000);\t\t\n\t}", "public void addOption(String opiton, boolean correct);", "public interactOption()\n\t{\n\t\tsuper();\n\t\toptionType = \"interact with the\";\n\t\toptionFocus = \"nothing\";\n\t\toptionText = optionType + \" \" + optionFocus;\n\t}", "go.micro.runtime.RuntimeOuterClass.ListOptions getOptions();", "public abstract String[] getOptions();", "private void selectPhenotype(String option) {\r\n if (option.equals(\"null\") || option.equals(currentPhenotype)){\r\n return;\r\n } \r\n \r\n setDatasets((VerifiedSNP) getController().getActiveSNP(), option);\r\n currentPhenotype = option; \r\n }", "void jmiOptions_actionPerformed(ActionEvent e) {\n logWriter.writeLog(\"Setting options.\");\n }", "private void saveOptions(HttpSession p_session,\n HttpServletRequest p_request)\n throws EnvoyServletException\n {\n SessionManager sessionMgr =\n (SessionManager)p_session.getAttribute(SESSION_MANAGER);\n\n String toField = (String)p_request.getParameter(\"toField\");\n List addedOptions = new ArrayList();\n if (toField != null && !toField.equals(\"\"))\n {\n String[] values = toField.split(\",\");\n for (int i=0; i < values.length; i++)\n {\n addedOptions.add(values[i]);\n }\n }\n // update the added options in the session manager.\n sessionMgr.setAttribute(\n WebAppConstants.ADDED_NOTIFICATION_OPTIONS, addedOptions);\n\n // now check for the options hash map\n HashMap optionsHash = (HashMap)sessionMgr.getAttribute(\"optionsHash\");\n if (optionsHash == null)\n {\n optionsHash = new HashMap();\n sessionMgr.setAttribute(\"optionsHash\", optionsHash);\n }\n\n String enabled = p_request.getParameter(\n UserParamNames.NOTIFICATION_ENABLED) == null ? \"0\" : \"1\";\n // Store the main notification flag\n optionsHash.put(UserParamNames.NOTIFICATION_ENABLED, enabled);\n // now let's set the other notification options\n List availableOptions = (List)sessionMgr.getAttribute(\n WebAppConstants.AVAILABLE_NOTIFICATION_OPTIONS);\n int size = availableOptions.size();\n for (int i = 0; i < size; i++)\n {\n String option = (String)availableOptions.get(i);\n String value = addedOptions.contains(option) ? \"1\" : \"0\";\n optionsHash.put(option, value);\n }\n }", "@Override\n @SuppressWarnings(\"static-access\")\n public void setJCLIOptions() {\n Option Help = new Option(\"h\", \"help\", false, \"Show Help.\");\n this.jcOptions.addOption(Help);\n this.jcOptions.addOption(OptionBuilder.withLongOpt(\"file\").withDescription(\"File to Convert\").isRequired(false).hasArg().create(\"f\"));\n //this.jcOptions.addOption(OptionBuilder.withLongOpt(\"outputfile\").withDescription(\"Output File\").isRequired(false).hasArg().create(\"of\"));\n OptionGroup jcGroup = new OptionGroup();\n jcGroup.addOption(OptionBuilder.withLongOpt(\"texttobinary\").withDescription(\"Convert text to Binary\").create(\"ttb\"));\n jcGroup.addOption(OptionBuilder.withLongOpt(\"binarytotext\").withDescription(\"Convert binary to text\").create(\"btt\"));\n this.jcOptions.addOptionGroup(jcGroup);\n }", "public static void options(){\n System.out.println(\"Choose from the following options \");\n System.out.println(\"0 Print the options again\");\n System.out.println(\"1 Create Student Records\");\n System.out.println(\"2 Create Teacher Records\");\n System.out.println(\"3 Edit the Records\");\n System.out.println(\"4 Get the Record Count\");\n System.out.println(\"5 Exit\");\n }", "@Override\n\tpublic List<Map> getOptions(DataMsgBus arg0) {\n\t\tHttpSession session=SessUtil.getRequest().getSession();\n\t\tMap userInfo=(Map) session.getAttribute(\"USERINFO\");\n\t\tMap m=new HashMap();\n\t\tm.put(\"ssdwid\", userInfo.get(\"unit_id\"));\n\t\tm.put(\"user_id\", userInfo.get(\"user_id\"));\n\t\tm.put(\"dict_type\", \"常用意见\");\n\t\treturn getDictService().queryDictByType(m);\n\t}", "public Hashtable<String, Object> getOptions() {\n return options;\n }", "protected void printAllOptions() {\n\t\tOption op = null;\n\t\tfor (int i = 0; i < options.size(); i++) {\n\t\t\top = options.get(i);\n\t\t\tSystem.out.println(i + \". \" + op.getOptionName() + \":Price \"\n\t\t\t\t\t+ String.format(\"%.2f\", op.getPrice()));\n\t\t}\n\t}", "public void setOptime(String optime) {\n this.optime = optime;\n }", "public FreeTOptions getOptions() {\n return this.options;\n }", "public void __printOn(TextWriter out) throws IOException {\n out.print(ErrPrefix);\n String msg = getMessage();\n if (!\"syntax error\".equals(msg)) {\n out.indent(ErrIndent).println(msg);\n }\n if (null != myOptLine) {\n out = out.indent(\" \");\n out.lnPrint(myOptLine.replaceAll(\"\\t\", \" \"));\n if (!myOptLine.endsWith(\"\\n\")) {\n out.println();\n }\n out.print(StringHelper.multiply(\" \", myStart));\n out.print(StringHelper.multiply(\"^\", myBound - myStart));\n SourceSpan optSpan = optDamage().getOptSpan();\n if (null != optSpan) {\n out.lnPrint(\"@ \" + optSpan);\n }\n }\n }", "static void printGeneralOptions(){\n System.out.println(GeneralInfo.PREFIX_COMMAND_DESCRIPTION + \"NameWeapon/Powerup: read the description of that weapon/powerup\");\n }", "private static StringBuffer addOption(StringBuffer html, DataObject o, String ln, String vn, Object val) {\r\n\t\tObject v = o.meanFieldFilter(vn) ? o.get(vn) : o.get(ln);\r\n\t\tboolean match = checkMatch(v, val);\r\n\t\treturn html.append(\"<option value=\\\"\").append(v == null ? \"\" : HttpUtils.htmlEncode(v.toString()))\r\n\t\t\t\t.append(match ? \"\\\" selected>\" : \"\\\">\")\r\n\t\t\t\t.append(o.get(ln) == null ? \"\" : HttpUtils.htmlEncode(o.get(ln).toString(), true, false))\r\n\t\t\t\t.append(\"</option>\");\r\n\t}", "public void setOut(boolean out) {\n this.out = out;\n }", "public int getOptions() {\n\t\treturn this.options;\n\t}", "@Override\n\tpublic Properties getOptions() {\n\t\treturn options;\n\t}", "public short getOptions()\n {\n return field_1_options;\n }", "@Override\n\tprotected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doOptions(req, resp);\n\t\tH5Utils.setHeaders(resp);\n\t}", "@Override\n\tprotected void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doOptions(req, resp);\n\t\tH5Utils.setHeaders(resp);\n\t}", "private void sendScreenOptionsToBrowser() {\n ScreenCap.BrowserScreenMetrics metrics = screenCap.getScreenMetrics();\n mWebkeyVisitor.sendGson(new Message(\"1\", Message.Type.SCREEN_OPTIONS, new ScreenOptionsPayload(\n metrics.getWidth(),\n metrics.getHeight(),\n metrics.getRotation(),\n hasNavBar\n )));\n }", "public void addOption() {\n CreatePollLogic.addOption(pollOptions, optionArea, optionContainer);\n }", "public void printFlightOption(int index);", "public Options getOptions() {\n return options;\n }", "@Override\n\tpublic void onDeviceOptionSuccess(FunDevice funDevice, String option) {\n\n\t}", "@Override\n protected Representation options() throws ResourceException {\n System.out.println(\"The OPTIONS method of root resource was invoked.\");\n throw new RuntimeException(\"Not yet implemented\");\n }", "public void exportAnalystOptions (RJGUIController.XferAnalystView xfer, File the_file) throws IOException {\n\n\t\t// Make the analyst options\n\n\t\tAnalystOptions anopt = make_analyst_options (xfer);\n\n\t\t// Marshal to JSON\n\n\t\tMarshalImpJsonWriter store = new MarshalImpJsonWriter();\n\t\tAnalystOptions.marshal_poly (store, null, anopt);\n\t\tstore.check_write_complete ();\n\t\tString json_string = store.get_json_string();\n\n\t\t// Write to file\n\n\t\ttry (\n\t\t\tBufferedWriter bw = new BufferedWriter (new FileWriter (the_file));\n\t\t){\n\t\t\tbw.write (json_string);\n\t\t}\n\n\t\treturn;\n\t}", "public String getDescription(String _opt){\r\n\t\treturn getOption(_opt).getDescription();\r\n\t}", "private String optionsManager() {\n\t\tSystem.out.print(\"\\nEntrez votre choix SVP: \");\n\t\tScanner scan = new Scanner(System.in);\n\t\tString option = \"\";\n\t\toption = scan.nextLine();\n\t\t\n\t\tString etatDeHotel = this.isOuvert()? \"L'Hôtel est ouvert ! \" : \"L'Hôtel n'est pas ouvert ! \";\t\t\n\t\tString doitEtreAfficher = option.equalsIgnoreCase(\"A\")? \"\\n\"+etatDeHotel+\"\\n\" \n\t\t\t\t: option.equalsIgnoreCase(\"B\")? \"\\nLe nombre de chambres réservées est: \"+ this.chambresNonVides().size()+\"\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"C\") ? \"\\nLe nombre de chambres vides est: \"+ this.chambresVides().size()+\"\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"D\")? \"\\nLe nombre de la première chambre vide est : \"+this.chambresVides().get(0).getId()+\"\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"E\")? \"\\nLe nombre de la dernière chambre vide est : \"+this.chambresVides().get(this.chambresVides().size()-1).getId()+\"\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"H\")? \"\\n-La commande Q ou Quit sont pour arrêtrer le programe.\\n-Il faut choisir un letter pour les options.\\n-La commande O pour afficher toutes les options possibles! \"\n\t\t\t\t: option.equalsIgnoreCase(\"n\")? \"----------------------------------\\nVous avez été dirigé vers le menu principale\"\n\t\t\t\t: option.equalsIgnoreCase(\"m\")? \"\\n-----------\\nMerci\\n----------------\\n\"\n\t\t\t\t: option.equalsIgnoreCase(\"q\")? \"q\"\n\t\t\t\t: option.equalsIgnoreCase(\"quit\")? \"q\"\n\t\t\t\t: option.equalsIgnoreCase(\"o\")? \"o\"\n\t\t\t\t: option.equalsIgnoreCase(\"f\")? \"f\"\n\t\t\t\t: option.equalsIgnoreCase(\"g\")? \"g\"\n\t\t\t\t:\"x\";\n\t\treturn doitEtreAfficher;\n\t}", "public void send(int highOption, int option) throws InstantiationException, IllegalAccessException, IOException, InterruptedException, ClassNotFoundException, RemoteReadException\n\t{\n\t\tint index = 0;\n\t\tClientHelloWorldBroadcastResponse broadcastResponse;\n\t\tClientHelloWorldAnycastResponse anycastResponse;\n\t\tClientHelloWorldUnicastResponse unicastResponse;\n\t\tswitch (option)\n\t\t{\n\t\t\tcase ChatOptions.TYPE_CHAT:\n\t\t\t\tSystem.out.println(\"Please type your message: \");\n\t\t\t\tString message = in.nextLine();\n\t\t\t\tswitch (highOption)\n\t\t\t\t{\n\t\t\t\t\tcase MulticastOptions.BROADCAST_NOTIFICATION:\n\t\t\t\t\t\tMulticastClient.FRONT().syncNotify(new HelloWorldBroadcastNotification(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You notification is broadcast!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.ANYCAST_NOTIFICATION:\n\t\t\t\t\t\tMulticastClient.FRONT().syncNotify(new HelloWorldAnycastNotification(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You notification is anycast!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.UNICAST_NOTIFICATION:\n\t\t\t\t\t\tMulticastClient.FRONT().syncNotify(new HelloWorldUnicastNotification(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You notification is unicast!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.BROADCAST_REQUEST:\n\t\t\t\t\t\tbroadcastResponse = (ClientHelloWorldBroadcastResponse)MulticastClient.FRONT().read(new ClientHelloWorldBroadcastRequest(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You request is broadcast!\");\n\t\t\t\t\t\tSystem.out.println(\"You got \" + broadcastResponse.getResponses().size() + \" responses\");\n\t\t\t\t\t\tfor (HelloWorldBroadcastResponse response : broadcastResponse.getResponses())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(++index + \") response = \" + response.getHelloWorld().getHelloWorld());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.UNICAST_REQUEST:\n\t\t\t\t\t\tunicastResponse = (ClientHelloWorldUnicastResponse)MulticastClient.FRONT().read(new ClientHelloWorldUnicastRequest(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You request is unicast!\");\n\t\t\t\t\t\tSystem.out.println(\"You got \" + unicastResponse.getResponses().size() + \" responses\");\n\t\t\t\t\t\tfor (HelloWorldUnicastResponse response : unicastResponse.getResponses())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(++index + \") response = \" + response.getHelloWorld().getHelloWorld());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase MulticastOptions.ANYCAST_REQUEST:\n\t\t\t\t\t\tanycastResponse = (ClientHelloWorldAnycastResponse)MulticastClient.FRONT().read(new ClientHelloWorldAnycastRequest(new HelloWorld(message)));\n\t\t\t\t\t\tSystem.out.println(\"You request is anycast!\");\n\t\t\t\t\t\tSystem.out.println(\"You got \" + anycastResponse.getResponses().size() + \" responses\");\n\t\t\t\t\t\tfor (HelloWorldAnycastResponse response : anycastResponse.getResponses())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(++index + \") response = \" + response.getHelloWorld().getHelloWorld());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase ChatOptions.QUIT_CHAT:\n\t\t\t\tbreak;\n\t\t}\n\t}", "ModuleOption option();", "private void printMenu() {\n\t\tSystem.out.println(\"Select an option :\\n----------------\");\n\t\tfor (int i = 0, size = OPTIONS.size(); i < size; i++) {\n\t\t\tSystem.out.println(OPTIONS.get(i));\n\t\t}\n\t}", "private void appendOptionText(Element option, OptionSingle os) {\r\n\t\tElement optionText = mDocument.createElement(\"OptionText\");\r\n\t\toptionText.setAttribute(\"State\", os.mStateNormal ? \"NORMAL\" : \"GRAY\");\r\n\t\toptionText.setTextContent(os.mText);\r\n\t\toption.appendChild(optionText);\r\n\r\n\t\tif (os.mNumber != null) {\r\n\t\t\taddTextNode(optionText, \"IppPhoneNumber\", os.mNumber);\r\n\t\t}\r\n\r\n\t\taddTextNode(option, \"Image\", os.mImage);\r\n\t}", "@Override\n\tpublic String[] getOptions() {\n\t\treturn null;\n\t}", "public String getOptime() {\n return optime;\n }", "public List getOptions() {\n\t\treturn currentOption;\n\t}", "public String getOptionsAsString() {\n\t\tStringBuilder buf = new StringBuilder();\n\t\tfor (int i = 0; i <propertyKeys.size(); i++) {\n\t\t\tString key = propertyKeys.get(i);\n\t\t\tif (!runtimeKeys.get(i))\n buf.append(key + \" : \" + getOption(key)).append(\"\\r\\n\");\n\t\t}\n\t\tfor (int i = 0; i <propertyKeys.size(); i++) {\n\t\t\tString key = propertyKeys.get(i);\n\t\t\tif (runtimeKeys.get(i))\n buf.append(\"* \" + key + \" : \" + getOption(key)).append(\"\\r\\n\");\n\t\t}\n\t\treturn buf.toString();\n\t}", "public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - Title |\");\n System.out.println(\"\\t\\t| [2] Search by - Directors |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=================================\");\n System.out.print(\"\\t\\t Input the option number : \"); \n }", "private void initOptions() {\n\t\t// TODO: ???\n\t\t// additional input docs via --dir --includes --excludes --recursive\n\t\t// --loglevel=debug\n\t\t// --optionally validate output as well?\n\t\t\n\t\tthis.sb = new StringBuffer();\n\t\tArrayList options = new ArrayList();\n\t\toptions.add( new LongOpt(\"help\", LongOpt.NO_ARGUMENT, null, 'h') );\n\t\toptions.add( new LongOpt(\"version\", LongOpt.NO_ARGUMENT, null, 'v') );\t\t\n\t\toptions.add( new LongOpt(\"query\", LongOpt.REQUIRED_ARGUMENT, sb, 'q') );\n\t\toptions.add( new LongOpt(\"base\", LongOpt.REQUIRED_ARGUMENT, sb, 'b') );\n\t\toptions.add( new LongOpt(\"var\", LongOpt.REQUIRED_ARGUMENT, sb, 'P') );\n\t\toptions.add( new LongOpt(\"out\", LongOpt.REQUIRED_ARGUMENT, sb, 'o') );\n\t\toptions.add( new LongOpt(\"algo\", LongOpt.REQUIRED_ARGUMENT, sb, 'S') );\n\t\toptions.add( new LongOpt(\"encoding\", LongOpt.REQUIRED_ARGUMENT, sb, 'E') );\n\t\toptions.add( new LongOpt(\"indent\", LongOpt.REQUIRED_ARGUMENT, sb, 'I') );\t\n\t\toptions.add( new LongOpt(\"strip\", LongOpt.NO_ARGUMENT, null, 's') );\t\t\n\t\toptions.add( new LongOpt(\"update\", LongOpt.REQUIRED_ARGUMENT, sb, 'u') );\t\n\t\toptions.add( new LongOpt(\"xinclude\", LongOpt.NO_ARGUMENT, null, 'x') );\t\t\n\t\toptions.add( new LongOpt(\"explain\", LongOpt.NO_ARGUMENT, null, 'e') );\n\t\toptions.add( new LongOpt(\"noexternal\", LongOpt.NO_ARGUMENT, null, 'n') );\t\t\n\t\toptions.add( new LongOpt(\"runs\", LongOpt.REQUIRED_ARGUMENT, sb, 'r') );\n\t\toptions.add( new LongOpt(\"iterations\", LongOpt.REQUIRED_ARGUMENT, sb, 'i') );\n\t\toptions.add( new LongOpt(\"docpoolcapacity\", LongOpt.REQUIRED_ARGUMENT, sb, 'C') );\n\t\toptions.add( new LongOpt(\"docpoolcompression\", LongOpt.REQUIRED_ARGUMENT, sb, 'D') );\n\t\toptions.add( new LongOpt(\"nobuilderpool\", LongOpt.NO_ARGUMENT, null, 'p') );\n\t\toptions.add( new LongOpt(\"debug\", LongOpt.NO_ARGUMENT, null, 'd') );\t\t\n\t\toptions.add( new LongOpt(\"validate\", LongOpt.REQUIRED_ARGUMENT, sb, 'V') ); \n\t\toptions.add( new LongOpt(\"namespace\", LongOpt.REQUIRED_ARGUMENT, sb, 'W') ); \n\t\toptions.add( new LongOpt(\"schema\", LongOpt.REQUIRED_ARGUMENT, sb, 'w') );\n\t\toptions.add( new LongOpt(\"filterpath\", LongOpt.REQUIRED_ARGUMENT, sb, 'f') );\n\t\toptions.add( new LongOpt(\"filterquery\", LongOpt.REQUIRED_ARGUMENT, sb, 'F') );\n\t\toptions.add( new LongOpt(\"xomxpath\", LongOpt.NO_ARGUMENT, null, 'N') );\t\t\n\t\t\n////\t\toptions.add( new LongOpt(\"loglevel\", LongOpt.REQUIRED_ARGUMENT, sb, 'l') ); setLogLevels(Level.INFO);\n\t\t\t\n\t\tthis.longOpts = new LongOpt[options.size()];\n\t\toptions.toArray(this.longOpts);\t\t\n\t}", "OPTION createOPTION();", "public void optionsActionPerformed(java.awt.event.ActionEvent evt) throws IOException{ \n options();\n }", "public void sendShortSelection(short objCode, boolean selection) {\n\t\tsendShortSelection(objCode, selection, clientNames);\n\t}", "private static void selectOption() {\n\t\tSystem.out.println(\n\t\t\t\t\"\\r\\nSelect an Option:\\r\\n\" + \n\t\t\t\t\"1. Factorial\\r\\n\" + \n\t\t\t\t\"2. Fibonacci\\r\\n\" + \n\t\t\t\t\"3. Greatest Common Denominator\\r\\n\" + \n\t\t\t\t\"4. Combinatorial\\r\\n\" + \n\t\t\t\t\"5. Josephus\\r\\n\" + \n\t\t\t\t\"6. Quit\\r\\n\" + \n\t\t\t\t\"\");\n\t}", "public void activateOptions() {\n try {\n sh = new SocketHandler(port);\n sh.start();\n }\n catch(InterruptedIOException e) {\n Thread.currentThread().interrupt();\n e.printStackTrace();\n } catch(IOException e) {\n e.printStackTrace();\n } catch(RuntimeException e) {\n e.printStackTrace();\n }\n super.activateOptions();\n }", "private static Options getOptions() {\n\t\tOptions options = new Options();\n\t\toptions.addOption(OptGenMode, \"generate\", false,\n\t\t\t\t\"generate private key sharing\");\n\t\toptions.addOption(\"h\", \"help\", false, \"Print help.\");\n\t\toptions.addOption(OptionBuilder.withType(Integer.class)\n\t\t\t\t.withLongOpt(\"shares\")\n\t\t\t\t.withDescription(\"number of shares to generate\").hasArg()\n\t\t\t\t.withArgName(\"int\").create(OptShares));\n\t\toptions.addOption(OptionBuilder.withType(Integer.class)\n\t\t\t\t.withLongOpt(\"threshold\")\n\t\t\t\t.withDescription(\"number of requires shares\").hasArg()\n\t\t\t\t.withArgName(\"int\").create(OptThreshold));\n\t\treturn options;\n\n\t}", "public final byte[] getOptionalData()\n\t{\n\t\treturn (byte[]) opt.clone();\n\t}" ]
[ "0.64368993", "0.6401543", "0.6367759", "0.6331105", "0.6290667", "0.619508", "0.60407484", "0.6002008", "0.5831037", "0.57665986", "0.57117605", "0.571033", "0.571033", "0.57074964", "0.5649507", "0.5640506", "0.5639857", "0.5623015", "0.56220394", "0.5599554", "0.55815035", "0.55629826", "0.55545485", "0.5525439", "0.5511048", "0.5495648", "0.54831004", "0.54810846", "0.54762936", "0.54622304", "0.5458484", "0.544067", "0.53895265", "0.5373656", "0.5366175", "0.53539133", "0.53527087", "0.5342515", "0.53393805", "0.53378546", "0.53369546", "0.5332454", "0.5328901", "0.5324989", "0.53178924", "0.5305368", "0.52985877", "0.5292283", "0.5291275", "0.5288667", "0.5280005", "0.52770793", "0.527651", "0.5254663", "0.52394485", "0.5211033", "0.52058524", "0.5196885", "0.5195735", "0.51823777", "0.51704353", "0.51650584", "0.51635706", "0.5160042", "0.5156138", "0.5152839", "0.5141042", "0.5138808", "0.5135904", "0.5115467", "0.5109205", "0.5094498", "0.5092297", "0.5079385", "0.5079385", "0.5074325", "0.5065336", "0.5062739", "0.5054765", "0.5048531", "0.5047536", "0.50404876", "0.5040127", "0.50370127", "0.5021649", "0.50172234", "0.50161403", "0.5012583", "0.5006942", "0.49977145", "0.49973962", "0.4992758", "0.49924418", "0.4990881", "0.49904615", "0.4982023", "0.4973203", "0.4969656", "0.4965973", "0.4946453", "0.49455047" ]
0.0
-1
Add a list of systems to the world
void addSystem(EntitySystem... systems) { for (EntitySystem s : systems) addSystem(s); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\n \tvoid addSystem(EntitySystem system) {\n \t\tif (systems.contains(system))\n \t\t\tthrow new RuntimeException(\"System already added\");\n \t\tsystem.id = getNewSystemId();\n \t\tsystem.componentBits = world.getComponentBits(system.components);\n \n \t\tClass<? extends EntitySystem> class1 = system.getClass();\n \t\tdo {\n \t\t\tfor (Field field : class1.getDeclaredFields()) {\n \t\t\t\t// Check for ComponentManager declarations.\n \t\t\t\tif (field.getType() == ComponentMapper.class) {\n \t\t\t\t\tfield.setAccessible(true);\n \t\t\t\t\t// Read the type in the <> of componentmanager\n \t\t\t\t\tType type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];\n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Set the component manager declaration with the right\n \t\t\t\t\t\t// component manager.\n \t\t\t\t\t\tfield.set(system, world.getComponentMapper((Class<? extends Component>) type));\n \t\t\t\t\t} catch (IllegalArgumentException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t} catch (IllegalAccessException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t// check for EventListener declarations.\n \t\t\t\tif (field.getType() == EventListener.class) {\n \t\t\t\t\tfield.setAccessible(true);\n \t\t\t\t\t// Read the type in the <> of eventListener.\n \t\t\t\t\tType type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];\n \t\t\t\t\t@SuppressWarnings(\"rawtypes\")\n \t\t\t\t\tEventListener<? extends Event> eventListener = new EventListener();\n \t\t\t\t\tworld.registerEventListener(eventListener, (Class<? extends Event>) type);\n \n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Set the event listener declaration with the right\n \t\t\t\t\t\t// field listener.\n \t\t\t\t\t\tfield.set(system, eventListener);\n \t\t\t\t\t} catch (IllegalArgumentException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t} catch (IllegalAccessException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\tclass1 = (Class<? extends EntitySystem>) class1.getSuperclass();\n \t\t} while (class1 != EntitySystem.class);\n \t\tsystems.add(system);\n \t\tsystemMap.put(system.id, system);\n\t\tsystem.world = world;\n \t}", "void addEntityToSystems(Entity e, RECSBits systemBits) {\n \t\tfor (int i = systemBits.nextSetBit(0); i >= 0; i = systemBits.nextSetBit(i + 1)) {\n \t\t\tsystemMap.get(i).addEntity(e.id);\n \t\t}\n \t}", "public Systems add(System system) {\r\n\t\tif (system != null) {\r\n\t\t\tif (system instanceof InitializeSystem) {\r\n\t\t\t\t__initializeSystems.add((InitializeSystem) system);\r\n\t\t\t}\r\n\t\t\tif (system instanceof ExecuteSystem) {\r\n\t\t\t\t__executeSystems.add((ExecuteSystem) system);\r\n\t\t\t}\r\n\t\t\tif (system instanceof RenderSystem) {\r\n\t\t\t\t__renderSystems.add((RenderSystem) system);\r\n\t\t\t}\r\n\t\t\tif (system instanceof TearDownSystem) {\r\n\t\t\t\t__tearDownSystems.add((TearDownSystem) system);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "public void addCoordinateSystem(CoordinateSystem cs) {\n if (cs == null)\n throw new RuntimeException(\"Attempted to add null CoordinateSystem to var \" + forVar.getFullName());\n\n if (coordSys == null)\n coordSys = new ArrayList<>(5);\n coordSys.add(cs);\n }", "public static void InitializeSystems()\n\t{\n\t\tif (_systems.size() < 1)\n\t\t{\n\t\t\tSystem.out.println(\"ERROR - no systems! (InitializeSystems)\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < _systems.size(); i++)\n\t\t\t_systems.get(i).Start();\n\t}", "private void addPlacesToWorld(ArrayList<Place> places, GameWorld world) {\n for (int i = 0; i < places.size(); i++) {\n world.addPlace(places.get(i));\n }\n }", "public Systems() {\r\n\t\t__initializeSystems = new ArrayList<InitializeSystem>();\r\n\t\t__executeSystems = new ArrayList<ExecuteSystem>();\r\n\t\t__renderSystems = new ArrayList<RenderSystem>();\r\n\t\t__tearDownSystems = new ArrayList<TearDownSystem>();\r\n\t}", "private void initExternalSystemsAvailable() {\n externalSystemsAvailable.add(\"Accounting system\");\n externalSystemsAvailable.add(\"Tax system\");\n }", "void addCoordinateSystem(CoordinateSystem cs);", "public void update() {\r\n for (SGSystem sys : systems.toArray(new SGSystem[0])) {\r\n sys.update();\r\n }\r\n }", "public void addToWorld(World world);", "private EntityManager initSystems() {\n CameraSystem cameraSystem = new CameraSystem(Constants.WINDOW_WIDTH, Constants.WINDOW_HEIGHT);\n addSystem(cameraSystem);\n addSystem(new ZoomSystem());\n //Physics System\n addSystem(new PhysicsSystem());\n //Player movement system\n addSystem(new PlayerMovementSystem());\n\n addSystem(new CannonFiringSystem());\n addSystem(new CollisionSystem());\n addSystem(new KillSystem());\n addSystem(new HealthSystem());\n addSystem(new StatisticSystem());\n addSystem(new EnemySpawningSystem());\n addSystem(new InventorySystem());\n addSystem(new CurrencySystem());\n\n GUISystem guiSystem = new GUISystem();\n InputSystem inputSystem = new InputSystem(guiSystem);\n\n //Input System\n addSystem(inputSystem);\n //Entity Render System\n addSystem(new EntityRenderSystem());\n //Particle System\n addSystem(new ParticleSystem());\n addSystem(new PlayerActionSystem(guiSystem));\n addSystem(new MapRenderSystem());\n addSystem(new HUDSystem());\n //Debug Render System\n addSystem(new DebugRendererSystem());\n //GUI System\n addSystem(guiSystem);\n\n return this;\n }", "public void initializeEngines() {\n\t\tfor (int i=0; i < _engineNumber; i++) {\n\t\t\tengineList.add(new Engine(\"Engine_\" + i, \"\", 0.0, 0.0, 0.0, _theAircraft));\n\t\t}\n\t}", "public void addPlatform(Platforms p)\r\n\t{\r\n\t\tplatforms.add(new Platforms(p));\r\n\t}", "public void attach(SGSystem nSystem) {\r\n systems.add(nSystem);\r\n }", "@Override\n public void addAllElements() {\n addAllSoftwareSystems();\n addAllPeople();\n }", "public void addBuildables(){\n this.allBuildables.add(new Nexus());\n this.allBuildables.add(new Pylon());\n this.allBuildables.add(new Assimilator());\n this.allBuildables.add(new Gateway());\n this.allBuildables.add(new CyberneticsCore());\n this.allBuildables.add(new RoboticsFacility());\n this.allBuildables.add(new Stargate());\n this.allBuildables.add(new TwilightCouncil());\n this.allBuildables.add(new TemplarArchives());\n this.allBuildables.add(new DarkShrine());\n this.allBuildables.add(new RoboticsBay());\n this.allBuildables.add(new FleetBeacon());\n this.allBuildables.add(new Probe());\n this.allBuildables.add(new Zealot());\n this.allBuildables.add(new Stalker());\n this.allBuildables.add(new Sentry());\n this.allBuildables.add(new Observer());\n this.allBuildables.add(new Immortal());\n this.allBuildables.add(new Phoenix());\n this.allBuildables.add(new VoidRay());\n this.allBuildables.add(new Colossus());\n this.allBuildables.add(new HighTemplar());\n this.allBuildables.add(new DarkTemplar());\n this.allBuildables.add(new Carrier());\n }", "@Override\r\n\tpublic List<MySys> getAllSystems() {\n\t\tString sql = \"SELECT * FROM systems ORDER BY sgroup;\";\r\n\t\t\r\n\t\tList<MySys> list = new ArrayList<MySys>();\r\n\t\tList<Map<String,Object>> rows = this.jdbcTemplate.queryForList(sql);\r\n\t\tfor (Map<String, Object> row : rows) {\r\n\t\t\tMySys sys = new MySys();\r\n\t\t\tsys.setId((int)row.get(\"idsystems\"));\r\n\t\t\tsys.setName((String)row.get(\"sysname\"));\r\n\t\t\tsys.setAlias((String)row.get(\"sysalias\"));\r\n\t\t\tsys.setState((int)row.get(\"state\"));\r\n\t\t\tsys.setStatetime((Date)row.get(\"statetime\"));\r\n\t\t\tlist.add(sys);\r\n\t\t}\r\n\t\t\r\n\t\treturn list;\r\n\t}", "public void addSoftware(Software software){\n products.add (software);\n }", "public void addSolarSystem(SolarSystem solarSystem) {\n interactor.addSolarSystem(solarSystem);\n }", "private static void setSubsystems()\n {\n //Components\n //Talons\n frontLeftTalon.setName(\"DrivetrainSubsystem\", \"FrontLeftDriveTalon\");\n frontRightTalon.setName(\"DrivetrainSubsystem\", \"FrontRightDriveTalon\");\n rearLeftTalon.setName(\"DrivetrainSubsystem\", \"RearLeftDriveTalon\");\n rearRightTalon.setName(\"DrivetrainSubsystem\", \"RearRightDriveTalon\");\n //Sensors\n //navX.setName(\"SensorSubsystem\", \"NavX\");\n System.out.print(pigeon.getAbsoluteCompassHeading());\n \n //Subsystems\n drivetrainSubsystem.setName(\"DrivetrainSubsystem\", \"DrivetrainSubsystem\");\n sensorSubsystem.setName(\"SensorSubsystem\", \"SensorSubsystem\");\n }", "public void addComponents()\r\n\t{\n\t\tSteveTechFarming.fruit = new BlockFruit(SteveTechFarming.config.getBlockID(1202, \"Fruit\", null)).setBlockName(\"WiduX-SteveTech-Farm-Fruit\");\r\n\t\tSteveTechFarming.crops = new BlockCrops(SteveTechFarming.config.getBlockID(1203, \"Crops\", null)).setBlockName(\"WiduX-SteveTech-Farm-Crops\");\r\n\t\t\r\n\t\tSteveTechFarming.seeds = new ItemSeeds(SteveTechFarming.config.getItemID(11000, \"Seeds\", null)).setItemName(\"WiduX-SteveTech-Farm-Seeds\");\r\n\t\tSteveTechFarming.harvestedItems = new ItemHarvest(SteveTechFarming.config.getItemID(11002, \"Harvest\", null)).setItemName(\"WiduX-SteveTech-Farm-Harvest\");\r\n\t\tSteveTechFarming.creativeTools = new ItemCreativeTools(SteveTechFarming.config.getItemID(11001, \"Creative Tools\", null)).setItemName(\"WiduX-SteveTech-Farm-CTools\");\r\n\t\tSteveTechFarming.foods = new Item[EnumFood.getNumberFoods()];\r\n\t\tint firstFoodItemID = SteveTechFarming.config.getItemID(11003, \"Foods Array\", \"This is the first item ID in the list of foods. Item IDs used will start here, and use the next \" + EnumFood.getNumberFoods() + \" IDs. Make sure they are all available.\");\r\n\t\tfor(int idOffset = 0; idOffset < SteveTechFarming.foods.length; idOffset++)\r\n\t\t{\r\n\t\t\tEnumFood food = EnumFood.getFood(idOffset);\r\n\t\t\tSteveTechFarming.foods[idOffset] = new ItemSTFood(firstFoodItemID + idOffset, food).setItemName(\"WiduX-SteveTech-Farm-Foods-Food\" + idOffset);\r\n\t\t}\r\n\t}", "void createWorld(Scanner console){\r\n\t\tRandom r = new Random();\r\n\t // System.out.println(\"Welcome to Sushi Time!\");\r\n\t\t//System.out.println(\"Number of fish: \"); \r\n\t\tint fish = r.nextInt(40)+1;\r\n\t\t//System.out.println(\"Number of sharks: \"); \r\n\t\tint shark = r.nextInt(10)+1;\r\n\t\t//create random int for creating random number of seaweed\r\n\t\tint seaweed=r.nextInt(3)+1;\r\n\t\t//create fish, sharks, seaweed, net and sushibar, add them to GameCollection\r\n\t\tSystem.out.println(\"Creating \"+fish+\" fish\");\r\n\t\tfor(int i=0; i<fish; i++){\r\n\t\t\tSystem.out.println(\"Creating fish\");\r\n\t\t\tFish f = new Fish(this);\r\n\t\t\taddToWorldList(f);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating \"+shark+\" sharks\");\r\n\t\tfor(int i=0; i<shark; i++){\r\n\t\t\tSystem.out.println(\"Creating shark\");\r\n\t\t\tShark s = new Shark(this);\r\n\t\t\taddToWorldList(s);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating \"+seaweed+\" seaweed\");\r\n\t\tfor(int i=0; i<seaweed; i++){\r\n\t\t\tSystem.out.println(\"Creating seaweed\");\r\n\t\t\tSeaweed sw=new Seaweed(this);\r\n\t\t\taddToWorldList(sw);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating net\");\r\n\t\t\tNet n = new Net();\r\n\t\t\taddToWorldList(n);\r\n\t\tSystem.out.println(\"Creating sushibar\");\r\n\t\t Sushibar sb = new Sushibar();\r\n\t\t\taddToWorldList(sb);\r\n\t }", "public void addToWorld() {\n world().addObject(this, xPos, yPos);\n \n try{\n terrHex = MyWorld.theWorld.getObjectsAt(xPos, yPos, TerritoryHex.class).get(0);\n } catch(IndexOutOfBoundsException e){\n MessageDisplayer.showMessage(\"The new LinkIndic didn't find a TerritoryHex at this position.\");\n this.destroy();\n }\n \n }", "public void add(){\n list.add(smart);\n list.add(mega);\n list.add(smartMini);\n list.add(absolute);\n\n clientsList.add(client1);\n clientsList.add(client2);\n clientsList.add(client3);\n clientsList.add(client4);\n clientsList.add(client5);\n }", "public static void addWorld(World world) {\n\t\tworlds.add(world);\n\t}", "private void addSolarSystem(final SolarSystem pSolar)\n \t{\n \t\tif (aTempSolarSystem == null) {\n \t\t\taTempSolarSystem = pSolar;\n \t\t}\n \t\taSolarSystems.put(pSolar.getID(), pSolar);\n \t\t// if new solar system is out of bounds, resize\n \t\taSize = Math.max(aSize, pSolar.getRadius() + (int) pSolar.getPoint3D().getDistanceToOrigin());\n \t}", "private void build()\n\t{\n\t\tengine.addSystem(new InputSystem());\n\t\tengine.addSystem(new MovementSystem());\n\t\t\n\t}", "private void registerAllKnownModules() throws ModulesFactoryException\n\t{\n\t\tfor(MODULE_TYPE m: MODULE_TYPE.values() )\n\t\t{\n\t\t\tthis.allocator.registerModule(ModulesFactory.getModule(m));\n\t\t}\n\t}", "public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\t\tif (gameObj[5].size() == 0)\n\t\t{\n\t\t\tgameObj[5].add(new SpaceStation());\n\t\t\tSystem.out.println(\"SpaceStation added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A space station is already spawned\");\n\t\t}\n\t}", "@Override\n\tpublic synchronized StorageOperationResponse<GetStorageSystemsResponse> getStorageSystems(\n\t\t\tGetStorageSystemsRequest request) {\n\t\tlogger.log(IJavaEeLog.SEVERITY_DEBUG, this.getClass().getName(), \"getStorageSystems: \" + request.storageSystemIds , null);\n\t\ttry {\n\t\tList<String> requestedSystems = request.storageSystemIds;\n\t\tArrayList<StorageSystem> systemList = new ArrayList<StorageSystem>();\n\t\tif (requestedSystems == null||requestedSystems.isEmpty()) {\n\t\t\tList<String> regions = openstackClient.getRegions();\n\t\t\tlogger.log(IJavaEeLog.SEVERITY_DEBUG, this.getClass().getName(), \"getStorageSystems: zones:\" + regions , null);\n\t\t\tfor (String region : regions) {\n\t\t \t systemList.add(OpenstackAdapterUtil.createStorageSystem(region,accountId));\n\t\t\t}\n\t\t} else {\n\t\t\tList<String> zones = openstackClient.getAvailabilityZones();\n\t\t\tboolean found = false;\n\t\t\tfor (int i = 0;i<requestedSystems.size();i++) {\n\t\t\t if(requestedSystems.get(i) == null) {\n\t\t\t\t systemList.add(null);\n\t\t\t\t continue;\n\t\t\t }\n\t\t found = false;\n\t\t\t for(String zone : zones) {\n\t\t\t if (requestedSystems.get(i).equals(accountId+':'+zone)) {\n\t\t \t systemList.add(OpenstackAdapterUtil.createStorageSystem(zone, accountId));\n\t\t \t found = true;\n\t\t \t break;\n\t\t }\n\t\t\t }\n\t\t\t if (!found) {\n\t\t\t systemList.add(null);\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\tlogger.log(IJavaEeLog.SEVERITY_DEBUG, this.getClass().getName(), \"getStorageSystems: systems found: \" + systemList.size() + \" systems: \" + systemList , null);\n\t\tGetStorageSystemsResponse payload = new GetStorageSystemsResponse();\n\t\tpayload.storageSystems = systemList;\n\t\tStorageOperationResponse<GetStorageSystemsResponse> response = new StorageOperationResponse<GetStorageSystemsResponse>(payload);\n\t\tresponse.setPercentCompleted(100);\n\t\tresponse.setStatus(StorageOperationStatus.COMPLETED);\n\t\treturn response;\n\n\t\t } catch (Exception e) {\n\t\t\tlogger.traceThrowable(IJavaEeLog.SEVERITY_DEBUG, this.getClass().getName(), \"getStorageSystems:\" + e.getMessage(), null,e);\n\t\t\treturn StorageAdapterImplHelper.createFailedResponse(e.getMessage(), GetStorageSystemsResponse.class); \n\t\t\t\n\t\t}\n\t}", "public void setBasicNewGameWorld()\r\n\t{\r\n\t\tlistCharacter = new ArrayList<Character>();\r\n\t\tlistRelationship = new ArrayList<Relationship>();\r\n\t\tlistLocation = new ArrayList<Location>();\r\n\t\t\r\n\t\t//Location;\r\n\t\t\r\n\t\tLocation newLocationCity = new Location();\r\n\t\tnewLocationCity.setToGenericCity();\r\n\t\tLocation newLocationDungeon = new Location();\r\n\t\tnewLocationDungeon.setToGenericDungeon();\r\n\t\tLocation newLocationForest = new Location();\r\n\t\tnewLocationForest.setToGenericForest();\r\n\t\tLocation newLocationJail = new Location();\r\n\t\tnewLocationJail.setToGenericJail();\r\n\t\tLocation newLocationPalace = new Location();\r\n\t\tnewLocationPalace.setToGenericPalace();\r\n\t\t\r\n\t\tlistLocation.add(newLocationCity);\r\n\t\tlistLocation.add(newLocationDungeon);\r\n\t\tlistLocation.add(newLocationForest);\r\n\t\tlistLocation.add(newLocationJail);\r\n\t\tlistLocation.add(newLocationPalace);\r\n\t\t\r\n\t\t\r\n\t\t//Item\r\n\t\tItem newItem = new Item();\r\n\t\t\r\n\t\tString[] type =\t\tnew String[]\t{\"luxury\"};\r\n\t\tString[] function = new String[]\t{\"object\"};\t\r\n\t\tString[] property = new String[]\t{\"\"};\r\n\t\tnewItem.setNewItem(900101,\"diamond\", type, function, \"null\", property, 2, true);\r\n\t\tnewLocationPalace.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"weapon\"};\r\n\t\tfunction = new String[]\t{\"equipment\"};\t\r\n\t\tproperty = new String[]\t{\"weapon\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(500101,\"dagger\", type, function, \"null\", property, 1, false);\t\t\r\n\t\tnewLocationJail.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t\r\n\t\ttype =\t\tnew String[]\t{\"quest\"};\r\n\t\tfunction = new String[]\t{\"object\"};\t\r\n\t\tproperty = new String[]\t{\"\"};\r\n\t\tnewItem.setNewItem(900201,\"treasure_map\", type, function, \"null\", property, 2, true);\r\n\t\tnewLocationDungeon.addOrUpdateItem(newItem);\r\n\r\n\t\t\r\n\t\t////// Add very generic item (10+ items of same name)\r\n\t\t////// These item start ID at 100000\r\n\t\t\r\n\t\t//Add 1 berry\r\n\t\t//100000\r\n\t\tnewItem = new Item();\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"berry\"};\r\n\t\tnewItem.setNewItem(100101,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t/* REMOVE 19-2-2019 to increase performance\r\n\t\t\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100102,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100102,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100103,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t*/\r\n\r\n\t\t\r\n\t\t//Add 2 poison_plant\r\n\t\t//101000\r\n\t\tnewItem = new Item();\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"poison\"};\r\n\t\tnewItem.setNewItem(100201,\"poison_plant\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100202,\"poison_plant\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\r\n\t\t//player\r\n\t\tCharacter newChar = new Character(\"player\", 1, true,\"city\", 0, false);\r\n\t\tnewChar.setIsPlayer(true);\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t//UNIQUE NPC\r\n\t\tnewChar = new Character(\"mob_NPC_1\", 15, true,\"city\", 0, false);\r\n\t\tlistCharacter.add(newChar);\r\n\r\n\t\t\r\n\t\tnewChar = new Character(\"king\", 20, true,\"palace\", 3, true);\r\n\t\tnewChar.addOccupation(\"king\");\r\n\t\tnewChar.addOccupation(\"noble\");\r\n\t\tnewChar.addStatus(\"rich\");\r\n\t\t\r\n\t\tlistCharacter.add(newChar);\r\n\r\n\r\n\t\t//Mob character\r\n\t\tnewChar = new Character(\"soldier1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t// REMOVE to improve performance\r\n\t\t/*\r\n\t\tnewChar = new Character(\"soldier2\", 20, true,\"jail\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"soldier3\", 20, true,\"palace\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t//listLocation.add(newLocationCity);\r\n\t\t//listLocation.add(newLocationDungeon);\r\n\t\t//listLocation.add(newLocationForest);\r\n\t\t//listLocation.add(newLocationJail);\r\n\t\t//listLocation.add(newLocationPalace);\r\n\t\t\r\n\t\tnewChar = new Character(\"doctor1\", 20, true,\"city\", 3, true);\r\n\t\tnewChar.addSkill(\"heal\");\r\n\t\tnewChar.addOccupation(\"doctor\");\r\n\t\tlistCharacter.add(newChar);\t\r\n\t\tnewChar = new Character(\"blacksmith1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"blacksmith\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"thief1\", 20, true,\"jail\", 2, true);\r\n\t\tnewChar.addOccupation(\"thief\");\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"unlock\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(300101,\"lockpick\", type, function, \"thief1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t// Remove to improve performance\r\n\t\t/*\r\n\t\tnewChar = new Character(\"messenger1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"messenger\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t*/\r\n\t\t\r\n\t\tnewChar = new Character(\"miner1\", 20, true,\"dungeon\", 1, true);\r\n\t\tnewChar.addOccupation(\"miner\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\tnewChar = new Character(\"lumberjack1\", 20, true,\"forest\", 1, true);\r\n\t\tnewChar.addOccupation(\"lumberjack\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t/* REMOVE 19-2-2019 to increase performance\r\n\t\t\r\n\t\tnewChar = new Character(\"scout1\", 20, true,\"forest\", 2, true);\r\n\t\tnewChar.addOccupation(\"scout\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\tnewChar = new Character(\"farmer1\", 20, true,\"forest\", 1, true);\r\n\t\tnewChar.addOccupation(\"farmer\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"merchant1\", 20, true,\"city\", 3, true);\r\n\t\tnewChar.addOccupation(\"merchant\");\r\n\t\tnewChar.addStatus(\"rich\");\r\n\t\t\r\n\t\t// Merchant Item\r\n\t\t//NPC item start at 50000\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"poison\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200101,\"potion_poison\", type, function, \"merchant1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"healing\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200201,\"potion_heal\", type, function, \"merchant1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"cure_poison\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200301,\"antidote\", type, function, \"merchant1\", property, 1, false);\t\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t\r\n\t\t//add merchant to List\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Relation\r\n\t\tRelationship newRelation = new Relationship();\r\n\t\tnewRelation.setRelationship(\"merchant1\", \"soldier1\", \"friend\");\r\n\t\tlistRelationship.add(newRelation);\r\n\t\t\r\n\t\t//\r\n\t\r\n\t}", "public final void addFileSystem (FileSystem fs) {\n synchronized (Repository.class) {\n // if the file system is not assigned yet\n if (!fs.assigned && !fileSystems.contains(fs)) {\n // new file system\n fileSystems.add(fs);\n String systemName = fs.getSystemName ();\n\n boolean isReg = names.get (systemName) == null;\n if (isReg && !systemName.equals (\"\")) { // NOI18N\n // file system with the same name is not there => then it is valid\n names.put (systemName, fs);\n fs.setValid (true);\n } else {\n // there is another file system with the same name => it is invalid\n fs.setValid (false);\n }\n // mark the file system as being assigned\n fs.assigned = true;\n // mark as a listener on changes in the file system\n fs.addPropertyChangeListener (propListener);\n fs.addVetoableChangeListener (vetoListener);\n\n // fire info about new file system\n fireFileSystem (fs, true);\n }\n }\n }", "public boolean addExternalSystem(String name) {\n if (name == null) {\n return false;\n }\n\n if (name.length() == 0) {\n return false;\n }\n\n switch (name) {\n case \"Accounting\":\n if (!searchSystem(name)) {\n AccountingSystem accountingSystem = new AccountingSystem();\n accountingSystem.connectSystem();\n connectedExternalSystems.add(accountingSystem);\n return true;\n }\n\n case \"Tax\":\n if (!searchSystem(name)) {\n TaxSystem taxSystem = new TaxSystem();\n taxSystem.connectSystem();\n connectedExternalSystems.add(taxSystem);\n return true;\n }\n\n default:\n return false;\n }\n }", "public void addToComponent(String objective, OpSystem system);", "public static void main(String[] args) {\n\n\n\n addHeavenlyB(\"Mercury\",88 , \"planet\");\n addHeavenlyB(\"Venus\",225 , \"planet\");\n addHeavenlyB(\"Earth\",365 , \"planet\");\n addHeavenlyB(\"Mars\",687 , \"planet\");\n addHeavenlyB(\"Deimos\",1.3 , \"moon\");\n addHeavenlyB(\"Phobos\",0.3 , \"moon\");\n\n\n print(planets);\n// print(moons);\n// printSolarSys();\n\n System.out.println();\n\n solarSystem.get(\"Mercury\").addMoon(solarSystem.get(\"Deimos\"));\n printMoons(\"Mercury\");\n\n\n// HeavenlyBody temp = new HeavenlyBody(\"Mercury\", 88);\n// solarSystem.put(temp.getName(),temp);\n// planets.add(temp);\n//\n// temp = new HeavenlyBody(\"Venus\", 225);\n// solarSystem.put(temp.getName(),temp);\n// planets.add(temp);\n//\n// temp = new HeavenlyBody(\"Earth\", 365);\n// solarSystem.put(temp.getName(),temp);\n// planets.add(temp);\n//\n// HeavenlyBody tempMoon = new HeavenlyBody(\"Moon\", 27);\n// solarSystem.put(tempMoon.getName(),tempMoon);\n// temp.addMoon(tempMoon);\n//\n// temp = new HeavenlyBody(\"Mars\", 687);\n// solarSystem.put(temp.getName(), temp);\n// planets.add(temp);\n//\n// tempMoon = new HeavenlyBody(\"Deimos\", 1.3);\n// solarSystem.put(tempMoon.getName(), tempMoon);\n// temp.addMoon(tempMoon); // temp is still Mars\n//\n// tempMoon = new HeavenlyBody(\"Phobos\", 0.3);\n// solarSystem.put(tempMoon.getName(), tempMoon);\n// temp.addMoon(tempMoon); // temp is still Mars\n//\n// temp = new HeavenlyBody(\"Jupiter\", 4332);\n// solarSystem.put(temp.getName(), temp);\n// planets.add(temp);\n//\n// tempMoon = new HeavenlyBody(\"Io\", 1.8);\n// solarSystem.put(tempMoon.getName(), tempMoon);\n// temp.addMoon(tempMoon); // temp is still Jupiter\n//\n// tempMoon = new HeavenlyBody(\"Europa\", 3.5);\n// solarSystem.put(tempMoon.getName(), tempMoon);\n// temp.addMoon(tempMoon); // temp is still Jupiter\n//\n// tempMoon = new HeavenlyBody(\"Ganymede\", 7.1);\n// solarSystem.put(tempMoon.getName(), tempMoon);\n// temp.addMoon(tempMoon); // temp is still Jupiter\n//\n// tempMoon = new HeavenlyBody(\"Callisto\", 16.7);\n// solarSystem.put(tempMoon.getName(), tempMoon);\n// temp.addMoon(tempMoon); // temp is still Jupiter\n//\n// temp = new HeavenlyBody(\"Saturn\", 10759);\n// solarSystem.put(temp.getName(), temp);\n// planets.add(temp);\n//\n// temp = new HeavenlyBody(\"Uranus\", 30660);\n// solarSystem.put(temp.getName(), temp);\n// planets.add(temp);\n//\n// temp = new HeavenlyBody(\"Neptune\", 165);\n// solarSystem.put(temp.getName(), temp);\n// planets.add(temp);\n//\n// temp = new HeavenlyBody(\"Pluto\", 248);\n// solarSystem.put(temp.getName(), temp);\n// planets.add(temp);\n\n\n\n\n }", "public static void createItems(){\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"breadly\"), BREADLY);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"hard_boiled_egg\"), HARD_BOILED_EGG);\n\n\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"ender_dragon_spawn_egg\"), ENDER_DRAGON_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"wither_spawn_egg\"), WITHER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"illusioner_spawn_egg\"), ILLUSIONER_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"giant_spawn_egg\"), GIANT_SPAWN_EGG);\n Registry.register(Registry.ITEM, new Identifier(nameSpace, \"spawn_spawn_egg\"), SPAWN_SPAWN_EGG);\n }", "public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\n\t\tgameObj.add(new SpaceStation(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Space station added\");\n\t\tnotifyObservers();\n\t}", "private void setupPowerSystem() {\n\t\tps = new PowerSystem(PowerSystemSolutionMethod.ANL_OPF);\r\n\t\t\r\n\t\t// Create nodes & register with power system\r\n\t\tNodeData nodeWindGenerator = new NodeData(1,1.0,0,false,true);\r\n\t\tps.addNode(nodeWindGenerator);\r\n\t\tNodeData nodeSubstation2 = new NodeData(2,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation2);\r\n\t\tNodeData nodeCityResidential = new NodeData(3,1.0,0,false);\r\n\t\tps.addNode(nodeCityResidential);\r\n\t\tNodeData nodeCityIndustrial = new NodeData(4,1.0,0,false);\r\n\t\tps.addNode(nodeCityIndustrial);\r\n\t\tNodeData nodeCityCommercial = new NodeData(5,1.0,0,false);\r\n\t\tps.addNode(nodeCityCommercial);\r\n\t\tNodeData nodeCoalGenerator = new NodeData(7,1.0,0,false,true);\r\n\t\tps.addNode(nodeCoalGenerator);\r\n\t\tNodeData nodeSubstation3 = new NodeData(8,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation3);\r\n\t\tNodeData nodeGasGenerator = new NodeData(11,1.0,0,false,true);\r\n\t\tps.addNode(nodeGasGenerator);\r\n\t\tNodeData nodeWindStorage = new NodeData(9,1.0,0,false);\r\n\t\tps.addNode(nodeWindStorage);\r\n\t\tNodeData nodeSubstation1 = new NodeData(0,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation1);\r\n\t\t\r\n\t\t// Create lines & register with power system\r\n\t\tMWTimeSeries branchTimeSeries = null;\r\n\t\t\r\n\t\tBranchData branchWindGeneratorToLocalSubstation = new BranchData(nodeWindGenerator,nodeSubstation1,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindGeneratorToLocalSubstation,\"Wind Generator to Substation 1\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindGeneratorToLocalSubstation);\r\n\r\n\t\tBranchData branchWindStorageToLocalSubstation = new BranchData(nodeWindStorage,nodeSubstation1,0.01,0,1500.0,false);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindStorageToLocalSubstation,\"Storage to Substation 1\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindStorageToLocalSubstation);\r\n\t\t\r\n\t\tbranchWindLocalSubstationToCitySubstation = new BranchData(nodeSubstation1,nodeSubstation2,0.01,0,125.0,false);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindLocalSubstationToCitySubstation,\"Substation 1 to Substation 2\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindLocalSubstationToCitySubstation);\r\n\t\t\r\n\t\tBranchData branchWindToResidential = new BranchData(nodeSubstation2,nodeCityResidential,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToResidential,\"Substation 2 to Residential\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindToResidential);\r\n\t\t\r\n\t\tBranchData branchWindToCommercial = new BranchData(nodeSubstation2,nodeCityCommercial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToCommercial,\"Substation 2 to Commercial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindToCommercial);\r\n\r\n\t\tBranchData branchWindToIndustrial = new BranchData(nodeSubstation2,nodeCityIndustrial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToIndustrial,\"Substation 2 to Industrial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchWindToIndustrial);\r\n\t\t\r\n\t\tBranchData branchCoalGeneratorToSubstation = new BranchData(nodeCoalGenerator,nodeSubstation3,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalGeneratorToSubstation,\"Coal Generator to Substation 3\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchCoalGeneratorToSubstation);\r\n\t\t\r\n\t\t\r\n\t\tBranchData branchGasToSubstation = new BranchData(nodeGasGenerator,nodeSubstation3,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchGasToSubstation,\"Natural Gas Generator to Substation 3\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchGasToSubstation);\r\n\t\t\r\n\t\tBranchData branchCoalToResidential = new BranchData(nodeSubstation3,nodeCityResidential,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToResidential,\"Substation 3 to Residential\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToResidential);\r\n\t\t\r\n\t\tBranchData branchCoalToIndustrial = new BranchData(nodeSubstation3,nodeCityIndustrial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToIndustrial,\"Substation 3 to Industrial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToIndustrial);\r\n\t\t\r\n\t\tBranchData branchCoalToCommercial = new BranchData(nodeSubstation3,nodeCityCommercial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToCommercial,\"Substation 3 to Commercial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToCommercial);\r\n\r\n\t\t\r\n\t\t// Create loads\r\n\t\tMWTimeSeries loadTimeSeries = null;\r\n\t\t\r\n\t\tloadResidential = new LoadData(nodeCityResidential,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadResidential,\"Residential load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadResidential);\r\n\t\t\r\n\t\tloadCommercial = new LoadData(nodeCityCommercial,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadCommercial,\"Commercial load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadCommercial);\r\n\t\t\r\n\t\tloadIndustrial = new LoadData(nodeCityIndustrial,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadIndustrial,\"Industrial load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadIndustrial);\r\n\t\t\r\n\t\t// Create gens\r\n\t\tMWTimeSeries genTimeSeries = null;\r\n\t\t\r\n\t\tgensWithCostsAndEmissions = new ArrayList<CostAndEmissionsProvider>();\r\n\t\tGeneratorDataWithLinearCostAndEmissions genCoal = new GeneratorDataWithLinearCostAndEmissions(nodeCoalGenerator,600,0,2000,0,0,9999,true,2000,20.0,0,1.0,includeFixedCostsAndEmissions);\r\n\t\tgensWithCostsAndEmissions.add(genCoal);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genCoal);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genCoal,\"Coal generation\");\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tps.addGenerator(genCoal);\r\n\t\t\r\n\t\tGeneratorDataWithLinearCostAndEmissions genGas = new GeneratorDataWithLinearCostAndEmissions(nodeGasGenerator,200,0,2000,0,0,9999,true,700.0,70.0,0,0.5,includeFixedCostsAndEmissions);\r\n\t\tgensWithCostsAndEmissions.add(genGas);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genGas);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genGas,\"Natural gas generation\");\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tps.addGenerator(genGas);\r\n\t\t\r\n\t\tgenWind = new WindGeneratorDataWithLinearCostAndEmissions(nodeWindGenerator,initialWindGen,0,210,initialWindVariation,true,200.0,0,0,0,includeFixedCostsAndEmissions);\r\n\t\tgenWind.setAnimating(false);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genWind);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genWind,\"Wind generation\");\r\n\t\twindGenTimeSeries = genTimeSeries;\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tgensWithCostsAndEmissions.add(genWind);\r\n\t\tps.addGenerator(genWind);\r\n\t\t\r\n\t\tgenStorage = new StorageDevice(nodeWindStorage,0,0,0,0,0,0,true,genWind,branchWindLocalSubstationToCitySubstation,simClock,1000,100);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genStorage,\"Storage generation\");\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genStorage);\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(genStorage);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tgensWithCostsAndEmissions.add(genStorage);\r\n\t\tps.addGenerator(genStorage);\r\n\t\t\r\n\t\tps.solve();\r\n\t\t\r\n\t\tArrayList<LineAndDistanceInfoProvider> lines; \r\n\t\tFlowArrowsForBranchData fA;\r\n\t\tSimpleLineDisplay line;\r\n\t\t\r\n\t\tBranchColorProvider branchColorProvider = new BranchColorDynamic(Color.BLACK,0.85,Color.ORANGE,1.0,Color.RED);\r\n\t\tBranchThicknessProvider branchThicknessProvider = new BranchThicknessDynamic(1.0,0.85,2.0,1.0,3.0);\r\n\t\tFlowArrowColorProvider flowArrowColorProvider = new FlowArrowColorDynamic(new Color(0,255,0,255/2),0.85,new Color(255,128,64,255/2),1.0,new Color(255,0,0,255/2));\r\n\t\t\r\n\t\t\r\n\t\tdouble switchthickness = 5.0;\r\n\r\n\t\t// Line Coal Generator to Fossil Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsCoalGenToCoalSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,350),new Point2D.Double(710 - 70,212),1);\r\n\t\tpointsCoalGenToCoalSubstation.add(line.getFromPoint());\r\n\t\tpointsCoalGenToCoalSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsCoalGenToCoalSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsCoalGenToCoalSubstation.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsCoalGenToCoalSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalGeneratorToSubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalGeneratorToSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\r\n\t\t//circuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(640,260),12,new Color(0f,0f,0f,1f),0,branchCoalGeneratorToSubstation));\r\n\t\t\r\n\t\t// Line Gas Generator to Fossil Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsGasGenToFossilSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,112.5),new Point2D.Double(765 - 70,160),1);\r\n\t\tpointsGasGenToFossilSubstation.add(line.getFromPoint());\r\n\t\tpointsGasGenToFossilSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsGasGenToFossilSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsGasGenToFossilSubstation.add(line.getToPoint());\r\n\t\tpointsGasGenToFossilSubstation.add(new Point2D.Double(710 - 70,212));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsGasGenToFossilSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchGasToSubstation, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchGasToSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\t//circuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(660,170),12,new Color(0f,0f,0f,1f),0,branchGasToSubstation));\r\n\t\t\r\n\t\t// Line Wind Generator to Wind Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindGenToWindSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(89,281),new Point2D.Double(89,150),1);\r\n\t\tpointsWindGenToWindSubstation.add(line.getFromPoint());\r\n\t\tpointsWindGenToWindSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindGenToWindSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindGenToWindSubstation.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindGenToWindSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindGeneratorToLocalSubstation, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindGeneratorToLocalSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(100,200),12,new Color(0f,0f,0f,1f),0,branchWindGeneratorToLocalSubstation));\t\t\r\n\t\t\r\n\t\t// Line storage to Wind Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindStorageToWindSubstation = new ArrayList<Point2D.Double>();\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(210,25));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,25));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,55));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,95));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,140));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindStorageToWindSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 2, Math.PI/20, \r\n\t\t\t\tbranchWindStorageToLocalSubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindStorageToLocalSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(100,75),12,new Color(0f,0f,0f,1f),0,branchWindStorageToLocalSubstation));\t\t\r\n\t\t\r\n\t\t// Line substation 2 to Residential load\r\n\t\tArrayList<Point2D.Double> pointsWindStationToResidential = new ArrayList<Point2D.Double>();\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(351 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(419 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(457 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(525 - 70,212.5));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindStationToResidential, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToResidential, branchColorProvider, circuitpanel, true, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToResidential,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(413 - 70,180),12,new Color(0f,0f,0f,1f),0,branchWindToResidential));\t\t\r\n\t\t\r\n\t\t// Line substation 3 to Residential load\r\n\t\tArrayList<Point2D.Double> pointsFossilStationToResidential = new ArrayList<Point2D.Double>();\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(710 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(631 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(592 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(525 - 70,212.5));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsFossilStationToResidential, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToResidential, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToResidential,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(585 - 70,180),12,new Color(0f,0f,0f,1f),0,branchCoalToResidential));\t\t\r\n\t\t\r\n\t\t// Line Substation 3 to Industrial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsFossilSubstationToIndustrial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,212.5),new Point2D.Double(525 - 70,365),1);\r\n\t\tpointsFossilSubstationToIndustrial.add(line.getFromPoint());\r\n\t\tpointsFossilSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsFossilSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsFossilSubstationToIndustrial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsFossilSubstationToIndustrial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToIndustrial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToIndustrial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(585 - 70,280),12,new Color(0f,0f,0f,1f),-Math.PI/5,branchCoalToIndustrial));\r\n\t\t\r\n\t\t// Line Substation 3 to Commercial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsSub3ToCommercial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,212.5),new Point2D.Double(525 - 70,55),1);\r\n\t\tpointsSub3ToCommercial.add(line.getFromPoint());\r\n\t\tpointsSub3ToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsSub3ToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsSub3ToCommercial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsSub3ToCommercial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToCommercial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToCommercial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(615 - 70,105),12,new Color(0f,0f,0f,1f),Math.PI/5,branchCoalToCommercial));\r\n\r\n\t\t\r\n\t\t// Line Substation 2 to Industrial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindSubstationToIndustrial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(351 - 70,212.5),new Point2D.Double(525 - 70,365),1);\r\n\t\tpointsWindSubstationToIndustrial.add(line.getFromPoint());\r\n\t\tpointsWindSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindSubstationToIndustrial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindSubstationToIndustrial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToIndustrial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToIndustrial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(399 - 70,273),12,new Color(0f,0f,0f,1f),Math.PI/4,branchWindToIndustrial));\r\n\r\n\t\t// Line Substation 2 to Commercial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindSubstationToCommercial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(351 - 70,212.5),new Point2D.Double(525 - 70,55),1);\r\n\t\tpointsWindSubstationToCommercial.add(line.getFromPoint());\r\n\t\tpointsWindSubstationToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindSubstationToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindSubstationToCommercial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindSubstationToCommercial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToCommercial, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToCommercial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(396 - 70,140),12,new Color(0f,0f,0f,1f),-Math.PI/4,branchWindToCommercial));\r\n\t\t\r\n\t\t// Line Substation 1 to Substation 2\r\n\t\tArrayList<Point2D.Double> pointsSub0ToSub1 = new ArrayList<Point2D.Double>();\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(85,140));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,140));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,156));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,196));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(190,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(230,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(351 - 70,212));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsSub0ToSub1, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 2, Math.PI/20, \r\n\t\t\t\tbranchWindLocalSubstationToCitySubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindLocalSubstationToCitySubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(195,141),12,new Color(0f,0f,0f,1f),0,branchWindLocalSubstationToCitySubstation));\r\n\t\t\r\n\t\t\r\n\t\t// Coal plant display\r\n\t\ttry {\r\n\t\t\tCoalPlantDisplay coaldisplay = new CoalPlantDisplay(new Point2D.Double(650 - 70,300),0,0.0,genCoal);\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(coaldisplay);\r\n\t\t\tcircuitpanel.addMouseListener(coaldisplay);\r\n\t\t\tCostAndEmissionsOverlay coaloverlay = new CostAndEmissionsOverlay(new Point2D.Double(700 - 70,450),genCoal);\r\n\t\t\tcostOverlays.add(coaloverlay);\r\n\t\t\tcircuitpanel.getTopLayerRenderables().add(coaloverlay);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Gas plant display\r\n\t\ttry {\r\n\t\tGasPlantDisplay gasdisplay = new GasPlantDisplay(new Point2D.Double(650 - 70,40),0.0,genGas);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(gasdisplay);\r\n\t\tcircuitpanel.addMouseListener(gasdisplay);\r\n\t\tCostAndEmissionsOverlay gasoverlay = new CostAndEmissionsOverlay(new Point2D.Double(700 - 70,20),genGas);\r\n\t\tcostOverlays.add(gasoverlay);\r\n\t\tcircuitpanel.getTopLayerRenderables().add(gasoverlay);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Wind plant display\r\n\t\ttry {\r\n\t\t\twinddisplay = new WindPlantDisplay(new Point2D.Double(50,240),0.0,genWind);\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(winddisplay);\r\n\t\t\tcircuitpanel.getAnimatables().add(winddisplay);\r\n\t\t\tcircuitpanel.addMouseListener(winddisplay);\r\n\t\t\tCostAndEmissionsOverlay windoverlay = new CostAndEmissionsOverlay(new Point2D.Double(100,450),genWind);\r\n\t\t\tcostOverlays.add(windoverlay);\r\n\t\t\tcircuitpanel.getTopLayerRenderables().add(windoverlay);\t\t\t\t\t\t\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// Storage display\r\n//\t\ttry {\r\n\t\t\t//SubstationDisplay storagedisplay = new SubstationDisplay(new Point2D.Double(160,0),\"Storage\");\r\n\t\t\t//circuitpanel.getMiddleLayerRenderables().add(storagedisplay);\r\n\t\t\tStorageDisplay storagedisplay = new StorageDisplay(genStorage,StorageDisplay.Alignment.LEFT,StorageDisplay.Alignment.TOP,new Point2D.Double(170,0));\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(storagedisplay);\r\n//\t\t} catch (IOException ie) {\r\n//\t\t\tSystem.out.println(ie);\r\n//\t\t}\r\n\t\t\r\n\t\t// Commercial load\r\n\t\ttry {\r\n\t\t\tCityDisplay commercetonLoad = new CityDisplay(new Point2D.Double(475 - 70,25),CityDisplay.CityType.COMMERCIAL,\"Commercial\",loadCommercial,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(commercetonLoad);\r\n\t\t\tcircuitpanel.addMouseListener(commercetonLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// Residential load\r\n\t\ttry {\r\n\t\t\tCityDisplay residentialLoad = new CityDisplay(new Point2D.Double(475 - 70,175),CityDisplay.CityType.RESIDENTIAL,\"Residential\",loadResidential,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(residentialLoad);\r\n\t\t\tcircuitpanel.addMouseListener(residentialLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\r\n\t\t\r\n\t\t// Industrial load\r\n\t\ttry {\r\n\t\t\tCityDisplay industrialLoad = new CityDisplay(new Point2D.Double(475 - 70,329),CityDisplay.CityType.INDUSTRIAL,\"Industrial\",loadIndustrial,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(industrialLoad);\r\n\t\t\tcircuitpanel.addMouseListener(industrialLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\t// Substation 3\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(660 - 70,212 - 25.0),3));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// Substation 2\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(305 - 70,212 - 25.0),2));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Substation 1\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(39,120.0),1));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new StoredEnergyLabel(new Point2D.Double(230,56),12,Color.BLACK,0,genStorage));\r\n\t\t\r\n\t\t/*\r\n\t\ttotalloadplot = new TotalLoadPlot(\r\n\t\t\t\tnew Point2D.Double(10,10),\r\n\t\t\t\t700,200,\r\n\t\t\t\tps,\r\n\t\t\t\tminutesPerAnimationStep,\r\n\t\t\t\t0,24,\r\n\t\t\t\t0,3000);\r\n\t\t*/\r\n\t\t/*\r\n\t\tMouseCoordinateLabel mclabel = new MouseCoordinateLabel(new Point2D.Double(0,20),12,Color.BLACK,0);\r\n\t\tcircuitpanel.getTopLayerRenderables().add(mclabel);\r\n\t\tcircuitpanel.addMouseMotionListener(mclabel);\r\n\t\tMouseCoordinateLabel mclabel = new MouseCoordinateLabel(new Point2D.Double(0,0),12,Color.BLACK,0);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(mclabel);\r\n\t\tcircuitpanel.addMouseMotionListener(mclabel);\r\n\t\t*/\r\n\t\t\r\n\t\tWindMaxDisplay windMaxLabel = new WindMaxDisplay(new Point2D.Double(144,384),12,Color.BLACK,0,genWind);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(windMaxLabel);\r\n\t\tWindCurtailedDisplay windCurtailedLabel = new WindCurtailedDisplay(new Point2D.Double(144,404),12,Color.BLACK,0,genWind);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(windCurtailedLabel);\r\n\r\n\t\tcircuitpanel.getTopLayerRenderables().add(new BlackoutDisplay(ps));\t\t\r\n\t\t\r\n\t\tcircuitpanel.getAnimatables().add(ps);\r\n\t\t\r\n\t\tcircuitpanel.getTopLayerRenderables().add(\r\n\t\t\t\tnew SimClockDisplay(new Point2D.Double(350,5),12,Color.BLACK,0,simClock)); \r\n\t\t\r\n\t\t// Wind plant at node sixteen\r\n//\t\ttry {\r\n//\t\t\tWindPlantDisplay winddisplay = new WindPlantDisplay(new Point2D.Double(650,340),0.0,genWind);\r\n//\t\t\tcircuitpanel.getMiddleLayerRenderables().add(winddisplay);\r\n//\t\t\tcircuitpanel.getAnimatables().add(winddisplay);\r\n//\t\t\tcircuitpanel.addMouseListener(winddisplay);\r\n//\t\t\tCostAndEmissionsOverlay windoverlay = new CostAndEmissionsOverlay(new Point2D.Double(689,462),genWind);\r\n//\t\t\tcostOverlays.add(windoverlay);\r\n//\t\t\tcircuitpanel.getTopLayerRenderables().add(windoverlay);\t\t\t\t\t\t\r\n//\t\t} catch (IOException ie) {\r\n//\t\t\tSystem.out.println(ie);\r\n//\t\t}\r\n\t\t\r\n\t}", "boolean add( Software s );", "@Override\n public void getAllSystemsInSession() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getAllSystemsInSession\");\n }\n\n List<SystemInSession> listOfSiS = null;\n EntityManager em = EntityManagerService.provideEntityManager();\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n listOfSiS = SystemInSession.getSystemsInSessionForCompanyForSession(em, choosenInstitutionForAdmin);\n } else {\n listOfSiS = SystemInSession.getSystemsInSessionForActivatedTestingSession();\n }\n } else {\n listOfSiS = SystemInSession.getSystemsInSessionForCompanyForSession(em,\n Institution.getLoggedInInstitution());\n }\n foundSystemsInSession = listOfSiS;\n }", "@GetMapping(\"/systems\")\r\n\tpublic String showSystems() {\r\n\r\n\t\treturn \"systems\";\r\n\t}", "public List<SolarSystem> getAllSolarSystems() {\n return interactor.getAllSolarSystems();\n }", "@Override\n public void addLoaders(WorldLoader wl, WorldInfo info) {\n }", "public static void addNewServices() {\n displayAddNewServicesMenu();\n processAddnewServicesMenu();\n }", "private void configureWorlds(){\n switch (gameWorld){\n case NORMAL:\n world.setPVP(true);\n world.setKeepSpawnInMemory(false);\n world.setAutoSave(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n case NETHER:\n world.setPVP(true);\n world.setAutoSave(false);\n world.setKeepSpawnInMemory(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n }\n }", "private void createSignalSystems() {\r\n\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(2)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(3)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(4)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(5)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(7)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(8)));\r\n\r\n if (TtCreateParallelNetworkAndLanes.checkNetworkForSecondODPair(this.scenario.getNetwork())) {\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(10)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(11)));\r\n }\r\n }", "public void addNewSystemUser()\n {\n\n DietTreatmentSystemUserBO newUser = new DietTreatmentSystemUserBO();\n // default user\n newUser.setSystemUser(SystemUserController.getInstance()\n .getCurrentUser());\n // default function\n newUser.setFunction(SystemUserFunctionBO.TREATING_ASSISTANT);\n\n _dietTreatment.addSystemUsers(newUser);\n }", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "public void appendSystem(String text) {\n try {\n StyledDocument doc = screenTP.getStyledDocument();\n doc.insertString(doc.getLength(), formatForPrint(text), doc.getStyle(\"system\"));\n } catch (BadLocationException ex) {\n// ex.printStackTrace();\n AdaptationSuperviser.logger.error(\"Error while trying to append system message in the \" + this.getName(), ex);\n }\n }", "java.util.List<CoordinateSystem> getCoordinateSystems();", "public void addComponents(Component... components);", "private void initialize() {\n SystemManager.get(this);\n SystemManager.add(new PlayerInputSystem(this, win.getInputHandler()));\n SystemManager.add(new PhysicSystem(this, win.getDimension()));\n SystemManager.add(new RenderSystem(this));\n\n World world = new World(new Vector2D(0.0f, 98.1f));\n theCar = new Car(\"car\");\n\n theCar.setPosition(new Vector2D(win.getWidth() * 0.5f, win.getHeight() * 0.5f))\n .setSize(new Rectangle(50, 20))\n .setVelocity(new Vector2D(0.0f, 0.0f))\n .setResistance(0.90f)\n .setMass(2000.0f)\n .setWorld(world);\n\n add(theCar);\n }", "protected void addVolumeStorageSystem(Map<URI, StorageSystem> volumeStorageSystems, Volume volume) {\n if (volumeStorageSystems == null) {\n volumeStorageSystems = new HashMap<URI, StorageSystem>();\n }\n\n StorageSystem volumeStorageSystem = volumeStorageSystems.get(volume.getStorageController());\n if (volumeStorageSystem == null) {\n volumeStorageSystem =\n _dbClient.queryObject(StorageSystem.class, volume.getStorageController());\n volumeStorageSystems.put(volumeStorageSystem.getId(), volumeStorageSystem);\n }\n }", "@Override\n protected void buildWorldRepresentation() {\n java.util.List<BasicModelEntity> worldModelEntityList = spaceExplorerModel.getWorldEntityList();\n java.util.List<CSysEntity> viewWorldEntityList = new ArrayList();\n for (int i = 0; i < worldModelEntityList.size(); i++) {\n\n BasicModelEntity basicModelEntity = worldModelEntityList.get(i);\n\n CSysEntity cSysEntity = null;\n if (basicModelEntity instanceof ModelLineEntity) {\n cSysEntity = new SeCSysLineEntity(this, (ModelLineEntity) basicModelEntity);\n cSysEntity.setDrawColor(basicModelEntity.getColor());\n// addWorldEntity(cSysLineEntity);\n } else if (basicModelEntity instanceof ModelPolyLineEntity) {\n cSysEntity = new SeCSysViewPolyLineEntity(this, (ModelPolyLineEntity) basicModelEntity);\n cSysEntity.setDrawColor(basicModelEntity.getColor());\n// addWorldEntity(seCSysViewPolylineEntity);\n }\n viewWorldEntityList.add(cSysEntity);\n }\n\n createAxis(viewWorldEntityList);\n viewWorldEntityArray = viewWorldEntityList.toArray(new BasicCSysEntity[viewWorldEntityList.size()]);\n updateCSysEntList(combinedRotatingMatrix);\n }", "public List<ClientSystem> getAssociatedSystems() {\n\t\treturn registeredSystems;\n\t}", "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}", "private void toBeAddedEntities()\n\t{\n\t\tif( entitiesToAdd.isEmpty() )\n\t\t{\n\t\t\treturn ;\n\t\t}\n\n\t\tfinal List<Event<?>> events = MalletList.<Event<?>>newList() ;\n\n\t\tfinal int size = entitiesToAdd.size() ;\n\t\tfor( int i = 0; i < size; ++i )\n\t\t{\n\t\t\tfinal Entity entity = entitiesToAdd.get( i ) ;\n\t\t\thookEntity( eventSystem, events, entity ) ;\n\t\t\tentities.add( entity ) ;\n\t\t}\n\t\tentitiesToAdd.clear() ;\n\t\t\n\t\tif( size > capacity )\n\t\t{\n\t\t\t// If the size of entitiesToAdd exceeds our capacity then \n\t\t\t// we want to resize the array - it's easy for an \n\t\t\t// array to expand, it's much harder to shrink it!\n\t\t\tentitiesToAdd = MalletList.<Entity>newList( capacity ) ;\n\t\t}\n\t}", "public void addItemToInventory(Item ... items){\n this.inventory.addItems(items);\n }", "public void add (List words) {\n\t\tint pos = 0;\n\t\tfor (Iterator it = words.iterator(); it.hasNext(); ) {\n\t\t\tWord word = (Word)it.next();\n\t\t\tInfo info = (Info)map.get(word);\n\t\t\tif (info == null) {\n\t\t\t\tinfo = new Info();\n\t\t\t\tinfo.loaded = false;\n\t\t\t\tmap.put(word, info);\n\t\t\t}\n\t\t\tinfo.list = words;\n\t\t\tinfo.pos = pos;\n\t\t\tpos++;\n\t\t}\n\t}", "@Override\n public void RegisterEntities(LinkedList<Entity> listToModify) {\n listToModify.add(test1);\n// listToModify.add(test2);\n }", "void process(float deltaInSec) {\n \t\tfor (EntitySystem system : systems) {\n \t\t\tif (system.isEnabled()) {\n \t\t\t\tsystem.processSystem(deltaInSec);\n \t\t\t}\n \t\t}\n \t}", "public void addStorageSystem(URI storage, URI[] providers, boolean primaryProvider, String opId) throws InternalException;", "public void addServices(Services services) {\n for(int i = 0; i < services.getServices().size(); i++) {\n this.services.add(services.getServices().get(i)); // Retrieve the name of the Service\n }\n for(int i = 0; i < services.getIndexes().size(); i++) {\n this.indexes.add(services.getIndexes().get(i)); // Retrieve the index of the Service\n }\n }", "private void addCatalogsIntoRegistry(final List<Category> objects, final DependencyRegistry dependencyRegistry) {\n\t\tfinal VirtualCatalogDependencyHelper virtualDependencyHelper = new VirtualCatalogDependencyHelper();\n\t\tfinal Set<Long> catalogSetUid = new HashSet<Long>();\n\t\tfor (Category category : objects) {\n\t\t\tcatalogSetUid.add(category.getCatalog().getUidPk());\n\t\t\tvirtualDependencyHelper.addInfluencingCatalogs(category, dependencyRegistry);\n\t\t}\n\t\tdependencyRegistry.addUidDependencies(Catalog.class, catalogSetUid);\n\t}", "private void addSystemDef(SnmpCollection collection, String systemDefName) {\n log().debug(\"addSystemDef: merging system defintion \" + systemDefName + \" into snmp-collection \" + collection.getName());\n // Find System Definition\n SystemDef systemDef = getSystemDef(systemDefName);\n if (systemDef == null) {\n throwException(\"Can't find system definition \" + systemDefName, null);\n }\n // Add System Definition to target SNMP collection\n if (contains(collection.getSystems().getSystemDefCollection(), systemDef)) {\n log().warn(\"addSystemDef: system definition \" + systemDefName + \" already exist on SNMP collection \" + collection.getName());\n } else {\n log().debug(\"addSystemDef: adding system definition \" + systemDef.getName() + \" to snmp-collection \" + collection.getName());\n collection.getSystems().addSystemDef(systemDef);\n // Add Groups\n for (String groupName : systemDef.getCollect().getIncludeGroupCollection()) {\n Group group = getMibObjectGroup(groupName);\n if (group == null) {\n log().warn(\"addSystemDef: group \" + groupName + \" does not exist on global container\");\n } else {\n if (contains(collection.getGroups().getGroupCollection(), group)) {\n log().debug(\"addSystemDef: group \" + groupName + \" already exist on SNMP collection \" + collection.getName());\n } else {\n log().debug(\"addSystemDef: adding mib object group \" + group.getName() + \" to snmp-collection \" + collection.getName());\n collection.getGroups().addGroup(group);\n }\n }\n }\n }\n }", "public void addItems() {\r\n\t\tproductSet.add(new FoodItems(1000, \"maggi\", 12.0, 100, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1001, \"Pulses\", 55.0, 50, new Date(), new Date(), \"yes\"));\r\n\t\tproductSet.add(new FoodItems(1004, \"Meat\", 101.53, 5, new Date(), new Date(), \"no\"));\r\n\t\tproductSet.add(new FoodItems(1006, \"Jelly\", 30.0, 73, new Date(), new Date(), \"no\"));\r\n\t\t\r\n\t\tproductSet.add(new Apparels(1005, \"t-shirt\", 1000.0, 10, \"small\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1002, \"sweater\", 2000.0, 5,\"medium\", \"woolen\"));\r\n\t\tproductSet.add(new Apparels(1003, \"cardigan\", 1001.53,22, \"large\", \"cotton\"));\r\n\t\tproductSet.add(new Apparels(1007, \"shirt\", 500.99, 45,\"large\",\"woolen\"));\r\n\t\t\r\n\t\tproductSet.add(new Electronics(1010, \"tv\", 100000.0, 13, 10));\r\n\t\tproductSet.add(new Electronics(1012, \"mobile\", 20000.0, 20,12));\r\n\t\tproductSet.add(new Electronics(1013, \"watch\", 1101.53,50, 5));\r\n\t\tproductSet.add(new Electronics(1009, \"headphones\", 300.0, 60,2));\r\n\t\t\r\n\t}", "@Override\n\tpublic void addStore(int timeUnit) {\n if (getVarsEnviromen().size() > 0) {\n\t\t\tfor (AmbientC amb: getVarsEnviromen() ){\n\t\t\t\tif (amb.getUnitTime() == timeUnit){\n int nvar = super.nvarDef(amb);\n switch (nvar) {\n case 1:\n if (super.findVars(amb.getVarname1()) ) {\n Store.addConstra(amb.getConstraint());\n System.out.println(\"Constraint Cargado - \" + amb.getConstraint().getClass().toString());\n }\n break;\n case 2:\n if (super.findVars(amb.getVarname1()) && super.findVars(amb.getVarname2())) {\n Store.addConstra(amb.getConstraint());\n System.out.println(\"Constraint Cargado - \" + amb.getConstraint().getClass().toString());\n }\n break;\n case 3:\n if (super.findVars(amb.getVarname1()) && super.findVars(amb.getVarname2()) && super.findVars(amb.getVarname3()) ) {\n Store.addConstra(amb.getConstraint());\n System.out.println(\"Constraint Cargado - \" + amb.getConstraint().getClass().toString());\n }\n break;\n default: break;\n }\n\t\t\t\t}\n\t\t\t}\n } else {\n System.out.println(\"Ambient- <AddStore> -No existen Elementos en el Ambiente \" );\n }\n\n\t}", "@DISPID(1610940432) //= 0x60050010. The runtime will prefer the VTID if present\n @VTID(38)\n AxisSystems axisSystems();", "private void addToOutOfTypeSystemData(String typeName, Attributes attrs)\n throws XCASParsingException {\n if (this.outOfTypeSystemData != null) {\n FSData fsData = new FSData();\n fsData.type = typeName;\n fsData.indexRep = null; // not indexed\n String attrName, attrValue;\n for (int i = 0; i < attrs.getLength(); i++) {\n attrName = attrs.getQName(i);\n attrValue = attrs.getValue(i);\n if (attrName.startsWith(reservedAttrPrefix)) {\n if (attrName.equals(XCASSerializer.ID_ATTR_NAME)) {\n fsData.id = attrValue;\n } else if (attrName.equals(XCASSerializer.CONTENT_ATTR_NAME)) {\n this.currentContentFeat = attrValue;\n } else if (attrName.equals(XCASSerializer.INDEXED_ATTR_NAME)) {\n fsData.indexRep = attrValue;\n } else {\n fsData.featVals.put(attrName, attrValue);\n }\n } else {\n fsData.featVals.put(attrName, attrValue);\n }\n }\n this.outOfTypeSystemData.fsList.add(fsData);\n this.currentOotsFs = fsData;\n // Set the state; we're ready to accept the \"content\" feature,\n // if one is specified\n this.state = OOTS_CONTENT_STATE;\n }\n }", "void addComponents();", "boolean addAllPCs(List<PCDevice> pcs);", "private void createWorld() {\n world = new World();\n world.setEventDeliverySystem(new BasicEventDeliverySystem());\n //world.setSystem(new MovementSystem());\n world.setSystem(new ResetPositionSystem());\n world.setSystem(new RenderingSystem(camera, Color.WHITE));\n\n InputSystem inputSystem = new InputSystem();\n InputMultiplexer inputMultiplexer = new InputMultiplexer();\n inputMultiplexer.addProcessor(inputSystem);\n inputMultiplexer.addProcessor(new GestureDetector(inputSystem));\n Gdx.input.setInputProcessor(inputMultiplexer);\n world.setSystem(inputSystem);\n world.setSystem(new MoveCameraSystem(camera));\n\n world.initialize();\n }", "public void add(LorentzVector... vects) {\n\t\tfor (LorentzVector vect : vects) {\n\t\t\tthis.vector.add(vect.vect());\n\t\t\tthis.energy = this.e() + vect.e();\n\t\t}\n\t}", "private void addSystemDirFilesToImage() throws IOException {\n File sourceSystemDir = new File(builderContext.sourceTbOptionsDir, \"system.v2\");\n if (!isValidCSMSource(sourceSystemDir)) {\n // Fall back to the system default, ~/Amplio/ACM/system.v2\n sourceSystemDir = new File(AmplioHome.getAppSoftwareDir(), \"system.v2\");\n }\n\n File targetSystemDir = new File(imageDir, \"system\");\n\n // The csm_data.txt file. Control file for the TB.\n File csmData = new File(sourceSystemDir, \"csm_data.txt\");\n FileUtils.copyFileToDirectory(csmData, targetSystemDir);\n\n // Optionally, the source for csm_data.txt file. \n File controlDefFile = new File(sourceSystemDir, \"control_def.txt\");\n if (controlDefFile.exists()) {\n FileUtils.copyFileToDirectory(controlDefFile, targetSystemDir);\n }\n\n // If UF is hidden in the deployment, copy the appropriate 'uf.der' file to 'system/'\n if (deploymentInfo.isUfHidden()) {\n UfKeyHelper ufKeyHelper = new UfKeyHelper(builderContext.project);\n byte[] publicKey = ufKeyHelper.getPublicKeyFor(builderContext.deploymentNo);\n File derFile = new File(targetSystemDir, \"uf.der\");\n try (FileOutputStream fos = new FileOutputStream(derFile);\n DataOutputStream dos = new DataOutputStream(fos)){\n dos.write(publicKey);\n }\n }\n }", "@Override\n\tpublic List<Trainning_system> findAll() {\n\t\treturn trainningSystemServiceImpl.findAll();\n\t}", "private void registerManagers() {\n registerProviders();\n\n // Cast Managers\n if (worldGuardManager.isEnabled()) castManagers.add(worldGuardManager);\n if (preciousStonesManager.isEnabled()) castManagers.add(preciousStonesManager);\n if (redProtectManager != null && redProtectManager.isFlagsEnabled()) castManagers.add(redProtectManager);\n\n // Entity Targeting Managers\n if (preciousStonesManager.isEnabled()) targetingProviders.add(preciousStonesManager);\n if (townyManager.isEnabled()) targetingProviders.add(townyManager);\n if (residenceManager != null) targetingProviders.add(residenceManager);\n if (redProtectManager != null) targetingProviders.add(redProtectManager);\n\n // PVP Managers\n if (worldGuardManager.isEnabled()) pvpManagers.add(worldGuardManager);\n if (pvpManager.isEnabled()) pvpManagers.add(pvpManager);\n if (multiverseManager.isEnabled()) pvpManagers.add(multiverseManager);\n if (preciousStonesManager.isEnabled()) pvpManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) pvpManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) pvpManagers.add(griefPreventionManager);\n if (factionsManager.isEnabled()) pvpManagers.add(factionsManager);\n if (residenceManager != null) pvpManagers.add(residenceManager);\n if (redProtectManager != null) pvpManagers.add(redProtectManager);\n\n // Build Managers\n if (worldGuardManager.isEnabled()) blockBuildManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBuildManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBuildManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBuildManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBuildManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBuildManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBuildManagers.add(mobArenaManager);\n if (residenceManager != null) blockBuildManagers.add(residenceManager);\n if (redProtectManager != null) blockBuildManagers.add(redProtectManager);\n if (landsManager != null) blockBuildManagers.add(landsManager);\n\n // Break Managers\n if (worldGuardManager.isEnabled()) blockBreakManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBreakManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBreakManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBreakManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBreakManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBreakManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBreakManagers.add(mobArenaManager);\n if (citadelManager != null) blockBreakManagers.add(citadelManager);\n if (residenceManager != null) blockBreakManagers.add(residenceManager);\n if (redProtectManager != null) blockBreakManagers.add(redProtectManager);\n if (landsManager != null) blockBreakManagers.add(landsManager);\n\n // Team providers\n if (heroesManager != null && heroesManager.useParties()) teamProviders.add(heroesManager);\n if (skillAPIManager != null && skillAPIManager.usesAllies()) teamProviders.add(skillAPIManager);\n if (useScoreboardTeams) teamProviders.add(new ScoreboardTeamProvider());\n if (permissionTeams != null && !permissionTeams.isEmpty()) {\n teamProviders.add(new PermissionsTeamProvider(permissionTeams));\n }\n if (factionsManager != null) teamProviders.add(factionsManager);\n if (battleArenaManager != null && useBattleArenaTeams) teamProviders.add(battleArenaManager);\n if (ultimateClansManager != null) teamProviders.add(ultimateClansManager);\n\n // Player warp providers\n if (preciousStonesManager != null && preciousStonesManager.isEnabled()) {\n playerWarpManagers.put(\"fields\", preciousStonesManager);\n }\n if (redProtectManager != null) playerWarpManagers.put(\"redprotect\", redProtectManager);\n if (residenceManager != null) playerWarpManagers.put(\"residence\", residenceManager);\n }", "protected void addedToWorld(World world) \n {\n createImages();\n }", "private void buildWorld() {\r\n\t\tremoveAll();\r\n\t\tintro = null;\r\n\t\tfacingEast = true;\r\n\t\t\r\n\t\taddLevels();\r\n\t\taddCharacters();\r\n\t\taddLifeDisplay();\r\n\t}", "void addProduces(Computer newProduces);", "public static void setupServicesAndParameters(){\n\t\t//replace services in use, e.g.:\n\t\t/*\n\t\tMap<String, ArrayList<String>> systemInterviewServicesMap = new HashMap<>();\n\t\t\n\t\t//CONTROL DEVICES\n\t\tArrayList<String> controlDevice = new ArrayList<String>();\n\t\t\tcontrolDevice.add(MyDeviceControlService.class.getCanonicalName());\n\t\tsystemInterviewServicesMap.put(CMD.CONTROL, controlDevice);\n\t\t\n\t\t//BANKING\n\t\tArrayList<String> banking = new ArrayList<String>();\n\t\t\tbanking.add(MyBankingService.class.getCanonicalName());\n\t\tsystemInterviewServicesMap.put(CMD.BANKING, banking);\n\t\t\t\n\t\tInterviewServicesMap.loadCustom(systemInterviewServicesMap);\n\t\t*/\n\t\t\n\t\t//defaults\n\t\tStart.setupServicesAndParameters();\n\t\t\n\t\t//add\n\t\t//e.g.: ParameterConfig.setHandler(PARAMETERS.ALARM_NAME, Config.parentPackage + \".parameters.AlarmName\");\n\t}", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList addNewServiceConfigurationList();", "public void addWorld(File file, String name){\n worlds.add(new MBMWorld(file, name));\n }", "public void addUniverse(Universe uni){\n this.universe = uni;\n }", "@Override\n\tpublic void addParties(ArrayList<Party> others) {\n\n\t}", "public void addGameObjects() {\n\t\tint baseObject = 4 + random.nextInt(5);\n\t\tint energyDroneObject = 2+ random.nextInt(5);\n\t\t\n\t\tfor (int i = 1; i < baseObject; i++) {\n\t\t\tgameObjects.add(new Bases(i));\n\t\t\t baseCount++;\n\t\t}\n\t\tfor (int i = 0; i < energyDroneObject; i++) {\n\t\t\tgameObjects.add(new EnergyStation());\n\t\t\tenergyStationCount++;\n\t\t}\n\t\tfor (int i = 0; i < energyDroneObject ; i++) {\n\t\t\tgameObjects.add(new Drone());\n\t\t\tdroneCount++;\n\t\t}\n\t\tgameObjects.add(new Cyborg());\n\t\tcyborgCount++;\n\t}", "private boolean contains(List<SystemDef> systemDefs, SystemDef systemDef) {\n for (SystemDef sd : systemDefs) {\n if (systemDef.getName().equals(sd.getName()))\n return true;\n }\n return false;\n }", "public ImmutableList<CoordinateSystem> getCoordinateSystems() {\n return (coordSys == null) ? ImmutableList.of() : ImmutableList.copyOf(coordSys);\n }", "public void addWeather(List<Weather> weatherList) {\n for (Weather item : weatherList) {\n weatherDAO.save(item);\n }\n }", "public void createEnvironment() {\n //create a list of collidable objects and a list of sprite objects\n List<Collidable> collidables = new ArrayList<Collidable>();\n List<Sprite> spriteList = new ArrayList<Sprite>();\n //update the game's environment to be the collidables list.\n this.environment = new GameEnvironment(collidables);\n //update the game's sprites collection to be the list of sprites.\n this.sprites = new SpriteCollection(spriteList);\n }", "@Override\n void add()\n {\n long sensorId = Long.parseLong(textSensorId.getText());\n MissionNumber missionNumber = textMissionNumber.getValue();\n String jobOrderNumber = textJobOrderNumber.getText();\n \n FPS16SensorDataGenerator generator = new FPS16SensorDataGenerator(tspiConfigurator.getTspiGenerator(), sensorId, missionNumber, jobOrderNumber);\n controller.addSensorDataGenerator(getRate(), getChannel(), generator);\n }", "public void add(Vector<String> prod) {\n\tproductions.add(prod);\n }", "void addUses(Equipment newUses);", "public System(String implClassName, Params param) {\n\t\tSimLogger.log(Level.INFO, \"New System Created.\");\n\t\tthis.param = param;\n\t\tthis.param.system = this;\n\t\ttry {\n\t\t\tClass implClass = Class.forName(implClassName);\n\t\t\timpl = (Implementation) implClass.newInstance();\n\t\t\t// Set the implementation's system so init() can set it in workload!!!\n\t\t\timpl.sys = this;\n\t\t\timpl.init(param.starter.build());\n\t\t\tSimLogger.log(Level.FINE, \"Implementation \" + implClassName + \" was created successfully.\");\n\n\t\t\ttry {\n\t\t\t\tfor(String s : param.measures) {\n\t\t\t\t\tSimLogger.log(Level.FINE, \"Adding measure \" + s + \" to system.\");\n\t\t\t\t\tClass measureClass = Class.forName(s);\n\t\t\t\t\tMeasure measure = (Measure) measureClass.newInstance();\n\t\t\t\t\tmeasures.add(measure);\n\t\t\t\t}\n\t\t\t\tCollections.sort(measures);\n\t\t\t} catch(ClassNotFoundException e) {\n\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot find measure class with name = \" + implClassName);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} catch(InstantiationException e) {\n\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate measure class with name = \" + implClassName);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} catch(IllegalAccessException e) {\n\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate measure class with name = \" + implClassName);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\n\t\t\t//init actors\n\t\t\tHashMap<String, Integer> actorMachineInstances = param.starter.buildActorMachine();\n\t\t\tfor(String aType : actorMachineInstances.keySet()) {\n\t\t\t\tint numActors = actorMachineInstances.get(aType);\n\t\t\t\tSimLogger.log(Level.FINE, \"Creating \" + numActors + \" many of actor type \" + aType);\n\t\t\t\tfor(int i = 0; i < numActors; i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tClass actorClass = Class.forName(aType);\n\t\t\t\t\t\tActorMachine am = (ActorMachine) actorClass.newInstance();\n\t\t\t\t\t\tString actorName = am.getPrefix() + i;\n\t\t\t\t\t\tam.actor = actorName;\n\t\t\t\t\t\tam.actorType = aType;\n\t\t\t\t\t\tam.sys = this;\n\t\t\t\t\t\tactors.put(actorName, am);\n\t\t\t\t\t} catch(ClassNotFoundException e) {\n\t\t\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot find actor machine class with name = \" + implClassName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch(InstantiationException e) {\n\t\t\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate actor machine class with name = \" + implClassName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch(IllegalAccessException e) {\n\t\t\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate actor machine class with name = \" + implClassName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSimLogger.log(Level.FINE, \"Actors init was successful.\");\n\n\t\t} catch(ClassNotFoundException e) {\n\t\t\tSimLogger.log(Level.SEVERE, \"Cannot find implementation class with name = \" + implClassName);\n\t\t\te.printStackTrace();\n\t\t} catch(InstantiationException e) {\n\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate implementation class with name = \" + implClassName);\n\t\t\te.printStackTrace();\n\t\t} catch(IllegalAccessException e) {\n\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate implementation class with name = \" + implClassName);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void addClouds()\n {\n Cloud cloud1 = new Cloud(170, 125);\n addObject(cloud1, 170, 125);\n Cloud cloud2 = new Cloud(450, 175);\n addObject(cloud2, 450, 175);\n Cloud cloud3 = new Cloud(775, 50);\n addObject(cloud3, 775, 50);\n }", "void addFeatures(Features features);", "public void add(Collection<T> entities) {\n\t\tnewEntities.addAll(entities);\n\t}", "private void addUpdateablesToGameLoop(){\n GameLoop.getInstance().addUpdateables(playerController.getPlayers().get(0));\n for (Enemy e : enemyController.getEnemies()){\n GameLoop.getInstance().addUpdateables(e);\n }\n\n GameLoop.getInstance().addUpdateables(foodController.getFood().get(0));\n }", "public void addPart() {\n\t\tengineCat.addPart(eg100);\n\t\tengineCat.addPart(eg133);\n\t\tengineCat.addPart(eg210);\n\t\tengineCat.addPart(ed110);\n\t\tengineCat.addPart(ed180);\n\t\tengineCat.addPart(eh120);\n\t\t\n\t\ttransCat.addPart(tm5);\n\t\ttransCat.addPart(tm6);\n\t\ttransCat.addPart(ta5);\n\t\ttransCat.addPart(ts6);\n\t\ttransCat.addPart(tsf7);\n\t\ttransCat.addPart(tc120);\n\t\t\n\t\textCat.addPart(xc);\n\t\textCat.addPart(xm);\n\t\textCat.addPart(xs);\n\t\t\n\t\tintCat.addPart(in);\n\t\tintCat.addPart(ih);\n\t\tintCat.addPart(is);\n\t}", "public static void mainRegistry() {\n\t\tregisterTileEntity(TileEntityLightningCell.class);\n\t\tregisterTileEntity(TileEntityLightningFurnace.class);\n\t\tregisterTileEntity(TileEntityLightningCrusher.class);\n\t\tregisterTileEntity(TileEntityLightningInfuser.class);\n\t\tregisterTileEntity(TileEntityLightningBreaker.class);\n\t\tregisterTileEntity(TileEntityLightningMiner.class);\n\t\tregisterTileEntity(TileEntityStaticGenerator.class);\n\t\tregisterTileEntity(TileEntityChargingPlate.class);\n\t\tregisterTileEntity(TileEntityEnchReallocator.class);\n\t\tregisterTileEntity(TileEntityLightningCannon.class);\n\t\tregisterTileEntity(TileEntityLightningTransmitter.class);\n\t\tregisterTileEntity(TileEntityLightningReceiver.class);\n\t\tregisterTileEntity(TileEntityEnergyProvider.class);\n\t\tregisterTileEntity(TileEntityEnergyReceiver.class);\n\t}" ]
[ "0.70192707", "0.6548299", "0.6531313", "0.6414015", "0.6406917", "0.6382222", "0.6328581", "0.63194275", "0.62378067", "0.61610466", "0.60148555", "0.59358865", "0.5866261", "0.58092666", "0.5770634", "0.56459", "0.5633512", "0.56098706", "0.560864", "0.55864674", "0.5543593", "0.553517", "0.55340093", "0.5530316", "0.5512515", "0.549499", "0.5436977", "0.5434867", "0.53782856", "0.53742754", "0.5373044", "0.537163", "0.53631425", "0.5318927", "0.5311977", "0.52980244", "0.5267802", "0.52658165", "0.5254726", "0.52540267", "0.52418566", "0.5215857", "0.52061653", "0.5188612", "0.51882255", "0.518519", "0.51847726", "0.51737344", "0.5162453", "0.515927", "0.5159122", "0.51582694", "0.51471317", "0.51448804", "0.5137417", "0.51346856", "0.51345855", "0.5133654", "0.51275045", "0.5120597", "0.5119081", "0.5104205", "0.5097081", "0.50884944", "0.5073435", "0.5061412", "0.50600404", "0.5059929", "0.50470173", "0.50469583", "0.504658", "0.50410414", "0.5039328", "0.50289553", "0.502764", "0.50208133", "0.5019282", "0.5014303", "0.49793345", "0.49736798", "0.4965805", "0.49612093", "0.49563566", "0.49520126", "0.49446276", "0.49425077", "0.4940169", "0.49390107", "0.49342167", "0.4931194", "0.49292278", "0.49275643", "0.49268514", "0.49156022", "0.49155912", "0.49132818", "0.49113336", "0.49086627", "0.49049643", "0.49031827" ]
0.76771444
0
Add the entity to all the systems in the given systembits;
void addEntityToSystems(Entity e, RECSBits systemBits) { for (int i = systemBits.nextSetBit(0); i >= 0; i = systemBits.nextSetBit(i + 1)) { systemMap.get(i).addEntity(e.id); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addSystem(EntitySystem... systems) {\n \t\tfor (EntitySystem s : systems)\n \t\t\taddSystem(s);\n \t}", "@SuppressWarnings(\"unchecked\")\n \tvoid addSystem(EntitySystem system) {\n \t\tif (systems.contains(system))\n \t\t\tthrow new RuntimeException(\"System already added\");\n \t\tsystem.id = getNewSystemId();\n \t\tsystem.componentBits = world.getComponentBits(system.components);\n \n \t\tClass<? extends EntitySystem> class1 = system.getClass();\n \t\tdo {\n \t\t\tfor (Field field : class1.getDeclaredFields()) {\n \t\t\t\t// Check for ComponentManager declarations.\n \t\t\t\tif (field.getType() == ComponentMapper.class) {\n \t\t\t\t\tfield.setAccessible(true);\n \t\t\t\t\t// Read the type in the <> of componentmanager\n \t\t\t\t\tType type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];\n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Set the component manager declaration with the right\n \t\t\t\t\t\t// component manager.\n \t\t\t\t\t\tfield.set(system, world.getComponentMapper((Class<? extends Component>) type));\n \t\t\t\t\t} catch (IllegalArgumentException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t} catch (IllegalAccessException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t// check for EventListener declarations.\n \t\t\t\tif (field.getType() == EventListener.class) {\n \t\t\t\t\tfield.setAccessible(true);\n \t\t\t\t\t// Read the type in the <> of eventListener.\n \t\t\t\t\tType type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];\n \t\t\t\t\t@SuppressWarnings(\"rawtypes\")\n \t\t\t\t\tEventListener<? extends Event> eventListener = new EventListener();\n \t\t\t\t\tworld.registerEventListener(eventListener, (Class<? extends Event>) type);\n \n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Set the event listener declaration with the right\n \t\t\t\t\t\t// field listener.\n \t\t\t\t\t\tfield.set(system, eventListener);\n \t\t\t\t\t} catch (IllegalArgumentException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t} catch (IllegalAccessException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\tclass1 = (Class<? extends EntitySystem>) class1.getSuperclass();\n \t\t} while (class1 != EntitySystem.class);\n \t\tsystems.add(system);\n \t\tsystemMap.put(system.id, system);\n\t\tsystem.world = world;\n \t}", "void removeEntityFromSystems(Entity e, RECSBits systemBits) {\n \t\tfor (int i = systemBits.nextSetBit(0); i >= 0; i = systemBits.nextSetBit(i + 1)) {\n \t\t\tsystemMap.get(i).removeEntity(e.id);\n \t\t}\n \t}", "RECSBits getSystemBits(RECSBits componentBits) {\n \t\tRECSBits systemBits = new RECSBits();\n \t\tfor (EntitySystem s : systems) {\n \t\t\tif (s.getComponentBits().contains(componentBits)) {\n \t\t\t\tsystemBits.set(s.id);\n \t\t\t}\n \t\t}\n \t\treturn systemBits;\n \t}", "public Systems add(System system) {\r\n\t\tif (system != null) {\r\n\t\t\tif (system instanceof InitializeSystem) {\r\n\t\t\t\t__initializeSystems.add((InitializeSystem) system);\r\n\t\t\t}\r\n\t\t\tif (system instanceof ExecuteSystem) {\r\n\t\t\t\t__executeSystems.add((ExecuteSystem) system);\r\n\t\t\t}\r\n\t\t\tif (system instanceof RenderSystem) {\r\n\t\t\t\t__renderSystems.add((RenderSystem) system);\r\n\t\t\t}\r\n\t\t\tif (system instanceof TearDownSystem) {\r\n\t\t\t\t__tearDownSystems.add((TearDownSystem) system);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "public void attach(SGSystem nSystem) {\r\n systems.add(nSystem);\r\n }", "private void initExternalSystemsAvailable() {\n externalSystemsAvailable.add(\"Accounting system\");\n externalSystemsAvailable.add(\"Tax system\");\n }", "public void update() {\r\n for (SGSystem sys : systems.toArray(new SGSystem[0])) {\r\n sys.update();\r\n }\r\n }", "void process(float deltaInSec) {\n \t\tfor (EntitySystem system : systems) {\n \t\t\tif (system.isEnabled()) {\n \t\t\t\tsystem.processSystem(deltaInSec);\n \t\t\t}\n \t\t}\n \t}", "@Override\n public void addAllElements() {\n addAllSoftwareSystems();\n addAllPeople();\n }", "public void addCoordinateSystem(CoordinateSystem cs) {\n if (cs == null)\n throw new RuntimeException(\"Attempted to add null CoordinateSystem to var \" + forVar.getFullName());\n\n if (coordSys == null)\n coordSys = new ArrayList<>(5);\n coordSys.add(cs);\n }", "public void addNewSystemUser()\n {\n\n DietTreatmentSystemUserBO newUser = new DietTreatmentSystemUserBO();\n // default user\n newUser.setSystemUser(SystemUserController.getInstance()\n .getCurrentUser());\n // default function\n newUser.setFunction(SystemUserFunctionBO.TREATING_ASSISTANT);\n\n _dietTreatment.addSystemUsers(newUser);\n }", "void addCoordinateSystem(CoordinateSystem cs);", "private void toBeAddedEntities()\n\t{\n\t\tif( entitiesToAdd.isEmpty() )\n\t\t{\n\t\t\treturn ;\n\t\t}\n\n\t\tfinal List<Event<?>> events = MalletList.<Event<?>>newList() ;\n\n\t\tfinal int size = entitiesToAdd.size() ;\n\t\tfor( int i = 0; i < size; ++i )\n\t\t{\n\t\t\tfinal Entity entity = entitiesToAdd.get( i ) ;\n\t\t\thookEntity( eventSystem, events, entity ) ;\n\t\t\tentities.add( entity ) ;\n\t\t}\n\t\tentitiesToAdd.clear() ;\n\t\t\n\t\tif( size > capacity )\n\t\t{\n\t\t\t// If the size of entitiesToAdd exceeds our capacity then \n\t\t\t// we want to resize the array - it's easy for an \n\t\t\t// array to expand, it's much harder to shrink it!\n\t\t\tentitiesToAdd = MalletList.<Entity>newList( capacity ) ;\n\t\t}\n\t}", "private void addSystemDirFilesToImage() throws IOException {\n File sourceSystemDir = new File(builderContext.sourceTbOptionsDir, \"system.v2\");\n if (!isValidCSMSource(sourceSystemDir)) {\n // Fall back to the system default, ~/Amplio/ACM/system.v2\n sourceSystemDir = new File(AmplioHome.getAppSoftwareDir(), \"system.v2\");\n }\n\n File targetSystemDir = new File(imageDir, \"system\");\n\n // The csm_data.txt file. Control file for the TB.\n File csmData = new File(sourceSystemDir, \"csm_data.txt\");\n FileUtils.copyFileToDirectory(csmData, targetSystemDir);\n\n // Optionally, the source for csm_data.txt file. \n File controlDefFile = new File(sourceSystemDir, \"control_def.txt\");\n if (controlDefFile.exists()) {\n FileUtils.copyFileToDirectory(controlDefFile, targetSystemDir);\n }\n\n // If UF is hidden in the deployment, copy the appropriate 'uf.der' file to 'system/'\n if (deploymentInfo.isUfHidden()) {\n UfKeyHelper ufKeyHelper = new UfKeyHelper(builderContext.project);\n byte[] publicKey = ufKeyHelper.getPublicKeyFor(builderContext.deploymentNo);\n File derFile = new File(targetSystemDir, \"uf.der\");\n try (FileOutputStream fos = new FileOutputStream(derFile);\n DataOutputStream dos = new DataOutputStream(fos)){\n dos.write(publicKey);\n }\n }\n }", "boolean add( Software s );", "public void addToComponent(String objective, OpSystem system);", "private void createSignalSystems() {\r\n\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(2)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(3)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(4)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(5)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(7)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(8)));\r\n\r\n if (TtCreateParallelNetworkAndLanes.checkNetworkForSecondODPair(this.scenario.getNetwork())) {\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(10)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(11)));\r\n }\r\n }", "private void setupPowerSystem() {\n\t\tps = new PowerSystem(PowerSystemSolutionMethod.ANL_OPF);\r\n\t\t\r\n\t\t// Create nodes & register with power system\r\n\t\tNodeData nodeWindGenerator = new NodeData(1,1.0,0,false,true);\r\n\t\tps.addNode(nodeWindGenerator);\r\n\t\tNodeData nodeSubstation2 = new NodeData(2,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation2);\r\n\t\tNodeData nodeCityResidential = new NodeData(3,1.0,0,false);\r\n\t\tps.addNode(nodeCityResidential);\r\n\t\tNodeData nodeCityIndustrial = new NodeData(4,1.0,0,false);\r\n\t\tps.addNode(nodeCityIndustrial);\r\n\t\tNodeData nodeCityCommercial = new NodeData(5,1.0,0,false);\r\n\t\tps.addNode(nodeCityCommercial);\r\n\t\tNodeData nodeCoalGenerator = new NodeData(7,1.0,0,false,true);\r\n\t\tps.addNode(nodeCoalGenerator);\r\n\t\tNodeData nodeSubstation3 = new NodeData(8,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation3);\r\n\t\tNodeData nodeGasGenerator = new NodeData(11,1.0,0,false,true);\r\n\t\tps.addNode(nodeGasGenerator);\r\n\t\tNodeData nodeWindStorage = new NodeData(9,1.0,0,false);\r\n\t\tps.addNode(nodeWindStorage);\r\n\t\tNodeData nodeSubstation1 = new NodeData(0,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation1);\r\n\t\t\r\n\t\t// Create lines & register with power system\r\n\t\tMWTimeSeries branchTimeSeries = null;\r\n\t\t\r\n\t\tBranchData branchWindGeneratorToLocalSubstation = new BranchData(nodeWindGenerator,nodeSubstation1,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindGeneratorToLocalSubstation,\"Wind Generator to Substation 1\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindGeneratorToLocalSubstation);\r\n\r\n\t\tBranchData branchWindStorageToLocalSubstation = new BranchData(nodeWindStorage,nodeSubstation1,0.01,0,1500.0,false);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindStorageToLocalSubstation,\"Storage to Substation 1\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindStorageToLocalSubstation);\r\n\t\t\r\n\t\tbranchWindLocalSubstationToCitySubstation = new BranchData(nodeSubstation1,nodeSubstation2,0.01,0,125.0,false);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindLocalSubstationToCitySubstation,\"Substation 1 to Substation 2\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindLocalSubstationToCitySubstation);\r\n\t\t\r\n\t\tBranchData branchWindToResidential = new BranchData(nodeSubstation2,nodeCityResidential,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToResidential,\"Substation 2 to Residential\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindToResidential);\r\n\t\t\r\n\t\tBranchData branchWindToCommercial = new BranchData(nodeSubstation2,nodeCityCommercial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToCommercial,\"Substation 2 to Commercial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindToCommercial);\r\n\r\n\t\tBranchData branchWindToIndustrial = new BranchData(nodeSubstation2,nodeCityIndustrial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToIndustrial,\"Substation 2 to Industrial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchWindToIndustrial);\r\n\t\t\r\n\t\tBranchData branchCoalGeneratorToSubstation = new BranchData(nodeCoalGenerator,nodeSubstation3,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalGeneratorToSubstation,\"Coal Generator to Substation 3\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchCoalGeneratorToSubstation);\r\n\t\t\r\n\t\t\r\n\t\tBranchData branchGasToSubstation = new BranchData(nodeGasGenerator,nodeSubstation3,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchGasToSubstation,\"Natural Gas Generator to Substation 3\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchGasToSubstation);\r\n\t\t\r\n\t\tBranchData branchCoalToResidential = new BranchData(nodeSubstation3,nodeCityResidential,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToResidential,\"Substation 3 to Residential\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToResidential);\r\n\t\t\r\n\t\tBranchData branchCoalToIndustrial = new BranchData(nodeSubstation3,nodeCityIndustrial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToIndustrial,\"Substation 3 to Industrial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToIndustrial);\r\n\t\t\r\n\t\tBranchData branchCoalToCommercial = new BranchData(nodeSubstation3,nodeCityCommercial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToCommercial,\"Substation 3 to Commercial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToCommercial);\r\n\r\n\t\t\r\n\t\t// Create loads\r\n\t\tMWTimeSeries loadTimeSeries = null;\r\n\t\t\r\n\t\tloadResidential = new LoadData(nodeCityResidential,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadResidential,\"Residential load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadResidential);\r\n\t\t\r\n\t\tloadCommercial = new LoadData(nodeCityCommercial,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadCommercial,\"Commercial load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadCommercial);\r\n\t\t\r\n\t\tloadIndustrial = new LoadData(nodeCityIndustrial,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadIndustrial,\"Industrial load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadIndustrial);\r\n\t\t\r\n\t\t// Create gens\r\n\t\tMWTimeSeries genTimeSeries = null;\r\n\t\t\r\n\t\tgensWithCostsAndEmissions = new ArrayList<CostAndEmissionsProvider>();\r\n\t\tGeneratorDataWithLinearCostAndEmissions genCoal = new GeneratorDataWithLinearCostAndEmissions(nodeCoalGenerator,600,0,2000,0,0,9999,true,2000,20.0,0,1.0,includeFixedCostsAndEmissions);\r\n\t\tgensWithCostsAndEmissions.add(genCoal);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genCoal);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genCoal,\"Coal generation\");\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tps.addGenerator(genCoal);\r\n\t\t\r\n\t\tGeneratorDataWithLinearCostAndEmissions genGas = new GeneratorDataWithLinearCostAndEmissions(nodeGasGenerator,200,0,2000,0,0,9999,true,700.0,70.0,0,0.5,includeFixedCostsAndEmissions);\r\n\t\tgensWithCostsAndEmissions.add(genGas);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genGas);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genGas,\"Natural gas generation\");\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tps.addGenerator(genGas);\r\n\t\t\r\n\t\tgenWind = new WindGeneratorDataWithLinearCostAndEmissions(nodeWindGenerator,initialWindGen,0,210,initialWindVariation,true,200.0,0,0,0,includeFixedCostsAndEmissions);\r\n\t\tgenWind.setAnimating(false);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genWind);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genWind,\"Wind generation\");\r\n\t\twindGenTimeSeries = genTimeSeries;\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tgensWithCostsAndEmissions.add(genWind);\r\n\t\tps.addGenerator(genWind);\r\n\t\t\r\n\t\tgenStorage = new StorageDevice(nodeWindStorage,0,0,0,0,0,0,true,genWind,branchWindLocalSubstationToCitySubstation,simClock,1000,100);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genStorage,\"Storage generation\");\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genStorage);\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(genStorage);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tgensWithCostsAndEmissions.add(genStorage);\r\n\t\tps.addGenerator(genStorage);\r\n\t\t\r\n\t\tps.solve();\r\n\t\t\r\n\t\tArrayList<LineAndDistanceInfoProvider> lines; \r\n\t\tFlowArrowsForBranchData fA;\r\n\t\tSimpleLineDisplay line;\r\n\t\t\r\n\t\tBranchColorProvider branchColorProvider = new BranchColorDynamic(Color.BLACK,0.85,Color.ORANGE,1.0,Color.RED);\r\n\t\tBranchThicknessProvider branchThicknessProvider = new BranchThicknessDynamic(1.0,0.85,2.0,1.0,3.0);\r\n\t\tFlowArrowColorProvider flowArrowColorProvider = new FlowArrowColorDynamic(new Color(0,255,0,255/2),0.85,new Color(255,128,64,255/2),1.0,new Color(255,0,0,255/2));\r\n\t\t\r\n\t\t\r\n\t\tdouble switchthickness = 5.0;\r\n\r\n\t\t// Line Coal Generator to Fossil Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsCoalGenToCoalSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,350),new Point2D.Double(710 - 70,212),1);\r\n\t\tpointsCoalGenToCoalSubstation.add(line.getFromPoint());\r\n\t\tpointsCoalGenToCoalSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsCoalGenToCoalSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsCoalGenToCoalSubstation.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsCoalGenToCoalSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalGeneratorToSubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalGeneratorToSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\r\n\t\t//circuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(640,260),12,new Color(0f,0f,0f,1f),0,branchCoalGeneratorToSubstation));\r\n\t\t\r\n\t\t// Line Gas Generator to Fossil Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsGasGenToFossilSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,112.5),new Point2D.Double(765 - 70,160),1);\r\n\t\tpointsGasGenToFossilSubstation.add(line.getFromPoint());\r\n\t\tpointsGasGenToFossilSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsGasGenToFossilSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsGasGenToFossilSubstation.add(line.getToPoint());\r\n\t\tpointsGasGenToFossilSubstation.add(new Point2D.Double(710 - 70,212));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsGasGenToFossilSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchGasToSubstation, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchGasToSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\t//circuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(660,170),12,new Color(0f,0f,0f,1f),0,branchGasToSubstation));\r\n\t\t\r\n\t\t// Line Wind Generator to Wind Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindGenToWindSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(89,281),new Point2D.Double(89,150),1);\r\n\t\tpointsWindGenToWindSubstation.add(line.getFromPoint());\r\n\t\tpointsWindGenToWindSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindGenToWindSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindGenToWindSubstation.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindGenToWindSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindGeneratorToLocalSubstation, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindGeneratorToLocalSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(100,200),12,new Color(0f,0f,0f,1f),0,branchWindGeneratorToLocalSubstation));\t\t\r\n\t\t\r\n\t\t// Line storage to Wind Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindStorageToWindSubstation = new ArrayList<Point2D.Double>();\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(210,25));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,25));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,55));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,95));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,140));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindStorageToWindSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 2, Math.PI/20, \r\n\t\t\t\tbranchWindStorageToLocalSubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindStorageToLocalSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(100,75),12,new Color(0f,0f,0f,1f),0,branchWindStorageToLocalSubstation));\t\t\r\n\t\t\r\n\t\t// Line substation 2 to Residential load\r\n\t\tArrayList<Point2D.Double> pointsWindStationToResidential = new ArrayList<Point2D.Double>();\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(351 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(419 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(457 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(525 - 70,212.5));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindStationToResidential, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToResidential, branchColorProvider, circuitpanel, true, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToResidential,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(413 - 70,180),12,new Color(0f,0f,0f,1f),0,branchWindToResidential));\t\t\r\n\t\t\r\n\t\t// Line substation 3 to Residential load\r\n\t\tArrayList<Point2D.Double> pointsFossilStationToResidential = new ArrayList<Point2D.Double>();\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(710 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(631 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(592 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(525 - 70,212.5));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsFossilStationToResidential, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToResidential, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToResidential,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(585 - 70,180),12,new Color(0f,0f,0f,1f),0,branchCoalToResidential));\t\t\r\n\t\t\r\n\t\t// Line Substation 3 to Industrial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsFossilSubstationToIndustrial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,212.5),new Point2D.Double(525 - 70,365),1);\r\n\t\tpointsFossilSubstationToIndustrial.add(line.getFromPoint());\r\n\t\tpointsFossilSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsFossilSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsFossilSubstationToIndustrial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsFossilSubstationToIndustrial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToIndustrial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToIndustrial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(585 - 70,280),12,new Color(0f,0f,0f,1f),-Math.PI/5,branchCoalToIndustrial));\r\n\t\t\r\n\t\t// Line Substation 3 to Commercial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsSub3ToCommercial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,212.5),new Point2D.Double(525 - 70,55),1);\r\n\t\tpointsSub3ToCommercial.add(line.getFromPoint());\r\n\t\tpointsSub3ToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsSub3ToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsSub3ToCommercial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsSub3ToCommercial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToCommercial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToCommercial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(615 - 70,105),12,new Color(0f,0f,0f,1f),Math.PI/5,branchCoalToCommercial));\r\n\r\n\t\t\r\n\t\t// Line Substation 2 to Industrial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindSubstationToIndustrial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(351 - 70,212.5),new Point2D.Double(525 - 70,365),1);\r\n\t\tpointsWindSubstationToIndustrial.add(line.getFromPoint());\r\n\t\tpointsWindSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindSubstationToIndustrial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindSubstationToIndustrial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToIndustrial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToIndustrial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(399 - 70,273),12,new Color(0f,0f,0f,1f),Math.PI/4,branchWindToIndustrial));\r\n\r\n\t\t// Line Substation 2 to Commercial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindSubstationToCommercial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(351 - 70,212.5),new Point2D.Double(525 - 70,55),1);\r\n\t\tpointsWindSubstationToCommercial.add(line.getFromPoint());\r\n\t\tpointsWindSubstationToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindSubstationToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindSubstationToCommercial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindSubstationToCommercial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToCommercial, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToCommercial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(396 - 70,140),12,new Color(0f,0f,0f,1f),-Math.PI/4,branchWindToCommercial));\r\n\t\t\r\n\t\t// Line Substation 1 to Substation 2\r\n\t\tArrayList<Point2D.Double> pointsSub0ToSub1 = new ArrayList<Point2D.Double>();\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(85,140));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,140));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,156));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,196));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(190,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(230,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(351 - 70,212));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsSub0ToSub1, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 2, Math.PI/20, \r\n\t\t\t\tbranchWindLocalSubstationToCitySubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindLocalSubstationToCitySubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(195,141),12,new Color(0f,0f,0f,1f),0,branchWindLocalSubstationToCitySubstation));\r\n\t\t\r\n\t\t\r\n\t\t// Coal plant display\r\n\t\ttry {\r\n\t\t\tCoalPlantDisplay coaldisplay = new CoalPlantDisplay(new Point2D.Double(650 - 70,300),0,0.0,genCoal);\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(coaldisplay);\r\n\t\t\tcircuitpanel.addMouseListener(coaldisplay);\r\n\t\t\tCostAndEmissionsOverlay coaloverlay = new CostAndEmissionsOverlay(new Point2D.Double(700 - 70,450),genCoal);\r\n\t\t\tcostOverlays.add(coaloverlay);\r\n\t\t\tcircuitpanel.getTopLayerRenderables().add(coaloverlay);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Gas plant display\r\n\t\ttry {\r\n\t\tGasPlantDisplay gasdisplay = new GasPlantDisplay(new Point2D.Double(650 - 70,40),0.0,genGas);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(gasdisplay);\r\n\t\tcircuitpanel.addMouseListener(gasdisplay);\r\n\t\tCostAndEmissionsOverlay gasoverlay = new CostAndEmissionsOverlay(new Point2D.Double(700 - 70,20),genGas);\r\n\t\tcostOverlays.add(gasoverlay);\r\n\t\tcircuitpanel.getTopLayerRenderables().add(gasoverlay);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Wind plant display\r\n\t\ttry {\r\n\t\t\twinddisplay = new WindPlantDisplay(new Point2D.Double(50,240),0.0,genWind);\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(winddisplay);\r\n\t\t\tcircuitpanel.getAnimatables().add(winddisplay);\r\n\t\t\tcircuitpanel.addMouseListener(winddisplay);\r\n\t\t\tCostAndEmissionsOverlay windoverlay = new CostAndEmissionsOverlay(new Point2D.Double(100,450),genWind);\r\n\t\t\tcostOverlays.add(windoverlay);\r\n\t\t\tcircuitpanel.getTopLayerRenderables().add(windoverlay);\t\t\t\t\t\t\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// Storage display\r\n//\t\ttry {\r\n\t\t\t//SubstationDisplay storagedisplay = new SubstationDisplay(new Point2D.Double(160,0),\"Storage\");\r\n\t\t\t//circuitpanel.getMiddleLayerRenderables().add(storagedisplay);\r\n\t\t\tStorageDisplay storagedisplay = new StorageDisplay(genStorage,StorageDisplay.Alignment.LEFT,StorageDisplay.Alignment.TOP,new Point2D.Double(170,0));\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(storagedisplay);\r\n//\t\t} catch (IOException ie) {\r\n//\t\t\tSystem.out.println(ie);\r\n//\t\t}\r\n\t\t\r\n\t\t// Commercial load\r\n\t\ttry {\r\n\t\t\tCityDisplay commercetonLoad = new CityDisplay(new Point2D.Double(475 - 70,25),CityDisplay.CityType.COMMERCIAL,\"Commercial\",loadCommercial,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(commercetonLoad);\r\n\t\t\tcircuitpanel.addMouseListener(commercetonLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// Residential load\r\n\t\ttry {\r\n\t\t\tCityDisplay residentialLoad = new CityDisplay(new Point2D.Double(475 - 70,175),CityDisplay.CityType.RESIDENTIAL,\"Residential\",loadResidential,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(residentialLoad);\r\n\t\t\tcircuitpanel.addMouseListener(residentialLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\r\n\t\t\r\n\t\t// Industrial load\r\n\t\ttry {\r\n\t\t\tCityDisplay industrialLoad = new CityDisplay(new Point2D.Double(475 - 70,329),CityDisplay.CityType.INDUSTRIAL,\"Industrial\",loadIndustrial,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(industrialLoad);\r\n\t\t\tcircuitpanel.addMouseListener(industrialLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\t// Substation 3\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(660 - 70,212 - 25.0),3));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// Substation 2\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(305 - 70,212 - 25.0),2));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Substation 1\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(39,120.0),1));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new StoredEnergyLabel(new Point2D.Double(230,56),12,Color.BLACK,0,genStorage));\r\n\t\t\r\n\t\t/*\r\n\t\ttotalloadplot = new TotalLoadPlot(\r\n\t\t\t\tnew Point2D.Double(10,10),\r\n\t\t\t\t700,200,\r\n\t\t\t\tps,\r\n\t\t\t\tminutesPerAnimationStep,\r\n\t\t\t\t0,24,\r\n\t\t\t\t0,3000);\r\n\t\t*/\r\n\t\t/*\r\n\t\tMouseCoordinateLabel mclabel = new MouseCoordinateLabel(new Point2D.Double(0,20),12,Color.BLACK,0);\r\n\t\tcircuitpanel.getTopLayerRenderables().add(mclabel);\r\n\t\tcircuitpanel.addMouseMotionListener(mclabel);\r\n\t\tMouseCoordinateLabel mclabel = new MouseCoordinateLabel(new Point2D.Double(0,0),12,Color.BLACK,0);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(mclabel);\r\n\t\tcircuitpanel.addMouseMotionListener(mclabel);\r\n\t\t*/\r\n\t\t\r\n\t\tWindMaxDisplay windMaxLabel = new WindMaxDisplay(new Point2D.Double(144,384),12,Color.BLACK,0,genWind);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(windMaxLabel);\r\n\t\tWindCurtailedDisplay windCurtailedLabel = new WindCurtailedDisplay(new Point2D.Double(144,404),12,Color.BLACK,0,genWind);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(windCurtailedLabel);\r\n\r\n\t\tcircuitpanel.getTopLayerRenderables().add(new BlackoutDisplay(ps));\t\t\r\n\t\t\r\n\t\tcircuitpanel.getAnimatables().add(ps);\r\n\t\t\r\n\t\tcircuitpanel.getTopLayerRenderables().add(\r\n\t\t\t\tnew SimClockDisplay(new Point2D.Double(350,5),12,Color.BLACK,0,simClock)); \r\n\t\t\r\n\t\t// Wind plant at node sixteen\r\n//\t\ttry {\r\n//\t\t\tWindPlantDisplay winddisplay = new WindPlantDisplay(new Point2D.Double(650,340),0.0,genWind);\r\n//\t\t\tcircuitpanel.getMiddleLayerRenderables().add(winddisplay);\r\n//\t\t\tcircuitpanel.getAnimatables().add(winddisplay);\r\n//\t\t\tcircuitpanel.addMouseListener(winddisplay);\r\n//\t\t\tCostAndEmissionsOverlay windoverlay = new CostAndEmissionsOverlay(new Point2D.Double(689,462),genWind);\r\n//\t\t\tcostOverlays.add(windoverlay);\r\n//\t\t\tcircuitpanel.getTopLayerRenderables().add(windoverlay);\t\t\t\t\t\t\r\n//\t\t} catch (IOException ie) {\r\n//\t\t\tSystem.out.println(ie);\r\n//\t\t}\r\n\t\t\r\n\t}", "public void setSystem(byte system) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 4, system);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 4, system);\n\t\t}\n\t}", "public void add(byte[] bytes) {\r\n\t\tint[] hashes = createHashes(bytes, this.k);\r\n\t\tfor (int hash : hashes)\r\n\t\t\tthis.bitset.set(Math.abs(hash % this.bitSetSize), true);\r\n\t\tthis.numberOfAddedElements++;\r\n\t}", "public Systems() {\r\n\t\t__initializeSystems = new ArrayList<InitializeSystem>();\r\n\t\t__executeSystems = new ArrayList<ExecuteSystem>();\r\n\t\t__renderSystems = new ArrayList<RenderSystem>();\r\n\t\t__tearDownSystems = new ArrayList<TearDownSystem>();\r\n\t}", "private void insert(String component, String feature) {\n\tthis.entities.putIfAbsent(component, new HashSet<String>());\n\tSet<String> componentFeatures = this.entities.get(component);\n\tcomponentFeatures.add(feature);\n\tthis.entities.put(component, componentFeatures);\n\t// From features to components which possess them\n\tthis.features.putIfAbsent(feature, new HashSet<String>());\n\tSet<String> components = this.features.get(feature);\n\tcomponents.add(component);\n\t//LogInfo.logs(\" adding: %s :: %s\", feature, component);\n\tthis.features.put(feature, components);\n }", "private void initSystemAccountsData() throws HpcException {\n for (HpcIntegratedSystem system : HpcIntegratedSystem.values()) {\n // Get the data transfer system account.\n final List<HpcIntegratedSystemAccount> accounts = systemAccountDAO.getSystemAccount(system);\n if (accounts != null && accounts.size() == 1) {\n singularSystemAccounts.put(system, accounts.get(0));\n }\n }\n }", "public void add(IApsEntity entity) throws ApsSystemException;", "public final void entryRuleSystemElement() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:537:1: ( ruleSystemElement EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:538:1: ruleSystemElement EOF\n {\n before(grammarAccess.getSystemElementRule()); \n pushFollow(FOLLOW_ruleSystemElement_in_entryRuleSystemElement1081);\n ruleSystemElement();\n\n state._fsp--;\n\n after(grammarAccess.getSystemElementRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleSystemElement1088); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public void addSoftware(Software software){\n products.add (software);\n }", "private EntityManager initSystems() {\n CameraSystem cameraSystem = new CameraSystem(Constants.WINDOW_WIDTH, Constants.WINDOW_HEIGHT);\n addSystem(cameraSystem);\n addSystem(new ZoomSystem());\n //Physics System\n addSystem(new PhysicsSystem());\n //Player movement system\n addSystem(new PlayerMovementSystem());\n\n addSystem(new CannonFiringSystem());\n addSystem(new CollisionSystem());\n addSystem(new KillSystem());\n addSystem(new HealthSystem());\n addSystem(new StatisticSystem());\n addSystem(new EnemySpawningSystem());\n addSystem(new InventorySystem());\n addSystem(new CurrencySystem());\n\n GUISystem guiSystem = new GUISystem();\n InputSystem inputSystem = new InputSystem(guiSystem);\n\n //Input System\n addSystem(inputSystem);\n //Entity Render System\n addSystem(new EntityRenderSystem());\n //Particle System\n addSystem(new ParticleSystem());\n addSystem(new PlayerActionSystem(guiSystem));\n addSystem(new MapRenderSystem());\n addSystem(new HUDSystem());\n //Debug Render System\n addSystem(new DebugRendererSystem());\n //GUI System\n addSystem(guiSystem);\n\n return this;\n }", "public static void registerBlockEntities()\n\t{\n\t}", "static void add_the_general_registers(){\n\t\tgeneral_registers.add('A');\n\t\tgeneral_registers.add('B');\n\t\tgeneral_registers.add('C');\n\t\tgeneral_registers.add('D');\n\t\tgeneral_registers.add('E');\n\t\tgeneral_registers.add('H');\n\t\tgeneral_registers.add('L');\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}", "@Override\r\n\tpublic void saveBatchSysPrivilege(List<SysPrivilege> sysPrivilegeLs) {\n\t\tsysPrivilegeDao.addBacth(sysPrivilegeLs);\r\n\t}", "List<TblSystemInfo> getSyetemByNameOrCode(String systemName,String systemCode);", "public void register(WorldGenKawaiiBaseWorldGen.WorldGen gen)\r\n\t{\t\r\n\t\tif (!this.Enabled) return; \r\n\t\tGameRegistry.registerBlock(this, this.getUnlocalizedName());\r\n\t\t\r\n\t\tString saplingName = name + \".sapling\";\r\n\t\tSapling = new ItemKawaiiSeed(saplingName, SaplingToolTip, this);\r\n\t\tSapling.OreDict = SaplingOreDict;\r\n\t\tSapling.MysterySeedWeight = SeedsMysterySeedWeight;\r\n\t\tSapling.register();\r\n\r\n\t\tString fruitName = name + \".fruit\";\r\n\t\tif (FruitEdible)\r\n\t\t{\r\n\t\t\tItemKawaiiFood fruit = new ItemKawaiiFood(fruitName, FruitToolTip, FruitHunger, FruitSaturation, FruitPotionEffets);\r\n\t\t\tFruit = fruit;\r\n\t\t\tfruit.OreDict = FruitOreDict;\r\n\t\t\t\r\n\t\t\tfruit.register();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tItemKawaiiIngredient fruit = new ItemKawaiiIngredient(fruitName, FruitToolTip);\r\n\t\t\tFruit = fruit;\r\n\t\t\tfruit.OreDict = FruitOreDict;\r\n\t\t\t\r\n\t\t\tfruit.register();\r\n\t\t}\r\n\t\t\r\n\t\tif (gen.weight > 0)\r\n\t\t{\r\n\t\t\tgen.generator = new WorldGenKawaiiTree(this);\r\n\t\t\tModWorldGen.WorldGen.generators.add(gen);\r\n\t\t}\r\n\r\n\t\tModBlocks.AllTrees.add(this);\t\t\r\n\t}", "public void addPart() {\n\t\tengineCat.addPart(eg100);\n\t\tengineCat.addPart(eg133);\n\t\tengineCat.addPart(eg210);\n\t\tengineCat.addPart(ed110);\n\t\tengineCat.addPart(ed180);\n\t\tengineCat.addPart(eh120);\n\t\t\n\t\ttransCat.addPart(tm5);\n\t\ttransCat.addPart(tm6);\n\t\ttransCat.addPart(ta5);\n\t\ttransCat.addPart(ts6);\n\t\ttransCat.addPart(tsf7);\n\t\ttransCat.addPart(tc120);\n\t\t\n\t\textCat.addPart(xc);\n\t\textCat.addPart(xm);\n\t\textCat.addPart(xs);\n\t\t\n\t\tintCat.addPart(in);\n\t\tintCat.addPart(ih);\n\t\tintCat.addPart(is);\n\t}", "private void addEntities(String[][] entityArray)\n\t{\n\t\tfor (int i = 0; i < entityArray.length; ++i)\n\t\t{\n\t\t\taddEntity(entityArray[i][0], Integer.parseInt(entityArray[i][1]));\n\t\t}\n\t}", "@Override\n\tpublic synchronized StorageOperationResponse<GetStorageSystemsResponse> getStorageSystems(\n\t\t\tGetStorageSystemsRequest request) {\n\t\tlogger.log(IJavaEeLog.SEVERITY_DEBUG, this.getClass().getName(), \"getStorageSystems: \" + request.storageSystemIds , null);\n\t\ttry {\n\t\tList<String> requestedSystems = request.storageSystemIds;\n\t\tArrayList<StorageSystem> systemList = new ArrayList<StorageSystem>();\n\t\tif (requestedSystems == null||requestedSystems.isEmpty()) {\n\t\t\tList<String> regions = openstackClient.getRegions();\n\t\t\tlogger.log(IJavaEeLog.SEVERITY_DEBUG, this.getClass().getName(), \"getStorageSystems: zones:\" + regions , null);\n\t\t\tfor (String region : regions) {\n\t\t \t systemList.add(OpenstackAdapterUtil.createStorageSystem(region,accountId));\n\t\t\t}\n\t\t} else {\n\t\t\tList<String> zones = openstackClient.getAvailabilityZones();\n\t\t\tboolean found = false;\n\t\t\tfor (int i = 0;i<requestedSystems.size();i++) {\n\t\t\t if(requestedSystems.get(i) == null) {\n\t\t\t\t systemList.add(null);\n\t\t\t\t continue;\n\t\t\t }\n\t\t found = false;\n\t\t\t for(String zone : zones) {\n\t\t\t if (requestedSystems.get(i).equals(accountId+':'+zone)) {\n\t\t \t systemList.add(OpenstackAdapterUtil.createStorageSystem(zone, accountId));\n\t\t \t found = true;\n\t\t \t break;\n\t\t }\n\t\t\t }\n\t\t\t if (!found) {\n\t\t\t systemList.add(null);\n\t\t\t }\n\t\t\t}\n\t\t}\n\t\tlogger.log(IJavaEeLog.SEVERITY_DEBUG, this.getClass().getName(), \"getStorageSystems: systems found: \" + systemList.size() + \" systems: \" + systemList , null);\n\t\tGetStorageSystemsResponse payload = new GetStorageSystemsResponse();\n\t\tpayload.storageSystems = systemList;\n\t\tStorageOperationResponse<GetStorageSystemsResponse> response = new StorageOperationResponse<GetStorageSystemsResponse>(payload);\n\t\tresponse.setPercentCompleted(100);\n\t\tresponse.setStatus(StorageOperationStatus.COMPLETED);\n\t\treturn response;\n\n\t\t } catch (Exception e) {\n\t\t\tlogger.traceThrowable(IJavaEeLog.SEVERITY_DEBUG, this.getClass().getName(), \"getStorageSystems:\" + e.getMessage(), null,e);\n\t\t\treturn StorageAdapterImplHelper.createFailedResponse(e.getMessage(), GetStorageSystemsResponse.class); \n\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic void init() {\n\t\tfor(EnumStoneType type: EnumStoneType.values()) {\n\t\t\taddChiselVariation(\"stonebrick\", blockStone, type.getMetadata());\n\t\t}\n\n\t\t//Add chisel variations for Endstone Blocks\n\t\tfor(EnumEndStoneType type: EnumEndStoneType.values()) {\n\t\t\taddChiselVariation(\"endstone\", blockEndstone, type.getMetadata());\n\t\t}\n\n\t\tfor(EnumEndStoneSlabType type: EnumEndStoneSlabType.values()) {\n\t\t\taddChiselVariation(\"endstoneslab\", slabEndstone, type.getMetadata());\n\t\t}\n\n\t\t//Add chisel variations for Limestone Blocks\n\t\tfor(EnumLimestoneType type: EnumLimestoneType.values()) {\n\t\t\taddChiselVariation(\"limestone\", blockLimestone, type.getMetadata());\n\t\t}\n\n\t\tfor(EnumLimestoneSlabType type: EnumLimestoneSlabType.values()) {\n\t\t\taddChiselVariation(\"limestoneslab\", slabLimestone, type.getMetadata());\n\t\t}\n\n\t\t//Add chisel variations for Cobblestone Blocks\n\t\tfor(EnumCobblestoneType type: EnumCobblestoneType.values()) {\n\t\t\taddChiselVariation(\"cobblestone\", blockCobblestone, type.getMetadata());\n\t\t}\n\n\t\taddChiselVariation(\"cobblestoneslab\", Blocks.STONE_SLAB, 3);\n\t\tfor(EnumCobblestoneSlabType type: EnumCobblestoneSlabType.values()) {\n\t\t\taddChiselVariation(\"cobblestoneslab\", slabCobblestone, type.getMetadata());\n\t\t}\n\n\t\tfor(EnumMarbleSlabType type: EnumMarbleSlabType.values()) {\n\t\t\taddChiselVariation(\"marbleslab\", slabMarble, type.getMetadata());\n\t\t}\n\n\t\taddChiselVariation(\"stonebrickstairs\", Blocks.STONE_BRICK_STAIRS, 0);\n\t\tstairsStone.forEach(s -> addChiselVariation(\"stonebrickstairs\", s, 0));\n\n\t\tstairsEndstone.forEach(s -> addChiselVariation(\"endstonestairs\", s, 0));\n\n\t\tstairsLimestone.forEach(s -> addChiselVariation(\"limestonestairs\", s, 0));\n\n\t\taddChiselVariation(\"cobblestonestairs\", Blocks.STONE_STAIRS, 0);\n\t\tstairsCobblestone.forEach(s -> addChiselVariation(\"cobblestonestairs\", s, 0));\n\t\n\t\tstairsMarble.forEach(s -> addChiselVariation(\"marblestairs\", s, 0));\n\t\t\n\t}", "protected void addSpaceSystemParameters(SpaceSystemType spaceSystem,\n String tableName,\n String[][] tableData,\n int varColumn,\n int typeColumn,\n int sizeColumn,\n int bitColumn,\n int enumColumn,\n int descColumn,\n int unitsColumn,\n int minColumn,\n int maxColumn,\n boolean isTlmHdrTable,\n String tlmHdrSysPath,\n boolean isRootStructure,\n String applicationID) throws CCDDException\n {\n // Set the flag assuming the internal method is used\n boolean useInternal = true;\n\n // Check if an external method is to be used\n if (invocable != null)\n {\n try\n {\n // Execute the external method\n invocable.invokeFunction(\"addSpaceSystemParameters\",\n project,\n factory,\n endianess == EndianType.BIG_ENDIAN,\n isHeaderBigEndian,\n tlmHeaderTable,\n spaceSystem,\n tableName,\n tableData,\n varColumn,\n typeColumn,\n sizeColumn,\n bitColumn,\n enumColumn,\n descColumn,\n unitsColumn,\n minColumn,\n maxColumn,\n isTlmHdrTable,\n tlmHdrSysPath,\n isRootStructure,\n applicationIDName,\n applicationID);\n\n // Set the flag to indicate the internal method is not used\n useInternal = false;\n }\n catch (NoSuchMethodException nsme)\n {\n // The script method couldn't be located in the script; use the internal method\n // instead\n }\n catch (Exception e)\n {\n throw new CCDDException(\"Error in script function '</b>addSpaceSystemParameters<b>'; cause '</b>\"\n + e.getMessage()\n + \"<b>'\");\n }\n }\n\n // Check if the internal method is used\n if (useInternal)\n {\n EntryListType entryList = factory.createEntryListType();\n boolean isTlmHdrRef = false;\n\n // Step through each row in the structure table\n for (String[] rowData : tableData)\n {\n // Add the variable, if it has a primitive data type, to the parameter set and\n // parameter type set. Variables with structure data types are defined in the\n // container set. Note that a structure variable produces a ContainerRefEntry;\n // there is no place for the structure variable's description so it's discarded\n addParameterAndType(spaceSystem,\n rowData[varColumn],\n rowData[typeColumn],\n rowData[sizeColumn],\n rowData[bitColumn],\n (enumColumn != -1 && !rowData[enumColumn].isEmpty() ? rowData[enumColumn] : null),\n (unitsColumn != -1 && !rowData[unitsColumn].isEmpty() ? rowData[unitsColumn] : null),\n (minColumn != -1 && !rowData[minColumn].isEmpty() ? rowData[minColumn] : null),\n (maxColumn != -1 && !rowData[maxColumn].isEmpty() ? rowData[maxColumn] : null),\n (descColumn != -1 && !rowData[descColumn].isEmpty() ? rowData[descColumn] : null),\n (dataTypeHandler.isString(rowData[typeColumn])\n && !rowData[sizeColumn].isEmpty() ? Integer.valueOf(rowData[sizeColumn].replaceAll(\"^.*(\\\\d+)$\", \"$1\"))\n : 1));\n\n // Add the variable, with either a primitive or structure data type, to the\n // container set\n isTlmHdrRef = addParameterSequenceEntry(spaceSystem,\n rowData[varColumn],\n rowData[typeColumn],\n rowData[sizeColumn],\n entryList,\n isTlmHdrRef);\n }\n\n // Check if the telemetry metadata doesn't exit for this system\n if (spaceSystem.getTelemetryMetaData() == null)\n {\n // Create the telemetry metadata\n createTelemetryMetadata(spaceSystem);\n }\n\n // Check if any variables were added to the entry list for the container set\n if (!entryList.getParameterRefEntryOrParameterSegmentRefEntryOrContainerRefEntry().isEmpty())\n {\n // Create the sequence container set\n ContainerSetType containerSet = factory.createContainerSetType();\n SequenceContainerType seqContainer = factory.createSequenceContainerType();\n seqContainer.setEntryList(entryList);\n containerSet.getSequenceContainer().add(seqContainer);\n\n // Use the last variable name in the table's path as the container name\n seqContainer.setName(cleanSystemPath(tableName.replaceFirst(\".*\\\\.\", \"\")));\n\n // Check if this is the telemetry header\n if (isTlmHdrTable)\n {\n // Set the abstract flag to indicate the telemetry metadata represents a\n // telemetry header\n seqContainer.setAbstract(true);\n }\n // Not the telemetry header. Check if this is a root structure that references the\n // telemetry header table (child structures don't require a reference to the\n // telemetry header) and if the application ID information is provided\n else if (isRootStructure\n && isTlmHdrRef\n && applicationIDName != null\n && !applicationIDName.isEmpty()\n && applicationID != null\n && !applicationID.isEmpty())\n {\n // Create a base container reference to the telemetry header table so that the\n // application ID can be assigned as a restriction criteria\n BaseContainer baseContainer = factory.createSequenceContainerTypeBaseContainer();\n baseContainer.setContainerRef(\"/\"\n + project.getValue().getName()\n + (tlmHdrSysPath == null\n || tlmHdrSysPath.isEmpty() ? \"\" : \"/\"\n + cleanSystemPath(tlmHdrSysPath))\n + \"/\"\n + tlmHeaderTable\n + \"/\"\n + tlmHeaderTable);\n RestrictionCriteria restrictCriteria = factory.createSequenceContainerTypeBaseContainerRestrictionCriteria();\n ComparisonList compList = factory.createMatchCriteriaTypeComparisonList();\n ComparisonType compType = factory.createComparisonType();\n compType.setParameterRef(applicationIDName);\n compType.setValue(applicationID);\n compList.getComparison().add(compType);\n restrictCriteria.setComparisonList(compList);\n baseContainer.setRestrictionCriteria(restrictCriteria);\n seqContainer.setBaseContainer(baseContainer);\n }\n\n // Add the parameters to the system\n spaceSystem.getTelemetryMetaData().setContainerSet(containerSet);\n }\n }\n }", "@Override\r\n\tpublic List<MySys> getAllSystems() {\n\t\tString sql = \"SELECT * FROM systems ORDER BY sgroup;\";\r\n\t\t\r\n\t\tList<MySys> list = new ArrayList<MySys>();\r\n\t\tList<Map<String,Object>> rows = this.jdbcTemplate.queryForList(sql);\r\n\t\tfor (Map<String, Object> row : rows) {\r\n\t\t\tMySys sys = new MySys();\r\n\t\t\tsys.setId((int)row.get(\"idsystems\"));\r\n\t\t\tsys.setName((String)row.get(\"sysname\"));\r\n\t\t\tsys.setAlias((String)row.get(\"sysalias\"));\r\n\t\t\tsys.setState((int)row.get(\"state\"));\r\n\t\t\tsys.setStatetime((Date)row.get(\"statetime\"));\r\n\t\t\tlist.add(sys);\r\n\t\t}\r\n\t\t\r\n\t\treturn list;\r\n\t}", "@Override\n public final boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {\n if (aTileEntity == null) {\n return false;\n }\n IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();\n if (aMetaTileEntity == null) {\n return false;\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) {\n ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {\n return mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {\n return mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {\n return mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {\n return mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {\n return mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {\n return mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {\n return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {\n return mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputElemental) {\n return eInputHatches.add((GT_MetaTileEntity_Hatch_InputElemental) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputElemental) {\n return eOutputHatches.add((GT_MetaTileEntity_Hatch_OutputElemental) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Param) {\n return eParamHatches.add((GT_MetaTileEntity_Hatch_Param) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Uncertainty) {\n return eUncertainHatches.add((GT_MetaTileEntity_Hatch_Uncertainty) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OverflowElemental) {\n return eMufflerHatches.add((GT_MetaTileEntity_Hatch_OverflowElemental) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_EnergyMulti) {\n return eEnergyMulti.add((GT_MetaTileEntity_Hatch_EnergyMulti) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DynamoMulti) {\n return eDynamoMulti.add((GT_MetaTileEntity_Hatch_DynamoMulti) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputData) {\n return eInputData.add((GT_MetaTileEntity_Hatch_InputData) aMetaTileEntity);\n }\n if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputData) {\n return eOutputData.add((GT_MetaTileEntity_Hatch_OutputData) aMetaTileEntity);\n }\n return false;\n }", "public boolean addExternalSystem(String name) {\n if (name == null) {\n return false;\n }\n\n if (name.length() == 0) {\n return false;\n }\n\n switch (name) {\n case \"Accounting\":\n if (!searchSystem(name)) {\n AccountingSystem accountingSystem = new AccountingSystem();\n accountingSystem.connectSystem();\n connectedExternalSystems.add(accountingSystem);\n return true;\n }\n\n case \"Tax\":\n if (!searchSystem(name)) {\n TaxSystem taxSystem = new TaxSystem();\n taxSystem.connectSystem();\n connectedExternalSystems.add(taxSystem);\n return true;\n }\n\n default:\n return false;\n }\n }", "protected void addVolumeStorageSystem(Map<URI, StorageSystem> volumeStorageSystems, Volume volume) {\n if (volumeStorageSystems == null) {\n volumeStorageSystems = new HashMap<URI, StorageSystem>();\n }\n\n StorageSystem volumeStorageSystem = volumeStorageSystems.get(volume.getStorageController());\n if (volumeStorageSystem == null) {\n volumeStorageSystem =\n _dbClient.queryObject(StorageSystem.class, volume.getStorageController());\n volumeStorageSystems.put(volumeStorageSystem.getId(), volumeStorageSystem);\n }\n }", "public void addToLinesOfBusiness(entity.AppCritLineOfBusiness element);", "private void addSystemDef(SnmpCollection collection, String systemDefName) {\n log().debug(\"addSystemDef: merging system defintion \" + systemDefName + \" into snmp-collection \" + collection.getName());\n // Find System Definition\n SystemDef systemDef = getSystemDef(systemDefName);\n if (systemDef == null) {\n throwException(\"Can't find system definition \" + systemDefName, null);\n }\n // Add System Definition to target SNMP collection\n if (contains(collection.getSystems().getSystemDefCollection(), systemDef)) {\n log().warn(\"addSystemDef: system definition \" + systemDefName + \" already exist on SNMP collection \" + collection.getName());\n } else {\n log().debug(\"addSystemDef: adding system definition \" + systemDef.getName() + \" to snmp-collection \" + collection.getName());\n collection.getSystems().addSystemDef(systemDef);\n // Add Groups\n for (String groupName : systemDef.getCollect().getIncludeGroupCollection()) {\n Group group = getMibObjectGroup(groupName);\n if (group == null) {\n log().warn(\"addSystemDef: group \" + groupName + \" does not exist on global container\");\n } else {\n if (contains(collection.getGroups().getGroupCollection(), group)) {\n log().debug(\"addSystemDef: group \" + groupName + \" already exist on SNMP collection \" + collection.getName());\n } else {\n log().debug(\"addSystemDef: adding mib object group \" + group.getName() + \" to snmp-collection \" + collection.getName());\n collection.getGroups().addGroup(group);\n }\n }\n }\n }\n }", "@SubscribeEvent\n public static void registerModels(ModelRegistryEvent event)\n {\n for (TreeFamily tree : ModTrees.tfcTrees)\n {\n ModelHelperTFC.regModel(tree.getDynamicBranch());//Register Branch itemBlock\n ModelHelperTFC.regModel(tree);//Register custom state mapper for branch\n }\n\n ModelLoader.setCustomStateMapper(ModBlocks.blockRootyDirt, new StateMap.Builder().ignore(BlockRooty.LIFE).build());\n\n ModTrees.tfcSpecies.values().stream().filter(s -> s.getSeed() != Seed.NULLSEED).forEach(s -> ModelHelperTFC.regModel(s.getSeed()));//Register Seed Item Models\n }", "public final void addFileSystem (FileSystem fs) {\n synchronized (Repository.class) {\n // if the file system is not assigned yet\n if (!fs.assigned && !fileSystems.contains(fs)) {\n // new file system\n fileSystems.add(fs);\n String systemName = fs.getSystemName ();\n\n boolean isReg = names.get (systemName) == null;\n if (isReg && !systemName.equals (\"\")) { // NOI18N\n // file system with the same name is not there => then it is valid\n names.put (systemName, fs);\n fs.setValid (true);\n } else {\n // there is another file system with the same name => it is invalid\n fs.setValid (false);\n }\n // mark the file system as being assigned\n fs.assigned = true;\n // mark as a listener on changes in the file system\n fs.addPropertyChangeListener (propListener);\n fs.addVetoableChangeListener (vetoListener);\n\n // fire info about new file system\n fireFileSystem (fs, true);\n }\n }\n }", "@Override\n public void RegisterEntities(LinkedList<Entity> listToModify) {\n listToModify.add(test1);\n// listToModify.add(test2);\n }", "public void addSolarSystem(SolarSystem solarSystem) {\n interactor.addSolarSystem(solarSystem);\n }", "private static void setSubsystems()\n {\n //Components\n //Talons\n frontLeftTalon.setName(\"DrivetrainSubsystem\", \"FrontLeftDriveTalon\");\n frontRightTalon.setName(\"DrivetrainSubsystem\", \"FrontRightDriveTalon\");\n rearLeftTalon.setName(\"DrivetrainSubsystem\", \"RearLeftDriveTalon\");\n rearRightTalon.setName(\"DrivetrainSubsystem\", \"RearRightDriveTalon\");\n //Sensors\n //navX.setName(\"SensorSubsystem\", \"NavX\");\n System.out.print(pigeon.getAbsoluteCompassHeading());\n \n //Subsystems\n drivetrainSubsystem.setName(\"DrivetrainSubsystem\", \"DrivetrainSubsystem\");\n sensorSubsystem.setName(\"SensorSubsystem\", \"SensorSubsystem\");\n }", "public void addBuses(int[] vbuses)\n\t{\n\t\tfor (int v : vbuses) _list[v] = Empty;\n\t}", "public static void InitializeSystems()\n\t{\n\t\tif (_systems.size() < 1)\n\t\t{\n\t\t\tSystem.out.println(\"ERROR - no systems! (InitializeSystems)\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < _systems.size(); i++)\n\t\t\t_systems.get(i).Start();\n\t}", "@Override\n\tpublic List<Sysmanager> findChecksys(Sysmanager sys) {\n\t\treturn sm.checksys(sys);\n\t}", "public void setSystemId( String systemId ) { this.systemId = systemId; }", "public boolean addComponentParts(World world, Random random, StructureBoundingBox boundingBox)\n {\n if (this.field_143015_k < 0)\n {\n this.field_143015_k = this.getAverageGroundLevel(world, boundingBox);\n\n if (this.field_143015_k < 0)\n {\n return true;\n }\n\n this.boundingBox.offset(0, this.field_143015_k - this.boundingBox.maxY + 5 - 1, 0);\n }\n\n this.fillWithBlocks(world, boundingBox, 1, 1, 1, 10, 4, 10, Blocks.air, Blocks.air, false);\n this.fillWithBlocks(world, boundingBox, 0, 0, 0, 10, 0, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n /*this.fillWithBlocks(world, boundingBox, 0, 0, 0, 10, 0, 0, Blocks.cobblestone, Blocks.cobblestone, false);\n this.fillWithBlocks(world, boundingBox, 10, 0, 0, 10, 0, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n this.fillWithBlocks(world, boundingBox, 10, 0, 10, 0, 0, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n this.fillWithBlocks(world, boundingBox, 0, 0, 10, 0, 0, 0, Blocks.cobblestone, Blocks.cobblestone, false);*/\n this.fillWithBlocks(world, boundingBox, 1, 0, 1, 9, 0, 9, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 4, 0, 10, 4, 10, Blocks.cobblestone, Blocks.cobblestone, false);\n \n //RIGHT WALL\n this.fillWithBlocks(world, boundingBox, 0, 1, 0, 0, 1, 10, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 3, 0, 0, 3, 10, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 0, 2, 1, boundingBox);\n this.fillWithBlocks(world, boundingBox, 0, 2, 2, 0, 2, 4, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 0, 2, 5, boundingBox);\n this.fillWithBlocks(world, boundingBox, 0, 2, 6, 0, 2, 8, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 0, 2, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 10, boundingBox);\n \n //LEFT WALL\n this.fillWithBlocks(world, boundingBox, 10, 1, 0, 10, 1, 10, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 10, 3, 0, 10, 3, 10, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 10, 2, 1, boundingBox);\n this.fillWithBlocks(world, boundingBox, 10, 2, 2, 10, 2, 4, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 10, 2, 5, boundingBox);\n this.fillWithBlocks(world, boundingBox, 10, 2, 6, 10, 2, 8, Blocks.glass, Blocks.glass, false);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 10, 2, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 10, boundingBox);\n \n //FRONT WALL\n this.fillWithBlocks(world, boundingBox, 0, 1, 0, 5, 1, 0, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 7, 1, 0, 10, 1, 0, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 3, 0, 10, 3, 0, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 1, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 2, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 3, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 4, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 5, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 7, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 8, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 2, 0, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 0, boundingBox);\n \n //BACK WALL\n this.fillWithBlocks(world, boundingBox, 0, 1, 10, 10, 1, 10, plankBlock, plankBlock, false);\n this.fillWithBlocks(world, boundingBox, 0, 3, 10, 10, 3, 10, plankBlock, plankBlock, false);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 0, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 1, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 2, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 3, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 4, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 5, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 6, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 7, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.glass, 0, 8, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 2, 10, boundingBox);\n this.placeBlockAtCurrentPosition(world, plankBlock, 0, 10, 2, 10, boundingBox);\n \n \n //DECO\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 3, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 4, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 5, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 6, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 4, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 5, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 6, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.carpet, ((carpetMeta == -1) ? random.nextInt(15) : carpetMeta), 7, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.crafting_table, 0, 9, 1, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 1, 8, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 9, 1, 7, boundingBox);\n this.placeBlockAtCurrentPosition(world, logBlock, 0, 8, 1, 9, boundingBox);\n this.placeBlockAtCurrentPosition(world, Blocks.furnace, this.getMetadataWithOffset(Blocks.furnace, 1), 8, 1, 9, boundingBox);\n this.generateStructureChestContents(world, boundingBox, random, 7, 1, 9, workshopChestContents, getCount(random, 5, 7));\n this.generateStructureChestContents(world, boundingBox, random, 6, 1, 9, workshopChestContents, getCount(random, 5, 7));\n this.placeDoorAtCurrentPosition(world, boundingBox, random, 6, 1, 0, this.getMetadataWithOffset(Blocks.wooden_door, 1));\n //this.placeBlockAtCurrentPosition(world, Blocks.torch, this.getMetadataWithOffset(Blocks.torch, 1), 5, 3, 9, boundingBox);\n\n if (this.getBlockAtCurrentPosition(world, 6, 0, -1, boundingBox).getMaterial() == Material.air && this.getBlockAtCurrentPosition(world, 6, -1, -1, boundingBox).getMaterial() != Material.air)\n {\n this.placeBlockAtCurrentPosition(world, Blocks.stone_stairs, this.getMetadataWithOffset(Blocks.stone_stairs, 3), 6, 0, -1, boundingBox);\n }\n\n /* for (l = 0; l < 6; ++l)\n {\n for (int i1 = 0; i1 < 9; ++i1)\n {\n this.clearCurrentPositionBlocksUpwards(p_74875_1_, i1, 9, l, p_74875_3_);\n this.func_151554_b(p_74875_1_, Blocks.cobblestone, 0, i1, -1, l, p_74875_3_);\n }\n }*/\n\n this.spawnVillagers(world, boundingBox, 2, 1, 2, 1);\n return true;\n }", "public void setSystemId(String systemId);", "public void registerTileEntities() {\n GameRegistry.registerTileEntity(TEEssenceStorage.class, ReferenceMisc.MODID + \"_essencestorage\");\n GameRegistry.registerTileEntity(TEPylon.class, ReferenceMisc.MODID + \"_pylon\");\n GameRegistry.registerTileEntity(TEVitar.class, ReferenceMisc.MODID + \"_vitar\");\n GameRegistry.registerTileEntity(TEStorage.class, ReferenceMisc.MODID + \"_storage\");\n GameRegistry.registerTileEntity(TELeo.class, ReferenceMisc.MODID + \"_leo\");\n GameRegistry.registerTileEntity(TEBreedingChamber.class, ReferenceMisc.MODID + \"_breedingChamber\");\n GameRegistry.registerTileEntity(TEIncubationChamber.class, ReferenceMisc.MODID + \"_incubationChamber\");\n\n }", "private void addToOutOfTypeSystemData(String typeName, Attributes attrs)\n throws XCASParsingException {\n if (this.outOfTypeSystemData != null) {\n FSData fsData = new FSData();\n fsData.type = typeName;\n fsData.indexRep = null; // not indexed\n String attrName, attrValue;\n for (int i = 0; i < attrs.getLength(); i++) {\n attrName = attrs.getQName(i);\n attrValue = attrs.getValue(i);\n if (attrName.startsWith(reservedAttrPrefix)) {\n if (attrName.equals(XCASSerializer.ID_ATTR_NAME)) {\n fsData.id = attrValue;\n } else if (attrName.equals(XCASSerializer.CONTENT_ATTR_NAME)) {\n this.currentContentFeat = attrValue;\n } else if (attrName.equals(XCASSerializer.INDEXED_ATTR_NAME)) {\n fsData.indexRep = attrValue;\n } else {\n fsData.featVals.put(attrName, attrValue);\n }\n } else {\n fsData.featVals.put(attrName, attrValue);\n }\n }\n this.outOfTypeSystemData.fsList.add(fsData);\n this.currentOotsFs = fsData;\n // Set the state; we're ready to accept the \"content\" feature,\n // if one is specified\n this.state = OOTS_CONTENT_STATE;\n }\n }", "public void register(boolean perUserNotMachine, String path) throws ComException {\n\t\tfor (Class<?> cls : getCoClasses())\n\t\t\tRegUtil.registerCoClass(perUserNotMachine, path, cls);\n\t\tfor (Class<?> cls : getAddins())\n\t\t\tRegisterAddin.register(perUserNotMachine, cls);\n\t\tfor (Class<?> cls : getFormRegions())\n\t\t\tRegisterFormRegion.register(perUserNotMachine, cls);\n\t}", "@Override\n public void getAllSystemsInSession() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getAllSystemsInSession\");\n }\n\n List<SystemInSession> listOfSiS = null;\n EntityManager em = EntityManagerService.provideEntityManager();\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n listOfSiS = SystemInSession.getSystemsInSessionForCompanyForSession(em, choosenInstitutionForAdmin);\n } else {\n listOfSiS = SystemInSession.getSystemsInSessionForActivatedTestingSession();\n }\n } else {\n listOfSiS = SystemInSession.getSystemsInSessionForCompanyForSession(em,\n Institution.getLoggedInInstitution());\n }\n foundSystemsInSession = listOfSiS;\n }", "public void addToWorld() {\n world().addObject(this, xPos, yPos);\n \n try{\n terrHex = MyWorld.theWorld.getObjectsAt(xPos, yPos, TerritoryHex.class).get(0);\n } catch(IndexOutOfBoundsException e){\n MessageDisplayer.showMessage(\"The new LinkIndic didn't find a TerritoryHex at this position.\");\n this.destroy();\n }\n \n }", "public void addAll(Equipment e){\r\n if(e.weapon !=null) add(e.weapon );\r\n if(e.helmet !=null) add(e.helmet );\r\n if(e.chestplate !=null) add(e.chestplate);\r\n if(e.leggings !=null) add(e.leggings );\r\n if(e.boots !=null) add(e.boots );\r\n if(e.amulet1 !=null) add(e.amulet1 );\r\n if(e.amulet2 !=null) add(e.amulet2 );\r\n }", "public void addBuildables(){\n this.allBuildables.add(new Nexus());\n this.allBuildables.add(new Pylon());\n this.allBuildables.add(new Assimilator());\n this.allBuildables.add(new Gateway());\n this.allBuildables.add(new CyberneticsCore());\n this.allBuildables.add(new RoboticsFacility());\n this.allBuildables.add(new Stargate());\n this.allBuildables.add(new TwilightCouncil());\n this.allBuildables.add(new TemplarArchives());\n this.allBuildables.add(new DarkShrine());\n this.allBuildables.add(new RoboticsBay());\n this.allBuildables.add(new FleetBeacon());\n this.allBuildables.add(new Probe());\n this.allBuildables.add(new Zealot());\n this.allBuildables.add(new Stalker());\n this.allBuildables.add(new Sentry());\n this.allBuildables.add(new Observer());\n this.allBuildables.add(new Immortal());\n this.allBuildables.add(new Phoenix());\n this.allBuildables.add(new VoidRay());\n this.allBuildables.add(new Colossus());\n this.allBuildables.add(new HighTemplar());\n this.allBuildables.add(new DarkTemplar());\n this.allBuildables.add(new Carrier());\n }", "public boolean merge(int i, Object b) {\n if (b == null) return false;\n Object a = this.registers[i];\n if (b.equals(a)) return false;\n Set q;\n if (!(a instanceof Set)) {\n this.registers[i] = q = NodeSet.FACTORY.makeSet();\n if (a != null) q.add(a);\n } else {\n q = (Set)a;\n }\n if (b instanceof Set) {\n if (q.addAll((Set)b)) {\n if (TRACE_INTRA) out.println(\"change in register \"+i+\" from adding set\");\n return true;\n }\n } else {\n if (q.add(b)) {\n if (TRACE_INTRA) out.println(\"change in register \"+i+\" from adding \"+b);\n return true;\n }\n }\n return false;\n }", "static void addIngredient(int i, int sour, int bitter) {\n\t\tint nextSour = sour * ingredient[0][i];\n\t\tint nextBitter = bitter + ingredient[1][i];\n\t\tanswer = Math.min(answer, Math.abs(nextSour-nextBitter));\n\t\tfor (int j = i + 1; j < N; j++) {\n\t\t\taddIngredient(j, nextSour, nextBitter);\n\t\t}\n\t}", "void addNode(Entity entity) {\n\t\tProcessing.nodeSet.add(entity);\n\t\tSystem.out.println(\"the entity was successfully added to the network.\");\n\t}", "public void addEntity(Entity entity)\n {\n if (this.withinBounds(entity.getPosition()))\n {\n this.setOccupancyCell(entity.getPosition(), entity);\n this.entities.add(entity);\n }\n }", "private void initializeEntities() {\n arrAttack = new ArrayList<>();\n arrCollidable = new ArrayList<>();\n entities = new ArrayList<>();\n\n arrAttack = scene.entityManager.getEntitiesWithComponents(attackComponent.getClass(), tool.getClass());\n\n arrCollidable = scene.entityManager.getEntitiesWithComponents(collidable.getClass(), Playable.class);\n\n for (int i = 0; i < arrAttack.size(); i++) {\n\n tool = scene.entityManager.getEntityComponentInstance(arrAttack.get(i), tool.getClass());\n\n //A -1 means that the entity is not attacking, at least with that weapon\n if (tool.currentActive != -1) {\n entities.add(arrAttack.get(i));\n }\n }\n\n //adding collidables to entities\n for (int i = 0; i < arrCollidable.size(); i++) {\n entities.add(arrCollidable.get(i));\n }\n }", "public void add(E entity)\r\n\t{\r\n\t\tpad( 1 );\r\n\r\n\t\tentities[size] = entity;\r\n\t\t\r\n\t\tonAdd( entity, size );\r\n\t\t\r\n\t\tsize++;\r\n\t}", "private SpaceSystemType addSpaceSystem(SpaceSystemType parentSystem,\n String systemName,\n String description,\n String fullPath,\n String classification,\n String validationStatus,\n String version) throws CCDDException\n {\n // Get the reference to the space system if it already exists\n SpaceSystemType childSystem = parentSystem == null ? null : getSpaceSystemByName(systemName, parentSystem);\n\n // Check if the space system doesn't already exist\n if (childSystem == null)\n {\n // Create the new space system, store its name, and set the flag to indicate a new\n // space system exists\n childSystem = factory.createSpaceSystemType();\n childSystem.setName(systemName);\n\n // Check if this is the root space system\n if (parentSystem == null)\n {\n // Set this space system as the root system\n project = factory.createSpaceSystem(childSystem);\n }\n // Not the root space system\n else\n {\n // Add the new space system as a child of the specified system\n parentSystem.getSpaceSystem().add(childSystem);\n }\n }\n\n // Check if a description is provided\n if (description != null && !description.isEmpty())\n {\n // Set the description attribute\n childSystem.setLongDescription(description);\n }\n\n // Check if the full table path is provided\n if (fullPath != null && !fullPath.isEmpty())\n {\n // Store the table name, with its full path, in the short description field. This is\n // used if the export file is used to import tables into a project\n childSystem.setShortDescription(fullPath);\n }\n\n // Set the new space system's header attributes\n addSpaceSystemHeader(childSystem,\n classification,\n validationStatus,\n version,\n (parentSystem == null ? new Date().toString() : null));\n\n return childSystem;\n }", "private void unbuildSpaceSystems(SpaceSystemType system,\n String systemPath,\n ImportType importType,\n boolean onlyCmdToStruct) throws CCDDException\n {\n // The full table name, with path, should be stored in the space system's short description\n // (the space system name doesn't allow the commas and periods used by the table path so it\n // has to go elsewhere; the export operation does this). If the short description doesn't\n // exist, or isn't in the correct format, then the table name is extracted from the space\n // system name; however, this creates a 'flat' table reference, making it a prototype\n String tableName = system.getShortDescription() != null\n && TableDefinition.isPathFormatValid(system.getShortDescription()) ? system.getShortDescription()\n : system.getName();\n\n // Get the child system's telemetry metadata information\n TelemetryMetaDataType tlmMetaData = system.getTelemetryMetaData();\n\n // Check if the telemetry metadata information is present and a structure table type\n // definition exists to define it (the structure table type won't exists if importing into\n // a single command table). If the telemetry metadata is present the assumption is made\n // that this is a structure table\n if (tlmMetaData != null && structureTypeDefn != null)\n {\n // Build the structure table from the telemetry data\n importStructureTable(system, tlmMetaData, tableName, systemPath);\n }\n\n // Get the child system's command metadata information\n CommandMetaDataType cmdMetaData = system.getCommandMetaData();\n\n // Check if the command metadata information exists; if so, the assumption is made that\n // this is a command table\n if (cmdMetaData != null)\n {\n // Build the command table from the telemetry data\n importCommandTable(system, cmdMetaData, tableName, systemPath, onlyCmdToStruct);\n }\n\n // Check if the data from all tables is to be read or no table of the target type has been\n // located yet\n if (importType == ImportType.IMPORT_ALL || tableDefinitions.isEmpty())\n {\n // Step through each child system, if any\n for (SpaceSystemType childSystem : system.getSpaceSystem())\n {\n // Process this system's children, if any\n unbuildSpaceSystems(childSystem,\n systemPath\n + (systemPath.isEmpty() ? \"\" : \"/\")\n + system.getName(),\n importType,\n onlyCmdToStruct);\n }\n }\n }", "@Override\r\n\tpublic void registriereBeobachter(Beobachter b) {\n\t\tbeobachter.add(b);\r\n\t}", "public void addComponents()\r\n\t{\n\t\tSteveTechFarming.fruit = new BlockFruit(SteveTechFarming.config.getBlockID(1202, \"Fruit\", null)).setBlockName(\"WiduX-SteveTech-Farm-Fruit\");\r\n\t\tSteveTechFarming.crops = new BlockCrops(SteveTechFarming.config.getBlockID(1203, \"Crops\", null)).setBlockName(\"WiduX-SteveTech-Farm-Crops\");\r\n\t\t\r\n\t\tSteveTechFarming.seeds = new ItemSeeds(SteveTechFarming.config.getItemID(11000, \"Seeds\", null)).setItemName(\"WiduX-SteveTech-Farm-Seeds\");\r\n\t\tSteveTechFarming.harvestedItems = new ItemHarvest(SteveTechFarming.config.getItemID(11002, \"Harvest\", null)).setItemName(\"WiduX-SteveTech-Farm-Harvest\");\r\n\t\tSteveTechFarming.creativeTools = new ItemCreativeTools(SteveTechFarming.config.getItemID(11001, \"Creative Tools\", null)).setItemName(\"WiduX-SteveTech-Farm-CTools\");\r\n\t\tSteveTechFarming.foods = new Item[EnumFood.getNumberFoods()];\r\n\t\tint firstFoodItemID = SteveTechFarming.config.getItemID(11003, \"Foods Array\", \"This is the first item ID in the list of foods. Item IDs used will start here, and use the next \" + EnumFood.getNumberFoods() + \" IDs. Make sure they are all available.\");\r\n\t\tfor(int idOffset = 0; idOffset < SteveTechFarming.foods.length; idOffset++)\r\n\t\t{\r\n\t\t\tEnumFood food = EnumFood.getFood(idOffset);\r\n\t\t\tSteveTechFarming.foods[idOffset] = new ItemSTFood(firstFoodItemID + idOffset, food).setItemName(\"WiduX-SteveTech-Farm-Foods-Food\" + idOffset);\r\n\t\t}\r\n\t}", "protected synchronized void addFieldEntity(int fld_i, String entity) {\r\n // System.err.println(\"addFieldEntity(\" + fld_i + \",\\\"\" + entity + \"\\\")\");\r\n //\r\n // fld_i is used to indicate if this is a second iteration of addFieldEntity() to prevent\r\n // infinite recursion... not sure if it's correct... for example, what happens when\r\n // a post-processor transform converts a domain to an ip address - shouldn't that IP\r\n // address then be further decomposed?\r\n //\r\n if (fld_i != -1 && entity.equals(BundlesDT.NOTSET)) {\r\n ent_2_i.put(BundlesDT.NOTSET, -1); \r\n fld_dts.get(fld_i).add(BundlesDT.DT.NOTSET);\r\n\r\n //\r\n // Decompose a tag into it's basic elements\r\n //\r\n } else if (fld_i != -1 && fieldHeader(fld_i).equals(BundlesDT.TAGS)) {\r\n addFieldEntity(-1,entity); // Add the tag itself\r\n Iterator<String> it = Utils.tokenizeTags(entity).iterator();\r\n while (it.hasNext()) {\r\n String tag = it.next(); addFieldEntity(-1, tag);\r\n\tif (Utils.tagIsHierarchical(tag)) {\r\n String sep[] = Utils.tagDecomposeHierarchical(tag);\r\n\t for (int i=0;i<sep.length;i++) addFieldEntity(-1, sep[i]);\r\n\t} else if (Utils.tagIsTypeValue(tag)) {\r\n String sep[] = Utils.separateTypeValueTag(tag);\r\n\t tag_types.add(sep[0]);\r\n\t addFieldEntity(-1,sep[1]);\r\n\t}\r\n }\r\n\r\n //\r\n // Otherwise, keep track of the datatype to field correlation and run post\r\n // processors on the item to have those lookups handy.\r\n //\r\n } else {\r\n // System.err.println(\"determining datatype for \\\"\" + entity + \"\\\"\"); // DEBUG\r\n BundlesDT.DT datatype = BundlesDT.getEntityDataType(entity); if (dt_count_lu.containsKey(datatype) == false) dt_count_lu.put(datatype,0);\r\n // System.err.println(\"datatype for \\\"\" + entity + \"\\\" ==> \" + datatype); // DEBUG\r\n if (datatype != null) {\r\n// System.err.println(\"390:fld_i = \" + fld_i + \" (\" + fld_dts.containsKey(fld_i) + \")\"); // abc DEBUG\r\n// try { System.err.println(\" \" + fieldHeader(fld_i)); } catch (Throwable t) { } // abc DEBUG\r\n if (fld_i != -1) fld_dts.get(fld_i).add(datatype);\r\n if (ent_2_i.containsKey(entity) == false) {\r\n\t // Use special rules to set integer correspondance\r\n\t switch (datatype) {\r\n\t case IPv4: ent_2_i.put(entity, Utils.ipAddrToInt(entity)); break;\r\n\t case IPv4CIDR: ent_2_i.put(entity, Utils.ipAddrToInt((new StringTokenizer(entity, \"/\")).nextToken())); break;\r\n\t case INTEGER: ent_2_i.put(entity, Integer.parseInt(entity)); \r\n\t if (warn_on_float_conflict) checkForFloatConflict(fld_i);\r\n\t break;\r\n case FLOAT: ent_2_i.put(entity, Float.floatToIntBits(Float.parseFloat(entity))); \r\n\t if (warn_on_float_conflict) checkForFloatConflict(fld_i);\r\n break;\r\n\t case DOMAIN: ent_2_i.put(entity, Utils.ipAddrToInt(\"127.0.0.2\") + dt_count_lu.get(datatype)); // Put Domains In Unused IPv4 Space\r\n\t dt_count_lu.put(datatype, dt_count_lu.get(datatype) + 1);\r\n\t\t\t break;\r\n\r\n\t // Pray that these don't collide - otherwise x/y scatters will be off...\r\n\t default: ent_2_i.put(entity, dt_count_lu.get(datatype));\r\n\t dt_count_lu.put(datatype, dt_count_lu.get(datatype) + 1);\r\n\t\t\t break;\r\n }\r\n\t}\r\n\t// Map out the derivatives so that they will have values int the lookups\r\n\t// - Create the post processors\r\n\tif (post_processors == null) {\r\n\t String post_proc_strs[] = BundlesDT.listEnabledPostProcessors();\r\n\t post_processors = new PostProc[post_proc_strs.length];\r\n\t for (int i=0;i<post_processors.length;i++) post_processors[i] = BundlesDT.createPostProcessor(post_proc_strs[i], this);\r\n\t}\r\n\t// - Run all of the post procs against their correct types\r\n if (fld_i != -1) for (int i=0;i<post_processors.length;i++) {\r\n if (post_processors[i].type() == datatype) {\r\n\t String strs[] = post_processors[i].postProcess(entity);\r\n\t for (int j=0;j<strs.length;j++) {\r\n if (entity.equals(strs[j]) == false) addFieldEntity(-1, strs[j]);\r\n\t }\r\n }\r\n\t}\r\n } else if (ent_2_i.containsKey(entity) == false) {\r\n ent_2_i.put(entity, not_assoc.size());\r\n\tnot_assoc.add(entity);\r\n }\r\n }\r\n }", "public static void addTransformFromBackend(String userName, boolean isGeneric, String ...transformName){\n\t\tint userID = getUserIDFromDb(userName);\n\t\tStringBuilder sqlBuilder = new StringBuilder(\"INSERT INTO BSM_ETL(ID, ETL_NAME, ETL_DISK_NAME, CREATE_USER_ID, CREATE_USER, CREATE_TIME, IS_GENERIC) \");\n\t\tsqlBuilder.append(\"VALUES(%d, '%s', '%s', %d, '%s', '%s', %d)\");\n\t\tint generic = isGeneric?1:0;\n\t\tfor(String transform : transformName)\n\t\t{\n\t\t\tString fileDiskName = getTransformDiskName(transform, userName);\n\t\t\tString sql = String.format(sqlBuilder.toString(), Integer.parseInt(CommonUtil.getRandomStr()), transform, fileDiskName, userID,userName, \"1998-01-01 00:00:00.0\", generic);\n\t\t\tSystem.out.println(sql);\n\t\t\tDBUtil.executeSQL(sql);\n\t\t}\n\t\t//add transform to Server\n\t\tfor(String transform : transformName)\n\t\t{\n\t\t\tString dumbTransName = getTransformDiskName(transform, userName);\n\t\t\tString cmd = \"touch \" + transformPath + \"/\" + dumbTransName;\n\t\t\tlogger.info(\"Run command:\" + cmd);\n\t\t\tString stdOutput = CommonUtil.executeSSHCommand(cmd);\n\t\t\tlogger.info(stdOutput);\n\t\t}\n\t}", "private void add() {\n // PROGRAM 1: Student must complete this method\n // This method must use the addBit method for bitwise addition.\n adder = addBit(inputA[0],inputB[0], false); //begin adding, no carry in\n output[0] = adder[0]; //place sum of first addBit iteration into output[0]\n //loop thru output beginning at index 1 (since we already computed index 0)\n for (int i = 1; i < output.length; i++) {\n cin = adder[1]; //set carry-out bit of addBit() iteration to cin\n adder = addBit(inputA[i], inputB[i], cin); //call addBit with index i of inputA and inputB and cin and place into adder.\n output[i] = adder[0]; //place sum into output[i]\n }\n }", "@Override\n\tpublic void addStore(int timeUnit) {\n if (getVarsEnviromen().size() > 0) {\n\t\t\tfor (AmbientC amb: getVarsEnviromen() ){\n\t\t\t\tif (amb.getUnitTime() == timeUnit){\n int nvar = super.nvarDef(amb);\n switch (nvar) {\n case 1:\n if (super.findVars(amb.getVarname1()) ) {\n Store.addConstra(amb.getConstraint());\n System.out.println(\"Constraint Cargado - \" + amb.getConstraint().getClass().toString());\n }\n break;\n case 2:\n if (super.findVars(amb.getVarname1()) && super.findVars(amb.getVarname2())) {\n Store.addConstra(amb.getConstraint());\n System.out.println(\"Constraint Cargado - \" + amb.getConstraint().getClass().toString());\n }\n break;\n case 3:\n if (super.findVars(amb.getVarname1()) && super.findVars(amb.getVarname2()) && super.findVars(amb.getVarname3()) ) {\n Store.addConstra(amb.getConstraint());\n System.out.println(\"Constraint Cargado - \" + amb.getConstraint().getClass().toString());\n }\n break;\n default: break;\n }\n\t\t\t\t}\n\t\t\t}\n } else {\n System.out.println(\"Ambient- <AddStore> -No existen Elementos en el Ambiente \" );\n }\n\n\t}", "public static void addContains(Contains contains) throws ClassNotFoundException\n {\n // Check that we have all we need\n try\n {\n contains.checkFields();\n\n }\n catch (Exception ex)\n {\n // Log exception\n Logger.getLogger(Contains.class.getName()).log(Level.SEVERE,null,ex);\n }\n try\n {\n try (Connection con = CS360DB.getConnection();\n Statement stmt = con.createStatement())\n {\n\n StringBuilder insQuery = new StringBuilder();\n\n insQuery.append(\"INSERT INTO \")\n .append(\" contains (orderID, productID, quantity)\")\n .append(\" VALUES (\")\n .append(\"'\").append(contains.getOrderID()).append(\"',\")\n .append(\"'\").append(contains.getProductID()).append(\"',\")\n .append(\"'\").append(contains.getQuantity()).append(\"');\");\n\n stmt.executeUpdate(insQuery.toString());\n System.out.println(\"#DB: The contains was successfully added in the database.\");\n\n // Close connection\n stmt.close();\n con.close();\n\n }\n\n }\n catch (SQLException ex)\n {\n // Log exception\n Logger.getLogger(Contains.class.getName()).log(Level.SEVERE,null,ex);\n }\n }", "public void addEntity(Entity entity)\n {\n if (withinBounds(entity.getPosition()))\n {\n setOccupancyCell(entity.getPosition(), entity);\n this.entities.add(entity);\n }\n }", "public void addHardwareDeviceToSell()\n {\n try\n {\n String Description=sellDescriptiontxt.getText();\n String Manufacturer=sellManufacturertxt.getText();\n \n int price=Integer.parseInt(pricetxt.getText());\n int tax=Integer.parseInt(taxtxt.getText());\n HardwareDeviceToSell HardwareToSell=new HardwareDeviceToSell(Description, Manufacturer, price,tax);\n equipment.add(HardwareToSell);\n \n JOptionPane.showMessageDialog(frame, \"Sucessfully added GeneratorToSell\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\n }\n catch(NumberFormatException aE)\n {\n JOptionPane.showMessageDialog(frame, aE.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private void addPlacesToWorld(ArrayList<Place> places, GameWorld world) {\n for (int i = 0; i < places.size(); i++) {\n world.addPlace(places.get(i));\n }\n }", "public void testExtendsSysLibSet() {\n final LinkerDef baseLinker = new LinkerDef();\n final SystemLibrarySet libset = new SystemLibrarySet();\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker);\n libset.setProject(baseLinker.getProject());\n final CUtil.StringArrayBuilder libs = new CUtil.StringArrayBuilder(\"advapi32\");\n libset.setLibs(libs);\n baseLinker.addSyslibset(libset);\n final CommandLineLinkerConfiguration config = (CommandLineLinkerConfiguration) getConfiguration(extendedLinker);\n final String[] libnames = config.getLibraryNames();\n assertEquals(1, libnames.length);\n assertEquals(\"advapi32\", libnames[0]);\n }", "private void addEntity(String name, int value)\n\t{\n\t\tmap.add(name, value);\n\t}", "private void insertIntoLayerZero(MapEntity entity) {\n\t\tboolean inserted = false;\n\t\tEntityComparator comparator = new EntityComparator();\n\t\tfor (int i = 0; i < layerZeroEntities.size() && !inserted; i++) {\n\t\t\tMapEntity otherEntity = layerZeroEntities.get(i);\n\t\t\t/*\n\t\t\t * if otherEntity (and all the following entities in the list)\n\t\t\t * should be rendered above this one\n\t\t\t */\n\t\t\tif (comparator.compare(entity, otherEntity) < 0) {\n\t\t\t\tinserted = true;\n\t\t\t\tlayerZeroEntities.add(i, entity);\n\t\t\t}\n\t\t}\n\t\tif (!inserted) { // stick it at the end of the render list\n\t\t\tlayerZeroEntities.add(entity);\n\t\t}\n\t}", "private void loadInstructions(int count, byte... codes) {\r\n\t\tint instructionLocation = instructionBase;\r\n\t\tfor (int i = 0; i < count; i++) {\r\n\t\t\tfor (byte code : codes) {\r\n\t\t\t\tcpuBuss.write(instructionLocation++, code);\r\n\t\t\t} // for codes\r\n\t\t} // for\r\n\t\twrs.setProgramCounter(instructionBase);\r\n\t}", "public void updateStructure()\n\t{\n\t\tboolean itWorked = true;\n\t\t\n\t\t// Get block's rotational information as a ForgeDirection\n\t\tForgeDirection rotation = ForgeDirection.getOrientation(Utils.backFromMeta(worldObj.getBlockMetadata(xCoord, yCoord, zCoord)));\n\t\t\n\t\t//\n\t\t// Step one: validate all blocks\n\t\t//\n\t\t\n\t\t// Get the MachineStructures from the MachineStructureRegistrar\n\t\t// But if the machine is already set up it should only check the desired structure.\n\t\tfor (MachineStructure struct : (structureComplete() ? MachineStructureRegistrar.getStructuresForMachineID(getMachineID()) : MachineStructureRegistrar.getStructuresForMachineID(getMachineID())))\n\t\t{\n\t\t\t// Check each block in requirements\n\t\t\tfor (PReq req : struct.requirements)\n\t\t\t{\n\t\t\t\t// Get the rotated block coordinates.\n\t\t\t\tBlockPosition pos = req.rel.getPosition(rotation, xCoord, yCoord, zCoord);\n\n\t\t\t\t// Check the requirement.\n\t\t\t\tif (!req.requirement.isMatch(tier, worldObj, pos.x, pos.y, pos.z, xCoord, yCoord, zCoord))\n\t\t\t\t{\n\t\t\t\t\t// If it didn't work, stop checking.\n\t\t\t\t\titWorked = false; break;\n\t\t\t\t}\n\t\t\t\t// If it did work keep calm and carry on\n\t\t\t}\n\t\t\t\n\t\t\t// We've gone through all the blocks. They all match up!\n\t\t\tif (itWorked)\n\t\t\t{\n\t\t\t\t// **If the structure is new only**\n\t\t\t\t// Which implies the blocks have changed between checks\n\t\t\t\tif (struct.ID != structureID)\n\t\t\t\t{\n\t\t\t\t\t//\n\t\t\t\t\t// This is only called when structures are changed/first created.\n\t\t\t\t\t//\n\t\t\t\t\t\n\t\t\t\t\t// Save what structure we have.\n\t\t\t\t\tstructureID = struct.ID;\n\t\t\t\t\t\n\t\t\t\t\t// Make an arraylist to save all teh structures\n\t\t\t\t\tArrayList<StructureUpgradeEntity> newEntities = new ArrayList<StructureUpgradeEntity>();\n\n\t\t\t\t\t// Tell all of the blocks to join us!\n\t\t\t\t\tfor (PReq req : struct.requirements)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Get the blocks that the structure has checked.\n\t\t\t\t\t\tBlockPosition pos = req.rel.getPosition(rotation, xCoord, yCoord, zCoord);\n\t\t\t\t\t\tBlock brock = worldObj.getBlock(pos.x, pos.y, pos.z); if (brock == null) continue;\n\n\t\t\t\t\t\tif (brock instanceof IStructureAware)\n\t\t\t\t\t\t\t((IStructureAware)brock).onStructureCreated(worldObj, pos.x, pos.y, pos.z, xCoord, yCoord, zCoord);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check the tile entity for upgrades\n\t\t\t\t\t\tTileEntity ent = worldObj.getTileEntity(pos.x, pos.y, pos.z);\n\t\t\t\t\t\tif (ent != null && ent instanceof StructureUpgradeEntity)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tStructureUpgradeEntity structEnt = (StructureUpgradeEntity)ent;\n\t\t\t\t\t\t\tnewEntities.add(structEnt);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* // Not sure about this.\n\t\t\t\t\t\t\tif (structEnt.coreX != xCoord && structEnt.coreY != yCoord && structEnt.coreZ != zCoord)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tstructEnt.onCoreConnected()\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// do stuff with that\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// I haven't figured out how the hell to do toArray() in this crap\n\t\t\t\t\t// so here's a weird combination of iterator and for loop\n\t\t\t\t\tupgrades = new StructureUpgradeEntity[newEntities.size()];\n\t\t\t\t\tfor (int i = 0; i < newEntities.size(); i++)\n\t\t\t\t\t\tupgrades[i] = newEntities.get(i);\n\n\t\t\t\t\t// Tell all of the structure blocks to stripe it up!\n\t\t\t\t\tfor (RelativeFaceCoords relPos : struct.relativeStriped)\n\t\t\t\t\t{\n\t\t\t\t\t\tBlockPosition pos = relPos.getPosition(rotation, xCoord, yCoord, zCoord);\n\t\t\t\t\t\tBlock brock = worldObj.getBlock(pos.x, pos.y, pos.z);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// If it's a structure block tell it to stripe up\n\t\t\t\t\t\tif (brock != null && brock instanceof StructureBlock)\n\t\t\t\t\t\t\tworldObj.setBlockMetadataWithNotify(pos.x, pos.y, pos.z, 2, 2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// If not, reset the loop and try again.\n\t\t\telse { itWorked = true; continue; }\n\t\t}\n\t\t\n\t\t//\n\t\t// None of the structures worked!\n\t\t//\n\t\t\n\t\t// If we had a structure before, we need to clear it\n\t\tif (structureComplete())\n\t\t{\n\t\t\tfor (PReq req : MachineStructureRegistrar.getMachineStructureByID(structureID).requirements)\n\t\t\t{\n\t\t\t\tBlockPosition pos = req.rel.getPosition(rotation, xCoord, yCoord, zCoord);\n\t\t\t\tBlock brock = worldObj.getBlock(pos.x, pos.y, pos.z);\n\t\t\t\t\n\t\t\t\t// This will also un-stripe all structure blocks.\n\t\t\t\tif (brock instanceof IStructureAware)\n\t\t\t\t\t((IStructureAware)brock).onStructureBroken(worldObj, pos.x, pos.y, pos.z, xCoord, yCoord, zCoord);\n\t\t\t}\n\t\t\t// We don't have a structure.\n\t\t\tstructureID = null;\n\t\t}\n\t\t\n\t}", "public void addEntity(Entity entity) {\n\t\tthis.entities.add(entity);\n\t}", "private void importStructureTable(SpaceSystemType system,\n TelemetryMetaDataType tlmMetaData,\n String tableName,\n String systemPath) throws CCDDException\n {\n // Get the telemetry information\n ParameterSetType parmSetType = tlmMetaData.getParameterSet();\n ParameterTypeSetType parmTypeSetType = tlmMetaData.getParameterTypeSet();\n List<Object> parmSet = null;\n List<NameDescriptionType> parmTypeSet = null;\n\n // Create a table definition for this structure table. If the name space also includes a\n // command metadata (which creates a command table) then ensure the two tables have\n // different names\n TableDefinition tableDefn = new TableDefinition(tableName\n + (system.getCommandMetaData() == null ? \"\" : \"_tlm\"),\n system.getLongDescription());\n\n // Set the new structure table's table type name\n tableDefn.setTypeName(structureTypeDefn.getName());\n\n // Check if the telemetry information exists\n if (parmSetType != null && parmTypeSetType != null)\n {\n // Get the references to the parameter set and parameter type set\n parmSet = parmSetType.getParameterOrParameterRef();\n parmTypeSet = parmTypeSetType.getStringParameterTypeOrEnumeratedParameterTypeOrIntegerParameterType();\n }\n\n // Check if the telemetry metadata container set exists\n if (tlmMetaData.getContainerSet() != null)\n {\n int rowIndex = 0;\n\n // Get the system under which the space systems in the container references are to be\n // found. Specific instance tables are a sub-space system of the parent tables' space\n // system, but If the table is a child of a non-root structure then the space system\n // for the child's prototype is used, which is located in the root space system\n SpaceSystemType ownerSystem = dbTable.isRootStructure(tableName) ? system : rootSystem;\n\n // Step through each sequence container in the container set\n for (SequenceContainerType seqContainer : tlmMetaData.getContainerSet().getSequenceContainer())\n {\n // Get the reference to the sequence container's base container (if any). The base\n // container is assumed to reference the telemetry header\n BaseContainer baseContainer = seqContainer.getBaseContainer();\n\n // Check if the reference to the telemetry header table exists\n if (baseContainer != null && baseContainer.getContainerRef() != null\n && TableInfo.getPrototypeName(baseContainer.getContainerRef()).endsWith(\"/\" + tlmHeaderTable + \"/\" + tlmHeaderTable))\n {\n // Add a variable to the structure for the telemetry header table. Note that\n // the telemetry header table name is used as the variable name since there's\n // nowhere to store the variable name in the file\n rowIndex = addVariableDefinitionToStructure(tableDefn,\n rowIndex,\n 0,\n tlmHeaderTable,\n tlmHeaderTable,\n null,\n null,\n \"Telemetry header\",\n null,\n null,\n null,\n null);\n\n // Check if this is the comparison list for the telemetry header table\n if (baseContainer.getRestrictionCriteria() != null\n && baseContainer.getRestrictionCriteria().getComparisonList() != null)\n {\n // Step through each item in the comparison list\n for (ComparisonType comparison : baseContainer.getRestrictionCriteria().getComparisonList().getComparison())\n {\n // Check if the comparison item's parameter reference matches the\n // application ID name\n if (comparison.getParameterRef().equals(applicationIDName))\n {\n // Create a data field for the table containing the application ID.\n // Once a match is found the search is discontinued\n tableDefn.addDataField(CcddFieldHandler.getFieldDefinitionArray(tableName,\n comparison.getParameterRef(),\n \"Application name and ID\",\n inputTypeHandler.getInputTypeByDefaultType(DefaultInputType.MESSAGE_NAME_AND_ID),\n Math.min(Math.max(comparison.getValue().length(), 5), 40),\n false,\n ApplicabilityType.ROOT_ONLY,\n comparison.getValue(),\n false));\n break;\n }\n }\n }\n }\n\n // Get the reference to the sequence container's entry list to shorten subsequent\n // calls\n List<SequenceEntryType> sequenceEntries = seqContainer.getEntryList().getParameterRefEntryOrParameterSegmentRefEntryOrContainerRefEntry();\n\n // Step through each entry in the sequence container\n for (int seqIndex = 0; seqIndex < sequenceEntries.size(); seqIndex++)\n {\n ParameterInformation parmInfo = null;\n\n // Get the reference to the sequence container entry to shorten subsequent\n // calls\n SequenceEntryType seqEntry = sequenceEntries.get(seqIndex);\n\n // Check if the entry is for an array or non-array primitive data type\n // parameter\n if (seqEntry instanceof ParameterRefEntryType || seqEntry instanceof ArrayParameterRefEntryType)\n {\n // Check if the telemetry information exists\n if (parmSetType != null && parmTypeSetType != null)\n {\n // The sequence container entry parameter reference is the variable\n // name. In order to get the variable's data type the corresponding\n // parameter type entry must be found. Each parameter set entry is a\n // parameter type name and its corresponding parameter (variable) name.\n // The steps are (1) use the sequence container entry's parameter\n // reference to get the parameter set entry's name, (2) locate the\n // parameter set entry with the matching name and then use its\n // parameter type reference to get the parameter type set name, (3)\n // locate the parameter type set entry with the matching name and use\n // it to extract the data type information\n\n // Step through each parameter in the parameter set\n for (int parmIndex = 0; parmIndex < parmSet.size(); parmIndex++)\n {\n // Get the reference to the parameter in the parameter set\n Parameter parameter = (Parameter) parmSet.get(parmIndex);\n\n // Check if this is the parameter set entry for the parameter being\n // processed\n if (parameter.getName().equals(seqEntry instanceof ParameterRefEntryType ? ((ParameterRefEntryType) seqEntry).getParameterRef()\n : ((ArrayParameterRefEntryType) seqEntry).getParameterRef()))\n {\n // Get the parameter information referenced by the parameter\n // type\n parmInfo = processParameterReference(parameter, parmTypeSet, seqEntry, seqIndex);\n\n // Stop searching the parameter set since the matching entry\n // was found\n break;\n }\n }\n }\n }\n // Check if this is a parameter with a structure as the data type\n else if (seqEntry instanceof ContainerRefEntryType)\n {\n // Extract the structure reference\n parmInfo = processContainerReference(ownerSystem, sequenceEntries, null, seqEntry, seqIndex);\n }\n\n // Check if this is a valid parameter or container reference\n if (parmInfo != null)\n {\n // Update the sequence index. A container reference to an array causes this\n // index to update in order to skip the array member container references;\n // otherwise no change is made to the index\n seqIndex = parmInfo.getSeqIndex();\n\n // Add the row to the structure table. Multiple rows are added for an array\n rowIndex = addVariableDefinitionToStructure(tableDefn, rowIndex,\n parmInfo.getNumArrayMembers(),\n parmInfo.getParameterName(),\n parmInfo.getDataType(),\n parmInfo.getArraySize(),\n parmInfo.getBitLength(),\n parmInfo.getDescription(),\n parmInfo.getUnits(),\n parmInfo.getEnumeration(),\n parmInfo.getMinimum(),\n parmInfo.getMaximum());\n }\n }\n }\n }\n\n isStructureExists = true;\n\n // Create a data field for the system path\n tableDefn.addDataField(CcddFieldHandler.getFieldDefinitionArray(tableName,\n \"System path\",\n \"System Path\",\n inputTypeHandler.getInputTypeByDefaultType(DefaultInputType.SYSTEM_PATH),\n Math.min(Math.max(systemPath.length(), 5), 40),\n false,\n ApplicabilityType.ALL,\n systemPath,\n false));\n\n // Add the structure table definition to the list\n tableDefinitions.add(tableDefn);\n }", "public void registerMaskUpdate(Entity entity) {\r\n maskUpdates[maskUpdateCount++] = entity;\r\n }", "public void add(Collection<T> entities) {\n\t\tnewEntities.addAll(entities);\n\t}", "private void setSistemas(Element element) {\r\n\t\tElement descripcion;\r\n\t\tElement uniqueKey;\r\n\t\tif(getReq().getSistemas() != null){\r\n\t\t\tElement sistemas = new Element(\"N_Sistemas\");\r\n\t\t\tfor(String sistema : getReq().getSistemas()){\r\n\t\t\t\tString[] nombreYDesc = sistema.split(\"-\");\t\t\t\t\r\n\t\t\t\tuniqueKey = new Element(\"uniqueKey\");\r\n\t\t\t\tuniqueKey.setAttribute(\"D_Nombre\", nombreYDesc[0].trim());\r\n\t\t\t\tuniqueKey.setAttribute(\"campoCQ\", \"D_Nombre\");\r\n\t\t\t\tuniqueKey.setAttribute(\"entidadCQ\", \"Sistemas\");\r\n\t\t\t\tdescripcion = new Element(\"D_Descripcion\");\r\n\t\t\t\tdescripcion.setText(nombreYDesc[1].trim());\r\n\t\t\t\tuniqueKey.addContent(descripcion);\r\n\t\t\t\tsistemas.addContent(uniqueKey);\t\t\t\r\n\t\t\t}\r\n\t\t\telement.addContent(sistemas);\r\n\t\t}\r\n\t}", "@Override\n\tpublic int addBookshelfinfo(BookshelfinfoEntity bookshelfinfoEntity) {\n\t\treturn this.sqlSessionTemplate.insert(\"bookshelfinfo.add\", bookshelfinfoEntity);\n\t}", "private void addSolarSystem(final SolarSystem pSolar)\n \t{\n \t\tif (aTempSolarSystem == null) {\n \t\t\taTempSolarSystem = pSolar;\n \t\t}\n \t\taSolarSystems.put(pSolar.getID(), pSolar);\n \t\t// if new solar system is out of bounds, resize\n \t\taSize = Math.max(aSize, pSolar.getRadius() + (int) pSolar.getPoint3D().getDistanceToOrigin());\n \t}", "public static void addEntity(org.bukkit.entity.Entity entity) {\n\t\tEntity nmsentity = CommonNMS.getNative(entity);\n\t\tnmsentity.world.getChunkAt(MathUtil.toChunk(nmsentity.locX), MathUtil.toChunk(nmsentity.locZ));\n\t\tnmsentity.dead = false;\n\t\t// Remove an entity tracker for this entity if it was present\n\t\tWorldUtil.getTracker(entity.getWorld()).stopTracking(entity);\n\t\t// Add the entity to the world\n\t\tnmsentity.world.addEntity(nmsentity);\n\t}", "void addTransaction(String[] transaction) {\t\t\n\t\tItemsets frequentItemsets = itemsetSets.get(0);\n\t\t\n\t\tfor (String item : transaction) {\n\t\t\tfrequentItemsets.addTransactionItemset(new Itemset(item));\n\t\t}\n\t}", "void visitElement_operating_systems(org.w3c.dom.Element element) { // <operating-systems>\n // element.getValue();\n org.w3c.dom.NodeList nodes = element.getChildNodes();\n for (int i = 0; i < nodes.getLength(); i++) {\n org.w3c.dom.Node node = nodes.item(i);\n switch (node.getNodeType()) {\n case org.w3c.dom.Node.CDATA_SECTION_NODE:\n // ((org.w3c.dom.CDATASection)node).getData();\n break;\n case org.w3c.dom.Node.ELEMENT_NODE:\n org.w3c.dom.Element nodeElement = (org.w3c.dom.Element)node;\n if (nodeElement.getTagName().equals(\"os\")) {\n visitElement_os(nodeElement);\n }\n break;\n case org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE:\n // ((org.w3c.dom.ProcessingInstruction)node).getTarget();\n // ((org.w3c.dom.ProcessingInstruction)node).getData();\n break;\n }\n }\n }", "void registerSelf(EntityType<?>... entityTypes);", "void setEntityInfo(int[] chainIndices, String sequence, String description, String type);", "public void registerDynamicEntity(DynamicEntity entity) {\n\t\tdynamicEntities.add(entity);\n\t\tputInVisLayerList(entity);\n\t}", "public boolean isSystemIntact(int system) {\n for (int loc = 0; loc < locations(); loc++) {\n int numCrits = getNumberOfCriticals(loc);\n for (int i = 0; i < numCrits; i++) {\n CriticalSlot ccs = getCritical(loc, i);\n\n if ((ccs != null) && (ccs.getType() == CriticalSlot.TYPE_SYSTEM) && (ccs.getIndex() == system)) {\n if (ccs.isDamaged() || ccs.isBreached()) {\n return false;\n }\n }\n }\n }\n\n return true;\n }" ]
[ "0.73576516", "0.7161039", "0.64963144", "0.64423907", "0.5856974", "0.55182195", "0.54591066", "0.5336565", "0.52651405", "0.52611345", "0.521903", "0.5218354", "0.5218349", "0.51680773", "0.5129655", "0.5124393", "0.505006", "0.50475967", "0.4904326", "0.48584977", "0.48397663", "0.48272315", "0.4810129", "0.4807246", "0.48071107", "0.4764404", "0.47622222", "0.47288325", "0.46996367", "0.46913555", "0.46874595", "0.4678864", "0.46535686", "0.4653044", "0.4634806", "0.463108", "0.46251932", "0.46247226", "0.46206155", "0.4591307", "0.45874095", "0.45866752", "0.4584831", "0.45833054", "0.45741093", "0.4569565", "0.45539287", "0.45477536", "0.45436874", "0.45408085", "0.45261854", "0.45215544", "0.45207322", "0.45086852", "0.45086572", "0.44952604", "0.4482702", "0.4482114", "0.44817865", "0.44749966", "0.44718897", "0.44665945", "0.44662896", "0.4460209", "0.44509757", "0.44409317", "0.44392312", "0.44384637", "0.44272113", "0.44216543", "0.44093752", "0.44043303", "0.4401463", "0.44006634", "0.43917707", "0.43882635", "0.43851098", "0.43820915", "0.43811873", "0.43800035", "0.43789014", "0.43788", "0.43740797", "0.4373729", "0.437369", "0.4373677", "0.43622896", "0.4343964", "0.43413398", "0.43306592", "0.4327273", "0.432642", "0.43176338", "0.431251", "0.43104294", "0.4307145", "0.43071052", "0.43052554", "0.4301538", "0.43014422" ]
0.8439599
0
Remove the entity from all the systems in the given systembits;
void removeEntityFromSystems(Entity e, RECSBits systemBits) { for (int i = systemBits.nextSetBit(0); i >= 0; i = systemBits.nextSetBit(i + 1)) { systemMap.get(i).removeEntity(e.id); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void removeCoordinateSystem(CoordinateSystem cs);", "RECSBits getSystemBits(RECSBits componentBits) {\n \t\tRECSBits systemBits = new RECSBits();\n \t\tfor (EntitySystem s : systems) {\n \t\t\tif (s.getComponentBits().contains(componentBits)) {\n \t\t\t\tsystemBits.set(s.id);\n \t\t\t}\n \t\t}\n \t\treturn systemBits;\n \t}", "public void removeAllFightsystems()\r\n {\n\r\n }", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void removeSystemUser(DietTreatmentSystemUserBO systemUser)\n {\n _dietTreatment.removeSystemUsers(systemUser);\n\n }", "public void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException;", "public void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException;", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (CreditAppBankReference creditAppBankReference : findAll()) {\n\t\t\tremove(creditAppBankReference);\n\t\t}\n\t}", "public void clear() {\n\t\tsystems.clear();\n\t}", "void addEntityToSystems(Entity e, RECSBits systemBits) {\n \t\tfor (int i = systemBits.nextSetBit(0); i >= 0; i = systemBits.nextSetBit(i + 1)) {\n \t\t\tsystemMap.get(i).addEntity(e.id);\n \t\t}\n \t}", "void unsetSystem();", "public void removeAll() throws SystemException {\n\t\tfor (Estado estado : findAll()) {\n\t\t\tremove(estado);\n\t\t}\n\t}", "public void removeAll() throws SystemException {\n\t\tfor (CompanyAg companyAg : findAll()) {\n\t\t\tremove(companyAg);\n\t\t}\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (Legacydb legacydb : findAll()) {\n\t\t\tremove(legacydb);\n\t\t}\n\t}", "private void trimEntities() {\n \t\tList<String> chainIds = getActiveEntities();\n \t\tif (chainIds.size() > 0) {\n \t\t\tfor (Iterator<Atom> iter = atomVector.iterator();iter.hasNext();) {\n \t\t\t\tAtom atom = iter.next();\n \t\t\t\tif (!chainIds.contains(atom.chain_id)) {\n \t\t\t\t\titer.remove();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (StepDefsCompositeStepDefDBE stepDefsCompositeStepDefDBE : findAll()) {\n\t\t\tremove(stepDefsCompositeStepDefDBE);\n\t\t}\n\t}", "public void removeAll() throws SystemException {\n\t\tfor (ContactCompanyAg contactCompanyAg : findAll()) {\n\t\t\tremove(contactCompanyAg);\n\t\t}\n\t}", "public static void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\tgetPersistence().removeAll();\n\t}", "public static void removeAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\tgetPersistence().removeAll();\n\t}", "public void removeFightsystem( Long fightsystemId )\r\n {\n\r\n }", "public static void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException {\n getPersistence().removeAll();\n }", "public static void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException {\n getPersistence().removeAll();\n }", "public static void removeAll()\n throws com.liferay.portal.kernel.exception.SystemException {\n getPersistence().removeAll();\n }", "private void unbuildSpaceSystems(SpaceSystemType system,\n String systemPath,\n ImportType importType,\n boolean onlyCmdToStruct) throws CCDDException\n {\n // The full table name, with path, should be stored in the space system's short description\n // (the space system name doesn't allow the commas and periods used by the table path so it\n // has to go elsewhere; the export operation does this). If the short description doesn't\n // exist, or isn't in the correct format, then the table name is extracted from the space\n // system name; however, this creates a 'flat' table reference, making it a prototype\n String tableName = system.getShortDescription() != null\n && TableDefinition.isPathFormatValid(system.getShortDescription()) ? system.getShortDescription()\n : system.getName();\n\n // Get the child system's telemetry metadata information\n TelemetryMetaDataType tlmMetaData = system.getTelemetryMetaData();\n\n // Check if the telemetry metadata information is present and a structure table type\n // definition exists to define it (the structure table type won't exists if importing into\n // a single command table). If the telemetry metadata is present the assumption is made\n // that this is a structure table\n if (tlmMetaData != null && structureTypeDefn != null)\n {\n // Build the structure table from the telemetry data\n importStructureTable(system, tlmMetaData, tableName, systemPath);\n }\n\n // Get the child system's command metadata information\n CommandMetaDataType cmdMetaData = system.getCommandMetaData();\n\n // Check if the command metadata information exists; if so, the assumption is made that\n // this is a command table\n if (cmdMetaData != null)\n {\n // Build the command table from the telemetry data\n importCommandTable(system, cmdMetaData, tableName, systemPath, onlyCmdToStruct);\n }\n\n // Check if the data from all tables is to be read or no table of the target type has been\n // located yet\n if (importType == ImportType.IMPORT_ALL || tableDefinitions.isEmpty())\n {\n // Step through each child system, if any\n for (SpaceSystemType childSystem : system.getSpaceSystem())\n {\n // Process this system's children, if any\n unbuildSpaceSystems(childSystem,\n systemPath\n + (systemPath.isEmpty() ? \"\" : \"/\")\n + system.getName(),\n importType,\n onlyCmdToStruct);\n }\n }\n }", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (Candidate candidate : findAll()) {\n\t\t\tremove(candidate);\n\t\t}\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (Facility_Host facility_Host : findAll()) {\n\t\t\tremove(facility_Host);\n\t\t}\n\t}", "public void removeFromLinesOfBusiness(entity.AppCritLineOfBusiness element);", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (EmployeeComplaint employeeComplaint : findAll()) {\n\t\t\tremove(employeeComplaint);\n\t\t}\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (ESFInstructsShootingDirector esfInstructsShootingDirector : findAll()) {\n\t\t\tremove(esfInstructsShootingDirector);\n\t\t}\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (ScienceAppExecute scienceAppExecute : findAll()) {\n\t\t\tremove(scienceAppExecute);\n\t\t}\n\t}", "@Override\n\tpublic void removeBymodifiedBy(long modifiedBy) throws SystemException {\n\t\tfor (EmployeeComplaint employeeComplaint : findBymodifiedBy(\n\t\t\t\tmodifiedBy, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {\n\t\t\tremove(employeeComplaint);\n\t\t}\n\t}", "public void deleteBitesFromallBitesFromFile(int bitsQuantity) {\r\n for (int i = 0; i < bitsQuantity; i++)\r\n this.allBitesFromFile.remove(0);\r\n }", "public void unsetEmbl()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(EMBL$10, 0);\r\n }\r\n }", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (RigoDocumento rigoDocumento : findAll()) {\n\t\t\tremove(rigoDocumento);\n\t\t}\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (AssetManageReqHandle assetManageReqHandle : findAll()) {\n\t\t\tremove(assetManageReqHandle);\n\t\t}\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (AddressChangeReqDetails addressChangeReqDetails : findAll()) {\n\t\t\tremove(addressChangeReqDetails);\n\t\t}\n\t}", "public void removeSoftware(Software software){\n products.remove (software);\n }", "public void removeFightsystem( Fightsystem fightsystem )\r\n {\n\r\n }", "public void removeAll() throws SystemException {\n\t\tfor (TrabajadorEmpresa trabajadorEmpresa : findAll()) {\n\t\t\tremove(trabajadorEmpresa);\n\t\t}\n\t}", "public void unsetGenbank()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(GENBANK$8, 0);\r\n }\r\n }", "@Test\n\tpublic void testEliminationByMediumBox(){\n\t\tsetBoardUp();\n\t\tMediumBox mBox = new MediumBox(board, 1, 1);\n\t\talgorithm.applyEliminationInMediumBox(mBox);\n\t\tint[] toBeRemoved = {1, 2, 8, 9};\n\t\tint[] fromCells = {0, 1, 4, 7, 8};\n\t\tboolean condition = true;\n\t\tfor(int i = 0; i < toBeRemoved.length; i++)\n\t\t\tfor(int j = 0; j < fromCells.length; j++)\n\t\t\t\tcondition &= !mBox.cell[fromCells[j]].possibilities.contains(toBeRemoved[i]);\t\t\n\t\t\n\t\tassertTrue(condition);\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (FactNonPrintedMaterial factNonPrintedMaterial : findAll()) {\n\t\t\tremove(factNonPrintedMaterial);\n\t\t}\n\t}", "@Override\n public void removeAll() throws SystemException {\n for (EntityDealer entityDealer : findAll()) {\n remove(entityDealer);\n }\n }", "public void unregister(boolean perUserNotMachine) throws ComException {\n\t\tfor (Class<?> cls : getCoClasses())\n\t\t\tRegUtil.unregisterCoClass(perUserNotMachine, cls);\n\t\tfor (Class<?> cls : getAddins())\n\t\t\tRegisterAddin.unregister(perUserNotMachine, cls);\n\t\tfor (Class<?> cls : getFormRegions())\n\t\t\tRegisterFormRegion.unregister(perUserNotMachine, cls);\n\t}", "protected void removeMachine(Machine m) {\r\n\t\twriteL.lock();\r\n\t\ttry {\r\n\t\t\tfor (Entry<String, HashSet<Machine>> entry : this.filesServersMap.entrySet()) {\r\n\t\t\t\tentry.getValue().remove(m); // for each article remove the\r\n\t\t\t\t\t\t\t\t\t\t\t// peer\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\twriteL.unlock();\r\n\t\t}\r\n\t}", "private Element removeSubElements(Element p_seg)\n {\n ArrayList elems = new ArrayList();\n\n findSubElements(elems, p_seg);\n\n for (int i = 0; i < elems.size(); i++)\n {\n Element sub = (Element)elems.get(i);\n\n removeSubElement(sub);\n }\n\n return p_seg;\n }", "public void removeAll() throws SystemException {\n\t\tfor (VCal vCal : findAll()) {\n\t\t\tremove(vCal);\n\t\t}\n\t}", "private void resetSystemsVariability(DiscreteSystemStateType discreteSystemStateType) {\r\n\t\t\r\n\t\tswitch (discreteSystemStateType) {\r\n\t\tcase Final:\r\n\t\t\tthis.getSystemsVariability().clear();\r\n\t\t\tbreak;\r\n\r\n\t\tcase Iteration:\r\n\t\t\tfor (String netCompID : this.getEnvironmentDependentSystems()) {\r\n\t\t\t\tthis.getSystemsVariability().remove(netCompID);\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void removeByName(String name) throws SystemException {\n\t\tfor (Legacydb legacydb : findByName(name, QueryUtil.ALL_POS,\n\t\t\t\tQueryUtil.ALL_POS, null)) {\n\t\t\tremove(legacydb);\n\t\t}\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (DmHistoryGoods dmHistoryGoods : findAll()) {\n\t\t\tremove(dmHistoryGoods);\n\t\t}\n\t}", "public void eliminarNovedadesRegistradas(Integer codigoCompania, Collection<Long> codigosProcesoLogistico) throws SICException;", "@Override\n\tpublic void removeBySequenceNumber(long sequenceNumber)\n\t\tthrows SystemException {\n\t\tfor (CreditAppBankReference creditAppBankReference : findBySequenceNumber(\n\t\t\t\tsequenceNumber, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {\n\t\t\tremove(creditAppBankReference);\n\t\t}\n\t}", "void unsetListOfServiceElements();", "public void removeSoftware(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SOFTWARE$20, i);\n }\n }", "public void RemoveSol()\r\n {\r\n for (int i = 0; i <maze.Struct.length ; i++) {\r\n for (int j = 0; j <maze.Struct[0].length ; j++) {\r\n if (maze.Struct[i][j]== 2)\r\n maze.Struct[i][j]= 0;\r\n }\r\n }\r\n setChanged();\r\n notifyObservers(\"RemoveSol\");\r\n }", "void unsetStation();", "public void removeModelWithThisSound(String sound) {\n ArrayList<String> modelsToDelete = new ArrayList<>();\n\n for (SVMmodel mod : svmModels.values()) {\n boolean delete = mod.containsSound(sound);\n\n if (delete) {\n modelsToDelete.add(mod.getName());\n boolean a = svmModels.remove(mod.getName(), mod);\n\n String filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath() + \"/A-Cube/Models/\" + mod.getName();\n File fileToDelete = new File(filePath);\n if (fileToDelete.exists()) {\n fileToDelete.delete();\n }\n\n Log.d(TAG, \"SVMmodel removed: \"+mod.getName()+\" \"+a);\n\n for (Configuration conf : configurations) {\n if (conf.hasModel() && conf.getModel().equals(mod)) {\n conf.setModel(null);\n }\n }\n }\n }\n }", "public void removeStorageQueue(StorageQueue storageQueue) {\n int queueIndex = storageQueueList.indexOf(storageQueue);\n\n if (queueIndex > -1) {\n for (Map<String, BitSet> constituentTable : constituentTables) {\n for (Map.Entry<String, BitSet> constituentRow : constituentTable.entrySet()) {\n // For every row create a new BitSet with the values for the removed storageQueue removed\n String constituent = constituentRow.getKey();\n BitSet bitSet = constituentRow.getValue();\n BitSet newBitSet = new BitSet();\n\n int bitIndex = 0;\n\n for (int i = 0; i < bitSet.size(); i++) {\n if (bitIndex == queueIndex) {\n // If the this is the index to remove then skip this round\n bitIndex++;\n }\n newBitSet.set(i, bitSet.get(bitIndex));\n bitIndex++;\n }\n\n constituentTable.put(constituent, newBitSet);\n\n }\n }\n\n // Remove the storageQueue from storageQueue list\n storageQueueList.remove(queueIndex);\n } else {\n log.warn(\"Storage queue for with name : \" + storageQueue.getName() + \" is not found to \" +\n \"remove\");\n }\n }", "public void clearEntities()\n\t{\n\t\twhile(!this.entities.isEmpty())\n\t\t{\n\t\t\t//Can use 0 index because we use swap with last anyway\n\t\t\tthis.removeEntity(0); //Important because onDespawn and to remove from hash grid\n\t\t}\n\t}", "void removeHasSCF(SCF oldHasSCF);", "@SuppressWarnings(\"unchecked\")\n \tvoid addSystem(EntitySystem system) {\n \t\tif (systems.contains(system))\n \t\t\tthrow new RuntimeException(\"System already added\");\n \t\tsystem.id = getNewSystemId();\n \t\tsystem.componentBits = world.getComponentBits(system.components);\n \n \t\tClass<? extends EntitySystem> class1 = system.getClass();\n \t\tdo {\n \t\t\tfor (Field field : class1.getDeclaredFields()) {\n \t\t\t\t// Check for ComponentManager declarations.\n \t\t\t\tif (field.getType() == ComponentMapper.class) {\n \t\t\t\t\tfield.setAccessible(true);\n \t\t\t\t\t// Read the type in the <> of componentmanager\n \t\t\t\t\tType type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];\n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Set the component manager declaration with the right\n \t\t\t\t\t\t// component manager.\n \t\t\t\t\t\tfield.set(system, world.getComponentMapper((Class<? extends Component>) type));\n \t\t\t\t\t} catch (IllegalArgumentException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t} catch (IllegalAccessException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t// check for EventListener declarations.\n \t\t\t\tif (field.getType() == EventListener.class) {\n \t\t\t\t\tfield.setAccessible(true);\n \t\t\t\t\t// Read the type in the <> of eventListener.\n \t\t\t\t\tType type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];\n \t\t\t\t\t@SuppressWarnings(\"rawtypes\")\n \t\t\t\t\tEventListener<? extends Event> eventListener = new EventListener();\n \t\t\t\t\tworld.registerEventListener(eventListener, (Class<? extends Event>) type);\n \n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Set the event listener declaration with the right\n \t\t\t\t\t\t// field listener.\n \t\t\t\t\t\tfield.set(system, eventListener);\n \t\t\t\t\t} catch (IllegalArgumentException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t} catch (IllegalAccessException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\tclass1 = (Class<? extends EntitySystem>) class1.getSuperclass();\n \t\t} while (class1 != EntitySystem.class);\n \t\tsystems.add(system);\n \t\tsystemMap.put(system.id, system);\n\t\tsystem.world = world;\n \t}", "void unsetProbables();", "void unsetIsManaged();", "@Override\n\tpublic void removeByCreditAppId(long creditAppId) throws SystemException {\n\t\tfor (CreditAppBankReference creditAppBankReference : findByCreditAppId(\n\t\t\t\tcreditAppId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {\n\t\t\tremove(creditAppBankReference);\n\t\t}\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (LMSLeaveInformation lmsLeaveInformation : findAll()) {\n\t\t\tremove(lmsLeaveInformation);\n\t\t}\n\t}", "public void removeFromGame(GameLevel game) {\n game.removeCollidable(this); // now block is not a part of the collidables.\n game.removeSprite(this); // now block is not a part of the sprites.\n }", "void deleteEntitiesOf(Map<Location, SurfaceEntity> map, Rectangle rect, boolean checkBuildings) {\r\n\t\t// find buildings falling into the selection box\r\n\t\tif (rect != null) {\r\n\t\t\tBuilding bld = null;\r\n\t\t\tfor (int a = rect.x; a < rect.x + rect.width; a++) {\r\n\t\t\t\tfor (int b = rect.y; b > rect.y - rect.height; b--) {\r\n\t\t\t\t\tSurfaceEntity se = map.get(Location.of(a, b));\r\n\t\t\t\t\tif (se != null) {\r\n\t\t\t\t\t\tint x = a - se.virtualColumn;\r\n\t\t\t\t\t\tint y = b + se.virtualRow;\r\n\t\t\t\t\t\tfor (int x0 = x; x0 < x + se.tile.width; x0++) {\r\n\t\t\t\t\t\t\tfor (int y0 = y; y0 > y - se.tile.height; y0--) {\r\n\t\t\t\t\t\t\t\tmap.remove(Location.of(x0, y0));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (checkBuildings) {\r\n\t\t\t\t\t\tfor (int i = renderer.surface.buildings.size() - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tbld = renderer.surface.buildings.get(i);\r\n\t\t\t\t\t\t\tif (bld.containsLocation(a, b)) {\r\n\t\t\t\t\t\t\t\trenderer.surface.buildings.remove(i);\r\n\t\t\t\t\t\t\t\tif (bld == currentBuilding) {\r\n\t\t\t\t\t\t\t\t\trenderer.buildingBox = null;\r\n\t\t\t\t\t\t\t\t\tcurrentBuilding = null;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (int i = renderer.surface.features.size() - 1; i >= 0; i--) {\r\n\t\t\t\t\t\t\tSurfaceFeature sf = renderer.surface.features.get(i);\r\n\t\t\t\t\t\t\tif (sf.containsLocation(a, b)) {\r\n\t\t\t\t\t\t\t\trenderer.surface.features.remove(i);\r\n\t\t\t\t\t\t\t\tif (sf.equals(currentBaseTile)) {\r\n\t\t\t\t\t\t\t\t\tcurrentBaseTile = null;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (checkBuildings && bld != null) {\r\n\t\t\t\tplaceRoads(bld.techId);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (TvShow tvShow : findAll()) {\n\t\t\tremove(tvShow);\n\t\t}\n\t}", "public void removeAll() throws SystemException {\n\t\tfor (AnnotationInfo annotationInfo : findAll()) {\n\t\t\tremove(annotationInfo);\n\t\t}\n\t}", "public SystemMessage removeSystemMessage(SystemMessage sysMsg){\n\t\treturn removeSystemMessage(sysMsg.iID);\n\t}", "public void cleanse(Set<Bundles> active) {\r\n // Clear the ent_2_i's\r\n ent_2_i.clear(); post_processors = null;\r\n\r\n // Initialize by creating a lookup for the post processors\r\n Map<BundlesDT.DT, Set<PostProc>> pp_lu = new HashMap<BundlesDT.DT, Set<PostProc>>();\r\n String pp_strs[] = BundlesDT.listEnabledPostProcessors();\r\n for (int i=0;i<pp_strs.length;i++) {\r\n PostProc pp = BundlesDT.createPostProcessor(pp_strs[i], this);\r\n BundlesDT.DT dt = pp.type();\r\n if (pp_lu.containsKey(dt) == false) pp_lu.put(dt, new HashSet<PostProc>());\r\n pp_lu.get(dt).add(pp);\r\n }\r\n\r\n // First, accumulate all of the active entities\r\n Set<String> active_entities = new HashSet<String>();\r\n Iterator<Bundles> it_bs = active.iterator();\r\n while (it_bs.hasNext()) {\r\n Bundles bundles = it_bs.next();\r\n Iterator<Tablet> it_tab = bundles.tabletIterator();\r\n while (it_tab.hasNext()) {\r\n Tablet tablet = it_tab.next();\r\n // Figure out which fields are in the tablet\r\n\tList<Integer> fld_is = new ArrayList<Integer>();\r\n\tfor (int fld_i=0;fld_i<bundles.getGlobals().numberOfFields();fld_i++) {\r\n\t if (tablet.hasField(fld_i)) fld_is.add(fld_i);\r\n }\r\n\tint fields[] = new int[fld_is.size()]; for (int i=0;i<fields.length;i++) fields[i] = fld_is.get(i);\r\n\t// Go through the individual bundle elements\r\n\tIterator<Bundle> it = tablet.bundleIterator();\r\n\twhile (it.hasNext()) {\r\n\t Bundle bundle = it.next();\r\n\t for (int i=0;i<fields.length;i++) {\r\n // System.err.println(\"cleanse:fields[\" + i + \"] = \" + fields[i]); // abc DEBUG\r\n\t String ent = bundle.toString(fields[i]);\r\n\t active_entities.add(ent); \r\n addFieldEntity(fields[i], ent);\r\n\t // Add the post processor versions...\r\n BundlesDT.DT datatype = BundlesDT.getEntityDataType(ent);\r\n if (pp_lu.containsKey(datatype)) {\r\n\t Iterator<PostProc> it_pp = pp_lu.get(datatype).iterator();\r\n\t while (it_pp.hasNext()) {\r\n\t String converts[] = it_pp.next().postProcess(ent);\r\n\t\tfor (int j=0;j<converts.length;j++) {\r\n active_entities.add(converts[j]);\r\n }\r\n }\r\n\t }\r\n\t }\r\n\t}\r\n }\r\n }\r\n // Re-add the range values\r\n addRangeIntegers();\r\n // Clear the caches\r\n CacheManager.clearCaches();\r\n // Lastly, clear transforms\r\n resetTransforms();\r\n }", "public void removeSysUserTypes(final Map idList);", "void removebranchGroupInU(int i,boolean dead)\n {\n if(dead==true)\n {\n \n if(controlArray[i]==true)\n {\n //branchGroupArray[i].detach();\n \n branchGroupArray[i]=null ;\n controlArray[i]=false ;\n }\n \n \n }\n \n else \n {\n if(controlArray[i]==true)\n {\n branchGroupArray[i].detach();\n //branchGroupArray[i]=null;\n controlArray[i]=false ;\n }\n }\n }", "private void removeOOSBalas() {\n balasToRemove = new ArrayList<>();\n balas.forEach(bala -> {\n if(bala.getState() == Enums.BulletState.TO_REMOVE) {\n if(!balasToRemove.contains(bala)) {\n balasToRemove.add(bala);\n }\n }\n });\n balasToRemove.forEach(bala -> balas.remove(bala));\n }", "public void unRegAll(){\n \t\t\n \t\tfor(ShopItem shopItem : itemList){\n \t\t\t//TODO: process more then one item at the same time.\n \t\t\t/*\n \t\t\tint position = shopItem.getShopPosition().getSlot();\n \t\t\tif(processedPositions.contains(position))\n \t\t\t\tcontinue;\n \t\t\tprocessedPositions.add(position);\n \t\t\tint amount = getItemAmount(position);\n \t\t\t*/\n \t\t\tint amount = 1;\n \t\t\tgetOwner().getClient().sendPacket(Type.U_SHOP, \"unreg\", 1, shopItem.getShopPosition().getSlot(), amount);\n \t\t\t\n \t\t\t//int[] freePosition = getOwner().getInventory().getFreeSlots(shopItem.getItem(), -1);\n \t\t\t//InventoryPosition inventoryPosition = new InventoryPosition(freePosition[1],freePosition[2],freePosition[0]);\n \t\t\t//InventoryItem inventoryItem = new InventoryItem(shopItem.getItem(),\tinventoryPosition);\n \t\t\t//getOwner().getInventory().addInventoryItem(inventoryItem);\n \t\t\tInventoryItem inventoryItem = getOwner().getInventory().storeItem(shopItem.getItem(), -1);\n \t\t\tgetOwner().getClient().sendPacket(Type.INVEN, inventoryItem, getOwner().getClient().getVersion());\n \t\t}\n \t\titemList.clear();\n \t}" ]
[ "0.615662", "0.6120282", "0.60495865", "0.59538585", "0.59538585", "0.59538585", "0.59538585", "0.59538585", "0.59538585", "0.59538585", "0.59538585", "0.59538585", "0.59538585", "0.59538585", "0.59538585", "0.59538585", "0.59538585", "0.59538585", "0.5920258", "0.5891033", "0.5891033", "0.5891033", "0.5891033", "0.5891033", "0.57845104", "0.5751785", "0.5732869", "0.56637096", "0.56624347", "0.5567013", "0.55485475", "0.554309", "0.5479898", "0.543248", "0.54186577", "0.54186577", "0.54186577", "0.54186577", "0.54186577", "0.54186577", "0.54186577", "0.54186577", "0.54186577", "0.54186577", "0.54182416", "0.5412059", "0.5412059", "0.5412059", "0.54019654", "0.53978384", "0.5396486", "0.53820777", "0.53820384", "0.53762174", "0.5348683", "0.53422636", "0.5329989", "0.5310586", "0.5285279", "0.52729684", "0.52683157", "0.5261295", "0.52421916", "0.5234183", "0.5232192", "0.5231497", "0.5229789", "0.52151525", "0.5206446", "0.51939416", "0.51930165", "0.5171826", "0.51640975", "0.51624435", "0.5142914", "0.51192135", "0.5115588", "0.5114139", "0.5112221", "0.51119155", "0.51049423", "0.5079521", "0.50687", "0.5067906", "0.5062753", "0.50559294", "0.5054475", "0.50390893", "0.503358", "0.5032701", "0.5030068", "0.50279266", "0.50239116", "0.5010021", "0.5003632", "0.49952164", "0.49879146", "0.4986219", "0.49840564", "0.4982987" ]
0.8434685
0
Add a system to the world.
@SuppressWarnings("unchecked") void addSystem(EntitySystem system) { if (systems.contains(system)) throw new RuntimeException("System already added"); system.id = getNewSystemId(); system.componentBits = world.getComponentBits(system.components); Class<? extends EntitySystem> class1 = system.getClass(); do { for (Field field : class1.getDeclaredFields()) { // Check for ComponentManager declarations. if (field.getType() == ComponentMapper.class) { field.setAccessible(true); // Read the type in the <> of componentmanager Type type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0]; try { // Set the component manager declaration with the right // component manager. field.set(system, world.getComponentMapper((Class<? extends Component>) type)); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } // check for EventListener declarations. if (field.getType() == EventListener.class) { field.setAccessible(true); // Read the type in the <> of eventListener. Type type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0]; @SuppressWarnings("rawtypes") EventListener<? extends Event> eventListener = new EventListener(); world.registerEventListener(eventListener, (Class<? extends Event>) type); try { // Set the event listener declaration with the right // field listener. field.set(system, eventListener); } catch (IllegalArgumentException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } } } class1 = (Class<? extends EntitySystem>) class1.getSuperclass(); } while (class1 != EntitySystem.class); systems.add(system); systemMap.put(system.id, system); system.world = world; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Systems add(System system) {\r\n\t\tif (system != null) {\r\n\t\t\tif (system instanceof InitializeSystem) {\r\n\t\t\t\t__initializeSystems.add((InitializeSystem) system);\r\n\t\t\t}\r\n\t\t\tif (system instanceof ExecuteSystem) {\r\n\t\t\t\t__executeSystems.add((ExecuteSystem) system);\r\n\t\t\t}\r\n\t\t\tif (system instanceof RenderSystem) {\r\n\t\t\t\t__renderSystems.add((RenderSystem) system);\r\n\t\t\t}\r\n\t\t\tif (system instanceof TearDownSystem) {\r\n\t\t\t\t__tearDownSystems.add((TearDownSystem) system);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "public void addToWorld(World world);", "void addCoordinateSystem(CoordinateSystem cs);", "void addSystem(EntitySystem... systems) {\n \t\tfor (EntitySystem s : systems)\n \t\t\taddSystem(s);\n \t}", "public void addSolarSystem(SolarSystem solarSystem) {\n interactor.addSolarSystem(solarSystem);\n }", "public void addCoordinateSystem(CoordinateSystem cs) {\n if (cs == null)\n throw new RuntimeException(\"Attempted to add null CoordinateSystem to var \" + forVar.getFullName());\n\n if (coordSys == null)\n coordSys = new ArrayList<>(5);\n coordSys.add(cs);\n }", "private void addSolarSystem(final SolarSystem pSolar)\n \t{\n \t\tif (aTempSolarSystem == null) {\n \t\t\taTempSolarSystem = pSolar;\n \t\t}\n \t\taSolarSystems.put(pSolar.getID(), pSolar);\n \t\t// if new solar system is out of bounds, resize\n \t\taSize = Math.max(aSize, pSolar.getRadius() + (int) pSolar.getPoint3D().getDistanceToOrigin());\n \t}", "public void addToComponent(String objective, OpSystem system);", "public void appendSystem(String text) {\n try {\n StyledDocument doc = screenTP.getStyledDocument();\n doc.insertString(doc.getLength(), formatForPrint(text), doc.getStyle(\"system\"));\n } catch (BadLocationException ex) {\n// ex.printStackTrace();\n AdaptationSuperviser.logger.error(\"Error while trying to append system message in the \" + this.getName(), ex);\n }\n }", "public void attach(SGSystem nSystem) {\r\n systems.add(nSystem);\r\n }", "public void addToWorld() {\n world().addObject(this, xPos, yPos);\n \n try{\n terrHex = MyWorld.theWorld.getObjectsAt(xPos, yPos, TerritoryHex.class).get(0);\n } catch(IndexOutOfBoundsException e){\n MessageDisplayer.showMessage(\"The new LinkIndic didn't find a TerritoryHex at this position.\");\n this.destroy();\n }\n \n }", "public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\n\t\tgameObj.add(new SpaceStation(getHeight(), getWidth()));\n\t\tSystem.out.println(\"Space station added\");\n\t\tnotifyObservers();\n\t}", "public static void addWorld(World world) {\n\t\tworlds.add(world);\n\t}", "public void addNewSystemUser()\n {\n\n DietTreatmentSystemUserBO newUser = new DietTreatmentSystemUserBO();\n // default user\n newUser.setSystemUser(SystemUserController.getInstance()\n .getCurrentUser());\n // default function\n newUser.setFunction(SystemUserFunctionBO.TREATING_ASSISTANT);\n\n _dietTreatment.addSystemUsers(newUser);\n }", "void addEntityToSystems(Entity e, RECSBits systemBits) {\n \t\tfor (int i = systemBits.nextSetBit(0); i >= 0; i = systemBits.nextSetBit(i + 1)) {\n \t\t\tsystemMap.get(i).addEntity(e.id);\n \t\t}\n \t}", "public void addSpaceStation()\n\t{\n\t\t//if a space station is already spawned, one will not be added\n\t\tif (gameObj[5].size() == 0)\n\t\t{\n\t\t\tgameObj[5].add(new SpaceStation());\n\t\t\tSystem.out.println(\"SpaceStation added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A space station is already spawned\");\n\t\t}\n\t}", "private SpaceSystemType addSpaceSystem(SpaceSystemType parentSystem,\n String systemName,\n String description,\n String fullPath,\n String classification,\n String validationStatus,\n String version) throws CCDDException\n {\n // Get the reference to the space system if it already exists\n SpaceSystemType childSystem = parentSystem == null ? null : getSpaceSystemByName(systemName, parentSystem);\n\n // Check if the space system doesn't already exist\n if (childSystem == null)\n {\n // Create the new space system, store its name, and set the flag to indicate a new\n // space system exists\n childSystem = factory.createSpaceSystemType();\n childSystem.setName(systemName);\n\n // Check if this is the root space system\n if (parentSystem == null)\n {\n // Set this space system as the root system\n project = factory.createSpaceSystem(childSystem);\n }\n // Not the root space system\n else\n {\n // Add the new space system as a child of the specified system\n parentSystem.getSpaceSystem().add(childSystem);\n }\n }\n\n // Check if a description is provided\n if (description != null && !description.isEmpty())\n {\n // Set the description attribute\n childSystem.setLongDescription(description);\n }\n\n // Check if the full table path is provided\n if (fullPath != null && !fullPath.isEmpty())\n {\n // Store the table name, with its full path, in the short description field. This is\n // used if the export file is used to import tables into a project\n childSystem.setShortDescription(fullPath);\n }\n\n // Set the new space system's header attributes\n addSpaceSystemHeader(childSystem,\n classification,\n validationStatus,\n version,\n (parentSystem == null ? new Date().toString() : null));\n\n return childSystem;\n }", "public final void addFileSystem (FileSystem fs) {\n synchronized (Repository.class) {\n // if the file system is not assigned yet\n if (!fs.assigned && !fileSystems.contains(fs)) {\n // new file system\n fileSystems.add(fs);\n String systemName = fs.getSystemName ();\n\n boolean isReg = names.get (systemName) == null;\n if (isReg && !systemName.equals (\"\")) { // NOI18N\n // file system with the same name is not there => then it is valid\n names.put (systemName, fs);\n fs.setValid (true);\n } else {\n // there is another file system with the same name => it is invalid\n fs.setValid (false);\n }\n // mark the file system as being assigned\n fs.assigned = true;\n // mark as a listener on changes in the file system\n fs.addPropertyChangeListener (propListener);\n fs.addVetoableChangeListener (vetoListener);\n\n // fire info about new file system\n fireFileSystem (fs, true);\n }\n }\n }", "void setSystem(java.lang.String system);", "private EntityManager initSystems() {\n CameraSystem cameraSystem = new CameraSystem(Constants.WINDOW_WIDTH, Constants.WINDOW_HEIGHT);\n addSystem(cameraSystem);\n addSystem(new ZoomSystem());\n //Physics System\n addSystem(new PhysicsSystem());\n //Player movement system\n addSystem(new PlayerMovementSystem());\n\n addSystem(new CannonFiringSystem());\n addSystem(new CollisionSystem());\n addSystem(new KillSystem());\n addSystem(new HealthSystem());\n addSystem(new StatisticSystem());\n addSystem(new EnemySpawningSystem());\n addSystem(new InventorySystem());\n addSystem(new CurrencySystem());\n\n GUISystem guiSystem = new GUISystem();\n InputSystem inputSystem = new InputSystem(guiSystem);\n\n //Input System\n addSystem(inputSystem);\n //Entity Render System\n addSystem(new EntityRenderSystem());\n //Particle System\n addSystem(new ParticleSystem());\n addSystem(new PlayerActionSystem(guiSystem));\n addSystem(new MapRenderSystem());\n addSystem(new HUDSystem());\n //Debug Render System\n addSystem(new DebugRendererSystem());\n //GUI System\n addSystem(guiSystem);\n\n return this;\n }", "private void createWorld() {\n world = new World();\n world.setEventDeliverySystem(new BasicEventDeliverySystem());\n //world.setSystem(new MovementSystem());\n world.setSystem(new ResetPositionSystem());\n world.setSystem(new RenderingSystem(camera, Color.WHITE));\n\n InputSystem inputSystem = new InputSystem();\n InputMultiplexer inputMultiplexer = new InputMultiplexer();\n inputMultiplexer.addProcessor(inputSystem);\n inputMultiplexer.addProcessor(new GestureDetector(inputSystem));\n Gdx.input.setInputProcessor(inputMultiplexer);\n world.setSystem(inputSystem);\n world.setSystem(new MoveCameraSystem(camera));\n\n world.initialize();\n }", "System createSystem();", "public void setSystem(byte system) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeByte(__io__address + 4, system);\n\t\t} else {\n\t\t\t__io__block.writeByte(__io__address + 4, system);\n\t\t}\n\t}", "public void addWorld(File file, String name){\n worlds.add(new MBMWorld(file, name));\n }", "private void addPlacesToWorld(ArrayList<Place> places, GameWorld world) {\n for (int i = 0; i < places.size(); i++) {\n world.addPlace(places.get(i));\n }\n }", "private void addEvent() {\n String name = selectString(\"What is the name of this event?\");\n ReferenceFrame frame = selectFrame(\"Which frame would you like to define the event in?\");\n double time = selectDouble(\"When does the event occur (in seconds)?\");\n double x = selectDouble(\"Where does the event occur (in light-seconds)?\");\n world.addEvent(new Event(name, time, x, frame));\n System.out.println(\"Event added!\");\n }", "public final void entryRuleSystemType() throws RecognitionException {\n try {\n // InternalMyDsl.g:154:1: ( ruleSystemType EOF )\n // InternalMyDsl.g:155:1: ruleSystemType EOF\n {\n before(grammarAccess.getSystemTypeRule()); \n pushFollow(FOLLOW_1);\n ruleSystemType();\n\n state._fsp--;\n\n after(grammarAccess.getSystemTypeRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public final void entryRuleSystem() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:145:1: ( ruleSystem EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:146:1: ruleSystem EOF\n {\n before(grammarAccess.getSystemRule()); \n pushFollow(FOLLOW_ruleSystem_in_entryRuleSystem241);\n ruleSystem();\n\n state._fsp--;\n\n after(grammarAccess.getSystemRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleSystem248); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "protected void addVolumeStorageSystem(Map<URI, StorageSystem> volumeStorageSystems, Volume volume) {\n if (volumeStorageSystems == null) {\n volumeStorageSystems = new HashMap<URI, StorageSystem>();\n }\n\n StorageSystem volumeStorageSystem = volumeStorageSystems.get(volume.getStorageController());\n if (volumeStorageSystem == null) {\n volumeStorageSystem =\n _dbClient.queryObject(StorageSystem.class, volume.getStorageController());\n volumeStorageSystems.put(volumeStorageSystem.getId(), volumeStorageSystem);\n }\n }", "public void addRobot(String name){\n robotNames.add(name);\n int[] initialRobotPose = robotController.getRobot(name).getInitialPosition();\n Pose initialPose = new Pose(initialRobotPose[0], initialRobotPose[1], initialRobotPose[2]);\n MeasurementHandler newHandler = new MeasurementHandler(robotController.getRobot(name), initialPose);\n measurementHandlers.put(name, newHandler);\n int[] initialPosition = {(int)Math.round(initialPose.getPosition().getXValue()), (int)Math.round(initialPose.getPosition().getYValue())};\n robotController.getRobot(name).setPosition(initialPosition);\n robotController.getRobot(name).setRobotOrientation((int)Math.round(initialPose.getHeading().getValue()));\n robotController.getRobot(name).setDestination(initialPosition);\n map.resize(initialPose.getPosition());\n }", "private void initialize() {\n SystemManager.get(this);\n SystemManager.add(new PlayerInputSystem(this, win.getInputHandler()));\n SystemManager.add(new PhysicSystem(this, win.getDimension()));\n SystemManager.add(new RenderSystem(this));\n\n World world = new World(new Vector2D(0.0f, 98.1f));\n theCar = new Car(\"car\");\n\n theCar.setPosition(new Vector2D(win.getWidth() * 0.5f, win.getHeight() * 0.5f))\n .setSize(new Rectangle(50, 20))\n .setVelocity(new Vector2D(0.0f, 0.0f))\n .setResistance(0.90f)\n .setMass(2000.0f)\n .setWorld(world);\n\n add(theCar);\n }", "public boolean addExternalSystem(String name) {\n if (name == null) {\n return false;\n }\n\n if (name.length() == 0) {\n return false;\n }\n\n switch (name) {\n case \"Accounting\":\n if (!searchSystem(name)) {\n AccountingSystem accountingSystem = new AccountingSystem();\n accountingSystem.connectSystem();\n connectedExternalSystems.add(accountingSystem);\n return true;\n }\n\n case \"Tax\":\n if (!searchSystem(name)) {\n TaxSystem taxSystem = new TaxSystem();\n taxSystem.connectSystem();\n connectedExternalSystems.add(taxSystem);\n return true;\n }\n\n default:\n return false;\n }\n }", "boolean add(SysFile model);", "public System(String implClassName, Params param) {\n\t\tSimLogger.log(Level.INFO, \"New System Created.\");\n\t\tthis.param = param;\n\t\tthis.param.system = this;\n\t\ttry {\n\t\t\tClass implClass = Class.forName(implClassName);\n\t\t\timpl = (Implementation) implClass.newInstance();\n\t\t\t// Set the implementation's system so init() can set it in workload!!!\n\t\t\timpl.sys = this;\n\t\t\timpl.init(param.starter.build());\n\t\t\tSimLogger.log(Level.FINE, \"Implementation \" + implClassName + \" was created successfully.\");\n\n\t\t\ttry {\n\t\t\t\tfor(String s : param.measures) {\n\t\t\t\t\tSimLogger.log(Level.FINE, \"Adding measure \" + s + \" to system.\");\n\t\t\t\t\tClass measureClass = Class.forName(s);\n\t\t\t\t\tMeasure measure = (Measure) measureClass.newInstance();\n\t\t\t\t\tmeasures.add(measure);\n\t\t\t\t}\n\t\t\t\tCollections.sort(measures);\n\t\t\t} catch(ClassNotFoundException e) {\n\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot find measure class with name = \" + implClassName);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} catch(InstantiationException e) {\n\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate measure class with name = \" + implClassName);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t} catch(IllegalAccessException e) {\n\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate measure class with name = \" + implClassName);\n\t\t\t\tthrow new RuntimeException(e);\n\t\t\t}\n\n\t\t\t//init actors\n\t\t\tHashMap<String, Integer> actorMachineInstances = param.starter.buildActorMachine();\n\t\t\tfor(String aType : actorMachineInstances.keySet()) {\n\t\t\t\tint numActors = actorMachineInstances.get(aType);\n\t\t\t\tSimLogger.log(Level.FINE, \"Creating \" + numActors + \" many of actor type \" + aType);\n\t\t\t\tfor(int i = 0; i < numActors; i++) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tClass actorClass = Class.forName(aType);\n\t\t\t\t\t\tActorMachine am = (ActorMachine) actorClass.newInstance();\n\t\t\t\t\t\tString actorName = am.getPrefix() + i;\n\t\t\t\t\t\tam.actor = actorName;\n\t\t\t\t\t\tam.actorType = aType;\n\t\t\t\t\t\tam.sys = this;\n\t\t\t\t\t\tactors.put(actorName, am);\n\t\t\t\t\t} catch(ClassNotFoundException e) {\n\t\t\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot find actor machine class with name = \" + implClassName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch(InstantiationException e) {\n\t\t\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate actor machine class with name = \" + implClassName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch(IllegalAccessException e) {\n\t\t\t\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate actor machine class with name = \" + implClassName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tSimLogger.log(Level.FINE, \"Actors init was successful.\");\n\n\t\t} catch(ClassNotFoundException e) {\n\t\t\tSimLogger.log(Level.SEVERE, \"Cannot find implementation class with name = \" + implClassName);\n\t\t\te.printStackTrace();\n\t\t} catch(InstantiationException e) {\n\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate implementation class with name = \" + implClassName);\n\t\t\te.printStackTrace();\n\t\t} catch(IllegalAccessException e) {\n\t\t\tSimLogger.log(Level.SEVERE, \"Cannot instantiate implementation class with name = \" + implClassName);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void addSystemDef(SnmpCollection collection, String systemDefName) {\n log().debug(\"addSystemDef: merging system defintion \" + systemDefName + \" into snmp-collection \" + collection.getName());\n // Find System Definition\n SystemDef systemDef = getSystemDef(systemDefName);\n if (systemDef == null) {\n throwException(\"Can't find system definition \" + systemDefName, null);\n }\n // Add System Definition to target SNMP collection\n if (contains(collection.getSystems().getSystemDefCollection(), systemDef)) {\n log().warn(\"addSystemDef: system definition \" + systemDefName + \" already exist on SNMP collection \" + collection.getName());\n } else {\n log().debug(\"addSystemDef: adding system definition \" + systemDef.getName() + \" to snmp-collection \" + collection.getName());\n collection.getSystems().addSystemDef(systemDef);\n // Add Groups\n for (String groupName : systemDef.getCollect().getIncludeGroupCollection()) {\n Group group = getMibObjectGroup(groupName);\n if (group == null) {\n log().warn(\"addSystemDef: group \" + groupName + \" does not exist on global container\");\n } else {\n if (contains(collection.getGroups().getGroupCollection(), group)) {\n log().debug(\"addSystemDef: group \" + groupName + \" already exist on SNMP collection \" + collection.getName());\n } else {\n log().debug(\"addSystemDef: adding mib object group \" + group.getName() + \" to snmp-collection \" + collection.getName());\n collection.getGroups().addGroup(group);\n }\n }\n }\n }\n }", "public Systems() {\r\n\t\t__initializeSystems = new ArrayList<InitializeSystem>();\r\n\t\t__executeSystems = new ArrayList<ExecuteSystem>();\r\n\t\t__renderSystems = new ArrayList<RenderSystem>();\r\n\t\t__tearDownSystems = new ArrayList<TearDownSystem>();\r\n\t}", "public void setSystem(String value) {\r\n this.system = value;\r\n }", "public final void rule__System__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2364:1: ( ( 'system' ) )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2365:1: ( 'system' )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2365:1: ( 'system' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:2366:1: 'system'\n {\n before(grammarAccess.getSystemAccess().getSystemKeyword_0()); \n match(input,27,FOLLOW_27_in_rule__System__Group__0__Impl5016); \n after(grammarAccess.getSystemAccess().getSystemKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void addPlatform(Platforms p)\r\n\t{\r\n\t\tplatforms.add(new Platforms(p));\r\n\t}", "public void addedToWorld(World w) {\r\n\t\tupdate();\r\n\t}", "public void addUniverse(Universe uni){\n this.universe = uni;\n }", "public void addStorageSystem(URI storage, URI[] providers, boolean primaryProvider, String opId) throws InternalException;", "boolean add( Software s );", "public final void entryRuleSystemElement() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:537:1: ( ruleSystemElement EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:538:1: ruleSystemElement EOF\n {\n before(grammarAccess.getSystemElementRule()); \n pushFollow(FOLLOW_ruleSystemElement_in_entryRuleSystemElement1081);\n ruleSystemElement();\n\n state._fsp--;\n\n after(grammarAccess.getSystemElementRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleSystemElement1088); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public void addedToWorld(World w){\n PauseWorld world = (PauseWorld) w;\n world.addObject(nameLabel,this.getX(),this.getY()+itemSize/2+10);\n }", "private void build()\n\t{\n\t\tengine.addSystem(new InputSystem());\n\t\tengine.addSystem(new MovementSystem());\n\t\t\n\t}", "protected void addedToWorld(World world) \n {\n createImages();\n }", "public SingleSystem(MaltipsSystem maltipsSystem) {\n this.maltipsSystem = maltipsSystem;\n }", "public void addSoftware(Software software){\n products.add (software);\n }", "public void createWorld(){\n\n }", "public static void add() {\n Application.currentUserCan( 1 );\n render();\n }", "public void setSystemId(String systemId);", "@FXML\n public void addGym() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingGym(0, 0));\n \t/*\n int xpos = (int) (Math.random() * 600) + 100;\n World.getInstance().addEntityToWorld(new BuildingGym(xpos, 30));\n */\n }", "public void addToLevel(Spatial spatial, final Vector3f position) {\n\n physicsSpace.addAll(spatial);\n\n // physics-secure movement to the position where it's added\n PhysicsControl physicsControl = spatial.getControl(PhysicsControl.class);\n if (physicsControl != null) {\n physicsControl.setEnabled(false);\n spatial.setLocalTranslation(position);\n physicsControl.setEnabled(true);\n } else {\n spatial.setLocalTranslation(position);\n }\n\n\n /*\n * Give references to the LevelGeneratingState to anyone who wants to\n * bring friends (other spatials) to the level\n */\n spatial.depthFirstTraversal(\n new SceneGraphVisitor() {\n public void visit(Spatial spatial) {\n int nbrOfCtrls = spatial.getNumControls();\n for (int i = 0; i < nbrOfCtrls; i++) {\n Control control = spatial.getControl(i);\n if (control instanceof LevelContentGenerator) {\n ((LevelContentGenerator) control).setLevelControl(LevelGeneratingState.this);\n }\n }\n }\n });\n \n if (spatial instanceof AbstractFireball) {\n fireballNode.attachChild(spatial);\n } else if (spatial instanceof AbstractWizard) {\n wizardNode.attachChild(spatial);\n } else if (spatial instanceof Platform) {\n platformNode.attachChild(spatial);\n } else {\n miscNode.attachChild(spatial);\n }\n \n //levelNode.attachChild(spatial);\n }", "public void spawn()\n\t{\n\t\tsynchronized(this)\n\t\t{\n\t\t\t// Set the x,y,z position of the L2Object spawn and update its _worldregion\n\t\t\tsetVisible(true);\n\t\t\tsetWorldRegion(WorldManager.getInstance().getRegion(getWorldPosition()));\n\n\t\t\t// Add the L2Object spawn in the _allobjects of L2World\n\t\t\tWorldManager.getInstance().storeObject(object);\n\n\t\t\t// Add the L2Object spawn to _visibleObjects and if necessary to _allplayers of its L2WorldRegion\n\t\t\tregion.addVisibleObject(object);\n\t\t}\n\n\t\t// this can synchronize on others instancies, so it's out of\n\t\t// synchronized, to avoid deadlocks\n\t\t// Add the L2Object spawn in the world as a visible object\n\t\tWorldManager.getInstance().addVisibleObject(object, region);\n\n\t\tobject.onSpawn();\n\t}", "@Override\r\n\tpublic SysPrivilege addSysPrivilege(SysPrivilege sysPrivilege) {\n\t\treturn (SysPrivilege)sysPrivilegeDao.save(sysPrivilege);\r\n\t}", "public void addRobot(Robot robot) {\r\n this.robots.add(robot);\r\n this.vue.poserRobot(robot, getCoordBase());\r\n }", "private void addToOutOfTypeSystemData(String typeName, Attributes attrs)\n throws XCASParsingException {\n if (this.outOfTypeSystemData != null) {\n FSData fsData = new FSData();\n fsData.type = typeName;\n fsData.indexRep = null; // not indexed\n String attrName, attrValue;\n for (int i = 0; i < attrs.getLength(); i++) {\n attrName = attrs.getQName(i);\n attrValue = attrs.getValue(i);\n if (attrName.startsWith(reservedAttrPrefix)) {\n if (attrName.equals(XCASSerializer.ID_ATTR_NAME)) {\n fsData.id = attrValue;\n } else if (attrName.equals(XCASSerializer.CONTENT_ATTR_NAME)) {\n this.currentContentFeat = attrValue;\n } else if (attrName.equals(XCASSerializer.INDEXED_ATTR_NAME)) {\n fsData.indexRep = attrValue;\n } else {\n fsData.featVals.put(attrName, attrValue);\n }\n } else {\n fsData.featVals.put(attrName, attrValue);\n }\n }\n this.outOfTypeSystemData.fsList.add(fsData);\n this.currentOotsFs = fsData;\n // Set the state; we're ready to accept the \"content\" feature,\n // if one is specified\n this.state = OOTS_CONTENT_STATE;\n }\n }", "public void registerSubsystem(Subsystem subsystem) {\n register((Object) subsystem);\n\n subsystems.put(subsystem.getName(), subsystem);\n }", "@DISPID(1611005952) //= 0x60060000. The runtime will prefer the VTID if present\n @VTID(28)\n void newWithAxisSystem(\n boolean oAxisSystemCreated);", "public void processAddStation() {\n AppTextEnterDialogSingleton dialog = AppTextEnterDialogSingleton.getSingleton();\n\n // POP UP THE DIALOG\n dialog.show(\"Add Metro Station\", \"Enter Name of the Metro Station:\");\n \n // CHANGE THE CURSOR\n Scene scene = app.getGUI().getPrimaryScene();\n scene.setCursor(Cursor.CROSSHAIR);\n \n // CHANGE THE STATE\n dataManager.setState(mmmState.ADD_STATION_MODE);\n }", "public final EObject entryRuleSystem() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleSystem = null;\n\n\n try {\n // InternalSPDSL.g:64:47: (iv_ruleSystem= ruleSystem EOF )\n // InternalSPDSL.g:65:2: iv_ruleSystem= ruleSystem EOF\n {\n newCompositeNode(grammarAccess.getSystemRule()); \n pushFollow(FOLLOW_1);\n iv_ruleSystem=ruleSystem();\n\n state._fsp--;\n\n current =iv_ruleSystem; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public void doAddEntity(TreePath path) {\n \t\tif(world == null) return;\n \t\tNode node = (Node) path.getLastPathComponent();\n \t\tString[] names = new String[EEntity.values().length];\n \t\tfor (int i = 0; i < names.length; i++) {\n \t\t\tnames[i] = EEntity.values()[i].name();\n \t\t}\n \t\tString selected = (String) JOptionPane.showInputDialog(\n \t\t\t\tWorldEditor.this, \"What kind of entity\", \"Create Entity\",\n \t\t\t\tJOptionPane.PLAIN_MESSAGE, null, names, names[0]);\n \t\tEEntity selectedEntity = EEntity.valueOf(selected);\n \t\tif (selectedEntity == null)\treturn;\n \t\tEditableEntity entity = (EditableEntity) EntityManager.getInstance().createEntity(selectedEntity);\n \t\tif (selectedEntity == EEntity.Terrain) {\n \t\t\tTerrainDialog dialog = new TerrainDialog(this);\n \t\t\tif (dialog.wasCanceled()) {\n \t\t\t\treturn;\n \t\t\t}\n \t\t\tDimension d = dialog.getTerrainSize();\n \t\t\tint tris = dialog.getTrisPerMesh();\n \t\t\t((TerrainEntity) entity).setWidth((int) d.getWidth());\n \t\t\t((TerrainEntity) entity).setDepth((int) d.getHeight());\n \t\t\t((TerrainEntity) entity).setTrianglesPerMesh(tris);\n \t\t}\n \t\tEditableView view = (EditableView) ViewManager.getInstance().createView(entity);\n \t\tif (selectedEntity == EEntity.Terrain) {\n \t\t\tthis.terrainView = (TerrainView)view;\n \t\t\tthis.terrainView.getTerrainCluster().setDetailTexture(1, 1);\n \t\t}\n \t\tthis.world.attachView(view);\n \t\ttreeModel.addChild(node, view);\n \t\trepaint();\n \t}", "@Override\n protected void createLocationCLI() {\n /*The rooms in the hallway01 location are created---------------------*/\n \n /*Hallway-------------------------------------------------------------*/\n Room hallway = new Room(\"Hallway 01\", \"This hallway connects the Personal, Laser and Net\");\n super.addRoom(hallway);\n }", "public void add(Location loc, Evolver occupant)\n {\n occupant.putSelfInGrid(getGrid(), loc);\n }", "int enableWorld(String worldName, Server server);", "public static void add() {\n\t\trender();\n\t}", "private void addMorph(World world, String name)\n {\n try\n {\n EntityMorph morph = this.factory.morphFromName(name);\n EntityLivingBase entity = (EntityLivingBase) EntityList.createEntityByIDFromName(new ResourceLocation(name), world);\n\n if (entity == null)\n {\n System.out.println(\"Couldn't add morph \" + name + \", because it's null!\");\n return;\n }\n\n NBTTagCompound data = entity.serializeNBT();\n\n morph.name = name;\n\n /* Setting up a category */\n String category = \"generic\";\n\n /* Category for third-party modded mobs */\n if (!name.startsWith(\"minecraft:\"))\n {\n category = name.substring(0, name.indexOf(\":\"));\n }\n else if (entity instanceof EntityDragon || entity instanceof EntityWither || entity instanceof EntityGiantZombie)\n {\n category = \"boss\";\n }\n else if (entity instanceof EntityAnimal || name.equals(\"minecraft:bat\") || name.equals(\"minecraft:squid\"))\n {\n category = \"animal\";\n }\n else if (entity instanceof EntityMob || name.equals(\"minecraft:ghast\") || name.equals(\"minecraft:magma_cube\") || name.equals(\"minecraft:slime\") || name.equals(\"minecraft:shulker\"))\n {\n category = \"hostile\";\n }\n\n EntityUtils.stripEntityNBT(data);\n morph.setEntityData(data);\n\n this.get(category).add(morph);\n }\n catch (Exception e)\n {\n System.out.println(\"An error occured during insertion of \" + name + \" morph!\");\n e.printStackTrace();\n }\n }", "@Override\n public void world() {\n super.world();\n }", "public void addedToWorld (World w)\n {\n w.addObject (healthBar, this.getX(), this.getY()-60);\n world = (MyWorld) w;\n healthBar.update(health);\n }", "public void add(IApsEntity entity) throws ApsSystemException;", "protected void addWorkspace( String workspaceName ) {\n }", "public final EObject entryRuleSystem() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleSystem = null;\n\n\n try {\n // InternalStl.g:64:47: (iv_ruleSystem= ruleSystem EOF )\n // InternalStl.g:65:2: iv_ruleSystem= ruleSystem EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getSystemRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleSystem=ruleSystem();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleSystem; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public void addAsteroid() \n\t{\n\t\tgameObj[0].add(new Asteroid());\n\t\tSystem.out.println(\"Asteroid added\");\n\t}", "public SolarSystemApplication(GLCapabilities capabilities, int width, int height) {\r\n addGLEventListener(this);\r\n addMouseWheelListener(this);\r\n addMouseListener(this);\r\n \r\n addMouseMotionListener(this);\r\n }", "public void register(WorldGenKawaiiBaseWorldGen.WorldGen gen)\r\n\t{\t\r\n\t\tif (!this.Enabled) return; \r\n\t\tGameRegistry.registerBlock(this, this.getUnlocalizedName());\r\n\t\t\r\n\t\tString saplingName = name + \".sapling\";\r\n\t\tSapling = new ItemKawaiiSeed(saplingName, SaplingToolTip, this);\r\n\t\tSapling.OreDict = SaplingOreDict;\r\n\t\tSapling.MysterySeedWeight = SeedsMysterySeedWeight;\r\n\t\tSapling.register();\r\n\r\n\t\tString fruitName = name + \".fruit\";\r\n\t\tif (FruitEdible)\r\n\t\t{\r\n\t\t\tItemKawaiiFood fruit = new ItemKawaiiFood(fruitName, FruitToolTip, FruitHunger, FruitSaturation, FruitPotionEffets);\r\n\t\t\tFruit = fruit;\r\n\t\t\tfruit.OreDict = FruitOreDict;\r\n\t\t\t\r\n\t\t\tfruit.register();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tItemKawaiiIngredient fruit = new ItemKawaiiIngredient(fruitName, FruitToolTip);\r\n\t\t\tFruit = fruit;\r\n\t\t\tfruit.OreDict = FruitOreDict;\r\n\t\t\t\r\n\t\t\tfruit.register();\r\n\t\t}\r\n\t\t\r\n\t\tif (gen.weight > 0)\r\n\t\t{\r\n\t\t\tgen.generator = new WorldGenKawaiiTree(this);\r\n\t\t\tModWorldGen.WorldGen.generators.add(gen);\r\n\t\t}\r\n\r\n\t\tModBlocks.AllTrees.add(this);\t\t\r\n\t}", "public void update() {\r\n for (SGSystem sys : systems.toArray(new SGSystem[0])) {\r\n sys.update();\r\n }\r\n }", "private void setupPowerSystem() {\n\t\tps = new PowerSystem(PowerSystemSolutionMethod.ANL_OPF);\r\n\t\t\r\n\t\t// Create nodes & register with power system\r\n\t\tNodeData nodeWindGenerator = new NodeData(1,1.0,0,false,true);\r\n\t\tps.addNode(nodeWindGenerator);\r\n\t\tNodeData nodeSubstation2 = new NodeData(2,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation2);\r\n\t\tNodeData nodeCityResidential = new NodeData(3,1.0,0,false);\r\n\t\tps.addNode(nodeCityResidential);\r\n\t\tNodeData nodeCityIndustrial = new NodeData(4,1.0,0,false);\r\n\t\tps.addNode(nodeCityIndustrial);\r\n\t\tNodeData nodeCityCommercial = new NodeData(5,1.0,0,false);\r\n\t\tps.addNode(nodeCityCommercial);\r\n\t\tNodeData nodeCoalGenerator = new NodeData(7,1.0,0,false,true);\r\n\t\tps.addNode(nodeCoalGenerator);\r\n\t\tNodeData nodeSubstation3 = new NodeData(8,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation3);\r\n\t\tNodeData nodeGasGenerator = new NodeData(11,1.0,0,false,true);\r\n\t\tps.addNode(nodeGasGenerator);\r\n\t\tNodeData nodeWindStorage = new NodeData(9,1.0,0,false);\r\n\t\tps.addNode(nodeWindStorage);\r\n\t\tNodeData nodeSubstation1 = new NodeData(0,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation1);\r\n\t\t\r\n\t\t// Create lines & register with power system\r\n\t\tMWTimeSeries branchTimeSeries = null;\r\n\t\t\r\n\t\tBranchData branchWindGeneratorToLocalSubstation = new BranchData(nodeWindGenerator,nodeSubstation1,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindGeneratorToLocalSubstation,\"Wind Generator to Substation 1\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindGeneratorToLocalSubstation);\r\n\r\n\t\tBranchData branchWindStorageToLocalSubstation = new BranchData(nodeWindStorage,nodeSubstation1,0.01,0,1500.0,false);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindStorageToLocalSubstation,\"Storage to Substation 1\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindStorageToLocalSubstation);\r\n\t\t\r\n\t\tbranchWindLocalSubstationToCitySubstation = new BranchData(nodeSubstation1,nodeSubstation2,0.01,0,125.0,false);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindLocalSubstationToCitySubstation,\"Substation 1 to Substation 2\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindLocalSubstationToCitySubstation);\r\n\t\t\r\n\t\tBranchData branchWindToResidential = new BranchData(nodeSubstation2,nodeCityResidential,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToResidential,\"Substation 2 to Residential\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindToResidential);\r\n\t\t\r\n\t\tBranchData branchWindToCommercial = new BranchData(nodeSubstation2,nodeCityCommercial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToCommercial,\"Substation 2 to Commercial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindToCommercial);\r\n\r\n\t\tBranchData branchWindToIndustrial = new BranchData(nodeSubstation2,nodeCityIndustrial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToIndustrial,\"Substation 2 to Industrial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchWindToIndustrial);\r\n\t\t\r\n\t\tBranchData branchCoalGeneratorToSubstation = new BranchData(nodeCoalGenerator,nodeSubstation3,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalGeneratorToSubstation,\"Coal Generator to Substation 3\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchCoalGeneratorToSubstation);\r\n\t\t\r\n\t\t\r\n\t\tBranchData branchGasToSubstation = new BranchData(nodeGasGenerator,nodeSubstation3,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchGasToSubstation,\"Natural Gas Generator to Substation 3\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchGasToSubstation);\r\n\t\t\r\n\t\tBranchData branchCoalToResidential = new BranchData(nodeSubstation3,nodeCityResidential,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToResidential,\"Substation 3 to Residential\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToResidential);\r\n\t\t\r\n\t\tBranchData branchCoalToIndustrial = new BranchData(nodeSubstation3,nodeCityIndustrial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToIndustrial,\"Substation 3 to Industrial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToIndustrial);\r\n\t\t\r\n\t\tBranchData branchCoalToCommercial = new BranchData(nodeSubstation3,nodeCityCommercial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToCommercial,\"Substation 3 to Commercial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToCommercial);\r\n\r\n\t\t\r\n\t\t// Create loads\r\n\t\tMWTimeSeries loadTimeSeries = null;\r\n\t\t\r\n\t\tloadResidential = new LoadData(nodeCityResidential,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadResidential,\"Residential load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadResidential);\r\n\t\t\r\n\t\tloadCommercial = new LoadData(nodeCityCommercial,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadCommercial,\"Commercial load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadCommercial);\r\n\t\t\r\n\t\tloadIndustrial = new LoadData(nodeCityIndustrial,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadIndustrial,\"Industrial load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadIndustrial);\r\n\t\t\r\n\t\t// Create gens\r\n\t\tMWTimeSeries genTimeSeries = null;\r\n\t\t\r\n\t\tgensWithCostsAndEmissions = new ArrayList<CostAndEmissionsProvider>();\r\n\t\tGeneratorDataWithLinearCostAndEmissions genCoal = new GeneratorDataWithLinearCostAndEmissions(nodeCoalGenerator,600,0,2000,0,0,9999,true,2000,20.0,0,1.0,includeFixedCostsAndEmissions);\r\n\t\tgensWithCostsAndEmissions.add(genCoal);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genCoal);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genCoal,\"Coal generation\");\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tps.addGenerator(genCoal);\r\n\t\t\r\n\t\tGeneratorDataWithLinearCostAndEmissions genGas = new GeneratorDataWithLinearCostAndEmissions(nodeGasGenerator,200,0,2000,0,0,9999,true,700.0,70.0,0,0.5,includeFixedCostsAndEmissions);\r\n\t\tgensWithCostsAndEmissions.add(genGas);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genGas);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genGas,\"Natural gas generation\");\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tps.addGenerator(genGas);\r\n\t\t\r\n\t\tgenWind = new WindGeneratorDataWithLinearCostAndEmissions(nodeWindGenerator,initialWindGen,0,210,initialWindVariation,true,200.0,0,0,0,includeFixedCostsAndEmissions);\r\n\t\tgenWind.setAnimating(false);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genWind);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genWind,\"Wind generation\");\r\n\t\twindGenTimeSeries = genTimeSeries;\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tgensWithCostsAndEmissions.add(genWind);\r\n\t\tps.addGenerator(genWind);\r\n\t\t\r\n\t\tgenStorage = new StorageDevice(nodeWindStorage,0,0,0,0,0,0,true,genWind,branchWindLocalSubstationToCitySubstation,simClock,1000,100);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genStorage,\"Storage generation\");\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genStorage);\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(genStorage);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tgensWithCostsAndEmissions.add(genStorage);\r\n\t\tps.addGenerator(genStorage);\r\n\t\t\r\n\t\tps.solve();\r\n\t\t\r\n\t\tArrayList<LineAndDistanceInfoProvider> lines; \r\n\t\tFlowArrowsForBranchData fA;\r\n\t\tSimpleLineDisplay line;\r\n\t\t\r\n\t\tBranchColorProvider branchColorProvider = new BranchColorDynamic(Color.BLACK,0.85,Color.ORANGE,1.0,Color.RED);\r\n\t\tBranchThicknessProvider branchThicknessProvider = new BranchThicknessDynamic(1.0,0.85,2.0,1.0,3.0);\r\n\t\tFlowArrowColorProvider flowArrowColorProvider = new FlowArrowColorDynamic(new Color(0,255,0,255/2),0.85,new Color(255,128,64,255/2),1.0,new Color(255,0,0,255/2));\r\n\t\t\r\n\t\t\r\n\t\tdouble switchthickness = 5.0;\r\n\r\n\t\t// Line Coal Generator to Fossil Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsCoalGenToCoalSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,350),new Point2D.Double(710 - 70,212),1);\r\n\t\tpointsCoalGenToCoalSubstation.add(line.getFromPoint());\r\n\t\tpointsCoalGenToCoalSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsCoalGenToCoalSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsCoalGenToCoalSubstation.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsCoalGenToCoalSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalGeneratorToSubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalGeneratorToSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\r\n\t\t//circuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(640,260),12,new Color(0f,0f,0f,1f),0,branchCoalGeneratorToSubstation));\r\n\t\t\r\n\t\t// Line Gas Generator to Fossil Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsGasGenToFossilSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,112.5),new Point2D.Double(765 - 70,160),1);\r\n\t\tpointsGasGenToFossilSubstation.add(line.getFromPoint());\r\n\t\tpointsGasGenToFossilSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsGasGenToFossilSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsGasGenToFossilSubstation.add(line.getToPoint());\r\n\t\tpointsGasGenToFossilSubstation.add(new Point2D.Double(710 - 70,212));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsGasGenToFossilSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchGasToSubstation, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchGasToSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\t//circuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(660,170),12,new Color(0f,0f,0f,1f),0,branchGasToSubstation));\r\n\t\t\r\n\t\t// Line Wind Generator to Wind Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindGenToWindSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(89,281),new Point2D.Double(89,150),1);\r\n\t\tpointsWindGenToWindSubstation.add(line.getFromPoint());\r\n\t\tpointsWindGenToWindSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindGenToWindSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindGenToWindSubstation.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindGenToWindSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindGeneratorToLocalSubstation, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindGeneratorToLocalSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(100,200),12,new Color(0f,0f,0f,1f),0,branchWindGeneratorToLocalSubstation));\t\t\r\n\t\t\r\n\t\t// Line storage to Wind Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindStorageToWindSubstation = new ArrayList<Point2D.Double>();\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(210,25));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,25));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,55));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,95));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,140));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindStorageToWindSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 2, Math.PI/20, \r\n\t\t\t\tbranchWindStorageToLocalSubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindStorageToLocalSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(100,75),12,new Color(0f,0f,0f,1f),0,branchWindStorageToLocalSubstation));\t\t\r\n\t\t\r\n\t\t// Line substation 2 to Residential load\r\n\t\tArrayList<Point2D.Double> pointsWindStationToResidential = new ArrayList<Point2D.Double>();\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(351 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(419 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(457 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(525 - 70,212.5));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindStationToResidential, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToResidential, branchColorProvider, circuitpanel, true, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToResidential,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(413 - 70,180),12,new Color(0f,0f,0f,1f),0,branchWindToResidential));\t\t\r\n\t\t\r\n\t\t// Line substation 3 to Residential load\r\n\t\tArrayList<Point2D.Double> pointsFossilStationToResidential = new ArrayList<Point2D.Double>();\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(710 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(631 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(592 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(525 - 70,212.5));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsFossilStationToResidential, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToResidential, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToResidential,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(585 - 70,180),12,new Color(0f,0f,0f,1f),0,branchCoalToResidential));\t\t\r\n\t\t\r\n\t\t// Line Substation 3 to Industrial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsFossilSubstationToIndustrial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,212.5),new Point2D.Double(525 - 70,365),1);\r\n\t\tpointsFossilSubstationToIndustrial.add(line.getFromPoint());\r\n\t\tpointsFossilSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsFossilSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsFossilSubstationToIndustrial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsFossilSubstationToIndustrial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToIndustrial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToIndustrial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(585 - 70,280),12,new Color(0f,0f,0f,1f),-Math.PI/5,branchCoalToIndustrial));\r\n\t\t\r\n\t\t// Line Substation 3 to Commercial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsSub3ToCommercial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,212.5),new Point2D.Double(525 - 70,55),1);\r\n\t\tpointsSub3ToCommercial.add(line.getFromPoint());\r\n\t\tpointsSub3ToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsSub3ToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsSub3ToCommercial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsSub3ToCommercial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToCommercial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToCommercial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(615 - 70,105),12,new Color(0f,0f,0f,1f),Math.PI/5,branchCoalToCommercial));\r\n\r\n\t\t\r\n\t\t// Line Substation 2 to Industrial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindSubstationToIndustrial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(351 - 70,212.5),new Point2D.Double(525 - 70,365),1);\r\n\t\tpointsWindSubstationToIndustrial.add(line.getFromPoint());\r\n\t\tpointsWindSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindSubstationToIndustrial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindSubstationToIndustrial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToIndustrial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToIndustrial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(399 - 70,273),12,new Color(0f,0f,0f,1f),Math.PI/4,branchWindToIndustrial));\r\n\r\n\t\t// Line Substation 2 to Commercial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindSubstationToCommercial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(351 - 70,212.5),new Point2D.Double(525 - 70,55),1);\r\n\t\tpointsWindSubstationToCommercial.add(line.getFromPoint());\r\n\t\tpointsWindSubstationToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindSubstationToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindSubstationToCommercial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindSubstationToCommercial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToCommercial, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToCommercial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(396 - 70,140),12,new Color(0f,0f,0f,1f),-Math.PI/4,branchWindToCommercial));\r\n\t\t\r\n\t\t// Line Substation 1 to Substation 2\r\n\t\tArrayList<Point2D.Double> pointsSub0ToSub1 = new ArrayList<Point2D.Double>();\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(85,140));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,140));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,156));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,196));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(190,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(230,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(351 - 70,212));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsSub0ToSub1, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 2, Math.PI/20, \r\n\t\t\t\tbranchWindLocalSubstationToCitySubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindLocalSubstationToCitySubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(195,141),12,new Color(0f,0f,0f,1f),0,branchWindLocalSubstationToCitySubstation));\r\n\t\t\r\n\t\t\r\n\t\t// Coal plant display\r\n\t\ttry {\r\n\t\t\tCoalPlantDisplay coaldisplay = new CoalPlantDisplay(new Point2D.Double(650 - 70,300),0,0.0,genCoal);\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(coaldisplay);\r\n\t\t\tcircuitpanel.addMouseListener(coaldisplay);\r\n\t\t\tCostAndEmissionsOverlay coaloverlay = new CostAndEmissionsOverlay(new Point2D.Double(700 - 70,450),genCoal);\r\n\t\t\tcostOverlays.add(coaloverlay);\r\n\t\t\tcircuitpanel.getTopLayerRenderables().add(coaloverlay);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Gas plant display\r\n\t\ttry {\r\n\t\tGasPlantDisplay gasdisplay = new GasPlantDisplay(new Point2D.Double(650 - 70,40),0.0,genGas);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(gasdisplay);\r\n\t\tcircuitpanel.addMouseListener(gasdisplay);\r\n\t\tCostAndEmissionsOverlay gasoverlay = new CostAndEmissionsOverlay(new Point2D.Double(700 - 70,20),genGas);\r\n\t\tcostOverlays.add(gasoverlay);\r\n\t\tcircuitpanel.getTopLayerRenderables().add(gasoverlay);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Wind plant display\r\n\t\ttry {\r\n\t\t\twinddisplay = new WindPlantDisplay(new Point2D.Double(50,240),0.0,genWind);\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(winddisplay);\r\n\t\t\tcircuitpanel.getAnimatables().add(winddisplay);\r\n\t\t\tcircuitpanel.addMouseListener(winddisplay);\r\n\t\t\tCostAndEmissionsOverlay windoverlay = new CostAndEmissionsOverlay(new Point2D.Double(100,450),genWind);\r\n\t\t\tcostOverlays.add(windoverlay);\r\n\t\t\tcircuitpanel.getTopLayerRenderables().add(windoverlay);\t\t\t\t\t\t\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// Storage display\r\n//\t\ttry {\r\n\t\t\t//SubstationDisplay storagedisplay = new SubstationDisplay(new Point2D.Double(160,0),\"Storage\");\r\n\t\t\t//circuitpanel.getMiddleLayerRenderables().add(storagedisplay);\r\n\t\t\tStorageDisplay storagedisplay = new StorageDisplay(genStorage,StorageDisplay.Alignment.LEFT,StorageDisplay.Alignment.TOP,new Point2D.Double(170,0));\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(storagedisplay);\r\n//\t\t} catch (IOException ie) {\r\n//\t\t\tSystem.out.println(ie);\r\n//\t\t}\r\n\t\t\r\n\t\t// Commercial load\r\n\t\ttry {\r\n\t\t\tCityDisplay commercetonLoad = new CityDisplay(new Point2D.Double(475 - 70,25),CityDisplay.CityType.COMMERCIAL,\"Commercial\",loadCommercial,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(commercetonLoad);\r\n\t\t\tcircuitpanel.addMouseListener(commercetonLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// Residential load\r\n\t\ttry {\r\n\t\t\tCityDisplay residentialLoad = new CityDisplay(new Point2D.Double(475 - 70,175),CityDisplay.CityType.RESIDENTIAL,\"Residential\",loadResidential,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(residentialLoad);\r\n\t\t\tcircuitpanel.addMouseListener(residentialLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\r\n\t\t\r\n\t\t// Industrial load\r\n\t\ttry {\r\n\t\t\tCityDisplay industrialLoad = new CityDisplay(new Point2D.Double(475 - 70,329),CityDisplay.CityType.INDUSTRIAL,\"Industrial\",loadIndustrial,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(industrialLoad);\r\n\t\t\tcircuitpanel.addMouseListener(industrialLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\t// Substation 3\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(660 - 70,212 - 25.0),3));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// Substation 2\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(305 - 70,212 - 25.0),2));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Substation 1\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(39,120.0),1));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new StoredEnergyLabel(new Point2D.Double(230,56),12,Color.BLACK,0,genStorage));\r\n\t\t\r\n\t\t/*\r\n\t\ttotalloadplot = new TotalLoadPlot(\r\n\t\t\t\tnew Point2D.Double(10,10),\r\n\t\t\t\t700,200,\r\n\t\t\t\tps,\r\n\t\t\t\tminutesPerAnimationStep,\r\n\t\t\t\t0,24,\r\n\t\t\t\t0,3000);\r\n\t\t*/\r\n\t\t/*\r\n\t\tMouseCoordinateLabel mclabel = new MouseCoordinateLabel(new Point2D.Double(0,20),12,Color.BLACK,0);\r\n\t\tcircuitpanel.getTopLayerRenderables().add(mclabel);\r\n\t\tcircuitpanel.addMouseMotionListener(mclabel);\r\n\t\tMouseCoordinateLabel mclabel = new MouseCoordinateLabel(new Point2D.Double(0,0),12,Color.BLACK,0);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(mclabel);\r\n\t\tcircuitpanel.addMouseMotionListener(mclabel);\r\n\t\t*/\r\n\t\t\r\n\t\tWindMaxDisplay windMaxLabel = new WindMaxDisplay(new Point2D.Double(144,384),12,Color.BLACK,0,genWind);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(windMaxLabel);\r\n\t\tWindCurtailedDisplay windCurtailedLabel = new WindCurtailedDisplay(new Point2D.Double(144,404),12,Color.BLACK,0,genWind);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(windCurtailedLabel);\r\n\r\n\t\tcircuitpanel.getTopLayerRenderables().add(new BlackoutDisplay(ps));\t\t\r\n\t\t\r\n\t\tcircuitpanel.getAnimatables().add(ps);\r\n\t\t\r\n\t\tcircuitpanel.getTopLayerRenderables().add(\r\n\t\t\t\tnew SimClockDisplay(new Point2D.Double(350,5),12,Color.BLACK,0,simClock)); \r\n\t\t\r\n\t\t// Wind plant at node sixteen\r\n//\t\ttry {\r\n//\t\t\tWindPlantDisplay winddisplay = new WindPlantDisplay(new Point2D.Double(650,340),0.0,genWind);\r\n//\t\t\tcircuitpanel.getMiddleLayerRenderables().add(winddisplay);\r\n//\t\t\tcircuitpanel.getAnimatables().add(winddisplay);\r\n//\t\t\tcircuitpanel.addMouseListener(winddisplay);\r\n//\t\t\tCostAndEmissionsOverlay windoverlay = new CostAndEmissionsOverlay(new Point2D.Double(689,462),genWind);\r\n//\t\t\tcostOverlays.add(windoverlay);\r\n//\t\t\tcircuitpanel.getTopLayerRenderables().add(windoverlay);\t\t\t\t\t\t\r\n//\t\t} catch (IOException ie) {\r\n//\t\t\tSystem.out.println(ie);\r\n//\t\t}\r\n\t\t\r\n\t}", "void update(Env world) throws Exception;", "public static void addNewRoom() {\n Services room = new Room();\n room = addNewService(room);\n\n ((Room) room).setFreeService(FuncValidation.getValidFreeServices(ENTER_FREE_SERVICES,INVALID_FREE_SERVICE));\n\n //Get room list from CSV\n ArrayList<Room> roomList = FuncGeneric.getListFromCSV(FuncGeneric.EntityType.ROOM);\n\n //Add room to list\n roomList.add((Room) room);\n\n //Write room list to CSV\n FuncReadWriteCSV.writeRoomToFileCSV(roomList);\n System.out.println(\"----Room \"+room.getNameOfService()+\" added to list---- \");\n addNewServices();\n\n }", "public void add();", "void createSolrSystem(SolrSystemDTO systemDTO, UserDTO userDTO);", "public SystemNode(SystemInfo sys) {\n\t\tsuper(sys);\n\t}", "@Override\n\tpublic void onAdd() {\n\t\tsuper.onAdd();\n\n\t\tsetIdleAnimation(4527);\n\t\tsetNeverRandomWalks(true);\n\t\tsetWalkingHomeDisabled(true);\n\n\t\tthis.region = Stream.of(AbyssalSireRegion.values()).filter(r -> r.getSire().getX() == getSpawnPositionX()\n\t\t && r.getSire().getY() == getSpawnPositionY()).findAny().orElse(null);\n\n\t\tRegion region = Region.getRegion(getSpawnPositionX(), getSpawnPositionY());\n\n\t\tif (region != null) {\n\t\t\tregion.forEachNpc(npc -> {\n\t\t\t\tif (npc instanceof AbyssalSireTentacle) {\n\t\t\t\t\tif (!npc.isDead()) {\n\t\t\t\t\t\tnpc.setDead(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tList<Position> tentaclePositions = Arrays.asList(\n\t\t\t\tthis.region.getTentacleEast(),\n\t\t\t\tthis.region.getTentacleWest(),\n\t\t\t\tthis.region.getTentacleNorthEast(),\n\t\t\t\tthis.region.getTentacleNorthWest(),\n\t\t\t\tthis.region.getTentacleSouthEast(),\n\t\t\t\tthis.region.getTentacleSouthWest()\n\t\t );\n\n\t\ttentaclePositions.forEach(position -> {\n\t\t\ttentacles.add(NpcHandler.spawnNpc(5909, position.getX(), position.getY(), position.getZ()));\n\t\t});\n\n\t\tList<Position> respiratoryPositions = Arrays.asList(\n\t\t\t\tthis.region.getRespiratorySystemNorthEast(),\n\t\t\t\tthis.region.getRespiratorySystemNorthWest(),\n\t\t\t\tthis.region.getRespiratorySystemSouthEast(),\n\t\t\t\tthis.region.getRespiratorySystemSouthWest()\n\t\t );\n\n\t\trespiratoryPositions.forEach(position -> respiratorySystems.add(\n\t\t\t\tNpcHandler.spawnNpc(5914, position.getX(), position.getY(), position.getZ())));\n\t}", "void createWorld(Scanner console){\r\n\t\tRandom r = new Random();\r\n\t // System.out.println(\"Welcome to Sushi Time!\");\r\n\t\t//System.out.println(\"Number of fish: \"); \r\n\t\tint fish = r.nextInt(40)+1;\r\n\t\t//System.out.println(\"Number of sharks: \"); \r\n\t\tint shark = r.nextInt(10)+1;\r\n\t\t//create random int for creating random number of seaweed\r\n\t\tint seaweed=r.nextInt(3)+1;\r\n\t\t//create fish, sharks, seaweed, net and sushibar, add them to GameCollection\r\n\t\tSystem.out.println(\"Creating \"+fish+\" fish\");\r\n\t\tfor(int i=0; i<fish; i++){\r\n\t\t\tSystem.out.println(\"Creating fish\");\r\n\t\t\tFish f = new Fish(this);\r\n\t\t\taddToWorldList(f);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating \"+shark+\" sharks\");\r\n\t\tfor(int i=0; i<shark; i++){\r\n\t\t\tSystem.out.println(\"Creating shark\");\r\n\t\t\tShark s = new Shark(this);\r\n\t\t\taddToWorldList(s);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating \"+seaweed+\" seaweed\");\r\n\t\tfor(int i=0; i<seaweed; i++){\r\n\t\t\tSystem.out.println(\"Creating seaweed\");\r\n\t\t\tSeaweed sw=new Seaweed(this);\r\n\t\t\taddToWorldList(sw);\r\n\t\t}\r\n\t\tSystem.out.println(\"Creating net\");\r\n\t\t\tNet n = new Net();\r\n\t\t\taddToWorldList(n);\r\n\t\tSystem.out.println(\"Creating sushibar\");\r\n\t\t Sushibar sb = new Sushibar();\r\n\t\t\taddToWorldList(sb);\r\n\t }", "public static void InitializeSystems()\n\t{\n\t\tif (_systems.size() < 1)\n\t\t{\n\t\t\tSystem.out.println(\"ERROR - no systems! (InitializeSystems)\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < _systems.size(); i++)\n\t\t\t_systems.get(i).Start();\n\t}", "void addComponent(Component component);", "public gov.ucore.ucore._2_0.StringType addNewSystemIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.StringType target = null;\n target = (gov.ucore.ucore._2_0.StringType)get_store().add_element_user(SYSTEMIDENTIFIER$0);\n return target;\n }\n }", "private void initExternalSystemsAvailable() {\n externalSystemsAvailable.add(\"Accounting system\");\n externalSystemsAvailable.add(\"Tax system\");\n }", "@Override\n public void add(Object o) {\n gameCollection.addElement(o);\n }", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "public void createWorld(String name, int regenTime, String customWorld){\n WorldCreationSettings.Builder builder = WorldCreationSettings.builder().name(name);\n WorldCreationSettings settings = builder.generateSpawnOnLoad(false).enabled(true).keepsSpawnLoaded(true).loadsOnStartup(true).build();\n final Optional<WorldProperties> optionalProperties = Sponge.getGame().getServer().createWorldProperties(settings);\n WorldProperties properties = optionalProperties.get();\n Sponge.getServer().saveWorldProperties(properties);\n Sponge.getServer().loadWorld(name);\n Sponge.getServer().getWorld(name).get().getProperties().setSpawnPosition(new Vector3i(0, 0, 0));\n Location<Extent> loc = new Location<>(Sponge.getServer().getWorld(name).get().getRelativeExtentView(), 0, 0, 0);\n UGWorld ug = new UGWorld(name, regenTime, 50, \"1d\", loc);\n worlds.add(ug);\n Config.getConfig().get().getNode(\"worlds\", name, \"type\").setValue(\"custom\");\n Config.getConfig().get().getNode(\"worlds\", name, \"custom-world\").setValue(customWorld);\n Config.getConfig().get().getNode(\"worlds\", name, \"regen-time\").setValue(regenTime);\n Config.getConfig().get().getNode(\"worlds\", name, \"tgug\").setValue(\"1d\");\n Config.getConfig().get().getNode(\"worlds\", name, \"max-size\").setValue(100);\n Config.getConfig().get().getNode(\"worlds\", name, \"spawn-x\").setValue(0);\n Config.getConfig().get().getNode(\"worlds\", name, \"spawn-y\").setValue(0);\n Config.getConfig().get().getNode(\"worlds\", name, \"spawn-z\").setValue(0);\n Config.getConfig().save();\n }", "public static void main(String[] args) {\n\n\n\n addHeavenlyB(\"Mercury\",88 , \"planet\");\n addHeavenlyB(\"Venus\",225 , \"planet\");\n addHeavenlyB(\"Earth\",365 , \"planet\");\n addHeavenlyB(\"Mars\",687 , \"planet\");\n addHeavenlyB(\"Deimos\",1.3 , \"moon\");\n addHeavenlyB(\"Phobos\",0.3 , \"moon\");\n\n\n print(planets);\n// print(moons);\n// printSolarSys();\n\n System.out.println();\n\n solarSystem.get(\"Mercury\").addMoon(solarSystem.get(\"Deimos\"));\n printMoons(\"Mercury\");\n\n\n// HeavenlyBody temp = new HeavenlyBody(\"Mercury\", 88);\n// solarSystem.put(temp.getName(),temp);\n// planets.add(temp);\n//\n// temp = new HeavenlyBody(\"Venus\", 225);\n// solarSystem.put(temp.getName(),temp);\n// planets.add(temp);\n//\n// temp = new HeavenlyBody(\"Earth\", 365);\n// solarSystem.put(temp.getName(),temp);\n// planets.add(temp);\n//\n// HeavenlyBody tempMoon = new HeavenlyBody(\"Moon\", 27);\n// solarSystem.put(tempMoon.getName(),tempMoon);\n// temp.addMoon(tempMoon);\n//\n// temp = new HeavenlyBody(\"Mars\", 687);\n// solarSystem.put(temp.getName(), temp);\n// planets.add(temp);\n//\n// tempMoon = new HeavenlyBody(\"Deimos\", 1.3);\n// solarSystem.put(tempMoon.getName(), tempMoon);\n// temp.addMoon(tempMoon); // temp is still Mars\n//\n// tempMoon = new HeavenlyBody(\"Phobos\", 0.3);\n// solarSystem.put(tempMoon.getName(), tempMoon);\n// temp.addMoon(tempMoon); // temp is still Mars\n//\n// temp = new HeavenlyBody(\"Jupiter\", 4332);\n// solarSystem.put(temp.getName(), temp);\n// planets.add(temp);\n//\n// tempMoon = new HeavenlyBody(\"Io\", 1.8);\n// solarSystem.put(tempMoon.getName(), tempMoon);\n// temp.addMoon(tempMoon); // temp is still Jupiter\n//\n// tempMoon = new HeavenlyBody(\"Europa\", 3.5);\n// solarSystem.put(tempMoon.getName(), tempMoon);\n// temp.addMoon(tempMoon); // temp is still Jupiter\n//\n// tempMoon = new HeavenlyBody(\"Ganymede\", 7.1);\n// solarSystem.put(tempMoon.getName(), tempMoon);\n// temp.addMoon(tempMoon); // temp is still Jupiter\n//\n// tempMoon = new HeavenlyBody(\"Callisto\", 16.7);\n// solarSystem.put(tempMoon.getName(), tempMoon);\n// temp.addMoon(tempMoon); // temp is still Jupiter\n//\n// temp = new HeavenlyBody(\"Saturn\", 10759);\n// solarSystem.put(temp.getName(), temp);\n// planets.add(temp);\n//\n// temp = new HeavenlyBody(\"Uranus\", 30660);\n// solarSystem.put(temp.getName(), temp);\n// planets.add(temp);\n//\n// temp = new HeavenlyBody(\"Neptune\", 165);\n// solarSystem.put(temp.getName(), temp);\n// planets.add(temp);\n//\n// temp = new HeavenlyBody(\"Pluto\", 248);\n// solarSystem.put(temp.getName(), temp);\n// planets.add(temp);\n\n\n\n\n }", "public void addToGame(GameLevel g) {\n g.addSprite(this); // now block is a part of the sprites.\n g.addCollidable(this); // now block is a part of the collidables.\n }", "public void addLocation(CmsPath path)\r\n {\r\n locations.add(path);\r\n }", "public System(String systemMake, String systemModel, int processorSpeed)\n\t{\n\t\tmake = systemMake;\n\t\tmodel = systemModel;\n\t\tspeed = processorSpeed;\n\t}", "void addRegion(Region region);", "public final void entryRuleSystemInstantiation() throws RecognitionException {\n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:201:1: ( ruleSystemInstantiation EOF )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:202:1: ruleSystemInstantiation EOF\n {\n before(grammarAccess.getSystemInstantiationRule()); \n pushFollow(FOLLOW_ruleSystemInstantiation_in_entryRuleSystemInstantiation361);\n ruleSystemInstantiation();\n\n state._fsp--;\n\n after(grammarAccess.getSystemInstantiationRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleSystemInstantiation368); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public void setSystemId( String systemId ) { this.systemId = systemId; }", "private void add() {\n\n\t}" ]
[ "0.72631645", "0.69025844", "0.6866825", "0.6761791", "0.66932267", "0.63895553", "0.63839936", "0.6382793", "0.63701797", "0.6325373", "0.62502885", "0.62322885", "0.622502", "0.61619264", "0.6120644", "0.61146283", "0.6004774", "0.5972406", "0.5954136", "0.57856655", "0.57831514", "0.57689226", "0.57614744", "0.5739621", "0.57058394", "0.56625265", "0.5660019", "0.5659593", "0.56428474", "0.561191", "0.55953366", "0.55682284", "0.553552", "0.55037344", "0.54944587", "0.54847896", "0.54698455", "0.5458961", "0.5455142", "0.5419357", "0.5403089", "0.53996795", "0.53464025", "0.5333299", "0.5329933", "0.5326183", "0.5315697", "0.5312002", "0.5309659", "0.5308181", "0.5296184", "0.5262398", "0.5243238", "0.5241021", "0.5233528", "0.52236587", "0.5217823", "0.5211097", "0.5205873", "0.52051276", "0.5197388", "0.5196608", "0.51962256", "0.5161235", "0.51603377", "0.51565635", "0.51539695", "0.5147725", "0.514039", "0.51375073", "0.5124704", "0.51227474", "0.5113219", "0.50847995", "0.5082956", "0.50684536", "0.5066498", "0.5060458", "0.50427693", "0.5037958", "0.5033642", "0.5033319", "0.5029978", "0.5029498", "0.50228226", "0.5019698", "0.50191945", "0.50168", "0.50106597", "0.49997666", "0.49994642", "0.49963063", "0.49926606", "0.498547", "0.49811324", "0.4977693", "0.49772033", "0.49753493", "0.49714637", "0.4960817" ]
0.74010634
0
Process all the systems with the given delta.
void process(float deltaInSec) { for (EntitySystem system : systems) { if (system.isEnabled()) { system.processSystem(deltaInSec); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void computeTransitionsToFixDelta()\n {\n _entriesToProcess = new ArrayDeque<String>();\n \n _systemModelDelta.getKeys(_entriesToProcess);\n \n while(!_entriesToProcess.isEmpty())\n {\n processEntryDelta(_systemModelDelta.findAnyEntryDelta(_entriesToProcess.poll()));\n }\n }", "public void process(double delta) {\n\n effectProcess(delta);\n switch (this.damageState) {\n case DESTROY:\n destroyCase(delta);\n break;\n case DAMAGED:\n damagedCase(delta);\n break;\n case FULL:\n fullCase(delta);\n break;\n }\n }", "public void update() {\r\n for (SGSystem sys : systems.toArray(new SGSystem[0])) {\r\n sys.update();\r\n }\r\n }", "public void update(float delta){\n\t\tfor (int i = vibrationList.size() - 1; i >= 0; i--) {\r\n\t\t\tVibration vibration = vibrationList.get(i);\r\n\t\t\tvibration.update(delta);\r\n\t\t\tif(vibration.removeMe()){\r\n\t\t\t\tvibrationList.remove(vibration);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "private void updateDelta() {\r\n // Convert registers to calendar\r\n Calendar c = getCalendarFromRegisters();\r\n\r\n // delta = calendar - elapsed\r\n deltaMs = c.getTimeInMillis() - platform.getMasterClock().getTotalElapsedTimePs() / MasterClock.PS_PER_MS;\r\n }", "public boolean update(int _delta)\r\n {\r\n if(mLife < 0.0f)\r\n {//while persistant\r\n //do nothing\r\n }\r\n else if(mLife > 0.0f)\r\n {//while still alive\r\n mLife -= Math.min(mLife,((float)_delta)/1000.0f);\r\n //do nothing\r\n }\r\n else //if(mLife == 0.0f)\r\n {//end of life\r\n mIsDead = false;\r\n for(int i = 0; i < mSystem.getEmitterCount(); i++)\r\n {\r\n //stop emitter producing\r\n mSystem.getEmitter(i).wrapUp();\r\n //when all particles expire declare system dead\r\n if(mSystem.getEmitter(i).completed())\r\n {\r\n if(false == mCompletedEmittors.contains(i))\r\n {\r\n mCompletedEmittors.add(i);\r\n if(mSystem.getEmitterCount() == mCompletedEmittors.size())\r\n {\r\n mCompletedEmittors.clear();\r\n mIsDead = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n //if dead return false to destroy\r\n if(mIsDead)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n mSystem.update(_delta);\r\n return true;\r\n }\r\n }", "public void update(float delta) {\n for (Task task : taskList) {\n task.update(delta);\n }\n }", "protected void processEntryDelta(InternalSystemEntryDelta entryDelta)\n {\n if(entryDelta.getDeltaState() == SystemEntryDelta.DeltaState.ERROR)\n {\n switch(computeActionFromStatus(entryDelta))\n {\n case NO_ACTION:\n break;\n \n case REDEPLOY:\n processEntryTransition(entryDelta,\n DELTA_TRANSITIONS);\n break;\n \n case FIX_MISMATCH_STATE:\n processEntryStateMismatch(null,\n entryDelta);\n break;\n \n default:\n throw new RuntimeException(\"not reached\");\n }\n }\n }", "public void update(float delta) \n\t{\n\t\tprocessInput();\n\t}", "@Override\n public void update(int deltaMs)\n {\n this.system.update(deltaMs);\n }", "public void update(float delta) {\n\t\n\t\t//Log.e(\"delta\",\tFloat.toString(delta));\n\t\t/*if(world.getBomberman().isDead)\n\t\t\tworld = new World(world.width, world.height);*/\n\t\tprocessInput();\n\t\tcheckBombsTimer();\n\t\tif(!world.bonus) destroyBricks();\n\t\tremoveDeadNpc();\n\t\tkillByBoom();\n\t\tremoveHiddenObjects();\n\t\t\n\t\t//destroyHiddenObjects();\n\t\t//killBombermanByBoom();\n\t\t//gravityDetection();\n\t\t//collisionDetectionBlocks();\t\n\t\tbomberman.update(delta);\n\t\tfor(NpcBase npc : world.getNpcs()){\n\t\t\tnpc.update(delta);\n\t\t}\n\t\tremoveBooms();\n\t\t//ShowPos();\n\t}", "public void update(double delta, Game game){\n\t\tListIterator<Behaviour> bit = behaviour.listIterator(0);\n\t\twhile(bit.hasNext()){Behaviour b = bit.next(); b.update(game, getPos(), delta); if(b.disposable()) bit.remove();}\n\t}", "private void process() {\n\tint i = 0;\n\tIOUtils.log(\"In process\");\n\tfor (Map.Entry<Integer, double[]> entry : vecSpaceMap.entrySet()) {\n\t i++;\n\t if (i % 1000 == 0)\n\t\tIOUtils.log(this.getName() + \" : \" + i + \" : \" + entry.getKey()\n\t\t\t+ \" : \" + this.getId());\n\t double[] cent = null;\n\t double sim = 0;\n\t for (double[] c : clusters.keySet()) {\n\t\t// IOUtils.log(\"before\" + c);\n\t\tdouble csim = cosSim(entry.getValue(), c);\n\t\tif (csim > sim) {\n\t\t sim = csim;\n\t\t cent = c;\n\t\t}\n\t }\n\t if (cent != null && entry.getKey() != null) {\n\t\ttry {\n\t\t clusters.get(cent).add(entry.getKey());\n\t\t} catch (Exception e) {\n\t\t e.printStackTrace();\n\t\t}\n\t }\n\t}\n }", "public void update(final int delta) {\n translate(velocity.scale(delta));\n\n }", "public MapDataDelta apply(MapDataDelta delta) {\n\t\tMapDataDelta inverse = new MapDataDelta();\n\n\t\t// heights\n\t\tHeightChange c = delta.getHeightChanges();\n\t\twhile (c != null) {\n\t\t\tinverse.addHeightChange(c.x, c.y, heights[c.x][c.y]);\n\t\t\tsetHeight(c.x, c.y, c.height);\n\t\t\tbackgroundListener.backgroundLineChangedAt(c.x, c.y, 1);\n\t\t\tc = c.next;\n\t\t}\n\n\t\t// landscape\n\t\tLandscapeChange cl = delta.getLandscapeChanges();\n\t\twhile (cl != null) {\n\t\t\tinverse.addLandscapeChange(cl.x, cl.y, landscapes[cl.x][cl.y]);\n\t\t\tlandscapes[cl.x][cl.y] = cl.landscape;\n\t\t\tbackgroundListener.backgroundLineChangedAt(cl.x, cl.y, 1);\n\t\t\tcl = cl.next;\n\t\t}\n\n\t\t// objects\n\t\tObjectRemover remove = delta.getRemoveObjects();\n\t\twhile (remove != null) {\n\t\t\tinverse.addObject(remove.x, remove.y, objects.get(remove.x, remove.y));\n\t\t\tobjects.set(remove.x, remove.y, null);\n\t\t\tremove = remove.next;\n\t\t}\n\n\t\tObjectAdder adder = delta.getAddObjects();\n\t\twhile (adder != null) {\n\t\t\tinverse.removeObject(adder.x, adder.y);\n\t\t\tobjects.set(adder.x, adder.y, adder.obj);\n\t\t\tadder = adder.next;\n\t\t}\n\n\t\tResourceChanger res = delta.getChangeResources();\n\t\twhile (res != null) {\n\t\t\tinverse.changeResource(res.x, res.y, resources[res.x][res.y], resourceAmount[res.x][res.y]);\n\t\t\tresources[res.x][res.y] = res.type;\n\t\t\tresourceAmount[res.x][res.y] = res.amount;\n\t\t\tres = res.next;\n\t\t}\n\n\t\t// start points\n\t\tStartPointSetter start = delta.getStartPoints();\n\t\twhile (start != null) {\n\t\t\tinverse.setStartPoint(start.player, playerStarts[start.player]);\n\t\t\tplayerStarts[start.player] = start.pos;\n\t\t\tstart = start.next;\n\t\t}\n\t\treturn inverse;\n\t}", "public void update(float delta)\n\t{\n\t\tif (!isStarted() || isPaused() || isKilled()) return;\n\n\t\tdeltaTime = delta * speedMultiplier;\n\n\t\t// initializes once delay has been met\n\t\tif (!isInitialized)\n\t\t{\n\t\t\tinitialize();\n\t\t}\n\n\t\tif (isInitialized)\n\t\t{\n\t\t\ttestRelaunch();\n\t\t\tupdateStep();\n\t\t\ttestCompletion();\n\t\t}\n\n\t\tcurrentTime += deltaTime;\n\t\tdeltaTime = 0;\n\t}", "private void incrementalBuild(IResourceDelta delta) throws CoreException {\n \t\tIResource unsortedResource = delta.getResource();\n \t\tIPath unsortedFolderPath = getUnsortedFolder().getFullPath();\n \t\tIPath deltaPath = delta.getResource().getFullPath();\n \n \t\tboolean isUnderUnsortedFolder = unsortedFolderPath.isPrefixOf(deltaPath);\n \n \t\tboolean isOverUnsortedFolder = deltaPath.isPrefixOf(unsortedFolderPath);\n \n \t\tif (isUnderUnsortedFolder) {\n \t\t\tint status = delta.getKind();\n \t\t\tint changeFlags = delta.getFlags();\n \n \t\t\tint type = unsortedResource.getType();\n \n \t\t\tIResource sortedResource = convertToSortedResource(unsortedResource);\n \n \t\t\tif (status == IResourceDelta.REMOVED) {\n \t\t\t\tif (sortedResource.exists()) {\n \t\t\t\t\tsortedResource.delete(false, null);\n \t\t\t\t}\n \t\t\t} else if (type == IResource.FILE && status == IResourceDelta.ADDED) {\n \t\t\t\tbuild((IFile) unsortedResource);\n \t\t\t} else if (type == IResource.FILE && status == IResourceDelta.CHANGED && (changeFlags & IResourceDelta.CONTENT) != 0) {\n \t\t\t\tbuild((IFile) unsortedResource);\n \t\t\t}\n \t\t}\n \n \t\tif (isUnderUnsortedFolder || isOverUnsortedFolder) {\n \t\t\tIResourceDelta[] affectedChildren = delta.getAffectedChildren();\n \t\t\tfor (int i = 0; i < affectedChildren.length; ++i) {\n \t\t\t\tincrementalBuild(affectedChildren[i]);\n \t\t\t}\n \t\t}\n \t}", "public void update(float delta){\n\t//\tdebugLabel.setText(\"Delta time: \"+delta);\n\t\tfor (Actor actor: this.getActors()){\n\t\t\tif(actor instanceof CubeNod)\n\t\t\t\t((CubeNod)actor).update(delta);\n\t\t\tif(actor instanceof LogicContainer)\n\t\t\t\t((LogicContainer)actor).update(delta);\t\n\t\t}\n\t\t\t\n\t}", "private void processUpdates(SystemMetadata newSystemMetadata)\n throws RetryableException, UnrecoverableException, SynchronizationFailed {\n\n logger.debug(task.taskLabel() + \" entering processUpdates...\");\n\n //XXX is cloning the identifier necessary?\n Identifier pid = D1TypeBuilder.cloneIdentifier(newSystemMetadata.getIdentifier());\n\n logger.info(buildStandardLogMessage(null, \"Start ProcessUpdate\"));\n logger.debug(task.taskLabel() + \" Getting sysMeta from HazelCast map\");\n // TODO: assume that if hasReservation indicates the id exists, that \n // hzSystemMetadata will not be null...can we make this assumption?\n SystemMetadata hzSystemMetadata = hzSystemMetaMap.get(pid);\n SystemMetadataValidator validator = null;\n String errorTracker = \"\";\n try {\n errorTracker = \"validateSysMeta\";\n \tvalidator = new SystemMetadataValidator(hzSystemMetadata);\n validator.validateEssentialProperties(newSystemMetadata, nodeCommunications.getMnRead());\n\n // if here, we know that the new system metadata is referring to the same\n // object, and we can consider updating other values.\n NodeList nl = nodeCommunications.getNodeRegistryService().listNodes();\n boolean isV1Object = AuthUtils.isCNAuthorityForSystemMetadataUpdate(nl, newSystemMetadata);\n errorTracker = \"processUpdate\";\n if (task.getNodeId().contentEquals(hzSystemMetadata.getAuthoritativeMemberNode().getValue())) {\n\n if (isV1Object) {\n \t// (no seriesId in V1 to validate)\n processV1AuthoritativeUpdate(newSystemMetadata, hzSystemMetadata);\n \n } else {\n \tvalidateSeriesId(newSystemMetadata,hzSystemMetadata);\n \tprocessV2AuthoritativeUpdate(newSystemMetadata, validator);\n \n }\n } else {\n \t// not populating anything other than replica information\n processPossibleNewReplica(newSystemMetadata, hzSystemMetadata, isV1Object);\n }\n logger.info(buildStandardLogMessage(null, \" Completed ProcessUpdate\"));\n } catch (InvalidSystemMetadata e) {\n if (validator == null) {\n throw new UnrecoverableException(\"In processUpdates, bad SystemMetadata from the HzMap\", e);\n } else {\n throw new UnrecoverableException(\"In processUpdates, could not find authoritativeMN in the NodeList\", e);\n }\n } catch (NotAuthorized e) {\n \tif (errorTracker.equals(\"validateSysMeta\")) {\n \t\tthrow SyncFailedTask.createSynchronizationFailed(task.getPid(), \"In processUpdates, while validating the checksum\", e);\n \t} else {\n \t\tthrow SyncFailedTask.createSynchronizationFailed(task.getPid(), \"NotAuthorized to use the seriesId. \", e);\n \t}\n } catch (IdentifierNotUnique | InvalidRequest | InvalidToken | NotFound e) {\n \n throw SyncFailedTask.createSynchronizationFailed(task.getPid(), \"In processUpdates, while validating the checksum\", e);\n } catch (ServiceFailure e) {\n extractRetryableException(e);\n throw new UnrecoverableException(\"In processUpdates, while validating the checksum:, e\");\n } catch (NotImplemented e) {\n throw new UnrecoverableException(\"In processUpdates, while validating the checksum:, e\");\n }\n }", "public void updateRunning(float delta) {\n\n\n EntityManager.update(delta);\n playerShip.update(delta);\n EnemySpawner.update();\n particleManager.update();\n\n }", "public void update(float delta) {\n worldStep += 1;\n performStep(worldStep);\n\n engine.update(delta);\n }", "void updateReport(AllTablesReportDelta delta);", "public void incrementAllMemoryLocations(int delta) {\n\t\tthis.continueProgram.incrementPosition(delta); \r\n\t\t\r\n\t\tthis.memoryRW.incrementPosition(delta);\r\n\t\t\r\n\t\tthis.funcVal.incrementPosition(delta);\r\n\t\t\r\n\t\tthis.memNextFuncVal.incrementPosition(delta);\r\n\r\n\t\t// Re-assign all the MemoryAddresses ------------------------\r\n\t\t\r\n\t\tfor(int x = 0; x < fullMemory.length; x++) {\r\n\t\t\tfullMemory[x].getSign().incrementPosition(delta);\r\n\t\t\tfor(ItrAddress i : fullMemory[x].getContents()) {\r\n\t\t\t\ti.incrementPosition(delta);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void doCalculation() throws BadInputFormatException {\r\n\t\tSet<LocalDate> allTradingDays = dateEntityMap.keySet();\r\n\r\n\t\tfor (LocalDate ld : allTradingDays) {\r\n\t\t\tDouble outgoingUsd = 0d;\r\n\t\t\tDouble incomingUsd = 0d;\r\n\t\t\tList<TradeEntity> entitiesOnThisDay = dateEntityMap.get(ld);\r\n\r\n\t\t\tfor (TradeEntity e : entitiesOnThisDay) {\r\n\t\t\t\tif (e.getBuySell().equalsIgnoreCase(\"B\")) {\r\n\t\t\t\t\toutgoingUsd += e.getPricePerUnit() * e.getUnits() * e.getAgreedFx();\r\n\r\n\t\t\t\t} else if (e.getBuySell().equalsIgnoreCase(\"S\")) {\r\n\t\t\t\t\tincomingUsd += e.getPricePerUnit() * e.getUnits() * e.getAgreedFx();\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new BadInputFormatException(\"The value of BuyOrSell must be either S or B\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tupdateTotalIncomingForEntity(e, incomingUsd);\r\n\t\t\t\tupdateTotalOutgoingForEntity(e, outgoingUsd);\r\n\t\t\t}\r\n\r\n\t\t\tdateOutgoingUsdMap.put(ld, outgoingUsd);\r\n\t\t\tdateIncomingUsdMap.put(ld, incomingUsd);\r\n\t\t}\r\n\t}", "public void update(float delta) {\r\n\t\t// Processing the input - setting the states of Player\r\n\t\tprocessInput();\r\n\r\n\t\t// updates traps\r\n\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\tTrap trap = world.getCurrentRoom().getCurrentTrap();\r\n\t\t\ttrap.update(delta);\r\n\t\t}\r\n\t}", "public void update(final float delta){\n AbstractGameObject.resetDrawCalls();\n \n //update cameras\n for (Camera camera : cameras) {\n if (camera.togglesChunkSwitch()) {\n //earth to right\n if (camera.getVisibleLeftBorder() <= 0)\n Controller.getMap().setCenter(3);\n else\n if (camera.getVisibleRightBorder() >= Map.getBlocksX()-1) \n Controller.getMap().setCenter(5); //earth to the left\n\n //scroll up, earth down \n if (camera.getVisibleTopBorder() <= 0)\n Controller.getMap().setCenter(1);\n else\n if (camera.getVisibleBottomBorder() >= Map.getBlocksY()-1)\n Controller.getMap().setCenter(7); //scroll down, earth up\n }\n camera.update();\n }\n \n // toggle the dev menu?\n if (keyF5isUp && Gdx.input.isKeyPressed(Keys.F5)) {\n controller.getDevTools().setVisible(!controller.getDevTools().isVisible());\n keyF5isUp = false;\n }\n keyF5isUp = !Gdx.input.isKeyPressed(Keys.F5);\n }", "private void processProducts(List<Product> products, int days) {\n for (int i = 1; i <= days; i++) {\n LOGGER.info(\"Tag: {}\", i);\n\n for (Product p : products) {\n applyRules(p, i);\n }\n\n removeExpiredProducts(products);\n removeDisposableProducts(products);\n }\n }", "@Override\n public void internalDelta() {\n models.get(1).internalDelta();\n //if we want to do the external delta on the press\n models.get(1).externalDelta(1.0, 1);\n //if we want to do the confluent delta on the press\n models.get(1).confluentDelta(1);\n }", "void addSystem(EntitySystem... systems) {\n \t\tfor (EntitySystem s : systems)\n \t\t\taddSystem(s);\n \t}", "private void updateBoard(double timeDelta) {\n // Initialize timeDeltas for all gadgets\n for (Gadget gadget : gadgets) {\n gadget.setTime(timeDelta);\n }\n // Initialize timeDeltas for all balls\n for (Ball ball : this.balls) {\n ball.setTime(timeDelta);\n }\n // Translate all balls\n for (Ball ball : this.balls) {\n double ballTime = ball.getTime();\n if (ballTime != 0) {\n this.translate(ball, ballTime);\n }\n }\n // Update all of the balls' velocities to account for acceleration.\n for (Ball ball : this.balls) {\n this.updateVelWithAccel(ball, timeDelta);\n }\n // Makes a gadget acting if it wasn't triggered this iteration, but is\n // still moving.\n for (Gadget gadget : gadgets) {\n if (gadget.isActing()) {\n gadget.Action();\n }\n }\n checkRep();\n }", "private void updateDelta() {\n\t\tbulletDelta = Delta.getDelta(\"bullet\");\n\t\tenemyDelta = Delta.getDelta(\"enemy\");\n\t}", "protected void processEntryTransition(InternalSystemEntryDelta entryDelta,\n Collection<String> toStates)\n {\n Transition lastTransition = null;\n \n String fromState = entryDelta.getCurrentEntryState();\n \n for(String toState : toStates)\n {\n if(\"<expected>\".equals(toState))\n toState = entryDelta.getExpectedEntryState();\n \n lastTransition = processEntryStateMismatch(lastTransition,\n entryDelta,\n fromState,\n toState);\n \n fromState = toState;\n }\n }", "public void update(float delta)\n\t{\n\t\tlcontext.update(delta);\n\t}", "private static void performChangeBy(Temperature t, double delta, char scale) {\n\n if (scale == CEL_SCALE_CODE) { \n System.out.printf(\"Calling changeBy(%f,true)\\n\", delta);\n t.changeBy(delta, true); \n }\n else if (scale == FAH_SCALE_CODE) { \n System.out.printf(\"Calling changeBy(%f,false)\\n\", delta);\n t.changeBy(delta, false);\n }\n else {\n System.out.printf(\"Calling changeBy(%f)\\n\", delta);\n t.changeBy(delta);\n }\n }", "@Override\n\tpublic void run() {\n\t\t\n\t\tfor (Entry<String, TreeMap<Integer, TradeObject>> entryObj : tradeStore.entrySet()) {\n\t\t\tList<TradeObject> expiredTrade = entryObj.getValue().values().parallelStream()\n\t\t\t\t\t.filter(t -> isTradeExpired(t)).map(t -> updatedExpired(t)).collect(Collectors.toList());\n\n\t\t\texpiredTrade.stream().collect(Collectors.toMap(TradeObject::getVersion, tradeObject -> tradeObject));\n\n\t\t\ttradeStore.put(entryObj.getKey(), new TreeMap<Integer, TradeObject>(expiredTrade.stream()\n\t\t\t\t\t.collect(Collectors.toMap(TradeObject::getVersion, tradeObject -> tradeObject))));\n\t\t}\n\t}", "public abstract void update(int delta);", "public void update(int delta)\n\t{\n\t\tpause = Math.max(0, pause - 1);\n\t\tfor(int i = 0; i < bullets.size(); i++)\n\t\t{\n\t\t\tboolean shoot = bullets.get(i).updateBullet(delta);\n\t\t\tif(shoot)\n\t\t\t{\n\t\t\t\t//bullets.get(i).killInstance();\n\t\t\t\tbullets.remove(i);\n\t\t\t}\n\t\t}\n\t}", "private void buildSpaceSystems(List<TableInfo> tableDefs) throws CCDDException\n {\n List<String> processedTables = new ArrayList<String>();\n\n // Get the telemetry and command header table system paths (if present)\n String tlmHdrSysPath = fieldHandler.getFieldValue(tlmHeaderTable, DefaultInputType.SYSTEM_PATH);\n String cmdHdrSysPath = fieldHandler.getFieldValue(cmdHeaderTable, DefaultInputType.SYSTEM_PATH);\n\n // Step through each table path+name\n for (TableInfo tableDef : tableDefs)\n {\n String tableName = tableDef.getTablePath();\n String tablePath = tableDef.getTablePath();\n String systemPath = null;\n boolean isTlmHdrTable = false;\n boolean isCmdHdrTable = false;\n\n // Store the table name as the one used for extracting data from the project database.\n // The two names differ when a descendant of the telemetry header is loaded\n String loadTableName = tableName;\n\n // Check if this table is a reference to the telemetry header table or one of its\n // descendant tables\n if (tablePath.matches(\"(?:[^,]+,)?\" + tlmHeaderTable + \"(?:\\\\..*|,.+|$)\"))\n {\n // Only one telemetry header table is created even though multiple instances of it\n // may be referenced. The prototype is used to define the telemetry header; any\n // custom values in the instances are ignored. Descendants of the telemetry header\n // table are treated similarly\n\n isTlmHdrTable = true;\n\n // Set the system path to that for the telemetry header table\n systemPath = tlmHdrSysPath;\n\n // Check if this is a reference to the telemetry header table\n if (TableInfo.getPrototypeName(tablePath).equals(tlmHeaderTable))\n {\n // Set the table name and path to the prototype\n tableName = tlmHeaderTable;\n loadTableName = tlmHeaderTable;\n tablePath = tlmHeaderTable;\n }\n // This is a reference to a descendant of the telemetry header table\n else\n {\n // Set the system path to point to the space system for the telemetry header\n // child table's parent table. The system path is the one used by the telemetry\n // header table. The parent is extracted from the child table's name by\n // removing the root table and the telemetry header table's variable name (if\n // this is an instance of the telemetry header table), then the child table's\n // prototype and variable name are removed from the end. The commas separating\n // the table's hierarchy are converted to '/' characters to complete the\n // conversion to a system path\n systemPath = cleanSystemPath((systemPath == null\n || systemPath.isEmpty() ? \"\"\n : systemPath + \"/\")\n + tablePath.replaceFirst(\"(?:.*,)?(\"\n + tlmHeaderTable\n + \")[^,]+,(.*)\",\n \"$1,$2\")\n .replaceFirst(\"(.*),.*\", \"$1\")\n .replaceAll(\",\", \"/\"));\n\n // Store the table's prototype and variable name as the table name. The actual\n // table to load doesn't need the variable name, so it's removed from the table\n // name\n tableName = TableInfo.getProtoVariableName(tablePath);\n loadTableName = TableInfo.getPrototypeName(tablePath);\n\n // Adjust the table path from the instance reference to a pseudo-prototype\n // reference. This is used to populate the short description, which in turn is\n // used during import to place the structure within the correct hierarchy\n tablePath = tablePath.replaceFirst(\"(?:.*,)?(\" + tlmHeaderTable + \")[^,]+(,.*)\", \"$1$2\");\n }\n }\n // Check if this table is a reference to the command header table or one of its\n // descendant tables\n else if (tablePath.matches(cmdHeaderTable + \"(?:,.+|$)\"))\n {\n // The command header is a root structure table. The prototype tables for\n // descendants of the command header table are loaded instead of the specific\n // instances; any custom values in the instances are ignored\n\n isCmdHdrTable = true;\n\n // Set the system path to that for the command header table\n systemPath = cmdHdrSysPath;\n\n // Check if this is a reference to the command header table\n if (TableInfo.getPrototypeName(tablePath).equals(cmdHeaderTable))\n {\n // Set the table name to the prototype\n tableName = cmdHeaderTable;\n loadTableName = cmdHeaderTable;\n }\n // This is a reference to a descendant of the command header table\n else\n {\n // Set the system path to point to the space system for the command header\n // child table's parent table. The system path is the one used by the command\n // header table. The parent is extracted from the child table's name by\n // removing the root table and the command header table's variable name (if\n // this is an instance of the command header table), then the child table's\n // prototype and variable name are removed from the end. The commas separating\n // the table's hierarchy are converted to '/' characters to complete the\n // conversion to a system path\n systemPath = cleanSystemPath((systemPath == null\n || systemPath.isEmpty() ? \"\"\n : systemPath + \"/\")\n + tablePath.replaceFirst(\"(\"\n + cmdHeaderTable + \")[^,]+,(.*)\",\n \"$1,$2\")\n .replaceFirst(\"(.*),.*\", \"$1\")\n .replaceAll(\",\", \"/\"));\n\n // Store the table's prototype and variable name as the table name. The actual\n // table to load doesn't need the variable name, so it's removed from the table\n // name\n tableName = TableInfo.getProtoVariableName(tablePath);\n loadTableName = TableInfo.getPrototypeName(tablePath);\n }\n }\n\n // Check if this table has already been loaded and its space system built. This\n // prevents repeated references to the telemetry/command header and its children from\n // being from being reprocessed\n if (!processedTables.contains(tableName))\n {\n // Add the table name to the list of those already processed so that future\n // references are ignored\n processedTables.add(tableName);\n\n TableInfo tableInfo = dbTable.loadTableData(loadTableName, true, false, false, parent);\n\n // Check if the table's data successfully loaded\n if (!tableInfo.isErrorFlag())\n {\n // Get the table type and from the type get the type definition. The type\n // definition can be a global parameter since if the table represents a\n // structure, then all of its children are also structures, and if the table\n // represents commands or other table type then it is processed within this\n // nest level\n TypeDefinition typeDefn = tableTypeHandler.getTypeDefinition(tableInfo.getType());\n\n // Check if the table type represents a structure or command\n if (typeDefn != null && (typeDefn.isStructure() || typeDefn.isCommand()))\n {\n // Replace all macro names with their corresponding values\n tableInfo.setData(macroHandler.replaceAllMacros(tableInfo.getData()));\n\n // Get the application ID data field value, if present\n String applicationID = CcddMessageIDHandler.getMessageID(fieldHandler.getFieldValue(loadTableName,\n DefaultInputType.MESSAGE_NAME_AND_ID));\n\n // Check if the system path isn't already defined (this is the case for\n // children of the telemetry header table)\n if (systemPath == null)\n {\n // Get the path of the system to which this table belongs from the\n // table'ss root table system path data field (if present)\n systemPath = fieldHandler.getFieldValue(tableInfo.getRootTable(),\n DefaultInputType.SYSTEM_PATH);\n }\n\n // Initialize the parent system to be the root (top-level) system\n SpaceSystemType parentSystem = project.getValue();\n\n // Store the table name and get the index of the last instance table\n // referenced in the table's path\n String shortTableName = tableName;\n int index = tableInfo.getTablePath().lastIndexOf(\",\");\n\n // Check if the table is an instance table\n if (index != -1)\n {\n // Get the name of the final table (dataType.varName) in the path. This\n // shorter name is used to identify the space system (it's position in\n // the space system hierarchy determines its parent table)\n shortTableName = tableInfo.getTablePath().substring(index + 1);\n\n // Check if the root table for this instance has a system path defined\n if (systemPath == null)\n {\n systemPath = \"\";\n }\n\n // Add the table's path to its system path. Change each comma to a '/'\n // so that this instance is placed correctly in its space system\n // hierarchy\n systemPath += \"/\" + macroHandler.getMacroExpansion(tableInfo.getTablePath().substring(0, index).replaceAll(\",\", \"/\"));\n }\n\n // Check if a system path exists (it always exists for an instance table,\n // but not necessarily for a root/prototype table)\n if (systemPath != null)\n {\n // Replace any invalid characters with an underscore so that the space\n // system name complies with the XTCE schema\n systemPath = cleanSystemPath(systemPath);\n\n // Step through each system name in the path\n for (String systemName : systemPath.split(\"\\\\s*/\\\\s*\"))\n {\n // Check if the system name isn't blank (this ignores a beginning\n // '/' if present)\n if (!systemName.isEmpty())\n {\n // Search the existing space systems for one with this system's\n // name (if none exists then use the root system's name)\n SpaceSystemType existingSystem = getSpaceSystemByName(systemName, parentSystem);\n\n // Set the parent system to the existing system if found, else\n // create a new space system using the name from the table's\n // system path data field\n parentSystem = existingSystem == null ? addSpaceSystem(parentSystem,\n systemName,\n null,\n null,\n classification2Attr,\n validationStatusAttr,\n versionAttr)\n : existingSystem;\n }\n }\n }\n\n // Add the space system, if needed. It's possible it may already exist due\n // to being referenced in the path of a child table. In this case the space\n // system isn't created again, but the descriptions and attributes are\n // updated to those for this table since these aren't supplied if the space\n // system is created due t being in a child's path\n parentSystem = addSpaceSystem(parentSystem,\n cleanSystemPath(macroHandler.getMacroExpansion(shortTableName)),\n tableInfo.getDescription(),\n macroHandler.getMacroExpansion(tablePath),\n classification3Attr,\n validationStatusAttr,\n versionAttr);\n\n // Check if this is a structure table\n if (typeDefn.isStructure())\n {\n // Expand any macros in the table path\n tableName = macroHandler.getMacroExpansion(tableName);\n\n // Check if this is the command header structure or a descendant\n // structure of the command header. In order for it to be referenced as\n // the header by the command tables it must be converted into the same\n // format as a command table, then rendered into XTCE XML as\n // CommandMetaData\n if (isCmdHdrTable)\n {\n // Add the command header or descendant arguments to the command\n // header space system. Use the header table name (only the\n // variable name portion if this is a child table) as the command\n // name, the table name itself as the command argument, and the\n // table's description as the command description (the column\n // indices in this array are used as the name, argument, and\n // description column indices)\n addSpaceSystemCommands(parentSystem,\n new String[][] {{tableName.replaceFirst(\"[^\\\\.]+\\\\.\", \"\"),\n tableName,\n tableInfo.getDescription()}},\n 0,\n -1,\n 1,\n 2,\n true,\n cmdHdrSysPath,\n null);\n }\n // This is not the command header structure\n else\n {\n // Add the structure table's variables to the space system's\n // telemetry meta data\n addSpaceSystemParameters(parentSystem, tableName,\n CcddUtilities.convertObjectToString(tableInfo.getDataArray()),\n typeDefn.getColumnIndexByInputType(DefaultInputType.VARIABLE),\n typeDefn.getColumnIndexByInputType(DefaultInputType.PRIM_AND_STRUCT),\n typeDefn.getColumnIndexByInputType(DefaultInputType.ARRAY_INDEX),\n typeDefn.getColumnIndexByInputType(DefaultInputType.BIT_LENGTH),\n typeDefn.getColumnIndexByInputTypeFormat(InputTypeFormat.ENUMERATION),\n typeDefn.getColumnIndexByInputType(DefaultInputType.DESCRIPTION),\n typeDefn.getColumnIndexByInputType(DefaultInputType.UNITS),\n typeDefn.getColumnIndexByInputTypeFormat(InputTypeFormat.MINIMUM),\n typeDefn.getColumnIndexByInputTypeFormat(InputTypeFormat.MAXIMUM),\n isTlmHdrTable,\n tlmHdrSysPath,\n dbTable.isRootStructure(loadTableName),\n applicationID);\n }\n }\n // This is a command table\n else\n {\n // Add the command(s) from this table to the parent system\n addSpaceSystemCommands(parentSystem,\n CcddUtilities.convertObjectToString(tableInfo.getDataArray()),\n typeDefn.getColumnIndexByInputType(DefaultInputType.COMMAND_NAME),\n typeDefn.getColumnIndexByInputType(DefaultInputType.COMMAND_CODE),\n typeDefn.getColumnIndexByInputType(DefaultInputType.COMMAND_ARGUMENT),\n typeDefn.getColumnIndexByInputType(DefaultInputType.DESCRIPTION),\n false,\n cmdHdrSysPath,\n applicationID);\n }\n }\n }\n // An error occurred loading the table information\n else\n {\n throw new CCDDException(\"Unable to load table '\" + tableName + \"'\");\n }\n }\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tmCpuinfo = ShellHelper.getProc(CPU_INFO_PROC);\n\t\t\t\tupdateCpuStats();\n\t\t\t\tfor (LogicalCpu c : mLogicalCpus) {\n\t\t\t\t\tc.updateFrequency();\n\t\t\t\t\tc.updateGovernor();\n\t\t\t\t\tc.updateTimeInFrequency();\n\t\t\t\t\tc.updateTotalTransitions();\n\t\t\t\t}\n\t\t\t}", "@Test\n public void testDelta() throws Exception\n {\n Cluster cluster = CacheFactory.ensureCluster();\n\n DeltaData[] aData = configDelta(cluster);\n\n String outputDir = m_temporaryFolder.newFolder().getCanonicalPath();\n \n String sReport = \"unit-test-delta.xml\";\n String sOutput = outputDir + File.separator + \"unit-test-delta.txt\";\n String sValidate = \"./unit-test-delta-base.txt\";\n String sError = \"Incorrect Delta calculations\";\n\n deleteFile(sOutput);\n\n Reporter reporter = new Reporter();\n reporter.run(sReport, outputDir + File.separator, 1, null);\n\n updateData(aData);\n\n reporter.run(sReport, outputDir + File.separator, 2, null);\n\n updateData(aData);\n\n reporter.run(sReport, outputDir + File.separator, 3, null);\n\n assertTrue(sError, compareFiles(sOutput, sValidate));\n }", "public void update(float delta) {\n\t\tfor(DefenseTower tower : world.getDefenseTowers()) {\n\t\t for(Enemy enemy : world.getEnemies()) {\n\t\t\t if(tower.isPowered() == true && tower.inRange(enemy)) {\n\t\t\t\t\ttower.fireBullets(enemy, delta);\n\t\t\t\t\t//enemy.takeHit(tower.POWER*delta);\n\t\t\t\t\tif(!enemy.isAlive()) {\n\t\t\t\t\t world.getEnemies().removeValue(enemy, false);\n\t\t\t\t\t}\n\t\t\t } \n\t\t\t}\n\t\t}\n\t\n\t\t// Towncentre actions goes here. It shoots enemies here.\n\t\tTownCentre tCentre = world.getTownCentre();\n\t for(Enemy enemy : world.getEnemies()) {\n\t\t if(tCentre.inRange(enemy)) {\n\t\t\t\ttCentre.fireBullets(enemy, delta);\n\t\t\t\t//enemy.takeHit(tCentre.POWER*delta);\n\t\t\t\tif(!enemy.isAlive()) {\n\t\t\t\t world.getEnemies().removeValue(enemy, false);\n\t\t\t\t}\n\t\t } \n\t\t}\n\t \n\t // Soldiers attack enemies here.\n\t for(Soldier s: InstanceManager.getInstance().getSoldiers()) {\n\t \t//s.attackEveryEnemy(delta, InstanceManager.getInstance().getDefenseTowers());\n\t }\n\t\n\t /*for(Enemy enemy : world.getEnemies()) {\n\t\t\tfor(Tower tower : world.getTowers()) {\n\t\t\t if(enemy.inRange(tower)) {\n\t\t\t\t tower.takeHit(enemy.STRENGTH*delta);\n\t\t\t\t //System.out.println(\"tower \" + tower.UID + \"strength is \" + tower.STRENGTH);\n\t\t\t\t if(!tower.isAlive) {\n\t\t\t\t\t \tif(world.getTowers().indexOf(tower, false) !=-1)\n\t\t\t\t\t \t\tactiveTower=-1;\n\t\t\t\t\t world.getTowers().removeValue(tower, false);\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t}\n\t\t\t// This makes townCentre take the hit.\n\t\t\tif(enemy.inRange(tCentre) && tCentre.isAlive) {\n\t\t\t\ttCentre.takeHit(enemy.STRENGTH*delta);\n\t\t\t\t //System.out.println(\"TownCenter \" + tCentre.UID + \"strength is \" + tCentre.STRENGTH);\n\t\t\t}\n\t }*/\n\t\t\n\t // Steams attackers attack towers and links here\n\t sAttackers.AttackTowersAndLinks(delta);\n\t\t\n\t\tfor(Tower tower : world.getTowers()) {\n\t\t tower.update(delta);\n\t\t}\n\t\t\n\t\tfor(Enemy enemy : world.getEnemies()) {\n\t\t enemy.update(delta);\n\t\t if(enemy.getPosition().x > 21 && enemy.getPosition().y > 14)\n\t\t \tworld.getEnemies().removeValue(enemy, false);\n\t\t}\n\t\t\n\t\tfor(Person p: InstanceManager.getInstance().getPeople()) {\n\t\t\tp.update(delta);\n\t\t}\n\t\t\n\t\tfor(Soldier s : InstanceManager.getInstance().getSoldiers()) {\n\t\t\ts.update(delta);\n\t\t}\n\t\t\n\t\t// A lot happens here.\n\t\tInstanceManager.getInstance().update(delta);\n\t\t\n\t\tfor(DefenseTower tower : world.getDefenseTowers()) {\n\t\t\ttower.update(delta);\n\t\t}\n\t\t// If game slows down you can limit updation timing here.\n\t\ttCentre.update(delta);\n\t\tgManager.update(delta);\n\t\tworld.update(delta);\n\t\tsController.update();\n\t\t\n }", "protected void update(float delta)\n {\n float stiffnessScale = 1f/16f;\n\n // FORCE CALCULATIONS\n float springForceX = -owner.STIFFNESS*stiffnessScale*(position.x - desiredPosition.x);\n float dampingForceX = owner.DAMPING * velocity.x;\n float forceX = springForceX - dampingForceX;\n\n float springForceY = -owner.STIFFNESS*stiffnessScale*(position.y - desiredPosition.y);\n float dampingForceY = owner.DAMPING * velocity.y;\n float forceY = springForceY - dampingForceY;\n\n float springForceZ = -owner.STIFFNESS*stiffnessScale*(position.z - desiredPosition.z);\n float dampingForceZ = owner.DAMPING * velocity.z;\n float forceZ = springForceZ - dampingForceZ;\n\n applyForce(forceX, forceY, forceZ);\n\n\n velocity.x += acceleration.x * delta;\n velocity.y += acceleration.y * delta;\n velocity.z += acceleration.z * delta;\n\n position.x += velocity.x * delta;\n position.y += velocity.y * delta;\n position.z += velocity.z * delta;\n //only want positive Z, as that is how the alpha color on the grid is determined\n position.z = abs(position.z);\n\n //not really accurate but it works\n velocity.scl(owner.DAMPING*delta);\n if(velocity.len2() < MathUtils.FLOAT_ROUNDING_ERROR)\n {\n velocity.x = velocity.y = velocity.z = 0;\n }\n\n color.lerp(desiredColor, delta * 0.5f);\n }", "@Override\n public void step(double delta) {\n ArrayList<Actor> actorsToReap = new ArrayList<>();\n for (Actor actor : actors) {\n actor.step(delta);\n if (actor.canReap()) {\n actorsToReap.add(actor);\n actor.reapImpl();\n }\n }\n actors.removeAll(actorsToReap);\n }", "public void doTrendDeltaMap(final StaplerRequest request, final StaplerResponse response) throws IOException, InterruptedException {\n\t\t /*AbstractBuild<?,?> lastBuild = this.getLastFinishedBuild();\n\t\t SloccountBuildAction lastAction = lastBuild.getAction(SloccountBuildAction.class);*/\n\n\t\t ChartUtil.generateClickableMap(\n\t\t request,\n\t\t response,\n\t\t Text_HTMLConverter.buildChartDelta(build),\n\t\t CHART_WIDTH,\n\t\t CHART_HEIGHT);\n\t\t }", "@Override protected void doProcess(Time systemTime) {\n }", "public void update(float delta) {\n for(int i = 0; i < rocks.size(); i++) {\n if(RockGameModel.getInstance().isDestroid(rocks.get(i).getModel())) {//se pedra destruida\n if(rocks.get(i).getLatentTime() <= 0) {//pedra desaparece; é criada uma nova pedra\n rocks.add(i+1, createNewRock(rocks.get(i).getModel()));\n rocks.remove(i);\n } else {\n rocks.get(i).decreaseLatentTime(delta);\n System.out.println(\"tempo latente: \"+rocks.get(i).getLatentTime());\n }\n }\n }\n }", "public void update(long now, double delta) {\n for (Bomb b : this.bombs) {\n b.update(now, delta);\n if (b.isExploding()) {\n for (Player p : this.players) {\n\n // if player is not alive we can skip the check\n if (!p.isAlive()) {\n break;\n }\n\n // player within bomb explosion\n if (b.doesHitOtherPlayer(p)) {\n if (p.damage(100)) {\n Game.getInstance().updatePlayerScore(b);\n }\n }\n\n // destructible block within bomb explosion\n for (DestructibleBlock d : destructibleBlocks) {\n if (b.withinExplosionCenter(d)) {\n fieldPane.getChildren().remove(d);\n cleanup.add(d);\n Random r = new Random();\n float chance = r.nextFloat();\n\n if (chance <= 0.10f) {\n PowerBomb powerup = new PowerBomb(AssetManager.getInstance().getImage(\"bomb_powerup\"));\n powerup.setX(d.getX());\n powerup.setY(d.getY());\n fieldPane.getChildren().add(powerup);\n powerups.add(powerup);\n }\n }\n }\n }\n\n // remove exploded bomb\n if (b.exploded(now)) {\n fieldPane.getChildren().remove(b);\n cleanup.add(b);\n\n for (Explosion e : b.getExplosions()) {\n fieldPane.getChildren().remove(e);\n }\n }\n }\n }\n\n // cleanup Objects\n for (Node n : cleanup) {\n if (n.getId().equals(\"DestructibleBlock\")) {\n staticElements.remove(n);\n destructibleBlocks.remove(n);\n }\n if (n.getId().equals(\"Bomb\")) {\n bombs.remove(n);\n }\n\n if (n.getId().equals(\"Powerbomb\")) {\n powerups.remove(n);\n }\n }\n\n // update player state\n if (!Game.getInstance().hasEnded()) {\n for (Player p : this.players) {\n p.update(now, delta);\n }\n }\n }", "public void processNode(Node node, float delta);", "public void updateTimers(float deltaTime) {\n\t\t// iterate over the list of timers\n\t\tfor (Timer timer : coRoutinesMap.keySet()) {\n\t\t\ttimer.updateTimer(deltaTime);\n\n\t\t\t// if a timer ticks\n\t\t\tif (timer.checkTimer()) {\n\t\t\t\t// execute coRoutine if state of the AI coincides\n\t\t\t\tif (coRoutinesMap.get(timer)\n\t\t\t\t\t\t.getStatesWhereCoRoutineIsExecutable().contains(mState)) {\n\t\t\t\t\tcoRoutinesMap.get(timer).execute();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void update (Input input, float delta) throws Exception{\n\t\tboolean change = false;\n\t\tfor(Sprite thisSprite : this.allSprites) {\n\t\t\tthisSprite.update(input, delta, this);\n\t\t}\n\t\tif(this.removalList.size() > 0) {\n\t\t\tthis.allSprites.removeAll(this.removalList);\n\t\t\tthis.removalList.clear();\n\t\t\tchange = true;\n\t\t}\n\t\tif(this.addList.size() > 0) {\n\t\t\tthis.allSprites.addAll(this.addList);\n\t\t\tthis.addList.clear();\n\t\t\t\n\t\t}\n\t\t//may need to refactor map where changes to the sprites have been made\n\t\tif(change) {\n\t\t\tinitialiseMap(this.allSprites);\n\t\t\tloadMap(this.allSprites);\n\t\t\tchange = false;\n\t\t}\n\t}", "private void iterateUpdate()\n\t{\n\t\tSystem.out.println(\"ITERATE\");\n\t\t\t\n\t\tfor (Organism org : simState.getOrganisms()) \n\t\t{\n\t\t\torganismViewData.resetOrganismView(org);\n\t\t}\n\t\t\n\t\tIterationResult result = simEngine.iterate();\n\t\t\n\t\t// Process born and dead organisms\n\t\taddBornModels(result.getBorn());\n\t\tremoveDeadModels(result.getLastDead());\n\t\t\n\t\trotateAnimals();\t\t\n\t}", "private void incrementalBuild(IResourceDelta delta, IProgressMonitor monitor) throws CoreException {\n\t\tdelta.accept(new AssemblyDeltaVisitor(monitor));\n\t}", "public void apply(int time, float delta)\n {\n //Figure out what step we are on based on time\n AnimationStep currentStep = first.nextStep;\n int count = 0;\n while (currentStep != first)\n {\n //Count duration of each step\n count += currentStep.duraction;\n\n //If time is less than count, then step is current step to run\n if (time < count)\n {\n //Get start of step\n int start = count - currentStep.duraction;\n\n //Get amount of time already used\n int progress = time - start;\n\n //Trigger\n currentStep.apply(renderer, progress, delta);\n\n //Exit\n break;\n }\n currentStep = currentStep.nextStep;\n }\n\n //Track previous rotation\n prev_rotateAngleX = renderer.rotateAngleX;\n prev_rotateAngleY = renderer.rotateAngleY;\n prev_rotateAngleZ = renderer.rotateAngleZ;\n }", "public void setDelta(float delta) {\n\t\tthis.delta = delta;\n\t}", "public void update(Array<Body> planets, float delta) {\n\n this.state.updateTime(this, delta);\n\n updateJumpTime(delta);\n\n this.applyPullForce(planets);\n\n this.limitVelocity();\n\n this.limitAngularVelocity();\n\n this.setRotation(planets);\n\n this.verifyInPlanet();\n\n this.updateMovementState();\n }", "private void executePrecomGenericRulesOnDelta(ActionContext context,\n\t\t\tActionOutput actionOutput) throws Exception {\n\t\tActionSequence actions = new ActionSequence();\n\t\tActionsHelper.readFakeTuple(actions);\n\t\tReadAllInMemoryTriples.addToChain(Consts.CURRENT_DELTA_KEY, actions);\n\t\tActionsHelper.mapReduce(Integer.MIN_VALUE, outputStep, false, actions);\n\t\tactionOutput.branch(actions);\n\t}", "public void addDelta(DeltaRequest delta) {\n\t\tdeltas.add(delta);\n\t}", "private void evaluate(Long time, String program, TableName name, TupleSet insertions, TupleSet deletions) throws UpdateException {\n\t\tif (!program.equals(runtime.name())) {\n\t\t\tthrow new UpdateException(\"ERROR: routine only used for evaluating the \" +\n\t\t\t\t\t runtime.name() + \" program\");\n\t\t}\n\n\t\tTupleSet insert = new BasicTupleSet();\n\t\tTupleSet delete = new BasicTupleSet();\n\t\tinsert.add(new Tuple(time, program, null, name, insertions, deletions));\n\n\t\t/* Evaluate until nothing remains. This essentially implements semi-naive\n\t\t * evaluation for a single stratum program. */\n\t\twhile (insert.size() > 0 || delete.size() > 0) {\n\t\t\tTupleSet delta = null;\n\t\t\twhile (insert.size() > 0) {\n\t\t\t\tdelta = flusher.insert(insert);\n\t\t\t\tdelta = evaluator.insert(delta, null);\n\t\t\t\tinsert.clear(); // Clear out evaluated insertions\n\t\t\t\t/* Split delta into sets of insertions and deletions */\n\t\t\t\tsplit(delta, insert, delete);\n\t\t\t}\n\n\t\t\twhile (delete.size() > 0) {\n\t\t\t\tdelta = flusher.insert(delete);\n\t\t\t\tdelta = evaluator.insert(delta, null);\n\t\t\t\tdelete.clear(); // Clear out evaluated deletions\n\t\t\t\t/* Split delta into sets of insertions and deletions.\n\t\t\t\t * NOTE: A rule that explicitly listens for a deletion event\n\t\t\t\t * will deduce insertion tuples if the rule is NOT a deletion rule. */\n\t\t\t\tsplit(delta, insert, delete);\n\t\t\t}\n\t\t}\n\t}", "public static void InitializeSystems()\n\t{\n\t\tif (_systems.size() < 1)\n\t\t{\n\t\t\tSystem.out.println(\"ERROR - no systems! (InitializeSystems)\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < _systems.size(); i++)\n\t\t\t_systems.get(i).Start();\n\t}", "public void udpateManifolds(){\n\t\tIterator<Manifold> iter = sManifolds.iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tManifold man = iter.next();\n\t\t\tif(!man.update())\n\t\t\t\titer.remove();\t // Remove finished collision\n\t\t\telse\n\t\t\t\tcalCollision(man); // Calculate the collision\t\n\t\t}\n\t}", "void ComputeAllDeltas(double[] pi,\n double[][]\n local,\n double[] theta,\n double epsilon,\n double[][] delta,\n int[][] best) {\n InitDelta(pi, local[0], ((delta)[0]));\n for (int i = 1;i < T_;i++) {\n ComputeSingleDelta(local[i], theta, epsilon, (delta)[i-1],\n ((delta)[i]), ((best)[i]));\n }\n}", "private void calculations() {\n\t\tSystem.out.println(\"Starting calculations\\n\");\n\t\tcalcMedian(myProt.getChain(requestedChain));\n\t\tcalcZvalue(myProt.getChain(requestedChain));\n\t\tcalcSVMweightedZvalue(myProt.getChain(requestedChain));\n\t}", "public void monsterComportement(float delta){\n\t\theroApproachLeft();\n\t\theroApproachRight();\n\t\theroVuRight();\n\t\theroVuLeft();\n\t\theroHoreZone();\n\t\theroHoreZoneMFix();\n\t\t\n\t\toldMonsterX = monster.getBX();\n\t\t\n\t\t\n\t\tif(heroHoreZone){\n\t\t\tif (monster.getBX()>=1200/conf.PPM){\n\t\t\t\tmonster.moveLeft(delta);\n\t }else if (monster.getBX()<=1000/conf.PPM ){\n\t\t\t\tmonster.moveRight(delta);\n\t }\n\t\t\tif(heroHoreZoneMFix){\n\t\t\t\tmonster.moveRight(delta);\n\t\t\t}\n\t\t}else{\n\t\t\t\n\t\t\tif(heroVuLeft || heroVuRight){\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(heroVuLeft){\n\t\t\t\t\tif (monster.getBX()>=1000/conf.PPM){\n\t\t\t\t\t\tmonster.moveLeft(delta);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmonster.stopX();\n\t\t\t\t\t}\n\t\t\t\t\tif((System.currentTimeMillis() - lastFire>conf.fireDephasage/delta)){\n\t\t\t\t\t\tmonster.fire();\n\t\t\t\t\t\tlastFire = System.currentTimeMillis();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(heroVuRight){\n\t\t\t\t\tif (monster.getBX()<=1675/conf.PPM){\n\t\t\t\t\t\tmonster.moveRight(delta);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmonster.stopX();\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\tif((System.currentTimeMillis() - lastFire>conf.fireDephasage/delta)){\n\t\t\t\t\t\tmonster.fire();\n\t\t\t\t\t\tlastFire = System.currentTimeMillis();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tif(hero.getBX()<monster.getBX() && i==1){\n\t\t\t\t\tmonster.moveLeft(delta);\n\t\t\t\t\ti=0;\n\t\t\t\t}\n\t\t\t\tif(hero.getBX()>monster.getBX() && i==0){\n\t\t\t\t\tmonster.moveRight(delta);\n\t\t\t\t\ti=1;\n\t\t\t\t}\n\t\t\t\tmonster.stopX();\n\t\t\t\tif((System.currentTimeMillis() - lastFire>conf.fireDephasage/delta)){\n\t\t\t\t\tmonster.fire();\n\t\t\t\t\tlastFire = System.currentTimeMillis();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tmonster.stopShooting();\n\t\t\n\t}", "public void step() {\n\t\tfor (SimObject o : simObjects) {\n\t\t\to.step(timeScale);\n\t\t}\n\n\t\t// increment time elasped\n\t\tdaysElapsed += ((double) (timeScale)) / 86400.0;\n\n\t\t// if more than 30.42 days have elapsed, increment months\n\t\tif (daysElapsed >= 30.42) {\n\t\t\tmonthsElapsed++;\n\t\t\tdaysElapsed -= 30.42;\n\t\t}\n\n\t\t// if more than 12 months have elapsed, increment years\n\t\tif (monthsElapsed >= 12) {\n\t\t\tyearsElapsed++;\n\t\t\tmonthsElapsed -= 12;\n\t\t}\n\t}", "@Override\n protected void doChanged(java.sql.Connection connection, java.util.Collection<org.tair.db.locusdetail.IPolymorphismSite> dtos)\n throws java.sql.SQLException, com.poesys.db.BatchException, com.poesys.db.ConstraintViolationException,\n com.poesys.db.dto.DtoStatusException {\n com.poesys.db.dao.IDaoManager manager = \n com.poesys.db.dao.DaoManagerFactory.getManager(subsystem);\n com.poesys.db.dao.IDaoFactory<org.tair.db.locusdetail.IPolymorphismSite> factory = \n manager.getFactory(org.tair.db.locusdetail.PolymorphismSite.class.getName(), subsystem, 2147483647);\n com.poesys.db.dao.update.IUpdateBatch<org.tair.db.locusdetail.IPolymorphismSite> dao =\n factory.getUpdateBatch(new org.tair.db.locusdetail.sql.UpdatePolymorphismSite());\n dao.update(connection, dtos, BATCH_SIZE);\n }", "public abstract void update(float delta);", "public abstract void update(float delta);", "public final void step( long stepMicros, CollisionResolversManager collisionResolversManager )\n {\n final long step = getStepSize();\n final long maxStep = getMaxStepSize();\n \n if ( stepMicros > maxStep )\n stepMicros = step;\n \n beforeStep();\n \n stepAccumulator += stepMicros;\n \n while ( stepAccumulator >= step )\n {\n if ( collisionResolversManager != null )\n {\n collisionResolversManager.update();\n }\n \n stepImpl( step );\n \n stepAccumulator -= step;\n }\n \n for ( int i = 0; i < bodies.size(); i++ )\n {\n bodies.get( i ).refresh();\n }\n \n for ( int i = 0; i < joints.size(); i++ )\n {\n joints.get( i ).refresh();\n }\n \n afterStep();\n }", "@Override\n public void delta() {\n \n }", "private static Vector3f[] calculatePositionDifferences(Drone drone, Vector3f[] newVelocities, float dt) {\r\n\r\n\t\t\r\n\t\t// calculate the average linear velocity\r\n\t\tVector3f avgLinearVelocityW = average(drone.getLinearVelocity(), newVelocities[0]);\r\n\r\n\t\t// calculate the translation\r\n\t\tVector3f deltaPositionW = (Vector3f) avgLinearVelocityW.scale(dt);\r\n\r\n\t\t// calculate the average angular velocity\r\n\t\tVector3f avgAngularVelocityW = average(drone.getAngularVelocity(), newVelocities[1]);\r\n\r\n\t\t// calculate the rotation\r\n\t\tVector3f deltarotationW = ((Vector3f) avgAngularVelocityW.scale(dt));\r\n\r\n\t\treturn new Vector3f[] { deltaPositionW, deltarotationW };\r\n\t}", "public List<Product> process(List<Product> products, int days) {\n processProducts(products, days);\n return products;\n }", "private void diffusionPhase() {\n if (prevMaxTimestamp == -1 || currMaxTimestamp == -1 || prevMaxTimestamp == currMaxTimestamp) {\n return;\n }\n final Set<NodeAddress> fathers = ((GroupedOverlayModule<?>) mainOverlay).getNodeGroup(GroupedOverlayModule.fathersGroupName);\n final PrimeNodeReport alreadyRequested = new PrimeNodeReport();\n for (final NodeAddress father : fathers) {\n if (!inboxHistory.keySet().contains(father)) {\n continue;\n }\n if (client.player.getVs() == null\n || inboxHistory.get(father).getLatestTimestamp() > client.player.getVs()\n .getAvailableDescriptions(client.player.getVs().windowOffset).getLatestTimestamp()) {\n final PrimeNodeReport availableDescriptionsAtFather = inboxHistory.get(father);\n PrimeNodeReport requestToSend = (client.player.getVs() == null) ? availableDescriptionsAtFather : (client.player.getVs()\n .getAvailableDescriptions(prevMaxTimestamp)).getDelta(availableDescriptionsAtFather);\n requestToSend = alreadyRequested.getDelta(requestToSend);\n if (requestToSend.size() == 0) {\n continue;\n }\n requestToSend = requestToSend.getRandomSubset(prevMaxTimestamp, currMaxTimestamp, r);\n if (requestToSend.size() != 0) {\n if (client.player.getVs() != null) {\n requestToSend.playTime = client.player.getVs().windowOffset;\n }\n alreadyRequested.update(requestToSend);\n network.send(new PrimeRequestMessage<PrimeNodeReport>(getMessageTag(), network.getAddress(), father, new PrimeNodeReport(\n requestToSend)));\n }\n }\n }\n }", "@Override\n public void update(float delta) {\n for (Map.Entry<Integer, IComponent> kv : _affectedComponents.get(0).entrySet()) {\n int id = kv.getKey();\n SpriteComponent sprite = (SpriteComponent) kv.getValue();\n PositionComponent position = (PositionComponent) _affectedComponents.get(1).get(id);\n sprite.setPosition(position.getX(), position.getY());\n }\n }", "public abstract float[] computeRepulsiveForce(float deltaX, float deltaY, float distance, float squareDistance, int v1Deg, int v2Deg);", "private void _addDeltas(Matcher matcher,\n Collection<Delta> collection,\n Delta delta)\n {\n int count;\n\n if (matcher.group(\"count\") == null) count = 1;\n\n else count = Integer.parseInt(matcher.group(\"count\"));\n\n for (int i = 0; i < count; ++i) collection.add(delta);\n }", "public void doTrendDelta(final StaplerRequest request, final StaplerResponse response) throws IOException, InterruptedException {\n\t\t /* AbstractBuild<?,?> lastBuild = this.getLastFinishedBuild();\n\t\t SloccountBuildAction lastAction = lastBuild.getAction(SloccountBuildAction.class);*/\n\n\t\t ChartUtil.generateGraph(\n\t\t request,\n\t\t response,\n\t\t Text_HTMLConverter.buildChartDelta(build),\n\t\t CHART_WIDTH,\n\t\t CHART_HEIGHT);\n\t\t }", "public void processUpdates() {\n List<Update> updates = getUpdates(lastId, updateLimit, timeout);\n\n lastId = updates.stream()\n .map(Update::getId)\n .max(Long::compareTo)\n .orElse(lastId-1) + 1;\n\n updates.parallelStream().forEach(this::processUpdate);\n }", "public abstract void updateSystem(Set<Integer> selectedDatasetIds);", "@Override\n public void update ( long t )\n {\n try\n { \n // Iterate through all entities, filtering by those that contain the specific set of components, that this system is intended to work with.\n \n for ( ECSEntity entity : engine.getEntities ().values () )\n { \n if ( entity.hasComponents ( transform, physics ) )\n { \n // Update physics simulation.\n \n updatePhysics ( entity, t );\n \n // Console logger.\n \n logger.log ();\n }\n } \n \n // Swap the double buffers.\n \n engine.swapBuffer ();\n }\n catch ( Exception e )\n { \n TextFormat.printFormattedException ( e, true );\n }\n }", "public void process() {\r\n\t\tdisplayMenu();\r\n\t\tint command = getCommand();\r\n\t\twhile (command != EXIT) {\r\n\t\t\tswitch (command) {\r\n\t\t\tcase ADD_CUSTOMER:\r\n\t\t\t\taddCustomer();\r\n\t\t\t\tbreak;\r\n\t\t\tcase ADD_MODEL:\r\n\t\t\t\taddWasher();\r\n\t\t\t\tbreak;\r\n\t\t\tcase ADD_TO_INVENTORY:\r\n\t\t\t\taddToInventory();\r\n\t\t\t\tbreak;\r\n\t\t\tcase PURCHASE:\r\n\t\t\t\tpurchase();\r\n\t\t\t\tbreak;\r\n\t\t\tcase LIST_CUSTOMERS:\r\n\t\t\t\tlistCustomers();\r\n\t\t\t\tbreak;\r\n\t\t\tcase LIST_WASHERS:\r\n\t\t\t\tlistWashers();\r\n\t\t\t\tbreak;\r\n\t\t\tcase DISPLAY_TOTAL:\r\n\t\t\t\tdisplayTotal();\r\n\t\t\t\tbreak;\r\n\t\t\tcase SAVE:\r\n\t\t\t\tsave();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tdisplayMenu();\r\n\t\t\tcommand = getCommand();\r\n\t\t}\r\n\t\tSystem.out.println(\"Goodbye.\");\r\n\t}", "@SuppressWarnings(\"unchecked\")\n \tvoid addSystem(EntitySystem system) {\n \t\tif (systems.contains(system))\n \t\t\tthrow new RuntimeException(\"System already added\");\n \t\tsystem.id = getNewSystemId();\n \t\tsystem.componentBits = world.getComponentBits(system.components);\n \n \t\tClass<? extends EntitySystem> class1 = system.getClass();\n \t\tdo {\n \t\t\tfor (Field field : class1.getDeclaredFields()) {\n \t\t\t\t// Check for ComponentManager declarations.\n \t\t\t\tif (field.getType() == ComponentMapper.class) {\n \t\t\t\t\tfield.setAccessible(true);\n \t\t\t\t\t// Read the type in the <> of componentmanager\n \t\t\t\t\tType type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];\n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Set the component manager declaration with the right\n \t\t\t\t\t\t// component manager.\n \t\t\t\t\t\tfield.set(system, world.getComponentMapper((Class<? extends Component>) type));\n \t\t\t\t\t} catch (IllegalArgumentException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t} catch (IllegalAccessException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t// check for EventListener declarations.\n \t\t\t\tif (field.getType() == EventListener.class) {\n \t\t\t\t\tfield.setAccessible(true);\n \t\t\t\t\t// Read the type in the <> of eventListener.\n \t\t\t\t\tType type = ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];\n \t\t\t\t\t@SuppressWarnings(\"rawtypes\")\n \t\t\t\t\tEventListener<? extends Event> eventListener = new EventListener();\n \t\t\t\t\tworld.registerEventListener(eventListener, (Class<? extends Event>) type);\n \n \t\t\t\t\ttry {\n \t\t\t\t\t\t// Set the event listener declaration with the right\n \t\t\t\t\t\t// field listener.\n \t\t\t\t\t\tfield.set(system, eventListener);\n \t\t\t\t\t} catch (IllegalArgumentException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t} catch (IllegalAccessException e) {\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\tclass1 = (Class<? extends EntitySystem>) class1.getSuperclass();\n \t\t} while (class1 != EntitySystem.class);\n \t\tsystems.add(system);\n \t\tsystemMap.put(system.id, system);\n\t\tsystem.world = world;\n \t}", "@Override\n public void process(SystemImplementation system,\n File runtimeDir,\n File outputDir,\n File[] includeDirs,\n IProgressMonitor monitor)\n throws GenerationException\n {\n super.process(system, runtimeDir, outputDir, includeDirs, monitor);\n generateMakefile((NamedElement) system, outputDir) ;\n super.executeMake(outputDir, runtimeDir, monitor);\n }", "static void updateDropTarget() { Update all drop targets rather than just this target\n //\n // In order for a drop target to recognise a custom format,\n // the format must be registered and the transfer type added\n // to the list of transfers that the target accepts. This\n // must happen before the drag and drop operations starts\n // or the drop target will not accept the format. Therefore,\n // set all transfers for all targets before any drag and drop\n // operation starts\n //\n for (DropTarget target : targets) {\n target.setTransfer(getAllTransfers());\n }\n }", "public List<Calculation> updateDemandForAdhocTax(RequestInfo requestInfo, List<Calculation> calculations, String businessService) {\n\t\t\tList<Demand> demands = new LinkedList<>();\n\t\t\tfor (Calculation calculation : calculations) {\n\t\t\t\tString consumerCode = calculation.getConnectionNo();\n\t\t\t\tList<Demand> searchResult = searchDemandBasedOnConsumerCode(calculation.getTenantId(), consumerCode,\n\t\t\t\t\t\trequestInfo, businessService);\n\t\t\t\tif (CollectionUtils.isEmpty(searchResult))\n\t\t\t\t\tthrow new CustomException(\"EG_SW_INVALID_DEMAND_UPDATE\",\n\t\t\t\t\t\t\t\"No demand exists for Number: \" + consumerCode);\n\n\t\t\t\tCollections.sort(searchResult, new Comparator<Demand>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(Demand d1, Demand d2) {\n\t\t\t\t\t\treturn d1.getTaxPeriodFrom().compareTo(d2.getTaxPeriodFrom());\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tDemand demand = searchResult.get(0);\n\t\t\t\tdemand.setDemandDetails(getUpdatedAdhocTax(calculation, demand.getDemandDetails()));\n\t\t\t\tdemands.add(demand);\n\t\t\t}\n\n\t\t\tlog.info(\"Updated Demand Details \" + demands.toString());\n\t\t\tdemandRepository.updateDemand(requestInfo, demands);\n\t\t\treturn calculations;\n\t\t}", "void calculateChanges(Integer nextRequest) {\n validateRequest(nextRequest);\n orderProcessed.add(nextRequest);\n totalHeadMovements += Math.abs(currentHeadCylinder - nextRequest);\n currentHeadCylinder = nextRequest;\n requestQueue.remove(nextRequest);\n requestsServiced++;\n }", "public static double[] solve(ODESystem ode, double time, double deltaT) {\n\t\tint systemSize = ode.getSystemSize();\n\t\tdouble[] q1 = new double[systemSize];\n\t\tdouble[] q2 = new double[systemSize];\n\t\tdouble[] q3 = new double[systemSize];\n\t\tdouble[] q4 = new double[systemSize];\n\t\tdouble[] intermediateVals = new double[systemSize];\n\t\tint i;\n\t\tdouble[] values = ode.getCurrentValues();\n\t\tq1 = ode.getFunction(time, values);\n\t\tfor (i = 0; i < systemSize; i++)\n\t\t\tintermediateVals[i] = values[i] + deltaT * q1[i] / 2.0;\n\t\tq2 = ode.getFunction(time + deltaT/2.0, intermediateVals);\n\t\tfor (i = 0; i < systemSize; i++)\n\t\t\tintermediateVals[i] = values[i] + deltaT * q2[i] / 2.0;\n\t\tq3 = ode.getFunction(time + deltaT/2.0, intermediateVals);\n\t\tfor (i = 0; i < systemSize; i++)\n\t\t\tintermediateVals[i] = values[i] + deltaT * q3[i];\n\t\tq4 = ode.getFunction(time + deltaT, intermediateVals);\n\t\tdouble[] newVel = new double[systemSize];\n\t\tfor (i = 0; i < systemSize; i++)\n\t\t\tnewVel[i] = values[i] + deltaT * (q1[i] + 2.0 * q2[i] +\n\t\t\t\t\t2.0 * q3[i] + q4[i]) / 6.0;\n//\t\tSystem.out.println(\"vx original: \" + values[0]);\n//\t\tSystem.out.println(\"vx after: \" + newVel[0]);\n\t\treturn newVel;\n\t}", "private Map<SODPosition, Integer> updateSODPositions() {\n Map<SODPosition, Integer> sodPositionsWithDelta = new HashMap<>();\n // This will hold all instruments that have associated transactions\n // this is neede at the end to carry forward SOD transaction on which\n // no transactions have come.\n Set<String> instrumentsProcessed = new HashSet<>();\n for (Transaction transaction : transactions) {\n List<SODPosition> positions = sodPositions.get(transaction.getInstrument());\n instrumentsProcessed.add(transaction.getInstrument());\n if (TransactionType.B.equals(transaction.getTranscationType())) {\n for (SODPosition position : positions) {\n if (AccountType.E.equals(position.getAccountType())) {\n LOGGER.debug(\"Processing Transaction Buy for Account Type E with account ID = \" + position.getAccount() + \" and instrument = \" + position.getInstrument());\n position.setQuantity(position.getQuantity() + transaction.getQuantity());\n sodPositionsWithDelta = populateDeltaMap(sodPositionsWithDelta, position, transaction.getQuantity());\n } else {\n LOGGER.debug(\"Processing Transaction Buy for Account Type I with account ID = \" + position.getAccount() + \" and instrument = \" + position.getInstrument());\n position.setQuantity(position.getQuantity() - transaction.getQuantity());\n sodPositionsWithDelta = populateDeltaMap(sodPositionsWithDelta, position, (transaction.getQuantity() * -1));\n }\n }\n } else {\n for (SODPosition position : positions) {\n if (AccountType.E.equals(position.getAccountType())) {\n LOGGER.debug(\"Processing Transaction Sell for Account Type E with account ID = \" + position.getAccount() + \" and instrument = \" + position.getInstrument());\n position.setQuantity(position.getQuantity() - transaction.getQuantity());\n sodPositionsWithDelta = populateDeltaMap(sodPositionsWithDelta, position, (transaction.getQuantity() * -1));\n } else {\n LOGGER.debug(\"Processing Transaction Sell for Account Type I with account ID = \" + position.getAccount() + \" and instrument = \" + position.getInstrument());\n position.setQuantity(position.getQuantity() + transaction.getQuantity());\n sodPositionsWithDelta = populateDeltaMap(sodPositionsWithDelta, position, transaction.getQuantity());\n }\n }\n }\n }\n\n /*\n Populate sodPositions with the positions on which there were no transactions\n */\n for (Map.Entry<String, ArrayList<SODPosition>> entry : sodPositions.entrySet()) {\n if (!instrumentsProcessed.contains(entry.getKey())) {\n for (SODPosition value : entry.getValue()) {\n sodPositionsWithDelta.put(value, 0);\n }\n }\n }\n return sodPositionsWithDelta;\n }", "public void update(Input input, int delta) {\n\t timeElapsedMs += delta;\r\n\r\n\t\t// Update all of the sprites in the game\r\n int currLifeCount = player.getLifeCount();\r\n\r\n player.update(input, delta, player);\r\n\r\n extraLife.update(input, delta, player);\r\n\r\n for (Log i : logList) {\r\n i.update(input, delta, player);\r\n // Checks if a log is already carrying a player to prevent other logs from updating the player\r\n if (i.getIsCarrying()) {\r\n player.setIsRiding(true);\r\n }\r\n }\r\n for (LongLog i : longLogList) {\r\n i.update(input, delta, player);\r\n // Checks if a long log is already carrying a player\r\n if (i.getIsCarrying()) {\r\n player.setIsRiding(true);\r\n }\r\n }\r\n for (Turtle i : turtleList) {\r\n // Every 7 seconds, turtle no longer allows the player to ride on it\r\n if (timeElapsedMs >= turtleStartSinkTime && timeElapsedMs <= turtleStartRiseTime) {\r\n i.setIsFloating(false);\r\n }\r\n else if (timeElapsedMs > turtleStartRiseTime) {\r\n turtleStartSinkTime += NEXTSINKTIME;\r\n turtleStartRiseTime += NEXTSINKTIME;\r\n }\r\n else {\r\n i.setIsFloating(true);\r\n }\r\n i.update(input, delta, player);\r\n // Checks if a turtle is already carrying a player\r\n if (i.getIsCarrying()) {\r\n player.setIsRiding(true);\r\n }\r\n }\r\n\r\n // If player is riding a log/turtle, player does not lose a life\r\n for (WaterTile i : waterTileList) {\r\n i.update(input, delta, player);\r\n }\r\n\r\n for (Bus i : busList) {\r\n i.update(input, delta, player);\r\n }\r\n\r\n for (RaceCar i : raceCarList) {\r\n i.update(input, delta, player);\r\n }\r\n for (Bike i : bikeList) {\r\n i.update(input, delta, player);\r\n }\r\n\r\n\t\tfor (Bulldozer i : bulldozerList) {\r\n\t\t i.update(input, delta, player);\r\n if (player.getPlayerIsPushed()) {\r\n // Reset push status and break the loop\r\n player.setPlayerIsPushed(false);\r\n break;\r\n }\r\n }\r\n\r\n for (Tree i : treeList) {\r\n i.update(input, delta, player);\r\n /* If player is already pushed by a tree, skip the rest so that player won't be pushed twice (2 tiles) when\r\n simultaneously intersecting two trees */\r\n if (player.getPlayerIsPushed()) {\r\n // Break the loop\r\n break;\r\n }\r\n }\r\n\r\n for (Goal i : goalList) {\r\n i.update(input, delta, player);\r\n /* Similarly, since the goal is adjacent to the tree (both solid) skip the rest so that player won't be\r\n pushed twice (2 tiles) when simultaneously intersecting with a goal and a tree */\r\n if (player.getPlayerIsPushed()) {\r\n // Reset push status and break the loop\r\n player.setPlayerIsPushed(false);\r\n break;\r\n }\r\n }\r\n\r\n for (Life i: lifeList) {\r\n i.update(input, delta, player);\r\n }\r\n\r\n float xIncrement = 32;\r\n float lastLifeX = (lifeList.get(lifeList.size() - 1)).getXCoor() + xIncrement;\r\n float lastLifeY = (lifeList.get(lifeList.size() - 1)).getYCoor();\r\n\r\n // Life counter changes (life removed/added) based on player's lives\r\n if (player.getLifeCount() < currLifeCount) {\r\n // Game over if player has zero lives (game exits automatically if player reaches zero lives)\r\n lifeList.remove(lifeList.size()-1);\r\n }\r\n else if (player.getLifeCount() > currLifeCount){\r\n try {\r\n lifeList.add((new Life(\"assets/lives.png\", lastLifeX, lastLifeY)));\r\n }\r\n catch (SlickException ex){\r\n }\r\n }\r\n\r\n // Resets player riding status\r\n player.setIsRiding(false);\r\n\r\n boolean levelComplete = true;\r\n\r\n // Checks if all goal has been reached\r\n for (Goal i: goalList) {\r\n if (!i.getGoalReached()) {\r\n levelComplete = false;\r\n }\r\n }\r\n\r\n // Checks if level one is also completed\r\n if (levelComplete && !App.levelZero) {\r\n //App.levelOne = false;\r\n System.exit(0);\r\n }\r\n\r\n // If level Zero completed, move to level One\r\n if (levelComplete) {\r\n App.levelZero = false;\r\n }\r\n\t}", "private void addDeltas(StringBuilder xml) {\n\t\t\n\t\tfor(DeltaRequest delta : deltas) {\n\t\t\tstartElementWithAttributes(xml, \"Delta\");\n\t\t\taddStringAttribute(xml, \"id\", delta.getId());\n\t\t\taddStringAttribute(xml, \"value\", delta.getValue());\n\t\t\taddStringAttribute(xml, \"encoding\", delta.getEncoding());\n\t\t\t\n\t\t\tif(delta.getText() != null) {\n\t\t\t\tcloseParentElementWithAttributes(xml);\n\t\t\t\taddText(xml, delta.getText());\n\t\t\t\tcloseParentElement(xml, \"Delta\");\n\t\t\t} else {\n\t\t\t\tcloseSimpleElementWithAttributes(xml);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "private void handleStepChange()\n {\n boolean processorsChanged = false;\n myProcessorsLock.writeLock().lock();\n try\n {\n final Iterator<Entry<ProcessorDistributionKey, GeometryProcessor<? extends Geometry>>> procIter = myGeometryProcessorsMap\n .entrySet().iterator();\n final ActiveTimeSpans activeTimeSpans = myActiveTimeSpans;\n while (procIter.hasNext())\n {\n final Entry<ProcessorDistributionKey, GeometryProcessor<? extends Geometry>> entry = procIter.next();\n if (!inProcessRange(entry.getKey(), activeTimeSpans))\n {\n processorsChanged = true;\n procIter.remove();\n myInactiveGeometries.put(entry.getKey(), New.set(entry.getValue().getGeometries()));\n entry.getValue().close();\n }\n }\n\n final Iterator<Entry<ProcessorDistributionKey, Set<Geometry>>> inactiveIter = myInactiveGeometries.entrySet()\n .iterator();\n while (inactiveIter.hasNext())\n {\n final Entry<ProcessorDistributionKey, Set<Geometry>> entry = inactiveIter.next();\n if (inProcessRange(entry.getKey(), activeTimeSpans) && !entry.getValue().isEmpty())\n {\n processorsChanged = true;\n inactiveIter.remove();\n setProcessorConstraints(entry.getKey());\n final GeometryProcessor<? extends Geometry> processor = myProcessorBuilder\n .createProcessorForClass(entry.getKey().getGeometryType());\n processor.receiveObjects(this, entry.getValue(), Collections.<Geometry>emptyList());\n myGeometryProcessorsMap.put(entry.getKey(), processor);\n }\n }\n }\n finally\n {\n myProcessorsLock.writeLock().unlock();\n }\n\n if (processorsChanged)\n {\n populateRenderableProcessors();\n }\n }", "public void process() {\n int command;\n menu();\n while ((command = getCommand()) != EXIT) {\n switch (command) {\n case ADD_CLIENT: addClient();\n break;\n case ADD_PRODUCT: addProduct();\n break;\n case ADD_SUPPLIER: addSupplier();\n break;\n case ASSIGN_PRODUCT: linkProduct();\n break;\n case UNASSIGN_PRODUCT: unlinkProduct();\n break;\n case ACCEPT_SHIPMENT: acceptShipment();\n break;\n case ACCEPT_ORDER: acceptOrder();\n break;\n case PROCESS_ORDER: processOrder();\n break;\n case CREATE_INVOICE: createInvoice();\n break;\n case PAYMENT: payment();\n break;\n case SHOW_CLIENTS: showClients();\n break;\n case SHOW_PRODUCTS: showProducts();\n break;\n case SHOW_SUPPLIERS: showSuppliers();\n break;\n case SHOW_ORDERS: showOrders();\n break;\n case GET_TRANS: getTransactions();\n break;\n case GET_INVOICE: getInvoices();\n break;\n case SAVE: save();\n break;\n case MENU: menu();\n break;\n case TEST: test();\n break;\n }\n }\n }", "private void processFromLastRun() {\n for (String configId : dirsFromLastRunToProcess.keySet()) {\r\n File dirToProcess = dirsFromLastRunToProcess.get(configId);\r\n processContentFiles(dirToProcess, configId);\r\n }\r\n \r\n dirsFromLastRunToProcess = new HashMap<String, File>();\r\n }", "public void update(float delta) {\n // update player movement\n\n if (!inCombat) {\n\n handleMovement();\n\n if (isMoving) {\n\n if (isMovingRight && !isMovingLeft) moveRight();\n if (isMovingLeft && !isMovingRight) moveLeft();\n if (isMovingUp && !isMovingDown) moveUp();\n if (isMovingDown && !isMovingUp) moveDown();\n\n if (speedX != 0 && (isMovingUp || isMovingDown)) inertia_x();\n else if (speedY != 0 && (isMovingRight || isMovingLeft)) inertia_y();\n\n } else phaseOutMovement();\n\n } else if (inMovementPhase) {\n speedY = 0;\n speedX = 0;\n\n handleCombatMovement();\n\n if (isMoving) {\n if (isMovingUp) moveTileUp(delta);\n if (isMovingDown) moveTileDown(delta);\n if (isMovingRight) moveTileRight(delta);\n if (isMovingLeft) moveTileLeft(delta);\n }\n }\n\n move(delta);\n\n updateSprites();\n }", "public static void updatePosition() {\n\t\tfor (int i = 0; i < TitanV4.planets.length; i++) { //compute forces between all celestial corpses\n\t\t\tfor(int j=i; j<TitanV4.planets.length; j++){\n\t\t\t\tif (i != j) {\n\t\t\t\t\tdouble upper = TitanV4.G*TitanV4.planets[i].getMass() * TitanV4.planets[j].getMass();\n\t\t\t\t\tdouble lower = TitanV4.planets[i].getPosition().distanceFrom(TitanV4.planets[j].getPosition());\n\t\t\t\t\tdouble gravitation = upper/lower;\n\t\t\t\t\tVector a = new Vector();\n\t\t\t\t\ta = TitanV4.planets[i].getPosition().substract(TitanV4.planets[j].getPosition()).normalize().multiply(-1);\n\n\t\t\t\t\tTitanV4.planets[i].force.add(a.multiply(gravitation));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//compute acceleration vector for each celestial corpse but the sun\n\t\tfor(int i=1; i<TitanV4.planets.length; i++){\n\t\t\tTitanV4.planets[i].acceleration = (TitanV4.planets[i].force.divide(TitanV4.planets[i].getMass()));\n\t\t}\n\n\t\t//calculate change in speed over deltaT\n\t\tfor(int i=1; i<TitanV4.planets.length; i++){\n\t\t\tVector oldVelocity = new Vector(TitanV4.planets[i].velocity);\n\t\t\tTitanV4.planets[i].velocity.add((TitanV4.planets[i].acceleration.multiply(TitanV4.deltaT)));\n\n\t\t\tVector posChange = new Vector();\n\t\t\tposChange = (oldVelocity.add(velocity).divide(2)).multiply(TitanV4.deltaT);\n\t\t\tTitanV4.planets[i].pos.add(posChange);\n\t\t}\n\t}", "public void refineTR(){\n ArrayList<Node> prevLevelNodes = new ArrayList<>();\n ArrayList<Node> currentLevelNodes;\n services.clear();\n prevLevelNodes.add(endNode);\n while (true){\n currentLevelNodes = new ArrayList<>();\n for (Node n: prevLevelNodes){\n //System.out.println(n.isDummy());\n if (!n.isDummy()){\n //System.out.println(n.getService().getSubServices().size());\n for (AbstractService as: n.getService().getSubServices())\n services.add(as.getAbstractServices().get(0));\n }\n for (Node n1: n.getTraceTR()){\n currentLevelNodes.add(n1);\n }\n }\n if (currentLevelNodes.isEmpty())break;\n prevLevelNodes = currentLevelNodes;\n }\n this.generateDependencyGraph();\n //this.findOptimalResponseTime();\n this.findOptimalThroughput();\n }", "public static List<System> dtoToEntity(final List<SystemDTO> dtos){\n\t\tfinal List<System> result = new ArrayList<>();\n\t\tfor (SystemDTO dto : dtos) {\n\t\t\tresult.add(dtoToEntity(dto));\n\t\t}\n\t\treturn result;\n\t}", "private void doBasicUpdate(){\n for (int i = 0; i < subTrees.length - 1; i++) { //top tree never receives an update (reason for -1)\r\n if(!subTrees[i].hasStopped()) {\r\n doOneUpdateStep() ;\r\n }\r\n }\r\n }", "public void updateAcceleration (Body[] bodies) {\n\n boolean collision;\n\n for (int i = 0; i < bodies.length; i ++) {\n\n Body otherBody = bodies[i];\n if (this.merged == false && otherBody.merged == false) {\n collision = this.collisionDetection(otherBody);\n\n // if there's a collision between this and another body, stop the loop\n if (collision == true) {\n this.collisionPhsysics(otherBody);\n System.out.println(\"Collision occured!\");\n break;\n }\n else {\n if (otherBody.name != this.name){ // makes sure a body doesn't calculate acc on itself\n double r = Math.sqrt(Math.pow((this.x - otherBody.x),2) + Math.pow((this.y - otherBody.y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){\n // catch division / 0\n temp_acc = 0;\n }\n this.ax += temp_acc * (otherBody.x - this.x);\n this.ay += temp_acc * (otherBody.y - this.y);\n }\n\n if (otherBody.name != this.name){\n // computes and updates axplusone and ayplusone\n\n double r = Math.sqrt(Math.pow((this.euler_x - otherBody.euler_x),2) + Math.pow((this.euler_y - otherBody.euler_y),2));\n double temp_acc;\n try {\n temp_acc = (G * otherBody.mass)/Math.pow(r,3); // temp_acc * deltax = ax\n }\n catch (ArithmeticException e){\n temp_acc = 0;\n }\n this.axplusone += temp_acc * (otherBody.euler_x - this.euler_x);\n this.ayplusone += temp_acc * (otherBody.euler_y - this.euler_y);\n }\n }\n }\n }\n\n }", "public void execute(Directive dir, Collection changes) {\n // drop changes\n if (dir instanceof AssetRescind) {\n receiveAssetRescind((AssetRescind)dir);\n }\n }", "public void run(){\n ArrayList<ArrayList<Furniture>> all = getSubsets(getFoundFurniture());\n ArrayList<ArrayList<Furniture>> valid = getValid(all);\n ArrayList<ArrayList<Furniture>> ordered = comparePrice(valid);\n ArrayList<ArrayList<Furniture>> orders = produceOrder();\n checkOrder(orders, false);\n }" ]
[ "0.65252084", "0.5990557", "0.5580018", "0.5555653", "0.5486148", "0.54434216", "0.539508", "0.53431153", "0.5328813", "0.5272621", "0.52719736", "0.5225946", "0.5126709", "0.51104474", "0.5103385", "0.50630164", "0.50415653", "0.5018146", "0.501469", "0.5006268", "0.49866655", "0.49854517", "0.4934993", "0.4932044", "0.4921838", "0.49162978", "0.49039343", "0.48895344", "0.48794997", "0.48759264", "0.48640257", "0.4792211", "0.4780484", "0.47782096", "0.4772967", "0.47713807", "0.47654724", "0.4753482", "0.47451395", "0.4738579", "0.4693096", "0.46877757", "0.46787208", "0.46775436", "0.4675365", "0.46714565", "0.46703106", "0.46642032", "0.4660402", "0.46554425", "0.465275", "0.46429855", "0.46324235", "0.46140465", "0.46063194", "0.4600782", "0.45851234", "0.45831513", "0.4581049", "0.45528594", "0.45377046", "0.45351505", "0.45340824", "0.45311606", "0.4523938", "0.4522062", "0.4522062", "0.45211336", "0.4520576", "0.45179588", "0.45168003", "0.4513883", "0.45014426", "0.44845358", "0.4473936", "0.44664374", "0.4462411", "0.44617352", "0.44597882", "0.44556877", "0.44554326", "0.44552502", "0.44526818", "0.44489774", "0.44475308", "0.443936", "0.44376945", "0.44373664", "0.44257167", "0.44220328", "0.44207692", "0.44135928", "0.44117025", "0.44113287", "0.440348", "0.44034046", "0.44020274", "0.43891537", "0.4384969", "0.43836176" ]
0.7691997
0
Get the system bits matching the given componentbits.
RECSBits getSystemBits(RECSBits componentBits) { RECSBits systemBits = new RECSBits(); for (EntitySystem s : systems) { if (s.getComponentBits().contains(componentBits)) { systemBits.set(s.id); } } return systemBits; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BitField getLSBs(int digits);", "final int ec_decode_bin(final int _bits) {\r\n\t\tthis.ext = this.rng >>> _bits;\r\n\t\tlong s = (this.val / this.ext);\r\n\t\t// return (int)((1L << _bits) - EC_MINI( s + 1L, 1L << _bits ));\r\n\t\ts++;\r\n\t\tlong b = 1L << _bits;\r\n\t\tb -= s;\r\n\t\tif( b > 0 ) {\r\n\t\t\tb = 0;\r\n\t\t}\r\n\t\ts += b;\r\n\t\treturn (int)((1L << _bits) - s);\r\n\t}", "public long bits() {\n\t\tlong x = n;\n\t\tif (x > 0) {\n\t\t\tlong msw = get(x - 1) & 0xffffffffL;\n\t\t\tx = (x - 1) * BPU;\n\t\t\tx = x & 0xffffffffL;\n\t\t\tlong w = BPU;\n\t\t\tdo {\n\t\t\t\tw >>= 1;\n\t\t\t\tif (msw >= ((1 << w) & 0xffffffffL)) {\n\t\t\t\t\tx += w;\n\t\t\t\t\tx = x & 0xffffffffL;\n\t\t\t\t\tmsw >>= w;\n\t\t\t\t}\n\t\t\t} while (w > 8);\n\t\t\tx += bittab[(int) msw];\n\t\t\tx = x & 0xffffffffL;\n\t\t}\n\t\treturn x;\n\t}", "private String decodeConfigByte(int param, byte bits) {\n String summary = \" \";\n\n String[] strings1 = getResources().getStringArray(arrayResourceIds[param]);\n for (int i = 0; i < 8; i++) {\n if (((bits >> i) & 1) == 1) {\n summary += strings1[i] + \", \";\n multipliers[param]++;\n }\n }\n\n summary = summary.substring(0, summary.length() - 2);\n return summary;\n }", "private static int numBytesFromBits(int bits) {\n \t\treturn (bits + 7) >> 3;\n \t}", "BitField getMSBs(int digits);", "private final TupleSet portToBits(TupleFactory factory, String port, int bits) {\n\t\tfinal TupleSet s = factory.noneOf(2);\n\t\tfor (int i = 0, max = 32 - Integer.numberOfLeadingZeros(bits); i < max; i++) {\n\t\t\tif ((bits & (1 << i)) != 0)\n\t\t\t\ts.add(factory.tuple(port, Integer.valueOf(1 << i)));\n\t\t}\n\t\treturn s;\n\t}", "public int bits() {\n return mat.getType().getBits();\n }", "@Ignore\n @Test\n public void testgetMostSignificantSevenBits() {\n final int v = MidiReceiver.getMsbOf14ValidBits(0b11111111);\n assertEquals(0b1, v);\n }", "public ArrayList<Integer> getLSBsToConsider(int redBits, int greenBits, int blueBits,\n boolean red, boolean green, boolean blue){\n ArrayList<Integer> lsbToConsider = new ArrayList<Integer>();\n int count = 0;\n if(red) {\n for (int i = 0; i < redBits; i++) {\n lsbToConsider.add(count);\n count += 1;\n }\n }\n if(green) {\n count = 0;\n for (int i = redBits; i < greenBits + redBits; i++) {\n lsbToConsider.add(count);\n count += 1;\n }\n }\n if(blue) {\n count = 0;\n for (int i = redBits + greenBits; i < redBits + greenBits + blueBits; i++) {\n lsbToConsider.add(count);\n count += 1;\n }\n }\n return lsbToConsider;\n }", "public int getBitsPerComponent() {\n return bitsPerComponent;\n }", "public String get2sComplement(String binaryVal) {\r\n\t\tString onesComp = new String();\r\n\t\tString twosComp = new String();\r\n\t\tchar carry = '0';\r\n\t\tint i;\r\n\t\t// finding one's complement--------------------------------\r\n\t\tfor (i = 0; i < binaryVal.length(); i++) {\r\n\t\t\tif (binaryVal.charAt(i) == '0')\r\n\t\t\t\tonesComp = onesComp + \"1\";\r\n\t\t\telse\r\n\t\t\t\tonesComp = onesComp + \"0\";\r\n\t\t} \r\n\t\t\r\n\t\t//finding the 2's complement. adding '1' to the binary(which is 1's complement)\r\n\t\tchar lsb = onesComp.charAt(onesComp.length() - 1);\r\n\t\tif (lsb == '1') {\r\n\t\t\ttwosComp = \"0\" + twosComp;\r\n\t\t\tcarry = '1';\r\n\t\t} else\r\n\t\t\ttwosComp = \"1\" + twosComp;\r\n\t\tfor (i = onesComp.length() - 2; i >= 0; i--) {\r\n\t\t\tchar digit = onesComp.charAt(i);\r\n\t\t\tif (carry == '0' && digit == '0')\r\n\t\t\t\ttwosComp = \"0\" + twosComp;\r\n\t\t\telse if (carry == '0' && digit == '1')\r\n\t\t\t\ttwosComp = \"1\" + twosComp;\r\n\t\t\telse if (carry == '1' && digit == '0') {\r\n\t\t\t\ttwosComp = \"1\" + twosComp;\r\n\t\t\t\tcarry = '0';\r\n\t\t\t} else {\r\n\t\t\t\ttwosComp = \"0\" + twosComp;\r\n\t\t\t\tcarry = '1';\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn twosComp;\r\n\t\t }", "long getCollideBits();", "static String convert(String bits) {\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tstringBuilder.append(String.valueOf(hexLookUp.charAt(Integer.parseInt(bits, 2))));\n\t\tString hex = stringBuilder.toString();\n\t\treturn hex;\n\t}", "public int getAnalysisBits();", "String getIndexBits();", "public static String writeBits(byte b) {\n\n StringBuffer stringBuffer = new StringBuffer();\n int bit = 0;\n\n for (int i = 7; i >= 0; i--) {\n\n bit = (b >>> i) & 0x01;\n stringBuffer.append(bit);\n\n }\n\n return stringBuffer.toString();\n\n }", "boolean getBit(int index);", "boolean getBit(int bitIndex) {\r\n return bits.get(bitIndex);\r\n }", "public int bitAt(int i) {\n // PUT YOUR CODE HERE\n }", "public int getMutexBits() {\n/* 64 */ return this.mutexBits;\n/* */ }", "public int[] getComponents(int pixel, int[] components, int offset) {\n if (numComponents > 1) {\n throw new\n IllegalArgumentException(\"More than one component per pixel\");\n }\n if (components == null) {\n components = new int[offset+1];\n }\n\n components[offset+0] = (pixel & ((1<<nBits[0]) - 1));\n return components;\n }", "int getBitAsInt(int index);", "long getCategoryBits();", "private int bitToInt(char bit) {\n return bit == '0' ? 0 : 1;\n }", "protected ComponentStruct[] getCASComponents() throws SessionQueryException\n {\n ComponentStruct[] cases = null;\n\n try\n {\n cases = getSessionManagementAdminService().getComponentsForType(Components.SOURCE_COMPONENT);\n\n GUILoggerHome.find().debug(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.SESSION_MANAGEMENT, cases);\n if (GUILoggerHome.find().isInformationOn())\n {\n GUILoggerHome.find().information(\"AbstractSessionInfoManager\", GUILoggerSABusinessProperty.SESSION_MANAGEMENT,\n \"Found \" + cases.length + \" CAS Components\");\n }\n }\n catch(Exception e)\n {\n throw new SessionQueryException(\"Could not retrieve CAS Components.\", e);\n }\n\n return cases;\n }", "protected int[] getCorrectionValue(int formatbits) {\n int[] correctionValue = new int[] {-1, -1};\n int correctionLevel = formatbits >> 13;\n\n switch(correctionLevel) { //nb de bytes de redondance (total - bytes de données); nb de blocs\n case 1 : // Low\n correctionValue = new int[] {15,1};\n break;\n case 0 :\n correctionValue = new int[] {26,1};\n break;\n case 3 :\n correctionValue = new int[] {36,2};\n break;\n case 2 :\n correctionValue = new int[] {44,2};\n break;\n }\n return correctionValue;\n }", "String bsToStr(BitSet bs){\n String s = \"\";\n for(int i=0; i<bitsetLen; i++){\n if(bs.get(i) == true)\n s += '1';\n else\n s += '0';\n }\n \n return new StringBuilder(s).reverse().toString();\n }", "private static BitString convertToBitString(final String theBits) {\n\t\treturn BitString.fromBits(32, theBits.toCharArray());\n\t}", "static void getIndexSetBits(int[] setBits, long board) {\n\t\tint onBits = 0;\n\t\twhile (board != 0) {\n\t\t\tsetBits[onBits] = Long.numberOfTrailingZeros(board);\n\t\t\tboard ^= (1L << setBits[onBits++]);\n\t\t}\n\t\tsetBits[onBits] = -1;\n\t}", "public static int getBit(byte input,int position){\n return (input >> position) & 1;\n }", "public static int getBit(byte b,int position)\n\t{\n\t return ((b >> position) & 1);\n\t}", "private static long toAndFromMsGuidMostSignificantBits(final long msb) {\n\n\t\tlong bits = 0x0000000000000000L;\n\t\t// high bits\n\t\tbits |= (msb & 0xff000000_0000_0000L) >>> 24;\n\t\tbits |= (msb & 0x00ff0000_0000_0000L) >>> 8;\n\t\tbits |= (msb & 0x0000ff00_0000_0000L) << 8;\n\t\tbits |= (msb & 0x000000ff_0000_0000L) << 24;\n\t\t// mid bits\n\t\tbits |= (msb & 0x00000000_ff00_0000L) >>> 8;\n\t\tbits |= (msb & 0x00000000_00ff_0000L) << 8;\n\t\t// low bits\n\t\tbits |= (msb & 0x00000000_0000_ff00L) >>> 8;\n\t\tbits |= (msb & 0x00000000_0000_00ffL) << 8;\n\n\t\treturn bits;\n\t}", "public static int getBitMask(int[] x) {\n int rc = 0;\n for(int xVal : x) {\n rc |= getBitMask(xVal);\n }\n\n return rc;\n }", "public int getBit() {\r\n return _bit;\r\n }", "public MediaDeviceDescription setBitsPerComponent(int bitsPerComponent) {\n this.bitsPerComponent = bitsPerComponent;\n return this;\n }", "private static int mask(int bit) {\n return MSB >>> bit;\n }", "private boolean[] characterToBitArray(String character) {\n String binaryString = format(\"%4s\", Integer.toBinaryString(parseInt(character, 16))).replace(' ', '0');\n boolean[] bits = new boolean[NUMBER_OF_BITS_PER_CHAR];\n for (int i = 0; i < NUMBER_OF_BITS_PER_CHAR; i++) {\n bits[i] = binaryString.charAt(i) == '1';\n }\n return bits;\n }", "public Tribit getBit(int bit){\n MathUtils.assertInRange(bit, 0, LENGTH - 1);\n return value[bit];\n }", "public @UInt32 int getQuantizationBits();", "void setCollideBits (long bits);", "public Tribit[] getBits(){\n return Arrays.copyOf(this.value, this.value.length);\n }", "public static LongArrayBitVector of( final int... bit ) {\n\t\tfinal LongArrayBitVector bitVector = new LongArrayBitVector( bit.length );\n\t\tfor( int b : bit ) {\n\t\t\tif ( b != 0 && b != 1 ) throw new IllegalArgumentException( \"Illegal bit value: \" + b );\n\t\t\tbitVector.add( b );\n\t\t}\n\t\treturn bitVector;\n\t}", "private static int getBit(int pack, int pos) {\n\t\treturn (pack & (1 << pos)) != 0 ? 1 : 0;\n\t}", "@Override\n\tpublic List<Component> caseExprBinary(ExprBinary expr) {\n\t\tint sizeInBits = assignTarget.getVariable().getType().getSizeInBits();\n\t\t// Get the Variables\n\t\tVar e1 = ((ExprVar) expr.getE1()).getUse().getVariable();\n\t\tVar e2 = ((ExprVar) expr.getE2()).getUse().getVariable();\n\t\tList<Var> inVars = new ArrayList<Var>();\n\t\tinVars.add(e1);\n\t\tinVars.add(e2);\n\t\t// Component component = null;\n\t\tif (expr.getOp() == OpBinary.BITAND) {\n\t\t\tcurrentComponent = new AndOp();\n\t\t} else if (expr.getOp() == OpBinary.BITOR) {\n\t\t\tcurrentComponent = new OrOp();\n\t\t} else if (expr.getOp() == OpBinary.BITXOR) {\n\t\t\tcurrentComponent = new XorOp();\n\t\t} else if (expr.getOp() == OpBinary.DIV) {\n\t\t\tcurrentComponent = new DivideOp(sizeInBits);\n\t\t} else if (expr.getOp() == OpBinary.DIV_INT) {\n\t\t\tcurrentComponent = new DivideOp(sizeInBits);\n\t\t} else if (expr.getOp() == OpBinary.EQ) {\n\t\t\tcurrentComponent = new EqualsOp();\n\t\t} else if (expr.getOp() == OpBinary.GE) {\n\t\t\tcurrentComponent = new GreaterThanEqualToOp();\n\t\t} else if (expr.getOp() == OpBinary.GT) {\n\t\t\tcurrentComponent = new GreaterThanOp();\n\t\t} else if (expr.getOp() == OpBinary.LE) {\n\t\t\tcurrentComponent = new LessThanEqualToOp();\n\t\t} else if (expr.getOp() == OpBinary.LOGIC_AND) {\n\t\t\tcurrentComponent = new And(2);\n\t\t} else if (expr.getOp() == OpBinary.LOGIC_OR) {\n\t\t\tcurrentComponent = new Or(2);\n\t\t} else if (expr.getOp() == OpBinary.LT) {\n\t\t\tcurrentComponent = new LessThanOp();\n\t\t} else if (expr.getOp() == OpBinary.MINUS) {\n\t\t\tcurrentComponent = new SubtractOp();\n\t\t} else if (expr.getOp() == OpBinary.MOD) {\n\t\t\tcurrentComponent = new ModuloOp();\n\t\t} else if (expr.getOp() == OpBinary.NE) {\n\t\t\tcurrentComponent = new NotEqualsOp();\n\t\t} else if (expr.getOp() == OpBinary.PLUS) {\n\t\t\tcurrentComponent = new AddOp();\n\t\t} else if (expr.getOp() == OpBinary.SHIFT_LEFT) {\n\t\t\tint log2N = MathStuff.log2(sizeInBits);\n\t\t\tcurrentComponent = new LeftShiftOp(log2N);\n\t\t} else if (expr.getOp() == OpBinary.SHIFT_RIGHT) {\n\t\t\tint log2N = MathStuff.log2(sizeInBits);\n\t\t\tcurrentComponent = new RightShiftOp(log2N);\n\t\t} else if (expr.getOp() == OpBinary.TIMES) {\n\t\t\tcurrentComponent = new MultiplyOp(expr.getType().getSizeInBits());\n\t\t}\n\t\t// currentComponent.setNonRemovable();\n\t\tPortUtil.mapInDataPorts(currentComponent, inVars, portDependency,\n\t\t\t\tportGroupDependency);\n\t\treturn null;\n\t}", "public EnumSet<KeyUsage> convert(boolean[] keyUsageBits) {\n EnumSet<KeyUsage> usages = EnumSet.noneOf(KeyUsage.class);\n if (keyUsageBits != null) {\n for (int i = 0; i < Math.min(BIT_TO_USAGE.size(), keyUsageBits.length); i++) {\n if (keyUsageBits[i]) {\n usages.add(BIT_TO_USAGE.get(i));\n }\n }\n }\n return usages;\n }", "List<TblSystemInfo> getSyetemByNameOrCode(String systemName,String systemCode);", "protected boolean getBit(long bitIndex) {\r\n\t long intIndex = (bitIndex >>> ADDRESS_BITS_PER_UNIT);\r\n\t return ((bits[(int)(intIndex / ONE_MB_INTS)][(int)(intIndex % ONE_MB_INTS)] \r\n\t & (1 << (bitIndex & BIT_INDEX_MASK))) != 0);\r\n\t }", "private static void addCombos() {\n\t\tcombos.put(\"All pixels, three LSB\", 13);\n\t\tcombos.put(\"All pixels, two LSB\", 12);\n\t\tcombos.put(\"Every even pixel, three LSB\", 23);\n\t\tcombos.put(\"Every odd pixel, three LSB\", 33);\n\t\tcombos.put(\"Every pixel, one LSB\", 11);\n\t\tcombos.put(\"Every even pixel, two LSB\",22);\n\t\tcombos.put(\"Every odd pixel, two LSB\", 32);\n\t\tcombos.put(\"Every third pixel, three LSB\",43);\n\t\tcombos.put(\"Every third pixel, two LSB\",42);\n\t\tcombos.put(\"Every even pixel, one LSB\",21);\n\t\tcombos.put(\"Every odd pixel, one LSB\",31);\n\t\tcombos.put(\"Every third pixel, one LSB\",41);\n\t\tcombos.put(\"Every prime-numbered pixel, three LSB\", 53);\n\t\tcombos.put(\"Every prime-numbered pixel, two LSB\",52);\n\t\tcombos.put(\"Every prime-numbered pixel, one LSB\",51);\n\n\n\t}", "public Archangel buscarPower(String pow){\n\tboolean val = false;\n Archangel angel = null;\n\tfor(int i =0;i<arch.length && !val;i++){\n\t\tif(arch[i]!=null){\n\t\tif(arch[i].getPower().equalsIgnoreCase(pow)){\n\t\t\tangel = arch[i];\n\t\t\tval = true;\n\t\t}\n\t}\n\t\t\telse{\n\t\t\tval=true;\n\t\t}\n\t}\n\nreturn angel;\n\n}", "int nextBits(int bits);", "protected boolean getBit(long word, long position) {\n\t\treturn (word & (1L << position)) != 0;\n\t}", "public static Integer getBit(byte input, int position){\n return ((input >> position) & 1);\n }", "public static String binValue(byte b) {\n StringBuilder sb = new StringBuilder(8);\n for (int i = 0; i < 8; i++) {\n if ((b & 0x01) == 0x01) {\n sb.append('1');\n } else {\n sb.append('0');\n }\n b >>>= 1;\n }\n return sb.reverse().toString();\n }", "private int readbit(ByteBuffer buffer) {\n if (numberLeftInBuffer == 0) {\n loadBuffer(buffer);\n numberLeftInBuffer = 8;\n }\n int top = ((byteBuffer >> 7) & 1);\n byteBuffer <<= 1;\n numberLeftInBuffer--;\n return top;\n }", "public long getBitboard() {\r\n return bitboard;\r\n }", "public UnmodifiableBitSet orBitSet(BitSet bs){\n\t\tUnmodifiableBitSet nbs = (UnmodifiableBitSet)this.clone();\n\t\tnbs.orBitSetInn(bs);\n\t\treturn nbs;\n\t}", "public static int getBitMask(int x) {\n return (0x01 << x);\n }", "boolean[] bitwiseChangeList();", "public int getBit(int columnIndex) {\n BitVector vector = (BitVector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }", "public BitSet makeMod(){\n\t\tBitSet bs = new BitSet(this.length());\n\t\tbs.or(this);\n\t\treturn bs;\n\t}", "public int getBit(int pos) {\r\n\t\treturn flagBits[pos];\r\n\t\t\r\n\t}", "public interface BitField {\n\n /**\n * @return the size of the field\n */\n int size();\n\n /**\n * set all values of the BitField with the rightmost value being index 0 (LSB).\n * example set(0,0,0,1) would set bit0 == 1 and bit3 == 0\n *\n * @param values the values to set the BitField (only 0 and 1 are accepted)\n * @return the BitField\n */\n void setBits(int... values);\n\n /**\n * set a given bit in the field\n *\n * @param index\n * @param value true == 1, false == 0\n * @throws IndexOutOfBoundsException if you try to set a bit greater than the size of the field\n */\n void setBit(int index, boolean value);\n\n /**\n * set a given bit in the field\n *\n * @param index\n * @param value (only 0 and 1 are accepted)\n * @throws IndexOutOfBoundsException if you try to set a bit greater than the size of the field\n */\n void setBit(int index, int value);\n\n /**\n * replace all values of the bitfield with this integer value\n *\n * @param val\n * @return\n */\n void setToValue(int val);\n\n /**\n * invert all the bits\n */\n void invertAllBits();\n\n /**\n * get a given bit as a boolean\n *\n * @param index\n * @return a boolean for the bit (true == 1, false == 0)\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n boolean getBit(int index);\n\n /**\n * get a given bit as a 0 or 1\n *\n * @param index\n * @return a value for the bit (1 == 1, 0 == 0)\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n int getBitAsInt(int index);\n\n /**\n * get the field as an integer\n *\n * @return the int value of the bitfield\n */\n int intValue();\n\n /**\n * return a nice string representation of the field\n *\n * @return\n */\n String asString();\n\n /**\n * get the LSBs of the BitField (if possible)\n *\n * @param digits the number of LSBs to return\n * @return a new BitField of the LSBs\n */\n BitField getLSBs(int digits);\n\n /**\n * get the MSBs of the BitField (if possible)\n *\n * @param digits the number of MSBs to return\n * @return a new BitField of the MSBs\n */\n BitField getMSBs(int digits);\n\n /**\n * return a new BitField. Inclusive\n *\n * @param from index of the from (0==LSB)\n * @param to index of the to (max is the size-1 of the field)\n * @return a new BitField of the chosen bits\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n BitField getSubField(int from, int to);\n\n /**\n * return a new BitField. Inclusive\n *\n * @param from index of the from (0==LSB)\n * @param to index of the to (if > size then we pad with 0's)\n * @return a new BitField of the chosen bits\n * @throws IndexOutOfBoundsException if you ask for a bit our of range\n */\n BitField getSubFieldWithPadding(int from, int to);\n\n /**\n * a convenience method to add to the LS Bits of the BitField.\n * this will resize the BitField, shift everything to the left and insert\n * the new BitField\n *\n * @param fieldToAddToTheRight\n */\n void shiftAndAddToRight(BitField fieldToAddToTheRight);\n\n /**\n * shift to the left and pad the new LSBs with 0's\n *\n * @param numberToShift the number of bits to shift\n */\n void shiftLeft(int numberToShift);\n\n /**\n * shift to the right and have the LSBs dissapear\n *\n * @param numberToShift the number of bits to shift\n */\n void shiftRight(int numberToShift);\n\n /**\n * resize, but trimming/adding to the MSB side\n * <p>\n * if newSize > currentSize, we pad with 0's on the MSBs\n * if newSize < currentSize, we simply drop the bits on the left\n *\n * @param newSize the new size of the BitField\n */\n void resize(int newSize);\n\n /**\n * copy the BitField\n *\n * @return a copy of the bitField\n */\n BitField copy();\n\n /**\n * convert the bit field and return as a collection of bytes made up from the BitField from the LSB to the MSB. Padding in the MSB if needed\n * (byte == 8 bits).\n * <p>\n * For example:\n * 00001000 would return a list with a single byte value of 8\n * 1000001000 would return a list with the first value being a byte with a value of 8, then one with a value of 2\n *\n * @return a collection with the LSB in position 0 and the MSB as the last value\n */\n List<Byte> getAsBytes();\n\n}", "public static byte [] getSecureRandom ( int bits ) {\n\n\t\t//System.out.println(\"getSecureRandom - start\");\n\t\t//System.out.println(\" Check divisible by 8\");\n\t\t// Make sure the number of bits we're asking for is at least\n\t\t// divisible by 8.\n\t\tif ( (bits % 8) != 0 ) {\n\t\t\tthrow new IllegalArgumentException(\"Size is not divisible by 8!\");\n\t\t}\n\n\t\t//System.out.println(\" Create array\");\n\t\tbyte [] bytes = new byte[ bits / 8 ];\n\n\t\t//System.out.println(\" Get Random number\");\n\t\tSecureRandom sRandom = null;\n\t\ttry {\n\t\t\t//System.out.println(\" Get Random number\");\n\t\t\tsRandom = SecureRandom.getInstance( \"SHA1PRNG\" );\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t//System.out.println(\"Exception: \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\t//System.out.println(\" Get \" + bytes.length + \" bytes\");\n\t // Get the next 64 random bits. Forces SecureRandom\n\t // to seed itself before returning the bytes.\n\t sRandom.nextBytes(bytes);\n\n\t\t//System.out.println(\"getSecureRandom - end\");\n\n\t return bytes;\n\t}", "public ArrayList<Boolean> getCode()\n\t{\n\t\treturn bits;\n\t}", "void addEntityToSystems(Entity e, RECSBits systemBits) {\n \t\tfor (int i = systemBits.nextSetBit(0); i >= 0; i = systemBits.nextSetBit(i + 1)) {\n \t\t\tsystemMap.get(i).addEntity(e.id);\n \t\t}\n \t}", "void removeEntityFromSystems(Entity e, RECSBits systemBits) {\n \t\tfor (int i = systemBits.nextSetBit(0); i >= 0; i = systemBits.nextSetBit(i + 1)) {\n \t\t\tsystemMap.get(i).removeEntity(e.id);\n \t\t}\n \t}", "private int getBit(int value, int k) {\r\n\t\treturn (value >> k) & 1;\r\n\t}", "public int getChannels(int subsystem) {\n return _avTable.getInt(ATTR_CHANNELS, subsystem, 0);\n }", "private static BitSet makeBitSet( int... args ) {\n\tBitSet result = new BitSet( MAX_OPCODE + 1 ) ;\n\tfor (int value : args )\n\t result.set( value ) ;\n\treturn result ;\n }", "static int[] hexStringToBits(String hex) {\n int[] bits = new int[128];\n for (int i = 0; i < hex.length(); i++) {\n int n = (int)hex.charAt(i);\n for (int j = 0; j < 4; j++) {\n bits[4 * i + j] = (n >> (3 - j)) & 1;\n }\n }\n return bits;\n }", "public static int toInteger(BitSet bits) {\n int i, value;\n value = 0;\n i = bits.nextSetBit(0);\n while (i >= 0) {\n value += Math.pow(2, i);\n i = bits.nextSetBit(i + 1);\n }\n return value;\n }", "public static BitSet createBitSetFromBinaryString(String bitsAsBinaryString) {\r\n\t\tBitSet bitSet = new BitSet(bitsAsBinaryString.length());\r\n\r\n\t\tfor (int i = 0; i < bitsAsBinaryString.length(); i++) {\r\n\t\t\tif (bitsAsBinaryString.substring(i, i + 1).equals(\"1\")) {\r\n\t\t\t\tbitSet.set(i, true);\r\n\t\t\t} else {\r\n\t\t\t\tbitSet.set(i, false);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn bitSet;\r\n\t}", "private static ArrayList<Integer> generateBinaryCodeList(ArrayList<ArrayList<Integer>> tMat){\r\n\t\tArrayList<Integer> bcList = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < tMat.size(); i++){\r\n\t\t\tint code = getBinaryCode(tMat, i);\r\n\t\t\tbcList.add(code);\r\n\t\t}\r\n\t\treturn bcList;\r\n\t}", "public int getBit(String columnName) {\n BitVector vector = (BitVector) table.getVector(columnName);\n return vector.get(rowNumber);\n }", "public static BitSet BitStringToBitSet(String s) {\n BitSet result = new BitSet();\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == '1') {\n result.set(i);\n }\n }\n return result;\n }", "void setCategoryBits (long bits);", "private static int getMaskAsInt(int nrBits) {\n return 0xFFFFFFFF >>> (32 - nrBits);\n }", "private byte[] intToBits(int number, int n) {\n\t\tbyte[] bits = new byte[n];\n\t\t\n\t\tString bitString = Integer.toBinaryString(number);\n\t\twhile (bitString.length() < n) {\n\t\t\tbitString = \"0\" + bitString;\n\t\t}\n\t\t\n\t\tfor(int i = 0, maxLen = bits.length; i < maxLen; i++) {\n\t\t\tbits[i] = (byte) (bitString.charAt(i) == 1 ? 1 : 0);\n\t\t}\n\t\t\n\t\treturn bits;\n\t}", "private static int createSelectedKey(int bBit) {\r\n\t\tRandom random = new Random();\r\n\t\tint maxKey = (int) Math.pow(2, bBit);\r\n\t\tint randomKey = random.nextInt((maxKey - 1) + 1) + 1;\t\r\n\t\treturn randomKey;\r\n\t}", "public static TribitByte value(Integer... bits){\n if(bits.length != LENGTH){\n throw new IllegalArgumentException(\"bits must be size of \" + LENGTH);\n }\n Arrays.stream(bits).forEach(i -> {\n if(i != null && i != 0 && i != 1){\n throw new IllegalArgumentException(\"Bits must be 0, 1, or null. \" + i + \" found.\");\n }\n });\n Tribit[] mappedBits = Arrays.stream(bits).map(i -> {\n if(i == null){\n return Tribit.DONT_CARE;\n } else if(i == 0){\n return Tribit.ZERO;\n } else {\n return Tribit.ONE;\n }\n }).toArray(Tribit[]::new);\n return new TribitByte(mappedBits);\n }", "public char getSpecificLSB(int number, int LSB){\n StringBuilder binaryColour = new StringBuilder();\n binaryColour.append(conformBinaryLength(number, 8));\n int lsb_Position = 7 - LSB;\n return binaryColour.charAt(lsb_Position);\n }", "public byte[] getOutBits() {\n\t\treturn this.outBits;\n\t}", "public int[] getComponents(Object pixel, int[] components, int offset) {\n int intpixel[];\n if (pixel instanceof int[]) {\n intpixel = (int[])pixel;\n } else {\n intpixel = DataBuffer.toIntArray(pixel);\n if (intpixel == null) {\n throw new UnsupportedOperationException(\"This method has not been \"+\n \"implemented for transferType \" + transferType);\n }\n }\n if (intpixel.length < numComponents) {\n throw new IllegalArgumentException\n (\"Length of pixel array < number of components in model\");\n }\n if (components == null) {\n components = new int[offset+numComponents];\n }\n else if ((components.length-offset) < numComponents) {\n throw new IllegalArgumentException\n (\"Length of components array < number of components in model\");\n }\n System.arraycopy(intpixel, 0, components, offset, numComponents);\n\n return components;\n }", "public double bitsEachElement() {\n return config().getC();\n }", "private static int readBits(byte[] bytes, int pos, int len) {\n int value = 0;\n int ind = pos / 8;\n for (int i = 0; i < len && ind < bytes.length; i++) {\n int bi = (i + pos) % 8;\n if ((bytes[ind] & (1 << (7 - bi))) != 0) {\n value |= 1 << (len - 1 - i);\n }\n if (bi == 7) {\n ind++;\n }\n }\n return value;\n }", "public long getMostSignificantBits() { throw new RuntimeException(\"Stub!\"); }", "public int bitCount() {\n @SuppressWarnings(\"deprecation\") int bc = bitCount - 1;\n if (bc == -1) { // bitCount not initialized yet\n bc = 0; // offset by one to initialize\n // Count the bits in the magnitude\n for (int i=0; i < mag.length; i++)\n bc += Integer.bitCount(mag[i]);\n if (signum < 0) {\n // Count the trailing zeros in the magnitude\n int magTrailingZeroCount = 0, j;\n for (j=mag.length-1; mag[j] == 0; j--)\n magTrailingZeroCount += 32;\n magTrailingZeroCount += Integer.numberOfTrailingZeros(mag[j]);\n bc += magTrailingZeroCount - 1;\n }\n bitCount = bc + 1;\n }\n return bc;\n }", "public static boolean getBit(int bit) {\n if (bit == Constants.BIT_TRUE)\n return true;\n\n if (bit == Constants.BIT_FALSE)\n return false;\n\n throw new RuntimeException(\"Invalid bit-value: \" + bit);\n }", "@Override\n public final int next(final int bits) {\n final long s = (stateA += 0x9E3779B97F4A7C15L);\n if(s == 0L)\n stateB -= 0x6C8E9CF570932BD5L;\n final long z = (s ^ s >>> 28) * ((stateB += 0x6C8E9CF570932BD5L) | 1L);\n return (int)(z ^ z >>> 28) >>> (32 - bits);\n }", "public Grid2DBit eq(WeatherGridSlice gs) {\n Grid2DByte weatherGrid = getWeatherGrid();\n Grid2DBit bits = new Grid2DBit(weatherGrid.getXdim(),\n weatherGrid.getYdim());\n\n byte[] thisB = weatherGrid.getBuffer().array();\n byte[] rhsB = gs.getWeatherGrid().getBuffer().array();\n byte[] b = bits.getBuffer().array();\n for (int i = 0; i < thisB.length; i++) {\n if (keys[0xFF & thisB[i]].equals(gs.keys[0xFF & rhsB[i]])) {\n b[i] = (byte) 1;\n }\n }\n\n return bits;\n }", "public boolean solution(int[] bits) {\n int length = bits.length ;\n if(bits[length - 1] == 1){\n return false;\n }\n int index =0;\n boolean flag = true;\n while(index < length){\n if(bits[index] == 0){\n index +=1 ;\n flag = true;\n }else{\n index +=2 ;\n flag = false;\n }\n }\n return flag;\n }", "public FormatableBitSet(int numBits)\n \t{\n \t\tinitializeBits(numBits);\n \t}", "void writeBits(long bits, int numBits) throws IOException;", "@Test\n public void testGetBvs() throws SolverException, InterruptedException {\n requireBitvectors();\n // Some names are specificly chosen to test the Boolector model\n // Use 1 instead of 0 or max bv value, as solvers tend to use 0, min or max as default\n for (String name : VARIABLE_NAMES) {\n testModelGetters(\n bvmgr.equal(bvmgr.makeVariable(8, name), bvmgr.makeBitvector(8, 1)),\n bvmgr.makeBitvector(8, 1),\n BigInteger.ONE,\n name);\n }\n }", "public Code(ArrayList<Boolean> bits)\n\t{\n\t\tthis.bits = bits;\n\t}", "com.google.protobuf.ByteString\n getField1101Bytes();", "public List<Machinecomponent> findByStatus(Integer status) {\n\t\treturn findByCriteria(Restrictions.eq(\"status\", status));\n\t}", "public long getLeastSignificantBits() { throw new RuntimeException(\"Stub!\"); }", "Map<?,?> getComponents();" ]
[ "0.5933541", "0.5450863", "0.51918536", "0.5124942", "0.5093744", "0.5041633", "0.50228506", "0.4909849", "0.48646456", "0.48530838", "0.48058867", "0.4795193", "0.4785821", "0.47679645", "0.47478843", "0.4742982", "0.46934518", "0.46481553", "0.46030593", "0.45965376", "0.45869204", "0.45792836", "0.4577359", "0.45741627", "0.4570752", "0.45698947", "0.4557083", "0.4556326", "0.45489892", "0.45482796", "0.45465618", "0.4533855", "0.45274734", "0.45186105", "0.45170343", "0.45005813", "0.44879878", "0.4485445", "0.4484059", "0.44768685", "0.4466884", "0.44664806", "0.4464809", "0.4456557", "0.445535", "0.4437387", "0.44368553", "0.44265166", "0.4422179", "0.44145286", "0.44043732", "0.44020483", "0.43865356", "0.43854532", "0.43845013", "0.43840015", "0.43765536", "0.4364744", "0.43642724", "0.43527052", "0.43412536", "0.4329784", "0.431218", "0.4309498", "0.43051895", "0.42981663", "0.4296535", "0.42862788", "0.42806864", "0.4271888", "0.42701834", "0.4265901", "0.42638436", "0.4248593", "0.42474905", "0.4242381", "0.4226654", "0.4214989", "0.4204647", "0.4196365", "0.41761222", "0.41706273", "0.41668457", "0.4159962", "0.4159375", "0.41546935", "0.4152455", "0.41411877", "0.4126203", "0.41240865", "0.41239935", "0.4118281", "0.4114404", "0.41119096", "0.411054", "0.41086328", "0.41012597", "0.4094999", "0.40803555", "0.40710473" ]
0.79118776
0
Get subString before dot from target string like "xxx" from "xxx.yyy".
public String getStrBeforeDot(String str) { if (str==null || str.length()==0) return null; StringBuilder beforeStr = new StringBuilder(); for (int i=0; i<str.length(); i++) { if (str.charAt(i) != '.') beforeStr.append(str.charAt(i)); else break; } return beforeStr.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String removeLeadingDots(String dotPrefixedStr) {\n int pos = 0;\n while (pos < dotPrefixedStr.length() && dotPrefixedStr.charAt(pos) == Symbol.C_DOT) {\n pos++;\n }\n return pos < dotPrefixedStr.length() ? dotPrefixedStr.substring(pos) : Normal.EMPTY;\n }", "public String getStrAfterDot(String str) {\n\t\tif (str==null || str.length()==0)\n\t\t\treturn null;\n\t\tStringBuilder afterStr = new StringBuilder();\t\n\t\tint k=0;\t\n\t\tfor (int i=0; i<str.length(); i++) {\t\n\t\t\tif (str.charAt(i)=='.') {\t\n\t\t\t\tk=i;\t\n\t\t\t\tbreak;\t\n\t\t\t}\t\n\t\t} \n\t\tfor (int i=k+1; i<str.length(); i++) {\n\t\t\tafterStr.append(str.charAt(i));\n\t\t}\n\t\treturn afterStr.toString();\n\t}", "public static String getParentName(String s) {\n\t\tint s1 = s.indexOf('.');\n\t\tif (s1 < 0) return s;\n\t\treturn s.substring(0, s1);\n\t}", "public static String getInnerName(String s) {\n\t\tint s1 = s.indexOf('.');\n\t\tif (s1 < 0) return s;\n\t\treturn s.substring(s1+1);\n\t}", "public static String substring(String str)\n\t{\n\t\tString []s1=str.split(\"\\\\.\");\n\t\tint a=s1.length;\n\t\tSystem.out.println(s1[a-1]);\n\t\treturn s1[a-1];\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}", "private String trimClassPaths (String s) {\n int idx = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == '.') {\n idx = i;\n break;\n }\n }\n String trimmed = s.substring(idx + 1);\n return trimmed;\n }", "public static String everythingAfterDot(String str) {\n int index = str.indexOf('.');\n\n if (index > -1) {\n return str.substring(index + 1).trim();\n } else {\n return str;\n }\n }", "public String parseDotPathWord( String t )\n {\n StringBuilder sb = t == null ? null : new StringBuilder( t == null ? \"\" : t );\n SourceCodeTokenizer tokenizer = getTokenizer();\n while( match( null, '.' ) )\n {\n if( sb != null )\n {\n sb.append( '.' );\n }\n int mark = tokenizer.mark();\n if( match( null, null, SourceCodeTokenizer.TT_WORD ) || match( null, null, SourceCodeTokenizer.TT_KEYWORD ) )\n {\n if( sb != null )\n {\n sb.append( tokenizer.getTokenAt( mark ).getStringValue() );\n }\n }\n }\n if( sb != null )\n {\n t = sb.toString();\n }\n return t;\n }", "private String getWithoutExtension(String withExtension){\n if (withExtension.contains(\".\")){\n int dot = withExtension.lastIndexOf(\".\");\n return withExtension.substring(0, dot);\n } else {\n return withExtension;\n }\n }", "private static String m31929a(String str) {\n String[] split = str.split(\"\\\\.\");\n String str2 = split.length > 0 ? split[split.length - 1] : \"\";\n return str2.length() > 100 ? str2.substring(0, 100) : str2;\n }", "abstract String toDot();", "private static String fixLeadingBracketSugar( String dotNotaton ) {\n\n if ( dotNotaton == null || dotNotaton.length() == 0 ) {\n return \"\";\n }\n\n char prev = dotNotaton.charAt( 0 );\n StringBuilder sb = new StringBuilder();\n sb.append( prev );\n\n for ( int index = 1; index < dotNotaton.length(); index++ ) {\n char curr = dotNotaton.charAt( index );\n\n if ( curr == '[' && prev != '\\\\') {\n if ( prev == '@' || prev == '.' ) {\n // no need to add an extra '.'\n }\n else {\n sb.append( '.' );\n }\n }\n\n sb.append( curr );\n prev = curr;\n }\n\n return sb.toString();\n }", "private String prependServerDot(String s) {\n\n final String namedot = serverEnv.getInstanceName() + \".\";\n\n if(s.startsWith(namedot))\n return s;\n\n return namedot + s;\n }", "public static String ConvertExtension(String s,String dot) {\n\t\tif(!s.contains(dot)) {\n\t\t\treturn s+dot;\n\t\t}\n\t\treturn s;\n\t}", "public String stripExtension(String s) {\n return s != null && s.lastIndexOf(\".\") > 0 ? s.substring(0, s.lastIndexOf(\".\")) : s;\n }", "String noExt(String name) {\r\n int last=name.lastIndexOf(\".\");\r\n if(last>0)\r\n return name.substring(0, last);\r\n\r\n return name;\r\n }", "@Override\n\t\t\tprotected String formatValue(String text) {\n\t\t\t\treturn text.substring(0, text.lastIndexOf('.'));\n\t\t\t}", "private String retrieveFileExtension(String targetFile)\r\n\t{\r\n\t\tString result = \"\";\r\n\t\tfor (int index = targetFile.length(); index > 0; index--)\r\n\t\t{\r\n\t\t\tif (targetFile.charAt(index - 1) == '.')\r\n\t\t\t{\r\n\t\t\t\tresult = targetFile.substring(index, targetFile.length());\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (result.equals(targetFile))\r\n\t\t\treturn \"\";\r\n\t\treturn result;\r\n\t}", "private String stripExtension(String str) {\n\t\tif (str == null)\n\t\t\treturn null;\n\t\tint pos = str.lastIndexOf(\".\");\n\t\tif (pos == -1)\n\t\t\treturn str;\n\t\treturn str.substring(0, pos);\n\t}", "private String removeContainsDot(String amount) {\n if (amount != null && !TextUtils.isEmpty(amount)) {\n if (amount.contains(\".\")) {\n String result = amount.substring(0, amount.indexOf(\".\"));\n return result;\n } else {\n return amount;\n }\n }\n return \"0\";\n }", "public static void main(String[] args){\n\n String fileName = \"abc.jpeg\";\n String[] parts = fileName.split(\"\\\\.\");\n\n System.out.println(parts[1]);\n\n\n\n }", "private final String stripDot(XMLElement e) {\n\t\tif ( e.getName().indexOf(\".\") == -1 ) {\n\t\t\treturn e.getName();\n\t\t}\n\t\tString value = e.getName().substring(e.getName().indexOf(\".\") + 1);\n\t\treturn value;\n\t}", "private static String m1026a(String str) {\n return str.split(\"\\\\.config\\\\.\", 2)[0];\n }", "private static String reduce(final String name) {\n\t\tint index = name.lastIndexOf('.');\n\t\treturn index == -1 ? null : name.substring(0, index);\n\t}", "protected String extractPrefix(IDocument document, int offset) {\r\n\t\tint i = offset;\r\n\t\tif (i > document.getLength())\r\n\t\t\treturn \"\"; //$NON-NLS-1$\r\n\r\n\t\ttry {\r\n\t\t\twhile (i > 0) {\r\n\t\t\t\tchar ch = document.getChar(i - 1);\r\n\t\t\t\tif (ch != '.' && !Character.isJavaIdentifierPart(ch))\r\n\t\t\t\t\tbreak;\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t\treturn document.get(i, offset - i);\r\n\t\t} catch (BadLocationException e) {\r\n\t\t\treturn \"\"; //$NON-NLS-1$\r\n\t\t}\r\n\t}", "protected String getName( String key ){\n\n return ( key.indexOf( '.' ) == -1 )?\n //if there is no instance of . then the key is the name\n key:\n //else get the substring to first dot\n key.substring( 0, key.indexOf( '.' ));\n }", "public String smartDot(String s) {\n\t\t\t \ts = s.substring(0, (s.length() - 1)) + \"_\";\n\t\t\t \ts = s.replace(\"._\", \"s.\");\n\t s = s.replace(\" _\", \"s.\");\n\t s = s.replace(\"_\", \".\");\n\t return s;\n\t\t\t }", "public static String stripDots(String s) {\n String out = \"\";\n for(Character c : s.toCharArray()) {\n out += removeDot(c);\n }\n return out;\n }", "private static String extractClassName(String classNameWithExtension) {\n\n\t\treturn classNameWithExtension.replace(classExtension, \"\");\n\t}", "static public String stripExtension(String str) {\n\r\n\t\tif (str == null)\r\n\t\t\treturn null;\r\n\r\n\t\t// Get position of last '.'.\r\n\r\n\t\tint pos = str.lastIndexOf(\".\");\r\n\r\n\t\t// If there wasn't any '.' just return the string as is.\r\n\r\n\t\tif (pos == -1)\r\n\t\t\treturn str;\r\n\r\n\t\t// Otherwise return the string, up to the dot.\r\n\r\n\t\treturn str.substring(0, pos);\r\n\t}", "public static String stringBefore (String in, String token) {\n\t\tint index = in.indexOf(token);\n\t\tif (index == -1)\n\t\t\treturn in; // not found, returning full String\n\t\telse\n\t\t\treturn in.substring(0, index);\n\t}", "private String parseVersion(String version) {\n\n String[] subString = version\n .replaceAll(\"\\\\s+\",\"\") // Removes whitespace\n .replaceAll(\"\\\\p{L}+\",\"\") // Removes alpha characters a-zA-Z\n .split(\"\\\\.\"); // Removes alpha characters\n\n if(subString.length == 0){\n return \"\";\n }else if (subString.length == 1){\n return subString[0] + \".0\";\n }else {\n return subString[0] + \".\" + subString[1];\n }\n }", "public static String toSentenceCase(String s) {\n if (s != null && !s.isEmpty()) {\n int length = s.length();\n String temp = \"\";\n int position = 0;\n for (int i = 0; i < length; i++) {\n if (s.charAt(i) == '.') {\n temp = temp.concat(s.substring(position, position + 1).toUpperCase() + s.substring(position + 1, i + 1));\n position = i + 1;\n }\n }\n if (position < length)\n temp = temp.concat(s.substring(position, position + 1).toUpperCase() + (position >= length - 1 ? \"\" : s.substring(position + 1)));\n return temp;\n } else\n return \"\";\n }", "private static String getLastToken(String s)\r\n {\r\n int index = s.lastIndexOf('.');\r\n if (index == -1)\r\n {\r\n return null;\r\n }\r\n return s.substring(index+1);\r\n }", "public static String getExtn(String fileName)\r\n\t{\r\n\t\tString res=\"\";\r\n\t\tfor(int i=fileName.length()-1;i>=0;i--)\r\n\t\t{\r\n\t\t\tif(fileName.charAt(i)!='.')\r\n\t\t\t\tres=fileName.charAt(i)+res;\r\n\t\t\telse \r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn res;\r\n\t}", "public static String removePeriod(String s)\r\n/* 119: */ {\r\n/* 120:115 */ s = s.trim();\r\n/* 121:116 */ char last = s.charAt(s.length() - 1);\r\n/* 122:117 */ if (\".?!\".indexOf(last) >= 0) {\r\n/* 123:118 */ return s.substring(0, s.length() - 1).trim();\r\n/* 124: */ }\r\n/* 125:120 */ return s;\r\n/* 126: */ }", "private String reassemble(int start, String[] split)\n {\n int count = split.length - start;\n\n if (count == 0)\n return null;\n\n if (count == 1)\n return split[split.length - 1];\n\n StringBuffer buffer = new StringBuffer();\n\n for (int i = start; i < split.length; i++)\n {\n if (i > start)\n buffer.append('.');\n\n buffer.append(split[i]);\n }\n\n return buffer.toString();\n }", "private static String abbrv(String str, int max, boolean dots) {\n String firstString = str.split(\"\\n\")[0];\n int len = firstString.length();\n String ret;\n if (len > max) {\n ret = (dots ? firstString.substring(0, max - 3) + \"...\" : firstString.substring(0, max));\n } else {\n ret = firstString;\n }\n return ret;\n }", "@NotNull\n public static String getFirstPackage(@NotNull String packageName) {\n int idx = packageName.indexOf('.');\n return idx >= 0 ? packageName.substring(0, idx) : packageName;\n }", "public static String stripExtension(String name) {\n return name.split(\"\\\\.\")[0];\n }", "public static double prefixString(String s1, String s2) {\n String[] a1 = s1.split(\"\\\\.\");\n String[] a2 = s2.split(\"\\\\.\");\n\n int min = Math.min(a1.length, a2.length);\n int max = Math.max(a1.length, a2.length);\n int cnt = 0;\n\n for (int i = 0; i < min; ++i) {\n if (a1[i].equals(a2[i])) {\n cnt += 1;\n } else {\n break;\n }\n }\n return formatDouble((double) cnt / min);\n }", "public String getExtension() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.get(this.lenght - 1).contains(\".\"))\n\t\t{\n\t\t\tString temp = this.get(this.lenght - 1);\n\t\t\t\n\t\t\tString[] parts = temp.split(\"\\\\.\");\n\t\t\t\n\t\t\tresult = parts[parts.length - 1];\n\t\t}\n\t\telse\n\t\t\tresult = \"\";\n\t\t\n\n\t\treturn result;\n\t}", "public static String extractAgentName(final String qualifiedName) {\n //Preconditions\n assert StringUtils.isNonEmptyString(qualifiedName) : \"qualifiedName must be a non empty string\";\n\n final String[] names = qualifiedName.split(\"\\\\.\");\n assert names.length == 3;\n\n return names[1];\n }", "public String extractAgentName() {\n\n final String[] names = name.split(\"\\\\.\");\n assert names.length > 1;\n\n return names[1];\n }", "public static String lastDotValue(String tokenString) {\n\t\tString[] strings = tokenString.split(\"\\\\.\");\n\t\treturn strings[strings.length -1];\n\t}", "String extractSlice(String s, int where, String start, String end) {\n int startInd;\n int endInd;\n\n if (start == null) {\n startInd = where;\n } else {\n int i = s.indexOf(start, where);\n if (i < 0) {\n return null;\n }\n startInd = i + start.length();\n }\n\n if (end == null) {\n endInd = s.length();\n } else {\n endInd = s.indexOf(end, startInd);\n if (endInd == -1) {\n return null;\n }\n }\n\n try {\n return s.substring(startInd, endInd);\n } catch (StringIndexOutOfBoundsException e) {\n return null;\n }\n }", "public String getCutString(final String s, final int i) {\n final String emptyString = \"\";\n\n final String dotted = \"...\";\n if (s.length() > (i + dotted.length())) {\n return s.substring(0, i) + dotted;\n } else if (s.length() == 0) {\n return emptyString;\n } else {\n return s;\n }\n\n }", "private String compactDescription(String sentence) {\n if (StringUtils.isNotEmpty(sentence)) {\n if (StringUtils.contains(sentence, \".\")) {\n return StringUtils.substringBefore(sentence, \".\") + \".\";\n } else {\n return sentence;\n }\n }\n return sentence;\n }", "public static String extractContainerAgentName(final String qualifiedName) {\n //Preconditions\n assert StringUtils.isNonEmptyString(qualifiedName) : \"qualifiedName must be a non empty string\";\n\n final String[] names = qualifiedName.split(\"\\\\.\");\n assert names.length == 3;\n return names[0] + '.' + names[1];\n }", "private String subStringToInteger(String quantity) {\n String substring = null;\n\n if (quantity.contains(\".\")) {\n int indexEnd = quantity.indexOf(\".\");\n substring = quantity.substring(0, indexEnd);\n }\n\n return substring == null ? quantity : substring;\n }", "public String extractSubString(String original,String toTake) {\n String str=\"\";\n boolean condition = true;\n int i =0;\n while(condition)\n {\n if(i>original.length()-1)\n {\n condition=false;\n \n }\n else{\n char c= original.charAt(i);\n if(str.equalsIgnoreCase(toTake)){\n return original.substring(i+1);\n \n }\n \n else if (c!=' ')\n {\n str = str+c;\n }\n i++;\n }\n }\n return null;\n }", "public String check_after_decimal_point(double decimal) {\n String result = null;\n String[] after_point = String.valueOf(decimal).split(\"[:.]\");\n if (after_point[after_point.length - 1].equals(\"0\")) {\n result = after_point[0];\n } else {\n result = String.valueOf(decimal).replace(\".\", \",\");\n }\n return result;\n }", "private static String cleanModuleName(String mn) {\n // replace non-alphanumeric\n mn = Patterns.NON_ALPHANUM.matcher(mn).replaceAll(\".\");\n\n // collapse repeating dots\n mn = Patterns.REPEATING_DOTS.matcher(mn).replaceAll(\".\");\n\n // drop leading dots\n if (!mn.isEmpty() && mn.charAt(0) == '.')\n mn = Patterns.LEADING_DOTS.matcher(mn).replaceAll(\"\");\n\n // drop trailing dots\n int len = mn.length();\n if (len > 0 && mn.charAt(len-1) == '.')\n mn = Patterns.TRAILING_DOTS.matcher(mn).replaceAll(\"\");\n\n return mn;\n }", "public static String getExt(String name) {\n\t\tif (name == null) return null;\n\t\tint s = name.lastIndexOf('.');\n\t\treturn s == -1 ? null : s == 0 ? name : name.substring(s);\n\t}", "private static String getParentPath(String path) {\n return path.contains(\".\") ? path.substring(0, path.lastIndexOf('.')) : \"\";\n }", "private String extensions() {\n return Arrays.stream(f.getName().split(\"\\\\.\")).skip(1).collect(Collectors.joining(\".\"));\n }", "public static String getPackage(String element) {\n return element.substring(0, element.lastIndexOf('.'));\n }", "private String removeExtension(String string) {\n\t\tString pathWithoutExtension = string;\n\t\tint dotIndex = string.lastIndexOf('.');\n\t\tif (dotIndex > 0) {\n\t\t\tpathWithoutExtension = string.substring(0, dotIndex);\n\t\t}\n\t\treturn pathWithoutExtension;\n\t}", "@Override\n public void afterTextChanged(Editable s) {\n String temp = s.toString();\n int d = temp.indexOf(\".\");\n if (d < 0) {\n return;\n }\n if (temp.length() - d - 1 > 2) {\n s.delete(d + 3, d + 4);\n } else if (d == 0) {\n s.delete(d, d + 1);\n }\n\n }", "public static String addDots(String s) {\n String out = \"\";\n for(Character c : s.toCharArray()) {\n out += addDot(c);\n }\n return out;\n }", "private static String getFileRoot(String file) {\r\n \treturn file.substring(0, file.indexOf('.'));\r\n }", "public String extractName(String line) {\n\t\t// Linux case\n\t\tif (line.contains(\"/\")) {\n\t\t\treturn line.substring(line.lastIndexOf(\"/\") + 1, line.indexOf(\".\"));\n\t\t}\n\t\t// Root dir case\n\t\treturn line.substring(1, line.indexOf(\".\")).trim();\n\t}", "private static String packageName(String cn) {\n int index = cn.lastIndexOf('.');\n return (index == -1) ? \"\" : cn.substring(0, index);\n }", "private static String getExtensionOrFileName(String filename, boolean extension) {\n\n\t\tString fileWithExt = new File(filename).getName();\n\t\tStringTokenizer s = new StringTokenizer(fileWithExt, \".\");\n\t\tif (extension) {\n\t\t\ts.nextToken();\n\t\t\treturn s.nextToken();\n\t\t} else\n\t\t\treturn s.nextToken();\n\t}", "public static String cutOut(String mainStr, String subStr){\n if (mainStr.contains(subStr))\n {\n String front = mainStr.substring(0, (mainStr.indexOf(subStr))); //from beginning of mainStr to before subStr\n String back = mainStr.substring((mainStr.indexOf(subStr)+subStr.length())); //the string in mainStr after the subStr\n return front + back;\n }\n else // if subStr isn't in the mainStr it just returns mainStr\n {\n return mainStr;\n }\n }", "private String trimRelease(String release) {\n int dotCnt = 0;\n int col = 0;\n while (col < release.length()) {\n char chr = release.charAt(col);\n if (chr == '.' || chr == '-') {\n if (++dotCnt >= 3) break;\n }\n else if (chr >= 'A' && chr <= 'Z') break;\n col++;\n }\n return release.substring(0,col);\n }", "private static String canonicalDecimalStr_X(BigDecimal d) {\n String x = d.toPlainString() ;\n\n // The part after the \".\"\n int dotIdx = x.indexOf('.') ;\n if ( dotIdx < 0 )\n // No DOT.\n return x+\".0\";\n\n // Has a DOT.\n int i = x.length() - 1 ;\n // dotIdx+1 to leave at least \".0\"\n while ((i > dotIdx + 1) && x.charAt(i) == '0')\n i-- ;\n if ( i < x.length() - 1 )\n // And trailing zeros.\n x = x.substring(0, i + 1) ;\n // Avoid replaceAll as it is expensive.\n // Leading zeros.\n int j = 0;\n for ( ; j < x.length() ; j++ ) {\n if ( x.charAt(j) != '0')\n break;\n }\n // At least one zero before dot.\n if ( j == dotIdx )\n j--;\n if ( j > 0 )\n x = x.substring(j, x.length());\n return x;\n }", "private String getParentId(String id) {\r\n\r\n String[] data = id.split(\"\\\\.\");\r\n String idParent = null;\r\n\r\n for (int i = data.length - 2; i >= 0; i--) {\r\n if (idParent == null) {\r\n idParent = data[i];\r\n } else {\r\n idParent = data[i] + \".\" + idParent;\r\n }\r\n }\r\n return idParent;\r\n }", "public String getClassName(final String fullClassName) {\r\n\t\tint lastIndexPoint = fullClassName.lastIndexOf(\".\");\r\n\t\tString resultClassName = fullClassName.substring(lastIndexPoint + 1,\r\n\t\t\t\tfullClassName.length());\r\n\t\treturn resultClassName;\r\n\t}", "public String filter(String result) {\r\n\t\tif (result.indexOf(\".\") != -1) {\r\n\t\t\twhile (result.endsWith(\"0\")) {\r\n\t\t\t\tresult = result.substring(0, result.length() - 1);\r\n\t\t\t\tif (result.endsWith(\".\")) {\r\n\t\t\t\t\tresult = result.substring(0, result.length() - 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private String getSimpleName(String name) {\n\t\tint i = name.lastIndexOf(\".\");\n\t\treturn name.substring(i + 1);\n\t}", "public static String lastTerm(String input)\n {\n assert isNonBlank(input);\n int dotx = input.lastIndexOf('.');\n \n if (dotx < 0)\n return input;\n \n return input.substring(dotx + 1);\n }", "public static String getExtension(String img) {\n String[] arr = img.split(\"\\\\.\");\n return arr[arr.length - 1];\n }", "private String getExtension(File f) {\n\t\tString e = null;\n\t\tString s = f.getName();\n\t\tint i = s.lastIndexOf('.');\n\n\t\tif (i > 0 && i < s.length() - 1) {\n\t\t\te = s.substring(i + 1).toLowerCase();\n\t\t}\n\t\treturn e;\n\t}", "public String atFirst(String str) {\r\n return str.length() > 1 ? str.substring(0, 2) : (str + \"@@\").substring(0, 2);\r\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n System.out.println(\"Enter valid email address\");\n\n String email = scan.nextLine();\n\n int lastIndexOfPart1 = email.lastIndexOf(\"@\");\n System.out.println(lastIndexOfPart1);\n System.out.println(email.substring(0,lastIndexOfPart1 ));\n\n int indexOfPart2 = email.indexOf(\"@\") + 1;\n int lastIndexOfPart2 = email.lastIndexOf(\".\");\n\n\n\n System.out.println(email.substring(indexOfPart2,lastIndexOfPart2 ));\n\n int indexOfPart3 = email.indexOf(\".\") + 1;\n System.out.println(email.substring(indexOfPart3) );\n\n email = email.substring(0,lastIndexOfPart1) +\"@\"+email.substring(indexOfPart2,lastIndexOfPart2 )+\".\"+email.substring(indexOfPart3);\n System.out.println(email);\n\n\n\n\n\n\n\n\n\n }", "private static char getFileExt(String file) {\r\n \treturn file.charAt(file.indexOf('.')+1);\r\n }", "@NotNull\n public static String dropFirstPackage(@NotNull String packageName) {\n int idx = packageName.indexOf('.');\n return idx >= 0 ? packageName.substring(idx + 1) : \"\";\n }", "static String cutName(String input) { return input.split(\" \")[0]; }", "private String getSplitCapitalPeriodSent(String text) {\n\t\t\r\n\t\tString testString = text;\r\n\t\t\r\n\t\t/*\r\n\t\ttestString = testString.replaceAll(\"\\\\·\", \".\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t// https://d5gate.ag5.mpi-sb.mpg.de/ClausIEGate/ClausIEGate?inputtext=Optimal+temperature+and+pH+for+growth+are+25%E2%80%9330+%CB%9AC+and+pH+7%2C+respectively.&processCcAllVerbs=true&processCcNonVerbs=true&type=true&go=Extract\r\n\t\ttestString = testString.replaceAll(\"\\\\s?\\\\·\\\\s?\", \".\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t\r\n\t\ttestString = testString.replaceAll(\"–\", \"-\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t// https://d5gate.ag5.mpi-sb.mpg.de/ClausIEGate/ClausIEGate?inputtext=Optimal+temperature+and+pH+for+growth+are+25%E2%80%9330+%CB%9AC+and+pH+7%2C+respectively.&processCcAllVerbs=true&processCcNonVerbs=true&type=true&go=Extract\r\n\t\ttestString = testString.replaceAll(\"\\\\s?-\\\\s?\", \"-\"); // To avoid the error ClausIE spliter: the dash will disappear\r\n\t\t*/\r\n\t\t\r\n\t\t// System.out.println(\"testString::Before::\" + testString);\r\n\t\t\r\n\t\tString targetPatternString = \"(\\\\s[A-Z]\\\\.\\\\s)\";\r\n\t\tPattern pattern = Pattern.compile(targetPatternString);\r\n\t\tMatcher matcher = pattern.matcher(testString);\r\n\t\t\r\n\t\twhile (matcher.find()) {\r\n\t\t\t// System.out.println(\"Whloe Sent::\" + matcher.group());\r\n\t\t\t// System.out.println(\"Part 1::\" + matcher.group(1));\r\n\t\t\t// System.out.println(\"Part 2::\" + matcher.group(2));\r\n\t\t\t// System.out.println(\"Part 3::\" + matcher.group(3));\r\n\t\t\t\r\n\t\t\tString matchString = matcher.group(1);\r\n\t\t\t\r\n\t\t\tString newMatchString = \"\";\r\n\t\t\tfor ( int j = 0; j < matchString.length(); j++ ) {\r\n\t\t\t\tnewMatchString += matchString.substring(j, j+1) + \" \";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"getSplitCapitalPeriodSent::OriginalSent::\" + text);\r\n\t\t\tSystem.out.println(\"matchString:: \" + matchString);\r\n\t\t\tSystem.out.println(\"newMatchString:: \" + newMatchString);\r\n\t\t\t\r\n\t\t\tlog(LogLevel.INFO, \"getSplitCapitalPeriodSent::OriginalSent::\" + text);\r\n\t\t\tlog(LogLevel.INFO, \"matchString:: \" + matchString);\r\n\t\t\tlog(LogLevel.INFO, \"newMatchString:: \" + newMatchString);\r\n\t\t\t\r\n\t\t\ttestString = testString.replaceAll(matcher.group(1), newMatchString);\r\n\t\t\t\r\n\t\t\t// String matchResult = matcher.group(1);\r\n\t\t\t// System.out.println(\"matchResult::\" + matchResult);\r\n\t\t}\r\n\t\t\r\n\t\t// System.out.println(\"testString::After::\" + testString);\r\n\t\t\r\n\t\treturn testString;\r\n\t\t\r\n\t}", "private static String getSimpleClassName(String className) {\n\n\n\t\tString[] names = className.split(\"\\\\.\");\n\n\t\tfor (int i = 0; i < names.length; i++) {\n\t\t\tLog.d(\"\", \"names =\" + names[i]);\n\t\t}\n\n\t\treturn names[names.length - 1];\n\t}", "java.lang.String getParent();", "java.lang.String getParent();", "private static String resolveName(@Nonnull final Class<?> clazz) {\n\t\tfinal String n = clazz.getName();\n\t\tfinal int i = n.lastIndexOf('.');\n\t\treturn i > 0 ? n.substring(i + 1) : n;\n\t}", "public boolean supportsEightDot();", "@Override\n public void afterTextChanged(Editable s) {\n if (s.length() > 4) {\n if (s.charAt(s.length() - 4) == '.') {\n s.delete(s.length() - 1, s.length());\n }\n }\n }", "private Optional<String> toServiceName(String cf) {\n assert cf.startsWith(SERVICES_PREFIX);\n int index = cf.lastIndexOf(\"/\") + 1;\n if (index < cf.length()) {\n String prefix = cf.substring(0, index);\n if (prefix.equals(SERVICES_PREFIX)) {\n String sn = cf.substring(index);\n if (Checks.isClassName(sn))\n return Optional.of(sn);\n }\n }\n return Optional.empty();\n }", "public String source(String src)\n\t{\n\t\tint i;\n\t\tString [] toks = src.split(\"\\\\s+\");\n\t\tString ret = toks[sourceStart];\n\t\tfor (i = sourceStart + 1; i < sourceEnd; i++) {\n\t\t\tret += \" \" + toks[i];\n\t\t}\n\t\treturn ret;\n\t}", "private static String getFQClassName(final String root, final String path) {\r\n\t\t//Remove root from front of path and \".class\" from end of path\r\n\t\tString trimmed = path.substring(path.indexOf(root) + root.length(), path.indexOf(\".class\"));\r\n\t\t\r\n\t\t//Replace backslashes with periods\r\n\t\treturn trimmed.replaceAll(Matcher.quoteReplacement(\"\\\\\"), \".\");\r\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}", "protected String findWrappedInDefaultComponentChrome(String target, String source)\r\n {\r\n return findBetweenPrefixAndSuffix(target, source, _DEFAULT_COMPONENT_CHROME_PREFIX, _DEFAULT_COMPONENT_CHROME_SUFFIX);\r\n }", "private String getKey(final String string) {\n String value = string.replace(\"/\", \".\");\n value = value.replace(\"..\", \".\");\n if (value.endsWith(\".\")) {\n value = value + \"root\";\n }\n\n if (value.startsWith(\"_\")) {\n value = value.substring(1);\n }\n\n return value;\n }", "@Test\r\n\tpublic void testDotDot() throws Exception {\r\n\t\tfinal String module = \"-------------- MODULE Testing ----------------\\n\"\r\n\t\t\t\t+ \"EXTENDS Naturals \\n\"\r\n\t\t\t\t+ \"ASSUME 1 \\\\in 1 .. 2 \\n\"\r\n\t\t\t\t+ \"=================================\";\r\n\t\tStringBuilder sb = TestUtil.translateString(module);\r\n\t\tfinal String expected = \"MACHINE Testing\\n\"\r\n\t\t\t\t+ \"PROPERTIES 1 : 1..2 \\n\"\r\n\t\t\t\t+ \"END\";\r\n\t\tassertEquals(TestUtil.getTreeAsString(expected), TestUtil.getTreeAsString(sb.toString()));\r\n\t}", "public static String parseSortClassName(final String name) {\n final int index = name.lastIndexOf('.');\n return name.substring(index + 1, name.length());\n }", "public static String getServicePackageName(String packagePrefix) {\n List<String> split = Splitter.on('/').splitToList(packagePrefix);\n String localName = \"\";\n if (split.size() < 2) {\n throw new IllegalArgumentException(\"expected packagePrefix to have at least 2 segments\");\n }\n // Get the second to last value.\n // \"google.golang.org/api/logging/v2beta1\"\n // ^^^^^^^\n localName = split.get(split.size() - 2);\n return localName;\n }", "static String findSubstringByHeaderString(String src, int start, String before, String after, boolean caseSensitive)\n throws UnexpectedFormatException {\n int pos = safeIndexOf(src, before, start, caseSensitive);\n int end = after.length()==0 ? src.length() : safeIndexOf(src, after, pos+before.length(), caseSensitive);\n char chars[] = new char[end-(pos+before.length())];\n src.getChars(pos+before.length(), end, chars, 0);\n return new String(chars);\n }", "private int getNamespaceEnd() {\n int index = data.substring(tokenStart, tokenEnd).indexOf(\".\");\n return index != -1 ? index + tokenStart : tokenEnd;\n }", "public static final String getSubDomain(String serverName) {\n\t\tString subDomain = null;\n\t\tboolean hitDomainType = false;\n\n\t\tint i = serverName.length() - 1;\n\n\t\tfor (; i > 0; i--) {\n\t\t\tchar character = serverName.charAt(i);\n\n\t\t\tif (character == '.') {\n\t\t\t\tif (hitDomainType) {\n\t\t\t\t\tsubDomain = serverName.substring(0, i);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\thitDomainType = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn subDomain;\n\t}", "private String getPDFFileName(){\r\n String[] split = inputFilePath.split(\"\\\\\\\\\");\r\n\r\n return split[split.length-1].split(\"\\\\.\")[0];\r\n }" ]
[ "0.66836685", "0.6145251", "0.5981053", "0.59653634", "0.59309566", "0.5883752", "0.5860139", "0.58533925", "0.58473414", "0.58469635", "0.58440304", "0.5760867", "0.5708523", "0.56729156", "0.5596731", "0.5497308", "0.54860926", "0.5471941", "0.5449167", "0.54105306", "0.53469425", "0.53326064", "0.53323096", "0.53296036", "0.53119403", "0.5293077", "0.52845246", "0.5256284", "0.5242022", "0.5234446", "0.5223861", "0.52224696", "0.5221387", "0.52043116", "0.5181924", "0.5175136", "0.5174743", "0.5161009", "0.51513356", "0.51183265", "0.5111085", "0.5080697", "0.506756", "0.50625837", "0.5034474", "0.50251925", "0.5023112", "0.50089425", "0.4986366", "0.49483615", "0.49447292", "0.4907775", "0.49064413", "0.49001354", "0.48991442", "0.489522", "0.4895034", "0.48839024", "0.48771882", "0.4876605", "0.48739833", "0.48738682", "0.4867589", "0.48648068", "0.48474622", "0.48466477", "0.4842387", "0.48178005", "0.48102325", "0.48092648", "0.48046306", "0.47885713", "0.4772365", "0.4736743", "0.47203118", "0.4700384", "0.46960962", "0.46926886", "0.4692188", "0.46765348", "0.46753535", "0.46705508", "0.4667253", "0.4667253", "0.4667164", "0.4655541", "0.46497107", "0.46447775", "0.46438473", "0.4642926", "0.46218395", "0.4613912", "0.4608219", "0.4601069", "0.4593244", "0.45916802", "0.45907557", "0.45742014", "0.45728415", "0.45649505" ]
0.6777555
0
Get subString after dot from target string like "yyy" from "xxx.yyy".
public String getStrAfterDot(String str) { if (str==null || str.length()==0) return null; StringBuilder afterStr = new StringBuilder(); int k=0; for (int i=0; i<str.length(); i++) { if (str.charAt(i)=='.') { k=i; break; } } for (int i=k+1; i<str.length(); i++) { afterStr.append(str.charAt(i)); } return afterStr.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String everythingAfterDot(String str) {\n int index = str.indexOf('.');\n\n if (index > -1) {\n return str.substring(index + 1).trim();\n } else {\n return str;\n }\n }", "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 substring(String str)\n\t{\n\t\tString []s1=str.split(\"\\\\.\");\n\t\tint a=s1.length;\n\t\tSystem.out.println(s1[a-1]);\n\t\treturn s1[a-1];\n\t}", "private String getWithoutExtension(String withExtension){\n if (withExtension.contains(\".\")){\n int dot = withExtension.lastIndexOf(\".\");\n return withExtension.substring(0, dot);\n } else {\n return withExtension;\n }\n }", "public static String getInnerName(String s) {\n\t\tint s1 = s.indexOf('.');\n\t\tif (s1 < 0) return s;\n\t\treturn s.substring(s1+1);\n\t}", "private static String m31929a(String str) {\n String[] split = str.split(\"\\\\.\");\n String str2 = split.length > 0 ? split[split.length - 1] : \"\";\n return str2.length() > 100 ? str2.substring(0, 100) : str2;\n }", "private String retrieveFileExtension(String targetFile)\r\n\t{\r\n\t\tString result = \"\";\r\n\t\tfor (int index = targetFile.length(); index > 0; index--)\r\n\t\t{\r\n\t\t\tif (targetFile.charAt(index - 1) == '.')\r\n\t\t\t{\r\n\t\t\t\tresult = targetFile.substring(index, targetFile.length());\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (result.equals(targetFile))\r\n\t\t\treturn \"\";\r\n\t\treturn result;\r\n\t}", "public static String lastDotValue(String tokenString) {\n\t\tString[] strings = tokenString.split(\"\\\\.\");\n\t\treturn strings[strings.length -1];\n\t}", "public static String removeLeadingDots(String dotPrefixedStr) {\n int pos = 0;\n while (pos < dotPrefixedStr.length() && dotPrefixedStr.charAt(pos) == Symbol.C_DOT) {\n pos++;\n }\n return pos < dotPrefixedStr.length() ? dotPrefixedStr.substring(pos) : Normal.EMPTY;\n }", "public String parseDotPathWord( String t )\n {\n StringBuilder sb = t == null ? null : new StringBuilder( t == null ? \"\" : t );\n SourceCodeTokenizer tokenizer = getTokenizer();\n while( match( null, '.' ) )\n {\n if( sb != null )\n {\n sb.append( '.' );\n }\n int mark = tokenizer.mark();\n if( match( null, null, SourceCodeTokenizer.TT_WORD ) || match( null, null, SourceCodeTokenizer.TT_KEYWORD ) )\n {\n if( sb != null )\n {\n sb.append( tokenizer.getTokenAt( mark ).getStringValue() );\n }\n }\n }\n if( sb != null )\n {\n t = sb.toString();\n }\n return t;\n }", "abstract String toDot();", "@Override\n\t\t\tprotected String formatValue(String text) {\n\t\t\t\treturn text.substring(0, text.lastIndexOf('.'));\n\t\t\t}", "public static String ConvertExtension(String s,String dot) {\n\t\tif(!s.contains(dot)) {\n\t\t\treturn s+dot;\n\t\t}\n\t\treturn s;\n\t}", "String noExt(String name) {\r\n int last=name.lastIndexOf(\".\");\r\n if(last>0)\r\n return name.substring(0, last);\r\n\r\n return name;\r\n }", "public String stripExtension(String s) {\n return s != null && s.lastIndexOf(\".\") > 0 ? s.substring(0, s.lastIndexOf(\".\")) : s;\n }", "private static String getLastToken(String s)\r\n {\r\n int index = s.lastIndexOf('.');\r\n if (index == -1)\r\n {\r\n return null;\r\n }\r\n return s.substring(index+1);\r\n }", "public String getExtension() {\n\t\t\n\t\tString result = null;\n\t\t\n\t\tif(this.get(this.lenght - 1).contains(\".\"))\n\t\t{\n\t\t\tString temp = this.get(this.lenght - 1);\n\t\t\t\n\t\t\tString[] parts = temp.split(\"\\\\.\");\n\t\t\t\n\t\t\tresult = parts[parts.length - 1];\n\t\t}\n\t\telse\n\t\t\tresult = \"\";\n\t\t\n\n\t\treturn result;\n\t}", "public String getStrBeforeDot(String str) {\n\t\tif (str==null || str.length()==0)\n\t\t\treturn null;\n\t\tStringBuilder beforeStr = new StringBuilder();\n\t\tfor (int i=0; i<str.length(); i++) {\n\t\t\tif (str.charAt(i) != '.') \n\t\t\t\tbeforeStr.append(str.charAt(i));\n\t\t\t else \n\t\t\t\tbreak;\n\t\t}\n\t\treturn beforeStr.toString();\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}", "private String stripExtension(String str) {\n\t\tif (str == null)\n\t\t\treturn null;\n\t\tint pos = str.lastIndexOf(\".\");\n\t\tif (pos == -1)\n\t\t\treturn str;\n\t\treturn str.substring(0, pos);\n\t}", "private String trimClassPaths (String s) {\n int idx = 0;\n for (int i = s.length() - 1; i >= 0; i--) {\n if (s.charAt(i) == '.') {\n idx = i;\n break;\n }\n }\n String trimmed = s.substring(idx + 1);\n return trimmed;\n }", "public static String getParentName(String s) {\n\t\tint s1 = s.indexOf('.');\n\t\tif (s1 < 0) return s;\n\t\treturn s.substring(0, s1);\n\t}", "private static String reduce(final String name) {\n\t\tint index = name.lastIndexOf('.');\n\t\treturn index == -1 ? null : name.substring(0, index);\n\t}", "public static void main(String[] args){\n\n String fileName = \"abc.jpeg\";\n String[] parts = fileName.split(\"\\\\.\");\n\n System.out.println(parts[1]);\n\n\n\n }", "public static String lastTerm(String input)\n {\n assert isNonBlank(input);\n int dotx = input.lastIndexOf('.');\n \n if (dotx < 0)\n return input;\n \n return input.substring(dotx + 1);\n }", "private static String m1026a(String str) {\n return str.split(\"\\\\.config\\\\.\", 2)[0];\n }", "private static String abbrv(String str, int max, boolean dots) {\n String firstString = str.split(\"\\n\")[0];\n int len = firstString.length();\n String ret;\n if (len > max) {\n ret = (dots ? firstString.substring(0, max - 3) + \"...\" : firstString.substring(0, max));\n } else {\n ret = firstString;\n }\n return ret;\n }", "static public String stripExtension(String str) {\n\r\n\t\tif (str == null)\r\n\t\t\treturn null;\r\n\r\n\t\t// Get position of last '.'.\r\n\r\n\t\tint pos = str.lastIndexOf(\".\");\r\n\r\n\t\t// If there wasn't any '.' just return the string as is.\r\n\r\n\t\tif (pos == -1)\r\n\t\t\treturn str;\r\n\r\n\t\t// Otherwise return the string, up to the dot.\r\n\r\n\t\treturn str.substring(0, pos);\r\n\t}", "String getSuffix();", "private String removeContainsDot(String amount) {\n if (amount != null && !TextUtils.isEmpty(amount)) {\n if (amount.contains(\".\")) {\n String result = amount.substring(0, amount.indexOf(\".\"));\n return result;\n } else {\n return amount;\n }\n }\n return \"0\";\n }", "public static String removePeriod(String s)\r\n/* 119: */ {\r\n/* 120:115 */ s = s.trim();\r\n/* 121:116 */ char last = s.charAt(s.length() - 1);\r\n/* 122:117 */ if (\".?!\".indexOf(last) >= 0) {\r\n/* 123:118 */ return s.substring(0, s.length() - 1).trim();\r\n/* 124: */ }\r\n/* 125:120 */ return s;\r\n/* 126: */ }", "protected String getName( String key ){\n\n return ( key.indexOf( '.' ) == -1 )?\n //if there is no instance of . then the key is the name\n key:\n //else get the substring to first dot\n key.substring( 0, key.indexOf( '.' ));\n }", "public static String lastName(String name) {\n int i = name.lastIndexOf('.');\n if (i == -1) return name;\n else return name.substring(i + 1);\n }", "public static String getExt(String name) {\n\t\tif (name == null) return null;\n\t\tint s = name.lastIndexOf('.');\n\t\treturn s == -1 ? null : s == 0 ? name : name.substring(s);\n\t}", "private int getNamespaceEnd() {\n int index = data.substring(tokenStart, tokenEnd).indexOf(\".\");\n return index != -1 ? index + tokenStart : tokenEnd;\n }", "private final String stripDot(XMLElement e) {\n\t\tif ( e.getName().indexOf(\".\") == -1 ) {\n\t\t\treturn e.getName();\n\t\t}\n\t\tString value = e.getName().substring(e.getName().indexOf(\".\") + 1);\n\t\treturn value;\n\t}", "private static String packageName(String cn) {\n int index = cn.lastIndexOf('.');\n return (index == -1) ? \"\" : cn.substring(0, index);\n }", "public String smartDot(String s) {\n\t\t\t \ts = s.substring(0, (s.length() - 1)) + \"_\";\n\t\t\t \ts = s.replace(\"._\", \"s.\");\n\t s = s.replace(\" _\", \"s.\");\n\t s = s.replace(\"_\", \".\");\n\t return s;\n\t\t\t }", "private String parseVersion(String version) {\n\n String[] subString = version\n .replaceAll(\"\\\\s+\",\"\") // Removes whitespace\n .replaceAll(\"\\\\p{L}+\",\"\") // Removes alpha characters a-zA-Z\n .split(\"\\\\.\"); // Removes alpha characters\n\n if(subString.length == 0){\n return \"\";\n }else if (subString.length == 1){\n return subString[0] + \".0\";\n }else {\n return subString[0] + \".\" + subString[1];\n }\n }", "private String removeExtension(String string) {\n\t\tString pathWithoutExtension = string;\n\t\tint dotIndex = string.lastIndexOf('.');\n\t\tif (dotIndex > 0) {\n\t\t\tpathWithoutExtension = string.substring(0, dotIndex);\n\t\t}\n\t\treturn pathWithoutExtension;\n\t}", "public static String extractAgentName(final String qualifiedName) {\n //Preconditions\n assert StringUtils.isNonEmptyString(qualifiedName) : \"qualifiedName must be a non empty string\";\n\n final String[] names = qualifiedName.split(\"\\\\.\");\n assert names.length == 3;\n\n return names[1];\n }", "public static String stripExtension(String name) {\n return name.split(\"\\\\.\")[0];\n }", "public static void main(String[] args) {\n String s = \"zazb\";\n// String s = \"zbza\";\n String subStr = lastSubstring(s);\n System.out.println(subStr);\n }", "public static final String getSubDomain(String serverName) {\n\t\tString subDomain = null;\n\t\tboolean hitDomainType = false;\n\n\t\tint i = serverName.length() - 1;\n\n\t\tfor (; i > 0; i--) {\n\t\t\tchar character = serverName.charAt(i);\n\n\t\t\tif (character == '.') {\n\t\t\t\tif (hitDomainType) {\n\t\t\t\t\tsubDomain = serverName.substring(0, i);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\thitDomainType = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn subDomain;\n\t}", "private String prependServerDot(String s) {\n\n final String namedot = serverEnv.getInstanceName() + \".\";\n\n if(s.startsWith(namedot))\n return s;\n\n return namedot + s;\n }", "public static String getPackage(String element) {\n return element.substring(0, element.lastIndexOf('.'));\n }", "public static String stripDots(String s) {\n String out = \"\";\n for(Character c : s.toCharArray()) {\n out += removeDot(c);\n }\n return out;\n }", "public String check_after_decimal_point(double decimal) {\n String result = null;\n String[] after_point = String.valueOf(decimal).split(\"[:.]\");\n if (after_point[after_point.length - 1].equals(\"0\")) {\n result = after_point[0];\n } else {\n result = String.valueOf(decimal).replace(\".\", \",\");\n }\n return result;\n }", "private static String extractClassName(String classNameWithExtension) {\n\n\t\treturn classNameWithExtension.replace(classExtension, \"\");\n\t}", "private static String fixLeadingBracketSugar( String dotNotaton ) {\n\n if ( dotNotaton == null || dotNotaton.length() == 0 ) {\n return \"\";\n }\n\n char prev = dotNotaton.charAt( 0 );\n StringBuilder sb = new StringBuilder();\n sb.append( prev );\n\n for ( int index = 1; index < dotNotaton.length(); index++ ) {\n char curr = dotNotaton.charAt( index );\n\n if ( curr == '[' && prev != '\\\\') {\n if ( prev == '@' || prev == '.' ) {\n // no need to add an extra '.'\n }\n else {\n sb.append( '.' );\n }\n }\n\n sb.append( curr );\n prev = curr;\n }\n\n return sb.toString();\n }", "public static String getExtension(String img) {\n String[] arr = img.split(\"\\\\.\");\n return arr[arr.length - 1];\n }", "public String extractAgentName() {\n\n final String[] names = name.split(\"\\\\.\");\n assert names.length > 1;\n\n return names[1];\n }", "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 extractCompletedSuffix(String word, String prefix) {\n\t\tif (word.startsWith(prefix)) {\n\t\t\treturn word.substring(prefix.length());\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Invalid prefix (word: \" + word + \n\t\t\t\t\t\t\t\t\t\t\" prefix:\" + prefix + \")\");\n\t\t} \n\t}", "@Override\n public void afterTextChanged(Editable s) {\n String temp = s.toString();\n int d = temp.indexOf(\".\");\n if (d < 0) {\n return;\n }\n if (temp.length() - d - 1 > 2) {\n s.delete(d + 3, d + 4);\n } else if (d == 0) {\n s.delete(d, d + 1);\n }\n\n }", "public static String toSentenceCase(String s) {\n if (s != null && !s.isEmpty()) {\n int length = s.length();\n String temp = \"\";\n int position = 0;\n for (int i = 0; i < length; i++) {\n if (s.charAt(i) == '.') {\n temp = temp.concat(s.substring(position, position + 1).toUpperCase() + s.substring(position + 1, i + 1));\n position = i + 1;\n }\n }\n if (position < length)\n temp = temp.concat(s.substring(position, position + 1).toUpperCase() + (position >= length - 1 ? \"\" : s.substring(position + 1)));\n return temp;\n } else\n return \"\";\n }", "public String filter(String result) {\r\n\t\tif (result.indexOf(\".\") != -1) {\r\n\t\t\twhile (result.endsWith(\"0\")) {\r\n\t\t\t\tresult = result.substring(0, result.length() - 1);\r\n\t\t\t\tif (result.endsWith(\".\")) {\r\n\t\t\t\t\tresult = result.substring(0, result.length() - 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static String extractContainerAgentName(final String qualifiedName) {\n //Preconditions\n assert StringUtils.isNonEmptyString(qualifiedName) : \"qualifiedName must be a non empty string\";\n\n final String[] names = qualifiedName.split(\"\\\\.\");\n assert names.length == 3;\n return names[0] + '.' + names[1];\n }", "private static String getPackage(final String fullName) {\n \t\treturn fullName.substring(0, fullName.lastIndexOf(\".\"));\n \t}", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n System.out.println(\"Enter valid email address\");\n\n String email = scan.nextLine();\n\n int lastIndexOfPart1 = email.lastIndexOf(\"@\");\n System.out.println(lastIndexOfPart1);\n System.out.println(email.substring(0,lastIndexOfPart1 ));\n\n int indexOfPart2 = email.indexOf(\"@\") + 1;\n int lastIndexOfPart2 = email.lastIndexOf(\".\");\n\n\n\n System.out.println(email.substring(indexOfPart2,lastIndexOfPart2 ));\n\n int indexOfPart3 = email.indexOf(\".\") + 1;\n System.out.println(email.substring(indexOfPart3) );\n\n email = email.substring(0,lastIndexOfPart1) +\"@\"+email.substring(indexOfPart2,lastIndexOfPart2 )+\".\"+email.substring(indexOfPart3);\n System.out.println(email);\n\n\n\n\n\n\n\n\n\n }", "public String getRevisionSuffix() {\n\t\tString revision = logEntry.getRevision();\n\t\treturn revision.substring(revision.lastIndexOf(\".\") + 1, revision.length());\n\t}", "private String getSuffix(final String fullName) {\n\t\tString suffix = getStringMatching(fullName, SUFFIX_MATCH_REGEX);\n\t\tif (suffix != null) {\n\t\t\tsuffix = suffix.replaceAll(\",\", \"\").replaceAll(WHITESPACE_REGEX, \"\");\n\t\t}\n\t\treturn suffix;\n\t}", "@Override\n public void afterTextChanged(Editable s) {\n if (s.length() > 4) {\n if (s.charAt(s.length() - 4) == '.') {\n s.delete(s.length() - 1, s.length());\n }\n }\n }", "private String reassemble(int start, String[] split)\n {\n int count = split.length - start;\n\n if (count == 0)\n return null;\n\n if (count == 1)\n return split[split.length - 1];\n\n StringBuffer buffer = new StringBuffer();\n\n for (int i = start; i < split.length; i++)\n {\n if (i > start)\n buffer.append('.');\n\n buffer.append(split[i]);\n }\n\n return buffer.toString();\n }", "private String subStringToInteger(String quantity) {\n String substring = null;\n\n if (quantity.contains(\".\")) {\n int indexEnd = quantity.indexOf(\".\");\n substring = quantity.substring(0, indexEnd);\n }\n\n return substring == null ? quantity : substring;\n }", "public String extractName(String line) {\n\t\t// Linux case\n\t\tif (line.contains(\"/\")) {\n\t\t\treturn line.substring(line.lastIndexOf(\"/\") + 1, line.indexOf(\".\"));\n\t\t}\n\t\t// Root dir case\n\t\treturn line.substring(1, line.indexOf(\".\")).trim();\n\t}", "private static char getFileExt(String file) {\r\n \treturn file.charAt(file.indexOf('.')+1);\r\n }", "String extractSlice(String s, int where, String start, String end) {\n int startInd;\n int endInd;\n\n if (start == null) {\n startInd = where;\n } else {\n int i = s.indexOf(start, where);\n if (i < 0) {\n return null;\n }\n startInd = i + start.length();\n }\n\n if (end == null) {\n endInd = s.length();\n } else {\n endInd = s.indexOf(end, startInd);\n if (endInd == -1) {\n return null;\n }\n }\n\n try {\n return s.substring(startInd, endInd);\n } catch (StringIndexOutOfBoundsException e) {\n return null;\n }\n }", "private String extensions() {\n return Arrays.stream(f.getName().split(\"\\\\.\")).skip(1).collect(Collectors.joining(\".\"));\n }", "public String suffix() {\n return string.substring(1);\n }", "public static List<PathElement> parseDotNotationRHS( String dotNotation ) {\n String fixedNotation = fixLeadingBracketSugar( dotNotation );\n List<String> pathStrs = parseDotNotation( new LinkedList<String>(), stringIterator( fixedNotation ), dotNotation );\n\n return parseList( pathStrs, dotNotation );\n }", "public String getCutString(final String s, final int i) {\n final String emptyString = \"\";\n\n final String dotted = \"...\";\n if (s.length() > (i + dotted.length())) {\n return s.substring(0, i) + dotted;\n } else if (s.length() == 0) {\n return emptyString;\n } else {\n return s;\n }\n\n }", "private static String resolveName(@Nonnull final Class<?> clazz) {\n\t\tfinal String n = clazz.getName();\n\t\tfinal int i = n.lastIndexOf('.');\n\t\treturn i > 0 ? n.substring(i + 1) : n;\n\t}", "public static String cutOut(String mainStr, String subStr){\n if (mainStr.contains(subStr))\n {\n String front = mainStr.substring(0, (mainStr.indexOf(subStr))); //from beginning of mainStr to before subStr\n String back = mainStr.substring((mainStr.indexOf(subStr)+subStr.length())); //the string in mainStr after the subStr\n return front + back;\n }\n else // if subStr isn't in the mainStr it just returns mainStr\n {\n return mainStr;\n }\n }", "private String compactDescription(String sentence) {\n if (StringUtils.isNotEmpty(sentence)) {\n if (StringUtils.contains(sentence, \".\")) {\n return StringUtils.substringBefore(sentence, \".\") + \".\";\n } else {\n return sentence;\n }\n }\n return sentence;\n }", "private static String getExtensionOrFileName(String filename, boolean extension) {\n\n\t\tString fileWithExt = new File(filename).getName();\n\t\tStringTokenizer s = new StringTokenizer(fileWithExt, \".\");\n\t\tif (extension) {\n\t\t\ts.nextToken();\n\t\t\treturn s.nextToken();\n\t\t} else\n\t\t\treturn s.nextToken();\n\t}", "private static String cleanModuleName(String mn) {\n // replace non-alphanumeric\n mn = Patterns.NON_ALPHANUM.matcher(mn).replaceAll(\".\");\n\n // collapse repeating dots\n mn = Patterns.REPEATING_DOTS.matcher(mn).replaceAll(\".\");\n\n // drop leading dots\n if (!mn.isEmpty() && mn.charAt(0) == '.')\n mn = Patterns.LEADING_DOTS.matcher(mn).replaceAll(\"\");\n\n // drop trailing dots\n int len = mn.length();\n if (len > 0 && mn.charAt(len-1) == '.')\n mn = Patterns.TRAILING_DOTS.matcher(mn).replaceAll(\"\");\n\n return mn;\n }", "public static String getCompName(String fullName) {\n\t\tString name = cutMetaExt(fullName);\n\t\tint i = name.lastIndexOf(\".\");\n\t\tif (i < 0)\n\t\t\treturn name;\n\t\treturn name.substring(0, i); // cut comp name from path's string\n\t}", "private String getFileName(String url) {\n // get the begin and end index of name which will be between the\n //last \"/\" and \".\"\n int beginIndex = url.lastIndexOf(\"/\")+1;\n int endIndex = url.lastIndexOf(\".\");\n return url.substring(beginIndex, endIndex);\n \n }", "private static String getFQClassName(final String root, final String path) {\r\n\t\t//Remove root from front of path and \".class\" from end of path\r\n\t\tString trimmed = path.substring(path.indexOf(root) + root.length(), path.indexOf(\".class\"));\r\n\t\t\r\n\t\t//Replace backslashes with periods\r\n\t\treturn trimmed.replaceAll(Matcher.quoteReplacement(\"\\\\\"), \".\");\r\n\t}", "public String getClassName(final String fullClassName) {\r\n\t\tint lastIndexPoint = fullClassName.lastIndexOf(\".\");\r\n\t\tString resultClassName = fullClassName.substring(lastIndexPoint + 1,\r\n\t\t\t\tfullClassName.length());\r\n\t\treturn resultClassName;\r\n\t}", "private String getSimpleName(String name) {\n\t\tint i = name.lastIndexOf(\".\");\n\t\treturn name.substring(i + 1);\n\t}", "private static String getFileRoot(String file) {\r\n \treturn file.substring(0, file.indexOf('.'));\r\n }", "public static String getFileExtension(String f) {\n\t\tif (f == null) return \"\";\n\t\tint lastIndex = f.lastIndexOf('.');\n\t\treturn lastIndex > 0 ? f.substring(lastIndex + 1) : \"\";\n\t}", "private String getExtension(java.io.File file){\n String name = file.getName();\n int idx = name.lastIndexOf(\".\");\n if (idx > -1) return name.substring(idx+1);\n else return \"\";\n }", "private String getExtension(File f) {\n\t\tString e = null;\n\t\tString s = f.getName();\n\t\tint i = s.lastIndexOf('.');\n\n\t\tif (i > 0 && i < s.length() - 1) {\n\t\t\te = s.substring(i + 1).toLowerCase();\n\t\t}\n\t\treturn e;\n\t}", "public static String getPackageFromName(String name)\n \t{\n \t\tif (name.lastIndexOf('/') != -1)\n \t\t\tname = name.substring(0, name.lastIndexOf('/'));\n \t\tif (name.startsWith(\"/\"))\n \t\t\tname = name.substring(1);\n \t\treturn name.replace('/', '.');\t\t\n \t}", "public String extractSubString(String original,String toTake) {\n String str=\"\";\n boolean condition = true;\n int i =0;\n while(condition)\n {\n if(i>original.length()-1)\n {\n condition=false;\n \n }\n else{\n char c= original.charAt(i);\n if(str.equalsIgnoreCase(toTake)){\n return original.substring(i+1);\n \n }\n \n else if (c!=' ')\n {\n str = str+c;\n }\n i++;\n }\n }\n return null;\n }", "protected String getFinal(String key) {\n if (key.contains(separator)) {\n return key.substring(key.lastIndexOf(separator) + 1);\n } else {\n return key;\n }\n }", "protected String extractPrefix(IDocument document, int offset) {\r\n\t\tint i = offset;\r\n\t\tif (i > document.getLength())\r\n\t\t\treturn \"\"; //$NON-NLS-1$\r\n\r\n\t\ttry {\r\n\t\t\twhile (i > 0) {\r\n\t\t\t\tchar ch = document.getChar(i - 1);\r\n\t\t\t\tif (ch != '.' && !Character.isJavaIdentifierPart(ch))\r\n\t\t\t\t\tbreak;\r\n\t\t\t\ti--;\r\n\t\t\t}\r\n\t\t\treturn document.get(i, offset - i);\r\n\t\t} catch (BadLocationException e) {\r\n\t\t\treturn \"\"; //$NON-NLS-1$\r\n\t\t}\r\n\t}", "private String getExtension(String path){\n System.out.println(\"Начато получение расширения: \");\n if (path.contains(\".\")){\n int dot = path.lastIndexOf(\".\");\n System.out.println(\"return \"+path.substring(dot, path.length()));\n return path.substring(dot, path.length());\n } else {\n// System.out.println(\"return \\\"\\\"\");\n return \"\";\n }\n }", "public static String stringAfter (String in, String token) {\n\t\tint index = in.lastIndexOf(token);\n\t\tif (index == -1)\n\t\t\treturn EMPTY_STRING; // not found, returning empty String\n\t\telse\n\t\t\treturn in.substring(index+token.length(), in.length());\n\t}", "public static String addDots(String s) {\n String out = \"\";\n for(Character c : s.toCharArray()) {\n out += addDot(c);\n }\n return out;\n }", "private String getPDFFileName(){\r\n String[] split = inputFilePath.split(\"\\\\\\\\\");\r\n\r\n return split[split.length-1].split(\"\\\\.\")[0];\r\n }", "public static String getPackageName(String longClassName) {\r\n\t\tfinal StringTokenizer tk = new StringTokenizer(longClassName, \".\");\r\n\t\tfinal StringBuilder sb = new StringBuilder();\r\n\t\tString last = longClassName;\r\n\t\twhile (tk.hasMoreTokens()) {\r\n\t\t\tlast = tk.nextToken();\r\n\t\t\tif (tk.hasMoreTokens()) {\r\n\t\t\t\tsb.append(last);\r\n\t\t\t\tsb.append(\".\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn sb.toString().substring(0, sb.toString().length() - 1);\r\n\t}", "private String trimRelease(String release) {\n int dotCnt = 0;\n int col = 0;\n while (col < release.length()) {\n char chr = release.charAt(col);\n if (chr == '.' || chr == '-') {\n if (++dotCnt >= 3) break;\n }\n else if (chr >= 'A' && chr <= 'Z') break;\n col++;\n }\n return release.substring(0,col);\n }", "public static String removeFileExt(String primary, String secondary) {\r\n String r = null;\r\n if (primary != null && secondary != null) {\r\n Matcher matcher = Pattern.compile(\"^\\\\^+\").matcher(secondary);\r\n if (matcher.find()) {\r\n String carets = matcher.group(0);\r\n String ext = secondary.replace(carets, \"\");\r\n for (int i = 0; i < carets.length(); i++) {\r\n int last = primary.lastIndexOf('.');\r\n if (last != -1) {\r\n primary = primary.substring(0, primary.lastIndexOf('.'));\r\n }\r\n }\r\n r = primary + ext;\r\n }\r\n }\r\n return r;\r\n }", "public static String getServicePackageName(String packagePrefix) {\n List<String> split = Splitter.on('/').splitToList(packagePrefix);\n String localName = \"\";\n if (split.size() < 2) {\n throw new IllegalArgumentException(\"expected packagePrefix to have at least 2 segments\");\n }\n // Get the second to last value.\n // \"google.golang.org/api/logging/v2beta1\"\n // ^^^^^^^\n localName = split.get(split.size() - 2);\n return localName;\n }", "public static String getDomainName(URL url) {\n\t\tDomainSuffixes tlds = DomainSuffixes.getInstance();\n\t\tString host = url.getHost();\n\t\t// it seems that java returns hostnames ending with .\n\t\tif (host.endsWith(\".\"))\n\t\t\thost = host.substring(0, host.length() - 1);\n\t\tif (IP_PATTERN.matcher(host).matches())\n\t\t\treturn host;\n\n\t\tint index = 0;\n\t\tString candidate = host;\n\t\tfor (; index >= 0;) {\n\t\t\tindex = candidate.indexOf('.');\n\t\t\tString subCandidate = candidate.substring(index + 1);\n\t\t\tif (tlds.isDomainSuffix(subCandidate)) {\n\t\t\t\treturn candidate;\n\t\t\t}\n\t\t\tcandidate = subCandidate;\n\t\t}\n\t\treturn candidate;\n\t}", "public String getSuffixFromN(String line, int n) {\n\t\tint length = line.length();\n\t\tString result = line.substring(length-n,length);\n\t\treturn result;\n\t}" ]
[ "0.664896", "0.63868356", "0.62538195", "0.61562216", "0.6121375", "0.606195", "0.5938521", "0.59027344", "0.58946896", "0.5879726", "0.5873525", "0.5715059", "0.57118666", "0.5686118", "0.56830424", "0.5655413", "0.56468385", "0.5646697", "0.55945235", "0.55935323", "0.55784106", "0.5575266", "0.5563528", "0.5485477", "0.54517406", "0.5448819", "0.53845286", "0.5381391", "0.53694195", "0.53629875", "0.5350944", "0.53503144", "0.5314204", "0.53113127", "0.5296684", "0.52947235", "0.5291558", "0.5284054", "0.52602565", "0.52562124", "0.525127", "0.5240625", "0.5234068", "0.523342", "0.523256", "0.5224875", "0.5208734", "0.5202817", "0.5191177", "0.5189785", "0.5176839", "0.51322955", "0.5129448", "0.5115515", "0.51000196", "0.5097641", "0.5086138", "0.50752956", "0.50657594", "0.50643086", "0.5062884", "0.50587463", "0.50330293", "0.5026342", "0.50216806", "0.5014254", "0.50065553", "0.50025743", "0.49915692", "0.4983942", "0.49701074", "0.4950698", "0.49145257", "0.4912783", "0.49107224", "0.49049667", "0.49042445", "0.49012178", "0.4897811", "0.48971698", "0.48933074", "0.48881552", "0.4870964", "0.48637265", "0.48590535", "0.48546445", "0.48350942", "0.4832057", "0.48313972", "0.48275423", "0.48234683", "0.4820013", "0.4817794", "0.4813119", "0.48100817", "0.48015168", "0.4788373", "0.4787892", "0.47769502", "0.47765794" ]
0.68754584
0
Called when the cookie should be eaten.
public void eatCookie(View view) { // TODO: Find a reference to the ImageView in the layout. Change the image. ImageView imageView = findViewById(R.id.android_cookie_image_view); imageView.setImageResource(R.drawable.after_cookie); // TODO: Find a reference to the TextView in the layout. Change the text. TextView textView = findViewById(R.id.status_text_view); textView.setText(R.string.cookie_im_so_full); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void eatCookie(){\n}", "@Override\n public void postFade() {\n startCapsules();\n heartBeat.startTimer();\n }", "@Override\n\t\tpublic void addCookie(Cookie cookie) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void addCookie(Cookie cookie) {\n\t}", "@Override\n public void addCookie(Cookie arg0) {\n\n }", "private static void cookieMonster (HTTPRequest request)\n\t{\n\t /*if (!request.isCookiesParsed ())\n\t {\n\t \t retVal = request.cookieMonster ();\n\t }*/\n\t \n\t}", "public void addCookie(Cookie cookie) {\n\t\t\n\t}", "@Override\r\n public void delCookie(String name)\r\n {\n\r\n }", "@Override\r\n public void getCookie(String name)\r\n {\n\r\n }", "@Override\r\n public void getAllCookies()\r\n {\n\r\n }", "@Override\n public void filter(ContainerRequestContext requestContext,\n ContainerResponseContext responseContext) throws IOException {\n HttpSession session = requestManager.getHttpSession();\n\n session.keepAlive();\n sessionManager.save(session);\n\n NewCookie sessionCookie = new NewCookie(COOKIE_NAME, session.getSessionId(),\n \"/\", null, null, -1, true, true);\n\n\n logger.trace(\"Request completed with session id {}\", sessionCookie);\n responseContext.getHeaders().add(HttpHeaders.SET_COOKIE, sessionCookie);\n }", "@Override\n public void addCookie(Cookie cookie) {\n this._getHttpServletResponse().addCookie(cookie);\n }", "@Override\r\n public void delAllCookies()\r\n {\n\r\n }", "void killCookie(HttpServletRequest request, HttpServletResponse response, String name);", "protected void setHasCookie (boolean aHasCookie)\n\t{\n\t\thasCookie = aHasCookie;\n\t}", "@Override\n\tpublic void cook() {\n\t\tSystem.out.println(\"Cooking....\\n\");\n\t}", "public void doCookieStuff(Users user)\n {\n HttpServletResponse response = (HttpServletResponse) FacesContext.getCurrentInstance().getExternalContext().getResponse();\n if (userSession.isRemember())\n {\n String uuid = UUID.randomUUID().toString();\n rememberDAOImpl.saveLogin(uuid, user);\n addCookie(response, \"remember\", uuid, 2592000); //thats 30 days in seconds\n } else {\n rememberDAOImpl.removeLogin(user);\n removeCookie(response, \"remember\");\n }\n }", "void addCookie(HttpServletResponse response, Cookie cookie);", "private void expire()\n\t{\n\t\tif (m_expire != 0 && m_timeExp < System.currentTimeMillis())\n\t\t{\n\t\t//\tSystem.out.println (\"------------ Expired: \" + getName() + \" --------------------\");\n\t\t\treset();\n\t\t}\n\t}", "Cookie(){\n number = 0;\n bakeTemp = 0;\n bakeTime = 0;\n isReady = false;\n\n }", "@Override\r\n public void fromFearToChase() {\r\n if (afraid()) {\r\n startChase();\r\n }\r\n }", "@Override\n\tpublic void cookAtHome() {\n\t\t\n\t}", "protected void addFlashCookie(SlingHttpServletResponse response, Form form) {\n final String name = this.getGetLookupKey(form.getName());\n final String value = getQueryParameterValue(form);\n final Cookie cookie = new Cookie(name, value);\n cookie.setMaxAge(COOKIE_MAX_AGE);\n CookieUtil.addCookie(cookie, response);\n }", "@PreDestroy\r\n\tpublic void doMyCleaupStuff() {\r\n\t\t\r\n\t\tSystem.out.println(\"TennisCoach : -> Inside of doMyCleaupStuff()\");\r\n\t}", "public static void acceptCookies() {\n WebElement acceptButton = Browser.driver.findElement(ACCEPT_COOKIES_BUTTON);\n if(acceptButton.isDisplayed()){\n click(ACCEPT_COOKIES_BUTTON);\n }\n }", "@SuppressWarnings(\"unused\")\n void expire();", "public void checkAddAuthCookies(DnCxt cxt, DnRequestHandler handler) throws DnException {\n UserAuthHook.prepAuthCookies.callHook(cxt, this, handler);\n if (handler.setAuthCookie && handler.userAuthCookie != null) {\n var authCookie = handler.userAuthCookie;\n String cookieString = authCookie.toString();\n String cookieVal = coreNode.encryptString(cookieString);\n // Let old cookies hang out for 400 days, even if the cookie only provides a login\n // for day or so.\n Date cookieExpireDate = DnDateUtil.addDays(authCookie.modifiedDate, 400);\n handler.addResponseCookie(AUTH_COOKIE_NAME, cookieVal, cookieExpireDate);\n }\n }", "public abstract void expire();", "@Override\n public void endRequest(HttpServletResponse httpServletResponse) {\n if (wasModified.get()) {\n Cookie newCookie = new Cookie(COOKIE_NAME, sessionId.get());\n newCookie.setPath(\"/\");\n httpServletResponse.addCookie(newCookie);\n }\n\n // -- Clear the threadlocals since we are now exiting this session --\n wasModified.remove();\n sessionId.remove();\n }", "public void onOK() {\n\t\t\t\t\t\t\tlogout();\n\t\t\t\t\t\t}", "@Override\n public void onDone()\n {\n Log.d(APP_LOG_TAG, \"face gone\");\n }", "@Override\n public void onDestroy() {\n if (mWebView != null) {\n \t\n \tCookieManager cookieManager = CookieManager.getInstance();\t\t\n \tcookieManager.setAcceptCookie(true);\t\t\n mWebView.destroy();\n mWebView = null;\n }\n super.onDestroy();\n }", "void killAllCookies(HttpServletRequest request, HttpServletResponse response);", "@Override\r\n\tpublic void setCookie(Date expirationDate, String nameAndValue, String path, String domain, boolean isSecure) {\n\t}", "protected void afterActiveHandled() {\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tCookie[] cookies = req.getCookies();\n\t\tif (cookies != null) {\n\t\t\tfor (Cookie cookie : cookies) {\n\t\t\t\tif (cookie.getName().equals(\"hello-cookie\")) {\n\t\t\t\t\t// cookie has already been created\n\t\t\t\t\tSystem.out.println(\"Replacing old cookie value: \" + cookie.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Cookie cookie = req.getCookie(\"hello-cookie\"); // Java EE 7\n\n\t\t// creating cookies\n\t\tCookie cook = new Cookie(\"hello-cookie\", req.getParameter(\"cookie\"));\n\t\tcook.setMaxAge(2_000_000_000); // expiry\n\t\tresp.addCookie(cook);\n\n\t}", "@RunPrivileged\n\tprivate void addRoutedokterCookie() {\n\n\t\tStringBuilder value = new StringBuilder();\n\t\tvalue.append(\"email:\" + object.getEmail());\n\n\t\t// Lege waardes hoeven niet te worden opgeslagen in cookie\n\t\tif (StringUtils.isNotEmpty(object.getVoornaam())) {\n\t\t\tvalue.append(COOKIE_VALUE_SEPERATOR + \"voornaam:\"\n\t\t\t\t\t+ object.getVoornaam());\n\t\t}\n\n\t\tif (StringUtils.isNotEmpty(object.getNaam())) {\n\t\t\tvalue.append(COOKIE_VALUE_SEPERATOR + \"naam:\" + object.getNaam());\n\t\t}\n\n\t\tif (StringUtils.isNotEmpty(object.getTelefoon())) {\n\t\t\tvalue.append(COOKIE_VALUE_SEPERATOR + \"tel:\" + object.getTelefoon());\n\t\t}\n\n\t\tMap<String, Object> properties = new HashMap<String, Object>();\n\t\tproperties.put(\"maxAge\", MAX_COOKIE_AGE);\n\t\tproperties.put(\"domain\", FacesContext.getCurrentInstance()\n\t\t\t\t.getExternalContext().getRequestServerName());\n\t\tproperties.put(\"path\", FacesContext.getCurrentInstance()\n\t\t\t\t.getExternalContext().getRequestContextPath());\n\n\t\tFacesContext.getCurrentInstance().getExternalContext()\n\t\t\t\t.addResponseCookie(COOKIE_NAME, value.toString(), properties);\n\t}", "void sessionExpired();", "@Override\n\tpublic void expireToken() {\n\t\t\n\t}", "private void removeAppCookie(HttpServletResponse response) {\n Cookie cookie = new Cookie(\"costsManager\", \"\");\n cookie.setMaxAge(0);\n response.addCookie(cookie);\n }", "protected void addSaveCookie() {\n if (getLookup().lookup(SaveCookie.class) == null) {\n getCookieSet().add(this.saveCookie);\n }\n }", "@Override\r\n public void fromDeathToChase() {\r\n if (eaten()) {\r\n startChase();\r\n }\r\n }", "public void onConnectSpamDone() {\n loggingIn = false;\n }", "protected void onCompleteFadeIn() { }", "public static void deleteCookieWebUser (HttpServletRequest request, HttpServletResponse response)\n\t{\n\t\tCookie cookie = new Cookie(COOKIE_NAME, \" \");\n\t\tcookie.setComment(\"Compiere Web User\");\n\t\tcookie.setPath(request.getContextPath());\n\t\tcookie.setMaxAge(1); // second\n\t\tresponse.addCookie(cookie);\n\t}", "public static void deleteCookieWebUser (HttpServletRequest request, HttpServletResponse response)\n\t{\n\t\tCookie cookie = new Cookie(COOKIE_NAME, \" \");\n\t\tcookie.setComment(\"Compiere Web User\");\n\t\tcookie.setPath(request.getContextPath());\n\t\tcookie.setMaxAge(1); // second\n\t\tresponse.addCookie(cookie);\n\t}", "public static void deleteCookieWebUser (HttpServletRequest request, HttpServletResponse response)\n\t{\n\t\tCookie cookie = new Cookie(COOKIE_NAME, \" \");\n\t\tcookie.setComment(\"Compiere Web User\");\n\t\tcookie.setPath(request.getContextPath());\n\t\tcookie.setMaxAge(1); // second\n\t\tresponse.addCookie(cookie);\n\t}", "public static void deleteCookieWebUser (HttpServletRequest request, HttpServletResponse response)\n\t{\n\t\tCookie cookie = new Cookie(COOKIE_NAME, \" \");\n\t\tcookie.setComment(\"Compiere Web User\");\n\t\tcookie.setPath(request.getContextPath());\n\t\tcookie.setMaxAge(1); // second\n\t\tresponse.addCookie(cookie);\n\t}", "private void fish()\n {\n fishing.set(true);\n final int DELAY_VARIANCE = 5000, BASE_SLEEP = 2000;\n\n Tools.sleep(BASE_SLEEP);\n while (!interrupted)\n {\n /* Logout if either the user set a logout time or we ran out of lures. */\n final LocalTime logTime = timeProperty.get();\n if ((logTime != null && Tools.timePassed(logTime))\n || (lureQuit.get() && lure.isOutOfLures()))\n {\n Tools.typeStr(Lang.EN_LOGOUT);\n Controller.sendMessage(Lang.EN_MSG_LOGOUT_CONFIRM);\n break;\n }\n\n /* If a lure needs to be re-applied, use one. */\n if (lure.shouldApply()) lure.apply();\n\n Tools.typeStr(Lang.EN_CAST_FISHING);\n if (scan())\n Controller.sendMessage(reelIn() ? Lang.EN_MSG_FISH_CAUGHT\n : Lang.EN_ERROR_SPLASH_MISSING);\n else\n Controller.sendMessage(Lang.EN_ERROR_BOBBER_MISSING);\n /* Sleep for at least BASE_SLEEP plus an additional random amount. */\n Tools.sleep(BASE_SLEEP + Tools.fluctuate((long) (DELAY_VARIANCE * Math.random())));\n }\n fishing.set(false);\n }", "public boolean isAutohandleCookies() {\n\t return isAutohandlingCookies.get();\n\t}", "@Override\n\tprotected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {\n\t\tSubject subject = getSubject(request, response);\n\t\tif (!subject.isAuthenticated() && !subject.isRemembered()) {\n\t\t\t// 如果没有登录,直接进行之后的流程\n\t\t\treturn true;\n\t\t}\n\t\tString username = (String) subject.getPrincipal();\n\t\tSession session = subject.getSession();\n\t\tString sessionId = (String) session.getId();\n\n\t\tHttpServletRequest req = WebUtils.toHttp(request);\n\t\tServletContext application = req.getSession().getServletContext();\n\t\tDeque<Object> deque = deque = (Deque<Object>) application.getAttribute(username);\n\t\tif (deque == null) {\n\t\t\tdeque = new LinkedList<>();\n\t\t\tdeque.push(sessionId);\n\t\t\tapplication.setAttribute(username, deque);\n\t\t\treturn true;\n\t\t}\n\t\tif (!deque.contains(sessionId) && session.getAttribute(\"kickout\") == null) {\n\t\t\tdeque.push(sessionId);\n\t\t}\n\t\twhile (deque.size() > 1) {\n\t\t\tString kickSessionId = (String) deque.removeLast();\n\t\t\tif (kickSessionId != null) {\n\t\t\t\tSession kickoutSession = null;\n\t\t\t\ttry {\n\t\t\t\t\tkickoutSession = sessionManager.getSession(new DefaultSessionKey(kickSessionId));\n\t\t\t\t\tkickoutSession.setAttribute(\"kickout\", true);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tif (session.getAttribute(\"kickout\") != null) {\n\t\t\tsubject.logout();\n\t\t\tsaveRequest(request);\n\t\t\treq.setAttribute(\"kickMsg\", \"该账号异地登录,您被强制下线\");\n\t\t\tWebUtils.issueRedirect(request, response, kickoutUrl);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "protected void notificationOnExpiration() {\n }", "private int addCookie(String cookie) {\n\t\tif (cookies.contains(cookie)) return 0; //we have this exact cookie\n\n\t\tString newCookieName = cookie.split(\"=\")[0];\n\t\tif (cookies.contains(newCookieName)) replaceCookies(newCookieName); //we have a cookie with the same name as the new cookie, swap them\n\n\t\tprocessor.printSys(\"New Cookie: \" + cookie);\n\t\tcookies += (cookie + \"; \"); //add the new cookie followed by a semicolon\n\n\t\treturn 1;\n\t}", "HttpChannel addResponseCookie(Cookie cookie);", "void onKeepAlive() {}", "private void setCookies(URLConnection conn) {\n\t\tif (cookies.isEmpty()) {conn.setRequestProperty(\"Cookie\", \"\"); return;}\n\n\t\tconn.setRequestProperty(\"Cookie\", cookies);\n\t\tprocessor.printSys(\"Cookies Set: \" + cookies);\n\t}", "public void createCookie(final String cookie);", "protected void onCompleteFadeOut() { }", "public void setAutoHandleCookies(boolean isAutohandlingCookies) {\n\t if (this.isAutohandlingCookies.get() == isAutohandlingCookies) {\n return;\n }\n this.isAutohandlingCookies.set(isAutohandlingCookies);\n resetChain();\n\t}", "@Override\n public void onExpiring(AdColonyInterstitial ad) {\n }", "protected void onEnd() {}", "@Override\n\tpublic void eatOut() {\n\t\t\n\t}", "@Override\n public void validate(Cookie cookie, CookieOrigin origin) throws MalformedCookieException {\n }", "private void doFadeCompleted() {\r\n\t\tif (onStarmapClicked != null) {\r\n\t\t\tonStarmapClicked.invoke();\r\n\t\t}\r\n\t\tdarkness = 0f;\r\n\t}", "public void fadeOut()\n\t\t{\n\t\t\tfadeState = 1;\n\t\t}", "public void onActive() {\n Methods.showMessage(\"Warning\", \"Welcome Back!\", \"Please Continue Filling Out Your Questionanire!\");\n }", "public void part2(){\n Cookie c1 = new Cookie(\"uid\", \"2018\", 1800,false);\n Cookie c2 = new Cookie(\"PICK_KEY\", \"ahmd13ldsws8cw\",10800,true);\n Cookie c3 = new Cookie(\"REMEMBER_ME\",\"true\",10800,true);\n }", "@Override\n\tpublic void remember() {\n\t\t\n\t}", "public void onClosingFinished() {\n super.onClosingFinished();\n resetHorizontalPanelPosition();\n setClosingWithAlphaFadeout(false);\n }", "@Override\n public void onShakeStopped() {\n LogUtil.e(\"onShakeStopped\");\n }", "@Subscribe\n public void userLoggedOut(final MihmandarEvent.UserLoggedOutEvent event) {\n VaadinSession.getCurrent().close();\n Page.getCurrent().reload();\n\n Cookie authenticationCookie = CookieUtil.getAuthenticationCookie();\n CookieDto cookieDto = null;\n if(authenticationCookie != null){\n String cookie = authenticationCookie.getValue();\n try {\n cookieDto = (CookieDto) CookieUtil.deserializeFromString(cookie);\n String token = cookieDto.getToken();\n if(token != null){\n UserToken userToken = userTokenService.findUserTokenByToken(token);\n userToken.setState(EnumYN.N);\n userTokenService.save(userToken);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n }\n\n String result = null;\n try {\n if(cookieDto == null){\n cookieDto = new CookieDto();\n }\n result = CookieUtil.serializeToString(cookieDto);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n Cookie cookieBrowser = new Cookie(CookieUtil.AUTHENTICATION_COOKIE_NAME, result);\n cookieBrowser.setMaxAge(60 * 60 * 24 * 365); // Store cookie for 1 year\n cookieBrowser.setPath(VaadinService.getCurrentRequest().getContextPath());\n VaadinService.getCurrentResponse().addCookie(cookieBrowser);\n }", "protected void kill() {\n\t\tsetDeathTime(0.6);\n\t}", "public void die() {\n if (dayCountDown == 0) {\n new Holdable(getLocation()).init();\n }\n }", "@Override\n\tpublic void eat() {\n\t\t\n\t}", "@Override\n public void onSure() {\n\n }", "public void addCookie(final Cookie cookie)\n\t{\n\t\tif (httpServletResponse != null)\n\t\t{\n\t\t\thttpServletResponse.addCookie(cookie);\n\t\t}\n\t}", "public void setSeCookie(String seCookie) {\n this.seCookie = seCookie;\n }", "public Cookie() {\n }", "public void run() {\t\t\t\t\t\n\t\t\t \tcheckforLogout(false);\n\t\t\t \n\t\t\t }", "public void sessionEnded() {\n\t\t\r\n\t}", "@Override\n\tpublic void DoGoToCashier() {\n\t\t\n\t}", "private void die() {\r\n\t\tisAlive = false;\r\n\t}", "@RequestMapping(\"/\")\n public String home(HttpServletResponse response){\n CookieGenerator cookieGenerator = new CookieGenerator();\n cookieGenerator.setCookieName(\"myTestCookie\");\n cookieGenerator.addCookie(response, \"myValue\");\n\n return \"cookie\";\n }", "public boolean getHasCookie ()\n\t{\n\t\treturn hasCookie;\n\t}", "@PreDestroy\r\n\tpublic void doMyCleanupStuff() {\r\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyCleanupStuff()\");\r\n\t}", "@Override\n protected void end() {\n DemoUtils.fadeOutAndExit(getMainFrame(), 800);\n }", "@Override\n\tpublic void enter() {\n\t\tTemperatureControllerContext.instance().showFanOn();\n\t\ttimer = new Timer(this, 10);\n\t}", "public abstract void onDie();", "@Override\n public void onCanceled() {\n\n logOutNow();\n\n }", "@Override\n public void onSure() {\n\n }", "void die() {\n alive = false;\n setChanged();\n notifyObservers(new Pair<>(\"increaseLives\", -1));\n }", "@Override\n\tpublic void DoGoToDishes() {\n\t\t\n\t}", "public void fechar() {\n\n try {\n geraLog.criaLog(codigoUsuario, \"Principal\", \"Fez Logoff do Sistema\");\n } catch (IOException ex) {\n Logger.getLogger(JfLogin.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n this.dispose();\n\n }", "default void onMissedHeartBeat(SessionID sessionID) {\n }", "@Override\n public void onAddIceCreamRaised() {\n }", "@Override\r\n\tpublic void onDeath() {\n\t\t\r\n\t}", "@Override\n public void checkEffect()\n {\n age(1);\n\n if (!suspended)\n suspend();\n }", "@Override\n public void run() {\n LogoutHelper.logout(context, AppMessage.TOAST_MESSAGE_SESSION_EXPIRED);\n }", "@Override\n public void Die() {\n this.setAlive(false);\n }", "@Override\r\n\t\t\tpublic void onAdExposure() {\n\t\t\t\t\r\n\t\t\t}" ]
[ "0.69748724", "0.6417042", "0.6266617", "0.622248", "0.6173238", "0.6053216", "0.5877469", "0.5876936", "0.5719596", "0.57091975", "0.56308925", "0.5580134", "0.55725247", "0.5554699", "0.5514558", "0.55005276", "0.54839474", "0.54728156", "0.54458797", "0.5435636", "0.5433009", "0.53981674", "0.53663105", "0.5350019", "0.5312727", "0.52632934", "0.52632433", "0.52507246", "0.5222774", "0.52211916", "0.5215377", "0.5214032", "0.5209373", "0.52020776", "0.5198594", "0.51773393", "0.5172769", "0.5169287", "0.51492405", "0.5145772", "0.5144986", "0.51417255", "0.5129888", "0.51275414", "0.5113263", "0.5113263", "0.5113263", "0.5113263", "0.5113002", "0.50701576", "0.5054789", "0.50546217", "0.5025733", "0.5003698", "0.499645", "0.49949807", "0.49917033", "0.49866465", "0.4957485", "0.4956829", "0.49485528", "0.4948172", "0.49424726", "0.4936844", "0.49352062", "0.49347034", "0.49322885", "0.49259752", "0.49025154", "0.48971328", "0.4895007", "0.48931816", "0.4891091", "0.48875576", "0.48859298", "0.48857993", "0.4884893", "0.4883271", "0.48824048", "0.48765326", "0.487122", "0.48687136", "0.48535526", "0.48416746", "0.48416704", "0.4840859", "0.4828688", "0.48246083", "0.4823913", "0.48150513", "0.4814147", "0.4813066", "0.48128858", "0.48086354", "0.4805052", "0.48046383", "0.48043266", "0.48006347", "0.480028", "0.4798853" ]
0.5587935
11
Runs a model as a .mod file, using a set of .dat files, and a given jdbc configuration. If connectionString is specified, it will be used instead of the url in the jdbc configuration, allowing for tests with database which url is not static (ex: temporary test databases).
public final boolean run(String modFilename, String[] datFilenames, String jdbcConfigurationFile, String connectionString) throws IOException, IloException { // create OPL IloOplFactory.setDebugMode(true); IloOplFactory oplF = new IloOplFactory(); IloOplErrorHandler errHandler = oplF.createOplErrorHandler(System.out); IloOplRunConfiguration rc = null; System.out.println("Running " + modFilename); if (datFilenames == null || datFilenames.length == 0) { rc = oplF.createOplRunConfiguration(modFilename); } else { rc = oplF.createOplRunConfiguration(modFilename, datFilenames); for (String d: datFilenames) { System.out.println(" with " + d); } } rc.setErrorHandler(errHandler); IloOplModel opl = rc.getOplModel(); System.err.println("IIIII " + IloOplModel.getCPtr(opl)); IloOplModelDefinition def = opl.getModelDefinition(); // // Reads the JDBC configuration, initialize a JDBC custom data source // and sets the source in OPL. // JdbcConfiguration jdbcProperties = null; if (jdbcConfigurationFile != null) { jdbcProperties = new JdbcConfiguration(); jdbcProperties.read(jdbcConfigurationFile); // we want to override connection string with conn string that has the actual // temp db path if (connectionString != null) jdbcProperties.setUrl(connectionString); // Create the custom JDBC data source IloOplDataSource jdbcDataSource = new JdbcCustomDataSource(jdbcProperties, oplF, def); // Pass it to the model. opl.addDataSource(jdbcDataSource); } opl.generate(); boolean success = false; if (opl.hasCplex()) { if (opl.getCplex().solve()) { success = true; } } else { if (opl.getCP().solve()) { success = true; } } if (success == true) { opl.postProcess(); // write results if (jdbcProperties != null) { JdbcWriter writer = new JdbcWriter(jdbcProperties, def, opl); writer.customWrite(); } } return success; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String arg[]) {\n\t\tRebuildDatabaseFromInstanceFiles ourselves = new RebuildDatabaseFromInstanceFiles();\n\t\tif (arg.length >= 3) {\n\t\t\tString databaseModelClassName = arg[0];\n\t\t\tString databaseFileName = arg[1];\n\t\t\n\t\t\tif (databaseModelClassName.indexOf('.') == -1) {\t\t\t\t\t// not already fully qualified\n\t\t\t\tdatabaseModelClassName=\"com.pixelmed.database.\"+databaseModelClassName;\n\t\t\t}\n//System.err.println(\"Class name = \"+databaseModelClassName);\t// no need to use SLF4J since command line utility/test\n\n\t\t\t//DatabaseInformationModel databaseInformationModel = new PatientStudySeriesConcatenationInstanceModel(makePathToFileInUsersHomeDirectory(dataBaseFileName));\n\t\t\tDatabaseInformationModel databaseInformationModel = null;\n\t\t\ttry {\n\t\t\t\tClass classToUse = Thread.currentThread().getContextClassLoader().loadClass(databaseModelClassName);\n\t\t\t\tClass[] parameterTypes = { databaseFileName.getClass() };\n\t\t\t\tConstructor constructorToUse = classToUse.getConstructor(parameterTypes);\n\t\t\t\tObject[] args = { databaseFileName };\n\t\t\t\tdatabaseInformationModel = (DatabaseInformationModel)(constructorToUse.newInstance(args));\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tslf4jlogger.error(\"\",e);\t// use SLF4J since may be invoked from script\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\n\t\t\tlong startOfRebuild=System.currentTimeMillis();\n\t\t\tfilesProcessed=0;\n\t\t\tint i = 2;\t\t// start with 3rd argument\n\t\t\twhile (i<arg.length) {\n\t\t\t\tString name = arg[i++];\n\t\t\t\tFile file = new File(name);\n\t\t\t\tprocessFileOrDirectory(databaseInformationModel,file);\n\t\t\t}\n\t\t\tlong durationOfRebuild = System.currentTimeMillis() - startOfRebuild;\n\t\t\tdouble rate = ((double)filesProcessed)/(((double)durationOfRebuild)/1000);\n\t\t\tslf4jlogger.info(\"Processed {} files in {} ms, {} files/s\",filesProcessed,durationOfRebuild,rate);\t// use SLF4J since may be invoked from script\n\t\t\t\n\t\t\tdatabaseInformationModel.close();\t// this is really important ... will not persist everything unless we do this\n\t\t}\n\t\telse {\n\t\t\tSystem.err.println(\"Usage: java com.pixelmed.database.RebuildDatabaseFromInstanceFiles databaseModelClassName databaseFileName path(s)\");\n\t\t}\n\t}", "public abstract void loadFile(Model mod, String fn) throws IOException;", "void setDataModelOracle( Path project,\n DataModelOracle oracle );", "public static void main(String[] args) {\n DatabaseCommunicator test = new DatabaseCommunicator();\n// HashMap<String,LabTest> methods = test.getMethods();\n// System.out.println(methods.get(\"mingi labTest\").getMatrix());\n LabTest labTest = new LabTest();\n ArrayList testData = test.fileReader();\n DatabaseCommunicator.testSendingToDatabase(test, labTest, testData);\n }", "public interface Driver extends ExtensionModule, Serializable\r\n{\r\n // standard parameters\r\n /** The server name. */\r\n static final String SERVER_PARAM = \"SERVER\";\r\n \r\n /** The database name. */\r\n static final String DB_PARAM = \"DB\";\r\n \r\n /** The command line options. */\r\n static final String CMD_OPTIONS_PARAM = \"CMD_OPTIONS\";\r\n \r\n /** The BASE_CLASS_PATH. */\r\n static final String BASE_CLASS_PATH = \"com.toolsverse.etl.driver\";\r\n \r\n // types\r\n \r\n /** The procedure. */\r\n static String PROC_TYPE = \"procedure\";\r\n \r\n /** The function. */\r\n static String FUNC_TYPE = \"function\";\r\n \r\n /** The ddl. */\r\n static String DDL_TYPE = \"ddl\";\r\n \r\n /** The table. */\r\n static String TABLE_TYPE = \"table\";\r\n \r\n // defaults\r\n \r\n /** The ETL_CODE. */\r\n static final String ETL_CODE = \"{etl_code}\";\r\n \r\n /** The case sensitivity undefined. */\r\n static int CASE_SENSITIVE_UNDEFINED = 0;\r\n \r\n /** The lower case. */\r\n static int CASE_SENSITIVE_LOWER = 1;\r\n \r\n /** The upper case. */\r\n static int CASE_SENSITIVE_UPPER = 2;\r\n \r\n /** The lower case property. */\r\n static String CASE_SENSITIVE_LOWER_STR = \"lower\";\r\n \r\n /** The upper case property. */\r\n static String CASE_SENSITIVE_UPPER_STR = \"upper\";\r\n \r\n /**\r\n * Converts string so it can be used as s part of sql. Typically adds \"'\". Example abc -> 'abc'\r\n * \r\n * @param value\r\n * the value\r\n * \r\n * @return the string\r\n */\r\n String convertStringForStorage(String value);\r\n \r\n /**\r\n * Converts value to string depending on <code>fieldType</code> so it can be used as s part of sql. \r\n *\r\n * @param fieldValue the field value\r\n * @param fieldType the field type {@link java.sql.Types}}\r\n * @param isFromTable if true the value is coming from result set, otherwise - from the database cursor\r\n * @return the string\r\n */\r\n String convertValueForStorage(Object fieldValue, int fieldType,\r\n boolean isFromTable);\r\n \r\n /**\r\n * Deletes staging table.\r\n *\r\n * @param conn the connection\r\n * @param tableName the table name\r\n * @throws Exception in case of any error\r\n */\r\n void deleteStagingBinary(Connection conn, String tableName)\r\n throws Exception;\r\n \r\n /**\r\n * Filters string. Usually removes prohibited characters. \r\n * \r\n * @param value\r\n * the value\r\n * \r\n * @return the string\r\n */\r\n String filter(String value);\r\n \r\n /**\r\n * Gets the allowed identifier chars.\r\n *\r\n * @return the allowed identifier chars\r\n */\r\n Set<Character> getAllowedIdentifierChars();\r\n \r\n /**\r\n * Gets the \"begin\" sql statement.\r\n * \r\n * @return the \"begin\" sql statemnt\r\n * \r\n */\r\n String getBegin();\r\n \r\n /**\r\n * Gets the \"begin\" token for splited sql.\r\n * \r\n * @return the the \"begin\" token for the splited sql\r\n */\r\n String getBeginSplited();\r\n \r\n /**\r\n * Gets the blob from the result set.\r\n * \r\n * @param rs\r\n * the result set\r\n * @param pos\r\n * the position ofr the blob field\r\n * \r\n * @return the blob\r\n * \r\n * @throws Exception in case of any error\r\n */\r\n Object getBlob(ResultSet rs, int pos)\r\n throws Exception;\r\n \r\n /**\r\n * Gets the \"call\" sql. Example: \"test\" - > call test()\r\n * \r\n * @param name\r\n * the name of the procedure\r\n * \r\n * @return the \"call\" sql\r\n */\r\n String getCallSql(String name);\r\n \r\n /**\r\n * Gets the \"case sensitive\" flag. Possible values: CASE_SENSITIVE_UNDEFINED, CASE_SENSITIVE_LOWER, CASE_SENSITIVE_UPPER.\r\n * Depending on returning value driver will translate some types of identifiers to the lower case, UPPER case or leave it unchanged. \r\n * \r\n * @return the \"case sensitive\" flag. \r\n */\r\n int getCaseSensitive();\r\n \r\n /**\r\n * Gets the CLOB from the result set.\r\n * \r\n * @param rs\r\n * the result set\r\n * @param pos\r\n * the position of the clob field\r\n * \r\n * @return the clob\r\n * \r\n * @throws Exception in case of any error\r\n */\r\n Object getClob(ResultSet rs, int pos)\r\n throws Exception;\r\n \r\n /**\r\n * Gets the command line for the external tool.\r\n *\r\n * @param storage the object storage\r\n * @param alias the alias\r\n * @param sqlFile the sql file\r\n * @return the command line for the external tool\r\n * @see com.toolsverse.util.ObjectStorage\r\n */\r\n String getCmdForExternalTool(ObjectStorage storage, Alias alias,\r\n String sqlFile);\r\n \r\n /**\r\n * Gets the \"create table\" sql.\r\n *\r\n * @param name the table name\r\n * @param dataSet the data set\r\n * @param isTemporary if true the table is temporary\r\n * @param key the key field(s)\r\n * @param fieldsRepository the fields repository\r\n * @return the \"create table\" sql\r\n * @see com.toolsverse.etl.common.FieldsRepository\r\n */\r\n String getCreateTableSql(String name, DataSet dataSet, boolean isTemporary,\r\n String key, FieldsRepository fieldsRepository);\r\n \r\n /**\r\n * Gets the \"loop end\" sql for the cursor.\r\n * \r\n * @param name\r\n * the name of the cusror\r\n * @param dataSet\r\n * the data set\r\n * \r\n * @return the \"loop end\" sql for the cursor\r\n */\r\n String getCursorLoopEndSql(String name, DataSet dataSet);\r\n \r\n /**\r\n * Gets the \"loop start\" sql for the cursor.\r\n *\r\n * @param name the name of the cursor\r\n * @param cursorSql the cursor sql\r\n * @param dataSet the data set\r\n * @return the \"loop end\" sql for the cursor\r\n */\r\n String getCursorLoopStartSql(String name, String cursorSql, DataSet dataSet);\r\n \r\n /**\r\n * Gets the record access sql for the cursor.\r\n * \r\n * @param fieldName\r\n * the field name\r\n * \r\n * @return the record access sql for the cursor\r\n */\r\n String getCursorRecAccessSql(String fieldName);\r\n \r\n /**\r\n * Gets the \"declare\" sql.\r\n * \r\n * @return the \"declare\" sql\r\n */\r\n String getDeclare();\r\n \r\n /**\r\n * Gets the \"declare cursor end\" sql.\r\n * \r\n * @return the \"declare cursor end\" sql\r\n */\r\n String getDeclareCursorEndSql();\r\n \r\n /**\r\n * Gets the \"declare cursor\" sql.\r\n *\r\n * @param sql the sql\r\n * @param name the name of the cursor\r\n * @param cursorSql the cursor sql\r\n * @param dataSet the data set\r\n * @return the \"declare cursor\" sql\r\n */\r\n String getDeclareCursorSql(String sql, String name, String cursorSql,\r\n DataSet dataSet);\r\n \r\n /**\r\n * Gets the \"declare cursor variable\" sql.\r\n *\r\n * @param sql the sql\r\n * @param dataSet the data set\r\n * @param key the key field(s)\r\n * @param fieldsRepository the fields repository\r\n * @param variables the variables\r\n * @return the \"declare cursor variable\" sql\r\n * @see com.toolsverse.etl.common.FieldsRepository\r\n */\r\n String getDeclareCursorVarSql(String sql, DataSet dataSet, String key,\r\n FieldsRepository fieldsRepository, Set<String> variables);\r\n \r\n /**\r\n * Gets the default function class name.\r\n *\r\n * @return the default function class name\r\n * @see com.toolsverse.etl.common.Function\r\n */\r\n String getDefaultFunctionClass();\r\n \r\n /**\r\n * Gets the \"default null\" value. Some databases require default \"null\", \"not null\" attributes when creating tables.\r\n * \r\n * @return the \"default null\" attribute\r\n */\r\n String getDefaultNull();\r\n \r\n /**\r\n * Gets the default database type.\r\n * \r\n * @return the default database type\r\n */\r\n String getDefaultType();\r\n \r\n /**\r\n * Gets the delete statement.\r\n *\r\n * @param fieldsAndValues the fields and values\r\n * @param tableName the table name\r\n * @param key the key field(s)\r\n * @return the delete statement\r\n */\r\n String getDeleteStatement(\r\n TypedKeyValue<List<String>, List<String>> fieldsAndValues,\r\n String tableName, String key);\r\n \r\n /**\r\n * Gets the default delimiter.\r\n * \r\n * @return the delimiter\r\n */\r\n String getDelimiter();\r\n \r\n /**\r\n * Gets the destination name and exception handler type from the sql.\r\n * \r\n * @param sql\r\n * the sql\r\n * \r\n * @return the destination name and exception handler type\r\n */\r\n TypedKeyValue<String, Integer> getDestinationInfo(String sql);\r\n \r\n /**\r\n * Gets the \"drop\" sql.\r\n * \r\n * @param type\r\n * the object type. Possible values: PROC_TYPE, FUNC_TYPE, DDL_TYPE, TABLE_TYPE\r\n * @param name\r\n * the object name\r\n * \r\n * @return the drop sql\r\n */\r\n String getDropSql(String type, String name);\r\n \r\n /**\r\n * Gets the \"end\" sql.\r\n * \r\n * @return the \"end\" sql\r\n */\r\n String getEnd();\r\n \r\n /**\r\n * Gets the \"end\" token for the splited sql statement.\r\n * \r\n * @return the the \"end\" token for the splited sql statement\r\n */\r\n String getEndSplited();\r\n \r\n /**\r\n * Gets the \"error line\" pattern\". Used to parse exception and find actual error line.\r\n *\r\n * @return the \"error line\" pattern\r\n */\r\n String getErrorLinePattern();\r\n \r\n /**\r\n * Gets the explain plan for the sql.\r\n *\r\n * @param storage the object storage\r\n * @param connection the connection\r\n * @param alias the alias\r\n * @param sql the sql\r\n * @return the explain plan\r\n * @see com.toolsverse.util.ObjectStorage\r\n */\r\n Object getExplainPlan(ObjectStorage storage, Connection connection,\r\n Alias alias, String sql);\r\n \r\n /**\r\n * Gets the external tool name.\r\n *\r\n * @return the external tool name\r\n */\r\n String getExternalToolName();\r\n \r\n /**\r\n * Gets the home folder for the native database client.\r\n *\r\n * @param storage the object storage\r\n * @return the home folder\r\n * @see com.toolsverse.util.ObjectStorage\r\n */\r\n String getHome(ObjectStorage storage);\r\n \r\n /**\r\n * Gets the identifier name.\r\n *\r\n * @param name the original object name\r\n * @param type the type. Possible values: PROC_TYPE, FUNC_TYPE, DDL_TYPE, TABLE_TYPE\r\n * @return the identifier name\r\n */\r\n String getIdentifierName(String name, String type);\r\n \r\n /**\r\n * Gets the \"if\" token.\r\n * \r\n * @return the \"if\" token\r\n */\r\n String getIf();\r\n \r\n /**\r\n * Gets the \"if begin\" token.\r\n * \r\n * @return the \"if begin\" token\r\n */\r\n String getIfBegin();\r\n \r\n /**\r\n * Gets the \"if else\" token.\r\n * \r\n * @return the \"if else\" token\r\n */\r\n String getIfElse();\r\n \r\n /**\r\n * Gets the \"if end\" token.\r\n * \r\n * @return the \"if end\" token\r\n */\r\n String getIfEnd();\r\n \r\n /**\r\n * Gets the initialization sql. This sql is executed first for the etl scenario.\r\n * \r\n * @return the initialization sql\r\n */\r\n String getInitSql();\r\n \r\n /**\r\n * Gets the insert statement.\r\n *\r\n * @param fieldsAndValues the fields and values\r\n * @param tableName the table name\r\n * @return the insert statement\r\n */\r\n String getInsertStatement(\r\n TypedKeyValue<List<String>, List<String>> fieldsAndValues,\r\n String tableName);\r\n \r\n /**\r\n * Gets the jdbc driver class name.\r\n *\r\n * @return the jdbc driver class name\r\n */\r\n String getJdbcDriverClassName();\r\n \r\n /**\r\n * Gets the maximum number of lines in the sql block supported by database.\r\n * \r\n * @return the lines limit\r\n */\r\n int getLinesLimit();\r\n \r\n /**\r\n * Gets the maximum character size.\r\n * \r\n * @return the maximum character size\r\n */\r\n int getMaxCharSize();\r\n \r\n /**\r\n * Gets the maximum precision.\r\n * \r\n * @return the maximum precision\r\n */\r\n int getMaxPrecision();\r\n \r\n /**\r\n * Gets the maximum scale.\r\n * \r\n * @return the maximum scale\r\n */\r\n int getMaxScale();\r\n \r\n /**\r\n * Gets the maximum string literal size.\r\n * \r\n * @return the maximum string literal size\r\n */\r\n int getMaxStringLiteralSize();\r\n \r\n /**\r\n * Gets the maximum varchar size.\r\n * \r\n * @return the maximum varchar size\r\n */\r\n int getMaxVarcharSize();\r\n \r\n /**\r\n * Gets the merge statement.\r\n *\r\n * @param fieldsAndValues the fields and values\r\n * @param tableName the table name\r\n * @param key the key field(s)\r\n * @return the merge statement\r\n */\r\n String getMergeStatement(\r\n TypedKeyValue<List<String>, List<String>> fieldsAndValues,\r\n String tableName, String key);\r\n \r\n /**\r\n * Gets the metadata driver class name.\r\n *\r\n * @return the metadata driver class name\r\n */\r\n String getMetadataClassName();\r\n \r\n /**\r\n * Gets the metadata \"select\" clause.\r\n * \r\n * @return the metadata \"select\" clause\r\n */\r\n String getMetadataSelectClause();\r\n \r\n /**\r\n * Gets the metadata \"where\" clause.\r\n * \r\n * @return the metadata \"where\" clause\r\n */\r\n String getMetadataWhereClause();\r\n \r\n /**\r\n * Gets the name of the driver.\r\n *\r\n * @return the name of the driver\r\n */\r\n String getName();\r\n \r\n /**\r\n * Gets the object from result set.\r\n * \r\n * @param rs\r\n * the result set\r\n * @param index\r\n * the index of the field\r\n * @param fieldType\r\n * the field type {@link java.sql.Types}\r\n * \r\n * @return the object\r\n * \r\n * @throws Exception in case of any error\r\n */\r\n Object getObject(ResultSet rs, int index, int fieldType)\r\n throws Exception;\r\n \r\n /**\r\n * Gets the sql used to check if object exists.\r\n *\r\n * @param name the name\r\n * @return the sql\r\n */\r\n String getObjectCheckSql(String name);\r\n \r\n /**\r\n * Gets the \"on exception\" sql.\r\n *\r\n * @param onException the OnException\r\n * @return the \"on exception\" sql\r\n * @see com.toolsverse.etl.common.OnException\r\n */\r\n String getOnException(OnException onException);\r\n \r\n /**\r\n * Gets the \"on exception begin\" sql.\r\n *\r\n * @param onException the OnException\r\n * @param row the row\r\n * @return the \"on exception begin\" sql\r\n * @see com.toolsverse.etl.common.OnException\r\n */\r\n String getOnExceptionBegin(OnException onException, long row);\r\n \r\n /**\r\n * Gets the \"on exception end\" sql.\r\n * \r\n * @return the \"on exception end\" sql\r\n */\r\n String getOnExceptionEnd();\r\n \r\n /**\r\n * Gets the parameter type from the output variable type.\r\n *\r\n * @param type the output variable type\r\n * @return the parameter type\r\n */\r\n int getParamType(String type);\r\n \r\n /**\r\n * Gets the parent driver class name.\r\n * \r\n * @return the parent driver class name\r\n */\r\n String getParentDriverName();\r\n \r\n /**\r\n * This sql is added after all variables declared.\r\n * \r\n * @return sql\r\n */\r\n String getPostDeclareSql();\r\n \r\n /**\r\n * Gets the properties.\r\n *\r\n * @return the properties\r\n */\r\n String[] getProperties();\r\n \r\n /**\r\n * Gets the safe sql. Some databases (Oracle for example) require that sql is executed inside special construct in order to catch exception.\r\n * \r\n * <pre>\r\n * For example table abc does not exist\r\n * \r\n * delete from abc --> not safe\r\n * EXECUTE IMMEDIATE 'delete from abc' --> safe\r\n * </pre>\r\n *\r\n * @param name the name\r\n * @return the safe sql\r\n */\r\n String getSafeSql(String name);\r\n \r\n /**\r\n * Gets the sql for the explain plan.\r\n *\r\n * @param sql the original sql\r\n * @param parser the sql parser\r\n * @return the sql for the explain plan\r\n */\r\n String getSqlForExplainPlan(String sql, SqlParser parser);\r\n \r\n /**\r\n * Gets the sql for external tool.\r\n *\r\n * @param alias the alias\r\n * @param sql the original sql\r\n * @param parser the sql parser\r\n * @return the sql for the external tool\r\n */\r\n String getSqlForExternalTool(Alias alias, String sql, SqlParser parser);\r\n \r\n /**\r\n * Get start transaction sql.\r\n *\r\n * @return the start transaction sql\r\n */\r\n String getStartTransactionSql();\r\n \r\n /**\r\n * Gets the table name.\r\n * \r\n * @param name\r\n * the name\r\n * \r\n * @return the table name\r\n */\r\n String getTableName(String name);\r\n \r\n /**\r\n * Gets the temporary table name.\r\n * \r\n * @param name\r\n * the name\r\n * \r\n * @return the temporary table name\r\n */\r\n String getTempTableName(String name);\r\n \r\n /**\r\n * Gets the \"top select\" clause. Used to select first n rows.\r\n *\r\n * @param top the maximum number of rows to select\r\n * @return the \"top select\" clause\r\n */\r\n String getTopSelectClause(int top);\r\n \r\n /**\r\n * Gets the \"top trail\" clause. Used to select first n rows.\r\n *\r\n * @param top the maximum number of rows to select\r\n * @return the \"top trail\" clause\r\n */\r\n String getTopTrailClause(int top);\r\n \r\n /**\r\n * Gets the \"top where\" clause. Used to select first n rows.\r\n *\r\n * @param top the maximum number of rows to select\r\n * @return the \"top where\" clause\r\n */\r\n String getTopWhereClause(int top);\r\n \r\n /**\r\n * Gets the native field type.\r\n *\r\n * @param fieldDef the field definition\r\n * @param key the key field(s)\r\n * @param fieldsRepository the fields repository\r\n * @return the native field type\r\n */\r\n String getType(FieldDef fieldDef, String key,\r\n FieldsRepository fieldsRepository);\r\n \r\n /**\r\n * Gets the update statement.\r\n *\r\n * @param fieldsAndValues the fields and values\r\n * @param tableName the table name\r\n * @param key the key field(s)\r\n * @return the update statement\r\n */\r\n String getUpdateStatement(\r\n TypedKeyValue<List<String>, List<String>> fieldsAndValues,\r\n String tableName, String key);\r\n \r\n /**\r\n * Gets the jdbc driver url pattern.\r\n *\r\n * @return the jdbc driver url pattern\r\n */\r\n String getUrlPattern();\r\n \r\n /**\r\n * Gets the variable declare statement.\r\n *\r\n * @return the variable declare statement\r\n */\r\n String getVarDeclare();\r\n \r\n /**\r\n * Gets the variable name.\r\n * \r\n * @param name\r\n * the name\r\n * \r\n * @return the variable name\r\n */\r\n String getVarName(String name);\r\n \r\n /**\r\n * Gets the wrong scale. If it is not -1 and jdbc driver returns it the actual scale will be set to -1.\r\n *\r\n * @return the wrong precision\r\n */\r\n int getWrongScale();\r\n \r\n /**\r\n * The \"Ignore exceptions during initialization\" flag.\r\n * \r\n * @return true, if any exception thrown during execution of the init sql should be ignored\r\n */\r\n boolean ignoreExceptionsDuringInit();\r\n \r\n /**\r\n * Checks if \"merge\" statement can be not callable. Example: MERGRE INTO...\r\n *\r\n * @return true, if \"merge\" statement can be not callable\r\n */\r\n boolean isMergeInNonCallableSupported();\r\n \r\n /**\r\n * Check if driver requires separate connection for ddl statements.\r\n *\r\n * @return true, if driver requires separate connection for ddl statements\r\n */\r\n boolean needSeparateConnectionForDdl();\r\n \r\n /**\r\n * Replaces sql on exception.\r\n * \r\n * @param sql\r\n * the sql\r\n * \r\n * @return the string\r\n */\r\n String replaceOnException(String sql);\r\n \r\n /**\r\n * Returns true if database requires rollback after sql error. Example - PostgreSQL.\r\n * \r\n * @return true if database requires rollback after sql error\r\n */\r\n boolean requiresRollbackAfterSqlError();\r\n \r\n /**\r\n * Sets the blob field.\r\n *\r\n * @param pstmt the prepared statement\r\n * @param value the value\r\n * @param pos the position for the blob field\r\n * @throws Exception in case of any error\r\n */\r\n void setBlob(PreparedStatement pstmt, Object value, int pos)\r\n throws Exception;\r\n \r\n /**\r\n * Sets the case sensitive attribute.\r\n * \r\n * @param value\r\n * the new case sensitive attribute. Possible values: CASE_SENSITIVE_UNDEFINED, CASE_SENSITIVE_LOWER, CASE_SENSITIVE_UPPER\r\n */\r\n void setCaseSensitive(int value);\r\n \r\n /**\r\n * Sets the clob field.\r\n *\r\n * @param pstmt the prepared statement\r\n * @param value the value\r\n * @param pos the position of the clob field\r\n * @throws Exception in case of any error\r\n */\r\n void setClob(PreparedStatement pstmt, Object value, int pos)\r\n throws Exception;\r\n \r\n /**\r\n * Sets the initialization sql.\r\n * \r\n * @param value\r\n * the new initialization sql\r\n */\r\n void setInitSql(String value);\r\n \r\n /**\r\n * Sets the maximum number of lines in the sql block supported by database.\r\n * \r\n * @param value\r\n * the new lines limit\r\n */\r\n void setLinesLimit(int value);\r\n \r\n /**\r\n * Sets the maximum char size.\r\n * \r\n * @param value\r\n * the new maximum char size\r\n */\r\n void setMaxCharSize(int value);\r\n \r\n /**\r\n * Sets the maximum precision.\r\n * \r\n * @param value\r\n * the new maximum precision\r\n */\r\n void setMaxPrecision(int value);\r\n \r\n /**\r\n * Sets the maximum scale.\r\n * \r\n * @param value\r\n * the new maximum scale\r\n */\r\n void setMaxScale(int value);\r\n \r\n /**\r\n * Sets the maximum string literal size.\r\n * \r\n * @param value\r\n * the new maximum string literal size\r\n */\r\n void setMaxStringLiteralSize(int value);\r\n \r\n /**\r\n * Sets the maximum varchar size.\r\n * \r\n * @param value\r\n * the new maximum varchar size\r\n */\r\n void setMaxVarcharSize(int value);\r\n \r\n /**\r\n * Sets the parent driver class name.\r\n *\r\n * @param value the parent driver class name\r\n * @throws Exception in case of any error\r\n */\r\n void setParentDriverName(String value)\r\n throws Exception;\r\n \r\n /**\r\n * \"Supports anonymous blocks\" flag.\r\n * \r\n * @return true, if database supports anonymous sql blocks\r\n */\r\n boolean supportsAnonymousBlocks();\r\n \r\n /**\r\n * \"Supports binary data types in procedures\" flag.\r\n * \r\n * @return true, if database supports binary data types in procedures\r\n */\r\n boolean supportsBinaryInProc();\r\n \r\n /**\r\n * \"Supports callable statement\" flag.\r\n * \r\n * @return true, if database supports callable statements\r\n */\r\n boolean supportsCallableStatement();\r\n \r\n /**\r\n * \"Supports explain plan\" flag.\r\n *\r\n * @return true, if database supports explain plan\r\n */\r\n boolean supportsExplainPlan();\r\n \r\n /**\r\n * \"Supports external tool\" flag.\r\n *\r\n * @return true, if database supports external tool\r\n */\r\n boolean supportsExternalTool();\r\n \r\n /**\r\n * \"Supports inner functions\" flag. Inner function is a function inside anonymous sql block.\r\n * \r\n * @return true, if database supports inner functions\r\n */\r\n boolean supportsInnerFunctions();\r\n \r\n /**\r\n * Checks is driver supports not nullable collumns.\r\n *\r\n * @return true, if successful\r\n */\r\n boolean supportsNotNullable();\r\n \r\n /**\r\n * \"Supports parallel extract\" flag.\r\n *\r\n * @return true, if driver supports parallel extract\r\n */\r\n boolean supportsParallelExtract();\r\n \r\n /**\r\n * \"Supports parallel load\" flag.\r\n *\r\n * @return true, if driver supports parallel load\r\n */\r\n boolean supportsParallelLoad();\r\n \r\n /**\r\n * \"Supports parameters in anonymous blocks\" flag.\r\n *\r\n * @return true, if database supports parameters in anonymous blocks\r\n */\r\n boolean supportsParamsInAnonymousBlocks();\r\n \r\n /**\r\n * Used internally to make a disition is it possible to use a generic jdbc driver with a parent driver.\r\n *\r\n * @return true, if successful\r\n */\r\n boolean supportsParentDriver();\r\n \r\n /**\r\n * \"Supports rollback after ddl\" flag.\r\n * \r\n * @return true, if database supports rollback after ddl\r\n */\r\n boolean supportsRollbackAfterDDL();\r\n \r\n /**\r\n * If true the database supports extended sql, such as PLSQL, Transact SQL, etc. Used by UI to disable/enable menu items.\r\n * \r\n * @return true, if database database supports extended sql\r\n */\r\n \r\n boolean supportsScripts();\r\n \r\n /**\r\n * Converts table name to name.\r\n *\r\n * @param name the table name\r\n * @return the string\r\n */\r\n String tableName2Name(String name);\r\n \r\n /**\r\n * Returns <code>true</code> if <code>type</code> has size. For example: Types.VARCHAR has size, Types.INTEGER - doesn't.\r\n *\r\n * @param type the type {@link java.sql.Types}\r\n * @return true, if type has size\r\n */\r\n boolean typeHasSize(int type);\r\n \r\n /**\r\n * Updates staging blob.\r\n * \r\n * @param conn\r\n * the connection\r\n * @param var\r\n * the variable\r\n * @param pkValue\r\n * the primary key value\r\n * @param value\r\n * the value\r\n * \r\n * @throws Exception in case of any error\r\n */\r\n void updateStagingBlob(Connection conn, Variable var, String pkValue,\r\n Object value)\r\n throws Exception;\r\n \r\n /**\r\n * Updates staging clob.\r\n * \r\n * @param conn\r\n * the connection\r\n * @param var\r\n * the variable\r\n * @param pkValue\r\n * the primary key value\r\n * @param value\r\n * the value\r\n * \r\n * @throws Exception in case of any error\r\n */\r\n void updateStagingClob(Connection conn, Variable var, String pkValue,\r\n Object value)\r\n throws Exception;\r\n \r\n /**\r\n * Converts value for storage.\r\n *\r\n * @param fieldType the field type {@link java.sql.Types}\r\n * @param value the value\r\n * @param params the parameters\r\n * @return the object\r\n */\r\n Object value2StorageValue(int fieldType, Object value,\r\n Map<String, String> params);\r\n \r\n}", "DataModelOracle getDataModelOracle( Path project );", "@Test\n public void readFile() throws IOException {\n ModelInfo modelInfo = ModelReader.create().load();\n\n }", "public static void main(String[] args) {\n MySQLScriptGen databaseobject = new MySQLScriptGen();\n\n //this is same for every model\n JsonFileReader jsonFileReader = JsonFileReader.getInstance();\n JSONObject pim = jsonFileReader.getplatformIndependentModel();\n String ddl_script = databaseobject.createDDLScript(pim);\n String dml_script = databaseobject.createDMLScript(pim);\n String dql_script = databaseobject.createDQLScript(pim);\n System.out.println(\">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\\n\\n\");\n System.out.println(ddl_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dml_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DML_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_BEGIN>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n System.out.println(dql_script);\n System.out.println(\"\\n\\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>RIP_SQL_GEN_DQL_END>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\");\n }", "private void loadDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Check to make sure the Bmod Database is there, if not, try \n\t\t\t\t// downloading from the website.\n\t\t\t\tif(!Files.exists(m_databaseFile))\n\t\t\t\t{\n\t\t\t\t\tFiles.createDirectories(m_databaseFile.getParent());\n\t\t\t\t\n\t\t\t\t\tbyte[] file = ExtensionPoints.readURLAsBytes(\"http://\" + Constants.API_HOST + HSQL_DATABASE_PATH);\n\t\t\t\t\tif(file.length != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t\t\t\tFiles.write(m_databaseFile, file, StandardOpenOption.CREATE, StandardOpenOption.WRITE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// make sure we have the proper scriptformat.\n\t\t\t\tsetScriptFormatCorrectly();\n\t\t\t}catch(NullPointerException|IOException ex)\n\t\t\t{\n\t\t\t\tm_logger.error(\"Could not fetch database from web.\", ex);\n\t\t\t}\n\t\t\t\n\t\n\t\t\t\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\n\t\t\n\t\t\t\n\t\t\tString db = ExtensionPoints.getBmodDirectory(\"database\").toUri().getPath();\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:file:\" + db, \"sa\", \"\");\n\t\t\t\n\t\t\t// Setup Connection\n\t\t\tCSVRecordLoader ldr = new CSVRecordLoader();\n\t\t\n\t\t\t// Load all of the building independent plugins\n\t\t\tfor(Record<?> cp : ldr.getRecordPluginManagers())\n\t\t\t{\n\t\t\t\tm_logger.debug(\"Creating table: \" + cp.getTableName());\n\t\t\t\t// Create a new table\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgetPreparedStatement(cp.getSQLTableDefn()).execute();\n\t\t\t\t} catch(SQLException ex)\n\t\t\t\t{\n\t\t\t\t\t// Table exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tm_logger.debug(\"Doing index:\" + cp.getIndexDefn());\n\t\t\t\t\tif(cp.getIndexDefn() != null)\n\t\t\t\t\t\tgetPreparedStatement(cp.getIndexDefn()).execute();\n\t\t\t\t}catch(SQLException ex)\n\t\t\t\t{\t// index exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\tif(ex instanceof DatabaseIntegrityException)\n\t\t\t\tDatabase.handleCriticalError((DatabaseIntegrityException)ex);\n\t\t\telse\n\t\t\t\tDatabase.handleCriticalError(new DatabaseIntegrityException(ex));\n\t\t}\n\t\t\n\t}", "public void initializeModelAndSettings(String modelName, IDataAccessObject dataAccessObject, String[] trainingSettings) throws TotalADSDBMSException, TotalADSGeneralException;", "public ExamMagicDataModule(Configuration config){\r\n\t\tthis.config = config;\r\n\t}", "public final void executeSQL(Connection conn,DbConnVO vo,String fileName) throws Throwable {\r\n PreparedStatement pstmt = null;\r\n StringBuffer sql = new StringBuffer(\"\");\r\n InputStream in = null;\r\n\r\n try {\r\n try {\r\n in = this.getClass().getResourceAsStream(\"/\" + fileName);\r\n }\r\n catch (Exception ex5) {\r\n }\r\n if (in==null)\r\n in = new FileInputStream(org.openswing.swing.util.server.FileHelper.getRootResource() + fileName);\r\n\r\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n String line = null;\r\n ArrayList vals = new ArrayList();\r\n int pos = -1;\r\n String oldfk = null;\r\n String oldIndex = null;\r\n StringBuffer newIndex = null;\r\n StringBuffer newfk = null;\r\n ArrayList fks = new ArrayList();\r\n ArrayList indexes = new ArrayList();\r\n boolean fkFound = false;\r\n boolean indexFound = false;\r\n String defaultValue = null;\r\n int index = -1;\r\n StringBuffer unicode = new StringBuffer();\r\n boolean useDefaultValue = false;\r\n// vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\") ||\r\n// vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\") ||\r\n//\t\t\t\t\tvo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\") ||\r\n// vo.getDriverName().equals(\"com.mysql.jdbc.Driver\");\r\n while ( (line = br.readLine()) != null) {\r\n sql.append(' ').append(line);\r\n if (line.endsWith(\";\")) {\r\n if (vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\")) {\r\n sql = replace(sql, \" VARCHAR(\", \" VARCHAR2(\");\r\n sql = replace(sql, \" NUMERIC(\", \" NUMBER(\");\r\n sql = replace(sql, \" DECIMAL(\", \" NUMBER(\");\r\n sql = replace(sql, \" TIMESTAMP\", \" DATE \");\r\n sql = replace(sql, \" DATETIME\", \" DATE \");\r\n }\r\n else if (vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\")) {\r\n sql = replace(sql, \" TIMESTAMP\", \" DATETIME \");\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n else if (vo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\")) {\r\n sql = replace(sql, \" TIMESTAMP\", \" DATETIME \");\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n else if (vo.getDriverName().toLowerCase().contains(\"postgres\")) {\r\n sql = replace(sql, \" DATETIME\", \" TIMESTAMP \");\r\n sql = replace(sql, \" DATE \", \" TIMESTAMP \");\r\n }\r\n else {\r\n sql = replace(sql, \" DATE \", \" DATETIME \");\r\n }\r\n\r\n\r\n sql = replace(sql,\"ON DELETE NO ACTION\",\"\");\r\n sql = replace(sql,\"ON UPDATE NO ACTION\",\"\");\r\n\r\n if (sql.indexOf(\":COMPANY_CODE\") != -1) {\r\n sql = replace(sql, \":COMPANY_CODE\", \"'\" + vo.getCompanyCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":COMPANY_DESCRIPTION\") != -1) {\r\n sql = replace(sql, \":COMPANY_DESCRIPTION\",\r\n \"'\" + vo.getCompanyDescription() + \"'\");\r\n }\r\n if (sql.indexOf(\":LANGUAGE_CODE\") != -1) {\r\n sql = replace(sql, \":LANGUAGE_CODE\",\r\n \"'\" + vo.getLanguageCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":LANGUAGE_DESCRIPTION\") != -1) {\r\n sql = replace(sql, \":LANGUAGE_DESCRIPTION\",\r\n \"'\" + vo.getLanguageDescription() + \"'\");\r\n }\r\n if (sql.indexOf(\":CLIENT_LANGUAGE_CODE\") != -1) {\r\n sql = replace(sql, \":CLIENT_LANGUAGE_CODE\",\r\n \"'\" + vo.getClientLanguageCode() + \"'\");\r\n }\r\n if (sql.indexOf(\":PASSWORD\") != -1) {\r\n sql = replace(sql, \":PASSWORD\", \"'\" + vo.getAdminPassword() + \"'\");\r\n }\r\n if (sql.indexOf(\":DATE\") != -1) {\r\n sql = replace(sql, \":DATE\", \"?\");\r\n vals.add(new java.sql.Date(System.currentTimeMillis()));\r\n }\r\n\r\n if (sql.indexOf(\":CURRENCY_CODE\") != -1) {\r\n sql = replace(sql, \":CURRENCY_CODE\", \"'\" + vo.getCurrencyCodeREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":CURRENCY_SYMBOL\") != -1) {\r\n sql = replace(sql, \":CURRENCY_SYMBOL\", \"'\" + vo.getCurrencySymbolREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":DECIMALS\") != -1) {\r\n sql = replace(sql, \":DECIMALS\", vo.getDecimalsREG03().toString());\r\n }\r\n if (sql.indexOf(\":DECIMAL_SYMBOL\") != -1) {\r\n sql = replace(sql, \":DECIMAL_SYMBOL\", \"'\" + vo.getDecimalSymbolREG03() + \"'\");\r\n }\r\n if (sql.indexOf(\":THOUSAND_SYMBOL\") != -1) {\r\n sql = replace(sql, \":THOUSAND_SYMBOL\", \"'\" + vo.getThousandSymbolREG03() + \"'\");\r\n }\r\n\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_1\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_1\", \"'\" + vo.getUseVariantType1() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_2\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_2\", \"'\" + vo.getUseVariantType2() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_3\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_3\", \"'\" + vo.getUseVariantType3() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_4\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_4\", \"'\" + vo.getUseVariantType4() + \"'\");\r\n }\r\n if (sql.indexOf(\":USE_VARIANT_TYPE_5\") != -1) {\r\n sql = replace(sql, \":USE_VARIANT_TYPE_5\", \"'\" + vo.getUseVariantType5() + \"'\");\r\n }\r\n\r\n if (sql.indexOf(\":VARIANT_1\") != -1) {\r\n sql = replace(sql, \":VARIANT_1\", \"'\" + (vo.getVariant1()==null || vo.getVariant1().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant1()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_2\") != -1) {\r\n sql = replace(sql, \":VARIANT_2\", \"'\" + (vo.getVariant2()==null || vo.getVariant2().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant2()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_3\") != -1) {\r\n sql = replace(sql, \":VARIANT_3\", \"'\" + (vo.getVariant3()==null || vo.getVariant3().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant3()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_4\") != -1) {\r\n sql = replace(sql, \":VARIANT_4\", \"'\" + (vo.getVariant4()==null || vo.getVariant4().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant4()) + \"'\");\r\n }\r\n if (sql.indexOf(\":VARIANT_5\") != -1) {\r\n sql = replace(sql, \":VARIANT_5\", \"'\" + (vo.getVariant5()==null || vo.getVariant5().trim().equals(\"\")?ApplicationConsts.JOLLY:vo.getVariant5()) + \"'\");\r\n }\r\n\r\n if (!useDefaultValue)\r\n while((pos=sql.indexOf(\"DEFAULT \"))!=-1) {\r\n defaultValue = sql.substring(pos, sql.indexOf(\",\", pos));\r\n sql = replace(\r\n sql,\r\n defaultValue,\r\n \"\"\r\n );\r\n }\r\n\r\n fkFound = false;\r\n while((pos=sql.indexOf(\"FOREIGN KEY\"))!=-1) {\r\n oldfk = sql.substring(pos,sql.indexOf(\")\",sql.indexOf(\")\",pos)+1)+1);\r\n sql = replace(\r\n sql,\r\n oldfk,\r\n \"\"\r\n );\r\n newfk = new StringBuffer(\"ALTER TABLE \");\r\n newfk.append(sql.substring(sql.indexOf(\" TABLE \")+7,sql.indexOf(\"(\")).trim());\r\n newfk.append(\" ADD \");\r\n newfk.append(oldfk);\r\n fks.add(newfk);\r\n fkFound = true;\r\n }\r\n\r\n if (fkFound)\r\n sql = removeCommasAtEnd(sql);\r\n\r\n indexFound = false;\r\n while((pos=sql.indexOf(\"INDEX \"))!=-1) {\r\n oldIndex = sql.substring(pos,sql.indexOf(\")\",pos)+1);\r\n sql = replace(\r\n sql,\r\n oldIndex,\r\n \"\"\r\n );\r\n newIndex = new StringBuffer(\"CREATE \");\r\n newIndex.append(oldIndex.substring(0,oldIndex.indexOf(\"(\")));\r\n newIndex.append(\" ON \");\r\n newIndex.append(sql.substring(sql.indexOf(\" TABLE \")+7,sql.indexOf(\"(\")).trim());\r\n newIndex.append( oldIndex.substring(oldIndex.indexOf(\"(\")) );\r\n indexes.add(newIndex);\r\n indexFound = true;\r\n }\r\n\r\n if (indexFound)\r\n sql = removeCommasAtEnd(sql);\r\n\r\n // check for unicode chars...\r\n while((index=sql.indexOf(\"\\\\u\"))!=-1) {\r\n for(int i=index+2;i<Math.min(sql.length(),index+2+6);i++)\r\n if (Character.isDigit(sql.charAt(i)) ||\r\n sql.charAt(i)=='A' ||\r\n sql.charAt(i)=='B' ||\r\n sql.charAt(i)=='C' ||\r\n sql.charAt(i)=='D' ||\r\n sql.charAt(i)=='E' ||\r\n sql.charAt(i)=='F')\r\n if (unicode.length() < 4)\r\n unicode.append(sql.charAt(i));\r\n else\r\n break;\r\n if (unicode.length()>0) {\r\n sql.delete(index, index+1+unicode.length());\r\n sql.setCharAt(index, new Character((char)Integer.valueOf(unicode.toString(),16).intValue()).charValue());\r\n unicode.delete(0, unicode.length());\r\n }\r\n }\r\n\r\n\r\n if (sql.toString().toUpperCase().contains(\"DROP TABLE\")) {\r\n // remove fks before dropping table!\r\n String table = sql.toString().toUpperCase().replace('\\n',' ').replace('\\r',' ').trim();\r\n table = table.substring(10).trim();\r\n if (table.endsWith(\";\"))\r\n table = table.substring(0,table.length()-1);\r\n ResultSet rset = conn.getMetaData().getExportedKeys(null,vo.getUsername().toUpperCase(),table);\r\n String fkName = null;\r\n String tName = null;\r\n Statement stmt2 = conn.createStatement();\r\n boolean fksFound = false;\r\n while(rset.next()) {\r\n fksFound = true;\r\n tName = rset.getString(7);\r\n fkName = rset.getString(12);\r\n\r\n if (vo.getDriverName().equals(\"com.mysql.jdbc.Driver\"))\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP FOREIGN KEY \"+fkName);\r\n else\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP CONSTRAINT \"+fkName);\r\n }\r\n try {\r\n rset.close();\r\n }\r\n catch (Exception ex6) {}\r\n\r\n if (!fksFound &&\r\n !vo.getDriverName().equals(\"oracle.jdbc.driver.OracleDriver\") &&\r\n !vo.getDriverName().equals(\"com.microsoft.jdbc.sqlserver.SQLServerDriver\") &&\r\n !vo.getDriverName().equals(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\") &&\r\n !vo.getDriverName().equals(\"com.mysql.jdbc.Driver\")\r\n && !vo.getDriverName().equals(\"org.sqlite.JDBC\")) {\r\n // case postgres...\r\n rset = conn.getMetaData().getExportedKeys(null,null,null);\r\n while(rset.next()) {\r\n if (rset.getString(3).toUpperCase().equals(table)) {\r\n tName = rset.getString(7);\r\n fkName = rset.getString(12);\r\n\r\n if (vo.getDriverName().equals(\"com.mysql.jdbc.Driver\"))\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP FOREIGN KEY \"+fkName);\r\n else\r\n stmt2.execute(\"ALTER TABLE \"+tName+\" DROP CONSTRAINT \"+fkName);\r\n }\r\n }\r\n try {\r\n rset.close();\r\n }\r\n catch (Exception ex6) {}\r\n }\r\n\r\n try {\r\n stmt2.close();\r\n }\r\n catch (Exception ex6) {}\r\n\r\n } // end if\r\n\r\n if (sql.toString().trim().length()>0) {\r\n String query = sql.toString().substring(0,sql.length() - 1);\r\n System.out.println(\"Execute query: \" + query);\r\n pstmt = conn.prepareStatement(query);\r\n for (int i = 0; i < vals.size(); i++) {\r\n pstmt.setObject(i + 1, vals.get(i));\r\n }\r\n\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex4) {\r\n try {\r\n if (sql.toString().toUpperCase().contains(\"DROP TABLE\")) {\r\n//\t\t\t\t\t\t\t\t\tLogger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"Invalid SQL: \" + sql, ex4);\r\n }\r\n else\r\n throw ex4;\r\n }\r\n catch (Exception exx4) {\r\n throw ex4;\r\n }\r\n }\r\n pstmt.close();\r\n }\r\n\r\n sql.delete(0, sql.length());\r\n vals.clear();\r\n }\r\n }\r\n br.close();\r\n\r\n for(int i=0;i<fks.size();i++) {\r\n sql = (StringBuffer)fks.get(i);\r\n pstmt = conn.prepareStatement(sql.toString());\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex4) {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex4);\r\n }\r\n pstmt.close();\r\n }\r\n\r\n for(int i=0;i<indexes.size();i++) {\r\n sql = (StringBuffer)indexes.get(i);\r\n pstmt = conn.prepareStatement(sql.toString());\r\n try {\r\n pstmt.execute();\r\n }\r\n catch (SQLException ex3) {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex3);\r\n }\r\n pstmt.close();\r\n }\r\n\r\n conn.commit();\r\n\r\n }\r\n catch (Throwable ex) {\r\n try {\r\n Logger.error(\"NONAME\", this.getClass().getName(), \"executeSQL\",\r\n \"Invalid SQL: \" + sql, ex);\r\n }\r\n catch (Exception ex2) {\r\n }\r\n throw ex;\r\n }\r\n finally {\r\n try {\r\n if (pstmt!=null)\r\n pstmt.close();\r\n }\r\n catch (SQLException ex1) {\r\n }\r\n }\r\n }", "public final boolean run(File modFile, File datFile) throws IOException, IloException {\n\t\tString[] datFiles = null;\n\t\tif (datFile != null) {\n\t\t\tdatFiles = new String[1];\n\t\t\tdatFiles[0] = datFile.getAbsolutePath();\n\t\t}\n\t\treturn run(modFile.getAbsolutePath(), datFiles, null, null);\n\t}", "public static JdbcOption getDefaultDatabaseFromFile(String configFile) throws Exception {\n\t\tJdbcOption jdbc = new JdbcOption();\n\n\t\tDocument document;\n\t\tFile file = new File(configFile);\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\tfactory.setNamespaceAware(true);\n\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\tdocument = builder.parse(file);\n\n\t\tElement root = document.getDocumentElement();\n\n\t\tNodeList nodeList = root.getElementsByTagName(Constants.XML_TAG_DATASOURCE);\n\t\tfor (int i = 0; i < nodeList.getLength(); i++) {\n\t\t\tNode node = nodeList.item(i);\n\t\t\tNamedNodeMap attrs = node.getAttributes();\n\t\t\tString isDefault = getText(attrs, Constants.XML_TAG_DEFAULT);\n\n\t\t\tif (!\"\".equals(nullToString(isDefault)) && Boolean.valueOf(nullToString(isDefault))) {\n\t\t\t\t// isDefault 값이 null이 아니고 true인 경우 - default return\n\t\t\t\tString name = getText(attrs, Constants.XML_TAG_NAME);\n\t\t\t\tString type = getText(attrs, Constants.XML_TAG_TYPE);\n\t\t\t\tString driverJar = getText(attrs, Constants.XML_TAG_DRIVER_PATH);\n\t\t\t\tString driverClassName = getText(attrs, Constants.XML_TAG_DRIVER_CLASS_NAME);\n\t\t\t\tString url = getText(attrs, Constants.XML_TAG_URL);\n\t\t\t\tString username = getText(attrs, Constants.XML_TAG_USERNAME);\n\t\t\t\tString password = EncryptUtil.decrypt(getText(attrs, Constants.XML_TAG_PASSWORD));\n\t\t\t\tString schema = getText(attrs, Constants.XML_TAG_SCHEMA);\n\t\t\t\tString dialect = getText(attrs, Constants.XML_TAG_DIALECT);\n\t\t\t\tString driverGroupId = getText(attrs, Constants.XML_TAG_DRIVER_GROUPID);\n\t\t\t\tString driverArtifactId = getText(attrs, Constants.XML_TAG_DRIVER_ARTIFACTID);\n\t\t\t\tString driverVersion = getText(attrs, Constants.XML_TAG_DRIVER_VERSION);\n\t\t\t\tString useDbSpecific = getText(attrs, Constants.XML_TAG_USE_DB_SPECIFIC);\n\t\t\t\tString runExplainPlan = getText(attrs, Constants.XML_TAG_RUN_EXPLAIN_PLAN);\n\n\t\t\t\tjdbc.setDbName(name);\n\t\t\t\tjdbc.setDbType(type);\n\t\t\t\tjdbc.setDriverJar(driverJar);\n\t\t\t\tjdbc.setDriverClassName(driverClassName);\n\t\t\t\tjdbc.setUrl(url);\n\t\t\t\tjdbc.setUserName(username);\n\t\t\t\tjdbc.setPassword(password);\n\t\t\t\tjdbc.setSchema(schema);\n\t\t\t\tjdbc.setDialect(dialect);\n\t\t\t\tjdbc.setMvnGroupId(driverGroupId);\n\t\t\t\tjdbc.setMvnArtifactId(driverArtifactId);\n\t\t\t\tjdbc.setMvnVersion(driverVersion);\n\t\t\t\tjdbc.setUseDbSpecific(Boolean.valueOf(useDbSpecific));\n\t\t\t\tjdbc.setRunExplainPaln(Boolean.valueOf(runExplainPlan));\n\t\t\t\tjdbc.setDefault(Boolean.valueOf(isDefault));\n\t\t\t}\n\t\t}\n\t\treturn jdbc;\n\t}", "public AppModel() throws SQLException, ClassNotFoundException, IOException {\n modelLogger.debug(\"Mode logger\");\n dataBaseConnector = new DataBaseDownloader(\"jdbc:mysql://mysql.agh.edu.pl:3306/mtobiasz\",\"mtobiasz\", \"csjH6UN5BPS7VvYY\");\n String buyTableName = \"exchange_buy\";\n String sellTableName = \"exchange_sell\";\n buyMap = dataBaseConnector.getKeysAndVals(buyTableName);\n sellMap = dataBaseConnector.getKeysAndVals(sellTableName);\n }", "public JmlModelImport () throws CGException {\n try {\n\n ivModel = null;\n ivImport = UTIL.ConvertToString(new String());\n }\n catch (Exception e){\n\n e.printStackTrace(System.out);\n System.out.println(e.getMessage());\n }\n }", "public void testSimple() throws Exception\n {\n QdoxModelBuilder builder = new QdoxModelBuilder();\n\n ClassLoader classLoader = this.getClass().getClassLoader();\n URL sourceUrl = classLoader.getResource(\"builder/simple/Foo.java\");\n String parentDirName = new File(sourceUrl.getFile()).getParent();\n File parentDir = new File(parentDirName);\n List sourceDirs = new ArrayList();\n sourceDirs.add(parentDir.getAbsolutePath());\n\n Model model = new Model();\n model.setModelId(\"test\");\n ModelParams parameters = new ModelParams();\n parameters.setSourceDirs(sourceDirs);\n builder.buildModel(model, parameters);\n\n // basic sanity checks\n assertTrue(model.getComponents().size() > 0);\n\n // Now write it. Optionally, we could just write it to an in-memory\n // buffer.\n File outfile = new File(\"target/simple-out.xml\");\n IOUtils.saveModel(model, outfile);\n\n StringWriter outbuf = new StringWriter();\n IOUtils.writeModel(model, outbuf);\n\n compareData(outfile, \"builder/simple/goodfile.xml\");\n }", "@Test\n public void testLoad() throws Exception\n {\n CommonTree modelDescriptor = CommonIO.getModelDescriptor(CommonIO\n .parseModel(\"org/jactr/io/modules/pm/motor/motor-test.jactr\"));\n Collection<CommonTree> knownBuffers = ASTSupport.getTrees(modelDescriptor,\n JACTRBuilder.BUFFER);\n\n LOGGER.debug(\"Descriptor Raw : \" + modelDescriptor.toStringTree());\n for (StringBuilder line : CodeGeneratorFactory.getCodeGenerator(\"jactr\")\n .generate(modelDescriptor, true))\n LOGGER.debug(line.toString());\n\n assertEquals(\"Not the right number of buffers \" + knownBuffers, 4,\n knownBuffers.size());\n\n // we need to accept the warning for the binding of =next\n CommonIO.compilerTest(modelDescriptor, false, true);\n }", "public void testComplex() throws Exception\n {\n QdoxModelBuilder builder = new QdoxModelBuilder();\n\n ClassLoader classLoader = this.getClass().getClassLoader();\n URL sourceUrl = classLoader\n .getResource(\"builder/complex/ComponentBase.java\");\n String parentDirName = new File(sourceUrl.getFile()).getParent();\n File parentDir = new File(parentDirName);\n List sourceDirs = new ArrayList();\n sourceDirs.add(parentDir.getAbsolutePath());\n\n Model model = new Model();\n model.setModelId(\"test\");\n ModelParams parameters = new ModelParams();\n parameters.setSourceDirs(sourceDirs);\n builder.buildModel(model, parameters);\n\n // basic sanity checks\n assertTrue(model.getComponents().size() > 0);\n\n // Now write it. Optionally, we could just write it to an in-memory\n // buffer.\n File outfile = new File(\"target/complex-out.xml\");\n IOUtils.saveModel(model, outfile);\n\n StringWriter outbuf = new StringWriter();\n IOUtils.writeModel(model, outbuf);\n\n compareData(outfile, \"builder/complex/goodfile.xml\");\n }", "public void prepareDatabase(String testName) throws Exception {\n prepareDatabaseFromPath('/' + testName + \"/\" + prepareFileName);\n }", "public static void main(String[] args) throws IOException, SQLException {\n\t\treadFile rf = new readFile();\n\t\trf.create();\n\t\trf.readData();\n\t\t//String sql = \"select * from examSelect\";\n\t\t//rf.select(sql);\n//\t\trf.test();\n\t\t//rf.readItem();\n\t}", "public String openDBConnection(TestStepRunner testStepRunner,\n\t\t\tString connIdentifier, String parameterList) throws AFTException {\n\n\t\tString[] paramArray = null;\n\t\tString connString, jdbcClassString, parmListLowerCase, dbInstanceIdentifier, dbType = null;\n\n\t\t/** The Database connection object. */\n\t\tConnection connectionObject = null;\n\n\t\t// convert to lower case and create connString accordingly\n\t\tparmListLowerCase = parameterList.toLowerCase();\n\t\ttestStepRunner.getTestSuiteRunner().setDbParameterLst(parameterList);\n\t\ttestStepRunner.getTestSuiteRunner().setDbConnIdentifier(connIdentifier);\n\t\tLOGGER.trace(\"Executing [openDBConnection] with connection string [\"\n\t\t\t\t+ parameterList + \"]\");\n\n\t\tparamArray = parameterList.split(Constants.DBFIXTUREPARAMDELIMITER);\n\n\t\t// if user has provided dbType = MSSQL\n\t\tif (parmListLowerCase.contains(\"mssql\")) {\n\t\t\tconnString = createMSSqlConnString(paramArray);\n\t\t\tjdbcClassString = MSSQLDRIVER;\n\t\t\tdbType = \"MSSQL\";\n\t\t\t// if user has provided DSN without dbType\n\t\t} else if (parmListLowerCase.contains(\"dsn\")) {\n\t\t\tconnString = createDSNConnString(paramArray);\n\t\t\tjdbcClassString = DSNACCCESSDRIVER;\n\t\t\tdbType = \"DSN\";\n\t\t\t// if user has provided Access data file name\n\t\t} else if (parmListLowerCase.contains(\"dbq\")) {\n\t\t\tconnString = createAccessConnString(paramArray);\n\t\t\tjdbcClassString = DSNACCCESSDRIVER;\n\t\t\tdbType = \"ACCESS\";\n\t\t\t// if user has provided dbType = Oracle\n\t\t} else if (parmListLowerCase.contains(\"oracle\")) {\n\t\t\tconnString = createOracleConnString(paramArray);\n\t\t\tjdbcClassString = ORACLEDRIVER;\n\t\t\tdbType = \"ORACLE\";\n\t\t\t// if user has provided dbType = MYSQL\n\t\t} else if (parmListLowerCase.contains(\"mysql\")) {\n\t\t\tconnString = createMySqlConnString(paramArray);\n\t\t\tjdbcClassString = MYSQLDRIVER;\n\t\t\tdbType = \"MYSQL\";\n\t\t} else {\n\t\t\terrorMessage = \"Please refer to Wiki for the type of databases supported by AFT\";\n\t\t\tLOGGER.error(errorMessage);\n\t\t\tthrow new AFTException(errorMessage);\n\t\t}\n\n\t\tLOGGER.debug(\"Connection string [\" + connString + \"]\");\n\n\t\ttry {\n\n\t\t\tClass.forName(jdbcClassString);\n\t\t\tif (!connUidPwdProp.isEmpty()) { // if user provided userid and\n\t\t\t\t// password for connection\n\n\t\t\t\tLOGGER.debug(\"Username = \" + connUidPwdProp.get(\"uid\")\n\t\t\t\t\t\t+ \" Password = \" + connUidPwdProp.get(\"pwd\"));\n\n\t\t\t\tconnectionObject = DriverManager.getConnection(connString,\n\t\t\t\t\t\tconnUidPwdProp.getProperty(\"uid\"),\n\t\t\t\t\t\tconnUidPwdProp.getProperty(\"pwd\"));\n\n\t\t\t} else { // for mssql and connections without userid and password\n\t\t\t\t// Added security flag to support windows authentication\n\t\t\t\tif (parmListLowerCase.contains(\"mssql\")) {\n\t\t\t\t\tconnectionObject = DriverManager.getConnection(connString\n\t\t\t\t\t\t\t+ \"integratedSecurity=true;\");\n\t\t\t\t} else {\n\t\t\t\t\tconnectionObject = DriverManager.getConnection(connString);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t// create an object of databaseInstance\n\t\t\tDatabaseInstance dbInstance = new DatabaseInstance(\n\t\t\t\t\tconnectionObject, dbType);\n\n\t\t\t// generate an unique identifier for the opened database connection\n\t\t\tdbInstanceIdentifier = dbInstance.getConnectionIdentifier();\n\n\t\t\t// store the (dbInstanceIdentifier, dbInstance object) in\n\t\t\t// databaseInstanceMap\n\t\t\tDatabaseInstanceManager.getInstance().addDBInstance(\n\t\t\t\t\tdbInstanceIdentifier, dbInstance);\n\t\t\tLOGGER.info(\"Connection [\" + dbInstanceIdentifier\n\t\t\t\t\t+ \"] has been opened successfully\");\n\t\t\t// Added the below code to maintain db details Instance wise for ETL\n\t\t\t// data verification purpose\n\t\t\tDatabaseInstanceManager.getInstance().addDBInstanceParameters(\n\t\t\t\t\tdbInstanceIdentifier, paramArray);\n\t\t\t// if user did not provide any identifier variable\n\t\t\tif (connIdentifier == null || connIdentifier.isEmpty()\n\t\t\t\t\t|| connIdentifier.equalsIgnoreCase(Constants.EMPTYVALUE)) {\n\t\t\t\tLOGGER.info(\"No user variable passed\");\n\t\t\t} else {\n\t\t\t\t// assign dbInstanceIdentifier to connIdentifier\n\t\t\t\tLOGGER.info(\"Storing connection [\" + dbInstanceIdentifier\n\t\t\t\t\t\t+ \"] in user variable [\" + connIdentifier + \"]\");\n\t\t\t\tVariable.getInstance().setVariableValue(\n\t\t\t\t\t\ttestStepRunner.getTestSuiteRunner(),\n\t\t\t\t\t\t\"openDBConnection\", connIdentifier, false,\n\t\t\t\t\t\tdbInstanceIdentifier);\n\t\t\t}\n\t\t\t// store the dbInstanceIdentifier in system variable\n\t\t\t// AFT_LastDBConnection\n\t\t\tLOGGER.info(\"Storing connection [\" + dbInstanceIdentifier\n\t\t\t\t\t+ \"] in system variable [AFT_LastDBConnection] as default\");\n\t\t\tVariable.getInstance().setVariableValue(\n\t\t\t\t\tVariable.getInstance().generateSysVarName(\n\t\t\t\t\t\t\tSystemVariables.AFT_LASTDBCONNECTION), true,\n\t\t\t\t\tdbInstanceIdentifier);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// set onDbErrorValue\n\t\t\tsetOnDbErrorValue(testStepRunner);\n\n\t\t\tLOGGER.error(\"Exception::\", e);\n\t\t\tthrow new AFTException(e);\n\t\t} catch (SQLException e) {\n\t\t\t// set onDbErrorValue\n\t\t\tsetOnDbErrorValue(testStepRunner);\n\n\t\t\tLOGGER.error(\"Exception::\", e);\n\t\t\tthrow new AFTException(e);\n\n\t\t} finally {\n\t\t\tconnUidPwdProp.clear();\n\t\t}\n\t\treturn dbInstanceIdentifier;\n\t}", "public static void populateDB(Class relativeClass, String fileName) {\n URL dataFileURL = relativeClass.getResource(fileName);\n String dataFile = dataFileURL.getFile();\n populateDB(dataFile);\n }", "public CoreDatabase(String dbName) throws SQLException {\n\n this.conn = DriverManager.getConnection(\n SQLITE_URL + dbName + EXTENSION\n );\n\n }", "public void run(String[] config) throws IOException\n\t{\n\t\tFile f = new File(config[0]);\n\t\tif(config.length != 1 || !f.exists()){\n\t\t\tSystem.err.println(\"Usage: java Cellar config_file_name\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tmodel = new Model(f);\n\t\trun = new GUIInterface(model);\n\t}", "public static void main(String[] args) {\n\n if (args.length < 2 || args.length > 3) {\n System.out.println(\"Usage: BuildDemoData <dir> <file> [<jenaflag>]\");\n System.out.println(\"where <dir> is the output directory\");\n System.out.println(\"where <file> is a properties file\");\n System.out.println(\"where <jenaflag> is any value\");\n System.exit(0);\n }\n\n Properties dataProps = new Properties();\n\n try {\n File props = new File(args[1]);\n FileInputStream fis = new FileInputStream(props);\n dataProps.load((InputStream) fis);\n } catch (Exception e) {\n System.err.println(e.toString());\n e.printStackTrace();\n }\n\n \tModel model = ModelFactory.createDefaultModel();\n try {\n model = getModelFromFiles(dataProps);\n } catch (Exception e) {\n System.err.println(e.toString());\n e.printStackTrace();\n }\n \n System.out.println(\"Writing no inferencing model...\");\n writeModel(model, args[0] + \"simileDemoNoInference.rdf\");\n System.out.println(\"Uninferenced model contains \" + model.size() + \" statements\");\n\n System.out.println(\"Inferencing...\"); \t\n if (args.length == 2) {\n Reasoner reasoner = new SimileReasoner();\n writeModel(reasoner.process(model), args[0] + \"simileDemoMappingInference.rdf\");\n } else {\n Reasoner reasoner = new JenaReasoner();\n writeModel(reasoner.process(model), args[0] + \"simileDemoJenaInference.rdf\");\n }\n \n System.out.println(\"Inferenced model contains \" + model.size() + \" statements\");\n }", "public interface DBStructure {\n\n String save(DataSource dataSource);\n\n void update(DataSource dataSource, String fileMask) throws UpdateException;\n\n void dropAll(DataSource dataSource) throws DropAllException;\n\n String getSqlScript(DataSource dataSource);\n\n void unlock(DataSource dataSource);\n}", "public static void main(String[] args) throws IOException, InterruptedException {\n\n File src = new ClassPathResource(\"winequality-red.csv\").getFile();\n\n FileSplit fileSplit = new FileSplit(src);\n\n RecordReader rr = new CSVRecordReader(1,',');// since there is header in the file remove row 1 with delimter coma\n rr.initialize(fileSplit);\n\n Schema sc = new Schema.Builder()\n .addColumnsDouble(\"fixed acidity\",\"volatile acidity\",\"citric acid\",\"residual sugar\",\"chlorides\",\"free sulfur dioxide\",\"total sulfur dioxide\",\"density\",\"pH\",\"sulphates\",\"alcohol\")\n .addColumnCategorical(\"quality\", Arrays.asList(\"3\",\"4\",\"5\",\"6\",\"7\",\"8\"))\n .build();\n\n TransformProcess tp = new TransformProcess.Builder(sc)\n .categoricalToInteger(\"quality\")\n .build();\n\n System.out.println(\"Initial Schema : \"+tp.getInitialSchema());\n System.out.println(\"New Schema : \"+tp.getFinalSchema());\n\n List<List<Writable>> original_data = new ArrayList<>();\n\n while(rr.hasNext()){\n original_data.add(rr.next());\n }\n\n List<List<Writable>> transformed_data = LocalTransformExecutor.execute(original_data,tp);\n\n CollectionRecordReader crr = new CollectionRecordReader(transformed_data);\n\n DataSetIterator iter = new RecordReaderDataSetIterator(crr,transformed_data.size(),-1,6);\n\n DataSet fullDataSet = iter.next();\n fullDataSet.shuffle(seed);\n\n SplitTestAndTrain traintestsplit = fullDataSet.splitTestAndTrain(0.8);\n DataSet trainDataSet = traintestsplit.getTrain();\n DataSet testDataSet = traintestsplit.getTest();\n\n\n DataNormalization normalization = new NormalizerMinMaxScaler();\n normalization.fit(trainDataSet);\n normalization.transform(trainDataSet);\n normalization.transform(testDataSet);\n\n MultiLayerConfiguration config = getConfig (numberInput,numberClasses,learning_rate);\n\n MultiLayerNetwork model = new MultiLayerNetwork(config);\n model.init();\n\n //UI-Evaluator\n StatsStorage storage = new InMemoryStatsStorage();\n UIServer server = UIServer.getInstance();\n server.attach(storage);\n\n //Set model listeners\n model.setListeners(new StatsListener(storage, 10));\n\n Evaluation eval;\n\n for(int i=0;i<epochs;i++) {\n model.fit(trainDataSet);\n eval = model.evaluate(new ViewIterator(testDataSet, transformed_data.size()));\n System.out.println(\"Epoch \" + i + \", Accuracy : \"+eval.accuracy());\n }\n\n Evaluation evalTrain = model.evaluate(new ViewIterator(trainDataSet,transformed_data.size()));\n Evaluation evalTest = model.evaluate(new ViewIterator(testDataSet,transformed_data.size()));\n\n System.out.println(\"Train Eval : \"+evalTrain.stats());\n System.out.println(\"Test Eval : \"+evalTest.stats());\n\n\n\n\n\n\n\n }", "public static void main(String[] args) {\r\n\t\tnew CreateDataModelForFile(PROJECT_NAME, RELATIVE_FILE_PATH).execute();\r\n\t}", "private DatabaseRepository() {\n try {\n // connect to database\n\n DB_URL = \"jdbc:sqlite:\"\n + this.getClass().getProtectionDomain()\n .getCodeSource()\n .getLocation()\n .toURI()\n .getPath().replaceAll(\"[/\\\\\\\\]\\\\w*\\\\.jar\", \"/\")\n + \"lib/GM-SIS.db\";\n connection = DriverManager.getConnection(DB_URL);\n mapper = ObjectRelationalMapper.getInstance();\n mapper.initialize(this);\n }\n catch (SQLException | URISyntaxException e) {\n System.out.println(e.toString());\n }\n }", "public static void main(String[] args) throws SQLException, IOException, EncryptedDocumentException,\n\t\t\tInvalidFormatException, ClassNotFoundException {\n\n\t\tString id_config = args[0];\n\t\tSystem.out.println(id_config);\n\n\t\t////\n\t\tExtractData ex = new ExtractData();\n\t\tDBControl db = new DBControl();\n\t\tMyLog myLog = new MyLog();\n\t\tDBControl.getConfig(id_config);\n\t\tSystem.out.println(\"READ data\");\n//\t\tSystem.out.println(\"tới phần gây cấn nhất insert \");\n//\t\tFile file = new File(\"F:\\\\NAM3_KY2\\\\DT Warhouse\\\\SCP\");\n\n//\t\tex.readValuesXLSX(file);\n\t\tSystem.out.println(\"........\");\n//\t\tex.insertValues(db.dataPath);\n//\t\tex.insertData();\n//\t\tex.extractData();\n\t\tDowloadFile dowFile = new DowloadFile();\n\t\tSystem.out.println(dowFile.dowloadFile());\n//\t\tSystem.out.println(\"tải hết file môn học ; và sinh viên :: \");\n//\t\tSystem.out.println(\"dow thành công \");\n//\t\tmyLog.wiriteLog(DBControl.dirLog);\n//\t\tSystem.out.println(\"Check send mail\");\n//\t\tdowFile.checkSendMail();\n\t\tString id_confi = args[1];\n\t\tSystem.out.println(\"OK xong cái Sinh viên :::\");\n\t\tDBControl.getConfig(id_confi);// 2: Môn học\n//\n\t\tSystem.out.println(dowFile.dowloadFile());\n//\t\tSystem.out.println(\"h tới môn học:::\");\n////\t\tdowFile.dowloadFile_MonHoc();\n//\t\tSystem.out.println(\"ok xong môn học::::\");\n//\n//\t\t//\n//\t\tDBControl.getConfig(3);// 3: Đăng ký\n//\n//\t\tSystem.out.println(dowFile.dowloadFile());\n//\t\tSystem.out.println(\"h tới đăng ký:::\");\n////\t\tdowFile.dowloadFile_MonHoc();\n//\t\tSystem.out.println(\"ok xong đăng ký::::\");\n//\n//\t\t//\n//\t\tDBControl.getConfig(4);// 4: Lớp Học\n//\n//\t\tSystem.out.println(dowFile.dowloadFile());\n//\t\tSystem.out.println(\"h tới lớp học:::\");\n////\t\tdowFile.dowloadFile_MonHoc();\n//\t\tSystem.out.println(\"ok xong lớp học::::\");\n//\n//\t\tSystem.out.println(\"h tới môn học:::\");\n////\t\tdowFile.dowloadFile_MonHoc();\n//\t\tSystem.out.println(\"ok xong môn học::::\");\n\t\t/////////////\n//\t\tDBControl.getConfig(5);\n//\t\tDate_Dim dd = new Date_Dim();\n//\t\tdd.sqlCreatTable();\n\t\tSystem.out.println(\"ok\");\n\n\t}", "public static void main(String[] args) throws SQLException, IOException {\n\t\t Driver driverref = new Driver();\n\t\t DriverManager.registerDriver(driverref);\n\t\t \n\t //step-2 : get the connection to data base\n\t\t FileInputStream fis = new FileInputStream(\"./dataBaseConfig.properties\");\n\t\t Properties p = new Properties();\n\t\t p.load(fis);\n\t\t \n\t\t Connection con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/projects\", p);\n\t\t \n\t //step 3 : issue create statement object\n\t\t Statement stat = con.createStatement();\n\t\t \n\t //step 4 : execute Query\n\t\t ResultSet result = stat.executeQuery(\"select * from project\");\n\t\t \n\t\t while(result.next()) {\n\t\t \tSystem.out.println(result.getString(1) + \"\\t\"+result.getString(2) + \"\\t\"+result.getString(4));\n\t\t \t\n\t\t }\n\n\t //step 5 : close the connection\t\n\t\t con.close();\n\n\t}", "public File getInputDb();", "public static void provideDAOsImports(final FileWriterWrapper writer,\n final String entityCodeName)\n throws IOException {\n writer.write(\"import java.sql.Connection;\\n\");\n writer.write(\"import java.sql.PreparedStatement;\\n\");\n writer.write(\"import java.sql.ResultSet;\\n\");\n writer.write(\"import java.sql.SQLException;\\n\");\n writer.write(\"import java.util.ArrayList;\\n\\n\");\n\n writer.write(\"import pojos.\" + entityCodeName + \";\\n\\n\");\n }", "protected void loadDriver() {\n try {\n Class.forName(\"org.relique.jdbc.csv.CsvDriver\");\n this.setConnection(DriverManager.getConnection(\"jdbc:relique:csv:\" + this.getDirectory()));\n this.setStatement(this.getConnection().createStatement());\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace(System.out);\n System.exit(1);\n } catch (SQLException ex) {\n ex.printStackTrace(System.out);\n System.exit(1);\n }\n }", "public DataConnection() {\n\t\ttry {\n\t\t\tString dbClass = \"com.mysql.jdbc.Driver\";\n\t\t\tClass.forName(dbClass).newInstance();\n\t\t\tConnection con = DriverManager.getConnection(DIR_DB, USER_DB, PASS_DB);\n\t\t\tstatement = con.createStatement();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public interface DatabaseManager {\r\n\r\n // NOTE: this is a draft of the interface. More methods will likely be\r\n // added.\r\n\r\n /**\r\n * Uploads the specified feature to the database.\r\n * \r\n * @param file the shapefile (*.shp) to upload\r\n * @param project the project to associate the shapefile with\r\n * @return the id of the feature in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadFeature(File file, String project) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified modis tile to the database.\r\n * \r\n * @param file the .hdf to upload\r\n * @param product the modis product\r\n * @param date the date the data was captured\r\n * @param downloaded the date the data was downloaded from the host\r\n * @param horz the horizontal tile number\r\n * @param vert the vertical tile number\r\n * @return the id of the Modis raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadModis(File file, ModisProduct product, DataDate date, DataDate updated, int horz, int vert) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified ETo file to the database.\r\n * \r\n * @param file the\r\n * @param date\r\n * @param updated\r\n * @return the id of the ETo raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadEto(File file, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified TRMM file to the database.\r\n * \r\n * @param file\r\n * @param date\r\n * @param updated\r\n * @return the id of the TRMM raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadTrmm(File file, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified projected Modis product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param product\r\n * @param date\r\n * @param updated\r\n * @return the id of the projected Modis raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadProjectedModis(File file, String project, ModisProduct product, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified projected ETo product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the projected ETo raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadProjectedEto(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the projected TRMM product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the TRMM raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadProjectedTrmm(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified ETa product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the ETa raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadEta(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified EVI product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the EVI raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadEvi(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified NDVI product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the NDVI raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadNdvi(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified NDWI5 product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the NDWI5 raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadNdwi5(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified NDWI6 product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the NDWI6 raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadNdwi6(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified SAVI product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the SAVI raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadSavi(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified feature and places it in the specified file in\r\n * the shapefile.\r\n * \r\n * @param file the location to save the feature\r\n * @param id the id of the feature\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadFeature(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified Modis tile from the database.\r\n * \r\n * @param file\r\n * @param product\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadModis(File file, ModisProduct product, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified ETo raster from the database and saves it to the\r\n * specified file.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadEto(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified TRMM raster from the database and saves it to the\r\n * specified file.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadTrmm(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified projected Modis product from the database.\r\n * \r\n * @param file\r\n * @param product\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadProjectedModis(File file, ModisProduct product, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified projected ETo product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadProjectedEto(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified projected TRMM product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadProjectedTrmm(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified ETa product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadEta(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified EVI product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadEvi(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified NDVI product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadNdvi(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified NDWI5 product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadNdwi5(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified NDWI6 product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadNdwi6(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified SAVI product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadSavi(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Returns the id of the MODIS raster for the specified product and date.\r\n * \r\n * @param product\r\n * @param date\r\n * @param horz\r\n * @param vert\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the ETo for the specified date.\r\n * \r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getEtoId(DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the TRMM for the specified date.\r\n * \r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getTrmmId(DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the reprojected Modis raster for the specified\r\n * project, product, and date.\r\n * \r\n * @param project\r\n * @param product\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getReprojectedModisId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the reprojected ETo raster for the specified project\r\n * and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getReprojectedEtoId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the reprojected TRMM raster for the specified project\r\n * and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getReprojectedTrmmId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the ETa raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getEtaId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the EVI raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getEviId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the NDVI raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getNdviId(String project, String feature, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the NDWI5 raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getNdwi5Id(String project, String feature, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the NDWI6 raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getNdwi6Id(String project, String feature, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the SAVI raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getSaviId(String project, String feature, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Uploads the specified zonal statistics.\r\n * \r\n * @param project\r\n * @param feature\r\n * @param zoneField\r\n * @param zone\r\n * @param date\r\n * @param index\r\n * @param zonalStatistics\r\n */\r\n void uploadZonalStatistic(String project, String feature, String zoneField,\r\n String zone, DataDate date, EnvironmentalIndex index,\r\n ZonalStatistic zonalStatistics) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the zonal statistics for the specified parameters.\r\n * \r\n * @param project\r\n * @param feature\r\n * @param zoneField\r\n * @param zone\r\n * @param date\r\n * @param index\r\n * @return the id or -1 if it is not found\r\n */\r\n int getZonalStatisticId(String project, String feature, String zoneField,\r\n String zone, DataDate date, EnvironmentalIndex index)\r\n throws SQLException;\r\n\r\n /**\r\n * Returns zonal statistics for the specified zonal statistic id.\r\n * \r\n * @param id\r\n * @return zonal statistics\r\n * @throws SQLException\r\n */\r\n ZonalStatistic getZonalStatistic(int id) throws SQLException;\r\n}", "private void setupDatabase()\n {\n try\n {\n Class.forName(\"com.mysql.jdbc.Driver\");\n }\n catch (ClassNotFoundException e)\n {\n simpleEconomy.getLogger().severe(\"Could not load database driver.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n\n try\n {\n connection = DriverManager\n .getConnection(String.format(\"jdbc:mysql://%s/%s?user=%s&password=%s\",\n simpleEconomy.getConfig().getString(\"db.host\"),\n simpleEconomy.getConfig().getString(\"db.database\"),\n simpleEconomy.getConfig().getString(\"db.username\"),\n simpleEconomy.getConfig().getString(\"db.password\")\n ));\n\n // Loads the ddl from the jar and commits it to the database.\n InputStream input = getClass().getResourceAsStream(\"/ddl.sql\");\n try\n {\n String s = IOUtils.toString(input);\n connection.createStatement().execute(s);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n finally\n {\n try\n {\n input.close();\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n catch (SQLException e)\n {\n simpleEconomy.getLogger().severe(\"Could not connect to database.\");\n simpleEconomy.getServer().getPluginManager().disablePlugin(simpleEconomy);\n e.printStackTrace();\n }\n }", "@Before\n public void init() throws ConnectionException, IOException {\n\n final ConnectionPool pool = ConnectionPool.getInstance();\n//\n final Connection connection = pool.takeConnection();\n\n final ScriptRunner scriptRunner = new ScriptRunner(connection);\n\n Reader reader = new BufferedReader(new FileReader(UserDaoTest.class.getClassLoader().getResource(\"db_v2.sql\").getPath()));\n\n scriptRunner.runScript(reader);\n\n pool.closeConnection(connection);\n\n }", "public void initDatabase() throws SQLException {\n\n ModelFactory factory = new ModelFactory(this.connection);\n\n StopsDao stopsData = factory.getStopsDao();\n\n ArrayList<Stop> stops = stopsData.getStopsFromCsv(getResource(\"stops.csv\"));\n\n Iterator<Stop> it = stops.iterator();\n while(it.hasNext()) {\n Stop stop = it.next();\n System.out.println(stop.toString());\n }\n\n\n /*\n ShapesDao shapesData = factory.getShapesDao();\n\n ArrayList<Shape> shapes = shapesData.getShapesFromCsv(getResource(\"shapes.csv\"));\n\n Iterator<Shape> it = shapes.iterator();\n while(it.hasNext()) {\n Shape shape = it.next();\n System.out.println(shape.toString());\n }\n\n CalendarDateDao calendarData = factory.getCalendarDatesDao();\n\n ArrayList<CalendarDate> agencies = calendarData.getCalendarDatesFromCsv(getResource(\"calendar_dates.csv\"));\n\n Iterator<CalendarDate> it = agencies.iterator();\n while(it.hasNext()) {\n CalendarDate date = it.next();\n System.out.println(date.toString());\n }\n\n AgencyDao agencyData = factory.getAgencyDao();\n agencyData.drop();\n agencyData.create();\n\n ArrayList<Agency> agencies = agencyData.getAgenciesFromCsv(getResource(\"agency.csv\"));\n\n Iterator<Agency> it = agencies.iterator();\n while(it.hasNext()) {\n Agency age = it.next();\n System.out.println(age.toString());\n agencyData.saveAgency(age);\n }\n\n RoutesDao routesDao = factory.getRouteDao();\n routesDao.drop();\n routesDao.create();\n\n ArrayList<Route> routes = routesDao.getRoutesFromCsv(getResource(\"routes.csv\"));\n\n Iterator<Route> it = routes.iterator();\n while(it.hasNext()) {\n Route route = it.next();\n System.out.println(route.toString());\n }*/\n }", "private void createDataBaseStructure(DataSource dataSource, String driverClass) throws IOException {\n\t\tResourceDatabasePopulator databasePopulator = new ResourceDatabasePopulator();\n\t\tdatabasePopulator.setContinueOnError(true);\n\t\t\n\t\tif (driverClass.equals(LocalConstants.DATABASES.hsql.driverClass)) {\n\t\t\tdatabasePopulator.addScripts(new ClassPathResource(\"hsqldb.sql\"), getModifiiedSessionTableSql());\n\t\t} else {\n\t\t\tdatabasePopulator.addScripts(new ClassPathResource(\"schema.sql\"), getModifiiedSessionTableSql());\n\t\t}\n\n\t\tDatabasePopulatorUtils.execute(databasePopulator, dataSource);\n\t}", "public static void main(String args[])throws Exception {\n \n \n String driver = \"com.mysql.jdbc.Driver\";\n\n \t\t \n \tClass.forName(driver);\n\n \t\tString url = \"jdbc:mysql://127.0.0.1:3306/doc\";\n\n \t\t\n \t\t Connection c= DriverManager.getConnection(url, \"root\", \"\" );\n \t\t System.out.println(c.getCatalog());\n\n \n //conexao.setDataSource(url);\n //conexao.setConexao();\n //conexao.getConexao().setCatalog(\"sae\");\n // System.out.println(conexao.getConexao().getCatalog());\n // conexao.setDataSource(\"jdbc:interbase://localhost/\"+\n // Persistencia.CAMINHO+\"Noticia.gdb\"); //d:\\\\IPT-Web\\\\escola\\\\\n\t\n}", "public static void main(String[] args) throws Exception {\n TDB.setOptimizerWarningFlag(false);\n\n final String DATASET_DIR_NAME = \"data0\";\n final Dataset data0 = TDBFactory.createDataset( DATASET_DIR_NAME );\n\n // show the currently registered names\n for (Iterator<String> it = data0.listNames(); it.hasNext(); ) {\n out.println(\"NAME=\"+it.next());\n }\n\n out.println(\"getting named model...\");\n /// this is the OWL portion\n final Model model = data0.getNamedModel( MY_NS );\n out.println(\"Model := \"+model);\n\n out.println(\"getting graph...\");\n /// this is the DATA in that MODEL\n final Graph graph = model.getGraph();\n out.println(\"Graph := \"+graph);\n\n if (graph.isEmpty()) {\n final Resource product1 = model.createResource( MY_NS +\"product/1\");\n final Property hasName = model.createProperty( MY_NS, \"#hasName\");\n final Statement stmt = model.createStatement(\n product1, hasName, model.createLiteral(\"Beach Ball\",\"en\") );\n out.println(\"Statement = \" + stmt);\n\n model.add(stmt);\n\n // just for fun\n out.println(\"Triple := \" + stmt.asTriple().toString());\n } else {\n out.println(\"Graph is not Empty; it has \"+graph.size()+\" Statements\");\n long t0, t1;\n t0 = System.currentTimeMillis();\n final Query q = QueryFactory.create(\n \"PREFIX exns: <\"+MY_NS+\"#>\\n\"+\n \"PREFIX exprod: <\"+MY_NS+\"product/>\\n\"+\n \" SELECT * \"\n // if you don't provide the Model to the\n // QueryExecutionFactory below, then you'll need\n // to specify the FROM;\n // you *can* always specify it, if you want\n // +\" FROM <\"+MY_NS+\">\\n\"\n // +\" WHERE { ?node <\"+MY_NS+\"#hasName> ?name }\"\n // +\" WHERE { ?node exns:hasName ?name }\"\n // +\" WHERE { exprod:1 exns:hasName ?name }\"\n +\" WHERE { ?res ?pred ?obj }\"\n );\n out.println(\"Query := \"+q);\n t1 = System.currentTimeMillis();\n out.println(\"QueryFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n try ( QueryExecution qExec = QueryExecutionFactory\n // if you query the whole DataSet,\n // you have to provide a FROM in the SparQL\n //.create(q, data0);\n .create(q, model) ) {\n t1 = System.currentTimeMillis();\n out.println(\"QueryExecutionFactory.TIME=\"+(t1 - t0));\n\n t0 = System.currentTimeMillis();\n ResultSet rs = qExec.execSelect();\n t1 = System.currentTimeMillis();\n out.println(\"executeSelect.TIME=\"+(t1 - t0));\n while (rs.hasNext()) {\n QuerySolution sol = rs.next();\n out.println(\"Solution := \"+sol);\n for (Iterator<String> names = sol.varNames(); names.hasNext(); ) {\n final String name = names.next();\n out.println(\"\\t\"+name+\" := \"+sol.get(name));\n }\n }\n }\n }\n out.println(\"closing graph\");\n graph.close();\n out.println(\"closing model\");\n model.close();\n //out.println(\"closing DataSetGraph\");\n //dsg.close();\n out.println(\"closing DataSet\");\n data0.close();\n }", "public abstract Model openModel(String graphName) throws JenaProviderException;", "@Test\n public void test() throws SQLException {\n System.out.println(new MyDbutilsDemo().load(12));\n }", "public String automate(AutomatorRequest req) throws Exception {\n generateJAXBClasses(req.getSourceArgs());\n\n // 2. Generate JAXB class files from target schema.\n\n generateJAXBClasses(req.getTargetArgs());\n\n // 3. Compile\n Compiler compiler = new Compiler();\n List<String> fileNames = compiler.getFileNames(req.getGeneratedDir());\n\n compiler.compile(req.getCompiledDir(), fileNames.toArray(new String[0]));\n\n // 4. create JAR\n new JarMaker().createJar(req.getCompiledDir(), req.getJarFile());\n\n // 5. classload the JAR\n JarClassLoader jcl = new JarClassLoader();\n jcl.add(req.getJarFile());\n\n Object srcObject = null;\n // 6. Load source XML instance.\n if (req.srcFormat == FORMAT.XML) {\n JAXBContext context = JAXBContext.newInstance(req.getSourcePkg(), jcl);\n\n Unmarshaller unMarshaller = context.createUnmarshaller();\n srcObject = unMarshaller.unmarshal(new StreamSource(new StringReader(req.sourceInstance)), Class.forName(req\n .getSourcePkg() + \".\" + req.srcRoot, true, jcl));\n if (JAXBElement.class.isInstance(srcObject)) {\n srcObject = ((JAXBElement<?>) srcObject).getValue();\n }\n } else if (req.srcFormat == FORMAT.JSON) {\n ObjectMapper mapper = new ObjectMapper();\n srcObject = mapper.readValue(new StringReader(req.sourceInstance), Class.forName(req.getSourcePkg()\n + \".\"\n + req.srcRoot, true, jcl));\n } else {\n return \"Flat file support is yet to be implemented\";\n }\n // 7. Instantiate target type & update mapping\n Object targetObject = JclObjectFactory.getInstance().create(jcl, req.getTargetPkg() + \".\" + req.tgtRoot);\n\n // 7.5 Mappings\n mpg = new Properties();\n mpg.load(FileUtils.openInputStream(new File(req.getMappingFile())));\n\n tools = new Properties();\n tools.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(\"operations.properties\"));\n\n for (Object key : mpg.keySet()) {\n String destProperty = (String) key;\n handleMapping(destProperty, srcObject, targetObject);\n }\n\n if (req.destFormat == FORMAT.JSON) {\n // 8. To JSON\n ObjectMapper mpr = new ObjectMapper();\n String json = mpr.writerWithDefaultPrettyPrinter().writeValueAsString(targetObject);\n System.out.println(json);\n return json;\n } else if (req.destFormat == FORMAT.XML) {\n JAXBContext context = JAXBContext.newInstance(req.getTargetPkg(), jcl);\n\n Marshaller marshaller = context.createMarshaller();\n StringWriter writer = new StringWriter();\n marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n marshaller.marshal(targetObject, writer);\n String xml = writer.toString();\n System.out.println(xml);\n return xml;\n } else {\n return \"Flat file support is yet to be implemented\";\n }\n }", "public JDBCModelReader(DBObjectFactory factory, DBTypeConverter typeConverter, Connection connection,\n\t\t\tString schemeName, List<String> includeTableNamePatterns) {\n\t\tsuper();\n\t\tthis.connection = connection;\n\t\tthis.factory = factory;\n\t\tthis.includeTableNamePatterns = includeTableNamePatterns;\n\t\tthis.schemeName = schemeName;\n\t\tthis.typeConverter = typeConverter;\n\t}", "public static File generateAssemblyPlan(Set<AssignedModule> modulesToTest, String filePath) throws Exception {\n \n //Add testing modules to target modules\n HashSet<AssignedModule> allModules = new HashSet<>();\n HashSet<List<Feature>> moduleFeatureHash = new HashSet<>();\n \n for (AssignedModule targetModule : modulesToTest) {\n if (!moduleFeatureHash.contains(targetModule.getAllModuleFeatures())) {\n allModules.add(targetModule);\n moduleFeatureHash.add(targetModule.getAllModuleFeatures());\n }\n\n List<AssignedModule> controlModules = targetModule.getControlModules();\n for (AssignedModule controlModule : controlModules) {\n if (!moduleFeatureHash.contains(controlModule.getAllModuleFeatures())) {\n allModules.add(controlModule);\n moduleFeatureHash.add(controlModule.getAllModuleFeatures());\n }\n }\n }\n \n ClothoConnection conn = new ClothoConnection(Args.clothoLocation,Args.maxTimeOut);\n Clotho clothoObject = new Clotho(conn); \n \n //Get Phoenix data from Clotho\n JSONObject parameters = ClothoAdaptor.getAssemblyParameters(\"default\",clothoObject).toJSON();\n org.json.JSONObject rParameters = convertJSONs(parameters);\n \n Map polyNucQuery = new HashMap();\n //polyNucQuery.put(\"schema\", \"org.cidarlab.phoenix.core.dom.Polynucleotide\");\n HashSet<Polynucleotide> polyNucs = new HashSet<>(ClothoAdaptor.queryPolynucleotides(polyNucQuery,clothoObject));\n \n Map featureQuery = new HashMap();\n //featureQuery.put(\"schema\", \"org.cidarlab.phoenix.core.dom.Feature\");\n List<Feature> allFeatures = ClothoAdaptor.queryFeatures(featureQuery,clothoObject);\n \n Map fluorophoreQuery = new HashMap();\n //fluorophoreQuery.put(\"schema\", \"org.cidarlab.phoenix.core.dom.Fluorophore\");\n allFeatures.addAll(ClothoAdaptor.queryFluorophores(fluorophoreQuery,clothoObject));\n \n //Determine parts library\n HashSet<org.cidarlab.raven.datastructures.Part> partsLibR = new HashSet();\n HashSet<org.cidarlab.raven.datastructures.Vector> vectorsLibR = new HashSet();\n \n //Convert Phoenix Features to Raven Parts\n partsLibR.addAll(phoenixFeaturesToRavenParts(allFeatures));\n \n //Convert Phoenix Polynucleotides to Raven Parts, Vectors and Plasmids\n HashMap<org.cidarlab.raven.datastructures.Part, org.cidarlab.raven.datastructures.Vector> libPairs = ravenPartVectorPairs(polyNucs, partsLibR, vectorsLibR);\n vectorsLibR.addAll(libPairs.values());\n partsLibR.addAll(libPairs.keySet());\n \n //Convert Phoenix Modules to Raven Plasmids\n ArrayList<HashSet<org.cidarlab.raven.datastructures.Part>> listTargetSets = new ArrayList();\n HashSet<AssignedModule> expressees = new HashSet<>();\n HashSet<AssignedModule> expressors = new HashSet<>();\n for (AssignedModule m : allModules) {\n if (m.getRole() == ModuleRole.EXPRESSEE || m.getRole() == ModuleRole.EXPRESSEE_ACTIVATIBLE_ACTIVATOR || m.getRole() == ModuleRole.EXPRESSEE_ACTIVATOR || m.getRole() == ModuleRole.EXPRESSEE_REPRESSIBLE_REPRESSOR || m.getRole() == ModuleRole.EXPRESSEE_REPRESSOR) {\n expressees.add(m);\n } else if (m.getRole() == ModuleRole.EXPRESSOR) {\n expressors.add(m);\n }\n }\n allModules.removeAll(expressees);\n allModules.removeAll(expressors);\n \n listTargetSets.add(phoenixModulesToRavenParts(expressees, partsLibR));\n listTargetSets.add(phoenixModulesToRavenParts(expressors, partsLibR));\n listTargetSets.add(phoenixModulesToRavenParts(allModules, partsLibR)); \n \n //Run Raven to get assembly instructions\n Raven raven = new Raven(); \n RavenController assemblyObj = raven.assemblyObject(listTargetSets, partsLibR, vectorsLibR, libPairs, new HashMap(), rParameters, filePath);\n \n //This is the information to be saved into Clotho and grabbed for the Owl datasheets\n //This information applies to all polynucleotides currently made in Phoenix\n String assemblyMethod = \"MoClo (GoldenGate)\"; //Right now everythig in Phoenix requires MoClo RFC 94 - can be extended in future, but this is what it is right now\n String assemblyRFC = \"BBa_94\";\n String chassis = \"E. coli\"; //Also always the case for Phoenix right now\n String supplementalComments = \"\"; //Nothing for now, perhaps this can be searched upon plasmid re-enrty?\n \n //This information is specific to each Polynucleotide\n for (HashSet<org.cidarlab.raven.datastructures.Part> partSet : listTargetSets) {\n for (org.cidarlab.raven.datastructures.Part p : partSet) {\n \n ArrayList<String> neighborNames = new ArrayList<>();\n String pigeonCode = \"\";\n \n //This assumes part name and rootNode name are the same - I think this is true, but there might be a bug here\n for (RGraph aG : assemblyObj.getAssemblyGraphs()) {\n if (aG.getRootNode().getName().equalsIgnoreCase(p.getName())) {\n \n //Unclear if we want to use this information... The PrimitiveModules already have feature and direction, but these lists place the scars between those features\n ArrayList<String> composition = aG.getRootNode().getComposition();\n ArrayList<String> direction = aG.getRootNode().getDirection();\n ArrayList<String> linkers = aG.getRootNode().getLinkers();\n ArrayList<String> scars = aG.getRootNode().getScars();\n ArrayList<String> type = aG.getRootNode().getType();\n \n //Neighbor names - Assembly components should be the neighbors of the root node - the parts put together in the last cloning reaction for this polynucleotide\n ArrayList<RNode> neighbors = aG.getRootNode().getNeighbors();\n for (RNode n : neighbors) {\n neighborNames.add(n.getName());\n }\n \n //Pigeon code\n if (assemblyObj.getPigeonTextFiles().containsKey(p.getName())) {\n pigeonCode = assemblyObj.getPigeonTextFiles().get(p.getName());\n }\n }\n }\n }\n }\n \n File assemblyInstructions = assemblyObj.getInstructionsFile();\n \n /*\n THESE ARE THE METHODS FOR MAKING THE RAVEN-PIGEON IMAGES\n */\n// WeyekinPoster.setDotText(RGraph.mergeWeyekinFiles(assemblyObj.getPigeonTextFiles()));\n// WeyekinPoster.postMyVision();\n \n conn.closeConnection();\n return assemblyInstructions;\n }", "public static void main(String... args) throws IOException {\n log.info(\"START\");\n FileUtils.copyFile(Variables.getOriginalFilePath(), Variables.getWorkedFilePath());\n DBPresenter presenter = createDatabasePresenter();\n byte[] terminator = (\"\\0\").getBytes();\n int terminatorLength = terminator.length;\n log.info(\"rerminator: \" + terminatorLength);\n \n log.info(\"\" + \"\".toCharArray().length);\n DbReaderWriter db = new DbReaderWriter();\n \n try {\n log.info(\"try to write\");\n for (int i = 0; i < 10; i++) {\n db.writeRecord(TestData.getRecord());\n }\n } catch (Exception e) {\n log.info(e.getMessage(), e);\n }\n\n // log.info(\"{}\", presenter);\n }", "public StillModel loadModel(String filepath);", "public setup() {\n dbConnection = \"jdbc:\"+DEFAULT_DB_TYPE+\"://\"+DEFAULT_DB_HOST+\":\"+DEFAULT_DB_PORT+\"/\"+DEFAULT_DB_PATH;\n dbType = DEFAULT_DB_TYPE;\n dbUser = DEFAULT_DB_USER;\n dbPass = DEFAULT_DB_PASSWORD;\n beginSetup();\n }", "public static void testConnection() throws SerializeException, IOException {\n // コネクション設定\n String configFileName = \"/ormappingtool.xml\";\n ORmappingToolConfig config = SerializeUtils.bytesToObject(TestCommon.class.getResourceAsStream(configFileName), ORmappingToolConfig.class);\n config.getConnectionConfig().convURL();\n ConnectionManager.getInstance().addConnectionConfig(config.getConnectionConfig());\n }", "public void registerMetamodels(ResourceSet rs, IbexExecutable executable) throws IOException {\r\n\t\t\r\n\t\t// Set correct workspace root\r\n\t\tsetWorkspaceRootDirectory(rs);\r\n\t\t\r\n\t\t// Load and register source and target metamodels\r\n\t\tEPackage familiesPack = null;\r\n\t\tEPackage personsPack = null;\r\n\t\tEPackage benchmarxfamiliestopersonsPack = null;\r\n\t\t\r\n\t\tif(executable instanceof FWD_OPT) {\r\n\t\t\tResource res = executable.getResourceHandler().loadResource(\"platform:/resource/Persons/model/Persons.ecore\");\r\n\t\t\tpersonsPack = (EPackage) res.getContents().get(0);\r\n\t\t\trs.getResources().remove(res);\r\n\t\t\t\r\n\t\t\tres = executable.getResourceHandler().loadResource(\"platform:/resource/BenchmarxFamiliesToPersons/model/BenchmarxFamiliesToPersons.ecore\");\r\n\t\t\tbenchmarxfamiliestopersonsPack = (EPackage) res.getContents().get(0);\r\n\t\t\trs.getResources().remove(res);\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif(executable instanceof BWD_OPT) {\r\n\t\t\tResource res = executable.getResourceHandler().loadResource(\"platform:/resource/Families/model/Families.ecore\");\r\n\t\t\tfamiliesPack = (EPackage) res.getContents().get(0);\r\n\t\t\trs.getResources().remove(res);\r\n\t\t\t\r\n\t\t\tres = executable.getResourceHandler().loadResource(\"platform:/resource/BenchmarxFamiliesToPersons/model/BenchmarxFamiliesToPersons.ecore\");\r\n\t\t\tbenchmarxfamiliestopersonsPack = (EPackage) res.getContents().get(0);\r\n\t\t\trs.getResources().remove(res);\r\n\t\t}\r\n\r\n\t\tif(familiesPack == null)\r\n\t\t\tfamiliesPack = FamiliesPackageImpl.init();\r\n\t\t\t\t\r\n\t\tif(personsPack == null)\r\n\t\t\tpersonsPack = PersonsPackageImpl.init();\r\n\t\t\r\n\t\tif(benchmarxfamiliestopersonsPack == null) {\r\n\t\t\tbenchmarxfamiliestopersonsPack = BenchmarxFamiliesToPersonsPackageImpl.init();\r\n\t\t\trs.getPackageRegistry().put(\"platform:/resource/BenchmarxFamiliesToPersons/model/BenchmarxFamiliesToPersons.ecore\", BenchmarxFamiliesToPersonsPackage.eINSTANCE);\r\n\t\t\trs.getPackageRegistry().put(\"platform:/plugin/BenchmarxFamiliesToPersons/model/BenchmarxFamiliesToPersons.ecore\", BenchmarxFamiliesToPersonsPackage.eINSTANCE);\r\n\t\t}\r\n\t\t\t\r\n\t\trs.getPackageRegistry().put(\"platform:/resource/Families/model/Families.ecore\", familiesPack);\r\n\t rs.getPackageRegistry().put(\"platform:/plugin/Families/model/Families.ecore\", familiesPack);\t\r\n\t\t\t\r\n\t\trs.getPackageRegistry().put(\"platform:/resource/Persons/model/Persons.ecore\", personsPack);\r\n\t\trs.getPackageRegistry().put(\"platform:/plugin/Persons/model/Persons.ecore\", personsPack);\r\n\t}", "public static void main(String[] args) throws ClassNotFoundException\n {\n Class.forName(\"org.sqlite.JDBC\");\n\n Connection connection = null;\n try\n {\n // create a database connection\n connection = DriverManager.getConnection(\n String.format(\"jdbc:sqlite:%s/data/project.db\",\n System.getProperty(\"user.home\")));\n Statement statement = connection.createStatement();\n statement.setQueryTimeout(30); // set timeout to 30 sec.\n statement.executeUpdate(String.format(\"delete from projectdb where name='%s';\",project));\n\n // create a database connection\n connection = DriverManager.getConnection(\n String.format(\"jdbc:sqlite:%s/data/task.db\",\n System.getProperty(\"user.home\")));\n statement = connection.createStatement();\n statement.setQueryTimeout(30); // set timeout to 30 sec.\n statement.executeUpdate(String.format(\"drop table taskdb_%s;\",project));\n\n // create a database connection\n connection = DriverManager.getConnection(\n String.format(\"jdbc:sqlite:%s/data/result.db\",\n System.getProperty(\"user.home\")));\n statement = connection.createStatement();\n statement.setQueryTimeout(30); // set timeout to 30 sec.\n statement.executeUpdate(String.format(\"drop table resultdb_%s;\",project));\n\n System.out.println(\"ok\");\n\n }\n catch(SQLException e)\n {\n // if the error message is \"out of memory\",\n // it probably means no database file is found\n System.err.println(e.getMessage());\n }\n finally\n {\n try\n {\n if(connection != null)\n connection.close();\n }\n catch(SQLException e)\n {\n // connection close failed.\n System.err.println(e);\n }\n }\n }", "public static void main(String argv[]) throws FileNotFoundException {\n ClassLoader classLoader = MainJava.class.getClassLoader();\n\n InputStream is = new FileInputStream(classLoader.getResource(\"file/input.txt\").getFile());\n\n EngineImplementation myEngineImplementation = new EngineImplementation();\n\n //Create object of SparkDistributor\n SparkDistributor mySparkDistributor = new SparkDistributor();\n\n myDataConsumer DataConsumer = new myDataConsumer();\n\n mySparkDistributor.setDataConsumer(DataConsumer);\n\n myEngineImplementation.setModelByInputFileStream(is);\n\n myEngineImplementation.process(mySparkDistributor);\n\n }", "public void registerMetamodels(ResourceSet rs, IbexExecutable executable) throws IOException {\n\t\t\n\t\t// Set correct workspace root\n\t\tsetWorkspaceRootDirectory(rs);\n\t\t\n\t\t// Load and register source and target metamodels\n\t\tEPackage languagePack = null;\n\t\tEPackage henshinPack = null;\n\t\tEPackage ecorePack = null;\n\t\tEPackage emoflontohenshinPack = null;\n\t\t\n\t\tif(executable instanceof FWD_OPT) {\n\t\t\tResource res = executable.getResourceHandler().loadResource(\"platform:/resource/org.eclipse.emf.henshin.model/model/henshin.ecore\");\n\t\t\thenshinPack = (EPackage) res.getContents().get(0);\n\t\t\trs.getResources().remove(res);\n\t\t\t\n\t\t\tres = executable.getResourceHandler().loadResource(\"http://www.eclipse.org/emf/2002/Ecore\");\n\t\t\tecorePack = (EPackage) res.getContents().get(0);\n\t\t\trs.getResources().remove(res);\n\t\t\t\n\t\t\tres = executable.getResourceHandler().loadResource(\"platform:/resource/EMoflonToHenshin/model/EMoflonToHenshin.ecore\");\n\t\t\temoflontohenshinPack = (EPackage) res.getContents().get(0);\n\t\t\trs.getResources().remove(res);\n\t\t}\n\t\t\t\t\n\t\tif(executable instanceof BWD_OPT) {\n\t\t\tResource res = executable.getResourceHandler().loadResource(\"platform:/plugin/org.emoflon.ibex.tgg.language/model/Language.ecore\");\n\t\t\tlanguagePack = (EPackage) res.getContents().get(0);\n\t\t\trs.getResources().remove(res);\n\t\t\t\n\t\t\tres = executable.getResourceHandler().loadResource(\"http://www.eclipse.org/emf/2002/Ecore\");\n\t\t\tecorePack = (EPackage) res.getContents().get(0);\n\t\t\trs.getResources().remove(res);\n\t\t\t\n\t\t\tres = executable.getResourceHandler().loadResource(\"platform:/resource/EMoflonToHenshin/model/EMoflonToHenshin.ecore\");\n\t\t\temoflontohenshinPack = (EPackage) res.getContents().get(0);\n\t\t\trs.getResources().remove(res);\n\t\t}\n\n\t\tif(languagePack == null)\n\t\t\tlanguagePack = LanguagePackageImpl.init();\n\t\t\t\t\n\t\tif(henshinPack == null)\n\t\t\thenshinPack = HenshinPackageImpl.init();\n\t\t\n\t\tif(ecorePack == null)\n\t\t\tecorePack = EcorePackageImpl.init();\n\t\t\n\t\tif(emoflontohenshinPack == null) {\n\t\t\temoflontohenshinPack = EMoflonToHenshinPackageImpl.init();\n\t\t\trs.getPackageRegistry().put(\"platform:/resource/EMoflonToHenshin/model/EMoflonToHenshin.ecore\", EMoflonToHenshinPackage.eINSTANCE);\n\t\t\trs.getPackageRegistry().put(\"platform:/plugin/EMoflonToHenshin/model/EMoflonToHenshin.ecore\", EMoflonToHenshinPackage.eINSTANCE);\n\t\t}\n\t\t\t\n\t\trs.getPackageRegistry().put(\"platform:/resource/org.emoflon.ibex.tgg.language/model/Language.ecore\", languagePack);\n\t rs.getPackageRegistry().put(\"platform:/plugin/org.emoflon.ibex.tgg.language/model/Language.ecore\", languagePack);\t\n\t\t\t\n\t\trs.getPackageRegistry().put(\"platform:/resource/org.eclipse.emf.henshin.model/model/henshin.ecore\", henshinPack);\n\t\trs.getPackageRegistry().put(\"platform:/plugin/org.eclipse.emf.henshin.model/model/henshin.ecore\", henshinPack);\n\t\t\n\t\trs.getPackageRegistry().put(\"http://www.eclipse.org/emf/2002/Ecore\", henshinPack);\n\t}", "public void run (Connection jdbcConnection) {\n //(P)================ Configuration ======================\r\n //==========================================================\r\n\r\n createAndConfigureOrm(jdbcConnection);\r\n\r\n ObjectMapper mapper = orm.mapperNamed(\"CommissionedEmployee\");\r\n\r\n\r\n //==========================================================\r\n //(P)================== Running ============================\r\n //==========================================================\r\n\r\n Employee employee = (Employee) mapper.findAny();\r\n if (employee != null) {\r\n outputStream.println(employee.info());\r\n } else {\r\n outputStream.println(\"no match found.\");\r\n };\r\n }", "public interface RdbModel {\n\n public Object setThisModelFields(CrawlerData data);\n public InsertSqlModel insertSqlModelBuilder(String tableName);\n}", "public static void main(String[] args) throws IOException {\r\n\t\r\n// TestSave a = new TestSave();\r\n// a.create();\r\n// a.save();\r\n//\tlaunch(args);\r\n String filePath = \"./work/DesignSaveTest\";\r\n FileManager fm = new FileManager();\r\n DataManager dm = new DataManager();\r\n fm.create(dm);\r\n fm.saveData(dm, filePath);\r\n \r\n }", "private boolean importModels() {\n\t\tif (!isCoupledGraphSelected()) {\n\t\t\tnew InformDialog(\"Option only allowed for Coupled Models\",null);\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\n\t\t\tJFileChooser fc = new JFileChooser();\n\t\t\tExtensionFilter exts = new ExtensionFilter();\n\t\t\texts.addExtension(\"ma\");\n\t\t\texts.addExtension(\"cdd\");\n\t\t\texts.addExtension(\"cpp\");\n\n\t\t\tfc.addChoosableFileFilter(exts);\n\n\t\t\tint returnVal = fc.showDialog(MainFrame.this, \"Import\");\n\n\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\tString inputFileName = fc.getSelectedFile().getPath();\n\n\t\t\t\ttry {\n\t\t\t\t\tFile modelFile = new File(inputFileName);\n\t\t\t\t\tgetCoupledModelEditor().importModelsFromFile(modelFile);\n\t\t\t\t}\n\t\t\t\tcatch (IOException e) {\n\t\t\t\t\tmainstatusBar.setText(\"Error importing\" + inputFileName);\n\t\t\t\t}\n\n\t\t\t\t//System.out.println(\"118111\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//this.repaint();\n\t\t\t\t//System.out.println(\"119111\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}", "private synchronized void updateModel(IFile modelFile) {\n MoleculeExt format = MoleculeExt.valueOf( modelFile );\n if ( format.isSupported()) {\n\n IMoleculesFromFile model;\n if (modelFile.exists()) {\n\n try {\n switch(format) {\n case SDF: model = new MoleculesFromSDF(modelFile);\n break;\n case SMI: model = new MoleculesFromSMI(modelFile);\n break;\n default: return;\n }\n\n }\n catch (Exception e) {\n return;\n }\n cachedModelMap.put(modelFile, model);\n }\n else {\n cachedModelMap.remove(modelFile);\n }\n }\n }", "public void testSimple15() throws Exception\n {\n QdoxModelBuilder builder = new QdoxModelBuilder();\n\n ClassLoader classLoader = this.getClass().getClassLoader();\n URL sourceUrl = classLoader.getResource(\"builder/simple15/Foo.java\");\n String parentDirName = new File(sourceUrl.getFile()).getParent();\n File parentDir = new File(parentDirName);\n List sourceDirs = new ArrayList();\n sourceDirs.add(parentDir.getAbsolutePath());\n\n Model model = new Model();\n model.setModelId(\"test\");\n ModelParams parameters = new ModelParams();\n parameters.setSourceDirs(sourceDirs);\n builder.buildModel(model, parameters);\n\n // basic sanity checks\n assertTrue(model.getComponents().size() > 0);\n\n // Now write it. Optionally, we could just write it to an in-memory\n // buffer.\n File outfile = new File(\"target/simple15-out.xml\");\n IOUtils.saveModel(model, outfile);\n\n StringWriter outbuf = new StringWriter();\n IOUtils.writeModel(model, outbuf);\n\n compareData(outfile, \"builder/simple15/goodfile.xml\");\n }", "public ModelContainer importModel(String modelData) throws OWLOntologyCreationException {\n\t\t// load data from String\n\t\tfinal OWLOntologyManager manager = graph.getManager();\n\t\tfinal OWLOntologyDocumentSource documentSource = new StringDocumentSource(modelData);\n\t\tOWLOntology modelOntology;\n\t\tfinal Set<OWLParserFactory> originalFactories = removeOBOParserFactories(manager);\n\t\ttry {\n\t\t\tmodelOntology = manager.loadOntologyFromOntologyDocument(documentSource);\n\t\t}\n\t\tcatch (OWLOntologyAlreadyExistsException e) {\n\t\t\t// exception is thrown if there is an ontology with the same ID already in memory \n\t\t\tOWLOntologyID id = e.getOntologyID();\n\t\t\tIRI existingModelId = id.getOntologyIRI().orNull();\n\n\t\t\t// remove the existing memory model\n\t\t\tunlinkModel(existingModelId);\n\n\t\t\t// try loading the import version (again)\n\t\t\tmodelOntology = manager.loadOntologyFromOntologyDocument(documentSource);\n\t\t}\n\t\tfinally {\n\t\t\tresetOBOParserFactories(manager, originalFactories);\n\t\t}\n\t\t\n\t\t// try to extract modelId\n\t\tIRI modelId = null;\n\t\tOptional<IRI> ontologyIRI = modelOntology.getOntologyID().getOntologyIRI();\n\t\tif (ontologyIRI.isPresent()) {\n\t\t\tmodelId = ontologyIRI.get();\n\t\t}\n\t\tif (modelId == null) {\n\t\t\tthrow new OWLOntologyCreationException(\"Could not extract the modelId from the given model\");\n\t\t}\n\t\t// paranoia check\n\t\tModelContainer existingModel = modelMap.get(modelId);\n\t\tif (existingModel != null) {\n\t\t\tunlinkModel(modelId);\n\t\t}\n\t\t\n\t\t// add to internal model\n\t\tModelContainer newModel = addModel(modelId, modelOntology);\n\t\t\n\t\t// update imports\n\t\tupdateImports(newModel);\n\t\t\n\t\treturn newModel;\n\t}", "public static void main(String[] args) {\n\n String resourcePath = SeniorProject.class.getResource(\"/\").getPath();\n String env = System.getenv(\"AppData\") + \"\\\\SeniorProjectDir\\\\\";\n dataFileDir = new File(System.getenv(\"AppData\") + \"\\\\SeniorProjectDir\\\\\");\n\n if (!dataFileDir.exists()) {\n dataFileDir.mkdir();\n } else if (!dataFileDir.isDirectory()) {//just to remove any FILES named like that\n dataFileDir.delete();\n dataFileDir = new File(System.getenv(\"AppData\") + \"\\\\SeniorProjectDir\\\\\");\n dataFileDir.mkdir();\n }\n File res = new File(resourcePath);\n if (dataFileDir.listFiles().length == 0)\n Arrays.asList(res.listFiles()).forEach(file -> {\n if (file.isFile()) {\n String name = file.getName();\n if (name.endsWith(\".txt\") || name.endsWith(\".zip\") || name.endsWith(\".bin\")) {\n Path destination = Paths.get(env, name);\n try {\n System.out.println(Files.copy(file.toPath(), destination, StandardCopyOption.REPLACE_EXISTING));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n });\n recordsWinPairs = new File(env + \"\\\\recordsWinPairs.txt\");\n if (!recordsWinPairs.exists()) {\n try {\n recordsWinPairs.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n recordColumnFile = new File(env + \"\\\\recordColumns.txt\");\n if (!recordColumnFile.exists()) {\n try {\n recordColumnFile.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n UIServer uiServer = UIServer.getInstance();\n StatsStorage statsStorage = new InMemoryStatsStorage();\n uiServer.attach(statsStorage);\n File model = new File(env + \"\\\\EvaluatorModel.zip\");\n File chooser = new File(env + \"\\\\ChooserModel.zip\");\n List<BoardWinPair> record = RestoreRecordFile.readRecords(recordsWinPairs);\n EvaluatorNN.setStats(statsStorage);\n EvaluatorNN.loadNN(model);\n\n BoardNetworkCoordinator networkCoordinator = new BoardNetworkCoordinator(chooser, recordColumnFile);\n networkCoordinator.setStorage(statsStorage);\n networkCoordinator.createChooser(6, 7);\n Board b = new Board(7, 6, env, dataFileDir, recordsWinPairs, model, record, networkCoordinator);\n\n\n }", "public void testGeneration() throws Exception\n {\n QdoxModelBuilder builder = new QdoxModelBuilder();\n\n ClassLoader classLoader = this.getClass().getClassLoader();\n URL sourceUrl = classLoader\n .getResource(\"builder/generation/testpkg/ComponentBase.java\");\n String parentDirName = new File(sourceUrl.getFile()).getParent();\n File parentDir = new File(parentDirName);\n File baseDir = parentDir.getParentFile();\n List sourceDirs = new ArrayList();\n sourceDirs.add(baseDir.getAbsolutePath());\n\n Model model = new Model();\n model.setModelId(\"test\");\n ModelParams parameters = new ModelParams();\n parameters.setSourceDirs(sourceDirs);\n builder.buildModel(model, parameters);\n\n // basic sanity checks\n assertTrue(model.getComponents().size() > 0);\n\n // Now write it. Optionally, we could just write it to an in-memory\n // buffer.\n File outfile = new File(\"target/generation-out.xml\");\n IOUtils.saveModel(model, outfile);\n\n StringWriter outbuf = new StringWriter();\n IOUtils.writeModel(model, outbuf);\n\n compareData(outfile, \"builder/generation/goodfile.xml\");\n }", "public static void main (String[] args){\r\n\t\t\r\n\t\t\r\n\t\tSimInit init = new SimInit();\r\n\t\tModelGUI m = new ModelGUI();\r\n\t\tinit.loadModel(m, null, false);\r\n\t\t\r\n\t}", "private SQLite sqLiteConnect(DatabaseConfig config){\n SQLite result;\n String filePath = String.format(\"database\\\\%s.db\", config.getSqlName());\n result = new SQLite(filePath);\n\n if(result.connect())\n ItemBox.getLogger().info(\"[Database] connect successful \" + filePath);\n\n else{\n ItemBox.getLogger().severe(\"[Database] connect fail \" + filePath);\n return null;\n }\n\n SQLiteTable sqLiteTable = convertToSQLiteTable(config);\n SQLite.Status sqLiteResult = result.createTable(sqLiteTable);\n\n if(sqLiteResult == SQLite.Status.SUCCESS){\n ItemBox.getLogger().info(String.format(\"[Database] add table \\\"%s\\\" to %s\", config.getTableName(), filePath));\n }else{\n ItemBox.getLogger().info(String.format(\"[Database] found table \\\"%s\\\" from %s\", config.getTableName(), filePath));\n }\n\n ItemBox.getLogger().info(String.format(\"[Database] sql \\\"%s\\\" connected\", config.getSqlName()));\n return result;\n }", "public static Connection getConnection() {\n if(connection == null) {\n Statement statement = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n connection = DriverManager.getConnection(\"jdbc:sqlite::memory:\");\n \n statement = connection.createStatement();\n \n BufferedReader input = new BufferedReader(new FileReader(\"db/schema.sql\"));\n String contents;\n String sql = \"\";\n while((contents = input.readLine()) != null) {\n sql += contents;\n }\n input.close();\n \n statement.executeUpdate(sql);\n }\n catch (Exception e) \n { \n e.printStackTrace(); \n }\n finally {\n try {\n statement.close();\n }\n catch (Exception e) \n { \n e.printStackTrace(); \n }\n }\n }\n return connection;\n }", "public InstanceGenerator(String datasetString)\n {\n if(datasetString.equals(\"__dummy__\")){\n mTraining = Util.createDummyInstances(50, 2, 1, 0, 0, 0, 0, 0);\n mTesting = Util.createDummyInstances(50, 2, 1, 0, 0, 0, 0, 1);\n }else{\n //It's a property string - parse it\n Properties props;\n try\n {\n props = Util.parsePropertyString(datasetString);\n }catch(Exception e){\n log.warn(\"It looks like you're using an old experiment that doesn't indicate the type of dataset that it is using\");\n loadZipFile(datasetString, \"last\");\n return;\n }\n\n String type = props.getProperty(\"type\");\n\n if(type == null){\n throw new RuntimeException(\"Dataset string does not contain a type\");\n }else if(type.equals(\"zipFile\")){\n loadZipFile(props.getProperty(\"zipFile\"), props.getProperty(\"classIndex\", \"last\"));\n }else if(type.equals(\"trainTestArff\")){\n loadTrainTestArff(props.getProperty(\"trainArff\"), props.getProperty(\"testArff\"), props.getProperty(\"classIndex\", \"last\"));\n }else{\n throw new RuntimeException(\"Unhandled type data set type '\" + type + \"'\");\n }\n }\n }", "public BLFacadeImplementation() {\t\t\r\n\t\tSystem.out.println(\"Creating BLFacadeImplementation instance\");\r\n\t\tConfigXML c=ConfigXML.getInstance();\r\n\t\t\r\n\t\tif (c.getDataBaseOpenMode().equals(\"initialize\")) {\r\n\t\t\tDataAccess dbManager=new DataAccess(c.getDataBaseOpenMode().equals(\"initialize\"));\r\n\t\t\tdbManager.initializeDB();\r\n\t\t\tdbManager.close();\r\n\t\t\t}\r\n\t\t\r\n\t}", "public void rebuild(OpenSimDBDescriptor descriptor) {\n ArrayList<String> files = descriptor.getFileNames();\n Model saveCurrentModel=null;\n for(int i=0; i<files.size(); i++){\n String nextFilename = files.get(i); \n File nextFile = new File(nextFilename);\n if (nextFile.exists()){\n String absolutePath = nextFile.getAbsolutePath();\n try {\n // Display original model\n ((FileOpenOsimModelAction) FileOpenOsimModelAction.findObject(\n (Class)Class.forName(\"org.opensim.view.FileOpenOsimModelAction\"), true)).loadModel(absolutePath, true);\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace();\n } catch (IOException ex) {\n DialogDisplayer.getDefault().notify(\n new NotifyDescriptor.Message(\"Error opening model file \"+absolutePath));\n };\n if (i==descriptor.getCurrentModelIndex()){\n saveCurrentModel=OpenSimDB.getInstance().getCurrentModel();\n }\n }\n }\n if (saveCurrentModel!=null)\n setCurrentModel(saveCurrentModel, false);\n }", "void distributedSingleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "public IDataSource createDataSource(String initFileFullPath) throws Exception {\n\r\n\t\tProperties settings = new Properties();\r\n\t\ttry {\r\n\t\t\tFileInputStream sf = new FileInputStream(initFileFullPath);\r\n\t\t\tsettings.load(sf);\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Exception during loading initialization file\");\r\n\t\t\tlogger.error(ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t\tString host = settings.getProperty(\"DBHOST\", \"\");\r\n\t\tString dbUser = settings.getProperty(\"USER\");\r\n\t\tString dbPassword = settings.getProperty(\"PWORD\", \"\");\r\n\t\tString sessionType = settings.getProperty(\"SESSIONTYPE\");\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\tlogger.info(\"BMIRDataSource args: \"+host+\" \"+dbUser+\" \"+ dbPassword);\r\n\t\tConnection con = DriverManager.getConnection (host, dbUser, dbPassword);\r\n\t\tif (sessionType.equals(\"Outpatient\")) { \r\n\t\t\treturn new BMIROutPatientDataSource(con, initFileFullPath) ;\r\n\t\t} else if (sessionType.equals(\"Inpatient\")) {\r\n\t\t\treturn new BMIRInPatientDataSource(con, initFileFullPath);\r\n\t\t}\r\n\t\telse \r\n\t\t\tlogger.error(\"No valid session type (must be inpatient or outpatient\");\r\n\t\treturn null;\r\n\t}", "@Test\r\n\tpublic void testModelLoading() {\n\t\tString absoluteFilePath = \"\";\r\n\t\ttry {\r\n\t\t\tabsoluteFilePath = getAbsoluteFilePath(\"simpletll.stlsimulation\");\r\n\t\t} catch (IOException e) {\r\n\t\t\tAssert.fail(\"Couldn't compute absolute file path.\");\r\n\t\t}\r\n\t\t\r\n\t\t// Load STL simulation model with ModelLoader\r\n\t\tfinal SimulationModel simulationModel = ModelLoader.load(absoluteFilePath);\r\n\t\t\r\n\t\t// Check contents of loaded STL simulation model \r\n\t\tAssert.assertNotNull(simulationModel);\r\n\t\tat.ac.tuwien.big.stl.System system = simulationModel.getSystem();\r\n\t\tAssert.assertNotNull(system);\r\n\t\tAssert.assertEquals(\"SimpleTransportationLine\", system.getName());\r\n\t}", "private static void johnTestMapping() {\n\n String format = \"EXCEL\";\n String inputfile = \"sampledata/biocode_template_short.xls\";\n String sqliteLocation = \"jdbc:sqlite:/tmp/ms_tmp/biocode_template.sqlite\";\n String D2RQmappingfile = \"file:sampledata/biocode_template_mapping.n3\";\n String outputfile = \"/tmp/ms_tmp/biocode_template.nt\";\n\n\n ReaderManager readerManager = new ReaderManager();\n try {\n readerManager.loadReaders();\n\n TabularDataReader tdr = readerManager.openFile(inputfile,format);\n TabularDataConverter tdc = new TabularDataConverter(tdr, sqliteLocation);\n\n tdc.convert();\n tdr.closeFile();\n\n Model model = new ModelD2RQ(FileUtils.toURL(D2RQmappingfile),FileUtils.langN3, \"urn:x-biscicol:\");\n FileOutputStream fileOutputStream = new FileOutputStream(outputfile);\n\n System.out.println(\"Writing output to \" + outputfile);\n model.write(fileOutputStream, FileUtils.langN3);\n fileOutputStream.close();\n\n printN3(model);\n\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void saveWorkingDataFile(String rftNo, String fileName, int fileRecordNumber, Connection conn) \n\t\tthrows ReadWriteException, NotFoundException, InvalidDefineException, IllegalAccessException, IOException\n\t{\t\t\n\t\tString id = \"\";\n\t\tMatcher m = Pattern.compile(\"ID(\\\\d\\\\d\\\\d\\\\d).txt\").matcher(fileName);\n\t\tif (m.find())\n\t\t{\n\t\t\tid = m.group(1);\n\t\t}\n\t\t//#CM702621\n\t\t// Generation of instance of work file\n\t\tWorkDataFile workDataFile =\n\t\t (WorkDataFile) PackageManager.getObject(\"Id\"+ id + \"DataFile\");\n\t\tworkDataFile.setFileName(fileName);\n\t\t\n\t\t//#CM702622\n\t\t// Remove the passing part of File Name. \n\t\tFile file = new File(fileName);\n\t\tString registFileName = file.getName();\n\t\ttry\n\t\t{\t\t\t\n\t\t\tWorkingDataHandler wHandler = new WorkingDataHandler(conn);\n\t\t\t//#CM702623\n\t\t\t// Open the made work file. \n\t\t\tworkDataFile.openReadOnly();\n\t\t\tint i = 0;\n\t\t\tfor(workDataFile.next(); i < fileRecordNumber; workDataFile.next())\n\t\t\t{\t\n\t\t\t\tWorkingDataAlterKey akey = new WorkingDataAlterKey();\n\t\t\t\takey.setRftNo(rftNo);\n\t\t\t\takey.setLineNo(i);\n\t\t\t\takey.updateFileName(registFileName);\n\t\t\t\takey.updateContents(workDataFile.getContents());\n\n\t\t\t\tWorkingDataSearchKey skey = new WorkingDataSearchKey();\n\t\t\t\tskey.setRftNo(rftNo);\n\t\t\t\tskey.setFileName(registFileName);\n\t\t\t\tskey.setLineNo(i);\n\t\t\t\tWorkingData[] workingArr= (WorkingData[])wHandler.find(skey);\n\t\t\t\tif (workingArr.length > 0)\n\t\t\t\t{\n\t\t\t\t\twHandler.modify(akey);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tWorkingData workdata = new WorkingData();\n\t\t\t\t\t\tworkdata.setRftNo(rftNo);\n\t\t\t\t\t\tworkdata.setFileName(registFileName);\n\t\t\t\t\t\tworkdata.setLineNo(i);\n\t\t\t\t\t\tworkdata.setContents(workDataFile.getContents());\n\t\t\t\t\t\twHandler.create(workdata);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (DataExistsException e)\n\t\t\t\t\t{\n\t\t\t\t\t\twHandler.modify(akey);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tworkDataFile.closeReadOnly();\n\t\t}\n\t\t\n\t}", "public void generateHibernateConfigOpening()\n {\n String outputFileName = nameToFileNameInRootGenerationDir(mappingFileName, mappingDirName);\n\n // Instantiate the template to generate from.\n ST stringTemplate = hibernateOnlineTemplates.getInstanceOf(FILE_OPEN_TEMPLATE);\n stringTemplate.add(\"catalogue\", model);\n\n fileOutputHandlerOverwrite.render(stringTemplate, outputFileName);\n }", "@Test\n\tpublic void convertingWithEqualsSourceAndDatabaseFileTest() throws FileNotFoundException\n\t{\n\t\t/*try\n\t\t {\n\t\t OsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter();\n\t\t converter.convert(IOTester.TEST_FILE_NAME, IOTester.TEST_FILE_NAME, new TestMapObjectsIdentifiersFinder());\n\t\t fail();\n\t\t }\n\t\t catch (IllegalArgumentException ex)\n\t\t {\n\t\t // ok\n\t\t }*/\n\t}", "@Override\n\tpublic void CreateDatabaseFromFile() {\n\t\tfinal String FILENAME = \"fandv.sql\";\n\t\tint[] updates = null;\n\t\ttry {\n\t\t\tMyDatabase db = new MyDatabase();\n\t\t\tupdates = db.updateAll(FILENAME);\n\t\t} catch (FileNotFoundException | SQLException | ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"Database issue\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < updates.length; i++) {\n\t\t\tsum += updates[i];\n\t\t}\n\t\tSystem.out.println(\"Number of updates: \" + sum);\n\t}", "public void testParFileReading() {\n GUIManager oManager = null;\n String sFileName = null;\n try {\n\n oManager = new GUIManager(null);\n \n //Valid file 1\n oManager.clearCurrentData();\n sFileName = writeFile1();\n oManager.inputXMLParameterFile(sFileName);\n SeedPredationBehaviors oPredBeh = oManager.getSeedPredationBehaviors();\n ArrayList<Behavior> p_oBehs = oPredBeh.getBehaviorByParameterFileTag(\"DensDepRodentSeedPredation\");\n assertEquals(1, p_oBehs.size());\n DensDepRodentSeedPredation oPred = (DensDepRodentSeedPredation) p_oBehs.get(0);\n double SMALL_VAL = 0.00001;\n \n assertEquals(oPred.m_fDensDepDensDepCoeff.getValue(), 0.07, SMALL_VAL);\n assertEquals(oPred.m_fDensDepFuncRespExpA.getValue(), 0.02, SMALL_VAL);\n\n assertEquals( ( (Float) oPred.mp_fDensDepFuncRespSlope.getValue().get(0)).\n floatValue(), 0.9, SMALL_VAL);\n assertEquals( ( (Float) oPred.mp_fDensDepFuncRespSlope.getValue().get(1)).\n floatValue(), 0.05, SMALL_VAL);\n\n //Test grid setup\n assertEquals(1, oPred.getNumberOfGrids());\n Grid oGrid = oManager.getGridByName(\"Rodent Lambda\");\n assertEquals(1, oGrid.getDataMembers().length);\n assertTrue(-1 < oGrid.getFloatCode(\"rodent_lambda\")); \n \n }\n catch (ModelException oErr) {\n fail(\"Seed predation validation failed with message \" + oErr.getMessage());\n }\n catch (java.io.IOException oE) {\n fail(\"Caught IOException. Message: \" + oE.getMessage());\n }\n finally {\n new File(sFileName).delete();\n }\n }", "private void ucitajDrajver()throws Exception{\r\n db.loadDriver();\r\n }", "public void run(File sqlLiteFile, List<String> colNames) {\n String status = \"\\nConverting Data Format ...\";\n processController.appendStatus(status + \"<br>\");\n\n Connection connection = new Connection(sqlLiteFile);\n String mappingFilepath = getMapping(connection, colNames);\n getTriples(mappingFilepath);\n }", "public void testProjectDescription() throws Throwable {\n \tModelObjectWriter writer = new ModelObjectWriter();\n \tModelObjectReader reader = new ModelObjectReader();\n \tIPath root = getWorkspace().getRoot().getLocation();\n \tIPath location = root.append(\"ModelObjectWriterTest.pbs\");\n \t/* test write */\n \tProjectDescription description = new ProjectDescription();\n \tdescription.setLocation(location);\n \tdescription.setName(\"MyProjectDescription\");\n \tHashMap args = new HashMap(3);\n \targs.put(\"ArgOne\", \"ARGH!\");\n \targs.put(\"ArgTwo\", \"2 x ARGH!\");\n \targs.put(\"NullArg\", null);\n \targs.put(\"EmptyArg\", \"\");\n \tICommand[] commands = new ICommand[2];\n \tcommands[0] = description.newCommand();\n \tcommands[0].setBuilderName(\"MyCommand\");\n \tcommands[0].setArguments(args);\n \tcommands[1] = description.newCommand();\n \tcommands[1].setBuilderName(\"MyOtherCommand\");\n \tcommands[1].setArguments(args);\n \tdescription.setBuildSpec(commands);\n \n \tSafeFileOutputStream output = new SafeFileOutputStream(location.toFile());\n \twriter.write(description, output);\n \toutput.close();\n \n \t/* test read */\n \tFileInputStream input = new FileInputStream(location.toFile());\n \tProjectDescription description2 = (ProjectDescription) reader.read(input);\n \tassertTrue(\"1.1\", description.getName().equals(description2.getName()));\n \tassertTrue(\"1.3\", location.equals(description.getLocation()));\n \n \tICommand[] commands2 = description2.getBuildSpec();\n \tassertEquals(\"2.00\", 2, commands2.length);\n \tassertEquals(\"2.01\", \"MyCommand\", commands2[0].getBuilderName());\n \tassertEquals(\"2.02\", \"ARGH!\", commands2[0].getArguments().get(\"ArgOne\"));\n \tassertEquals(\"2.03\", \"2 x ARGH!\", commands2[0].getArguments().get(\"ArgTwo\"));\n \tassertEquals(\"2.04\", \"\", commands2[0].getArguments().get(\"NullArg\"));\n \tassertEquals(\"2.05\", \"\", commands2[0].getArguments().get(\"EmptyArg\"));\n \tassertEquals(\"2.06\", \"MyOtherCommand\", commands2[1].getBuilderName());\n \tassertEquals(\"2.07\", \"ARGH!\", commands2[1].getArguments().get(\"ArgOne\"));\n \tassertEquals(\"2.08\", \"2 x ARGH!\", commands2[1].getArguments().get(\"ArgTwo\"));\n \tassertEquals(\"2.09\", \"\", commands2[0].getArguments().get(\"NullArg\"));\n \tassertEquals(\"2.10\", \"\", commands2[0].getArguments().get(\"EmptyArg\"));\n \n \t/* remove trash */\n \tWorkspace.clear(location.toFile());\n }", "private createSingletonDatabase()\n\t{\n\t\tConnection conn = createDatabase();\n\t\tcreateTable();\n\t\tString filename = \"Summer expereince survey 2016 for oliver.csv\"; \n\t\timportData(conn, filename);\n\t}", "@Test\r\n public void testSave() throws SQLException{\r\n System.out.println(\"save\");\r\n //when(c.prepareStatement(any(String.class))).thenReturn(stmt);\r\n //mockStatic(DriverManager.class);\r\n //expect(DriverManager.getConnection(\"jdbc:mysql://10.200.64.182:3306/testdb\", \"jacplus\", \"jac567\"))\r\n // .andReturn(c);\r\n //expect(DriverManager.getConnection(null))\r\n // .andReturn(null);\r\n //replay(DriverManager.class);\r\n Title t = new Title();\r\n t.setIsbn(\"888888888888888\");\r\n t.setTitle(\"kkkkkk\");\r\n t.setAuthor(\"aaaa\");\r\n t.setType(\"E\");\r\n int expResult = 1;\r\n int result = TitleDao.save(t);\r\n assertEquals(expResult, result);\r\n }", "public CustomerModelDS(String nomeDb, String activity) {\r\n\t\ttry {\r\n\t\t\tContext initCtx = new InitialContext();\r\n\t\t\tContext envCtx = (Context) initCtx.lookup(\"java:comp/env\");\r\n\t\t\tds = (DataSource) envCtx.lookup(\"jdbc/\"+nomeDb);\r\n\t\t\tconnection = ds.getConnection();\r\n\t\t\tthis.tableName = activity.toLowerCase()+table;\r\n\t\t } catch (NamingException | SQLException e) {\r\n\t\t\ttry {\r\n\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\t\tconnection = DriverManager.getConnection(\"jdbc:mysql://localhost/\"+nomeDb, \"root\", \"\");\r\n\t\t\t\tconnection.setAutoCommit(false);\r\n\t\t\t} catch (SQLException | ClassNotFoundException ex) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t }\r\n\t}", "public void runTest() throws Exception {\n\n System.out.println(schemaFile.getPath());\n \n\t\t\tDriver driver = new Driver();\t// generator instance.\n\t\t\t\t\n\t\t\t// parse parameters\n\t\t\tdriver.parseArguments(new String[]{\"-seed\",\"0\", \"-n\",\"30\", \"-quiet\"});\n\t\t\t\t\n\t\t\t// parse example documents\n Iterator itr = examples.iterator();\n\t\t\twhile( itr.hasNext() ) {\n\t\t\t\tFile example = (File)itr.next();\n \n reader.setContentHandler( new ExampleReader(driver.exampleTokens) );\n reader.parse( com.sun.msv.util.Util.getInputSource(example.getAbsolutePath()) );\n\t\t\t}\n\t\t\t\t\n\t\t\t// set the grammar\n\t\t\tISchema schema = validator.parseSchema(schemaFile);\n\t\t\tassertNotNull( \"failed to parse the schema\", schema );\n\t\t\tdriver.grammar = schema.asGrammar();\n\t\t\tdriver.outputName = \"NUL\";\n\t\t\t\t\n\t\t\t// run the test\n\t\t\tassertEquals( \"generator for \"+schemaFile.getName(), driver.run(System.out), 0 );\n\t\t\t\t\n\t\t\t\t\n\t\t\t// parse additional parameter\n\t\t\t// generally, calling the parseArguments method more than once\n\t\t\t// is not supported. So this is a hack.\n\t\t\tdriver.parseArguments(new String[]{\"-error\",\"10/100\"});\n\n\t\t\tassertEquals( \"generator for \"+schemaFile.getName(), driver.run(System.out), 0 );\n\t\t}", "public Main() {\n initComponents();\n modelSach = (DefaultTableModel) jTable1.getModel();\n modelBanDoc = (DefaultTableModel) jTable3.getModel();\n listS = IOFile.readFile(fileSach);\n listBD = IOFile.readFile(fileBanDoc);\n initTableSach();\n initMaSach();\n initTableBD();\n initMaBD();\n }", "@Override\n\tpublic void run(String arg) {\n\t\ttry {\n\t\t\tdocument = getDocument();\n\t\t} catch (NullPointerException e){\n\t\t\te.getStackTrace();\n\t\t\treturn;\n\t\t} catch (Exception e) {\n\t\t\tIJ.error(\"Error: File is not an SBML Model\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tcheckSBMLDocument(document);\n\t\t\n\t\taddSBases();\n\t\tModelSaver saver = new ModelSaver(document);\n\t\tsaver.save();\n\t\tshowDomainStructure();\n\t\tGeometryDatas gData = new GeometryDatas(model);\n\t\tvisualize(gData.getSpImgList());\n\t\t\n\t\tprint();\n\t\t\n\t\tModelValidator validator = new ModelValidator(document);\n\t\tvalidator.validate();\n\t}", "public static void main(String[] args) throws IOException, SQLException, ClassNotFoundException {\n Properties prop = new Properties();\n prop.load(new FileInputStream(PROPERTIES));\n String server = prop.getProperty(\"server\");\n String schema = prop.getProperty(\"database\");\n String username = prop.getProperty(\"user\");\n String password = prop.getProperty(\"password\");\n\n // TODOd: connect to the database\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n String url = \"jdbc:mysql://\" + server + \":3306/\" + schema ;\n conn = DriverManager.getConnection(url,username, password);\n\n // Only for testing purposes\n // jdbcInit();\n\n // TODOd: complete the data load\n splitCsv(System.getProperty(\"user.dir\") + \"/\", DATASET);\n }", "@Test\n public void testSet_String_String() throws CDKException {\n System.out.println(\"set\");\n String molfile = \"data/mdl/decalin.mol\";\n String queryfile = \"data/mdl/decalin.mol\";\n Molecule query = new Molecule();\n Molecule target = new Molecule();\n\n InputStream ins = this.getClass().getClassLoader().getResourceAsStream(molfile);\n MDLV2000Reader reader = new MDLV2000Reader(ins, Mode.STRICT);\n reader.read(query);\n ins = this.getClass().getClassLoader().getResourceAsStream(queryfile);\n reader = new MDLV2000Reader(ins, Mode.STRICT);\n reader.read(target);\n\n VF2lib smsd1 = new VF2lib();\n smsd1.set(query, target);\n smsd1.searchMCS(true);\n\n assertNotNull(smsd1.getFirstMapping());\n }", "private void createDatabase(final String databaseName) {\n\n try {\n final Connection connection =\n DriverManager.getConnection(url + databaseName, databaseProperties);\n\n try {\n NaviLogger.info(\"[i] Generating database tables for %s.\", databaseName);\n connection.prepareStatement(AbstractSQLProvider.parseResourceAsSQLFile(\n this.getClass().getResourceAsStream(TEST_DATA_DIRECTORY + \"database_schema.sql\")))\n .execute();\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n\n final File testDataDir = new File(\n \"./third_party/zynamics/javatests/com/google/security/zynamics/binnavi/testdata/\"\n + databaseName + \"/\");\n\n final CopyManager manager = new CopyManager((BaseConnection) connection);\n\n for (final File currentFile : testDataDir.listFiles()) {\n try (FileReader reader = new FileReader(currentFile)) {\n final String tableName = currentFile.getName().split(\".sql\")[0];\n NaviLogger.info(\"[i] Importing: %s.%s from %s\", databaseName, tableName,\n currentFile.getAbsolutePath());\n manager.copyIn(\"COPY \" + tableName + \" FROM STDIN\", reader);\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n }\n\n try {\n NaviLogger.warning(\"[i] Generating constraints for %s.\", databaseName);\n connection.prepareStatement(AbstractSQLProvider.parseResourceAsSQLFile(\n this.getClass().getResourceAsStream(TEST_DATA_DIRECTORY + \"database_constraints.sql\")))\n .execute();\n } catch (final IOException exception) {\n CUtilityFunctions.logException(exception);\n }\n\n final String findSequencesQuery = \"SELECT 'SELECT SETVAL(' ||quote_literal(S.relname)|| \"\n + \"', MAX(' ||quote_ident(C.attname)|| ') ) FROM ' ||quote_ident(T.relname)|| ';' \"\n + \" FROM pg_class AS S, pg_depend AS D, pg_class AS T, pg_attribute AS C \"\n + \" WHERE S.relkind = 'S' AND S.oid = D.objid AND D.refobjid = T.oid \"\n + \" AND D.refobjid = C.attrelid AND D.refobjsubid = C.attnum ORDER BY S.relname; \";\n\n try (PreparedStatement statement = connection.prepareStatement(findSequencesQuery);\n ResultSet resultSet = statement.executeQuery()) {\n while (resultSet.next()) {\n final PreparedStatement fixSequence = connection.prepareStatement(resultSet.getString(1));\n fixSequence.execute();\n }\n } catch (final SQLException exception) {\n CUtilityFunctions.logException(exception);\n }\n\n } catch (final SQLException exception) {\n CUtilityFunctions.logException(exception);\n }\n }", "@BeforeClass\n public static void connectionBeforeClass() {\n String host = \"localhost\";\n String dbname = \"atm\";\n String username = \"root\";\n String password = \"Kinoshka12\";\n\n try (JDBConnector connector = new ConnectorMariaDb(host, dbname, username, password)) {\n BankRepository bankService = new BankRepository(connector);\n connector.getConnection();\n UserRepository repoUser = new UserRepository(connector);\n IAccountRepository repoAccount = new AccountRepository(connector);\n IBank bank = new Bank(10, \"leumi\");\n } catch (SQLException | ClassNotFoundException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Connection openConnection() throws DataAccessException {\n try {\n //The Structure for this Connection is driver:language:path\n //The path assumes you start in the root of your project unless given a non-relative path\n final String CONNECTION_URL = \"jdbc:sqlite:myfamilymap.sqlite\";\n\n // Open a database connection to the file given in the path\n conn = DriverManager.getConnection(CONNECTION_URL);\n\n // Start a transaction\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n e.printStackTrace();\n throw new DataAccessException(\"Unable to open connection to database\");\n }\n\n return conn;\n }", "public boolean insertData(String option, String data, String database) throws ClassNotFoundException, SQLException {\n boolean created = false;\n Connection c = null;\n Statement stmt = null;\n if(database.equals(\"settings\")) {\n try {\n Class.forName(\"org.sqlite.JDBC\");\n c = DriverManager.getConnection(\"jdbc:sqlite:settings.db\");\n c.setAutoCommit(false);\n System.out.println(\"Opened database successfully\");\n\n stmt = c.createStatement();\n if (option.equals(\"extDir\")) {\n String sql = \"INSERT INTO settings (ID, EXT_DIR) VALUES (1, '\" + data + \"' );\";\n stmt.executeUpdate(sql);\n created = true;\n }\n if (option.equals(\"extDaikon\")) {\n String sql = \"INSERT INTO settings (ID, DAIKON_DIR) VALUES (2, '\" + data + \"' );\";\n stmt.executeUpdate(sql);\n created = true;\n }\n if (option.equals(\"extROS\")) {\n String sql = \"INSERT INTO settings (ID, ROS_DIR) VALUES (3, '\" + data + \"' );\";\n stmt.executeUpdate(sql);\n created = true;\n }\n stmt.close();\n c.commit();\n c.close();\n } catch (Exception e) {\n System.out.println(e.getClass().getName() + \": insertData \" + e.getMessage());\n System.exit(0);\n }\n return created;\n }\n if(database.equals(\"tests\")) {\n try {\n Class.forName(\"org.sqlite.JDBC\");\n c = DriverManager.getConnection(\"jdbc:sqlite:tests.db\");\n c.setAutoCommit(false);\n System.out.println(\"Opened database successfully\");\n\n stmt = c.createStatement();\n if (option.equals(\"test\")) {\n String sql = \"INSERT INTO tests (TESTNAME, COMMAND, SUPPORTCOMMAND) VALUES ('\" + data + \"' );\";\n stmt.executeUpdate(sql);\n created = true;\n }\n if (option.equals(\"command\")) {\n String sql = \"INSERT INTO tests (COMMAND) VALUES ('\" + data + \"' );\";\n stmt.executeUpdate(sql);\n created = true;\n }\n if (option.equals(\"supportCommand\")) {\n String sql = \"INSERT INTO tests (SUPPORTCOMMAND) VALUES ('\" + data + \"' );\";\n stmt.executeUpdate(sql);\n created = true;\n }\n\n stmt.close();\n c.commit();\n c.close();\n } catch (Exception e) {\n System.out.println(e.getClass().getName() + \": insertData \" + e.getMessage());\n System.exit(0);\n }\n }\n return created;\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 }", "public SimpleDataSource(String jdbcUrl) {\n this.jdbcUrl = jdbcUrl;\n }", "public static List<JdbcOption> getDatabaseListFromFile(String configFile) throws Exception {\n\t\tList<JdbcOption> result = new ArrayList<JdbcOption>();\n\n\t\tDocument document;\n\t\tFile file = new File(configFile);\n\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\tfactory.setNamespaceAware(true);\n\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\tdocument = builder.parse(file);\n\n\t\tElement root = document.getDocumentElement();\n\n\t\tNodeList nodeList = root.getElementsByTagName(Constants.XML_TAG_DATASOURCE);\n\t\tfor (int i = 0; i < nodeList.getLength(); i++) {\n\t\t\tJdbcOption jdbc = new JdbcOption();\n\n\t\t\tNode node = nodeList.item(i);\n\t\t\tNamedNodeMap attrs = node.getAttributes();\n\n\t\t\tString name = getText(attrs, Constants.XML_TAG_NAME);\n\t\t\tString type = getText(attrs, Constants.XML_TAG_TYPE);\n\t\t\tString driverJar = getText(attrs, Constants.XML_TAG_DRIVER_PATH);\n\t\t\tString driverClassName = getText(attrs, Constants.XML_TAG_DRIVER_CLASS_NAME);\n\t\t\tString url = getText(attrs, Constants.XML_TAG_URL);\n\t\t\tString username = getText(attrs, Constants.XML_TAG_USERNAME);\n\t\t\tString password = EncryptUtil.decrypt(getText(attrs, Constants.XML_TAG_PASSWORD));\n\t\t\tString schema = getText(attrs, Constants.XML_TAG_SCHEMA);\n\t\t\tString dialect = getText(attrs, Constants.XML_TAG_DIALECT);\n\t\t\tString driverGroupId = getText(attrs, Constants.XML_TAG_DRIVER_GROUPID);\n\t\t\tString driverArtifactId = getText(attrs, Constants.XML_TAG_DRIVER_ARTIFACTID);\n\t\t\tString driverVersion = getText(attrs, Constants.XML_TAG_DRIVER_VERSION);\n\t\t\tString useDbSpecific = getText(attrs, Constants.XML_TAG_USE_DB_SPECIFIC);\n\t\t\tString runExplainPlan = getText(attrs, Constants.XML_TAG_RUN_EXPLAIN_PLAN);\n\t\t\tString isDefault = getText(attrs, Constants.XML_TAG_DEFAULT);\n\n\t\t\tjdbc.setDbName(name);\n\t\t\tjdbc.setDbType(type);\n\t\t\tjdbc.setDriverJar(driverJar);\n\t\t\tjdbc.setDriverClassName(driverClassName);\n\t\t\tjdbc.setUrl(url);\n\t\t\tjdbc.setUserName(username);\n\t\t\tjdbc.setPassword(password);\n\t\t\tjdbc.setSchema(schema);\n\t\t\tjdbc.setDialect(dialect);\n\t\t\tjdbc.setMvnGroupId(driverGroupId);\n\t\t\tjdbc.setMvnArtifactId(driverArtifactId);\n\t\t\tjdbc.setMvnVersion(driverVersion);\n\t\t\tjdbc.setUseDbSpecific(Boolean.valueOf(useDbSpecific));\n\t\t\tjdbc.setRunExplainPaln(Boolean.valueOf(runExplainPlan));\n\t\t\tjdbc.setDefault(Boolean.valueOf(isDefault));\n\n\t\t\tresult.add(jdbc);\n\t\t}\n\t\treturn result;\n\t}", "@Test\n public void doImport_doesNotModifyOriginalCsv() {\n ExternalDataReader externalDataReader = new ExternalDataReaderImpl(null);\n externalDataReader.doImport(formDefToCsvMedia);\n\n assertThat(dbFile.exists(), is(true));\n assertThat(csvFile.exists(), is(true));\n }", "public SimpleDatabase executeSqlFile(String name) {\n // possibly trim .sql extension\n if (name.toLowerCase().endsWith(\".sql\")) {\n name = name.substring(0, name.length() - 4);\n }\n SQLiteDatabase db = context.openOrCreateDatabase(name);\n int id = context.getResourceId(name, \"raw\");\n return executeSqlFile(db, id);\n }" ]
[ "0.51191", "0.49554402", "0.48608518", "0.4842471", "0.4832794", "0.47210798", "0.47072822", "0.46342942", "0.45791706", "0.45674902", "0.45223463", "0.45125747", "0.44938928", "0.44790307", "0.44782433", "0.44493505", "0.44410434", "0.4434902", "0.4408452", "0.43788004", "0.4359217", "0.4321587", "0.43152016", "0.43085718", "0.42920426", "0.42910135", "0.42894897", "0.4261408", "0.42545423", "0.42527252", "0.42516556", "0.42512393", "0.42398643", "0.42337996", "0.42310718", "0.422994", "0.4218928", "0.42111552", "0.4204873", "0.4201522", "0.41968974", "0.41941872", "0.41939488", "0.41891494", "0.41883624", "0.41882858", "0.41842017", "0.4181154", "0.4160273", "0.41532356", "0.41402924", "0.4135685", "0.41333032", "0.4132437", "0.41319153", "0.41308558", "0.41273686", "0.41265032", "0.41263857", "0.41244924", "0.41193283", "0.41186017", "0.4114173", "0.4112929", "0.411177", "0.4103469", "0.41011995", "0.40951467", "0.40940276", "0.40937075", "0.4083561", "0.40833113", "0.40822095", "0.40811718", "0.4072688", "0.40708396", "0.40701312", "0.40697014", "0.4068566", "0.40673026", "0.40671685", "0.4066208", "0.4066025", "0.4063645", "0.40613672", "0.40601134", "0.40584648", "0.40561318", "0.4055809", "0.4051948", "0.40505475", "0.40480942", "0.40471104", "0.40470314", "0.4045215", "0.40444517", "0.40442914", "0.40409356", "0.40394384", "0.40382162" ]
0.7076043
0
Run the mode which .mod and .dat files are specified.
public final boolean run(File modFile, File datFile) throws IOException, IloException { String[] datFiles = null; if (datFile != null) { datFiles = new String[1]; datFiles[0] = datFile.getAbsolutePath(); } return run(modFile.getAbsolutePath(), datFiles, null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n String file = args[0];\n int mod = Integer.parseInt(args[1]);\n Medians md = new Medians(file);\n System.out.println(md.mediansMod(mod));\n }", "Main(String mode) {\n if (mode.equals(\"game\")) {\n createGameMode();\n } else {\n createSimulatorMode();\n }\n }", "public void setMode(String[] args) {\n\t\t\tfor (String arg : args) {\n\t\t\t\tif (arg.equals(\"-i\")) {\n\t\t\t\t\tthis.mode = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}", "public abstract void loadFile(Model mod, String fn) throws IOException;", "void singleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "public static void main(String[] args) {\n switch (args[0]) {\n case \"-\":\n String modeChoice = args[1].toLowerCase();\n switch (modeChoice) {\n case \"n\": // Do nothing mode\n mode = 0;\n break;\n case \"r\": // Reset mode\n mode = 1;\n break;\n case \"m\": // Monitor mode\n mode = 2;\n break;\n }\n compress();\n break;\n case \"+\":\n expand();\n break;\n default:\n throw new IllegalArgumentException(\"Illegal command line argument\");\n }\n }", "public void runFile(String filename) {\n }", "public void setMode(DcMotor.RunMode mode) {\n lDrive.setMode(mode);\n rDrive.setMode(mode);\n }", "public static void main(String[] args) throws FileNotFoundException {\r\n\r\n\t\tif (args.length == 0) {\r\n\t\t\tdoUsage();\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * In order to be considered for the competition, set these variables.\r\n\t\t */\r\n\t\tString name = \"NOT GIVEN\"; // First and Last\r\n\t\tString sect = \"NOT GIVEN\"; // \"A\" or \"B\"\r\n\r\n\t\tTimer timer = new Timer();\r\n\r\n\t\ttimer.start();\r\n\r\n\t\tif (args[0].equals(\"-h\"))\r\n\t\t\tdoHelp();\r\n\t\telse if (args[0].equals(\"-n\"))\r\n\t\t\tdoNonInteractiveMode(args);\r\n\t\telse if (args[0].equals(\"-d\"))\r\n\t\t\tdoDictionaryEditMode(args);\r\n\t\telse\r\n\t\t\tdoInteractiveMode(args);\r\n\r\n\t\ttimer.stop();\r\n\r\n\t\tSystem.out.println(\"Student name: \" + name);\r\n\t\tSystem.out.println(\"Student sect: \" + sect);\r\n\t\tSystem.out.println(\"Execution time: \" + timer.runtime() + \" ms\");\r\n\t}", "void massiveModeLoading( File dataPath );", "public void setMode(int m) {\n if (m == LIST || m == EXTRACT)\n mode = m;\n }", "@Override\n public void setMode(RunMode mode) {\n\n }", "public static void main(String[] args) throws IOException, InvalidMidiDataException {\r\n String file = \"\";\r\n String viewMode = \"\";\r\n file += args[0];\r\n viewMode = args[1];\r\n CompositionBuilder<MusicMakerModel> comp = new MusicMakerModel.MusicBuilder();\r\n IMusicMakerModel model = null;\r\n model = MusicReader.parseFile(new FileReader(file), comp);\r\n IGUIView view = GUIViewFactory.create(viewMode);\r\n Controller cont = new Controller(view, model);\r\n cont.start();\r\n }", "public void start() {\n\t\tString test = \".test\";\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(test);\n\t\t\tfos.write(2);\n\t\t\tfos.close();\n\t\t} \n\t\tcatch (Throwable e){\n\t\t\tJOptionPane.showMessageDialog(frame,\"Please run from a directory that has file-write access.\\n\",\"Write-Protected Directory\",JOptionPane.ERROR_MESSAGE);\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tdoCommandLine();\n\t\tif (scriptRenderFrames > 0){\n\t\t\tPRESETUP = true;\n\t\t}\n\t\twhile (!PRESETUP){\n\t\t\tPRESETUP = true;\n\t\t\t//Show a dialog with options for RUN_MODE\n\t\t\tString [] optionsStr = { \n\t\t\t\t\t\"Run DGraph\", \n\t\t\t\t\t\"Utility: Sequence list -> Fasta\", \n\t\t\t\t\t\"Utility: Fasta -> Sequence List\", \n\t\t\t\t\t\"Utility: Remove Duplicates from Sequence List\", \n\t\t\t\t\t\"Utility: Fasta -> List of headers\",\n\t\t\t\t\t\"Utility: Clustalw output -> Alignment score distance matrix. Note: Copy+paste whole clustalw output, especially 'pairwise alignment' section\",\n\t\t\t\t\t\"Utility: Fasta -> PD Score matrix: sliding window approach\",\n\t\t\t\t\t\"Utility: Fasta -> PD Score matrix: assume pre-aligned sequences\",\n\t\t\t\t\t\"Utility: DNA Fasta -> DNA Sequence Similarity matrix\",\n\t\t\t\t\t\"Utility: Find all pairs of aligned peptides in a list with PD Score under a threshold\",\n\t\t\t\t\t\"Utility: Jalview all pairwise sequeqnce alignments output -> Parwise alignment score list\",\n\t\t\t\t\t\"Utility: Reorder fasta sequences to match another file\",\n\t\t\t\t\t\"Utility: Fasta -> Line-numbered sequence headers\",\n\t\t\t};\n\t\t\tJRadioButton [] options = new JRadioButton[optionsStr.length];\n\t\t\tButtonGroup group = new ButtonGroup();\n\t\t\tJPanel pane = new JPanel();\n\t\t\tpane.setLayout(new GridLayout(0,1));\n\t\t\tfor(int k = 0; k < optionsStr.length;k++){\n\t\t\t\toptions[k] = new JRadioButton (optionsStr[k]);\n\t\t\t\tgroup.add(options[k]);\n\t\t\t\tpane.add(options[k]);\n\t\t\t}\n\t\t\toptions[0].setSelected(true);\n\n\t\t\tFrame holder = new Frame(\"DGraph - Initializing.\");\n\t\t\tholder.setSize(200,100);\n\t\t\tholder.setLocationRelativeTo(null);\n\t\t\tholder.setVisible(true);\n\t\t\tboolean shouldRun = JOptionPane.showOptionDialog(\n\t\t\t\t\tholder,\n\t\t\t\t\tpane,\n\t\t\t\t\t\"Select operation\",\n\t\t\t\t\tJOptionPane.OK_CANCEL_OPTION,\n\t\t\t\t\tJOptionPane.PLAIN_MESSAGE,null,null,null) == JOptionPane.OK_OPTION;\n\t\t\tif (!shouldRun) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\tholder.setVisible(false);\n\n\t\t\tint choice = 0;\n\t\t\tfor(int k = 0; k < options.length; k++){\n\t\t\t\tif (options[k].isSelected()){\n\t\t\t\t\tchoice = k;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tRUN_MODE = choice-1; //0=-1\n\t\t\t\n\t\t\tif (RUN_MODE != -1){\n\t\t\t\trunUtility(RUN_MODE);\n\t\t\t\t//Go again.\n\t\t\t\tPRESETUP = false;\n\t\t\t}\n\t\t}\n\n\t\theadless = false;\n\t\t//Now do PApplet's start to get things rolling.\n\t\tsuper.start();\n\t}", "public static void main(String[] args)\n {\n String account=\"glorfindel666\";\n String server=\"Landroval\";\n List<String> characters=PluginConstants.getCharacters(account,server,false);\n for(String character : characters)\n {\n try\n {\n File dataFile=PluginConstants.getCharacterDir(account,server,character);\n File inputFile=new File(dataFile,\"LotroCompanionData.plugindata\");\n if (inputFile.exists())\n {\n CraftingParser parser=new CraftingParser(character);\n parser.doIt(inputFile);\n }\n else\n {\n System.out.println(\"No data for: \" + character);\n }\n }\n catch(Exception e)\n {\n LOGGER.error(\"Could not parse crafting data for character \"+character,e);\n }\n }\n }", "private static void executeForFile(File file, String outputPath, FileFormat format, boolean mcdc, boolean mmbue) {\n\t\ttry {\n\t\t\t//falls file von Typ MD dann->>>>\n\t\t\tif (format == FileFormat.MD) {\n\t\t\t\tTruthTable table = InputScanner.readTableFromFile(file);\n\t\t\t\tif (mcdc) {\n\n\t\t\t\t\tString outputFileName = file.getName().replace(\".\", String.format(\"-%s-output.\", AlgorithmToExecute.MCDC.getName()));\n\t\t\t\t\tString generatedName = outputPath + File.separator + outputFileName;\n\n\t\t\t\t\tOutputWriter.writeToFile(generatedName, MCDC.runMcdc(table), table.getHeader(), table.getAnzahlVonBedingugen());\n\t\t\t\t}\n\t\t\t\tif (mmbue) {\n\t\t\t\t\tString outputFileName = file.getName().replace(\".\", String.format(\"-%s-output.\", AlgorithmToExecute.MMBUE.getName()));\n\t\t\t\t\tString generatedName = outputPath + File.separator + outputFileName;\n\n\t\t\t\t\tOutputWriter.writeToFile(generatedName, MMBUE.runMmbue(table), table.getHeader(), table.getAnzahlVonBedingugen());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new IllegalArgumentException(\"Dieser Format wurde noch nicht implementiert\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e + \"Test Case Generierung war nicht erfolgreich\");\n\t\t}\n\t}", "public void setMode(String mode){\n\t\tthis.mode=mode;\n\t}", "public static int open(String fileName, String mode) {\n //List the arguments as an array\n String[] args = {fileName, mode};\n\n return Kernel.interrupt(Kernel.INTERRUPT_SOFTWARE, Kernel.OPEN, 0, args);\n }", "public void setDoblyMode (String mode) {\n int i = Integer.parseInt(mode);\n if (i >= 0 && i <= 3) {\n writeSysfs(AUIDO_DSP_AC3_DRC, \"drcmode\" + \" \" + mode);\n } else {\n writeSysfs(AUIDO_DSP_AC3_DRC, \"drcmode\" + \" \" + \"2\");\n }\n }", "void changeMode(int mode);", "public static void main(String[] args) {\n\t\t\r\n\t\ttry {\r\n\t\t\tFileInputStream fis = new FileInputStream(\"fff/ddd.abc\");\r\n\t\t\tDataInputStream dis = new DataInputStream(fis);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tdis.readInt();\r\n\t\t\tdis.readBoolean();\r\n\t\t\tdis.readDouble();\r\n\t\t\tdis.readUTF();\r\n\t\t\t\r\n\t\t\t//순서가 맞아야한다.\r\n\t\t\t\r\n\t\t\tdis.close();\r\n\t\t\tfis.close();\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public void setMode(int i) {\r\n\t\t_mode = i;\r\n\t}", "public DataType run(DataType[] required, DataType[] optional) throws ModuleExecutionException;", "public void begin(String mode) throws IOException {\r\n main.begin(mode);\r\n }", "public void setMode(int mode) {\n this.mode = mode;\n }", "public void setMode(int mode) {\r\n\t\tthis.mode = mode;\r\n\t}", "public final boolean run(String modFilename, String[] datFilenames, String jdbcConfigurationFile,\n\t\t\tString connectionString) throws IOException, IloException {\n\t\t// create OPL\n\t\tIloOplFactory.setDebugMode(true);\n\t\tIloOplFactory oplF = new IloOplFactory();\n\t\tIloOplErrorHandler errHandler = oplF.createOplErrorHandler(System.out);\n\n\t\tIloOplRunConfiguration rc = null;\n\t\tSystem.out.println(\"Running \" + modFilename);\n\t\tif (datFilenames == null || datFilenames.length == 0) {\n\t\t\trc = oplF.createOplRunConfiguration(modFilename);\n\t\t} else {\n\t\t\trc = oplF.createOplRunConfiguration(modFilename, datFilenames);\n\t\t\tfor (String d: datFilenames) {\n\t\t\t\tSystem.out.println(\" with \" + d);\n\t\t\t}\n\t\t}\n\n\t\trc.setErrorHandler(errHandler);\n\t\tIloOplModel opl = rc.getOplModel();\n\t\tSystem.err.println(\"IIIII \" + IloOplModel.getCPtr(opl));\n\n\t\tIloOplModelDefinition def = opl.getModelDefinition();\n\n\t\t//\n\t\t// Reads the JDBC configuration, initialize a JDBC custom data source\n\t\t// and sets the source in OPL.\n\t\t//\n\t\tJdbcConfiguration jdbcProperties = null;\n\t\tif (jdbcConfigurationFile != null) {\n\t\t\tjdbcProperties = new JdbcConfiguration();\n\t\t\tjdbcProperties.read(jdbcConfigurationFile);\n\t\t\t// we want to override connection string with conn string that has the actual\n\t\t\t// temp db path\n\t\t\tif (connectionString != null)\n\t\t\t\tjdbcProperties.setUrl(connectionString);\n\t\t\t// Create the custom JDBC data source\n\t\t\tIloOplDataSource jdbcDataSource = new JdbcCustomDataSource(jdbcProperties, oplF, def);\n\t\t\t// Pass it to the model.\n\t\t\topl.addDataSource(jdbcDataSource);\n\t\t}\n\n\t\topl.generate();\n\n\t\tboolean success = false;\n\t\tif (opl.hasCplex()) {\n\t\t\tif (opl.getCplex().solve()) {\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t} else {\n\t\t\tif (opl.getCP().solve()) {\n\t\t\t\tsuccess = true;\n\t\t\t}\n\t\t}\n\t\tif (success == true) {\n\t\t\topl.postProcess();\n\t\t\t// write results\n\t\t\tif (jdbcProperties != null) {\n\t\t\t\tJdbcWriter writer = new JdbcWriter(jdbcProperties, def, opl);\n\t\t\t\twriter.customWrite();\n\t\t\t}\n\t\t}\n\t\treturn success;\n\t}", "public void setMode(String mode) {\n this.mode = mode;\n }", "public static void main(String[] args){\n\n String mode = \"enc\";\n String data = \"\";\n String out = \"\";\n String path;\n String alg = \"unicode\";\n int key = 0;\n\n try {\n for (int i = 0; i < args.length; i++) {\n if (args[i].equals(\"-data\") || args[i].equals(\"-in\")) {\n data = args[i + 1];\n }\n if (args[i].equals(\"-mode\")) {\n mode = args[i + 1];\n }\n if (args[i].equals(\"-key\")) {\n key = Integer.parseInt(args[i + 1]);\n }\n if (args[i].equals(\"-out\")) {\n out = args[i + 1];\n }\n if (args[i].equals(\"-alg\")) {\n alg = args[i + 1];\n }\n }\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"Missing option\");\n }\n\n File file = new File(data);\n\n if (file.exists() && !file.isDirectory()) {\n path = data;\n\n switch (mode){\n case \"enc\":\n EncryptionContext encryptionContext = new EncryptionContext();\n if(alg.equals(\"shift\")) {\n encryptionContext.setMethod(new ShiftEncryptionMethod());\n } else {\n encryptionContext.setMethod(new UnicodeTableEncryptionMethod());\n }\n data = encryptionContext.encryptFromFile(path, key);\n break;\n\n case \"dec\":\n DecryptionContext decryptionContext = new DecryptionContext();\n if(alg.equals(\"shift\")) {\n decryptionContext.setMethod(new ShiftDecryptionMethod());\n } else {\n decryptionContext.setMethod(new UnicodeTableDecryptionMethod());\n }\n data = decryptionContext.decryptFromFile(path,key);\n break;\n }\n\n } else {\n switch (mode){\n case \"enc\":\n EncryptionContext encryptionContext = new EncryptionContext();\n if(alg.equals(\"shift\")) {\n encryptionContext.setMethod(new ShiftEncryptionMethod());\n } else {\n encryptionContext.setMethod(new UnicodeTableEncryptionMethod());\n }\n data = encryptionContext.encrypt(key, data);\n break;\n\n case \"dec\":\n DecryptionContext decryptionContext = new DecryptionContext();\n if(alg.equals(\"shift\")) {\n decryptionContext.setMethod(new ShiftDecryptionMethod());\n } else {\n decryptionContext.setMethod(new UnicodeTableDecryptionMethod());\n }\n data = decryptionContext.decrypt(key, data);\n break;\n }\n }\n\n if (out.isEmpty()) {\n System.out.println(data);\n } else {\n writeIntoFile(out, data);\n }\n\n }", "public void test() {\n\t\tFile file = new File(\"/home/students/\");\r\n\t\t\r\n\t\tString[] list = file.list(new FilenameFilter() {\r\n\t\t\tpublic boolean accept(File dir, String name) {\r\n\t\t\t\tif (name.toLowerCase().endsWith(\".py\")) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tfor (String f : list) {\r\n\t\t\tSystem.out.println(f);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\tFileHelper.createFile();\n\t\tFileHelper.writeToFile();\n\t\tFileHelper.readFromFile();\n\n\t}", "@Test\n public void testModis() throws IOException, InvalidRangeException {\n // GEO (lat//lon)\n testGridExists(testDir + \"modis/MOD17A3.C5.1.GEO.2000.hdf\", \"MOD_Grid_MOD17A3/Data_Fields/Npp_0\\\\.05deg\");\n\n // SINUSOIDAL\n testGridExists(testDir + \"modis/MOD13Q1.A2012321.h00v08.005.2012339011757.hdf\",\n \"MODIS_Grid_16DAY_250m_500m_VI/Data_Fields/250m_16_days_NIR_reflectance\");\n\n }", "public static void main(String [] args){\n\t\n\tFile speedfile = new File(args[0]);\n\tFile category = new File(args[1]);\n\tFile datafile = new File(args[2]);\n\t\n\tDataset data = Dataset.VERBEECK;//decides which kind it is (SCHILDE, VERBEEK)\n\tnew TripSetup(speedfile, category, datafile, data);\n}", "public static void GetParam(String [] args){\n if (args.length==0) {\n System.err.println(\"Sintaxis: main -f file [-di] [-do|-t] [-mem|-tab]\");\n System.exit(1);\n }\n for (int i = 0; i < args.length; i++) {\n if(args[i].equals(\"-f\")){\n f_flag=true;\n path=args[i+1];\n }\n if(args[i].equals(\"-t\"))t_flag=true;\n if(args[i].equals(\"-di\"))di_flag=true;\n if(args[i].equals(\"-do\"))do_flag=true;\n if(args[i].equals(\"-tab\"))tab_flag=true;\n if(args[i].equals(\"-mem\"))mem_flag=true;\n }\n if (!f_flag){\n System.err.println(\"Ha de introducir un fichero\");\n System.exit(1);\n }\n if (!tab_flag && !mem_flag){\n System.err.println(\"Error: si se ha escogido -do o -t, se ha de \"\n + \"especificar -tab ('tabulation') o/y -mem ('memoization')\");\n System.exit(1);\n }\n }", "public void setMode(DcMotor.RunMode mode) {\n leftFront.setMode(mode);\n leftRear.setMode(mode);\n rightFront.setMode(mode);\n rightRear.setMode(mode);\n }", "public void setMode(SwerveMode newMode) {\n\t\tSmartDashboard.putString(\"mode\", newMode.toString());\n // Re-enable SwerveModules after mode changed from Disabled\n if (mode == SwerveMode.Disabled) {\n for (SwerveModule mod: modules) {\n mod.enable();\n }\n }\n mode = newMode;\n int index = 0; // Used for iteration\n switch(newMode) {\n case Disabled:\n for (SwerveModule mod: modules) {\n mod.setSpeed(0);\n mod.disable();\n }\n break;\n case FrontDriveBackDrive:\n for (SwerveModule mod: modules) {\n mod.unlockSetpoint();\n mod.setSetpoint(RobotMap.forwardSetpoint);\n }\n break;\n case FrontDriveBackLock:\n for (SwerveModule mod: modules) {\n if (index < 2) {\n mod.unlockSetpoint();\n mod.setSetpoint(RobotMap.forwardSetpoint);\n }\n else {\n mod.unlockSetpoint();\n\n mod.lockSetpoint(RobotMap.forwardSetpoint);\n }\n index++;\n }\n break;\n case FrontLockBackDrive:\n for (SwerveModule mod: modules) {\n if (index > 1) {\n mod.unlockSetpoint();\n }\n else {\n mod.unlockSetpoint();\n\n mod.lockSetpoint(RobotMap.forwardSetpoint);\n }\n index++;\n }\n break;\n case StrafeLeft:\n for (SwerveModule mod: modules) {\n \t\tmod.unlockSetpoint();\n mod.lockSetpoint(RobotMap.leftSetpoint);\n }\n break;\n case StrafeRight:\n for (SwerveModule mod: modules) {\n \t\tmod.unlockSetpoint();\n mod.lockSetpoint(RobotMap.rightSetpoint);\n }\n break;\n default:\n break;\n\n }\n}", "private void loadModeManually() {\n\t\t// Check if the typoscript.xml file exists in the users settings directory\n\t\t// (we can't link directly to a mode file inside the JAR, since the XML parser needs a string\n\t\t// filename, which can't represent a path to a JAR resource)\n\t\tLog.log(Log.NOTICE, TypoScriptPlugin.instance, \"Manually loading TypoScript edit mode since your version of jEdit doesn't ship with it\");\n\t\tif (jEdit.getSettingsDirectory() == null) return; // no settings directory\n\t\tString modePath = MiscUtilities.constructPath(jEdit.getSettingsDirectory(), \"typoscriptplugin\" + File.separatorChar + \"typoscript.xml\");\n\t\tFile modeFile = new File(modePath);\n\t\tif (!modeFile.exists()) {\n\t\t\tLog.log(Log.NOTICE, TypoScriptPlugin.instance, \"TypoScript edit mode not found, copying it into your user settings directory...\");\n\t\t\t// Copy the file from our jar to there\n\t\t\ttry {\n\t\t\t\tInputStream input = TypoScriptPlugin.class.getResource(\"/typoscript/typoscript.xml\").openStream();\n\t\t\t\tOutputStream output = new FileOutputStream(modeFile);\n\t\t\t\tbyte[] buffer = new byte[100000];\n\t\t\t\tint length;\n\t\t\t\twhile ((length = input.read(buffer)) >= 0) {\n\t\t\t\t\toutput.write(buffer, 0, length);\n\t\t\t\t}\n\t\t\t\toutput.close();\n\t\t\t\tLog.log(Log.NOTICE, TypoScriptPlugin.instance, \"Mode file copying completed succesfully\");\n\t\t\t} catch (IOException e) {\n\t\t\t\tLog.log(Log.ERROR, TypoScriptPlugin.instance, \"IOException while trying to copy typoscript.xml mode file to users settings dir:\\n\" + e.toString());\n\t\t\t}\n\t\t}\n\t\t\n\t\tMode tsMode = new Mode(\"typoscript\");\n\t\tLog.log(Log.DEBUG, TypoScriptPlugin.instance, \"TS mode path: \" + modePath);\n\t\ttsMode.setProperty(\"file\", modePath);\n\t\ttsMode.setProperty(\"filenameGlob\", \"*.ts\");\n\t\ttsMode.unsetProperty(\"firstlineGlob\");\n\t\t\n\t\t// I'm aware the below method is not supposed to be called, but I think this is the only way to do it?\n\t\tjEdit.addMode(tsMode);\n\t\t\n\t\ttsMode.init();\n\t}", "private static void initializeRegatta(String[] data) {\n\t\t// Just command was used, we need input file.\n\t\tif(data.length == 1) {\n\t\t\tSystem.out.print(\"\\nOops, looks like you didn't specify an input file.\\n\");\n\t\t\tinitializeInput(getFilename());\n\t\t}\n\t\t\n\t\t// Input file specified but the file was invalid. Need to get another.\n\t\tif(data.length == 2) {\n\t\t\tif(!isValidFileName(data[1])) {\n\t\t\t\tSystem.out.println(\"\\nOops, your filename is invalid.\");\n\t\t\t\tinitializeInput(getFilename());\n\t\t\t} else {\n\t\t\t\tinitializeInput(data[1]);\n\t\t\t}\n\t\t}\n\t\tprocessRegatta(getRegattaName());\n\t}", "private void cmdOpenUseFile(String file) {\n MModel model = null;\n FileInputStream specStream = null;\n\n String filename = getFilenameToOpen(file);\n \n try {\n Log.verbose(\"compiling specification...\");\n specStream = new FileInputStream(filename);\n model = USECompiler.compileSpecification(specStream, filename,\n new PrintWriter(System.err), new ModelFactory());\n } catch (FileNotFoundException e) {\n Log.error(\"File `\" + filename + \"' not found.\");\n } finally {\n if (specStream != null)\n try {\n \tspecStream.close();\n } catch (IOException ex) {}\n }\n\n // compile ok?\n if (model != null) {\n // print some info about model\n Log.verbose(model.getStats());\n\n // create system\n fSession.setSystem(new MSystem(model));\n }\n \n setFileClosed();\n }", "public static void main(String... args) throws IOException, InterruptedException {\n new FileByFileTool().run(args);\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"mastermind start.\");\n\t\tSystem.out.println(\"Mode 1 or 2?: \");\n\t\tScanner in = new Scanner(System.in);\n\t\tint mode = Integer.parseInt(in.nextLine());\n\t\tString tmp = \"\";\n\t\tif(mode==2){\n\t\t\tSystem.out.print(\"Ihre Eingabe: \");\n\t\t\ttmp = in.nextLine();\n\t\t}\n\t\tMasterMindGameLogic mastermind = new MasterMindGameLogic(mode, tmp);\n\t\tmastermind.startGame();\n\t}", "public void importData(String modname, String data, String params) throws FilterException;", "public static void main(String... args) {\n\n System.out.println(\"File path: \" + args[0]);\n\n try {\n ParsedData data = ArffParser.arffFileReader(new File(args[0]));\n DataSet trainingDataSet = data.getDataset();\n ArrayList<Attribute> attributes = data.getAttributes();\n System.out.println(\"\\n Arff-File successfully loaded! \\n\");\n\n // Select attribute for class attribute\n int numClassAttribute = Integer.parseInt(args[1]);\n Attribute classAttribute = attributes.get(numClassAttribute);\n\n multipleRun(trainingDataSet.transformToWeightedDataSet(),\n attributes,\n classAttribute,\n Integer.parseInt(args[2]),\n Integer.parseInt(args[3]),\n Integer.parseInt(args[4]));\n\n\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void run() \n\t\t\t{\n\t\t\t\tUIManager.put(\"swing.boldMetal\", Boolean.FALSE);\n\t\t\t\tJFileChooser fc = new JFileChooser();\n\t\t\t\t// Only allow the selection of files with an extension of .asm.\n\t\t\t\tfc.setFileFilter(new FileNameExtensionFilter(\"ASM files\", \"asm\"));\n\t\t\t\t// Uncomment the following to allow the selection of files and\n\t\t\t\t// directories. The default behavior is to allow only the selection\n\t\t\t\t// of files.\n\t\t\t\tfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);\n\t\t\t\tif (fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)\n\t\t\t\t\tnew Assembler(fc.getSelectedFile().getPath());\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"No file selected; terminating.\");\n\t\t\t}", "public static void main(String[] args) {\n String dictionaryPath = \"/Users/johtani/tmp/dictionary/unidic-mecab-2.1.2_src\";\n // UniDic 2.3.0\n //String dictionaryPath = \"/Users/johtani/tmp/dictionary/unidic-cwj-2.3.0\";\n CsvParserSettings settings = new CsvParserSettings();\n CsvFormat format = new CsvFormat();\n format.setComment('\\0');\n settings.setFormat(format);\n CsvParser parser = new CsvParser(settings);\n\n try (DirectoryStream<Path> ds = Files.newDirectoryStream(Paths.get(dictionaryPath), \"*.csv\")){\n for (Path file : ds) {\n checkFile(parser, file);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n System.out.println(\"Finished!\");\n }", "public static boolean tryTest(String testName, int mode) {\n\t\ttry{\n\t\t\tString arg[] = null;\n\n\t\t\tif (mode == 0) {\n\t\t\t\targ = new String[1];\n\t\t\t\targ[0] = testName + \".c\";\n\n\t\t\t} \n\t\t\telse if (mode == 1) {\n\t\t\t\targ = new String[2];\n\t\t\t\targ[0] = \"-O\";\n\t\t\t\targ[1] = testName + \".c\";\n\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.err.println(\"TRYTEST: unsupported mode \" + mode);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\tString logName = testName + \".log\";\n\t\t\tPrintStream flog = new PrintStream(new FileOutputStream(new File(logName), false));\n\t\t\tSystem.setOut(new PrintStream(flog));\n\t\t\tmycc.parser.main(arg);\n\n\t\t\t// System.out.println(\"** Decompiling \" + testName + \".class **\");\n\t\t\t// systemCmd(\"javap -c\" + testName);\n\n\t\t\tSystem.out.println(\"** Executing \" + testName + \".class **\");\n\t\t\tsystemCmd(\"java \" + testName);\n\n\t\t\tflog.flush();\n\t\t\tflog.close();\n\n\t\t\treturn true;\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Caught exception: \" + e);\n\t\t\te.printStackTrace();\n\t\t\tSystem.err.println();\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public abstract void runOpMode();", "public void exp1() throws Exception {\n String exp = \"E1\";\n//\n// testNoExpansion(exp, \"RankedBoolean\");\n\n // pass the parameter file to main\n String[] args = new String[1];\n String[] slist = new String[]{\"param-E1-RankedBoolean.txt\"};\n //\"param-E1-Indri-NoRef.txt\" \"param-E1-Indri-YRef.txt\",\"param-Exp1-Indri-false-1000-0.4.txt\", \"param-Exp1-Indri-false-1000-0.7.txt\",\"param-Exp1-Indri-false-2500-0.4.txt\", \"param-Exp1-Indri-false-2500-0.7.txt\",\n for (String paramFilePath: slist) {\n args[0] = \"hw3/param/\" + paramFilePath;\n QryEval.main(args);\n }\n }", "@Override\n public void prepareRun(BatchSourceContext context) throws IOException {\n Map<String, String> arguments = new HashMap<>();\n FileSetArguments.setInputPaths(arguments, config.files);\n context.setInput(Input.ofDataset(config.fileSetName, arguments));\n }", "protected void openFiles() {\n\t\tthis.container = fso.openFile(prefix+EXTENSIONS[CTR_FILE],\"rw\");\n\t\tthis.metaData = fso.openFile(prefix+EXTENSIONS[MTD_FILE], \"rw\");\n\t\tthis.reservedBitMap = fso.openFile(prefix+EXTENSIONS[RBM_FILE], \"rw\");\n\t\tthis.updatedBitMap = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\tthis.freeList = fso.openFile(prefix+EXTENSIONS[FLT_FILE], \"rw\");\n\t}", "public void setMode(short mode)\n\t{\n\t\tthis.mode = mode;\n\t}", "static public void main(String argv[]) {\n for (String s : argv) {\n if (s.equals(\"-a\")) {\n SHOW_TREE = true;\n }\n else if (s.equals(\"-s\")) {\n SHOW_SYM_TABLES = true;\n }\n else if (s.equals(\"-c\")) {\n GENERATE_CODE = true;\n }\n //Check if the string ends with '.cm'\n else if (s.length() > 3 && s.substring(s.length()-3).equals(\".cm\")) { \n // If it does, make that the input file\n INPUT_FILE = s;\n }\n }\n\n if (INPUT_FILE == null) {\n System.out.println(\"No input file provided or incorrect file extension (must be .cm). Exiting...\");\n System.exit(-1);\n }\n\n // Retrieve the actual file name from between the path and the extension\n // E.g. tests/sort.cm gives a result of 'sort'\n int nameStartIndex = INPUT_FILE.lastIndexOf('/');\n int nameEndIndex = INPUT_FILE.lastIndexOf('.');\n FILE_NAME = INPUT_FILE.substring(nameStartIndex + 1, nameEndIndex);\n \n /* Start the parser */\n try {\n // Save original stdout to switch back to it as needed\n PrintStream console = System.out;\n\n if (!SHOW_SYM_TABLES && !SHOW_TREE && !GENERATE_CODE) {\n System.out.println(\"Showing errors only.\");\n System.out.println(\"Use [-a] flag to print the abstract syntax tree\" + \"\\n\" \n + \"Use [-s] flag to print the symbol table\" + \"\\n\"\n + \"Use [-c] to generate assembly code (.tm)\"); \n } \n\n parser p = new parser(new Lexer(new FileReader(INPUT_FILE)));\n // implement \"-a\", \"-s\", \"-c\" options\n Absyn result = (Absyn)(p.parse().value); \n \n if (result != null) {\n \n // If the '-a' flag is set, print the abstract syntax tree to a .abs file\n if (SHOW_TREE) {\n System.out.println(\"Abstract syntax tree written to '\" + FILE_NAME + \".abs'\");\n\n //Redirect stdout\n File absFile = new File(FILE_NAME + \".abs\");\n FileOutputStream absFos = new FileOutputStream(absFile);\n PrintStream absPS = new PrintStream(absFos);\n System.setOut(absPS);\n\n // Print abstract syntax tree to FILE_NAME.abs in current directory\n ShowTreeVisitor visitor = new ShowTreeVisitor();\n result.accept(visitor, 0, false); \n\n //Reset stdout\n System.setOut(console);\n }\n if (SHOW_SYM_TABLES) {\n //Redirect stdout to a .sym file \n File symFile = new File(FILE_NAME + \".sym\");\n FileOutputStream symFos = new FileOutputStream(symFile);\n PrintStream symPS = new PrintStream(symFos);\n System.setOut(symPS);\n } \n else {\n //Toss stdout output into the void while doing semantic analysis\n System.setOut(new PrintStream(OutputStream.nullOutputStream()));\n } \n\n // Perform semantic analysis\n SemanticAnalyzer analyzerVisitor = new SemanticAnalyzer();\n result.accept(analyzerVisitor, 0, false);\n\n //Restore stdout\n System.setOut(console);\n\n if (SHOW_SYM_TABLES) {\n //Print after having reported any errors\n System.out.println(\"Symbol table written to '\" + FILE_NAME + \".sym'\");\n }\n\n //Only generate code if the flag is set\n if (GENERATE_CODE) {\n\n //First, confirm that there are no syntax or semantic errors\n //HAS_ERRORS is true if there are any syntax errors or semantic errors, and false if both are error free\n HAS_ERRORS = (p.errorFound || analyzerVisitor.errorFound);\n\n if (HAS_ERRORS) {\n System.out.println(\"Cannot generate code while there are errors. Exiting...\");\n }\n else {\n //No syntax or semantic errors, proceed with code generation\n System.out.println(\"Assembly code written to '\" + FILE_NAME + \".tm'\");\n\n //Redirect stdout to .tm file\n File tmFile = new File(FILE_NAME + \".tm\");\n FileOutputStream tmFos = new FileOutputStream(tmFile);\n PrintStream tmPS = new PrintStream(tmFos);\n System.setOut(tmPS);\n\n //Perform code generation\n CodeGenerator generatorVisitor = new CodeGenerator();\n //result.accept(generatorVisitor, 0, false);\n generatorVisitor.visit(result, FILE_NAME + \".tm\");\n \n } \n }\n }\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Could not find file '\" + INPUT_FILE + \"'. Check your spelling, and ensure it exists. Exiting...\");\n System.exit(-1); \n } catch (Exception e) {\n /* do cleanup here -- possibly rethrow e */\n e.printStackTrace();\n }\n }", "public static void main(String arg[]) {\n\t\tRebuildDatabaseFromInstanceFiles ourselves = new RebuildDatabaseFromInstanceFiles();\n\t\tif (arg.length >= 3) {\n\t\t\tString databaseModelClassName = arg[0];\n\t\t\tString databaseFileName = arg[1];\n\t\t\n\t\t\tif (databaseModelClassName.indexOf('.') == -1) {\t\t\t\t\t// not already fully qualified\n\t\t\t\tdatabaseModelClassName=\"com.pixelmed.database.\"+databaseModelClassName;\n\t\t\t}\n//System.err.println(\"Class name = \"+databaseModelClassName);\t// no need to use SLF4J since command line utility/test\n\n\t\t\t//DatabaseInformationModel databaseInformationModel = new PatientStudySeriesConcatenationInstanceModel(makePathToFileInUsersHomeDirectory(dataBaseFileName));\n\t\t\tDatabaseInformationModel databaseInformationModel = null;\n\t\t\ttry {\n\t\t\t\tClass classToUse = Thread.currentThread().getContextClassLoader().loadClass(databaseModelClassName);\n\t\t\t\tClass[] parameterTypes = { databaseFileName.getClass() };\n\t\t\t\tConstructor constructorToUse = classToUse.getConstructor(parameterTypes);\n\t\t\t\tObject[] args = { databaseFileName };\n\t\t\t\tdatabaseInformationModel = (DatabaseInformationModel)(constructorToUse.newInstance(args));\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tslf4jlogger.error(\"\",e);\t// use SLF4J since may be invoked from script\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t\t\n\t\t\tlong startOfRebuild=System.currentTimeMillis();\n\t\t\tfilesProcessed=0;\n\t\t\tint i = 2;\t\t// start with 3rd argument\n\t\t\twhile (i<arg.length) {\n\t\t\t\tString name = arg[i++];\n\t\t\t\tFile file = new File(name);\n\t\t\t\tprocessFileOrDirectory(databaseInformationModel,file);\n\t\t\t}\n\t\t\tlong durationOfRebuild = System.currentTimeMillis() - startOfRebuild;\n\t\t\tdouble rate = ((double)filesProcessed)/(((double)durationOfRebuild)/1000);\n\t\t\tslf4jlogger.info(\"Processed {} files in {} ms, {} files/s\",filesProcessed,durationOfRebuild,rate);\t// use SLF4J since may be invoked from script\n\t\t\t\n\t\t\tdatabaseInformationModel.close();\t// this is really important ... will not persist everything unless we do this\n\t\t}\n\t\telse {\n\t\t\tSystem.err.println(\"Usage: java com.pixelmed.database.RebuildDatabaseFromInstanceFiles databaseModelClassName databaseFileName path(s)\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t \n\t\tString name ;\n\t\tint kor , eng , mat ;\n\t\tint tot ;\n\t\tdouble avg ;\n\t\tboolean gender ; \t\t\n\t\t//\n\t\tString fileName = \"학생성적.dat\";\n\t\ttry (\n\t\t\t\tFileInputStream in = new FileInputStream(fileName);\n\t\t\t\tDataInputStream dis = new DataInputStream(in);\n\t\t\t\t){\n\t\t\t\n\t\t\tname = dis.readUTF();\n\t\t\tkor = dis.readInt();\n\t\t\teng = dis.readInt();\n\t\t\tmat = dis.readInt();\n\t\t\ttot = dis.readInt();\n\t\t\tavg = dis.readDouble();\n\t\t\tgender = dis.readBoolean();\n\t\t\t\n\t\t\tSystem.out.printf(\"%s,%d,%d,%d,%d,%.2f,%b\\n\"\n\t\t\t\t\t, name, kor, eng,mat,tot,avg,gender);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t System.out.println(e.toString());\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"END\");\n\t}", "public void setMode(int mode){\n mMode = mode;\n }", "protected abstract void iniciarModo();", "public static void main(String[] args) throws IOException {\n int activeThreshold = 300;\n //Activity.selectActive(\"st\", 6, activeThreshold);\n //Activity.selectActive(\"ri\", 6, activeThreshold);\n //Activity.selectActive(\"dw\", 9, activeThreshold);\n\n //Interaction.analysis(\"st\", 6);\n //Interaction.analysis(\"ri\", 6);\n\n //BehaviourIndicators.analysis(\"st\", 6);\n //BehaviourIndicators.analysis(\"ri\", 6);\n //BehaviourIndicators.analysis(\"dw\", 9);\n\n Engagement.analysis(\"st\",6);\n Engagement.analysis(\"ri\",6);\n //todo the data files for DW have to be adjusted to the ones of the other two to be able to run it\n //Engagement.analysis(\"dw\",9);\n\n //Motivation.analysis(\"ri\", 6);\n //Motivation.analysis(\"st\", 6);\n }", "public void\ncmdProc(\n Interp interp, \t\t\t// Current interp to eval the file cmd.\n TclObject argv[])\t\t\t// Args passed to the file command.\nthrows\n TclException\n{\n// String dirName;\n//\n\tif(argv.length == 1)\n\t{\n\t\tString result = Commands.getAllCommands();\n\t\tSystem.out.println(result);\n\t\treturn;\n\t}\n if (argv.length > 2) {\n \tthrow new TclNumArgsException(interp, 1, argv, \"?dirName?\");\n }\n//\n// if (argv.length == 1) {\n//\tdirName = \"~\";\n// } else {\n//\tdirName = argv[1].toString();\n// }\n// if ((JACL.PLATFORM == JACL.PLATFORM_WINDOWS) \n//\t && (dirName.length() == 2) && (dirName.charAt(1) == ':')) {\n//\tdirName = dirName + \"/\";\n// }\n//\n// // Set the interp's working dir.\n//\n// interp.setWorkingDir(dirName);\n\t\n\tCommands.man(argv[1].toString());\n}", "public static void main(final String[] args) {\n \tString enginePath = engines[8];\n\t\tEngineParameter eparams = new EngineParameter(enginePath);\n\n\t\tString url = \"http://files.grouplens.org/datasets/movielens/ml-1m.zip\";\n String folder = \"src/resources/main/data/ml-1m\";\n String modelPath = \"src/resources/main/crossValid/ml-1m/model/\";\n String recPath = \"src/resources/main/crossValid/ml-1m/recommendations/\";\n String dataFile = eparams.getDataSouceParams().getSourceLocation().get(0);\n int nFolds = N_FOLDS;\n \t\t\n System.out.println(\"Preparing splits...\");\n prepareSplits(url, nFolds, dataFile, folder, modelPath);\n \n System.out.println(\"Gathering recomendations...\");\n //recommend(nFolds, modelPath, recPath); // RiVal's original step.\n //orbsRecommend(nFolds, eparams, modelPath); // Based on RiVal' step\n mixedRecommend(nFolds, eparams, modelPath); // Mixed step\n \n //System.out.println(\"Preparing strategy...\");\n // the strategy files are (currently) being ignored\n //prepareStrategy(nFolds, modelPath, recPath, modelPath);\n\n System.out.println(\"Evaluating...\");\n evaluate(nFolds, modelPath, recPath);\n }", "boolean setMode(int mode);", "public static void main(String[] args){\n\t\trandomizeText(\"newenergy_part.dat\");\n\t}", "public void setMode(String mode) \n\t{\n\t\tthis.mode = string2Octal(mode);\n\t}", "public static void main(String[] args) {\n PdfFile pdfFile=new PdfFile(\"PDF File\");\n pdfFile.open();\n pdfFile.close();\n pdfFile.edit();\n WordFile wordFile=new WordFile(\"Word File\");\n wordFile.open();\n wordFile.close();\n wordFile.edit();\n JavaFile javaFile=new JavaFile(\"Java File\");\n javaFile.open();\n javaFile.close();\n javaFile.edit();\n\n }", "public DREM_IO_Batch(String szDefaultFile, String sdremBindingFile,\n\t\t\tString szoutmodelfile) {\n\n\t\tFile dir = new File(SZSTATICDIR);\n\n\t\tString[] children = dir.list();\n\t\tif (children == null) {\n\t\t\tSystem.out.println(\"The directory \" + SZSTATICDIR\n\t\t\t\t\t+ \" was not found.\" + \"Directory not found\");\n\t\t} else {\n\t\t\tstaticsourceArray = new String[children.length + 1];\n\t\t\tstaticsourceArray[0] = \"User Provided\";\n\t\t\tfor (int i = 0; i < children.length; i++) {\n\t\t\t\t// Get filename of file or directory\n\t\t\t\tstaticsourceArray[i + 1] = children[i];\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\tthis.szDefaultFile = szDefaultFile;\n\t\t\tbbatchmode = true;\n\t\t\ts1 = System.currentTimeMillis();\n\t\t\tthis.szoutmodelfile = szoutmodelfile;\n\t\t\tparseDefaults();\n\t\t\tszepsilonval = \"\" + dMinScoreDEF;\n\t\t\tszprunepathval = \"\" + dPRUNEPATHDEF;\n\t\t\tszdelaypathval = \"\" + dDELAYPATHDEF;\n\t\t\tszmergepathval = \"\" + dDMERGEPATHDEF;\n\t\t\tszepsilonvaldiff = \"\" + dMinScoreDIFFDEF;\n\t\t\tszprunepathvaldiff = \"\" + dPRUNEPATHDIFFDEF;\n\t\t\tszdelaypathvaldiff = \"\" + dDELAYPATHDIFFDEF;\n\t\t\tszmergepathvaldiff = \"\" + dDMERGEPATHDIFFDEF;\n\t\t\tsznumchildval = \"\" + numchildDEF;\n\t\t\tszseedval = \"\" + nSEEDDEF;\n\t\t\tbstaticcheckval = bfilterstaticDEF;\n\t\t\tballowmergeval = ballowmergeDEF;\n\t\t\tninitsearchval = ninitsearchDEF;\n\t\t\tszinitfileval = szInitFileDEF;\n\t\t\tbstaticsearchval = bstaticsearchDEF;\n\t\t\tsznodepenaltyval = \"\" + dNODEPENALTYDEF;\n\t\t\tbpenalizedmodelval = bPENALIZEDDEF;\n\t\t\tszconvergenceval = \"\" + dCONVERGENCEDEF;\n\t\t\tszminstddeval = \"\" + dMINSTDDEVALDEF;\n\t\t\t// System.out.println(\"*\"+szStaticFileDEF);\n \n //FIXME: HEADLESS MODE\n System.setProperty(\"java.awt.headless\", \"true\");\n \n\t\t\t// If a binding file is specified by SDREM, use that instead\n\t\t\t// of what was read from the defaults file\n\t\t\tif (sdremBindingFile != null) {\n\t\t\t\tszStaticFileDEF = sdremBindingFile;\n\t\t\t}\n\n\t\t\tclusterscript(szStaticFileDEF, szCrossRefFileDEF, szDataFileDEF,\n\t\t\t\t\tszGeneAnnotationFileDEF, szGeneOntologyFileDEF, \"\"\n\t\t\t\t\t\t\t+ nMaxMissingDEF, \"\" + dMinExpressionDEF, \"\"\n\t\t\t\t\t\t\t+ dMinCorrelationRepeatsDEF, \"\"\n\t\t\t\t\t\t\t+ nSamplesMultipleDEF, \"\" + nMinGoGenesDEF, \"\"\n\t\t\t\t\t\t\t+ nMinGOLevelDEF, szPrefilteredDEF, balltimeDEF,\n\t\t\t\t\tvRepeatFilesDEF, (nnormalizeDEF == 0), false, false,\n\t\t\t\t\tbspotcheckDEF, (nnormalizeDEF == 2), szcategoryIDDEF,\n\t\t\t\t\tszInitFileDEF, szevidenceDEF, sztaxonDEF, bpontoDEF,\n\t\t\t\t\tbcontoDEF, bfontoDEF, brandomgoDEF, bmaxminDEF);\n\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace(System.out);\n\t\t}\n\n\t}", "public void setMode(int mode0) {\n\t\t// invalid mode?\n\t\tint mode = mode0;\n\t\tif (mode != MODE_IMAGES && mode != MODE_GEOGEBRA\n\t\t\t\t&& mode != MODE_GEOGEBRA_SAVE && mode != MODE_DATA) {\n\t\t\tLog.debug(\n\t\t\t\t\t\"Invalid file chooser mode, MODE_GEOGEBRA used as default.\");\n\t\t\tmode = MODE_GEOGEBRA;\n\t\t}\n\n\t\t// do not perform any unnecessary actions\n\t\tif (this.currentMode == mode) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (mode == MODE_GEOGEBRA) { // load/save ggb, ggt etc. files\n\t\t\tsetMultiSelectionEnabled(true);\n\t\t} else { // load images\n\t\t\tsetMultiSelectionEnabled(false);\n\t\t}\n\n\t\t// set the preview panel type: image, data or ?\n\t\tpreviewPanel.setPreviewPanelType(mode);\n\n\t\t// TODO apply mode specific settings..\n\n\t\tthis.currentMode = mode;\n\t}", "public void execfile(String filename) {\n }", "private void cmdOpen(String line) {\n boolean doEcho = true;\n StringTokenizer st = new StringTokenizer(line);\n\n // if there is no filename and option\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \" + \"Try `help'.\");\n return;\n }\n\n String token = st.nextToken();\n // option quiet\n if (token.equals(\"-q\")) {\n doEcho = false;\n\n // if there is no filename\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \"\n + \"Try `help'.\");\n return;\n }\n token = st.nextToken();\n }\n\n // to find out what command will be needed\n try {\n \t// if quoted add remaining tokens\n \tif (token.startsWith(\"\\\"\")) {\n \t\twhile (st.hasMoreTokens()) {\n \t\t\ttoken += \" \" + st.nextToken();\n \t\t}\n \t}\n \t\n \tString filename = getFilenameToOpen(token);\n String firstWord = getFirstWordOfFile(filename);\n setFileClosed();\n \n // if getFirstWordOfFile returned with error code, than\n // end this method.\n if (firstWord != null && firstWord.equals(\"ERROR: -1\")) {\n return;\n }\n if (firstWord == null) {\n Log.println(\"Nothing to do, because file `\" + line + \"' \"\n + \"contains no data!\");\n // Necessary if USE is started with a cmd-file and option -q or\n // -qv. This call provides the readline stack with the one\n // readline object and no EmptyStackException will be thrown.\n if (Options.cmdFilename != null) {\n cmdRead(Options.cmdFilename, false);\n }\n return;\n }\n if (firstWord.startsWith(\"model\")) {\n cmdOpenUseFile(token);\n } else if (firstWord.startsWith(\"context\")) {\n cmdGenLoadInvariants(token, system(), doEcho);\n } else if (firstWord.startsWith(\"testsuite\")) {\n \tcmdRunTestSuite(token);\n } else {\n cmdRead(token, doEcho);\n }\n \n if (this.openFiles.size() <= 1) {\n \tString opened;\n \t\n \tif (this.openFiles.size() == 0)\n \t\topened = filename;\n \telse\n \t\topened = this.openFiles.peek().toString();\n \t\n \t\tif (Options.getRecentFiles().contains(opened)) {\n \t\t\tOptions.getRecentFiles().remove(opened);\n \t\t}\n \t\t \t\t\t\n \t\tOptions.getRecentFiles().push(opened);\n \t}\n } catch (NoSystemException e) {\n Log.error(\"No System available. Please load a model before \"\n + \"executing this command.\");\n }\n }", "void setMotorsMode(DcMotor.RunMode runMode);", "public void setMode(final String mode) {\n this.mode = checkEmpty(mode);\n }", "@Override\n public void runOpMode() {\n initialize();\n\n //wait for user to press start\n waitForStart();\n\n if (opModeIsActive()) {\n\n // drive forward 24\"\n // turn left 90 degrees\n // turnLeft(90);\n // drive forward 20\"\n // driveForward(20);\n // turn right 90 degrees\n // turnRight(90);\n // drive forward 36\"\n // driveForward(36);\n\n }\n\n\n }", "public static void main(String[] args) {\r\n\r\n FileReadWrite frw = new FileReadWrite(\"ReadFromFile.txt\", \"OutputFile.txt\");\r\n try {\r\n frw.readAndWriteFile();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\t\r\n\t\tFile filename = new File(\"D://normal.txt\");\r\n\t\tFileInputStream fstream = new FileInputStream(filename);\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\t\r\n\t}", "public void setMode(int inMode) {\n mode = inMode;\n }", "public static void main(String[] args) throws IOException {\n Module2Exercises lesson = new Module2Exercises();\n lesson.runExercises();\n }", "public static void main(String... strings) {\n\t\t\n\t\tfinal MipsComputer comp = new MipsComputer();\n\t\t\n\t\tFile f = new File(filePath);\n\t\tif (f.exists() && !f.isDirectory()) {\n\t\t\tcomp.setFromMars(true);\n\t\t\treadInstructionsFromFile(f, comp);\n\t\t} else {\n\t\t\tcomp.setFromMars(false);\n\t\t\treadInstructionsFromArray(comp);\n\t\t}\n\t\t\n\t\tcomp.execute();\n\t\tcomp.print();\n\t}", "public static void main(String[] args) {\n if (args.length != 1) {\n System.out.println(\"Proper usage is 'java Program02 [file].txt'\");\n return;\n }\n // initialize\n new Program02(args[0]);\n }", "public static void main(String[] argv) {\n\t\tFile file = new File(\"D:/dataset/\");\n\t\t\n\t\t\n\t\t\n\t\tdouble yuzhi=0.05;\n\t\tString y = String.valueOf(yuzhi);\n\t\t\t\t\t\n\t\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\n\t\tFile[] lf = file.listFiles();\n\t\tfor (int i = 0; i < lf.length; i++) {\n\t\t\tSystem.out.println(lf[i].getName());\n\t\t\tString[] arg = {\n//\t\t\t\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\t\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\t\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\t\t\t\"-c\", \"last\",\n//\t\t\t\t\t\"-y\", y,\n\n\t\t\t\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\t\t\t\"-o\", \"D:/FASTminDrawL/\" + y+lf[i].getName()\n\t\t\t};\n\t\t\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\n\t\t\tlong st =System.currentTimeMillis();\n\t\t\trunFilter(new FASTminDrawL(yuzhi), arg);\n\t\t\tlong end =System.currentTimeMillis();\n\t\t\tlong time=end-st;\n\t\t\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n\t\t}\n\t\n\t\n\t\tyuzhi=0.1;\n\t\ty = String.valueOf(yuzhi);\n\t\t\t\t\n\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\n\tlf = file.listFiles();\n\tfor (int i = 0; i < lf.length; i++) {\n\t\tSystem.out.println(lf[i].getName());\n\t\tString[] arg = {\n//\t\t\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\t\t\"-c\", \"last\",\n//\t\t\t\t\"-y\", y,\n\n\t\t\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\t\t\"-o\", \"D:/FASTminDrawL/\" + y+lf[i].getName()\n\t\t};\n\t\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\n\t\tlong st =System.currentTimeMillis();\n\t\trunFilter(new FASTminDrawL(yuzhi), arg);\n\t\tlong end =System.currentTimeMillis();\n\t\tlong time=end-st;\n\t\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n\t}\n\t\n\t\n\t\n\tyuzhi=0.2;\n\ty = String.valueOf(yuzhi);\n\t\t\t\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\nlf = file.listFiles();\nfor (int i = 0; i < lf.length; i++) {\n\tSystem.out.println(lf[i].getName());\n\tString[] arg = {\n//\t\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\t\"-c\", \"last\",\n//\t\t\t\"-y\", y,\n\n\t\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\t\"-o\", \"D:/FASTminDrawL/\" + y+lf[i].getName()\n\t};\n\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\n\tlong st =System.currentTimeMillis();\n\trunFilter(new FASTminDrawL(yuzhi), arg);\n\tlong end =System.currentTimeMillis();\n\tlong time=end-st;\n\tAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n}\n\t\n\nyuzhi=0.4;\ny = String.valueOf(yuzhi);\n\t\t\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\nlf = file.listFiles();\nfor (int i = 0; i < lf.length; i++) {\nSystem.out.println(lf[i].getName());\nString[] arg = {\n//\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\"-c\", \"last\",\n//\t\t\"-y\", y,\n\n\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\"-o\", \"D:/FASTminDrawL/\" +y+ lf[i].getName()\n};\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\nlong st =System.currentTimeMillis();\nrunFilter(new FASTminDrawL(yuzhi), arg);\nlong end =System.currentTimeMillis();\nlong time=end-st;\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n}\n\n\nyuzhi=0.6;\ny = String.valueOf(yuzhi);\n\t\t\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\nlf = file.listFiles();\nfor (int i = 0; i < lf.length; i++) {\nSystem.out.println(lf[i].getName());\nString[] arg = {\n//\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\"-c\", \"last\",\n//\t\t\"-y\", y,\n\n\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\"-o\", \"D:/FASTminDrawL/\" + y+lf[i].getName()\n};\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\nlong st =System.currentTimeMillis();\nrunFilter(new FASTminDrawL(yuzhi), arg);\nlong end =System.currentTimeMillis();\nlong time=end-st;\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n}\n\nyuzhi=0.8;\ny = String.valueOf(yuzhi);\n\t\t\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\nlf = file.listFiles();\nfor (int i = 0; i < lf.length; i++) {\nSystem.out.println(lf[i].getName());\nString[] arg = {\n//\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\"-c\", \"last\",\n//\t\t\"-y\", y,\n\n\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\"-o\", \"D:/FASTminDrawL/\" + y+lf[i].getName()\n};\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\nlong st =System.currentTimeMillis();\nrunFilter(new FASTminDrawL(yuzhi), arg);\nlong end =System.currentTimeMillis();\nlong time=end-st;\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n}\n\nyuzhi=1;\ny = String.valueOf(yuzhi);\n\t\t\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", \"\\r\\n\");\nlf = file.listFiles();\nfor (int i = 0; i < lf.length; i++) {\nSystem.out.println(lf[i].getName());\nString[] arg = {\n//\t\t\"-E\", \"weka.attributeSelection.CfsSubsetEval -L\",\n//\t\t\"-E\", \"weka.attributeSelection.SymmetricalUncertAttributeSetEval \",\n//\t\t\"-S\", \"weka.attributeSelection.BestFirst -S 8\",\n\t\t\"-c\", \"last\",\n//\t\t\"-y\", y,\n\n\t\t\"-i\", \"D:/dataset/\" + lf[i].getName(), \n\t\t\"-o\", \"D:/FASTminDrawL/\" + y+lf[i].getName()\n};\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", lf[i].getName());\nlong st =System.currentTimeMillis();\nrunFilter(new FASTminDrawL(yuzhi), arg);\nlong end =System.currentTimeMillis();\nlong time=end-st;\nAppendToFile.appendMethodA(\"D:/FASTminDrawL/T.txt\", time + \"\\r\\n\");\n}\n\n\n\t\n}", "@Override\n public void runOpMode() {\n servo0 = hardwareMap.servo.get(\"servo0\");\n servo1 = hardwareMap.servo.get(\"servo1\");\n digital0 = hardwareMap.digitalChannel.get(\"digital0\");\n motor0 = hardwareMap.dcMotor.get(\"motor0\");\n motor1 = hardwareMap.dcMotor.get(\"motor1\");\n motor0B = hardwareMap.dcMotor.get(\"motor0B\");\n motor2 = hardwareMap.dcMotor.get(\"motor2\");\n blinkin = hardwareMap.get(RevBlinkinLedDriver.class, \"blinkin\");\n motor3 = hardwareMap.dcMotor.get(\"motor3\");\n park_assist = hardwareMap.dcMotor.get(\"motor3B\");\n\n if (digital0.getState()) {\n int_done = true;\n } else {\n int_done = false;\n }\n motor_stuff();\n waitForStart();\n if (opModeIsActive()) {\n while (opModeIsActive()) {\n lancher_position();\n slow_mode();\n drive_robot();\n foundation_grabber(1);\n launcher_drive();\n data_out();\n Pickingupblockled();\n lettingoutblockled();\n Forwardled();\n backwardled();\n Turnleftled();\n Turnrightled();\n Stationaryled();\n }\n }\n }", "public static void main(String[] args) throws IOException{\n\tFile data = new File(\"src/example.dat\");\r\n\r\n\t DataOutputStream out = new DataOutputStream(\r\n\t\t\t\t\t\t\t new BufferedOutputStream(\r\n\t\t\t\t\t\t\t new FileOutputStream(data)));\r\n\t out.writeInt(5);\r\n\t out.writeChar('c');\r\n\t out.writeBoolean(true);\r\n\t out.writeUTF(\"Java\");\r\n\t out.writeChar('\\n');\r\n\t out.writeChars(\"End of file\");\r\n\t out.close();\r\n }", "public static void main(String argv[]) {\n org.junit.runner.JUnitCore.main(Test_Data.class.getName()); // full name with package\n }", "public static void main(String[] args) {\n\t\tDocument doc = new Document(\"Sample.txt\");\n\t\tFileMenuOptions fileOptions = new FileMenuOptions(doc);\n\t\tfileOptions.doCommand(\"open\");\n\t\tfileOptions.doCommand(\"save\");\n\t\tfileOptions.doCommand(\"close\");\n\t\tfileOptions.doCommand(\"exit\");\n\n\t}", "public static void main(String[] args) throws IOException {\r\n\t\r\n// TestSave a = new TestSave();\r\n// a.create();\r\n// a.save();\r\n//\tlaunch(args);\r\n String filePath = \"./work/DesignSaveTest\";\r\n FileManager fm = new FileManager();\r\n DataManager dm = new DataManager();\r\n fm.create(dm);\r\n fm.saveData(dm, filePath);\r\n \r\n }", "@Override\n\t\t\tpublic String getDescription() {\n\t\t\t\treturn \"*.dat file\";\n\t\t\t}", "public static void main(String[] args) {\r\n\t\tTaskResultAnalysis analysis = extractArguments(args);\r\n\t\tif (analysis == null)\r\n\t\t\tdie(USAGE);\r\n\t\t// determine tool mode, invoke proper action\r\n\t\tif (analysis.directory != null)\r\n\t\t\tsearch(analysis);\r\n\t\telse analyze(analysis);\r\n\t}", "void distributedSingleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "@Override\n public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {\n if (sender instanceof Player) {\n final Player player = (Player) sender;\n // PLAYER COMMANDS\n for(Map.Entry<String, CommandAction> entry : commands.entrySet()) {\n if (cmd.getName().equalsIgnoreCase(entry.getKey())) {\n entry.getValue().run(sender, cmd, label, args, player);\n }\n }\n\n // MODERATOR COMMANDS\n for(Map.Entry<String, CommandAction> entry : modCommands.entrySet()) {\n if (cmd.getName().equalsIgnoreCase(entry.getKey())) {\n if (isModerator(player)) {\n entry.getValue().run(sender, cmd, label, args, player);\n } else {\n sender.sendMessage(\"You don't have enough permissions to execute this command!\");\n }\n }\n }\n }\n return true;\n }", "public static void main(String[] args) {\n Mod1 m = new Mod1();\n m.modelName=\"Swift\";\n System.out.println(m.modelName);\n System.out.println(sf());\n \n\t}", "public static void main(String[] args) {\n ModeReader modeReader = new ModeReader();\n LogoPrinter logoPrinter = new MagicCubeLogoPrinter();\n logoPrinter.printLogo();\n\n while (true) {\n int mode = modeReader.read();\n if (mode == -1) {\n continue;\n }else if(mode == 1) {\n System.exit(1);\n }\n CubeGame magicCube = new MagicCubeGame();\n magicCube.startGame();\n }\n }", "public static void main(String[] args) \t \r\n\t{\t \t\r\n\t\tnew Controlador();\t\r\n\t\tSerializador ser = new Serializador();\r\n\t\tser.leerObjeto(\"Datos.a\");\r\n\t\tSonido s = new Sonido(\"Sonidos/simpsonTema.wav\");//puede aver problemas con \"src\" boorar para exportar a ejecutable\r\n\t\ts.start();\r\n\t \r\n\t }", "public static void main(String[] args) {\n try {\n IMusicEditor composition = MusicReader.parseFile(new FileReader(args[0]),\n new MusicEditorModel.Builder());\n View display;\n if (args[1].equals(\"combo\")) {\n Controller c = new Controller(new CompositeViewImpl(new GuiViewImpl(), new MidiViewImpl()),\n composition);\n\n } else {\n display = ViewFactory.create(args[1]);\n ViewModel m = new ViewModel(composition);\n display.display(m);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "@Override\n\tpublic void setMode(int mode) {\n\t\t\n\t}", "@Test\n public void runSimpleConcurrencyFileSuccess() throws Exception {\n List<String> args = getBasicArgsStr();\n args.add(\"-r\");\n args.add(\"^(?<VTIME>)(?<TYPE>)$\");\n args.add(\"-s\");\n args.add(\"^--$\");\n args.add(\"-q\");\n args.add(\"M:0->1\");\n args.add(\"-i\");\n args.add(\"-d\");\n args.add(\"../traces/EndToEndDynopticTests/simple-po-concurrency/trace.txt\");\n runDynFromFileArgs(args);\n }", "void enableMod();", "public void setMetrMode(final int[] mode) {\n\t\tif (mode==null || mode.length!=4) {\n\t\t\tthrow new IllegalArgumentException(\"Invalide metrology mode\");\n\t\t}\n\t\tThread t = new Thread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tString modeStr=\"[\"+mode[0]+\", \"+mode[1]+\", \"+mode[2]+\", \"+mode[3]+\"]\";\n\t\t\t\ttry {\n\t\t\t\t\tlogger.log(AcsLogLevel.DEBUG,\"Setting metrology mode to \"+modeStr);\n\t\t\t\t\tmount.SET_METR_MODE(mode);\n\t\t\t\t\tlogger.log(AcsLogLevel.DEBUG,\"Metrology mode set to \"+modeStr);\n\t\t\t\t} catch (Throwable t) {\n\t\t\t\t\tAcsJMetrologyEx ex = new AcsJMetrologyEx(t);\n\t\t\t\t\tex.setAntennatype(AntennaType.VERTEX.description);\n\t\t\t\t\tex.setOperation(\"Invalid metrology mode\");\n\t\t\t\t\tnotifier.commandExecuted(0,\"Set Vertex metr mode to \"+modeStr,\"Error from remote component while setting metrology mode to \"+modeStr,ex);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tt.setDaemon(true);\n\t\tt.setName(\"Vertex:setMetrMode\");\n\t\tt.start();\n\t}", "public void setModality() {\r\n\r\n for (final FileMincVarElem element : varArray) {\r\n\r\n if (element.name.equals(\"study\")) {\r\n\r\n for (final FileMincAttElem element2 : element.vattArray) {\r\n\r\n if (element2.name.equals(\"modality\")) {\r\n final String modality = element2.getValueString();\r\n\r\n if (modality.equals(\"PET__\")) {\r\n setModality(FileInfoBase.POSITRON_EMISSION_TOMOGRAPHY);\r\n } else if (modality.equals(\"MRI__\")) {\r\n setModality(FileInfoBase.MAGNETIC_RESONANCE);\r\n } else if (modality.equals(\"SPECT\")) {\r\n setModality(FileInfoBase.SINGLE_PHOTON_EMISSION_COMPUTED_TOMOGRAPHY);\r\n } else if (modality.equals(\"GAMMA\")) {\r\n // setModality(FileInfoBase.);\r\n } else if (modality.equals(\"MRS__\")) {\r\n setModality(FileInfoBase.MAGNETIC_RESONANCE_SPECTROSCOPY);\r\n } else if (modality.equals(\"MRA__\")) {\r\n setModality(FileInfoBase.MAGNETIC_RESONANCE_ANGIOGRAPHY);\r\n } else if (modality.equals(\"CT___\")) {\r\n setModality(FileInfoBase.COMPUTED_TOMOGRAPHY);\r\n } else if (modality.equals(\"DSA__\")) {\r\n // setModality(FileInfoBase.);\r\n } else if (modality.equals(\"DR___\")) {\r\n setModality(FileInfoBase.DIGITAL_RADIOGRAPHY);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }", "private static boolean processArgs(String[] args){\n\n // Check to see if there are two files names that can be read\n if(args.length != 2){\n\n System.out.println(\"Please enter two file names:\" +\n \" Books, Transactions or Books1, Transaction1\");\n System.out.println(\"Or compatible files\");\n\n return false;\n\n // Check to see if the two files can be opened\n } else {\n for (int x = 0; x < 2; x++){\n // Make a file object to represent txt file to be read\n File inputFile = new File(args[x]);\n if (!inputFile.canRead()) {\n System.out.println(\"The file \" + args[x]\n + \" cannot be opened for input.\");\n return false;\n }\n }\n // At this point we know the files are readable\n return true;\n }\n }", "public void setMode(int i){\n\tgameMode = i;\n }", "public static void main(String[] args) throws IOException {\n\t\tSystem.out.println(\"leggi file 1\\t\");\r\n\t\tFileTesto ts = new FileTesto(\"leggi.txt\");\r\n\t\tts.leggiFile();\r\n\t\tts.stampa();\r\n\r\n\t\tSystem.out.println(\"scrivi file 2: \\t\");\r\n\t\tFileTesto ts1= new FileTesto(\"scritto.txt\");\r\n\t\tts1.simula();\r\n\t\tts1.scriviFile();\t\t\r\n\t\tts1.stampa();\r\n\t\tSystem.out.println(\"leggi file 2: \\t\");\r\n\t\tFileTesto ts2 = new FileTesto(\"scritto.txt\");\r\n\t\tts1.leggiFile();\r\n\t\tts1.stampa();\r\n\t}", "public static void main(String [] args){\n MainController run = new MainController();\n int value = run.filesExist();\n if (value == 0) {\n run.fileQUserMssgExists();\n }\n else if (value == 1) {\n run.fileQUserMssgRoomsExists();\n }\n else if (value == 2) {\n run.fileQAllExists();\n }\n run.run(value);\n }", "public static void main(String[] args) {\n\t\tfileName = args[0];\n\t\t//set up file name for the data:\n\t\ttry {\n\t\t\treader = new Scanner(new File(args[1]));\n\t\t\t\n\t\t\t//create a new program, then parse, print, and execute:\n\t\t\tProgram p = new Program();\n\t\t\tp.parse();\n\t\t\tp.print();\n\t\t\tSystem.out.println(\"---PROGRAM OUTPUT---\");\n\t\t\tp.execute();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"ERROR reading data file \" + args[1]);\n\t\t\te.printStackTrace();\n\t\t} finally{\n\t\t\treader.close();\n\t\t}\n\t}" ]
[ "0.59798586", "0.54558235", "0.5315351", "0.52652836", "0.5084584", "0.5047956", "0.49542126", "0.49507868", "0.48902446", "0.47747937", "0.47652313", "0.4763755", "0.47511584", "0.47388166", "0.47290176", "0.46993762", "0.4694925", "0.4670152", "0.46667826", "0.4660987", "0.46478418", "0.46021667", "0.45950013", "0.45864967", "0.4562616", "0.4558569", "0.45297477", "0.45269102", "0.45232958", "0.45222968", "0.45133618", "0.45082352", "0.45071208", "0.4489254", "0.44867742", "0.44805062", "0.447955", "0.44731364", "0.44725308", "0.4467205", "0.44658226", "0.44633693", "0.44583037", "0.44554642", "0.4454874", "0.44534555", "0.44504598", "0.4449798", "0.4437807", "0.4434744", "0.44328502", "0.44249138", "0.44239584", "0.44217667", "0.44163954", "0.44159597", "0.44158268", "0.44137108", "0.4412666", "0.43953693", "0.43881604", "0.4386893", "0.43841013", "0.4379467", "0.43789828", "0.43744966", "0.4367711", "0.43598664", "0.43535525", "0.4346777", "0.4342309", "0.4338972", "0.43371922", "0.43312952", "0.43221226", "0.4320054", "0.4319239", "0.43141448", "0.43135738", "0.43090597", "0.43000165", "0.42998043", "0.4298", "0.42979118", "0.4296987", "0.42924133", "0.42904568", "0.4288965", "0.42838523", "0.4281153", "0.42774656", "0.42745036", "0.4271521", "0.42640254", "0.42611584", "0.42557254", "0.4254297", "0.42510518", "0.4249519", "0.42416173" ]
0.65282804
0
Simply selects the home view to render by returning its name.
@RequestMapping(value = "/", method = RequestMethod.GET) public String home(Model model, HttpServletRequest requestParam, HttpServletResponse responseParam, HttpSession sessionParam, @RequestParam(value="id", required=false) String id, @RequestParam() Map<String, String> params) { model.addAttribute("books", bookManager.getBooks()); return "home"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(Mappings.HOME)\n\tpublic String showHome() {\n\n\t\treturn ViewNames.HOME;\n\t}", "public String home() {\n if (getUsuario() == null) {\n return \"login.xhtml\";\n }\n // Si el usuario es un ADMINISTRADOR, le lleva a la pagina a la lista de Alumnos\n if (getUsuario().getRol().equals(getUsuario().getRol().ADMINISTRADOR)) {\n return \"ListaAlumnos.xhtml\";\n }\n // Si el usuario es Alumno, le llevará a la página web de INDEX\n // REVISAR\n if (getUsuario().getRol().equals(getUsuario().getRol().ALUMNO)) {\n return \"login.xhtml\";\n }\n return null;\n }", "public String home() {\n if(getUsuario()==null){\r\n return \"login.xhtml\";\r\n }\r\n \r\n // Si el usuario es un administrador, le lleva a la pagina del listado de apadrinados\r\n if(getUsuario().getRol().equals(getUsuario().getRol().ADMINISTRADOR)){\r\n return \"listaninosapadrinados.xhtml\";\r\n }\r\n \r\n // Si el usuario es socio, le lleva a la pagina de apadrinar\r\n if(getUsuario().getRol().equals(getUsuario().getRol().SOCIO)){\r\n return \"apadrinar.xhtml\";\r\n }\r\n return null;\r\n }", "@RequestMapping(\"/home\")\n\tpublic String showHome() {\n\t\treturn \"home\";\n\t}", "public void home_index()\n {\n Home.index(homer);\n }", "public Class getHomePage() {\n return HomePage.class;\n }", "public void displayHome() {\n\t\tclearBackStack();\n\t\tselectItemById(KestrelWeatherDrawerFactory.MAP_OVERVIEW, getLeftDrawerList());\n\t}", "InternationalizedResourceLocator getHomePage();", "@RequestMapping(value = \"/home\")\n\tpublic String home() {\t\n\t\treturn \"index\";\n\t}", "public String getHomePage() {\r\n return this.homePage;\r\n }", "public void toHomeScreen(View view) {\n Intent intent = new Intent(SportHome.this, HomeScreen.class);\n startActivity(intent);\n\n }", "@RequestMapping(\"/\")\n\tpublic String homePage() {\n\t\tlogger.info(\"Index Page Loaded\");\n\t\treturn \"index\";\n\t}", "public static final String getHome() { return home; }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home() {\n\t\treturn \"home\";\n\t}", "String getOssHomepage();", "public static Result home() {\n Skier loggedInSkier = Session.authenticateSession(request().cookie(COOKIE_NAME));\n if(loggedInSkier==null)\n return redirect(\"/\");\n else\n return renderHome(loggedInSkier);\n }", "@RequestMapping(value = {\"/\", \"/home\"}, method = RequestMethod.GET)\n public String goHome(ModelMap model) {\n model.addAttribute(\"loggedinuser\", appService.getPrincipal());\n model.addAttribute(\"pagetitle\", \"Pand-Eco\");\n return \"view_landing_page\";\n }", "@GetMapping(\"/\")\n\tpublic String showHomePage() {\n\t\treturn \"home\";\n\t}", "@RequestMapping(\"home\")\n public String loadHomePage( HttpServletRequest request, final HttpServletResponse response, Model model ) {\n response.setHeader( \"Cache-Control\", \"max-age=0, no-cache, no-store\" );\n\n // Get the title of the application in the request's locale\n model.addAttribute( \"title\", webapp.getMessage( \"webapp.subtitle\", null, request.getLocale() ) );\n\n return \"home\";\n }", "public void homeClicked() {\r\n Pane newRoot = loadFxmlFile(Home.getHomePage());\r\n Home.getScene().setRoot(newRoot);\r\n }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n public String home(Model model, Authentication authentication){\n if(authentication != null) {\n User currUser = customUserDetailsService.findByUsername(authentication.getName());\n model.addAttribute(\"user\", currUser);\n }\n // The string \"Index\" that is returned here is the name of the view\n // (the Index.jsp file) that is in the path /main/webapp/WEB-INF/jsp/\n // If you change \"Index\" to something else, be sure you have a .jsp\n // file that has the same name\n return \"Index\";\n }", "public void tohome (View view){\n Intent i = new Intent(this,Intro.class);\n startActivity(i);\n }", "public static String getHome() {\n return home;\n }", "private void setDefaultView() {\n mDefaultFragment = mHomeFragment;\n mDefaultNavItemSelectionId = R.id.navigation_home;\n\n mNavigationView.setSelectedItemId(mDefaultNavItemSelectionId);\n mCurrentFragment = mDefaultFragment;\n switchFragment();\n setActionBarTitle(mDefaultNavItemSelectionId);\n }", "private void loadHome(){\n Intent intent = new Intent(this, NameListActivity.class);\n startActivity(intent);\n finish();\n }", "String home();", "public void goHomeScreen(View view)\n {\n\n Intent homeScreen;\n\n homeScreen = new Intent(this, homeScreen.class);\n\n startActivity(homeScreen);\n\n }", "@Override\n public void showHomeView()\n {\n Intent homeView = new Intent(LoginActivity.this, HomeActivity.class);\n startActivity(homeView);\n }", "public String getHomePage(User currentUser) {\r\n VelocityContext context = getHomePageData(currentUser);\r\n String page = renderView(context, \"pages/home.vm\");\r\n return page;\r\n }", "public void goHome();", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\n\t public String home()\n\t {\n\t return \"welcome\";\n\t }", "@Override\n\tpublic int getContentView() {\n\t\treturn R.layout.activity_home;\n\t}", "public void gotoHome(){ application.gotoHome(); }", "@RequestMapping(value=\"/\")\r\npublic ModelAndView homePage(ModelAndView model) throws IOException\r\n{\r\n\tmodel.setViewName(\"home\");\r\n\treturn model;\r\n}", "public abstract int getRootView();", "public void goToHomePage(View view)\n {\n Intent intent = new Intent( this, HomeActivity.class );\n startActivity( intent );\n }", "public JTextPane getHomeName() {\n return this.homeName;\n }", "@RequestMapping(method= RequestMethod.GET, value=\"/staff/home\")\n protected static String getStaffHome() {\n return \"staff-home\";\n }", "public String homepage() {\n return this.home;\n }", "@RequestMapping(value=\"/homepage\")\r\npublic ModelAndView homePage1(ModelAndView model) throws IOException\r\n{\r\n model.setViewName(\"home\");\r\n\treturn model;\r\n}", "@RequestMapping(value=\"/\", method=RequestMethod.GET)\n\tpublic String home() {\n\t\tlogger.info(\"Welcome home!\");\n\t\treturn \"home\";\n\t}", "public void setHomeName(String homeName) {\n this.homeName.setText(homeName);\n }", "@RequestMapping(value = { \"/broadband-user\", \"/broadband-user/login\" })\n\tpublic String userHome(Model model) {\n\t\tmodel.addAttribute(\"title\", \"CyberPark Broadband Manager System\");\n\t\treturn \"broadband-user/login\";\n\t}", "public void showHomeScreen() {\n try {\n FXMLLoader loader1 = new FXMLLoader();\n loader1.setLocation(MainApplication.class.getResource(\"view/HomeScreen.fxml\"));\n AnchorPane anchorPane = (AnchorPane) loader1.load();\n rootLayout.setCenter(anchorPane);\n HomeScreenController controller = loader1.getController();\n controller.setMainApp(this);\n } catch (IOException e) {\n \t\te.printStackTrace();\n \t }\n }", "public void backHome(View view) {\n Intent intent = new Intent(this, home.class);\n startActivity(intent);\n\n }", "@Override\n protected int getLayoutId() {\n return R.layout.fragment_home;\n }", "@RequestMapping(value = \"home.do\", method = RequestMethod.GET)\n public String getHome(HttpServletRequest request, Model model) {\n logger.debug(\"Home page Controller:\");\n return \"common/home\";\n }", "public String extractHomeView() {\n return (new StringBuilder()\n .append(\"<a href=\\\"/products/details/\" + this.getId() + \"\\\" class=\\\"col-md-2\\\">\")\n .append(\"<div class=\\\"product p-1 chushka-bg-color rounded-top rounded-bottom\\\">\")\n .append(\"<h5 class=\\\"text-center mt-3\\\">\" + this.getName() + \"</h5>\")\n .append(\"<hr class=\\\"hr-1 bg-white\\\"/>\")\n .append(\"<p class=\\\"text-white text-center\\\">\")\n .append(this.getDescription())\n .append(\"</p>\")\n .append(\"<hr class=\\\"hr-1 bg-white\\\"/>\")\n .append(\"<h6 class=\\\"text-center text-white mb-3\\\">$\" + this.getPrice() + \"</h6>\")\n .append(\"</div>\")\n .append(\"</a>\")\n ).toString();\n }", "@Override\r\n\tpublic String executa(HttpServletRequest req, HttpServletResponse res) throws Exception {\n\t\treturn \"view/home.html\";\r\n\t}", "public void homeButtonClicked(ActionEvent event) throws IOException {\n Parent homeParent = FXMLLoader.load(getClass().getResource(\"Home.fxml\"));\n Scene homeScene = new Scene(homeParent, 1800, 700);\n\n //gets stage information\n Stage window = (Stage) ((Node) event.getSource()).getScene().getWindow();\n window.setTitle(\"Home Page\");\n window.setScene(homeScene);\n window.show();\n }", "public void returnHome(View view) {\n Intent intent = new Intent(GameDetailsActivity.this, HomeActivity.class);\n startActivity(intent);\n }", "public String getHomeClassName()\n {\n if (_homeClass != null)\n return _homeClass.getName();\n else\n return getAPIClassName();\n }", "@RequestMapping(\"/\")\n\t public String index(Model model){\n\t return \"homepage\";\n\t }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n\tpublic String home(Model model) {\n\t\t// logger.info(\"Welcome home! The client locale is {}.\", locale);\n\t\treturn \"home\";\n\t}", "@RequestMapping(\"/\")\n\tpublic String welcomeHandler() {\n\n\t\tString viewName = \"welcome\";\n\t\tlogger.info(\"welcomeHandler(): viewName[\" + viewName + \"]\");\n\t\treturn viewName;\n\t}", "protected String getHomePageTitle() { \n return null; \n }", "public String home()\n\t{\n\t\treturn SUCCESS;\n\t}", "@RequestMapping(value=\"/loginForm\", method = RequestMethod.GET)\n\tpublic String home(){\n\n\t\treturn \"loginForm\";\n\t}", "protected void callHome() {\n\t\tIntent intent = new Intent(this, AdminHome.class);\r\n\t\tstartActivity(intent);\r\n\t}", "@RequestMapping(value = {\"/\", \"/home\"}, method = RequestMethod.GET)\n public ModelAndView goToHome(Model m) {\n \tModelAndView mav = new ModelAndView(\"home\");\n \treturn mav;\n }", "public static void selectedHomeScreen(Activity context) {\n\n // Get tracker\n Tracker tracker = ((GlobalEntity) context.getApplicationContext())\n .getTracker(TrackerName.APP_TRACKER);\n if (tracker == null) {\n return;\n }\n\n // Build and send an Event\n tracker.send(new HitBuilders.EventBuilder()\n .setCategory(\"Selected Home Screen\")\n .setAction(\"homeScreenSelect\")\n .setLabel(\n \"homeScreenSelect: \"\n + NavDrawerHomeScreenPreferences\n .getUserHomeScreenChoice(context))\n .build());\n }", "@Override\n\tpublic int getLayoutId() {\n\t\treturn R.layout.fragment_home;\n\t}", "View getActiveView();", "void showHome() {\n\t\tsetContentView(R.layout.home);\r\n\t\tView homeView = findViewById(R.id.home_image);\r\n\t\thomeView.setOnClickListener(new View.OnClickListener() {\r\n\t\t public void onClick(View v) {\r\n\t\t \tstartGame();\r\n\t\t }\r\n\t\t});\r\n\t}", "public void home() {\n\t\tUserUI ui = new UserUI();\n\t\tui.start();\n\t}", "private void navigateToDefaultView() {\n\t\tif (navigator!=null && \"\".equals(navigator.getState())) {\n\t\t\t// TODO: switch the view to the \"dashboard\" view\n\t\t}\n\t}", "@GetMapping(\"/homePage\")\n public String homePage(final Model model) {\n LOGGER.debug(\"method homePage was invoked\");\n model.addAttribute(\"listCarMakes\", carMakeProvider.getCarMakes());\n return \"homepage\";\n }", "@RequestMapping(method = RequestMethod.GET)\r\n public String home(ModelMap model) throws Exception\r\n {\t\t\r\n return \"Home\";\r\n }", "@FXML\r\n private void goHomeScreen(ActionEvent event) {\n Stage stage = (Stage) mainGridPane.getScene().getWindow();\r\n\r\n //load up WelcomeScene FXML document\r\n Parent root = null;\r\n try {\r\n root = FXMLLoader.load(getClass().getResource(\"WelcomeChipScene.fxml\"));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n Scene scene = new Scene(root, 1024, 720);\r\n stage.setTitle(\"Restaurant Reservation System\");\r\n stage.setScene(scene);\r\n stage.show();\r\n }", "public void goHome(View view) {\n String toastString = \"go home...\";\n Toast.makeText(FriendsList.this,toastString, Toast.LENGTH_SHORT).show();\n\n //TODO\n // go to list screen....\n Intent goToNextScreen = new Intent (this, AccountAccess.class);\n final int result = 1;\n startActivity(goToNextScreen);\n }", "public void switchToHomeScreen() {\n Intent startMain = new Intent(Intent.ACTION_MAIN);\n startMain.addCategory(Intent.CATEGORY_HOME);\n startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(startMain);\n }", "public URI getHome() {\n return this.homeSpace;\n }", "public final String getViewName() {\n\t\treturn viewName;\n\t}", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\r\n\tpublic String index(Model model) {\r\n\r\n\t\treturn \"home\";\r\n\t}", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"HomeView Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }", "protected Object getHome()\r\n/* 75: */ throws NamingException\r\n/* 76: */ {\r\n/* 77:159 */ if ((!this.cacheHome) || ((this.lookupHomeOnStartup) && (!isHomeRefreshable()))) {\r\n/* 78:160 */ return this.cachedHome != null ? this.cachedHome : lookup();\r\n/* 79: */ }\r\n/* 80:163 */ synchronized (this.homeMonitor)\r\n/* 81: */ {\r\n/* 82:164 */ if (this.cachedHome == null)\r\n/* 83: */ {\r\n/* 84:165 */ this.cachedHome = lookup();\r\n/* 85:166 */ this.createMethod = getCreateMethod(this.cachedHome);\r\n/* 86: */ }\r\n/* 87:168 */ return this.cachedHome;\r\n/* 88: */ }\r\n/* 89: */ }", "public void launchHomePage() {\n Intent intent = new Intent(LoginActivity.this, HomeActivity.class);\n startActivity(intent);\n }", "public abstract String getView();", "@RequestMapping(value = \"/home\", method = RequestMethod.GET)\n\tpublic String openhomePage() {\n/*\t\tlogger.debug(\"Inside Instruction page\");\n*/\t\treturn \"home\";\n\t}", "private Home getHome(final Context ctx)\r\n {\r\n return (Home) ctx.get(this.homeKey_);\r\n }", "protected String getView() {\r\n/* 216 */ return \"/jsp/RoomView.jsp\";\r\n/* */ }", "@RequestMapping(value = \"/\", method = RequestMethod.GET)\n public String home(Locale locale, Model model)\n {\n System.out.println(\"Home \" + service.getName());\n model.addAttribute(\"name\", service.getName());\n return \"home\";\n }", "public String getView(String viewName) {\n\t\t\n\t\treturn prefix + viewName + suffix;\n\t}", "@Override\n public int getLayout() {\n return R.layout.activity_home;\n }", "private void CallHomePage() {\n\t\t\n\t\tfr = new FragmentCategories();\n\t\tFragmentManager fm = getFragmentManager();\n\t\tFragmentTransaction fragmentTransaction = fm.beginTransaction();\n\t\tfragmentTransaction.replace(R.id.fragment_place, fr);\n\t\tfragmentTransaction.addToBackStack(null);\n\t\tfragmentTransaction.commit();\n\n\t}", "@Override\r\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\r\n\t}", "public java.lang.String getViewName() {\r\n return viewName;\r\n }", "public String toWelcome() {\r\n\t\treturn \"/secured/fragenpool.xhtml\";\r\n\t}", "@Test\n public void testHome() {\n GenericServiceMockup<Person> personService = new GenericServiceMockup<Person>();\n homeController.setPrivilegeEvaluator(mockup);\n homeController.setPersonBean(personService);\n ModelAndView result = homeController.home();\n assertEquals(\"Wrong view name for exception page\", HomeController.HOME_VIEW, result.getViewName());\n }", "public String getViewName() {\n return viewName;\n }", "@Override\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\n\t}", "@Override\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\n\t}", "public String getView();", "public String getView();", "public String getViewName() {\n return viewName;\n }", "public void goTo(View view) {\n if (stage != null) {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"../ui/\" + view.toString() + \".fxml\"));\n stage.setTitle(APP_NAME);\n stage.setScene(new Scene(root, APP_WIDTH, APP_HEIGHT));\n stage.show();\n } catch (IOException e) {\n System.err.println(\"The view \" + \"../ui/\" + view.toString() + \".fxml\" + \" doesn't exist.\");\n e.printStackTrace();\n }\n }\n }", "public void goToHome() {\n navController.navigate(R.id.nav_home);\n }", "@RequestMapping(value= {\"/flight-home\",\"/\"})\n\tpublic ModelAndView flightSearchPage() {\n\t\treturn new ModelAndView (\"home\");\n\t}", "public void homeButtonClicked(ActionEvent event) throws IOException {\n\t\tSystem.out.println(\"Loading Home...\");\n\t\tAnchorPane pane = FXMLLoader.load(getClass().getResource(\"HomeFXML.fxml\"));\n\t\trootPane.getChildren().setAll(pane);\n\t\t\n\t}", "public Home clickonHome()\n\t{\n\t\tdriver.findElement(By.xpath(home_xpath)).click();\n\t\treturn new Home(driver);\n\t}", "private void openHome() {\n Intent intent = new Intent(this, WelcomeActivity.class);\n startActivity(intent);\n\n finish();\n }" ]
[ "0.6819594", "0.6264309", "0.62159723", "0.6201521", "0.6198399", "0.6187909", "0.6151758", "0.61228037", "0.6120205", "0.610317", "0.60107136", "0.6008739", "0.59784985", "0.5976386", "0.5941382", "0.59348583", "0.59226644", "0.5905844", "0.5904103", "0.5879214", "0.5858803", "0.58093745", "0.58088934", "0.58026075", "0.58003354", "0.5759494", "0.57517624", "0.57493037", "0.5748849", "0.57280064", "0.57250947", "0.57216734", "0.5719073", "0.56983334", "0.56963545", "0.5685644", "0.5685627", "0.5683984", "0.5681187", "0.5669517", "0.5662236", "0.5645227", "0.5640115", "0.56249446", "0.5612721", "0.5611999", "0.55943364", "0.55814797", "0.5561007", "0.55594087", "0.5550495", "0.5544936", "0.55445933", "0.55443245", "0.55355054", "0.5526398", "0.55179465", "0.55168974", "0.5513729", "0.5512892", "0.5507205", "0.5505189", "0.5502731", "0.55011755", "0.5491711", "0.54783314", "0.5471381", "0.5460273", "0.5460181", "0.5450608", "0.5436762", "0.54353005", "0.5433689", "0.5418436", "0.5417458", "0.5413596", "0.5406757", "0.54058254", "0.5404544", "0.54036623", "0.53972876", "0.53965867", "0.53835505", "0.53798014", "0.5379446", "0.53599346", "0.5342699", "0.534211", "0.5333958", "0.53252655", "0.5321729", "0.5321729", "0.5320508", "0.5320508", "0.53190213", "0.5314257", "0.5313289", "0.5304765", "0.5302871", "0.5300623", "0.52957004" ]
0.0
-1
date d'embauche CONSTRUCTEURS Construit un employe avec le nom NOM_BIDON et une date d'embauche le 1er janvier 0.
public Employe () { this ( NOM_BIDON, null ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Employe (String leNom, Date laDate) {\n if ( leNom == null ) {\n nom = NOM_BIDON;\n } else {\n nom = leNom;\n }\n if ( laDate == null ) {\n dateEmbauche = new Date(); // 1er janvier 0\n } else {\n dateEmbauche = laDate.copie();\n }\n }", "private void affichageDateFin() {\r\n\t\tif (dateFinComptage!=null){\r\n\t\t\tSystem.out.println(\"Le comptage est clos depuis le \"+ DateUtils.format(dateFinComptage));\r\n\t\t\tif (nbElements==0){\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos mais n'a pas d'éléments. Le comptage est en anomalie.\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos et est OK.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Le compte est actif.\");\r\n\t\t}\r\n\t}", "public Employe(String leNom, Date laDate) {\r\n if (leNom == null) {\r\n nom = NOM_BIDON;\r\n } else {\r\n nom = leNom;\r\n }\r\n \r\n if (laDate == null) {\r\n dateEmbauche = new Date(); // 1er janvier 0\r\n } else {\r\n dateEmbauche = laDate.copie();\r\n }\r\n }", "public void enviarConviteExame(LocalDate dataExame) {\n }", "public DocumentVente(String code, Date date, Tier fornisseur, Date datecommande, String codefourni) {\n this.code = code;\n this.date = date;\n this.client = fornisseur;\n this.datecommande = datecommande;\n this.codeclient = codefourni;\n// this.lieu = emplacement;\n \n }", "public void setFechaCompra() {\n LocalDate fecha=LocalDate.now();\n this.fechaCompra = fecha;\n }", "public Date getDateDembauche() {\r\n return dateEmbauche.copie();\r\n }", "public Date getBDate(){\n \treturn bDate;\n }", "public void setDateFinContrat(Date dateFinContrat) {\r\n this.dateFinContrat = dateFinContrat;\r\n }", "public Date getaBrithdate() {\n return aBrithdate;\n }", "public Employe ( Employe unEmploye ) {\n nom = unEmploye.nom;\n dateEmbauche = unEmploye.dateEmbauche.copie();\n }", "private void fechaActual() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat sm = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\t// Formateo de Fecha para mostrar en la vista - (String)\r\n\t\tsetFechaCreacion(sm.format(date.getTime()));\r\n\t\t// Formateo de Fecha campo db - (Date)\r\n\t\ttry {\r\n\t\t\tnewEntidad.setFechaCreacion(sm.parse(getFechaCreacion()));\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t;\r\n\t}", "private String getFechaLab(int intCodEmp, int intCodLoc){\n String strFecha=\"\"; \n java.sql.Connection conLoc;\n try{\n conLoc=DriverManager.getConnection(objParSis.getStringConexion(),objParSis.getUsuarioBaseDatos(),objParSis.getClaveBaseDatos());\n if(conLoc!=null){\n java.sql.Statement stmLoc = conLoc.createStatement();\n strSql=\"\";\n strSql+=\" SELECT a1.* \";\n strSql+=\" FROM tbm_calCiu as a1 \";\n strSql+=\" INNER JOIN tbm_loc as a2 ON (a1.co_ciu=a2.co_ciu) \";\n strSql+=\" WHERE a2.co_emp=\"+intCodEmp+\" and co_loc=\"+intCodLoc+\" AND CASE WHEN EXTRACT(MONTH from CURRENT_DATE)=12 THEN \";\n strSql+=\" (EXTRACT(YEAR from CURRENT_DATE)+1)=EXTRACT(YEAR from a1.fe_Dia) AND /*MES ENERO JM*/1=EXTRACT(MONTH from a1.fe_Dia) ELSE \";\n strSql+=\" EXTRACT(YEAR from CURRENT_DATE)=EXTRACT(YEAR from a1.fe_Dia) AND (EXTRACT(MONTH from CURRENT_DATE)+1)=EXTRACT(MONTH from a1.fe_Dia) END AND a1.tx_tipDia='L' \";\n strSql+=\" ORDER BY a1.fe_dia ASC\t\";\n strSql+=\" LIMIT 1\";\n \tjava.sql.ResultSet rstLoc = stmLoc.executeQuery(strSql);\n if(rstLoc.next()){\n //System.out.println(\"fecha \" + rstLoc.getString(\"fe_dia\"));\n strFecha=objUti.formatearFecha(rstLoc.getString(\"fe_dia\"), \"yyyy-MM-dd\",\"dd/MM/yyyy\" );\n //System.out.println(\"strFecha \" + strFecha);\n }\n rstLoc.close();\n rstLoc=null;\n stmLoc.close();\n stmLoc=null;\n }\n conLoc.close();\n conLoc=null;\n }\n catch (java.sql.SQLException e){\n objUti.mostrarMsgErr_F1(this, e);\n }\n catch (Exception e){\n objUti.mostrarMsgErr_F1(this, e);\n }\n return strFecha;\n }", "public Date getCommencDate() {\n return commencDate;\n }", "@Override\r\n public BoletoLocal onGerarBoleto(Contrato contrato, ConfiguracoesBoleto config) {\r\n int diaVencimento = contrato.getDiaVencimento();\r\n Calendar dataHj = Calendar.getInstance();\r\n\r\n //SE O DIA DO VENCIMENTO DO BOLETO FOR MENOR OU IGUAL\r\n // A DATA DE HJ GERA NORMAL, SE NÃO ELE GERA PRO PROXIMO MES\r\n if (dataHj.get(Calendar.DAY_OF_MONTH) <= diaVencimento) {\r\n\r\n } else {\r\n dataHj.add(Calendar.MONTH, 1);\r\n }\r\n\r\n dataHj.set(Calendar.DAY_OF_MONTH, diaVencimento);\r\n Calendar dataMaxima = Calendar.getInstance();\r\n dataMaxima.add(Calendar.DAY_OF_MONTH, 20);\r\n\r\n //SE A DATA FOR MAIOS QUE O MÁXIMO CONFIGURADO NÃO GERA NADA.\r\n if (dataHj.after(dataMaxima)) {\r\n System.out.println(\"data depois de 20 dias\");\r\n return null;\r\n }\r\n\r\n\r\n /*\r\n\t\t * INFORMANDO DADOS SOBRE O CEDENTE.\r\n */\r\n Cedente cedente = new Cedente(config.getBanco().getNomeBeneficiado(), config.getDocBeneficiado());\r\n\r\n /*\r\n\t\t * INFORMANDO DADOS SOBRE O SACADO.\r\n */\r\n Sacado sacado = new Sacado(contrato.getLocatario().getNome(), contrato.getLocatario().getDocumento());\r\n\r\n // Informando o endereço do sacado.\r\n org.jrimum.domkee.comum.pessoa.endereco.Endereco enderecoSac = new org.jrimum.domkee.comum.pessoa.endereco.Endereco();\r\n enderecoSac.setUF(UnidadeFederativa.valueOfSigla(contrato.getLocatario().getEndereco().getCodUf()));\r\n enderecoSac.setLocalidade(contrato.getLocatario().getEndereco().getCidade());\r\n enderecoSac.setCep(new CEP(contrato.getLocatario().getEndereco().getDesCep()));\r\n enderecoSac.setBairro(contrato.getLocatario().getEndereco().getDesBairro());\r\n enderecoSac.setLogradouro(contrato.getLocatario().getEndereco().getDesLogradouro());\r\n enderecoSac.setNumero(contrato.getLocatario().getEndereco().getDesNumero());\r\n sacado.addEndereco(enderecoSac);\r\n\r\n /*\r\n\t\t * INFORMANDO OS DADOS SOBRE O TÍTULO.\r\n */\r\n // Informando dados sobre a conta bancária do título.\r\n ContaBancaria contaBancaria = null;\r\n if (config.getBanco().getBanco() == BancosEnum.ITAU) {\r\n contaBancaria = new ContaBancaria(BancosSuportados.BANCO_ITAU.create());\r\n }\r\n\r\n if (contaBancaria == null) {\r\n System.out.println(\"Conta bancária não cadastrada\");\r\n return null;\r\n }\r\n\r\n contaBancaria.setNumeroDaConta(new NumeroDaConta(Integer.parseInt(config.getBanco().getContaNumero()), config.getBanco().getContaDigito()));\r\n contaBancaria.setCarteira(new Carteira(Integer.parseInt(config.getCarteira())));\r\n contaBancaria.setAgencia(new Agencia(Integer.parseInt(config.getBanco().getAgenciaNumero()), config.getBanco().getAgenciaDigito()));\r\n\r\n Titulo titulo = new Titulo(contaBancaria, sacado, cedente);\r\n titulo.setNumeroDoDocumento(config.getNumeroDocumento());\r\n titulo.setNossoNumero(config.getNossoNumero());\r\n titulo.setDigitoDoNossoNumero(config.getNossoNumeroDigito());\r\n titulo.setValor(contrato.getValor());\r\n titulo.setDataDoDocumento(new Date());\r\n\r\n titulo.setDataDoVencimento(dataHj.getTime());\r\n titulo.setTipoDeDocumento(TipoDeTitulo.DM_DUPLICATA_MERCANTIL);\r\n titulo.setAceite(Aceite.A);\r\n//\t\ttitulo.setDesconto(BigDecimal.ZERO);\r\n//\t\ttitulo.setDeducao(BigDecimal.ZERO);\r\n//\t\ttitulo.setMora(BigDecimal.ZERO);\r\n//\t\ttitulo.setAcrecimo(BigDecimal.ZERO);\r\n//\t\ttitulo.setValorCobrado(BigDecimal.ZERO);\r\n\r\n /*\r\n\t\t * INFORMANDO OS DADOS SOBRE O BOLETO.\r\n */\r\n Boleto boletoBank = new Boleto(titulo);\r\n\r\n boletoBank.setLocalPagamento(config.getLocalPagamento());\r\n boletoBank.setInstrucaoAoSacado(config.getInstrucaoSacado());\r\n boletoBank.setInstrucao1(config.getInstrucao1());\r\n boletoBank.setInstrucao2(config.getInstrucao2());\r\n boletoBank.setInstrucao3(config.getInstrucao3());\r\n boletoBank.setInstrucao4(config.getInstrucao4());\r\n boletoBank.setInstrucao5(config.getInstrucao5());\r\n boletoBank.setInstrucao6(config.getInstrucao6());\r\n boletoBank.setInstrucao7(config.getInstrucao7());\r\n boletoBank.setInstrucao8(config.getInstrucao8());\r\n\r\n /*\r\n\t\t * GERANDO O BOLETO BANCÁRIO.\r\n */\r\n // Instanciando um objeto \"BoletoViewer\", classe responsável pela\r\n // geração do boleto bancário.\r\n BoletoViewer boletoViewer = new BoletoViewer(boletoBank);\r\n\r\n // Alterado para pegar o path do sistema automático , gerando dentro\r\n // do projeto.\r\n // Gerando o arquivo. No caso o arquivo mencionado será salvo na mesma\r\n // pasta do projeto. Outros exemplos:\r\n // WINDOWS: boletoViewer.getAsPDF(\"C:/Temp/MeuBoleto.pdf\");\r\n // LINUX: boletoViewer.getAsPDF(\"/home/temp/MeuBoleto.pdf\");\r\n String pasta = \"/boletos\";\r\n\r\n String caminhoCompletoPasta = FacesUtil.getExternalContext().getRealPath(pasta) + \"/\";\r\n BoletoLocal boletoLocal = new BoletoLocal();\r\n contrato.getBoletos().add(boletoLocal);\r\n boletoLocal.setContrato(contrato);\r\n\r\n String nomeArquivoPDF = contrato.getLocatario().getNome().replace(\" \", \"_\") + boletoLocal.getMes() + boletoLocal.getAno() + \".pdf\";\r\n\r\n System.out.println(caminhoCompletoPasta + nomeArquivoPDF);\r\n File arquivoPdf = boletoViewer.getPdfAsFile(caminhoCompletoPasta + nomeArquivoPDF);\r\n\r\n boletoLocal.setPath(pasta + nomeArquivoPDF);\r\n\r\n super.save(boletoLocal);\r\n\r\n return boletoLocal;\r\n }", "public void setCommencDate(Date commencDate) {\n this.commencDate = commencDate;\n }", "public void updateBDate() {\n bDate = new Date();\n }", "public Date getDateDembauche () {\n return dateEmbauche.copie();\n }", "public java.sql.Date getDatebldbeg() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.sql.Date) __getCache(\"datebldbeg\")));\n }", "public abstract java.lang.String getFecha_inicio();", "public void setaBrithdate(Date aBrithdate) {\n this.aBrithdate = aBrithdate;\n }", "public Date getCHEQUE_DATE() {\r\n return CHEQUE_DATE;\r\n }", "public void setCHEQUE_DATE(Date CHEQUE_DATE) {\r\n this.CHEQUE_DATE = CHEQUE_DATE;\r\n }", "public Date getDateEmbauche() {\r\n return dateEmbauche;\r\n }", "public Date getDateFinContrat() {\r\n return dateFinContrat;\r\n }", "public void fechahoy(){\n Date fecha = new Date();\n \n Calendar c1 = Calendar.getInstance();\n Calendar c2 = new GregorianCalendar();\n \n String dia = Integer.toString(c1.get(Calendar.DATE));\n String mes = Integer.toString(c2.get(Calendar.MONTH));\n int mm = Integer.parseInt(mes);\n int nmes = mm +1;\n String memes = String.valueOf(nmes);\n if (nmes < 10) {\n memes = \"0\"+memes;\n }\n String anio = Integer.toString(c1.get(Calendar.YEAR));\n \n String fechoy = anio+\"-\"+memes+\"-\"+dia;\n \n txtFecha.setText(fechoy);\n \n }", "public Date getDataConsegna() {\n\t\t\treturn dataConsegna;\n\t\t}", "public Date getDob() {\n return dob;\n }", "public Employe(Employe unEmploye) {\r\n nom = unEmploye.nom;\r\n dateEmbauche = unEmploye.dateEmbauche.copie();\r\n }", "public void setDateEmbauche(Date dateEmbauche) {\r\n this.dateEmbauche = dateEmbauche;\r\n }", "public void dataPadrao() {\n Calendar c = Calendar.getInstance();\n SimpleDateFormat s = new SimpleDateFormat(\"dd/MM/yyyy\");\n String dataAtual = s.format(c.getTime());\n c.add(c.MONTH, 1);\n String dataAtualMaisUm = s.format(c.getTime());\n dataInicial.setText(dataAtual);\n dataFinal.setText(dataAtualMaisUm);\n }", "private void procurarData() {\n if (jDateIni.getDate() != null && jDateFim.getDate() != null) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n String data = sdf.format(jDateIni.getDate());\n String data2 = sdf.format(jDateFim.getDate());\n carregaTable(id, data, data2);\n JBreg.setEnabled(false);\n }\n }", "public void setDateDembauche(Date nouvelleDate) {\r\n if (nouvelleDate == null) {\r\n dateEmbauche = new Date();\r\n \r\n } else {\r\n dateEmbauche = nouvelleDate.copie();\r\n }\r\n }", "Date getFechaNacimiento();", "public Date getFechaInclusion()\r\n/* 150: */ {\r\n/* 151:170 */ return this.fechaInclusion;\r\n/* 152: */ }", "public void setDateDembauche( Date nouvelleDate ) {\n if ( nouvelleDate == null ) {\n dateEmbauche = new Date();\n } else {\n dateEmbauche = nouvelleDate.copie();\n }\n }", "public static void main(String[] args) throws ParseException {\t\t\n\t int mes, ano, diaDaSemana, primeiroDiaDoMes, numeroDeSemana = 1;\n\t Date data;\n\t \n\t //Converter texto em data e data em texto\n\t SimpleDateFormat sdf\t = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t //Prover o calendario\n\t GregorianCalendar gc\t = new GregorianCalendar();\n\t \n\t String mesesCalendario[] = new String[12];\n\t\tString mesesNome[]\t\t = {\"Janeiro\", \"Fevereiro\", \"Marco\", \"Abri\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"};\n\t\tint mesesDia[]\t\t\t = {31,28,31,30,31,30,31,31,30,31,30,31};\n\t\t\n\t\t//Errado? e pra receber apenas o \"dia da semana\" do \"primeiro dia do mes\" na questao\n\t //Recebendo mes e ano\n\t mes = Entrada.Int(\"Digite o mes:\", \"Entrada de dados\");\n\t ano = Entrada.Int(\"Digite o ano:\", \"Entrada de dados\");\n\t \n\t //Errado? e pra ser o dia inicial do mes na questao\n\t // Dia inicial do ano\n data = sdf.parse(\"01/01/\" + ano);\n gc.setTime(data);\n diaDaSemana = gc.get(GregorianCalendar.DAY_OF_WEEK);\n \n //Nao sei se e necessario por causa da questao\n //*Alteracao feita||| Ano bissexto tem +1 dia em fevereiro\n if(ano % 4 == 0) {\n \tmesesDia[1] = 29;\n \tmesesNome[1] = \"Ano Bissexto - Fevereiro\";\n }\n \n \n //Meses \n for(int mesAtual = 0; mesAtual < 12; mesAtual++) {\n\t int diasDoMes\t= 0;\n\t String nomeMesAtual = \"\";\n\n\n\t nomeMesAtual = mesesNome[mesAtual]; \n diasDoMes\t = mesesDia[mesAtual]; \n\n\n mesesCalendario[mesAtual] = \"\\n \" + nomeMesAtual + \" de \" + ano + \"\\n\";\n mesesCalendario[mesAtual] += \"---------------------------------------------------------------------|\\n\";\n mesesCalendario[mesAtual] += \" Dom Seg Ter Qua Qui Sex Sab | Semanas\\n\";\n mesesCalendario[mesAtual] += \"---------------------------------------------------------------------|\\n \";\n\t\n\t \n\t // Primeira semana comeca em\n\t data = sdf.parse( \"01/\" + (mesAtual+1) + \"/\" + ano );\n gc.setTime(data);\n primeiroDiaDoMes = gc.get(GregorianCalendar.DAY_OF_WEEK);\n\t for (int space = 1; space < primeiroDiaDoMes; space++) {\n\t \tmesesCalendario[mesAtual] += \" \";\n\t }\n\t \n\t //Dias\t \n\t for (int diaAtual = 1; diaAtual <= diasDoMes; diaAtual++)\n\t {\n\t \t// Trata espaco do dia\n\t \t\t//Transforma o diaAtuel em String\n\t String diaTratado = Integer.toString(diaAtual);\n\t if (diaTratado.length() == 1)\n\t \tdiaTratado = \" \" + diaAtual + \" \";\n\t else\n\t \tdiaTratado = \" \" + diaAtual + \" \";\n\t \n\t // dia\n\t mesesCalendario[mesAtual] += diaTratado;\n\t \t\n\t \t// Pula Linha no final da semana\n\t data = sdf.parse( diaAtual + \"/\" + (mesAtual+1) + \"/\" + ano );\n\t gc.setTime(data);\n\t diaDaSemana = gc.get(GregorianCalendar.DAY_OF_WEEK);\n\t if (diaDaSemana == 7) {\n\t \tmesesCalendario[mesAtual] += (\"| \" + numeroDeSemana++);\n\t \tmesesCalendario[mesAtual] += \"\\n |\";\n\t \tmesesCalendario[mesAtual] += \"\\n \";\n\t }\n\t }\n\t mesesCalendario[mesAtual] += \"\\n\\n\\n\\n\";\n\t }\n\t \n //Imprime mes desejado\n\t System.out.println(mesesCalendario[mes-1]);\n\n\t}", "public static void changeVeryFirstDob(AndroidDriver<WebElement> driver,String date,String month,String year)\t\t\t\n\t{\t\n\t\tchange_date_PO DOB = new change_date_PO(driver);\n\t\tmy_Zodiac_PO my_Zodiac_PO=new my_Zodiac_PO(driver);\n\t\tmy_Zodiac_PO.veryFirstDD().sendKeys(date);\n\t\tmy_Zodiac_PO.veryFirstMM().sendKeys(month);\n\t\tmy_Zodiac_PO.veryFirstYYYY().sendKeys(year);\n\t\tbackButton(driver);\n\t\tmy_Zodiac_PO.Save_myZodiac.click();\n\t}", "public void setDataConsegna(Date dataConsegna) {\n\t\t\tthis.dataConsegna = dataConsegna;\n\t\t}", "public Installation InstallationOrgane(String Obs, java.sql.Date date, int numtechnicien,int numbatiment,Organe O)\n\t\t\tthrows TechnicienInconnuException, BatimentInconnuException, EntrepriseInconnueException {\n\t\tTechnicien T = rechercheTechniciennum(numtechnicien);\n\t\tBatiment B = rechercheBatimentnum(numbatiment);\n\t\tInstallation Inst = new Installation();\n\t\tInst.setDate(date);\n\t\tInst.setObservation(Obs);\n\t\tInst.setOrgane(O);\n\t\tInst.setTechnicien(T);\n\t\treturn Inst;\n\t}", "public Components(String item_name,String serial_no, double maint_cost,double maint_interval,String maint_date){\n this.item_name=item_name;\n this.serial_no=serial_no;\n this.maint_cost=maint_cost;\n this.maint_interval=maint_interval;\n try{\n Date date1 = new SimpleDateFormat(\"dd/MM/yyyy\").parse(maint_date);\n this.maint_date = date1;\n }\n catch (Exception e){\n System.out.println(\"Invalid date format\");\n }\n }", "public Date getEFF_DATE() {\r\n return EFF_DATE;\r\n }", "public void creaAddebiti(Date dataInizio, Date dataFine, ArrayList<Integer> codiciConto) {\n /* variabili e costanti locali di lavoro */\n boolean continua;\n Date dataCorr;\n Modulo modulo;\n Navigatore nav;\n ProgressBar pb;\n OpAddebiti operazione;\n\n try { // prova ad eseguire il codice\n\n /* controllo di sicurezza che le date siano in sequenza */\n continua = Lib.Data.isSequenza(dataInizio, dataFine);\n\n /* esecuzione operazione */\n if (continua) {\n modulo = Albergo.Moduli.Conto();\n nav = modulo.getNavigatoreCorrente();\n pb = nav.getProgressBar();\n operazione = new OpAddebiti(pb, dataInizio, dataFine, codiciConto);\n operazione.avvia();\n }// fine del blocco if\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public void setEFF_DATE(Date EFF_DATE) {\r\n this.EFF_DATE = EFF_DATE;\r\n }", "public Empleados(String nom, double sue,int agno,int mes,int dia) {\r\n\t\t\r\n\t\tnombre=nom;\r\n\t\tsueldo=sue;\r\n\t\tGregorianCalendar calendario=new GregorianCalendar(agno,mes-1,dia);\r\n\t\taltaContrato=calendario.getTime();\r\n\t}", "public void setFechaconsulta(Date fechaconsulta) {\r\n this.fechaconsulta = fechaconsulta;\r\n }", "public static void main(String[] args) {\n\t\tBufferedReader inputDataReader = new BufferedReader(new InputStreamReader(System.in));\r\n\t\t// BufferedReader reader = new BufferedReader(System.in);\r\n\t\t// try catch문을 이용하여 예외처리를 한다.\r\n\t\t// 주소를 입력받는다.\r\n\t\ttry {\r\n\t\t\tSystem.out.print(\"[입력 -> YYYYMMDD] : \");\r\n\t\t\tString bibleDate = inputDataReader.readLine();\r\n\t\t\t// String YYYYMMDD = \"(19|20)\\\\d{2}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])\";\r\n\t\t\t// System.out.println(bibleDate == YYYYMMDD);\r\n\t\t\t// Pattern.compile(yyyyMMdd).matcher(bibleDate)\r\n\t\t\t// System.out.println(Pattern.compile(YYYYMMDD).matcher(bibleDate).matches());\r\n\t\t\t// if(Pattern.compile(YYYYMMDD).matcher(bibleDate).matches()) {\r\n\t\t\t\t/*\r\n\t\t\t\tSystem.out.println(bibleDate);\r\n\t\t\t\tSystem.out.println(bibleDate.substring(0, 4));\r\n\t\t\t\tSystem.out.println(bibleDate.substring(4, 6));\r\n\t\t\t\tSystem.out.println(bibleDate.substring(6, 8));\r\n\t\t\t\tSystem.out.println(bibleDate.substring(0, 4) + \"-\" + bibleDate.substring(4, 6) + \"-\" + bibleDate.substring(6, 8));\r\n\t\t\t\t*/\r\n\t\t\t\tString bible_date = bibleDate.substring(0, 4) + \"-\" + bibleDate.substring(4, 6) + \"-\" + bibleDate.substring(6, 8);\r\n\t\t\t\t// System.out.println(bible_date);\r\n\t\t\t\tString url = \"https://sum.su.or.kr:8888/bible/today/Ajax/Bible/BodyMatter?qt_ty=QT1&base_de=\" + bible_date + \"&bibleType=1\";\r\n\t\t\t\t// url = url + \"&base_de=\" + bibleDate + \"&bibleType=1\";\r\n\t\t\t\tDocument doc = null;\r\n\t\t\t\tdoc = Jsoup.connect(url).post();\r\n\t\t\t\tElement bible_text = doc.select(\".bible_text\").first();\r\n\t\t\t\tString bibleTextStr = bible_text.text();\r\n\t\t\t\tSystem.out.println(bibleTextStr);\r\n\t\t\t\tElement dailybible_info = doc.select(\"#dailybible_info\").first();\r\n\t\t\t\tString dailybibleInfoStr = dailybible_info.text();\r\n\t\t\t\tSystem.out.println(dailybibleInfoStr);\r\n\t\t\t\tElement bibleinfo_box = doc.select(\".bibleinfo_box\").first();\r\n\t\t\t\tString bibleinfoBoxStr = bibleinfo_box.text();\r\n\t\t\t\tSystem.out.println(bibleinfoBoxStr);\r\n\t\t\t\tElements bibleList = doc.select(\".body_list > li\");\r\n\t\t\t\t// System.out.println(\"bibleList => \\n \" + bibleList);\r\n\t\t\t\tfor(Element bibleElement : bibleList) {\r\n\t\t\t\t\tString num = bibleElement.select(\".num\").text();\r\n\t\t\t\t\tString info = bibleElement.select(\".info\").text();\r\n\t\t\t\t\tSystem.out.println(num + \" : \" + info);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// audio(.mp3) 파일을 가져오는 실습\r\n\t\t\t\tElement audioSource = doc.select(\"audio>source\").first();\r\n\t\t\t\t// System.out.println(audioSource);\r\n\t\t\t\tString audioUrl = audioSource.attr(\"src\").trim();\r\n\t\t\t\t// System.out.println(audioUrl);\r\n\t\t\t\tString mp3FileName = audioUrl.substring(audioUrl.lastIndexOf(\"/\") + 1);\r\n\t\t\t\t// System.out.println(mp3FileName);\r\n\t\t\t\trunner(audioUrl, mp3FileName);\r\n\t\t\t\t/*\r\n\t\t\t\tRunnable r = new DownloadBroker(audioUrl , mp3FileName);\r\n\t\t\t\tThread dload = new Thread(r);\r\n\t\t\t\tdload.start();\r\n\t\t\t\tfor(int i = 0 ; i < 10 ; i++) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"\" + (i+1));\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(\"=======================================\");\r\n\t\t\t\t*/\r\n\t\t\t\t\r\n\t\t\t\t// image(.jpg) 파일을 가져오는 실습\r\n\t\t\t\tElement imgSource = doc.select(\".img>img\").first();\r\n\t\t\t\t// System.out.println(imgSource);\r\n\t\t\t\tString imgUrl = \"https://sum.su.or.kr:8888\" + imgSource.attr(\"src\").trim();\r\n\t\t\t\t// System.out.println(imgUrl);\r\n\t\t\t\tString jpgFileName = imgUrl.substring(imgUrl.lastIndexOf(\"/\") + 1);\r\n\t\t\t\t// System.out.println(jpgFileName);\r\n\t\t\t\trunner(imgUrl, jpgFileName);\r\n\t\t\t\t/*\r\n\t\t\t\tRunnable r = new DownloadBroker(imgUrl , jpgFileName);\r\n\t\t\t\tThread dload = new Thread(r);\r\n\t\t\t\tdload.start();\r\n\t\t\t\tfor(int i = 0 ; i < 10 ; i++) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"\" + (i+1));\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t\tSystem.out.println(\"=======================================\");\r\n\t\t\t\t*/\r\n\t\t\t// }\r\n\t\t\t// else {\r\n\t\t\t\t// System.out.println(\"[YYYYMMDD] 형식으로 입력하지 않았습니다.\\n다시 입력해 주세요.\");\r\n\t\t\t\t// return;\r\n\t\t\t// }\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t/*\r\n\t\t //이전\r\n function SelectPrevious(tab) {\r\n $.ajax({\r\n type: 'POST',\r\n contentType: \"application/json; charset=utf-8\",\r\n url: \"/Ajax/Bible/BodyMatter\",\r\n //data: \"{ 'qt_ty' : '\" + $(\"#qt_ty\").val() + \"' , 'Base_de' : '\" + $(\"#base_de\").val() + \"'}\",\r\n data: \"{ 'qt_ty' : '\" + $(\"#qt_ty\").val() + \"' ,'SearchTxt1' : 'pre' , 'Base_de' : '\" + $(\"#base_de\").val() + \"'}\",\r\n\t\t */\r\n\t\t// <input name=\"qt_ty\" id=\"qt_ty\" type=\"hidden\" value=\"QT1\">\r\n\t\t// <input name=\"base_de\" id=\"base_de\" type=\"hidden\" value=\"2020-11-22\">\r\n\t\t// <input name=\"bibleType\" id=\"bibleType\" type=\"hidden\" value=\"1\">\r\n\t\t\r\n\t\t/*\r\n\t\tString url = \"https://sum.su.or.kr:8888/bible/today/Ajax/Bible/BodyMatter/qt_ty=QT1/base_de\" + ;\r\n\t\tDocument doc = null;\r\n\t\ttry {\r\n\t\t\tdoc = Jsoup.connect(url).post();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tElement bible_text = doc.select(\"bible_text\").first();\r\n\t\tSystem.out.println(bible_text);\r\n\t\t*/\r\n\t}", "public void setBegDate(java.lang.String value) {\n this.begDate = value;\n }", "public String getJP_AcctDate();", "Date getInvoicedDate();", "public java.sql.Date getDateassemb() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.sql.Date) __getCache(\"dateassemb\")));\n }", "public Date obterHrEnt1Turno(){\n \ttxtHrEnt1Turno.setEditable(true);\n txtHrSai1Turno.setEditable(false);\n txtHrEnt2Turno.setEditable(false);\n txtHrSai2Turno.setEditable(false);\n \ttxtHrEnt1TurnoExt.setEditable(false);\n txtHrSai1TurnoExt.setEditable(false);\n txtHrEnt2TurnoExt.setEditable(false);\n txtHrSai2TurnoExt.setEditable(false);\n\n return new Date();\n }", "private void inicializarFechaHora(){\n Calendar c = Calendar.getInstance();\r\n year1 = c.get(Calendar.YEAR);\r\n month1 = (c.get(Calendar.MONTH)+1);\r\n String mes1 = month1 < 10 ? \"0\"+month1 : \"\" +month1;\r\n String dia1 = \"01\";\r\n\r\n String date1 = \"\"+dia1+\"/\"+mes1+\"/\"+year1;\r\n txt_fecha_desde.setText(date1);\r\n\r\n\r\n day2 = c.getActualMaximum(Calendar.DAY_OF_MONTH) ;\r\n String date2 = \"\"+day2+\"/\"+mes1+\"/\"+ year1;\r\n\r\n Log.e(TAG,\"date2: \" + date2 );\r\n txt_fecha_hasta.setText(date2);\r\n\r\n }", "public mbvConsolidadoPeriodoAnteriores() {\r\n }", "public Date getBorndate() {\r\n return borndate;\r\n }", "public static void main(String[] args) {\n\t\tCalendar now = Calendar.getInstance();\r\n\t\tint hour = now.get(Calendar.HOUR_OF_DAY);\r\n\t\tint minute = now.get(Calendar.MINUTE);\r\n\t\tint month = now.get(Calendar.MONTH + 1);\r\n\t\tint day = now.get(Calendar.DAY_OF_MONTH);\r\n\t\tint year = now.get(Calendar.YEAR);\r\n\r\n\t\tSystem.out.println(now.getTime());\r\n\r\n\t\t// Crear una fecha fija\r\n\t\tCalendar sameDate = new GregorianCalendar(2010, Calendar.FEBRUARY, 22, 23, 11, 44);\r\n\r\n\t\t// mostrar los agradecimientos\r\n\t\tif (hour < 12)\r\n\t\t\tSystem.out.println(\"Buenos días. \\n\");\r\n\t\telse if (hour < 17)\r\n\t\t\tSystem.out.println(\"Buenas tardes. \\n\");\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Buenas noches charAt(\\n)\");\r\n\r\n\t\t// Mostrar minutos\r\n\t\tSystem.out.println(\"It is\");\r\n\t\tif (minute != 0) {\r\n\t\t\tSystem.out.print(\" \" + minute + \" \");\r\n\t\t\tSystem.out.print((minute != 1) ? \"minutes\" : \"minute\");\r\n\t\t\tSystem.out.print(\" past\");\r\n\t\t}\r\n\t\t// Mostrar la hora\r\n\t\tSystem.out.print(\" \");\r\n\t\tSystem.out.print((hour > 12) ? (hour - 12) : hour);\r\n\t\tSystem.out.print(\" o'clock on \\n\");\r\n\r\n\t\t// Mostrar el mes\r\n\r\n\t\tSystem.out.print(\"Estamos en el mes de: \");\r\n\t\tswitch (month) {\r\n\t\tcase 1:\r\n\t\t\tSystem.out.println(\"Enero\");\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tSystem.out.println(\"Febrero\");\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tSystem.out.println(\"Marzo\");\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tSystem.out.println(\"Abril\");\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tSystem.out.println(\"Mayo\");\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tSystem.out.println(\"Junio\");\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tSystem.out.println(\"Julio\");\r\n\t\t\tbreak;\r\n\t\tcase 8:\r\n\t\t\tSystem.out.println(\"Agosto\");\r\n\t\t\tbreak;\r\n\t\tcase 9:\r\n\t\t\tSystem.out.println(\"Septiembre\");\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tSystem.out.println(\"Octubre\");\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tSystem.out.println(\"Noviembre\");\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tSystem.out.println(\"Diciembre\");\r\n\r\n\t\t}\r\n\t}", "public abstract java.lang.String getFecha_termino();", "Date getNextIncomeDate() throws BankException {\n logger.warning(\"This account does not support this feature\");\n throw new BankException(\"This account does not support this feature\");\n }", "public void actualizarFechaComprobantes() {\r\n if (utilitario.isFechasValidas(cal_fecha_inicio.getFecha(), cal_fecha_fin.getFecha())) {\r\n tab_tabla1.setCondicion(\"fecha_trans_cnccc between '\" + cal_fecha_inicio.getFecha() + \"' and '\" + cal_fecha_fin.getFecha() + \"' and ide_cntcm=\" + com_tipo_comprobante.getValue());\r\n tab_tabla1.ejecutarSql();\r\n tab_tabla2.ejecutarValorForanea(tab_tabla1.getValorSeleccionado());\r\n utilitario.addUpdate(\"tab_tabla1,tab_tabla2\");\r\n calcularTotal();\r\n utilitario.addUpdate(\"gri_totales\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Rango de fechas no válidas\", \"\");\r\n }\r\n\r\n }", "List<Venta1> consultarVentaPorFecha(Date desde, Date hasta, Persona cliente) throws Exception;", "private void setDateButtonActionPerformed(java.awt.event.ActionEvent evt) {\n Date newDate = calendario.getDate();\n if(newDate != null) {\n java.sql.Date date = new java.sql.Date(newDate.getTime());\n control.setDate(date);\n control.crearAlerta(\"Informacion\", \"La fecha \" + date + \" ha sido agregada\" , this);\n } else {\n control.crearAlerta(\"Advertencia\", \"Debe escoger una fecha\", this);\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"dd-mm-yyyy\");\n\t\t\t\t\n\t\t\t\tDate DatumRodjenja = new Date();\n\t\t\t\ttry {\n\t\t\t\t\tDatumRodjenja = formatter.parse(txtFieldDatumRodjenja.getText());\n\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint brojIndeksa = Integer.parseInt(txtFieldBrIndeksa.getText());\n\t\t\t\t\n\t\t\t\t\tControllerStudenti.getInstance().izmeniStudenta(row, txtFieldBrIndeksa.getText(),txtFieldIme.getText(), txtFieldPrezime.getText(), DatumRodjenja, txtFieldAdresaStanovanja.getText(), \n\t\t\t\t\t\t\ttxtFieldBrTelefona.getText(), txtFieldEmail.getText(), (GodinaStudija.getSelectedItem()).toString(), \n\t\t\t\t\t\t\t(comboStatus.getSelectedItem()).toString(),txtFieldGodinaUpisa.getText());\n\t\t\t\t\t\n\t\t\t\t\t//TabStudent.getInstance().azurirajPrikaz();\n\t\t\t\t\t\n\t\t\t\t\tdispose();\n\t\t\t}", "@Override\n public Date getEffectiveDateForPerDiem(PerDiemExpense expense) {\n if (getTripBegin() == null) {\n return new java.sql.Date(getDocumentHeader().getWorkflowDocument().getDateCreated().getMillis());\n }\n return new java.sql.Date(getTripBegin().getTime());\n }", "@Override\n public void actionPerformed(ActionEvent evt) \n {\n Offre E2=new Offre(E.getId_etablissement(),C.getDate(),C2.getDate(),gui_Text_Field_2.getText(),gui_Text_Field_1.getText());\n OffreService service=new OffreService();\n if (E.getId_etablissement().getPartenaire()==0){\n E2.setCode(\"\");\n E2.setPourcentage(0);\n service.updateOffreSans(E, E2);\n \n }\n else {\n E2.setCode(gui_Text_Field_3.getText());\n \n E2.setPourcentage(Float.parseFloat(gui_Text_Field_4.getText()));\n service.updateOffreAvec(E, E2);\n }\n last.refreshTheme();\n last.show();\n \n }", "public void setDob(Date dob) {\n this.dob = dob;\n }", "private void creaAddebitiGiornoConto(Date data, int codConto) {\n /* variabili e costanti locali di lavoro */\n boolean continua;\n Filtro filtro;\n int[] interi;\n ArrayList<Integer> codici = null;\n Modulo modAddFisso;\n Modulo modConto;\n boolean chiuso;\n\n try { // prova ad eseguire il codice\n\n /* controllo se il conto e' aperto */\n modConto = Albergo.Moduli.Conto();\n chiuso = modConto.query().valoreBool(Conto.Cam.chiuso.get(), codConto);\n continua = (!chiuso);\n\n if (continua) {\n\n /* filtro che isola gli addebiti fissi da eseguire\n * per il giorno e il conto dati */\n filtro = this.getFiltroFissiGiornoConto(data, codConto);\n continua = filtro != null;\n\n /* crea elenco dei codici addebito fisso da elaborare */\n if (continua) {\n modAddFisso = Albergo.Moduli.AddebitoFisso();\n interi = modAddFisso.query().valoriChiave(filtro);\n codici = Lib.Array.creaLista(interi);\n }// fine del blocco if\n\n /* crea un addebito effettivo per ogni addebito fisso */\n if (codici != null) {\n for (int cod : codici) {\n this.creaSingoloAddebito(cod, data);\n } // fine del ciclo for-each\n }// fine del blocco if\n\n }// fine del blocco if\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "public static Date firstDayMonth(){\n String rep_inicio_de_mes = \"\";\n try {\n Calendar c = Calendar.getInstance();\n \n /*Obtenemos el primer dia del mes*/\n c.set(Calendar.DAY_OF_MONTH, c.getActualMinimum(Calendar.DAY_OF_MONTH));\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n \n /*Lo almacenamos como string con el formato adecuado*/\n rep_inicio_de_mes = sdf.format(c.getTime());\n\n \n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return stringToDate(rep_inicio_de_mes);\n }", "public void setBorndate(Date borndate) {\r\n this.borndate = borndate;\r\n }", "@Override\n public Date getEffectiveDateForPerDiem(java.sql.Timestamp expenseDate) {\n if (getTripBegin() == null) {\n return new java.sql.Date(getDocumentHeader().getWorkflowDocument().getDateCreated().getMillis());\n }\n return new java.sql.Date(getTripBegin().getTime());\n }", "public String toString() {\r\n return nom + \" \" + dateEmbauche;\r\n }", "public RecepcionBHC getRecepcionBhcById(Integer codigo, Date dfechabhc, Date enDate)throws Exception{\n Session session = sessionFactory.getCurrentSession();\n Query query = session.createQuery(\"from RecepcionBHC r where r.recBhcId.fechaRecBHC BETWEEN :dfechabhc and :enDate and r.recBhcId.codigo= :codigo \");\n query.setParameter(\"codigo\", codigo);\n query.setParameter(\"dfechabhc\", dfechabhc);\n query.setParameter(\"enDate\",enDate);\n return (RecepcionBHC) query.uniqueResult();\n }", "private int creaSingoloAddebito(int cod, Date data) {\n /* variabili e costanti locali di lavoro */\n int nuovoRecord = 0;\n boolean continua;\n Dati dati;\n int codConto = 0;\n int codListino = 0;\n int quantita = 0;\n double prezzo = 0.0;\n Campo campoConto = null;\n Campo campoListino = null;\n Campo campoQuantita = null;\n Campo campoPrezzo = null;\n Campo campoData = null;\n Campo campoFissoConto = null;\n Campo campoFissoListino = null;\n Campo campoFissoQuantita = null;\n Campo campoFissoPrezzo = null;\n ArrayList<CampoValore> campi = null;\n Modulo modAddebito = null;\n Modulo modAddebitoFisso = null;\n\n try { // prova ad eseguire il codice\n\n modAddebito = Progetto.getModulo(Addebito.NOME_MODULO);\n modAddebitoFisso = Progetto.getModulo(AddebitoFisso.NOME_MODULO);\n\n /* carica tutti i dati dall'addebito fisso */\n dati = modAddebitoFisso.query().caricaRecord(cod);\n continua = dati != null;\n\n /* recupera i campi da leggere e da scrivere */\n if (continua) {\n\n /* campi del modulo Addebito Fisso (da leggere) */\n campoFissoConto = modAddebitoFisso.getCampo(Addebito.Cam.conto.get());\n campoFissoListino = modAddebitoFisso.getCampo(Addebito.Cam.listino.get());\n campoFissoQuantita = modAddebitoFisso.getCampo(Addebito.Cam.quantita.get());\n campoFissoPrezzo = modAddebitoFisso.getCampo(Addebito.Cam.prezzo.get());\n\n /* campi del modulo Addebito (da scrivere) */\n campoConto = modAddebito.getCampo(Addebito.Cam.conto.get());\n campoListino = modAddebito.getCampo(Addebito.Cam.listino.get());\n campoQuantita = modAddebito.getCampo(Addebito.Cam.quantita.get());\n campoPrezzo = modAddebito.getCampo(Addebito.Cam.prezzo.get());\n campoData = modAddebito.getCampo(Addebito.Cam.data.get());\n\n }// fine del blocco if\n\n /* legge i dati dal record di addebito fisso */\n if (continua) {\n codConto = dati.getIntAt(campoFissoConto);\n codListino = dati.getIntAt(campoFissoListino);\n quantita = dati.getIntAt(campoFissoQuantita);\n prezzo = (Double)dati.getValueAt(0, campoFissoPrezzo);\n dati.close();\n }// fine del blocco if\n\n /* crea un nuovo record in addebito */\n if (continua) {\n campi = new ArrayList<CampoValore>();\n campi.add(new CampoValore(campoConto, codConto));\n campi.add(new CampoValore(campoListino, codListino));\n campi.add(new CampoValore(campoQuantita, quantita));\n campi.add(new CampoValore(campoPrezzo, prezzo));\n campi.add(new CampoValore(campoData, data));\n nuovoRecord = modAddebito.query().nuovoRecord(campi);\n continua = nuovoRecord > 0;\n }// fine del blocco if\n\n /* aggiorna la data di sincronizzazione in addebito fisso */\n if (continua) {\n this.getModulo().query().registraRecordValore(cod, Cam.dataSincro.get(), data);\n }// fine del blocco if\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n /* valore di ritorno */\n return nuovoRecord;\n }", "@Override\r\n\tpublic String calculerDonnee() {\n\t\tif (this.quest.getIdPersonne() == null) {\r\n\t\t\tSystem.err\r\n\t\t\t\t\t.println(\"Il n'y a pas de personne associé qu questionnaire, comment voulez vous calculer son age?\");\r\n\t\t\treturn \"-1 idPersonne inconnu\";\r\n\t\t} else {\r\n\t\t\tString[] donnee = GestionDonnee.getInfoPersonne(this.quest\r\n\t\t\t\t\t.getIdPersonne());\r\n\t\t\t// System.err.println(\"donnée : \"+donnee[0]+\" : \"+donnee[1]+\" : \"+donnee[2]);\r\n\r\n\t\t\tDate datenaissance = new Date(donnee[2]);\r\n\t\t\t// System.out.println(\"date actuelle : \"+new\r\n\t\t\t// java.sql.Date(System.currentTimeMillis()).toString());\r\n\t\t\tString temp[] = new java.sql.Date(System.currentTimeMillis())\r\n\t\t\t\t\t.toString().split(\"-\");\r\n\t\t\tDate dateActuelle = new Date(Integer.parseInt(temp[2]),\r\n\t\t\t\t\tInteger.parseInt(temp[1]), Integer.parseInt(temp[0]));\r\n\t\t\t// System.out.println(dateActuelle.annee);\r\n\t\t\t// System.out.println(\"age : \"+datenaissance.calculerAge(dateActuelle)+\"------------------------------------\");\r\n\t\t\treturn datenaissance.calculerAge(dateActuelle).toString();\r\n\r\n\t\t}\r\n\r\n\t}", "public void SuppIndispo(String date, int refEnseignant) throws SQLException {\r\n\r\n\t\ttry {\r\n\r\n\t\t\t/** Connection à la base - Étape 2 */\r\n\t\t\tString url = \"jdbc:oracle:thin:@miage03.dmiage.u-paris10.fr:1521:MIAGE\";\r\n\t\t\tConnection cx = DriverManager.getConnection(url, \"maletell\",\r\n\t\t\t\t\t\"matthieu\");\r\n\t\t\tStatement request = cx.createStatement();\r\n\r\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\t\tjava.util.Date dateD = format.parse(date);\r\n\t\t\tGregorianCalendar cal = new java.util.GregorianCalendar();\r\n\t\t\tcal.setTime(dateD);\r\n\r\n\t\t\trequest.executeUpdate(\"DELETE FROM Indisponibilite WHERE NO_ENSEIGNANT = \"\r\n\t\t\t\t\t+ refEnseignant\r\n\t\t\t\t\t+ \" AND DATE_INDISPO = \"\r\n\t\t\t\t\t+ DAO.dateFromJavaToOracle(cal));\r\n\r\n\t\t\tcx.commit();\r\n\t\t\trequest.close();\r\n\t\t\tcx.close();\r\n\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public jInternalCobro(ControladorPrincipal miControlador, Alumno unAlumno, Cuota cuota) {\n Cuota otro = cuota;\n this.controlador = miControlador;\n elAlumno = unAlumno;\n initComponents();\n Locale locale = new Locale(\"es\", \"ES\");\n DatePickerSettings settings = new DatePickerSettings(locale);\n settings.setFormatForDatesCommonEra(\"dd/MM/yyyy\");\n settings.setFormatForDatesBeforeCommonEra(\"dd/MM/uuuu\");\n datePicker.setSettings(settings);\n datePicker.setDateToToday();\n this.txtNombreAlumno.setText(elAlumno.getNombrealumno() + \" \" + elAlumno.getApellidoalumno());\n if(otro == null) {\n try {\n cargarTablaCuotas(elAlumno);\n } catch (Notificaciones ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }\n } else {\n try {\n cargarTablaCuota(elAlumno, otro);\n } catch (Notificaciones ex) {\n ex.printStackTrace();\n }\n }\n }", "public TelaEntradaProduto() {\n initComponents();\n data = new Date(System.currentTimeMillis());\n SimpleDateFormat formatador = new SimpleDateFormat(\"dd/MM/yyyy\");\n JTFdata.setText(formatador.format(data));\n }", "public interface DateInterface \n{\n /*\n Dada uma data, determina a sua estação do ano (Primavera, Verão, Outono ou Inverno) de acordo com o hemisfério Norte.\n */\n public String estacaoDoAno(LocalDate d);\n \n /*\n Determina o dia da semana do primeiro dia de um ano.\n */\n public DayOfWeek primeiroDiaSemanaAno(int ano);\n \n /*\n Determina o dia da semana de uma data.\n */\n public DayOfWeek diaDaSemana(LocalDate d);\n \n /*\n Determina o dia do ano de uma data (por exemplo, 10/01/2018 corresponde ao 10º dia do ano de 2018).\n */\n public int diaDoAno(LocalDate d);\n \n /*\n Determina em que trimestre do ano uma data se situa.\n */\n public int trimestre(LocalDate d);\n \n /*\n Determina o número de semanas completas entre duas datas, sendo uma delas a atual.\n */\n public long numSemanasAteData(LocalDate d);\n \n /*\n Determina se um ano é bissexto ou não.\n */\n public boolean anoBissexto(Year ano);\n \n /*\n Determina o século, o milénio e a era de uma data.\n */\n public TuploSeculoMilenioEra seculoMilenioEraData(LocalDate d);\n \n /*\n Determina quanto tempo falta até à próxima passagem do cometa Halley. Mostra o resultado em dias totais, meses totais\n e anos totais.\n */\n public ParDataDiaMesAno cometaHalley();\n \n /*\n Determina o número de dias úteis entre duas dadas datas.\n */\n public int diasUteisEntreDatas(LocalDate d1, LocalDate d2);\n \n /*\n Determina quantos fins-de-semanas completos um ano tem. Caso o ano inserido possua um sábado ou um domingo extra, \n estes também são sinalizados.\n */\n public ParFimDeSemana numFinsDeSemanaAno(int ano);\n \n /*\n Determina quantos dias faltam até ao próximo Natal.\n */\n public long diasAteNatal();\n \n /*\n Determina o salário de um indivíduo sabendo quanto ganha por hora e o ano que pretende calcular. Apresenta o resultado\n em dias, semanas, meses e ano.\n */\n public SalarioAno salarioDiaMesSemanaAno(float salarioHora, int ano); \n \n /*\n Determina o número de dias úteis (isto é, que não são fins-de-semana) de um ano.\n */\n public int numDiasUteisAno(int ano);\n \n /*\n Determina em que dias são os fins-de-semana de um dado mês. Por exemplo, em Janeiro de 2018 o primeiro fim-de-semana\n ocorre nos dias 6 (Sábado) e 7 (Domingo).\n */\n public Map<Integer, DayOfWeek> finsDeSemanaDoMes(int ano, int mes);\n \n /*\n A uma dada data são somados anos, meses, semanas e dias.\n */\n public LocalDate somaData(LocalDate d, int ano, int mes, int semanas, int dias);\n \n /*\n A uma dada data são subtraidos anos, meses, semanas e dias.\n */\n public LocalDate subtraiData(LocalDate d, int ano, int mes, int semanas, int dias);\n \n /*\n Dado um número de dias, calcula a data daqui a esse número de dias e apresenta ainda qual o dia da semana e quantos\n dias úteis faltam até lá.\n */\n public TuploDataDia_SemanaDias_Uteis eventoDaquiXDias(int dias);\n \n /*\n Dado um número de dias úteis, calcula a data daqui a esse número de dias e apresenta ainda qual o dia da semana.\n */\n public ParDataDiaDaSemana eventoDaquiXDiasUteis(int dias);\n \n /*\n Determina qual a data da próxima Black Friday e quantos dias faltam até essa data.\n */\n public ParDataDia proxBlackFriday();\n \n /*\n Calcula a data da Páscoa de um determinado ano.\n */\n public LocalDate proxPascoa(int ano);\n \n /*\n Para um dado ano apresenta a data dos feriados nacionais e em que dia da semana ocorrem.\n */\n public Map<String, MonthDay> dataFeriadosNacionais(int ano);\n \n /*\n Calcula a diferença entre duas datas. Apresenta o resultado em anos, meses e dias. Por exemplo, de 01/01/2018 até \n 10/02/2018 existe uma diferença de 0 anos, 1 mês e 9 dias.\n */\n public static TuploAnosMesesDias difEntreDatas(LocalDate d1, LocalDate d2)\n { \n boolean stop = false;\n boolean stop2 = false;\n long dias;\n int meses;\n int anos;\n \n anos = 0;\n meses = 0;\n dias = 0;\n\n while((d1.getYear() != d2.getYear() || d1.getMonthValue() != d2.getMonthValue())&&!stop && !stop2)\n {\n \n \n while(d1.getMonthValue() != d2.getMonthValue() && !stop2)\n {\n if(d1.getYear() == (d2.getYear() - 1) && d1.getMonthValue() == 12 && d2.getMonthValue() == 1 && d2.getDayOfMonth() < d1.getDayOfMonth())\n {\n stop2 = true;\n dias = 31 - d1.getDayOfMonth() + d2.getDayOfMonth();\n }\n if(stop2 == false)\n {\n YearMonth anoMes = YearMonth.of(d1.getYear(), d1.getMonth());\n int daysInMonth = anoMes.lengthOfMonth(); \n\n if(((d2.getYear() - d1.getYear()) == 0) \n &&((d2.getMonthValue() - d1.getMonthValue()) == 1)\n &&(d1.getDayOfMonth() > d2.getDayOfMonth()))\n {\n\n dias = d2.getDayOfMonth() + daysInMonth - d1.getDayOfMonth(); \n stop = true;\n break;\n }\n\n meses++;\n\n d1 = d1.plusMonths(1);\n }\n }\n if(stop2 == false)\n {\n if(d1.getMonthValue() == d2.getMonthValue() && d1.getYear() !=d2.getYear())\n {\n meses++;\n d1 = d1.plusMonths(1);\n }\n }\n }\n \n if(d1.getMonthValue() == d2.getMonthValue())\n {\n dias = d2.getDayOfMonth() - d1.getDayOfMonth();\n }\n\n while(meses > 12)\n {\n anos++;\n meses-=12;\n }\n \n return new TuploAnosMesesDias(anos, meses, dias);\n \n }\n}", "Employee setBirthdate(Date birthdate);", "public void modifReservationPayement( Chambre chambre, LocalDate dateDebutNouv, LocalDate dateFinNouv, Scanner in , boolean modif) {\n\t\tint montantInitial = calculMontant(chambre.getTarif());\n\t\tdateDebut = dateDebutNouv;\n\t\tdateFin = dateFinNouv;\n\t\t\n\t\tif(dateFin.equals(LocalDate.now())) { // la reservation est termine\n\t\t\tclient.setNombreDeReservations(client.getNombreDeReservations()-1);\n\t\t}\n\t\tif(modif) {\n\t\t\taffichage(chambre);\n\t\t}\n\t\tint nouveauMontant = calculMontant(chambre.getTarif()) - montantInitial;\n\t\tpayement(nouveauMontant, in, \"ressources\\\\transactions\\\\\");\n\n\t}", "public String validarAsociacion(String nombre, String dpi, String codigo_cuenta, String codigo_cliente) {\n String mensaje = \"\";\n DM_Cliente dmcli = new DM_Cliente();\n DM_Solicitud dmsol = new DM_Solicitud();\n try {\n Cliente cliente = dmcli.validarCliente(nombre, dpi);\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta WHERE Codigo = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cuenta);\n if (cliente != null) {\n rs = PrSt.executeQuery();\n if (rs.next()) {\n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n Solicitud solicitud = new Solicitud();\n solicitud.setEmisor(codigo_cliente);\n solicitud.setReceptor(cliente.getCodigo());\n solicitud.setCodigo_cuenta(codigo_cuenta);\n solicitud.setEstado(\"Pendiente\");\n solicitud.setFecha(fecha);\n mensaje = dmsol.agregarSolicitud(solicitud);\n } else {\n mensaje = \"La cuenta no existe\";\n }\n } else {\n mensaje = \"El dueño de la cuenta no existe\";\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return mensaje;\n }", "public void introducirConsumosClienteFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo,String dpiCliente) {\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT CONSUMO_RESTAURANTE.Id_Consumo,CONSUMO_RESTAURANTE.Id_Alojamiento,CONSUMO_RESTAURANTE.Nombre_Comida,CONSUMO_RESTAURANTE.Precio_Comida,CONSUMO_RESTAURANTE.Cantidad,CONSUMO_RESTAURANTE.Fecha_Consumo FROM CONSUMO_RESTAURANTE JOIN ALOJAMIENTO JOIN RESERVACION WHERE RESERVACION.Id=ALOJAMIENTO.Id_Reservacion AND ALOJAMIENTO.Id=CONSUMO_RESTAURANTE.Id_Alojamiento AND RESERVACION.Dpi_Cliente=? AND Fecha_Consumo>=? AND Fecha_Consumo<=?\");\n declaracion.setString(1, dpiCliente);\n declaracion.setDate(2,fechaInicialSql);\n declaracion.setDate(3,fechaFinalSQL);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// mira los consumo de unas fechas\n Object objeto[] = new Object[7];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);// mira los consumo de unas fechas\n objeto[4] = resultado.getInt(5);\n objeto[5] = resultado.getDate(6);\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;// mira los consumo de unas fechas\n modelo.addRow(objeto);\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "@Override\n\tpublic FdBusinessDate getCurrencyFdBusinessDate() {\n map.put(\"busiTypeCode\",\"02\");\n map.put(\"subBusiType\",\"01\");\n\t\treturn mapper.selectByPK(map);\n\t}", "public void introducirConsumosHotelFechas(Date fechaInicial, Date fechaFinal,TablaModelo modelo) {\n long tiempo = fechaInicial.getTime();\n java.sql.Date fechaInicialSql = new java.sql.Date(tiempo);\n long tiempo2= fechaFinal.getTime();\n java.sql.Date fechaFinalSQL = new java.sql.Date(tiempo2);\n try {// mira los consumo de unas fechas\n PreparedStatement declaracion;// prepara la orden \n declaracion = conexion.prepareStatement(\"SELECT * FROM CONSUMO_RESTAURANTE WHERE Fecha_Consumo>=? AND Fecha_Consumo<=?\");\n declaracion.setDate(1,fechaInicialSql);\n declaracion.setDate(2,fechaFinalSQL);\n ResultSet resultado = declaracion.executeQuery();\n while (resultado.next()) {// mira los consumo de unas fechas\n Object objeto[] = new Object[7];\n objeto[0] = resultado.getInt(1);\n objeto[1] = resultado.getInt(2);// mira los consumo de unas fechas\n objeto[2] = resultado.getString(3);\n objeto[3] = resultado.getInt(4);\n objeto[4] = resultado.getInt(5);\n objeto[5] = resultado.getDate(6);// mira los consumo de unas fechas\n int total = (Integer)objeto[3]*(Integer)objeto[4];\n objeto[6]= total;\n modelo.addRow(objeto);// mira los consumo de unas fechas\n } // maneja el resultado \n\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }", "private String leerFecha() {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYY/MM/dd\");\n\t\t\treturn sdf.format(txtFecha.getDate());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Seleccione una fecha válida\", \"Aviso\", 2);\n\t\t\treturn null;\n\t\t}\n\t}", "public Fecha () {\n\t\tthis.ahora = Calendar.getInstance();\n\t\tahora.set(2018, 3, 1, 15, 15, 0);\t \n\t\taño = ahora.get(Calendar.YEAR);\n\t\tmes = ahora.get(Calendar.MONTH) + 1; // 1 (ENERO) y 12 (DICIEMBRE)\n\t\tdia = ahora.get(Calendar.DAY_OF_MONTH);\n\t\thr_12 = ahora.get(Calendar.HOUR);\n\t\thr_24 = ahora.get(Calendar.HOUR_OF_DAY);\n\t\tmin = ahora.get(Calendar.MINUTE);\n\t\tseg = ahora.get(Calendar.SECOND);\n\t\tam_pm = v_am_pm[ahora.get(Calendar.AM_PM)]; //ahora.get(Calendar.AM_PM)=> 0 (AM) y 1 (PM)\n\t\tmes_nombre = v_mes_nombre[ahora.get(Calendar.MONTH)];\n\t\tdia_nombre = v_dia_nombre[ahora.get(Calendar.DAY_OF_WEEK) - 1];\n\n\t}", "public mbvBoletinPeriodo() {\r\n }", "@Override\n public void afficher() {\n super.afficher();\n System.out.println(\"Sexe : \" + getSexe());\n System.out.println(\"Numéro de sécurité sociale : \" + getNumeroSecuriteSociale());\n System.out.println(\"Date de naissance : \" + getDateDeNaissance().format(DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG)));\n System.out.println(\"Commentaires : \" + getCommentaires());\n this.adresse.afficher();\n }", "public void createBonFiscal(int idBonFiscal, Date data, float suma, int idClient) {\n\t\tif (bonFiscalOperations.checkBonFiscal(idBonFiscal) == true) {\n\t\t\tSystem.out.println(\"Bon fiscal existent!\");\n\n\t\t\tBonFiscal bonFiscal = new BonFiscal(idBonFiscal, data, suma);\n\t\t\tbonFiscal.setIdClient(idClient);\n\t\t\tList<BonFiscal> list = bonFiscalOperations.getAllBonuri();\n\t\t\tbonFiscalOperations.addBonFiscal(bonFiscal);\n\t\t\tbonFiscalOperations.printListOfBonuri(list);\n\t\t}\n\t}", "public Date getFechaDesde()\r\n/* 164: */ {\r\n/* 165:283 */ return this.fechaDesde;\r\n/* 166: */ }", "abstract protected Date getDate(E o2, Date date);", "public Mencacao()\r\n {\r\n texto = \"\";\r\n deUtilizador = \"\";\r\n data = new GregorianCalendar();\r\n }", "public static String calService(String doj)\r\n\t {\r\n\t\t \r\n\t\t LocalDate join_day = LocalDate.of(Integer.parseInt(doj.substring(6,10)),Integer.parseInt(doj.substring(3,5)),Integer.parseInt(doj.substring(1,2)));\r\n\t\t LocalDate today = LocalDate.now();\r\n\t\t Period age = Period.between(join_day, today); \r\n\t\t int years = age.getYears(); \r\n\t\t int months = age.getMonths(); \r\n\t\t return years + \" Years and \" + months + \" Months\";\r\n\t }", "public void setCreDate(Date creDate) {\n this.creDate = creDate;\n }", "public FrmPuntoDeVenta(Empleado empleado) throws ParseException {\n this.date1 = dateFormat.parse(this.date.getYear() + \"-\" + this.date.getMonth() + \"-\" + this.date.getDay());\n this.jframe = this;\n this.empleado = empleado;\n initComponents();\n this.cargarBanner();\n this.setLocationRelativeTo(null);\n }", "public void setFechaExpedicion(String p) { this.fechaExpedicion = p; }", "@Test\n public void teste_setdtFundacao_e_getDtFundacao_correto() {\n String data = fixtureData;\n emp.setDtFundacao(data);\n assertThat(\"Os valores deveriam ser iguais\", DataJoda.cadastraData(data), equalTo(emp.getDtFundacao()));\n }", "public void setCreacion(Date creacion) {\r\n this.creacion = creacion;\r\n }", "private void atualizaHistoricoPendenteRecarga(Date datExecucao) throws SQLException\n\t{\n\t\tCalendar calExecucao = Calendar.getInstance();\n\t\tcalExecucao.setTime(datExecucao);\n\t\tint diaExecucao = calExecucao.get(Calendar.DAY_OF_MONTH);\n\t\tConnection connClientes = null;\n//\t\tPreparedStatement prepClientes = null;\n\t\tPreparedStatement prepInsert = null;\n//\t\tResultSet resultClientes = null;\n\t\t\n\t\t//Parametros para consulta no banco de dados de assinantes pendentes de primeira recarga \n\t\tString datEntradaPromocao = null;\n\t\t\n\t\tswitch(diaExecucao)\n\t\t{\n\t\t\tcase 11:\n\t\t\t\tdatEntradaPromocao = \"DAT_ENTRADA_PROMOCAO >= TO_DATE('01/01/2005', 'DD/MM/YYYY') AND \" +\n\t\t\t\t\t\t\t\t\t \"DAT_ENTRADA_PROMOCAO < TO_DATE('09/02/2005', 'DD/MM/YYYY') \";\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\tdatEntradaPromocao = \"DAT_ENTRADA_PROMOCAO >= TO_DATE('09/02/2005', 'DD/MM/YYYY') AND \" +\n\t\t\t\t \t\t\t\t\t \"DAT_ENTRADA_PROMOCAO < TO_DATE('01/04/2005', 'DD/MM/YYYY') \";\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\tdatEntradaPromocao = \"DAT_ENTRADA_PROMOCAO >= TO_DATE('01/04/2005', 'DD/MM/YYYY') AND \" +\n\t\t\t\t \t\t\t\t\t \"DAT_ENTRADA_PROMOCAO < TO_DATE('01/07/2005', 'DD/MM/YYYY') \";\n\t\t\t\tbreak;\n\t\t\t//Caso contrario, nao faz nada e termina a execucao\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\t//Inserindo registros no historico\n\t\t\tString sqlInsert = \"INSERT INTO TBL_GER_HISTORICO_PULA_PULA \" +\n\t\t \t \t\t\t\t \"(IDT_MSISDN, IDT_PROMOCAO, DAT_EXECUCAO, DES_STATUS_EXECUCAO, \" +\n\t\t\t\t\t\t\t \" IDT_CODIGO_RETORNO, VLR_CREDITO_BONUS) \" +\n\t\t\t\t\t\t\t \"SELECT IDT_MSISDN, IDT_PROMOCAO, ?, 'SUCESSO', ?, 0 \" +\n\t\t\t\t\t\t\t \"FROM TBL_GER_PROMOCAO_ASSINANTE \" +\n\t\t\t\t\t\t\t \"WHERE IDT_PROMOCAO = \" + String.valueOf(ID_PENDENTE_RECARGA) + \n\t\t\t\t\t\t\t \" AND \" + datEntradaPromocao;\n\t\t\t\n\t\t\tconnClientes = DriverManager.getConnection(\"jdbc:oracle:oci8:@\" + sid, usuario,senha);\n\t\t\tprepInsert = connClientes.prepareStatement(sqlInsert);\n\t\t\tprepInsert.setDate (1, new java.sql.Date(datExecucao.getTime()));\n\t\t\tprepInsert.setString(2, (new DecimalFormat(\"0000\")).format(RET_PULA_PULA_PENDENTE_RECARGA));\n\t\t\tprepInsert.executeUpdate();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tif(prepInsert != null) prepInsert.close();\n\t\t\tif(connClientes != null) connClientes.close();\n\t\t}\n\t}", "public static void main (String args [])\n throws SQLException, ClassNotFoundException, java.io.IOException\n {\n Class.forName (\"oracle.jdbc.driver.OracleDriver\");\n\n // Connexion à une BD\n Connection uneConnection =\n DriverManager.getConnection (\"jdbc:oracle:thin:@localhost:1521:ora9i\", \"godin\", \"oracle\");\n\n/* PreparedStatement unEnoncéSQL = uneConnection.prepareStatement\n (\"DROP TABLE LeTemps\");\n int n = unEnoncéSQL.executeUpdate(); \n*/\n PreparedStatement unEnoncéSQL = uneConnection.prepareStatement\n (\"CREATE TABLE LeTemps(id NUMBER, laDate DATE, lHeure DATE, laDateEtHeure DATE)\");\n int n = unEnoncéSQL.executeUpdate(); \n\n unEnoncéSQL = uneConnection.prepareStatement\n (\"INSERT INTO LeTemps(id,laDate,lHeure,laDateEtHeure) VALUES(?,?,?,?)\");\n unEnoncéSQL.setInt(1,1);\n Calendar maintenant = Calendar.getInstance(); // crée un calendrier grégorien avec date actuelle\n\n\n // Traitement de la date (sans l'heure)\n // Calendar.getTime() retourne un java.util.Date\n // java.util.Date.getTime() retourne le temps en long\n java.sql.Date laDate = new java.sql.Date(maintenant.getTime().getTime());\n unEnoncéSQL.setDate(2,laDate);\n\n // Traitement de l'heure (sans la date)\n java.sql.Time leTime = new java.sql.Time(maintenant.getTime().getTime());\n unEnoncéSQL.setTime(3,leTime);\n\n // Date + heure\n java.sql.Timestamp leTimestamp = new java.sql.Timestamp(maintenant.getTime().getTime());\n unEnoncéSQL.setTimestamp(4,leTimestamp);\n\n n = unEnoncéSQL.executeUpdate();\n\n unEnoncéSQL = uneConnection.prepareStatement\n (\"SELECT id,laDate,lHeure,laDateEtHeure FROM LeTemps\" );\n ResultSet résultatSelect = unEnoncéSQL.executeQuery();\n while (résultatSelect.next ()){\n int leId = résultatSelect.getInt(\"id\");\n laDate = résultatSelect.getDate(\"laDate\");\n leTime = résultatSelect.getTime(\"lHeure\");\n leTimestamp = résultatSelect.getTimestamp(\"laDateEtHeure\");\n \n System.out.println (\"id:\" + leId);\n System.out.println (\"la date :\" + laDate);\n System.out.println (\"l'heure :\" + leTime);\n System.out.println (\"la date avec l'heure :\" + leTimestamp);\n }\n // Fermeture de l'énoncé et de la connexion\n unEnoncéSQL.close();\n uneConnection.close();\n }", "public void add (String frist_name, String lastName, String nationality, \n int age, Date commingDate, Date checkOutDate){\n \n String insertTransaction = \"INSERT INTO customer \"+\n \"(First_name, Last_name, nationality, age, coming_date, check_out_date) \"\n +\"values ('\"+frist_name+\"','\"+lastName+\"','\"\n +nationality+\"',\"+age+\",'\"+\n commingDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(2)+\n \"', '\"+checkOutDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(2)+\"')\";\n try {\n statement.executeUpdate(insertTransaction);//insert into the DB\n } catch (SQLException ex) {\n ex.printStackTrace();\n }finally{\n setQuery(DEFUALT_QUERY);\n }\n }", "public LocalDate GetFechaActual() throws RemoteException;" ]
[ "0.6444897", "0.6439659", "0.63716507", "0.61367416", "0.60931116", "0.58596635", "0.5785994", "0.5748373", "0.57314074", "0.57198966", "0.57132393", "0.57076913", "0.56942314", "0.56809175", "0.5646512", "0.56413555", "0.5630814", "0.561205", "0.55640876", "0.5552819", "0.5552436", "0.55447114", "0.55341846", "0.5532974", "0.5522176", "0.55207413", "0.55191845", "0.5498716", "0.5492074", "0.54795295", "0.54714143", "0.54690427", "0.5454688", "0.5450816", "0.5421904", "0.5409701", "0.5406966", "0.54068714", "0.5405657", "0.54015857", "0.53922963", "0.5392194", "0.53914386", "0.5389405", "0.5371702", "0.53713644", "0.53647524", "0.5358012", "0.53562975", "0.53506166", "0.53492767", "0.5341522", "0.53383076", "0.53372294", "0.5300277", "0.52999514", "0.5291746", "0.5290688", "0.5286228", "0.52804637", "0.52748376", "0.5274447", "0.5270069", "0.52592963", "0.5257482", "0.5256135", "0.5248499", "0.5247752", "0.52461445", "0.5239476", "0.52357054", "0.5229721", "0.52261597", "0.52150583", "0.51931196", "0.51882637", "0.5185253", "0.518412", "0.518368", "0.5181291", "0.5180898", "0.5174854", "0.51732785", "0.51726055", "0.5171665", "0.51657575", "0.5165699", "0.5163569", "0.51547676", "0.51505613", "0.51474494", "0.51436204", "0.51370347", "0.513013", "0.5124845", "0.5119299", "0.51165676", "0.51082635", "0.51067567", "0.5101047", "0.50984585" ]
0.0
-1
Construit un employe avec le nom leNom si celuici n'est pas null, sinon avec NOM_BIDON ansi que la date d'embauche laDate si celleci n'est pas null, sinon avec le 1er janvier 0.
public Employe (String leNom, Date laDate) { if ( leNom == null ) { nom = NOM_BIDON; } else { nom = leNom; } if ( laDate == null ) { dateEmbauche = new Date(); // 1er janvier 0 } else { dateEmbauche = laDate.copie(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Employe(String leNom, Date laDate) {\r\n if (leNom == null) {\r\n nom = NOM_BIDON;\r\n } else {\r\n nom = leNom;\r\n }\r\n \r\n if (laDate == null) {\r\n dateEmbauche = new Date(); // 1er janvier 0\r\n } else {\r\n dateEmbauche = laDate.copie();\r\n }\r\n }", "public Employe(String nomEmploye) {\r\n\t\tsuper();\r\n\t\tthis.nomEmploye = nomEmploye;\r\n\t}", "public Employe () {\n this ( NOM_BIDON, null );\n }", "public Employe() {\r\n this(NOM_BIDON, null);\r\n }", "public Employe ( Employe unEmploye ) {\n nom = unEmploye.nom;\n dateEmbauche = unEmploye.dateEmbauche.copie();\n }", "public Employe(Employe unEmploye) {\r\n nom = unEmploye.nom;\r\n dateEmbauche = unEmploye.dateEmbauche.copie();\r\n }", "public Empleados(String nom, double sue,int agno,int mes,int dia) {\r\n\t\t\r\n\t\tnombre=nom;\r\n\t\tsueldo=sue;\r\n\t\tGregorianCalendar calendario=new GregorianCalendar(agno,mes-1,dia);\r\n\t\taltaContrato=calendario.getTime();\r\n\t}", "public String getAPELLIDONombreDelAlumno() {\r\n\t\tString nombre = \"SUREDA José\";\r\n\t\treturn nombre;\r\n\t}", "Employee setBirthdate(Date birthdate);", "public void setDateDembauche( Date nouvelleDate ) {\n if ( nouvelleDate == null ) {\n dateEmbauche = new Date();\n } else {\n dateEmbauche = nouvelleDate.copie();\n }\n }", "private String formulerMonNom() {\n\t return \"Je m'appelle \" + this.nom; // appel de la propriété nom\n\t }", "public Jeu(){\n Saisie.Initialiser();\n this.premierJoueur = CreationDePersonnage(\"joueur1\");\n this.secondJoueur = CreationDePersonnage(\"joueur2\");\n Combat();\n Saisie.Terminer();\n }", "public Employee(int emp_no, Date birth_date, String first_name, String last_name, String gender, Date hire_date) {\n this.emp_no = emp_no;\n this.birth_date = birth_date;\n this.first_name = first_name;\n this.last_name = last_name;\n this.gender = gender.equals(\"M\")?Gender.M:Gender.F;\n this.hire_date = hire_date;\n }", "public Alumno(String dni, String nombre, Direccion direccion, String[] telefonos, LocalDate fecha_nac,\n\t\t\tCurso curso) {\n\t\tthis.dni = dni;\n\t\tthis.nombre = nombre;\n\t\tthis.direccion = direccion;\n\t\tthis.telefonos = telefonos;\n\t\tthis.fecha_nac = fecha_nac;\n\t\tthis.curso = curso;\n\t\tthis.notas = new ArrayList<Notas>();\n\t}", "public void setDateDembauche(Date nouvelleDate) {\r\n if (nouvelleDate == null) {\r\n dateEmbauche = new Date();\r\n \r\n } else {\r\n dateEmbauche = nouvelleDate.copie();\r\n }\r\n }", "public DocumentVente(String code, Date date, Tier fornisseur, Date datecommande, String codefourni) {\n this.code = code;\n this.date = date;\n this.client = fornisseur;\n this.datecommande = datecommande;\n this.codeclient = codefourni;\n// this.lieu = emplacement;\n \n }", "private void affichageDateFin() {\r\n\t\tif (dateFinComptage!=null){\r\n\t\t\tSystem.out.println(\"Le comptage est clos depuis le \"+ DateUtils.format(dateFinComptage));\r\n\t\t\tif (nbElements==0){\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos mais n'a pas d'éléments. Le comptage est en anomalie.\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos et est OK.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Le compte est actif.\");\r\n\t\t}\r\n\t}", "public Aluguel(Integer idAluguel, Cliente cliente, LocalDate data_aluguel, BigDecimal valor) {\n\t\tsuper();\n\t\tthis.idAluguel = idAluguel;\n\t\tthis.cliente = cliente;\n\t\tthis.data_aluguel = data_aluguel;\n\t\tthis.valor = valor;\n\t}", "public BeanDatosAlumno() {\r\n bo = new BoPrestamoEjemplarImpl();\r\n verEjemplares(\"ABC0001\"); \r\n numerodelibrosPrestados();\r\n }", "Person(String fullName, LocalDate birthdate) throws IllegalArgumentException{\n this.fullName = fullName;\n this.setBirthdate(birthdate);\n }", "public Empleado(String nombre, Prioridad prioridad) {\n\t\tthis.nombre = nombre;\n\t\tthis.prioridad = prioridad;\n\t}", "public Persona(String nombre, Date fechaNac, char sexo){\r\n\t\tthis(nombre, fechaNac, sexo, 0, 0);\r\n\t}", "public ModificationEmploye() {\n initComponents();\n \n Employe e = GestionSociete.personnel.get(GestionSociete.rowID);\n \n \n nom.setText(e.getNom());\n prenom.setText(e.getPrenom());\n dateEntree.setText(e.getDateEntree());\n \n DefaultTableModel model = (DefaultTableModel) jTable1.getModel();\n model.setRowCount(0);\n \n for (Map.Entry<String, Competence> entry : GestionSociete.competences.entrySet()){\n model.addRow(new Object[] {entry.getValue().getId(),entry.getValue().getNomFr(),\n entry.getValue().getNomEn(),e.possedeCompetence(entry.getValue())});\n }\n \n }", "public Persona(String nombre, Date fechaNac, char sexo, double peso, double altura){\r\n\t\tthis.nombre=nombre;\r\n\t\tthis.fechaNac=fechaNac;\r\n\t\tthis.peso=peso;\r\n\t\tthis.altura=altura;\r\n\t\tthis.dni=generarDni();\r\n\t\tsetSexo(sexo); //Asigna el sexo realizando comprobacion\r\n\t}", "public FrmCrearEmpleado() {\n initComponents();\n tFecha.setDate(new Date());\n }", "public AlumnoNota(String nombreAlumno, String nombreAsignatura, double nota, String profesor) {\n this.nombreAlumno = nombreAlumno;\n this.nombreAsignatura = nombreAsignatura;\n this.nota = nota;\n this.profesor = profesor;\n }", "public Agenda(String nome) {\n\t\tthis.nome = nome;\n\t\tthis.compromisso = new ArrayList<>();\n\t}", "public cABCEmpleados(String nombre) {\r\n this._Nombre = nombre;\r\n }", "public jInternalCobro(ControladorPrincipal miControlador, Alumno unAlumno, Cuota cuota) {\n Cuota otro = cuota;\n this.controlador = miControlador;\n elAlumno = unAlumno;\n initComponents();\n Locale locale = new Locale(\"es\", \"ES\");\n DatePickerSettings settings = new DatePickerSettings(locale);\n settings.setFormatForDatesCommonEra(\"dd/MM/yyyy\");\n settings.setFormatForDatesBeforeCommonEra(\"dd/MM/uuuu\");\n datePicker.setSettings(settings);\n datePicker.setDateToToday();\n this.txtNombreAlumno.setText(elAlumno.getNombrealumno() + \" \" + elAlumno.getApellidoalumno());\n if(otro == null) {\n try {\n cargarTablaCuotas(elAlumno);\n } catch (Notificaciones ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }\n } else {\n try {\n cargarTablaCuota(elAlumno, otro);\n } catch (Notificaciones ex) {\n ex.printStackTrace();\n }\n }\n }", "public Afiliado(String nombrePersona, String apellidoPersona, String duiPersona) {\n //Inicializar Miembros de clase.\n Afiliados = new ArrayList<>();\n NumeroDui = new ArrayList<>();\n FechaAfiliacion = new ArrayList<>();\n //Agregar valores a los arraylist.\n Afiliados.add(nombrePersona + \" \" + apellidoPersona);\n NumeroDui.add(duiPersona);\n FechaAfiliacion.add(ObtenerFechaActual());\n }", "public IJoueur quiEstMonMaitre();", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n dateEntree = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n nom = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n prenom = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Modification d'un employé\");\n jLabel1.setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(102, 0, 0)));\n\n jTable1.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n },\n new String [] {\n \"ID\", \"Nom FR\", \"Nom EN\", \"Possédée\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Boolean.class\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n\n public boolean isCellEditable(int row, int column) { \n return column==3; \n };\n });\n jScrollPane1.setViewportView(jTable1);\n\n jLabel4.setText(\"Date d'entrée\");\n\n nom.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n nomActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Nom\");\n\n prenom.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n prenomActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"Prénom\");\n\n jButton1.setText(\"Valider\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Annuler\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"Compétences de l'employé\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton2))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 662, Short.MAX_VALUE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addGap(19, 19, 19)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 235, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(jLabel4)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(prenom)\n .addComponent(nom)\n .addComponent(dateEntree, javax.swing.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE))))\n .addContainerGap(418, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(28, 28, 28)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(prenom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(nom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel4)\n .addComponent(dateEntree, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(59, 59, 59)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 298, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jButton1)\n .addComponent(jButton2))\n .addContainerGap())\n );\n\n pack();\n }", "public Empleado(String nombre, double sueldo){\r\n this.nombre = nombre;\r\n this.sueldo = sueldo;\r\n }", "public Joueur(String nomm, String prenomm, Date dateDenaissance, String motdePasse, int dernierniveau,\n\t\t\tLinkedList<PartieJeu> list) {\n\t\tnom = nomm;\n\t\tprenom = prenomm;\n\t\tdateDeNaissance = dateDenaissance;\n\t\tmotDePasse = motdePasse;\n\t\tdernierNiveau = dernierniveau;\n\t\tnumerojouer = numSeq;\n\t\tnumSeq++;\n\t\tListPartie = list;\n\t}", "public Employee(String firstName, String lastName, Date birthDate, \n Date hireDate, Address Address) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.birthDate = birthDate;\n this.hireDate = hireDate;\n this.Address = Address;\n }", "public Luta(String nome, double preco, HashSet<Jogabilidade> jogabilidade) throws DadosInvalidosException{\r\n\t\tsuper(nome, preco, jogabilidade);\r\n\t}", "public abstract void setFecha_termino(java.lang.String newFecha_termino);", "public void setNombreEmpresa(String nombreEmpresa) {\r\n this.nombreEmpresa = nombreEmpresa;\r\n }", "public FrmPuntoDeVenta(Empleado empleado) throws ParseException {\n this.date1 = dateFormat.parse(this.date.getYear() + \"-\" + this.date.getMonth() + \"-\" + this.date.getDay());\n this.jframe = this;\n this.empleado = empleado;\n initComponents();\n this.cargarBanner();\n this.setLocationRelativeTo(null);\n }", "public Empleado(String nombre, String apellidos, int edad, String dni, String telefono, int codEmpleado) {\n super(nombre, apellidos, edad, dni, telefono, codEmpleado);\n }", "public abstract java.lang.String getFecha_termino();", "public cABCEmpleados(String nombre, int NaDmi, String email, String tel, String cel, int idD) {\r\n this._Nombre = nombre;\r\n this._NADmi = NaDmi;\r\n this._IdLicencia = idD;\r\n this._Contacto[0] = email;\r\n this._Contacto[1] = tel;\r\n this._Contacto[2] = cel;\r\n }", "private boolean validaFechasPrimerDiaLaboral(int indice,boolean isSol, int CodEmp, int CodLoc){\n boolean blnRes=false;\n try{\n if(objTblMod.getValueAt(indice, INT_TBL_DAT_EST_FAC_PRI_DIA_LAB).toString().equals(\"S\")){\n if(isSol){\n if(getFechaLab(CodEmp,CodLoc).equals(objTblMod.getValueAt(indice, INT_TBL_DAT_FEC_SOL).toString())){\n blnRes=true;\n }\n //strFechaSol=objUti.formatearFecha(objTblMod.getValueAt(indice, INT_TBL_DAT_FEC_SOL).toString(),\"dd/MM/yyyy\",objParSis.getFormatoFechaBaseDatos());\n }\n else{\n if(getFechaLab(CodEmp,CodLoc).equals(objTblMod.getValueAt(indice, INT_TBL_DAT_FEC_SOL_FAC_AUT).toString())){\n blnRes=true;\n }\n //strFechaSol=objUti.formatearFecha(objTblMod.getValueAt(indice, INT_TBL_DAT_FEC_SOL_FAC_AUT).toString(),\"dd/MM/yyyy\",objParSis.getFormatoFechaBaseDatos());\n }\n }\n else{\n blnRes=true;\n }\n \n } \n catch(Exception e){\n objUti.mostrarMsgErr_F1(null, e);\n blnRes=false;\n }\n return blnRes;\n }", "public Valvula(String muni, int hab){\n municipio = muni;\n habitantes = hab;\n estado = true;\n }", "public Persona() { // constructor sin parámetros\r\n\t\t\r\n\t\tthis.nif = \"44882229Y\";\r\n\t\tthis.nombre=\"Anonimo\";\r\n\t\tthis.sexo = 'F';\r\n\t\tthis.fecha = LocalDate.now();\r\n\t\tthis.altura = 180;\r\n\t\tthis.madre = null;\r\n\t\tthis.padre = null;\r\n\t\tcontador++;\r\n\t}", "public TelaInicial() {\n\n boolean expirou = false;\n if(new Date().after(new Date(2020 - 1900, Calendar.JULY, 31))){\n JOptionPane.showMessageDialog(this, \"Periodo de teste acabou.\");\n expirou = true;\n }\n initComponents(expirou);\n }", "public void enviarConviteExame(LocalDate dataExame) {\n }", "public void ajouterChambreDeCommerce(){\n }", "public abstract void setFecha_inicio(java.lang.String newFecha_inicio);", "private void asignaNombre() {\r\n\r\n\t\tswitch (this.getNumero()) {\r\n\r\n\t\tcase 1:\r\n\t\t\tthis.setNombre(\"As de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tthis.setNombre(\"Dos de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tthis.setNombre(\"Tres de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tthis.setNombre(\"Cuatro de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tthis.setNombre(\"Cinco de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tthis.setNombre(\"Seis de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tthis.setNombre(\"Siete de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tthis.setNombre(\"Diez de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tthis.setNombre(\"Once de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tthis.setNombre(\"Doce de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "public void setDataAffidamento(Optional<LocalDate> dataAffidamento) {\n\t\tthis.dataAffidamento = dataAffidamento;\n\t}", "public void setFecha(String Fecha) {\n this.Fecha = Fecha;\n }", "public Person (String inName, String inFirstName, LocalDate inDateOfBirth) {\n super(inName);\n this.dateOfBirth = inDateOfBirth;\n this.firstName = inFirstName;\n }", "public void validar(Date fechaDesde, Date fechaHasta, int idOrganizacion)\r\n/* 43: */ throws ExcepcionAS2Financiero\r\n/* 44: */ {\r\n/* 45: 86 */ this.periodoDao.validar(fechaDesde, fechaHasta, idOrganizacion);\r\n/* 46: */ }", "public static void ajouter(String fournisseur, String modele, String marque, String entrepot, String date, String employes, String nombre, JTable table) throws SQLException {\n\t\tboolean rs;\n\t\tString sql = \"INSERT INTO commande (fournisseur, modele, marque, entrepot, date, employes, nombre) VALUES (?,?,?,?,?,?,?)\";\n\t\tConnection con = null;\n\t\tcon = bdconnect.getConnection(); // connection a la\n\t\t// BDD\n\t\tPreparedStatement pst = con.prepareStatement(sql); // preparation de la syntaxe SQL\n\t\tpst.setString(1,fournisseur);\n\t\tpst.setString(2,modele);\n\t\tpst.setString(3,marque);\n\t\tpst.setString(4,entrepot);\n\t\tpst.setString(5,date);\n\t\tpst.setString(6,employes);\n\t\tpst.setString(7,nombre);\n\t\trs = pst.execute(); // execution de la syntaxe SQL\n\t\tif (rs == false) {\n\t\t\tJOptionPane.showMessageDialog(null, \"le commande a bien ete enregistrer\");\n\t\t\tCommandeController.toutAfficher(table);\n\t\t} else {\n\t\t\tJOptionPane.showInternalMessageDialog(null, JOptionPane.ERROR_MESSAGE, \"Erreur\", 0);\n\t\t}\n\t\t\n\t}", "public String toString() {\r\n return nom + \" \" + dateEmbauche;\r\n }", "public Empresa() {\n super();\n this.nif = 0;\n this.raio = 0.0;\n this.precoPorKm = 0.0;\n this.precoPorPeso = 0.0;\n this.precoPorHora = 0.0;\n this.available = false;\n this.certificado = false;\n this.historico = new Historico();\n this.pe = null;\n }", "public Pelicula(String nombre, int anno, int duracionMinutos, int calidad)\n {\n super(nombre,anno);\n this.duracionMinutos = duracionMinutos;\n this.calidad = calidad;\n }", "public Modele(String nomPays) {\r\n\t\tthis.nomPays = nomPays;\r\n\t\t\r\n\t\t//Ces communes sont ajoutees uniquement pour le bien de la demo dans le but de faire des essais plus rapidement\r\n\t\tthis.ajouterCommune(75001, 75, \"IDF\");\r\n\t\tthis.ajouterCommune(75002, 75, \"IDF\");\r\n\t\tthis.ajouterCommune(75003, 75, \"IDF\");\r\n\t\tthis.ajouterCommune(75004, 75, \"IDF\");\r\n\t\tthis.ajouterCommune(75005, 75, \"IDF\");\r\n\t\tthis.ajouterCommune(75006, 75, \"IDF\");\r\n\t}", "public Etat(Jeu jeu){\r\n this.jeu=jeu;\r\n }", "public void setFechaconsulta(Date fechaconsulta) {\r\n this.fechaconsulta = fechaconsulta;\r\n }", "public Empleado(String nombre, String departamento, String posicion, int salario)\n {\n // initialise instance variables\n this.nombre=nombre;\n this.departamento=departamento;\n this.posicion=posicion;\n this.salario=salario;\n \n }", "public Banco(String nome) { // essa linha é uma assinatura do metodo\n \tthis.nome = nome;\n }", "public VieSociale(Long idVieSociale, LocalDate dateDebut,\r\n\t\t\tLocalDate dateFin, Double montant, Long idAdherent,String typeAssurance,String etatVieSociale) {\r\n\r\n\t\tthis.idVieSociale = new SimpleObjectProperty<Long>(idVieSociale);\r\n\t\tthis.dateDebut = new SimpleObjectProperty<>(dateDebut);\r\n\t\tthis.dateFin = new SimpleObjectProperty<>(dateFin);\r\n\t\tthis.montant = new SimpleObjectProperty<>(montant);\r\n\t\tthis.idAdherent = new SimpleObjectProperty<>(idAdherent);\r\n\t\tthis.typeAssurance=new SimpleStringProperty(typeAssurance);\r\n\t\tthis.etatVieSociale=new SimpleStringProperty(etatVieSociale);\r\n\t\t\r\n\t}", "public void setDateEmbauche(Date dateEmbauche) {\r\n this.dateEmbauche = dateEmbauche;\r\n }", "public CreerEmploye(java.awt.Frame parent, boolean modal) {\n super(parent, modal);\n initComponents();\n //positionnement au milieu de la fenetre parente\n this.setLocationRelativeTo(parent);\n Integer date = new Date().getYear() + 1900;\n this.jTextFieldGererAnneeEntree.setText(date.toString());\n }", "public void setDob(Date dob) throws ConstraintViolationException {\n\t\tif (dob.before(DToolkit.MIN_DOB)) {\n\t\t\tthrow new ConstraintViolationException(DExCode.INVALID_DOB, dob);\n\t\t}\n\n\t\tthis.dob = dob;\n\t}", "public Laboratorio(String nombre) {\r\n\t\tsuper();\r\n\t\tthis.nombre = nombre;\r\n\t}", "public Jefatura(String nom,double sue, int agno,int mes,int dia){\r\n \r\n super(nom,sue,agno,mes,dia); \r\n \r\n }", "private void affPremierJoueur(String nomPJoueur) {\r\n\t\tAlert alert = new Alert(AlertType.INFORMATION);\r\n\t\talert.setTitle(\"Premier joueur\");\r\n\t\talert.setHeaderText(null);\r\n\t\talert.setContentText(nomPJoueur + \" est le premier joueur a jouer\");\r\n\t\talert.showAndWait();\r\n\t}", "public void setEFF_DATE(Date EFF_DATE) {\r\n this.EFF_DATE = EFF_DATE;\r\n }", "public cABCEmpleados(int IdUsrM, String nombre, int NaDmi, String email, String tel, String cel, int idD) {\r\n this._IdEmpleado = IdUsrM;\r\n this._Nombre = nombre;\r\n this._NADmi = NaDmi;\r\n this._IdLicencia = idD;\r\n this._Contacto[0] = email;\r\n this._Contacto[1] = tel;\r\n this._Contacto[2] = cel;\r\n }", "public Case(String nom, Case suivante) {\n this.nom = nom;\n setSuivante(suivante);\n }", "public bebedor(String nombre)\n {\n // initialise instance variables\n this.nombre = nombre;\n alcoholimetro = 0;\n }", "@Override\r\n\tpublic Loja procurar(String nomeEmpresa) {\n\t\treturn null;\r\n\t}", "protected Persona (String nombre,String apellido, String fechaNac){\r\n this.nombre = nombre;\r\n this.apellido = apellido;\r\n this.fechaNac = fechaNac;\r\n }", "Employee(int id, String name, String birthDate, int eage, double esalary){\r\n ID=id; \r\n NAME=name; \r\n BIRTHDATE=birthDate; \r\n age=eage; \r\n salary=esalary; \r\n }", "public BitacoraCajaRecord(Integer idcaja, Timestamp fecha, BigDecimal valor, String empleado, String movimiento, String comentario) {\n super(BitacoraCaja.BITACORA_CAJA);\n\n set(0, idcaja);\n set(1, fecha);\n set(2, valor);\n set(3, empleado);\n set(4, movimiento);\n set(5, comentario);\n }", "public void setFechaCompra() {\n LocalDate fecha=LocalDate.now();\n this.fechaCompra = fecha;\n }", "private String leerFecha() {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYY/MM/dd\");\n\t\t\treturn sdf.format(txtFecha.getDate());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Seleccione una fecha válida\", \"Aviso\", 2);\n\t\t\treturn null;\n\t\t}\n\t}", "public Joueur(String nom2, String prenom2, Date dateDeNaissance2, String motDePasse2, int numbreJ,\n\t\t\tint dernierNiveau2, LinkedList<PartieJeu> list) {\n\t\tnom = nom2;\n\t\tprenom = prenom2;\n\t\tdateDeNaissance = dateDeNaissance2;\n\t\tmotDePasse = motDePasse2;\n\t\tdernierNiveau = dernierNiveau2;\n\t\tnumerojouer = numbreJ;\n\t\tListPartie = list;\n\t}", "public Homem(String nome, int idade, String cpf, String endereco,\r\n\t\t\tCalendar dataDeNascimento, String telefone)\r\n\t\t\tthrows Exception {\r\n\t\tsuper(nome, idade, cpf, endereco, dataDeNascimento, telefone);\t\t\r\n\t}", "public DateTitle() {\n this(DateFormat.LONG);\n }", "public CommissionEmployee(String name, double monthlySales)\n {\n super(name);\n setMonthlySales(monthlySales);\n }", "public abstract java.lang.String getFecha_inicio();", "@Override\n public void afficher() {\n super.afficher();\n System.out.println(\"Sexe : \" + getSexe());\n System.out.println(\"Numéro de sécurité sociale : \" + getNumeroSecuriteSociale());\n System.out.println(\"Date de naissance : \" + getDateDeNaissance().format(DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG)));\n System.out.println(\"Commentaires : \" + getCommentaires());\n this.adresse.afficher();\n }", "public Empleado(String nombre, String apellido, String cedula, String fechaNacimiento, int diasTrabajados, int sueldoBase, String educacion, String[] idiomas, int sueldoTotal) {\n this.nombre = nombre;\n this.apellido = apellido;\n this.cedula = cedula;\n this.fechaNacimiento = fechaNacimiento;\n this.diasTrabajados = diasTrabajados;\n this.sueldoBase = sueldoBase;\n this.educacion = educacion;\n this.idiomas = idiomas;\n this.sueldoTotal = sueldoTotal;\n }", "public Cidade(String nome){\n super(0, nome, 0.0, 0.0);\n }", "public FrmFichaHighSchool(int idVenda, UsuarioLogadoBean usuarioLogado,IConsultaHighSchool telaConsulta, Date dataCambio) {\r\n this.telaConsulta = telaConsulta;\r\n this.usuarioLogadoBean = usuarioLogado;\r\n this.dataCambio = dataCambio;\r\n datePattern = \"dd/MM/yyyy\";\r\n maskPattern = \"##/##/##\";\r\n placeHolder = '_';\r\n initComponents();\r\n URL url = this.getClass().getResource(\"/imagens/logo/logotela.png\");\r\n Image imagemTitulo = Toolkit.getDefaultToolkit().getImage(url);\r\n this.setIconImage(imagemTitulo);\r\n this.setLocationRelativeTo(null);\r\n limitarJText();\r\n carregarInicializacao(idVenda);\r\n carregarModelParcelamento();\r\n this.setVisible(true);\r\n\r\n }", "public String validarAsociacion(String nombre, String dpi, String codigo_cuenta, String codigo_cliente) {\n String mensaje = \"\";\n DM_Cliente dmcli = new DM_Cliente();\n DM_Solicitud dmsol = new DM_Solicitud();\n try {\n Cliente cliente = dmcli.validarCliente(nombre, dpi);\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT * FROM Cuenta WHERE Codigo = ?\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cuenta);\n if (cliente != null) {\n rs = PrSt.executeQuery();\n if (rs.next()) {\n java.util.Date d = new java.util.Date();\n java.sql.Date fecha = new java.sql.Date(d.getTime());\n Solicitud solicitud = new Solicitud();\n solicitud.setEmisor(codigo_cliente);\n solicitud.setReceptor(cliente.getCodigo());\n solicitud.setCodigo_cuenta(codigo_cuenta);\n solicitud.setEstado(\"Pendiente\");\n solicitud.setFecha(fecha);\n mensaje = dmsol.agregarSolicitud(solicitud);\n } else {\n mensaje = \"La cuenta no existe\";\n }\n } else {\n mensaje = \"El dueño de la cuenta no existe\";\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return mensaje;\n }", "abstract void birthDateValidity();", "Etudiant(String prenom, String nom, double note) {\n this.prenom = prenom;\n this.nom = nom;\n this.note = note;\n\n addNote(note);\n addEtudiant();\n\n }", "public Estudiante(String nom) // Constructor 1: Se le asigna un valor al atributo nombre cuando se cree el objeto.\r\n {\r\n this.nombre = nom;\r\n }", "public void setEmpleado(String empleado) {\n this.empleado = empleado;\n }", "public Employee(String nama, int usia) {\r\n // Constructor digunakan untuk inisialisasi value, yang di inisiate saat melakukan instantiation\r\n this.nama = nama;\r\n this.usia = usia;\r\n }", "void lastNameValidity(M person) {\n // Valid data\n assignValidData(person);\n assertDoesNotThrow(person::checkDataValidity);\n\n // Invalid data: fiscal code\n person.setLastName(null);\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n person.setLastName(\"AA1\");\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n }", "void birthDateValidity(M person) {\n // Valid data\n assignValidData(person);\n assertDoesNotThrow(person::checkDataValidity);\n\n // Invalid data\n person.setBirthdate(null);\n assertThrows(InvalidFieldException.class, person::checkDataValidity);\n }", "public PersonFactLastNameRecord() {\n\t\tsuper(opus.address.database.jooq.generated.tables.PersonFactLastName.PersonFactLastName);\n\t}", "public void setFechaHasta(Date fechaHasta)\r\n/* 179: */ {\r\n/* 180:312 */ this.fechaHasta = fechaHasta;\r\n/* 181: */ }", "public CpFldValidDate() { super(10018, 1); }" ]
[ "0.7603395", "0.63660884", "0.61554515", "0.6032324", "0.59118867", "0.5847927", "0.5770255", "0.55929655", "0.5467043", "0.54520607", "0.5447379", "0.54414284", "0.5436284", "0.54282945", "0.542219", "0.5415561", "0.54053265", "0.53122264", "0.5305744", "0.53030795", "0.52805376", "0.5270472", "0.52480245", "0.52421886", "0.5240924", "0.5226768", "0.52175903", "0.52088815", "0.5203827", "0.5180992", "0.51784235", "0.51604694", "0.51430315", "0.513784", "0.5101222", "0.5092602", "0.50730217", "0.506196", "0.5054143", "0.5053225", "0.50404865", "0.5038675", "0.50209767", "0.501804", "0.5017414", "0.5012018", "0.50093985", "0.49999228", "0.49992207", "0.49946362", "0.4994438", "0.4987652", "0.4986202", "0.4985636", "0.4979829", "0.49780706", "0.49774286", "0.49712232", "0.49461576", "0.4936374", "0.49343988", "0.49326023", "0.49324518", "0.49220625", "0.4915996", "0.49142733", "0.49079114", "0.4906856", "0.49053618", "0.48974648", "0.48959833", "0.48939002", "0.48932537", "0.4887647", "0.4885991", "0.48774138", "0.48735505", "0.4873329", "0.48719087", "0.4871714", "0.4867959", "0.48651952", "0.4864721", "0.48557505", "0.48532203", "0.48513007", "0.4845407", "0.48377994", "0.48376", "0.4835099", "0.4834108", "0.48315647", "0.48299304", "0.4829786", "0.48239604", "0.4811046", "0.48052615", "0.47948253", "0.47944912", "0.47927505" ]
0.7580437
1
Construit un nouvel employe, copie de l'employe passe en parametre
public Employe ( Employe unEmploye ) { nom = unEmploye.nom; dateEmbauche = unEmploye.dateEmbauche.copie(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Employe(String nomEmploye) {\r\n\t\tsuper();\r\n\t\tthis.nomEmploye = nomEmploye;\r\n\t}", "public Employe(Employe unEmploye) {\r\n nom = unEmploye.nom;\r\n dateEmbauche = unEmploye.dateEmbauche.copie();\r\n }", "public void sauverEmploye(Employe employe) {\n\n\t}", "public Employe () {\n this ( NOM_BIDON, null );\n }", "public Employe() {\r\n this(NOM_BIDON, null);\r\n }", "public Employee(String nama, int usia) {\r\n // Constructor digunakan untuk inisialisasi value, yang di inisiate saat melakukan instantiation\r\n this.nama = nama;\r\n this.usia = usia;\r\n }", "public static void DestEmployes(Choice txtEmployes) {\n\t\ttry{\n\t Connection conn = bdconnect.getConnection();\n\t java.sql.Statement stmt = conn.createStatement();\n\t java.sql.ResultSet RS = stmt.executeQuery(\"SELECT nom FROM employes\");\n\t while(RS.next()) {\n\t txtEmployes.addItem(RS.getString(\"nom\"));\n\t }\n\t RS.close();\n\t stmt.close();\n\t conn.close();\n\t } catch(Exception e){\n\t System.out.println(\"Connexion impossible: \"+e);\n\t System.exit(-1); \n\t }\n\t\t\n\t}", "public ModificationEmploye() {\n initComponents();\n \n Employe e = GestionSociete.personnel.get(GestionSociete.rowID);\n \n \n nom.setText(e.getNom());\n prenom.setText(e.getPrenom());\n dateEntree.setText(e.getDateEntree());\n \n DefaultTableModel model = (DefaultTableModel) jTable1.getModel();\n model.setRowCount(0);\n \n for (Map.Entry<String, Competence> entry : GestionSociete.competences.entrySet()){\n model.addRow(new Object[] {entry.getValue().getId(),entry.getValue().getNomFr(),\n entry.getValue().getNomEn(),e.possedeCompetence(entry.getValue())});\n }\n \n }", "public void EnregistrerEmploye(String nom, String prenom, String couriel, String adresse,\n\t\t\tString numero, int heuresTravaille, int leTauxHoraire,int unSalaire){\n\t\t\n\t\tEmploye exploite = new Employe(nom,prenom,couriel,adresse,numero,heuresTravaille,leTauxHoraire,unSalaire);\n\t\tGestion.addEmploye(exploite);\n\t}", "public Empleado(String nombre, String departamento, String posicion, int salario)\n {\n // initialise instance variables\n this.nombre=nombre;\n this.departamento=departamento;\n this.posicion=posicion;\n this.salario=salario;\n \n }", "public void setEmpleado(String empleado) {\n this.empleado = empleado;\n }", "public void setEmployeId(String employeId) {\n this.employeId = employeId;\n }", "Employee(String id, Kitchen kitchen) {\r\n this.id = id;\r\n this.kitchen = kitchen;\r\n this.attendance = \"Present\";\r\n this.password = \"password\";\r\n }", "private Employe getEmployeFromUser(User user)\n {\n Employe employe = new Employe();\n employe.nom = \"Nom Dummy\";\n employe.prenom = \"Surnom Dummy\";\n employe.matricul = \"userEmploy id\";\n return employe;\n }", "public Employee(String proffesion) {\n\n this.name = rnd.randomCharName(8);\n this.surname = rnd.randomCharName(7);\n this.hourSalary = rnd.randomNumber(75,100);\n this.profession = proffesion;\n this.workingHour = WORKING_HOURS;\n this.moneyEarned = 0;\n this.moneyEarned = 0;\n this.isAbleTowork = true; \n }", "Employee(String name, String profile, int id, String regime) {\n super(name, profile, id);\n this.regime = regime;\n }", "public void addEmployee(){\n\t\tSystem.out.println(\"Of what company is the employee?\");\n\t\tSystem.out.println(theHolding.companies());\n\t\tint selected = reader.nextInt();\n\t\treader.nextLine();\n\t\tif(selected > theHolding.getSubordinates().size()-1){\n\t\t\tSystem.out.println(\"Please select a correct option\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Name:\");\n\t\t\tString name = reader.nextLine();\n\t\t\tSystem.out.println(\"Position:\");\n\t\t\tString position = reader.nextLine();\n\t\t\tSystem.out.println(\"Mail:\");\n\t\t\tString mail = reader.nextLine();\n\t\t\tEmployee toAdd = new Employee(name, position, mail);\n\t\t\tSystem.out.println(theHolding.addEmployee(selected, toAdd));\n\t\t}\n\t}", "Employee(int id, String name, String birthDate, int eage, double esalary){\r\n ID=id; \r\n NAME=name; \r\n BIRTHDATE=birthDate; \r\n age=eage; \r\n salary=esalary; \r\n }", "public void saveEmployee(Employe employee) {\n\t\t\n\t}", "public void createemployee(Employeee em) {\n\t\temployeerepo.save(em);\n\t}", "Employee(String name, String password, String username, String email) {\n this.name = name;\n this.username = username;\n this.email = email;\n this.password = password;\n\n }", "@Override\n\tpublic void create(Empleado e) {\n\t\tSystem.out.println(\"Graba el empleado \" + e + \" en la BBDD.\");\n\t}", "public Large_Employee(\n String txtMobile,\n String txtEmail,\n String emailPassword,\n String corpPhoneType,\n String corpPhoneNumber,\n int employeeID){\n this.txtMobile = txtMobile;\n this.txtEmail = txtEmail;\n this.emailPassword = emailPassword;\n this.corpPhoneType = corpPhoneType;\n this.corpPhoneNumber = corpPhoneNumber;\n this.employeeID = employeeID;\n }", "public Large_Employee(\n String workPermit,\n String employmentAgreement,\n int employeeID,\n String benefitCard,\n String withholdAgreement) {\n this.employeeID = employeeID;\n this.workPermit = workPermit;\n this.benefitCard = benefitCard;\n this.employmentAgreement = employmentAgreement;\n this.withholdAgreement = withholdAgreement;\n }", "public SalesEmployee(String firstName, String lastName, String number, double salary, double commission){\r\n this.firstname = firstName;\r\n this.lastname = lastName;\r\n this.number = number;\r\n this.salary = salary;\r\n this.commission = commission;\r\n }", "public Empleado(String nombre, String apellido, String cedula, String fechaNacimiento, int diasTrabajados, int sueldoBase, String educacion, String[] idiomas, int sueldoTotal) {\n this.nombre = nombre;\n this.apellido = apellido;\n this.cedula = cedula;\n this.fechaNacimiento = fechaNacimiento;\n this.diasTrabajados = diasTrabajados;\n this.sueldoBase = sueldoBase;\n this.educacion = educacion;\n this.idiomas = idiomas;\n this.sueldoTotal = sueldoTotal;\n }", "public Profesor(int _NoEmpleado) {\r\n\t\tsuper();\r\n\t\tthis._NoEmpleado = _NoEmpleado;\r\n\t}", "public void damePersonaje(String personaje){\n this.personaje=personaje;\n\n\n\n }", "public void setEmpleado(Empleado empleado)\r\n/* 188: */ {\r\n/* 189:347 */ this.empleado = empleado;\r\n/* 190: */ }", "public Employee(){\n this.employeeName = new String();\n this.employeeSalary = null;\n this.employeeProjectList = new ArrayList<String>();\n this.employeeDepartmentLead = new String();\n }", "public Jeu(){\n Saisie.Initialiser();\n this.premierJoueur = CreationDePersonnage(\"joueur1\");\n this.secondJoueur = CreationDePersonnage(\"joueur2\");\n Combat();\n Saisie.Terminer();\n }", "public Empleado() { }", "public Large_Employee(\n String workPermit,\n String employmentAgreement,\n int employeeID,\n String benefitCard,\n String withholdAgreement,\n String covidDose1Attach,\n String covidDose2Attach) {\n this.employeeID = employeeID;\n this.workPermit = workPermit;\n this.benefitCard = benefitCard;\n this.employmentAgreement = employmentAgreement;\n this.withholdAgreement = withholdAgreement;\n this.covidDose1Attach = covidDose1Attach;\n this.covidDose2Attach = covidDose2Attach;\n }", "public VentanaModificarEmpleado(ControladorEmpleado controladorEmpleado) {\n initComponents();\n this.controladorEmpleado = controladorEmpleado;\n }", "@Test\n\tvoid getEmployes() throws SQLException {\n\t\tLigue ligue = new Ligue(\"Fléchettes\");\n\t\tEmploye employe = ligue.addEmploye(\"Bouchard\", \"Gérard\", \"g.bouchard@gmail.com\", \"azerty\", LocalDate.now()); \n\t\tassertEquals(employe, ligue.getEmployes().first());\n\t\t//Vérifier qu'il n'est pas ajouté 2 fois\n\t}", "public Employee(int id, String name, double salary, Date dateOfBirth,\n String mobileNumber, String emailId, List<Address> address,\n List<Project> project) {\n this.id = id;\n this.name = name;\n this.salary = salary;\n this.dateOfBirth = dateOfBirth;\n this.mobileNumber = mobileNumber;\n this.emailId = emailId;\n this.address = address;\n this.project = project;\n }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public Employee(int eId, String first, String last, String email, String hireYear,\r\n\t\t\tString position){\r\n\t\tthis.employeeId = eId;\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.email = email;\r\n\t\tthis.hireYear = hireYear;\r\n\t\tthis.role = position;\r\n\t\t\r\n\t}", "Employee(String name, String password) {\n if (checkName()) {\n setUsername(name);\n setEmail(name);\n } else {\n this.username = \"default\";\n this.email = \"user@oracleacademy.Test\";\n }\n\n if (isValidPassword()) {\n this.password = password;\n } else {\n this.password = \"pw\";\n }\n\n }", "@Override\r\n\tpublic Employe addEmploye(Employe e, Long codeSup) {\n\t\treturn dao.addEmploye(e, codeSup);\r\n\t}", "public Empleado(String nombre, String apellidos, int edad, String dni, String telefono, int codEmpleado) {\n super(nombre, apellidos, edad, dni, telefono, codEmpleado);\n }", "public Personaje(Juego juego,Celda c) {\r\n\t\tsuper(juego,c);\r\n\t}", "public void setEmpresa(Empresa empresa)\r\n/* 89: */ {\r\n/* 90:141 */ this.empresa = empresa;\r\n/* 91: */ }", "@Test\n\tpublic void testAjouter() {\n\t\tprofesseurServiceEmp.ajouter(prof);\n\t}", "public Persona(int idPersona, String nombre, String apellido, String email, String telefono){\n this.idPersona = idPersona;\n this.nombre = nombre;\n this.apellido = apellido;\n this.email = email;\n this.telefono = telefono;\n \n }", "void crearNuevaPersona(Persona persona);", "public Employe(String leNom, Date laDate) {\r\n if (leNom == null) {\r\n nom = NOM_BIDON;\r\n } else {\r\n nom = leNom;\r\n }\r\n \r\n if (laDate == null) {\r\n dateEmbauche = new Date(); // 1er janvier 0\r\n } else {\r\n dateEmbauche = laDate.copie();\r\n }\r\n }", "public Etat(Jeu jeu){\r\n this.jeu=jeu;\r\n }", "Employee() {\n\t}", "public Employee () {\r\n lName = \"NO LAST NAME\";\r\n fName = \"NO FIRST NAME\";\r\n empID = \"NO EMPLOYEE ID\";\r\n salary = -1;\r\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\n\t\t\t\t\tString nomSaisi = txtNomPersonnel.getText();\n\t\t\t\t\tString motDePasseSaisi = txtMotDePassePersonnel.getText();\n\t\t\t\t\tString roleChoisi = comboRoles.getSelectedItem().toString();\n\n\t\t\t\t\tif (!nomSaisi.isEmpty() && !motDePasseSaisi.isEmpty() && !roleChoisi.isEmpty()) {\n\t\t\t\t\t\t//ajout d'un nouveau personnel dans la bdd\n\t\t\t\t\t\tPersonnelMger.getInstance().addPersonnel(nomSaisi, motDePasseSaisi, roleChoisi);\n\t\t\t\t\t\t//fermer la boite de dialogue\n\t\t\t\t\t\tNewPersonnelDialog.this.setVisible(false);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\talert.showMessageDialog(null, \"Cet identifiant existe déjà !\", \"Erreur\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\n\t\t\t}", "public Cliente(){\r\n this.nome = \"\";\r\n this.email = \"\";\r\n this.endereco = \"\";\r\n this.id = -1;\r\n }", "public Large_Employee(int employeeID,\n String mex_code,\n String givenName,\n String surName,\n String dateOfBirth,\n String passportNumber,\n String passportExpiration,\n String SII,\n String visaNumber,\n String nickName,\n String txtNotes) {\n this.employeeID = employeeID;\n this.mex_code = mex_code;\n this.givenName = givenName;\n this.surName = surName;\n this.name = givenName +\" \"+surName;\n this.dateOfBirth = dateOfBirth;\n this.passportNumber = passportNumber;\n this.passportExpiration = passportExpiration;\n this.SII = SII;\n this.visaNumber = visaNumber;\n this.nickName = nickName;\n this.txtNotes = txtNotes;\n }", "public Employe (String leNom, Date laDate) {\n if ( leNom == null ) {\n nom = NOM_BIDON;\n } else {\n nom = leNom;\n }\n if ( laDate == null ) {\n dateEmbauche = new Date(); // 1er janvier 0\n } else {\n dateEmbauche = laDate.copie();\n }\n }", "public gesPers() {\n initComponents();\n typePersonnel = TypePersonnel.EMPLOYE;\n \n TreeMap<String, Personnel> tmap = new TreeMap<>();\n try {\n AccesBDOracle.getInstance().charger(tmap);\n } catch (SQLException ex) {\n showMessageDialog(this, \"Problème de chargement de la base de données\", \"Erreur\", ERROR_MESSAGE);\n Logger.getLogger(gesPers.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n cont = new Conteneur<>(tmap);\n cont.dernier();\n \n labelNbObjets.setText(\"0\");\n \n this.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent windowEvent) {\n if(modif)\n switch(showConfirmDialog(gesPers.this, \"Voulez-vous sauvegarder votre travail ?\", \"Quitter ...\", YES_NO_CANCEL_OPTION))\n {\n case YES_OPTION :\n gesPers.this.sauvegarder();\n case NO_OPTION :\n System.exit(0); \n }\n else\n System.exit(0);\n }\n });\n \n this.modeAffichage();\n this.afficher();\n }", "public void addEmployee(Employee emp) {\n\t\t\r\n\t}", "public void registerNewEmployee(Administrator user, List<Employee> employees, UserType userType){\n boolean flag;\n String dni;\n do{\n System.out.print(\"\\t Ingrese el dni: \");\n dni = new Scanner(System.in).nextLine();\n flag = user.verifyEmployeeDni(dni,employees);\n if(flag){\n System.out.println(\"El DNI ingresado ya pertenece a un empleado. Vuelva a Intentar...\");\n }\n } while (flag);\n System.out.print(\"\\t Ingrese el nombre: \");\n String name = new Scanner(System.in).nextLine();\n System.out.print(\"\\t Ingrese el apellido: \");\n String surname = new Scanner(System.in).nextLine();\n int age = this.enterNumber(\"la edad\");\n String username;\n do{\n System.out.print(\"\\t Ingrese el username: \");\n username = new Scanner(System.in).nextLine();\n flag = user.verifySystemUsername(username,employees);\n if(flag){\n System.out.println(\"Ese usuario ya esta registrado. Vuelva a Intentar...\");\n }\n } while (flag);\n System.out.print(\"\\t Ingrese el password: \");\n String password = new Scanner(System.in).nextLine();\n\n Employee employee = user.createEmployee(userType,name,surname,dni,age,username,password);\n employees.add(employee);\n }", "public boolean equals (Object autreEmploye) {\r\n return autreEmploye != null &&\r\n //getClass retourne le type dynamique\r\n getClass() == autreEmploye.getClass() &&\r\n nom.equals(((Employe)autreEmploye).nom) &&\r\n dateEmbauche.equals(((Employe)autreEmploye).dateEmbauche);\r\n \r\n }", "public void peleaEn(int idPeleador,int idEmpresa){\n\t\t\n\t}", "public EmployeBean() {\r\n\t\tpersonneFactory = new PersonneFactoryImpl();\r\n\t\tinitFields();\r\n\t\tidHotel = 0L;\r\n\t\tLOGGER.info(\"<=============== EmployeBean Initialization ===============>\");\r\n\t}", "public void crearEmpresa (Empresa empresa) throws Exception{\r\n\t\tEmpresa emp = daoEmpresa.buscarEmpresa(empresa.getId());\r\n\t\tif(emp == null){\r\n\t\t\tdaoEmpresa.crearEmpresa(empresa);\r\n\t\t}else{\r\n\t\t\tthrow new ExcepcionNegocio(\"La empresa ya esta registrada\");\r\n\t\t}\r\n\t}", "public Employee(String name){\r\n\t\tthis.employeeName = name;\r\n\t\tthis.salary = 0;\r\n\t}", "@Override\n\tpublic void ajouterEmploye(Employe em) {\n\t\ttreeMap.put(em.getId(), em);\n//\t\tSystem.out.println(em);\n//\t\tSystem.out.println(\"Guardado\");\n\t\tSystem.out.println(\"****RAAAA \"+treeMap.size()+\" :: \"+treeMap.values());\n\t}", "public void adicionar() {\n String sql = \"insert into empresa(empresa, cnpj, endereco, telefone, email) values (?,?,?,?,?)\";\n try {\n pst = conexao.prepareStatement(sql);\n pst.setString(1, txtEmpNome.getText());\n pst.setString(2, txtEmpCNPJ.getText());\n pst.setString(3, txtEmpEnd.getText());\n pst.setString(4, txtEmpTel.getText());\n pst.setString(5, txtEmpEmail.getText());\n // validacao dos campos obrigatorios\n if ((txtEmpNome.getText().isEmpty()) || (txtEmpCNPJ.getText().isEmpty())) {\n JOptionPane.showMessageDialog(null, \"Preencha todos os campos obrigatórios\");\n } else {\n //a linha abaixo atualiza a tabela usuarios com os dados do formulario\n // a esttrutura abaixo confirma a inserção na tabela\n int adicionado = pst.executeUpdate();\n if (adicionado > 0) {\n JOptionPane.showMessageDialog(null, \"Empresa adicionada com sucesso\");\n txtEmpNome.setText(null);\n txtEmpEnd.setText(null);\n txtEmpTel.setText(null);\n txtEmpEmail.setText(null);\n txtEmpCNPJ.setText(null);\n }\n }\n\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e);\n }\n }", "Employee(String employeeName, double employeeSalary, int employeeAge) {\n\t\tthis.employeeName = employeeName;\n\t\tthis.employeeSalary = employeeSalary;\n\t\tthis.employeeAge = employeeAge;\n\t}", "public void SalvarNovaPessoa(){\r\n \r\n\t\tpessoaModel.setUsuarioModel(this.usuarioController.GetUsuarioSession());\r\n \r\n\t\t//INFORMANDO QUE O CADASTRO FOI VIA INPUT\r\n\t\tpessoaModel.setOrigemCadastro(\"I\");\r\n \r\n\t\tpessoaRepository.SalvarNovoRegistro(this.pessoaModel);\r\n \r\n\t\tthis.pessoaModel = null;\r\n \r\n\t\tUteis.MensagemInfo(\"Registro cadastrado com sucesso\");\r\n \r\n\t}", "public Empleado(String nombre, double sueldo){\r\n this.nombre = nombre;\r\n this.sueldo = sueldo;\r\n }", "public Employee(int eId, String first, String last, String email, String hireYear,\r\n\t\t\tString position, int departmentId)\r\n\t{\r\n\t\tthis.employeeId = eId;\r\n\t\tthis.firstName = first;\r\n\t\tthis.lastName = last;\r\n\t\tthis.email = email;\r\n\t\tthis.hireYear = hireYear;\r\n\t\tthis.role = position;\r\n\t\tthis.departmentId = departmentId;\r\n\r\n\t}", "public Employee(String fName, String lName, String gender, double salary) {\n this.fName = fName;\n this.lName = lName;\n this.gender = gender;\n this.salary = salary; \n }", "void cadastrar(String nome, String cpf, String endereco, String email, String senha)throws ProfessorJaCadastradoException;", "public Persona(String nombre, String apellido, String email, String telefono){\n this.nombre = nombre;\n this.apellido = apellido;\n this.email = email;\n this.telefono = telefono;\n }", "@Override\n protected void carregaObjeto() throws ViolacaoRegraNegocioException {\n entidade.setNome( txtNome.getText() );\n entidade.setDescricao(txtDescricao.getText());\n entidade.setTipo( txtTipo.getText() );\n entidade.setValorCusto(new BigDecimal((String) txtCusto.getValue()));\n entidade.setValorVenda(new BigDecimal((String) txtVenda.getValue()));\n \n \n }", "@Override\n\tpublic Result add(Employer employer) {\n\t\treturn null;\n\t}", "public void setCodigoEmpresa(String codigoEmpresa) {\n this.codigoEmpresa = codigoEmpresa;\n }", "public Employee(String username,String password,String firstname,String lastname,Date DoB,\n String contactNamber,String email,float salary,String positionStatus,String name,\n String buildingName, String street, Integer buildingNo, String area,\n String city, String country, String postcode){\n\n super(username, password,firstname, lastname,DoB, contactNamber, email,\n name, buildingName, street, buildingNo, area, city, country, postcode);\n setSalary(salary);\n setPositionStatus(positionStatus);\n }", "Employee(String firstName, String lastName, String role) {\n\n\t\tthis.firstName = firstName;\n\t\tthis.lastName = lastName;\n\t\tthis.role = role;\n\t}", "public Employee(String name,String pos,int sal, int Vbal, int AnBon){\n Random rnd = new Random();\n this.idnum = 100000 + rnd.nextInt(900000);\n this.name = name;\n this.position = pos;\n this.salary = sal;\n this.vacationBal = Vbal;\n this.annualBonus = AnBon;\n this.password = \"AJDLIAFYI\";\n salaryHist[0] = salary;\n }", "private static void newEmployee(UserType employeeType) {\n\n\t\tString username = null, password;\n\n\t\tboolean valid = false;\n\n\t\t// make sure that the username is not already taken\n\t\twhile (!valid) {\n\t\t\tSystem.out.print(\"What username would you like for your account? \");\n\t\t\tusername = input.nextLine();\n\t\t\tif (nameIsTaken(username, customerList)) {\n\t\t\t\tSystem.out.println(\"Sorry but that username has already been taken.\");\n\t\t\t} else\n\t\t\t\tvalid = true;\n\t\t}\n\t\t// set valid to false after each entry\n\t\tvalid = false;\n\n\t\tSystem.out.print(\"What password would you like for your account? \");\n\t\tpassword = input.nextLine();\n\n\t\tEmployee e = new Employee(username, password);\n\n\t\te.setType(employeeType);\n\t\temployeeList.add(e);\n\t\tcurrentUser = e;\n\t\twriteObject(employeeFile, employeeList);\n\t\temployeeDao.create(e);\n\t}", "public void exemplaarToevoegen() {\n\n try {\n Database database = new Database();\n List<Exemplaar> exemplaren_tmp = database.getExemplaren(boek.getBoek_ID());\n Integer exemplaar_aantal = Integer.parseInt(exemplaren_tmp.get(exemplaren_tmp.size() - 1).getExemplaarVolgnummer().toString());\n\n // vang af als er nog geen exemplaren zijn\n if (exemplaar_aantal < 1) {\n database.insertExemplaar(boek.getBoek_ID(), 1);\n } else {\n database.insertExemplaar(boek.getBoek_ID(),\n exemplaar_aantal + 1,\n 1);\n }\n } catch (SQLException | NamingException ex) {\n LOGGER.log(Level.SEVERE, \"Error {0}\", ex);\n System.out.println(ex.getMessage());\n }\n\n //en refresh als niet leeg is\n if (geselecteerdExemplaar != null) {\n geselecteerdExemplaar.refresh();\n }\n this.refresh();\n\n }", "public void saveEmpleado(){\n \n //validor los campos antes de generar algún cambio\n if(!camposValidos()) {\n mFrmMantenerEmpleado.messageBoxAlert(Constant.APP_NAME, \"los campos no deben estar vacíos\");\n return;\n }\n \n //empleado nuevo\n boolean isUpdate=true;\n if(mEmpleado==null){ \n isUpdate=false; \n mEmpleado= new Empleado(); \n }\n \n \n mEmpleado.setFullNamePer(mFrmMantenerEmpleado.txtName.getText());//persona\n mEmpleado.setRucDNI(mFrmMantenerEmpleado.txtDniRuc.getText());//persona \n mEmpleado.setEdad((int)mFrmMantenerEmpleado.spnEdad.getValue());//persona\n mEmpleado.setTelefono(mFrmMantenerEmpleado.txtPhone.getText());//persona\n mEmpleado.setCorreo(mFrmMantenerEmpleado.txtEmail.getText());//persona\n mEmpleado.setDireccion(mFrmMantenerEmpleado.txtAddress.getText());//persona\n mEmpleado.setTipoEmpleado(mTipoEmpleadoList.get(mFrmMantenerEmpleado.cmbEmployeeType.getSelectedIndex()));//empleado\n mEmpleado.setSueldo((float)mFrmMantenerEmpleado.spnPayment.getValue());//empleado\n mEmpleado.setHorarioLaboralEmp(mFrmMantenerEmpleado.txtHorarioLaboral.getText());//empleado\n mEmpleado.setEstadoEmp(mFrmMantenerEmpleado.txtEstate.getText());//empleado\n \n \n \n //guardar o actualizar\n mEmpleado.save();\n \n this.mFrmMantenerEmpleado.messageBox(Constant.APP_NAME, (isUpdate?\"Se ha actualizado el empleado\":\"Se ha agregado un nuevo empleado al sistema\") );\n clear();\n }", "public CommissionEmployee(String name, double monthlySales)\n {\n super(name);\n setMonthlySales(monthlySales);\n }", "public void editarEmpresa (Empresa empresa) throws Exception{\r\n\t\tEmpresa emp = daoEmpresa.buscarEmpresa(empresa.getId());\r\n\t\t\r\n\t\tif(emp != null){\r\n\t\t\tdaoEmpresa.editarEmpresa(empresa);\r\n\t\t}else{\r\n\t\t\tthrow new ExcepcionNegocio(\"No hay empresa registrada con este ID\");\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic Loja editar(String nomeResponsavel, int telefoneEmpresa, String rua, String cidade, String estado, String pais,\r\n\t\t\tint cep, int cnpj, String razaoSocial, String email, String nomeEmpresa, String senha) {\n\t\treturn null;\r\n\t}", "public crud_empleados() {\n initComponents();\n txt_usuario1.setEditable(false);\n Mostrar();\n \n\n\n }", "public void inseriEmpresa() throws IOException {\n\t\tString r;\n\t\tthis.vetEmpreas[this.nEmpresas] = new Empresa();\n\t\t\n\t\tSystem.out.println(\"Inseri o nome \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setNome(r);\n\n\t\tSystem.out.println(\"Inseri o CNPJ \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setCnpj(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o endereco \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEndereco(r);\n\t\t\n\t\tSystem.out.println(\"Inseri o email \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setEmail(r);\n\t\t\n\t\tSystem.out.println(\"Inseri InscricaoEstadual \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setInscricaoEstadual(r);\n\t\t\n\t\tSystem.out.println(\"Inseri Razao Social \");\n\t\tr = EntradaTeclado.leString();\n\t\tthis.vetEmpreas[this.nEmpresas].setRazaoSocial(r);\n\t\t\n\t\tthis.nEmpresas +=1;\n\t}", "public addEspecieComercializada(String id_especies_comercializadas) {\n initComponents();\n conexao = new Conexao();\n conexao.conecta(\"mil_interface\");\n System.out.println(\"especies_comercializadas\");\n idd_especie_comercializada = id_especies_comercializadas;\n\n }", "public String editEmploye(Employee emp){\n System.out.println(\"******* Edit employe ************\");\n System.out.println(emp.toString());\n employeeService.editEmployee(emp);\n sessionController.logInEmp();\n\n return \"/pages/childCareCenterDashboard.xhtml?faces-redirect=true\";\n }", "public void setNombreEmpresa(String nombreEmpresa) {\r\n this.nombreEmpresa = nombreEmpresa;\r\n }", "public Profesor (String apellidos, String nombre, String nif, Persona.sexo genero, int edad, int expediente){\n this.apellidos = apellidos;\n this.nombre = nombre;\n this.nif = nif;\n this.genero = genero;\n this.edad = edad;\n this.expediente = expediente;\n }", "@Override\n\tpublic void createEmployee(Employee e) {\n\t\t\n\t}", "public Cliente(String nombre, String nit, String direccion, String municipio, String departamento) {\n this.nombre = nombre;\n this.nit = nit;\n this.direccion = direccion;\n this.municipio = municipio;\n this.departamento = departamento;\n }", "public Employee(String firstName, String lastName, String SSN){\r\n this.firstName=firstName;\r\n this.lastName=lastName;\r\n this.SSN=SSN;\r\n }", "public Cliente(String nombre,int comensales){\n\t\tthis.nombre = nombre;\n\t\tthis.comensales =comensales;\n\t}", "public Employee(String code, Name name, Address address, String[] emails){\n super(code, address);\n this.emails = emails;\n this.name = name;\n }", "public Large_Employee(\n String quarantineLocation,\n int employeeID,\n String covidDose1Attach,\n String covidDose2Attach,\n String covidDoseDate1,\n String covidDoseDate2\n ){\n this.quarantineLocation = quarantineLocation;\n this.covidDose1Attach = covidDose1Attach;\n this.covidDose2Attach = covidDose2Attach;\n this.covidDoseDate1 = covidDoseDate1;\n this.covidDoseDate2 = covidDoseDate2;\n this.employeeID = employeeID;\n }", "public Admin(String employee_id, String employee_name, String employee_address, String employee_designation,\n\t\t\tdouble salary, String contact, boolean status_vacancy, String password,String key)\n\t{\n\t\tsuper(employee_id,employee_name,employee_address,employee_designation,salary,contact,status_vacancy,password);\n\t\tthis.admin_project_key=key;\n\t}", "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 Personnage(String nom, Equipe e, int x, int y) {\r\n\t\tthis();\r\n\t\tthis.nom = nom;\r\n\r\n\t\tif (e.getID() == 1 || e.getID() == 2) {\r\n\t\t\tthis.equipe = e;\r\n\t\t}\r\n\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}", "@Override\n\tpublic EmploieType creer(EmploieType entity) throws InvalideTogetException {\n\t\treturn emploieTypeRepository.save(entity);\n\t}", "public Jovem(String identificador) {\n super(identificador);\n numAulas = DEFAULT_N_AULAS;\n }" ]
[ "0.75028914", "0.71771365", "0.7033536", "0.6744368", "0.6583203", "0.64126235", "0.639114", "0.6304515", "0.6235652", "0.62144345", "0.61794597", "0.6119649", "0.6076274", "0.6066356", "0.5971667", "0.59702945", "0.59465253", "0.5943795", "0.59305835", "0.58482", "0.5836473", "0.5823001", "0.5799237", "0.5787102", "0.57682365", "0.57294273", "0.5726664", "0.5725339", "0.57163393", "0.57144594", "0.570387", "0.5679787", "0.56627584", "0.566157", "0.56443596", "0.56395847", "0.56376773", "0.5607357", "0.56016785", "0.5593735", "0.5586199", "0.55855024", "0.5577192", "0.55758864", "0.5564508", "0.55629265", "0.55509037", "0.55499417", "0.55376446", "0.5530297", "0.5523936", "0.55151963", "0.5501921", "0.5501854", "0.5499422", "0.54916114", "0.5488025", "0.5484434", "0.54648745", "0.5461474", "0.5451577", "0.54508895", "0.5450374", "0.5449562", "0.5441591", "0.5438072", "0.5432864", "0.54240584", "0.54237705", "0.54228306", "0.54226804", "0.54059863", "0.5403635", "0.5400925", "0.539328", "0.53824973", "0.5381451", "0.5380202", "0.53697646", "0.53691745", "0.5367048", "0.5365373", "0.53626096", "0.53526795", "0.5352444", "0.53394496", "0.53323495", "0.5331593", "0.53295004", "0.5323122", "0.5318068", "0.5317704", "0.53147274", "0.5305495", "0.5303391", "0.53028864", "0.53016984", "0.53002405", "0.5291801", "0.5288814" ]
0.6995144
3
GETTERS ET SETTERS Retourne le nom de l'employe.
public String getNom () { return nom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getEmployeeName();", "public String getEmployeeName();", "public String getEmployeeName() {\n return employeeName;\n }", "public String getEmployeeName() {\r\n\t\r\n\t\treturn employeeName;\r\n\t}", "public String getEmployeeName() {\r\n\t\treturn employeeName;\r\n\t}", "public Employe(String nomEmploye) {\r\n\t\tsuper();\r\n\t\tthis.nomEmploye = nomEmploye;\r\n\t}", "public String getEmpleado() {\n return empleado;\n }", "public String getEmployees(){\n return employees;\n }", "public java.lang.String getEmployeeName() {\n java.lang.Object ref = employeeName_;\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 employeeName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String toString(){\r\n return getNumber() + \":\" + getLastName() + \",\" + getFirstName() + \",\" + \"Sales Employee\";\r\n }", "public String getName(){\n\t\treturn this.firstName + \" \" + this.surname;\r\n\t}", "public String getEname() {\n return ename;\n }", "public String getEmployee()\r\n/* 38: */ {\r\n/* 39:43 */ return this.employee;\r\n/* 40: */ }", "public String getNombreEmpresa() {\r\n return this.nombreEmpresa;\r\n }", "public java.lang.String getEmployeeName() {\n java.lang.Object ref = employeeName_;\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 employeeName_ = s;\n return s;\n }\n }", "public String getName (){\r\n return firstName + \" \" + lastName;\r\n }", "public String geteName() {\n return eName;\n }", "String getNome();", "Employee setLastname(String lastname);", "public String getNomeProfessor()\n\t{\n\t\treturn nomeProfessor;\n\t}", "public String getName() {\n return this.id + \", \" + this.nom + \" \" + this.prenom + \", \" + this.cin;\n }", "public String getName(){\n return personName;\n }", "java.lang.String getCompanyName();", "java.lang.String getCompanyName();", "public static String name(PersonEntity pe)\n\t{\n\t\tif(pe == null) return null;\n\n\t\tPerson p = pe.getOx();\n\n\t\treturn cat(null, \" \", p.getLastName(),\n\t\t p.getFirstName(), p.getMiddleName()).toString();\n\t}", "@Override\n\tpublic java.lang.String getUserName() {\n\t\treturn _employee.getUserName();\n\t}", "public String getNome()\r\n\t{\r\n\t\treturn nome;\r\n\t}", "public String getNome()\r\n\t{\r\n\t\treturn nome;\r\n\t}", "public String getSurname()\r\n {\r\n return surname;\r\n }", "public String getNome();", "@XmlElement\n public String getEmployeId() {\n return employeId;\n }", "public String getName() {\n return lastname + \", \" + firstname;\n }", "public String getCreateEmp() {\n return createEmp;\n }", "public String getCreateEmp() {\n return createEmp;\n }", "public String lerNome() {\n\t\treturn JOptionPane.showInputDialog(\"Digite seu Nome:\");\n\t\t// janela de entrada\n\t}", "public String toString()\n\t//return employee values\n\t{\n\t\treturn \"Id \" + id + \" Start date \" + start + \" Salary \" + salary + super.toString() + \" Job Title \" + jobTitle;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"----\" + \"Employee [salary=\" + salary + \", profession=\" + profession + \"]\";\n\t}", "public String getNome(){\n\t\treturn nome;\n\t}", "public void setEmpleado(String empleado) {\n this.empleado = empleado;\n }", "public String getEmpresa() {\r\n return empresa;\r\n }", "public String getModifyEmp() {\n return modifyEmp;\n }", "public String getName()\n {\n return foreName + \" \" + lastName;\n }", "public String name() {\n return celestialName;\n }", "@Override\r\n\tpublic String falar() {\r\n\t\treturn \"[ \"+getNome()+\" ] Sou Um Professor\";\r\n\t}", "public void setEname(String ename) {\n this.ename = ename;\n }", "String getFirstName();", "String getFirstName();", "String getFirstName();", "String getSurname();", "public String getSurname() {\n return surname;\n }", "public String getSurname() {\n return surname;\n }", "public String getSurname() {\n return surname;\n }", "public String getSurname() {\n return surname;\n }", "public String getSurname() {\n return surname;\n }", "public String getSurname() {\n return surname;\n }", "public String getSurname() {\n return surname;\n }", "public String getSurname() {\n return surname;\n }", "public String getSurname() {\n return surname;\n }", "public String getSurname() {\n return surname;\n }", "@java.lang.Override\n public grpc.messages.Messages.Employee getEmployee() {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }", "@java.lang.Override\n public grpc.messages.Messages.Employee getEmployee() {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n }", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"\\nEmployees: \" + getEmployees();\n\t}", "String getEmpresa() {\n return empresa; //To change body of generated methods, choose Tools | Templates.\n }", "public static String setName()\n {\n read_if_needed_();\n \n return _set_name;\n }", "public String getName() {\n return firstName + \" \" + lastName;\n }", "Employee setFirstname(String firstname);", "String getPrimeiroNome();", "String getUltimoNome();", "java.lang.String getSurname();", "public String getEmployees() {\n\t\tString s = \"\";\n\t\tfor (Employee e : employees) {\n\t\t\ts = s + e.getName() + \", \";\n\t\t}\n\t\ts = s.substring(0, s.length() - 2);\n\t\treturn s;\n\t}", "public String getNombreEquipo() {\r\n return nombreEquipo;\r\n }", "public String getNomePessoa() {\n\t\treturn nomePessoa;\n\t}", "public String getSurname()\n\t{\n\t\treturn surname;\n\t}", "public void sauverEmploye(Employe employe) {\n\n\t}", "public Object getNome() {\n\t\treturn null;\n\t}", "public String getNomeItem() {\r\n\t\treturn this.emprestimoid.getNomeItem();\r\n\t}", "public String getNome() {\r\n return nome;\r\n }", "public String getNome() {\r\n return nome;\r\n }", "public String getNome() {\r\n\t\treturn nome;\r\n\t}", "public String getNome() {\r\n\t\treturn nome;\r\n\t}", "public String getName() {\r\n\t\treturn firstName + \" \" + lastName;\r\n\t}", "public String getBookNameEn() {\n return bookNameEn;\n }", "public String getSurname() {\n return this.surname;\n }", "@Override\r\n\tpublic List<Employe> getEmployes() {\n\t\treturn dao.getEmployes();\r\n\t}", "@Override\n\t\t\tpublic String toString() {\n\t\t\t\treturn nome;\n\t\t\t}", "public String getEmployeeNum() {\n return employeeNum;\n }", "@Override\n\tpublic String getProfession() {\n\t\treturn super.getProfession();\n\t}", "public String getStrategieEmployability()\n {\n return strategieEmployability;\n }", "public String toString() {\r\n\t\treturn \"Name : \"+name+\"\\nEmp# : \"+employeeNum;\r\n\t}", "public String getNome() {\n\t\treturn nome;\n\t}", "public String getNome() {\n\t\treturn nome;\n\t}", "public String getNome() {\n\t\treturn nome;\n\t}", "public String getNome() {\n\t\treturn nome;\n\t}", "public String getNome() {\n\t\treturn nome;\n\t}", "public String getNome() {\n\t\treturn nome;\n\t}", "public String getNome() {\n\t\treturn nome;\n\t}", "public String getNome() {\n\t\treturn nome;\n\t}", "public String getNome() {\n\t\treturn nome;\n\t}", "public grpc.messages.Messages.Employee getEmployee() {\n if (employeeBuilder_ == null) {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n } else {\n return employeeBuilder_.getMessage();\n }\n }", "public grpc.messages.Messages.Employee getEmployee() {\n if (employeeBuilder_ == null) {\n return employee_ == null ? grpc.messages.Messages.Employee.getDefaultInstance() : employee_;\n } else {\n return employeeBuilder_.getMessage();\n }\n }", "public String getName() {\n return String.format(\"%s %s\", getFirst(), getLast());\n }" ]
[ "0.7380185", "0.70542765", "0.6677562", "0.6654971", "0.6544741", "0.6410122", "0.63702005", "0.62982816", "0.6220385", "0.62187254", "0.6199762", "0.6190714", "0.6144869", "0.60637206", "0.6053237", "0.60398096", "0.6028814", "0.60036176", "0.5995926", "0.5958452", "0.5921152", "0.59025115", "0.58715105", "0.58715105", "0.5857893", "0.5857386", "0.5833336", "0.5833336", "0.5829437", "0.5823603", "0.5818836", "0.5807038", "0.57908624", "0.57908624", "0.57902366", "0.5784827", "0.57721126", "0.5766673", "0.57522154", "0.5747079", "0.57413775", "0.574115", "0.57328194", "0.57226866", "0.57208115", "0.5714176", "0.5714176", "0.5714176", "0.57094246", "0.5706551", "0.5706551", "0.5706551", "0.5706551", "0.5706551", "0.5706551", "0.5706551", "0.5706551", "0.5706551", "0.5706551", "0.5700133", "0.5700133", "0.56983864", "0.5695627", "0.5683065", "0.56819767", "0.56818664", "0.5679546", "0.5678395", "0.5674646", "0.5669132", "0.5665408", "0.56629413", "0.56587183", "0.56549096", "0.5645023", "0.563944", "0.5632327", "0.5632327", "0.563017", "0.563017", "0.5620444", "0.56197774", "0.5611751", "0.5604445", "0.56005466", "0.55987024", "0.5598667", "0.55864084", "0.5585305", "0.557994", "0.557994", "0.557994", "0.557994", "0.557994", "0.557994", "0.557994", "0.557994", "0.557994", "0.5578539", "0.5578539", "0.55779886" ]
0.0
-1
Retourne la date d'embauche de l'employe.
public Date getDateDembauche () { return dateEmbauche.copie(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getDateEmbauche() {\r\n return dateEmbauche;\r\n }", "public Date getEFF_DATE() {\r\n return EFF_DATE;\r\n }", "Date getEDate();", "public Date getDateDembauche() {\r\n return dateEmbauche.copie();\r\n }", "public java.sql.Date getDateemission() {\r\n\t\treturn dateemission;\r\n\t}", "public String getEmotionDate() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\", Locale.CANADA);\n return dateFormat.format(emotionDate);\n }", "java.lang.String getDatesEmployedText();", "Date getFechaNacimiento();", "public Date geteBirthday() {\n return eBirthday;\n }", "public Date getEnrolDate() {\n return enrolDate;\n }", "public Employe ( Employe unEmploye ) {\n nom = unEmploye.nom;\n dateEmbauche = unEmploye.dateEmbauche.copie();\n }", "public Date getFechaAutorizacionGastoExpediente() {\r\n return fechaAutorizacionGastoExpediente;\r\n }", "@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _employee.getCreateDate();\n\t}", "public abstract java.lang.String getFecha_inicio();", "long getEndDate();", "long getEndDate();", "public String getEndDate();", "public Date getFechaBajaDesde() {\r\n\t\treturn fechaBajaDesde;\r\n\t}", "public String toString() {\r\n return nom + \" \" + dateEmbauche;\r\n }", "String getEndDate();", "public Date getFecRegistro() {\n return fecRegistro;\n }", "public Date getHire_date() {\n return hire_date;\n }", "@Override\n public java.util.Date getFecha() {\n return _partido.getFecha();\n }", "public Date getEyear() {\n return eyear;\n }", "public java.util.Date getDateOfExamination(){\n return localDateOfExamination;\n }", "public Date getFechaBajaHasta() {\r\n\t\treturn fechaBajaHasta;\r\n\t}", "public void setDateEmbauche(Date dateEmbauche) {\r\n this.dateEmbauche = dateEmbauche;\r\n }", "public String getFecha(){\r\n return fechaInicial.get(Calendar.DAY_OF_MONTH)+\"/\"+(fechaInicial.get(Calendar.MONTH)+1)+\"/\"+fechaInicial.get(Calendar.YEAR);\r\n }", "public Date getEstablishDate() {\r\n return establishDate;\r\n }", "public String Get_date() \n {\n \n return date;\n }", "public String getFecha() {\n return Fecha;\n }", "public Employe(Employe unEmploye) {\r\n nom = unEmploye.nom;\r\n dateEmbauche = unEmploye.dateEmbauche.copie();\r\n }", "public final String getEnddate() {\n\t\treturn enddate;\n\t}", "Date getDate();", "Date getDate();", "Date getDate();", "public String getDate_effet() {\r\n\t\treturn date_effet;\r\n\t}", "public Date getEnddate() {\r\n return enddate;\r\n }", "public String getDate()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"EE d MMM yyyy\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }", "public Date getBirthday();", "public java.util.Calendar getFecha()\r\n {\r\n return this.fecha;\r\n }", "public Date getEnrollment_date() {\n return enrollment_date;\n }", "public Date getFechaHasta()\r\n/* 174: */ {\r\n/* 175:302 */ return this.fechaHasta;\r\n/* 176: */ }", "public Date getCHEQUE_DATE() {\r\n return CHEQUE_DATE;\r\n }", "public Employe (String leNom, Date laDate) {\n if ( leNom == null ) {\n nom = NOM_BIDON;\n } else {\n nom = leNom;\n }\n if ( laDate == null ) {\n dateEmbauche = new Date(); // 1er janvier 0\n } else {\n dateEmbauche = laDate.copie();\n }\n }", "public Date getFechaconsulta() {\r\n return fechaconsulta;\r\n }", "public String getLeavingDate();", "private String leerFecha() {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYY/MM/dd\");\n\t\t\treturn sdf.format(txtFecha.getDate());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Seleccione una fecha válida\", \"Aviso\", 2);\n\t\t\treturn null;\n\t\t}\n\t}", "Date getInvoicedDate();", "public Date getInstdte() {\r\n return instdte;\r\n }", "Date getEndDate();", "Date getEndDate();", "public String toString () {\n return nom + \" \" + dateEmbauche;\n }", "public int getEdad() {\n\t\treturn (new Date()).getYear()- fechanac.getYear();\n\t}", "public static Date hoy_en_DATE() {\n Calendar cc = Calendar.getInstance();\n Date hoyEnDate = cc.getTime();\n return hoyEnDate;\n }", "public Date getRealEstablish() {\r\n return realEstablish;\r\n }", "public Date getEndDate();", "public Date getEndDate();", "public Employe(String leNom, Date laDate) {\r\n if (leNom == null) {\r\n nom = NOM_BIDON;\r\n } else {\r\n nom = leNom;\r\n }\r\n \r\n if (laDate == null) {\r\n dateEmbauche = new Date(); // 1er janvier 0\r\n } else {\r\n dateEmbauche = laDate.copie();\r\n }\r\n }", "Date getBirthDate();", "public String getFecha() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(calendario.getTime());\n }", "public java.util.Date getDateExamine () {\n\t\treturn dateExamine;\n\t}", "public java.lang.String getDatesEmployedText() {\n java.lang.Object ref = datesEmployedText_;\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 datesEmployedText_ = s;\n return s;\n }\n }", "public java.lang.String getDatesEmployedText() {\n java.lang.Object ref = datesEmployedText_;\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 datesEmployedText_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getEventDate()\n {\n EventDate = createEvent.getText();\n return EventDate;\n }", "public Date getEffDate() {\r\n return this.effDate;\r\n }", "public Date getFechanac() {\n\t\treturn fechanac;\n\t}", "public Fecha getFecha() {\r\n return fecha;\r\n }", "public Date getaBrithdate() {\n return aBrithdate;\n }", "Employee setBirthdate(Date birthdate);", "public Date getGioBatDau();", "public Date getBirthdate()\n {\n return birthdate;\n }", "public String getFechaEvento() {\n return fechaEvento;\n }", "public String getDateOfHire() {\n return formatter.format(this.dateOfHire);\n }", "@Override\n public java.util.Date getCreateDate() {\n return _partido.getCreateDate();\n }", "public void setEFF_DATE(Date EFF_DATE) {\r\n this.EFF_DATE = EFF_DATE;\r\n }", "public static String fechaActual() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(calendario.getTime());\n }", "public Club employeur() {\n Embauche dernierEmbauche = myEmployees.get(myEmployees.size()-1);\n if(dernierEmbauche.estTerminee()){\n return null;\n }\n return dernierEmbauche.getEmployeur();\n }", "public Date getEpDeletetime() {\n return epDeletetime;\n }", "public Date getBirthdate()\n {\n return birthdate;\n }", "public String getFormatedDate() {\n DateFormat displayFormat = new SimpleDateFormat(\"EEEE', ' dd. MMMM yyyy\", Locale.GERMAN);\n return displayFormat.format(mEvent.getTime());\n }", "public Date getHireDate() {\n return hireDate;\n }", "public Date getHireDate() {\n return hireDate;\n }", "public static String getFechaActual() {\n Date ahora = new Date();\n SimpleDateFormat formateador = new SimpleDateFormat(\"yyyy-MM-dd\");\n return formateador.format(ahora);\n }", "public Date getEnterDate() {\r\n return (Date) getAttributeInternal(ENTERDATE);\r\n }", "java.lang.String getFoundingDate();", "public int getFECHAECVACT() {\n return fechaecvact;\n }", "public Calendar calcEasterDate(){\n a = year% 19;\n b = (int) Math.floor(year/100);\n c = year % 100;\n d = (int) Math.floor(b/4);\n e = b % 4;\n f = (int) Math.floor((b + 8) / 25);\n g = (int) Math.floor((b - f + 1) / 3);\n h = (19*a + b - d - g + 15) % 30;\n i = (int) Math.floor(c/4);\n k = c%4;\n L = (32 + 2*e + 2*i - h - k) % 7;\n m = (int) Math.floor((a + 11*h + 22*L) / 451);\n month = (int) Math.floor((h + L - 7*m + 114) / 31);\n day = (((h + L - (7*m) + 114) % 31) + 1);\n Calendar instance = Calendar.getInstance();\n instance.set(year, month, day);\n return instance;\n }", "public String getFechaExpedicion() { return (this.fechaExpedicion == null) ? \"\" : this.fechaExpedicion; }", "public Date getCadastro() {\n\n\t\treturn this.cadastro;\n\t}", "public abstract java.lang.String getFecha_termino();", "public Date getBirthdate() {\n return birthdate;\n }", "public Date getFechaDesde()\r\n/* 164: */ {\r\n/* 165:283 */ return this.fechaDesde;\r\n/* 166: */ }", "java.lang.String getDate();", "@Override\n\tpublic java.util.Date getNgayBatDau() {\n\t\treturn _keHoachKiemDemNuoc.getNgayBatDau();\n\t}", "@Override\n\tpublic java.util.Date getEndDate() {\n\t\treturn _esfTournament.getEndDate();\n\t}", "public Date getBirth_date() {\n return birth_date;\n }", "public Date getBirthday() {\n return birthday;\n }", "public Date getBirthday() {\n return birthday;\n }", "public Date getBirthday() {\n return birthday;\n }" ]
[ "0.73789567", "0.70327514", "0.6958177", "0.69489026", "0.6572297", "0.65285933", "0.6470144", "0.64298826", "0.6356003", "0.6267855", "0.62589425", "0.62349415", "0.6227295", "0.6201264", "0.6185993", "0.6185993", "0.61826813", "0.618236", "0.61783195", "0.6135656", "0.6127694", "0.6124501", "0.6121718", "0.61183256", "0.61064523", "0.61032605", "0.6097855", "0.60957366", "0.6076711", "0.6068487", "0.6068236", "0.60600257", "0.6044353", "0.60408545", "0.60408545", "0.60408545", "0.6037373", "0.6016303", "0.6015155", "0.60141385", "0.6007608", "0.59938633", "0.59692943", "0.5968568", "0.5965883", "0.5959295", "0.5953349", "0.59529364", "0.5948147", "0.59437156", "0.5941913", "0.5941913", "0.5940645", "0.59279466", "0.5924272", "0.5923897", "0.5917462", "0.5917462", "0.590514", "0.5904448", "0.5897404", "0.58902216", "0.58814293", "0.58797914", "0.5870568", "0.58554626", "0.5845968", "0.5836583", "0.58338183", "0.58308995", "0.5827431", "0.5824496", "0.5821925", "0.58217454", "0.5821388", "0.5818571", "0.5816919", "0.58114964", "0.58091", "0.58008677", "0.5800474", "0.58000386", "0.58000386", "0.57868934", "0.57860786", "0.5772727", "0.57691085", "0.57658356", "0.5765216", "0.5757573", "0.5755869", "0.57519245", "0.57509935", "0.5744476", "0.5743818", "0.5742262", "0.5736783", "0.573476", "0.573476", "0.573476" ]
0.6849618
4
Modifie le nom de l'employe par celui passe en parametre.
public void setNom ( String nouveauNom ) { if ( nouveauNom == null ) { nom = NOM_BIDON; } else { nom = nouveauNom; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Employe(String nomEmploye) {\r\n\t\tsuper();\r\n\t\tthis.nomEmploye = nomEmploye;\r\n\t}", "public void editEmployeeInformationName(String text) {\n\t\tthis.name=text;\n\t\tResourceCatalogue resCat = new ResourceCatalogue();\t\t\n\t\tresCat.getResource(rid).editResource(name, this.sectionId);\n\t\tHashMap<String, String> setVars = new HashMap<String, String>();\n\t\tsetVars.put(\"empname\", \"\\'\"+name+\"\\'\");\n\t\tsubmitToDB(setVars);\n\n\t}", "public void setEname(String ename) {\n this.ename = ename;\n }", "Employee setLastname(String lastname);", "java.lang.String getEmployeeName();", "public void sauverEmploye(Employe employe) {\n\n\t}", "public void setEmpleado(String empleado) {\n this.empleado = empleado;\n }", "Employee setFirstname(String firstname);", "public void setNombreEmpresa(String nombreEmpresa) {\r\n this.nombreEmpresa = nombreEmpresa;\r\n }", "@Override\n public Employee updateEmployeeName(int employeeId, String name) {\n return null;\n }", "public void setEmpname(String empname) {\n\t\tthis.empname = empname;\r\n\t}", "private void actualizarNombre(Persona persona){\n \n String nombre=IO_ES.leerCadena(\"Inserte el nombre\");\n persona.setNombre(nombre);\n }", "public void updateName() {\n try {\n userFound = clientefacadelocal.find(this.idcliente);\n if (userFound != null) {\n userFound.setNombre(objcliente.getNombre());\n clientefacadelocal.edit(userFound);\n objcliente = new Cliente();\n mensaje = \"sia\";\n } else {\n mensaje = \"noa\";\n System.out.println(\"Usuario No Encontrado\");\n }\n } catch (Exception e) {\n mensaje = \"noa\";\n System.out.println(\"El error al actualizar el nombre es \" + e);\n }\n }", "public void setEmpName(String empName)\r\n\t{\r\n\t\tthis.empName = empName;\r\n\t}", "@Override\n\tpublic void setEname(String ename) {\n\t\tsuper.setEname(ename);\n\t}", "public void damePersonaje(String personaje){\n this.personaje=personaje;\n\n\n\n }", "public void setEmployeeName(String employeeName) {\r\n\t\r\n\t\tthis.employeeName = employeeName;\r\n\t}", "static String editCompany()\n {\n if(companyName !=null) companyName = \"IBM\";\n return companyName;\n }", "public void seteName(String eName) {\n this.eName = eName == null ? null : eName.trim();\n }", "public void setEmployeId(String employeId) {\n this.employeId = employeId;\n }", "private void setNomeProfessor(String novoNome)\n\t{\n\t\tthis.nomeProfessor = novoNome;\n\t}", "public Builder setEmployeeName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n employeeName_ = value;\n onChanged();\n return this;\n }", "public void setNameofRenter(String usrName) throws Exception{\n\n\t\t/*\n\t\t * Input is invalid if an empty String is passed in.\n\t\t */\n\t\tif(usrName.length() == 0){\n\t\t\tthrow new Exception();\n\t\t}\n\t\tnameofRenter = usrName;\n\t}", "private void editName() {\n Routine r = list.getSelectedValue();\n\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Enter the new name:\",\n \"Edit name\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, r.getName());\n\n if (s != null) {\n r.setName(s);\n }\n }", "public static void EmployeeName() {\r\n\t\t\r\n\t\tJLabel e1 = new JLabel(\"Employee's Name:\");\r\n\t\te1.setFont(f);\r\n\t\tGUI1Panel.add(e1);\r\n\t\tGUI1Panel.add(employeeName);\r\n\t\te1.setHorizontalAlignment(JLabel.LEFT);\r\n\t\tGUI1Panel.add(Box.createHorizontalStrut(5));\r\n\t\t\r\n\t}", "void setNome(String nome);", "public void setName(String name)\r\n\t{\r\n\t\tthis.nome = nome;\r\n\t}", "public String getEmployeeName();", "public void setName(String firstName, String lastName)\n {\n this.name = firstName +\" \"+ lastName;\n\n }", "public String getEmployeeName() {\r\n\t\r\n\t\treturn employeeName;\r\n\t}", "public void setLastName(java.lang.String newLastName);", "public void editStudentLastName(Student changeStudent, String name)\n\t{\n\t\tchangeStudent.setStrNameLast (name);\n\t\tthis.saveNeed = true;\n\n\n\t}", "public AddressInput getEmpfaengerName() throws RemoteException\n {\n if (empfName != null)\n return empfName;\n \n SepaDauerauftrag t = getTransfer();\n\n empfName = new AddressInput(t.getGegenkontoName(), AddressFilter.FOREIGN);\n empfName.setValidChars(HBCIProperties.HBCI_SEPA_VALIDCHARS_RELAX);\n empfName.setMandatory(true);\n empfName.addListener(new EmpfaengerListener());\n if (t.isActive())\n {\n boolean changable = getBPD().getBoolean(\"recnameeditable\",true) && getBPD().getBoolean(\"recktoeditable\",true);\n empfName.setEnabled(changable);\n }\n return empfName;\n }", "public void setEmployee(String employee)\r\n/* 43: */ {\r\n/* 44:47 */ this.employee = employee;\r\n/* 45: */ }", "public static void setLastName(String name){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyLName,name);\n }", "public void setName(String n)\n\t{\n\t\tfullName=n;\n\t}", "public void setName(String name) {\n if (!name.equals(\"\")) {\r\n this.name = name;\r\n }\r\n\r\n\r\n\r\n\r\n }", "public void setName(final String pName){this.aName = pName;}", "public void updateEmployee(Employe employee) {\n\t\t\n\t}", "public void setModifyEmp(String modifyEmp) {\n this.modifyEmp = modifyEmp;\n }", "public void setLast_name(String last_name);", "public void asignarNombre(String name);", "public String getEmployeeName() {\r\n\t\treturn employeeName;\r\n\t}", "public void setName(String name) {\n fName= name;\n }", "public Program3 (String empName) {\r\n\t\tname = empName;\r\n\t}", "public static void createUsername(Login newEmp) throws FileNotFoundException, IOException {\n\t\tString employeeUsername = \"\";\n\t\tdo {\n\t\t\temployeeUsername = JOptionPane.showInputDialog(\"Please enter a username.\");\n\t\t\tif (!newEmp.setUsername(employeeUsername)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Wrong employee name, please try again\");\n\t\t\t}\n\t\t} while (!newEmp.setUsername(employeeUsername));\n\t\t/*\n\t\t Text file is stored in a source folder.\n\t\t */\n\t\tFileOutputStream fstream = new FileOutputStream(\"./src/Phase5/username.txt\", true);\n\t\tDataOutputStream outputFile = new DataOutputStream(fstream);\n\t\toutputFile.writeUTF(employeeUsername + \", \");\n\t\toutputFile.close();\n\t}", "public void setName(String name) {\n\t\tthis.nome = name;\n\t}", "public void setLastName (String ticketLastName)\r\n {\r\n lastName = ticketLastName;\r\n }", "public void companyName(String name) {\n\t\tSystem.out.println(\"One argument\");\n\t\tSystem.out.println(\"Name:\"+name);\n\t}", "public void setName(String firstName, String lastName){\r\n this.firstname = firstName;\r\n this.lastname = lastName;\r\n }", "public String getEname() {\n return ename;\n }", "@Override\n\tpublic void ModifyEmployee() {\n\t\t\n\t}", "public java.lang.String getEmployeeName() {\n java.lang.Object ref = employeeName_;\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 employeeName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Employee(String Name) {\r\n this.Name = Name;\r\n }", "public Employee(String name){\r\n\t\tthis.employeeName = name;\r\n\t\tthis.salary = 0;\r\n\t}", "public void setSpLastName(String _empLastName) {\r\n this.spLastName = _empLastName;\r\n }", "public void setName(String n){ name=n; }", "public static String name(PersonEntity pe)\n\t{\n\t\tif(pe == null) return null;\n\n\t\tPerson p = pe.getOx();\n\n\t\treturn cat(null, \" \", p.getLastName(),\n\t\t p.getFirstName(), p.getMiddleName()).toString();\n\t}", "public void setName (String name){\n \n boyName = name;\n }", "public Employe(Employe unEmploye) {\r\n nom = unEmploye.nom;\r\n dateEmbauche = unEmploye.dateEmbauche.copie();\r\n }", "public void setLastName(String newLastName)\r\n {\r\n lastName = newLastName;\r\n }", "public void setEntryName(String ename);", "public void saveEmployee(Employe employee) {\n\t\t\n\t}", "public String getEmployeeName() {\n return employeeName;\n }", "public void setNomProvincia(String nomProvincia);", "Employee(String name, String profile, int id, String regime) {\n super(name, profile, id);\n this.regime = regime;\n }", "public void setLastName(String strLastName){\n\t\tdriver.findElement(lastname).sendKeys(strLastName);;\n\t}", "public void ModifyEmployee(int idEmployee , String firstName , String lastName, String name_department)\n\t{\n\t\tfor(int i = 0; i < departments.size() ; i++)\n\t\t{\n\t\t\tfor(Employee emp : departments.get(i).getEmployeeList())\n\t\t\t{\n\t\t\t\tif(emp.getIdEmployee()==idEmployee) \n\t\t\t\t{\n\t\t\t\t\temp.setName(firstName);\n\t\t\t\t\temp.setSurname(lastName);\n\t\t\t\t\temp.setDepartment(SearchDepartment(name_department));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void setName(String newname){\n name = newname; \n }", "@Override\n\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\tString text = arg0.toString();\n\t\t\tPersonUserInfoItem item = (PersonUserInfoItem)mData.get(0);\n\t\t\titem.name = text;\t\n\t\t\tmCurriculumVitaeInterface.onChangeName(text);\n\t\t}", "private static String fetchNickname(HashMap<String, Object> parameterMap) {\n\t\tString nickname = \"\";\n\t\tPsName psName = PsName.findByEmployeeIdAndNameTypeAndEffectiveDate((String)parameterMap.get(\"employeeId\"), \"PRF\", (Date)parameterMap.get(\"effectiveDate\"));\n\t\tif(psName != null && psName.getFirstName() != null) {\n\t\t\tnickname = psName.getFirstName().trim().toUpperCase().replaceAll(\"'\", \"''\");\n\t\t\tif(nickname.length() > 20) {\n\t\t\t\tnickname.substring(0, 20);\n\t\t\t}\n\t\t}\n\t\treturn nickname;\n\t}", "public void setNome(String pNome){\n this.nome = pNome;\n }", "void lastName( String key, String value ){\n developer.lastName = value;\n }", "public Employe ( Employe unEmploye ) {\n nom = unEmploye.nom;\n dateEmbauche = unEmploye.dateEmbauche.copie();\n }", "@Override\r\n\tpublic void setFistName(String fname) {\n\t\tif (fname == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (fname.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.first_name = fname;\r\n\t}", "public void setLastname(String lastname);", "public void setLastName(String lastName);", "public String editEmploye(Employee emp){\n System.out.println(\"******* Edit employe ************\");\n System.out.println(emp.toString());\n employeeService.editEmployee(emp);\n sessionController.logInEmp();\n\n return \"/pages/childCareCenterDashboard.xhtml?faces-redirect=true\";\n }", "public void setFirstName(String fname){ firstName.set(fname); }", "@Override\n public void nick_name(String nick){\n ///Pregunta el nombres y el usuario le asigna\n nickName= nick;\n nombre=nickName;\n }", "public Employee(String nama, int usia) {\r\n // Constructor digunakan untuk inisialisasi value, yang di inisiate saat melakukan instantiation\r\n this.nama = nama;\r\n this.usia = usia;\r\n }", "public void setName(String n);", "public String setName(String name){\n return personName = name;\n }", "@Override\r\n\tpublic void updateName(int eno, String newName) {\n\r\n\t}", "public String enameGet(String emp_id) throws Exception;", "Employee(String employeeName, double employeeSalary, int employeeAge) {\n\t\tthis.employeeName = employeeName;\n\t\tthis.employeeSalary = employeeSalary;\n\t\tthis.employeeAge = employeeAge;\n\t}", "private void setNewName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newName_ = value;\n }", "public void rename()\n\t{\n\t\t// get the object within the node\n\t\tObject string = this.getUserObject();\n\n\t\t// should always be a string, given the constructor\n\t\tif (string instanceof String)\n\t\t{\n\t\t\tstring = JOptionPane.showInputDialog(\"Enter a New Name\");\n\n\t\t\tif (string != null && string instanceof String)\n\t\t\t{\n\t\t\t\tthis.setUserObject(string);\n\t\t\t\tthis.name = (String) string;\n\t\t\t}\n\t\t}\n\t}", "public void setName(String name) {\n//\t\tif((name==null) || (name.length()<2)){\n//\t\t\tthrow new RuntimeException(\"Name muss mindestens 2 Zeichen enthalten!\");\n//\t\t}\n\t\tthis.name = name;\n\t}", "public void setName(String newname)\n {\n name = newname;\n \n }", "@Override\n public Empleado apply(Empleado empleado) throws Exception {\n empleado.setNombre(empleado.getNombre().toUpperCase());\n return empleado;\n }", "public void setPetName(java.lang.String param) {\n localPetNameTracker = true;\n\n this.localPetName = param;\n }", "public void setUser_name(String user_name);", "public void setLastName(java.lang.CharSequence value) {\n this.lastName = value;\n }", "public String lerNome() {\n\t\treturn JOptionPane.showInputDialog(\"Digite seu Nome:\");\n\t\t// janela de entrada\n\t}", "public void setName(String new_name){\n this.name=new_name;\n }", "public void setLastName(String newLastName) {\n this.lastName = newLastName;\n }", "public void AIenterLastName(String Lastname, ExtentTest extentReport) throws Exception {\n\t\ttry {\n\n\t\t\tWaitUtils.waitForElement(driver, addInterestLastname);\n\t\t\taddInterestLastname.click();\n\t\t\taddInterestLastname.sendKeys(Lastname);\n\t\t\tThread.sleep(2000);\n\t\t\tLog.message(\"Entered the addInterest Last Name: \" + Lastname, extentReport);\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(\"Unable to enter Lastname\" + e);\n\t\t}\n\t}", "public void setName(String n) {\n this.name = n;\n }", "public java.lang.String getEmployeeName() {\n java.lang.Object ref = employeeName_;\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 employeeName_ = s;\n return s;\n }\n }", "public void setNome(String nomeAeroporto)\n {\n this.nome = nomeAeroporto;\n }" ]
[ "0.74754673", "0.7366446", "0.6595103", "0.6564213", "0.6510855", "0.6484708", "0.64375865", "0.63469976", "0.6295083", "0.6263087", "0.6238171", "0.6207142", "0.62034583", "0.61837685", "0.61308974", "0.60806525", "0.60531163", "0.6046743", "0.6034005", "0.6032092", "0.5993619", "0.59884655", "0.5972643", "0.59418523", "0.5935371", "0.59021276", "0.58922374", "0.58843225", "0.58690524", "0.58591425", "0.58443594", "0.5844279", "0.58429337", "0.58397293", "0.5831591", "0.5815096", "0.5798586", "0.57848334", "0.5778915", "0.5768167", "0.57603776", "0.5753107", "0.5740661", "0.5724578", "0.5716591", "0.5712535", "0.5711244", "0.5693697", "0.56929123", "0.56919116", "0.56918555", "0.56914747", "0.56907725", "0.5679252", "0.5669117", "0.5661258", "0.5656105", "0.5654925", "0.56547093", "0.5653939", "0.56505704", "0.5643088", "0.56353223", "0.5634377", "0.5632686", "0.5631674", "0.56267846", "0.56250733", "0.56242263", "0.5621294", "0.5618994", "0.56151193", "0.56102943", "0.56075907", "0.5605479", "0.5600556", "0.5599878", "0.55897546", "0.55832934", "0.5582941", "0.5582681", "0.55790794", "0.5578909", "0.5574815", "0.5574455", "0.5566555", "0.5555397", "0.5554916", "0.55527616", "0.5549413", "0.55477005", "0.5546076", "0.55457354", "0.55449384", "0.5543975", "0.5541933", "0.55413127", "0.5536983", "0.5534408", "0.5533962", "0.55318993" ]
0.0
-1
Modifie la date d'embauche de l'employe par celle passee en parametre. Si celleci est null, la date du 1er janvier 0 sera utilisee.
public void setDateDembauche( Date nouvelleDate ) { if ( nouvelleDate == null ) { dateEmbauche = new Date(); } else { dateEmbauche = nouvelleDate.copie(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Employe(String leNom, Date laDate) {\r\n if (leNom == null) {\r\n nom = NOM_BIDON;\r\n } else {\r\n nom = leNom;\r\n }\r\n \r\n if (laDate == null) {\r\n dateEmbauche = new Date(); // 1er janvier 0\r\n } else {\r\n dateEmbauche = laDate.copie();\r\n }\r\n }", "public Employe (String leNom, Date laDate) {\n if ( leNom == null ) {\n nom = NOM_BIDON;\n } else {\n nom = leNom;\n }\n if ( laDate == null ) {\n dateEmbauche = new Date(); // 1er janvier 0\n } else {\n dateEmbauche = laDate.copie();\n }\n }", "public Employe ( Employe unEmploye ) {\n nom = unEmploye.nom;\n dateEmbauche = unEmploye.dateEmbauche.copie();\n }", "Employee setBirthdate(Date birthdate);", "public Employe(Employe unEmploye) {\r\n nom = unEmploye.nom;\r\n dateEmbauche = unEmploye.dateEmbauche.copie();\r\n }", "public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }", "public void setEFF_DATE(Date EFF_DATE) {\r\n this.EFF_DATE = EFF_DATE;\r\n }", "public void setDateDembauche(Date nouvelleDate) {\r\n if (nouvelleDate == null) {\r\n dateEmbauche = new Date();\r\n \r\n } else {\r\n dateEmbauche = nouvelleDate.copie();\r\n }\r\n }", "public void setFechaHasta(Date fechaHasta)\r\n/* 179: */ {\r\n/* 180:312 */ this.fechaHasta = fechaHasta;\r\n/* 181: */ }", "public void setFechaFacturado(java.util.Calendar param){\n \n this.localFechaFacturado=param;\n \n\n }", "public void enviarConviteExame(LocalDate dataExame) {\n }", "public Date getDateEmbauche() {\r\n return dateEmbauche;\r\n }", "public void setDateEmbauche(Date dateEmbauche) {\r\n this.dateEmbauche = dateEmbauche;\r\n }", "public Date getEFF_DATE() {\r\n return EFF_DATE;\r\n }", "public void setFechaSolicitud(java.util.Calendar param){\n \n this.localFechaSolicitud=param;\n \n\n }", "public void seteBirthday(Date eBirthday) {\n this.eBirthday = eBirthday;\n }", "public void setDateemission(java.sql.Date dateemission) {\r\n\t\tthis.dateemission = dateemission;\r\n\t}", "private void fechaActual() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat sm = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\t// Formateo de Fecha para mostrar en la vista - (String)\r\n\t\tsetFechaCreacion(sm.format(date.getTime()));\r\n\t\t// Formateo de Fecha campo db - (Date)\r\n\t\ttry {\r\n\t\t\tnewEntidad.setFechaCreacion(sm.parse(getFechaCreacion()));\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t;\r\n\t}", "public void setFechaCompra() {\n LocalDate fecha=LocalDate.now();\n this.fechaCompra = fecha;\n }", "public void setEditDate(Date editDate)\r\n/* */ {\r\n/* 193 */ this.editDate = editDate;\r\n/* */ }", "private void affichageDateFin() {\r\n\t\tif (dateFinComptage!=null){\r\n\t\t\tSystem.out.println(\"Le comptage est clos depuis le \"+ DateUtils.format(dateFinComptage));\r\n\t\t\tif (nbElements==0){\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos mais n'a pas d'éléments. Le comptage est en anomalie.\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Le comptage est clos et est OK.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Le compte est actif.\");\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testSetFecha2(){\n\t\tPlataforma.logout();\n\t\tPlataforma.login(Plataforma.alumnos.get(0).getNia(), Plataforma.alumnos.get(0).getPassword());\n\t\tLocalDate fin = Plataforma.fechaActual.plusDays(10);\n\t\tLocalDate ini = Plataforma.fechaActual.plusDays(2);\n\t\tassertFalse(ej1.setFechaFin(fin));\n\t\tassertFalse(ej1.setFechaIni(ini));\n\t}", "public FrmPuntoDeVenta(Empleado empleado) throws ParseException {\n this.date1 = dateFormat.parse(this.date.getYear() + \"-\" + this.date.getMonth() + \"-\" + this.date.getDay());\n this.jframe = this;\n this.empleado = empleado;\n initComponents();\n this.cargarBanner();\n this.setLocationRelativeTo(null);\n }", "public FrmCrearEmpleado() {\n initComponents();\n tFecha.setDate(new Date());\n }", "public void setFechaDesde(Date fechaDesde)\r\n/* 169: */ {\r\n/* 170:293 */ this.fechaDesde = fechaDesde;\r\n/* 171: */ }", "public void setBirthday(Date birthday);", "public void setFechaModificacion(String p) { this.fechaModificacion = p; }", "public void setFechaModificacion(String p) { this.fechaModificacion = p; }", "public void setDateHeure(Long p_odateHeure);", "public void setGioBatDau(Date gioBatDau);", "@Test\n\tpublic void testSetFecha8(){\n\t\tPlataforma.closePlataforma();\n\t\t\n\t\tfile = new File(\"./data/plataforma\");\n\t\tfile.delete();\n\t\tPlataforma.openPlataforma();\n\t\tPlataforma.login(\"1\", \"contraseniaprofe\");\n\t\t\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.plusDays(5));\n\t\tej1.enPlazo();\n\t\t\n\t\tassertEquals(ej1.getEstado(), EstadoEjercicio.TERMINADO);\n\t\t\t\t\n\t\tLocalDate fin = Plataforma.fechaActual.plusDays(6);\n\t\tLocalDate ini = Plataforma.fechaActual.plusDays(10);\n\t\tassertFalse(ej1.setFechaFin(fin));\n\t\tassertFalse(ej1.setFechaIni(ini));\n\t}", "public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n }", "@Override\n\tprotected void setDate() {\n\n\t}", "public void ustawDate(Date data) {\n\t\tcalendar = Calendar.getInstance();\r\n\t\tcalendar.setTime(data);\r\n\t\tthis.rok = calendar.get(Calendar.YEAR);\r\n\t\tthis.miesiac = calendar.get(Calendar.MONTH);\r\n\t\tif ((this.rok % 4 == 0 && this.rok % 100 != 0) || this.rok % 400 == 0) {\r\n\t\t\tmiesiace[1] = 29;\r\n\t\t} else {\r\n\t\t\tmiesiace[1] = 28;\r\n\t\t}\r\n\r\n\t\twypelnijTabele();\r\n\t}", "@Override\n\tpublic Long updateEndDate() {\n\t\treturn null;\n\t}", "public void sauverEmploye(Employe employe) {\n\n\t}", "public void setBirthDate(Date birthDate);", "public void setFecha(Fecha fecha) {\r\n this.fecha = fecha;\r\n }", "public void setCreacion(Date creacion) {\r\n this.creacion = creacion;\r\n }", "public Date getDateDembauche() {\r\n return dateEmbauche.copie();\r\n }", "void setBirthDate(Date birthDate);", "@Test\n public void testSetFechaFin() {\n System.out.println(\"setFechaFin\");\n Date fechaFin = null;\n Reserva instance = new Reserva();\n instance.setFechaFin(fechaFin);\n \n }", "public abstract void setFecha_inicio(java.lang.String newFecha_inicio);", "public void setEffDate(Date value) {\r\n this.effDate = value;\r\n }", "@Override\n\tpublic void fechaEstablecida(long milis) {\n\t\tfinal TextView dob = (TextView) findViewById(R.id.dayOfBirthTextView);\n\t\tdob.setText(DateFormat.format(\"MMMM dd, yyyy\", milis));\n\t\tdayOfBirth = milis;\n\t\tEditor editor = mGameSettings.edit();\n\t\teditor.putLong(Constants.GAME_PREFERENCES_DOB, dayOfBirth);\n\t\teditor.commit();\n\t}", "@Test\n\tpublic void testSetFecha7(){\n\t\tPlataforma.closePlataforma();\n\t\t\n\t\tfile = new File(\"./data/plataforma\");\n\t\tfile.delete();\n\t\tPlataforma.openPlataforma();\n\t\tPlataforma.login(\"1\", \"contraseniaprofe\");\n\t\t\n\t\tPlataforma.setFechaActual(Plataforma.fechaActual.plusDays(2));\n\t\tej1.responderEjercicio(nacho, array);\n\t\t\t\t\n\t\tLocalDate fin = Plataforma.fechaActual.plusDays(10);\n\t\tLocalDate ini = Plataforma.fechaActual.plusDays(3);\n\t\tassertTrue(ej1.setFechaFin(fin));\n\t\tassertFalse(ej1.setFechaIni(ini));\n\t}", "public Date getFechaHasta()\r\n/* 174: */ {\r\n/* 175:302 */ return this.fechaHasta;\r\n/* 176: */ }", "public static Date fechaInicial(Date hoy) {\n\t\thoy=(hoy==null?new Date():hoy);\n\t\tLong fechaCombinada = configuracion().getFechaCombinada();\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTime(hoy);\n\t\tif (fechaCombinada == 1l) {\n\t\t\tcalendar.set(Calendar.DAY_OF_MONTH, calendar.get(Calendar.DAY_OF_MONTH) - 1);\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 14);\n\t\t\tcalendar.set(Calendar.MINUTE, 0);\n\t\t\tcalendar.set(Calendar.SECOND, 0);\n\t\t} else {\n\t\t\tString fhoyIni = df.format(hoy);\n\t\t\ttry {\n\t\t\t\thoy = df.parse(fhoyIni);\n\t\t\t} catch (ParseException e) {\n\t\t\t\tlog.error(\"Error en fecha inicial\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\n\t\t\tcalendar.set(Calendar.MINUTE, 0);\n\t\t\tcalendar.set(Calendar.SECOND, 0);\n\t\t}\n\t\thoy = calendar.getTime();\n\t\treturn hoy;\n\t}", "public void setDate(String eDate) {\n\t\tmDate = eDate;\n\t}", "public void setFechaAutorizacionGastoExpediente(Date fechaAutorizacionGastoExpediente) {\r\n this.fechaAutorizacionGastoExpediente = fechaAutorizacionGastoExpediente;\r\n }", "public Date obterHrEnt1Turno(){\n \ttxtHrEnt1Turno.setEditable(true);\n txtHrSai1Turno.setEditable(false);\n txtHrEnt2Turno.setEditable(false);\n txtHrSai2Turno.setEditable(false);\n \ttxtHrEnt1TurnoExt.setEditable(false);\n txtHrSai1TurnoExt.setEditable(false);\n txtHrEnt2TurnoExt.setEditable(false);\n txtHrSai2TurnoExt.setEditable(false);\n\n return new Date();\n }", "@Test\n public void testSetFecha() {\n System.out.println(\"setFecha\");\n Date fecha = null;\n Reserva instance = new Reserva();\n instance.setFecha(fecha);\n \n }", "Date getFechaNacimiento();", "public void setRealEstablish(Date realEstablish) {\r\n this.realEstablish = realEstablish;\r\n }", "public void setCHEQUE_DATE(Date CHEQUE_DATE) {\r\n this.CHEQUE_DATE = CHEQUE_DATE;\r\n }", "Date getEDate();", "public void setInstdte(Date instdte) {\r\n this.instdte = instdte;\r\n }", "void setDate(Date data);", "private void inicializarFechaHora(){\n Calendar c = Calendar.getInstance();\r\n year1 = c.get(Calendar.YEAR);\r\n month1 = (c.get(Calendar.MONTH)+1);\r\n String mes1 = month1 < 10 ? \"0\"+month1 : \"\" +month1;\r\n String dia1 = \"01\";\r\n\r\n String date1 = \"\"+dia1+\"/\"+mes1+\"/\"+year1;\r\n txt_fecha_desde.setText(date1);\r\n\r\n\r\n day2 = c.getActualMaximum(Calendar.DAY_OF_MONTH) ;\r\n String date2 = \"\"+day2+\"/\"+mes1+\"/\"+ year1;\r\n\r\n Log.e(TAG,\"date2: \" + date2 );\r\n txt_fecha_hasta.setText(date2);\r\n\r\n }", "public void setEnrolDate(Date enrolDate) {\n this.enrolDate = enrolDate;\n }", "public abstract void setFecha_ingreso(java.sql.Timestamp newFecha_ingreso);", "public void setBirthdate(Date birthdate)\n {\n this.birthdate = birthdate;\n }", "public Employe(String nomEmploye) {\r\n\t\tsuper();\r\n\t\tthis.nomEmploye = nomEmploye;\r\n\t}", "public void setFechaBajaHasta(Date fechaBajaHasta) {\r\n\t\tthis.fechaBajaHasta = fechaBajaHasta;\r\n\t}", "public void setFechaExpedicion(String p) { this.fechaExpedicion = p; }", "public void setFecRegistro(Date fecRegistro) {\n this.fecRegistro = fecRegistro;\n }", "public void SetDate(Date date);", "private String leerFecha() {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYY/MM/dd\");\n\t\t\treturn sdf.format(txtFecha.getDate());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Seleccione una fecha válida\", \"Aviso\", 2);\n\t\t\treturn null;\n\t\t}\n\t}", "public void setFechaNacimiento(Date fechaNacimiento)\r\n/* 138: */ {\r\n/* 139:252 */ this.fechaNacimiento = fechaNacimiento;\r\n/* 140: */ }", "public void fechahoy(){\n Date fecha = new Date();\n \n Calendar c1 = Calendar.getInstance();\n Calendar c2 = new GregorianCalendar();\n \n String dia = Integer.toString(c1.get(Calendar.DATE));\n String mes = Integer.toString(c2.get(Calendar.MONTH));\n int mm = Integer.parseInt(mes);\n int nmes = mm +1;\n String memes = String.valueOf(nmes);\n if (nmes < 10) {\n memes = \"0\"+memes;\n }\n String anio = Integer.toString(c1.get(Calendar.YEAR));\n \n String fechoy = anio+\"-\"+memes+\"-\"+dia;\n \n txtFecha.setText(fechoy);\n \n }", "public java.sql.Date getDateemission() {\r\n\t\treturn dateemission;\r\n\t}", "public void dataPadrao() {\n Calendar c = Calendar.getInstance();\n SimpleDateFormat s = new SimpleDateFormat(\"dd/MM/yyyy\");\n String dataAtual = s.format(c.getTime());\n c.add(c.MONTH, 1);\n String dataAtualMaisUm = s.format(c.getTime());\n dataInicial.setText(dataAtual);\n dataFinal.setText(dataAtualMaisUm);\n }", "public void setHire_date(Date hire_date) {\n this.hire_date = hire_date;\n }", "@Override\n\tpublic Long updateStartDate() {\n\t\treturn null;\n\t}", "public Employe() {\r\n this(NOM_BIDON, null);\r\n }", "public void setFecha_envio(java.sql.Timestamp newFecha_envio);", "public abstract void setFecha_fin(java.sql.Timestamp newFecha_fin);", "@Override\n\tpublic void initDate() {\n\n\t}", "public void setFecha(java.util.Calendar fecha)\r\n {\r\n this.fecha = fecha;\r\n }", "public void setFechaconsulta(Date fechaconsulta) {\r\n this.fechaconsulta = fechaconsulta;\r\n }", "public void setFecModificacion(Date fecModificacion) {\n this.fecModificacion = fecModificacion;\n }", "private void setDateButtonActionPerformed(java.awt.event.ActionEvent evt) {\n Date newDate = calendario.getDate();\n if(newDate != null) {\n java.sql.Date date = new java.sql.Date(newDate.getTime());\n control.setDate(date);\n control.crearAlerta(\"Informacion\", \"La fecha \" + date + \" ha sido agregada\" , this);\n } else {\n control.crearAlerta(\"Advertencia\", \"Debe escoger una fecha\", this);\n }\n }", "public void setfPeticion(Date fPeticion) {\r\n this.fPeticion = fPeticion;\r\n }", "@Override\n public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) {\n ((EditText) findViewById(R.id.editTextRecipeLastEaten)).setText(dayOfMonth + \"/\" + (month+1) + \"/\" +year);\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, dayOfMonth);\n\n dateLastEaten = calendar.getTime();\n }", "public Date getDateDembauche () {\n return dateEmbauche.copie();\n }", "public void setDate(int year, int month, int dayOfMonth)\n {\n this.date = new GregorianCalendar(year, month-1, dayOfMonth);\n }", "public void setDepartureDate(Date departureDate);", "public Employee(int emp_no, Date birth_date, String first_name, String last_name, String gender, Date hire_date) {\n this.emp_no = emp_no;\n this.birth_date = birth_date;\n this.first_name = first_name;\n this.last_name = last_name;\n this.gender = gender.equals(\"M\")?Gender.M:Gender.F;\n this.hire_date = hire_date;\n }", "@Override\n public Date getEffectiveDateForPerDiem(java.sql.Timestamp expenseDate) {\n if (getTripBegin() == null) {\n return new java.sql.Date(getDocumentHeader().getWorkflowDocument().getDateCreated().getMillis());\n }\n return new java.sql.Date(getTripBegin().getTime());\n }", "public void setBirthDate(Date inBirthDate)\n {\n birthdate = inBirthDate;\n }", "public void saveCalenderDate() {\r\n\t\tdate = getDateToDisplay(null);\r\n\t}", "public void setBirthdate(Date birthdate) {\r\n this.birthdate = birthdate;\r\n }", "public abstract void setFecha_termino(java.lang.String newFecha_termino);", "public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }", "public void setBirth_date(Date birth_date) {\n this.birth_date = birth_date;\n }", "public String getFechaModificacion() { return (this.fechaModificacion == null) ? \"\" : this.fechaModificacion; }", "public String getFechaModificacion() { return (this.fechaModificacion == null) ? \"\" : this.fechaModificacion; }", "public void setaBrithdate(Date aBrithdate) {\n this.aBrithdate = aBrithdate;\n }", "@Test\n public void testSetFechaPago() {\n System.out.println(\"setFechaPago\");\n Date fechaPago = null;\n DetalleAhorro instance = new DetalleAhorro();\n instance.setFechaPago(fechaPago);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }", "void setDateOfBirth(LocalDate dateOfBirth);" ]
[ "0.6706743", "0.66693133", "0.6628153", "0.65866786", "0.65525365", "0.63822556", "0.6315482", "0.62217593", "0.6212094", "0.61126727", "0.60613346", "0.6034328", "0.6025586", "0.6021452", "0.6004477", "0.5973975", "0.59652627", "0.59530777", "0.5947739", "0.59220004", "0.59135014", "0.5894835", "0.58465195", "0.58381957", "0.58376545", "0.58229864", "0.58131266", "0.58131266", "0.5784062", "0.57730263", "0.5769541", "0.5758086", "0.5739994", "0.5735739", "0.5735087", "0.57171345", "0.57156", "0.57097185", "0.5708875", "0.5701378", "0.56965214", "0.56891245", "0.5688283", "0.56880337", "0.5686265", "0.56614566", "0.5656986", "0.5649548", "0.5648922", "0.5646698", "0.56456757", "0.5633646", "0.56281215", "0.5622787", "0.562252", "0.5620971", "0.56156784", "0.5614375", "0.55970204", "0.55885863", "0.5580342", "0.5576486", "0.5576116", "0.55634373", "0.55611354", "0.55591667", "0.55591357", "0.55512756", "0.5546324", "0.55353314", "0.5535111", "0.55300313", "0.5515999", "0.55122864", "0.55110216", "0.55093914", "0.5509384", "0.5508229", "0.55031824", "0.55027306", "0.5500577", "0.54930234", "0.54929817", "0.5488219", "0.54843354", "0.5483487", "0.5462126", "0.54572314", "0.5454246", "0.54446906", "0.54365546", "0.5436059", "0.5434294", "0.54324424", "0.54324424", "0.54318166", "0.54318166", "0.5429958", "0.54281783", "0.5427246" ]
0.62228835
7
AUTRES METHODES Retourne sous forme de String les informations sur l'employe (Redefinition de la methode toString de la classe Object.)
public String toString () { return nom + " " + dateEmbauche; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\npublic String toString()\n{\n Employee emp = new Employee();\n \n StringBuilder sb = new StringBuilder();\n sb.append(\"Employee{\");\n sb.append(\"Name=\");\n sb.append(emp.getName());\n sb.append(\",Salary complement=\");\n sb.append(emp.getSalary_complement());\n sb.append(\"}\");\n\n return sb.toString();\n}", "public String toString()\n\t//return employee values\n\t{\n\t\treturn \"Id \" + id + \" Start date \" + start + \" Salary \" + salary + super.toString() + \" Job Title \" + jobTitle;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"\\nEmployees: \" + getEmployees();\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn super.toString() + \"----\" + \"Employee [salary=\" + salary + \", profession=\" + profession + \"]\";\n\t}", "public String toString(){\r\n return getNumber() + \":\" + getLastName() + \",\" + getFirstName() + \",\" + \"Sales Employee\";\r\n }", "public String toString(){\n StringBuilder builder = new StringBuilder();\n builder.append(\"Employee :[ Name : \" + name + \", dept : \" + dept + \", salary :\"\n + salary+\", subordinates = \\n\");\n for(Employee e : this.subordinates) {\n builder.append(\"\\t\" + e + \"\\n\");\n }\n builder.append(\" ]\");\n return builder.toString();\n }", "public java.lang.String toString() {\n return super.toString() + \"[EmpleadoPlantilla]\";\n }", "@Override\n\tpublic String toString() {\n\t\treturn this.nombre + \" \" + this.apellidos + \" (ID empleado - \" + this.id + \")\";\n\t}", "public String toString(){\n return \"Name: \"+this.name+\" Salary: \"+this.salary; // returning emp name and salary\r\n }", "@Override\n\tString toString(Employee obj) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\tString entregado;\r\n\t\tif (this.dataDeDevolucao == null)\r\n\t\t\tentregado = \"Emprestimo em andamento\";\r\n\t\telse\r\n\t\t\tentregado = this.dataDevolucaoStr;\r\n\t\treturn \"EMPRESTIMO - De: \" + this.emprestimoid.getNomeDonoItem() + \", Para: \"\r\n\t\t\t\t+ this.emprestimoid.getNomeRequerenteItem() + \", \" + this.emprestimoid.getNomeItem() + \", \"\r\n\t\t\t\t+ this.dataInicialEmprestimoStr + \", \" + this.numeroDiasParaEmprestimo + \" dias, ENTREGA: \" + entregado;\r\n\t}", "@Override\n public String toString() {\n return \"Empleado{\" + \"nombre=\" + nombre + \", edad=\" + edad + \", salario=\" + salario + '}';\n }", "@Override\n\tpublic String toString() {\n\t\tStringBuffer s1 = new StringBuffer();\n\t\ts1.append(\"Employee name : \");\n\t\ts1.append(this.name);\n\t\ts1.append(\" Id is: \");\n\t\ts1.append(Integer.toString(this.id));\n\t\ts1.append(\" salary is \");\n\t\ts1.append(Integer.toString(this.salary));\n\t\treturn s1.toString();\n\n\t}", "public String toString() {\r\n\t\treturn \"Name : \"+name+\"\\nEmp# : \"+employeeNum;\r\n\t}", "public String toString() {\n return \"Employee Id:\" + id + \" Employee Name: \" + name+ \"Employee Address:\" + address + \"Employee Salary:\" + salary;\n }", "public String toString() {\n\t\treturn \"Employee [firstname=\" + firstname + \", hours=\" + hours\n\t\t\t\t+ \", lastname=\" + lastname + \", payrate=\" + payrate\n\t\t\t\t+ \", totalpay=\" + totalpay + \"]\";\n\t}", "public String toString(){ \r\n return \"Nome: \" + this.nome + \"\\nEmail: \" + this.email +\r\n \"\\nEndereço: \" + this.endereco + \"\\nId: \" + this.id + \"\\n\"; \r\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Name is \" + empName + \"\\nEmp ID is \" + empID + \"\\nIncome=\" + annualIncome + \"\\nIncome Tax=\" + incomeTax\r\n\t\t\t\t+ \"\";\r\n\t}", "public String toString(){\n String s = \"\";\n s+=\"Employee: \"+name+\"\\n\";\n s+=\"Employee ID: \" + idnum +\"\\n\";\n s+=\"Current Position: \"+position+\"\\n\";\n s+=\"Current Salary: $\" +salary+\"\\n\";\n s+=\"Vacation Balance: \" + vacationBal+ \" days\\n\";\n s+=\"Bonus: $\" +annualBonus+\"\\n\";\n return s;\n }", "@Override\n public String toString() {\n return Objects.toStringHelper(this) //\n .add(Decouverte_.id.getName(), getId()) //\n .add(Decouverte_.dateDecouverte.getName(), getDateDecouverte()) //\n .add(Decouverte_.observations.getName(), getObservations()) //\n .toString();\n }", "public String toString()\r\n\t{\r\n\t\treturn (name+\" \"+age+\" \"+college+\" \"+course+\" \"+address+\" \");\r\n\t}", "@Override\n public String toString() {\n StringBuilder result = new StringBuilder();\n for (int i = 0; i < employees.length; i++) {\n result.append(employees[i] + \"\\n\");\n }\n return result.toString();\n }", "public String toString(){\n return \"Employee First Name: \" + firstName \t\n + \", Surname: \" + secondName\n + \", Hourly Rate \" + hourlyRate;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Titre : \"+_titre+\" Auteur: \"+_auteur+\" NbEcoutes : \"+_nbEcoutes;\r\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \"Employee [id=\" + id + \", name=\" + name + \", salary=\" + salary + \", designation=\" + designation\r\n\t\t\t\t+ \", department=\" + department + \", address=\" + address + \"]\";\r\n\t}", "@Override //indicates that this method overrides a superclass method\n public String toString(){\n\n return String.format(\"%s: %s %s%n%s : %s%n%s: %.2f%n%s: %.2f\",\"commission employee\",firstName,lastName,\n \"pan number\",panCardNumber,\"gross sales\",grossSales,\"commission rate\",commissionRate);\n }", "public String toString() {\n\t\t\r\n\t\treturn String.format(\"N%s. Title is %s, employer is %s,\"\r\n\t\t\t\t+ \"employee grade is %d, salary is %d\",super.toString(), getTitle(), employer, \r\n\t\t\t\temployeeGrade, salary);\r\n\t}", "@Override\n public /*final*/ String toString() {\n return name + \" / \" + address + \" / \" + salary;\n }", "@Override\r\n public String toString() {\r\n \r\n DateFormat data = DateFormat.getDateInstance();\r\n return \"Nome: \" + getNome()+ \" \\nCPF: \" + getCpf() + \" \\nTelefone: \"\r\n + getTelefone() + \" \\nData de Nascimento : \" + data.format(getDataNasc())\r\n + \" \\nSexo: \" + getSexo();\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"\\ntoStringcalled\\t\"+name+\"\\t\"+age+\"\\t\"+salary;\n\t}", "@Override\n public String toString() {\n String s = this.empID + \",\" + this.lastName + \",\" + this.firstName;\n s += String.format(\",%09d\", this.ssNum);\n s += \",\" + HRDateUtils.dateToStr(this.hireDate);\n s += String.format(\",%.2f\", this.salary);\n return s;\n\n }", "@Override\n public String toString() {\n String s = this.empID + \",\" + this.lastName + \",\" + this.firstName;\n s += String.format(\",%09d\", this.ssNum);\n s += \",\" + HRUtility.dateToStr(this.hireDate);\n s += String.format(\",%.2f\", this.salary);\n return s;\n }", "@Override\r\n\tpublic String toString() {\n\t\treturn \"ID:\" + this.empid + \",NAME:\" + this.name;\r\n\t}", "public String toString() {\r\n\t\treturn this.eId + \" \" + this.eName + \" \" + this.eCity + \" \";\r\n\t}", "public String toString(){\n return getfName() +\"\\n\" + getlName() + \"\\n\" + getSsn() + \"\\n\" + getBday() + \"\\n\" + getGender();\n }", "@Override\n public String toString() {\n \treturn this.name+\" \"+this.eid;\n }", "@Override\n public String toString() {\n // TODO this is a sudo method only for testing puroposes\n return \"{name: 5aled, age:15}\";\n }", "@Override\r\n\tpublic String toString() {\r\n\t\t\r\n\t\t// Variables declaration\r\n\t\t\r\n\t\tString output = null;\r\n\t\t\r\n\t\t// Data processing\r\n\t\t\r\n\t\toutput = String.format(\"\\n ID Veículo: %s\", idVeiculo != null ? idVeiculo.toString() : \"\");\r\n\r\n\t\toutput += String.format(\"\\n Placa: %s\", placaVeiculo != null ? placaVeiculo : \"\");\r\n\t\t\r\n\t\toutput += String.format(\"\\n Modelo: %s\", modeloVeiculo != null ? modeloVeiculo : \"\");\r\n\t\t\r\n\t\toutput += String.format(\"\\n Marca: %s\", marcaVeiculo != null ? marcaVeiculo : \"\");\r\n\t\t\r\n\t\toutput += String.format(\"\\n Cor: %s\", corVeiculo != null ? corVeiculo : \"\");\r\n\t\t\r\n\t\toutput += String.format(\"\\n Acentos: %s\", acentosVeiculos != null ? acentosVeiculos : \"\");\r\n\t\t\r\n\t\t// Information output\r\n\t\t\r\n\t\treturn output;\r\n\t}", "@Override\n public String toString() {\n return this.codigo + \" - \" + this.descricao + \" - \" + this.campoDeInteresse;\n }", "public String toString() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"M/d/yyyy\");\n\t\treturn employeeName + \" \" + EID + \" \" + address + \" \" + phoneNumber + \" \" + sdf.format(DOB) + \" \" + securityClearance;\n\t}", "@Override\n\t\t\tpublic String toString() {\n\t\t\t\treturn nome;\n\t\t\t}", "@Override\n public String toString(){\n String empDetails = super.toString() + \"::FULL TIME::Annual Salary \"\n \t\t+ doubleToDollar(this.annualSalary);\n return empDetails;\n }", "public String toString() {\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\"); //Mostraremos la fecha en formato DD/MM/AAAA\r\n\t\tString nacEdad=sdf.format(fechaNac)+ \"(\"+obtenerAnios()+\" años)\";\r\n\t\treturn \"Persona [nombre=\" + nombre + \", fechaNac=\" + nacEdad + \", DNI=\" + dni\r\n\t\t\t\t+ \", sexo=\" + sexo + \", peso=\" + peso + \", altura=\" + altura\r\n\t\t\t\t+ \"]\";\r\n\t}", "@Override\n public String toString ()\n {\n String format = \"Employee %s: %s , %s\\n Commission Rate: $%.1f\\n Sales: $%.2f\\n\";\n\n return String.format(format, this.getId(), this.getLastName(), this.getFirstName(), this.getRate(), this.getSales());\n }", "public String toString() {\n\t // added the Address here\n return String.format(\"%s, %s Hired: %s Birthday: %s \\n Address: %s\", \n lastName, firstName, hireDate, birthDate, Address);\n }", "@Override\n\tpublic String toString() {\n\t\treturn this.nome + \" (\" + this.funcao + \") - \" + this.biografia + \" - \" + this.email + \" - \" + this.foto + \" - \"\n\t\t\t\t+ this.formacao + \" - \" + this.unidade + \" - \" + this.data;\n\t}", "public String toString() {\n\t\treturn String.format( \"%s: %s\\n%s: $%,.2f; %s:%.2f\",\r\n\t\t\t\t \"commission employee\", super.toString(),\r\n\t\t\t\t \"gross sales\", getGrossSales(),\r\n\t\t\t\t \"commission rate\", getCommissionRate() );\r\n\t}", "@Override\r\n public String toString() {\r\n return \"Employee{\" + super.toString() + \", \" + \"employeeNumber=\" + employeeNumber + \", salary=\" + salary + '}';\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn this.getsTenkhoanquy() + \" : \" + this.fSotienconlai\n\t\t\t\t+ this.sLoaitiente;\n\t}", "@Override\n public String toString() {\n return nome + placa;\n }", "public String toString()\n\t{\n\t final String TAB = \" \";\n\t \n\t String retValue = \"\";\n\t \n\t retValue = \"Pessoa ( \"\n\t + super.toString() + TAB\n\t + \"idPessoa = \" + this.idPessoa + TAB\n\t + \"nome = \" + this.nome + TAB\n\t + \"sobreNome = \" + this.sobreNome + TAB\n\t + \"foneResidencial = \" + this.foneResidencial + TAB\n\t + \"celular = \" + this.celular + TAB\n\t + \" )\";\n\t\n\t return retValue;\n\t}", "@Override\npublic String toString() {// PARA MOSTRAR LOS DATOS DE ESTA CLASE\n// TODO Auto-generated method stub\nreturn MuestraCualquiera();\n}", "@Override\n\tpublic String toString() {\n\t\treturn hablar() + \"\\nSexo \" + this.sexo + \" mi edad es de \" + this.edad + \" vuelo a \" + this.velocidadVuelo + \" Km/h\" + \" y peso \" + this.peso + \" Kg\";\n\t}", "public String toString() {\r\n\t\treturn \"Name\t:\" + this.name + \"\\n\" +\r\n\t\t\t\t\"Salary\t:\" + this.salary;\r\n\t}", "@Override\n public String toString()\n {\n /* Concatenates the details of the object */\n String s = \"GENERAL COMPLAINT\";\n s = s + \"\\n\" + getCustomer().toString();\n s = s + \"\\nNATURE OF COMPLAINT: \" + getContent();\n s = s + \"\\nDATE OF COMPLAINT: \" + getDate().toString();\n \n /* Returns the details of this object */\n return s;\n }", "@Override\n public String toString(){\n return String.format(\"Hourly Employee : %s\\n%s : %,.2f\", \n super.toString(), \"Hourly Wage\", getWage());\n }", "public String toString() {\n\t\treturn this.titel + \" \" + this.name + \" (\" + this.mail + \")\";\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn this.nome;\r\n\t}", "@Override\n public String toString() {\n // [Durga,CEO,30000.00,Hyderabad, THEJA,COO,29000.00,Bangalore]\n // String string = String.format(\"%s,%s,%.2f,%s\", name, designation, salary, city);\n String string = String.format(\"(%s,%s,%.2f,%s)\", name, designation, salary, city);\n return string;\n }", "public String toString() {\n\t\treturn \"Name: \"+this.name+\"\\nAge: \"+this.age+\"\\nId: \"+this.id+\"\\nNumber day rent: \"+this.numberDayRent;\n\t}", "public String toString(){\n return \"NAME: \"+this.name+\" ROLL: \"+this.roll+\" MALE: \"+this.male;\r\n }", "@Override\npublic String toString() {\n\treturn (super.toString()+\"\"+this.matiere);\n}", "@Override\r\n\tpublic String toString() {\n\t\treturn this.titolo + \" \" +this.autore + \" \" + this.genere;\r\n\t}", "public String ToString(){\r\n String Result;\r\n return Result = \"Arco: \"+this.id+\" Dato: \"+String.valueOf(this.Dato)+\" Peso: \"+String.valueOf(this.p)+\" Extremo Inicial: \"+this.Vi.id+\" Extremo Final: \"+this.Vf.id;\r\n }", "public String toString(){\n return getName() + getDetails() + getPhone();\n }", "public String toString() {\r\n\t\treturn String.format(\"This is a junior employee. ID is %d, hired since %d, and commission is $%,.2f.\\r\\n\", \r\n\t\t\tgetID(), getYearHired(), getCommission());\r\n\t}", "@Override\r\n public String toString() {\r\n return \"Datos de Jugador: \"\r\n + \"\\n\" + \"Alias : \" + this.getAlias()\r\n + \"\\n\" + \"Nombre: \" + this.getNombre()\r\n + \"\\n\" + \"Edad : \" + this.getEdad()\r\n + \"\\n\" + \"Partidas Ganadas: \" + this.getPartidasGanadasToString()\r\n + \"\\n\" + \"Partidas Perdidas: \" + this.getPartidasPerdidasToString()\r\n + \"\\n\" + \"Partidas Empatadas: \" + this.getPartidasEmpatadasToString();\r\n }", "public String toString() {\n return \"\" +getNombre() + \",\" + getPuntos();\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"CODIGO: \" +codigo+ \" NOME: \"+nome+\" DIA: \"+dataInicio+\" HORA:\"+horaInicio+\" LOCAL:\"+local;\n\t}", "public String toString() {\r\n return nom + \" \" + dateEmbauche;\r\n }", "public String toString () {\r\n\t\t\r\n\t\treturn \"Title: \"+this.title +\", Company: \"+company+\", Annual Salary: \"+annualSalary;\r\n\t}", "@Override\n public String toString(){\n return name + \":\" + age;\n }", "public String toString() {\n return getJobtitle() + \" by \" + getUsername() + \"\\n\" +\n getLocation() + \" - PhP\" + getSalary() + \" - \" + getJobfield();\n }", "@Override\r\n\tpublic String toString() {\r\n\t\treturn \" id=\" + id + \", nome=\" + nome + \", dat_nasc=\"\r\n\t\t\t\t+ dat_nasc + \", salario=\" + salario + \" \\n \";\r\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"------------------------\\n\"\r\n\t\t\t\t+ this.getCognome() + \", \" + this.getNome() + \"\\n\" +\r\n\t\t\t\t\"mail: \" + this.getEmail() + \"\\n\" + \r\n\t\t\t\t\"tel: \" + this.getNumeroTelefono() + \"\\n\" +\r\n\t\t\t\t\"------------------------\";\r\n\t}", "public String toString(){\n\t\t\treturn competitors.toString();\n\t\t}", "@Override\n public String toString() {\n return getDescricao();\n }", "@Override\r\n public String toString() {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n \r\n return (\r\n \"\\n\" +\r\n \"Codigo tour: \" + this.getCodigoIdentificacion() + \"\\n\" +\r\n \"Nombre Comercial: \" + this.getNombreComercial() + \"\\n\" +\r\n \"Lugar de salida: \" + this.getLugarPartida() + \"\\n\" +\r\n \"Fecha de salida: \" + sdf.format(this.getFechaSalida()) + \"\\n\" +\r\n \"Fecha de regreso: \" + sdf.format(this.getFechaRegreso()) + \"\\n\" +\r\n \"Precio: \" + String.format(\"$ %(,.0f\", this.getPrecio()) + \"\\n\" +\r\n \"Estadía (días): \" + this.calcularEstadia() + \"\\n\" +\r\n \"Costo: \" + String.format(\"$ %(,.0f\", this.calcularPrecio()) + \"\\n\" +\r\n \"Nombre empresa: \" + this.getNombreEmpresa() + \"\\n\" +\r\n \"Tipo de empresa: \" + this.getTipo() + \"\\n\" +\r\n \"Viajero frecuente:\" + (this.isViajeroFrecuente() ? \"Si\\n\" : \"No\\n\")\r\n );\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn id + \" \" + name + \" \" + surname;\n\t}", "public String toString(){\n\t\treturn name + \", \" + country + \", \" + age;\n }", "public String toString() {\r\n\t\treturn \"Student \" + imePrezime + \" studira \" + fakultet + \" fakultet \" + \r\n\t\t\t\t\"i trenutno je na \" + godina + \". godini\";\r\n\t}", "public String infoCompletaEmpleado(Empleado empleadoEncontrado){\n String info = \"\";\n info += \"Nombre: \" + empleadoEncontrado.getNombre() + \"\\n\" +\n \"Identificacion: \" + empleadoEncontrado.getIdentificacion() + \"\\n\" +\n \"Facultad: \" + empleadoEncontrado.getFacultad() + \"\\n\" +\n \"Edad: \" + empleadoEncontrado.getEdad() + \"\\n\" +\n \"Sexo: \" + empleadoEncontrado.getSexo() + \"\\n\" +\n \"Fecha de nacimiento (DD/MM/AAAA): \" + empleadoEncontrado.getFechaDeNacimiento() + \"\\n\" + \n \"Estatura (cm): \" + empleadoEncontrado.getEstatura() + \"\\n\" +\n \"Peso: \" + empleadoEncontrado.getPeso() + \"\\n\"+\n \"Enfermedades: \" + \"\\n\"+empleadoEncontrado.getCadenaFactoresRiesgo() + \"\\n\" +\n \"Sintomas Covid: \" +\"\\n\"+ empleadoEncontrado.getCovid() + \"\\n\";\n return info;\n }", "public String toString() {\r\n\t\tfinal String TAB = \" \";\r\n\r\n\t\tString retValue = \"\";\r\n\r\n\t\tretValue = \"EmploymentInformationForm ( \" + super.toString() + TAB\r\n\t\t\t\t+ \"employmentInfoId = \" + this.employmentInfoId + TAB\r\n\t\t\t\t+ \"userId = \" + this.userId + TAB + \"employerName = \"\r\n\t\t\t\t+ this.employerName + TAB + \"employmentType = \"\r\n\t\t\t\t+ this.employmentType + TAB + \"dateOfJoining = \"\r\n\t\t\t\t+ this.dateOfJoining + TAB + \"dateOfRelieving = \"\r\n\t\t\t\t+ this.dateOfRelieving + TAB + \"designation = \"\r\n\t\t\t\t+ this.designation + TAB + \"supervisorName = \"\r\n\t\t\t\t+ this.supervisorName + TAB + \"employmentAddress = \"\r\n\t\t\t\t+ this.employmentAddress + TAB + \"currentEmployee = \"\r\n\t\t\t\t+ this.currentEmployer + TAB + \" )\";\r\n\r\n\t\treturn retValue;\r\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn String.format(\"%s: %s %s%n%s: %s%n%s: %.2f%n%s: %.2f%n%s: %.2f\", \"base-salaried commission employee\", getFirstName(),\r\n\t\t\t\tgetLastName(), \"social security number\", getSocialSecurityNumber(), \"gross sales\", getGrossSales(),\r\n\t\t\t\t\"commission rate\", getCommissionRate(), \"base salary\", getBaseSalary());\r\n\t}", "@Override\n\tpublic String toString() {\n\t\t\n\t\treturn String.format(\"%s/%s, %s, %s, status: %s\",getNome(),getIdentificacao(),getEmail(),getCelular(),status);\n\t}", "public String toString(){\n return \"Name: \" +name+\", School Name: \"+school;\n }", "public String toString() {\r\n\t\tString output = personNum + \"; \" + personType + \"; \" + personName + \"; \" + personTelNo + \"; \" + personEmail + \"; \" \r\n\t\t\t\t+ personAddress + \"\\n\"; \r\n\t return output;\r\n\t}", "public String toString(){\n return \"Salir carcel\";\n }", "public String toString() {\r\n\t\treturn \"Student ID: \" + this.studentID + \"\\n\" + \r\n\t\t\t\t\"Name and surname: \" + this.name + \"\\n\" + \r\n\t\t\t\t\"Date of birth: \" + this.dateOfBirth + \"\\n\" + \r\n\t\t\t\t\"University:\" + this.universityName + \"\\n\" + \r\n\t\t\t\t\"Department code: \" + this.departmentCode + \"\\n\" + \r\n\t\t\t\t\"Department: \" + this.departmentName + \"\\n\" +\r\n\t\t\t\t\"Year of enrolment: \" + this.yearOfEnrolment;\r\n\t}", "@Override\r\n\tpublic String falar() {\r\n\t\treturn \"[ \"+getNome()+\" ] Sou Um Professor\";\r\n\t}", "public String toString() {\n \tString ret;\n \tint sumWait = 0;\n \tfor(Teller t : employees)\n \t{\n \t\tsumWait += t.getSumWaitTime();\n \t}\n \t\n \tret = \"Total elapsed time: \" + clock;\n \tret = ret + \"\\nTotal customers helped: \"+ numCust;\n \tret = ret + \"\\nAvg. wait time: \"+String.format(\"%.3f\",(float)sumWait/numCust);\n \tfor(Teller t : employees)\n \t{\n \t\tret = ret + \"\\nTeller \"+t.getID()+\": % time idle: \"+String.format(\"%.3f\",(float)(100*t.getIdleTime())/clock)+\" Number of customers helped: \"+t.getNumHelped();\n \t}\n \treturn ret;\n }", "@Override\n\tpublic String toString() {\n\t\treturn Id +\" \"+ AdiSoyadi +\" \"+ eposta;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn getName()+\" , \"+getMobile()+\" , \"+getAddress();\n\t}", "public String toString(){\n\t\tif(categoria == 1)\n\t\t\treturn \"Profesor Ayudante\\n\" + super.toString() + \"\\n\" + \"Horario = \" + tutoria;\n\t\telse if(categoria == 2)\n\t\t\treturn \"Profesor Titular de Universidad\\n\" + super.toString() + \"\\n\" + \"Horario = \" + tutoria;\n\t\telse\n\t\t\treturn \"Profesor Catedrático de Universidad\\n\" + super.toString() + \"\\n\" + \"Horario = \" + tutoria;\n\t}", "public String toString(){\r\n return String.format(\"%-15s%-15s%-30s%,8.2f\", this.employeeFirstName, \r\n this.employeeLastName, this.employeeEmail, getBiweeklySalary());\r\n }", "@Override\r\n public String toString() {\r\n return \"Equipamento{\" + \"nome=\" + nome + \", cliente=\" + cliente + '}';\r\n }", "@Override\n public String toString(){\n return Nombre + \", \" + Clave + \", de \" + horario + \", \" + Maestro;\n }", "@Override\n public String toString() {\n return \"\\tMunicipio: \" + municipio + \"\\t\" + \"Habitantes: \" + habitantes + \".\";\n }", "public String toString()\n\t{\n\t\treturn \"Faculty \"+super.toString()+\" exp in yrs \"+expInYears+\" expert in \"+sme;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn name+\" \"+age;\n\t}" ]
[ "0.78944844", "0.78259665", "0.7762444", "0.775924", "0.7735166", "0.7670491", "0.76554376", "0.76307976", "0.7593298", "0.75379664", "0.74947464", "0.74876523", "0.7447072", "0.7396599", "0.73878026", "0.73849505", "0.7364074", "0.73523545", "0.7350732", "0.7318521", "0.7292942", "0.7277908", "0.7266407", "0.72550243", "0.72496736", "0.724787", "0.7244777", "0.7244207", "0.72282857", "0.7211654", "0.7195256", "0.719363", "0.7189659", "0.71772665", "0.71654797", "0.7146169", "0.7134016", "0.71338177", "0.71321726", "0.7128953", "0.7127287", "0.7123219", "0.71107256", "0.71000016", "0.70972323", "0.7096687", "0.70916724", "0.7075208", "0.7074138", "0.7067246", "0.7065289", "0.7064796", "0.7050912", "0.7047738", "0.7022313", "0.7014478", "0.7013865", "0.7008919", "0.70039123", "0.6999014", "0.6992803", "0.6988873", "0.6987368", "0.69830924", "0.698208", "0.69760436", "0.69707114", "0.69696385", "0.6961088", "0.6953512", "0.69496906", "0.69336945", "0.6931511", "0.69307053", "0.69220114", "0.6921298", "0.6919168", "0.69151163", "0.69083655", "0.6904243", "0.6890454", "0.688983", "0.68876725", "0.6887283", "0.688588", "0.688336", "0.6880197", "0.6876414", "0.68709403", "0.6862303", "0.68620956", "0.6860479", "0.68576586", "0.68473285", "0.684657", "0.68392646", "0.6838667", "0.6836458", "0.68225497", "0.68160325" ]
0.6955165
69
The NeuralBiasNode cannot be used to point to, but it can point to a NeuralHiddenNode or a NeuralOutputNode. The NeuralBiasNode has a constant value, but the value of the edges leaving the node can change. This way the next layer will always have an input.
public interface NeuralBiasNodeInterface extends NeuralNodeInterface{ /** * TODO */ /** * UnsupportedOperationException linkFrom */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isBiasNeuron();", "public void chooseBiasValue() {\r\n \r\n if (biasMode.charAt(0) == 't')\r\n {\r\n for (int i=0; i < hiddenLayerContainer.getHiddenLayerContainer().size(); i++){\r\n hiddenLayerContainer.getHiddenLayerContainer().get(i).setBiasActive(true);\r\n }\r\n outputLayer.setBiasActive(true);\r\n }\r\n }", "public void setBias(Bias bias) {\n this.bias = bias;\n }", "public double getBias();", "public int getBias() {\n\t\treturn bias;\n\t}", "public int hasBias() {\r\n\t\tif (bias != null) {\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public Layer(Layer previousLayer, Neuron bias) {\r\n\t\tthis(previousLayer);\r\n\t\tthis.bias = bias;\r\n\t\tgetNeurons().add(bias); //Add the bias neuron\r\n\t}", "public DriftCheckBias getBias() {\n return this.bias;\n }", "void BP(Double learningRate){ //call BP() on each neuron except Bias Neuron\n for (int i = 0; i < neurons.size() -1; i++){\n neurons.get(i).BP(learningRate);\n }\n }", "public Neuron(Neuron n, double b){\r\n\t\t//Set this Neuron to the Neuron on which to base it\r\n\t\tinputs=n.inputs;\r\n\t\tweights=n.weights;\r\n\t\tlayer=n.layer;\r\n\t\tbias=b;\r\n\t\t//Make a MUTATIONRATE % chance to change the state of each input\r\n\t\t/*for(int i=0; i<inputs.size(); i++)\r\n\t\t\tif(Math.random()<=MUTATIONTRATE)\r\n\t\t\t\tif(inputs.get(i)==1)inputs.set(i, 0);\r\n\t\t\t\telse inputs.set(i, 1);*/\r\n\t\t\r\n\t\t//Change each weight by +/- MUTATIONDEGREE %\r\n\t\tfor(int i=0; i<weights.length; i++)\r\n\t\t\tweights[i]*=1+(Math.random()*MUTATIONDEGREE-(MUTATIONDEGREE/2));\r\n\t}", "public void setBias(DriftCheckBias bias) {\n this.bias = bias;\n }", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=1;\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\r\n\r\n\t\tNode node=new Node(4);\r\n\t\t//Connecting output node with hidden layer nodes\r\n\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t{\r\n\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[j]);\r\n\t\t\tnode.parents.add(nwp);\r\n\t\t}\t\r\n\t\toutputNode = node;\r\n\r\n\t}", "NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Random random, Double[][] hiddenWeights, Double[][] outputWeights) {\r\n this.trainingSet = trainingSet;\r\n this.learningRate = learningRate;\r\n this.maxEpoch = maxEpoch;\r\n this.random = random;\r\n\r\n //input layer nodes\r\n inputNodes = new ArrayList<>();\r\n int inputNodeCount = trainingSet.get(0).attributes.size();\r\n int outputNodeCount = trainingSet.get(0).classValues.size();\r\n for (int i = 0; i < inputNodeCount; i++) {\r\n Node node = new Node(0);\r\n inputNodes.add(node);\r\n }\r\n\r\n //bias node from input layer to hidden\r\n Node biasToHidden = new Node(1);\r\n inputNodes.add(biasToHidden);\r\n\r\n //hidden layer nodes\r\n hiddenNodes = new ArrayList<>();\r\n for (int i = 0; i < hiddenNodeCount; i++) {\r\n Node node = new Node(2);\r\n //Connecting hidden layer nodes with input layer nodes\r\n for (int j = 0; j < inputNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(inputNodes.get(j), hiddenWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n hiddenNodes.add(node);\r\n }\r\n\r\n //bias node from hidden layer to output\r\n Node biasToOutput = new Node(3);\r\n hiddenNodes.add(biasToOutput);\r\n\r\n //Output node layer\r\n outputNodes = new ArrayList<>();\r\n for (int i = 0; i < outputNodeCount; i++) {\r\n Node node = new Node(4);\r\n //Connecting output layer nodes with hidden layer nodes\r\n for (int j = 0; j < hiddenNodes.size(); j++) {\r\n NodeWeightPair nwp = new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n node.parents.add(nwp);\r\n }\r\n outputNodes.add(node);\r\n }\r\n }", "public interface Neuron {\n /**\n * Checks if current neuron is of type NeuronType.INPUT.\n *\n * @return true if it's input neuron, false otherwise\n */\n boolean isInputNeuron();\n\n /**\n * Checks if current neuron is of type NeuronType.HIDDEN.\n *\n * @return true if it's hidden neuron, false otherwise\n */\n boolean isHiddenNeuron();\n\n /**\n * Checks if current neuron is of type NeuronType.OUTPUT.\n *\n * @return true if it's output neuron, false otherwise\n */\n boolean isOutputNeuron();\n\n /**\n * Checks if current neuron is of type NeuronType.BIAS.\n *\n * @return true if it's bias neuron, false otherwise\n */\n boolean isBiasNeuron();\n\n /**\n * Getter for neuron's name.\n *\n * @return String of this neuron's name\n */\n String getName();\n\n /**\n * Setter for neuron's name.\n *\n * @param name String value as new name for this neuron\n * @return this Neuron instance\n */\n Neuron setName(String name);\n\n /**\n * Gets the List of all incoming neurons (dendrites) for this one.\n * Could be called for all neurons except neurons from input layer and bias neurons,\n * as they can't have incoming connections.\n *\n * @return the List of Neuron instance that leads to this neuron\n */\n List<Neuron> getDendrites();\n\n /**\n * Sets the List of all incoming neurons (dendrites) for this one.\n * Could be called for all neurons except neurons from input layer and bias neurons,\n * as they can't have incoming connections.\n *\n * @return this Neuron instance\n */\n Neuron setDendrites(List<Neuron> dendrites);\n\n /**\n * Gets the current value of this neuron.\n *\n * @return double value of this neuron\n */\n double getAxon();\n\n /**\n * Sets the value for this neuron.\n * Could be called only for input neurons.\n * Hidden neurons and output neurons calculating their values using information from their incoming connections\n * and using activation function, and bias neuron always have axon = 1.\n *\n * @param newValue new axon value for input neuron\n * @return this Neuron instance\n */\n Neuron setAxon(double newValue);\n\n /**\n * Gets the List of all outgoing neurons (synapses) from this one.\n * Could be called for all neurons except of output type as they can't have outgoing connections.\n *\n * @return the List of Neuron instance that this neuron leads to\n */\n List<Neuron> getSynapses();\n\n /**\n * Sets the List of all outgoing neurons (synapses) from this one.\n * Could be called for all neurons except of output type, as they can't have incoming connections.\n *\n * @return this Neuron instance\n */\n Neuron setSynapses(List<Neuron> synapses);\n\n /**\n * Gets the type of this neuron.\n *\n * @return NeuronType value that represents this neuron's type\n */\n NeuronType getType();\n\n /**\n * Computes the value for this neuron from all incoming neurons, using the list of weights passed in this method.\n * The size of weights list should be same as the number of incoming connections for this neuron.\n * Otherwise RuntimeException would be thrown.\n *\n * @param weights the List of double values the represents weights for each incoming connection for this neuron\n * @return new computed soma value\n */\n double calculateSoma(List<Double> weights);\n\n /**\n * Calculates the new value (axon) for this neuron from it's soma, normalized by activation function.\n *\n * @param activationFunction activation function to be used for normalizing soma value\n * @return new axon value for this neuron\n */\n double calculateAxon(ActivationFunction activationFunction);\n\n /**\n * Computes the value for this neuron from all incoming neurons, using the list of weights passed in this method.\n * The size of weights list should be same as the number of incoming connections for this neuron.\n * Otherwise RuntimeException would be thrown.\n * Then calculates the new value (axon) for this neuron from it's soma, normalized by activation function.\n *\n * @param weights the List of double values the represents weights for each incoming connection for this neuron\n * @param activationFunction activation function to be used for normalizing soma value\n * @return new axon value for this neuron\n */\n double calculateSomaAndAxon(List<Double> weights, ActivationFunction activationFunction);\n\n double getDelta();\n\n void setDelta(double delta);\n}", "public NNImpl(ArrayList<Instance> trainingSet, int hiddenNodeCount, Double learningRate, int maxEpoch, Double [][]hiddenWeights, Double[][] outputWeights)\r\n\t{\r\n\t\tthis.trainingSet=trainingSet;\r\n\t\tthis.learningRate=learningRate;\r\n\t\tthis.maxEpoch=maxEpoch;\r\n\r\n\t\t//input layer nodes\r\n\t\tinputNodes=new ArrayList<Node>();\r\n\t\tint inputNodeCount=trainingSet.get(0).attributes.size();\r\n\t\tint outputNodeCount=trainingSet.get(0).classValues.size();\r\n\t\tfor(int i=0;i<inputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(0);\r\n\t\t\tinputNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from input layer to hidden\r\n\t\tNode biasToHidden=new Node(1);\r\n\t\tinputNodes.add(biasToHidden);\r\n\r\n\t\t//hidden layer nodes\r\n\t\thiddenNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<hiddenNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(2);\r\n\t\t\t//Connecting hidden layer nodes with input layer nodes\r\n\t\t\tfor(int j=0;j<inputNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(inputNodes.get(j),hiddenWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\r\n\t\t\thiddenNodes.add(node);\r\n\t\t}\r\n\r\n\t\t//bias node from hidden layer to output\r\n\t\tNode biasToOutput=new Node(3);\r\n\t\thiddenNodes.add(biasToOutput);\r\n\r\n\t\t//Output node layer\r\n\t\toutputNodes=new ArrayList<Node> ();\r\n\t\tfor(int i=0;i<outputNodeCount;i++)\r\n\t\t{\r\n\t\t\tNode node=new Node(4);\r\n\t\t\t//Connecting output layer nodes with hidden layer nodes\r\n\t\t\tfor(int j=0;j<hiddenNodes.size();j++)\r\n\t\t\t{\r\n\t\t\t\tNodeWeightPair nwp=new NodeWeightPair(hiddenNodes.get(j), outputWeights[i][j]);\r\n\t\t\t\tnode.parents.add(nwp);\r\n\t\t\t}\t\r\n\t\t\toutputNodes.add(node);\r\n\t\t}\t\r\n\t}", "public UnsupervisedHebbianNetwork(int inputNeuronsNum, int outputNeuronsNum) {\n\t\tthis.createNetwork(inputNeuronsNum, outputNeuronsNum,\n\t\t\tTransferFunctionType.LINEAR);\n\n\t}", "public Node() {\r\n\t\tthis.input = null;\r\n\t\tthis.inputWeights = null;\r\n\t}", "public Neuron(int l, double b){\r\n\t\tbias=b;\r\n\t\t\r\n\t\tif(l==1)//Make all Brain.INPUTS an Input for a first layer Neuron\r\n\t\t\tfor(int n=0; n<Brain.INPUTS; n++)\r\n\t\t\t\tinputs.add(1);\r\n\t\telse for(int n=0; n<Brain.NEURONSPERLAYER; n++) //Randomly choose to make each Neuron in the previous Layer an Input\r\n\t\t\t\tif(Math.random()>=0.5)\r\n\t\t\t\t\tinputs.add(1);\r\n\t\t\t\telse inputs.add(0);\r\n\t\tif(!inputs.contains(1)) //If no inputs were chosen, randomly select one Neuron from the previous Layer as an Input\r\n\t\t\tinputs.set((int)Math.random()*Brain.NEURONSPERLAYER, 1);\r\n\t\t\r\n\t\tweights= new double[inputs.size()]; //Create an array with a randomly 1 generated weight between -5 and 5 for each Input \r\n\t\tfor(int i=0; i<inputs.size(); i++)\r\n\t\t\tweights[i]=Math.random()*10-5;\r\n\t\t\r\n\t}", "public RestrictedBoltzmannMachine(int[] inputData, double weightWide, double biasWide, double learningRate) {\n\t\t/*\n\t\t * inputData : {visibleUnitsNumber, hiddenunitsNumber}\n\t\t * \n\t\t * \n\t\t */\n\t\tthis.learningRate = learningRate;\n\t\tthis.weightWide = weightWide;\n\t\tthis.biasWide = biasWide;\n\t\tRandom rand = new Random();\n\t\tthis.layers = new Entity[2][];\n\t\tfor(int i = 0; i < 2; i++){\n\t\t\tthis.layers[i] = new Entity[inputData[i]];\n\t\t\tfor(int j = 0; j < inputData[i]; j++){\n\t\t\t\tthis.layers[i][j] = new Entity(j, (rand.nextDouble())*this.biasWide);\n\t\t\t}\n\t\t}\n\t\tthis.connections = new double[inputData[0]][inputData[1]];\n\t\tfor(int i = 0; i < this.connections.length; i++){\n\t\t\tfor(int j = 0; j < this.connections[0].length; j++){\n\t\t\t\tthis.connections[i][j] = (rand.nextDouble())*this.weightWide;\n\t\t\t}\n\t\t}\n\n\t\tthis.connectionsGradient = new double[this.connections.length][this.connections[0].length];\n\n\t\tthis.biasGradient = new double[2][];\n\t\tthis.biasGradient[0] = new double[this.layers[0].length];\n\t\tthis.biasGradient[1] = new double[this.layers[1].length];\n\t}", "public Neuron(double value) {\n this.updatedWeights = this.weights;\n this.change = -1;\n this.value = value;\n }", "boolean isHiddenNeuron();", "public NeurualNetWork(\n int argNumInputs,\n int argNumHidden,\n int argNumOutput,\n double argLearningRate,\n double argMomentumTerm,\n double argA,\n double argB ){\n\n // add one for bias\n this.mNumInputs = argNumInputs + 1;\n //TODO: different: add one for bias\n this.mNumHidden = argNumHidden + 1;\n this.mNumOutputs = argNumOutput;\n this.mLearningRate = argLearningRate;\n this.mMomentumTerm = argMomentumTerm;\n this.mArgA = argA;\n this.mArgB = argB;\n\n zeroWeights();\n //Comment: It's a bad way to use three dimension to store NN, since input, hidden, output don't have same length\n }", "NeuralNetwork mutate(float rate);", "public Brain(int nInputs, int nOutputs, int hiddenLayers, int neuronsPerHiddenLayer) {\r\n // Prepare brain map\r\n neurons = new Neuron[hiddenLayers + 2][];\r\n neurons[0] = new Neuron[nInputs];\r\n neurons[hiddenLayers + 1] = new Neuron[nOutputs];\r\n for (int i = 0; i < hiddenLayers; i++) {\r\n neurons[i + 1] = new Neuron[neuronsPerHiddenLayer];\r\n }\r\n // Randomize brain\r\n initialize();\r\n }", "public void FeedForward() {\r\n\t\tfor (int i = 0; i < Node.length; i++) {\r\n\t\t\tNet = Node[i].Threshold;\r\n\r\n\t\t\tfor (int j = 0; j < Node[i].Weight.length; j++)\r\n\t\t\t\tNet = Net + Input[j] * Node[i].Weight[j];\r\n\r\n\t\t\tNode[i].Output = Sigmoid(Net);\r\n\t\t}\r\n\t}", "public void setNetworth(int value);", "public void calculate() {\r\n\t\tint bias = hasBias();\r\n\r\n\t\tfor(int i = bias; i < getNeurons().size(); i++) {\r\n\t\t\tgetNeurons().get(i).activate(); \r\n\t\t}\r\n\t}", "public void updateBottomWeight(){\r\n\t \tif(this.bottomNode != null)\r\n\t \t{\r\n\t \t\tif( this.bottomNode.isNoGoZone() == true)\r\n\t \t{\r\n\t \t\t\t//set edge weight to 9999 if the next node is NO go zone or\r\n\t \t\t\t//boundary node\r\n\t \t\tthis.bottomWeight = weightOfNoGoZone;\r\n\t \t}\r\n\t \telse if(this.bottomNode.isRoad() == true && this.bottomNode.isNoGoZone() == false)\r\n\t \t{\r\n\t \t\t//set edge weight to 1 if the next node is a road node\r\n\t \t\tthis.bottomWeight = this.bottomNode.getOwnElevation();\r\n\t \t}\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t//set edge weight to INF if the next node is NULL\r\n\t \t\tthis.bottomWeight = weightOfMapEdge;\r\n\t \t}\r\n\t }", "Neuron setAxon(double newValue);", "@Override\n\tpublic void backProp() {\n\t\tdouble dOut = 0;\n\t\tfor (Node n : outputs) {\n\t\t\tdOut += n.dInputs.get(this);\n\t\t}\n\t\tdouble dTotal = activationFunction.derivative(total)*dOut;\n\t\tfor (Node n : inputs) {\n\t\t\tdInputs.put(n, dTotal * weights.get(n).getWeight());\n\t\t\tweights.get(n).adjustWeight(dTotal * n.output);\n\t\t}\n\t\tbiasWeight.adjustWeight(bias * dTotal);\n\t}", "public void init(float[] bias_inp, float[] bias_out,\n float[] bias_memin, float[] weight_memout,\n float outputbias) {\n cloneWeightMatrix();\n }", "@Override\n\tpublic void train(DataSet data) {\n\t\tArrayList<Example> examples = data.getCopyWithBias().getData();\n\t\t// initialize both weight vectors with random values between -0.1 ad 0.1\n\t\tinitWeights(examples.size());\n\n\t\t// store outputs from forward calculation for each example\n\t\t// array will have size # examples.\n\t\tArrayList<Double> nodeOutputs = calculateForward(examples);\n\n\t\t// now take error and back-propagate from output to hidden nodes\n\n\t\tfor (int j = 0; j < examples.size(); j++) {\n\t\t\tExample ex = examples.get(j);\n\n\t\t\t// get hidden node outputs for single example\n\t\t\tfor (int num = 0; num < numHidden; num++) {\n\t\t\t\tArrayList<Double> h_outputs = hiddenOutputs.get(num);\n\t\t\t\tdouble vDotH = dotProduct(h_outputs, layerTwoWeights); // calculate\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// v dot\n\t\t\t\t// h for\n\t\t\t\t// this node\n\n\t\t\t\tfor (int i = 0; i < numHidden - 1; i++) {\n\t\t\t\t\tdouble oldV = layerTwoWeights.get(i);\n\t\t\t\t\tdouble hk = h_outputs.get(i);\n\t\t\t\t\t// Equation describing line below:\n\t\t\t\t\t// v_k = v_k + eta*h_k(y-f(v dot h)) f'(v dot h)\n\t\t\t\t\tlayerTwoWeights.set(i, oldV + eta * hk * (ex.getLabel() - Math.tanh(vDotH)) * derivative(vDotH));\n\t\t\t\t}\n\n\t\t\t\tSet<Integer> features = ex.getFeatureSet();\n\t\t\t\tIterator<Integer> iter = features.iterator();\n\t\t\t\tArrayList<Double> featureVals = new ArrayList<Double>();\n\t\t\t\tfor (int f : features) {\n\t\t\t\t\tfeatureVals.add((double) f);\n\t\t\t\t}\n\n\t\t\t\t// take that error and back-propagate one more time\n\t\t\t\tfor (int x = 0; x < numHidden; x++) {\n\t\t\t\t\tArrayList<Double> initWeights = hiddenWeights.get(x);\n\t\t\t\t\t// List<Object> features =\n\t\t\t\t\t// Arrays.asList(ex.getFeatureSet().toArray());\n\n\t\t\t\t\t// for (int i = 0; i < featureVals.size()-1; i++) {\n\t\t\t\t\tdouble oldWeight = initWeights.get(j);\n\t\t\t\t\tdouble thisInput = ex.getFeature(featureVals.get(x).intValue());\n\t\t\t\t\t// w_kj = w_kj + eta*xj(input)*f'(w_k dot x)*v_k*f'(v dot\n\t\t\t\t\t// h)(y-f(v dot h))\n\t\t\t\t\tdouble updateWeight = oldWeight + eta * thisInput * derivative(dotProduct(featureVals, initWeights))\n\t\t\t\t\t\t\t* layerTwoWeights.get(x) * derivative(vDotH) * (ex.getLabel() - Math.tanh(vDotH));\n\t\t\t\t\tinitWeights.set(j, updateWeight);\n\t\t\t\t\t// }\n\t\t\t\t\thiddenWeights.set(x, initWeights); // update weights for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// example\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public JsonModelRunInformationBuilder populateBiasMessage(\n boolean useSampleBias, long bespokeBiasCount, long usableBiasEstimate) {\n String message = \"The current model mode for this disease group does not use background data.\";\n if (useSampleBias) {\n message = String.format(\n \"%s bespoke background data points have been provided, approximately %s %s are suitable.\",\n bespokeBiasCount,\n usableBiasEstimate,\n (bespokeBiasCount == 0 ? \"ABRAID occurrences\" : \"of which\"));\n }\n information.setSampleBiasText(message);\n return this;\n }", "public double getBias(double delta) {\n\t\tTtStatSeg seg;\n\t\t\n\t\tfor(int k=0; k<bias.size(); k++) {\n\t\t\tseg = bias.get(k);\n\t\t\tif(delta >= seg.minDelta && delta <= seg.maxDelta) {\n\t\t\t\treturn seg.interp(delta);\n\t\t\t}\n\t\t}\n\t\treturn TauUtil.DEFBIAS;\n\t}", "public WorkingNeuron getHiddenNeuronFromName(String name) {\n\t\tfor (WorkingNeuron neuron : hiddenLayer) {\n\t\t\tif (name.equals(neuron.getName())) {\n\t\t\t\treturn neuron;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public TwoLayerNN(int nodes) {\n\t\tnumHidden = nodes;\n\t\thiddenWeights = new ArrayList<ArrayList<Double>>();\n\t\tlayerTwoWeights = new ArrayList<Double>();\n\t\trandom = new Random();\n\t\thiddenOutputs = new ArrayList<ArrayList<Double>>();\n\n\t}", "public void remap(float[][][] brainMap) {\r\n for (int i = 0; i < brainMap.length; i++) { // for each layer\r\n for (int j = 0; j < brainMap[i].length; j++) { // for each neuron\r\n // skip input layer\r\n if (neurons[i + 1][j] == null) {\r\n neurons[i + 1][j] = new Neuron(j, bias, this, brainMap[i][j]);\r\n } else {\r\n neurons[i + 1][j].setWeights(brainMap[i][j]);\r\n }\r\n }\r\n }\r\n }", "private void addNode(NeuralNode node) {\r\n\t\tinnerNodes.add(node);\r\n\t}", "public interface Layer {\n /**\n * @return The number of neurons, excluding bias neurons and context neurons. This is the number of neurons that\n * are directly fed from elsewhere.\n */\n int getCount();\n\n /**\n * @return The number of neurons, including bias neurons and context neurons.\n */\n int getTotalCount();\n\n /**\n * @return The activation/transfer function for this neuron.\n */\n ActivationFunction getActivation();\n\n /**\n * Finalize the structure of this layer.\n * @param theOwner The neural network that owns this layer.\n * @param theLayerIndex The zero-based index of this layer.\n * @param counts The counts structure to track the weight and neuron counts.\n */\n void finalizeStructure(BasicNetwork theOwner, int theLayerIndex,\n TempStructureCounts counts);\n\n /**\n * Compute this layer.\n */\n void computeLayer();\n\n /**\n * Compute the gradients for this layer.\n * @param calc The gradient calculation utility.\n */\n void computeGradient(GradientCalc calc);\n\n /**\n * @return The start of this layer's weights in the weight vector.\n */\n int getWeightIndex();\n\n /**\n * @return The start of this layer's neurons in the neuron vector.\n */\n int getNeuronIndex();\n\n /**\n * Notification that a training batch is beginning.\n * @param rnd A random number generator, from the trainer.\n */\n void trainingBatch(GenerateRandom rnd);\n\n /**\n * @return The owner of the neural network.\n */\n BasicNetwork getOwner();\n\n /**\n * @return True if this neuron has bias.\n */\n boolean hasBias();\n}", "@Schema(description = \"target node of the connection\")\n public String getNodeB() {\n return nodeB;\n }", "public void setOperandB(int val);", "public void adjust(double learningRate, boolean layer){\r\n //Layer false == adjust hiddenLayer\r\n //Layer true == adjust outputLayer\r\n if (layer) {\r\n for (int i = 0; i < outputLayer.length; i++) {\r\n for (int j = 0; j < outputLayer[i].weights.length; j++) {\r\n outputLayer[i].weights[j] -= learningRate*outputLayer[i].dw[j];\r\n }\r\n outputLayer[i].bias -= learningRate*outputLayer[i].db;\r\n }\r\n } else {\r\n for (int i = 0; i < hiddenLayer.length; i++) {\r\n for (int j = 0; j < hiddenLayer[i].weights.length; j++) {\r\n hiddenLayer[i].weights[j] -= learningRate*hiddenLayer[i].dw[j];\r\n }\r\n hiddenLayer[i].bias -= learningRate*hiddenLayer[i].db;\r\n }\r\n }\r\n }", "public NeuralNet(int hiddenNeurons, double trainingRate, \n\t\t\tint trainingCycles, double minRandomWeight, double maxRandomWeight) {\n\t\tm = new MatrixOps();\n\t\t\n\t\tsetParameters(hiddenNeurons, trainingRate,\n\t\t\t\ttrainingCycles, minRandomWeight, maxRandomWeight);\n\t}", "public RandomNeighborhoodOperator(int nbRelaxedVars)\n{\n\tthis(nbRelaxedVars, 0);\n}", "private void updateHiddenLayersErrors(Neuron neuron) {\r\n\r\n\t\t// Calculate the neuron error by weighting the errors of the output neurons of the output synapses.\r\n\t\tList<Synapse> outputSynapses = neuron.getOutputSynapses();\r\n\t\tdouble weightedOutputError = 0;\r\n\t\tfor (Synapse outputSynapse : outputSynapses) {\r\n\t\t\t// Output neuron and update.\r\n\t\t\tNeuron outputNeuron = outputSynapse.getOutputNeuron();\r\n\t\t\tdouble error = outputNeuron.getError();\r\n\t\t\tdouble weight = outputSynapse.getWeight();\r\n\t\t\tweightedOutputError += (error * weight);\r\n\t\t}\r\n\r\n\t\t// Back propagate weighted output\r\n\t\tOutputFunction outputFunction = neuron.getOutputFunction();\r\n\t\tdouble input = neuron.getInput();\r\n\t\tdouble derivative = outputFunction.getDerivative(input);\r\n\t\tdouble neuronError = weightedOutputError * derivative;\r\n\t\tneuron.setError(neuronError);\r\n\r\n\t\t// Update neuron weights if applicable\r\n\t\tif (updateWeights) {\r\n\t\t\tupdateNeuronWeights(neuron);\r\n\t\t}\r\n\r\n\t\t// Update bias if applicable\r\n\t\tif (updateBiases) {\r\n\t\t\tupdateNeuronBias(neuron);\r\n\t\t}\r\n\t}", "public Neuron getBMU(ArrayList<Double> input) {\n Neuron BMU = null;\n double distanceMin = Double.MAX_VALUE;\n for (int i = 0; i < this.height; i++) {\n for (int j = 0; j < this.width; j++) {\n double distanceTmp = this.euclideDistance(input, this.network[i][j].getWeights());\n if (distanceTmp < distanceMin) {\n distanceMin = distanceTmp;\n BMU = this.network[i][j];\n }\n }\n }\n return BMU;\n }", "boolean isOutputNeuron();", "private void createHiddenLayer() {\r\n\t\tint layers = 1;\r\n\t\t\r\n\t\tint hiddenLayerSize = 0; \r\n\t\tint prevLayerSize = numAttributes;\r\n\t\t\r\n\t\tfor (int layer = 0; layer < layers; layer++) {\r\n\t\t\thiddenLayerSize = (numAttributes + numClasses) / 2;\r\n\t\t\t\r\n\t\t\tfor (int nob = 0; nob < hiddenLayerSize; nob++) {\r\n\t\t\t\tInnerNode temp = new InnerNode(String.valueOf(nextId), random);\r\n\t\t\t\tnextId++;\r\n\t\t\t\taddNode(temp);\r\n\t\t\t\tif (layer > 0) {\r\n\t\t\t\t\t// then do connections\r\n\t\t\t\t\tfor (int noc = innerNodes.size() - nob - 1 - prevLayerSize; noc < innerNodes.size() - nob - 1; noc++) {\r\n\t\t\t\t\t\tNeuralNode.connect(innerNodes.get(noc), temp);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tprevLayerSize = hiddenLayerSize;\r\n\t\t}\r\n\r\n\t\tif (hiddenLayerSize == 0) {\r\n\t\t\tfor (InputNode input : inputs) {\r\n\t\t\t\tfor (NeuralNode node : innerNodes) {\r\n\t\t\t\t\tNeuralNode.connect(input, node);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tfor (NeuralNode input : inputs) {\r\n\t\t\t\tfor (int nob = numClasses; nob < numClasses + hiddenLayerSize; nob++) {\r\n\t\t\t\t\tNeuralNode.connect(input, innerNodes.get(nob));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor (int noa = innerNodes.size() - prevLayerSize; noa < innerNodes.size(); noa++) {\r\n\t\t\t\tfor (int nob = 0; nob < numClasses; nob++) {\r\n\t\t\t\t\tNeuralNode.connect(innerNodes.get(noa), innerNodes.get(nob));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void batchUpdateWeights() {\n\t\tObject[] keys = nextLayerNodes.keySet().toArray();\n\t\tfor (Object key : keys) {\n\t\t\tNode nextLayerNode = (Node) key;\n\t\t\t// System.out.printf(\"Updating weight from %f to %f%n\", nextLayerNodes.get(nextLayerNode), nextLayerNodesUpdateMap.get(nextLayerNode));\n\t\t\tdouble oldWeight = nextLayerNodes.get(nextLayerNode);\n\t\t\tnextLayerNodes.put(nextLayerNode, nextLayerNodesUpdateMap.get(nextLayerNode));\n\t\t\tdouble newWeight = nextLayerNodes.get(nextLayerNode);\n\t\t\tdouble deltaWeight = oldWeight-newWeight;\n\t\t\tSystem.out.printf(\"Changed from %f to %f%n\", oldWeight, newWeight);\n\t\t\tif (deltaWeight > 0.0) {\n\t\t\t\tif (nextLayerNodesArrayList.get(0).nextLayerNodes.size() == 0) {\n\t\t\t\t\tSystem.out.print(\"Hidden Node connected to output layer \");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\"Node connected to another hidden layer \");\n\t\t\t\t}\n\t\t\t\tSystem.out.printf (\"Increased!! Delta weight = %.10f%n\", deltaWeight);\n\t\t\t} else if (deltaWeight < 0.0) {\n\t\t\t\tif (nextLayerNodesArrayList.get(0).nextLayerNodes.size() == 0) {\n\t\t\t\t\tSystem.out.print(\"Hidden Node connected to output layer \");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\"Node connected to another hidden layer \");\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"Decreased!! Delta weight = %.10f%n\", deltaWeight);\n\t\t\t}\n\t\t}\n\t}", "public void setBiasInNs(double r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: android.location.GpsClock.setBiasInNs(double):void, dex: in method: android.location.GpsClock.setBiasInNs(double):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.setBiasInNs(double):void\");\n }", "@Override\n\tvoid bp_adam(double learning_rate, int epoch_num) {\n\t\t\n\t}", "public void train(double[] inputs, double[] outputsTarget) {\n assert(outputsTarget.length == weights.get(weights.size() - 1).length);\n \n ArrayList<double[]> layersOutputs = new ArrayList<double[]>(); \n classify(inputs, layersOutputs);\n\n // Calculate sensitivities for the output nodes\n int outputNeuronCount = this.weights.get(this.weights.size() - 1).length;\n double[] nextLayerSensitivities = new double[outputNeuronCount];\n assert(layersOutputs.get(layersOutputs.size() - 1).length == outputNeuronCount);\n for (int i = 0; i < outputNeuronCount; i++) {\n nextLayerSensitivities[i] = calculateErrorPartialDerivitive(\n layersOutputs.get(layersOutputs.size() - 1)[i],\n outputsTarget[i]\n ) * calculateActivationDerivitive(layersOutputs.get(layersOutputs.size() - 1)[i]);\n assert(!Double.isNaN(nextLayerSensitivities[i]));\n }\n\n for (int weightsIndex = this.weights.size() - 1; weightsIndex >= 0; weightsIndex--) {\n int previousLayerNeuronCount = this.weights.get(weightsIndex)[0].length;\n int nextLayerNeuronCount = this.weights.get(weightsIndex).length;\n assert(nextLayerSensitivities.length == nextLayerNeuronCount);\n\n double[] previousLayerOutputs = layersOutputs.get(weightsIndex);\n double[] previousLayerSensitivities = new double[previousLayerNeuronCount];\n\n // Iterate over neurons in the previous layer\n for (int j = 0; j < previousLayerNeuronCount; j++) {\n\n // Calculate the sensitivity of this node\n double sensitivity = 0;\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n sensitivity += nextLayerSensitivities[i] * this.weights.get(weightsIndex)[i][j];\n }\n sensitivity *= calculateActivationDerivitive(previousLayerOutputs[j]);\n assert(!Double.isNaN(sensitivity));\n previousLayerSensitivities[j] = sensitivity;\n\n for (int i = 0; i < nextLayerNeuronCount; i++) {\n double weightDelta = learningRate * nextLayerSensitivities[i] * calculateActivation(previousLayerOutputs[j]);\n this.weights.get(weightsIndex)[i][j] += weightDelta;\n assert(!Double.isNaN(this.weights.get(weightsIndex)[i][j]) && !Double.isInfinite(this.weights.get(weightsIndex)[i][j]));\n }\n }\n\n nextLayerSensitivities = previousLayerSensitivities;\n }\n }", "private void updateWeights(Hashtable<NeuralNode, Double> nodeValues, double learnRate, double momentum) {\r\n\t\tfor (OutputNode output : outputs) {\r\n\t\t\toutput.updateWeights(null, nodeValues, learnRate, momentum);\r\n\t\t}\r\n\t}", "public NeuralNetwork(double learningRate, int[] topology) {\n this.learningRate = learningRate;\n int layerCount = topology.length;\n this.weights = new ArrayList<double[][]>();\n\n // Iterating over layers, skipping the input layer\n for (int i = 0; i < layerCount - 1; i++) {\n int previousLayerNeuronCount = topology[i];\n int layerNeuronCount = topology[i + 1];\n\n // This effectively sets index i\n double[][] layerWeights = new double[layerNeuronCount][previousLayerNeuronCount];\n\n // Iterating over nodes in this layer\n for (int j = 0; j < layerNeuronCount; j++) {\n for (int k = 0; k < previousLayerNeuronCount; k++) {\n layerWeights[j][k] = Math.random() * 2 - 1;\n }\n }\n\n this.weights.add(layerWeights);\n }\n }", "public static MultiLayerNetwork alexnetModel(Integer numLabels) {\n\n double nonZeroBias = 1;\n double dropOut = 0.5;\n\n MultiLayerConfiguration conf = new NeuralNetConfiguration.Builder()\n .seed(seed)\n .weightInit(WeightInit.DISTRIBUTION)\n .dist(new NormalDistribution(0.0, 0.01))\n .activation(Activation.RELU)\n .updater(new Nesterovs(new StepSchedule(ScheduleType.ITERATION, 1e-2, 0.1, 100000), 0.9))\n .biasUpdater(new Nesterovs(new StepSchedule(ScheduleType.ITERATION, 2e-2, 0.1, 100000), 0.9))\n .gradientNormalization(GradientNormalization.RenormalizeL2PerLayer) // normalize to prevent vanishing or exploding gradients\n .l2(5 * 1e-4)\n .list()\n .layer(0, convInit(\"cnn1\", channels, 96, new int[]{11, 11}, new int[]{4, 4}, new int[]{3, 3}, 0))\n .layer(1, new LocalResponseNormalization.Builder().name(\"lrn1\").build())\n .layer(2, maxPool(\"maxpool1\", new int[]{3, 3}))\n .layer(3, conv5x5(\"cnn2\", 256, new int[]{1, 1}, new int[]{2, 2}, nonZeroBias))\n .layer(4, new LocalResponseNormalization.Builder().name(\"lrn2\").build())\n .layer(5, maxPool(\"maxpool2\", new int[]{3, 3}))\n .layer(6, conv3x3(\"cnn3\", 384, 0))\n .layer(7, conv3x3(\"cnn4\", 384, nonZeroBias))\n .layer(8, conv3x3(\"cnn5\", 256, nonZeroBias))\n .layer(9, maxPool(\"maxpool3\", new int[]{3, 3}))\n .layer(10, fullyConnected(\"ffn1\", 4096, nonZeroBias, dropOut, new GaussianDistribution(0, 0.005)))\n .layer(11, fullyConnected(\"ffn2\", 4096, nonZeroBias, dropOut, new GaussianDistribution(0, 0.005)))\n .layer(12, new OutputLayer.Builder(LossFunctions.LossFunction.NEGATIVELOGLIKELIHOOD)\n .name(\"output\")\n .nOut(numLabels)\n .activation(Activation.SOFTMAX)\n .build())\n .backprop(true)\n .pretrain(false)\n .setInputType(InputType.convolutional(height, width, channels))\n .build();\n\n return new MultiLayerNetwork(conf);\n\n }", "public BinaryPulseNeuralFunction() {\n super();\n }", "@Override\n\tpublic void run() {\n\t\ttotal = 0;\n\t\tfor (Node n : inputs) {\n\t\t\ttotal += n.output * weights.get(n).getWeight();\n\t\t}\n\t\ttotal += bias * biasWeight.getWeight();\n\t\toutput = activationFunction.run(total);\n\t}", "public void activate() {\n double dotProduct = 0;\n for (Synapse s : super.getSynapsesIn()) {\n dotProduct += s.getNeuronFrom().getOutput() * s.getWeight();\n }\n super.setOutput(sigmoidFunction(dotProduct));\n }", "public void discardLastWeight() {\n this.weights.remove(this.weights.size() - 1);\n // meanwhile flip the accepting flag\n acceptWeight = true;\n }", "private void backwardPropagation(int[] trainingData, int[] trainingLabel, double[] outputActivations, double[] hiddenActiv) {\n\t\tdouble[] delta = new double[SIZE_OUTPUT_LAYER];\n\t\t// Update OutputLayer weights\n\t\tfor(int indexOutput = 0; indexOutput < SIZE_OUTPUT_LAYER; indexOutput++) {\n\t\t\t// We define delta as the difference between the real label and the softmax probability\n\t\t\tdelta[indexOutput] = trainingLabel[indexOutput] - outputActivations[indexOutput];\n\n\t\t\tfor(int indexHidden = 0; indexHidden < SIZE_HIDDEN_LAYER; indexHidden++) {\n\t\t\t\tweightsOfOutputLayer[indexOutput][indexHidden] += learningRate * delta[indexOutput] * hiddenActiv[indexHidden] / datasetSize;\n\t\t\t}\t\n\t\t\tbiasOfOutputLayer[indexOutput] += learningRate * delta[indexOutput] / datasetSize;\n\t\t}\t\n\t\t// Create delta2 \n\t\tdouble[] delta2 = new double[SIZE_HIDDEN_LAYER];\n\t\tfor(int i = 0; i < SIZE_HIDDEN_LAYER; i++) {\n\t\t\tdelta2[i] = 0;\n\t\t\tfor(int j = 0; j < SIZE_OUTPUT_LAYER; j++) {\n\t\t\t\t// Why is it multiplying the weights for delta1?\n\t\t\t\tdelta2[i] += delta[j] * weightsOfOutputLayer[j][i];\n\t\t\t}\n\t\t\tdelta2[i] *= dtanh(hiddenActiv[i]);\n\t\t}\n\t\t// Update HiddenLayer weights\n\t\tfor(int i = 0; i < SIZE_HIDDEN_LAYER; i++) {\n\t\t\tfor(int j = 0; j < SIZE_INPUT_LAYER; j++) {\n weightsOfHiddenLayer[i][j] += learningRate * delta2[i] * (double)trainingData[j] / datasetSize;\n\t\t\t}\n biasOfHiddenLayer[i] += learningRate * delta2[i] / datasetSize;\n\t\t}\t\n\t}", "@Override\n\tpublic double getInternalWeight(int nodeIndex) {\n\t\treturn this.inWeights[nodeIndex];\n\t}", "@Override\n /**\n * @param X The input vector. An array of doubles.\n * @return The value returned by th LUT or NN for this input vector\n */\n\n public double outputFor(double[] X) {\n int i = 0, j = 0;\n for(i=0;i<argNumInputs;i++){\n S[0][i] = X[i];\n NeuronCell[0][i] = X[i];\n }\n //then add the bias term\n S[0][argNumInputs] = 1;\n NeuronCell[0][argNumInputs] = customSigmoid(S[0][argNumInputs]);\n S[1][argNumHidden] = 1;\n NeuronCell[1][argNumHidden] = customSigmoid(S[1][argNumInputs]);\n\n for(i=0;i<argNumHidden;i++){\n for(j=0;j<=argNumInputs;j++){\n //Wji : weigth from j to i\n WeightSum+=NeuronCell[0][j]*Weight[0][j][i];\n }\n //Sj = sigma(Wji * Xi)\n S[1][i]=WeightSum;\n NeuronCell[1][i]=(customSigmoid(WeightSum));\n //reset weigthsum\n WeightSum=0;\n }\n\n for(i = 0; i < argNumOutputs; i++){\n for(j = 0;j <= argNumHidden;j++){\n WeightSum += NeuronCell[1][j] * Weight[1][j][i];\n }\n NeuronCell[2][i]=customSigmoid(WeightSum);\n S[2][i]=WeightSum;\n WeightSum=0;\n }\n //if we only return 1 double, it means we only have one output, so actually we can write return NeuronCell[2][0]\n return NeuronCell[2][0];\n }", "boolean isInputNeuron();", "public void setAsObstacle() {\n\t\tnodeStatus = Status.obstacle;\n\t}", "static WireloopReward constantCost() {\n return (s, a, n) -> RealScalar.of(-1.4); // -1.2\n }", "public void resetBiasInNs() {\n /*\n // Can't load method instructions: Load method exception: null in method: android.location.GpsClock.resetBiasInNs():void, dex: in method: android.location.GpsClock.resetBiasInNs():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.resetBiasInNs():void\");\n }", "public ElmanNeuralNetwork(Neuron output, List<Neuron> inputLayer, List<List<Neuron>> hiddenLayers, DoubleUnaryOperator activationFunction) {\n\t\tsuper(output, inputLayer, hiddenLayers, activationFunction);\n\t}", "public void moveNonEdgeSpecificState(ISolverNode other);", "public DigitGuessNeuralNetwork(){\r\n neuralNetwork=NeuralNetwork.load(MainActivity.neuralNetInputStream);\r\n }", "Neuron setName(String name);", "public double getBiasInNs() {\n /*\n // Can't load method instructions: Load method exception: null in method: android.location.GpsClock.getBiasInNs():double, dex: in method: android.location.GpsClock.getBiasInNs():double, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.getBiasInNs():double\");\n }", "public CachedBinarization(final TernaryOutputNeuron originalNeuron, final List<byte[]> input,\n\t\t\tList<byte[]> referenceInput) {\n\t\tif (referenceInput == null) {\n\t\t\treferenceInput = input;\n\t\t}\n\t\tthis.inputSize = input.size();\n\t\tthis.originalNeuronOutput = new TernaryProbDistrib[referenceInput.size()];\n\t\tfor (int i = 0; i < referenceInput.size(); i++) {\n\t\t\tthis.originalNeuronOutput[i] = originalNeuron.getOutputProbs(referenceInput.get(i));\n\t\t}\n\t\tList<Integer> posWeightsIndex = new ArrayList<>(originalNeuron.getWeights().length);\n\t\tList<Integer> negWeightsIndex = new ArrayList<>(originalNeuron.getWeights().length);\n\t\tfor (int i = 0; i < originalNeuron.getWeights().length; i++) {\n\t\t\tif (originalNeuron.getWeightSign(i) > 0) {\n\t\t\t\tposWeightsIndex.add(i);\n\t\t\t} else if (originalNeuron.getWeightSign(i) < 0) {\n\t\t\t\tnegWeightsIndex.add(i);\n\t\t\t}\n\t\t}\n\t\tif (posWeightsIndex.isEmpty() || negWeightsIndex.isEmpty()) {\n\t\t\tthrow new RuntimeException(\"cannot force pos/neg tw if all weights are positive or negative\");\n\t\t} else {\n\t\t\tCollections.sort(posWeightsIndex, new Comparator<Integer>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\tDouble d1 = originalNeuron.getWeights()[o1];\n\t\t\t\t\tDouble d2 = originalNeuron.getWeights()[o2];\n\t\t\t\t\tint ret = d2.compareTo(d1);\n\t\t\t\t\tif (ret != 0) {\n\t\t\t\t\t\treturn ret;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn o1.compareTo(o2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tCollections.sort(negWeightsIndex, new Comparator<Integer>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(Integer o1, Integer o2) {\n\t\t\t\t\tDouble d1 = Math.abs(originalNeuron.getWeights()[o1]);\n\t\t\t\t\tDouble d2 = Math.abs(originalNeuron.getWeights()[o2]);\n\t\t\t\t\tint ret = d2.compareTo(d1);\n\t\t\t\t\tif (ret != 0) {\n\t\t\t\t\t\treturn ret;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn o1.compareTo(o2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.posSums = new short[posWeightsIndex.size()][inputSize];\n\t\t\tthis.negSums = new short[negWeightsIndex.size()][inputSize];\n\t\t\tshort tmpMaxSumPos = 0;\n\t\t\tshort tmpMinSumPos = 0;\n\t\t\tshort tmpMaxSumNeg = 0;\n\t\t\tshort tmpMinSumNeg = 0;\n\t\t\tfor (int sampleIndex = 0; sampleIndex < inputSize; sampleIndex++) {\n\t\t\t\tbyte[] sample = input.get(sampleIndex);\n\t\t\t\tshort sum = 0;\n\t\t\t\tIterator<Integer> indexIter = posWeightsIndex.iterator();\n\t\t\t\tfor (int i = 0; indexIter.hasNext(); i++) {\n\t\t\t\t\tsum += sample[indexIter.next()];\n\t\t\t\t\tif (sum > tmpMaxSumPos) {\n\t\t\t\t\t\ttmpMaxSumPos = sum;\n\t\t\t\t\t}\n\t\t\t\t\tif (sum < tmpMinSumPos) {\n\t\t\t\t\t\ttmpMinSumPos = sum;\n\t\t\t\t\t}\n\t\t\t\t\t// tmpMaxSumPos = Math.max(tmpMaxSumPos, sum);\n\t\t\t\t\t// tmpMinSumPos = Math.min(tmpMinSumPos, sum);\n\t\t\t\t\tthis.posSums[i][sampleIndex] = sum;\n\t\t\t\t}\n\t\t\t\tsum = 0;\n\t\t\t\tindexIter = negWeightsIndex.iterator();\n\t\t\t\tfor (int i = 0; indexIter.hasNext(); i++) {\n\t\t\t\t\tsum -= sample[indexIter.next()];\n\t\t\t\t\tif (sum > tmpMaxSumNeg) {\n\t\t\t\t\t\ttmpMaxSumNeg = sum;\n\t\t\t\t\t}\n\t\t\t\t\tif (sum < tmpMinSumNeg) {\n\t\t\t\t\t\ttmpMinSumNeg = sum;\n\t\t\t\t\t}\n\t\t\t\t\t// tmpMaxSumNeg = Math.max(tmpMaxSumNeg, sum);\n\t\t\t\t\t// tmpMinSumNeg = Math.min(tmpMinSumNeg, sum);\n\t\t\t\t\tthis.negSums[i][sampleIndex] = sum;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.maxSum = (short) (tmpMaxSumPos + tmpMaxSumNeg);\n\t\t\tthis.minSum = (short) (tmpMinSumPos + tmpMinSumNeg);\n\t\t}\n\t}", "public FeedForwardNeuralNetwork mutate(FeedForwardNeuralNetwork net)\n\t{\n // Copies the net\n FeedForwardNeuralNetwork newNetwork = new FeedForwardNeuralNetwork(net);\n newNetwork.setWeightVector((Vector<Double>)net.getWeightVector().clone());\n\n Vector<Double> newWeights = new Vector<Double>();\n\t\tRandom gen = new Random();\n int mc = gen.nextInt(100), slSize;\n\n if (mc <= 10) { // all the weights in the network\n for(SynapseLayer sl: newNetwork.synapse_layers) {\n slSize = sl.getWeightVector().size() / 20;\n for (Double weight: sl.getWeightVector())\n newWeights.add(weight + gen.nextGaussian()*Math.sqrt(slSize));\n }\n newNetwork.setWeightVector(newWeights);\n }\n else if (mc <= 37) { // all the weights in a randomly selected layer\n SynapseLayer sl = newNetwork.synapse_layers.get(gen.nextInt(newNetwork.synapse_layers.size()));\n for (Double weight: sl.getWeightVector())\n newWeights.add(weight + gen.nextGaussian() * Math.sqrt(sl.getWeightVector().size()/20));\n sl.setWeightVector(newWeights);\n }\n else if (mc <= 64) { // all the weights going into a randomly selecte layer, i can't tell the difference between this and the last one\n SynapseLayer sl = newNetwork.synapse_layers.get(gen.nextInt(newNetwork.synapse_layers.size()));\n for (Double weight: sl.getWeightVector())\n newWeights.add(weight + gen.nextGaussian() * Math.sqrt(sl.getWeightVector().size()/20));\n sl.setWeightVector(newWeights);\n }\n else {\n newWeights = newNetwork.getWeightVector();\n int rInd = gen.nextInt(newWeights.size());\n newWeights.set(rInd, newWeights.get(rInd) + Math.sqrt(gen.nextGaussian()*14));\n newNetwork.setWeightVector(newWeights);\n }\n\t\treturn newNetwork;\n\t}", "public void addNeuron(Neuron neuron, double[] weights) {\r\n\t\tgetNeurons().add(neuron);\r\n\t\tif(prevLayer != null) {\r\n\t\t\tif(weights.length == prevLayer.getNeurons().size() ) { \t//Check that we have the correct number of weights\r\n\t\t\t\tList<Neuron> prevLayerNeurons = prevLayer.getNeurons();\t\t\r\n\t\t\t\tfor(int i = hasBias(); i < prevLayerNeurons.size(); i++) {\t\t//Loop through each neuron in the previous layer \r\n\t\t\t\t\tConnection con = new Connection(prevLayerNeurons.get(i));\r\n\t\t\t\t\tneuron.addConnection(con);\t//Add a connection\r\n\t\t\t\t\tcon.setWeight(weights[i]); //Set the connection weight \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new IllegalArgumentException(\"Unequal number of weights compared to neurons in the previous layer\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public UnsupervisedHebbianNetwork(int inputNeuronsNum, int outputNeuronsNum,\n\t\tTransferFunctionType transferFunctionType) {\n\t\tthis.createNetwork(inputNeuronsNum, outputNeuronsNum,\n\t\t\ttransferFunctionType);\n\t}", "void update(int bit) \n {\n this.idx = 0;\n int err = (bit<<12) - this.pr;\n\n if (err == 0)\n return; \n \n err = (err << 3) - err;\n\n // Train Neural Network: update weights\n this.buffer[this.ctx+8] += ((this.buffer[this.ctx] *err + 0) >> 16); \n this.buffer[this.ctx+9] += ((this.buffer[this.ctx+1]*err + 0) >> 16); \n this.buffer[this.ctx+10] += ((this.buffer[this.ctx+2]*err + 0) >> 16); \n this.buffer[this.ctx+11] += ((this.buffer[this.ctx+3]*err + 0) >> 16); \n this.buffer[this.ctx+12] += ((this.buffer[this.ctx+4]*err + 0) >> 16); \n this.buffer[this.ctx+13] += ((this.buffer[this.ctx+5]*err + 0) >> 16); \n this.buffer[this.ctx+14] += ((this.buffer[this.ctx+6]*err + 0) >> 16); \n this.buffer[this.ctx+15] += ((this.buffer[this.ctx+7]*err + 0) >> 16); \n }", "public static void XOR() {\n System.out.println(\"---\");\n System.out.println(\"This section will create, and train a neural network with the topology of 2-2-1. That is\\n\" +\n \"there are 2 input neurons, 2 hidden neurons, and 1 output neuron. The XOR problem will be using the\\n\" +\n \"XOR_training_data.txt file to get the training data. In order to make training simpler, the 0's have\\n\" +\n \"been substituted with -1's.\");\n System.out.println(\"Training...\");\n NeuralNetwork xor = (NeuralNetwork)StochasticBackPropagation.SBP(2, 2, 1, \"XOR_training_data.txt\", 20000, 0.1, 0.05);\n System.out.println(\"Trained.\");\n\n double[] input = new double[2];\n System.out.println(\"Input: -1 -1\");\n input[0] = -1;\n input[1] = -1;\n double[] output = xor.feedForward(input);\n System.out.println(\"Expected Output: -1\");\n System.out.println(\"Actual Output: \"+Math.round(output[0])); //rounding to make output cleaner.\n\n System.out.println(\"Input: -1 1\");\n input[0] = -1;\n input[1] = 1;\n output = xor.feedForward(input);\n System.out.println(\"Expected Output: 1\");\n System.out.println(\"Actual Output: \"+Math.round(output[0]));\n\n System.out.println(\"Input: 1 -1\");\n input[0] = 1;\n input[1] = -1;\n output = xor.feedForward(input);\n System.out.println(\"Expected Output: 1\");\n System.out.println(\"Actual Output: \"+Math.round(output[0]));\n\n System.out.println(\"Input: 1 1\");\n input[0] = 1;\n input[1] = 1;\n output = xor.feedForward(input);\n System.out.println(\"Expected Output: -1\");\n System.out.println(\"Actual Output: \"+Math.round(output[0]));\n System.out.println(\"---\\n\");\n }", "public FFANNAdaptiveBackPropagationJSP()\n\t{\n\t\t//run(network, numberInputNeurons, numberHiddenNeurons, numberOutputNeurons, trainingSet);\n\t}", "public Brain(float[][][] brainMap) {\r\n neurons = new Neuron[brainMap.length][];\r\n for (int i = 0; i < brainMap.length; i++) { // for each layer\r\n neurons[i] = new Neuron[brainMap[i].length];\r\n for (int j = 0; j < brainMap[i].length; j++) { // for each neuron\r\n neurons[i][j] = new Neuron(i, bias, this, brainMap[i][j]);\r\n }\r\n }\r\n }", "public DriftCheckBaselines withBias(DriftCheckBias bias) {\n setBias(bias);\n return this;\n }", "public void updateNeighbors(Neuron BMU, ArrayList<Double> input, int t) {\n double radiusMap = this.width / 2;\n double lambda = this.nbIterations / radiusMap;\n\n // Calculation of the radius of influence.\n double radius = radiusMap * Math.exp(-t / lambda);\n\n int iMin = (BMU.getY() - radius) < 0 ? 0 : (int) (BMU.getY() - radius);\n int iMax = (BMU.getY() + radius) > this.width ? this.width : (int) (BMU.getY() + radius);\n int jMin = (BMU.getX() - radius) < 0 ? 0 : (int) (BMU.getX() - radius);\n int jMax = (BMU.getX() + radius) > this.width ? this.width : (int) (BMU.getX() + radius);\n\n // Set the new weights of neurons in proximity\n for (int i = iMin; i < iMax; i++) {\n for (int j = jMin; j < jMax; j++) {\n // Run over weights\n Neuron n = this.network[i][j];\n double Lt = this.learningRate * Math.exp(-t / lambda);\n\n double sumDist = this.euclideDistance(BMU.getWeights(), n.getWeights());\n\n double delta = sumDist / (2 * radius * radius);\n //double theta = Math.exp(-1 * (sumDist / (2 * Math.pow(radius, 2))));\n double theta = Math.exp(-delta);\n\n for (int k = 0; k < BMU.getSizeWeights(); k++) {\n\n double value = n.getWeightI(k) + theta * Lt * (input.get(k) - n.getWeightI(k));\n\n n.setWeightI(k, value);\n if (value > 1.0)\n System.out.println(\"error\");\n }\n }\n }\n }", "public Node(int x, int y) {\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t\tcost = Float.MAX_VALUE;\r\n//\t\t\r\n\t}", "public BTNode(int value){ \r\n node = value; \r\n leftleaf = null;\r\n rightleaf = null;\r\n }", "public void setLocationBiasEnabled(boolean enabled) {\n api.setLocationBiasEnabled(enabled);\n }", "public FollowEnemy(int x, int y, int direction, int bias) {\n\t\tsuper(x, y, \"assets\\\\Spider.png\", 1, direction);\n\t\tthis.bias = bias;\n\t\tthis.forceMove = false;\n\t}", "Node(Byte value, int weight) {\n this.value = value;\n leftChild = null;\n rightChild = null;\n this.weight = weight;\n }", "public LinearNeuron(int inputs)\n\t{\n\t\tsuper(inputs);\n\t}", "public Bias setName(String name) {\n this.name = name;\n return this;\n }", "public RestrictedBoltzmannMachine(Entity[] visibleEntities, Entity[] hiddenEntities, double weightWide, double learningRate){\n\t\tthis.weightWide = weightWide;\n\t\tthis.learningRate = learningRate;\n\t\tRandom rand = new Random();\n\t\tthis.layers = new Entity[2][];\n\t\tthis.layers[0] = visibleEntities;\n\t\tthis.layers[1] = hiddenEntities;\n\t\tthis.connections = new double[visibleEntities.length][hiddenEntities.length];\n\t\tfor(int i = 0; i < this.connections.length; i++){\n\t\t\tfor(int j = 0; j < this.connections[0].length; j++){\n\t\t\t\tthis.connections[i][j] = (rand.nextDouble())*this.weightWide;\n\t\t\t}\n\t\t}\n\t\tthis.connectionsGradient = new double[this.connections.length][this.connections[0].length];\n\n\t\tthis.biasGradient = new double[2][];\n\t\tthis.biasGradient[0] = new double[this.layers[0].length];\n\t\tthis.biasGradient[1] = new double[this.layers[1].length];\n\t}", "public void updateTopWeight(){\r\n\t \tif(this.topNode != null)\r\n\t \t{\r\n\t \t\tif(this.topNode.isNoGoZone() == true)\r\n\t \t{\r\n\t \t\t\t//set edge weight to 9999999 if the next node is NO go zone or\r\n\t \t\t\t//boundary node\r\n\t \t\tthis.topWeight = weightOfNoGoZone;\r\n\t \t}\r\n\t \telse if(this.topNode.road == true && this.topNode.isNoGoZone() == false)\r\n\t \t{\r\n\t \t\t//set edge weight to 1 if the next node is a road node\r\n\t \t\tthis.topWeight = this.topNode.getOwnElevation();\r\n\t \t}\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t//set edge weight to INF if the next node is NULL\r\n\t \t\tthis.topWeight = weightOfMapEdge;\r\n\t \t}\r\n\t }", "public double getTargetNodeFlow(){\n return this.targetNodeFlow;\n }", "public HoldingBasedBayesNet(TransitParameters transitParameter)\n\t{\n\t\t/*\n\t\tbayes = new BayesNetwork();\n\t\t\n\t\tdwellTimeNode = new ContinuousNode(\"DwellTime\");\n\t\trunningTimeNode = new ContinuousNode(\"RunningTime\");\n\t\theadwayAdherenceNode = new ContinuousNode(\"HeadwayAdherence\");\n\t\t\n\t\tutilityNode = new UtilityNode(\"Utility\");\n\t\t\n\t\tholdingAction=new DecisionAction(\"holdingaction\");\n\t\tnoAction=new DecisionAction(\"noaction\");\n\t\tactionNode = new DecisionNode(\"Action\",noAction,holdingAction);\n\t\t\n\t\t\n\t\tdwellTimeNode.setType(NodeType.CONTINUOUS_NODE);\n\t\trunningTimeNode.setType(NodeType.CONTINUOUS_NODE);\n\t\theadwayAdherenceNode.setType(NodeType.CONTINUOUS_NODE);\n\t\tactionNode.setType(NodeType.DECISION_NODE);\n\t\tutilityNode.setType(NodeType.UTILITY_NODE);\n\t\t\n\t\t\n\t\tbayes.setRootNodes(dwellTimeNode, runningTimeNode);\n\t\theadwayAdherenceNode.setParents(dwellTimeNode,runningTimeNode);\n\t\theadwayAdherenceNode.setChildren(actionNode);\n\t\tutilityNode.setParents(headwayAdherenceNode,actionNode);\n\t\t\n\t\t\t\n\t\texpectedHeadway = TransitParameters.SCHEDULE_HEADWAY_IN_MINUTE;\n\t\texpectedDeviation = TransitParameters.STANDARD_HEADWAY_DEVIATION_IN_MINUTE;\n\t\t*/\n\t}", "public void setActualWeight(double actualWeight) {\n if(actualWeight >= 0.0){\n this.actualWeight = actualWeight;\n }\n else{\n this.actualWeight = 0.0;\n }\n }", "public void writeNumberOfInNeurals() {\r\n \r\n inputLayer.setNumberOfNeurals(numberOfInputNeurals);\r\n }", "public void layerUpdate(int layerToBeUpdated ){\n\t\tRandom rand = new Random();\n\n\t\tfor(int i = 0; i < this.layers[layerToBeUpdated].length; i++){\n\t\t\tdouble x = this.layers[layerToBeUpdated][i].getBias();\n\t\t\tfor(int j = 0; j < this.layers[(layerToBeUpdated + 1) % 2].length; j++){\n\n\t\t\t\tif(layerToBeUpdated == 0){\n\t\t\t\t\tx += this.connections[i][j]*this.layers[1][j].getState();\n\t\t\t\t} else {\n\t\t\t\t\tx += this.connections[j][i]*this.layers[0][j].getState();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(Sigmoid.getINSTANCE().apply(x) >= rand.nextDouble()){\n\t\t\t\tthis.layers[layerToBeUpdated][i].setState(1);\n\t\t\t} else {\n\t\t\t\tthis.layers[layerToBeUpdated][i].setState(0);\n\t\t\t}\n\n\t\t}\n\t}", "Node(int weight, Node leftChild, Node rightChild) {\n this.weight = weight;\n this.leftChild = leftChild;\n this.rightChild = rightChild;\n value = null;\n }", "@Override\n\tpublic double getTargetValueInCurrentBest() {\n\t\treturn 0;\n\t}", "void addNi(int node, double weight) {\n this.neighbors.put(node, weight);\n }", "public void prepareForReplacement(JmmNode node, Object value) {\n String type = getType(node);\n\n if (value != null && type != null) {\n JmmNode replacement = null;\n \n if (type.equals(\"int\")) {\n replacement = new JmmNodeImpl(\"Int\");\n replacement.put(\"value\", String.valueOf(value));\n }\n else if (type.equals(\"boolean\")) {\n if ((Boolean) value) {\n replacement = new JmmNodeImpl(\"True\");\n }\n else {\n replacement = new JmmNodeImpl(\"False\");\n }\n }\n \n constantPropagations.add(new ConstantPropagationInformation(node.getParent(), node.getParent().getChildren().indexOf(node), replacement));\n }\n }", "private void displayNeuralNetwork() {\n \n float[] inputSignals = this.task.getInputSignalsVector();\n \n float positiveState = network.getNeuralLayer().getNeuron(0).getState(inputSignals);\n float negativeState = network.getNeuralLayer().getNeuron(1).getState(inputSignals);\n \n this.neuralLayerPanel.displayNeuralLayer(network.getNeuralLayer().getNeuron(0).getWeightsVector(),\n positiveState,\n network.getNeuralLayer().getNeuron(1).getWeightsVector(),\n negativeState); \n \n String answer = \"not your color\";\n if (positiveState > negativeState) {\n answer = \"your color\";\n }\n this.answerLabel.setText(answer);\n \n }" ]
[ "0.6980194", "0.66421694", "0.65044504", "0.64236826", "0.6273699", "0.5987607", "0.577926", "0.56196797", "0.5473823", "0.5468671", "0.5466869", "0.54177886", "0.5369408", "0.5345181", "0.53328586", "0.52338487", "0.5221787", "0.5216954", "0.51804936", "0.508516", "0.5011252", "0.49990204", "0.49467078", "0.48953256", "0.48834792", "0.48714265", "0.4842497", "0.479947", "0.4747446", "0.47229862", "0.4700126", "0.46817124", "0.46760452", "0.46448728", "0.46192792", "0.46140692", "0.45710146", "0.4566621", "0.45612472", "0.4539068", "0.4500981", "0.44998616", "0.44936487", "0.4490499", "0.4489601", "0.4482812", "0.44489324", "0.44473073", "0.44335672", "0.44235343", "0.44165766", "0.44135755", "0.44119683", "0.43956497", "0.43932426", "0.43885618", "0.4380275", "0.4376552", "0.43700957", "0.43638372", "0.4358286", "0.4357604", "0.4356043", "0.4354891", "0.432885", "0.43239722", "0.4302576", "0.4301575", "0.430067", "0.42967948", "0.42957526", "0.42935786", "0.42932084", "0.4291729", "0.42875996", "0.42799267", "0.4278491", "0.42778632", "0.42714873", "0.42680418", "0.4267097", "0.42527735", "0.42509404", "0.4244036", "0.42370075", "0.42245868", "0.42189282", "0.4215231", "0.4210719", "0.42096904", "0.42093775", "0.41931164", "0.41930398", "0.41860846", "0.41827434", "0.417991", "0.4176291", "0.41756207", "0.41722125", "0.4170228" ]
0.67496204
1
The Class SignedDataImageParam allows to set the data sign in the image parameters.
public interface SignedDataImageParam { boolean isSignedData(); void setSignedData(boolean signedData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setSignatureImage(byte[] signatureImage);", "void xsetSignatureImage(org.apache.xmlbeans.XmlBase64Binary signatureImage);", "public void setImageData(byte[] value) {\r\n this.imageData = ((byte[]) value);\r\n }", "private byte[] signData(byte[] data)\n throws CmsCadesException, GeneralSecurityException, IOException {\n CadesSignature cmsSig = new CadesSignature(data, SignedData.EXPLICIT);\n // CadesBESParameters params = new CadesBESParameters();\n CadesTParameters params = new CadesTParameters(\n \"http://tsp.iaik.tugraz.at/tsp/TspRequest\", null, null);\n params.setDigestAlgorithm(\"SHA512\");\n cmsSig.addSignerInfo(privKey_, certChain_, params);\n return cmsSig.encodeSignature();\n }", "public void setPicture(javax.activation.DataHandler param) {\r\n localPictureTracker = param != null;\r\n\r\n this.localPicture = param;\r\n }", "private void uploadImage(byte[] imageData) {\n\n }", "@Override\r\n\tpublic byte[] cosign(final byte[] data,\r\n final byte[] sign,\r\n final String algorithm,\r\n final PrivateKey key,\r\n final java.security.cert.Certificate[] certChain,\r\n final Properties extraParams) throws AOException, IOException {\r\n return sign(sign, algorithm, key, certChain, extraParams);\r\n }", "public static boolean isSigned_data() {\n return false;\n }", "@Deprecated\n public void setDataParam(int dataParam) {\n this.dataParam = dataParam;\n }", "public void setParameterData(ParameterData[] parameterData) {\n this.parameters = parameterData;\n }", "private void signDataStream(InputStream data, String signatureFilename)\n throws CmsCadesException, GeneralSecurityException, IOException {\n CadesSignatureStream cmsSig = new CadesSignatureStream(data, SignedData.EXPLICIT);\n // CadesBESParameters params = new CadesBESParameters();\n CadesTParameters params = new CadesTParameters(\n \"http://tsp.iaik.tugraz.at/tsp/TspRequest\", null, null);\n params.setDigestAlgorithm(\"SHA512\");\n cmsSig.addSignerInfo(privKey_, certChain_, params);\n ByteArrayOutputStream signature = new ByteArrayOutputStream();\n cmsSig.encodeSignature(signature);\n byte[] signatureBytes = signature.toByteArray();\n signature.close();\n FileOutputStream os = new FileOutputStream(signatureFilename);\n os.write(signatureBytes);\n os.flush();\n os.close();\n }", "void setData(byte[] data);", "byte[] getSignatureImage();", "@NonNull\n public Builder setTagData(@NonNull byte[] tagData) {\n mImpl.setTagData(ByteString.copyFrom(tagData));\n mFingerprint.recordPropertyUpdate(1, Arrays.hashCode(tagData));\n return this;\n }", "public void parseParameter(byte[] data)\n {\n return; \n }", "void setData(byte[] data) {\n this.data = data;\n }", "public int getDataParam() {\n return dataParam;\n }", "public void setKeyData(String keyData)\n\t{\n\t\tthis.keyData = keyData;\n\t}", "@Override\r\n\tpublic void setData(String data) {\r\n\t\tsuper.setData(data);\r\n\t\tString src = data;\r\n\t\tif (data == null) {\r\n\t\t\tsrc = \"\";\r\n\t\t}\r\n\r\n\t\tthis.image.setAttribute(\"src\", src);\r\n\t}", "public void setData(byte[] data) {\n this.data = data;\n }", "@Override\r\n\tpublic byte[] sign(final byte[] data,\r\n final String algorithm,\r\n final PrivateKey key,\r\n final java.security.cert.Certificate[] certChain,\r\n final Properties xParams) throws AOException {\r\n\r\n final Properties extraParams = xParams != null ? xParams : new Properties();\r\n\r\n final String digestMethodAlgorithm = extraParams.getProperty(\"referencesDigestMethod\", DIGEST_METHOD); //$NON-NLS-1$\r\n final boolean useOpenOffice31Mode = \"true\".equalsIgnoreCase(extraParams.getProperty(\"useOpenOffice31Mode\")); //$NON-NLS-1$ //$NON-NLS-2$\r\n\r\n if (!isValidDataFile(data)) {\r\n throw new AOFormatFileException(\"Los datos introducidos no se corresponden con un documento ODF\"); //$NON-NLS-1$\r\n }\r\n\r\n String fullPath = MANIFEST_PATH;\r\n boolean isCofirm = false;\r\n\r\n try {\r\n // genera el archivo zip temporal a partir del InputStream de\r\n // 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 fos.write(data);\r\n fos.flush();\r\n fos.close();\r\n\r\n // carga el fichero zip\r\n final ZipFile zf = new ZipFile(zipFile);\r\n\r\n // obtiene el archivo manifest.xml, que indica los ficheros que\r\n // contiene el ODF\r\n final InputStream manifest = zf.getInputStream(zf.getEntry(fullPath));\r\n final byte[] manifestData = AOUtil.getDataFromInputStream(manifest);\r\n\r\n if (manifest != null) {\r\n manifest.close();\r\n }\r\n\r\n // obtiene el documento manifest.xml y su raiz\r\n final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n dbf.setNamespaceAware(true);\r\n final Document docManifest = dbf.newDocumentBuilder().parse(new ByteArrayInputStream(manifestData));\r\n final Element rootManifest = docManifest.getDocumentElement();\r\n\r\n // recupera todos los nodos de manifest.xml\r\n final NodeList listFileEntry = rootManifest.getElementsByTagName(\"manifest:file-entry\"); //$NON-NLS-1$\r\n\r\n //\r\n // Datos necesarios para la firma\r\n //\r\n\r\n // MessageDigest\r\n final MessageDigest md;\r\n try {\r\n\t md = MessageDigest.getInstance(DIGEST_METHOD_ALGORITHM_NAME);\r\n }\r\n catch (final Exception e) {\r\n \tzf.close();\r\n \tthrow new AOException(\r\n \t\t\t\"No se ha podido obtener un generador de huellas digitales con el algoritmo \" + DIGEST_METHOD_ALGORITHM_NAME + \": \" + e, e //$NON-NLS-1$ //$NON-NLS-2$\r\n \t\t\t);\r\n }\r\n\r\n // XMLSignatureFactory\r\n final XMLSignatureFactory fac = XMLSignatureFactory.getInstance(\"DOM\"); //$NON-NLS-1$\r\n\r\n // DigestMethod\r\n final DigestMethod dm;\r\n try {\r\n dm = fac.newDigestMethod(digestMethodAlgorithm, null);\r\n }\r\n catch (final Exception e) {\r\n zf.close();\r\n throw new AOException(\r\n \"No se ha podido obtener un generador de huellas digitales con el algoritmo: \" + digestMethodAlgorithm, e //$NON-NLS-1$\r\n );\r\n }\r\n\r\n // Configuramos mediante reflexion las transformaciones y referencias\r\n\r\n final Class<?> canonicalizerClass = Class.forName(\"com.sun.org.apache.xml.internal.security.c14n.Canonicalizer\"); //$NON-NLS-1$\r\n final String algoIdC14nOmitComments =\r\n \t\t(String) canonicalizerClass.getField(\"ALGO_ID_C14N_OMIT_COMMENTS\").get(null); //$NON-NLS-1$\r\n\r\n // Transforms\r\n final List<Transform> transformList = new ArrayList<Transform>(1);\r\n transformList.add(\r\n \t\tfac.newTransform(\r\n \t\t\t\talgoIdC14nOmitComments,\r\n \t\t\t\t(TransformParameterSpec) null\r\n\t\t\t\t)\r\n \t\t);\r\n\r\n // References\r\n final List<Reference> referenceList = new ArrayList<Reference>();\r\n\r\n Class.forName(\"com.sun.org.apache.xml.internal.security.Init\").getMethod(\"init\").invoke(null); //$NON-NLS-1$ //$NON-NLS-2$\r\n\r\n final Object canonicalizer = canonicalizerClass.\r\n \t\tgetMethod(\"getInstance\", String.class).invoke(null, algoIdC14nOmitComments); //$NON-NLS-1$\r\n\r\n final Method canonicalizeSubtreeMethod =\r\n \t\tcanonicalizerClass.getMethod(\"canonicalizeSubtree\", org.w3c.dom.Node.class); //$NON-NLS-1$\r\n\r\n //\r\n // Anadimos tambien referencias manualmente al propio manifest.xml y\r\n // al mimetype\r\n //\r\n\r\n // manifest tiene una canonicalizacion. Solo en OOo 3.2 y superiores\r\n if (!useOpenOffice31Mode) {\r\n\r\n // mimetype es una referencia simple, porque no es XML\r\n referenceList.add(fac.newReference(\"mimetype\", dm, null, null, null, md.digest(AOUtil.getDataFromInputStream( //$NON-NLS-1$\r\n // Recupera el fichero\r\n zf.getInputStream(zf.getEntry(\"mimetype\")))))); //$NON-NLS-1$\r\n\r\n referenceList.add(\r\n \t\tfac.newReference(\r\n \t\t\t\tMANIFEST_PATH,\r\n \t\t\t\tdm,\r\n \t\t\t\ttransformList,\r\n \t\t\t\tnull,\r\n \t\t\t\tnull,\r\n \t\t\t\tmd.digest(\r\n \t\t\t\t\t\t(byte[]) canonicalizeSubtreeMethod.invoke(\r\n \t\t\t\t\t\t\t\tcanonicalizer,\r\n \t\t\t\t\t\t\t\t// Recupera el fichero y su raiz\r\n \t\t\t\t\t\t\t\tdbf.newDocumentBuilder().parse(\r\n \t\t\t\t\t\t\t\t\t\tnew ByteArrayInputStream(manifestData)\r\n \t\t\t\t\t\t\t\t\t).getDocumentElement()\r\n \t\t\t\t\t\t\t)\r\n \t\t\t\t\t\t)\r\n \t\t\t\t)\r\n \t\t);\r\n }\r\n\r\n // para cada nodo de manifest.xml\r\n Reference reference;\r\n for (int i = 0; i < listFileEntry.getLength(); i++) {\r\n fullPath = ((Element) listFileEntry.item(i)).getAttribute(\"manifest:full-path\"); //$NON-NLS-1$\r\n\r\n // si es un archivo\r\n if (!fullPath.endsWith(\"/\")) { //$NON-NLS-1$\r\n\r\n // y es uno de los siguientes archivos xml\r\n if (fullPath.equals(\"content.xml\") || fullPath.equals(\"meta.xml\") //$NON-NLS-1$ //$NON-NLS-2$\r\n || fullPath.equals(\"styles.xml\") //$NON-NLS-1$\r\n || fullPath.equals(\"settings.xml\")) { //$NON-NLS-1$\r\n\r\n // crea la referencia\r\n reference = fac.newReference(fullPath.replaceAll(\" \", \"%20\"), dm, transformList, null, null, //$NON-NLS-1$ //$NON-NLS-2$\r\n // Obtiene su forma canonica y su DigestValue\r\n \t\tmd.digest(\r\n \t\t\t\t(byte[]) canonicalizeSubtreeMethod.invoke(\r\n \t\t\t\t\t\tcanonicalizer,\r\n \t\t\t\t\t\t// Recupera el fichero y su raiz\r\n \t\t\t\t\t\tdbf.newDocumentBuilder().parse(zf.getInputStream(zf.getEntry(fullPath))).getDocumentElement()\r\n \t\t\t\t\t\t)\r\n \t\t\t\t)\r\n \t\t);\r\n }\r\n\r\n // si no es uno de los archivos xml\r\n else {\r\n\r\n // crea la referencia\r\n reference = fac.newReference(fullPath.replaceAll(\" \", \"%20\"), dm, null, null, null, md.digest(AOUtil.getDataFromInputStream( //$NON-NLS-1$ //$NON-NLS-2$\r\n // Recupera el fichero\r\n zf.getInputStream(zf.getEntry(fullPath)))));\r\n\r\n }\r\n\r\n if (!fullPath.equals(SIGNATURES_PATH)) {\r\n \treferenceList.add(reference);\r\n }\r\n else {\r\n // Para mantener la compatibilidad con OpenOffice 3.1?\r\n \tisCofirm = true;\r\n }\r\n }\r\n }\r\n\r\n // Si se encuentra el fichero de firmas en el documento, la nueva firma\r\n // se debe agregar a el\r\n if (!isCofirm && zf.getEntry(SIGNATURES_PATH) != null) {\r\n \tisCofirm = true;\r\n }\r\n\r\n final Document docSignatures;\r\n final Element rootSignatures;\r\n // si es cofirma\r\n if (isCofirm) {\r\n // recupera el documento de firmas y su raiz\r\n docSignatures = dbf.newDocumentBuilder().parse(zf.getInputStream(zf.getEntry(SIGNATURES_PATH)));\r\n rootSignatures = docSignatures.getDocumentElement();\r\n }\r\n else {\r\n // crea un nuevo documento de firmas\r\n docSignatures = dbf.newDocumentBuilder().newDocument();\r\n rootSignatures = docSignatures.createElement(\"document-signatures\"); //$NON-NLS-1$\r\n rootSignatures.setAttribute(\"xmlns\", OPENOFFICE); //$NON-NLS-1$\r\n docSignatures.appendChild(rootSignatures);\r\n\r\n // En OpenOffice 3.2 y superiores no anadimos la propia firma al\r\n // manifest para evitar referencias circulares\r\n if (useOpenOffice31Mode) {\r\n final Element nodeDocumentSignatures = docManifest.createElement(\"manifest:file-entry\"); //$NON-NLS-1$\r\n nodeDocumentSignatures.setAttribute(\"manifest:media-type\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n nodeDocumentSignatures.setAttribute(\"manifest:full-path\", SIGNATURES_PATH); //$NON-NLS-1$\r\n rootManifest.appendChild(nodeDocumentSignatures);\r\n\r\n // nuevo elemento de META-INF\r\n final Element nodeMetaInf = docManifest.createElement(\"manifest:file-entry\"); //$NON-NLS-1$\r\n nodeMetaInf.setAttribute(\"manifest:media-type\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n nodeMetaInf.setAttribute(\"manifest:full-path\", \"META-INF/\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n rootManifest.appendChild(nodeMetaInf);\r\n }\r\n }\r\n\r\n // Ids de Signature y SignatureProperty\r\n final String signatureId = UUID.randomUUID().toString();\r\n final String signaturePropertyId = UUID.randomUUID().toString();\r\n\r\n // referencia a SignatureProperty\r\n referenceList.add(fac.newReference(\"#\" + signaturePropertyId, dm)); //$NON-NLS-1$\r\n\r\n // contenido de SignatureProperty\r\n final Element content = docSignatures.createElement(\"dc:date\"); //$NON-NLS-1$\r\n content.setAttribute(\"xmlns:dc\", \"http://purl.org/dc/elements/1.1/\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n content.setTextContent(new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss,SS\").format(new Date())); //$NON-NLS-1$\r\n final List<XMLStructure> contentList = new ArrayList<XMLStructure>();\r\n contentList.add(new DOMStructure(content));\r\n\r\n // SignatureProperty\r\n final List<SignatureProperty> spList = new ArrayList<SignatureProperty>();\r\n spList.add(fac.newSignatureProperty(contentList, \"#\" + signatureId, signaturePropertyId)); //$NON-NLS-1$\r\n\r\n // SignatureProperties\r\n final List<SignatureProperties> spsList = new ArrayList<SignatureProperties>();\r\n spsList.add(fac.newSignatureProperties(spList, null));\r\n\r\n // Object\r\n final List<XMLObject> objectList = new ArrayList<XMLObject>();\r\n objectList.add(fac.newXMLObject(spsList, null, null, null));\r\n\r\n // Preparamos el KeyInfo\r\n final KeyInfoFactory kif = fac.getKeyInfoFactory();\r\n final List<Object> x509Content = new ArrayList<Object>();\r\n final X509Certificate cert = (X509Certificate) certChain[0];\r\n x509Content.add(cert.getSubjectX500Principal().getName());\r\n x509Content.add(cert);\r\n\r\n // genera la firma\r\n fac.newXMLSignature(\r\n // SignedInfo\r\n fac.newSignedInfo(\r\n // CanonicalizationMethod\r\n fac.newCanonicalizationMethod(\r\n CanonicalizationMethod.INCLUSIVE,\r\n (C14NMethodParameterSpec) null),\r\n fac.newSignatureMethod(SignatureMethod.RSA_SHA1, null),\r\n referenceList\r\n ),\r\n // KeyInfo\r\n kif.newKeyInfo(\r\n Collections.singletonList(kif.newX509Data(x509Content)),\r\n null\r\n ),\r\n objectList,\r\n signatureId,\r\n null\r\n ).sign(\r\n new DOMSignContext(key, rootSignatures)\r\n );\r\n\r\n // crea un nuevo fichero zip\r\n final ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n final ZipOutputStream zos = new ZipOutputStream(baos);\r\n\r\n // copia el contenido del zip original en el nuevo excepto el\r\n // documento de firmas y manifest.xml\r\n final Enumeration<? extends ZipEntry> e = zf.entries();\r\n ZipEntry ze;\r\n ZipEntry zeOut;\r\n while (e.hasMoreElements()) {\r\n ze = e.nextElement();\r\n zeOut = new ZipEntry(ze.getName());\r\n if (!ze.getName().equals(SIGNATURES_PATH) && !ze.getName().equals(MANIFEST_PATH)) {\r\n zos.putNextEntry(zeOut);\r\n zos.write(AOUtil.getDataFromInputStream(zf.getInputStream(ze)));\r\n }\r\n }\r\n\r\n // anade el documento de firmas\r\n zos.putNextEntry(new ZipEntry(SIGNATURES_PATH));\r\n final ByteArrayOutputStream baosXML = new ByteArrayOutputStream();\r\n writeXML(baosXML, rootSignatures, false);\r\n zos.write(baosXML.toByteArray());\r\n zos.closeEntry();\r\n\r\n // anade manifest.xml\r\n zos.putNextEntry(new ZipEntry(MANIFEST_PATH));\r\n final ByteArrayOutputStream baosManifest = new ByteArrayOutputStream();\r\n writeXML(baosManifest, rootManifest, false);\r\n zos.write(baosManifest.toByteArray());\r\n zos.closeEntry();\r\n\r\n try {\r\n zos.close();\r\n }\r\n catch (final Exception t) {\r\n // Ignoramos los errores en el cierre\r\n }\r\n zf.close();\r\n return baos.toByteArray();\r\n\r\n }\r\n catch (final SAXException saxex) {\r\n throw new AOFormatFileException(\"Estructura de archivo no valida: \" + fullPath + \": \" + saxex); //$NON-NLS-1$ //$NON-NLS-2$\r\n }\r\n catch (final Exception e) {\r\n throw new AOException(\"No ha sido posible generar la firma ODF: \" + e, e); //$NON-NLS-1$\r\n }\r\n }", "public void setImageData(byte[] imageData) {\n if (tile != null) {\n tile.setImageData(imageData);\n } else {\n this.data = imageData;\n }\n }", "public void initSign(Key paramKey, AlgorithmParameterSpec paramAlgorithmParameterSpec) throws XMLSignatureException {\n/* 269 */ this.signatureAlgorithm.engineInitSign(paramKey, paramAlgorithmParameterSpec);\n/* */ }", "public void setupData(BufferedImage stegoImage){\n\n // Define the image we are reading data from\n this.stegoImage = stegoImage;\n\n // Get parameter binary data\n StringBuilder parameters = decodeParameters();\n\n // Get the colours to consider (some combination of red, green and blue)\n boolean red = binaryToInt(parameters.substring(3,4)) == 1;\n boolean green = binaryToInt(parameters.substring(4,5)) == 1;\n boolean blue = binaryToInt(parameters.substring(5,6)) == 1;\n this.coloursToConsider = getColoursToConsider(red, green, blue);\n\n int redBits = binaryToInt(parameters.substring(6, 9)) + 1;\n int greenBits = binaryToInt(parameters.substring(9, 12)) + 1;\n int blueBits = binaryToInt(parameters.substring(12, 15)) + 1;\n this.lsbsToConsider = getLSBsToConsider(redBits, greenBits, blueBits, red, green, blue);\n\n // Determine whether random embedding is being used\n this.random = binaryToInt(parameters.substring(15, 16)) == 1;\n if (random) {\n this.generator = new pseudorandom(stegoImage.getHeight(), stegoImage.getWidth(), \"calum\");\n }\n\n // Get end position for data encoding\n endPositionX = binaryToInt(parameters.substring(16,31));\n endPositionY = binaryToInt(parameters.substring(31,46));\n endColourChannel = binaryToInt(parameters.substring(46, 48));\n endLSBPosition = binaryToInt(parameters.substring(48));\n\n }", "@Generated\n @Selector(\"setKeyData:\")\n public native void setKeyData(@NotNull NSData value);", "BlsPoint sign(BigInteger privateKey, byte[] data);", "public void setParameter(AlgorithmParameterSpec paramAlgorithmParameterSpec) throws XMLSignatureException {\n/* 281 */ this.signatureAlgorithm.engineSetParameter(paramAlgorithmParameterSpec);\n/* */ }", "@attribute(value = \"\", required = false)\t\r\n\tpublic void setBinaryData(Boolean data) {\r\n\t\tthis.binaryFile = data;\r\n\t}", "public SDataTypeSignature(SDataTypeSignature other) {\n if (other.isSetType()) {\n this.type = new SDataType(other.type);\n }\n if (other.isSetArguments()) {\n java.util.List<SFunctionArgument> __this__arguments = new java.util.ArrayList<SFunctionArgument>(other.arguments.size());\n for (SFunctionArgument other_element : other.arguments) {\n __this__arguments.add(new SFunctionArgument(other_element));\n }\n this.arguments = __this__arguments;\n }\n if (other.isSetReturnType()) {\n this.returnType = new sda.ghidra.shared.STypeUnit(other.returnType);\n }\n }", "public void setData(byte data) {\n this.data = data;\n }", "public SGSParamFile(SGSParam param, StyxGridServiceInstance instance) throws StyxException\n {\n // The file is named after the parameter name\n super(new InMemoryFile(param.getName()));\n this.param = param;\n this.instance = instance;\n if (this.getJSAPParameter().getDefault() != null)\n {\n // TODO: We are only allowing a single default value\n this.setParameterValue(this.getJSAPParameter().getDefault()[0]);\n this.valueSet = true;\n }\n }", "public void setUserData(String key, Object data) {\n button.setUserData(key, data);\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}", "public void setEncodeParam(PNGEncodeParam encodeParam) {\n/* 355 */ this.encodeParam = encodeParam;\n/* */ }", "@Override\n public void feedRawData(Image data) {\n mARGSession.feedRawData(data);\n }", "public void initSign(Key paramKey) throws XMLSignatureException {\n/* 242 */ this.signatureAlgorithm.engineInitSign(paramKey);\n/* */ }", "public void setBase64Binary(javax.activation.DataHandler param) {\n this.localBase64Binary = param;\n }", "public void setImage(byte[] value) {\n this.image = ((byte[]) value);\n }", "void setParameterData(String param_state, String param_name)\n {\n this.paramState = param_state;\n this.paramName = param_name;\n }", "public void setImage(byte[] image) {\n this.image = image;\n }", "public void setImage(byte[] image) {\n this.image = image;\n }", "public byte[] sign(byte[] data) throws EncryptingException {\n try {\n return RSA.sign(data, serverPrivateKey);\n } catch (Exception e) {\n throw new EncryptingException();\n }\n }", "public void setData(byte[] data) {\r\n this.bytes = data;\r\n }", "public void setPic(byte[] data) {\n ParseFile pic = new ParseFile(getObjectId().toString()+ \".jpg\", data);\n //SAVE PIC THEN ONCE DONE, PERFORM SAVE ON THE PHOTO OBJECT\n pic.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.d(TAG, \"Error in uploading photo to Parse: \" + e);\n }\n }\n }, new ProgressCallback() {\n @Override\n public void done(Integer percentDone) {\n\n }\n });\n put(\"pic\", pic);\n saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e != null) {\n Log.d(TAG, \"Error saving photo to Parse: \" + e);\n }\n }\n });\n }", "public void setData(byte[] data) {\n if (data == null) {\n this.length=0;\n }\n else {\n this.data = data;\n this.length = this.data.length;\n }\n }", "public void setDataUnsafe(Serializable data) { this.data = data; }", "public abstract void param(byte[] data,SplitDetails name, SplitDetails value) throws ParseException;", "public a(a imgSrc, J2KImageWriteParamJava wp) {\n/* 123 */ super((f)imgSrc);\n/* 124 */ this.f = wp.getComponentTransformation();\n/* 125 */ this.g = wp.getFilters();\n/* 126 */ this.e = imgSrc;\n/* */ }", "public void setSignatureimage (java.lang.String signatureimage) {\n\t\tthis.signatureimage = signatureimage;\n\t}", "org.apache.xmlbeans.XmlBase64Binary xgetSignatureImage();", "void register(byte[] imageData, ObjectImageType imageType, String uuid);", "public void setData(Object data) {\r\n this.data = data;\r\n }", "void setSaltData(java.lang.String saltData);", "@Override\r\n\tpublic byte[] getData(final byte[] signData) throws AOInvalidFormatException, IOException {\r\n\r\n // Si no es una firma ODF valida, lanzamos una excepcion\r\n if (!isSign(signData)) {\r\n throw new AOInvalidFormatException(\"El documento introducido no contiene una firma valida\"); //$NON-NLS-1$\r\n }\r\n\r\n // TODO: Por ahora, devolveremos el propio ODF firmado.\r\n return signData;\r\n }", "public void setData (G pData){\n this._data=pData;\n }", "public void initSign(Key paramKey, SecureRandom paramSecureRandom) throws XMLSignatureException {\n/* 255 */ this.signatureAlgorithm.engineInitSign(paramKey, paramSecureRandom);\n/* */ }", "public boolean isValidSize(ImagePlus img, byte[] data);", "@Override\n\tpublic void setParameters(Map<String, Double> data) {\n\t\tprobCatch = data.get(PROBCATCH_PARAMETER_LABEL);\n\t\tprobCatchBounds.set(1, probCatch);\n\t\tcreateParametersBounds();\n\t}", "public void setData(Object data) {\n this.data = data;\n }", "public void setUserData(Object data);", "PNMMetadata(ImageTypeSpecifier imageType, ImageWriteParam param) {\n/* 145 */ this();\n/* 146 */ initialize(imageType, param);\n/* */ }", "public void setData(Data data) {\n this.data = data;\n }", "public void setData(int[] data) {\n this.data = data;\n }", "public GpgSignature(@NonNull byte[] signature) {\n\t\tthis.signature = signature;\n\t}", "public void setData(IData data) {\n this.data = data;\n }", "public void setObjectdata(byte[] objectdata)\n {\n\n }", "public byte[] getImageData() {\r\n return imageData;\r\n }", "public void setImageData(byte[] imageBytes) {\n this.profilePictureBytes = imageBytes;\n }", "public ButtonData( byte[] upImage , byte[] downImage , byte[] dimImage , IPoint pos )\r\n {\r\n this.upImage = upImage ;\r\n this.downImage = downImage ;\r\n this.dimImage = dimImage ;\r\n if ( pos == null )\r\n {\r\n this.pos = new IPoint( 0 , 0 );\r\n }\r\n else\r\n {\r\n this.pos = pos ;\r\n }\r\n }", "public void setData(Object data) {\n\t\tthis.data = data;\n\t}", "public void setData(byte[] d) {\n _data = d;\n }", "public void setData(int data) {\n this.data = data;\n }", "public void setData(int data) {\n this.data = data;\n }", "public void setCsp_Photo(javax.activation.DataHandler csp_Photo) {\n this.csp_Photo = csp_Photo;\n }", "public abstract void setCustomData(Object data);", "public void setDataCode(String dataCode);", "public void setBfImageByData(int [][][] data){\r\n\t\tBfImage = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);\r\n\t\tfor (int i = 0; i < width; i++) {\r\n\t\t\tfor (int j = 0; j < height; j++) {\r\n\t\t\t\tint [] rgb = data[j][i];\r\n\t\t\t\tif (rgb[0] == -1){\t//is transparent\r\n\t\t\t\t\tBfImage.setRGB(i, j, Transparency.TRANSLUCENT);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tBfImage.setRGB(i, j, Utils.getRGB(rgb[0], rgb[1], rgb[2]));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void setAspectData(String aspectName, Object data);", "void imageData(int width, int height, int[] rgba);", "public void setMasterSignedImage(int masterSignedImage) {\n\t\t_tempNoTiceShipMessage.setMasterSignedImage(masterSignedImage);\n\t}", "protected void setImageData(BufferedImage img) {\n \t\tif (format == null || format == Format.TEXT || format == Format.COLOR16_8x8)\n \t\t\treturn;\n \t\n \t\tequalize(img);\n \t\t\n \t\t//denoise(img);\n \t\t\n \t\tupdatePaletteMapping();\n \t\n \t\tflatten(img);\n \t\t\n \t\tif (!importDirectMappedImage(img)) {\n \t\t\tconvertImageToColorMap(img);\n \t\t}\n \t\n \t\treplaceImageData(img);\n \t}", "public void setSignImgUrl(String signImgUrl) {\n this.signImgUrl = signImgUrl == null ? null : signImgUrl.trim();\n }", "@Override\n public String buildSignature(RequestDataToSign requestDataToSign, String appKey) {\n // find private key for this app\n final String secretKey = keyStore.getPrivateKey(appKey);\n if (secretKey == null) {\n LOG.error(\"Unknown application key: {}\", appKey);\n throw new PrivateKeyNotFoundException();\n }\n\n // sign\n return super.buildSignature(requestDataToSign, secretKey);\n }", "public void onDataEncoded(byte[] encodedData);", "@Override\r\n\tprotected void setData(Object data) {\n\t\t\r\n\t}", "public void setData(int data)\n\t {\n\t this.data = data;\n\t }", "public void setData(D data) {\n this.data = data;\n }", "abstract public void setUserData(Object data);", "public void setData(V data){\n\t\tthis.data = data;\n\t}", "public CodeChecksumPragma(String fileName, Guid checksumAlgorithmId, byte[] checksumData)\r\n\t{\r\n\t\tthis.fileName = fileName;\r\n\t\tthis.checksumAlgorithmId = checksumAlgorithmId;\r\n\t\tthis.checksumData = checksumData;\r\n\t}", "public void setData(AdHocCommandData data) {\n this.data = data;\n }", "private byte[] postImageSaveAsPostRequestInvoker(byte[] imageData, String outPath) throws Exception\n\t{\n\t postImageSaveAsRequest.drawingData = imageData;\n\t\tpostImageSaveAsRequest.outPath = outPath;\n return CadApi.postDrawingSaveAs(postImageSaveAsRequest);\n\t}", "public void setSignature( String pSignature )\r\n {\r\n this.signature = pSignature;\r\n }", "DataParamNode DataParamNode(Token t, String text);", "static Image forData(String imageType, byte[] data) {\n\t\treturn () -> String.format(\"data:image/%s;base64,%s\", imageType, Base64.encodeBase64String(data));\n\t}", "private byte[] getImageEncodingParameter() {\n final byte[] encodingData = new byte[] {\n (byte)0x95, // ID\n 0x02, // Length\n encoding,\n (byte)(encoding == COMPID_JPEG ? 0xFE : 0x01), // RECID\n };\n return encodingData;\n }", "@Override\n public void onPictureTaken(byte[] data, Camera camera) {\n encodedImage = Base64.encodeToString(data, Base64.DEFAULT);\n galleryId = \"Company\";\n showEnterLabelDialog();\n camera.startPreview();\n }", "public void setData(int data) {\n\t\tthis.data = data;\n\t}", "public void setAdditionalInternalData(byte[] additionalIntData) {\n\t\tthis.additionalIntData=additionalIntData;\n\t}", "public Parameter(String name, DataSheet dataSheet) {\n\t\tthis.name = name;\n\t\tthis.dataSheet = dataSheet;\n\t}" ]
[ "0.6418917", "0.5762358", "0.5653672", "0.54679984", "0.5285492", "0.52132094", "0.5198874", "0.5175511", "0.51245785", "0.5120488", "0.50195295", "0.50188094", "0.5015049", "0.4992232", "0.49664518", "0.49572334", "0.4943759", "0.49235833", "0.4873444", "0.4863288", "0.48455414", "0.4843055", "0.48428312", "0.4837302", "0.48232526", "0.4820629", "0.48176494", "0.48118472", "0.47965857", "0.47806028", "0.4777006", "0.4769128", "0.47681892", "0.4758236", "0.47562367", "0.47536096", "0.47356114", "0.4722957", "0.4692055", "0.4683839", "0.4683839", "0.46783808", "0.4668093", "0.4649832", "0.46477857", "0.46436515", "0.4620375", "0.46169245", "0.46051806", "0.46014988", "0.45972908", "0.4597174", "0.45967132", "0.45966825", "0.45946145", "0.45689484", "0.45651335", "0.45525035", "0.4545343", "0.45078632", "0.45044494", "0.4498684", "0.44983694", "0.44940165", "0.4492665", "0.4490729", "0.447519", "0.44684088", "0.445868", "0.44475055", "0.44441372", "0.44377598", "0.44377598", "0.4437376", "0.44358155", "0.4430454", "0.44198346", "0.44174492", "0.4413224", "0.44013843", "0.4399423", "0.4395937", "0.43947402", "0.43900356", "0.43852943", "0.4380382", "0.43802118", "0.43796912", "0.43624526", "0.43587673", "0.43583402", "0.43567723", "0.43566248", "0.43507332", "0.43468764", "0.43465105", "0.43461868", "0.4341778", "0.43314993", "0.4329961" ]
0.75162864
0
This function is run when the robot is first started up and should be used for any initialization code.
public void robotInit() { //Get preferences from robot flash memory prefs = Preferences.getInstance(); armCalMinPosition = prefs.getDouble("armCalMinPosition", 0); armCal90DegPosition = prefs.getDouble("armCal90DegPosition", 0); if (armCalMinPosition==0 || armCal90DegPosition==0) { DriverStation.reportError("Error: Preferences missing from RoboRio for Shooter Arm position calibration. Shooter arm disabled.", true); shooterArmEnabled = false; } else { shooterArmEnabled = true; } try { debugStream = new FileWriter("/home/lvuser/debug.log", true); debugStream.write("Robot program started\n"); debugStream.flush(); } catch (IOException e) { System.out.println("Could not open debug file: " + e); } //Instantiates the subsystems driveTrain = new DriveTrain(); shifter = new Shifter(); shooterArm = new ShooterArm(); shooter = new Shooter(); intake = new Intake(); vision = new Vision(); panel = new PowerDistributionPanel(); armPiston = new ArmPiston(); // OI must be constructed after subsystems. If the OI creates Commands // (which it very likely will), subsystems are not guaranteed to be // constructed yet. Thus, their requires() statements may grab null // pointers. Bad news. Don't move it. oi = new OI(); intake.motorCurrentTrigger.whenActive(new IntakeMotorStop()); timerLEDs.start(); timerTilt.start(); timerRumble.start(); // instantiate the command used for the autonomous period //autonomousCommand = new AutonomousCommandGroup(); raiseArm90 = new ShooterArmMoveToSetLocation(90); // Display active commands and subsystem status on SmartDashboard SmartDashboard.putData(Scheduler.getInstance()); SmartDashboard.putData(driveTrain); SmartDashboard.putData(shifter); SmartDashboard.putData(shooterArm); SmartDashboard.putData(shooter); SmartDashboard.putData(intake); SmartDashboard.putData(vision); SmartDashboard.putData(armPiston); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void robotInit() {\n }", "@Override\n public void robotInit() {\n }", "@Override\n public void robotInit() {\n }", "public void robotInit() {\n\n }", "public void robotInit() {\n\n }", "protected void initialize() {\n\t\tRobot.firstAutonomousCommandDone = true;\n\t}", "public void robotInit() {\r\n CommandBase.init();\r\n OI.init();\r\n System.out.println(\"ROBOT READY!\");\r\n }", "@Override\n public void init() {\n robot.init(hardwareMap);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Status\", \"Initialized\"); //\n }", "@Override\n public void init() {\n\n robot.init(hardwareMap);\n\n // Tell the driver that initialization is complete.\n\n telemetry.addData(\"Robot Mode:\", \"Initialized\");\n telemetry.update();\n }", "@Override\n public void robotInit() {\n\toi = new OI();\n\tgameData = new GameData();\n\tcubeVision.start();\n\n\tinitializeDashboard();\n }", "public void robotInit() {\n\t\t\n\t\tupdateDashboard();\n\t\t\n \tautoChooser = new SendableChooser();\n \tautoChooser.addDefault(\"Default Autonomous does nothing!\", new Default());\n \t// Default Autonomous does nothing\n \tautoChooser.addObject(\"Cross the Low Bar Don't Run This it doesn't work\", new LowBar());\n \tautoChooser.addObject(\"Cross Rough Patch/Stone Wall\", new Main());\n \tautoChooser.addObject(\"Cross the Low Bar, Experimental!\", new LowBarEx());\n \t//autoChooser.addObject(\"If Jonathan lied to us and we can cross twice\", new RoughPatch());\n \tCameraServer server = CameraServer.getInstance();\n\n \tserver.setQuality(50);\n \t\n \tSmartDashboard.putData(\"Autonomous\", autoChooser);\n\n \tserver.startAutomaticCapture(\"cam0\");\n \tLowBar.gyro.reset();\n \t\n \tDriverStation.reportWarning(\"The Robot is locked and loaded. Time to kick some ass guys!\", !(server.isAutoCaptureStarted()));\n\n\t}", "public void robotInit() {\n\t\tmyRobot = new RobotDrive(0,1);\n\t\tteleop = new Teleop(myRobot);\n\t\tauto = new AutonomousDrive(myRobot);\n\t}", "@Override\n public void init() {\n robot.init(hardwareMap);\n telemetry.addData(\"Status\", \"Initialized\");\n }", "public void robotInit()\n\t{\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\t// autonomousCommand = new Driver();\n\t}", "public void robotInit() {\n RobotMap.init();\n driveWithJoystick = new DriveTrain();\n \n oi = new OI();\n }", "@Override\n public void init() {\n runtime.reset();\n robot.init(hardwareMap);\n\n telemetry.addData(\"Status\", \"Initialized\");\n }", "public void robotInit() {\n RobotMap.init();\n driveTrain = new DriveTrain();\n oi = new OI();\n flippy = new Flipper();\n flappy = new Flapper();\n autonomousCommand = new AutoFlip();\n \n OI.init();\n CommandBase.init();\n autoChooser = new SendableChooser();\n autoChooser.addDefault(\"Flap Left\", new AutoFlip());\n SmartDashboard.putData(\"Autonomous_Mode\", autoChooser); \n }", "public void robotInit() {\n\t\toi = new OI();\n\t\t\n\t\tteleopCommand = new TeleopCommand();\n }", "public void robotInit() {\n // North.registerCommand(\"setSetpoint\", (params) -> ??, [\"Setpoint\"]);\n // North.registerCondition(\"atSetpoint\", elevator::atSetpoint);\n\n //NOTE: init(name, size, logic provider, drive & nav)\n North.init(/*NorthUtils.readText(\"name.txt\")*/ \"lawn chair\", 24/12, 24/12, drive);\n North.default_drive_controller = HoldController.I;\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n }", "public void robotInit() {\n System.out.println(\"Default robotInit() method... Override me!\");\n }", "@Override\n public void robotInit() {\n\t\t// set up logging\n\t\tlogger = EventLogging.getLogger(Robot.class, Level.INFO);\n\n // set up hardware\n RobotMap.init();\n\n // set up subsystems\n //initalized drive subsystem, which control motors to move robot\n driveSubsystem = new DriveSubsystem();\n\t\tbuttonSubstyem = new ButtonSubsystem();\n servoSubsystem = new ServoSubsystem();\n wingSubsystem = new WingSubsystem();\n flagSpinnerSubsystem = new FlagSpinnerSubsystem();\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n\n // Add commands to Autonomous Sendable Chooser\n chooser.addDefault(\"Autonomous Command\", new AutonomousCommand());\n SmartDashboard.putData(\"Auto mode\", chooser);\n }", "public void robotInit() {\n RobotMap.init();\r\n CommandBase.init();\r\n //Add autonomous prefs\r\n Preferences p = Preferences.getInstance();\r\n if (!p.containsKey(\"AutonInitialDelay\")) {\r\n p.putDouble(\"AutonInitialDelay\", kDefaultInitialDelay);\r\n }\r\n if (!p.containsKey(\"AutonTimeout\")) {\r\n p.putDouble(\"AutonTimeout\", kDefaultTimeout);\r\n }\r\n if (!p.containsKey(\"HangerLastSecondOn\")) {\r\n p.putBoolean(\"HangerLastSecondOn\", kDefaultLastSecondOn);\r\n }\r\n if (!p.containsKey(\"HangerLastSecondTimeout\")) {\r\n p.putDouble(\"HangerLastSecondTimeout\", kDefaultLastSecondTimeout);\r\n }\r\n }", "@Override\n\tpublic void onInit(RobotAPI arg0) {\n\n\t}", "@Override\r\n public void init() {\r\n /* Initialize the hardware variables.\r\n * The init() method of the hardware class does all the work here\r\n */\r\n robot.init(hardwareMap);\r\n\r\n // Send telemetry message to signify robot waiting;\r\n telemetry.addData(\"Status\", \"Initialized\");\r\n }", "@Override\n public void robotInit() \n {\n CommandBase.init();\n PIDCommandBase.init();\n\n CameraServer.getInstance().startAutomaticCapture();\n\n start.addDefault(\"Left\", Autonomous.StartPosition.LEFT);\n start.addObject(\"Center\", Autonomous.StartPosition.CENTER);\n start.addObject(\"Right\", Autonomous.StartPosition.RIGHT);\n SmartDashboard.putData(\"Start\", start);\n \n chooser.addObject(\"Scale\", Autonomous.AutoMode.SCALE);\n chooser.addObject(\"Switch\", Autonomous.AutoMode.SWITCH);\n chooser.addDefault(\"Drive\", Autonomous.AutoMode.DRIVE);\n SmartDashboard.putData(\"Auto Mode\", chooser);\n\n compressor = new Compressor();\n compressor.start();\n }", "public void robotInit() {\n\t\toi = OI.getInstance();\r\n\t\t\r\n\t\t// instantiate the command used for the autonomous and teleop period\r\n\t\treadings = new D_SensorReadings();\r\n\t\t// Start pushing values to the SD.\r\n\t\treadings.start();\r\n\t\t//Gets the single instances of driver and operator, from OI. \r\n\t\tdriver = oi.getDriver();\r\n\t\toperator = oi.getOperator();\r\n\r\n\t\t//Sets our default auto to NoAuto, if the remainder of our code doesn't seem to work. \r\n\t\tauto = new G_NoAuto();\r\n\t\t\r\n\t\t//Sets our teleop commandGroup to T_TeleopGroup, which contains Kaj,ELevator, Intake, and Crossbow Commands. \r\n\t\tteleop = new T_TeleopGroup();\r\n\t\t\r\n\t}", "public void robotInit() {\n\t\toi = new OI();\n // instantiate the command used for the autonomous period\n }", "public void robotInit(){\n\t\tSmartDashboard.putNumber(\"Climber Arm Speed: \", 0.5);\n\t\tSmartDashboard.putNumber(\"Climber Winch Speed: \", 0.25);\n\t}", "public void robotInit() {\n RobotMap.init();\n initDashboardInput();\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n driveTrain = new DriveTrain();\n power = new Power();\n arm = new Arm();\n sensors = new Sensors();\n ballGrabberSubsystem = new BallGrabberSubsystem();\n winch = new Winch();\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n // OI must be constructed after subsystems. If the OI creates Commands\n //(which it very likely will), subsystems are not guaranteed to be\n // constructed yet. Thus, their requires() statements may grab null\n // pointers. Bad news. Don't move it.\n oi = new OI();\n\n // instantiate the command used for the autonomous period\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=AUTONOMOUS\n\n arcadeDrive = new ArcadeDrive();\n\n readPreferences();\n }", "protected void initialize() {\n\t\tRobot.conveyor.Forward();\n\n\t}", "public void robotInit() {\n \tboardSubsystem = new BoardSubsystem();\n }", "@Override\n protected void initialize() {\n Robot.collector.open();\n }", "@Override public void init() {\n drive = MecanumDrive.standard(hardwareMap); // Comment this line if you, for some reason, don't need to use the drive motors\n\n // Uncomment the next three lines if you need to use the gyroscope\n // gyro = IMUGyro.standard(hardwareMap);\n // gyro.initialize();\n // gyro.calibrate();\n\n // Uncomment the next two lines if you need to use the vision system\n // vision = new Vision(hardwareMap);\n // vision.init();\n\n // Uncomment the next line if you have a servo\n // myServo = hardwareMap.get(Servo.class, \"myServo\");\n\n /** Place any code that should run when INIT is pressed here. **/\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n // robot.leftBumper.setPosition(.5);\n // robot.leftStageTwo.setPosition(1);\n // robot.rightStageTwo.setPosition(0.1);\n robot.colorDrop.setPosition(0.45);\n robot.align.setPosition(0.95);\n\n // robot.rightBumper.setPosition(.7);\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "public void robotInit()\r\n {\r\n // Initialize all subsystems\r\n CommandBase.init();\r\n // instantiate the command used for the autonomous period\r\n //Initializes triggers\r\n mecanumDriveTrigger = new MechanumDriveTrigger();\r\n tankDriveTrigger = new TankDriveTrigger();\r\n resetGyro = new ResetGyro();\r\n }", "protected void initialize() {\n Robot.limelight.setPipeline(0.0);\n }", "protected void initialize() {\n\t\tRobot.resetSensors();\n\t}", "@Override\n public void robotInit() {\n robot = RobotSoftware.getInstance();\n CameraServer.getInstance().startAutomaticCapture(0);\n CameraServer.getInstance().startAutomaticCapture(1);\n watcher = new Watcher(robot.leftDistanceStream.getWatchable(\"left dist\"),\n robot.rightDistanceStream.getWatchable(\"right dist\"));\n watcher.outputToDashboard();\n robot.runCompressor.set(false);\n teleop = new TeleopMain(robot);\n toggleCompressor = true;\n teleop.init();\n }", "protected void initialize() {\n \tSystem.out.println(\"initialize ReturnToStart\");\n \tRobot.claw.goRetract();\n \tRobot.claw.goUp();\n \tRobot.claw.goOpen();\n \tRobot.claw.spinStop();\n }", "protected void initialize() {\n \tRobot.gearIntake.setIsDown(true);\n }", "protected void initialize() {\r\n\r\n Robot.pneumatics.pneuOpen();\r\n }", "@Override\n\tpublic void robotInit() //starts once when the code is started\n\t{\n\t\tm_oi = new OI(); //further definition of OI\n\t\t\n\t\t// chooser.addObject(\"My Auto\", new MyAutoCommand());\n\t\t//SmartDashboard.putData(\"Auto mode\", m_chooser);\n\t\t\n\t\tnew Thread(() -> {\n\t\t\tUsbCamera camera1 = CameraServer.getInstance().startAutomaticCapture();\n\t\t\tcamera1.setResolution(640, 480);\n\t\t\tcamera1.setFPS(30);\n\t\t\tcamera1.setExposureAuto();\n\t\t\t\n\t\t\tCvSink cvSink = CameraServer.getInstance().getVideo();\n\t\t\tCvSource outputStream = CameraServer.getInstance().putVideo(\"Camera1\", 640, 480); \n\t\t\t//set up a new camera with this name in SmartDashboard (Veiw->Add->CameraServer Stream Viewer)\n\t\t\t\n\t\t\tMat source = new Mat();\n\t\t\tMat output = new Mat();\n\t\t\t\n\t\t\twhile(!Thread.interrupted())\n\t\t\t{\n\t\t\t\tcvSink.grabFrame(source);\n\t\t\t\tImgproc.cvtColor(source, output, Imgproc.COLOR_BGR2RGB);//this will show the video in black and white \n\t\t\t\toutputStream.putFrame(output);\n\t\t\t}\t\t\t\t\t\n\t\t}).start();//definition of camera, runs even when disabled\n\t\t\n\t\tdriveStick = new Joystick(0); //further definition of joystick\n\t\tgyroRotate.gyroInit(); //initializing the gyro - in Rotate_Subsystem\n\t\tultrasonic = new Ultrasonic_Sensor(); //further definition of ultrasonic\n\t\tRobotMap.encoderLeft.reset();\n\t\tRobotMap.encoderRight.reset();\n\t\tdriveToDistance.controllerInit();\n\t}", "public void robotInit() {\n // Initialize all subsystems\n CommandBase.init();\n \n SmartDashboard.putNumber(RobotMap.Autonomous.MODE_KEY, 0);\n \n //temperary method to test door closing speeds\n SmartDashboard.putNumber(RobotMap.Force.DOOR_FORCE_KEY, 50);\n }", "protected void initialize()\n {\n // Set the pid up for driving straight\n Robot.drivetrain.getAngleGyroController().setPID(Constants.DrivetrainAngleGyroControllerP, Constants.DrivetrainAngleGyroControllerI, Constants.DrivetrainAngleGyroControllerD);\n //Robot.drivetrain.resetGyro();\n if (setpointSpecified == true)\n {\n Robot.drivetrain.getAngleGyroController().setSetpoint(Robot.initialGyroAngle); \n }\n else\n {\n Robot.drivetrain.getAngleGyroController().setSetpoint(Robot.drivetrain.getGyroValue());\n }\n Robot.drivetrain.setDirection(driveDirection);\n Robot.drivetrain.setMagnitude(drivePower);\n Robot.drivetrain.getAngleGyroController().enable();\n timer.reset();\n timer.start();\n }", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n //ColorSensor colorSensor;\n //colorSensor = hardwareMap.get(ColorSensor.class, \"Sensor_Color\");\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n //starts the dual cameras\n CameraServer.getInstance().startAutomaticCapture(0);\n CameraServer.getInstance().startAutomaticCapture(1);\n //auto start (disabled atm)\n //pressBoy.setClosedLoopControl(true);\n pressBoy.setClosedLoopControl(false);\n \n \n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n \n //Initialize Drive Train Motors/\n LeftFront = new WPI_TalonSRX(11);\n RightFront = new WPI_TalonSRX(13);\n LeftBack = new WPI_TalonSRX(10);\n RightBack = new WPI_TalonSRX(12);\n RobotDT = new MecanumDrive(LeftFront, LeftBack, RightFront, RightBack);\n \n //Initialize Xbox Controller or Joystick/\n xcontroller1 = new XboxController(0);\n xcontroller2 = new XboxController(1);\n \n //Initialize Cameras/\n RoboCam = CameraServer.getInstance();\n FrontCamera = RoboCam.startAutomaticCapture(0);\n BackCamera = RoboCam.startAutomaticCapture(1);\n\n //GPM Init/\n mGPM = new GPM();\n \n }", "@Override\n public void initialize() {\n //m_camera.setDriverMode(true);\n //m_camera.setLED(LEDMode.kOn);\n RobotContainer.m_Drive.auto = true;\n RobotContainer.m_Drive.setLightMode(3);\n }", "public void robotInit() {\n\t\trightFront = new CANTalon(1);\n\t\tleftFront = new CANTalon(3);\n\t\trightBack = new CANTalon(2);\n\t\tleftBack = new CANTalon(4);\n\t\t\n\t\trightBack.changeControlMode(CANTalon.TalonControlMode.Follower);\n\t\tleftBack.changeControlMode(CANTalon.TalonControlMode.Follower);\n\t\t\n\t\tleftBack.set(leftFront.getDeviceID());\n\t\trightBack.set(rightFront.getDeviceID());\n\t\t\n\t\tturn = new Joystick(0);\n\t\tthrottle = new Joystick(1);\n\t}", "@Override\n\tpublic void robotInit() {\n\t\tdrive = new Drive();\n\t\tintake = new Intake();\n\t\tshooter = new Shooter();\n\t\taimShooter = new AimShooter();\n\t\tvision = new Vision();\n\t\tintakeRoller = new IntakeRoller();\n\t\taManipulators = new AManipulators();\n\t\tshooterLock = new ShooterLock();\n\n\t\t// autochooser\n\t\t// autoChooser = new SendableChooser();\n\n\t\toi = new OI();\n\t\t// instantiate the command used for the autonomous period\n\t\tlowGearCommand = new LowGear();\n\n\t\t// auto chooser commands\n\t\t// autoChooser.addDefault(\"FarLeftAuto\", new FarLeftAuto());\n\t\t// autoChooser.addObject(\"MidLeftAuto\", new MidLeftAuto());\n\t\t// autoChooser.addObject(\"MidAuto\", new MidAuto());\n\t\t// autoChooser.addObject(\"MidRightAuto\", new MidRightAuto());\n\t\t// autoChooser.addObject(\"FarRightAuto\", new FarRightAuto());\n\t\t// autoChooser.addObject(\"Uber Auto\", new UberAuto());\n\t\t// autoChooser.addObject(\"Paper Weight\", new PaperWeightAuto());\n\t\t//\n\t\t// SmartDashboard.putData(\"Autonomous\", autoChooser);\n\n\t\t// autonomousCommand = (Command) autoChooser.getSelected();\n\t\tautonomousCommand = new FarLeftAuto();\n\t\t// autonomousCommand = new MidAuto();\n\t\t// CameraServer.getInstance().startAutomaticCapture(\"cam3\");\n\t\t// autonomousCommand = new FarLeftAuto\n\n\t\tpovUpTrigger.whenActive(new MoveActuatorsUp());\n\t\tpovDownTrigger.whenActive(new MoveActuatorsDown());\n\t}", "@Override\r\n public void robotInit() {\r\n // Instantiate our RobotContainer. This will perform all our button bindings\r\n robotContainer = new RobotContainer();\r\n }", "protected void initialize() {\n timeStarted = timeSinceInitialized();\n RobotMap.shootState=true;\n this.setTimeout(2.0);\n }", "@Override\n public void robotInit() {\n // Hardware.getInstance().init();\n hardware.init();\n\n controllerMap = ControllerMap.getInstance();\n controllerMap.controllerMapInit();\n\n controllerMap.intake.IntakeInit();\n\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n\n intakeCam = CameraServer.getInstance().startAutomaticCapture(\"Driver Camera :)\", 0);\n intakeCam.setPixelFormat(PixelFormat.kMJPEG);\n intakeCam.setResolution(160, 120);\n intakeCam.setFPS(15);\n // climberCam = CameraServer.getInstance().startAutomaticCapture(1);\n\n }", "protected void initialize() {\n \tRobot.driveTrain.driveMotionMagic(distanceToTravel);\n }", "protected void initialize() {\n \tRobot.driveBase.stopDead();\n \tRobot.driveBase.resetDriveSensors();\n }", "protected void initialize() {\n \ttime.start();\n \tRobot.camera.setExposureManual(20);\n \tzach();\n\t\tSystem.out.println(\"josh\");\n\t\t\n }", "protected void initialize() {\n \tRobot.telemetry.setAutonomousStatus(\"Starting \" + commandName + \": \" + distance);\n \tRobot.drivetrain.resetEncoder();\n \t\n \tRobot.driveDistancePID.setSetpoint(distance);\n \tRobot.driveDistancePID.setRawTolerance(RobotPreferences.drivetrainTolerance());\n \tRobot.driveDistancePID.enable();\n \t\n \texpireTime = timeSinceInitialized() + (RobotPreferences.timeOut());\n }", "public void robotInit() {\n\t\toi = new OI();\n chooser = new SendableChooser();\n chooser.addDefault(\"Default Auto\", new ExampleCommand());\n// chooser.addObject(\"My Auto\", new MyfAutoCommand());\n SmartDashboard.putData(\"Auto mode\", chooser);\n \n //Drive\n //this.DriveTrain = new DriveTrain();\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickLeft);\n \n //Buttons\n // oi.button1.whenPressed(new SetMaxMotorOutput());\n \n //Ultrasonic\n sonic1 = new Ultrasonic(0,1);\n sonic1.setAutomaticMode(true);\n \n }", "protected void initialize() {\n \tSystem.out.println(\"HoldGear STARTING!!\");\n }", "@Override\n public void init() {\n robot.init(hardwareMap, telemetry, false);\n //robot.resetServo();\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"Status\", \"Initialized\");\n // robot.FL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.FR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BL.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // robot.BR.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }", "protected void initialize() {\n\t\tthis.oi = Robot.getInstance().getOI();\n\n }", "public void robotInit() {\r\n\t\t// Create and start the compressor. It will control pressure automagically\r\n\t\tCompressor comp = new Compressor(RobotMap.pneumaticPreasureSwitch, RobotMap.compresserRelay);\r\n\t\tcomp.start();\r\n\r\n\t\t// instantiate the command used for the autonomous period\r\n\t\tautonomousCommand = new Autonomous();\r\n\r\n\t\t// Initialize all subsystems\r\n\t\tCommandBase.init();\r\n\t}", "@Override\n\tpublic void robotInit() {\n\t\tleftDriveBack = new VictorSP(0); // PWM Port, madke sure this is set correctly.\n\t\tleftDriveFront = new VictorSP(1);\n\t\t\n\t\trightDriveFront = new VictorSP(2);\n\t\trightDriveBack = new VictorSP(3);\n\t\t\n\t\tleftIntake = new Spark(5);\n\t\trightIntake = new Spark(6);\n\t\t\n\t\tarmMotor = new TalonSRX(10);\n\t\tarmMotor.setNeutralMode(NeutralMode.Brake);\n\t\tarmMotor.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Absolute, 0, 0);\n\t\tarmMotor.configPeakCurrentLimit(30, 0);\n\t\tarmMotor.configPeakCurrentDuration(250, 0);\n\t\tarmMotor.configContinuousCurrentLimit(20, 0);\n\t\tarmMotor.configClosedloopRamp(0.25, 0);\n\t\tarmMotor.configOpenloopRamp(0.375, 0);\n\t\tarmMotor.enableCurrentLimit(true);\n\t\t\n\t\tarmMotor.configPeakOutputForward(1.0, 0);\n\t\tarmMotor.configPeakOutputReverse(-1.0, 0);\n\t\t\n\t\tarmMotor.config_kP(0, 0.0, 0);\n\t\t\n\t\tarmSetpoint = armMotor.getSelectedSensorPosition(0);\n\t\t\n\t\tstick = new Joystick(0);\n\t\tstickReversed = false;\n\t\txbox = new XboxController(1); // USB port, set in driverstation.\n\t\t\n\t\tdriveCamera = CameraServer.getInstance().startAutomaticCapture(0);\n\t}", "@Override\n public void robotInit() {\n m_robotContainer = new RobotContainer();\n // Initiate the limelight network table\n NetworkTable table = NetworkTableInstance.getDefault().getTable(\"limelight\");\n tx = table.getEntry(\"tx\");\n ty = table.getEntry(\"ty\");\n ta = table.getEntry(\"ta\");\n RobotContainer.turretSub.tsrxTurret.setSelectedSensorPosition(0);\n }", "@Override\n\tpublic void robotInit() {\n\t\tprefs = Preferences.getInstance();\n\t\tDEBUG = prefs.getBoolean(\"DEBUG\", false);\n\t\t\n\t\tinitCamera(\"Primary Camera\", 0);\n\t\tinitCamera(\"Secondary Camera\", 1);\n\t\t\n\t\tRobotMap.robotDriveMain = new DifferentialDrive(RobotMap.leftDrive, RobotMap.rightDrive);\n\t\t\n\t\tautoChooser.setDefaultOption(\"Left\", \"left\");\n\t\tautoChooser.addOption(\"Middle\", \"middle\");\n\t\tautoChooser.addOption(\"Right\", \"right\");\n\t\t\n\t\tSmartDashboard.putData(\"Auto Mode:\", autoChooser);\n\t}", "public void robotInit() {\r\n\r\n shootstate = down;\r\n try {\r\n Components.shootermotorleft.setX(0);\r\n Components.shootermotorleft2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n try {\r\n Components.shootermotorright.setX(0);\r\n Components.shootermotorright2.setX(0);\r\n } catch (CANTimeoutException ex) {\r\n ex.printStackTrace();\r\n }\r\n initialpot = Components.ShooterPot.getAverageVoltage();\r\n //shootpotdown +=initialpot;\r\n //shootpotlow+= initialpot;\r\n //shootpotmiddle+= initialpot;\r\n //shootpothigh+=initialpot;\r\n\r\n }", "protected void initialize() {\n\t\tRobot.motor.getPIDController().setPID(SmartDashboard.getDouble(\"MotorP\"), SmartDashboard.getDouble(\"MotorI\"), SmartDashboard.getDouble(\"MotorD\"));\n\t\tRobot.motor.setOutputRange(0, 1);\n\t\tRobot.motor.setSetpoint(SmartDashboard.getDouble(\"MotorSpeed\"));\n \tRobot.motor.enable();\n }", "@Override\n public void robotInit() {\n SmartDashboard.putBoolean(\"CLIMB\", false);\n SmartDashboard.putNumber(\"servo\", 0);\n // Instantiate our RobotContainer. This will perform all our button bindings, and put our\n // autonomous chooser on the dashboard.\n m_robotContainer = new RobotContainer();\n //coast.\n if (RobotMap.DRIVE_TRAIN_DRAGON_FLY_IS_AVAILABLE)\n getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(false, RobotMap.DRIVE_TRAIN_MIDDLE_WHEEL_PORT);\n\n getRobotContainer().configureButtonBindings();\n getRobotContainer().getTecbotSensors().initializeAllSensors();\n getRobotContainer().getTecbotSensors().getTecbotGyro().reset();\n\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_MIDDLE_WHEEL_PORT);\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_LEFT_CHASSIS_PORTS);\n Robot.getRobotContainer().getDriveTrain().setCANSparkMaxMotorsState(true, RobotMap.DRIVE_TRAIN_RIGHT_CHASSIS_PORTS);\n\n UsbCamera camera = CameraServer.getInstance().startAutomaticCapture();\n camera.setResolution(640, 480);\n\n m_chooser.addOption(\"Move 3 m\", new SpeedReductionStraight(3, .75, 0));\n m_chooser.addOption(\"Rotate 90 degrees\", new SpeedReductionTurn(90, .5));\n m_chooser.setDefaultOption(\"El chido\", new DR01D3K4());\n m_chooser.addOption(\"Collect, go back and shoot\", new CollectPowerCellsGoBackShoot());\n m_chooser.addOption(\"Transport\", new SequentialCommandGroup(new FrontIntakeSetRaw(.75),\n new TransportationSystemSetRaw(.5)));\n m_chooser.addOption(\"Shoot 3PCs n' Move\", new SHOOT_3_PCs_N_MOVE());\n SmartDashboard.putData(\"Auto Mode\", m_chooser);\n\n //camera.setExposureManual(79);\n\n\n }", "@Override\n\tpublic void robotInit() {\n\t\tm_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n\t\tm_chooser.addOption(\"My Auto\", kCustomAuto);\n\t\tSmartDashboard.putData(\"Auto choices\", m_chooser);\n\n\t\tJoy = new Joystick(0);\n\t\ts1 = new DoubleSolenoid(1, 0);\n\t\ts2 = new DoubleSolenoid(2, 3);\n\t\tairCompressor = new Compressor();\n\t\ttriggerValue = false;\n\t\ts1Value = false;\n\t}", "@Override\n public void init() {\n /* Initialize the hardware variables.\n * The init() method of the hardware class does all the work here\n */\n robot.init(hardwareMap);\n\n robot.leftDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n // Possibly add a delay\n robot.leftDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n robot.rightDriveMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "protected void initialize() {\n \tRobot.chassisSubsystem.setShootingMotors(0);\n }", "@Override\n protected void initialize() {\n if (Robot.useDrive) {\n joy = Robot.oi.getJoystick();\n }\n Robot.drive.setBrakeMode();\n\n }", "@Override\n public void init() {\n swerveDebug(500, \"SwerveAutoTEST::init\", \"STARTing init for TETS\");\n\n // Run initialization of other parts of the class\n // Note that the class will connect to all of our motors and servos\n super.init();\n\n crater = Boolean.TRUE;\n\n\n // Robot and autonomous settings are read in from files in the core class init()\n // Report the autonomous settings\n showAutonomousGoals();\n\n swerveLog( \"X S6\", ourSwerve.getOrientLog());\n\n swerveDebug(500, \"SwerveAutoTEST::init\", \"DONE\");\n }", "protected void initialize ()\n\t{\n\t\tSubsystems.goalVision.processNewImage();\n\t\t\n \t//Send positive values to go forwards.\n \tSubsystems.transmission.setLeftJoystickReversed(true);\n \tSubsystems.transmission.setRightJoystickReversed(true);\n\t}", "public void robotInit() {\n chooser = new SendableChooser();\n chooser.addDefault(\"Default Auto\", defaultAuto);\n chooser.addObject(\"My Auto\", customAuto);\n SmartDashboard.putData(\"Auto choices\", chooser);\n\n initialize();\n }", "@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized Interative TeleOp Mode\");\n telemetry.update();\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n leftDrive = hardwareMap.dcMotor.get(\"leftDrive\");\n rightDrive = hardwareMap.dcMotor.get(\"rightDrive\");\n armMotor = hardwareMap.dcMotor.get(\"armMotor\");\n\n leftGrab = hardwareMap.servo.get(\"leftGrab\");\n rightGrab = hardwareMap.servo.get(\"rightGrab\");\n colorArm = hardwareMap.servo.get(\"colorArm\");\n leftTop = hardwareMap.servo.get(\"leftTop\");\n rightTop = hardwareMap.servo.get(\"rightTop\");\n\n /*\n left and right drive = motion of robot\n armMotor = motion of arm (lifting the grippers)\n extendingArm = motion of slider (used for dropping the fake person)\n left and right grab = grippers to get the blocks\n */\n\n }", "public void autonomousInit() {\n \n }", "@Override\n\tpublic void robotInit() {\n\t\tm_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n\t\tm_chooser.addOption(\"My Auto\", kCustomAuto);\n\t\tSmartDashboard.putData(\"Auto choices\", m_chooser);\n\n\t\tm_frontRight = new PWMVictorSPX(0);\n\t\tm_frontLeft = new PWMVictorSPX(2);\n\t\tm_backRight = new PWMVictorSPX(1);\n\t\tm_backLeft = new PWMVictorSPX(3);\n\n\t\tx_aligning = false;\n\n\t\tJoy = new Joystick(0);\n\t\tmyTimer = new Timer();\n\n\t\tfinal SpeedControllerGroup m_left = new SpeedControllerGroup(m_frontLeft, m_backLeft);\n\t\tfinal SpeedControllerGroup m_right = new SpeedControllerGroup(m_frontRight, m_backRight);\n\n\t\tm_drive = new DifferentialDrive(m_left, m_right);\n\n\t\tdistanceToTarget = 0;\n\n\t\tcounter = new Counter(9);\n\t\tcounter.setMaxPeriod(10.0);\n\t\tcounter.setSemiPeriodMode(true);\n\t\tcounter.reset();\n\t}", "public void initialize() {\n\n Robot.driveSubsystem.resetGyro();\n\n }", "protected void initialize() {\n \tclaw = Robot.getClaw();\n\n \tclaw.open();\n }", "protected void initialize() {\n finished = false;\n Robot.shooter.Spin();//Spin up wheels\n Timer.delay(3);\n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n \n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n \n Robot.shooter.TriggerExtend();//Reset Trigger\n Timer.delay(.2);\n Robot.shooter.FeederExtend();//Drop Frisbee\n Timer.delay(1.5);\n Robot.shooter.TriggerRetract();//Fire frisbee\n Timer.delay(.2);\n Robot.shooter.FeederRetract();//Reset Feeder\n Timer.delay(.4);\n //Robot.shooter.Stop();\n Robot.shooter.TriggerExtend();//Reset Trigger\n \n Robot.driveTrain.DriveBack();//Drives backwards from pyramid\n Timer.delay(1.5);\n Robot.driveTrain.TurnAround();//Turns Bob around\n Timer.delay(1);\n Robot.driveTrain.Stop();//Stops Bob\n \n Robot.pneumatics.CompressorOn();//Turns compressor on\n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n leftFrontMotor = new CANSparkMax(10, MotorType.kBrushless);\n leftBackMotor = new CANSparkMax(11, MotorType.kBrushless);\n rightFrontMotor = new CANSparkMax(12, MotorType.kBrushless);\n rightBackMotor = new CANSparkMax(13, MotorType.kBrushless);\n leftFrontMotor.setIdleMode(IdleMode.kCoast);\n leftBackMotor.setIdleMode(IdleMode.kCoast);\n rightFrontMotor.setIdleMode(IdleMode.kCoast);\n rightBackMotor.setIdleMode(IdleMode.kCoast);\n gyro = new ADXRS450_Gyro();\n gyro.calibrate();\n stick = new Joystick(1);\n controller = new XboxController(0);\n origGyro = 0;\n }", "protected void initialize() {\n \tRobot.driveTrain.arcade(MOVE_SPEED_PERCENT, Robot.driveTrain.gyroPReturn(direction));\n }", "@Override\n protected void initialize() {\n //Robot.limelight.setLiveStream(0);\n Robot.limelight.setLEDMode(3);\n }", "protected void initialize() {\r\n Robot.driveTrain.resetRangefinder();\r\n }", "protected void initialize() {\n \tRobot.intake.runIntake(this.m_speed, this.m_speed);\n }", "@Override\n protected void initialize() {\n headingPID.enable();\n headingPID.resetPID();\n Robot.driveBase.enableDriveBase();\n ahrs.reset();\n }", "@Override\n public void init() {\n \n \n rightFront = hardwareMap.dcMotor.get(\"frontR\");\n rightBack = hardwareMap.dcMotor.get(\"backR\");\n \n \n \n rightFront.setDirection(DcMotor.Direction.FORWARD); \n rightBack.setDirection(DcMotor.Direction.FORWARD);\n \n \n \n\n // Send telemetry message to signify robot waiting;\n telemetry.addData(\"Say\", \"Hello Driver\"); //\n }", "protected void initialize() {\n \tRobot.io.bottomGyro.reset();\n \tRobot.io.topGyro.reset();\n \tpid.reset();\n \tpid.setSetpoint(rotAngle);\n \tpid.enable();\n }", "@Override\n\tpublic void robotInit() {\n\t\tSmartDashboard.putData(new TestLIDARCommand());\n\n\t\tdriveSubsystem = new DriveSubsystem();\n\t\tshooterSubsystem = new ShooterSubsystem();\n\t\tfeederSubsystem = new FeederSubsystem();\n\t\tintakeSubsystem = new IntakeSubsystem();\n\t\tgearSubsystem = new GearSubsystem();\n\t\tclimberSubsystem = new ClimberSubsystem();\n\t\tcameraSubsystem = new CameraSubsystem();\n\n\t\tnavigator = new Navigator();\n\t\toi = new OI();\n\n\t\tm_chooser = new SendableChooser<>();\n\t\tm_chooser.addDefault(\"Do Nothing\", new PistonReleaseCommand());\n\t\t//m_chooser.addObject(\"Boiler Auto (side hopper)\", new SelectBoilerAutoCommand());\n\t\tm_chooser.addObject(\"Boiler Auto (front hopper)\", new SelectBoilerAutoFrontCommand());\n\t\tm_chooser.addObject(\"Test drive straight\", new MeasureDistanceCommand(1500, 100000));\n\t\tm_chooser.addObject(\"Test max speed\", new TimedDriveCommand(5.0, 1.00));\n\t\tm_chooser.addObject(\"Gear Auto (boiler)\", new SelectGearBoilerCommand());\n\t\tm_chooser.addObject(\"Gear Auto (feeder)\", new SelectGearFeederCommand());\n\t\tm_chooser.addObject(\"Gear Auto (middle)\", new SelectGearMiddleAutoCommand());\n\t\tSmartDashboard.putData(\"Auto mode\", m_chooser);\n\n\t\tRobot.navigator.startMeasuringDistance();\n\t}", "protected void initialize() {\n \tRobot.conveyor.stop();\n }", "public void autonomousInit() {\n }", "public void autonomousInit() {\n }", "public void autonomousInit() {\n\t\t\n\t}", "protected void initialize() {\n \tRobot.driveBase.resetEnc(2);\n \tRobot.gyro.reset();\n \t//stop extraneous moving parts\n }", "protected void initialize() {\n \t\n \n \t\n \tRobotMap.motorLeftTwo.setSelectedSensorPosition(0,0,0);\n\t\tRobotMap.motorRightTwo.setSelectedSensorPosition(0,0,0);\n \t\n \torientation.setSetPoint(desiredAngle);\n \tstartTime = Timer.getFPGATimestamp();\n }", "@Override\r\n protected void initialize() {\r\n // initialize for computing deltaT\r\n mPreviousTime = System.currentTimeMillis(); \r\n // the controllers don't use position data\r\n // but they do need Yaw Data, which can come from\r\n // either the IMU or the Position Tracker. We\r\n // initialize both so we can change our minds\r\n // in the drivetrain code later on, depending\r\n // upon the relative performance of the two approaches.\r\n Robot.drivetrain.resetGyro();\r\n \tRobot.drivetrain.resetEncodersAndStats(); \r\n \tRobot.drivetrain.resetPosition(true);\r\n \tRobot.drivetrain.setInitialOrientationDegCCW(mStartOrientationDegCCW); \r\n double dist = Robot.visionSubSys.getDistFt() ;\r\n double bearing = Robot.visionSubSys.getBearingDegCW() ;\r\n double orient = Robot.drivetrain.getOrientDegCCW() ; \t\r\n mDistController.start(dist,bearing);\r\n mBearingController.start(dist,bearing,orient);\r\n \r\n Robot.logger.appendLog(\"CmdDualPidFollowVision Init\");\r\n \tRobot.drivetrain.setLoggingOn();\r\n }", "protected void initialize() {\n\t\tRobot._driveTrain.setAuton(true);\n\t\tRobot._driveTrain.clearEncoder();\n\t\tRobot._driveTrain.clearGyro();\n\t\tdistanceToCenter = SmartDashboard.getNumber(\"toteOffset\", 0);\n\t\tif (Robot._pneumatics.getArms() != DoubleSolenoid.Value.kReverse) {\n\t\t\tRobot._pneumatics.setArms(DoubleSolenoid.Value.kReverse);\n\t\t}\n\t}", "@Override\n\tpublic void robotInit() {\n\t\tfr = new Spark(HardwareMap.PWM.DRIVE_FR);\n\t\tfl = new Spark(HardwareMap.PWM.DRIVE_FL);\n\t\tbr = new Spark(HardwareMap.PWM.DRIVE_BR);\n\t\tbl = new Spark(HardwareMap.PWM.DRIVE_BL);\n\t\t\n\t\t// Create the side modules\n\t\tleftGroup = new SpeedControllerGroup(bl, fl);\n\t\trightGroup = new SpeedControllerGroup(br, fr);\n\n\t\t// Init the the drive train\n\t\tdrive = new DifferentialDrive(leftGroup, rightGroup);\n\t\t\n\t\t//Init the gyro\n\t\tgyro.calibrate();\n\t\tSmartDashboard.putData(\"Gyro\", gyro);\n\t\t\n\t\tdrive.setSafetyEnabled(false);\n\t\tthis.setName(Subsystems.DRIVE);\n\t}", "private void initializeStartup()\n {\n /* Turn off Limelight LED when first started up so it doesn't blind drive team. */\n m_limelight.turnOffLED();\n\n /* Start ultrasonics. */\n m_chamber.startUltrasonics();\n }" ]
[ "0.839473", "0.839473", "0.839473", "0.83569306", "0.83569306", "0.8253535", "0.82380736", "0.8115756", "0.810394", "0.80705786", "0.80482066", "0.804801", "0.8016067", "0.7977181", "0.79750395", "0.79709494", "0.7919968", "0.78940165", "0.78804433", "0.78703946", "0.78519857", "0.78497803", "0.7835548", "0.7810563", "0.7799179", "0.7750678", "0.7740944", "0.7735772", "0.7733181", "0.7731142", "0.7730233", "0.77244043", "0.77115273", "0.7693446", "0.7692744", "0.7686633", "0.76774573", "0.7662983", "0.7653666", "0.7624968", "0.7622213", "0.7607192", "0.76033443", "0.7592041", "0.75903034", "0.75864017", "0.75861734", "0.7582566", "0.7577748", "0.7574403", "0.7574312", "0.75625706", "0.755383", "0.75513923", "0.75424963", "0.7542203", "0.75311095", "0.7530104", "0.7527037", "0.751514", "0.75114024", "0.75046855", "0.7498356", "0.7496331", "0.74837786", "0.74718684", "0.7449258", "0.74492323", "0.7441572", "0.7433529", "0.7430502", "0.7427858", "0.74205667", "0.74203664", "0.7415123", "0.7394611", "0.7393577", "0.73860633", "0.7356684", "0.735661", "0.73454934", "0.7345106", "0.734393", "0.73421353", "0.73350054", "0.7332536", "0.7319974", "0.7317872", "0.73132277", "0.73086375", "0.730638", "0.72998965", "0.72998965", "0.7296949", "0.7296802", "0.72937185", "0.7293332", "0.7272543", "0.72385323", "0.72383136" ]
0.7535201
56
This function is called when the disabled button is hit. You can use it to reset subsystems before shutting down.
public void disabledInit() { vision.disableCameraSaving(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onDisable() {\n super.onDisable();\n running = false;\n }", "public void onDisable() {\r\n }", "@Override\n public void onDisabled() {\n }", "@Override\r\n\tpublic void disable() {\n\t\tcurrentState.disable();\r\n\t}", "@Override\n public void onDisable() {\n }", "public void disable()\r\n\t{\r\n\t\tenabled = false;\r\n\t}", "@Override\n\tpublic void onDisable() {\n\t\t\n\t}", "public void onDisable() {\n }", "public void onDisable() {\n }", "@Override\r\n\tpublic void onDisable() {\n\t}", "public void disable ( ) {\r\n\t\tenabled = false;\r\n\t}", "protected void onDisabled() {\n // Do nothing.\n }", "public abstract void onDisable();", "public void onDisable()\n {\n }", "protected abstract void disable();", "public void disable() {\n operating = false;\n }", "public void onDisable() {\n }", "@Override\n\tpublic void onDisable() {\n\n\t}", "void disableMod();", "void disable() {\n }", "public abstract void wgb_onDisable();", "default void onDisable() {}", "public void disable() {\n \t\t\tsetEnabled(false);\n \t\t}", "public void onDisable()\n\t{\n\t\t//Tells the user that the plugin is shutting down.\n\t\tlog.info(\"Shut down.\");\n\t}", "@Override\n public void disabledInit() {\n //Diagnostics.writeString(\"State\", \"DISABLED\");\n }", "void disable();", "void disable();", "public void disable(){\n if(criticalStop) return;\n getModel().setStatus(false);\n }", "public void disable();", "public void disable() {\n disabled = true;\n circuit.disable();\n updateSign(true);\n notifyChipDisabled();\n }", "public abstract void Disabled();", "public void disable(){\r\n\t\tthis.activ = false;\r\n\t}", "public void disable() {\r\n m_enabled = false;\r\n useOutput(0, 0);\r\n }", "@Override\n public void onDisable() {\n getLogger().info(\"Successfully disabled.\");\n }", "@Override\n public void onDisable()\n {\n if (this.schedulerManager.getScheduler() != null)\n {\n try\n {\n this.schedulerManager.getScheduler().shutdown();\n } catch (SchedulerException e)\n {\n e.printStackTrace();\n }\n }\n }", "protected void onHardReset() {\n\t\tonReset();\n\t}", "public void setDisabled() {\n\t\tdisabled = true;\n\t}", "public void disable() {\n\t\tm_enabled = false;\n\t\tuseOutput(0);\n\t}", "@Override\n public void disabledInit() {\n\t\tprocessRobotModeChange(RobotMode.DISABLED);\n }", "@Override\n public void onDisabled(Context context) {\n // Enter relevant functionality for when the last widget is disabled\n }", "@Override\n public void disabledInit() {\n\t// new SetElevator(0).start();\n\tif (autonomousCommand != null)\n\t autonomousCommand.cancel();\n\tScheduler.getInstance().removeAll();\n }", "private void disableButtons()\r\n {\r\n }", "@Override\n\tpublic void onEnable() {\n\t\tSystem.out.println(\"Modus: Forcedown\");\n\t\tArduinoInstruction.getInst().enable();\n\t\tArduinoInstruction.getInst().setControl((byte)0x40);\n\t}", "@Override\n public void onDisable() {\n \tgetLogger().info(\"onDisable has been invoked!\");\n }", "@Override\n public void onDisabled(Context context) {\n Log.d(TAG, \"onDisabled\");\n //Class clazz = WidgetBroadcastReceiver.class;\n\n PackageManager pm = context.getPackageManager();\n pm.setComponentEnabledSetting(new ComponentName(\"org.nilriri.LunarCalendar\", \".widget.BroadcastReceiver\"), PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);\n }", "public void powerdown() {\n monitor.sendPowerdown();\n }", "@Override\n\tpublic void onDisable() {\n\t\tArduinoInstruction.getInst().disable();\n\t}", "protected void ACTION_B_DISABLE(ActionEvent arg0) {\n\r\n\t\tL_FilterStatusBox.setText(\"Disabled (All Ports)\");\r\n\t}", "@Override\n\tpublic void powerOff() {\n\t\tSystem.out.println(\"samsongTV powerOff\");\n\n\t}", "protected void whileDisable()\n\t{\n\n\t}", "void outOfTime() {\r\n\r\n disableOptionButtons();\r\n }", "@Override\n\tpublic void onDisabled(Context context) \n\t{\n\t\tPackageManager pm = context.getPackageManager();\n\t\tpm.setComponentEnabledSetting(\n\t\t\t\tnew ComponentName(\"de.fhe\", \"MyAppWidgetProvider\"),\n\t\t\t\tPackageManager.COMPONENT_ENABLED_STATE_DISABLED, \n\t\t\t\tPackageManager.DONT_KILL_APP );\n\t}", "@Override\r\n\tpublic void powerOff() {\n\r\n\t\tSystem.out.println(\"ig tv power off\");\r\n\r\n\t}", "@Override\r\n\tpublic void power() {\n\t\tSystem.out.println(\"Power off\");\r\n\t\t\r\n\t}", "public void disableProductionButtons(){\n for(int i = 0; i < 3; i++){\n Gui.removeAllListeners(productionButtons[i]);\n productionButtons[i].addActionListener(new ActivateProductionListener(gui,productionButtons[i],i));\n productionButtons[i].setEnabled(false);\n }\n\n baseProductionPanel.disableButton();\n }", "@Override\n protected void end() {\n drive.setEnabled(false);\n drive.setLeftPower(0);\n drive.setRightPower(0);\n }", "@Override\n\tpublic void disabled(AbstractHardware<? extends AbstractHardwareListener> hardware) {\n\t}", "@Override\r\n public void onDisabled(Context context) {\n }", "@Override\r\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n super.onDisabled(context);\n }", "@Override\r\n public void onDisable() {\r\n log.info(\"[SeattleSummer] plugin disabled.\");\r\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisabled(Context context) {\n }", "@Override\n public void onDisable() {\n try {\n System.out.println(\"Cleaning Dynamic Server System Processes.\");\n for (MinigameServer minigameServer : dynamicServerSystemManager.getServers())\n minigameServer.deleteServer();\n\n // Clean the output directory.\n FileUtils.deleteDirectory(new File(\"../minigameservers\"));\n new File(\"../minigameservers\").mkdirs();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n plugin = null;\n }" ]
[ "0.70437306", "0.7026851", "0.6963357", "0.6960522", "0.693132", "0.6926641", "0.6925418", "0.69251835", "0.69251835", "0.69188166", "0.6918296", "0.6915518", "0.6901984", "0.6900656", "0.68888277", "0.687993", "0.687395", "0.68738306", "0.6833725", "0.68282366", "0.6788378", "0.6729852", "0.66633075", "0.6642029", "0.662876", "0.66254175", "0.66254175", "0.66176295", "0.6599058", "0.6597694", "0.6570241", "0.65501994", "0.6545493", "0.6541116", "0.6540693", "0.65178484", "0.6514549", "0.6512242", "0.648478", "0.6476517", "0.6467985", "0.64489657", "0.6435314", "0.6422227", "0.64159757", "0.64117134", "0.64045405", "0.6398877", "0.63837034", "0.63746613", "0.6345133", "0.6344769", "0.63241863", "0.6322554", "0.62979543", "0.62960917", "0.6294773", "0.62928", "0.62928", "0.6278797", "0.62783027", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6272528", "0.6259695" ]
0.0
-1
This function is called periodically during autonomous
public void autonomousPeriodic() { Scheduler.getInstance().run(); shooterArm.updateSmartDashboard(); driveTrain.getDegrees(); vision.findGoal(); vision.getGoalXAngleError(); vision.getGoalArmAngle(); // Stop auto mode if the robot is tilted too much if (Math.abs(driveTrain.getRobotPitch())<=60 && Math.abs(driveTrain.getRobotRoll())<=60) timerTilt.reset(); // For some reason, robot did not move in last match in auto, so this code is suspect // Do the Pitch/Roll values need to be zeroed? // if ( autonomousCommand != null && timerTilt.get()>0.5) // autonomousCommand.cancel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n \n }", "public void autonomousPeriodic()\r\n {\r\n \r\n }", "public void autonomousPeriodic() {\r\n }", "public void autonomousPeriodic() {\r\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n drive.updateAuto();\n sensor.updateAuto();\n }", "public void autonomousPeriodic() {\n \n }", "public void autonomousPeriodic() {\n \tauto.autonomousPeriodic();\n\t}", "public void autonomousPeriodic() {\n }", "public void autonomousPeriodic() {\n }", "public void autonomousPeriodic() {\n // RobotMap.helmsman.trackPosition();\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n\n }", "public void autonomousPeriodic() {\n\n }", "public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }", "public void autonomousPeriodic() {\r\n \r\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n //Scheduler.getInstance().run();\n }", "public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n public void autonomousPeriodic() {\n\t// updateDiagnostics();9\n\tScheduler.getInstance().run();\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = true;\n\t\tisTeleoperated = false;\n\t\tisEnabled = true;\n\t\tvisionNetworkTable.getGearData();\n\t\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\t\n\t\tupdateLedState();\n\t\t//visionNetworkTable.getHighData();\n\t}", "public void autonomousPeriodic() {\n if (m_apFirstRun) {\n System.out.println(\"Default autonomousPeriodic() method... Override me!\");\n m_apFirstRun = false;\n }\n }", "@Override\n public void autonomousPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "@Override\npublic void autonomousPeriodic() {\n\n}", "@Override\n public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic()\n {\n Scheduler.getInstance().run();\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\t\n\t}", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tif (state == \"auton\") {\n\t\t\tlastState = \"auton\";\n\t\t}\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Left encoder\", Actuators.getLeftDriveMotor().getEncPosition());\n\t\tSmartDashboard.putNumber(\"Right encoder\", Actuators.getRightDriveMotor().getEncPosition());\n\t\tSmartDashboard.putNumber(\"Left speed\", Actuators.getLeftDriveMotor().get());\n\t\tSmartDashboard.putNumber(\"Right speed\", Actuators.getRightDriveMotor().get());\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void autonomousPeriodic() //runs the autonomous mode, repeating every 20ms\n\t{\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n\t\tdriveExecutor.execute(); //running the execute() method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}", "@Override\n public void autonomousPeriodic()\n {\n commonPeriodic();\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void periodic() {\n UpdateDashboard();\n }", "public void autonomousPeriodic() {\n //Scheduler.getInstance().run();\n /** if(autoLoopCounter < 100) { //Checks to see if the counter has reached 100 yet\n myRobot.drive(-0.5, 0.0); //If the robot hasn't reached 100 packets yet, the robot is set to drive forward at half speed, the next line increments the counter by 1\n autoLoopCounter++;\n } else {\n myRobot.drive(0.0, 0.0); //If the robot has reached 100 packets, this line tells the robot to stop\n }*/\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}", "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "@Override\n public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n log();\n }", "@Override\n\tpublic void robotPeriodic() {\n\t}", "@Override\n\tpublic void robotPeriodic() {\n\t}", "public void teleopPeriodic() {\n\t\t// resetAndDisable();\n\t\tupdateDashboard();\n\t\tLogitechJoystick.controllers();\n\t\tDrivetrain.arcadeDrive();\n\t\tShooterAngleMotor.angleShooter();\n\t\tBallShooter.shootBalls();\n\t\tSonicSensor.updateSensors();\n\t\t\n\t\t//if(LogitechJoystick.rightBumper2)\n\t\t\t//{\n\t\t\t\t//LowBar.makeArmStable();\n\t\t\t//}\n\n\t}", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tlog();\n\t}", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void teleopPeriodic() {\n CommandScheduler.getInstance().run();\n OI.getInstance().getPilot().run();\n SmartDashboard.putNumber(\"gyro\", getRobotContainer().getTecbotSensors().getYaw());\n SmartDashboard.putBoolean(\"isSpeed\", getRobotContainer().getDriveTrain().getTransmissionMode() == DriveTrain.TransmissionMode.speed);\n SmartDashboard.putString(\"DT_MODE\", getRobotContainer().getDriveTrain().getCurrentDrivingMode().toString());\n SmartDashboard.putNumber(\"x_count\", getRobotContainer().getClimber().getxWhenPressedCount());\n\n }", "public void teleopPeriodic() {\n \t//getInstance().run();;\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickRight); //This line drives the robot using the values of the joystick and the motor controllers selected above\n \tScheduler.getInstance().run();\n\t\n }", "@Override\n public void autonomousPeriodic() {\n \n //Switch is used to switch the autonomous code to whatever was chosen\n // on your dashboard.\n //Make sure to add the options under m_chooser in robotInit.\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n if (m_timer.get() < 2.0){\n m_driveTrain.arcadeDrive(0.5, 0); //drive forward at half-speed\n } else {\n m_driveTrain.stopMotor(); //stops motors once 2 seconds have elapsed\n }\n break;\n }\n }", "@Override\n\tpublic void autonomousPeriodic() {\n\t\tSmartDashboard.putNumber(\"Left Speed\", Robot.driveSubsystem.getLeftSpeed());\n\t\tSmartDashboard.putNumber(\"Right Speed\", Robot.driveSubsystem.getRightSpeed());\n\n\t\tScheduler.getInstance().run();\n\t}", "public void updatePeriodic() {\r\n }", "public void autonomous() {\n /*myRobot.setSafetyEnabled(false);\n myRobot.drive(-0.5, 0.0);\t// drive forwards half speed\n Timer.delay(2.0);\t\t// for 2 seconds\n myRobot.drive(0.0, 0.0);\t// stop robot\n */\n \t/*gyro.reset();\n \twhile(isAutonomous()){\n \t\tdouble angle = gyro.getAngle();\n \tmyRobot.drive(0, -angle * Kp);\t\n \tTimer.delay(.004);\n \t}\n \tmyRobot.drive(0.0, 0.0);\n \t*/\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }" ]
[ "0.8242393", "0.8238804", "0.8235853", "0.8235853", "0.8235853", "0.820495", "0.8199907", "0.8194021", "0.8194021", "0.8177311", "0.8151588", "0.8147766", "0.81250346", "0.81250346", "0.80807847", "0.8016792", "0.8016792", "0.79744554", "0.79655135", "0.7948241", "0.7948241", "0.7948241", "0.7948241", "0.7948241", "0.7948241", "0.7943544", "0.79032373", "0.78828543", "0.77641433", "0.77600986", "0.77590984", "0.77569574", "0.7660986", "0.7649747", "0.76439685", "0.76273406", "0.7605097", "0.7603722", "0.758448", "0.75753826", "0.7555205", "0.7555205", "0.7555205", "0.7555205", "0.7537244", "0.75159377", "0.75070035", "0.75070035", "0.75070035", "0.75070035", "0.75070035", "0.75070035", "0.74829936", "0.7457939", "0.7456864", "0.74545246", "0.743304", "0.7385487", "0.7385487", "0.7343646", "0.7335342", "0.72733426", "0.72733426", "0.7264387", "0.72604746", "0.72574127", "0.72546506", "0.7238183", "0.722407", "0.7209448", "0.7209448", "0.7209448", "0.7209448", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939", "0.7169939" ]
0.7759355
30
This makes sure that the autonomous stops running when teleop starts running. If you want the autonomous to continue until interrupted by another command, remove this line or comment it out.
public void teleopInit() { if (autonomousCommand != null) autonomousCommand.cancel(); // if ((intake.intakeIsUp() || intake.intakeSolenoidIsOff()) && shooterArm.getAngle() > 45) { // raiseArm90.start(); // } shooterArm.setBrakeOff(); vision.enableCameraSaving(); vision.setCameraPeriod(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void teleopInit() {\n\t// This makes sure that the autonomous stops running when\n\t// teleop starts running. If you want the autonomous to\n\t// continue until interrupted by another command, remove\n\t// this line or comment it out.\n\tif (autonomousCommand != null) {\n\t autonomousCommand.cancel();\n\t}\n }", "public void teleopInit() {\n autonomousCommand.cancel();\n }", "@Override\n public void teleopInit()\n {\n if (autonomousCommand != null)\n {\n autonomousCommand.cancel();\n }\n }", "public void teleopInit() {\n\t\tautonomousCommand.cancel();\r\n\t}", "@Override\n public void teleopInit() {\n if (m_autonomousCommand != null) {\n m_autonomousCommand.cancel();\n }\n }", "@Override\n public void teleopInit() {\n if (autonomousCommand != null) \n {\n autonomousCommand.cancel();\n }\n\n new ArcadeDrive().start();\n\n new BackElevatorControl().start();\n\n new IntakeControl().start();\n\n new FrontElevatorManual().start();\n\n new ElevatorAutomatic().start();\n }", "public void teleopInit() {\n if (autonomousCommand != null) autonomousCommand.cancel();\n }", "public void teleopInit() {\n if (autonomousCommand != null) autonomousCommand.cancel();\n }", "@Override\n public void teleopInit() {\n if (autonomousCommand != null) autonomousCommand.cancel();\n \n\t\tprocessRobotModeChange(RobotMode.TELEOP);\n }", "public void autonomousPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\t\n shooterArm.updateSmartDashboard();\n\t\tdriveTrain.getDegrees();\n\n\t\tvision.findGoal();\n\t\tvision.getGoalXAngleError();\n\t\tvision.getGoalArmAngle();\n\n\t\t// Stop auto mode if the robot is tilted too much\n\t\tif (Math.abs(driveTrain.getRobotPitch())<=60 && Math.abs(driveTrain.getRobotRoll())<=60)\n\t\t\ttimerTilt.reset();\n\t\t\n\t\t// For some reason, robot did not move in last match in auto, so this code is suspect\n\t\t// Do the Pitch/Roll values need to be zeroed?\n//\t\tif ( autonomousCommand != null && timerTilt.get()>0.5)\n//\t\t\tautonomousCommand.cancel();\n\n\t}", "@Override\n\tpublic void teleopInit() //initialization of the teleoperated code\n\t{\n\t\tif (m_autonomousCommand != null) //if we have any autonomous code, end it\n\t\t{\n\t\t\tm_autonomousCommand.cancel();\n\t\t}\n\n\t}", "@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n // Elevator.getInstance().setPosition(10000, count);\n // System.out.println(\"COUNT IS: \" + count);\n // count += 0.0001;\n\n Scheduler.getInstance().run();\n\n // if(Math.abs(OI.getInstance().getForward()) > 0.2){\n // autonCommand.cancel();\n // mAutoCancelled = true;\n // }\n\n // if(mAutoCancelled){\n // if(mInitCalled){\n // teleopPeriodic();\n // }\n // }\n\n // System.out.println(Drivetrain.getInstance().getRobotPos().getHeading());\n\n // System.out.println(Drivetrain.getInstance().getLeftMaster().getClosedLoopError() + \"\\t\\t\\t\" + Drivetrain.getInstance().getRightMaster().getClosedLoopError());\n }", "public void autonomous() {\n /*myRobot.setSafetyEnabled(false);\n myRobot.drive(-0.5, 0.0);\t// drive forwards half speed\n Timer.delay(2.0);\t\t// for 2 seconds\n myRobot.drive(0.0, 0.0);\t// stop robot\n */\n \t/*gyro.reset();\n \twhile(isAutonomous()){\n \t\tdouble angle = gyro.getAngle();\n \tmyRobot.drive(0, -angle * Kp);\t\n \tTimer.delay(.004);\n \t}\n \tmyRobot.drive(0.0, 0.0);\n \t*/\n }", "public void teleopContinuous() {\n //feed the watchdog\n myDog.feed();\n\n //check safestop button\n /*safestop commented out\n if (joysticks.getRightButton(10))//Buttons on top of right stick stops robot\n {\n safeStop();\n //delay to allow driver to release button\n Timer.delay(.1);\n myDog.feed();\n //at this point driver should have released the butto\n while (!joysticks.getRightTop()) {\n myDog.feed();\n }\n //now the button is pressed again, indicating a restart- the program can continue\n\n //slight delay to allow driver to release the button before the next loop\n Timer.delay(.1);\n }\n */\n\n //if arm is in teleop mode, handles input accordingly\n if (armState == TELEOP) {\n handleArmInput();\n }\n\n //if arm is in auto mode, checks whether user is pressing button 1 to regain\n //control and stops the auto task if so\n\n /*\n arm never goes to auto mode, so this is commented out\n\n (armState == AUTO) {\n //if the driver is attempting to cancel the task OR the task is done, return control\n //to the driver\n if (armJoystick.getRawButton(7) || !armTask.isRunning()) {\n armTask.interrupt();\n armTask.stop();\n armState = TELEOP;\n }\n }\n */\n\n //if drive is in teleop mode, handles input accordingly\n if (driveState == TELEOP) {\n try {\n handleDriveInput();\n } catch (EnhancedIOException e) {\n }\n\n }\n\n //if drive is in auto mode, checks whether user is trying to regain control\n /*not used\n if (driveState == AUTO) {\n //if the driver is attempting to cancel the task OR the task is done, return control\n //to the driver\n if (joysticks.getLeftButton(1) || !driveTask.isRunning()) {\n driveTask.interrupt();\n driveTask.stop();\n driveState = TELEOP;\n }\n }\n */\n\n\n printToScreen(\"Gyro Angle: \" + arm.gyro.getAngle());\n printToScreen(\"Arm Angle: \" + arm.getArmAngle());\n }", "public void autonomousInit() {\n\t\tautonomousCommand.start();\r\n\t}", "@Override\n\tpublic void teleopInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tlowGearCommand.start();\n\t\tautonomousCommand.cancel();\n\t}", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }", "public void autonomousInit() {\n\t\tswitch (autoMode) {\r\n\t\tcase 0:\r\n\t\t\tauto = new G_NoAuto();\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tauto = new G_Step();\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tauto = new G_BlockThenFour();\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tauto = new G_BinTwoLeft();\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tauto = new G_StepBinCentre();\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tauto = new G_StepBinLeft();\t\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tauto = new G_Block();\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\t//Start the chosen Autonomous command. \r\n\t\tauto.start();\r\n\t\t//Cancel the tele-op command, in case it was running before autonomous began. \r\n\t\tteleop.cancel();\r\n\t\t// Start pushing sensor readings to the SD.\r\n\t\treadings.start();\r\n\r\n\t}", "@Override\n public void autonomousPeriodic() {\n teleopPeriodic();\n //Scheduler.getInstance().run();\n }", "public void teleopInit() {\n if (autonomousCommand != null) \n autonomousCommand.cancel();\n\n // RobotMap.enableUltrasonicTrigger(false);\n driveTrain.configForTeleopMode();\n }", "public void autonomous() {\n for (int i = 0; i < teleopControllers.size(); i++) {\n ((EventController) teleopControllers.elementAt(i)).disable();\n }\n for (int i = 0; i < autoControllers.size(); i++) {\n ((EventController) autoControllers.elementAt(i)).enable();\n }\n\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tif (state.equals(\"teleop\")) {\n\t\t\tlastState = \"teleop\";\n\t\t}\n\t\tstate = \"teleop\";\n\n\t\tif (lastState.equals(\"auton\")) {\n\t\t\tNetworkTables.getControlsTable().putBoolean(\"auton\", false);\n\t\t\t\n\t\t\t//Changes the control Mode back to PercentVbus\n\t\t\t//Should only run once - first interation of teleop\n\t\t\t//And ends auton if running\n\t\t\tif(autonomousCommand != null){\n\t\t\t\tautonomousCommand.cancel();\n\t\t\t}\n\t\t\tActuators.getLeftDriveMotor().changeControlMode(TalonControlMode.PercentVbus);\n\t\t\tActuators.getLeftDriveMotor().set(Constants.MOTOR_STOP);\n\t\t\tActuators.getRightDriveMotor().changeControlMode(TalonControlMode.PercentVbus);\n\t\t\tActuators.getRightDriveMotor().set(Constants.MOTOR_STOP);\n\t\t}\n\n//\t\tNetworkTables.putStream(Gamepad.primary.getX() || Gamepad.secondary.getX());\n\t\t/*\n\t\t * Primary Controllers Controls\n\t\t */\n\t\t// TODO: confirm right trigger forward, left trigger reverse\n\t\t// Drive controls\n\t\tDrive.drive(-Gamepad.primary.getLeftX(), Gamepad.primary.getTriggers()); \n\t\tDrive.shift(Gamepad.primary.getA(), Gamepad.primary.getY()); // shifting with A low gear and Y high gear\n\t\tDrive.shiftToggle(Gamepad.primary.getLB());\n\t\tDrive.crab(Gamepad.primary.getDPadLeft(), Gamepad.primary.getDPadRight());\n\t\t\n//\t\tif (Gamepad.primary.getDPadLeft()){\n//\t\t\tDrive.goingLeft = true;\n//\t\t\tDrive.crab();\t\t\n//\t\t}else if( Gamepad.primary.getDPadRight()){\n//\t\t\tDrive.goingLeft = false;\n//\t\t\tDrive.crab();\t\t\t\n//\t\t}else if (Drive.crabState > 0){\n//\t\t\tDrive.crab();\n//\t\t}\n\n\t\t\n\t\t// Climb controls\n\t\tClimb.climbStopPrimary(Gamepad.primary.getDPadUp()); // runs climbStop using left on the DPad - Primary\n\t\t// Climb.climbSafetyTogglePrimary(Gamepad.primary.getBack()); //toggles safety if pressed 3 times\n\n\t\t// Gear controls\n\t\tScore.dispenseGear(Gamepad.primary.getB() || Gamepad.secondary.getDPadUp());\n\n\t\t/*\n\t\t * Secondary Controllers Controls\n\t\t */\n\t\t// Intake controls\n\t\tIntake.intake(Gamepad.secondary.getRightButton()); // runs intake with clicking in the Right Joystick on second controller\n\t\tIntake.intakeSpeed(Gamepad.secondary.getRightY()); // Override Y Button\n\t\tIntake.intakeDirection(Gamepad.secondary.getRightX()); // Override Y Button\n\t\tIntake.intakeJam(Gamepad.secondary.getLB()); // Runs the unjamming procedure for a max of 3 seconds per press\n\t\t// Intake.intakeSafety(Gamepad.secondary.getStart()); //Have to press 3 times to toggle the safety\n\t\tIntake.intakeIn(Gamepad.secondary.getA(), Gamepad.secondary.getB(), Gamepad.secondary.getX()); // Toggles Intake running into the robot at full speed\n\t\tIntake.intakeRun(Gamepad.secondary.getRB()); // Runs all stuff for intake in(conveyor and intake motor)\n//\t\tIntake.intakeOut(Gamepad.secondary.getB());\n\t\t// Climb controls\n\t\tClimb.climbStopSecondary(Gamepad.secondary.getDPadRight()); // runs climbStop using left on the DPad - Secondary\n\t\tClimb.climbStartSecondary(Gamepad.secondary.getDPadLeft()); // runs climbStart using right on the DPad Secondary\n\t\tClimb.climbSafetyToggleSecondary(Gamepad.secondary.getBack()); // Have to press 3 times to toggle the safety\n\n\t\t// Gear controls\n\t\t// Score.gearLock(Gamepad.secondary.getStart(),\n\t\t// Gamepad.secondary.getBack());\n\n\t\t// Outtake Controls\n\t\t// Score.outtakeToggle(Gamepad.secondary.getLB());\n\n\t\t// Conveyor Controls\n\n\t\tScore.conveyor(Gamepad.secondary.getLeftButton()); // runs conveyor with clicking in the Left Joystick on second controller\n\t\tScore.conveyorSpeed(Gamepad.secondary.getLeftY());\n\t\tScore.conveyorDirection(Gamepad.secondary.getLeftX());\n\t\tScore.conveyorIn(Gamepad.secondary.getY());\n\n\t\t// Sweeper\n\t\t// Sweeper.sweeperMotion(Gamepad.secondary.getTriggers());\n\n\t\tDash.driveMode();\n\n\t\tSmartDashboard.putString(\"Controls Table\", NetworkTables.getControlsTable().getKeys().toString());\n\t\tSmartDashboard.putString(\"Stream\", NetworkTables.getControlsTable().getString(\"stream\", \"nothing\"));\n\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tSmartDashboard.putString(\"DT Current Command\", \" \");\n\t\tSmartDashboard.putString(\"SHOOTER Current Command\", \" \");\n\t\tSmartDashboard.putString(\"SHOOTERPIVOT Current Command\", \" \");\n\t\tSmartDashboard.putString(\"INTAKE Current Command\", \" \");\n\t\t\n\t\tScheduler.getInstance().run();\n//\t\t\n//\t\tRobot.drivetrain.leftLED.set(true);\n//\t\tRobot.drivetrain.rightLED.set(false);\n\n\t\tif(!autoAiming) {\n\t\t\tnew DriveForwardRotate(correctForDeadZone(oi.driver.getForward()), correctForDeadZone(oi.driver.getRotation())).start();\n\t\t}\n\t\t//new DriveForwardRotate(oi.driver.getForward(), oi.driver.getRotation()).start();\n\t\t\n\t\tif(oi.autoAim() && !prevStateAutoAim){\n\t\t\t//new SetPivotPosition(PivotPID.AUTO_CAMERA_AIM_POSITION).start(\n//\t\t\tnew AutoAim().start();\n\t\t\tnew AutoAim(TurnConstants.AIM_VELOCITY).start(); //this is a press and hold button 3 on joystick\n\t\t\t\n\t\t}\n\t\t\n\t\tif (readyToShoot && oi.operator.shootBallFlywheels() && oi.operator.shoot()){\n//\t\t\tSystem.out.println(\"SHOOT THE SHOOTER -- ready to shoot\");\n\t\t\tnew ShootTheShooter().start();\n\t\t}\n\t\t\n\t\t\n\t\t//INTAKE ------2 button\n\t\tif (oi.operator.intakeUp() && !prevStateIntakeUp){\n\t\t\tnew SetIntakePosition(IntakeSubsystem.UP).start();\n\t\t}\n\t\tif (oi.operator.intakeDeploy() && !prevStateIntakeDeployed){\n\t\t\tnew SetIntakePosition(!IntakeSubsystem.UP).start();\n\t\t}\n\t\t\n\t\t//CAMERA PISTON\n\t\t\n\t\t//move up\n\t\tif (oi.driver.isCameraUpPressed()){\n\t\t\tnew SetCameraPiston(CameraSubsystem.CAM_UP).start();\n\t\t}\n\t\telse{\n\t\t\tnew SetCameraPiston(!CameraSubsystem.CAM_UP).start();\n\t\t}\n\t\t\n//\t\tif (oi.driver.isCameraUpPressed() && !prevStateCameraUp){\n//\t\t\tnew SetCameraPiston(cameraUp ? !CameraSubsystem.CAM_UP : CameraSubsystem.CAM_UP).start();\n//\t\t\tcameraUp = !cameraUp;\n//\t\t}\n//\t\telse{\n//\t\t\tnew SetCameraPiston(cameraUp ? CameraSubsystem.CAM_UP : !CameraSubsystem.CAM_UP).start();\n//\t\t}\n\t\t\n\t\t\n\t\tif (oi.operator.isSemiAutonomousIntakePressed() && !prevStateSemiAutoIntake){\n\t\t\tnew SemiAutoLoadBall().start();\n\t\t}\n//\t\t\n\t\t\n\t\t//pivot state\n//\t\tif (oi.operator.pivotShootState() && !prevStatePivotUp){\n//\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.FAR_SHOOT_STATE).start();\n//\t\t}\n//\t\telse if(oi.operator.resetPivot() && !prevStateResetButton) {\n//\t\t\t new ResetPivot().start();\n//\t\t}\n//\t\telse if (oi.operator.pivotStoreState() && !prevStatePivotMiddle){\n//\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.STORING_STATE).start();\n//\t\t}\n\t\t\n\t\t//PIVOT\n\t\t\n\t\t//if going up\n\t\tif (oi.operator.pivotCloseShot() && !prevStatePivotCloseShot){\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.CLOSE_SHOOT_STATE).start();\t\t\n\t\t}\n\t\t//if going down\n\t\telse if(oi.operator.pivotFarShot() && !prevStatePivotFarShot) {\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.FAR_SHOOT_STATE).start();\n\t\t}\n\t\telse if (oi.operator.pivotStoreState()&& !prevStateStore){\n\t\t\tnew SetPivotState(ShooterPivotSubsystem.PivotPID.STORING_STATE).start();\n\t\t}\n\t\telse if (oi.operator.pivotReset() && !prevStateResetSafety){\n\t\t\tnew ResetPivot().start();\n\t\t}\n\t\telse if (oi.driver.isDefenseShot() && prevStateDefenseShot){\n\t\t\tnew SetPivotPosition(ShooterPivotSubsystem.PivotPID.ANTI_DEFENSE_POSITION).start();\n\t\t}\n\t\n\t\t\n\t\tif (!semiAutoIsRunning){\n//\t\t\n\t\t\t//intake purging/running\n\t\t\tif(oi.operator.purgeIntake()) {\n\t\t\t\t//new SetIntakeSpeed(IntakeSubsystem.FORWARD_ROLLER_PURGE_SPEED, IntakeSubsystem.CENTERING_MODULE_PURGE_SPEED).start(); \n\t\t\t\tnew RunAllRollers(ShooterSubsystem.OUT, !ShooterSubsystem.UNTIL_IR).start();\n\t\t\t\tallIntakeRunning = true;\n\t\t\t} else if (oi.operator.runIntake()) {\n\t\t\t\t//new SetIntakeSpeed(IntakeSubsystem.FORWARD_ROLLER_INTAKE_SPEED, IntakeSubsystem.CENTERING_MODULE_INTAKE_SPEED).start();\n\t\t\t\tnew RunAllRollers(ShooterSubsystem.IN, ShooterSubsystem.UNTIL_IR).start();\n//\t\t\t\tnew SemiAutoLoadBall().start();\n\t\t\t\tallIntakeRunning = true;\n\t\t\t} else {\n\t\t\t\t//just the intakes off here to avoid conflicts\n\t\t\t\tnew SetIntakeSpeed(IntakeSubsystem.INTAKE_OFF_SPEED, IntakeSubsystem.INTAKE_OFF_SPEED).start();\n\t\t\t\t//new EndSemiAuto(true).start();\n\t\t\t\t//new RunAllRollers(ShooterSubsystem.OFF, !ShooterSubsystem.UNTIL_IR).start();\n\t\t\t\tallIntakeRunning = false;\n\t\t\t}\n\t\t\t\n\t\t\t//flywheel control\n\t\t\tif (!allIntakeRunning){\n//\t\t\t\tif(oi.operator.loadBallFlywheels()){\n//\t\t\t\t\tnew SetFlywheels(ShooterSubsystem.FLYWHEEL_INTAKE_POWER, -ShooterSubsystem.FLYWHEEL_INTAKE_POWER).start();;\n//\t\t\t\t\tflywheelShootRunning = true;\n//\t\t\t\t} else \n\t\t\t\tif(oi.operator.shootBallFlywheels()) {\n\t\t\t\t\t//new SetFlywheels(0.7, -0.7).start();\n\t\t\t\t\tnew BangBangFlywheels(true).start();\n\t\t\t\t\tflywheelShootRunning = true;\n\t\t\t\t} else {\n\t\t\t\t\t//new SetFlywheels(0, 0).start();//BangBangFlywheels(false).start();\n\t\t\t\t\tflywheelShootRunning = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n//\t\t\tif(oi.operator.shoot()){\n//\t\t\t\tnew ShooterSet(DoubleSolenoid.Value.kForward).start();\n//\t\t\t} else {\n//\t\t\t\tnew ShooterSet(DoubleSolenoid.Value.kReverse).start();\n//\t\t\t}\n//\t\t\t\n\t\t\tif (!allIntakeRunning && !flywheelShootRunning){\n\t\t\t\tnew SetFlywheels(0, 0).start();\n\t\t\t}\n\t\t\t\n\t\t\t//DEFENSE STATE\n\t\t\tif (oi.operator.isDefenseState() && !prevStateDefenseMode){\n\t\t\t\tnew SetDefenseMode().start();\n\t\t\t}\n\t\t}\n\t\t//tells us if bang bang works\n\t\treadyToShoot = ((Math.abs(shooter.getRightFlywheelRPM() - ShooterSubsystem.flywheelTargetRPM) < ShooterSubsystem.flywheelTolerance)\n\t\t\t\t&& (Math.abs(shooter.getLeftFlywheelRPM() - ShooterSubsystem.flywheelTargetRPM) < ShooterSubsystem.flywheelTolerance));\n\t\t\n\t\t\n\t\tif (oi.operator.isManualFirePiston() && !prevStateManualFirePiston){\n//\t\t\tSystem.out.println(\"SHOOT THE SHOOTER -- manual\");\n\t\t\tnew ShootTheShooter().start();\n\t\t}\n\t\t\n\t\t\n\t\tif(oi.driver.isDrivetrainHighGearButtonPressed()){\n\t\t\tdrivetrain.shift(DrivetrainSubsystem.HIGH_GEAR);\n\t\t\tcurrentGear = DrivetrainSubsystem.HIGH_GEAR;\n\t\t} else {\n\t\t\tdrivetrain.shift(!DrivetrainSubsystem.HIGH_GEAR);\n\t\t\tcurrentGear = !DrivetrainSubsystem.HIGH_GEAR;\n\t\t}\n\t\t\n\t\tisManualPressed = oi.operator.isManualOverrideOperator();\n\t\t\n\t\tif (!shooterPIDIsRunning){\n\t\t\tif(isManualPressed) {\n\t\t\t\tdouble pivotPower = oi.operator.getManualPower()/2.0;\n\t\t\t\t//shooterPivot.engageBrake(false);\n\t\t\t\tif (pivotPower > 0 && shooterPivot.pastMax() || pivotPower < 0 && shooterPivot.lowerLimitsTriggered()){\n\t\t\t\t\tpivotPower = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tnew SetPivotPower(pivotPower).start();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tnew SetPivotPower(0).start();\n\t\t\t}\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"Left: \" + Robot.drivetrain.motors[2].get() + \", Right: \" + (-Robot.drivetrain.motors[0].get()));\n//\t\tSystem.out.println(\"Left V: \" + Robot.drivetrain.leftEncoder.getRate() + \", Right V: \" + Robot.drivetrain.rightEncoder.getRate());\n//\t\tSystem.out.println(\"Accel z: \" + Robot.drivetrain.accel.getZ());\n\t\t\n\t\t\n\t\t//PREV STATES\n\t\tprevStateIntakeUp = oi.operator.intakeUp();\n\t\tprevStateIntakeDeployed = oi.operator.intakeDeploy();\n\t\tprevStateDriveShifter = oi.driver.isDrivetrainHighGearButtonPressed();\n\t\tprevStateShootButton = oi.operator.shoot();\n\t\t\n\t\tprevStatePivotCloseShot = oi.operator.pivotCloseShot();\n\t\tprevStatePivotFarShot = oi.operator.pivotFarShot();\n\t\tprevStateStore = oi.operator.pivotStoreState();\n\t\tprevStateResetSafety = oi.operator.pivotReset();\n\t\t\n\t\tprevStateSemiAutoIntake = oi.operator.isSemiAutonomousIntakePressed();\n\t\tprevStateDefenseMode = oi.operator.isDefenseState();\n\t\t\n\t\tprevStateManualFirePiston = oi.operator.isManualFirePiston();\n\t\tprevStateCameraUp = oi.driver.isCameraUpPressed();\n\t\tprevStateAutoAim = oi.autoAim();\n\t\tprevStateDefenseShot = oi.driver.isDefenseShot();\n\n\t\t\n\t\t//********updating subsystem*******//\n\t\t\n\t\t//shooter hal effect counter\n\t\t//shooterPivot.updateHalEffect();\n\t\t\n\t\t//update the flywheel speed constants\n\t\tshooter.updateShooterConstants();\n\t\t\n\t\t\n\t\t//brake\n\t\tif (!isManualPressed){ //if manual override isn't running\n\t\t\tif (!shooterPIDIsRunning && shooterPivot.motorLeft.get() < DEAD_ZONE_TOLERANCE && shooterPivot.motorRight.get() < DEAD_ZONE_TOLERANCE){\n\t\t\t\t\n\t\t\t\tif (pivotTimer.get() > MIN_STOPPED_TIME){\n\t\t\t\t\tnew EngageBrakes().start();\n\t\t\t\t}\n\t\t\t\t//if motor is 0 for the first time, start the timer\n\t\t\t\tif (!prevStateMotorPowerIs0){\n\t\t\t\t\tpivotTimer.reset();\n\t\t\t\t\tpivotTimer.start();\n\t\t\t\t}\n\t\t\t\t//keep this at the end\n\t\t\t\tprevStateMotorPowerIs0 = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tshooterPivot.engageBrake(false);\n\t\t\t\t//keep this at the end\n\t\t\t\tpivotTimer.reset();\n\t\t\t\tprevStateMotorPowerIs0 = false;\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tshooterPivot.engageBrake(false);\n\t\t\tpivotTimer.reset();\n\t\t}\n\t\t//System.out.println(shooterPivot.motorLeft.get());\n\t\t\n\t\t//LOGGING AND DASHBOARD\n\t\tlogAndDashboard();\n\t}", "@Override\n\tpublic void teleopInit() {\n\n\t\tSystem.out.println(\"Teleop init\");\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.cancel();\n\t\tScheduler.getInstance().add(new DriveCommand());\n\n\t\t\n\t}", "public void teleopInit()\n\t{\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.cancel();\n\t\tif (secondAuton != null)\n\t\t\tsecondAuton.cancel();\n\t\tif (isAuton && auton == \"Left\")\t{\n\t\t\tpostAuton.start();\n\t\t\tisAuton = false;\n\t\t}\n\t\tconveyor.setPlate(true);\n\t}", "public void autonomousInit() {\n //autonomousCommand = (Command) chooser.getSelected();\n autoLoopCounter = 0; //This resets the loop counter to 0\n //if (autonomousCommand != null) autonomousCommand.start();\n }", "public void teleopInit() {\n armTask.stop();\n driveTask.stop();\n armTask2.stop();\n getRobotDrive().stop();\n driveState = TELEOP;\n armState = TELEOP;\n\n }", "public void autonomousInit() {\n if (autonomousCommand != null) autonomousCommand.start();\n }", "public void teleopInit() {\n\t\tauto.cancel();\r\n\t\t// Create the teleop command and start it.\r\n\t\tteleop.start();\r\n\t\t// Reset the drivetrain encoders\r\n\t\tDriveTrain.getInstance().resetEncoders();\r\n\t\t// Start pushing sensor readings to the SD.\r\n\t\treadings.start();\r\n\t}", "public void autonomousPeriodic() {\n \n }", "@Override\n public void teleopInit() {\n Robot.drive.setDefaultCommand(new DriveCommand());\n if (autonomousCommand != null) autonomousCommand.cancel();\n System.out.println(\"teleopInit being called\");\n \n }", "public void autonomousPeriodic() {\r\n }", "public void autonomousPeriodic() {\r\n }", "public void autonomousPeriodic() {\n \tauto.autonomousPeriodic();\n\t}", "protected void initialize() {\n \tRobot.autonomous_command_group.cancel();\n }", "public void autonomousPeriodic() {\n }", "public void autonomousPeriodic() {\n }", "public void autonomousPeriodic() {\n if (m_apFirstRun) {\n System.out.println(\"Default autonomousPeriodic() method... Override me!\");\n m_apFirstRun = false;\n }\n }", "public void autonomousPeriodic() {\n //Scheduler.getInstance().run();\n /** if(autoLoopCounter < 100) { //Checks to see if the counter has reached 100 yet\n myRobot.drive(-0.5, 0.0); //If the robot hasn't reached 100 packets yet, the robot is set to drive forward at half speed, the next line increments the counter by 1\n autoLoopCounter++;\n } else {\n myRobot.drive(0.0, 0.0); //If the robot has reached 100 packets, this line tells the robot to stop\n }*/\n }", "@Override\n public void autonomousInit() {\n\tgameData.readGameData();\n\tautonomousCommand = (Command) chooserMode.getSelected();\n\tdriveSubsystem.resetEncoders();\n\televatorSubsystem.resetEncoder();\n\t// schedule the autonomous command\n\tif (autonomousCommand != null) {\n\t // SmartDashboard.putString(\"i\", \"nit\");\n\t autonomousCommand.start();\n\t}\n }", "public void autonomousInit() {\n Jagbot.isAutonomous = true;\n int mode = (int)SmartDashboard.getNumber(RobotMap.Autonomous.MODE_KEY);\n switch (mode) {\n case 0:\n System.out.println(\"Standing still\");\n new StandStill().start();\n break;\n case 1:\n System.out.println(\"Driving forward\");\n new DriveStraight(1).start();\n break;\n \n case 2:\n System.out.println(\"Turning left and shooting to score\");\n new TurnAndScore(-1).start();\n break;\n case 3:\n System.out.println(\"Turning right and shooting to score\");\n new TurnAndScore(1).start();\n break;\n }\n }", "@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n // ros_string = workingSerialCom.read();\n // yavuz = workingSerialCom.StringConverter(ros_string, 2);\n // Inverse.Inverse(yavuz);\n\n // JoystickDrive.execute();\n\n\n\n // ros_string = workingSerialCom.read();\n // alt_yurur = workingSerialCom.StringConverter(ros_string, 1);\n // robot_kol = workingSerialCom.StringConverter(ros_string, 2);\n Full.Full(yavuz);\n \n }", "@Override\n public void autonomousPeriodic() {\n \n //Switch is used to switch the autonomous code to whatever was chosen\n // on your dashboard.\n //Make sure to add the options under m_chooser in robotInit.\n switch (m_autoSelected) {\n case kCustomAuto:\n // Put custom auto code here\n break;\n case kDefaultAuto:\n default:\n if (m_timer.get() < 2.0){\n m_driveTrain.arcadeDrive(0.5, 0); //drive forward at half-speed\n } else {\n m_driveTrain.stopMotor(); //stops motors once 2 seconds have elapsed\n }\n break;\n }\n }", "@Override\n protected void end() {\n Robot.climber.frontStop();\n Robot.climber.rearStop();\n Robot.isAutonomous = false;\n }", "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 autonomousInit() {\n int sequenceNumber = (int)SmartDashboard.getNumber(\"Autonomous Sequence\");\n \n switch(sequenceNumber) {\n // Move into the Auto Zone\n case 0:\n autonomousCommand = new DirectionalDrive(0.0, -0.5, 1.25);\n break;\n \n // Grab a container and move into the Auto Zone\n case 1:\n autonomousCommand = new ContainerAutonomous();\n break;\n \n // If something else was supplied, do nothing for saftey reasons\n default:\n autonomousCommand = null;\n }\n // Start the autonomous command\n if (autonomousCommand != null) autonomousCommand.start();\n }", "public static void noAutostart() {\n\t\tdefaultAutostartMode = NO_AUTOSTART;\n\t}", "@Override\n public void autonomousInit() {\n //Diagnostics.writeString(\"State\", \"AUTO\");\n //m_autonomousCommand = m_chooser.getSelected();\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\", \"Default\");\n * switch(autoSelected) { case \"My Auto\": autonomousCommand = new\n * MyAutoCommand(); break; case \"Default Auto\": default: autonomousCommand = new\n * ExampleCommand(); break; }\n */\n\n // schedule the autonomous command (example)\n /*if (m_autonomousCommand != null) {\n m_autonomousCommand.start();\n }*/\n\n teleopInit();\n }", "public void autonomousPeriodic()\r\n {\r\n \r\n }", "@Override\n public void autonomousInit() {\n //ds.set(Value.kForward);\n /*m_autonomousCommand = m_chooser.getSelected();\n\n /*\n * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n * = new MyAutoCommand(); break; case \"Default Auto\": default:\n * autonomousCommand = new ExampleCommand(); break; }\n * \n */\n\n // schedule the autonomous command (example)\n /*if (m_autonomousCommand != null) {\n m_autonomousCommand.start();\n }*/\n //new VisionProcess().start();\n //SmartDashboard.putNumber(\"heerer\", value)\n new TeleOpCommands().start();\n }", "public void autonomousInit() { //Problems here when power is not cycled between matches.\n \tauto.autonomousInit();\n }", "@Override\n\tpublic void action() {\n\t\tsuppressed = false;\n\t\t//if (Settings.motorAAngle == -90) Settings.motorAAngle = -95;\n\n\t\tMotor.A.rotateTo(Settings.motorAAngle, true);\n\n\t\twhile (Motor.A.isMoving() && !Motor.A.isStalled() && !suppressed);\t\t\t\n\t\t\n\t\tMotor.A.stop();\n\t}", "@Override\n\tpublic void autonomousPeriodic() //runs the autonomous mode, repeating every 20ms\n\t{\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n\t\tdriveExecutor.execute(); //running the execute() method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}", "public void teleopPeriodic() {\n\t\t// resetAndDisable();\n\t\tupdateDashboard();\n\t\tLogitechJoystick.controllers();\n\t\tDrivetrain.arcadeDrive();\n\t\tShooterAngleMotor.angleShooter();\n\t\tBallShooter.shootBalls();\n\t\tSonicSensor.updateSensors();\n\t\t\n\t\t//if(LogitechJoystick.rightBumper2)\n\t\t\t//{\n\t\t\t\t//LowBar.makeArmStable();\n\t\t\t//}\n\n\t}", "@Override\n public void runOpMode() {\n RobotMain main = new RobotMain(this,hardwareMap,telemetry);\n\n //initialize controls\n imuTeleOpDualGamepad control = new imuTeleOpDualGamepad(main,gamepad1,gamepad2);\n\n waitForStart();\n\n //Pull the tail back from autonomous\n main.JewelArm.setServo(.65);\n\n //Continually run the control program in the algorithm\n while (opModeIsActive()) control.run();\n }", "@Override\n\tpublic void autonomousInit() {\n\t\t//SmartDashboard.getData(\"Driver File\");\n\t\t//SmartDashboard.getData(\"Operator File\");\n\t\tautonomousCommand = chooser.getSelected();\n\t\tisAutonomous = true;\n\t\tisTeleoperated = false;\n\t\tisEnabled = true;\n\t\tRobot.numToSend = 3;\n\t\tdrivebase.resetGyro();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tRobot.gearManipulator.gearManipulatorPivot.setPosition(0);\n\t\tRobot.gearManipulator.gearManipulatorPivot.setSetpoint(0);\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.start();\n\t}", "public void autonomousPeriodic() {\n\n }", "public void autonomousPeriodic() {\n\n }", "@Override\n\tpublic void testInit() {\n\t\tif (autonomousCommand != null)\n ((Command) autonomousCommand).cancel();\n \n\t\tprocessRobotModeChange(RobotMode.TEST);\n\t}", "@Override\n public void teleopPeriodic() {\n }", "@Override\n public void teleopPeriodic() {\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "public void teleopPeriodic() {\r\n }", "public void autonomousPeriodic() {\r\n Scheduler.getInstance().run();\r\n }", "@Override\n\tpublic void autonomousInit() {\n\t\tif (autonomousCommand != null)\n\t\t\tlowGearCommand.start();\n\t\tautonomousCommand.start();\n\t}", "public void teleopPeriodic() {\n \tteleop.teleopPeriodic();\n }", "@Override\n public void autonomousPeriodic() {\n }", "public void teleopPeriodic() {\r\n Scheduler.getInstance().run();\r\n OI.poll();\r\n }", "@Override\n\tpublic void autonomousInit() {\n\t\tvision_.startGearLiftTracker(15);\n\t\tgyro_.reset();\n\t\tautoCommand = (Command) autoChooser.getSelected();\n\t\tif(autoCommand != null)\n\t\t{\n\t\t\tautoCommand.start();\n\t\t}\n\t}", "@Override\n\tpublic void autonomousInit() {\n\t\tautonomousCommand = new Auto();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tif (autonomousCommand != null)\n\t\t\tautonomousCommand.start();\n\t}", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void autonomousPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n \t//getInstance().run();;\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickRight); //This line drives the robot using the values of the joystick and the motor controllers selected above\n \tScheduler.getInstance().run();\n\t\n }", "protected void takeDown() {\n\t\tSystem.out.println(\"TIAgent \" + getAID().getName() + \" terminating.\");\r\n\t}", "public void autonomousPeriodic() \n {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() \r\n {\r\n Watchdog.getInstance().feed();\r\n Scheduler.getInstance().run();\r\n \r\n //Polls the buttons to see if they are active, if they are, it adds the\r\n //command to the Scheduler.\r\n if (mecanumDriveTrigger.get()) \r\n Scheduler.getInstance().add(new MechanumDrive());\r\n \r\n else if (tankDriveTrigger.get())\r\n Scheduler.getInstance().add(new TankDrive());\r\n \r\n else if (OI.rightJoystick.getRawButton(2))\r\n Scheduler.getInstance().add(new PolarMechanumDrive());\r\n \r\n resetGyro.get();\r\n \r\n //Puts the current command being run by DriveTrain into the SmartDashboard\r\n SmartDashboard.putData(DriveTrain.getInstance().getCurrentCommand());\r\n \r\n SmartDashboard.putString(ERRORS_TO_DRIVERSTATION_PROP, \"Test String\");\r\n \r\n \r\n }", "@Override\n\tpublic void autonomousInit() //initialization of the autonomous code\n\t{\n\t\t//m_autonomousCommand = m_chooser.getSelected();\n\n\t\t/*\n\t\t * String autoSelected = SmartDashboard.getString(\"Auto Selector\",\n\t\t * \"Default\"); switch(autoSelected) { case \"My Auto\": autonomousCommand\n\t\t * = new MyAutoCommand(); break; case \"Default Auto\": default:\n\t\t * autonomousCommand = new ExampleCommand(); break; }\n\t\t */\n\n\t\t// schedule the autonomous command (example)\n\t\tif (m_autonomousCommand != null) //if we have any autonomous code, start it\n\t\t{\n\t\t\tm_autonomousCommand.start();\n\t\t}\n\t\tRobotMap.encoderLeft.reset(); //reset the values of the encoder\n\t\tRobotMap.encoderRight.reset(); //reset the values of the encoder\n\t\tultrasonic.getInitialDist(); //if nullPointerException, use \"first\" boolean inside the method and run in periodic()\n\t}", "@Override\n public void runOpMode() {\n leftDrive = hardwareMap.get(DcMotor.class, \"left_drive\");\n rightDrive = hardwareMap.get(DcMotor.class, \"right_drive\");\n intake = hardwareMap.get (DcMotor.class, \"intake\");\n dropServo = hardwareMap.get(Servo.class, \"drop_Servo\");\n leftDrive.setDirection(DcMotor.Direction.REVERSE);\n rightDrive.setDirection(DcMotor.Direction.FORWARD);\n\n dropServo.setPosition(1.0);\n waitForStart();\n dropServo.setPosition(0.6);\n sleep(500);\n VuforiaOrientator();\n encoderSequence(\"dumbDrive\");\n\n\n }", "public void hang() {\n // WRITE CODE BETWEEN THESE LINES -------------------------------------------------------- //\n // TODO: run the intake motor to both extend and pull in hanger\n // Note: only enable running motor when the m_extended flag is true\n\n // ^^-----------------------------------------------------------------------------------^^ //\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}", "@Override\r\n\tpublic void autonomous() {\n\r\n\t\tint autoMode = -1;\r\n\t\t\r\n\t\tif (!switch1.get() && !switch2.get() && !switch3.get()) {\r\n\t\t\t//if all the switches are off\r\n\t\t\tautoMode = 0;\r\n\t\t} else if (switch1.get() && !switch2.get() && !switch3.get()) {\r\n\t\t\tautoMode = 1;\r\n\t\t} else if (!switch1.get() && switch2.get() && !switch3.get()) {\r\n\t\t\tautoMode = 2;\r\n\t\t} else if (switch1.get() && switch2.get() && !switch3.get()) {\r\n\t\t\tautoMode = 3;\r\n\t\t}\r\n\r\n\t\tautotime.start();\r\n\r\n\t\t// double[] wheelSpeeds = new double[2];\r\n\t\t// double[] startCoords = {0, 0, Math.PI / 2};\r\n\t\t// double[] endCoords = {0, 1, Math.PI / 2};\r\n\t\t// AutoPath pathAuto = new AutoPath(startCoords, endCoords,\r\n\t\t// ahrs.getAngle());\r\n\t\t//\r\n\t\t// int i = 0;\r\n\t\t// boolean successfullyGrabbedRectangles = false;\r\n\t\t\r\n\t\tboolean shotGear = false;\r\n\t\t//boolean hasBackedUp = false;\r\n\t\twhile (isAutonomous() && isEnabled()) {\r\n\t\t\t// auto.drive(autoMode);\r\n\r\n\t\t\t// while(autotime.get() < 3) {\r\n\t\t\t// drive.drive(-0.9, -0.9);\r\n\t\t\t// }\r\n\r\n\t\t\t// grab the current switch status\r\n\r\n\t\t\tswitch (autoMode) {\r\n\t\t\tcase 0:\r\n\t\t\t\t//Mark: Drive forward\r\n\r\n\t\t\t\tif (autotime.get() < 3) {\r\n\t\t\t\t\tdrive.drive(-0.9, -0.9);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\t// Mark: Drive Forward, NO turning, and shoot gear onto peg\r\n\r\n\t\t\t\tif (autotime.get() < 3) {\r\n\t\t\t\t\tdrive.drive(-0.75, -0.75);\r\n\t\t\t\t} else if(!shotGear) {\r\n\t\t\t\t\t// shoot the gear onto the peg\r\n\t\t\t\t\tgearOutput.autoOutput();\r\n\t\t\t\t\tshotGear = true;\r\n\t\t\t\t}else if(autotime.get() < 3.67) {\r\n\t\t\t\t\tdrive.drive(0.50, 0.50);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdrive.drive(0,0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\t//Mark: start LEFT of center, drive forward, turn -60 degrees, drive forward, shoot gear on peg\r\n\t\t\t\tif (autotime.get() < 2) {\r\n\t\t\t\t\tdrive.drive(-0.75, -0.75);\r\n\t\t\t\t} else if (autotime.get() < 2.5) {\r\n\t\t\t\t\tdrive.drive(1, 0);\r\n\t\t\t\t}else if(autotime.get() < 3.5) { \r\n\t\t\t\t\tdrive.drive(-.75,-.75);\r\n\t\t\t\t} else if (!shotGear) {\r\n\t\t\t\t\tgearOutput.autoOutput();\r\n\t\t\t\t\tshotGear = true;\r\n\t\t\t\t}else if(autotime.get() < 4.5) {\r\n\t\t\t\t\tdrive.drive(0.75, 0.75);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdrive.drive(0,0);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\t//Mark: start RIGHT of center, drive forward, turn 60 degrees, drive forward, shoot gear on peg\r\n\t\t\t\tif (autotime.get() < 2) {\r\n\t\t\t\t\tdrive.drive(-0.75, -0.75);\r\n\t\t\t\t} else if (autotime.get() < 2.25) {\r\n\t\t\t\t\tdrive.drive(0, 1);\r\n\t\t\t\t}else if(autotime.get() < 4) { \r\n\t\t\t\t\tdrive.drive(-.75,-.75);\r\n\t\t\t\t} else if (!shotGear) {\r\n\t\t\t\t\tgearOutput.autoOutput();\r\n\t\t\t\t\tshotGear = true;\r\n\t\t\t\t}else if(autotime.get() < 4.5) {\r\n\t\t\t\t\tdrive.drive(0.75, 0.75);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tdrive.drive(0,0);\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\t// if(!successfullyGrabbedRectangles) {\r\n\t\t\t// Rectangle[] targets = grabRectangles();\r\n\t\t\t//\r\n\t\t\t//// System.out.println(\"-----\");\r\n\t\t\t//// for(Rectangle r : testing) {\r\n\t\t\t//// System.out.println(r.getArea());\r\n\t\t\t//// }\r\n\t\t\t//// System.out.println(\"-----\");\r\n\t\t\t//\r\n\t\t\t// if(targets[0].getArea() == 0) {\r\n\t\t\t// //since grabRectangles returns 1 rectangle with area of 0, so if\r\n\t\t\t// one of the area's\r\n\t\t\t// //equals 0, then it was a failed response\r\n\t\t\t// successfullyGrabbedRectangles = false;\r\n\t\t\t// }else{\r\n\t\t\t//\r\n\t\t\t// successfullyGrabbedRectangles = true;\r\n\t\t\t//\r\n\t\t\t// //call auto path to get the wheel speeds from the rectangle\r\n\t\t\t// pathAuto.makeNewPath(targets[0].getWidth(),\r\n\t\t\t// targets[1].getWidth(), targets[0].getXPos() - 240,\r\n\t\t\t// targets[1].getXPos() - 240, ahrs.getAngle());\r\n\t\t\t// //drive.drive(wheelSpeeds[0], wheelSpeeds[1]);\r\n\t\t\t//\r\n\t\t\t// }\r\n\t\t\t// }else{\r\n\t\t\t// //drive.drive(0,0);\r\n\t\t\t//\r\n\t\t\t// double[] wheelSpeedsFromPath = pathAuto.getWheelSpeeds(.4); //the\r\n\t\t\t// .4 doesn't mean anything at all; Beitel is just weird :^)\r\n\t\t\t// drive.drive(wheelSpeedsFromPath[0], wheelSpeedsFromPath[1]);\r\n\t\t\t// //System.out.println(\"Left:\" + wheelSpeedsFromPath[0]);\r\n\t\t\t// //System.out.println(\"Right: \" + wheelSpeedsFromPath[1]);\r\n\t\t\t// }\r\n\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t}", "@Override\n public void autonomousPeriodic() {\n\n }", "public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "@Override\n public void autonomousPeriodic() {\n \n }", "public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "public void autonomousPeriodic() {\n \tswitch(autoSelected) {\n \tcase customAuto:\n //Put custom auto code here \n break;\n \tcase defaultAuto:\n \tdefault:\n \t//Put default auto code here\n break;\n \t}\n }", "public void autonomousPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "public void autonomousPeriodic() {\r\n \r\n }", "public void teleopPeriodic() {\n \t\n \twhile (isOperatorControl() && isEnabled()) {\n \t\tdebug();\n \t\tsmartDashboardVariables();\n \t\t//driver control functions\n \t\tdriverControl();\n \t//state machine\n \tterrainStates();\n \t//this function always comes last\n \t//armSlack();\n Timer.delay(0.005);\t\t// wait for a motor update time\n }\n \tTimer.delay(0.005);\n }" ]
[ "0.79146737", "0.71457094", "0.71355563", "0.7106587", "0.7032112", "0.69626063", "0.69592613", "0.69592613", "0.688211", "0.67403203", "0.6736116", "0.67039865", "0.65584034", "0.65500134", "0.6532514", "0.6515015", "0.650472", "0.643695", "0.6374858", "0.635863", "0.63578534", "0.633055", "0.6275334", "0.62670785", "0.6257856", "0.6255598", "0.62547606", "0.62477505", "0.62165385", "0.620692", "0.61976784", "0.6186493", "0.6186493", "0.6179125", "0.6174564", "0.6171917", "0.6171917", "0.6151076", "0.6149093", "0.6124639", "0.6124315", "0.6097832", "0.6082123", "0.60659534", "0.60590297", "0.60563403", "0.60562813", "0.60504395", "0.60496193", "0.60461235", "0.6039638", "0.6034832", "0.60301894", "0.60129386", "0.60069185", "0.6003834", "0.5988335", "0.5988335", "0.59814286", "0.5965033", "0.5965033", "0.5929256", "0.5929256", "0.5929256", "0.5929256", "0.5912665", "0.5912665", "0.5912665", "0.5907305", "0.5903462", "0.5900021", "0.58990914", "0.5898821", "0.5896191", "0.58960724", "0.58881736", "0.58811635", "0.58811635", "0.58811635", "0.58811635", "0.58811635", "0.58811635", "0.5864177", "0.5857864", "0.58542013", "0.5848572", "0.5844082", "0.58417606", "0.58334386", "0.58333224", "0.58314633", "0.5828746", "0.58219576", "0.5819711", "0.58144873", "0.5808228", "0.5807506", "0.58031875", "0.58001477", "0.57930726" ]
0.6496766
17
This function is called periodically during operator control
public void teleopPeriodic() { Scheduler.getInstance().run(); // Light/flash LEDs as needed if (timerLEDs.get() >= timerLEDsHalfPeriod) { timerLEDs.reset(); timerLEDsCycleHigh = !timerLEDsCycleHigh; if (timerLEDsCycleHigh) { shooter.setFlywheelSpeedLight(shooter.bLEDsArmAtAngle); } else { shooter.setFlywheelSpeedLight(shooter.bLEDsArmAtAngle /*&& !shooter.bLEDsFlywheelAtSpeed*/); } } /* // Rumble as needed boolean ballLoaded = shooter.isBallLoaded(); if (ballLoaded && !prevBallLoaded) { timerRumble.reset(); oi.xboxController.setRumble(RumbleType.kLeftRumble, 1); } prevBallLoaded = ballLoaded; boolean readyToShoot = shooter.bLEDsArmAtAngle && shooter.bLEDsFlywheelAtSpeed; if (readyToShoot && !prevReadyToShoot) { timerRumble.reset(); oi.xboxController.setRumble(RumbleType.kRightRumble, 1); } prevReadyToShoot = readyToShoot; if (timerRumble.get() > 0.5) { oi.xboxController.setRumble(RumbleType.kLeftRumble, 0); oi.xboxController.setRumble(RumbleType.kRightRumble, 0); } */ // Show arm angle shooterArm.updateSmartDashboard(); // Other printouts shooter.updateSmartDashboard(); shooter.isBallLoaded(); intake.updateSmartDashboard(); intake.intakeIsUp(); driveTrain.getDegrees(); vision.findGoal(); vision.getGoalXAngleError(); vision.getGoalArmAngle(); if (smartDashboardDebug) { // Uncomment the following line to read coPanel knobs. // oi.updateSmartDashboard(); // Uncomment the following line for debugging shooter motors PIDs. // shooter.setPIDFromSmartDashboard(); // Uncomment the following line for debugging the arm motor PID. // shooterArm.setPIDFromSmartDashboard(); // Uncomment the following lines to see drive train data driveTrain.getLeftEncoder(); driveTrain.getRightEncoder(); driveTrain.smartDashboardNavXAngles(); // SmartDashboard.putNumber("Panel voltage", panel.getVoltage()); // SmartDashboard.putNumber("Panel arm current", panel.getCurrent(0)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void teleopPeriodic() {\n \t\n \twhile (isOperatorControl() && isEnabled()) {\n \t\tdebug();\n \t\tsmartDashboardVariables();\n \t\t//driver control functions\n \t\tdriverControl();\n \t//state machine\n \tterrainStates();\n \t//this function always comes last\n \t//armSlack();\n Timer.delay(0.005);\t\t// wait for a motor update time\n }\n \tTimer.delay(0.005);\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n// if (oi.driveStick.getRawButton(4)) {\n// System.out.println(\"Left Encoder Distance: \" + RobotMap.leftDriveEncoder.getDistance());\n// System.out.println(\"RightEncoder Distance: \" + RobotMap.rightDriveEncoder.getDistance());\n// }\n\n }", "public void teleopPeriodic() {\r\n Scheduler.getInstance().run();\r\n OI.poll();\r\n }", "public void operatorControl() {\n myRobot.setSafetyEnabled(true);\n while (isOperatorControl() && isEnabled()) {\n \tmyRobot.tankDrive(controller, 2, controller, 5);\n Timer.delay(0.005);\t\t// wait for a motor update time\n }\n }", "@Override\n public void teleopPeriodic() {\n try {\n mDriveController.update();\n mOperatorController.update();\n driverControl();\n \n } catch (Throwable t) {\n CrashTracker.logThrowableCrash(t);\n throw t;\n }\n \n }", "@Override\n public void teleopPeriodic() {\n }", "@Override\n public void teleopPeriodic() {\n }", "public void teleopPeriodic() \n {\n // NIVision.Rect rect = new NIVision.Rect(10, 10, 100, 100);\n /*\n NIVision.IMAQdxGrab(session, frame, 1);\n //NIVision.imaqDrawShapeOnImage(frame, frame, rect,\n // DrawMode.DRAW_VALUE, ShapeMode.SHAPE_OVAL, 0.0f);\n */\n \n //cam.getImage(frame);\n //camServer.setImage(frame);\n \n //CameraServer.getInstance().setImage(frame);\n \n if(verticalLift.limitSwitchHit())\n verticalLift.resetEnc();\n \n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\r\n }", "@Override\n public void teleopPeriodic() {\n CommandScheduler.getInstance().run();\n OI.getInstance().getPilot().run();\n SmartDashboard.putNumber(\"gyro\", getRobotContainer().getTecbotSensors().getYaw());\n SmartDashboard.putBoolean(\"isSpeed\", getRobotContainer().getDriveTrain().getTransmissionMode() == DriveTrain.TransmissionMode.speed);\n SmartDashboard.putString(\"DT_MODE\", getRobotContainer().getDriveTrain().getCurrentDrivingMode().toString());\n SmartDashboard.putNumber(\"x_count\", getRobotContainer().getClimber().getxWhenPressedCount());\n\n }", "public void operatorControl() {\n \tmyRobot.setSafetyEnabled(true);\n while (isOperatorControl() && isEnabled()) {\n \tdouble x = stick2.getRawAxis(0);\n \tdouble y = stick2.getRawAxis(1);\n \tdouble rot = stick.getRawAxis(0);\n \tSmartDashboard.putNumber(\"x1\", x);\n SmartDashboard.putNumber(\"y1\", y);\n SmartDashboard.putNumber(\"rot1\", rot);\n \tif(Math.abs(x) < .2)\n \t\tx = 0;\n \tif(Math.abs(y) < .2)\n \t\ty = 0;\n \tif(Math.abs(rot) < .2)\n \t\trot = 0;\n \tmyRobot.mecanumDrive_Cartesian(x*-1, y*-1,rot*-1, gyro.getAngle());\n double current1 = pdp.getCurrent(0);\n double current2 = pdp.getCurrent(13);\n double current3 = pdp.getCurrent(15);\n double current4 = pdp.getCurrent(12);\n SmartDashboard.putNumber(\"Front Left current\", current1);\n SmartDashboard.putNumber(\"back Left current\", current2);\n SmartDashboard.putNumber(\"Front right current\", current3);\n SmartDashboard.putNumber(\"back right current\", current4);\n SmartDashboard.putNumber(\"x\", x);\n SmartDashboard.putNumber(\"y\", y);\n SmartDashboard.putNumber(\"rot\", rot);\n SmartDashboard.putNumber(\"Gyro\", gyro.getAngle());\n \tTimer.delay(0.005);\t\t// wait for a motor update time\n }\n }", "public void teleopPeriodic() \r\n {\r\n Watchdog.getInstance().feed();\r\n Scheduler.getInstance().run();\r\n \r\n //Polls the buttons to see if they are active, if they are, it adds the\r\n //command to the Scheduler.\r\n if (mecanumDriveTrigger.get()) \r\n Scheduler.getInstance().add(new MechanumDrive());\r\n \r\n else if (tankDriveTrigger.get())\r\n Scheduler.getInstance().add(new TankDrive());\r\n \r\n else if (OI.rightJoystick.getRawButton(2))\r\n Scheduler.getInstance().add(new PolarMechanumDrive());\r\n \r\n resetGyro.get();\r\n \r\n //Puts the current command being run by DriveTrain into the SmartDashboard\r\n SmartDashboard.putData(DriveTrain.getInstance().getCurrentCommand());\r\n \r\n SmartDashboard.putString(ERRORS_TO_DRIVERSTATION_PROP, \"Test String\");\r\n \r\n \r\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t\tupdateLedState();\n\t\t//SmartDashboard.putNumber(\"Gyro\", Robot.drivebase.driveGyro.getAngle());\n\t\tSmartDashboard.putNumber(\"Climber Current Motor 1\", Robot.climber.climberTalon.getOutputCurrent());\n\t\tSmartDashboard.putNumber(\"Climber Current motor 2\", Robot.climber.climberTalon2.getOutputCurrent());\n\t\t//visionNetworkTable.getGearData();\n\t//\tvisionNetworkTable.showGearData();\n\t\tSmartDashboard.putNumber(\"GM ACTUAL POSITION\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\n\t\tif(Robot.debugging){\t\t\t\n\t\t\tSmartDashboard.putNumber(\"Shooter1RPM Setpoint\", shooter.shooter1.getSetpoint());\n\t \tSmartDashboard.putNumber(\"Intake Pivot Encoder Position\", Robot.gearManipulator.gearManipulatorPivot.getPosition());\n\t\n\t\t\tSmartDashboard.putNumber(\"Gear Manipulator Setpoint\", gearManipulator.gearManipulatorPivot.getSetpoint());\n\t\t}\n\t\t//\tvisionNetworkTable.getGearData();\n\t\t//visionNetworkTable.getHighData();\n\t}", "public void teleopPeriodic() {\n \tteleop.teleopPeriodic();\n }", "@Override\n public void teleopPeriodic() {\n\tupdateDiagnostics();\n\tScheduler.getInstance().run();\n }", "public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "public void teleopPeriodic() {\n driverScreen.updateLCD();\n }", "@Override\n public void teleopPeriodic() {\n teleop.periodic();\n toggleCompressor = toggleCompressor ^ robot.compressorToggle.get();\n robot.runCompressor.set(toggleCompressor);\n Watcher.update();\n\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "@Override\n public void robotPeriodic() {\n }", "public void updatePeriodic() {\r\n }", "public void teleopPeriodic() {\n \t//getInstance().run();;\n \t//RobotMap.robotDrive1.arcadeDrive(oi.stickRight); //This line drives the robot using the values of the joystick and the motor controllers selected above\n \tScheduler.getInstance().run();\n\t\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n drive.updateTeleop();\n sensor.updateTeleop();\n }", "@Override\n public void teleopPeriodic() {\n // drive.DrivePeriodic();\n controllerMap.controllerMapPeriodic();\n // intake.IntakePeriodic();\n // climb.ClimbPeriodic();\n\n }", "public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() //runs the teleOp part of the code, repeats every 20 ms\n\t{\n\t\tScheduler.getInstance().run(); //has to be here, I think that this is looping the method\n\t\tSmartDashboard.putNumber(\"Encoder Left: \", RobotMap.encoderLeft.getRaw()); //putting the value of the left encoder to the SmartDashboard\n\t\tSmartDashboard.putNumber(\"Encoder Right: \", RobotMap.encoderRight.getRaw()); //putting the value of the right encoder to the smartDashboard\n\t\tSmartDashboard.putNumber(\"Ultrasonic sensor\", ultrasonic.getDistanceIn()); //putting the value of the ultrasonic sensor to the smartDashboard\n//\t\tSmartDashboard.putBoolean(\"allOK\", Robot.driveFar.ultrasonicOK);\n\t\tdriveExecutor.execute(); //running the execute method in driveExecutor\n\t\tgrab.execute(); //running the execute() method in GearGrab_Command (should run without this but this is ensuring us that it is on)\n\t}", "@Override\n public void teleopPeriodic()\n {\n commonPeriodic();\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\n\t\tif (oi.getRightTrig()) {\n\t\t\tshifter.set(Value.kForward);\n\t\t} else if (oi.getLeftTrig()) {\n\t\t\tshifter.set(Value.kReverse);\n\t\t}\n\t\tSystem.out.println(shifter.get());\n\t\t\t\n\t\tif(oi.getClimber()){\n\t\t\tclimber.set(1.0);\n\t\t\tSystem.out.println(\"climber running\");\n\t\t}else {\n\t\t\tclimber.set(0);\n\t\t\tSystem.out.println(\"climber not running\");\n\t\t}\n\t}", "@Override\n public void autonomousPeriodic() {\n \n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void autonomousPeriodic() {\n\n }", "@Override\n\tpublic void robotPeriodic() {\n\t}", "@Override\n\tpublic void robotPeriodic() {\n\t}", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n public void robotPeriodic() {\n\n enabledCompr = pressBoy.enabled();\n //pressureSwitch = pressBoy.getPressureSwitchValue();\n currentCompr = pressBoy.getCompressorCurrent();\n //SmartDashboard.putBoolean(\"Pneumatics Loop Enable\", closedLoopCont);\n SmartDashboard.putBoolean(\"Compressor Status\", enabledCompr);\n //SmartDashboard.putBoolean(\"Pressure Switch\", pressureSwitch);\n SmartDashboard.putNumber(\"Compressor Current\", currentCompr);\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\r\n public void periodic() {\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t\tSmartDashboard.putBoolean(\"Max Intake Extension: \", RobotMap.intakeLifted.get());\n\t\tSmartDashboard.putBoolean(\"Max Lift Extension:\", RobotMap.isAtTop.get());\n\t\tSmartDashboard.putBoolean(\"Min Lift Extension:\", RobotMap.isAtBottom.get());\n\t\tDriveTrain.driveWithJoystick(RobotMap.stick, RobotMap.rd); // Drive\n\t\tTeleOp.RaiseLift(RobotMap.liftTalon, RobotMap.controller); // Raise lift\n\t\tif(RobotMap.controller.getRawAxis(RobotMap.lowerLiftAxis) >= 0.2) {\n\t\tTeleOp.LowerLift(RobotMap.liftTalon, RobotMap.controller);\n\t\t}\n\t\tTeleOp.DropIntake(RobotMap.controller, RobotMap.intakeLifter);\n\t\tTeleOp.spinOut(RobotMap.intakeVictorLeft, RobotMap.controller);\n\t\t//TeleOp.spinnySpinny(RobotMap.intakeVictorLeft, RobotMap.stick);\n\t}", "public void autonomousPeriodic()\r\n {\r\n \r\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tupdate();\n\t\t\n\t\t//dashboard outputs\n\t\tdashboardOutput();\n\t\t\n\t\t\n\t\t\n\t\tif (tankDriveBool) {\n\t\t\ttankDrive();\n\t\t} \n\t\telse {\n\t\t\ttankDrive();\n\t\t}\n\t\tif (buttonA) {\n\t\t\ttest = true;\n\t\t\twhile (test) {\n\t\t\t\tcalibrate(10);\n\t\t\t\ttest = false;\n\t\t\t}\n\t\t}\n\t\tif (buttonY) {\n\t\t\tclimbMode = !climbMode;\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kRightRumble, 0.5);\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kLeftRumble, 0.5);\n\t\t\tTimer.delay(0.5);\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kRightRumble, 0);\n\t\t\tcontroller.setRumble(Joystick.RumbleType.kLeftRumble, 0);\n\t\t}\n\t\tverticalMovement();\n\t\tgrab();\n\t}", "public void teleopPeriodic() {\n\t\t// resetAndDisable();\n\t\tupdateDashboard();\n\t\tLogitechJoystick.controllers();\n\t\tDrivetrain.arcadeDrive();\n\t\tShooterAngleMotor.angleShooter();\n\t\tBallShooter.shootBalls();\n\t\tSonicSensor.updateSensors();\n\t\t\n\t\t//if(LogitechJoystick.rightBumper2)\n\t\t\t//{\n\t\t\t\t//LowBar.makeArmStable();\n\t\t\t//}\n\n\t}", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void teleopPeriodic() {\n \tbeginPeriodic();\n Scheduler.getInstance().run();\n endPeriodic();\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n\tpublic void periodic()\n\t{\n\t}", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }" ]
[ "0.7665666", "0.73227316", "0.7286976", "0.72593725", "0.7255314", "0.71488637", "0.71488637", "0.71138996", "0.7093574", "0.7090445", "0.70560575", "0.7046668", "0.704289", "0.7039102", "0.7032054", "0.7023366", "0.6963418", "0.69623876", "0.69429386", "0.69309705", "0.69309705", "0.69309705", "0.69309705", "0.69309705", "0.69309705", "0.6899386", "0.68936527", "0.6882646", "0.68753546", "0.687443", "0.6872987", "0.68692183", "0.6860374", "0.68447095", "0.6841578", "0.6841578", "0.6831749", "0.68232137", "0.68232137", "0.6814693", "0.6814693", "0.6814693", "0.6814693", "0.67941135", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.677258", "0.67706984", "0.67706984", "0.67706984", "0.6768479", "0.6764131", "0.6764131", "0.6764131", "0.6764131", "0.6757807", "0.67566633", "0.67341703", "0.67341703", "0.67341703", "0.67252094", "0.6721157", "0.67074573", "0.6701728", "0.66846615", "0.66846615", "0.66846615", "0.6682299", "0.6671709" ]
0.0
-1
This function is called periodically during test mode
public void testPeriodic() { LiveWindow.run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void testPeriodic()\n {\n \n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n }", "@Override\n public void testPeriodic() {\n\n LiveWindow.updateValues();\n }", "@Override\n\tpublic void testPeriodic() {\n\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t}", "public void testPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n\tpublic void testPeriodic() {\n\t\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\t\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\t\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\tLiveWindow.run();\n\t\tisAutonomous = false;\n\t\tisTeleoperated = true;\n\t\tisEnabled = true;\n\t}", "@Override\n\tpublic void testPeriodic() {\n\t\tbeginPeriodic();\n\t\t//LiveWindow.run();\n\t\tendPeriodic();\n\t}", "@Override\r\n\tpublic void sssDoLwTestPeriodic() {\n\r\n\t}", "@Override\n\tpublic void testPeriodic() {}", "public void testPeriodic() {\n \n }", "public void testPeriodic() {\n \n }", "public void testPeriodic() {\n \n }", "public void testPeriodic() {\n\n\t}", "public void testPeriodic() {\n\t}", "@Override\n public void testPeriodic() {\n //Diagnostics.writeString(\"State\", \"TEST\");\n }", "public void testPeriodic() {\r\n }", "public void testPeriodic() {\n LiveWindow.run();\n }", "public void testPeriodic() {\n LiveWindow.run();\n }", "public void testPeriodic() {\n LiveWindow.run();\n }", "public void testPeriodic() {\n LiveWindow.run();\n }", "public void testPeriodic() {\n LiveWindow.run();\n }", "public void testPeriodic() {\n LiveWindow.run();\n }", "public void testPeriodic() {\n LiveWindow.run();\n }", "public void testPeriodic() {\n LiveWindow.run();\n }", "public void testPeriodic() {\n LiveWindow.run();\n //init.start();\n }", "public void testPeriodic() {\r\n \r\n }", "public void testPeriodic() {\r\n \r\n }", "protected void runEachSecond() {\n \n }", "@Override\n public void testPeriodic() {\n CommandScheduler.getInstance().run();\n\n SmartDashboard.putNumber(\"XCOUNT\", getRobotContainer().getClimber().getxWhenPressedCount());\n\n\n }", "public void testPeriodic() \n {\n LiveWindow.run();\n }", "public void testPeriodic() {\n \t\n }", "public void testPeriodic() {\n \tterrainStates();\n \tdebug();\n }", "@Test\n public void testTimelyTest() {\n }", "public void testPeriodic() {\r\n \r\n }", "@SuppressWarnings(\"PMD.JUnit4TestShouldUseTestAnnotation\")\n public void testPeriodic() {\n if (m_tmpFirstRun) {\n System.out.println(\"Default testPeriodic() method... Override me!\");\n m_tmpFirstRun = false;\n }\n }", "protected void runEachMinute() {\n \n }", "@Test\n public void refresh() throws Exception {\n }", "@Override\r\n public void runTests() {\r\n getTemperature();\r\n }", "@Override\n public void simulationPeriodic() {\n }", "public void demoSchduleMethod() {\n log.info(\"Method executed at every 5 seconds. Current time is :: \" + new Date());\n }", "@Override\n public void periodic() {\n // This method will be called once per scheduler run\n }", "private void dofakework() {\n\t\ttry {\n\t\t\tThread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Before\r\n\tpublic void doThisEveryTime() {\n\t}", "@Override\n public void simulationPeriodic() {\n }", "public void run() {\n\n long now = System.currentTimeMillis();\n //System.out.println(\"1: \" + this.getClass().getName() + \"#\" + id + \", \" + (System.currentTimeMillis()) + \" ms\");\n try {\n\n test.setUp();\n this.testReport = new TestReport(id, this.getClass().getName());\n while (alive.get()) {\n test.test(this.id);\n counter.incrementAndGet();\n }\n //long stop = System.currentTimeMillis();\n //System.out.println(\"2: \" + this.getClass().getName() + \"#\" + id + \", \" + stop + \" \" + (stop - now) + \" ms\");\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n test.tearDown();\n this.testReport.stopTimers();\n //testReport.printInfo();\n } catch (Exception e) {\n // ignore errors in tearDown for now\n }\n }\n\n }", "@Override\n public void autonomousPeriodic() {\n \n }", "public void run() {\n\t\t\t \t \n\t\t\t \t test.load2();\n\t\t\t \t //System.out.println(\"heart beat report\"+System.currentTimeMillis());\n\t\t\t }", "public void _testSandbox() throws InterruptedException{\n Thread.sleep(500000);\n }", "@Override\n public void autonomousPeriodic() {\n\n }", "public void run() {\n\t\t\t \t \n\t\t\t \t test.load1();\n\t\t\t \t //System.out.println(\"heart beat report\"+System.currentTimeMillis());\n\t\t\t }", "protected void runEach10Minutes() {\n try {\n saveHistoryData();\n if (isEnabledScheduler()) {\n boolean action = getLightSchedule().getCurrentSchedule();\n if (action) {\n if (!currentState) switchOn();\n } else {\n if (currentState) switchOff();\n }\n }\n } catch (RemoteHomeManagerException e) {\n RemoteHomeManager.log.error(44,e);\n } catch (RemoteHomeConnectionException e) {\n RemoteHomeManager.log.error(45,e);\n }\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n\tpublic void testPeriodic(IRobot robot) {\n\t}", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void autonomousPeriodic() {\n }", "protected void runEachHour() {\n \n }", "protected void runAfterTest() {}", "@Override\n public void periodic() {\n UpdateDashboard();\n }", "@Override\n\tpublic void sleep() {\n\t\t\n\t}", "public void runLastTime(){\n\t\t/*try {\n\t\t\tlong timeDiff = 100;\n\t\t\t\n\t\t\tFeatureListController controller = new FeatureListController(timeDiff);\n\t\t\tTestSensorListener listener1 = new TestSensorListener();\n\t\t\tcontroller.registerSensorListener(listener1);\n\t\t\tTestSensorListener listener2 = new TestSensorListener();\n\t\t\tcontroller.registerSensorListener(listener2);\n\t\t\t\n\t\t\t\n\t\t\t//20 samples in total\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tThread.sleep(10);\n\t\t\tcontroller.addFeatureList(listener2, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\tcontroller.addFeatureList(listener1, new FeatureList(new double[10], new Timestamp(new Date().getTime())));\n\t\t\t\n\t\t\t\n\t\t\tfor(int i=0;i<2;++i){\n\t\t\t\tSensorListener listener;\n\t\t\t\tif(i==0)\n\t\t\t\t\tlistener = listener1;\n\t\t\t\telse \n\t\t\t\t\tlistener = listener2;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"LISTENER\" + (i+1));\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Now:\" + new Date().getTime());\n\t\t\t\tList<FeatureList> featureLists = controller.getLastFeatureListsInMilliseconds(listener, -1);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"All feature lists with milliseconds method\");\n\t\t\t\tfor(FeatureList l : featureLists)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"All feature lists with n method\");\n\t\t\t\tList<FeatureList> featureLists2 = controller.getLastNFeatureList(listener, -1);\n\t\t\t\tfor(FeatureList l : featureLists)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Last milliseconds \" + 40);\n\t\t\t\tList<FeatureList> featureLists3 = controller.getLastFeatureListsInMilliseconds(listener, 40);\n\t\t\t\tfor(FeatureList l : featureLists3)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Last N Feature Lists \" + 6);\n\t\t\t\tList<FeatureList> featureLists4 = controller.getLastNFeatureList(listener, 6);\n\t\t\t\tfor(FeatureList l : featureLists4)\n\t\t\t\t\tSystem.out.println(l.getTimestamp().getTime());\n\t\t\t}\n\t\t\t\n\n\t\t} catch (InterruptedException ex) {\n\t\t\tSystem.out.println(ex.getLocalizedMessage());\n//Logger.getLogger(CaseFeatureListController.class.getName()).log(Level.SEVERE, new double[10], ex);\n\t\t}*/\n\t\t\n\t}", "@Override\n\tpublic void homeTestRun() {\n\t\t\n\t}", "@Override\r\n\tpublic void run() {\r\n\t\ttimer = new Timer();\r\n\t\ttimer.schedule(new TimerTask() {\r\n\t\t\t@Override\r\n public void run() {\r\n Main.myIntegratedSensorSuite.reinitializeRainData();\r\n }\r\n\t\t}, 0, 20000); //runs once initially then again every 20 seconds\r\n\t}", "@Override\r\n\tpublic void perSecond() {\n\r\n\t}", "private void stressTest() {\n\t\t\n\t\tTimerTask task = new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tint count = 1;\n\t\t\t\tint len = 100;\n\t\t\t\tint maxCount = 1000000;\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Start stress test...\");\n\t\t\t\twhile (count <= maxCount) {\n\t\t\t\t\t\n\t\t\t\t\tif ((count % 1000) == 0) {\n\t\t\t\t\t\tSystem.out.println(\"Count: \" + count + \" of \" + maxCount);\n\t\t\t\t\t\tSystem.gc();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tlong larray[] = new long[len];\n\t\t\t\t\t\n\t\t\t\t\tlarray[0] = count;\n\t\t\t\t\tlarray[len-1] = count;\n\t\t\t\t\t\n\t\t\t\t\tMessage message = Message.createMessage(getId(), \"Triggers\");\n\t\t\t\t\tmessage.setPayload(larray);\n\t\t\t\t\tsend(message);\n\n\t\t\t\t\t\n//\t\t\t\t\ttry {\n//\t\t\t\t\t\tThread.sleep(25);\n//\t\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t}\n\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Done.\");\n\n\t\t\t}\n\n\t\t};\n\n\t\tTimer timer = new Timer();\n\t\t// one time schedule\n\t\ttimer.schedule(task, 2000L);\n\t}", "@Override\n public void autonomousPeriodic() {\n \n Scheduler.getInstance().run();\n \n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void periodic() {\n\n }", "@Override\n public void autonomousPeriodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }", "@Override\n public void periodic() {\n }" ]
[ "0.7800467", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.75683486", "0.7513078", "0.7469104", "0.7374911", "0.7364876", "0.7364876", "0.7364876", "0.7364876", "0.73407346", "0.7327271", "0.73171455", "0.73171455", "0.7293993", "0.7293993", "0.72312987", "0.7207229", "0.720396", "0.71983147", "0.716904", "0.716904", "0.716904", "0.713752", "0.7127215", "0.7124398", "0.71158797", "0.71142244", "0.71142244", "0.71142244", "0.71142244", "0.71142244", "0.71142244", "0.71142244", "0.71142244", "0.71140385", "0.7108927", "0.7108927", "0.7086685", "0.6976778", "0.6969408", "0.6967512", "0.6930725", "0.68409485", "0.67182064", "0.6617569", "0.6584265", "0.65554386", "0.65530086", "0.65268195", "0.64798206", "0.6477171", "0.6472228", "0.6443787", "0.6429172", "0.6394023", "0.63703555", "0.6364299", "0.63590497", "0.634407", "0.63261676", "0.63225466", "0.6301144", "0.6301144", "0.62885046", "0.6285774", "0.6285774", "0.6285774", "0.62847394", "0.6282452", "0.62705654", "0.6259278", "0.62195456", "0.6217139", "0.62130535", "0.6211397", "0.6197089", "0.61921287", "0.6189988", "0.6189988", "0.6189988", "0.6189988", "0.6185031", "0.6179041", "0.6179041", "0.6179041", "0.6179041", "0.6179041", "0.6179041", "0.6179041", "0.6179041", "0.6179041" ]
0.72778416
24
TODO Autogenerated method stub
public static void main(String[] args) { Scanner sc=new Scanner(System.in); System.out.println("Enter number till which ypou want armstrong numbers to be printed"); int n=sc.nextInt(); for(int i=2;i<=n;i++) { if(check(i)==true) 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
/ Time complexity: O(n^2) worst case Space complexity: O(1)
public static void selectionSort(int[] arr) { for (int i = 0; i < arr.length; i++) { int min_index = i; for (int j = i; j < arr.length; j++) { if (arr[min_index] > arr[j]) min_index = j; } if (min_index != i) Utilities.swap(arr, i, min_index); // System.out.println(Arrays.toString(arr)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int f2(int N) { \n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n)\n // O(n)`\n for(int j = 0; j < i; j++) \n x++;\n return x;\n }", "public static int f1(int N) {\n int x = 0; //O(1)\n for(int i = 0; i < N; i++) // O(n) \n x++; \n return x; \n \n }", "public int[] squareUp(int n) {\r\n int[]arreglo=new int[(n*n)]; // O(1)\r\n if(n==0){ // O(1)\r\n return arreglo; // O(1)\r\n }\r\n for(int i=n-1;i<arreglo.length;i=i+n){ // O(n)\r\n for (int j=i;j>=i-(i/n);j--){ // O(1)\r\n arreglo[j]=1+(i-j); // O(1)\r\n }\r\n }\r\n return arreglo; // O(1)\r\n}", "public static int example2(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j += 2) // note the increment of 2 // O(1)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Once Again, we have a (for) loop and it runs (n) times and this\r\n\t\t * for loop dominates the runtime.So this is linear time and the answer is O(n).\r\n\t\t * \r\n\t\t */\r\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\n\t\tint a[] = {2,1,3,-4,-2};\n\t\t//int a[] = {1 ,2, 3, 7, 5};\n\t\tboolean found = false;\n\t\t\n\t\t//this will solve in o n^2\n\t\tfor(int i = 0 ; i < a.length ; i++){\n\t\t\tint sum = 0;\n\t\t\tfor(int j = i ; j< a.length ; j++){\n\t\t\t\tsum += a[j] ;\n\t\t\t\tif(sum == 0){\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif(found)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\t// link : https://www.youtube.com/watch?v=PSpuM9cimxA&list=PLKKfKV1b9e8ps6dD3QA5KFfHdiWj9cB1s&index=49\n\t\tSystem.out.println(found + \" found\");\n\t\tfound = false;\n\t\t//solving with O of N with the help sets\n\t\t// x + 0 = y\n\t\tSet<Integer> set = new HashSet<>();\n\t\tint sum = 0;\n\t\tfor(int element : a){\n\t\t\tset.add(sum);\n\t\t\tsum += element;\n\t\t\tif(set.contains(sum)){\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(set);\n\t\t\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t\tfound = false;\n\t\t// when the sum of subarray is K\n\t\t\n\t\t//solving with O of N with the help sets\n\t\t//x + k = y >>>\n\t\tSet<Integer> set1 = new HashSet<>();\n\t\tint k = 12;\n\t\tint summ = 0;\n\t\tfor(int element : a){\n\t\t\tset1.add(summ);\n\t\t\tsumm += element;\n\t\t\tif(set1.contains(summ - k)){ // y - k = x(alredy presnt or not)\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(set1);\n\t\tSystem.out.println();\n\t\tSystem.out.println(found + \" found\");\n\t\t\n\t\t\n\t}", "public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}", "public static void main(String args[] ) throws Exception {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int[] seqArray = new int[n];\n for (int i = 0; i < n; i++) {\n seqArray[i] = scanner.nextInt();\n }\n // getSeqValue(seqArray); //this method is an accepted one on Hackerrank but time complexity is not order n; i.e. !O(n);\n getLinearOrderY(seqArray); // trying to get O(n) time complexity;\n }", "public int[] fix34(int[] nums) {\r\n\tint i=0; // O(1)\r\n while(i<nums.length && nums[i]!=3) // O(n)\r\n i++; // n+1\r\n int j=i; // O(1)\r\n while(j+1<nums.length && nums[j+1]!=4) // O(n)\r\n j++; // n+1\r\n while(i<nums.length){ // O(n)\r\n if(nums[i]==3){ // O(1)\r\n int temp=nums[i+1]; // O(1)\r\n nums[i+1]=nums[j+1]; //O(1)\r\n nums[j+1]=temp; // O(1)\r\n while(j+1<nums.length && nums[j+1] != 4) //O(n)\r\n j++; // n+1\r\n }\r\n i++; // n+1\r\n }\r\n return nums; //O(1)\r\n}", "public static int example4(int[] arr) { // O(1)\r\n\t\tint n = arr.length, prefix = 0, total = 0; // O(1), O(1), (1)\r\n\t\tfor (int j = 0; j < n; j++) { // loop from 0 to n-1 // O(n)\r\n\t\t\tprefix += arr[j];\r\n\t\t\ttotal += prefix;\r\n\t\t}\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: The method contains a (for) loop and it runs (n) times.This loop\r\n\t\t * dominates the runtime.We always aim for the worse-case and maximum time. The\r\n\t\t * answer is it is linear time of O(n) notation.\r\n\t\t * \r\n\t\t */\r\n\t}", "private final int m()\n\t { int n = 0;\n\t int i = 0;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break; i++;\n\t }\n\t i++;\n\t while(true)\n\t { while(true)\n\t { if (i > j) return n;\n\t if (cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t n++;\n\t while(true)\n\t { if (i > j) return n;\n\t if (! cons(i)) break;\n\t i++;\n\t }\n\t i++;\n\t }\n\t }", "static int[] sol1(int[]a, int n){\r\n\t\tMap <Integer,Integer> map= new HashMap();\r\n\t\tfor (int i = 0; i< a.length; i++){\r\n\t\t\tmap.put(a[i],i);\r\n\t\t}\r\n\t\tArrays.sort(a);\r\n\t\tint i = 0; \r\n\t\tint j = a.length -1;\r\n\t\twhile (i <= j){\r\n\t\t\tif(a[i]+a[j]>n) j--;\r\n\t\t\telse if (a[i]+a[j]<n) i++;\r\n\t\t\telse break;\r\n\t\t}\r\n\t\tint[] ans= {map.get(a[i]),map.get(a[j])};\r\n\t\treturn ans;\r\n\t}", "private static int betterSolution(int n) {\n return n*n*n;\n }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public static int[] exe1(int[] arr){ // Solution O(n) in time and constant in Memory\n int nzeros=0;\n\n for (int i=0; i<arr.length; i++) {\n arr[i-nzeros] = arr[i];\n if (arr[i] == 0) {\n nzeros++;\n }\n }\n for (int i=arr.length-1; i>arr.length-nzeros-1; i--) {\n arr[i] = 0;\n }\n\n return arr;\n }", "private static int solution2(String s) {\r\n int n = s.length();\r\n int ans = 0;\r\n for (int i = 0; i < n; i++)\r\n for (int j = i + 1; j <= n; j++)\r\n if (allUnique(s, i, j)) ans = Math.max(ans, j - i);\r\n return ans;\r\n }", "public void sum2(int n){\n int sum =0; //1\n for (int j = 0; j < n; j++) //2n+2\n for (int k = 0; k < n; k++) //2n+2\n sum += k + j; //1\n for (int l = 0; l < n; l++) //2n+2\n sum += l; //1\n }", "public int findDuplicate(int[] nums) {\n if(nums == null || nums.length == 0) return 0;\n\n int slow = nums[0];\n int fast = nums[nums[0]];\n\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[nums[fast]];\n }\n\n fast = 0;\n while(slow != fast) {\n slow = nums[slow];\n fast = nums[fast];\n }\n\n return slow;\n}", "public static int solveEfficient(int n) {\n if (n == 0 || n == 1)\n return 1;\n\n int n1 = 1;\n int n2 = 1;\n int sum = 0;\n\n for (int i = 2; i <= n; i++) {\n sum = n1 + n2;\n n1 = n2;\n n2 = sum;\n }\n return sum;\n }", "static int[] OnepassSol1(int[]a, int n){\r\n Map<Integer, Integer> map = new HashMap<>();\r\n for (int i = 0; i < a.length; i++) {\r\n int complement = n - a[i];\r\n if (map.containsKey(complement)) {\r\n return new int[] { map.get(complement), i };\r\n }\r\n map.put(a[i], i);\r\n }\r\n int[] ans = {-1,-1};\r\n return ans;\r\n }", "public static boolean find3Numbers(int A[], int n, int X) { \n \n // Your code \n for(int i=0;i<n-2;i++)\n {\n HashSet<Integer> set = new HashSet<>();\n int toFind=X-A[i];\n for(int j=i+1;j<n;j++)\n {\n if(set.contains(toFind-A[j]))\n {\n return true;\n }\n set.add(A[j]);\n }\n }\n return false;\n }", "public static void main(String[] args) {\n\t\tint a[]= {15,3,7,1,9,2};\n\t\tsubarraysum(a,11);//Time complexity O(n^2) space O(1)\n\n\t\tsubarraysum_reducecomplexity(a,11,a.length); //Time complexity O(n) space O(1)\n\n\t}", "public static int example1(int[] arr) { // O(1)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n)\r\n\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\t}", "public static int f5(int N) { \n int x = 0;\n // log(n)\n for(int i = N; i > 0; i = i/2)\n // O(n) + O(n/2) + O(n/4)\n x += f1(i);\n \n return x; \n \n }", "int minOperations(int[] arr) {\n // Write your code here\n Set<String> set = new HashSet<>();//store visited string\n Queue<String> queue = new LinkedList<>(); // store next strs\n int counter = 0;\n\n queue.offer(getKey(arr));\n set.add(getKey(arr));\n\n while (!queue.isEmpty()) {\n int size = queue.size();\n List<String> curs = new ArrayList<>();\n while (size > 0) {\n curs.add(queue.poll());\n size--;\n }\n\n for(String cur : curs) {\n if (isIncreasing(cur)) {\n return counter;\n }\n\n for(int i = 0; i < cur.length(); i++) {\n String next = reverseString(cur, i);\n if (!set.contains(next)) {\n set.add(next);\n queue.offer(next);\n }\n }\n }\n\n counter++;\n }\n\n return counter;\n }", "private static void get4ElementsSumCountFastest(String inputLine, int target) {\n String[] arr = inputLine.split(\" \");\n if (arr.length < 3) {\n System.out.println(0);\n return;\n }\n\n Map<Integer, Set<String>> pairSumMap = new HashMap<>();\n List<Integer> list = new ArrayList<>(arr.length);\n for (String s : arr) {\n list.add(Integer.parseInt(s.trim()));\n }\n\n int sum = 0, diff = 0;\n for (int i = 0; i < arr.length; i++) {\n for (int j = i + 1; j < arr.length; j++) {\n sum = list.get(i) + list.get(j);\n if (sum < target) {\n pairSumMap.putIfAbsent(sum, new HashSet<>());\n pairSumMap.get(sum).add(i + \"-\" + j);\n }\n }\n }\n\n for (Map.Entry<Integer, Set<String>> mk : pairSumMap.entrySet()) {\n diff = target - mk.getKey();\n if (pairSumMap.containsKey(diff)) {\n Set<String> indexesList = mk.getValue();\n for (String index : indexesList) {\n int indexOrgX = Integer.parseInt(index.split(\"-\")[0]);\n int indexOrgY = Integer.parseInt(index.split(\"-\")[1]);\n for (String newIdx : pairSumMap.get(diff)) {\n int indexNewX = Integer.parseInt(newIdx.split(\"-\")[0]);\n int indexNewY = Integer.parseInt(newIdx.split(\"-\")[1]);\n if (indexOrgX != indexNewX && indexOrgX != indexNewY && indexOrgY != indexNewX && indexOrgY != indexNewY) {\n System.out.println(1);\n return;\n }\n }\n }\n }\n }\n System.out.println(0);\n }", "public List<List<Integer>> threeSum(int[] nums) {\n List<List<Integer>> result = new ArrayList<>(nums.length);\n\n // Prepare\n Arrays.sort(nums);\n// int firstPositiveIndex = 0;\n// int negativeLength = 0;\n// List<Integer> numsFiltered = new ArrayList<>();\n// for (int i = 0; i < nums.length; i++) {\n// if (i == 0 || i == 1 || nums[i] == 0 || (nums[i] != nums[i-2])) {\n// numsFiltered.add(nums[i]);\n// if ((nums[i] >= 0) && (firstPositiveIndex == 0)) {\n// firstPositiveIndex = numsFiltered.size() - 1;\n// }\n// if ((nums[i] <= 0)) {\n// negativeLength = numsFiltered.size();\n// }\n// }\n// }\n// nums = numsFiltered.stream().mapToInt(i->i).toArray();\n\n // Func\n\n for(int i=0; (i < nums.length) && (nums[i] <= 0); i++) {\n if (i != 0 && nums[i] == nums[i-1]) {\n continue;\n }\n for(int j=i+1; j<nums.length; j++) {\n if (j != i+1 && nums[j] == nums[j-1]) {\n continue;\n }\n for(int k=nums.length-1; (k>j) && nums[k] >= 0; k--) {\n if (k != nums.length-1 && nums[k] == nums[k+1]) {\n continue;\n }\n int sum = nums[i]+nums[j]+nums[k];\n if (sum > 0) {\n continue;\n } else if (sum < 0) {\n break;\n }\n\n List<Integer> ok = new ArrayList<>();\n ok.add(nums[i]);\n ok.add(nums[j]);\n ok.add(nums[k]);\n result.add(ok);\n break;\n }\n }\n }\n\n// System.out.println(\"Finish time = \" + (System.nanoTime() - start) / 1_000_000);\n// System.out.println(\"result size = \" + result.size());\n\n return result;\n }", "public static void process(int n){\n\t\tint right, left, i;\n\n\t\tright = i = 0;\n\t\twhile(i < n){\n\t\t\twhile (right < n && c[i] == c[right]) right++;\n\t\t\tfor(int j = i; j < right; ++j) max_right[j] = right;\n\t\t\ti = right;\n\t\t}\n\n\t\tleft = i = n-1;\n\t\twhile(i >= 0){\n\t\t\twhile (left >= 0 && c[i] == c[left]) left--;\n\t\t\tfor (int j = i; j > left; --j) max_left[j] = left;\n\t\t\ti = left;\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint arr[] = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarr[i] = sc.nextInt();\n\t\t}\n\t\tint sum = sc.nextInt();\n\t\tHashMap<Integer,Integer> map = new HashMap<>();\n \t\tArrays.sort(arr);\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint temp = arr[i];\n\t\t\tint reqSum = sum-temp;\n\t\t\tarr[i]=0;\n\t\t\tint l=0;\n\t\t\tint r = n-1;\n\t\t\twhile(l<r) {\n\t\t\t\t//System.out.println(\"l \" + l + \" r \" + r + \" i = \"+ i);\n\t\t\t\tif(arr[l] + arr[r]==reqSum && arr[l]!=0 && arr[r]!=0 ) {\n\t\t\t\t\tint arr2[] = new int[3];\n\t\t\t\t\tarr2[0] = temp;\n\t\t\t\t\tarr2[1] = arr[l];\n\t\t\t\t\tarr2[2] = arr[r];\n\t\t\t\t\tif(map.containsKey(arr2[0]) || map.containsKey(arr2[1]) || map.containsKey(arr2[2])) {\n\t\t\t\t\t\t\n\t\t\t\t\t}else {\n\t\t\t\t\t\tArrays.sort(arr2);\n\t\t\t\t\t\tSystem.out.println(arr2[0] + \" \" + arr2[1] + \" \" + arr2[2]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tl++;\n\t\t\t\t}else if(arr[l] + arr[r] < reqSum) {\n\t\t\t\t\tl++;\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tr--;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tarr[i] = temp;\t\n\t\t\tmap.put(arr[i], 1);\n\t\t}\n\t}", "static int getMissingByAvoidingOverflow(int a[], int n)\n\t {\n\t int total = 2;\n\t for (int i = 3; i <= (n + 1); i++)\n\t {\n\t total =total+ i -a[i - 2];\n\t //total =total- a[i - 2];\n\t }\n\t return total;\n\t }", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "static int[] find2(int a[]){\r\n int sum = a[0];\r\n int pro = a[0];\r\n for(int i=1;i<a.length;i++){\r\n sum += a[i];\r\n pro += a[i]*a[i];\r\n }\r\n int s = (n*(n+1))/2 - sum;\r\n int p = (n*(n+1)*(2*n+1))/6 - pro;\r\n return solveSP(s, p);\r\n }", "@Override public short getComplexity() {\n return 0;\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int T = sc.nextInt();\n for(int i = 0 ; i < T; i++) {\n int n = sc.nextInt();\n int a = sc.nextInt();\n int b = sc.nextInt();\n PriorityQueue<Integer> queue = new PriorityQueue<Integer>();\n int[][] m = new int[n][n];\n //n^2 * log(n)\n for(int row = 0; row < n; row++) {\n for(int col = 0; col < n; col++) {\n if(row == 0 && col == 0 && n != 1) {\n continue;\n }else if(row == 0) {\n m[row][col] = m[row][col - 1] + a;\n }else if(col == 0) {\n m[row][col] = m[row-1][col] + b;\n }else {\n m[row][col] = m[row-1][col-1] + a + b;\n }\n\n if(row + col == (n -1)) {\n pool.add(m[row][col]); //log(n)\n }\n }\n }\n //O(n*log(n))\n for (Integer item:pool) {\n queue.add(item); //O(logn)\n }\n while(!queue.isEmpty()) {\n System.out.print(queue.poll() + \" \"); //O(1)\n }\n System.out.println();\n queue.clear();\n pool.clear();\n }\n }", "static long nPolyNTime(int[] n) {\n int temp = n.length;\n long sum = 0;\n if(n == null || n.length == 0) return -1;\n for(int i = 0; i < n.length; ++i) {\n while(temp --> 0) {\n for(int j = 0; j < n.length; ++j) {\n sum += n[i] + n[j];\n }\n }\n }\n return sum;\n }", "public static void main(String[] args) {\nScanner s=new Scanner(System.in);\nint n=s.nextInt();\nint a[]=new int[n];\nint x=0;\nfor(int i=1;i<=n;i++)\n{\n\tif(i%2!=0)\n\t{\n\t\ta[x++]=i;\n\t}\n}\nint sum=0;\nsum=a[0];\nfor(int i=0;i<x;i++)\n{\n\tif((i+1)<x)\n\t{\n\tif(i%2==0)\n\t\tsum=sum+a[i+1];\n\telse\n\t\tsum=sum-a[i+1];\n\t}\n}\nSystem.out.println(sum);\n\t}", "void h(List<List<Integer>> r, List<Integer> t, int n, int s){ \n for(int i = s; i*i <= n; i++){\n if(n % i != 0) continue; \n t.add(i);\n t.add(n / i);\n r.add(new ArrayList<>(t));\n t.remove(t.size() - 1);\n h(r, t, n/i, i);\n t.remove(t.size() - 1);\n }\n }", "public static int ulam(int n) {\n\n List<Integer> list = new ArrayList<>();\n list.add(1);\n list.add(2);\n\n int i = 3;\n while (list.size() < n) {\n\n int count = 0;\n for (int j = 0; j < list.size() - 1; j++) {\n\n for (int k = j + 1; k < list.size(); k++) {\n if (list.get(j) + list.get(k) == i)\n count++;\n if (count > 1)\n break;\n }\n if (count > 1)\n break;\n }\n if (count == 1)\n list.add(i);\n i++;\n }\n return list.get(n - 1);\n }", "static int trappingWater(int arr[], int n) {\r\n\r\n // Your code here\r\n /** *** tle\r\n for(int i=1;i<n-1;i++){\r\n int l=arr[i];\r\n for (int j = 0; j < i; j++) {\r\n l=l < arr[j] ? arr[j] : l;\r\n }\r\n int r=arr[i];\r\n for (int j = i+1; j <n ; j++) {\r\n r=r < arr[j] ? arr[j] : r;\r\n }\r\n\r\n s=s+(l>r? r:l) -arr[i];\r\n }\r\n return s;\r\n\r\n //////////////////////////////////////////////\r\n SC=O(N)\r\n if(n<=2)\r\n return 0;\r\n int[] left=new int[n];\r\n int[] right=new int[n];\r\n left[0]=0;\r\n int leftmax=arr[0];\r\n for (int i = 1; i <n ; ++i) {\r\n left[i]=leftmax;\r\n leftmax=Math.max(leftmax,arr[i]);\r\n }\r\n right[n-1]=0;\r\n int mxright=arr[n-1];\r\n for (int i = n-2; i >=0 ; --i) {\r\n right[i]=mxright;\r\n mxright=Math.max(mxright,arr[i]);\r\n }\r\n int s=0;\r\n for (int i = 1; i < n-1; ++i) {\r\n if(arr[i]<left[i] && arr[i]<right[i]){\r\n s+=Math.min(left[i],right[i])-arr[i];\r\n }\r\n }\r\n return s;\r\n /////////////////////////////////////////////////////\r\n **/\r\n\r\n if(n<=2)\r\n return 0;\r\n\r\n int leftMax = arr[0];\r\n int rightMax = arr[n-1];\r\n\r\n int left = 1;\r\n int right = n-2;\r\n int water = 0;\r\n\r\n while(left <= right) {\r\n if (leftMax < rightMax) {\r\n if (arr[left] >= leftMax) {\r\n leftMax = arr[left];\r\n } else\r\n water = water + (leftMax - arr[left]);\r\n\r\n //leftMax = Math.max(leftMax, arr[left]);\r\n left++;\r\n } else {\r\n if (arr[right] > rightMax) {\r\n rightMax = arr[right];\r\n }\r\n\r\n water = water + (rightMax - arr[right]);\r\n right--;\r\n }\r\n }\r\n return water;\r\n\r\n }", "static long findSum(int N)\n\t{\n\t\tif(N==0) return 0;\n\t\treturn (long)((N+1)>>1)*((N+1)>>1)+findSum((int)N>>1);\n\t\t\n\t}", "private static int f(int n, int complete, int other, int[] arr) {\n if(n<=0)\n return 0;\n int res=0;\n ArrayList<Integer>list=new ArrayList<Integer>();\n for(int a:arr)\n if(a>0)\n list.add(a);\n int brr[]=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n while(brr.length!=0){\n int index=0;\n for(int i=1;i<brr.length;i++)\n if(brr[index]<brr[i])\n index=i;\n for(int i=0;i<brr.length;i++){\n if(index==i)\n brr[i]-=complete;\n else\n brr[i]-=other;\n }\n list=new ArrayList<Integer>();\n for(int a:brr)\n if(a>0)\n list.add(a);\n brr=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n res++;\n }\n return res;\n }", "public static int degreeOfArray(List<Integer> arr) { arr.length = n\n // num of Keys = k\n // O(n + k)\n // max value count = m\n //\n PriorityQueue<Node> pq = new PriorityQueue<>((i, j)-> j.count - i.count);\n Map<Integer, NodePosition> posMap = new HashMap<>();\n Map<Integer, Node> countMap = new HashMap<>();\n // [1, 2, 3, 4, 5, 6]\n for (int i = 0; i < arr.size(); i++) {\n int cur = arr.get(i);\n\n if (!countMap.containsKey(cur)) {\n countMap.put(cur, new Node(cur, 1));\n } else {\n Node curNode = countMap.get(cur);\n curNode.count++;\n countMap.put(cur, curNode);\n }\n\n if (!posMap.containsKey(cur)) {\n posMap.put(cur, new NodePosition(i, i));\n } else {\n NodePosition curNodePos = posMap.get(cur);\n curNodePos.endIndex = i;\n posMap.put(cur, curNodePos);\n }\n }\n //Iterator<Map.Entry<Integer, Node> it = new Iterator<>(countMap);\n for (Map.Entry<Integer, Node> e : countMap.entrySet()) {\n pq.add(e.getValue());\n }\n\n // [1, 2, 1, 3 ,2]\n // 1 , 2 , 3\n Node curNode = pq.remove();\n int maxCount = curNode.count;\n\n int minRange = posMap.get(curNode.num).endIndex - posMap.get(curNode.num).startIndex;\n\n while (!pq.isEmpty() && maxCount == pq.peek().count) {\n curNode = pq.remove();\n NodePosition nPos = posMap.get(curNode.num);\n minRange = Math.min(minRange, nPos.endIndex - nPos.startIndex);\n }\n\n return minRange + 1;\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t\tint n = sc.nextInt();\r\n\t\tint[] a = new int[n];\r\n\t\tfor(int i = 0; i < n; i++){\r\n\t\t\ta[i] = sc.nextInt();\r\n\t\t}\r\n\t\tint res = 0, p = 0, t = 0;\r\n\t\twhile(true){\r\n\t\t\tp = 0; t = 0;\r\n\t\t\tfor(int i = 0; i < a.length; i++){\r\n\t\t\t\t\r\n\t\t\t\tif(i == a.length-1){\r\n\t\t\t\t\ta[i] /= 2;\r\n\t\t\t\t\tt = a[i];\r\n\t\t\t\t\ta[i] += p;\r\n\t\t\t\t\tp = t;\r\n\t\t\t\t\ta[0] += p;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\ta[i] /= 2;\r\n\t\t\t\t\tt = a[i];\r\n\t\t\t\t\ta[i] += p;\r\n\t\t\t\t\tp = t;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tboolean flag = true;\r\n\t\t\tint temp = a[0];\r\n\t\t\tfor(int j = 1; j < a.length; j++){\r\n\t\t\t\tif(a[j] != temp){\r\n\t\t\t\t\tflag = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(flag){\r\n\t\t\t\tSystem.out.println(res);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tfor(int j = 0; j < a.length; j++){\r\n\t\t\t\tif(a[j] % 2 != 0){\r\n\t\t\t\t\ta[j] += 1;\r\n\t\t\t\t\tres++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static int solution(int[] arr) {\n int n = arr.length;\n for (int i = 0; i < n; i++) {\n while (arr[i] != i + 1 && arr[i] < n && arr[i] > 0) {\n int temp = arr[i];\n if (temp == arr[temp - 1])\n break;\n arr[i] = arr[temp - 1];\n arr[temp - 1] = temp;\n }\n }\n for (int i = 0; i < n; i++)\n if (arr[i] != i + 1)\n return i + 1;\n return n + 1;\n }", "private int gameV(int i, int j, int x) {\n int count = 2;\n for (int ii = 0; ii < i; ii++) {\n for (int jj = ii + 1; jj < n; jj++) {\n if (ii != x && jj != x) count++;\n }\n }\n for (int jj = i + 1; jj < j; jj++) {\n if (jj != x) count++;\n }\n return count;\n }", "static int gen(int n)\n{ \n int []S = new int [n + 1];\n \n S[0] = 0;\n if(n != 0)\n S[1] = 1;\n \n for (int i = 2; i <= n; i++)\n { \n \n // S(2 * n) = 4 * S(n)\n if (i % 2 == 0)\n S[i] = 4 * S[i / 2];\n \n // S(2 * n + 1) = 4 * S(n) + 1\n else\n S[i] = 4 * S[i/2] + 1;\n }\n \n return S[n];\n}", "private int getCondensedIndex(int n, int i, int j) {\n if (i < j) {\n return n * i - (i * (i + 1) / 2) + (j - i - 1);\n }\n else if (i > j) {\n return n * j - (j * (j + 1) / 2) + (i - j - 1);\n }\n else{\n return 0;\n }\n }", "static int countSubarrWithEqualZeroAndOne(int arr[], int n)\n {\n int count=0;\n int currentSum=0;\n HashMap<Integer,Integer> mp=new HashMap<>();\n for(int i=0;i<arr.length;i++)\n {\n if(arr[i]==0)\n arr[i]=-1;\n currentSum+=arr[i];\n \n if(currentSum==0)\n count++;\n if(mp.containsKey(currentSum))\n count+=mp.get(currentSum);\n if(!mp.containsKey(currentSum))\n mp.put(currentSum,1);\n else\n mp.put(currentSum,mp.get(currentSum)+1);\n \n \n }\n return count;\n }", "public static ArrayList<ArrayList<Integer>> fourSum(ArrayList<Integer> a, int k) {\n Collections.sort(a);\n System.out.println(a);\n LinkedHashMap<Integer, List<List<Integer>>> m = new LinkedHashMap<Integer, List<List<Integer>>>();\n for (int i = 0; i <= a.size() - 3; i++) {\n for (int j = i + 1; j <= a.size() - 2; j++) {\n if (m.get(a.get(i) + a.get(j)) == null) {\n ArrayList<List<Integer>> v = new ArrayList<List<Integer>>();\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n } else {\n List<List<Integer>> v = m.get(a.get(i) + a.get(j));\n List<Integer> c = new ArrayList<Integer>();\n c.add(i);\n c.add(j);\n v.add(c);\n m.put(a.get(i) + a.get(j), v);\n }\n\n }\n }\n LinkedHashSet<ArrayList<Integer>> res = new LinkedHashSet<ArrayList<Integer>>();\n for (int i = 2; i <= a.size() - 1; i++) {\n for (int j = i + 1; j < a.size(); j++) {\n List<List<Integer>> v = m.get(k - (a.get(i) + a.get(j)));\n if (v != null && v.size() >= 1) {\n for (List<Integer> l : v) {\n\n if (l.get(0) < l.get(1) && l.get(1) < i && l.get(1) < j) {\n //System.out.println(l.get(0) + \" \" + l.get(1) + \" \" + i + \" \" + j);\n ArrayList<Integer> out = new ArrayList<Integer>();\n out.add(a.get(l.get(0)));\n out.add(a.get(l.get(1)));\n out.add(a.get(i));\n out.add(a.get(j));\n Collections.sort(out);\n //System.out.println(out);\n res.add(out);\n }\n }\n }\n }\n }\n return new ArrayList<ArrayList<Integer>>(res);\n }", "public boolean linearIn(int[] outer, int[] inner) {\r\n int comp=0; // O(1)\r\n int count=0; // O(1)\r\n if(inner.length==0) // O(1)\r\n return true; // O(1)\r\n for(int i=0; i<outer.length; i++) { // O(n)\r\n if(outer[i]==inner[count]) { // O(1)\r\n comp++; // O(1)\r\n count++; // O(1)\r\n } else if(outer[i]>inner[count]) // O(1)\r\n return false; // O(1)\r\n if (comp==inner.length) // O(1)\r\n return true; // O(1)\r\n }\r\n return false; // O(1)\r\n}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int noOfElements = sc.nextInt();\n int[] arr = new int[noOfElements];\n int[] arr1 = new int[noOfElements];\n int diff = Integer.MAX_VALUE;\n int sIndex = 0;\n int j = 0;\n for (int i = 0; i < noOfElements; i++) {\n arr[i] = sc.nextInt();\n }\n for (int j1 = 1; j1 < noOfElements; j1++) {\n int i = j1 - 1;\n int key = arr[j1];\n while (i >= 0 && key < arr[i]) { // 1 2 3\n arr[i + 1] = arr[i];\n i--;\n }\n arr[i + 1] = key;\n }\n //Arrays.sort(arr);\n for (int i = 0; i < noOfElements - 1; i++) {\n int temp = Math.abs(arr[i] - arr[i + 1]);\n if (temp <= diff) {\n diff=temp;\n }\n\n }\n\n for (int i = 0; i < noOfElements - 1; i++) {\n if (Math.abs(arr[i] - arr[i+1]) == diff) {\n System.out.print(arr[i] + \" \" + arr[i+1] + \" \");\n }\n }\n// for (int a = 0; a < j; a++) {\n//\n// System.out.print(arr[arr1[a]] + \" \" + arr[arr1[a]+1] + \" \");\n// }\n\n }", "private int d(@Nullable K ☃) {\r\n/* 127 */ return (xq.f(System.identityHashCode(☃)) & Integer.MAX_VALUE) % this.b.length;\r\n/* */ }\r\n/* */ private int b(@Nullable K ☃, int i) {\r\n/* */ int j;\r\n/* 131 */ for (j = i; j < this.b.length; j++) {\r\n/* 132 */ if (this.b[j] == ☃) {\r\n/* 133 */ return j;\r\n/* */ }\r\n/* 135 */ if (this.b[j] == a) {\r\n/* 136 */ return -1;\r\n/* */ }\r\n/* */ }", "public static int[] twoSum(int[] numbers, int target) {\n // Start typing your Java solution below\n // DO NOT write main() function\n int[] aux = new int[numbers.length];\n HashMap<Integer, Integer> valueToIndex = new HashMap<Integer, Integer>();\n for (int i = 0; i < numbers.length; i++) {\n valueToIndex.put(numbers[i], i);\n aux[i] = numbers[i];\n }\n \n int i = 0, j = numbers.length - 1;\n boolean found = false;\n \n Arrays.sort(aux);\n \n while (i != j) {\n if (aux[i] + aux[j] < target) i++;\n else if (aux[i] + aux[j] > target) j--;\n else {\n found = true;\n break;\n }\n }\n \n if (!found) return null;\n \n int[] result = new int[2];\n if (aux[i] == aux[j]) { /* Handle duplicates */\n int first = -1, second = -1;\n for (int k = 0; k < numbers.length; k++) {\n if (numbers[k] == aux[i]) {\n if (first == -1) {\n first = k;\n } else if (second == -1) {\n second = k;\n break;\n }\n }\n }\n result[0] = first + 1;\n result[1] = second + 1;\n return result;\n }\n \n \n if (valueToIndex.get(aux[i]) < valueToIndex.get(aux[j])) {\n result[0] = valueToIndex.get(aux[i]) + 1;\n result[1] = valueToIndex.get(aux[j]) + 1;\n } else {\n result[0] = valueToIndex.get(aux[j]) + 1;\n result[1] = valueToIndex.get(aux[i]) + 1;\n }\n return result;\n }", "public static void main(String[] args) \n {\n int[] numOfPoints = { 1000, 10000, 7000, 10000, 13000 };\n for(int count = 0; count < numOfPoints.length; count++)\n {\n List<Point> pointsTobeUsed = new ArrayList<Point>();\n int current = numOfPoints[count];\n int inc = 0;\n \n //creating list of points to be used\n for(int x = 0; x <= current; x++)\n {\n \n if(x <= current/2)\n {\n pointsTobeUsed.add(new Point(x,x));\n \n }\n else\n {\n pointsTobeUsed.add(new Point(x, x - (1 + 2*(inc)) ) );\n inc++;\n }\n }\n \n //n logn implementation of Pareto optimal\n long timeStart = System.currentTimeMillis();\n \n // n logn quicksort\n pointsTobeUsed = quickSort(pointsTobeUsed, 0, pointsTobeUsed.size() -1 );\n \n \n \n ParetoOptimal(pointsTobeUsed);\n \n \n long timeEnd = System.currentTimeMillis();\n System.out.println(\"final:\" + \" exper: \" + (timeEnd - timeStart) + \" N: \" + current ); \n }\n }", "public static void main(String[] args) {\n\t\tArrays.fill(arr, 1);\n\t\tlong startTime = System.nanoTime();\n\t\t// Traverse till square root of MAX\n\t\t// Using logic similar to sieve of eratosthenes to\n\t\t// populate factor sum array\n\t\tint limit = (int)Math.sqrt(MAX);\n\t\tfor (int i = 2; i <= limit; ++i) {\n\t\t\tint j = i+i;\n\t\t\tint count = 2;\n\t\t\twhile (j <= MAX){\n\t\t\t\t// As we already add count (j/i) to the factor sum when adding i,\n\t\t\t\t// we don't add when i is equal to or greater than count\n\t\t\t\tif (i < count) {\n\t\t\t\t\t// Adding i and count (j/i) to the factor sum of j\n\t\t\t\t\tarr[j] += i;\n\t\t\t\t\tarr[j] += count;\n\t\t\t\t}\n\t\t\t\tj += i;\n\t\t\t\tcount++;\n\t\t\t} \n\t\t}\n\t\t\n\t\tint count = 0;\n\t\tSystem.out.println(\"The following are amicable numbers\");\n\t\tfor (int i = 2; i <= MAX; ++i) {\n\t\t\tint num = arr[i];\n\t\t\tif (num <= MAX && num > i) {\n\t\t\t\tif (arr[num] == i) {\n\t\t\t\t\tSystem.out.println(count+\": \"+i+\" and \"+num);\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tlong endTime = System.nanoTime();\n\t\tdouble duration = timeInSec(endTime,startTime) ;\n\t\tSystem.out.println(\"Run time \" + duration + \" : secs\");\t\t\n\t}", "public static void main(String[] args) throws Exception {\n int arr[]= {7,9,88,-33,2,12,6,1};\n Arrays.sort(arr);\n /*for(int i=0; i<arr.length; i++)\n \t System.out.print(arr[i]+\", \");\n System.out.println(\"\\n DESC\");\n System.out.print(\"{ \");\n for(int i=arr.length-1; i>=0; i--) {\n \t if(arr[i]==arr[0])\n \t System.out.print(arr[i]);\n \t else \n \t\t System.out.print(arr[i]+\", \");\n }*/\n // System.out.print(\" }\");\n \n int[] ar= {6,2,2,5,2,2,1};\n int startIndex=0;\n int lastIndex=ar.length-1;\n //a is sumRight,b = sumLeft\n int a=0,b=0;\n /* while(true) {\n \t \n \t if(b>a) \n \t\t //1+2+2=+5\n \t\t a+=ar[lastIndex--];\n \t else \n \t\t //6+2+2\n \t\t\t b+=ar[startIndex++];\n \t\tif(startIndex>lastIndex) {\n \t\t\tSystem.out.println(startIndex);\n \t\t\tif(a==b)\n \t\t\t\tbreak;\n \t\t\t else\n \t\t\t throw new Exception(\"not a valid array\");\n \t\t\t\n \t\t}\n \t\t\t \n \t\t\n }\n System.out.println(lastIndex);\n */\n \n \n while(true) {\n \t \n \t if(b>a)\n \t\t a+= ar[lastIndex--];\n \t else\n b+=ar[startIndex++];\n \t if(startIndex>lastIndex) {\n \t\t if(a==b)\n \t\t\t break;\n \t }\n }\n System.out.println(lastIndex);\n\t}", "public static int getBetterApproach(int n){\n\t\t\n\t\tint t[] = new int[n+1];\n\t\t\n if(n<=2)\n return n;\n \n\t\tt[0] = 0;\n\t\tt[1] = 1;\n\t\tt[2] = 2;\n\t\tfor(int i = 3;i<=n;i++){\n\t\t\tt[i] = t[i-1] + t[i-2];\n\t\t}\n\t\treturn t[n];\n\t}", "public static long journeyToMoon(int n, List<List<Integer>> astronaut) {\n // Write your code here\n Map<Integer, Node<Integer>> countryMap = new HashMap<>();\n for(List<Integer> pairs: astronaut) {\n Node<Integer> node1 = countryMap.computeIfAbsent(pairs.get(0), Node::new);\n Node<Integer> node2 = countryMap.computeIfAbsent(pairs.get(1), Node::new);\n node1.connected.add(node2);\n node2.connected.add(node1);\n }\n\n List<Integer> countryCluster = new ArrayList<>();\n for(Node<Integer> node: countryMap.values()) {\n if(node.connected.size() == 0) {\n countryCluster.add(1);\n } else if(!node.visited){\n countryCluster.add(getNodeCount3(node));\n }\n }\n List<Integer> countryNodes = countryMap.values().stream().map(nn -> nn.value).collect(Collectors.toList());\n List<Integer> missingNodes = new ArrayList<>();\n for(int i=0; i < n; i++) {\n if(!countryNodes.contains(i))\n missingNodes.add(i);\n }\n\n for(int i=0; i < missingNodes.size(); i++) {\n countryCluster.add(1);\n }\n\n long ans = 0;\n //For one country we cannot pair with any other astronauts\n if(countryCluster.size() >= 2) {\n ans = (long) countryCluster.get(0) * countryCluster.get(1);\n if(countryCluster.size() > 2) {\n int sum = countryCluster.get(0) + countryCluster.get(1);\n for(int i=2; i < countryCluster.size(); i++) {\n ans += (long) sum * countryCluster.get(i);\n sum += countryCluster.get(i);\n }\n }\n }\n\n /*\n permutation of two set with size A and B = AxB\n permutation of three set with size A,B,C = AxB + AxC + BxC = AxB + (A+B)xC\n permutation of four set with size A,B,C,D = AxB + AxC + AxD + BxC + BxD + CxD = AxB + (A+B)xC + (A+B+C)xD\n */\n /*\n if(keys.length == 1) {\n ans = keys[0].size();\n } else {\n ans = keys[0].size() * keys[1].size();\n if(keys.length > 2) {\n int sum = keys[0].size() + keys[1].size();\n for (int i = 2; i < keys.length; i++) {\n ans += sum * keys[i].size();\n sum += keys[i].size();\n }\n }\n }\n */\n return ans;\n }", "static public void findPossibleTrianglesCount_V2(int[] arr, int n){\n \r\n int i,j,k; //loop or index variables\r\n int nTriangles = 0;\r\n \r\n Arrays.sort(arr);\r\n \r\n for(i=0; i<n-2; i++){\r\n k = i+2;\r\n for(j=i+1; j<n-1; j++){\r\n while(k<n && arr[i]+arr[j]>arr[k])\r\n k++;\r\n nTriangles+= k-j-1;\r\n }\r\n }\r\n \r\n System.out.println(\"Number of possible triangles \" + nTriangles);\r\n }", "public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int sum = sc.nextInt();\n int N = sc.nextInt();\n sc.nextLine();\n int [][] arr = new int[N][2];\n for(int i = 0;i<N;i++)\n {\n arr[i][0] = sc.nextInt();\n arr[i][1] = sc.nextInt();\n sc.nextLine();\n }\n //Arrays.sort(arr, new Comparator<int[]>() {\n // @Override\n // public int compare(int[] o1, int[] o2) {\n // return o1[1]-o2[1]; //按第二列价值排个序。\n // }\n //});\n int [][] dp = new int[N+1][sum+1];\n int [][] path = new int[N+1][sum+1];\n for(int i = 1;i<=N;i++)\n {\n for(int j = 1;j<=sum;j++)\n {\n if(j<arr[i-1][0])\n dp[i][j] = dp[i-1][j];\n else\n {\n if(dp[i-1][j]<dp[i-1][j-arr[i-1][0]]+arr[i-1][1])\n path[i][j] = 1;\n dp[i][j] = Math.max(dp[i-1][j],dp[i-1][j-arr[i-1][0]]+arr[i-1][1]);\n }\n }\n }\n System.out.println(dp[N][sum]);\n\n int i = N;\n int j = sum;\n while (i>0&&j>0)\n {\n if(path[i][j]==1)\n {\n System.out.print(1+\" \");\n j -=arr[i-1][0];\n }\n else\n {\n i--;\n System.out.print(0+\" \");\n }\n }\n\n\n // 改进版。只使用一维数组。\n // int [] f = new int[sum+1];\n // for(int i = 0;i<N;i++)\n // {\n // for (int j = sum;j>=0;j--)\n // {\n // if(j>=arr[i][0])\n // f[j] = Math.max(f[j], f[j-arr[i][0]]+arr[i][1]);\n // }\n // }\n // System.out.println(f[sum]);\n\n }", "public static void targetSumPair(int[] arr, int target){\n //write your code here\n Arrays.sort(arr); // O(nlogn)\n int i=0, j=arr.length-1;\n while(i < j) {\n if(arr[i]+arr[j] < target) {\n i++;\n }\n else if(arr[i] + arr[j] > target)\n j--;\n else {\n System.out.println(arr[i] + \", \" + arr[j]);\n i++; j--;\n }\n }\n }", "static public int solve(int n,int A[])\n {\n int freqArr[] = new int[1001];\n int dp[] = new int[1001];\n\n for(int i=0; i<n; i++){\n freqArr[A[i]]++;\n }\n\n dp[0] = 0;\n dp[1] = freqArr[1] > 0 ? freqArr[1] : 0;\n\n for(int i=2; i<=1000; i++){\n dp[i] = Math.max(dp[i-2] + i*freqArr[i], dp[i-1]);\n }\n return dp[1000];\n }", "public static int bestApproach(int n) {\n \n if(n<=2){\n return n;\n }\n int a = 0;\n int b = 1;\n int c = 2;\n \n while(n-->2){\n a = b+c;\n b = c;\n c = a;\n }\n return a;\n }", "private boolean calculateMaximumLengthBitonicSubarray() {\n\n boolean found = false; // does any BSA found\n\n boolean directionChange = false; //does direction numberOfWays increase to decrease\n\n int countOfChange = 0;\n\n int i = 0;\n directionChange = false;\n int start = i;\n i++;\n for (; i < input.length; i++) {\n if (countOfChange != 0 && countOfChange % 2 == 0) {\n if (this.length < (i - 2 - start + 1)) {\n this.i = start;\n this.j = i - 2;\n this.length = this.j - this.i + 1;\n }\n start = i - 2;\n countOfChange = 0;\n }\n\n if (input[i] > input[i - 1]) {\n if (directionChange == true) {\n countOfChange++;\n }\n directionChange = false;\n }\n if (input[i] < input[i - 1]) {\n if (directionChange == false) {\n countOfChange++;\n }\n directionChange = true;\n }\n\n\n }\n\n if (directionChange == true) {\n if (this.length < (i - 1 - start + 1)) {\n this.i = start;\n this.j = i - 1;\n this.length = this.j - this.i + 1;\n }\n }\n return directionChange;\n }", "public static int firstMissingEffective(int[] x){\n int i = 0;\n while(i<x.length){\n // first two conditions check that element can correspond to index of array\n // third condition checks that they are not in their required position\n // fourth condition checks that there is no duplicate already at their position\n if( x[i]>0 && x[i]<x.length && x[i]-1!=i && x[x[i]-1]!=x[i]) exch(x,i,x[i]-1);\n else i++;\n }\n\n // second pass\n for(int j=0; j < x.length; j++){\n if( x[j]-1!=j) return j+1;\n }\n return x.length+1;\n\n }", "public static int f3(int N) {\n \n // O(1)\n if (N == 0) return 1;\n else{ \n \n int x = 0;\n // O(N)\n for(int i = 0; i < N; i++)\n x += f3(N-1);\n return x;\n }\n }", "static public void findPossibleTrianglesCount_V1(int[] arr, int n){\n \r\n int i,j,k; //loop or index variables\r\n int nTriangles = 0;\r\n \r\n for(i=0; i<n-2; i++){\r\n for(j=i+1; j<n-1; j++){\r\n for(k=j+1; k<n; k++){\r\n if(arr[i] != arr[j] && arr[i] != arr[k] && arr[j] != arr[k]){\r\n if(arr[i]+arr[j] > arr[k] && arr[i]+arr[k] > arr[j] && arr[j]+arr[k] > arr[i] ){ //a+b > c \r\n System.out.println(arr[i] + \" , \" + arr[j] + \" , \" + arr[k]);\r\n nTriangles+=1;\r\n }\r\n } //if\r\n } //innermost for k\r\n } //inner for j\r\n } //outer for i\r\n \r\n System.out.println(\"Number of possible triangles: \" + nTriangles);\r\n }", "static int recursiva1(int n)\n\t\t{\n\t\tif (n==0)\n\t\t\treturn 10; \n\t\tif (n==1)\n\t\t\treturn 20; \n\t\treturn recursiva1(n-1) - recursiva1 (n-2);\t\t\n\t\t}", "static long findNumberOfTriangles(int arr[], int n)\n {\n\n long count=0;\n\n for(int i=0;i<n;i++){\n for(int j=i;j<n;j++){\n if(arr[i]>arr[j]){\n int temp=arr[j];\n arr[j]=arr[i];\n arr[i]=temp;\n }\n }\n }\n\n int k =n-1;\n for(int i=n-2;i>=0;i--){\n for(int j=i-1;j>=0;j--){\n if(arr[k]<arr[j]+arr[i]){\n count++;\n }\n }\n k--;\n }\n\n return count;\n }", "public static void main(String[] args) throws IOException {\n int max = 100000;\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n N = Integer.parseInt(br.readLine());\n\n int arr[] = new int[max+1];\n\n for (int p=2; p<=99999; p++)\n {\n if (arr[p] == 0)\n { arr[p] = 1;\n for (int i=p*2; i<=max; i += p) {\n arr[i]++;\n }\n }\n }\n\n int mat[][] = new int[6][max+1];\n// for (int i = 2; i < arr.length; i++) {\n// mat[arr[i]][i] = 1;\n// }\n\n for (int i = 1; i < 6; i++) {\n for (int j = 2; j < mat[0].length; j++) {\n if(arr[j] == i) {\n mat[i][j] = mat[i][j - 1]+1;\n } else {\n mat[i][j] = mat[i][j - 1];\n }\n }\n }\n\n\n for (int i = 0; i < N; i++) {\n String str[] = br.readLine().split(\" \");\n int a = Integer.parseInt(str[0]);\n int b = Integer.parseInt(str[1]);\n int k = Integer.parseInt(str[2]);\n int ans = mat[k][b]-mat[k][a-1];\n System.out.println(ans);\n }\n }", "public static int frog(int n, int [] h){\n\n int dp[] = new int [n];\n\n dp[0] = 0;\n dp[1] = Math.abs(h[1] - h[0]);\n\n for(int i = 2; i < n ; i ++){\n\n dp[i] = Math.min(dp [i - 2] + Math.abs(h[i] - h[i - 2]), dp[i - 1] + Math.abs(h[i] - h[i - 1]));\n\n\n\n }\n //print(dp);\n return dp[n - 1];\n }", "static int findMajority(int[] nums) {\n if (nums.length == 1) {//one element in array\n return nums[0];\n }\n\n Map<Integer, Integer> occurrencesCountMap = new HashMap<>();// element - times occured\n\n for (int n : nums) {//traverse nums\n\n if (occurrencesCountMap.containsKey(n) //if in map\n &&//and\n occurrencesCountMap.get(n) + 1 > nums.length / 2) {//times occurred +1 ( for current iteration ) > len/2\n\n return n;\n\n } else {//not in map yet\n\n occurrencesCountMap.put(n, occurrencesCountMap.getOrDefault(n, 0) + 1);//add 1 to existing , or inti with 1\n\n }\n }\n return -1;//no majority ( no one length/2 times occurred )\n }", "public int findFirstUniqueNumber (List<Integer> numberList) {\n\n ////// Solution 1:\n LinkedHashMap<Integer, Integer> occurMap = new LinkedHashMap<>();\n\n for (int number: numberList) { // O(n)\n if (occurMap.containsKey(number) && occurMap.get(number) != 0) {\n occurMap.replace(number, occurMap.get(number), 0);\n }\n occurMap.putIfAbsent(number, 1);\n }\n\n for (Map.Entry<Integer, Integer> entry: occurMap.entrySet()) {\n if (entry.getValue() == 1) {\n return entry.getKey();\n }\n }\n\n ////// Solution 2: O(n * n)\n// for (int n: numberList) {\n// if (numberList.indexOf(n) == numberList.lastIndexOf(n)) { // O(n * n)\n// return n;\n// }\n// }\n\n return -1;\n }", "static int linearLogTime(int[] n, int[] m) {\n if(n == null || n.length == 0 || m == null || m.length == 0) return -1;\n int sum = 0;\n for(int i = 0; i < n.length; ++i) {\n sum += logTime(m, 0, m.length, 15);\n }\n return sum;\n }", "private static int solution(final int[] A)\n {\n Arrays.sort(A);\n\n for(int i=0; i<A.length - 1; i=i+2)\n {\n if (A[i] != A[i + 1])\n {\n return A[i];\n }\n }\n\n return A[A.length - 1];\n }", "public static int findCommon4(int[] in1, int[] in2) {\r\n\t\tint common = 0;\r\n\t\t//mlogn\r\n\t\tArrays.sort(in1);\r\n\t\t//nlogn\r\n\t\tArrays.sort(in2);\r\n\t\t//m+n-1 (as one element will remain uncompared in the end)\r\n\t\tint i=0,j=0;\r\n\t\twhile (i < in1.length && j < in2.length) {\r\n\t\t\tif (in1[i] == in2[j]) {\r\n\t\t\t\t++common;\r\n\t\t\t\t++i;\r\n\t\t\t\t++j;\r\n\t\t\t} else if (in1[i] < in2[j]) {\r\n\t\t\t\t++i;\r\n\t\t\t} else {\r\n\t\t\t\t++j;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn common;\r\n\t}", "private void faster() {\n BigInteger[] denoms = new BigInteger[1000];\n BigInteger[] nums = new BigInteger[1000];\n\n nums[0] = BigInteger.valueOf(3);\n denoms[0] = BigInteger.valueOf(2);\n\n for (int i = 1; i < 1000; i++) {\n denoms[i] = nums[i - 1].add(denoms[i - 1]);\n nums[i] = denoms[i].add(denoms[i - 1]);\n }\n\n int count = 0;\n for (int i = 1; i < 1000; i++) {\n if (nums[i].toString().length() > denoms[i].toString().length()) {\n count++;\n }\n }\n this.answer = count;\n }", "private static void sortAccording(int A1[], int A2[], int m, int n)\n {\n // The temp array is used to store a copy \n // of A1[] and visited[] is used to mark the \n // visited elements in temp[].\n int temp[] = new int[m], visited[] = new int[m];\n for (int i = 0; i < m; i++)\n {\n temp[i] = A1[i];\n visited[i] = 0;\n }\n \n // Sort elements in temp\n Arrays.sort(temp);\n \n // for index of output which is sorted A1[]\n int ind = 0; \n \n // Consider all elements of A2[], find them\n // in temp[] and copy to A1[] in order.\n for (int i = 0; i < n; i++){\n\n // Find index of the first occurrence\n // of A2[i] in temp\n int f = first(temp, 0, m-1, A2[i], m);\n \n // If not present, no need to proceed\n if (f == -1) \n continue;\n \n // Copy all occurrences of A2[i] to A1[]\n for (int j = f; (j < m && temp[j] == A2[i]); j++){\n \n A1[ind++] = temp[j];\n visited[j] = 1;\n }\n }\n \n // Now copy all items of temp[] which are \n // not present in A2[]\n for (int i = 0; i < m; i++)\n if (visited[i] == 0)\n A1[ind++] = temp[i];\n }", "public static int majorityIn2N(int[] a)\n {\n int i=0;\n //case1: check if the array is like this: 1, 1, 2, 3, 4, 1...\n //this case is the opposite one to the second one\n for(; i<a.length-1; i++)\n {\n if(a[i]==a[i+1])\n return a[i];\n }\n //case2: if we get here, the array must be like 1, 3, 1, 4, 1, 5\n for(i=0; i<a.length-2; i++)\n {\n if(a[i]==a[i+2])\n return a[i];\n }\n return Integer.MIN_VALUE;\n }", "public void sum(int n) {\n int sum = 0;\n for (int j = 0; j < n; j++) // 2n+2\n sum += j;\n for (int k = 0; k < n; k++) // 2n+2\n sum += k;\n for (int l = 0; l < n; l++) //2n+2\n sum += l;\n }", "static int getMissingNo (int a[], int n) \n { \n int x1 = a[0]; \n int x2 = 1; \n \n for (int i = 1; i <= n; i++) {\n if(i != n)\n x1 = x1 ^ a[i]; \n x2 = x2 ^ (i+1); \n \n }\n System.out.println(\"x2 :\"+x2);\n return (x1 ^ x2); \n \n /* //For xor of all the elements \n //in array \n for (int i = 1; i < n; i++) {\n \n System.out.print(x1+\" ^ \"+a[i]);\n x1 = x1 ^ a[i]; \n System.out.println(\"=\"+x1);\n \n }\n System.out.println(\"x1 :\"+x1);\n System.out.println(\"==\");\n //For xor of all the elements \n // from 1 to n+1 \n for (int i = 2; i <= n+1; i++) {\n \tSystem.out.print(x2+\" ^ \"+i);\n x2 = x2 ^ i; \n System.out.println(\"=\"+x2);\n }\n \n System.out.println(\"x2 :\"+x2);\n return (x1 ^ x2); */\n }", "private static boolean findEqualSumSubsetBottomUp(int[] arr, int n) {\n\t\tint sum=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tsum+=arr[i];\n\t\t}\n\t\tif(sum%2==1) {\n\t\t\treturn false;\n\t\t}\n \t\treturn findEqualSumBottomUp(arr,n,sum/2);\n\t}", "static int solve(int n) \n\t{ \n\t // base case \n\t if (n < 0) \n\t return 0; \n\t if (n == 0) \n\t return 1; \n\t \n\t return solve(n-1) + solve(n-3) + solve(n-5); \n\t}", "public static void findTriplets(int[] arr,int n)\n {\n boolean found = false;\n for (int i=0;i<n-2;i++)\n {\n for (int j=i+1; j<n-1; j++)\n {\n for(int k=j+1; k<n;k++)\n {\n if(arr[i]+arr[j]+arr[k] == 0)\n {\n System.out.println(arr[i]);\n System.out.println(\" \");\n System.out.println(arr[j]);\n System.out.println(\" \");\n System.out.println(arr[k]);\n System.out.println(\"\\n\");\n found = true;\n }\n }\n }\n }\n //if no triplet with 0 sum found in arrat\n if(found == false)\n System.out.println(\"not exist\");\n }", "public static void getLeastNumbers_2(int[] input, int[] output) {\n int start = 0;\n int end = input.length - 1;\n int k = output.length;\n int index = partition(input, start, end);\n while(index != k - 1) {\n if(index > k - 1) {\n end = index - 1;\n index = partition(input, start, end);\n }\n else {\n start = index + 1;\n index = partition(input, start, end);\n }\n }\n \n for(int i = 0; i < k; ++i)\n output[i] = input[i];\n }", "static int findMajority(int arr[], int n) {\n int res = 0, count = 1;\n\n for (int i = 1; i < n; i++) {\n if (arr[res] == arr[i])\n count++;\n else\n count--;\n if (count == 0) {\n res = i;\n count = 1;\n }\n }\n\n count = 0;\n for (int i = 0; i < n; i++) {\n if (arr[res] == arr[i])\n count++;\n\n }\n if (count < n / 2)\n res = -1;\n return res;\n }", "public static void main(String args[] ) throws Exception {\n String l[] = br.readLine().split(\" \");\n long N = Long.parseLong(l[0]);\n long S = Long.parseLong(l[1]);\n long E = Long.parseLong(l[2]);\n TreeMap<Long,Long> t1 = new TreeMap<Long,Long>();\n TreeMap<Long,Long> t2 = new TreeMap<Long,Long>();\n for(int i=0;i<N;i++) {\n String s[] = br.readLine().split(\" \");\n long x = Long.parseLong(s[0]);\n long p = Long.parseLong(s[1]);\n t1.put((x-p),(x+p));\n }\n ArrayList<Long> l1 = new ArrayList<Long>(t1.keySet());\n ArrayList<Long> l2 = new ArrayList<Long>(t1.values());\n long c = l1.get(0);\n long d = l2.get(0);\n for(int i=1;i<t1.size();i++)\n {\n if(l1.get(i)<=d)\n d = Math.max(d,l2.get(i));\n else\n {\n \n t2.put(c,d);\n c = l1.get(i);\n d = l2.get(i);\n }\n \n }\n t2.put(c,d);\n int i;\n long ans = 0;\n l1=new ArrayList<Long>(t2.keySet());\n l2=new ArrayList<Long>(t2.values());\n \n \n for(i=0;i<l1.size();i++)\n {\n if(S>=E)\n {\n S=E;\n break;\n }\n if(l1.get(i)<=S && S<=l2.get(i))\n S = l2.get(i);\n \n else if(S<=l1.get(i) && E>=l2.get(i))\n {\n ans+=l1.get(i)-S;\n S = l2.get(i);\n \n }\n else if(S<=l1.get(i) && E>=l1.get(i) && E<=l2.get(i))\n {\n ans+=l1.get(i)-S;\n S = E;\n }\n else if(S<=l1.get(i) && E<=l1.get(i))\n {\n ans+=E-S;\n S = E;\n }\n }\n if(S<E)\n ans+=E-S;\n pw.println(ans);\n \n pw.close();\n }", "private int hashFunc2(String word) {\n int hashVal = word.hashCode();\n hashVal = hashVal % arraySize;\n\n if (hashVal < 0) {\n hashVal += arraySize;\n }\n\n // Research shows that you can use a Prime number Less than the array size to calculate the step value.\n // Prime Number 3 arbitrarily chosen.\n return 3 - hashVal % 3;\n }", "static int uniqueNumbers(int arr[], int n)\n {\n // Sorting the given array\n Arrays.sort(arr);\n\n // This array will store the frequency\n // of each number in the array\n // after performing the given operation\n int freq[] = new int[n + 2];\n\n // Initialising the array with all zeroes\n for(int i = 0; i < n + 2; i++)\n freq[i] = 0;\n\n // Loop to apply operation on\n // each element of the array\n for (int x = 0; x < n; x++) {\n\n // Incrementing the value at index x\n // if the value arr[x] - 1 is\n // not present in the array\n if (freq[arr[x] - 1] == 0) {\n freq[arr[x] - 1]++;\n }\n\n // If arr[x] itself is not present, then it\n // is left as it is\n else if (freq[arr[x]] == 0) {\n freq[arr[x]]++;\n }\n\n // If both arr[x] - 1 and arr[x] are present\n // then the value is incremented by 1\n else {\n freq[arr[x] + 1]++;\n }\n }\n\n // Variable to store the number of unique values\n int unique = 0;\n\n // Finding the unique values\n for (int x = 0; x <= n + 1; x++) {\n if (freq[x] != 0) {\n unique++;\n }\n }\n\n // Returning the number of unique values\n return unique;\n }", "private static void findMissingAndDuplicateNumberFrom1toN(int[] input) {\n\t\tint len = input.length;\n\t\tint i = 0;\n\n\t\twhile (i < len) {\n\t\t\t//if its already in correct place\n\t\t\tif (input[i] == i + 1) {\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t} else if (input[i] == input[input[i] - 1]) { //if the elment to be swapped with are same\n\t\t\t\ti++;\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tint temp = input[i];\n\t\t\t\tinput[i] = input[input[i] - 1];\n\t\t\t\tinput[temp - 1] = temp;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (input[i] != i + 1) {\n\t\t\t\tSystem.out.println(\"Missing number : \" + (i + 1));\n\t\t\t\tSystem.out.println(\"Duplicate number : \" + input[i]);\n\t\t\t}\n\t\t}\n\n\t}", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nint n=sc.nextInt();\r\n\r\nList<Integer> l=new ArrayList<Integer>();\r\nfor(int i=1;i<=n;i++){\r\n\tif(i%2!=0)\r\n\t{\r\n\t\tl.add(i);\r\n\t}\r\n}\r\n\tSystem.out.println(l);\r\n\tint n1=l.get(0);\r\n\tfor(int i=0;i<l.size();i++){\r\n\tif(i%2==0)\r\n\t\r\n\t\tn1=n1-l.get(i);\r\n\t//System.out.println(s);\r\n\telse\r\n\t\tn1=n1+l.get(i);\r\n\t}\r\n\tSystem.out.println(n1+1);\r\n\t}", "void solve() throws IOException {\n int[] nk = ril(2);\n int n = nk[0];\n int k = nk[1];\n int[] p = ril(n);\n int[] b = ril(k);\n for (int i = 0; i < n; i++) p[i]--;\n for (int i = 0; i < k; i++) b[i]--;\n\n int[] numToIdx = new int[n];\n for (int i = 0; i < n; i++) numToIdx[p[i]] = i;\n\n boolean[] remove = new boolean[n];\n Arrays.fill(remove, true);\n for (int bi : b) remove[bi] = false;\n List<Integer> toRemove = new ArrayList<>(n - k);\n for (int i = 0; i < n; i++) if (remove[i]) toRemove.add(i);\n Collections.sort(toRemove);\n\n int[] prevSmaller = new int[n];\n prevSmaller[0] = -1;\n int prevIdx = remove[p[0]] ? -1 : 0;\n for (int i = 1; i < n; i++) {\n int j = prevIdx;\n while (j != -1 && p[i] < p[j]) j = prevSmaller[j];\n prevSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n int[] nextSmaller = new int[n];\n nextSmaller[n-1] = n;\n prevIdx = remove[p[n-1]] ? n : n-1;\n for (int i = n-2; i >= 0; i--) {\n int j = prevIdx;\n while (j != n && p[i] < p[j]) j = nextSmaller[j];\n nextSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n\n int[] init = new int[n];\n Arrays.fill(init, 1);\n SegmentTree st = new SegmentTree(init);\n long ans = 0;\n for (int x : toRemove) {\n int idx = numToIdx[x];\n int l = prevSmaller[idx] + 1;\n int r = nextSmaller[idx] - 1;\n ans += st.query(l, r+1);\n st.modify(idx, 0);\n }\n pw.println(ans);\n }", "static int recursiva2(int n)\n\t\t{\n\t\t\tif (n==0)\n\t\t\treturn 10; \n\t\t\tif (n==1)\n\t\t\treturn 20;\n\t\t\tif (n==2)\n\t\t\treturn 30;\n\t\t\t\n\t\t\treturn recursiva2(n-1) + recursiva2 (n-2) * recursiva2 (n-3); \n\t\t}", "static int[] productExceptSelfSpaceOptimized(int[] nums) {\n int n = nums.length;\n int[] result = new int[n];\n Arrays.fill(result, 1);\n int curr = 1;\n\n for (int i = 0; i < n; i++) {\n result[i] *= curr;\n curr *= nums[i];\n }\n\n curr = 1;\n for (int i = n - 1; i >= 0; i--) {\n result[i] *= curr;\n curr *= nums[i];\n }\n\n return result;\n }", "private static void second(int[] arr, int sum){\n\n Map<Integer,Boolean> map = new Hashtable<>();\n\n for(int i:arr){\n\n if (map.containsKey(sum - i)){\n System.out.println(i + \" , \" + (sum-i));\n }\n else{\n map.put(i, true);\n }\n\n }\n\n }", "public boolean containsNearbyDuplicate2(int[] nums, int k) {\n\n int max = Integer.MIN_VALUE;\n for (int i = 0; i < nums.length; i++) {\n max=Math.max(max,nums[i]);\n }\n Integer[] map = new Integer[max+1];\n for (int i = 0; i < nums.length; i++) {\n Integer c = map[nums[i]];\n if(c!=null && i-c<=k){\n return true;\n }else {\n map[nums[i]]=i;\n }\n }\n return false;\n }", "private int first_leaf() { return n/2; }", "public static ArrayList<Integer> findAnagrams(String s, String p) {\r\n\t \t \r\n\t \t //write your code here\r\n\t\t if(s.length()<p.length()) {\r\n\t\t\t ArrayList<Integer> arr = new ArrayList<>();\r\n\t\t\t return arr;\r\n\t\t }\r\n\t\t ArrayList<Integer> result = new ArrayList<>();\r\n\t\t HashMap<Character,Integer> P = new HashMap<>();\r\n\t\t HashMap<Character,Integer> H = new HashMap<>();\r\n\t\t \r\n\t\t for(int i=0;i<p.length();i++) {\r\n\t\t\t char ch = p.charAt(i);\r\n\t\t\t if(!P.containsKey(ch)) {\r\n\t\t\t\t P.put(ch,1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t P.put(ch,P.get(ch)+1);\r\n\t\t\t }\r\n\t\t }\r\n\t\t int start =0;\r\n\t\t int end=0;\r\n\t\t int mcount=0;\r\n\t\t for(int i=0;i<p.length();i++) {\r\n\t\t\t char ch = s.charAt(i);\r\n\t\t\t if(!H.containsKey(ch)) {\r\n\t\t\t\t H.put(ch,1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t H.put(ch,H.get(ch)+1);\r\n\t\t\t }\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t if(P.get(ch)>=H.get(ch)) {\r\n\t\t\t\t\t mcount++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t end=i;\r\n\t\t }\r\n\t\t if(mcount==p.length()) {\r\n\t\t\t result.add(start);\r\n\t\t }\r\n\t\t while(end<s.length()-1) {\r\n\t\t\t char ch=s.charAt(start);\r\n\t\t\t int hfreq = H.get(ch)-1;\r\n\t\t\t H.put(ch,hfreq);\r\n\t\t\t if(H.get(ch)==0) {\r\n\t\t\t\t H.remove(ch);\r\n\t\t\t }\r\n\t\t\t int pfreq=0;\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t pfreq=P.get(ch);\r\n\t\t\t }\r\n\t\t\t if(hfreq<pfreq) {\r\n\t\t\t\t mcount--;\r\n\t\t\t }\r\n\t\t\t ch=s.charAt(end+1);\r\n\t\t\t int hfreqend=0;\r\n\t\t\t if(H.containsKey(ch)) {\r\n\t\t\t\t hfreqend = H.get(ch);\r\n\t\t\t }\r\n\t\t\t hfreqend++;\r\n\t\t\t H.put(ch, hfreqend);\r\n\t\t\t int pfreqend=0;\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t pfreqend = P.get(ch);\r\n\t\t\t }\r\n\t\t\t if(hfreqend<=pfreqend) {\r\n\t\t\t\t mcount++;\r\n\t\t\t }\r\n\t\t\t start++;\r\n\t\t\t end++;\r\n\t\t\t if(mcount==p.length()) {\r\n\t\t\t\t result.add(start);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\t return result;\r\n\t\t \r\n\t \t \r\n\t }", "private static int solution2(int[] A) {\n Map<Integer, Integer> map = new HashMap<>();\n\n for(int i=0; i<A.length; i++){\n if(map.get(A[i]) != null){\n int counter = map.get(A[i]) + 1;\n map.put(A[i], counter);\n } else {\n map.put(A[i], 1);\n }\n }\n\n for (Map.Entry<Integer, Integer> pair : map.entrySet()) {\n if(pair.getValue() % 2 != 0) {\n return pair.getKey();\n }\n }\n\n return -1;\n }", "public void triplet(int[] b,int n){\r\n\t\tint count=0;\r\n\t\tfor(int i=0;i<n;i++){\r\n\t\t\tfor(int j=i+1;j<n-1;j++){\r\n\t\t\t\tfor(int k=j+1;k<n-2;k++){\r\n\t\t\t\t\tif(b[i]+b[j]+b[k]==0){\r\n\t\t\t\t\t\tSystem.out.println(b[i]+\" \"+b[j]+\" \"+b[k]);\r\n\t\t\t\t\t\tcount++;\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\tSystem.out.println(\"no of distinct triplet is:\"+count);\t\r\n\r\n\t}", "private static int solution3(String s) {\r\n int n = s.length();\r\n Set<Character> set = new HashSet<>();\r\n int ans = 0, i = 0, j = 0;\r\n while (i < n && j < n) {\r\n if (!set.contains(s.charAt(j))) {\r\n set.add(s.charAt(j++));\r\n ans = Math.max(ans, j - i);\r\n } else {\r\n set.remove(s.charAt(i++));\r\n }\r\n }\r\n return ans;\r\n }", "public int numTrees(int n) {\n if(n<=1)\n return 1;\n int[] dp = new int[n+1];\n dp[0] = 1;\n dp[1] = 1;\n dp[2] = 2;\n \n for(int i=3;i<=n;i++){\n int sum = 0;\n for(int a=0;a<i;a++){\n sum+=dp[0+a]*dp[i-1-a];\n }\n dp[i] = sum;\n //if i is odd then add the i/2 dp after you multiply by 2\n }\n return dp[n];\n }" ]
[ "0.6981521", "0.6676951", "0.64523274", "0.6253033", "0.62470615", "0.6208724", "0.60779446", "0.6070746", "0.60211664", "0.5985292", "0.5960615", "0.5957974", "0.59444255", "0.5889415", "0.58720654", "0.5844687", "0.58081114", "0.5805067", "0.57811916", "0.5773974", "0.5762227", "0.5761734", "0.57460207", "0.5719798", "0.57125694", "0.57107675", "0.5708122", "0.5689871", "0.5675787", "0.5669632", "0.5650667", "0.5643592", "0.5638051", "0.56278664", "0.5611504", "0.56064725", "0.559558", "0.5587809", "0.5576152", "0.55663365", "0.55585176", "0.5557681", "0.55509806", "0.55387694", "0.55382884", "0.55378395", "0.55286527", "0.5528258", "0.55165845", "0.5478268", "0.5475839", "0.5469142", "0.54682946", "0.54579127", "0.5457371", "0.54572254", "0.54524475", "0.5445548", "0.5417373", "0.5408771", "0.5406803", "0.54066104", "0.5403909", "0.5403136", "0.5402798", "0.5397046", "0.53967184", "0.5396126", "0.5392925", "0.53846645", "0.53797185", "0.53765374", "0.53675646", "0.53669184", "0.53650665", "0.5362813", "0.53604037", "0.5356526", "0.5355309", "0.5352512", "0.5350624", "0.5344727", "0.53409404", "0.5329693", "0.53276813", "0.5326137", "0.5323266", "0.5320586", "0.5320504", "0.531442", "0.5314173", "0.53132683", "0.531082", "0.5309891", "0.53081334", "0.53081185", "0.5307748", "0.53073406", "0.52984536", "0.52958435", "0.52950567" ]
0.0
-1
Builds the content of the addfavorite window. The window is created static. It is shown whenever it is used.
void buildWindowAddFavorite(){ assert(false); //main.gui.addMenuItemGThread("menuFileNaviRefresh", main.idents.menuFileNaviRefreshBar, actionRefreshFileTable); // / //main.gui.addMenuItemGThread("menubarFolderCreate", main.idents.menuConfirmMkdirFileBar, main.mkCmd.actionOpenDialog); // / //main.gui.addMenuItemGThread("menubarFolderSearch", main.idents.menuBarSearchFiles, actionSearchFiles); // / main.gui.menuBar.addMenuItem("menuBarFolderSyncMidRight", main.idents.menuBarFolderSyncMidRight, actionSyncMidRight); // / //main.gui.addMenuItemGThread("menubarFileProps", main.idents.menuFilePropsBar, main.filePropsCmd.actionOpenDialog); //main.gui.addMenuItemGThread("test", main.idents.menuFileViewBar, main.viewCmd.actionOpenView); //main.gui.addMenuItemGThread("test", main.idents.menuFileEditBar, main.actionEdit); //main.gui.addMenuItemGThread("test", main.idents.menuBarEditIntern, main.editWind.actionOpenEdit); //main.gui.addMenuItemGThread("test", main.idents.menuConfirmCopyBar, main.copyCmd.actionConfirmCopy); //main.gui.addMenuItemGThread("test", main.idents.menuConfirmFileDelBar, main.deleteCmd.actionConfirmDelete); //main.gui.addMenuItemGThread("test", main.idents.menuExecuteBar, main.executer.actionExecuteFileByExtension); //main.gui.addMenuItemGThread("test", main.idents.menuExecuteCmdBar, main.cmdSelector.actionExecCmdWithFiles); //main.gui.menuBar.addMenuItem("menuBarCreateFavor", main.idents.menuBarCreateFavor, actionCreateFavor); // / main.gui.menuBar.addMenuItem("menuDelTab", main.idents.menuDelTab, actionDelTab); // / main.gui.menuBar.addMenuItem("menuSaveFavoriteSel", main.idents.menuSaveFavoriteSel, actionSaveFavoritePathes); // / main.gui.menuBar.addMenuItem("menuReadFavoriteSel", main.idents.menuReadFavoriteSel, actionReadFavoritePathes); // / main.gui.gralMng.selectPanel("primaryWindow"); //"output"); //position relative to the output panel //panelMng.setPosition(1, 30+GralGridPos.size, 1, 40+GralGridPos.size, 1, 'r'); main.gui.gralMng.setPosition(-19, 0, -47, 0, 'r'); //right buttom, about half less display width and hight. windAddFavorite.window = main.gui.gralMng.createWindow("addFavoriteWindow", "add favorite", GralWindow.windConcurrently); main.gui.gralMng.setPosition(4, GralPos.size -4, 1, GralPos.size +34, 'r'); windAddFavorite.widgLabel = main.gui.gralMng.addTextField("addFavoriteTab", true, "label", "t"); windAddFavorite.widgLabel.setHtmlHelp(main.cargs.dirHtmlHelp + "/Fcmd.html#Topic.FcmdHelp.favorpath.favorNew.tab."); main.gui.gralMng.setPosition(4, GralPos.size -4, 35, GralPos.size +10, 'r'); windAddFavorite.widgPersistent = main.gui.gralMng.addTextField("addFavoriteTab", true, "lmr ?", "t"); windAddFavorite.widgLabel.setHtmlHelp(main.cargs.dirHtmlHelp + "/Fcmd.html#Topic.FcmdHelp.favorpath.favorNew.persist."); main.gui.gralMng.setPosition(8, GralPos.size -4, 1, GralPos.size +45, 'd'); windAddFavorite.widgShortName = main.gui.gralMng.addTextField("addFavoriteAlias", true, "alias (show in list)", "t"); windAddFavorite.widgShortName.setHtmlHelp(main.cargs.dirHtmlHelp + "/Fcmd.html#Topic.FcmdHelp.favorpath.favorNew.alias."); windAddFavorite.widgPath = main.gui.gralMng.addTextField("addFavoritePath", true, "the directory path", "t"); windAddFavorite.widgPath.setHtmlHelp(main.cargs.dirHtmlHelp + "/Fcmd.html#Topic.FcmdHelp.favorpath.favorNew.dir."); main.gui.gralMng.setPosition(-4, -1, 1, 6, 'r'); main.gui.gralMng.addButton("addFavoriteEsc", actionAddFavorite, "esc", null, "esc"); main.gui.gralMng.setPosition(-4, -1, -14, GralPos.size +6, 'r',1); GralWidget widg = main.gui.gralMng.addButton("addFavoriteOk", actionAddFavorite, "temp", null, "temp"); widg.setHtmlHelp(main.cargs.dirHtmlHelp + "/Fcmd.html#Topic.FcmdHelp.favorpath.favorNew.temp."); widg = main.gui.gralMng.addButton("addFavoriteOk", actionAddFavorite, "ok", null, "Save"); widg.setHtmlHelp(main.cargs.dirHtmlHelp + "/Fcmd.html#Topic.FcmdHelp.favorpath.favorNew.save."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showFavouriteList() {\n setToolbarText(R.string.title_activity_fave_list);\n showFavouriteIcon(false);\n buildList(getFavourites());\n }", "public void createPopupWindow() {\r\n \t//\r\n }", "private void createWindow() {\r\n\t\t// Create the picture frame and initializes it.\r\n\t\tthis.createAndInitPictureFrame();\r\n\r\n\t\t// Set up the menu bar.\r\n\t\tthis.setUpMenuBar();\r\n\r\n\t\t// Create the information panel.\r\n\t\t//this.createInfoPanel();\r\n\r\n\t\t// Create the scrollpane for the picture.\r\n\t\tthis.createAndInitScrollingImage();\r\n\r\n\t\t// Show the picture in the frame at the size it needs to be.\r\n\t\tthis.pictureFrame.pack();\r\n\t\tthis.pictureFrame.setVisible(true);\r\n\t\tpictureFrame.setSize(728,560);\r\n\t}", "void buildWindow()\n { main.gui.gralMng.selectPanel(\"primaryWindow\");\n main.gui.gralMng.setPosition(-30, 0, -47, 0, 'r'); //right buttom, about half less display width and hight.\n int windProps = GralWindow.windConcurrently;\n GralWindow window = main.gui.gralMng.createWindow(\"windStatus\", \"Status - The.file.Commander\", windProps);\n windStatus = window; \n main.gui.gralMng.setPosition(3.5f, GralPos.size -3, 1, GralPos.size +5, 'd');\n widgCopy = main.gui.gralMng.addButton(\"sCopy\", main.copyCmd.actionConfirmCopy, \"copy\");\n widgEsc = main.gui.gralMng.addButton(\"dirBytes\", actionButton, \"esc\");\n }", "private JFrame buildWindow() {\n frame = WindowFactory.mainFrame()\n .title(\"VISNode\")\n .menu(VISNode.get().getActions().buildMenuBar())\n .size(1024, 768)\n .maximized()\n .interceptClose(() -> {\n new UserPreferencesPersistor().persist(model.getUserPreferences());\n int result = JOptionPane.showConfirmDialog(panel, Messages.get().singleMessage(\"app.closing\"), null, JOptionPane.YES_NO_OPTION);\n return result == JOptionPane.YES_OPTION;\n })\n .create((container) -> {\n panel = new MainPanel(model);\n container.add(panel);\n });\n return frame;\n }", "private void buildWindow(){\r\n\t\tthis.setSize(new Dimension(600, 400));\r\n\t\tFunctions.setDebug(true);\r\n\t\tbackendConnector = new BackendConnector(this);\r\n\t\tguiManager = new GUIManager(this);\r\n\t\tmainCanvas = new MainCanvas(this);\r\n\t\tadd(mainCanvas);\r\n\t}", "private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }", "private void createContents() {\n\t\tshlEditionRussie = new Shell(getParent(), getStyle());\n\t\tshlEditionRussie.setSize(470, 262);\n\t\tshlEditionRussie.setText(\"Edition r\\u00E9ussie\");\n\t\t\n\t\tLabel lblLeFilm = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblLeFilm.setBounds(153, 68, 36, 15);\n\t\tlblLeFilm.setText(\"Le film\");\n\t\t\n\t\tLabel lblXx = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblXx.setBounds(195, 68, 21, 15);\n\t\tlblXx.setText(\"\" + getViewModel());\n\t\t\n\t\tLabel lblABient = new Label(shlEditionRussie, SWT.NONE);\n\t\tlblABient.setText(\"a bien \\u00E9t\\u00E9 modifi\\u00E9\");\n\t\tlblABient.setBounds(222, 68, 100, 15);\n\t\t\n\t\tButton btnRevenirLa = new Button(shlEditionRussie, SWT.NONE);\n\t\tbtnRevenirLa.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tm_Infrastructure.runController(shlEditionRussie, ListMoviesController.class);\n\t\t\t}\n\t\t});\n\t\tbtnRevenirLa.setBounds(153, 105, 149, 25);\n\t\tbtnRevenirLa.setText(\"Revenir \\u00E0 la liste des films\");\n\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setLayout(new GridLayout(1, false));\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t{\r\n\t\t\tfinal Button btnShowTheFake = new Button(shell, SWT.TOGGLE);\r\n\t\t\tbtnShowTheFake.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\r\n\t\t\t\t\tif (btnShowTheFake.getSelection()) {\r\n\t\t\t\t\t\tRectangle bounds = btnShowTheFake.getBounds();\r\n\t\t\t\t\t\tPoint pos = shell.toDisplay(bounds.x + 5, bounds.y + bounds.height);\r\n\t\t\t\t\t\ttooltip = showTooltip(shell, pos.x, pos.y);\r\n\t\t\t\t\t\tbtnShowTheFake.setText(\"Hide it\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (tooltip != null && !tooltip.isDisposed())\r\n\t\t\t\t\t\t\ttooltip.dispose();\r\n\t\t\t\t\t\tbtnShowTheFake.setText(\"Show The Fake Tooltip\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tbtnShowTheFake.setText(\"Show The Fake Tooltip\");\r\n\t\t}\r\n\t}", "public void makeFavouriteButton() {\r\n JButton favourite = new JButton(\"Favourite a champion\");\r\n new Button(favourite, main);\r\n// favourite.setAlignmentX(Component.LEFT_ALIGNMENT);\r\n// favourite.setPreferredSize(new Dimension(2500, 100));\r\n// favourite.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n favourite.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n favouriteChampion();\r\n }\r\n });\r\n// main.add(favourite);\r\n }", "public void createWindow(){\n JFrame frame = new JFrame(\"Baser Aps sick leave prototype\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setSize(screenSize.width,screenSize.height);\n frame.setExtendedState(JFrame.MAXIMIZED_BOTH);\n\n /**\n * Setting up the main layout\n */\n Container allContent = frame.getContentPane();\n allContent.setLayout(new BorderLayout()); //main layout is BorderLayout\n\n /**\n * Stuff in the content pane\n */\n JButton button = new JButton(\"Press\");\n JTextPane text = new JTextPane();\n text.setText(\"POTATO TEST\");\n text.setEditable(false);\n JMenuBar menuBar = new JMenuBar();\n JMenu file = new JMenu(\"File\");\n JMenu help = new JMenu(\"Help\");\n JMenuItem open = new JMenuItem(\"Open...\");\n JMenuItem saveAs = new JMenuItem(\"Save as\");\n open.addMouseListener(new MouseListener() {\n @Override\n public void mouseClicked(MouseEvent e) {\n fileChooser.showOpenDialog(frame);\n }\n\n @Override\n public void mousePressed(MouseEvent e) {\n\n }\n\n @Override\n public void mouseReleased(MouseEvent e) {\n\n }\n\n @Override\n public void mouseEntered(MouseEvent e) {\n\n }\n\n @Override\n public void mouseExited(MouseEvent e) {\n\n }\n });\n file.add(open);\n file.add(saveAs);\n menuBar.add(file);\n menuBar.add(help);\n\n allContent.add(button, LINE_START); // Adds Button to content pane of frame at position LINE_START\n allContent.add(text, LINE_END); // Adds the text to the frame, at position LINE_END\n allContent.add(menuBar, PAGE_START);\n\n\n\n frame.setVisible(true);\n }", "protected void createContents() {\n\t\tshell = new Shell(SWT.CLOSE | SWT.MIN);// 取消最大化与拖拽放大功能\n\t\tshell.setImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/MC.ico\"));\n\t\tshell.setBackgroundImage(SWTResourceManager.getImage(WelcomPart.class, \"/images/back.jpg\"));\n\t\tshell.setBackgroundMode(SWT.INHERIT_DEFAULT);\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tshell.setSize(1157, 720);\n\t\tshell.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tshell.setLocation(Display.getCurrent().getClientArea().width / 2 - shell.getShell().getSize().x / 2,\n\t\t\t\tDisplay.getCurrent().getClientArea().height / 2 - shell.getSize().y / 2);\n\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/base.png\"));\n\t\tmenuItem.setText(\"\\u7A0B\\u5E8F\");\n\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\n\t\tMenuItem menuI_main = new MenuItem(menu_1, SWT.NONE);\n\t\tmenuI_main.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmenuI_main.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_BookShow window = new Admin_BookShow();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI_main.setText(\"\\u4E3B\\u9875\");\n\n\t\tMenuItem menu_exit = new MenuItem(menu_1, SWT.NONE);\n\t\tmenu_exit.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/reset.png\"));\n\t\tmenu_exit.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tWelcomPart window = new WelcomPart();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu_exit.setText(\"\\u9000\\u51FA\");\n\n\t\tMenuItem menubook = new MenuItem(menu, SWT.CASCADE);\n\t\tmenubook.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookTypeManager.png\"));\n\t\tmenubook.setText(\"\\u56FE\\u4E66\\u7BA1\\u7406\");\n\n\t\tMenu menu_2 = new Menu(menubook);\n\t\tmenubook.setMenu(menu_2);\n\n\t\tMenuItem menu1_add = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu1_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_add window = new Book_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_add.setText(\"\\u6DFB\\u52A0\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_select = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_select.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu1_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// 图书查询\n\t\t\t\tshell.close();\n\t\t\t\tBook_select window = new Book_select();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_select.setText(\"\\u67E5\\u8BE2\\u56FE\\u4E66\");\n\n\t\tMenuItem menu1_alter = new MenuItem(menu_2, SWT.NONE);\n\t\tmenu1_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu1_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_alter window = new Book_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu1_alter.setText(\"\\u4FEE\\u6539\\u56FE\\u4E66\");\n\n\t\tMenuItem menuI1_delete = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuI1_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenuI1_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBook_del window = new Book_del();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenuI1_delete.setText(\"\\u5220\\u9664\\u56FE\\u4E66\");\n\n\t\tMenuItem menutype = new MenuItem(menu, SWT.CASCADE);\n\t\tmenutype.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/bookManager.png\"));\n\t\tmenutype.setText(\"\\u4E66\\u7C7B\\u7BA1\\u7406\");\n\n\t\tMenu menu_3 = new Menu(menutype);\n\t\tmenutype.setMenu(menu_3);\n\n\t\tMenuItem menu2_add = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_add.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/add.png\"));\n\t\tmenu2_add.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_add window = new Booktype_add();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_add.setText(\"\\u6DFB\\u52A0\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_alter = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_alter.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/modify.png\"));\n\t\tmenu2_alter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_alter window = new Booktype_alter();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_alter.setText(\"\\u4FEE\\u6539\\u4E66\\u7C7B\");\n\n\t\tMenuItem menu2_delete = new MenuItem(menu_3, SWT.NONE);\n\t\tmenu2_delete.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/exit.png\"));\n\t\tmenu2_delete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tBooktype_delete window = new Booktype_delete();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu2_delete.setText(\"\\u5220\\u9664\\u4E66\\u7C7B\");\n\n\t\tMenuItem menumark = new MenuItem(menu, SWT.CASCADE);\n\t\tmenumark.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/student.png\"));\n\t\tmenumark.setText(\"\\u501F\\u8FD8\\u8BB0\\u5F55\");\n\n\t\tMenu menu_4 = new Menu(menumark);\n\t\tmenumark.setMenu(menu_4);\n\n\t\tMenuItem menu3_borrow = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_borrow.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/edit.png\"));\n\t\tmenu3_borrow.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_borrowmark window = new Admin_borrowmark();\n\t\t\t\twindow.open();// 借书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_borrow.setText(\"\\u501F\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem menu3_return = new MenuItem(menu_4, SWT.NONE);\n\t\tmenu3_return.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/search.png\"));\n\t\tmenu3_return.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_returnmark window = new Admin_returnmark();\n\t\t\t\twindow.open();// 还书记录\n\t\t\t}\n\t\t});\n\t\tmenu3_return.setText(\"\\u8FD8\\u4E66\\u8BB0\\u5F55\");\n\n\t\tMenuItem mntmhelp = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmhelp.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/about.png\"));\n\t\tmntmhelp.setText(\"\\u5173\\u4E8E\");\n\n\t\tMenu menu_5 = new Menu(mntmhelp);\n\t\tmntmhelp.setMenu(menu_5);\n\n\t\tMenuItem menu4_Info = new MenuItem(menu_5, SWT.NONE);\n\t\tmenu4_Info.setImage(SWTResourceManager.getImage(Admin_BookShow.class, \"/images/me.png\"));\n\t\tmenu4_Info.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t\tAdmin_Info window = new Admin_Info();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmenu4_Info.setText(\"\\u8F6F\\u4EF6\\u4FE1\\u606F\");\n\n\t\ttable = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttable.setFont(SWTResourceManager.getFont(\"黑体\", 10, SWT.NORMAL));\n\t\ttable.setLinesVisible(true);\n\t\ttable.setHeaderVisible(true);\n\t\ttable.setBounds(10, 191, 1119, 447);\n\n\t\tTableColumn tableColumn = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn.setWidth(29);\n\n\t\tTableColumn tableColumn_id = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_id.setWidth(110);\n\t\ttableColumn_id.setText(\"\\u56FE\\u4E66\\u7F16\\u53F7\");\n\n\t\tTableColumn tableColumn_name = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_name.setWidth(216);\n\t\ttableColumn_name.setText(\"\\u56FE\\u4E66\\u540D\\u79F0\");\n\n\t\tTableColumn tableColumn_author = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_author.setWidth(117);\n\t\ttableColumn_author.setText(\"\\u56FE\\u4E66\\u79CD\\u7C7B\");\n\n\t\tTableColumn tableColumn_pub = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_pub.setWidth(148);\n\t\ttableColumn_pub.setText(\"\\u4F5C\\u8005\");\n\n\t\tTableColumn tableColumn_stock = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_stock.setWidth(167);\n\t\ttableColumn_stock.setText(\"\\u51FA\\u7248\\u793E\");\n\n\t\tTableColumn tableColumn_sortid = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_sortid.setWidth(79);\n\t\ttableColumn_sortid.setText(\"\\u5E93\\u5B58\");\n\n\t\tTableColumn tableColumn_record = new TableColumn(table, SWT.CENTER);\n\t\ttableColumn_record.setWidth(247);\n\t\ttableColumn_record.setText(\"\\u767B\\u8BB0\\u65F6\\u95F4\");\n\n\t\tCombo combo_way = new Combo(shell, SWT.NONE);\n\t\tcombo_way.add(\"图书编号\");\n\t\tcombo_way.add(\"图书名称\");\n\t\tcombo_way.add(\"图书作者\");\n\t\tcombo_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tcombo_way.setBounds(314, 157, 131, 28);\n\n\t\t// 遍历查询book表\n\t\tButton btnButton_select = new Button(shell, SWT.NONE);\n\t\tbtnButton_select.setImage(SWTResourceManager.getImage(Book_select.class, \"/images/search.png\"));\n\t\tbtnButton_select.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tbtnButton_select.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tBook book = new Book();\n\t\t\t\tSelectbook selectbook = new Selectbook();\n\t\t\t\ttable.removeAll();\n\t\t\t\tif (combo_way.getText().equals(\"图书编号\")) {\n\t\t\t\t\tbook.setBook_id(text_select.getText().trim());\n\t\t\t\t\tString str[][] = selectbook.ShowAidBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书名称\")) {\n\t\t\t\t\tbook.setBook_name(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAnameBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().equals(\"图书作者\")) {\n\t\t\t\t\tbook.setBook_author(\"%\" + text_select.getText().trim() + \"%\");\n\t\t\t\t\tString str[][] = selectbook.ShowAauthorBook(book);\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (combo_way.getText().length() == 0) {\n\t\t\t\t\tString str[][] = selectbook.ShowAllBook();\n\t\t\t\t\tfor (int i = 1; i < str.length; i++) {\n\t\t\t\t\t\tTableItem item = new TableItem(table, SWT.NONE);\n\t\t\t\t\t\titem.setText(i + \".\");\n\t\t\t\t\t\titem.setText(str[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnButton_select.setBounds(664, 155, 98, 30);\n\t\tbtnButton_select.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tbtnButton_select.setText(\"查询\");\n\n\t\ttext_select = new Text(shell, SWT.BORDER);\n\t\ttext_select.setBounds(472, 155, 186, 30);\n\n\t\tLabel lblNewLabel_way = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_way.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel_way.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel_way.setBounds(314, 128, 107, 30);\n\t\tlblNewLabel_way.setText(\"\\u67E5\\u8BE2\\u65B9\\u5F0F\\uFF1A\");\n\n\t\tLabel lblNewLabel_1 = new Label(shell, SWT.NONE);\n\t\tlblNewLabel_1.setText(\"\\u56FE\\u4E66\\u67E5\\u8BE2\");\n\t\tlblNewLabel_1.setForeground(SWTResourceManager.getColor(255, 255, 255));\n\t\tlblNewLabel_1.setFont(SWTResourceManager.getFont(\"黑体\", 25, SWT.BOLD));\n\t\tlblNewLabel_1.setAlignment(SWT.CENTER);\n\t\tlblNewLabel_1.setBounds(392, 54, 266, 48);\n\n\t\tLabel lblNewLabel = new Label(shell, SWT.NONE);\n\t\tlblNewLabel.setText(\"\\u8F93\\u5165\\uFF1A\");\n\t\tlblNewLabel.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\tlblNewLabel.setFont(SWTResourceManager.getFont(\"黑体\", 12, SWT.NORMAL));\n\t\tlblNewLabel.setBounds(472, 129, 76, 20);\n\n\t}", "@Override\r\n\tprotected final void createAppWindows() {\r\n \t//Instantiate only DD-specific windows. SFDC-scope windows (such as mainWindow) are static\r\n \t// objects in the EISTestBase class\r\n \tmyDocumentsPopUp = createWindow(\"WINDOW_MY_DOCUMENTS_POPUP_PROPERTIES_FILE\");\r\n }", "private void build() {\r\n \tapplyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n setContentPane(buildContentPane());\r\n setTitle(getWindowTitle());\r\n setJMenuBar(\r\n createMenuBuilder(this).buildMenuBar(\r\n settings,\r\n createHelpActionListener(),\r\n createAboutActionListener()));\r\n setIconImage(readImageIcon(\"eye_16x16.gif\").getImage());\r\n }", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.TITLE);\r\n\r\n\t\tgetParent().setEnabled(false);\r\n\r\n\t\tshell.addShellListener(new ShellAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void shellClosed(ShellEvent e) {\r\n\t\t\t\tgetParent().setEnabled(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tshell.setImage(SWTResourceManager.getImage(LoginInfo.class, \"/javax/swing/plaf/metal/icons/ocean/warning.png\"));\r\n\r\n\t\tsetMidden(397, 197);\r\n\r\n\t\tshell.setText(this.windows_name);\r\n\t\tshell.setLayout(null);\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 11, SWT.NORMAL));\r\n\t\tlabel.setBounds(79, 45, 226, 30);\r\n\t\tlabel.setAlignment(SWT.CENTER);\r\n\t\tlabel.setText(this.label_show);\r\n\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.setBounds(150, 107, 86, 30);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tshell.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setText(\"确定\");\r\n\r\n\t}", "void createWindow();", "public void createWindow() throws IOException {\n\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"adminEditorWindow.fxml\"));\n AnchorPane root = (AnchorPane) loader.load();\n Scene scene = new Scene(root);\n Stage stage = new Stage();\n stage.setResizable(false);\n stage.setScene(scene);\n stage.setTitle(\"Administrative Password Editor\");\n stage.getIcons().add(new Image(\"resources/usm seal icon.png\"));\n stage.show();\n\t}", "public void open() {\n\t\tthis.createContents();\n\n\t\tWindowBuilder delegate = this.getDelegate();\n\t\tdelegate.setTitle(this.title);\n\t\tdelegate.setContents(this);\n\t\tdelegate.setIcon(this.iconImage);\n\t\tdelegate.setMinHeight(this.minHeight);\n\t\tdelegate.setMinWidth(this.minWidth);\n\t\tdelegate.open();\n\t}", "private void createYourMusicContent() {\n\t\t/**Creates all images we will use for the buttons*/\n\t\tImageIcon image1 = new ImageIcon(sURLFB1);\n\t\tImageIcon image2 = new ImageIcon(sURLFB2);\n\t\tImageIcon image3 = new ImageIcon(sURLFB3);\n\t\tImageIcon image4 = new ImageIcon(sURLFBS1);\n\t\tImageIcon image5 = new ImageIcon(sURLFBS2);\n\t\tImageIcon image6 = new ImageIcon(sURLFBS3);\n\t\tImageIcon image7 = new ImageIcon(sURLFBPL1);\n\t\tImageIcon image8 = new ImageIcon(sURLFBPL2);\n\t\tImageIcon image9 = new ImageIcon(sURLFBPL3);\n\t\n\t\t/**Creates the button of Favourites and configures it*/\n\t\tjbFavorites = new JButton(\"Favorites\");\n\t\tjbFavorites.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbFavorites.setForeground(new Color(150,100,100));\n\t\tjbFavorites.setIcon(image1);\n\t\tjbFavorites.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbFavorites.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbFavorites.setRolloverIcon(image2);\n\t\tjbFavorites.setSelectedIcon(image3);\n\t\tjbFavorites.setContentAreaFilled(false);\n\t\tjbFavorites.setFocusable(false);\n\t\tjbFavorites.setBorderPainted(false);\n\t\t\n\t\t/**Creates the button of Songs and configures it*/\n\t\tjbSongs = new JButton(\"Songs\");\n\t\tjbSongs.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbSongs.setForeground(new Color(150,100,100));\n\t\tjbSongs.setIcon(image4);\n\t\tjbSongs.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbSongs.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbSongs.setRolloverIcon(image5);\n\t\tjbSongs.setSelectedIcon(image6);\n\t\tjbSongs.setContentAreaFilled(false);\n\t\tjbSongs.setFocusable(false);\n\t\tjbSongs.setBorderPainted(false);\n\t\t\n\t\t/**Creates the button of PartyList and configures it*/\n\t\tjbPartyList = new JButton(\"PartyList\");\n\t\tjbPartyList.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbPartyList.setForeground(new Color(150,100,100));\n\t\tjbPartyList.setIcon(image7);\n\t\tjbPartyList.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbPartyList.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbPartyList.setRolloverIcon(image8);\n\t\tjbPartyList.setSelectedIcon(image9);\t\n\t\tjbPartyList.setContentAreaFilled(false);\n\t\tjbPartyList.setFocusable(false);\n\t\tjbPartyList.setBorderPainted(false);\n\t\t\n\t\t/**Creates the panel where we will put all buttons*/\n\t\tjpPreLists = new JPanel(new BorderLayout());\n jpPreLists.setOpaque(false);\n\t\tjpPreLists.add(jbFavorites,BorderLayout.NORTH);\n\t\tjpPreLists.add(jbSongs,BorderLayout.CENTER);\n\t\tjpPreLists.add(jbPartyList,BorderLayout.SOUTH);\n\t}", "protected void createContents() {\n\t\tshlMenu = new Shell();\n\t\tshlMenu.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/File-delete-icon.png\"));\n\t\tshlMenu.setBackground(SWTResourceManager.getColor(255, 102, 0));\n\t\tshlMenu.setSize(899, 578);\n\t\tshlMenu.setText(\"MENU\");\n\t\t\n\t\tMenu menu = new Menu(shlMenu, SWT.BAR);\n\t\tshlMenu.setMenuBar(menu);\n\t\t\n\t\tMenuItem mnętmBookLists = new MenuItem(menu, SWT.NONE);\n\t\tmnętmBookLists.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booklist frame \n\t\t\t\tBookListFrame window = new BookListFrame();\n\t\t\t\twindow.open();\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmnętmBookLists.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Todo-List-icon.png\"));\n\t\tmnętmBookLists.setText(\"Book Lists\");\n\t\t\n\t\tMenuItem mnętmMemberList = new MenuItem(menu, SWT.NONE);\n\t\tmnętmMemberList.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call memberlistframe\n\t\t\t\tMemberListFrame window = new MemberListFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tmnętmMemberList.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Misc-User-icon.png\"));\n\t\tmnętmMemberList.setText(\"Member List\");\n\t\t\n\t\tMenuItem mnętmNewItem = new MenuItem(menu, SWT.NONE);\n\t\tmnętmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call rent list\n\t\t\t\tRentListFrame rlf=new RentListFrame();\n\t\t\t\trlf.open();\n\t\t\t}\n\t\t});\n\t\tmnętmNewItem.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Time-And-Date-Calendar-icon.png\"));\n\t\tmnętmNewItem.setText(\"Rent List\");\n\t\t\n\t\tButton btnNewButton = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call booksettingsframe\n\t\t\t\tBookSettingsFrame window = new BookSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Printing-Books-icon.png\"));\n\t\tbtnNewButton.setBounds(160, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t//call membersettingsframe\n\t\t\t\tMemberSettingsFrame window = new MemberSettingsFrame();\n\t\t\t\twindow.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_1.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Add-User-icon.png\"));\n\t\tbtnNewButton_1.setBounds(367, 176, 114, 112);\n\t\t\n\t\tButton btnNewButton_2 = new Button(shlMenu, SWT.NONE);\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tRentingFrame rf=new RentingFrame();\n\t\t\t\trf.open();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_2.setForeground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));\n\t\tbtnNewButton_2.setImage(SWTResourceManager.getImage(MainMenu.class, \"/ikons/Business-Statistics-icon.png\"));\n\t\tbtnNewButton_2.setBounds(567, 176, 114, 112);\n\n\t}", "private void favouriteChampion() {\r\n JFrame recordWindow = new JFrame(\"Favourite a champion\");\r\n// recordWindow.setLocationRelativeTo(null);\r\n// recordWindow.getContentPane().setLayout(new BoxLayout(recordWindow.getContentPane(), BoxLayout.Y_AXIS));\r\n initiateFavouriteChampionFields(recordWindow);\r\n new Frame(recordWindow);\r\n// recordWindow.pack();\r\n// recordWindow.setVisible(true);\r\n }", "private void buildAndShowWindow() {\n SwingUtilities.invokeLater(() -> {\n buildWindow().setVisible(true);\n });\n }", "private void todoChooserGui() {\r\n jframe = makeFrame(\"My Todo List\", 500, 800, JFrame.EXIT_ON_CLOSE);\r\n panelSelectFile = makePanel(jframe, BorderLayout.CENTER,\r\n \"Choose a Todo\", 150, 50, 200, 25);\r\n JButton clickRetrieve = makeButton(\"retrieveTodo\", \"Retrieve A TodoList\",\r\n 175, 100, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n panelSelectFile.add(clickRetrieve);\r\n JTextField textFieldName = makeJTextField(1, 100, 150, 150, 25);\r\n textFieldName.setName(\"Name\");\r\n panelSelectFile.add(textFieldName);\r\n JButton clickNew = makeButton(\"newTodo\", \"Make New TodoList\",\r\n 250, 150, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n panelSelectFile.add(clickNew);\r\n panelSelectFile.setBackground(Color.WHITE);\r\n jframe.setBackground(Color.PINK);\r\n jframe.setVisible(true);\r\n }", "private void initDialog() {\n Window subWindow = new Window(\"Sub-window\");\n \n FormLayout nameLayout = new FormLayout();\n TextField code = new TextField(\"Code\");\n code.setPlaceholder(\"Code\");\n \n TextField description = new TextField(\"Description\");\n description.setPlaceholder(\"Description\");\n \n Button confirm = new Button(\"Save\");\n confirm.addClickListener(listener -> insertRole(code.getValue(), description.getValue()));\n\n nameLayout.addComponent(code);\n nameLayout.addComponent(description);\n nameLayout.addComponent(confirm);\n \n subWindow.setContent(nameLayout);\n \n // Center it in the browser window\n subWindow.center();\n\n // Open it in the UI\n UI.getCurrent().addWindow(subWindow);\n\t}", "public static void createAndShowStartWindow() {\n\n\t\t// Create and set up the window.\n\n\t\tstartMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t// panel will hold the buttons and text\n\t\tJPanel panel = new JPanel() {\n\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t// Fills the panel with a red/black gradient\n\t\t\tprotected void paintComponent(Graphics grphcs) {\n\t\t\t\tGraphics2D g2d = (Graphics2D) grphcs;\n\t\t\t\tg2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\n\t\t\t\tColor color1 = new Color(119, 29, 29);\n\t\t\t\tColor color2 = Color.BLACK;\n\t\t\t\tGradientPaint gp = new GradientPaint(0, 0, color1, 0, getHeight() - 100, color2);\n\t\t\t\tg2d.setPaint(gp);\n\t\t\t\tg2d.fillRect(0, 0, getWidth(), getHeight());\n\n\t\t\t\tsuper.paintComponent(grphcs);\n\t\t\t}\n\t\t};\n\n\t\tpanel.setOpaque(false);\n\n\t\tpanel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n\n\t Font customFont = null;\n\t \n\n\t\ttry {\n\t\t customFont = Font.createFont(Font.TRUETYPE_FONT, ClassLoader.getSystemClassLoader().getResourceAsStream(\"data/AlegreyaSC-Medium.ttf\")).deriveFont(32f);\n\n\t\t GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n\t\t ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, ClassLoader.getSystemClassLoader().getResourceAsStream(\"data/AlegreyaSC-Medium.ttf\")));\n\t\t\n\n\t\t} catch (IOException|FontFormatException e) {\n\t\t //Handle exception\n\t\t}\n\t\t\n\n\t\t\n\t\t// Some info text at the top of the window\n\t\tJLabel welcome = new JLabel(\"<html><center><font color='white'> Welcome to <br> Ultimate Checkers! </font></html>\",\n\t\t\t\tSwingConstants.CENTER);\n\t\twelcome.setFont(customFont);\n\t\n\n\t\twelcome.setPreferredSize(new Dimension(200, 25));\n\t\twelcome.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n\n\t\t// \"Rigid Area\" is used to align everything\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 40)));\n\t\tpanel.add(welcome);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 50)));\n\t\t//panel.add(choose);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\n\t\t// The start Window will have four buttons\n\t\t// Button1 will open a new window with a standard checkers board\n\t\tJButton button1 = new JButton(\"New Game (Standard Setup)\");\n\n\t\tbutton1.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\tNewGameSettings.createAndShowGameSettings();\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\t\t// Setting up button1\n\t\tbutton1.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton1.setMaximumSize(new Dimension(250, 40));\n\n\t\t// Button2 will open a new window where a custom setup can be created\n\t\tJButton button2 = new JButton(\"New Game (Custom Setup)\");\n\t\tbutton2.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// Begin creating custom game board setup for checkers\n\t\t\t\t\t\tNewCustomWindow.createAndShowCustomGame();\n\t\t\t\t\t\t// Close the start menu window and remove it from memory\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Setting up button2\n\t\tbutton2.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton2.setMaximumSize(new Dimension(250, 40));\n\n\t\t// Button3 is not implemented yet, it will be used to load a saved game\n\t\tJButton button3 = new JButton(\"Load A Saved Game\");\n\t\tbutton3.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton3.setMaximumSize(new Dimension(250, 40));\n\t\tbutton3.addActionListener(new ActionListener() {\n\n\t\t\tfinal JFrame popupWrongFormat = new PopupFrame(\n\t\t\t\t\t\"Wrong Format!\",\n\t\t\t\t\t\"<html><center>\"\n\t\t\t\t\t\t\t+ \"The save file is in the wrong format! <br><br>\"\n\t\t\t\t\t\t\t+ \"Please make sure the load file is in csv format with an 8x8 table, \"\n\t\t\t\t\t\t\t+ \"followed by whose turn it is, \"\n\t\t\t\t\t\t\t+ \"the white player type and the black player type.\"\n\t\t\t\t\t\t\t+ \"</center></html>\");\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// This will create the file chooser\n\t\t\t\t\t\tJFileChooser chooser = new JFileChooser();\n\n\t\t\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"CSV Files\", \"csv\");\n\t\t\t\t\t\tchooser.setFileFilter(filter);\n\n\t\t\t\t\t\tint returnVal = chooser.showOpenDialog(startMenu);\n\t\t\t\t\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\t\tFile file = chooser.getSelectedFile();\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcheckAndPlay(file);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tpopupWrongFormat.setVisible(true);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Do nothing. Load cancelled by user.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Button4 closes the game\n\t\tJButton button4 = new JButton(\"Exit Ultimate Checkers\");\n\t\tbutton4.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tjavax.swing.SwingUtilities.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// Close the start menu window and remove it from memory\n\t\t\t\t\t\tstartMenu.dispose();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t});\n\n\t\t// Setting up button4\n\t\tbutton4.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tbutton4.setMaximumSize(new Dimension(250, 40));\n\n\t\t// The four buttons are added to the panel and aligned\n\t\tpanel.add(button1);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tpanel.add(button2);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 20)));\n\t\tpanel.add(button3);\n\t\tpanel.add(Box.createRigidArea(new Dimension(0, 80)));\n\t\tpanel.add(button4);\n\n\t\t// Setting up the start Menu\n\t\tstartMenu.setSize(400, 600);\n\t\tstartMenu.setResizable(false);\n\n\t\t// Centers the window with respect to the user's screen resolution\n\t\tDimension dimension = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tint x = (int) ((dimension.getWidth() - startMenu.getWidth()) / 2);\n\t\tint y = (int) ((dimension.getHeight() - startMenu.getHeight()) / 2);\n\t\tstartMenu.setLocation(x, y);\n\n\t\tstartMenu.add(panel, BorderLayout.CENTER);\n\t\tstartMenu.setVisible(true);\n\n\t}", "protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}", "public FilmWindow(int billboard) {\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 731, 588);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(new Color(64, 224, 208));\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\n\t\tlblFilmImage.setHorizontalAlignment(SwingConstants.CENTER);\n\n\t\tJButton btnExit = new JButton(\"SALIR\");\n\t\tbtnExit.setFont(new Font(\"Tahoma\", Font.BOLD, 10));\n\t\tbtnExit.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\n\t\tJButton btnShowCinemas = new JButton(\"MOSTRAR CINES\");\n\t\tbtnShowCinemas.setFont(new Font(\"Tahoma\", Font.BOLD, 10));\n\n\t\tJLabel lblDsc = new JLabel(\"Descripción:\");\n\t\tlblDsc.setHorizontalAlignment(SwingConstants.CENTER);\n\n\t\tfinal JComboBox<String> comboBoxFilm = new JComboBox<String>();\n\n\t\ttransformFilms(billFilms, films);\n\t\tfor (Film film : films) {\n\t\t\tfilmName = film.getName();\n\t\t\tcomboBoxFilm.addItem(filmName);\n\t\t}\n\n\t\t// ESTO ESTA PARA QUE LA PRIMERA PELI QUE SALGA SEA LA SELECCIONADA EN LA\n\t\t// ANTERIOR VENTANA\n\t\tcomboBoxFilm.setSelectedItem(films.get(billboard));\n\n\t\tfilm = films.get(billboard);\n\t\tageFilm = film.getAgeRestriction();\n\t\tfilmName = film.getName();\n\t\turlFilm = film.getUrl();\n\t\tdescFilm = film.getDescription();\n\t\ttrailerFilm = film.getTrailer();\n\t\tImage image = null;\n\t\ttry {\n\t\t\tURL url = new URL(urlFilm);\n\t\t\timage = ImageIO.read(url);\n\t\t\tImageIcon myImg = new ImageIcon(url);\n\t\t\timage = myImg.getImage();\n\n\t\t\tint width = myImg.getIconWidth() / 7 * 2;\n\t\t\tint height = myImg.getIconHeight() / 7 * 2;\n\n\t\t\tImage newImg = image.getScaledInstance(width, height, Image.SCALE_SMOOTH);\n\t\t\tImageIcon resizeImg = new ImageIcon(newImg);\n\t\t\tlblFilmImage.setIcon(resizeImg);\n\t\t\ttextPaneDescription.setText(descFilm);\n\t\t\t// textFieldFilmName.setText(filmName); //NOSE PORQUE NO FUNCIONA\n\t\t} catch (IOException e7) {\n\t\t}\n\n\t\tfilmAgeRestImage();\n\t\t// AQUI TERMINA EL METODO Y EMPIEZA EL DEL COMBOBOX\n\n\t\tcomboBoxFilm.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tnuevasPeliculas(comboBoxFilm);\n\t\t\t}\n\t\t});\n\n\t\ttextFieldFilmName = new JTextField();\n\t\ttextFieldFilmName.setEditable(false);\n\t\ttextFieldFilmName.setBackground(new Color(64, 224, 208));\n\t\ttextFieldFilmName.setHorizontalAlignment(SwingConstants.CENTER);\n\t\ttextFieldFilmName.setFont(new Font(\"Imprint MT Shadow\", Font.PLAIN, 52));\n\t\ttextFieldFilmName.setColumns(10);\n\n\t\ttextPaneDescription.setBackground(new Color(64, 224, 208));\n\n\t\tJButton btnBuyTickets = new JButton(\"COMPRAR ENTRADAS\");\n\t\tbtnBuyTickets.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tOrderWindow ow = new OrderWindow(film);\n\t\t\t\tUserResource ur = new UserResource();\n\t\t\t\tow.SetUserName(ur.getUser(lblUserName.getText()));\n\t\t\t\tow.setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\n\t\tJButton btnTrailer = new JButton(\"TRAILER\");\n\t\tbtnTrailer.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\ttry {\n\t\t\t\t\tDesktop.getDesktop().browse(new URL(trailerFilm).toURI());\n\t\t\t\t} catch (IOException | URISyntaxException e1) {\n\t\t\t\t\tlogger.log(Level.WARNING, \"ERROR\", e1);\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tGroupLayout gl_contentPane = new GroupLayout(contentPane);\n\t\tgl_contentPane.setHorizontalGroup(\n\t\t\tgl_contentPane.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(65)\n\t\t\t\t\t\t\t.addComponent(textFieldFilmName, GroupLayout.PREFERRED_SIZE, 302, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(168)\n\t\t\t\t\t\t\t.addComponent(lblFilmImage))\n\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t.addGap(55)\n\t\t\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addComponent(comboBoxFilm, GroupLayout.PREFERRED_SIZE, 269, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t.addGap(360)\n\t\t\t\t\t\t\t\t\t.addComponent(lblRecommendedAge, GroupLayout.PREFERRED_SIZE, 148, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\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.addComponent(lblDsc, GroupLayout.PREFERRED_SIZE, 102, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t.addComponent(btnExit, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t.addComponent(btnShowCinemas)\n\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t\t\t\t.addComponent(btnBuyTickets)\n\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.addComponent(btnTrailer))\n\t\t\t\t\t\t\t\t\t\t.addComponent(textPaneDescription, GroupLayout.PREFERRED_SIZE, 392, GroupLayout.PREFERRED_SIZE))))))\n\t\t\t\t\t.addGap(11))\n\t\t);\n\t\tgl_contentPane.setVerticalGroup(\n\t\t\tgl_contentPane.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t.addContainerGap()\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t.addGroup(gl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(comboBoxFilm, GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addComponent(textFieldFilmName, GroupLayout.PREFERRED_SIZE, 59, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addComponent(lblRecommendedAge, GroupLayout.PREFERRED_SIZE, 58, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(lblFilmImage, GroupLayout.PREFERRED_SIZE, 325, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(lblDsc, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(textPaneDescription, GroupLayout.PREFERRED_SIZE, 66, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addGap(2)\n\t\t\t\t\t.addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(btnExit, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(btnShowCinemas, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(btnBuyTickets, GroupLayout.PREFERRED_SIZE, 19, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(btnTrailer, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tcontentPane.setLayout(gl_contentPane);\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(656, 296);\n\n\t}", "protected void createContents() {\r\n\t\tsetText(\"SWT Application\");\r\n\t\tsetSize(450, 300);\r\n\r\n\t}", "void createGebruikersBeheerPanel() {\n frame.add(gebruikersBeheerView.createGebruikersBeheerPanel());\n frame.setTitle(gebruikersBeheerModel.getTitle());\n }", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(838, 649);\n\n\t}", "private void buildContentPane() {\n\t\t// The JPanel that will become the content pane\n\t\tJPanel cp = new JPanel();\n\t\tcp.setLayout(new BoxLayout(cp, BoxLayout.PAGE_AXIS));\n\n\t\tlanguagePanel = initLanguagePanel();\n\t\tcp.add(languagePanel);\n\n\t\tinputPanel = initInputPanel();\n\t\tcp.add(inputPanel);\n\n\t\tJPanel btnPanel = initBtnPanel();\n\t\tcp.add(btnPanel);\n\n\t\toutputPanel = initOutputPanel();\n\t\tcp.add(outputPanel);\n\n\t\tJPanel picturePanel = initPicturePanel();\n\t\tif(picturePanel == null) {\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_SMALL_HEIGHT);\n\t\t}\n\t\telse {\n\t\t\tcp.add(picturePanel);\n\t\t}\n\n\t\tLanguage selectedLang = languagePanel.getSelectedLanguage();\n\t\tsetLanguage(selectedLang);\n\n\t\tframe.setContentPane(cp);\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), SWT.MIN |SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(WordWatermarkDialog.class, \"/com/yc/ui/1.jpg\"));\n\t\tshell.setSize(436, 321);\n\t\tshell.setText(\"设置文字水印\");\n\t\t\n\t\tLabel label_font = new Label(shell, SWT.NONE);\n\t\tlabel_font.setBounds(38, 80, 61, 17);\n\t\tlabel_font.setText(\"字体名称:\");\n\t\t\n\t\tLabel label_style = new Label(shell, SWT.NONE);\n\t\tlabel_style.setBounds(232, 77, 61, 17);\n\t\tlabel_style.setText(\"字体样式:\");\n\t\t\n\t\tLabel label_size = new Label(shell, SWT.NONE);\n\t\tlabel_size.setBounds(38, 120, 68, 17);\n\t\tlabel_size.setText(\"字体大小:\");\n\t\t\n\t\tLabel label_color = new Label(shell, SWT.NONE);\n\t\tlabel_color.setBounds(232, 120, 68, 17);\n\t\tlabel_color.setText(\"字体颜色:\");\n\t\t\n\t\tLabel label_word = new Label(shell, SWT.NONE);\n\t\tlabel_word.setBounds(38, 38, 61, 17);\n\t\tlabel_word.setText(\"水印文字:\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(115, 35, 278, 23);\n\t\t\n\t\tButton button_confirm = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_confirm.setBounds(313, 256, 80, 27);\n\t\tbutton_confirm.setText(\"确定\");\n\t\t\n\t\tCombo combo = new Combo(shell, SWT.NONE);\n\t\tcombo.setItems(new String[] {\"宋体\", \"黑体\", \"楷体\", \"微软雅黑\", \"仿宋\"});\n\t\tcombo.setBounds(115, 77, 93, 25);\n\t\tcombo.setText(\"黑体\");\n\t\t\n\t\tCombo combo_1 = new Combo(shell, SWT.NONE);\n\t\tcombo_1.setItems(new String[] {\"粗体\", \"斜体\"});\n\t\tcombo_1.setBounds(300, 74, 93, 25);\n\t\tcombo_1.setText(\"粗体\");\n\t\t\n\t\tCombo combo_2 = new Combo(shell, SWT.NONE);\n\t\tcombo_2.setItems(new String[] {\"1\", \"3\", \"5\", \"8\", \"10\", \"12\", \"16\", \"18\", \"20\", \"24\", \"30\", \"36\", \"48\", \"56\", \"66\", \"72\"});\n\t\tcombo_2.setBounds(115, 117, 93, 25);\n\t\tcombo_2.setText(\"24\");\n\t\t\n\t\tCombo combo_3 = new Combo(shell, SWT.NONE);\n\t\tcombo_3.setItems(new String[] {\"红色\", \"绿色\", \"蓝色\"});\n\t\tcombo_3.setBounds(300, 117, 93, 25);\n\t\tcombo_3.setText(\"红色\");\n\t\t\n\t\tButton button_cancle = new Button(shell, SWT.NONE);\n\t\t\n\t\tbutton_cancle.setBounds(182, 256, 80, 27);\n\t\tbutton_cancle.setText(\"取消\");\n\t\t\n\t\tLabel label_X = new Label(shell, SWT.NONE);\n\t\tlabel_X.setBounds(31, 161, 68, 17);\n\t\tlabel_X.setText(\"X轴偏移值:\");\n\t\t\n\t\tCombo combo_4 = new Combo(shell, SWT.NONE);\n\t\tcombo_4.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_4.setBounds(115, 158, 93, 25);\n\t\tcombo_4.setText(\"50\");\n\t\t\n\t\tLabel label_Y = new Label(shell, SWT.NONE);\n\t\tlabel_Y.setText(\"Y轴偏移值:\");\n\t\tlabel_Y.setBounds(225, 161, 68, 17);\n\t\t\n\t\tCombo combo_5 = new Combo(shell, SWT.NONE);\n\t\tcombo_5.setItems(new String[] {\"10\", \"20\", \"30\", \"40\", \"50\", \"80\", \"100\", \"160\", \"320\", \"640\"});\n\t\tcombo_5.setBounds(300, 158, 93, 25);\n\t\tcombo_5.setText(\"50\");\n\t\t\n\t\tLabel label_alpha = new Label(shell, SWT.NONE);\n\t\tlabel_alpha.setBounds(46, 204, 53, 17);\n\t\tlabel_alpha.setText(\"透明度:\");\n\t\t\n\t\tCombo combo_6 = new Combo(shell, SWT.NONE);\n\t\tcombo_6.setItems(new String[] {\"0\", \"0.1\", \"0.2\", \"0.3\", \"0.4\", \"0.5\", \"0.6\", \"0.7\", \"0.8\", \"0.9\", \"1.0\"});\n\t\tcombo_6.setBounds(115, 201, 93, 25);\n\t\tcombo_6.setText(\"0.8\");\n\t\t\n\t\t//取消按钮\n\t\tbutton_cancle.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t//确认按钮\n\t\tbutton_confirm.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tif(text.getText().trim()==null || \"\".equals(text.getText().trim())\n\t\t\t\t\t\t||combo.getText().trim()==null || \"\".equals(combo.getText().trim()) \n\t\t\t\t\t\t\t||combo_1.getText().trim()==null || \"\".equals(combo_1.getText().trim())\n\t\t\t\t\t\t\t\t|| combo_2.getText().trim()==null || \"\".equals(combo_2.getText().trim())\n\t\t\t\t\t\t\t\t\t|| combo_3.getText().trim()==null || \"\".equals(combo_3.getText().trim())\n\t\t\t\t\t\t\t\t\t\t||combo_4.getText().trim()==null || \"\".equals(combo_4.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t||combo_5.getText().trim()==null || \"\".equals(combo_5.getText().trim())\n\t\t\t\t\t\t\t\t\t\t\t\t||combo_6.getText().trim()==null || \"\".equals(combo_6.getText().trim())){\n\t\t\t\t\tMessageDialog.openError(shell, \"错误\", \"输入框不能为空或输入空值,请确认后重新输入!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString word=text.getText().trim();\n\t\t\t\tString wordName=getFontName(combo.getText().trim());\n\t\t\t\tint wordStyle=getFonStyle(combo_1.getText().trim());\n\t\t\t\tint wordSize=Integer.parseInt(combo_2.getText().trim());\n\t\t\t\tColor wordColor=getFontColor(combo_3.getText().trim());\n\t\t\t\tint word_X=Integer.parseInt(combo_4.getText().trim());\n\t\t\t\tint word_Y=Integer.parseInt(combo_5.getText().trim());\n\t\t\t\tfloat word_Alpha=Float.parseFloat(combo_6.getText().trim());\n\t\t\t\t\n\t\t\t\tis=MeituUtils.waterMarkWord(EditorUi.filePath,word, wordName, wordStyle, wordSize, wordColor, word_X, word_Y,word_Alpha);\n\t\t\t\tCommon.image=new Image(display,is);\n\t\t\t\tWordWatermarkDialog.this.shell.dispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tcombo.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t\tcombo_1.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_2.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_3.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[^0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\t\n\t\t\n\t\tcombo_4.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_5.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\"[0-9]\\\\d*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\t\t\n\t\tcombo_6.addVerifyListener(new VerifyListener() { \n\t\t\t public void verifyText(VerifyEvent e) { \n\t\t\t Pattern pattern = Pattern.compile(\".[0-9]*\"); \n\t\t\t Matcher matcher = pattern.matcher(e.text); \n\t\t\t if (matcher.matches()) // 处理数字 \n\t\t\t \t e.doit = true; \n\t\t\t else if (e.text.length() > 0) // 有字符情况,包含中文、空格 \n\t\t\t \t e.doit = false; \n\t\t\t else \n\t\t\t \t e.doit = false; \n\t\t\t } \n\t\t });\n\n\t}", "private void createContents() {\r\n\t\tshlOProgramie = new Shell(getParent().getDisplay(), SWT.DIALOG_TRIM\r\n\t\t\t\t| SWT.RESIZE);\r\n\t\tshlOProgramie.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tshlOProgramie.setText(\"O programie\");\r\n\t\tshlOProgramie.setSize(386, 221);\r\n\t\tint x = 386;\r\n\t\tint y = 221;\r\n\t\t// Get the resolution\r\n\t\tRectangle pDisplayBounds = shlOProgramie.getDisplay().getBounds();\r\n\r\n\t\t// This formulae calculate the shell's Left ant Top\r\n\t\tint nLeft = (pDisplayBounds.width - x) / 2;\r\n\t\tint nTop = (pDisplayBounds.height - y) / 2;\r\n\r\n\t\t// Set shell bounds,\r\n\t\tshlOProgramie.setBounds(nLeft, nTop, x, y);\r\n\t\tsetText(\"O programie\");\r\n\r\n\t\tbtnZamknij = new Button(shlOProgramie, SWT.PUSH | SWT.BORDER_SOLID);\r\n\t\tbtnZamknij.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\tshlOProgramie.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnZamknij.setBounds(298, 164, 68, 23);\r\n\t\tbtnZamknij.setText(\"Zamknij\");\r\n\r\n\t\tText link = new Text(shlOProgramie, SWT.READ_ONLY);\r\n\t\tlink.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlink.setBounds(121, 127, 178, 13);\r\n\t\tlink.setText(\"Kontakt: wtrocki@gmail.com\");\r\n\r\n\t\tCLabel lblNewLabel = new CLabel(shlOProgramie, SWT.BORDER\r\n\t\t\t\t| SWT.SHADOW_IN | SWT.SHADOW_OUT | SWT.SHADOW_NONE);\r\n\t\tlblNewLabel.setBackground(SWTResourceManager.getColor(230, 230, 250));\r\n\t\tlblNewLabel.setBounds(118, 20, 248, 138);\r\n\t\tlblNewLabel\r\n\t\t\t\t.setText(\" Kalkulator walut ver 0.0.2 \\r\\n -------------------------------\\r\\n Program umo\\u017Cliwiaj\\u0105cy pobieranie\\r\\n aktualnych kurs\\u00F3w walut ze strony nbp.pl\\r\\n\\r\\n Copyright by Wojciech Trocki.\\r\\n\");\r\n\r\n\t\tLabel lblNewLabel_1 = new Label(shlOProgramie, SWT.NONE);\r\n\t\tlblNewLabel_1.setBackground(SWTResourceManager.getColor(255, 255, 255));\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(\"images/about.gif\"));\r\n\t\tlblNewLabel_1.setBounds(10, 20, 100, 138);\r\n\t}", "private BorderPane makeNamePane() {\n \n /* The items in a ListView<String> are stored in an ObservableList<String>.\n * One way to add items is to make an observable list and pass it as\n * a parameter to the ListView constructor. */\n \n ObservableList<String> names = FXCollections.observableArrayList(\n \"Fred\", \"Wilma\", \"Betty\", \"Barney\", \"Jane\", \"John\", \"Joe\", \"Judy\");\n ListView<String> listView = new ListView<String>(names);\n \n /* For the items to be editable, listView must be made editable, and a \n * \"cell factory\" must be installed that will make editable cells for\n * display in the list. For editing strings, the cell factory can\n * be created by the factory method TextFieldListCell.forListView(). */\n \n listView.setEditable(true);\n listView.setCellFactory(TextFieldListCell.forListView());\n \n /* Make a BordePane, with a title \"My Favorite Names\" in the top position. */\n \n BorderPane namePane = new BorderPane(listView);\n Label top = new Label(\"My Favorite Names\");\n top.setPadding( new Insets(10) );\n top.setFont( Font.font(20) );\n top.setTextFill(Color.YELLOW);\n top.setMaxWidth(Double.POSITIVE_INFINITY);\n top.setAlignment(Pos.CENTER);\n top.setStyle(\"-fx-background-color: black\");\n namePane.setTop(top);\n \n /* Create the bottom node for the BorderPane. It contains two labels whose\n * text property is taken from properties of the ListView's SelectionModel.\n * It contains a Button that can be used to delete the selected item; this\n * button's disable property is bound to a boolean property derived from\n * the selection model. And it contains a TextField where the user can\n * enter a new item for the list. When the text field has focus, an\n * associated \"Add\" button becomes the default button for the window, so\n * the user can add the item to the list just by pressing return while\n * typing in the input box.\n */\n \n Label selectedIndexLabel = new Label();\n selectedIndexLabel.textProperty().bind(\n listView.getSelectionModel().selectedIndexProperty().asString(\"Selected Index: %d\") );\n \n Label selectedNameLabel = new Label();\n selectedNameLabel.textProperty().bind(\n listView.getSelectionModel().selectedItemProperty().asString(\"SelectedItem: %s\") );\n \n Button deleteNameButton = new Button(\"Delete Selected Item\");\n deleteNameButton.setMaxWidth(Double.POSITIVE_INFINITY);\n deleteNameButton.disableProperty().bind( \n listView.getSelectionModel().selectedIndexProperty().isEqualTo(-1) );\n deleteNameButton.setOnAction( e -> {\n int index = listView.getSelectionModel().getSelectedIndex();\n if (index >= 0)\n names.remove(index);\n });\n \n TextField addNameInput = new TextField();\n addNameInput.setPrefColumnCount(10);\n Button addNameButton = new Button(\"Add: \");\n addNameButton.setOnAction( e -> {\n String name = addNameInput.getText().trim();\n if (name.length() > 0) {\n names.add(name);\n addNameInput.selectAll();\n listView.scrollTo(names.size() - 1); // make sure item is visible at the bottom of the list\n }\n });\n addNameButton.defaultButtonProperty().bind( addNameInput.focusedProperty() );\n HBox addNameHolder = new HBox(5,addNameButton,addNameInput);\n \n VBox nameBot = new VBox(12, selectedIndexLabel, selectedNameLabel, deleteNameButton, addNameHolder );\n nameBot.setPadding(new Insets(10));\n namePane.setBottom(nameBot);\n \n return namePane;\n \n }", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\r\n\t}", "protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(437, 529);\n\n\t}", "private void setupWindow() {\n // Some visual tweaks - first, modify window width based on screen dp. Height handled\n // later after the adapter is populated\n WindowManager.LayoutParams params = getWindow().getAttributes();\n DisplayMetrics metrics = getResources().getDisplayMetrics();\n if (isSmallTablet(metrics)) {\n params.width = (metrics.widthPixels * 2 / 3);\n params.height = (metrics.heightPixels * 3 / 5);\n }\n // For phone screens, we won't adjust the window dimensions\n\n // Don't dim the background while the activity is displayed\n params.alpha = 1.0f;\n params.dimAmount = 0.0f;\n\n getWindow().setAttributes(params);\n\n // Set dialog title\n Set<String> preferredLines =\n PreferenceManager.getDefaultSharedPreferences(this).getStringSet(DashTubeExtension.FAVOURITE_LINES_PREF, null);\n setTitle((preferredLines != null && preferredLines.size() > 0)\n ? R.string.expanded_title_filtered\n : R.string.expanded_title);\n\n // Updated time text\n String updatedStr = String.format(getString(R.string.updated_at),\n getIntent().getStringExtra(DashTubeExtension.TUBE_STATUS_TIMESTAMP));\n\n TextView time = (TextView) findViewById(R.id.updated_at);\n time.setText(updatedStr);\n }", "private static void createAndShowGUI() {\n\t\tJFrame window = MainWindow.newInstance();\n\t\t\n //Display the window.\n window.pack();\n window.setVisible(true);\n \n }", "public void showCreatePickUPTutorial() {\n ShowcaseView mShowcaseViewCreatePickup = new ShowcaseView.Builder(getActivity())\n .setTarget(new ViewTarget(createpickup))\n .setContentText(getResources().getString(R.string.tutorial_msg_create_pickup))\n .setContentTextPaint(Utility.getTextPaint(getActivity()))\n .singleShot(AppConstants.TUTORIAL_CREATE_PICK_UP_ID)\n .hideOnTouchOutside()\n .setStyle(R.style.CustomShowcaseTheme2)\n .build();\n\n RelativeLayout.LayoutParams lps = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n lps.addRule(RelativeLayout.ALIGN_PARENT_TOP);\n lps.addRule(RelativeLayout.ALIGN_PARENT_LEFT);\n int margin = ((Number) (getResources().getDisplayMetrics().density * 12)).intValue();\n lps.setMargins(margin, margin, margin, margin);\n mShowcaseViewCreatePickup.setButtonPosition(lps);\n mShowcaseViewCreatePickup.setButtonText(getResources().getString(R.string.tutorial_got_it));\n }", "protected void createContents() {\n\t\tshlFaststone = new Shell();\n\t\tshlFaststone.setImage(SWTResourceManager.getImage(Edit.class, \"/image/all1.png\"));\n\t\tshlFaststone.setToolTipText(\"\");\n\t\tshlFaststone.setSize(944, 479);\n\t\tshlFaststone.setText(\"kaca\");\n\t\tshlFaststone.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tComposite composite = new Composite(shlFaststone, SWT.NONE);\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm = new SashForm(composite, SWT.VERTICAL);\n\t\t//\n\t\tMenu menu = new Menu(shlFaststone, SWT.BAR);\n\t\tshlFaststone.setMenuBar(menu);\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setSelection(true);\n\t\tmenuItem.setText(\"\\u6587\\u4EF6\");\n\t\t\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\t\t\n\t\tfinal Canvas down=new Canvas(shlFaststone,SWT.NONE|SWT.BORDER|SWT.DOUBLE_BUFFERED);\n\t\t\n\t\tComposite composite_4 = new Composite(sashForm, SWT.BORDER);\n\t\tcomposite_4.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_3 = new SashForm(composite_4, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_3);\n\t\tformToolkit.paintBordersFor(sashForm_3);\n\t\t\n\t\tToolBar toolBar = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.WRAP | SWT.RIGHT);\n\t\ttoolBar.setToolTipText(\"\");\n\t\t\n\t\tToolItem toolItem_6 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_6.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_2.notifyListeners(SWT.Selection,event1);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6253\\u5F00.jpg\"));\n\t\ttoolItem_6.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tToolItem tltmNewItem = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t\n\t\ttltmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttltmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\ttltmNewItem.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t//关闭\n\t\tToolItem tltmNewItem_4 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\ttltmNewItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttltmNewItem_4.setText(\"\\u5173\\u95ED\");\n\t\t\n\t\t\n\t\t\n\t\tToolItem tltmNewItem_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t//缩放\n\t\t\n\t\t\n\t\ttltmNewItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u653E\\u5927.jpg\"));\n\t\t\n\t\t//工具栏:放大\n\t\t\n\t\ttltmNewItem_1.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tToolItem tltmNewItem_2 = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t//工具栏:缩小\n\t\ttltmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t\n\t\ttltmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F29\\u5C0F.jpg\"));\n\t\ttltmNewItem_2.setText(\"\\u7F29\\u5C0F\");\n\t\tToolItem toolItem_5 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttoolItem_5.setText(\"\\u9000\\u51FA\");\n\t\t\n\t\tToolBar toolBar_1 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\tformToolkit.adapt(toolBar_1);\n\t\tformToolkit.paintBordersFor(toolBar_1);\n\t\t\n\t\tToolItem toolItem_7 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:标题\n\t\ttoolItem_7.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_7.setText(\"\\u6807\\u9898\");\n\t\ttoolItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6807\\u9898.jpg\"));\n\t\t\n\t\tToolItem toolItem_1 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:调整大小\n\t\ttoolItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_1.setText(\"\\u8C03\\u6574\\u5927\\u5C0F\");\n\t\ttoolItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u8C03\\u6574\\u5927\\u5C0F.jpg\"));\n\t\t\n\t\tToolBar toolBar_2 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar_2.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\tformToolkit.adapt(toolBar_2);\n\t\tformToolkit.paintBordersFor(toolBar_2);\n\t\t\n\t\tToolItem toolItem_2 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:裁剪\n\t\ttoolItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_2.setText(\"\\u88C1\\u526A\");\n\t\ttoolItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u88C1\\u526A.jpg\"));\n\t\t\n\t\tToolItem toolItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:剪切\n\t\ttoolItem_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_3.setText(\"\\u526A\\u5207\");\n\t\ttoolItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u526A\\u5207.jpg\"));\n\t\t\n\t\tToolItem toolItem_4 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\n\t\t//工具栏:粘贴\n\t\ttoolItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tcomposite_3.layout();\n\t\t\t\tFile f=new File(\"src/picture/beauty.jpg\");\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tButton lblNewLabel_3 = null;\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tcomposite_3.layout();\n\t\t\t}\n\t\t});\n\t\t//omposite;\n\t\t//\n\t\t\n\t\ttoolItem_4.setText(\"\\u590D\\u5236\");\n\t\ttoolItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u590D\\u5236.jpg\"));\n\t\t\n\t\tToolItem tltmNewItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\ttltmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\ttltmNewItem_3.setText(\"\\u7C98\\u8D34\");\n\t\tsashForm_3.setWeights(new int[] {486, 165, 267});\n\t\t\n\t\tComposite composite_1 = new Composite(sashForm, SWT.NONE);\n\t\tformToolkit.adapt(composite_1);\n\t\tformToolkit.paintBordersFor(composite_1);\n\t\tcomposite_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_1 = new SashForm(composite_1, SWT.VERTICAL);\n\t\tformToolkit.adapt(sashForm_1);\n\t\tformToolkit.paintBordersFor(sashForm_1);\n\t\t\n\t\tComposite composite_2 = new Composite(sashForm_1, SWT.NONE);\n\t\tformToolkit.adapt(composite_2);\n\t\tformToolkit.paintBordersFor(composite_2);\n\t\tcomposite_2.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(composite_2, SWT.NONE);\n\t\ttabFolder.setTouchEnabled(true);\n\t\tformToolkit.adapt(tabFolder);\n\t\tformToolkit.paintBordersFor(tabFolder);\n\t\t\n\t\tTabItem tbtmNewItem = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem.setText(\"\\u65B0\\u5EFA\\u4E00\");\n\t\t\n\t\tTabItem tbtmNewItem_1 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_1.setText(\"\\u65B0\\u5EFA\\u4E8C\");\n\t\t\n\t\tTabItem tbtmNewItem_2 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_2.setText(\"\\u65B0\\u5EFA\\u4E09\");\n\t\t\n\t\tButton button = new Button(tabFolder, SWT.CHECK);\n\t\tbutton.setText(\"Check Button\");\n\t\t\n\t\tcomposite_3 = new Composite(sashForm_1, SWT.H_SCROLL | SWT.V_SCROLL);\n\t\t\n\t\tformToolkit.adapt(composite_3);\n\t\tformToolkit.paintBordersFor(composite_3);\n\t\tcomposite_3.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tLabel lblNewLabel_3 = new Label(composite_3, SWT.NONE);\n\t\tformToolkit.adapt(lblNewLabel_3, true, true);\n\t\tlblNewLabel_3.setText(\"\");\n\t\tsashForm_1.setWeights(new int[] {19, 323});\n\t\t\n\t\tComposite composite_5 = new Composite(sashForm, SWT.NONE);\n\t\tcomposite_5.setToolTipText(\"\");\n\t\tcomposite_5.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_2 = new SashForm(composite_5, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_2);\n\t\tformToolkit.paintBordersFor(sashForm_2);\n\t\t\n\t\tLabel lblNewLabel = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel, true, true);\n\t\tlblNewLabel.setText(\"1/1\");\n\t\t\n\t\tLabel lblNewLabel_2 = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_2, true, true);\n\t\tlblNewLabel_2.setText(\"\\u5927\\u5C0F\\uFF1A1366*728\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(sashForm_2, SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_1, true, true);\n\t\tlblNewLabel_1.setText(\"\\u7F29\\u653E\\uFF1A100%\");\n\t\t\n\t\tLabel label = new Label(sashForm_2, SWT.NONE);\n\t\tlabel.setAlignment(SWT.RIGHT);\n\t\tformToolkit.adapt(label, true, true);\n\t\tlabel.setText(\"\\u5494\\u5693\\u5DE5\\u4F5C\\u5BA4\\u7248\\u6743\\u6240\\u6709\");\n\t\tsashForm_2.setWeights(new int[] {127, 141, 161, 490});\n\t\tsashForm.setWeights(new int[] {50, 346, 22});\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMenuItem mntmNewItem = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u65B0\\u5EFA.jpg\"));\n\t\tmntmNewItem.setText(\"\\u65B0\\u5EFA\");\n\t\t\n\t\tmntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\t//Label lblNewLabel_3 = new Label(composite_1, SWT.NONE);\n\t\t\t\t//Canvas c=new Canvas(shlFaststone,SWT.BALLOON);\n\t\t\t\t\n\t\t\t\tFileDialog dialog = new FileDialog(shlFaststone,SWT.OPEN); \n\t\t\t\tdialog.setFilterPath(System.getProperty(\"user_home\"));//设置初始路径\n\t\t\t\tdialog.setFilterNames(new String[] {\"文本文档(*txt)\",\"所有文档\"}); \n\t\t\t\tdialog.setFilterExtensions(new String[]{\"*.exe\",\"*.xls\",\"*.*\"});\n\t\t\t\tString path=dialog.open();\n\t\t\t\tString s=null;\n\t\t\t\tFile f=null;\n\t\t\t\tif(path==null||\"\".equals(path)) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t f=new File(path);\n\t\t\t\tbyte[] bs=Fileutil.readFile(f);\n\t\t\t s=new String(bs,\"UTF-8\");\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tMessageDialog.openError(shlFaststone, \"出错了\", \"打开\"+path+\"出错了\");\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t \n\t\t\t\ttext = new Text(composite_4, SWT.BORDER | SWT.WRAP\n\t\t\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL\n\t\t\t\t\t\t| SWT.MULTI);\n\t\t\t\ttext.setText(s);\n\t\t\t\tcomposite_1.layout();\n\t\t\t\tshlFaststone.setText(shlFaststone.getText()+\"\\t\"+f.getName());\n\t\t\t\t\t\n\t\t\t\tFile f1=new File(path);\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f1));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u6253\\u5F00.jpg\"));\n\t\tmntmNewItem_2.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem mntmNewItem_1 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_1.setText(\"\\u4ECE\\u526A\\u8D34\\u677F\\u5BFC\\u5165\");\n\t\t\n\t\tMenuItem mntmNewItem_3 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\tmntmNewItem_3.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t\n\t\t mntmNewItem_5 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t boolean result=MessageDialog.openConfirm(shlFaststone,\"退出\",\"是否确认退出\");\n\t\t\t\t if(result) {\n\t\t\t\t\t System.exit(0);\n\t\t\t\t }\n\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u4FDD\\u5B58.jpg\"));\n\t\tmntmNewItem_5.setText(\"\\u5173\\u95ED\");\n\t\tevent2=new Event();\n\t\tevent2.widget=mntmNewItem_5;\n\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"\\u6355\\u6349\");\n\t\t\n\t\tMenu menu_2 = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(menu_2);\n\t\t\n\t\tMenuItem mntmNewItem_6 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_6.setText(\"\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_7 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6355\\u6349\\u7A97\\u53E3\\u6216\\u5BF9\\u8C61.jpg\"));\n\t\tmntmNewItem_7.setText(\"\\u6355\\u6349\\u7A97\\u53E3\\u5BF9\\u8C61\");\n\t\t\n\t\tMenuItem mntmNewItem_8 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_8.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.jpg\"));\n\t\tmntmNewItem_8.setText(\"\\u6355\\u6349\\u77E9\\u5F62\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_9 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_9.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u624B\\u7ED8\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_9.setText(\"\\u6355\\u6349\\u624B\\u7ED8\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_10 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_10.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6574\\u4E2A\\u5C4F\\u5E55.jpg\"));\n\t\tmntmNewItem_10.setText(\"\\u6355\\u6349\\u6574\\u4E2A\\u5C4F\\u5E55\");\n\t\t\n\t\tMenuItem mntmNewItem_11 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_11.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_11.setText(\"\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_12 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_12.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_12.setText(\"\\u6355\\u6349\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem menuItem_1 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349.jpg\"));\n\t\tmenuItem_1.setText(\"\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349\");\n\t\t\n\t\tMenuItem menuItem_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_2.setText(\"\\u7F16\\u8F91\");\n\t\t\n\t\tMenu menu_3 = new Menu(menuItem_2);\n\t\tmenuItem_2.setMenu(menu_3);\n\t\t\n\t\tMenuItem mntmNewItem_14 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_14.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_14.setText(\"\\u64A4\\u9500\");\n\t\t\n\t\tMenuItem mntmNewItem_13 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_13.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_13.setText(\"\\u91CD\\u505A\");\n\t\t\n\t\tMenuItem mntmNewItem_15 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_15.setText(\"\\u9009\\u62E9\\u5168\\u90E8\");\n\t\t\n\t\tMenuItem mntmNewItem_16 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_16.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7F16\\u8F91.\\u88C1\\u526A.jpg\"));\n\t\tmntmNewItem_16.setText(\"\\u88C1\\u526A\");\n\t\t\n\t\tMenuItem mntmNewItem_17 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_17.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u526A\\u5207.jpg\"));\n\t\tmntmNewItem_17.setText(\"\\u526A\\u5207\");\n\t\t\n\t\tMenuItem mntmNewItem_18 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_18.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u590D\\u5236.jpg\"));\n\t\tmntmNewItem_18.setText(\"\\u590D\\u5236\");\n\t\t\n\t\tMenuItem menuItem_4 = new MenuItem(menu_3, SWT.NONE);\n\t\tmenuItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\tmenuItem_4.setText(\"\\u7C98\\u8D34\");\n\t\t\n\t\tMenuItem mntmNewItem_19 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_19.setText(\"\\u5220\\u9664\");\n\t\t\n\t\tMenuItem menuItem_3 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_3.setText(\"\\u7279\\u6548\");\n\t\t\n\t\tMenu menu_4 = new Menu(menuItem_3);\n\t\tmenuItem_3.setMenu(menu_4);\n\t\t\n\t\tMenuItem mntmNewItem_20 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_20.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6C34\\u5370.jpg\"));\n\t\tmntmNewItem_20.setText(\"\\u6C34\\u5370\");\n\t\t\n\t\tPanelPic ppn = new PanelPic();\n\t\tMenuItem mntmNewItem_21 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_21.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tflag[0]=true;\n\t\t\t\tflag[1]=false;\n\n\t\t\t}\n\n\t\t});\n\t\t\n\t\tdown.addMouseListener(new MouseAdapter(){\n\t\t\tpublic void mouseDown(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=true;\n\t\t\t\tpt=new Point(e.x,e.y);\n\t\t\t\tif(flag[1])\n\t\t\t\t{\n\t\t\t\t\trect=new Composite(down,SWT.BORDER);\n\t\t\t\t\trect.setLocation(e.x, e.y);\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void mouseUp(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=false;\n\t\t\t\tif(flag[1]&&dirty)\n\t\t\t\t{\n\t\t\t\t\trexx[n-1]=rect.getBounds();\n\t\t\t\t\trect.dispose();\n\t\t\t\t\tdown.redraw();\n\t\t\t\t\tdirty=false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdown.addMouseMoveListener(new MouseMoveListener(){\n\t\t\t@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n if(mouseDown)\n {\n \t dirty=true;\n\t\t\t\tif(flag[0])\n\t\t\t {\n \t GC gc=new GC(down);\n gc.drawLine(pt.x, pt.y, e.x, e.y);\n list.add(new int[]{pt.x,pt.y,e.x,e.y});\n pt.x=e.x;pt.y=e.y;\n\t\t\t }\n else if(flag[1])\n {\n \t if(rect!=null)\n \t rect.setSize(rect.getSize().x+e.x-pt.x, rect.getSize().y+e.y-pt.y);\n// \t down.redraw();\n \t pt.x=e.x;pt.y=e.y;\n }\n }\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tdown.addPaintListener(new PaintListener(){\n\t\t\t@Override\n\t\t\tpublic void paintControl(PaintEvent e) {\n\t\t\t\tfor(int i=0;i<list.size();i++)\n\t\t\t\t{\n\t\t\t\t\tint a[]=list.get(i);\n\t\t\t\t\te.gc.drawLine(a[0], a[1], a[2], a[3]);\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<n;i++)\n\t\t\t\t{\n\t\t\t\t\tif(rexx[i]!=null)\n\t\t\t\t\t\te.gc.drawRectangle(rexx[i]);\n\t\t\t\t}\n\t\t\t}});\n\n\t\t\n\t\tmntmNewItem_21.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6587\\u5B57.jpg\"));\n\t\tmntmNewItem_21.setText(\"\\u753B\\u7B14\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_1 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_1.setText(\"\\u67E5\\u770B\");\n\t\t\n\t\tMenu menu_5 = new Menu(mntmNewSubmenu_1);\n\t\tmntmNewSubmenu_1.setMenu(menu_5);\n\t\t\n\t\tMenuItem mntmNewItem_24 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_24.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u653E\\u5927.jpg\"));\n\t\tmntmNewItem_24.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tMenuItem mntmNewItem_25 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_25.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u7F29\\u5C0F.jpg\"));\n\t\tmntmNewItem_25.setText(\"\\u7F29\\u5C0F\");\n\t\t\n\t\tMenuItem mntmNewItem_26 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_26.setText(\"\\u5B9E\\u9645\\u5C3A\\u5BF8\\uFF08100%\\uFF09\");\n\t\t\n\t\tMenuItem mntmNewItem_27 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_27.setText(\"\\u9002\\u5408\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_28 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_28.setText(\"100%\");\n\t\t\n\t\tMenuItem mntmNewItem_29 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_29.setText(\"200%\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_2.setText(\"\\u8BBE\\u7F6E\");\n\t\t\n\t\tMenu menu_6 = new Menu(mntmNewSubmenu_2);\n\t\tmntmNewSubmenu_2.setMenu(menu_6);\n\t\t\n\t\tMenuItem menuItem_5 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_5.setText(\"\\u5E2E\\u52A9\");\n\t\t\n\t\tMenu menu_7 = new Menu(menuItem_5);\n\t\tmenuItem_5.setMenu(menu_7);\n\t\t\n\t\tMenuItem menuItem_6 = new MenuItem(menu_7, SWT.NONE);\n\t\tmenuItem_6.setText(\"\\u7248\\u672C\");\n\t\t\n\t\tMenuItem mntmNewItem_23 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_23.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\t\n\t\tMenuItem mntmNewItem_30 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_30.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\n\t}", "protected void createContents() {\n\t\tsetText(\"Account Settings\");\n\t\tsetSize(450, 225);\n\n\t}", "private void createWidgets() {\n\n\t\tJPanel filmPanel = createFilmPanel();\n\t\tJPanel musicPanel = createMusicPanel();\n\t\tJPanel unclassPanel = createUnclassifiedPanel();\n\n\t\tthis.add(filmPanel);\n\t\tthis.add(musicPanel);\n\t\tthis.add(unclassPanel);\n\t}", "private void buildFrame(){\n this.setVisible(true);\n this.getContentPane();\n this.setSize(backgrondP.getIconWidth(),backgrondP.getIconHeight());\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\t \n\t }", "public void addContent() {\n ScrollPane mySP = new ScrollPane();\n myContent = new SaveForm(myManager);\n mySP.setContent(myContent);\n mySP.setPrefSize(size, size);\n myRoot.getChildren().add(mySP);\n }", "public void showGenPopup() {\n\t\ttv_popupTitle.setText(R.string.title3);\n\t\ttv_popupInfo.setText(R.string.description3);\n\t\t\n\t\t// The code below assumes that the root container has an id called 'main'\n\t\t popup.showAtLocation(findViewById(R.id.anchor), Gravity.CENTER, 0, 0);\n\t}", "private static void createAndShowGUI() {\n //Make sure we have nice window decorations.\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n JFrame frame = new JFrame(\"MRALD Color Chooser\");\n\n //Create and set up the content pane.\n JComponent newContentPane = new MraldColorChooser(coloringItems);\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }", "@Override\n\tpublic void create() {\n\t\twithdrawFrame = new JFrame();\n\t\tthis.constructContent();\n\t\twithdrawFrame.setSize(800,500);\n\t\twithdrawFrame.show();\n\t\twithdrawFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t}", "private void populateUI() {\n\n Picasso.get()\n .load(Codes.BACKDROP_URL + movie.backdropPath)\n .error(R.drawable.error)\n .into(mBinding.backdrop);\n\n Picasso.get()\n .load(Codes.POSTER_URL + movie.posterPath)\n .error(R.drawable.error)\n .into(mBinding.movieDetails.poster);\n\n diskIO.execute(new Runnable() {\n @Override\n public void run() {\n MiniMovie miniMovie = mDatabase.movieDao().getMovieById(movie.movieId);\n\n if (miniMovie != null) {\n isFavorite = true;\n mBinding.favoriteButton.setImageResource(R.drawable.ic_star_white_24px);\n } else {\n isFavorite = false;\n mBinding.favoriteButton.setImageResource(R.drawable.ic_star_border_white_24px);\n }\n }\n });\n }", "void initializePopup() {\n\t\t\n\t\tsetDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);\n\t\tsetBounds(100, 100, 450, 475);\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tgetContentPane().add(contentPanel, BorderLayout.CENTER);\n\t\tcontentPanel.setLayout(null);\n\n\t\tJLabel lblThemeName = new JLabel(\"Theme Name\");\n\t\tlblThemeName.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblThemeName.setBounds(6, 31, 87, 16);\n\t\tcontentPanel.add(lblThemeName);\n\n\t\tname = new JTextField();\n\t\tname.setBounds(134, 26, 294, 26);\n\t\tcontentPanel.add(name);\n\t\tname.setColumns(10);\n\n\t\tJLabel lblNewLabel = new JLabel(\"Words\");\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblNewLabel.setBounds(6, 76, 87, 16);\n\t\tcontentPanel.add(lblNewLabel);\n\n\t\tJLabel lblLetterOrder = new JLabel(\"Letter Order\");\n\t\tlblLetterOrder.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblLetterOrder.setBounds(6, 235, 87, 16);\n\t\tcontentPanel.add(lblLetterOrder);\n\n\t\twords = new JTextPane();\n\t\twords.setBounds(134, 75, 294, 149);\n\t\tcontentPanel.add(words);\n\n\t\tletters = new JTextPane();\n\t\tletters.setBounds(134, 235, 294, 149);\n\t\tcontentPanel.add(letters);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"\\\" signals unselected tile\");\n\t\tlblNewLabel_1.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 13));\n\t\tlblNewLabel_1.setBounds(6, 392, 157, 16);\n\t\tcontentPanel.add(lblNewLabel_1);\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Use % to signal for a random letter\");\n\t\tlblNewLabel_2.setBounds(202, 392, 242, 16);\n\t\tcontentPanel.add(lblNewLabel_2);\n\t\t\n\t\tJLabel lblRowsOf = new JLabel(\"6 rows of 6 letters\");\n\t\tlblRowsOf.setBounds(6, 340, 116, 16);\n\t\tcontentPanel.add(lblRowsOf);\n\t\t\n\t\tJLabel lblQQu = new JLabel(\"Q = Qu\");\n\t\tlblQQu.setBounds(6, 368, 61, 16);\n\t\tcontentPanel.add(lblQQu);\n\t\t{\n\t\t\tJPanel buttonPane = new JPanel();\n\t\t\tbuttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));\n\t\t\tgetContentPane().add(buttonPane, BorderLayout.SOUTH);\n\t\t\t{\n\t\t\t\tokButton = new JButton(\"OK\");\n\t\t\t\tokButton.setActionCommand(\"OK\");\n\t\t\t\tokButton.addActionListener(new AcceptThemeController(this));\n\t\t\t\tbuttonPane.add(okButton);\n\t\t\t\tgetRootPane().setDefaultButton(okButton);\n\t\t\t}\n\t\t\t{\n\t\t\t\tJButton cancelButton = new JButton(\"Cancel\");\n\t\t\t\tcancelButton.setActionCommand(\"Cancel\");\n\t\t\t\tcancelButton.addActionListener(new CloseThemeController(this, model));\n\t\t\t\tbuttonPane.add(cancelButton);\n\t\t\t}\n\t\t}\n\t}", "private void createContents(ArrayList<String> content) {\r\n\t\t// create ne whell for dialog window\r\n\t\tshell = new Shell(getParent(), SWT.APPLICATION_MODAL);\r\n\t\tshell.setSize(367, 348);\r\n\t\tshell.setText(getText());\r\n\t\t\r\n\t\tcenterDialog(shell);\r\n\r\n\t\t// create List component inside dialog window\r\n\t\tfinal List list = new List(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\r\n\t\tlist.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\tselectedTopic = list.getSelection()[0];\r\n\t\t\t\tshell.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t// fill list with documentation infElements\r\n\t\tfor (int i=0; i<content.size(); i++)\r\n\t\t\tlist.add(content.get(i));\r\n\t\t\r\n\t\t// set default selection\r\n\t\tlist.setSelection(0);\r\n\t\t\r\n\t\t// set position of List component\r\n\t\tlist.setBounds(10, 31, 341, 270);\r\n\t\t\r\n\t\t// create Label for the List component\r\n\t\tLabel lblSelectDocumentationTopic = new Label(shell, SWT.NONE);\r\n\t\tlblSelectDocumentationTopic.setBounds(10, 10, 173, 15);\r\n\t\tlblSelectDocumentationTopic.setText(\"Select Documentation Topic\");\r\n\r\n\t\t// create Cancel button\r\n\t\tButton btnCancel = new Button(shell, SWT.NONE);\r\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tselectedTopic = \"\";\r\n\t\t\t\tshell.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnCancel.setBounds(276, 307, 75, 25);\r\n\t\tbtnCancel.setText(\"Cancel\");\r\n\t\t\r\n\t\t// Create OK button\r\n\t\tButton btnOk = new Button(shell, SWT.NONE);\r\n\t\tbtnOk.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tselectedTopic = list.getSelection()[0];\r\n\t\t\t\tshell.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnOk.setBounds(183, 307, 75, 25);\r\n\t\tbtnOk.setText(\"OK\");\r\n\t\t\r\n\t}", "protected void createContents() {\n setText(BUNDLE.getString(\"TranslationManagerShell.Application.Name\"));\n setSize(599, 505);\n\n final Composite cmpMain = new Composite(this, SWT.NONE);\n cmpMain.setLayout(new FormLayout());\n\n final Composite cmpControls = new Composite(cmpMain, SWT.NONE);\n final FormData fd_cmpControls = new FormData();\n fd_cmpControls.right = new FormAttachment(100, -5);\n fd_cmpControls.top = new FormAttachment(0, 5);\n fd_cmpControls.left = new FormAttachment(0, 5);\n cmpControls.setLayoutData(fd_cmpControls);\n cmpControls.setLayout(new FormLayout());\n\n final ToolBar modifyToolBar = new ToolBar(cmpControls, SWT.FLAT);\n\n tiSave = new ToolItem(modifyToolBar, SWT.PUSH);\n tiSave.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Save\"));\n tiSave.setEnabled(false);\n tiSave.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_save.gif\"));\n tiSave.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_save.gif\"));\n\n tiUndo = new ToolItem(modifyToolBar, SWT.PUSH);\n tiUndo.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Undo\"));\n tiUndo.setEnabled(false);\n tiUndo.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_reset.gif\"));\n tiUndo.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_reset.gif\"));\n\n tiDeleteSelected = new ToolItem(modifyToolBar, SWT.PUSH);\n tiDeleteSelected.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_remove.gif\"));\n tiDeleteSelected.setEnabled(false);\n tiDeleteSelected.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Delete\"));\n tiDeleteSelected.setImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/e_remove.gif\"));\n\n txtFilter = new LVSText(cmpControls, SWT.BORDER);\n final FormData fd_txtFilter = new FormData();\n fd_txtFilter.right = new FormAttachment(25, 0);\n fd_txtFilter.top = new FormAttachment(modifyToolBar, 0, SWT.CENTER);\n fd_txtFilter.left = new FormAttachment(modifyToolBar, 25, SWT.RIGHT);\n txtFilter.setLayoutData(fd_txtFilter);\n\n final ToolBar filterToolBar = new ToolBar(cmpControls, SWT.FLAT);\n final FormData fd_filterToolBar = new FormData();\n fd_filterToolBar.top = new FormAttachment(modifyToolBar, 0, SWT.TOP);\n fd_filterToolBar.left = new FormAttachment(txtFilter, 5, SWT.RIGHT);\n filterToolBar.setLayoutData(fd_filterToolBar);\n\n tiFilter = new ToolItem(filterToolBar, SWT.NONE);\n tiFilter.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_find.gif\"));\n tiFilter.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Filter\"));\n\n tiLocale = new ToolItem(filterToolBar, SWT.DROP_DOWN);\n tiLocale.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Locale\"));\n tiLocale.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_globe.png\"));\n\n menuLocale = new Menu(filterToolBar);\n addDropDown(tiLocale, menuLocale);\n\n lblSearchResults = new Label(cmpControls, SWT.NONE);\n lblSearchResults.setVisible(false);\n final FormData fd_lblSearchResults = new FormData();\n fd_lblSearchResults.top = new FormAttachment(filterToolBar, 0, SWT.CENTER);\n fd_lblSearchResults.left = new FormAttachment(filterToolBar, 5, SWT.RIGHT);\n lblSearchResults.setLayoutData(fd_lblSearchResults);\n lblSearchResults.setText(BUNDLE.getString(\"TranslationManagerShell.Label.Results\"));\n\n final ToolBar translateToolBar = new ToolBar(cmpControls, SWT.NONE);\n final FormData fd_translateToolBar = new FormData();\n fd_translateToolBar.top = new FormAttachment(filterToolBar, 0, SWT.TOP);\n fd_translateToolBar.right = new FormAttachment(100, 0);\n translateToolBar.setLayoutData(fd_translateToolBar);\n\n tiDebug = new ToolItem(translateToolBar, SWT.PUSH);\n tiDebug.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Debug\"));\n tiDebug.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/debug.png\"));\n\n new ToolItem(translateToolBar, SWT.SEPARATOR);\n\n tiAddBase = new ToolItem(translateToolBar, SWT.PUSH);\n tiAddBase.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.AddBase\"));\n tiAddBase.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_add.gif\"));\n\n tiTranslate = new ToolItem(translateToolBar, SWT.CHECK);\n tiTranslate.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Translate\"));\n tiTranslate.setImage(SWTResourceManager\n .getImage(TranslationManagerShell.class, \"/images/tools16x16/target.png\"));\n\n cmpTable = new Composite(cmpMain, SWT.NONE);\n cmpTable.setLayout(new FillLayout());\n final FormData fd_cmpTable = new FormData();\n fd_cmpTable.bottom = new FormAttachment(100, -5);\n fd_cmpTable.right = new FormAttachment(cmpControls, 0, SWT.RIGHT);\n fd_cmpTable.left = new FormAttachment(cmpControls, 0, SWT.LEFT);\n fd_cmpTable.top = new FormAttachment(cmpControls, 5, SWT.BOTTOM);\n cmpTable.setLayoutData(fd_cmpTable);\n\n final Menu menu = new Menu(this, SWT.BAR);\n setMenuBar(menu);\n\n final MenuItem menuItemFile = new MenuItem(menu, SWT.CASCADE);\n menuItemFile.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File\"));\n\n final Menu menuFile = new Menu(menuItemFile);\n menuItemFile.setMenu(menuFile);\n\n menuItemExit = new MenuItem(menuFile, SWT.NONE);\n menuItemExit.setAccelerator(SWT.ALT | SWT.F4);\n menuItemExit.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File.Exit\"));\n\n final MenuItem menuItemHelp = new MenuItem(menu, SWT.CASCADE);\n menuItemHelp.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help\"));\n\n final Menu menuHelp = new Menu(menuItemHelp);\n menuItemHelp.setMenu(menuHelp);\n\n menuItemDebug = new MenuItem(menuHelp, SWT.NONE);\n menuItemDebug.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.Debug\"));\n\n new MenuItem(menuHelp, SWT.SEPARATOR);\n\n menuItemAbout = new MenuItem(menuHelp, SWT.NONE);\n menuItemAbout.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.About\"));\n //\n }", "public void addFavourite(View view){\n // We need to get the input from the fields\n EditText editTextName = (EditText) findViewById(R.id.editTextItemName);\n\n // First we need to make sure that the two required fields have entries and are valid\n if (editTextName.length() == 0) {\n Context context = getApplicationContext();\n CharSequence text = \"Missing Name.\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n return;\n }\n\n Context context = getApplicationContext();\n CharSequence text = \"Entry added as favourite\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n view.setClickable(false); // Turns button off //\n view.setVisibility(View.INVISIBLE);\n\n // Also make text entry invisible\n editTextName.setVisibility(editTextName.INVISIBLE);\n\n Globals.l.add(editTextName.getText().toString(),Globals.f);\n\n\n }", "public Window(){\n\n\t\t//character is updated\n\t\tFile fi=new File(\"./config/character\");\n _character=(new FileHandling()).readFromFile(fi);\n\t\t\n\t\t\n\t\ttxtrHiThere.setFont(new Font(\"Lucida Sans\", Font.BOLD, 13));\n\t\ttxtrHiThere.setText(\" \");\n\t\ttxtrHiThere.setBackground(new Color(255, 250, 205));\n\t\ttxtrHiThere.setBounds(252, 470, 198, 100);\n\t\ttxtrHiThere.setEditable(false);\n\t\tpanel.addMouseMotionListener(new MouseMotionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\t//updates speech bubble\n\t\t\t\ttxtrHiThere.setText(null);\n\t\t\t\ttxtrHiThere.append(\"Hi guys! I am \"+_character+\"\\nLet's learn words together\\nwith VOXSPELL.\"+\" Move your\\nmouse over each of these\\n buttons to see what they do\");\n\t\t\t}\n\t\t});\n\t\tpanel.add(txtrHiThere);\n\t\ttxtrHiThere.append(\"Hi guys! I am \"+_character+\"\\nLet's learn words together\\nwith VOXSPELL.\"+\" Move your\\nmouse over each of these\\n buttons to see what they do\");\n\t\t\n\t\tpanel.setBackground(new Color(0, 128, 128));\n\t\tpanel.setBorder(new MatteBorder(1, 1, 1, 1, (Color) new Color(0, 100, 0)));\n\t\tpanel.setPreferredSize(new Dimension(800, 880));\n\t\tpanel.setLayout(null);\n\t\tbtnN.addMouseMotionListener(new MouseMotionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\t//updates speech bubble\n\t\t\t\ttxtrHiThere.setText(null);\n\t\t\t\ttxtrHiThere.append(\"You will be asked to\\nspell 10 words\"+\"from the level you\\npick when you click on the\\nlittle arrow below the button\");\n\t\t\t}\n\t\t});\n\t\tbtnN.setBounds(509, 593, 263, 65);\n\t\tbtnN.setFont(new Font(\"Purisa\", Font.BOLD, 18));\n\t\tbtnN.setBackground(new Color(255, 250, 205));\n\t\t//adding buttons\n\t\tpanel.add(btnN);\n\t\tbtnN.addActionListener(this);\n\t\tbtnR.addMouseMotionListener(new MouseMotionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\t//updates speech bubble\n\t\t\t\ttxtrHiThere.setText(null);\n\t\t\t\ttxtrHiThere.append(\"You will be asked to review\\nsome of the mistakes in the\\npast quizzes. If you haven't\\nstarted one already,don't\\nworry about it. Start\\na new quiz instead. :)\");\n\t\t\t}\n\t\t});\n\t\tbtnR.setBounds(568, 792, 204, 65);\n\t\tbtnR.setFont(new Font(\"Purisa\", Font.BOLD, 18));\n\t\tbtnR.setBackground(new Color(255, 250, 205));\n\t\tpanel.add(btnR);\n\t\tcomboBox.setModel(new DefaultComboBoxModel(new String[] {\"1\", \"2\", \"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\",\"10\",\"11\"}));\n\t\tcomboBox.setBounds(509, 705, 263, 24);\n\t\tpanel.add(comboBox);\n\t\tbtnS.addMouseMotionListener(new MouseMotionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\t//updates speech bubble\n\t\t\t\ttxtrHiThere.setText(null);\n\t\t\t\ttxtrHiThere.append(\" Here you can change\\n all your settings: like\\n deleting saved progress,\\n changing voices and\\n getting a new wordlist\");\n\t\t\t}\n\t\t});\n\t\tbtnS.setBounds(25, 792, 170, 65);\n\t\tbtnS.setFont(new Font(\"Purisa\", Font.BOLD, 19));\n\t\tbtnS.setBackground(new Color(255, 250, 205));\n\t\tpanel.add(btnS);\n\t\tbtnR.addActionListener(this);\n\t\tbtnS.addActionListener(this);\n\t\tgetContentPane().add(panel, BorderLayout.SOUTH);\n\t\tJLabel lblSelectLevel = new JLabel(\"Select Level\");\n\t\tlblSelectLevel.setBounds(334, 696, 157, 33);\n\t\tlblSelectLevel.setForeground(new Color(255, 250, 240));\n\t\tlblSelectLevel.setFont(new Font(\"Purisa\", Font.BOLD, 20));\n\t\tpanel.add(lblSelectLevel);\n\t\tJLabel lblNewLabel = new JLabel(\"\");\n\t\tlblNewLabel.setBounds(-231, -25, 1056, 436);\n\t\tlblNewLabel.setIcon(new ImageIcon(\"./resources/main_menu_image.jpg\"));\n\t\tpanel.add(lblNewLabel);\n\t\tJLabel lblNewLabel_1 = new JLabel(\"\");\n\t\tlblNewLabel_1.setIcon(new ImageIcon(\"./resources/\"+_character+\"_2.png\"));\n\t\tlblNewLabel_1.setBounds(54, 485, 180, 297);\n\t\tpanel.add(lblNewLabel_1);\n\t\t\n\t\t //window listener to show a pop up when user tries to close the application\n addWindowListener(new WindowAdapter() {\n //code obtained from http://docs.oracle.com/javase/tutorial/uiswing/components/dialog.html\n public void windowClosing(WindowEvent e) {\n Object[] options = {\"Yes, Please\",\n \"No I want to stay!\"};\n int num = JOptionPane.showOptionDialog(panel,\n \"Are you sure you want to leave the game already?\",\n \"Attention!\",\n JOptionPane.YES_NO_CANCEL_OPTION,\n JOptionPane.QUESTION_MESSAGE,\n null,\n options,null);\n //if yes\n if(num==0){\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }\n //otherwise\n else{\n setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n }\n }\n });\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"\");\n\t\tlblNewLabel_2.setIcon(new ImageIcon(\"./resources/bubble_main.png\"));\n\t\tlblNewLabel_2.setBounds(207, 423, 281, 200);\n\t\tpanel.add(lblNewLabel_2);\n\t\t\n\t\tJButton progbutton = new JButton(\"See how you're going!\");\n\t\tprogbutton.addMouseMotionListener(new MouseMotionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseMoved(MouseEvent e) {\n\t\t\t\t//speech bubble updated\n\t\t\t\ttxtrHiThere.setText(null);\n\t\t\t\ttxtrHiThere.append(\" Here, you can see how you\\n are going! It will show you\\n how many words you have\\n mastered as well as a cool\\n graph to help you see\\n your performance\");\n\t\t\t}\n\t\t});\n\t\tprogbutton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//leads to the statistics window\n\t\t\t\tPersonalBests s=new PersonalBests();\n\t\t\t\tdispose();\n\t\t\t\ts.setVisible(true);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tprogbutton.setBackground(new Color(255, 250, 205));\n\t\tprogbutton.setFont(new Font(\"Purisa\", Font.BOLD, 16));\n\t\tprogbutton.setBounds(231, 792, 292, 65);\n\t\tpanel.add(progbutton);\n\t\tpack();\n\t\tsetTitle(\"Welcome to the VOXSPELL Spelling Aid\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetLocationRelativeTo(null);\n\t\tsetResizable(false);\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tshell.setSize(599, 779);\r\n\t\tshell.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tButton logoBtn = new Button(shell, SWT.NONE);\r\n\t\tlogoBtn.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tMainMenuKaff mm = new MainMenuKaff();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tmm.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tlogoBtn.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\logo for header button.png\"));\r\n\t\tlogoBtn.setBounds(497, 0, 64, 50);\r\n\r\n\t\tLabel headerLabel = new Label(shell, SWT.NONE);\r\n\t\theaderLabel.setImage(SWTResourceManager\r\n\t\t\t\t.getImage(\"C:\\\\Users\\\\al5an\\\\git\\\\KaffPlatform\\\\KaffPlatformProject\\\\img\\\\KaffPlatformheader.jpg\"));\r\n\t\theaderLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\theaderLabel.setBounds(0, 0, 607, 50);\r\n\r\n\t\tLabel bookInfoLabel = new Label(shell, SWT.NONE);\r\n\t\tbookInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\tbookInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\tbookInfoLabel.setAlignment(SWT.CENTER);\r\n\t\tbookInfoLabel.setBounds(177, 130, 192, 28);\r\n\t\tbookInfoLabel.setText(\"معلومات الكتاب\");\r\n\r\n\t\tLabel bookTitleLabel = new Label(shell, SWT.NONE);\r\n\t\tbookTitleLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookTitleLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookTitleLabel.setBounds(415, 203, 119, 28);\r\n\t\tbookTitleLabel.setText(\"عنوان الكتاب\");\r\n\r\n\t\tBookTitleTxt = new Text(shell, SWT.BORDER);\r\n\t\tBookTitleTxt.setBounds(56, 206, 334, 24);\r\n\r\n\t\tLabel bookIDLabel = new Label(shell, SWT.NONE);\r\n\t\tbookIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tbookIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbookIDLabel.setBounds(415, 170, 119, 32);\r\n\t\tbookIDLabel.setText(\"رمز الكتاب\");\r\n\r\n\t\tLabel editionLabel = new Label(shell, SWT.NONE);\r\n\t\teditionLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\teditionLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\teditionLabel.setBounds(415, 235, 119, 28);\r\n\t\teditionLabel.setText(\"إصدار الكتاب\");\r\n\r\n\t\teditionTxt = new Text(shell, SWT.BORDER);\r\n\t\teditionTxt.setBounds(271, 240, 119, 24);\r\n\r\n\t\tLabel lvlLabel = new Label(shell, SWT.NONE);\r\n\t\tlvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tlvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tlvlLabel.setText(\"المستوى\");\r\n\t\tlvlLabel.setBounds(415, 269, 119, 27);\r\n\r\n\t\tCombo lvlBookCombo = new Combo(shell, SWT.NONE);\r\n\t\tlvlBookCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\tlvlBookCombo.setBounds(326, 272, 64, 25);\r\n\t\tlvlBookCombo.select(0);\r\n\r\n\t\tLabel priceLabel = new Label(shell, SWT.NONE);\r\n\t\tpriceLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tpriceLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tpriceLabel.setText(\"السعر\");\r\n\t\tpriceLabel.setBounds(415, 351, 119, 28);\r\n\r\n\t\tGroup groupType = new Group(shell, SWT.NONE);\r\n\t\tgroupType.setBounds(56, 320, 334, 24);\r\n\r\n\t\tButton button = new Button(groupType, SWT.RADIO);\r\n\t\tbutton.setSelection(true);\r\n\t\tbutton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton.setBounds(21, 0, 73, 21);\r\n\t\tbutton.setText(\"مجاناً\");\r\n\r\n\t\tButton button_1 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_1.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_1.setBounds(130, 0, 73, 21);\r\n\t\tbutton_1.setText(\"إعارة\");\r\n\r\n\t\tButton button_2 = new Button(groupType, SWT.RADIO);\r\n\t\tbutton_2.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbutton_2.setBounds(233, 0, 80, 21);\r\n\t\tbutton_2.setText(\"للبيع\");\r\n\r\n\t\tpriceTxtValue = new Text(shell, SWT.BORDER);\r\n\t\tpriceTxtValue.setBounds(326, 355, 64, 24);\r\n\r\n\t\tLabel ownerInfoLabel = new Label(shell, SWT.NONE);\r\n\t\townerInfoLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerInfoLabel.setForeground(SWTResourceManager.getColor(210, 105, 30));\r\n\t\townerInfoLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.BOLD));\r\n\t\townerInfoLabel.setText(\"معلومات صاحبة الكتاب\");\r\n\t\townerInfoLabel.setAlignment(SWT.CENTER);\r\n\t\townerInfoLabel.setBounds(147, 400, 242, 28);\r\n\r\n\t\tLabel ownerIDLabel = new Label(shell, SWT.NONE);\r\n\t\townerIDLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerIDLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerIDLabel.setBounds(415, 441, 119, 34);\r\n\t\townerIDLabel.setText(\"الرقم الأكاديمي\");\r\n\r\n\t\townerIDValue = new Text(shell, SWT.BORDER);\r\n\t\townerIDValue.setBounds(204, 444, 186, 24);\r\n\t\t// need to check if the owner is already in the database...\r\n\r\n\t\tLabel nameLabel = new Label(shell, SWT.NONE);\r\n\t\tnameLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tnameLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tnameLabel.setBounds(415, 481, 119, 28);\r\n\t\tnameLabel.setText(\"الاسم الثلاثي\");\r\n\r\n\t\tnameTxt = new Text(shell, SWT.BORDER);\r\n\t\tnameTxt.setBounds(56, 485, 334, 24);\r\n\r\n\t\tLabel phoneLabel = new Label(shell, SWT.NONE);\r\n\t\tphoneLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\tphoneLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tphoneLabel.setText(\"رقم الجوال\");\r\n\t\tphoneLabel.setBounds(415, 515, 119, 27);\r\n\r\n\t\tphoneTxt = new Text(shell, SWT.BORDER);\r\n\t\tphoneTxt.setBounds(204, 521, 186, 24);\r\n\r\n\t\tLabel ownerLvlLabel = new Label(shell, SWT.NONE);\r\n\t\townerLvlLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\townerLvlLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\townerLvlLabel.setBounds(415, 548, 119, 31);\r\n\t\townerLvlLabel.setText(\"المستوى\");\r\n\r\n\t\tCombo owneLvlCombo = new Combo(shell, SWT.NONE);\r\n\t\towneLvlCombo.setItems(new String[] { \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\" });\r\n\t\towneLvlCombo.setBounds(326, 554, 64, 25);\r\n\t\towneLvlCombo.select(0);\r\n\r\n\t\tLabel emailLabel = new Label(shell, SWT.NONE);\r\n\t\temailLabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\r\n\t\temailLabel.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\temailLabel.setBounds(415, 583, 119, 38);\r\n\t\temailLabel.setText(\"البريد الإلكتروني\");\r\n\r\n\t\temailTxt = new Text(shell, SWT.BORDER);\r\n\t\temailTxt.setBounds(56, 586, 334, 24);\r\n\r\n\t\tButton addButton = new Button(shell, SWT.NONE);\r\n\t\taddButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString bookQuery = \"INSERT INTO kaff.BOOK(bookID, bookTitle, price, level,available, type) VALUES (?, ?, ?, ?, ?, ?, ?)\";\r\n\t\t\t\t\tString bookEdition = \"INSERT INTO kaff.bookEdition(bookID, edition, year) VALUES (?, ?, ?)\";\r\n\t\t\t\t\tString ownerQuery = \"INSERT INTO kaff.user(userID, fname, mname, lastname, phone, level, personalEmail, email) VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n\r\n\t\t\t\t\tString bookID = bookIDTxt.getText();\r\n\t\t\t\t\tString bookTitle = BookTitleTxt.getText();\r\n\t\t\t\t\tint bookLevel = lvlBookCombo.getSelectionIndex();\r\n\t\t\t\t\tString type = groupType.getText();\r\n\t\t\t\t\tdouble price = Double.parseDouble(priceTxtValue.getText());\r\n\t\t\t\t\tboolean available = true;\r\n\r\n\t\t\t\t\t// must error handle\r\n\t\t\t\t\tString[] ed = editionTxt.getText().split(\" \");\r\n\t\t\t\t\tString edition = ed[0];\r\n\t\t\t\t\tString year = ed[1];\r\n\r\n\t\t\t\t\tString ownerID = ownerIDValue.getText();\r\n\r\n\t\t\t\t\t// error handle if the user enters two names or just first name\r\n\t\t\t\t\tString[] name = nameTxt.getText().split(\" \");\r\n\t\t\t\t\tString fname = \"\", mname = \"\", lname = \"\";\r\n\t\t\t\t\tSystem.out.println(\"name array\" + name);\r\n\t\t\t\t\tif (name.length > 2) {\r\n\t\t\t\t\t\tfname = name[0];\r\n\t\t\t\t\t\tmname = name[1];\r\n\t\t\t\t\t\tlname = name[2];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString phone = phoneTxt.getText();\r\n\t\t\t\t\tint userLevel = owneLvlCombo.getSelectionIndex();\r\n\t\t\t\t\tString email = emailTxt.getText();\r\n\r\n\t\t\t\t\tDatabase.openConnection();\r\n\t\t\t\t\tPreparedStatement bookStatement = Database.getConnection().prepareStatement(bookQuery);\r\n\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, bookTitle);\r\n\t\t\t\t\tbookStatement.setInt(3, bookLevel);\r\n\t\t\t\t\tbookStatement.setString(4, type);\r\n\t\t\t\t\tbookStatement.setDouble(5, price);\r\n\t\t\t\t\tbookStatement.setBoolean(6, available);\r\n\r\n\t\t\t\t\tint bookre = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tbookStatement = Database.getConnection().prepareStatement(bookEdition);\r\n\t\t\t\t\tbookStatement.setString(1, bookID);\r\n\t\t\t\t\tbookStatement.setString(2, edition);\r\n\t\t\t\t\tbookStatement.setString(3, year);\r\n\r\n\t\t\t\t\tint edResult = bookStatement.executeUpdate();\r\n\r\n\t\t\t\t\tPreparedStatement ownerStatement = Database.getConnection().prepareStatement(ownerQuery);\r\n\t\t\t\t\townerStatement.setString(1, ownerID);\r\n\t\t\t\t\townerStatement.setString(2, fname);\r\n\t\t\t\t\townerStatement.setString(3, mname);\r\n\t\t\t\t\townerStatement.setString(4, lname);\r\n\t\t\t\t\townerStatement.setString(5, phone);\r\n\t\t\t\t\townerStatement.setInt(6, userLevel);\r\n\t\t\t\t\townerStatement.setString(7, ownerID + \"iau.edu.sa\");\r\n\t\t\t\t\townerStatement.setString(8, email);\r\n\t\t\t\t\tint ownRes = ownerStatement.executeUpdate();\r\n\r\n\t\t\t\t\tSystem.out.println(\"results: \" + ownRes + \" \" + edResult + \" bookre\");\r\n\t\t\t\t\t// test result of excute Update\r\n\t\t\t\t\tif (ownRes != 0 && edResult != 0 && bookre != 0) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is updated\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Data is not updated\");\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tDatabase.closeConnection();\r\n\t\t\t\t} catch (SQLException sql) {\r\n\t\t\t\t\tSystem.out.println(sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\taddButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\taddButton.setBounds(54, 666, 85, 26);\r\n\t\taddButton.setText(\"إضافة\");\r\n\r\n\t\tButton backButton = new Button(shell, SWT.NONE);\r\n\t\tbackButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tAdminMenu am = new AdminMenu();\r\n\t\t\t\tshell.close();\r\n\t\t\t\tam.open();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbackButton.setFont(SWTResourceManager.getFont(\"B Badr\", 12, SWT.NORMAL));\r\n\t\tbackButton.setBounds(150, 666, 85, 26);\r\n\t\tbackButton.setText(\"رجوع\");\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setBounds(177, 72, 192, 21);\r\n\t\tlabel.setText(\"إضافة كتاب جديد\");\r\n\r\n\t\tLabel label_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setBounds(22, 103, 167, 21);\r\n\t\t// get user name here to display\r\n\t\tString name = getUserName();\r\n\t\tlabel_1.setText(\"مرحباً ...\" + name);\r\n\r\n\t\tbookIDTxt = new Text(shell, SWT.BORDER);\r\n\t\tbookIDTxt.setBounds(271, 170, 119, 24);\r\n\r\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), SWT.SHELL_TRIM | SWT.BORDER | SWT.PRIMARY_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/list-2x.png\"));\n\t\tshell.setSize(610, 340);\n\t\tshell.setText(\"Thuoc List View\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\tshell.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif(e.keyCode==SWT.ESC){\n\t\t\t\t\tobjThuoc = null;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n \n Composite compositeInShellThuoc = new Composite(shell, SWT.NONE);\n\t\tcompositeInShellThuoc.setLayout(new BorderLayout(0, 0));\n\t\tcompositeInShellThuoc.setLayoutData(BorderLayout.CENTER);\n \n\t\tComposite compositeHeaderThuoc = new Composite(compositeInShellThuoc, SWT.NONE);\n\t\tcompositeHeaderThuoc.setLayoutData(BorderLayout.NORTH);\n\t\tcompositeHeaderThuoc.setLayout(new GridLayout(5, false));\n\n\t\ttextSearchThuoc = new Text(compositeHeaderThuoc, SWT.BORDER);\n\t\ttextSearchThuoc.setFont(SWTResourceManager.getFont(\"Tahoma\", 10, SWT.NORMAL));\n\t\ttextSearchThuoc.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif(e.keyCode==13){\n\t\t\t\t\treloadTableThuoc();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tButton btnNewButtonSearchThuoc = new Button(compositeHeaderThuoc, SWT.NONE);\n\t\tbtnNewButtonSearchThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/media-play-2x.png\"));\n\t\tbtnNewButtonSearchThuoc.setFont(SWTResourceManager.getFont(\"Tahoma\", 10, SWT.NORMAL));\n\n\t\tbtnNewButtonSearchThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\treloadTableThuoc();\n\t\t\t}\n\t\t});\n\t\tButton btnNewButtonExportExcelThuoc = new Button(compositeHeaderThuoc, SWT.NONE);\n\t\tbtnNewButtonExportExcelThuoc.setText(\"Export Excel\");\n\t\tbtnNewButtonExportExcelThuoc.setImage(SWTResourceManager.getImage(KhamBenhListDlg.class, \"/png/spreadsheet-2x.png\"));\n\t\tbtnNewButtonExportExcelThuoc.setFont(SWTResourceManager.getFont(\"Tahoma\", 10, SWT.NORMAL));\n\t\tbtnNewButtonExportExcelThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\texportExcelTableThuoc();\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tGridData gd_btnNewButtonThuoc = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\n\t\tgd_btnNewButtonThuoc.widthHint = 87;\n\t\tbtnNewButtonSearchThuoc.setLayoutData(gd_btnNewButtonThuoc);\n\t\tbtnNewButtonSearchThuoc.setText(\"Search\");\n \n\t\ttableViewerThuoc = new TableViewer(compositeInShellThuoc, SWT.BORDER | SWT.FULL_SELECTION);\n\t\ttableThuoc = tableViewerThuoc.getTable();\n\t\ttableThuoc.setFont(SWTResourceManager.getFont(\"Tahoma\", 10, SWT.NORMAL));\n\t\ttableThuoc.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif(e.keyCode==SWT.F5){\n\t\t\t\t\treloadTableThuoc();\n }\n if(e.keyCode==SWT.F4){\n\t\t\t\t\teditTableThuoc();\n }\n\t\t\t\telse if(e.keyCode==13){\n\t\t\t\t\tselectTableThuoc();\n\t\t\t\t}\n else if(e.keyCode==SWT.DEL){\n\t\t\t\t\tdeleteTableThuoc();\n\t\t\t\t}\n else if(e.keyCode==SWT.F7){\n\t\t\t\t\tnewItemThuoc();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n tableThuoc.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\n\t\t\t\tselectTableThuoc();\n\t\t\t}\n\t\t});\n \n\t\ttableThuoc.setLinesVisible(true);\n\t\ttableThuoc.setHeaderVisible(true);\n\t\ttableThuoc.setLayoutData(BorderLayout.CENTER);\n\n\t\tTableColumn tbTableColumnThuocMA_HOAT_CHAT = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_HOAT_CHAT.setWidth(100);\n\t\ttbTableColumnThuocMA_HOAT_CHAT.setText(\"MA_HOAT_CHAT\");\n\n\t\tTableColumn tbTableColumnThuocMA_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_AX.setWidth(100);\n\t\ttbTableColumnThuocMA_AX.setText(\"MA_AX\");\n\n\t\tTableColumn tbTableColumnThuocHOAT_CHAT = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHOAT_CHAT.setWidth(100);\n\t\ttbTableColumnThuocHOAT_CHAT.setText(\"HOAT_CHAT\");\n\n\t\tTableColumn tbTableColumnThuocHOATCHAT_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHOATCHAT_AX.setWidth(100);\n\t\ttbTableColumnThuocHOATCHAT_AX.setText(\"HOATCHAT_AX\");\n\n\t\tTableColumn tbTableColumnThuocMA_DUONG_DUNG = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_DUONG_DUNG.setWidth(100);\n\t\ttbTableColumnThuocMA_DUONG_DUNG.setText(\"MA_DUONG_DUNG\");\n\n\t\tTableColumn tbTableColumnThuocMA_DUONGDUNG_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_DUONGDUNG_AX.setWidth(100);\n\t\ttbTableColumnThuocMA_DUONGDUNG_AX.setText(\"MA_DUONGDUNG_AX\");\n\n\t\tTableColumn tbTableColumnThuocDUONG_DUNG = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocDUONG_DUNG.setWidth(100);\n\t\ttbTableColumnThuocDUONG_DUNG.setText(\"DUONG_DUNG\");\n\n\t\tTableColumn tbTableColumnThuocDUONGDUNG_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocDUONGDUNG_AX.setWidth(100);\n\t\ttbTableColumnThuocDUONGDUNG_AX.setText(\"DUONGDUNG_AX\");\n\n\t\tTableColumn tbTableColumnThuocHAM_LUONG = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHAM_LUONG.setWidth(100);\n\t\ttbTableColumnThuocHAM_LUONG.setText(\"HAM_LUONG\");\n\n\t\tTableColumn tbTableColumnThuocHAMLUONG_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHAMLUONG_AX.setWidth(100);\n\t\ttbTableColumnThuocHAMLUONG_AX.setText(\"HAMLUONG_AX\");\n\n\t\tTableColumn tbTableColumnThuocTEN_THUOC = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocTEN_THUOC.setWidth(100);\n\t\ttbTableColumnThuocTEN_THUOC.setText(\"TEN_THUOC\");\n\n\t\tTableColumn tbTableColumnThuocTENTHUOC_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocTENTHUOC_AX.setWidth(100);\n\t\ttbTableColumnThuocTENTHUOC_AX.setText(\"TENTHUOC_AX\");\n\n\t\tTableColumn tbTableColumnThuocSO_DANG_KY = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocSO_DANG_KY.setWidth(100);\n\t\ttbTableColumnThuocSO_DANG_KY.setText(\"SO_DANG_KY\");\n\n\t\tTableColumn tbTableColumnThuocSODANGKY_AX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocSODANGKY_AX.setWidth(100);\n\t\ttbTableColumnThuocSODANGKY_AX.setText(\"SODANGKY_AX\");\n\n\t\tTableColumn tbTableColumnThuocDONG_GOI = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocDONG_GOI.setWidth(100);\n\t\ttbTableColumnThuocDONG_GOI.setText(\"DONG_GOI\");\n\n\t\tTableColumn tbTableColumnThuocDON_VI_TINH = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocDON_VI_TINH.setWidth(100);\n\t\ttbTableColumnThuocDON_VI_TINH.setText(\"DON_VI_TINH\");\n\n\n\t\tTableColumn tbTableColumnThuocDON_GIA = new TableColumn(tableThuoc, SWT.NONE);\n\t\ttbTableColumnThuocDON_GIA.setWidth(100);\n\t\ttbTableColumnThuocDON_GIA.setText(\"DON_GIA\");\n\n\n\t\tTableColumn tbTableColumnThuocDON_GIA_TT = new TableColumn(tableThuoc, SWT.NONE);\n\t\ttbTableColumnThuocDON_GIA_TT.setWidth(100);\n\t\ttbTableColumnThuocDON_GIA_TT.setText(\"DON_GIA_TT\");\n\n\t\tTableColumn tbTableColumnThuocSO_LUONG = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocSO_LUONG.setWidth(100);\n\t\ttbTableColumnThuocSO_LUONG.setText(\"SO_LUONG\");\n\n\t\tTableColumn tbTableColumnThuocMA_CSKCB = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_CSKCB.setWidth(100);\n\t\ttbTableColumnThuocMA_CSKCB.setText(\"MA_CSKCB\");\n\n\t\tTableColumn tbTableColumnThuocHANG_SX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocHANG_SX.setWidth(100);\n\t\ttbTableColumnThuocHANG_SX.setText(\"HANG_SX\");\n\n\t\tTableColumn tbTableColumnThuocNUOC_SX = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocNUOC_SX.setWidth(100);\n\t\ttbTableColumnThuocNUOC_SX.setText(\"NUOC_SX\");\n\n\t\tTableColumn tbTableColumnThuocNHA_THAU = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocNHA_THAU.setWidth(100);\n\t\ttbTableColumnThuocNHA_THAU.setText(\"NHA_THAU\");\n\n\t\tTableColumn tbTableColumnThuocQUYET_DINH = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocQUYET_DINH.setWidth(100);\n\t\ttbTableColumnThuocQUYET_DINH.setText(\"QUYET_DINH\");\n\n\t\tTableColumn tbTableColumnThuocCONG_BO = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocCONG_BO.setWidth(100);\n\t\ttbTableColumnThuocCONG_BO.setText(\"CONG_BO\");\n\n\t\tTableColumn tbTableColumnThuocMA_THUOC_BV = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocMA_THUOC_BV.setWidth(100);\n\t\ttbTableColumnThuocMA_THUOC_BV.setText(\"MA_THUOC_BV\");\n\n\t\tTableColumn tbTableColumnThuocLOAI_THUOC = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocLOAI_THUOC.setWidth(100);\n\t\ttbTableColumnThuocLOAI_THUOC.setText(\"LOAI_THUOC\");\n\n\t\tTableColumn tbTableColumnThuocLOAI_THAU = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocLOAI_THAU.setWidth(100);\n\t\ttbTableColumnThuocLOAI_THAU.setText(\"LOAI_THAU\");\n\n\t\tTableColumn tbTableColumnThuocNHOM_THAU = new TableColumn(tableThuoc, SWT.LEFT);\n\t\ttbTableColumnThuocNHOM_THAU.setWidth(100);\n\t\ttbTableColumnThuocNHOM_THAU.setText(\"NHOM_THAU\");\n\n\t\tTableColumn tbTableColumnThuocMANHOM_9324 = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocMANHOM_9324.setWidth(100);\n\t\ttbTableColumnThuocMANHOM_9324.setText(\"MANHOM_9324\");\n\n\t\tTableColumn tbTableColumnThuocHIEULUC = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocHIEULUC.setWidth(100);\n\t\ttbTableColumnThuocHIEULUC.setText(\"HIEULUC\");\n\n\t\tTableColumn tbTableColumnThuocKETQUA = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocKETQUA.setWidth(100);\n\t\ttbTableColumnThuocKETQUA.setText(\"KETQUA\");\n\n\t\tTableColumn tbTableColumnThuocTYP = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocTYP.setWidth(100);\n\t\ttbTableColumnThuocTYP.setText(\"TYP\");\n\n\t\tTableColumn tbTableColumnThuocTHUOC_RANK = new TableColumn(tableThuoc, SWT.RIGHT);\n\t\ttbTableColumnThuocTHUOC_RANK.setWidth(100);\n\t\ttbTableColumnThuocTHUOC_RANK.setText(\"THUOC_RANK\");\n\n Menu menuThuoc = new Menu(tableThuoc);\n\t\ttableThuoc.setMenu(menuThuoc);\n\t\t\n\t\tMenuItem mntmNewItemThuoc = new MenuItem(menuThuoc, SWT.NONE);\n\t\tmntmNewItemThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tnewItemThuoc();\n\t\t\t}\n\t\t});\n\t\tmntmNewItemThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/arrow-circle-top-2x.png\"));\n\t\tmntmNewItemThuoc.setText(\"New\");\n\t\t\n\t\tMenuItem mntmEditItemThuoc = new MenuItem(menuThuoc, SWT.NONE);\n\t\tmntmEditItemThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/wrench-2x.png\"));\n\t\tmntmEditItemThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\teditTableThuoc();\n\t\t\t}\n\t\t});\n\t\tmntmEditItemThuoc.setText(\"Edit\");\n\t\t\n\t\tMenuItem mntmDeleteThuoc = new MenuItem(menuThuoc, SWT.NONE);\n\t\tmntmDeleteThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/circle-x-2x.png\"));\n\t\tmntmDeleteThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdeleteTableThuoc();\n\t\t\t}\n\t\t});\n\t\tmntmDeleteThuoc.setText(\"Delete\");\n\t\t\n\t\tMenuItem mntmExportThuoc = new MenuItem(menuThuoc, SWT.NONE);\n\t\tmntmExportThuoc.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\texportExcelTableThuoc();\n\t\t\t}\n\t\t});\n\t\tmntmExportThuoc.setImage(SWTResourceManager.getImage(ThuocDlg.class, \"/png/spreadsheet-2x.png\"));\n\t\tmntmExportThuoc.setText(\"Export Excel\");\n\t\t\n\t\ttableViewerThuoc.setLabelProvider(new TableLabelProviderThuoc());\n\t\ttableViewerThuoc.setContentProvider(new ContentProviderThuoc());\n\t\ttableViewerThuoc.setInput(listDataThuoc);\n //\n //\n\t\tloadDataThuoc();\n\t\t//\n reloadTableThuoc();\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setImage(SWTResourceManager.getImage(mainFrame.class, \"/imgCompand/main/logo.png\"));\r\n\t\tshell.setSize(935, 650);\r\n\t\tshell.setMinimumSize(920, 650);\r\n\t\tcenter(shell);\r\n\t\tshell.setText(\"三合一\");\r\n\t\tshell.setLayout(new GridLayout(8, false));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setText(\"面单图片:\");\r\n\t\t\r\n\t\ttext_mdtp = new Text(shell, SWT.BORDER);\r\n\t\ttext_mdtp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setMessage(\"setMessage\"); \r\n\t\t\t\tdd.setText(\"选择保存面单图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString mdtp=dd.open();\r\n\t\t\t\tif(mdtp!=null){\r\n\t\t\t\t\ttext_mdtp.setText(mdtp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_btnNewButton.widthHint = 95;\r\n\t\tbtnNewButton.setLayoutData(gd_btnNewButton);\r\n\t\tbtnNewButton.setText(\"浏览\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlblNewLabel = new Label(shell, SWT.NONE);\r\n\t\tGridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblNewLabel.widthHint = 87;\r\n\t\tlblNewLabel.setLayoutData(gd_lblNewLabel);\r\n\t\tlblNewLabel.setText(\"身份证图片:\");\r\n\t\t\r\n\t\ttext_sfztp = new Text(shell, SWT.BORDER);\r\n\t\ttext_sfztp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnNewButton_1 = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setMessage(\"setMessage\"); \r\n\t\t\t\tdd.setText(\"选择保存身份证图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString sfztp=dd.open();\r\n\t\t\t\tif(sfztp!=null){\r\n\t\t\t\t\ttext_sfztp.setText(sfztp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_btnNewButton_1.widthHint = 95;\r\n\t\tbtnNewButton_1.setLayoutData(gd_btnNewButton_1);\r\n\t\tbtnNewButton_1.setText(\"浏览\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_1 = new Label(shell, SWT.NONE);\r\n\t\tlabel_1.setText(\"小票图片:\");\r\n\t\t\r\n\t\ttext_xptp = new Text(shell, SWT.BORDER);\r\n\t\ttext_xptp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbutton = new Button(shell, SWT.NONE);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setText(\"选择保存小票图片的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString xptp=dd.open();\r\n\t\t\t\tif(xptp!=null){\r\n\t\t\t\t\ttext_xptp.setText(xptp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_button = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\r\n\t\tgd_button.widthHint = 95;\r\n\t\tbutton.setLayoutData(gd_button);\r\n\t\tbutton.setText(\"浏览\");\r\n\t\t\r\n\t\tlabel_2 = new Label(shell, SWT.NONE);\r\n\t\tlabel_2.setText(\" \");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlblNewLabel_1 = new Label(shell, SWT.NONE);\r\n\t\tlblNewLabel_1.setText(\" \");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_5 = new Label(shell, SWT.NONE);\r\n\t\tlabel_5.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlabel_5.setText(\"三合一导入模板下载,请点击........\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbutton_1 = new Button(shell, SWT.NONE);\r\n\t\tGridData gd_button_1 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_button_1.widthHint = 95;\r\n\t\tbutton_1.setLayoutData(gd_button_1);\r\n\t\tbutton_1.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\t\tdd.setText(\"请选择文件保存的位置\"); \r\n\t\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\t\tString saveFile=dd.open(); \r\n\t\t\t\t\tif(saveFile!=null){\r\n\t\t\t\t\t\tboolean flg = FileUtil.downloadLocal(saveFile, \"/template.xls\", \"三合一导入模板.xls\");\r\n\t\t\t\t\t\tif(flg){\r\n\t\t\t\t\t\t\tMessageDialog.openInformation(shell, \"系统提示\", \"模板下载成功!保存路径为:\"+saveFile+\"/三合一导入模板.xls\");\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tMessageDialog.openError(shell, \"系统提示\", \"模板下载失败!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t }catch(Exception ex){\r\n\t\t\t\t\t System.out.print(\"创建失败\");\r\n\t\t\t\t } \r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton_1.setText(\"导入模板\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_4 = new Label(shell, SWT.NONE);\r\n\t\tlabel_4.setText(\"合成信息:\");\r\n\t\t\r\n\t\ttext = new Text(shell, SWT.BORDER);\r\n\t\ttext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnexecl = new Button(shell, SWT.NONE);\r\n\t\tbtnexecl.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tFileDialog filedia = new FileDialog(shell, SWT.SINGLE);\r\n\t\t\t\tString filepath = filedia.open()+\"\";\r\n\t\t\t\ttext.setText(filepath.replace(\"null\",\"\"));\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnexecl = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btnexecl.widthHint = 95;\r\n\t\tbtnexecl.setLayoutData(gd_btnexecl);\r\n\t\tbtnexecl.setText(\"导入execl\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_3 = new Label(shell, SWT.NONE);\r\n\t\tlabel_3.setText(\"合成图片:\");\r\n\t\t\r\n\t\ttext_hctp = new Text(shell, SWT.BORDER);\r\n\t\ttext_hctp.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtnNewButton_2 = new Button(shell, SWT.NONE);\r\n\t\tbtnNewButton_2.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tDirectoryDialog dd=new DirectoryDialog(shell); \r\n\t\t\t\tdd.setText(\"选择合成图片将要保存的文件夹\"); \r\n\t\t\t\tdd.setFilterPath(\"C://\"); \r\n\t\t\t\tString hctp=dd.open();\r\n\t\t\t\tif(hctp!=null){\r\n\t\t\t\t\ttext_hctp.setText(hctp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btnNewButton_2 = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btnNewButton_2.widthHint = 95;\r\n\t\tbtnNewButton_2.setLayoutData(gd_btnNewButton_2);\r\n\t\tbtnNewButton_2.setText(\"保存位置\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tlabel_6 = new Label(shell, SWT.NONE);\r\n\t\tlabel_6.setText(\"进度:\");\r\n\t\t\r\n\t\tprogressBar = new ProgressBar(shell, SWT.NONE);\r\n\t\tGridData gd_progressBar = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_progressBar.widthHint = 524;\r\n\t\tprogressBar.setMinimum(0);\r\n\t\tprogressBar.setMaximum(100);\r\n\t\tprogressBar.setLayoutData(gd_progressBar);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\tbtn_doCompImg = new Button(shell, SWT.NONE);\r\n\t\tbtn_doCompImg.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t//导入信息\r\n\t\t\t\tdrxx = text.getText();\r\n\t\t\t\t//保存路径\r\n\t\t\t\thctp = text_hctp.getText();\r\n\t\t\t\t//面单图片路径\r\n\t\t\t\tmdtp = text_mdtp.getText();\r\n\t\t\t\t//身份证图片路径\r\n\t\t\t\tsfztp = text_sfztp.getText();\r\n\t\t\t\t//小票图片路径\r\n\t\t\t\txptp = text_xptp.getText();\r\n\t\t\t\t//清空信息框\r\n\t\t\t\ttext_info.setText(\"\");\r\n\t\t\t\tif(!drxx.equals(\"\")&&!hctp.equals(\"\")&&!mdtp.equals(\"\")&&!sfztp.equals(\"\")&&!xptp.equals(\"\")){\r\n\t\t\t\t\t(new IncresingOperator()).start();\r\n\t\t\t\t}else{\r\n\t\t\t\t\tMessageDialog.openWarning(shell, \"系统提示\",\"各路径选项不能为空!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tGridData gd_btn_doCompImg = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btn_doCompImg.widthHint = 95;\r\n\t\tbtn_doCompImg.setLayoutData(gd_btn_doCompImg);\r\n\t\tbtn_doCompImg.setText(\"立即合成\");\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\t\r\n\t\ttext_info = new Text(shell, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tGridData gd_text_info = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\r\n\t\tgd_text_info.heightHint = 217;\r\n\t\ttext_info.setLayoutData(gd_text_info);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\t\tnew Label(shell, SWT.NONE);\r\n\r\n\t}", "@Override\n public void projectOpened() {\n ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);\n JPanel myContentPanel = new JPanel(new BorderLayout());\n ShareToolWin toolWin = new ShareToolWin();\n myContentPanel.add(toolWin.getRootPanel(), BorderLayout.CENTER);\n ToolWindow toolWindow = toolWindowManager.registerToolWindow(TOOL_WINDOW_ID, false, ToolWindowAnchor.LEFT);\n toolWindow.getComponent().add(myContentPanel);\n }", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(764, 551);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.NONE);\n\t\tmntmFile.setText(\"File...\");\n\t\t\n\t\tMenuItem mntmEdit = new MenuItem(menu, SWT.NONE);\n\t\tmntmEdit.setText(\"Edit\");\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\tcomposite.setLayout(null);\n\t\t\n\t\tGroup grpDirectorio = new Group(composite, SWT.NONE);\n\t\tgrpDirectorio.setText(\"Directorio\");\n\t\tgrpDirectorio.setBounds(10, 86, 261, 387);\n\t\t\n\t\tGroup grpListadoDeAccesos = new Group(composite, SWT.NONE);\n\t\tgrpListadoDeAccesos.setText(\"Listado de Accesos\");\n\t\tgrpListadoDeAccesos.setBounds(277, 86, 477, 387);\n\t\t\n\t\tLabel label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel.setBounds(10, 479, 744, 2);\n\t\t\n\t\tButton btnNewButton = new Button(composite, SWT.NONE);\n\t\tbtnNewButton.setBounds(638, 491, 94, 28);\n\t\tbtnNewButton.setText(\"New Button\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(composite, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(538, 491, 94, 28);\n\t\tbtnNewButton_1.setText(\"New Button\");\n\t\t\n\t\tToolBar toolBar = new ToolBar(composite, SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar.setBounds(10, 10, 744, 20);\n\t\t\n\t\tToolItem tltmAccion = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion.setText(\"Accion 1\");\n\t\t\n\t\tToolItem tltmAccion_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion_1.setText(\"Accion 2\");\n\t\t\n\t\tToolItem tltmRadio = new ToolItem(toolBar, SWT.RADIO);\n\t\ttltmRadio.setText(\"Radio\");\n\t\t\n\t\tToolItem tltmItemDrop = new ToolItem(toolBar, SWT.DROP_DOWN);\n\t\ttltmItemDrop.setText(\"Item drop\");\n\t\t\n\t\tToolItem tltmCheckItem = new ToolItem(toolBar, SWT.CHECK);\n\t\ttltmCheckItem.setText(\"Check item\");\n\t\t\n\t\tCoolBar coolBar = new CoolBar(composite, SWT.FLAT);\n\t\tcoolBar.setBounds(10, 39, 744, 30);\n\t\t\n\t\tCoolItem coolItem_1 = new CoolItem(coolBar, SWT.NONE);\n\t\tcoolItem_1.setText(\"Accion 1\");\n\t\t\n\t\tCoolItem coolItem = new CoolItem(coolBar, SWT.NONE);\n\n\t}", "private void initializePopupWindow(View view, final int position) {\n\n //Inflate the view\n View popupView = getLayoutInflater().inflate(R.layout.popupwindow, null);\n popupWindow = new PopupWindow(popupView, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n\n //Set Popup Variables\n deleteButton = (Button) popupView.findViewById(R.id.deleteButton);\n saveButton = (Button) popupView.findViewById(R.id.saveButton);\n description = (EditText) popupView.findViewById(R.id.description);\n groceryItemName = (EditText) popupView.findViewById(R.id.groceryItemName);\n quantity = (EditText) popupView.findViewById(R.id.quantity);\n checkBox = (CheckBox) popupView.findViewById(R.id.checkbox);\n\n //Popup Window needs to be focusable in order to interact with it\n popupWindow.setFocusable(true);\n\n //Overshadow the current Activity with the popup window\n int[] location = new int[2];\n view.getLocationOnScreen(location);\n popupWindow.showAtLocation(view, Gravity.NO_GRAVITY, location[0], location[1] + view.getHeight());\n\n //Manipulation of the UI elements\n final String item = groceryItems.get(position);\n grocery = index.get(item);\n groceryItemName.setText(grocery.name);\n if (grocery.description != null) {\n description.setText(grocery.description);\n }\n quantity.setText(Integer.toString(grocery.quantity));\n checkBox.setChecked(grocery.isChecked);\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n grocery.setName(groceryItemName.getText().toString());\n grocery.setDescription(description.getText().toString());\n grocery.setQuantity(Integer.parseInt(quantity.getText().toString()));\n grocery.setChecked(checkBox.isChecked());\n groceryItems.set(position, grocery.name);\n index.remove(item);\n index.put(grocery.name, grocery);\n Toast.makeText(getApplication().getBaseContext(), grocery.name + \" modified!\",\n Toast.LENGTH_SHORT).show();\n popupWindow.dismiss();\n onResume();\n }\n });\n\n deleteButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n groceryItems.remove(position);\n Toast.makeText(getApplication().getBaseContext(), grocery.name + \" removed!\",\n Toast.LENGTH_SHORT).show();\n popupWindow.dismiss();\n onResume();\n }\n });\n }", "public void createGui(){\n\t\twindow = this.getContentPane(); \n\t\twindow.setLayout(new FlowLayout());\n\n\t\t//\tAdd \"panel\" to be used for drawing \n\t\t_panel = new ResizableImagePanel();\n\t\tDimension d= new Dimension(1433,642);\n\t\t_panel.setPreferredSize(d);\t\t \n\t\twindow.add(_panel);\n\n\t\t// A menu-bar contains menus. A menu contains menu-items (or sub-Menu)\n\t\tJMenuBar menuBar; // the menu-bar\n\t\tJMenu menu; // each menu in the menu-bar\n\n\t\tmenuBar = new JMenuBar();\n\t\t// First Menu\n\t\tmenu = new JMenu(\"Menu\");\n\t\tmenu.setMnemonic(KeyEvent.VK_A); // alt short-cut key\n\t\tmenuBar.add(menu); // the menu-bar adds this menu\n\n\t\tmenuItem1 = new JMenuItem(\"Fruit\", KeyEvent.VK_F);\n\t\tmenu.add(menuItem1); // the menu adds this item\n\n\t\tmenuItem2 = new JMenuItem(\"Pacman\", KeyEvent.VK_S);\n\t\tmenu.add(menuItem2); // the menu adds this item\n\t\tmenuItem3 = new JMenuItem(\"Run\");\n\t\tmenu.add(menuItem3); // the menu adds this item \n\t\tmenuItem4 = new JMenuItem(\"Save Game\");\n\t\tmenu.add(menuItem4); // the menu adds this item\n\n\t\tmenuItem5 = new JMenuItem(\"Open Game\");\n\t\tmenu.add(menuItem5); // the menu adds this item\n\t\tmenuItem6 = new JMenuItem(\"Clear Game\");\n\t\tmenu.add(menuItem6); // the menu adds this item\n\t\tmenuItem1.addActionListener(this);\n\t\tmenuItem2.addActionListener(this);\n\t\tmenuItem3.addActionListener(this);\n\t\tmenuItem4.addActionListener(this);\n\t\tmenuItem5.addActionListener(this);\n\t\tmenuItem6.addActionListener(this);\n\n\t\tsetJMenuBar(menuBar); // \"this\" JFrame sets its menu-bar\n\t\t// panel (source) fires the MouseEvent.\n\t\t//\tpanel adds \"this\" object as a MouseEvent listener.\n\t\t_panel.addMouseListener(this);\n\t}", "private void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tshell.setSize(500, 400);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FormLayout());\r\n\t\t\r\n\t\tSERVER_COUNTRY locale = SERVER_COUNTRY.DE;\r\n\t\tString username = JOptionPane.showInputDialog(\"Username\");\r\n\t\tString password = JOptionPane.showInputDialog(\"Password\");\r\n\t\tBot bot = new Bot(username, password, locale);\r\n\t\t\r\n\t\tGroup grpActions = new Group(shell, SWT.NONE);\r\n\t\tgrpActions.setText(\"Actions\");\r\n\t\tgrpActions.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tgrpActions.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\r\n\t\tgrpActions.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_BACKGROUND));\r\n\t\tgrpActions.setLayout(new GridLayout(5, false));\r\n\t\tFormData fd_grpActions = new FormData();\r\n\t\tfd_grpActions.left = new FormAttachment(0, 203);\r\n\t\tfd_grpActions.right = new FormAttachment(100, -10);\r\n\t\tfd_grpActions.top = new FormAttachment(0, 10);\r\n\t\tfd_grpActions.bottom = new FormAttachment(0, 152);\r\n\t\tgrpActions.setLayoutData(fd_grpActions);\r\n\t\t\r\n\t\tConsole = new Text(shell, SWT.BORDER | SWT.READ_ONLY | SWT.V_SCROLL | SWT.MULTI);\r\n\t\tFormData fd_Console = new FormData();\r\n\t\tfd_Console.left = new FormAttachment(grpActions, 0, SWT.LEFT);\r\n\t\tfd_Console.right = new FormAttachment(100, -10);\r\n\t\tConsole.setLayoutData(fd_Console);\r\n\r\n\t\t\r\n\t\tButton Feed = new Button(grpActions, SWT.CHECK);\r\n\t\tFeed.setSelection(true);\r\n\t\tFeed.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tfeed = !feed;\r\n\t\t\t\tConsole.append(\"\\nTest\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tFeed.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tFeed.setText(\"Feed\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Drink = new Button(grpActions, SWT.CHECK);\r\n\t\tDrink.setSelection(true);\r\n\t\tDrink.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tdrink = !drink;\r\n\t\t\t}\r\n\t\t});\r\n\t\tDrink.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tDrink.setText(\"Drink\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Stroke = new Button(grpActions, SWT.CHECK);\r\n\t\tStroke.setSelection(true);\r\n\t\tStroke.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tstroke = !stroke;\r\n\t\t\t}\r\n\t\t});\r\n\t\tStroke.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tStroke.setText(\"Stroke\");\r\n\t\t\r\n\t\t\r\n\t\t//STATIC\r\n\t\tLabel lblNewLabel_0 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_0.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tlblNewLabel_0.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/feed.png\"));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_1 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_1.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/drink.png\"));\r\n\t\tlblNewLabel_1.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\t\r\n\t\tGroup grpBreeds = new Group(shell, SWT.NONE);\r\n\t\tgrpBreeds.setText(\"Breeds\");\r\n\t\tgrpBreeds.setLayout(new GridLayout(1, false));\r\n\t\t\r\n\t\tFormData fd_grpBreeds = new FormData();\r\n\t\tfd_grpBreeds.top = new FormAttachment(0, 10);\r\n\t\tfd_grpBreeds.bottom = new FormAttachment(100, -10);\r\n\t\tfd_grpBreeds.right = new FormAttachment(0, 180);\r\n\t\tfd_grpBreeds.left = new FormAttachment(0, 10);\r\n\t\tgrpBreeds.setLayoutData(fd_grpBreeds);\r\n\t\t\r\n\t\tButton Defaults = new Button(grpBreeds, SWT.RADIO);\r\n\t\tDefaults.setText(\"Defaults\");\r\n\t\t//END STATIC\r\n\t\t\r\n\t\tbot.account.api.requests.setTimeout(200);\r\n\t\tbot.logger.printlevel = 1;\t\r\n\t\t\r\n\t\tReturn<HashMap<Integer,Breed>> b = bot.getBreeds();\t\t\r\n\t\tif(!b.sucess) {\r\n\t\t\tConsole.append(\"\\nERROR!\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\tIterator<Breed> iterator = b.data.values().iterator();\r\n\t\tHashMap<String, java.awt.Button> buttons = new HashMap<String, Button>();\r\n\t\t\r\n\t\twhile(iterator.hasNext()) {\r\n\t\t\tBreed breed = iterator.next();\r\n\t\t\t\r\n\t\t\tString name = breed.name;\r\n\t\t\t\r\n\t\t\tButton btn = new Button(grpBreeds, SWT.RADIO);\r\n\t\t\tbtn.setText(name);\r\n\t\t\t\r\n\t\t\tbuttons.put(name, btn);\r\n\t\t\t\r\n\t\t\t//\tTODO - Für jeden Breed wird ein Button erstellt:\r\n\t\t\t//\tButton [HIER DER BREED NAME] = new Button(grpBreeds, SWT.RADIO); <-- Dass geht nicht so wirklich so\r\n\t\t\t//\tDefaults.setText(\"[BREED NAME]\");\r\n\t\t}\r\n\t\t\r\n\t\t// um ein button mit name <name> zu bekommen: Button whatever = buttons.get(<name>);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tButton btnStartBot = new Button(shell, SWT.NONE);\r\n\t\tfd_Console.top = new FormAttachment(0, 221);\r\n\t\tbtnStartBot.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tConsole.setText(\"Starting bot... \");\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t/*TODO\r\n\t\t\t\tBreed[] breeds = new Breed[b.data.size()];\r\n\t\t\t\t\r\n\t\t\t\tIterator<Breed> br = b.data.values().iterator();\r\n\t\t\t\t\r\n\t\t\t\tfor(int i = 0; i < b.data.size(); i++) {\r\n\t\t\t\t\tbreeds[i] = br.next();\r\n\t\t\t\t};\r\n\t\t\t\tBreed s = (Breed) JOptionPane.showInputDialog(null, \"Choose breed\", \"breed selector\", JOptionPane.PLAIN_MESSAGE, null, breeds, \"default\");\r\n\t\t\t\tEND TODO*/\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Breed breed, boolean drink, boolean stroke, boolean groom, boolean carrot, boolean mash, boolean suckle, boolean feed, boolean sleep, boolean centreMission, long timeout, Bot bot, Runnable onEnd\r\n\t\t\t\tReturn<BasicBreedTasksAsync> ret = bot.basicBreedTasks(0, drink, stroke, groom, carrot, mash, suckle, feed, sleep, mission, 500, new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"FINISHED!\", \"Bot\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\tbot.logout();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t});\r\n\t\t\t\t\r\n\t\t\t\tif(!ret.sucess) {\r\n\t\t\t\t\tConsole.append(\"ERROR\");\r\n\t\t\t\t\tSystem.exit(-1);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tret.data.start();\r\n\t\t\t\t\r\n\t\t\t\t//TODO\r\n\t\t\t\twhile(ret.data.running()) {\r\n\t\t\t\t\tSleeper.sleep(5000);\r\n\t\t\t\t\tif(ret.data.getProgress() == 1)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tConsole.append(\"progress: \" + (ret.data.getProgress() * 100) + \"%\");\r\n\t\t\t\t\tConsole.append(\"ETA: \" + (ret.data.getEta() / 1000) + \"sec.\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tFormData fd_btnStartBot = new FormData();\r\n\t\tfd_btnStartBot.left = new FormAttachment(grpActions, 0, SWT.LEFT);\r\n\t\tbtnStartBot.setLayoutData(fd_btnStartBot);\r\n\t\tbtnStartBot.setText(\"Start Bot\");\r\n\t\t\r\n\t\tButton btnStopBot = new Button(shell, SWT.NONE);\r\n\t\tfd_btnStartBot.top = new FormAttachment(btnStopBot, 0, SWT.TOP);\r\n\t\tbtnStopBot.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tConsole.append(\"Stopping bot...\");\r\n\t\t\t\tbot.logout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tFormData fd_btnStopBot = new FormData();\r\n\t\tfd_btnStopBot.right = new FormAttachment(grpActions, 0, SWT.RIGHT);\r\n\t\tbtnStopBot.setLayoutData(fd_btnStopBot);\r\n\t\tbtnStopBot.setText(\"Stop Bot\");\r\n\t\t\t\r\n\t\t\r\n\t\tProgressBar progressBar = new ProgressBar(shell, SWT.NONE);\r\n\t\tfd_Console.bottom = new FormAttachment(progressBar, -6);\r\n\t\tfd_btnStopBot.bottom = new FormAttachment(progressBar, -119);\r\n\t\t\r\n\t\tFormData fd_progressBar = new FormData();\r\n\t\tfd_progressBar.left = new FormAttachment(grpBreeds, 23);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//STATIC\r\n\t\tLabel lblNewLabel_2 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_2.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/stroke.png\"));\r\n\t\tlblNewLabel_2.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tButton Groom = new Button(grpActions, SWT.CHECK);\r\n\t\tGroom.setSelection(true);\r\n\t\tGroom.setSelection(true);\r\n\t\tGroom.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tgroom = !groom;\r\n\t\t\t}\r\n\t\t});\r\n\t\tGroom.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tGroom.setText(\"Groom\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Treat = new Button(grpActions, SWT.CHECK);\r\n\t\tTreat.setSelection(true);\r\n\t\tTreat.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tcarrot = !carrot;\r\n\t\t\t}\r\n\t\t});\r\n\t\tTreat.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tTreat.setText(\"Treat\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton Mash = new Button(grpActions, SWT.CHECK);\r\n\t\tMash.setSelection(true);\r\n\t\tMash.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tmash = !mash;\r\n\t\t\t}\r\n\t\t});\r\n\t\tMash.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tMash.setText(\"Mash\");\r\n\t\t\r\n\t\tLabel lblNewLabel_3 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_3.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/groom.png\"));\r\n\t\tlblNewLabel_3.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_4 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_4.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/carotte.png\"));\r\n\t\tlblNewLabel_4.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tLabel lblNewLabel_5 = new Label(grpActions, SWT.NONE);\r\n\t\tlblNewLabel_5.setImage(SWTResourceManager.getImage(MainWindow.class, \"/PNGs/mash.png\"));\r\n\t\tlblNewLabel_5.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\tButton btnSleep = new Button(grpActions, SWT.CHECK);\r\n\t\tbtnSleep.setSelection(true);\r\n\t\tbtnSleep.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tsleep = !sleep;\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSleep.setText(\"Sleep\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\t\r\n\t\tButton btnMission = new Button(grpActions, SWT.CHECK);\r\n\t\tbtnMission.setSelection(true);\r\n\t\tbtnMission.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tmission = !mission;\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnMission.setText(\"Mission\");\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\t\tnew Label(grpActions, SWT.NONE);\r\n\r\n\t}", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_wallpaper, container, false);\n folderTitle = view.findViewById(R.id.folder_title);\n isFavorite = view.findViewById(R.id.is_favorite);\n wallpaperGrid = view.findViewById(R.id.grid_view);\n addWallpaperButton = view.findViewById(R.id.add_wallpaper);\n\n //We take arguments passed to the fragment and set wallpaperDirectory Object for this fragment\n //and set title to whatever wallpaper Directory title is\n wallpaperDirectory = new WallpaperDirectory();\n wallpaperDirectory.Title = getArguments().getString(FOLDER_TITLE);\n wallpaperDirectory.PreviewUrl = getArguments().getString(FOLDER_PREVIEW);\n folderTitle.setText(wallpaperDirectory.Title);\n\n //we get sharedPreference Object for both settings and favorites\n sharedPreferences =getActivity().getSharedPreferences(PrefsKeys.SETTINGS,Context.MODE_PRIVATE);\n SharedPreferences favPreferences = getActivity().getSharedPreferences(PrefsKeys.FAVORITES,Context.MODE_PRIVATE);\n\n //we check if current folder is favorited then we set isFavorite to checked\n\n isFavorite.setChecked(favPreferences.contains(wallpaperDirectory.Title));\n isFavorite.setOnCheckedChangeListener((buttonView, isChecked) -> {\n isFavorite.setEnabled(false);\n //we update the value whether or not isFavorite is checked\n if(isChecked){\n favPreferences.edit().putString(wallpaperDirectory.Title,wallpaperDirectory.PreviewUrl).apply();\n }else{\n favPreferences.edit().remove(wallpaperDirectory.Title).apply();\n }\n isFavorite.setEnabled(true);\n });\n return view;\n }", "@Override\n public void start(Stage primaryStage) throws IOException {\n for (Country c : countries)\n {\n visibleCountriesList.add(c);\n }\n \n //Build top toolbar\n g.setHgap(10);\n for (int i = 0; i < 5; i++)\n {\n ColumnConstraints column = new ColumnConstraints();\n column.setPercentWidth(20);\n g.getColumnConstraints().add(column); \n }\n \n //Top toolbar creation + eventHandler.\n for (int i = 0; i < 5; i++)\n {\n final Button b = new Button();\n b.setMaxWidth(Double.MAX_VALUE);\n GridPane.setColumnIndex(b, i);\n g.getChildren().add(b);\n b.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent t) {\n if (!\"None\".equals(b.getText()))\n {\n \n selectedCountry = Country.getCountry(b.getText());\n eventLog.appendText(\"Selected \"+selectedCountry.Name+\" From favourites list \\n\");\n selectedCountryChanged();\n } else {\n //don't wanna do anything\n }\n \n }\n });\n }\n refreshToolbarButtons();\n \n BorderPane root = new BorderPane();\n \n \n //Build country list\n \n lv.setPrefHeight(400);\n lv.setPrefWidth(100);\n lv.setItems(visibleCountriesList);\n \n lv.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);\n lv.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {\n @Override\n public void changed(ObservableValue<? extends Number> ov, Number t, Number t1) {\n selectedCountry = (Country)lv.getSelectionModel().getSelectedItem();\n selectedCountryChanged();\n //eventLog.appendText(\"Changed Flag, Country Text and Image to:\"+selectedCountry.Name+\"\\n\");\n }\n });\n \n //Build main window\n \n addToToolbar.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent t) {\n addToToolbar();\n }\n });\n Button remFromToolbar = new Button(\"Remove favourite\");\n remFromToolbar.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent t) {\n removeFromToolbar();\n }\n });\n adrem.getChildren().add(addToToolbar);\n adrem.getChildren().add(remFromToolbar);\n \n //Set up for checkbox Filters\n GridPane filters = new GridPane();\n for (int i = 0; i < 6; i++)\n {\n RowConstraints row = new RowConstraints();\n row.setPercentHeight(20);\n filters.getRowConstraints().add(row); \n }\n saveB.setOnAction(new EventHandler<ActionEvent>(){\n @Override\n public void handle(ActionEvent event) {\n FileChooser fileChooser = new FileChooser();\n \n //Set extension filter\n FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter(\"PNG files (*.png)\", \"*.png\");\n fileChooser.getExtensionFilters().add(extFilter);\n \n //Show save file dialog\n File filepath = fileChooser.showSaveDialog(primaryStage);\n \n //Modify this to print out the file path.\n eventLog.appendText(\"Saved file to: \"+filepath.toString()+\"\\n\");\n //if(file != null){\n //SaveFile( file);\n //}\n \n } \n }); \n \n \n //Creation and Observer for checkbox Filters.\n for (int i = 0; i < 6; i++)\n {\n CheckBox ch = new CheckBox(ContList[i]);\n ch.setMaxWidth(Double.MAX_VALUE);\n ch.setMaxHeight(Double.MAX_VALUE);\n GridPane.setRowIndex(ch, i);\n ch.setSelected(true);\n //filters.;\n ch.selectedProperty().addListener(new ChangeListener<Boolean>(){\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n if(ch.isSelected() == false){\n String Title = ch.getText();\n \n String Contval;\n //visibleCountriesList.clear();\n //System.out.println(Title);\n for (Country c : countries){\n switch (c.Continent.ordinal()) {\n case 0:\n Contval = ContList[0];\n break;\n case 1:\n Contval = ContList[1];\n break;\n case 2:\n Contval = ContList[2];\n break;\n case 3:\n Contval = ContList[3];\n break;\n case 4:\n Contval = ContList[4];\n break;\n case 5:\n Contval = ContList[5];\n break;\n default:\n Contval = \"Doesn't Exist\";\n break;\n }\n //System.out.println(Contval);\n if (Title.equals(Contval)){\n visibleCountriesList.remove(c);\n }\n \n }\n eventLog.appendText(\"Filtered Continent:\"+ch.getText()+\"\\n\");\n } else { \n String Title = ch.getText();\n String Contval;\n for (Country c : countries){\n switch (c.Continent.ordinal()) {\n case 0:\n Contval = ContList[0];\n break;\n case 1:\n Contval = ContList[1];\n break;\n case 2:\n Contval = ContList[2];\n break;\n case 3:\n Contval = ContList[3];\n break;\n case 4:\n Contval = ContList[4];\n break;\n case 5:\n Contval = ContList[5];\n break;\n default:\n Contval = \"Doesn't Exist\";\n break;\n }\n //System.out.println(Contval);\n if (Title.equals(Contval)){\n visibleCountriesList.add(c);\n } \n if (visibleCountriesList.isEmpty()){\n visibleCountriesList.clear();\n }\n \n }\n eventLog.appendText(\"Unfiltered Continent:\"+ch.getText()+\"\\n\");\n }\n \n }\n });\n filters.getChildren().add(ch);\n}\nScene scene = new Scene(root, 700, 500);\nprimaryStage.setTitle(\"Assignment3\");\nprimaryStage.setScene(scene);\nimage = new Image((getClass().getResourceAsStream(\"/Flags/vi.png\")));\nCountryTitle.setText(countries[0].Name);\nCountryTitle.setFont(new Font(\"Arial\",20));\n//CountryTitle.setWrapText(true);\nselectedCountry = Country.getCountry(CountryTitle.getText());\n//lv.getSelectionModel().select(0);\n//lv.getFocusModel().focus(0);\n \nimageHolder.setImage(image);\n//imageHolder.setFitWidth(200);\nimageHolder.setPreserveRatio(true);\n \n centreP.setBackground(new Background(new BackgroundFill(Color.LIGHTGREY,CornerRadii.EMPTY,Insets.EMPTY)));\n adrem.setAlignment(Pos.CENTER);\n lv.setMaxSize(Double.MAX_VALUE,Double.MAX_VALUE);\n filters.setMaxSize(Double.MAX_VALUE,Double.MAX_VALUE);\n centreP.setMaxSize(Double.MAX_VALUE,Double.MAX_VALUE);\n bottomStuff.setPrefHeight(300);\n eventLog.setPrefHeight(500);\n saveQuit.setPrefHeight(500);\n \n testGrid.add(topStuff,0,1); \n topStuff.add(filters,0,0);\n testGrid.add(g, 0, 0);\n ColumnConstraints cTopSt1 = new ColumnConstraints(50,5000,Double.MAX_VALUE);\n cTopSt1.setPercentWidth(15);\n cTopSt1.setHgrow(Priority.ALWAYS);\n topStuff.getColumnConstraints().add(cTopSt1);\n RowConstraints gtst =new RowConstraints (30,30,Double.MAX_VALUE);\n gtst.setVgrow(Priority.ALWAYS);\n gtst.setPercentHeight(100);\n g.getRowConstraints().add(gtst);\n topStuff.add(centreP,1,0);\n //centreP.getChildren().addAll(textAndFlag,descText,adrem);\n ColumnConstraints cTopSt2 = new ColumnConstraints(50,5000,Double.MAX_VALUE);\n cTopSt2.setPercentWidth(55);\n cTopSt2.setHgrow(Priority.ALWAYS);\n topStuff.getColumnConstraints().add(cTopSt2);\n centreP.add(textAndFlag,0,0);\n textAndFlag.getChildren().addAll(CountryTitle,imageHolder);\n textAndFlag.setAlignment(Pos.CENTER);\n centreP.add(descText,0,1);\n centreP.add(adrem,0,2);\n ColumnConstraints tstCol = new ColumnConstraints(50,1000,Double.MAX_VALUE);\n tstCol.setHgrow(Priority.ALWAYS);\n tstCol.setPercentWidth(100);\n RowConstraints tstRow = new RowConstraints(50,1000,Double.MAX_VALUE);\n tstRow.setVgrow(Priority.ALWAYS);\n //tstRow.getPercentHeight();\n centreP.getRowConstraints().addAll(tstRow,tstRow,tstRow);\n centreP.getColumnConstraints().addAll(tstCol);\n //topStuff.getRowConstraints().add(tstRow);\n topStuff.add(lv, 2, 0);\n ColumnConstraints cTopSt3 = new ColumnConstraints(50,5000,Double.MAX_VALUE);\n cTopSt3.setPercentWidth(30);\n cTopSt3.setHgrow(Priority.ALWAYS);\n topStuff.getColumnConstraints().add(cTopSt3);\n testGrid.add(bottomStuff,0,2);\n bottomStuff.add(eventLog,0,0);\n ColumnConstraints cBotSt1 = new ColumnConstraints(50,50,Double.MAX_VALUE);\n cBotSt1.setPercentWidth(90);\n cBotSt1.setHgrow(Priority.ALWAYS);\n bottomStuff.getColumnConstraints().add(cBotSt1);\n //RowConstraints rBotSt1 = new RowConstraints(50,50,Double.MAX_VALUE);\n //rBotSt1.setVgrow(Priority.NEVER);\n //rBotSt1.setPercentHeight(100);\n bottomStuff.add(saveQuit,1,0);\n ColumnConstraints cBotSt2 = new ColumnConstraints(50,50,Double.MAX_VALUE);\n cBotSt2.setPercentWidth(10);\n cBotSt2.setHgrow(Priority.ALWAYS);\n bottomStuff.getColumnConstraints().add(cBotSt2);\n saveQuit.add(saveB,0,0);\n saveQuit.add(quitB,0,1);\n \n RowConstraints cRowSt3 = new RowConstraints(50,1000,Double.MAX_VALUE);\n cRowSt3.setPercentHeight(100);\n cRowSt3.setVgrow(Priority.ALWAYS);\n bottomStuff.getRowConstraints().add(cRowSt3);\n //testGrid.setGridLinesVisible(true);\n //RowConstraints tstR1 = new RowConstraints(50,50,Double.MAX_VALUE);\n //tstR1.setVgrow(Priority.ALWAYS);\n //tstR1.setPercentHeight(100);\n //testGrid.getRowConstraints().add(tstR1);\n //RowConstraints tstR2 = new RowConstraints(50,50,Double.MAX_VALUE);\n //tstR2.setVgrow(Priority.ALWAYS);\n //tstR2.setPercentHeight(100);\n //testGrid.getRowConstraints().add(tstR2);\n //Setting each piece of the overall TestGrid (why did I name it that?\n //Well it's it was originally a test\n //RowConstraints tGRow1 = new RowConstraints(50,50,Double.MAX_VALUE);\n //tGRow1.setVgrow(Priority.ALWAYS);\n //tGRow1.setPercentHeight(5);\n //testGrid.getRowConstraints().add(0,tGRow1);\n //RowConstraints tGRow2 = new RowConstraints(50,50,Double.MAX_VALUE);\n //tGRow2.setVgrow(Priority.ALWAYS);\n //tGRow2.setPercentHeight(55);\n //testGrid.getRowConstraints().add(1, tGRow2);\n //RowConstraints tGRow3 = new RowConstraints(50,50,Double.MAX_VALUE);\n //tGRow3.setVgrow(Priority.ALWAYS);\n //tGRow3.setPercentHeight(40);\n //testGrid.getRowConstraints().add(2,tGRow3);\n //g.setPadding(new Insets(0,10,10,0));\n //root.setTop(g);\n //g.setGridLinesVisible(true);\n //root.setCenter(topStuff);\n //topStuff.setGridLinesVisible(true);\n //root.setBottom(bottomStuff);\n //bottomStuff.setGridLinesVisible(true);\n adrem.setSpacing(20);\n root.setCenter(testGrid);\n \n primaryStage.show();\n \n quitB.setOnAction(new EventHandler<ActionEvent>(){\n @Override\n public void handle(ActionEvent event) {\n System.exit(0); \n }\n \n });\n \n }", "private void createContents() {\n // シェル\n super.createContents(this.parent, SWT.CLOSE | SWT.TITLE, false);\n this.getShell().setText(\"つぶやく\");\n this.shell = this.getShell();\n\n // レイアウト\n GridLayout glShell = new GridLayout(3, false);\n // glShell.horizontalSpacing = 1;\n glShell.marginHeight = 10;\n glShell.marginWidth = 10;\n // glShell.verticalSpacing = 1;\n this.shell.setLayout(glShell);\n\n Label thumnail = new Label(this.shell, SWT.NONE);\n GridData gdThumnail = new GridData(SWT.CENTER, SWT.CENTER, false, false, 3, 1);\n thumnail.setLayoutData(gdThumnail);\n try {\n Image orig = SwtUtils.makeImage(this.imageFile);\n thumnail.setImage(SwtUtils.scaleToFit(orig, 400, 300));\n orig.dispose();\n } catch (IOException e2) {\n SwtUtils.errorDialog(e2, TweetDialog.this.shell);\n }\n\n final Text text = new Text(this.shell, SWT.MULTI | SWT.BORDER | SWT.WRAP);\n GridData gdText = new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1);\n gdText.widthHint = SwtUtils.DPIAwareWidth(300);\n gdText.heightHint = SwtUtils.DPIAwareHeight(80);\n text.setLayoutData(gdText);\n\n Label userName = new Label(this.shell, SWT.NONE);\n userName.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n try {\n userName.setText(TwitterClient.getInstance().getUser().getScreenName());\n } catch (TwitterException e1) {\n SwtUtils.errorDialog(e1, TweetDialog.this.shell);\n }\n\n final Label remainChars = new Label(this.shell, SWT.NONE);\n remainChars.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n text.addModifyListener(new ModifyListener() {\n\n @Override\n public void modifyText(ModifyEvent e) {\n int remain = 117 - text.getText().length();\n remainChars.setText(String.valueOf(remain));\n }\n });\n text.setText(\"\");\n\n Button tweet = new Button(this.shell, SWT.NONE);\n GridData gdTweet = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\n gdTweet.widthHint = SwtUtils.DPIAwareWidth(100);\n tweet.setLayoutData(gdTweet);\n tweet.setText(\"つぶやく\");\n tweet.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n try {\n TwitterClient.getInstance().tweet(\n TweetDialog.this, text.getText(), TweetDialog.this.imageFile);\n TweetDialog.this.shell.close();\n ApplicationMain.logPrint(\"つぶやきました\");\n } catch (TwitterException e1) {\n SwtUtils.errorDialog(e1, TweetDialog.this.shell);\n }\n }\n });\n\n this.shell.pack();\n }", "private static void openToDoListWindow() {\n\t\n // Create a window for app\n frame = new JFrame(AppConst.UI_CONST.APP_NAME);\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n panel = new JPanel();\n panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\n panel.setOpaque(true);\n \n // Create text area to display message to users\n ButtonListener buttonListener = new ButtonListener();\n output = new JTextArea(windowHeight, windowWidth);\n output.setBackground(Color.white);\n output.setForeground(Color.black);\n output.setLineWrap(true);\n output.setWrapStyleWord(true);\n output.setEditable(false);\n \n table = mTableHelper.getTable();\n\t\t// Create scroll bar if table area is full \n JScrollPane scroller = new JScrollPane(table);\n scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);\n scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n table.setFillsViewportHeight(true);\n\n\t\t// Create scroll bar if text area is full\n JScrollPane scroller2 = new JScrollPane(output);\n scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);\n scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n \n // Create input panel to get user's command\n JPanel inputpanel = new JPanel();\n inputpanel.setLayout(new FlowLayout());\n input = new JTextField(windowWidth);\n input.setBackground(Color.white);\n input.setForeground(Color.red);\n input.setCaretColor(Color.blue);\n input.setActionCommand(AppConst.UI_CONST.ENTER); \n input.addActionListener(buttonListener);\n input.addKeyListener(new KeyAdapter() {\n public void keyPressed(KeyEvent evt) {\n panelKeyPressAction(evt);\n }\n });\n \n // Added the table box, display message box and the input to the panel\n DefaultCaret caret = (DefaultCaret) output.getCaret();\n caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);\n panel.add(scroller);\n panel.add(scroller2);\n inputpanel.add(input);\n panel.add(inputpanel);\n \n frame.getContentPane().add(BorderLayout.CENTER, panel);\n frame.pack();\n frame.setLocationByPlatform(true);\n frame.setVisible(true);\n frame.setResizable(false);\n \n input.requestFocus();\n userCommandCount = 0;\n displayMessage(AppConst.UI_CONST.COMMAND_MESSAGE);\n }", "public void showPickUPTutorial() {\n\n String tutorialText = getResources().getString(R.string.tutorial_pick_up);\n if (SharedPref.getInstance().getBooleanValue(getActivity(), isbussiness)) {\n tutorialText = getResources().getString(R.string.tutorial_pick_up_business);\n }\n\n ShowcaseView mShowcaseViewCreatePickup = new ShowcaseView.Builder(getActivity())\n .setTarget(new ViewTarget(btn_pickup))\n .hideOnTouchOutside()\n .setContentText(tutorialText)\n .setContentTextPaint(Utility.getTextPaint(getActivity()))\n .singleShot(AppConstants.TUTORIAL_PICK_UP_ID)\n .setShowcaseEventListener(new OnShowcaseEventListener() {\n @Override\n public void onShowcaseViewHide(ShowcaseView showcaseView) {\n\n }\n\n @Override\n public void onShowcaseViewDidHide(ShowcaseView showcaseView) {\n showCreatePickUPTutorial();\n }\n\n @Override\n public void onShowcaseViewShow(ShowcaseView showcaseView) {\n\n }\n\n @Override\n public void onShowcaseViewTouchBlocked(MotionEvent motionEvent) {\n\n }\n })\n .setStyle(R.style.CustomShowcaseTheme2)\n .build();\n mShowcaseViewCreatePickup.setButtonText(getResources().getString(R.string.tutorial_got_it));\n }", "private void createContents() {\r\n\t\tshlAboutGoko = new Shell(getParent(), getStyle());\r\n\t\tshlAboutGoko.setSize(376, 248);\r\n\t\tshlAboutGoko.setText(\"About Goko\");\r\n\t\tshlAboutGoko.setLayout(new GridLayout(1, false));\r\n\r\n\t\tComposite composite_1 = new Composite(shlAboutGoko, SWT.NONE);\r\n\t\tcomposite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\r\n\t\tcomposite_1.setLayout(new GridLayout(1, false));\r\n\r\n\t\tLabel lblGokoIsA = new Label(composite_1, SWT.WRAP);\r\n\t\tGridData gd_lblGokoIsA = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblGokoIsA.widthHint = 350;\r\n\t\tlblGokoIsA.setLayoutData(gd_lblGokoIsA);\r\n\t\tlblGokoIsA.setText(\"Goko is an open source desktop application for CNC control and operation\");\r\n\r\n\t\tComposite composite_2 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\tcomposite_2.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblAlphaVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblAlphaVersion.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblAlphaVersion.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblAlphaVersion.setText(\"Version\");\r\n\r\n\t\tLabel lblVersion = new Label(composite_2, SWT.NONE);\r\n\t\tlblVersion.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\r\n\t\tnew Label(composite_1, SWT.NONE);\r\n\r\n\t\tLabel lblDate = new Label(composite_2, SWT.NONE);\r\n\t\tlblDate.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\r\n\t\tlblDate.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.ITALIC));\r\n\t\tlblDate.setText(\"Build\");\r\n\t\t\r\n\t\tLabel lblBuild = new Label(composite_2, SWT.NONE);\r\n\t\tlblBuild.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\t\t\t\r\n\t\tProperties prop = new Properties();\r\n\t\tClassLoader loader = Thread.currentThread().getContextClassLoader(); \r\n\t\tInputStream stream = loader.getResourceAsStream(\"/version.properties\");\r\n\t\ttry {\r\n\t\t\tprop.load(stream);\r\n\t\t\tString version = prop.getProperty(\"goko.version\");\r\n\t\t\tString build = prop.getProperty(\"goko.build.timestamp\");\r\n\t\t\tlblVersion.setText(version);\r\n\t\t\tlblBuild.setText(build);\t\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\tLOG.error(e);\r\n\t\t}\r\n\t\t\r\n\t\tComposite composite = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblMoreInformationOn = new Label(composite, SWT.NONE);\r\n\t\tGridData gd_lblMoreInformationOn = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblMoreInformationOn.widthHint = 60;\r\n\t\tlblMoreInformationOn.setLayoutData(gd_lblMoreInformationOn);\r\n\t\tlblMoreInformationOn.setText(\"Website :\");\r\n\r\n\t\tLink link = new Link(composite, SWT.NONE);\r\n\t\tlink.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://www.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tlink.setText(\"<a>http://www.goko.fr</a>\");\r\n\t\t\r\n\t\tComposite composite_3 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_3.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblForum = new Label(composite_3, SWT.NONE);\r\n\t\tGridData gd_lblForum = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblForum.widthHint = 60;\r\n\t\tlblForum.setLayoutData(gd_lblForum);\r\n\t\tlblForum.setText(\"Forum :\");\r\n\t\t\r\n\t\tLink link_1 = new Link(composite_3, 0);\r\n\t\tlink_1.setText(\"<a>http://discuss.goko.fr</a>\");\r\n\t\tlink_1.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent event) {\r\n\t\t\t\tif (event.button == 1) { // Left button pressed & released\r\n\t\t Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n\t\t if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {\r\n\t\t try {\r\n\t\t desktop.browse(URI.create(\"http://discuss.goko.fr\"));\r\n\t\t } catch (Exception e) {\r\n\t\t LOG.error(e);\r\n\t\t }\r\n\t\t }\r\n\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tComposite composite_4 = new Composite(composite_1, SWT.NONE);\r\n\t\tcomposite_4.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel lblContact = new Label(composite_4, SWT.NONE);\r\n\t\tGridData gd_lblContact = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_lblContact.widthHint = 60;\r\n\t\tlblContact.setLayoutData(gd_lblContact);\r\n\t\tlblContact.setText(\"Contact :\");\r\n\t\t\t \r\n\t\tLink link_2 = new Link(composite_4, 0);\r\n\t\tlink_2.setText(\"<a>\"+toAscii(\"636f6e7461637440676f6b6f2e6672\")+\"</a>\");\r\n\r\n\t}", "protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 226, 75, 25);\n\t\tbtnNewButton.setText(\"Limpiar\");\n\t\t\n\t\tButton btnGuardar = new Button(shell, SWT.NONE);\n\t\tbtnGuardar.setBounds(257, 226, 75, 25);\n\t\tbtnGuardar.setText(\"Guardar\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(25, 181, 130, 21);\n\t\t\n\t\ttext_1 = new Text(shell, SWT.BORDER);\n\t\ttext_1.setBounds(230, 181, 130, 21);\n\t\t\n\t\ttext_2 = new Text(shell, SWT.BORDER);\n\t\ttext_2.setBounds(25, 134, 130, 21);\n\t\t\n\t\ttext_3 = new Text(shell, SWT.BORDER);\n\t\ttext_3.setBounds(25, 86, 130, 21);\n\t\t\n\t\ttext_4 = new Text(shell, SWT.BORDER);\n\t\ttext_4.setBounds(25, 42, 130, 21);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(227, 130, 75, 25);\n\t\tbtnNewButton_1.setText(\"Buscar\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setBounds(25, 21, 55, 15);\n\t\tlabel.setText(\"#\");\n\t\t\n\t\tLabel lblFechaYHora = new Label(shell, SWT.NONE);\n\t\tlblFechaYHora.setBounds(25, 69, 75, 15);\n\t\tlblFechaYHora.setText(\"Fecha y Hora\");\n\t\t\n\t\tLabel lblPlaca = new Label(shell, SWT.NONE);\n\t\tlblPlaca.setBounds(25, 113, 55, 15);\n\t\tlblPlaca.setText(\"Placa\");\n\t\t\n\t\tLabel lblMarca = new Label(shell, SWT.NONE);\n\t\tlblMarca.setBounds(25, 161, 55, 15);\n\t\tlblMarca.setText(\"Marca\");\n\t\t\n\t\tLabel lblColor = new Label(shell, SWT.NONE);\n\t\tlblColor.setBounds(230, 161, 55, 15);\n\t\tlblColor.setText(\"Color\");\n\n\t}", "@Override\n\tpublic void showContents() {\n\t\tprogram.add(Background);\n\t\tprogram.add(lvl1);\n\t\tprogram.add(lvl2);\n\t\tprogram.add(lvl3);\n\t\tprogram.add(Back);\n\n\t}", "private void buildFrame() {\n String title = \"\";\n switch (formType) {\n case \"Add\":\n title = \"Add a new event\";\n break;\n case \"Edit\":\n title = \"Edit an existing event\";\n break;\n default:\n }\n frame.setTitle(title);\n frame.setResizable(false);\n frame.setPreferredSize(new Dimension(300, 350));\n frame.pack();\n frame.setLocationRelativeTo(null);\n frame.setVisible(true);\n\n frame.addWindowListener(new WindowAdapter() {\n @Override\n public void windowClosing(WindowEvent e) {\n // sets the main form to be visible if the event form was exited\n // and not completed.\n mainForm.getFrame().setEnabled(true);\n mainForm.getFrame().setVisible(true);\n }\n });\n }", "protected void createContents() {\n\t\tshell = new Shell(shell,SWT.SHELL_TRIM|SWT.APPLICATION_MODAL);\n\t\tshell.setImage(SWTResourceManager.getImage(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\GupiaoNo4\\\\Project\\\\GupiaoNo4\\\\data\\\\chaogushenqi.png\"));\n\t\tshell.setSize(467, 398);\n\t\tshell.setText(\"\\u5356\\u7A7A\");\n\t\t\n\t\ttext_code = new Text(shell, SWT.BORDER);\n\t\ttext_code.setBounds(225, 88, 73, 23);\n\t\t\n\t\ttext_uprice = new Text(shell, SWT.BORDER | SWT.READ_ONLY);\n\t\ttext_uprice.setBounds(225, 117, 73, 23);\n\t\t\n\t\ttext_downprice = new Text(shell, SWT.BORDER | SWT.READ_ONLY);\n\t\ttext_downprice.setBounds(225, 146, 73, 23);\n\t\t\n\t\ttext_price = new Text(shell, SWT.BORDER);\n\t\ttext_price.setBounds(225, 178, 73, 23);\n\t\t\n\t\ttext_num = new Text(shell, SWT.BORDER);\n\t\ttext_num.setBounds(225, 207, 73, 23);\n\t\t\n\t\t//下单,取消按钮\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tpaceoder();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(116, 284, 58, 27);\n\t\tbtnNewButton.setText(\"\\u4E0B\\u5355\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseDown(MouseEvent e) {\n\t\t\t\tshell.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnNewButton_1.setBounds(225, 284, 58, 27);\n\t\tbtnNewButton_1.setText(\"\\u53D6\\u6D88\");\n\t\t\n\t\tLabel lbl_code = new Label(shell, SWT.NONE);\n\t\tlbl_code.setBounds(116, 91, 60, 17);\n\t\tlbl_code.setText(\"股票代码:\");\n\t\t\n\t\tLabel lbl_upprice = new Label(shell, SWT.NONE);\n\t\tlbl_upprice.setBounds(116, 120, 60, 17);\n\t\tlbl_upprice.setText(\"涨停价格:\");\n\t\t\n\t\tLabel lbl_downprice = new Label(shell, SWT.NONE);\n\t\tlbl_downprice.setBounds(116, 152, 60, 17);\n\t\tlbl_downprice.setText(\"跌停价格:\");\n\t\t\n\t\tLabel lbl_price = new Label(shell, SWT.NONE);\n\t\tlbl_price.setBounds(116, 181, 60, 17);\n\t\tlbl_price.setText(\"委托价格:\");\n\t\t\n\t\tLabel lbl_num = new Label(shell, SWT.NONE);\n\t\tlbl_num.setBounds(116, 210, 60, 17);\n\t\tlbl_num.setText(\"委托数量:\");\n\t\t\n\t\tLabel lbl_date = new Label(shell, SWT.NONE);\n\t\tlbl_date.setBounds(116, 243, 61, 17);\n\t\tlbl_date.setText(\"日 期:\");\n\t\t\n\t\ttext_dateTime = new DateTime(shell, SWT.BORDER);\n\t\ttext_dateTime.setBounds(225, 237, 88, 24);\n\t\t\n\t\tlbl_notice = new Label(shell, SWT.BORDER);\n\t\tlbl_notice.setBounds(316, 333, 125, 17);\n\t\t\n\t\tif (information == null) {\n\n\t\t\tfinal Label lbl_search = new Label(shell, SWT.NONE);\n\t\t\tlbl_search.addMouseListener(new MouseAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseDown(MouseEvent e) {\n\n\t\t\t\t\tlbl_searchEvent();\n\t\t\t\t}\n\t\t\t});\n\t\t\tlbl_search.addMouseTrackListener(new MouseTrackAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseEnter(MouseEvent e) {\n\t\t\t\t\tlbl_search.setBackground(Display.getCurrent()\n\t\t\t\t\t\t\t.getSystemColor(SWT.COLOR_GREEN));\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void mouseExit(MouseEvent e) {\n\t\t\t\t\tlbl_search\n\t\t\t\t\t\t\t.setBackground(Display\n\t\t\t\t\t\t\t\t\t.getCurrent()\n\t\t\t\t\t\t\t\t\t.getSystemColor(\n\t\t\t\t\t\t\t\t\t\t\tSWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));\n\t\t\t\t}\n\t\t\t});\n\t\t\tlbl_search\n\t\t\t\t\t.setImage(SWTResourceManager\n\t\t\t\t\t\t\t.getImage(\"C:\\\\Users\\\\Administrator\\\\Desktop\\\\GupiaoNo4\\\\Project\\\\GupiaoNo4\\\\data\\\\检查.png\"));\n\t\t\tlbl_search.setBounds(354, 91, 18, 18);\n\n\t\t\ttext_place = new Text(shell, SWT.BORDER);\n\t\t\ttext_place.setBounds(304, 88, 32, 23);\n\n\t\t} else {\n\t\t\ttrade_shortsell();// 显示文本框内容\n\t\t}\n\t\t\n\t}", "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\n\t\tshell.setSize(379, 234);\n\t\tshell.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tLabel dialogAccountHeader = new Label(shell, SWT.NONE);\n\t\tdialogAccountHeader.setAlignment(SWT.CENTER);\n\t\tdialogAccountHeader.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tdialogAccountHeader.setLayoutData(BorderLayout.NORTH);\n\t\tif(!this.isNeedAdd)\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0420\\u0435\\u0434\\u0430\\u043A\\u0442\\u0438\\u0440\\u043E\\u0432\\u0430\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdialogAccountHeader.setText(\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u043B\\u0435\\u043D\\u0438\\u0435 \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u0430\");\n\t\t}\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.BOLD));\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\t\n\t\tLabel label = new Label(composite, SWT.NONE);\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel.setBounds(10, 16, 106, 21);\n\t\tlabel.setText(\"\\u0418\\u043C\\u044F \\u0441\\u0435\\u0440\\u0432\\u0435\\u0440\\u0430\");\n\t\t\n\t\ttextServer = new Text(composite, SWT.BORDER);\n\t\ttextServer.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextServer.setBounds(122, 13, 241, 32);\n\t\t\n\t\n\t\tLabel label_1 = new Label(composite, SWT.NONE);\n\t\tlabel_1.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_1.setText(\"\\u041B\\u043E\\u0433\\u0438\\u043D\");\n\t\tlabel_1.setBounds(10, 58, 55, 21);\n\t\t\n\t\ttextLogin = new Text(composite, SWT.BORDER);\n\t\ttextLogin.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextLogin.setBounds(122, 55, 241, 32);\n\t\ttextLogin.setFocus();\n\t\t\n\t\tLabel label_2 = new Label(composite, SWT.NONE);\n\t\tlabel_2.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tlabel_2.setText(\"\\u041F\\u0430\\u0440\\u043E\\u043B\\u044C\");\n\t\tlabel_2.setBounds(10, 106, 55, 21);\n\t\t\n\t\ttextPass = new Text(composite, SWT.PASSWORD | SWT.BORDER);\n\t\ttextPass.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.NORMAL));\n\t\ttextPass.setBounds(122, 103, 241, 32);\n\t\t\n\t\tif(isNeedAdd){\n\t\t\ttextServer.setText(\"imap.mail.ru\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttextServer.setText(this.account.getServer());\n\t\t\ttextLogin.setText(account.getLogin());\n\t\t\ttextPass.setText(account.getPass());\n\t\t}\n\t\t\n\t\tComposite composite_1 = new Composite(shell, SWT.NONE);\n\t\tcomposite_1.setLayoutData(BorderLayout.SOUTH);\n\t\t\n\t\tButton btnSaveAccount = new Button(composite_1, SWT.NONE);\n\t\tbtnSaveAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tString login = textLogin.getText();\n\t\t\t\tif(textServer.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле имя сервера не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textLogin.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if (!login.matches(\"^([_A-Za-z0-9-]+)@([A-Za-z0-9]+)\\\\.([A-Za-z]{2,})$\"))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле логин введен некорректно!\");\n\t\t\t\t\treturn;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(Setting.Instance().AnyAccounts(textLogin.getText(), isNeedAdd))\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"такой логин уже существует!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(textPass.getText()==\"\")\n\t\t\t\t{\n\t\t\t\t\tMessageDialog.openError(shell, \"Ошибка\", \"Поле пароль не введен!\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(isNeedAdd)\n\t\t\t\t{\n\t\t\t\t\tservice.AddAccount(textServer.getText(), textLogin.getText(), textPass.getText());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\taccount.setLogin(textLogin.getText());\n\t\t\t\t\taccount.setPass(textPass.getText());\n\t\t\t\t\taccount.setServer(textServer.getText());\t\n\t\t\t\t\tservice.EditAccount(account);\n\t\t\t\t}\n\t\t\t\tservice.RepaintAccount(table);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnSaveAccount.setLocation(154, 0);\n\t\tbtnSaveAccount.setSize(96, 32);\n\t\tbtnSaveAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\tbtnSaveAccount.setText(\"\\u0421\\u043E\\u0445\\u0440\\u0430\\u043D\\u0438\\u0442\\u044C\");\n\t\t\n\t\tButton btnCancel = new Button(composite_1, SWT.NONE);\n\t\tbtnCancel.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\tbtnCancel.setLocation(267, 0);\n\t\tbtnCancel.setSize(96, 32);\n\t\tbtnCancel.setText(\"\\u041E\\u0442\\u043C\\u0435\\u043D\\u0430\");\n\t\tbtnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\n\t}", "private JPanel buildContentPane(){\t\n\t\tinitialiseElements();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new FlowLayout());\n\t\tpanel.setBackground(Color.lightGray);\n\t\tpanel.add(scroll);\n\t\tpanel.add(bouton);\n\t\tpanel.add(bouton2);\n\t\treturn panel;\n\t}", "public void showFavorites() {\n System.out.println(\"Mina favoriter: \" + myFavorites.size());\n for (int i = 0; i < myFavorites.size(); i++) {\n System.out.println(\"\\n\" + (i + 1) + \". \" + myFavorites.get(i).getTitle() +\n \"\\nRegissör: \" + myFavorites.get(i).getDirector() + \" | \" +\n \"Genre: \" + myFavorites.get(i).getGenre() + \" | \" +\n \"År: \" + myFavorites.get(i).getYear() + \" | \" +\n \"Längd: \" + myFavorites.get(i).getDuration() + \" min | \" +\n \"Betyg: \" + myFavorites.get(i).getRating());\n }\n }", "private static void createAndShowGUI() {\n\n frame = new JFrame(messages.getString(\"towers.of.hanoi\"));\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n addComponentsToPane(frame.getContentPane());\n frame.pack();\n frame.setSize(800, 600);\n frame.setVisible(true);\n }", "@AutoGenerated\r\n\tprivate Panel buildPnlFondos() {\n\t\tpnlFondos = new Panel();\r\n\t\tpnlFondos.setImmediate(false);\r\n\t\tpnlFondos.setWidth(\"-1px\");\r\n\t\tpnlFondos.setHeight(\"-1px\");\r\n\t\t\r\n\t\t// layoutFondo\r\n\t\tlayoutFondo = buildLayoutFondo();\r\n\t\tpnlFondos.setContent(layoutFondo);\r\n\t\t\r\n\t\treturn pnlFondos;\r\n\t}", "private Component buildMainPanel() {\r\n \tDPanel mainPanel = new DPanel();\r\n \tJLabel backGroundLabel = new JLabel(ImageUtil.getImageIcon(\"happycow.jpg\"));\r\n \tmainPanel.add(backGroundLabel);\r\n \tsetCurrentContentPane(mainPanel);\r\n \thome = mainPanel;\r\n return home;\r\n }", "@Override\r\n\tprotected void create(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.tczv3_shopgoodslist);\r\n\t\tView more_view = LayoutInflater.from(this).inflate(R.layout.head_more,\r\n\t\t\t\tnull);\r\n\t\tpw_more = new PopupWindow(more_view, LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tLayoutParams.WRAP_CONTENT);\r\n\t\tpw_more.setBackgroundDrawable(new BitmapDrawable());\r\n\t\tpw_more.setOutsideTouchable(true);\r\n\t\theadlayout = (TczV3_HeadLayout) findViewById(R.tczv3.header);\r\n\t\theadlayout.setLeftClick(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tTczV3ShopGoodsListAct.this.finish();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbusinessname = getIntent().getStringExtra(\"title\");\r\n\t\tbusinessid = getIntent().getStringExtra(\"businessid\");\r\n\t\theadlayout.setTitle(businessname);\r\n\t\theadlayout.setRightButton1Background(R.drawable.tczv3_icon_more);\r\n\t\theadlayout.setRightButton1Click(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tif (pw_more.isShowing()) {\r\n\t\t\t\t\tpw_more.dismiss();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpw_more.showAsDropDown(headlayout.getButton1());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tmore_view.findViewById(R.id.li_share).setVisibility(View.GONE);\r\n\t\tbtn_home_page = (Button) more_view.findViewById(R.id.btn_home_page);\r\n\t\tbtn_mine = (Button) more_view.findViewById(R.id.btn_mine);\r\n\t\tbtn_category = (Button) findViewById(R.tczv3.bt_category);\r\n\t\tbtn_home_page.setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\tFrame.HANDLES.closeWidthOut(\"FrameAg\");\r\n\t\t\t\tFrame.HANDLES.sentAll(\"FrameAg\", 1, R.frame.homeindex);\r\n\t\t\t\tpw_more.dismiss();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_mine.setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\tFrame.HANDLES\r\n\t\t\t\t\t\t.closeWidthOut(\"FrameAg,MyAct,ShoppingCartAct,Search_Act,V3_ThreeMenuAct,HomePageAct\");\r\n\t\t\t\tif (F.USER_ID.equals(\"\")) {\r\n\t\t\t\t\tIntent intent = new Intent(TczV3ShopGoodsListAct.this,\r\n\t\t\t\t\t\t\tTczV3_LoginAct.class);\r\n\t\t\t\t\tstartActivity(intent);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tFrame.HANDLES.sentAll(\"FrameAg\", 1, R.frame.more);\r\n\t\t\t\t}\r\n\t\t\t\tpw_more.dismiss();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\theadlayout.setRightButton2Background(R.drawable.tczv3_icon_search);\r\n\t\theadlayout.setRightButton2Click(new OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tIntent i = new Intent();\r\n\t\t\t\ti.putExtra(\"businessname\", businessname);\r\n\t\t\t\ti.putExtra(\"businessid\", businessid);\r\n\t\t\t\ti.putExtra(\"actfrom\", \"TczV3ShopGoodsListAct\");\r\n\t\t\t\ti.setClass(TczV3ShopGoodsListAct.this,\r\n\t\t\t\t\t\tTczV3_Com_SearchAct.class);\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t}\r\n\t\t});\r\n\t\timg = (MImageView) findViewById(R.tczv3.img);\r\n\t\tmDragChangeView = (DragChangeView) findViewById(R.tczv3.DragChangeView);\r\n\t\tmDragChangeView.setAutoMove(true);\r\n\t\tmDragChangeView.setNoCurrIcon(R.drawable.index_cur_nor);\r\n\t\tmDragChangeView.setCurrIcon(R.drawable.index_cur_ped);\r\n\t\tmDragChangeView.setMoveIcon(R.drawable.index_cur_ped);\r\n\t\tmDragChangeView.setHideRadio(false);\r\n\t\tmDragChangeView.setAutoMove(false);\r\n\t\tmDragChangeView.setRadius(7);\r\n\r\n\t\tgridView = (MyGridView) findViewById(R.tczv3.gridview);\r\n\t\tgoodscount = (TextView) findViewById(R.tczv3.goodscount);\r\n\t\tshoppoint = (TextView) findViewById(R.tczv3.pj_point);\r\n\t\tcollection = (TextView) findViewById(R.tczv3.t_collection);\r\n\t\tico_collection = (ImageView) findViewById(R.tczv3.icon_collection);\r\n\t\tt_allgoods = (TextView) findViewById(R.tczv3.t_allgoods);\r\n\t\timg_layout = (LinearLayout) findViewById(R.tczv3.img_layout);\r\n\t\tbusinesspic = (MImageView) findViewById(R.tczv3.businesspic);\r\n\t\tcategory_title = (TextView) findViewById(R.tczv3.category_title);\r\n\t\tt_allgoods.setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\tIntent i = new Intent();\r\n\t\t\t\ti.putExtra(\"businessid\", businessid);// 1278\r\n\t\t\t\ti.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t\ti.putExtra(\"actfrom\", \"TczV3ShopGoodsListAct\");\r\n\t\t\t\ti.setClass(getApplicationContext(), TczV3_GoodsListAct.class);\r\n\t\t\t\tgetApplicationContext().startActivity(i);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtn_category.setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View arg0) {\r\n\t\t\t\tIntent i = new Intent();\r\n\t\t\t\ti.putExtra(\"businessid\", businessid);// 1278\r\n\t\t\t\ti.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t\ti.putExtra(\"actfrom\", \"TczV3ShopGoodsListAct\");\r\n\t\t\t\ti.setClass(getApplicationContext(), TczV3_GoodsListAct.class);\r\n\t\t\t\tgetApplicationContext().startActivity(i);\r\n\t\t\t}\r\n\t\t});\r\n\t\tdataLoad(new int[] { 0 });\r\n\r\n\t}", "@Listen(\"onClick=#createEntryButton\")\n public void createEntryButtonOnClick(){\n Window window = (Window) Executions.createComponents(\"entry.zul\", phonePageWindow, new HashMap());\n window.doModal();\n }", "protected void createContents() {\r\n\t\tsetText(Messages.getString(\"HMS.PatientManagementShell.title\"));\r\n\t\tsetSize(900, 700);\r\n\r\n\t}", "private static void createAndShowGUI() {\n //\n // Use the normal window decorations as defined by the look-and-feel\n // schema\n //\n JFrame.setDefaultLookAndFeelDecorated(true);\n //\n // Create the main application window\n //\n mainWindow = new MainWindow();\n //\n // Show the application window\n //\n mainWindow.pack();\n mainWindow.setVisible(true);\n }", "public void createContents()\n\t{\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"TTS - Task Tracker System\");\n\t\t\n\t\tbtnLogIn = new Button(shell, SWT.NONE);\n\t\tbtnLogIn.setBounds(349, 84, 75, 25);\n\t\tbtnLogIn.setText(\"Log In\");\n\t\tbtnLogIn.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tif (cboxUserDropDown.getText() != \"\"\n\t\t\t\t\t\t&& cboxUserDropDown.getSelectionIndex() >= 0)\n\t\t\t\t{\n\t\t\t\t\tString selectedUserName = cboxUserDropDown.getText();\n\t\t\t\t\tusers.setLoggedInUser(selectedUserName);\n\t\t\t\t\tshell.setVisible(false);\n\t\t\t\t\tdisplay.sleep();\n\t\t\t\t\tnew TaskMainViewWindow(AccessUsers.getLoggedInUser());\n\t\t\t\t\tdisplay.wake();\n\t\t\t\t\tshell.setVisible(true);\n\t\t\t\t\tshell.forceFocus();\n\t\t\t\t\tshell.setActive();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnQuit = new Button(shell, SWT.CENTER);\n\t\tbtnQuit.setBounds(349, 227, 75, 25);\n\t\tbtnQuit.setText(\"Quit\");\n\t\tbtnQuit.addSelectionListener(new SelectionAdapter()\n\t\t{\n\t\t\tpublic void widgetSelected(SelectionEvent arg0)\n\t\t\t{\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t});\n\t\t\n\t\tcboxUserDropDown = new Combo(shell, SWT.READ_ONLY);\n\t\tcboxUserDropDown.setBounds(146, 86, 195, 23);\n\t\t\n\t\tinitUserDropDown();\n\t\t\n\t\tlblNewLabel = new Label(shell, SWT.CENTER);\n\t\tlblNewLabel.setBounds(197, 21, 183, 25);\n\t\tlblNewLabel.setFont(new Font(display, \"Times\", 14, SWT.BOLD));\n\t\tlblNewLabel.setForeground(new Color(display, 200, 0, 0));\n\t\tlblNewLabel.setText(\"Task Tracker System\");\n\t\t\n\t\ticon = new Label(shell, SWT.BORDER);\n\t\ticon.setLocation(0, 0);\n\t\ticon.setSize(140, 111);\n\t\ticon.setImage(new Image(null, \"images/task.png\"));\n\t\t\n\t\tbtnCreateUser = new Button(shell, SWT.NONE);\n\t\tbtnCreateUser.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\n\t\t\t\tshell.setEnabled(false);\n\t\t\t\tnew CreateUserWindow(users);\n\t\t\t\tshell.setEnabled(true);\n\t\t\t\tinitUserDropDown();\n\t\t\t\tshell.forceFocus();\n\t\t\t\tshell.setActive();\n\t\t\t}\n\t\t});\n\t\tbtnCreateUser.setBounds(349, 115, 75, 25);\n\t\tbtnCreateUser.setText(\"Create User\");\n\t\t\n\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 395);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\t\r\n\t\tnachname = new Text(shell, SWT.BORDER);\r\n\t\tnachname.setBounds(32, 27, 76, 21);\r\n\t\t\r\n\t\tvorname = new Text(shell, SWT.BORDER);\r\n\t\tvorname.setBounds(32, 66, 76, 21);\r\n\t\t\r\n\t\tLabel lblNachname = new Label(shell, SWT.NONE);\r\n\t\tlblNachname.setBounds(135, 33, 55, 15);\r\n\t\tlblNachname.setText(\"Nachname\");\r\n\t\t\r\n\t\tLabel lblVorname = new Label(shell, SWT.NONE);\r\n\t\tlblVorname.setBounds(135, 66, 55, 15);\r\n\t\tlblVorname.setText(\"Vorname\");\r\n\t\t\r\n\t\tButton btnFgeListeHinzu = new Button(shell, SWT.NONE);\r\n\t\tbtnFgeListeHinzu.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\t//\r\n\t\t\t\tPerson p = new Person();\r\n\t\t\t\tp.setNachname(getNachname().getText());\r\n\t\t\t\tp.setVorname(getVorname().getText());\r\n\t\t\t\t//\r\n\t\t\t\tPerson.getPersonenListe().add(p);\r\n\t\t\t\tgetGuiListe().add(p.toString());\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnFgeListeHinzu.setBounds(43, 127, 147, 25);\r\n\t\tbtnFgeListeHinzu.setText(\"f\\u00FCge liste hinzu\");\r\n\t\t\r\n\t\tButton btnWriteJson = new Button(shell, SWT.NONE);\r\n\t\tbtnWriteJson.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tPerson.write2JSON();\r\n\t\t\t\t\t//\r\n\t\t\t\t\tMessageBox mb = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);\r\n\t\t\t\t\tmb.setText(\"JSON geschrieben\");\r\n\t\t\t\t\tmb.setMessage(Person.getPersonenListe().size() + \" Einträge erfolgreich geschrieben\");\r\n\t\t\t\t\tmb.open();\r\n\t\t\t\t} catch (IOException e1) {\r\n\t\t\t\t\tMessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);\r\n\t\t\t\t\tmb.setText(\"Fehler bei JSON\");\r\n\t\t\t\t\tmb.setMessage(e1.getMessage());\r\n\t\t\t\t\tmb.open();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnWriteJson.setBounds(54, 171, 75, 25);\r\n\t\tbtnWriteJson.setText(\"write 2 json\");\r\n\t\t\r\n\t\tguiListe = new List(shell, SWT.BORDER);\r\n\t\tguiListe.setBounds(43, 221, 261, 125);\r\n\r\n\t}", "private void createAndShowGUI() {\n setSize(300, 200);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n addContent(getContentPane());\n\n //pack();\n setVisible(true);\n }", "public void build(){\n\t\t\r\n\t\t\tsetTitle(\"Temperature\");\r\n\t\t\tsetSize(220,150);\r\n\t\t\tsetLocationRelativeTo(null);\r\n\t\t\tsetResizable(false);\r\n\t\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\tsetVisible(true);\r\n\t\r\n\t\t\t\r\n\t\t\tsetContentPane(buildContentPane());\r\n\t\t}", "public mainFrame() {\n initComponents();\n \n pnlWelcome.removeAll();\n homePanel = new PnlHome();\n pnlWelcome.add(homePanel);\n homePanel.setSize(530, 200);\n homePanel.setVisible(true);\n pnlWelcome.revalidate();\n pnlWelcome.repaint();\n\n pnlNew.removeAll();\n pnlGeneral = new PnlGeneral(this);\n pnlNew.add(pnlGeneral);\n pnlGeneral.setSize(500, 500);\n pnlGeneral.setVisible(true);\n pnlNew.revalidate();\n pnlNew.repaint();\n \n f = new ArrayList<>();\n\n }", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) \r\n\t\t\t{\n\t\t\t\tif(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Cibernauta\"))\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\tsubWindow.setContent(new Contratar_cibernauta(canalL.getValue()));\r\n\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t\r\n\t\t\t\t}else if(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Vista_Cliente\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontratacion = comprobarContratacion();\r\n\t\t\t\t\t\r\n\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\tsubWindow.setContent(new Contratar_vista_usuario(canalL.getValue(), contratacion, idModalidad));\r\n\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t\r\n\t\t\t\t}else if(((NavigatorUI) UI.getCurrent()).getMainView().equals(\"Cliente\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tcontratacion = comprobarContratacion();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(contratacion || idModalidad.isEmpty())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsubWindow.setModal(true);\r\n\t\t\t\t\t\tsubWindow.setResizable(false);\r\n\t\t\t\t\t\tsubWindow.setContent(new Contratar_cliente(canalL.getValue()));\r\n\t\t\t\t\t\tUI.getCurrent().addWindow(subWindow);\r\n\t\t\t\t\t}else\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdoNavigate(Crear_incidencia.VIEW_NAME + \"/\" + \"contratacion\" +\";\" +canalL.getValue());\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tfinal TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\r\n\t\ttabFolder.setToolTipText(\"\");\r\n\t\t\r\n\t\tTabItem tabItem = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem.setText(\"欢迎使用\");\r\n\t\t\r\n\t\tTabItem tabItem_1 = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem_1.setText(\"员工查询\");\r\n\t\t\r\n\t\tMenu menu = new Menu(shell, SWT.BAR);\r\n\t\tshell.setMenuBar(menu);\r\n\t\t\r\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.NONE);\r\n\t\tmenuItem.setText(\"系统管理\");\r\n\t\t\r\n\t\tMenuItem menuItem_1 = new MenuItem(menu, SWT.CASCADE);\r\n\t\tmenuItem_1.setText(\"员工管理\");\r\n\t\t\r\n\t\tMenu menu_1 = new Menu(menuItem_1);\r\n\t\tmenuItem_1.setMenu(menu_1);\r\n\t\t\r\n\t\tMenuItem menuItem_2 = new MenuItem(menu_1, SWT.NONE);\r\n\t\tmenuItem_2.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tTabItem tbtmNewItem = new TabItem(tabFolder,SWT.NONE);\r\n\t\t\t\ttbtmNewItem.setText(\"员工查询\");\r\n\t\t\t\t//创建自定义组件\r\n\t\t\t\tEmpQueryCmp eqc = new EmpQueryCmp(tabFolder, SWT.NONE);\r\n\t\t\t\t//设置标签显示的自定义组件\r\n\t\t\t\ttbtmNewItem.setControl(eqc);\r\n\t\t\t\t\r\n\t\t\t\t//选中当前标签页\r\n\t\t\t\ttabFolder.setSelection(tbtmNewItem);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tmenuItem_2.setText(\"员工查询\");\r\n\r\n\t}", "public void showPopup(int selectedObjectID) {\n PopupMenu popup = new PopupMenu(mContext, mFavButton);\n //Inflating the Popup using xml file\n // popup.getMenuInflater()\n // .inflate(R.menu.favourites, popup.getMenu());\n\n final int selectedObjectID_ = selectedObjectID;\n\n folderIds.clear();\n\n Cursor countCursor = DictHelper.getVocabulary().getAllFoldersCount();\n\n if (countCursor.getCount() == 0) {\n Toast.makeText(mContext, mContext.getString(R.string.no_folders), Toast.LENGTH_SHORT).show();\n }\n\n if (countCursor.getCount() > 0) {\n\n boolean simpleMode = countCursor.getInt(0) == 1;\n\n Cursor cursor = DictHelper.getVocabulary().getAllFolders(selectedObjectID, mType);\n\n if (cursor != null && cursor.getCount() > 0) {\n\n int idIndex = cursor.getColumnIndex(\"ID_VocabList\");\n int idVocabIndex = cursor.getColumnIndex(\"IDVocabList\");\n int nameIndex = cursor.getColumnIndex(\"Name\");\n int parentNameIndex = cursor.getColumnIndex(\"ParentName\");\n int stateIndex = cursor.getColumnIndex(\"CurrentState\");\n\n do {\n\n Integer state = cursor.getInt(stateIndex);\n boolean checked = state > 0;\n Integer index = cursor.getInt(idIndex);\n\n if (simpleMode) {\n\n addRemoveEntry(!checked, index, selectedObjectID);\n } else {\n String parentName = cursor.getString(parentNameIndex);\n MenuItem item = null;\n\n //if (parentName == null || parentName.isEmpty()) {\n item = popup.getMenu().add(cursor.getString(nameIndex));\n //} else {\n // item = popup.getMenu().add(parentName + \" / \" + cursor.getString(nameIndex));\n //}\n\n item.setCheckable(true);\n item.setChecked(checked);\n\n setMenuItemTag(item, index);\n }\n } while (cursor.moveToNext());\n\n }\n\n if (cursor != null) {\n cursor.close();\n }\n\n if (!simpleMode) {\n popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener()\n\n {\n public boolean onMenuItemClick(MenuItem item) {\n\n int id = getMenuItemTag(item);\n\n if (id > 0) {\n addRemoveEntry(!item.isChecked(), id, selectedObjectID_);\n }\n\n return true;\n }\n }\n\n );\n\n popup.show(); //showing popup menu\n }\n }\n\n if (countCursor != null) {\n countCursor.close();\n }\n }", "public static void buildFrame() {\r\n\t\t// Make sure we have nice window decorations\r\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\t// Create and set up the window.\r\n\t\t//ParentFrame frame = new ParentFrame();\r\n\t\tMediator frame = new Mediator();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\t// Display the window\r\n\t\tframe.setVisible(true);\r\n\t}", "public void packUp() {\n news.themeColour = (String) colourChooser.getSelectedItem(); //gets the currently selected colour\n news.write(); //writes high scores and selected colour to file\n }", "private void createBottomPanel() {\n humanPaquetView = new ViewDeckVisible(false);\n this.getContentPane().add(humanPaquetView);\n }", "public void build() {\n window.initModality(Modality.APPLICATION_MODAL);\n window.setTitle(\"Agregar usuarios\");\n window.setMinWidth(900);\n\n GridPane grid = new GridPane();\n grid.setAlignment(Pos.CENTER);\n grid.setHgap(10);\n grid.setVgap(10);\n grid.setPadding(new Insets(25, 25, 25, 25));\n\n Text scenetitle = new Text(\"Ingresar o editar un usuario, por favor\");\n scenetitle.setFont(Font.font(\"Tahoma\", FontWeight.NORMAL, 20));\n grid.add(scenetitle, 0, 0, 2, 1);\n\n Label userName = new Label(\"Usuario:\");\n grid.add(userName, 0, 1);\n\n userNameField = new TextField();\n grid.add(userNameField, 1, 1);\n\n editPass = new CheckBox(\"¿Editar contraseña?\");\n grid.add(editPass, 2, 2);\n\n Hyperlink help = new Hyperlink(\"¿Ayuda puntual?\");\n help.setOnAction(e-> WindowsCommand.goPDF(7));\n grid.add(help, 4, 0);\n\n Label newPass = new Label(\"Nueva contraseña\");\n textField2 = new TextField();\n textField2.setManaged(false);\n textField2.setVisible(false);\n newPwBox = new PasswordField();\n\n addUser = new CheckBox(\"Agregar usuarios\");\n extract = new CheckBox(\"Sacar insumos (Celular)\");\n editProd = new CheckBox(\"Editar insumos\");\n stockVar = new CheckBox(\"Editar variables de stock\");\n pcIn = new CheckBox(\"Entrar programa PC\");\n\n HBox hBox = new HBox(10);\n hBox.getChildren().addAll(pcIn, extract, editProd, stockVar, addUser);\n grid.add(hBox, 0, 4, 5, 1);\n\n propertyAddUsersField = new PropertyAddUsersField(userNameField, userProperties, addUser, extract, editProd,\n stockVar, pcIn);\n userNameField.focusedProperty().addListener(propertyAddUsersField);\n\n\n Label pw = new Label(\"Contraseña:\");\n grid.add(pw, 0, 2);\n\n // para desenmascarar el password\n textField = new TextField();\n textField.setManaged(false);\n textField.setVisible(false);\n grid.add(textField, 1, 2);\n\n // password enmascarado\n pwBox = new PasswordField();\n grid.add(pwBox, 1, 2);\n\n CheckBox checkBox = new CheckBox(\"Mostrar contraseña\");\n grid.add(checkBox, 1, 3);\n\n //base password\n textField.managedProperty().bind(checkBox.selectedProperty());\n textField.visibleProperty().bind(checkBox.selectedProperty());\n\n pwBox.managedProperty().bind(checkBox.selectedProperty().not());\n pwBox.visibleProperty().bind(checkBox.selectedProperty().not());\n\n textField.textProperty().bindBidirectional(pwBox.textProperty());\n\n // confirmar password\n textField2.managedProperty().bind(checkBox.selectedProperty());\n textField2.visibleProperty().bind(checkBox.selectedProperty());\n\n newPwBox.managedProperty().bind(checkBox.selectedProperty().not());\n newPwBox.visibleProperty().bind(checkBox.selectedProperty().not());\n\n textField2.textProperty().bindBidirectional(newPwBox.textProperty());\n\n // para alertas o texto informativo\n Text actiontarget = new Text();\n grid.add(actiontarget, 1, 8);\n\n Button btnAdd = new Button(\"Configurar\");\n btnAdd.setOnAction(e ->\n handle(actiontarget));\n Button btnClose = new Button(\"Cerrar\");\n btnClose.setOnAction(e -> window.close());\n grid.add(btnClose, 0, 5);\n\n HBox hbBtn = new HBox(10);\n hbBtn.setAlignment(Pos.BOTTOM_RIGHT);\n hbBtn.getChildren().add(btnAdd);\n grid.add(hbBtn, 1, 5);\n\n editPass.setOnAction(e-> {\n if (editPass.isSelected()) {\n grid.getChildren().remove(checkBox);\n grid.getChildren().remove(actiontarget);\n grid.getChildren().remove(hBox);\n grid.getChildren().remove(hbBtn);\n grid.getChildren().remove(btnClose);\n grid.add(newPass, 0, 3); grid.add(textField2, 1, 3); grid.add(newPwBox, 1, 3);\n grid.add(checkBox, 0, 4);\n grid.add(hBox, 0, 5);\n grid.add(btnClose, 0, 6); grid.add(hbBtn, 1, 6);\n grid.add(actiontarget, 1, 9);\n } else {\n grid.getChildren().remove(newPass);\n grid.getChildren().remove(textField2);\n grid.getChildren().remove(newPwBox);\n grid.getChildren().remove(checkBox);\n grid.getChildren().remove(actiontarget);\n grid.getChildren().remove(hBox);\n grid.getChildren().remove(hbBtn);\n grid.getChildren().remove(btnClose);\n grid.add(checkBox, 0, 3);\n grid.add(hBox, 0, 4);\n grid.add(btnClose, 0, 5); grid.add(hbBtn, 1, 5);\n grid.add(actiontarget, 1, 8);\n }\n });\n\n Scene loginScene = new Scene(grid, 300, 275);\n window.setScene(loginScene);\n\n window.show();\n }", "private void handleWindowShowing(WindowEvent event){\n WebEngine webEngine = webView.getEngine();\n //Load help page.\n webEngine.load(getClass()\n .getResource(\"/javafxapplicationud3example/ui/view/help.html\").toExternalForm());\n }", "private static void createAndShowGUI() {\n if (!SystemTray.isSupported()) {\r\n return;\r\n }\r\n final PopupMenu popup = new PopupMenu();\r\n final TrayIcon trayIcon =\r\n new TrayIcon(createImage(\"/config/mut3.png\", \"JFileImporter\"));\r\n final SystemTray tray = SystemTray.getSystemTray();\r\n Font itemFont = new Font(\"Ariel\",Font.BOLD,12);\r\n // Create a popup menu components\r\n MenuItem aboutItem = new MenuItem(\"About\");\r\n MenuItem maxItem = new MenuItem(\"Maximize\");\r\n MenuItem minItem = new MenuItem(\"Minimize\");\r\n MenuItem showSchedulerItem = new MenuItem(\"Show Scheduler\");\r\n MenuItem showImporterItem = new MenuItem(\"Show Importer\");\r\n MenuItem exitItem = new MenuItem(\"Exit\");\r\n\r\n aboutItem.setFont(itemFont);\r\n maxItem.setFont(itemFont);\r\n minItem.setFont(itemFont);\r\n showSchedulerItem.setFont(itemFont);\r\n showImporterItem.setFont(itemFont);\r\n exitItem.setFont(itemFont);\r\n //Add components to popup menu\r\n popup.add(aboutItem);\r\n popup.addSeparator();\r\n popup.add(maxItem);\r\n popup.add(minItem);\r\n popup.addSeparator();\r\n popup.add(showSchedulerItem);\r\n popup.add(showImporterItem); \r\n popup.addSeparator();\r\n popup.add(exitItem);\r\n \r\n trayIcon.setPopupMenu(popup);\r\n \r\n try {\r\n tray.add(trayIcon);\r\n } catch (AWTException e) {\r\n \tJOptionPane.showMessageDialog(null, \"Tray Icon could not be added \"+e, \"Error creating Tray Icon\", JOptionPane.ERROR_MESSAGE);\r\n return;\r\n }\r\n trayIcon.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \tJImporterMain.maximize();\r\n }\r\n });\r\n \r\n maxItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \tJImporterMain.maximize();\r\n }\r\n });\r\n minItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \ttrayIcon.displayMessage(\"JFileImporter\", \"Importer Still Running! Right Click for more options\", TrayIcon.MessageType.INFO);\r\n \tJImporterMain.minimize();\r\n \t\r\n }\r\n });\r\n \r\n aboutItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \ttrayIcon.displayMessage(\"About\", \"JFileImporter\\nVersion\\t1.00\\nDeveloped By:\\tAnil Sehgal\", TrayIcon.MessageType.INFO);\r\n }\r\n });\r\n \r\n showImporterItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \tJImporterMain.showImporter();\r\n }\r\n });\r\n showSchedulerItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \tString schedulerShown = LoadProfileUI.showScheduler();\r\n \tif(schedulerShown.equals(\"npe\")){\r\n \t\ttrayIcon.displayMessage(\"Scheduler\", \"Please initialize the Scheduler from Menu\", TrayIcon.MessageType.WARNING);\r\n \t}else if(schedulerShown.equals(\"ge\")){\r\n \t\ttrayIcon.displayMessage(\"Scheduler\", \"Error Launching Scheduler, Please contact technical support\", TrayIcon.MessageType.ERROR);\r\n \t}\r\n }\r\n });\r\n trayIcon.setImageAutoSize(true);\r\n trayIcon.setToolTip(\"JFileImporter\"); \r\n exitItem.addActionListener(new ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n \tint option = JOptionPane.showConfirmDialog(null, \"If You Quit the Application, the scheduled job will terminate!\", \"Exit Confirmation\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);\r\n \tif(option == JOptionPane.OK_OPTION){\r\n\t tray.remove(trayIcon);\r\n\t System.exit(0);\r\n \t}\r\n }\r\n });\r\n }", "protected void createContents() {\n\t\tshell = new Shell(SWT.TITLE | SWT.CLOSE | SWT.BORDER);\n\t\tshell.setSize(713, 226);\n\t\tshell.setText(\"ALT Planner\");\n\t\t\n\t\tCalendarPop calendarComp = new CalendarPop(shell, SWT.NONE);\n\t\tcalendarComp.setBounds(5, 5, 139, 148);\n\t\t\n\t\tComposite composite = new PlannerInterface(shell, SWT.NONE, calendarComp);\n\t\tcomposite.setBounds(0, 0, 713, 200);\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmFile.setText(\"File\");\n\t\t\n\t\tMenu menu_1 = new Menu(mntmFile);\n\t\tmntmFile.setMenu(menu_1);\n\t\t\n\t\tMenuItem mntmSettings = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmSettings.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSettings settings = new Settings(Display.getDefault());\n\t\t\t\tsettings.open();\n\t\t\t}\n\t\t});\n\t\tmntmSettings.setText(\"Settings\");\n\t}", "protected void createContents() {\n\t\t\n\t\tshlMailview = new Shell();\n\t\tshlMailview.addShellListener(new ShellAdapter() {\n\t\t\t@Override\n\t\t\tpublic void shellClosed(ShellEvent e) {\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\tshlMailview.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\tshlMailview.setSize(1124, 800);\n\t\tshlMailview.setText(\"MailView\");\n\t\tshlMailview.setLayout(new BorderLayout(0, 0));\t\t\n\t\t\n\t\tMenu menu = new Menu(shlMailview, SWT.BAR);\n\t\tshlMailview.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"\\u0413\\u043B\\u0430\\u0432\\u043D\\u0430\\u044F\");\n\t\t\n\t\tMenu mainMenu = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(mainMenu);\n\t\t\n\t\tMenuItem menuItem = new MenuItem(mainMenu, SWT.NONE);\n\t\tmenuItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmyThready.stop();// interrupt();\n\t\t\t\tmyThready = new Thread(timer);\n\t\t\t\tmyThready.setDaemon(true);\n\t\t\t\tmyThready.start();\n\t\t\t}\n\t\t});\n\t\tmenuItem.setText(\"\\u041E\\u0431\\u043D\\u043E\\u0432\\u0438\\u0442\\u044C\");\n\t\t\n\t\tMenuItem exitMenu = new MenuItem(mainMenu, SWT.NONE);\n\t\texitMenu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\t\t\t\t\n\t\t\t\tshlMailview.close();\n\t\t\t}\n\t\t});\n\t\texitMenu.setText(\"\\u0412\\u044B\\u0445\\u043E\\u0434\");\n\t\t\n\t\tMenuItem filtrMenu = new MenuItem(menu, SWT.NONE);\n\t\tfiltrMenu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tfilterDialog fd = new filterDialog(shlMailview, 0);\n\t\t\t\tfd.open();\n\t\t\t}\n\t\t});\n\t\tfiltrMenu.setText(\"\\u0424\\u0438\\u043B\\u044C\\u0442\\u0440\");\n\t\t\n\t\tMenuItem settingsMenu = new MenuItem(menu, SWT.NONE);\n\t\tsettingsMenu.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tsettingDialog sd = new settingDialog(shlMailview, 0);\n\t\t\t\tsd.open();\n\t\t\t}\n\t\t});\n\t\tsettingsMenu.setText(\"\\u041D\\u0430\\u0441\\u0442\\u0440\\u043E\\u0439\\u043A\\u0438\");\n\t\t\n\t\tfinal TabFolder tabFolder = new TabFolder(shlMailview, SWT.NONE);\n\t\ttabFolder.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(tabFolder.getSelectionIndex() == 1)\n\t\t\t\t{\n\t\t\t\t\tservice.RepaintAccount(accountsTable);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttabFolder.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\t\n\t\tTabItem lettersTab = new TabItem(tabFolder, SWT.NONE);\n\t\tlettersTab.setText(\"\\u041F\\u0438\\u0441\\u044C\\u043C\\u0430\");\n\t\t\n\t\tComposite composite_2 = new Composite(tabFolder, SWT.NONE);\n\t\tlettersTab.setControl(composite_2);\n\t\tcomposite_2.setLayout(new FormLayout());\n\t\t\n\t\tComposite composite_4 = new Composite(composite_2, SWT.NONE);\n\t\tFormData fd_composite_4 = new FormData();\n\t\tfd_composite_4.bottom = new FormAttachment(0, 81);\n\t\tfd_composite_4.top = new FormAttachment(0);\n\t\tfd_composite_4.left = new FormAttachment(0);\n\t\tfd_composite_4.right = new FormAttachment(0, 1100);\n\t\tcomposite_4.setLayoutData(fd_composite_4);\n\t\t\n\t\tComposite composite_5 = new Composite(composite_2, SWT.NONE);\n\t\tcomposite_5.setLayout(new BorderLayout(0, 0));\n\t\tFormData fd_composite_5 = new FormData();\n\t\tfd_composite_5.bottom = new FormAttachment(composite_4, 281, SWT.BOTTOM);\n\t\tfd_composite_5.left = new FormAttachment(composite_4, 0, SWT.LEFT);\n\t\tfd_composite_5.right = new FormAttachment(composite_4, 0, SWT.RIGHT);\n\t\tfd_composite_5.top = new FormAttachment(composite_4, 6);\n\t\tcomposite_5.setLayoutData(fd_composite_5);\n\t\t\n\t\tComposite composite_10 = new Composite(composite_2, SWT.NONE);\n\t\tFormData fd_composite_10 = new FormData();\n\t\tfd_composite_10.top = new FormAttachment(composite_5, 6);\n\t\tfd_composite_10.bottom = new FormAttachment(100, -10);\n\t\t\n\t\tlettersTable = new Table(composite_5, SWT.BORDER | SWT.FULL_SELECTION);\n\t\tlettersTable.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(lettersTable.getItems().length>0)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tTableItem item = lettersTable.getSelection()[0];\n\t\t\t\t\titem.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.NONE));\n\t\t\t\t\tbox.Preview(Integer.parseInt(item.getText(0)));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tlettersTable.setLinesVisible(true);\n\t\tlettersTable.setHeaderVisible(true);\n\t\tTableColumn msgId = new TableColumn(lettersTable, SWT.NONE);\n\t\tmsgId.setResizable(false);\n\t\tmsgId.setText(\"ID\");\n\t\t\n\t\tTableColumn from = new TableColumn(lettersTable, SWT.NONE);\n\t\tfrom.setWidth(105);\n\t\tfrom.setText(\"\\u041E\\u0442\");\n\t\tfrom.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.STRING_COMPARATOR));\n\t\t\n\t\tTableColumn to = new TableColumn(lettersTable, SWT.NONE);\n\t\tto.setWidth(111);\n\t\tto.setText(\"\\u041A\\u043E\\u043C\\u0443\");\n\t\tto.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.STRING_COMPARATOR));\n\t\t\n\t\tTableColumn subject = new TableColumn(lettersTable, SWT.NONE);\n\t\tsubject.setWidth(406);\n\t\tsubject.setText(\"\\u0422\\u0435\\u043C\\u0430\");\n\t\tsubject.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.STRING_COMPARATOR));\n\t\t\n\t\tTableColumn created = new TableColumn(lettersTable, SWT.NONE);\n\t\tcreated.setWidth(176);\n\t\tcreated.setText(\"\\u0421\\u043E\\u0437\\u0434\\u0430\\u043D\\u043E\");\n\t\tcreated.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.DATE_COMPARATOR));\n\t\t\n\t\tTableColumn received = new TableColumn(lettersTable, SWT.NONE);\n\t\treceived.setWidth(194);\n\t\treceived.setText(\"\\u041F\\u043E\\u043B\\u0443\\u0447\\u0435\\u043D\\u043E\");\n\t\treceived.addListener(SWT.Selection, SortListenerFactory.getListener(SortListenerFactory.DATE_COMPARATOR));\t\t\n\t\t\n\t\tMenu popupMenuLetter = new Menu(lettersTable);\n\t\tlettersTable.setMenu(popupMenuLetter);\n\t\t\n\t\tMenuItem miUpdate = new MenuItem(popupMenuLetter, SWT.NONE);\n\t\tmiUpdate.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmyThready.stop();// interrupt();\n\t\t\t\tmyThready = new Thread(timer);\n\t\t\t\tmyThready.setDaemon(true);\n\t\t\t\tmyThready.start();\n\t\t\t}\n\t\t});\n\t\tmiUpdate.setText(\"\\u041E\\u0431\\u043D\\u043E\\u0432\\u0438\\u0442\\u044C\");\n\t\t\n\t\tfinal MenuItem miDelete = new MenuItem(popupMenuLetter, SWT.NONE);\n\t\tmiDelete.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(lettersTable.getItems().length>0)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tTableItem item = lettersTable.getSelection()[0];\n\t\t\t\t\tbox.deleteMessage(Integer.parseInt(item.getText(0)), lettersTable.getSelectionIndex());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tmiDelete.setText(\"\\u0412 \\u043A\\u043E\\u0440\\u0437\\u0438\\u043D\\u0443\");\n\t\tfd_composite_10.right = new FormAttachment(composite_4, 0, SWT.RIGHT);\n\t\t\n\t\tfinal Button btnInbox = new Button(composite_4, SWT.NONE);\n\t\tfinal Button btnTrash = new Button(composite_4, SWT.NONE);\n\t\t\n\t\tbtnInbox.setBounds(10, 10, 146, 39);\n\t\tbtnInbox.setEnabled(false);\n\t\tbtnInbox.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSetting.Instance().SetTab(false);\t\t\t\t\n\t\t\t\tbtnInbox.setEnabled(false);\n\t\t\t\tmiDelete.setText(\"\\u0412 \\u043A\\u043E\\u0440\\u0437\\u0438\\u043D\\u0443\");\n\t\t\t\tbtnTrash.setEnabled(true);\n\t\t\t\tbox.rePaint();\n\t\t\t}\n\t\t});\n\t\tbtnInbox.setText(\"\\u0412\\u0445\\u043E\\u0434\\u044F\\u0449\\u0438\\u0435\");\n\t\tbtnTrash.setLocation(170, 10);\n\t\tbtnTrash.setSize(146, 39);\n\t\tbtnTrash.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSetting.Instance().SetTab(true);\n\t\t\t\tbtnInbox.setEnabled(true);\n\t\t\t\tmiDelete.setText(\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C\");\n\t\t\t\tbtnTrash.setEnabled(false);\n\t\t\t\tbox.rePaint();\n\t\t\t}\n\t\t});\n\t\tbtnTrash.setText(\"\\u041A\\u043E\\u0440\\u0437\\u0438\\u043D\\u0430\");\n\t\t\n\t\tButton deleteLetter = new Button(composite_4, SWT.NONE);\n\t\tdeleteLetter.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(lettersTable.getItems().length>0)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tTableItem item = lettersTable.getSelection()[0];\n\t\t\t\t\tbox.deleteMessage(Integer.parseInt(item.getText(0)), lettersTable.getSelectionIndex());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdeleteLetter.setLocation(327, 11);\n\t\tdeleteLetter.setSize(146, 37);\n\t\tdeleteLetter.setFont(SWTResourceManager.getFont(\"Segoe UI\", 9, SWT.BOLD));\n\t\tdeleteLetter.setText(\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C\");\n\t\t\n\t\tLabel label = new Label(composite_4, SWT.NONE);\n\t\tlabel.setLocation(501, 17);\n\t\tlabel.setSize(74, 27);\n\t\tlabel.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\tlabel.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\t\n\t\tCombo listAccounts = new Combo(composite_4, SWT.NONE);\n\t\tlistAccounts.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.NORMAL));\n\t\tlistAccounts.setLocation(583, 19);\n\t\tlistAccounts.setSize(180, 23);\n\t\tlistAccounts.setItems(new String[] {\"\\u0412\\u0441\\u0435\"});\n\t\tlistAccounts.select(0);\n\t\t\n\t\tprogressBar = new ProgressBar(composite_4, SWT.NONE);\n\t\tprogressBar.setBounds(10, 64, 263, 17);\n\t\tfd_composite_10.left = new FormAttachment(0);\n\t\tcomposite_10.setLayoutData(fd_composite_10);\n\t\t\n\t\theaderMessage = new Text(composite_10, SWT.BORDER);\n\t\theaderMessage.setFont(SWTResourceManager.getFont(\"Segoe UI\", 14, SWT.NORMAL));\n\t\theaderMessage.setBounds(0, 0, 1100, 79);\n\t\t\n\t\tsc = new ScrolledComposite(composite_10, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tsc.setBounds(0, 85, 1100, 230);\n\t\tsc.setExpandHorizontal(true);\n\t\tsc.setExpandVertical(true);\t\t\n\t\t\n\t\tTabItem accountsTab = new TabItem(tabFolder, SWT.NONE);\n\t\taccountsTab.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u044B\");\n\t\t\n\t\tComposite accountComposite = new Composite(tabFolder, SWT.NONE);\n\t\taccountsTab.setControl(accountComposite);\n\t\taccountComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\t\n\t\t\tLabel labelListAccounts = new Label(accountComposite, SWT.NONE);\n\t\t\tlabelListAccounts.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));\n\t\t\tlabelListAccounts.setFont(SWTResourceManager.getFont(\"Segoe UI\", 12, SWT.BOLD));\n\t\t\tlabelListAccounts.setBounds(10, 37, 148, 31);\n\t\t\tlabelListAccounts.setText(\"\\u0421\\u043F\\u0438\\u0441\\u043E\\u043A \\u0430\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\\u043E\\u0432\");\n\t\t\t\n\t\t\tComposite Actions = new Composite(accountComposite, SWT.NONE);\n\t\t\tActions.setBounds(412, 71, 163, 234);\n\t\t\t\n\t\t\tButton addAccount = new Button(Actions, SWT.NONE);\n\t\t\taddAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tAccountDialog ad = new AccountDialog(shlMailview, accountsTable, true);\n\t\t\t\t\tad.open();\n\t\t\t\t}\n\t\t\t});\n\t\t\taddAccount.setForeground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW));\n\t\t\taddAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\t\taddAccount.setBounds(10, 68, 141, 47);\n\t\t\taddAccount.setText(\"\\u0414\\u043E\\u0431\\u0430\\u0432\\u0438\\u0442\\u044C\");\n\t\t\t\n\t\t\tButton editAccount = new Button(Actions, SWT.NONE);\n\t\t\teditAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tif(accountsTable.getItems().length>0)\n\t\t\t\t\t{\n\t\t\t\t\tAccountDialog ad = new AccountDialog(shlMailview, accountsTable, false);\n\t\t\t\t\tad.open();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\teditAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\t\teditAccount.setBounds(10, 121, 141, 47);\n\t\t\teditAccount.setText(\"\\u0418\\u0437\\u043C\\u0435\\u043D\\u0438\\u0442\\u044C\");\n\t\t\t\n\t\t\tButton deleteAccount = new Button(Actions, SWT.NONE);\n\t\t\tdeleteAccount.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tif(accountsTable.getItems().length>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tTableItem item = accountsTable.getSelection()[0];\n\t\t\t\t\t\tif(MessageDialog.openConfirm(shlMailview, \"Удаление\", \"Вы хотите удалить учетную запись \" + item.getText(1)+\"?\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tservice.DeleteAccount(item.getText(0));\n\t\t\t\t\t\t\tservice.RepaintAccount(accountsTable);\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\tdeleteAccount.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\t\t\t\n\t\t\tdeleteAccount.setBounds(10, 174, 141, 47);\n\t\t\tdeleteAccount.setText(\"\\u0423\\u0434\\u0430\\u043B\\u0438\\u0442\\u044C\");\n\t\t\t\n\t\t\tfinal Button Include = new Button(Actions, SWT.NONE);\n\t\t\tInclude.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tif(accountsTable.getItems().length>0)\n\t\t\t\t\t{\n\t\t\t\t\t\tTableItem item = accountsTable.getSelection()[0];\n\t\t\t\t\t\tservice.toogleIncludeAccount(item.getText(0));\n\t\t\t\t\t\tservice.RepaintAccount(accountsTable);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tInclude.setFont(SWTResourceManager.getFont(\"Segoe UI\", 10, SWT.BOLD));\n\t\t\tInclude.setBounds(10, 10, 141, 47);\n\t\t\tInclude.setText(\"\\u0412\\u043A\\u043B\\u044E\\u0447\\u0438\\u0442\\u044C\");\n\n\t\t\taccountsTable = new Table(accountComposite, SWT.SINGLE | SWT.BORDER | SWT.FULL_SELECTION);\n\t\t\taccountsTable.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tif(accountsTable.getSelection()[0].getText(2)==\"Включен\")\n\t\t\t\t\t{\n\t\t\t\t\t\tInclude.setText(\"\\u0412\\u044B\\u043A\\u043B\\u044E\\u0447\\u0438\\u0442\\u044C\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tInclude.setText(\"\\u0412\\u043A\\u043B\\u044E\\u0447\\u0438\\u0442\\u044C\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\taccountsTable.setBounds(10, 74, 396, 296);\n\t\t\taccountsTable.setHeaderVisible(true);\n\t\t\taccountsTable.setLinesVisible(true);\n\t\t\t\n\t\t\tTableColumn tblclmnId = new TableColumn(accountsTable, SWT.NONE);\n\t\t\ttblclmnId.setWidth(35);\n\t\t\ttblclmnId.setText(\"ID\");\n\t\t\t//accountsTable.setRedraw(false);\n\t\t\t\n\t\t\tTableColumn columnLogin = new TableColumn(accountsTable, SWT.LEFT);\n\t\t\tcolumnLogin.setWidth(244);\n\t\t\tcolumnLogin.setText(\"\\u0410\\u043A\\u043A\\u0430\\u0443\\u043D\\u0442\");\n\t\t\t\n\t\t\tTableColumn columnState = new TableColumn(accountsTable, SWT.LEFT);\n\t\t\tcolumnState.setWidth(100);\n\t\t\tcolumnState.setText(\"\\u0421\\u043E\\u0441\\u0442\\u043E\\u044F\\u043D\\u0438\\u0435\");\n\t}", "public void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n\tif(open==0)\n\t\tframe = new JFrame(\"Open a file\");\n\telse if(open ==1)\n\t\tframe = new JFrame(\"Save file as\");\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane =this ;\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n // frame.setSize(500,500);\n//\tvalidate();\n }", "protected Control createContents(Composite parent) {\n\t\tgetOverlayStore().load();\r\n\t\tgetOverlayStore().start();\r\n Composite composite = createContainer(parent);\r\n \r\n // The layout info for the preference page\r\n GridLayout gridLayout = new GridLayout();\r\n gridLayout.marginHeight = 0;\r\n gridLayout.marginWidth = 0;\r\n composite.setLayout(gridLayout);\r\n \r\n // A panel for the preference page\r\n Composite defPanel = new Composite(composite, SWT.NONE);\r\n GridLayout layout = new GridLayout();\r\n int numColumns = 2;\r\n layout.numColumns = numColumns;\r\n defPanel.setLayout(layout);\r\n GridData gridData =\r\n new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL);\r\n defPanel.setLayoutData(gridData);\r\n \r\n\r\n // Browser options\r\n\t\tGroup wrappingGroup= createGroup(numColumns, defPanel, \"Web Browser\");\r\n\t\tString labelText= \"Use tabbed browsing\";\r\n\t\tlabelText= \"Used tabbed browsing\";\r\n\t\taddCheckBox(wrappingGroup, labelText, CFMLPreferenceConstants.P_TABBED_BROWSER, 1);\r\n \r\n // File paths\r\n createFilePathGroup(defPanel);\r\n \r\n // Images tooltips\r\n\t\tGroup imageGroup= createGroup(numColumns, defPanel, \"Images\");\r\n\t\tlabelText= \"Show Image Tooltips (restart required)\";\r\n\t\taddCheckBox(imageGroup, labelText, CFMLPreferenceConstants.P_IMAGE_TOOLTIPS, 1);\r\n \t\t\r\n\t\t// default help url\r\n\t\tGroup helpGroup= createGroup(numColumns, defPanel, \"External Help Documentation\");\r\n\t\tlabelText= \"Default URL:\";\r\n\t\taddTextField(helpGroup, labelText, CFMLPreferenceConstants.P_DEFAULT_HELP_URL, 50, 0, null);\r\n\t\tlabelText= \"Use external broswer\";\r\n\t\taddCheckBox(helpGroup, labelText, CFMLPreferenceConstants.P_HELP_URL_USE_EXTERNAL_BROWSER, 1);\r\n \r\n // Template Sites\r\n \r\n // createTemplateSitesPathGroup(defPanel);\r\n\r\n\t\tinitializeFields();\r\n\t\tapplyDialogFont(defPanel);\r\n\r\n\t\treturn composite;\r\n }" ]
[ "0.5958723", "0.59479344", "0.59275424", "0.59096503", "0.5907221", "0.5867608", "0.57567745", "0.56810755", "0.56719244", "0.5669652", "0.56571513", "0.565258", "0.56407857", "0.563862", "0.5624245", "0.5605473", "0.5597408", "0.5585935", "0.5579669", "0.5569905", "0.552636", "0.5524076", "0.55105716", "0.55064666", "0.54902035", "0.548707", "0.54861206", "0.54858077", "0.5478375", "0.54649925", "0.54376435", "0.54326934", "0.54222536", "0.54212767", "0.5415998", "0.54011524", "0.5385681", "0.53835726", "0.53818434", "0.53727", "0.53596276", "0.53240204", "0.53237885", "0.5318507", "0.53161925", "0.53103215", "0.5305425", "0.5295595", "0.52869326", "0.5278988", "0.5278389", "0.5275967", "0.5250943", "0.5228704", "0.52282953", "0.522589", "0.52242595", "0.52234757", "0.52162564", "0.5209776", "0.52092236", "0.52044064", "0.5201602", "0.5201262", "0.51933575", "0.519264", "0.5187208", "0.5187148", "0.5183646", "0.5180728", "0.5176947", "0.5172869", "0.516582", "0.5164137", "0.5158941", "0.51487553", "0.5147616", "0.51458627", "0.51447177", "0.5143312", "0.51403356", "0.51382524", "0.51369905", "0.51325786", "0.513257", "0.513206", "0.51300746", "0.5129494", "0.51286685", "0.51217806", "0.5118799", "0.5116049", "0.51142746", "0.51107764", "0.51004636", "0.5093556", "0.50869966", "0.50852215", "0.5084774", "0.50847405" ]
0.6471027
0
Read the configuration file. It is called on startup of the Java commander.
String readCfg(File cfgFile) { this.fileCfg = cfgFile; String sError = null; BufferedReader reader = null; try{ reader = new BufferedReader(new FileReader(cfgFile)); } catch(FileNotFoundException exc){ sError = "TabSelector - cfg file not found; " + cfgFile; } if(reader !=null){ try{ listAllFavorPathFolders.clear(); String sLine; int posSep; //List<GralFileSelector.FavorPath> list = null; FcmdFavorPathSelector.FavorFolder favorTabInfo = null; StringPart spLine = new StringPart(); StringBuilder uLine = new StringBuilder(1000); //boolean bAll = true; while( sError == null && (sLine = reader.readLine()) !=null){ if(sLine.contains("$")){ uLine.append(sLine.trim()); spLine.assignReplaceEnv(uLine); sLine = uLine.toString(); } else { sLine = sLine.trim(); spLine.assign(sLine); } if(sLine.length() >0){ if( sLine.startsWith("==")){ posSep = sLine.indexOf("==", 2); //a new division final String sDiv = sLine.substring(2,posSep).trim(); final int pos1 = sDiv.indexOf(':'); final String sLabel = pos1 >=0 ? sDiv.substring(0, pos1).trim() : sDiv; final int pos2 = sDiv.indexOf(','); //sDivText is the same as sLabel if pos1 <0 final String sDivText = pos2 >=0 ? sDiv.substring(pos1+1, pos2).trim() : sDiv.substring(pos1+1).trim(); final String sSelect = pos2 >=0 ? sDiv.substring(pos2): ""; favorTabInfo = null; //selectListOverview.get(sDiv); if(favorTabInfo == null){ favorTabInfo = new FcmdFavorPathSelector.FavorFolder(sLabel, sDivText); if(sSelect.indexOf('l')>=0){ favorTabInfo.mMainPanel |=1;} if(sSelect.indexOf('m')>=0){ favorTabInfo.mMainPanel |=2;} if(sSelect.indexOf('r')>=0){ favorTabInfo.mMainPanel |=4;} listAllFavorPathFolders.add(favorTabInfo); } /// /* if(sDiv.equals("left")){ list = panelLeft.selectListAllFavorites; } else if(sDiv.equals("mid")){ list = panelMid.selectListAllFavorites; } else if(sDiv.equals("right")){ list = panelRight.selectListAllFavorites; } else if(sDiv.equals("all")){ list = selectAll; } else { sError = "Error in cfg file: ==" + sDiv + "=="; } */ } else if(favorTabInfo !=null){ String[] sParts = sLine.trim().split(","); if(sParts.length < 2){ sError = "SelectTab format error; " + sLine; } else { //info. = sParts[0].trim(); String selectName = sParts[0].trim(); String path = sParts[1].trim(); GralFileSelector.FavorPath favorPathInfo = new GralFileSelector.FavorPath(selectName, path, main.fileCluster); if(sParts.length >2){ final String actTabEntry = sParts[2].trim(); //final String actTab; /* final int posColon = actTabEntry.indexOf(':'); if(posColon >0){ String sPanelChars = actTabEntry.substring(0, posColon); actTab = actTabEntry.substring(posColon+1).trim(); if(sPanelChars.indexOf('l')>=0){ info.mMainPanel |= 1; } if(sPanelChars.indexOf('m')>=0){ info.mMainPanel |= 2; } if(sPanelChars.indexOf('r')>=0){ info.mMainPanel |= 4; } } else { actTab = actTabEntry.trim(); } info.label = actTab; */ } //info.active = cActive; //list.add(info); favorTabInfo.listfavorPaths.add(favorPathInfo); } } } uLine.setLength(0); }//while spLine.close(); } catch(IOException exc){ sError = "selectTab - cfg file read error; " + cfgFile; } catch(IllegalArgumentException exc){ sError = "selectTab - cfg file error; " + cfgFile + exc.getMessage(); } catch(Exception exc){ sError = "selectTab - any exception; " + cfgFile + exc.getMessage(); } try{ reader.close(); reader = null; } catch(IOException exc){} //close is close. } return sError; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ReadConfigFile (){\n\t\ttry {\n\t\t\tinput = ReadConfigFile.class.getClassLoader().getResourceAsStream(Constant.CONFIG_PROPERTIES_DIRECTORY);\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}catch ( IOException e ) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}", "private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }", "public static void ReadConfig() throws IOException\r\n {\r\n ReadConfiguration read= new ReadConfiguration(\"settings/FabulousIngest.properties\");\r\n \t \r\n fedoraStub =read.getvalue(\"fedoraStub\");\r\n \t username = read.getvalue(\"fedoraUsername\");\r\n \t password =read.getvalue(\"fedoraPassword\");\r\n \t pidNamespace =read.getvalue(\"pidNamespace\");\r\n \t contentAltID=read.getvalue(\"contentAltID\");\r\n \t \r\n \t \r\n \t ingestFolderActive =read.getvalue(\"ingestFolderActive\");\r\n \t ingestFolderInActive =read.getvalue(\"ingestFolderInActive\");\r\n \t\r\n logFileNameInitial=read.getvalue(\"logFileNameInitial\");\r\n \r\n DataStreamID=read.getvalue(\"DataStreamID\");\r\n \t DataStreamLabel=read.getvalue(\"DataStreamLabel\");\r\n \r\n \r\n \r\n }", "public String readConfiguration(String path);", "public void read() {\n\t\tconfigfic = new Properties();\n\t\tInputStream input = ConfigReader.class.getClassLoader().getResourceAsStream(\"source/config.properties\");\n\t\t// on peut remplacer ConfigReader.class par getClass()\n\t\ttry {\n\t\t\tconfigfic.load(input);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void load() {\n try {\n File confFile = SessionService.getConfFileByPath(Const.FILE_CONFIGURATION);\n UtilSystem.recoverFileIfRequired(confFile);\n // Conf file doesn't exist at first launch\n if (confFile.exists()) {\n // Now read the conf file\n InputStream str = new FileInputStream(confFile);\n try {\n properties.load(str);\n } finally {\n str.close();\n }\n }\n } catch (Exception e) {\n Log.error(e);\n Messages.showErrorMessage(114);\n }\n }", "private static void readConfigFile() {\n\n BufferedReader input = null;\n try {\n input = new BufferedReader(new FileReader(getConfigFile()));\n String sLine = null;\n while ((sLine = input.readLine()) != null) {\n final String[] sTokens = sLine.split(\"=\");\n if (sTokens.length == 2) {\n m_Settings.put(sTokens[0], sTokens[1]);\n }\n }\n }\n catch (final FileNotFoundException e) {\n }\n catch (final IOException e) {\n }\n finally {\n try {\n if (input != null) {\n input.close();\n }\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n }\n\n }", "public ReadConfig() \n\t{\n\t\tFile scr = new File(\"./Configuration/config.properties\"); //property file\n\n\t\tFileInputStream fis;\n\t\ttry {\n\t\t\tfis = new FileInputStream(scr); // READ the DATA (read mode)\n\t\t\tpro = new Properties(); // pro object\n\t\t\tpro.load(fis); // Load method -load at the \n\n\t\t} catch (final Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Except is \" + e.getMessage());\n\t\t} \n\t}", "public static void readConfiguration() throws IOException {\n synchronized (Configuration.class) {\n Properties props = new Properties();\n InputStream is = new FileInputStream(Constants.ROOT_PATH + \"/opencraft.properties\");\n try {\n props.load(is);\n configuration = new Configuration(props);\n } finally {\n is.close();\n }\n }\n }", "private static void loadConfig()\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal Properties props = ManagerServer.loadProperties(ManagerServer.class, \"/resources/conf.properties\");\n\t\t\tasteriskIP = props.getProperty(\"asteriskIP\");\n\t\t\tloginName = props.getProperty(\"userName\");\n\t\t\tloginPwd = props.getProperty(\"password\");\n\t\t\toutboundproxy = props.getProperty(\"outBoundProxy\");\n\t\t\tasteriskPort = Integer.parseInt(props.getProperty(\"asteriskPort\"));\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t\tLOG.error(\"IO Exception while reading the configuration file.\", ex);\n\t\t}\n\t}", "public static void processConfig() {\r\n\t\tLOG.info(\"Loading Properties from {} \", propertiesPath);\r\n\t\tLOG.info(\"Opening configuration file ({})\", propertiesPath);\r\n\t\ttry {\r\n\t\t\treadPropertiesFile();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOG.error(\r\n\t\t\t\t\t\"Monitoring system encountered an error while processing config file, Exiting\",\r\n\t\t\t\t\te);\r\n\t\t}\r\n\t}", "private static void loadConfig() throws IOException { \t\t\n final InputStream input = Main.class.getResourceAsStream(\"/configuration.properties\");\n final Properties prop = new Properties();\n \n prop.load(input);\n System.out.println(\"Configuration loaded:\"); \n\n // PostgreSQL server access config\n dbmsUrl = prop.getProperty(\"dbms_url\");\n System.out.println(\"- dbms_url: \" + dbmsUrl);\n\n dbmsUser = prop.getProperty(\"dbms_user\");\n System.out.println(\"- dbms_user: \" + dbmsUser);\n\n userPw = prop.getProperty(\"user_pw\"); \n System.out.println(\"- user_pw: \" + userPw);\n\n\n // Benchmarks config\n noTransactions = Integer.parseInt(prop.getProperty(\"no_transactions\"));\n System.out.println(\"- no_transactions: \" + noTransactions);\n\n noStatementsPerTransaction = Integer.parseInt(prop.getProperty(\"no_statements_per_transaction\")); \n System.out.println(\"- no_statements_per_transaction: \" + noStatementsPerTransaction);\n\n noSelectStatements = Integer.parseInt(prop.getProperty(\"no_select_statements\")); \n System.out.println(\"- no_select_statements: \" + noSelectStatements + \"\\n\");\n\n input.close();\n }", "public ConfigFileReader(){\r\n\t\tBufferedReader reader;\r\n\t\ttry {\r\n\t\t\treader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\tproperties = new Properties();\r\n\t\t\ttry {\r\n\t\t\t\tproperties.load(reader);\r\n\t\t\t\treader.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}catch(FileNotFoundException ex) {\r\n\t\t\tSystem.out.println(\"Configuration.properties not found at \"+propertyFilePath);\r\n\t\t}\r\n\t}", "public File getConfigurationFile();", "private void loadConfig()\n {\n File config = new File(\"config.ini\");\n\n if (config.exists())\n {\n try\n {\n BufferedReader in = new BufferedReader(new FileReader(config));\n\n configLine = Integer.parseInt(in.readLine());\n configString = in.readLine();\n socketSelect = (in.readLine()).split(\",\");\n in.close();\n }\n catch (Exception e)\n {\n System.exit(1);\n }\n }\n else\n {\n System.exit(1);\n }\n }", "public ConfigFileReader(){\r\n\t\t \r\n\t\t BufferedReader reader;\r\n\t\t try {\r\n\t\t\t reader = new BufferedReader(new FileReader(propertyFilePath));\r\n\t\t\t properties = new Properties();\r\n\t\t\t try {\r\n\t\t\t\t properties.load(reader);\r\n\t\t\t\t reader.close();\r\n\t\t\t } catch (IOException e) {\r\n\t\t\t\t e.printStackTrace();\r\n\t\t\t }\r\n\t\t } catch (FileNotFoundException e) {\r\n\t\t\t e.printStackTrace();\r\n\t\t\t throw new RuntimeException(\"configuration.properties not found at \" + propertyFilePath);\r\n\t \t } \r\n\t }", "@BeforeClass\n\tpublic void readConfig() {\n\t\t// object creation of properties file\n\n\t\tProperties prop = new Properties();\n\n\t\t// read the file: inputstream\n\n\t\ttry {\n\t\t\tInputStream input = new FileInputStream(\"\\\\src\\\\main\\\\java\\\\config\\\\config.properties\");\n\t\t\tprop.load(input);\n\t\t\tbrowser = prop.getProperty(\"browser\");\n\t\t//\turl = prop.getProperty(\"url\");\n\t\t\t\n\t\t}\n\n\t\tcatch (IOException e) {\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\t}", "public void readConfigFile() throws IOException {\r\n Wini iniFileParser = new Wini(new File(configFile));\r\n\r\n databaseDialect = iniFileParser.get(DATABASESECTION, \"dialect\", String.class);\r\n databaseDriver = iniFileParser.get(DATABASESECTION, \"driver\", String.class);\r\n databaseUrl = iniFileParser.get(DATABASESECTION, \"url\", String.class);\r\n databaseUser = iniFileParser.get(DATABASESECTION, \"user\", String.class);\r\n databaseUserPassword = iniFileParser.get(DATABASESECTION, \"userPassword\", String.class);\r\n\r\n repositoryName = iniFileParser.get(REPOSITORYSECTION, \"name\", String.class);\r\n\r\n partitions = iniFileParser.get(DEFAULTSECTION, \"partitions\", Integer.class);\r\n logFilename = iniFileParser.get(DEFAULTSECTION, \"logFilename\", String.class);\r\n logLevel = iniFileParser.get(DEFAULTSECTION, \"logLevel\", String.class);\r\n\r\n maxNGramSize = iniFileParser.get(FEATURESSECTION, \"maxNGramSize\", Integer.class);\r\n maxNGramFieldSize = iniFileParser.get(FEATURESSECTION, \"maxNGramFieldSize\", Integer.class);\r\n String featureGroupsString = iniFileParser.get(FEATURESSECTION, \"featureGroups\", String.class);\r\n\r\n if ( databaseDialect == null )\r\n throw new IOException(\"Database dialect not found in config\");\r\n if ( databaseDriver == null )\r\n throw new IOException(\"Database driver not found in config\");\r\n if ( databaseUrl == null )\r\n throw new IOException(\"Database URL not found in config\");\r\n if ( databaseUser == null )\r\n throw new IOException(\"Database user not found in config\");\r\n if ( databaseUserPassword == null )\r\n throw new IOException(\"Database user password not found in config\");\r\n\r\n if (repositoryName == null)\r\n throw new IOException(\"Repository name not found in config\");\r\n\r\n if (partitions == null)\r\n partitions = 250;\r\n if ( logFilename == null )\r\n logFilename = \"FeatureExtractor.log\";\r\n if ( logLevel == null )\r\n logLevel = \"INFO\";\r\n\r\n if ( featureGroupsString != null ) {\r\n featureGroups = Arrays.asList(featureGroupsString.split(\"\\\\s*,\\\\s*\"));\r\n }\r\n if (maxNGramSize == null)\r\n maxNGramSize = 5;\r\n if (maxNGramFieldSize == null)\r\n maxNGramFieldSize = 500;\r\n\r\n }", "public static void loadConfigurationFile() throws IOException {\n\t\tFileInputStream fis= new FileInputStream(\"config.properties\");\n\t\tprop.load(fis);\n\t}", "private void processConfigurationFile() throws RuntimeException {\n try {\n // Read all the lines and join them in a single string\n List<String> lines = Files.readAllLines(Paths.get(this.confFile));\n String content = lines.stream().reduce(\"\", (a, b) -> a + b);\n\n // Use the bson document parser to extract the info\n Document doc = Document.parse(content);\n this.mongoDBHostname = doc.getString(\"CLARUS_keystore_db_hostname\");\n this.mongoDBPort = doc.getInteger(\"CLARUS_keystore_db_port\");\n this.clarusDBName = doc.getString(\"CLARUS_keystore_db_name\");\n } catch (IOException e) {\n throw new RuntimeException(\"CLARUS configuration file could not be processed\", e);\n }\n }", "private void readProperties() {\n // reading config files\n if (driver == null) {\n try {\n fis = new FileInputStream(userDir + \"\\\\src\\\\main\\\\resources\\\\properties\\\\Config.properties\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n config.load(fis);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "public void loadConfig() {\n\t}", "public void loadConfiguration() {\n Properties prop = new Properties();\n String propFileName = \".env_\" + this.dbmode.name().toLowerCase();\n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(propFileName);\n try {\n if (inputStream != null) {\n prop.load(inputStream);\n } else {\n System.err.println(\"property file '\" + propFileName + \"' not found in the classpath\");\n }\n this.jdbc = prop.getProperty(\"jdbc\");\n this.host = prop.getProperty(\"host\");\n this.port = prop.getProperty(\"port\");\n this.database = prop.getProperty(\"database\");\n this.user = prop.getProperty(\"user\");\n this.password = prop.getProperty(\"password\");\n // this.sslFooter = prop.getProperty(\"sslFooter\");\n } catch (Exception e) {\n System.err.println(\"can't read property file\");\n }\n try {\n inputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void loadConfig() throws IOException {\n\t\t// initialize hash map\n\t\tserverOptions = new HashMap<>();\n\t\t// Get config from file system\n\t\tClass<ConfigurationHandler> configurationHandler = ConfigurationHandler.class;\n\t\tInputStream inputStream = configurationHandler.getResourceAsStream(\"/Config/app.properties\");\n\t\tInputStreamReader isReader = new InputStreamReader(inputStream);\n\t //Creating a BufferedReader object\n\t BufferedReader reader = new BufferedReader(isReader);\n\t String str;\n\t while((str = reader.readLine())!= null){\n\t \t if (str.contains(\"=\")) {\n\t \t\t String[] config = str.split(\" = \", 2);\n\t \t serverOptions.put(config[0], config[1]);\n\t \t }\n\t }\n\t}", "private void LoadConfigFromClasspath() throws IOException \n {\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(\"lrs.properties\");\n config.load(is);\n is.close();\n\t}", "private Config()\n {\n try\n {\n // Load settings from file\n load();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "Collection<String> readConfigs();", "protected void config_read(String fileParam) {\r\n\t\tFile inputFile = new File(fileParam);\r\n\r\n\t\tif (inputFile == null || !inputFile.exists()) {\r\n\t\t\tSystem.out.println(\"parameter \" + fileParam\r\n\t\t\t\t\t+ \" file doesn't exists!\");\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t\t// begin the configuration read from file\r\n\t\ttry {\r\n\t\t\tFileReader file_reader = new FileReader(inputFile);\r\n\t\t\tBufferedReader buf_reader = new BufferedReader(file_reader);\r\n\t\t\t// FileWriter file_write = new FileWriter(outputFile);\r\n\r\n\t\t\tString line;\r\n\r\n\t\t\tdo {\r\n\t\t\t\tline = buf_reader.readLine();\r\n\t\t\t} while (line.length() == 0); // avoid empty lines for processing ->\r\n\t\t\t\t\t\t\t\t\t\t\t// produce exec failure\r\n\t\t\tString out[] = line.split(\"algorithm = \");\r\n\t\t\t// alg_name = new String(out[1]); //catch the algorithm name\r\n\t\t\t// input & output filenames\r\n\t\t\tdo {\r\n\t\t\t\tline = buf_reader.readLine();\r\n\t\t\t} while (line.length() == 0);\r\n\t\t\tout = line.split(\"inputData = \");\r\n\t\t\tout = out[1].split(\"\\\\s\\\"\");\r\n\t\t\tinput_train_name = new String(out[0].substring(1,\r\n\t\t\t\t\tout[0].length() - 1));\r\n\t\t\tinput_test_name = new String(out[1].substring(0,\r\n\t\t\t\t\tout[1].length() - 1));\r\n\t\t\tif (input_test_name.charAt(input_test_name.length() - 1) == '\"')\r\n\t\t\t\tinput_test_name = input_test_name.substring(0,\r\n\t\t\t\t\t\tinput_test_name.length() - 1);\r\n\r\n\t\t\tdo {\r\n\t\t\t\tline = buf_reader.readLine();\r\n\t\t\t} while (line.length() == 0);\r\n\t\t\tout = line.split(\"outputData = \");\r\n\t\t\tout = out[1].split(\"\\\\s\\\"\");\r\n\t\t\toutput_train_name = new String(out[0].substring(1,\r\n\t\t\t\t\tout[0].length() - 1));\r\n\t\t\toutput_test_name = new String(out[1].substring(0,\r\n\t\t\t\t\tout[1].length() - 1));\r\n\t\t\tif (output_test_name.charAt(output_test_name.length() - 1) == '\"')\r\n\t\t\t\toutput_test_name = output_test_name.substring(0,\r\n\t\t\t\t\t\toutput_test_name.length() - 1);\r\n\r\n\t\t\t// parameters\r\n\t\t\tdo {\r\n\t\t\t\tline = buf_reader.readLine();\r\n\t\t\t} while (line.length() == 0);\r\n\t\t\tout = line.split(\"k = \");\r\n\t\t\tnneigh = (new Integer(out[1])).intValue(); // parse the string into\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// a double\r\n\r\n\t\t\tdo {\r\n\t\t\t\tline = buf_reader.readLine();\r\n\t\t\t} while (line.length() == 0);\r\n\t\t\tout = line.split(\"enn = \");\r\n\t\t\tennNeighbors = (new Integer(out[1])).intValue(); // parse the string\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// into a\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// integer\r\n\r\n\t\t\tdo {\r\n\t\t\t\tline = buf_reader.readLine();\r\n\t\t\t} while (line.length() == 0);\r\n\t\t\tout = line.split(\"eta = \");\r\n\t\t\tcleanThreshold = (new Double(out[1])).doubleValue(); // parse the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// string\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// into a\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// double\r\n\r\n\t\t\tfile_reader.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"IO exception = \" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t}", "public ReadConfigProperty() {\n\n\t\ttry {\n\t\t\tString filename = \"com/unitedcloud/resources/config.properties\";\n\t\t\tinput = ReadConfigProperty.class.getClassLoader().getResourceAsStream(filename);\n\t\t\tif (input == null) {\n\t\t\t\tSystem.out.println(\"Sorry, unable to find \" + filename);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tprop = new Properties();\n\t\t\tprop.load(input);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static ChebiConfig readFromFile() throws IOException{\n return readFromInputStream(ChebiConfig.class.getClassLoader()\n .getResourceAsStream(\"chebi-adapter.properties\"));\n }", "public ReadPropertyFile()\n\t{\n\t prob = new Properties(); \n\t \n\t try\n\t {\n\t FileInputStream fis = new FileInputStream(\".//config.properties\");\n\t prob.load(fis);\n\t }\n\t catch(FileNotFoundException e)\n\t {\n\t\t System.out.println(e.getMessage());\n\t }\n catch(IOException e)\n\t {\n \t System.out.println(e.getMessage());\n\t }\n\t}", "public T loadConfig(File file) throws IOException;", "private void setConfiguration() throws IOException{\n\t\tString confPath = \"mapreduce.conf\";\n\t\tFileInputStream fis = new FileInputStream(confPath);\n\t\tthis.load(fis);\n\t\tfis.close();\n\t}", "public void loadConfig(){\n \t\tFile configDir = this.getDataFolder();\n \t\tif (!configDir.exists())\n \t\t\tconfigDir.mkdir();\n \n \t\t// Check for existance of config file\n \t\tFile configFile = new File(this.getDataFolder().toString() + \"/config.yml\");\n \t\tconfig = YamlConfiguration.loadConfiguration(configFile);\n \t\t\n \t\t// Adding Variables\n \t\tif(!config.contains(\"Debug\"))\n \t\t{\n \t\t\tconfig.addDefault(\"Debug\", false);\n \t \n \t config.addDefault(\"Worlds\", \"ExampleWorld1, ExampleWorld2\");\n \t\n\t config.addDefault(\"Regions.Residence\", \"ExampleWorld.ExampleResRegion1, ExampleWorld.ExampleResRegion2\");\n \t \n\t config.addDefault(\"Regions.WorldGuard\", \"ExampleWorld.ExampleWGRegion1, ExampleWorld.ExampleWGRegion2\"); \n \t\t}\n \n // Loading the variables from config\n \tdebug = (Boolean) config.get(\"Debug\");\n \tpchestWorlds = (String) config.get(\"Worlds\");\n \tpchestResRegions = (String) config.get(\"Regions.Residence\");\n \tpchestWGRegions = (String) config.get(\"Regions.WorldGuard\");\n \n if(pchestWorlds != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All Chests Worlds: \" + pchestWorlds);\n }\n \n if(pchestResRegions != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All Residence Regions: \" + pchestResRegions);\n }\n \n if(pchestWGRegions != null)\n {\n \tlog.info(\"[\"+getDescription().getName()+\"] All World Guard Regions: \" + pchestWGRegions);\n }\n \n config.options().copyDefaults(true);\n try {\n config.save(configFile);\n } catch (IOException ex) {\n Logger.getLogger(JavaPlugin.class.getName()).log(Level.SEVERE, \"Could not save config to \" + configFile, ex);\n }\n }", "public static synchronized void initializeLogger() {\n\t\t\n\t try {\n\t\t String workingDir = System.getProperty(\"user.dir\");\n\t\t String fileName = workingDir + File.separator + \"config\" + File.separator + \"logging.properties\";\n\t\t \n\t\t FileInputStream fileInputStream = new FileInputStream(fileName);\n\t\t LogManager.getLogManager().readConfiguration(fileInputStream);\n\t\t \n\t } catch (IOException ex) {\n\t\t System.err.println(\"Failed to load logging.properlies, please check the file and the path:\" + ex.getMessage()); \n\t ex.printStackTrace();\n\t System.exit(0);\n\t }\n\t}", "public static void initialize() {\n // check to see if the name of an alternate configuration\n // file has been specified. This can be done, for example,\n // java -Dfilesys.conf=myfile.txt program-name parameter ...\n String propertyFileName = System.getProperty(\"filesys.conf\");\n if (propertyFileName == null)\n propertyFileName = \"filesys.conf\";\n Properties properties = new Properties();\n try {\n FileInputStream in = new FileInputStream(propertyFileName);\n properties.load(in);\n in.close();\n } catch (FileNotFoundException e) {\n System.err.println(PROGRAM_NAME + \": error opening properties file\");\n System.exit(EXIT_FAILURE);\n } catch (IOException e) {\n System.err.println(PROGRAM_NAME + \": error reading properties file\");\n System.exit(EXIT_FAILURE);\n }\n\n // get the root file system properties\n String rootFileSystemFilename =\n properties.getProperty(\"filesystem.root.filename\", \"filesys.dat\");\n String rootFileSystemMode =\n properties.getProperty(\"filesystem.root.mode\", \"rw\");\n\n // get the current process properties\n short uid = 1;\n try {\n uid = Short.parseShort(properties.getProperty(\"process.uid\", \"1\"));\n } catch (NumberFormatException e) {\n System.err.println(PROGRAM_NAME +\n \": invalid number for property process.uid in configuration file\");\n System.exit(EXIT_FAILURE);\n }\n\n short gid = 1;\n try {\n gid = Short.parseShort(properties.getProperty(\"process.gid\", \"1\"));\n } catch (NumberFormatException e) {\n System.err.println(PROGRAM_NAME +\n \": invalid number for property process.gid in configuration file\");\n System.exit(EXIT_FAILURE);\n }\n\n short umask = 0002;\n try {\n umask = Short.parseShort(\n properties.getProperty(\"process.umask\", \"002\"), 8);\n } catch (NumberFormatException e) {\n System.err.println(PROGRAM_NAME +\n \": invalid number for property process.umask in configuration file\");\n System.exit(EXIT_FAILURE);\n }\n\n String dir = \"/root\";\n dir = properties.getProperty(\"process.dir\", \"/root\");\n\n try {\n MAX_OPEN_FILES = Integer.parseInt(properties.getProperty(\n \"kernel.max_open_files\", \"20\"));\n } catch (NumberFormatException e) {\n System.err.println(PROGRAM_NAME +\n \": invalid number for property kernel.max_open_files in configuration file\");\n System.exit(EXIT_FAILURE);\n }\n\n try {\n ProcessContext.MAX_OPEN_FILES = Integer.parseInt(\n properties.getProperty(\"process.max_open_files\", \"10\"));\n } catch (NumberFormatException e) {\n System.err.println(PROGRAM_NAME +\n \": invalid number for property process.max_open_files in configuration file\");\n System.exit(EXIT_FAILURE);\n }\n\n // create open file array\n openFiles = new FileDescriptor[MAX_OPEN_FILES];\n\n // create the first process\n process = new ProcessContext(uid, gid, dir, umask);\n processCount++;\n\n // open the root file system\n try {\n openFileSystems[ROOT_FILE_SYSTEM] = new FileSystem(\n rootFileSystemFilename, rootFileSystemMode);\n } catch (IOException e) {\n System.err.println(PROGRAM_NAME + \": unable to open root file system\");\n System.exit(EXIT_FAILURE);\n }\n\n }", "public static void main(String[] args)\n {\n AppConfig.LoadIntoConfigFiles();\n //configFileName\n }", "public static void loadGameConfiguration() {\n File configFile = new File(FileUtils.getRootFile(), Constant.CONFIG_FILE_NAME);\n manageGameConfigFile(configFile);\n }", "private static void loadConfigs(String[] args) {\n String chosenConfigFile, chosenSensorsFile;\n\n // select config files (allow for specifying)\n if(args.length >= 2) {\n chosenConfigFile = args[0];\n chosenSensorsFile = args[1];\n }\n else {\n chosenConfigFile = DEFAULT_CONFIG_FILE;\n chosenSensorsFile = DEFAULT_SENSORS_FILE;\n }\n // filenames starting with \"/\" and \"./\" are later interpreted as being outside JAR\n if(chosenConfigFile.charAt(0) == '/' || chosenConfigFile.substring(0, 2).equals(\"./\"))\n System.out.println(\"retreiving \" + chosenConfigFile + \" from this filesystem (not the JAR)\");\n if(chosenSensorsFile.charAt(0) == '/' || chosenSensorsFile.substring(0, 2).equals(\"./\"))\n System.out.println(\"retreiving \" + chosenSensorsFile + \" from this filesystem (not the JAR)\");\n\n // load general configuration\n Properties props = new Properties();\n try {\n if(chosenConfigFile.charAt(0) == '/' || chosenConfigFile.substring(0, 2).equals(\"./\"))\n // get the config file from the user's filesystem\n props.load(new FileInputStream(new File(chosenConfigFile)));\n else\n // get the config file saved in this JAR\n props.load(Main.class.getResourceAsStream(\"/\" + chosenConfigFile));\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n // load sensors\n if(chosenSensorsFile.charAt(0) == '/' || chosenSensorsFile.substring(0, 2).equals(\"./\"))\n // get the sensors file from the user's filesystem\n sensors = ConfigLoader.getSensorsFromFile(chosenSensorsFile);\n else\n // get the sensors file saved in this JAR\n sensors = ConfigLoader.getSensorsFromFile(Main.class.getResourceAsStream(\"/\" + chosenSensorsFile));\n }", "private void parseConfig() throws CatascopiaException {\n\t\tthis.config = new Properties();\n\t\t//load config properties file\n\t\ttry {\t\t\t\t\n\t\t\tFileInputStream fis = new FileInputStream(JCATASCOPIA_AGENT_HOME + File.separator + CONFIG_PATH);\n\t\t\tconfig.load(fis);\n\t\t\tif (fis != null)\n\t \t\tfis.close();\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\tthrow new CatascopiaException(\"config file not found\", CatascopiaException.ExceptionType.FILE_ERROR);\n\t\t} \n\t\tcatch (IOException e) {\n\t\t\tthrow new CatascopiaException(\"config file parsing error\", CatascopiaException.ExceptionType.FILE_ERROR);\n\t\t}\n\t}", "public static void loadFromFile() {\n\t\tloadFromFile(Main.getConfigFile(), Main.instance.getServer());\n\t}", "public FileConfiguration loadConfiguration(File file);", "public void loadConfiguration(){\n\t\t\n\t\tString jarLoc = this.getJarLocation();\n\t\tTicklerVars.jarPath = jarLoc;\n\t\tTicklerVars.configPath=TicklerVars.jarPath+TicklerConst.configFileName;\n\t\t\n\t\t//Read configs from conf file\n\t\tif (new File(TicklerVars.configPath).exists()){\n\t\t\ttry {\n\t\t\t\tString line;\n\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(TicklerVars.configPath));\n\t\t\t\twhile ((line =reader.readLine())!= null) {\n\t\t\t\t\tif (line.contains(\"Tickler_local_directory\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length());\n\t\t\t\t\t\tTicklerVars.ticklerDir = this.correctJarLoc(loc);\n\t\t\t\t\t}\n\t\t\t\t\telse if (line.contains(\"Tickler_sdcard_directory\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length()-1);\n\t\t\t\t\t\tTicklerVars.sdCardPath = this.correctJarLoc(loc);\n\t\t\t\t\t}\n\t\t\t\t\telse if (line.contains(\"Frida_server_path\")){\n\t\t\t\t\t\tString loc = line.substring(line.indexOf(\"=\")+1, line.length());\n\t\t\t\t\t\tTicklerVars.fridaServerLoc = loc;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\treader.close();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t//Config path does not exist\n\t\t\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"WARNING...... Configuration file does not exist!!!!\\nThe following default configurations are set:\\n\");\n\t\t\tTicklerVars.ticklerDir = TicklerVars.jarPath+TicklerConst.defaultTicklerDirName;\n\t\t\tSystem.out.println(\"Tickler Workspace directory on host: \"+TicklerVars.ticklerDir);\n\t\t\tSystem.out.println(\"Tickler temporary directory on device: \"+TicklerConst.sdCardPathDefault);\n\t\t}\n\t\t\n\t\tString x = TicklerVars.ticklerDir;\n\t\tif (TicklerVars.ticklerDir == null || TicklerVars.ticklerDir.matches(\"\\\\s*/\") ){\n\t\t\tTicklerVars.ticklerDir = TicklerVars.jarPath+TicklerConst.defaultTicklerDirName;\n//\t\t\tOutBut.printWarning(\"Configuration File \"+TicklerVars.configPath+ \" doesn't specify Tickler_local_directory. Workspace is set at \"+ TicklerVars.ticklerDir);\n\t\t\tOutBut.printStep(\"Tickler Workspace directory on host: \"+TicklerVars.ticklerDir);\n\t\t}\n\t\t\n\t\tif (TicklerVars.sdCardPath == null || TicklerVars.sdCardPath.matches(\"\\\\s*/\")) {\n\t\t\tTicklerVars.sdCardPath = TicklerConst.sdCardPathDefault;\t\n//\t\t\tOutBut.printWarning(\"Configuration File \"+TicklerVars.configPath+ \" doesn't specify Tickler's temp directory on the device. It is set to \"+ TicklerVars.sdCardPath);\n\t\t\tOutBut.printStep(\"Tickler temporary directory on device: \"+TicklerConst.sdCardPathDefault);\n\t\t}\n\t\t\t\n\t}", "public void loadStorageConfiguration() throws IOException {\n String loadedConfigurationFile;\n if (this.configFile != null) {\n loadedConfigurationFile = this.configFile;\n this.configuration = StorageConfiguration.load(new FileInputStream(new File(this.configFile)));\n } else {\n // We load configuration file either from app home folder or from the JAR\n Path path = Paths.get(appHome + \"/conf/storage-configuration.yml\");\n if (appHome != null && Files.exists(path)) {\n loadedConfigurationFile = path.toString();\n this.configuration = StorageConfiguration.load(new FileInputStream(path.toFile()));\n } else {\n loadedConfigurationFile = StorageConfiguration.class.getClassLoader().getResourceAsStream(\"storage-configuration.yml\")\n .toString();\n this.configuration = StorageConfiguration\n .load(StorageConfiguration.class.getClassLoader().getResourceAsStream(\"storage-configuration.yml\"));\n }\n }\n\n // logLevel parameter has preference in CLI over configuration file\n if (this.logLevel == null || this.logLevel.isEmpty()) {\n this.logLevel = \"info\";\n }\n configureDefaultLog(this.logLevel);\n\n // logFile parameter has preference in CLI over configuration file, we first set the logFile passed\n// if (this.logFile != null && !this.logFile.isEmpty()) {\n// this.configuration.setLogFile(logFile);\n// }\n\n // If user has set up a logFile we redirect logs to it\n// if (this.logFile != null && !this.logFile.isEmpty()) {\n// org.apache.log4j.Logger rootLogger = LogManager.getRootLogger();\n//\n// // If a log file is used then console log is removed\n// rootLogger.removeAppender(\"stderr\");\n//\n// // Creating a RollingFileAppender to output the log\n// RollingFileAppender rollingFileAppender = new RollingFileAppender(new PatternLayout(\"%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - \"\n// + \"%m%n\"), this.logFile, true);\n// rollingFileAppender.setThreshold(Level.toLevel(this.logLevel));\n// rootLogger.addAppender(rollingFileAppender);\n// }\n\n logger.debug(\"Loading configuration from '{}'\", loadedConfigurationFile);\n }", "public static void main(String[] args){\n\t\tConfigReader.read(args[0]);\n\t\tConfigReader.printValues();\n\t}", "private static void processIncludedConfig() {\n String configName = \"config.\" + getRunMode() + \".properties\";\n\n //relative path cannot be recognized and not figure out the reason, so here use absolute path instead\n InputStream configStream = Configuration.class.getResourceAsStream(\"/\" + configName);\n if (configStream == null) {\n log.log(Level.WARNING, \"configuration resource {0} is missing\", configName);\n return;\n }\n\n try (InputStreamReader reader = new InputStreamReader(configStream, StandardCharsets.UTF_8)) {\n Properties props = new Properties();\n props.load(reader);\n CONFIG_VALUES.putAll(props);\n } catch (IOException e) {\n log.log(Level.WARNING, \"Unable to process configuration {0}\", configName);\n }\n\n }", "private static int getConfigFromFile(){\n\t\tint ret = -1;\n\t\ttry(BufferedReader r = new BufferedReader(new FileReader(\"./configFile\"))){\n\t\t\tTCPIP = new String(r.readLine().split(\":\")[1]);\n\t\t\tTCPSERVERPORT = Integer.parseInt((r.readLine().split(\":\")[1]));\n\t\t\tMCPORT = Integer.parseInt((r.readLine().split(\":\")[1]));\n\t\t\tMCIP = new String(r.readLine().split(\":\")[1]);\n\t\t\tRMISERVERPORT = Integer.parseInt((r.readLine().split(\":\")[1]));\n\t\t\tret = 0;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Config file not found. Please put it in the execution directory then restart.\");\n\t\t} catch(NumberFormatException e){\n\t\t\tSystem.out.println(\"Config file has an unsupported format. Please check it and restart.\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Some error occurred while reading from config file: \"+e.getMessage()+\"\\nPlease restart.\");\n\t\t}\n\t\treturn ret;\n\t}", "public void loadConfigurationFromDisk() {\r\n try {\r\n FileReader fr = new FileReader(CONFIG_FILE);\r\n BufferedReader rd = new BufferedReader(fr);\r\n\r\n String line;\r\n while ((line = rd.readLine()) != null) {\r\n if (line.startsWith(\"#\")) continue;\r\n if (line.equalsIgnoreCase(\"\")) continue;\r\n\r\n StringTokenizer str = new StringTokenizer(line, \"=\");\r\n if (str.countTokens() > 1) {\r\n String aux;\r\n switch (str.nextToken().trim()) {\r\n case \"system.voidchain.protocol_version\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.protocolVersion = aux;\r\n continue;\r\n case \"system.voidchain.transaction.max_size\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.transactionMaxSize = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.block.num_transaction\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.numTransactionsInBlock = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.storage.data_file_extension\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.dataFileExtension = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.block_file_base_name\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockFileBaseName = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.wallet_file_base_name\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.walletFileBaseName = aux;\r\n }\r\n continue;\r\n case \"system.voidchain.storage.data_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.dataDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.storage.block_file_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.blockFileDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.storage.wallet_file_directory\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null) {\r\n aux = aux.replace('/', File.separatorChar);\r\n if (!aux.endsWith(File.separator))\r\n //aux = aux.substring(0, aux.length() - 1);\r\n aux = aux.concat(File.separator);\r\n this.walletFileDirectory = aux;\r\n }\r\n }\r\n continue;\r\n case \"system.voidchain.memory.block_megabytes\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.memoryUsedForBlocks = Integer.parseInt(aux);\r\n continue;\r\n case \"system.voidchain.sync.block_sync_port\":\r\n if (firstRun) {\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockSyncPort = Integer.parseInt(aux);\r\n }\r\n continue;\r\n case \"system.voidchain.crypto.ec_param\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.ecParam = aux;\r\n continue;\r\n case \"system.voidchain.core.block_proposal_timer\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockProposalTimer = Integer.parseInt(aux) * 1000;\r\n continue;\r\n case \"system.voidchain.blockchain.chain_valid_timer\":\r\n aux = str.nextToken().trim();\r\n if (aux != null)\r\n this.blockchainValidTimer = Integer.parseInt(aux) * 1000;\r\n continue;\r\n }\r\n }\r\n }\r\n\r\n fr.close();\r\n rd.close();\r\n\r\n if (this.firstRun)\r\n this.firstRun = false;\r\n } catch (IOException e) {\r\n logger.error(\"Could not load configuration\", e);\r\n }\r\n }", "@Test\n public final void testConfigurationParser() {\n URL resourceUrl = this.getClass().getResource(configPath);\n File folder = new File(resourceUrl.getFile());\n for (File configFile : folder.listFiles()) {\n try {\n System.setProperty(\"loadbalancer.conf.file\", configFile.getAbsolutePath());\n LoadBalancerConfiguration.getInstance();\n } finally {\n LoadBalancerConfiguration.clear();\n }\n }\n }", "public void readInit(String filename) {\n\t\ttry {\n\t\t\tprefs = new IniPreferences(new Ini(new File(filename)));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif (prefs != null) {\n\t\t\ttry {\n\t\t\t\tif (prefs.nodeExists(MODNAME)) {\n\t\t\t\t\tport = Integer.valueOf(prefs.node(MODNAME).get(\"port\", \"9099\"));\n\t\t\t\t}\n\t\t\t} catch (BackingStoreException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void readPreferences() {\n configAutonomousCommand();\n }", "public String readConfig(Context context) {\n\n String ret = \"\";\n\n try {\n InputStream inputStream = context.openFileInput(\"config.txt\");\n\n if (inputStream != null) {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n String receiveString = \"\";\n StringBuilder stringBuilder = new StringBuilder();\n\n while ((receiveString = bufferedReader.readLine()) != null) {\n stringBuilder.append(receiveString);\n }\n\n inputStream.close();\n ret = stringBuilder.toString();\n }\n } catch (FileNotFoundException e) {\n Log.e(\"Config\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"Config\", \"Can not read file: \" + e.toString());\n }\n\n return ret;\n }", "private void loadLocalConfig()\n {\n try\n {\n // Load the system config file.\n URL fUrl = Config.class.getClassLoader().getResource( PROP_FILE );\n config.setDelimiterParsingDisabled( true );\n if ( fUrl == null )\n {\n String error = \"static init: Error, null cfg file: \" + PROP_FILE;\n LOG.warn( error );\n }\n else\n {\n LOG.info( \"static init: found from: {} path: {}\", PROP_FILE, fUrl.getPath() );\n config.load( fUrl );\n LOG.info( \"static init: loading from: {}\", PROP_FILE );\n }\n\n URL fUserUrl = Config.class.getClassLoader().getResource( USER_PROP_FILE );\n if ( fUserUrl != null )\n {\n LOG.info( \"static init: found user properties from: {} path: {}\", USER_PROP_FILE, fUserUrl.getPath() );\n config.load( fUserUrl );\n }\n }\n catch ( org.apache.commons.configuration.ConfigurationException ex )\n {\n String error = \"static init: Error loading from cfg file: [\" + PROP_FILE\n + \"] ConfigurationException=\" + ex;\n LOG.error( error );\n throw new CfgRuntimeException( GlobalErrIds.FT_CONFIG_BOOTSTRAP_FAILED, error, ex );\n }\n }", "public Config readConfig() throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new File(configPath));\n\t\tStringBuilder finalString = new StringBuilder();\n\t\twhile (sc.hasNextLine()) {\n\t\t\tfinalString.append(sc.nextLine());\n\t\t}\n\t\tsc.close();\n\t\treturn new Gson().fromJson(finalString.toString(), Config.class);\n\t}", "public ConfigProperties read(File fFile) throws GUIReaderException { \n if ( fFile == null || fFile.getName().trim().equalsIgnoreCase(\"\") ) /*no filename for input */\n {\n throw new GUIReaderException\n (\"No input filename specified\",GUIReaderException.EXCEPTION_NO_FILENAME);\n }\n else /* start reading from config file */\n {\n try{ \n URL url = fFile.toURI().toURL();\n \n Map global = new HashMap(); \n Map pm = loader(url, global);\n ConfigProperties cp = new ConfigProperties ();\n cp.setGlobal(global);\n cp.setProperty(pm);\n return cp;\n \n }catch(IOException e){\n throw new GUIReaderException(\"IO Exception during read\",GUIReaderException.EXCEPTION_IO);\n }\n }\n }", "private static void loadSettings() {\n try {\n File settings = new File(\"settings.txt\");\n //Options\n BufferedReader reader = new BufferedReader(new FileReader(settings));\n defaultSliderPosition = Double.parseDouble(reader.readLine());\n isVerticalSplitterPane = Boolean.parseBoolean(reader.readLine());\n verboseCompiling = Boolean.parseBoolean(reader.readLine());\n warningsEnabled = Boolean.parseBoolean(reader.readLine());\n clearOnMethod = Boolean.parseBoolean(reader.readLine());\n compileOptions = reader.readLine();\n runOptions = reader.readLine();\n //Colors\n for(int i = 0; i < colorScheme.length; i++) \n colorScheme[i] = new Color(Integer.parseInt(reader.readLine()));\n\n for(int i = 0; i < attributeScheme.length; i++) {\n attributeScheme[i] = new SimpleAttributeSet();\n attributeScheme[i].addAttribute(StyleConstants.Foreground, colorScheme[i]);\n }\n\n theme = reader.readLine();\n\n reader.close(); \n } catch (FileNotFoundException f) {\n println(\"Couldn't find the settings. How the hell.\", progErr);\n } catch (IOException i) {\n println(\"General IO exception when loading settings.\", progErr);\n } catch (Exception e) {\n println(\"Catastrophic failure when loading settings.\", progErr);\n println(\"Don't mess with the settings file, man!\", progErr);\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tFileReader fr = new FileReader(\"config.properties\");\n\t\tMyBufferedReader mybr = new MyBufferedReader(fr);\n\t\tint a = 0;\n\t\twhile ((a = mybr.myRead()) != -1) {\n\t\t\tSystem.out.print((char)97);\n\t\t}\n\n\t}", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "public static void main(String[] args) throws ClassNotFoundException, IOException {\n InputStream n = Class.forName(\"com.ezzra.Main\").getClassLoader().getResourceAsStream(\"config.properties\");\n// System.out.println(path);\n InputStream rin = Main.class.getClassLoader().getResourceAsStream(\"config.properties\");\n// InputStream in = new FileInputStream(path);\n Reader reader = new InputStreamReader(n,\"GBK\");\n Properties prop = new Properties();\n prop.load(reader);\n System.out.println(prop);\n }", "public Properties loadConfig(){\n\t\tprintln(\"Begin loadConfig \");\n\t\tProperties prop = null;\n\t\t prop = new Properties();\n\t\ttry {\n\t\t\t\n\t\t\tprop.load(new FileInputStream(APIConstant.configFullPath));\n\n\t } catch (Exception ex) {\n\t ex.printStackTrace();\n\t println(\"Exception \"+ex.toString());\n\t \n\t }\n\t\tprintln(\"End loadConfig \");\n\t\treturn prop;\n\t\t\n\t}", "private void loadConfig() throws IOException {\r\n final boolean hasPropertiesFile = configFile != null && configFile.exists() \r\n && configFile.canRead() && configFile.isFile();\r\n if (hasPropertiesFile) {\r\n Properties props = new Properties();\r\n FileInputStream fis = null;\r\n try {\r\n fis = new FileInputStream(configFile);\r\n props.load(fis);\r\n Iterator<Object> keys = props.keySet().iterator();\r\n envVariables = new ArrayList<Variable>();\r\n while (keys.hasNext()) {\r\n String key = (String) keys.next();\r\n if (key.equalsIgnoreCase(GRKeys.GDAL_CACHEMAX)) {\r\n // Setting GDAL_CACHE_MAX Environment variable if available\r\n String cacheMax = null;\r\n try {\r\n cacheMax = (String) props.get(GRKeys.GDAL_CACHEMAX);\r\n if (cacheMax != null) {\r\n int gdalCacheMaxMemory = Integer.parseInt(cacheMax); // Only for validation\r\n Variable var = new Variable();\r\n var.setKey(GRKeys.GDAL_CACHEMAX);\r\n var.setValue(cacheMax);\r\n envVariables.add(var);\r\n }\r\n } catch (NumberFormatException nfe) {\r\n if (LOGGER.isLoggable(Level.WARNING)) {\r\n LOGGER.log(Level.WARNING, \"Unable to parse the specified property as a number: \"\r\n + cacheMax, nfe);\r\n }\r\n }\r\n } else if (key.equalsIgnoreCase(GRKeys.GDAL_DATA)\r\n || key.equalsIgnoreCase(GRKeys.GDAL_LOGGING_DIR)\r\n || key.equalsIgnoreCase(GRKeys.TEMP_DIR)) {\r\n // Parsing specified folder path\r\n String path = (String) props.get(key);\r\n if (path != null) {\r\n final File directory = new File(path);\r\n if (directory.exists() && directory.isDirectory()\r\n && ((key.equalsIgnoreCase(GRKeys.GDAL_DATA) && directory.canRead()) || directory.canWrite())) {\r\n Variable var = new Variable();\r\n var.setKey(key);\r\n var.setValue(path);\r\n envVariables.add(var);\r\n \r\n } else {\r\n if (LOGGER.isLoggable(Level.WARNING)) {\r\n LOGGER.log(Level.WARNING, \"The specified folder for \" + key + \" variable isn't valid, \"\r\n + \"or it doesn't exist or it isn't a readable directory or it is a \" \r\n + \"destination folder which can't be written: \" + path);\r\n }\r\n }\r\n }\r\n } else if (key.equalsIgnoreCase(GRKeys.EXECUTION_TIMEOUT)) {\r\n // Parsing execution timeout\r\n String timeout = null;\r\n try {\r\n timeout = (String) props.get(GRKeys.EXECUTION_TIMEOUT);\r\n if (timeout != null) {\r\n executionTimeout = Long.parseLong(timeout); // Only for validation\r\n }\r\n } catch (NumberFormatException nfe) {\r\n if (LOGGER.isLoggable(Level.WARNING)) {\r\n LOGGER.log(Level.WARNING, \"Unable to parse the specified property as a number: \"\r\n + timeout, nfe);\r\n }\r\n }\r\n } else if (key.equalsIgnoreCase(GRKeys.GDAL_WARP_PARAMS)\r\n || key.equalsIgnoreCase(GRKeys.GDAL_TRANSLATE_PARAMS)) {\r\n // Parsing gdal operations custom option parameters\r\n String param = (String) props.get(key);\r\n if (param != null) {\r\n if (key.equalsIgnoreCase(GRKeys.GDAL_WARP_PARAMS)) {\r\n gdalWarpingParameters = param.trim();\r\n } else {\r\n gdalTranslateParameters = param.trim();\r\n }\r\n }\r\n } else if (key.endsWith(\"PATH\")) {\r\n // Dealing with properties like LD_LIBRARY_PATH, PATH, ...\r\n String param = (String) props.get(key);\r\n if (param != null) {\r\n Variable var = new Variable();\r\n var.setKey(key);\r\n var.setValue(param);\r\n envVariables.add(var);\r\n }\r\n }\r\n }\r\n \r\n } catch (FileNotFoundException e) {\r\n if (LOGGER.isLoggable(Level.WARNING)) {\r\n LOGGER.log(Level.WARNING, \"Unable to parse the config file: \" + configFile.getAbsolutePath(), e);\r\n }\r\n \r\n } catch (IOException e) {\r\n if (LOGGER.isLoggable(Level.WARNING)) {\r\n LOGGER.log(Level.WARNING, \"Unable to parse the config file: \" + configFile.getAbsolutePath(), e);\r\n }\r\n } finally {\r\n if (fis != null) {\r\n try {\r\n fis.close();\r\n } catch (Throwable t) {\r\n // Does nothing\r\n }\r\n }\r\n }\r\n }\r\n }", "public Configuration parse() {\n final CommandLineParser parser = new BasicParser();\n final CommandLine cmd;\n\n try {\n cmd = parser.parse(options, args);\n\n if (cmd.hasOption(\"h\"))\n return help();\n\n if (cmd.hasOption(\"f\")) {\n return configurationFromFile(cmd.getOptionValue(\"f\"));\n } else if (cmd.hasOption(\"u\")) {\n return configurationFromUrl(cmd.getOptionValue(\"u\"));\n } else if (0 < args.length) {\n logback.warn(\"Unknown parameter: \" + args[0]);\n return help();\n } else {\n return configurationFromResource();\n }\n\n } catch (final ParseException e) {\n logback.error(\"Failed to parse command line properties\", e);\n return help();\n }\n }", "private ConfigReader() {\r\n\t\tsuper();\r\n\t}", "public static void acceptConfig() {\r\n\t\t//Here, it tries to read over the config file using try-catch in case of Exception\r\n\t\ttry {\r\n\t\t\tProperties properties = new Properties();\r\n\t\t\tFileInputStream fis = new FileInputStream(new File(\"config.properties\"));\r\n\t\t\tproperties.load(fis);\r\n\t\t\tString storage = properties.getProperty(\"storage\");\r\n\t\t\tif(storage == null) \r\n\t\t\t\tthrow new IllegalArgumentException(\"Property 'storage' not found\");\r\n\t\t\tif(storage.equals(\"tree\"))\r\n\t\t\t\tdata = new BinarySearchTree();\r\n\t\t\tif(storage.equals(\"trie\"))\r\n\t\t\t\tdata = new Trie();\r\n\t\t\tif(data == null) \r\n\t\t\t\tthrow new IllegalArgumentException(\"Not valid storage configuration.\");\r\n\t\t}\r\n\t\t//If an Exception occurs, it just prints a message\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"Configuration file not found.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error reading the configuration file.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "public void parse(){\n\t\tFile file = new File(fileLocation);\n\n\t\tlong seed = ConfigurationData.DEFAULT_SEED;\n\t\tString outputDest = ConfigurationData.DEFAULT_OUTPUT_DESTINATION;\n\t\tLong tickLength = ConfigurationData.DEFAULT_TICK_LENGTH;\n\t\tint port = ConfigurationData.DEFAULT_PORT;\n\n\t\ttry {\n\n\t\t\tScanner sc = new Scanner(file);\n\n\t\t\twhile(sc.hasNext()){\n\t\t\t\tString[] tok = sc.next().split(\"=\");\n\t\t\t\tswitch(tok[0]){\n\t\t\t\tcase \"seed\":\n\t\t\t\t\tseed = Long.parseLong(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"outputDestination\":\n\t\t\t\t\toutputDest = tok[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"tickLength\":\n\t\t\t\t\ttickLength = Long.parseLong(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"port\":\n\t\t\t\t\tport = Integer.parseInt(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsc.close();\n\n\t\t\tconfigurationData = new ConfigurationData(seed, outputDest, tickLength, port);\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\tPrintWriter writer;\n\t\t\ttry {\n\t\t\t\twriter = new PrintWriter(fileLocation, \"UTF-8\");\n\t\t\t\twriter.println(\"seed=\"+seed);\n\t\t\t\twriter.println(\"outputDestination=\"+outputDest);\n\t\t\t\twriter.println(\"tickLength=\"+tickLength);\n\t\t\t\twriter.println(\"port=\"+port);\n\t\t\t\twriter.close();\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tconfigurationData = ConfigurationData.makeDefault();\n\t\t\tSystem.out.println(\"Default file created\");\n\t\t}\n\t}", "String getConfigFileName();", "private void loadData() {\n\n \tInputStream inputStream = this.getClass().getResourceAsStream(propertyFilePath);\n \n //Read configuration.properties file\n try {\n //prop.load(new FileInputStream(propertyFilePath));\n \tprop.load(inputStream);\n //prop.load(this.getClass().getClassLoader().getResourceAsStream(\"configuration.properties\"));\n } catch (IOException e) {\n System.out.println(\"Configuration properties file cannot be found\");\n }\n \n //Get properties from configuration.properties\n browser = prop.getProperty(\"browser\");\n testsiteurl = prop.getProperty(\"testsiteurl\");\n defaultUserName = prop.getProperty(\"defaultUserName\");\n defaultPassword = prop.getProperty(\"defaultPassword\");\n }", "public Config() {\n this(System.getProperties());\n\n }", "@Test\n public void getFileLocation() throws Exception {\n ReadConfig conf = new ReadConfig();\n try {\n conf.getFileLocation();\n } catch (Exception e) {\n assertTrue(e.getMessage().equals(\"Try to access config file before reading it.\") );\n }\n try {\n conf.readFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n assertNotNull(conf.getFileLocation());\n }", "static Properties loadConfigFile(String configFileName)\n {\n Properties config = new Properties();\n\n try\n {\n config.load(new FileInputStream(configFileName));\n }\n catch (IOException e)\n {\n System.err.println(\"FAILURE: Error loading configuration file\");\n System.err.println(e.getMessage());\n System.exit(BAD_RUN);\n }\n\n //xifdef DEVELOPMENT\n //System.err.println(\"Configuration file:\");\n //config.list(System.err);\n //xendif\n\n return config;\n }", "private void initialize(String configLocation) throws IOException {\n\t\tInputStream input = null;\n\t\tProperties props = null;\n\t\ttry {\n\t\t\tinput = SystemListener.class.getResourceAsStream(configLocation);\n\t\t\tprops = new Properties();\n\t\t\tprops.load(input);\t\t\t\n\t\t} finally {\n\t\t\tif (input != null) {\n\t\t\t\tinput.close();\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"System Configration initialize Details:\");\n\t\t\n\t\tfor (Entry<Object, Object> entry : props.entrySet()) {\n\t\t String key=(String)entry.getKey();\n\t\t String value=(String)entry.getValue();\n\t\t System.out.println(\"|------ key[\"+key+\"];value[\"+value+\"]\");\n\t\t\tSystem.setProperty(key , value);\n\t\t}\n\t\tSystem.out.println(\"-------finish\");\n\t}", "public Config(String filename) {\n this.filename = filename;\n }", "private void init() {\r\n this.configMapping = ChannelConfigHolder.getInstance().getConfigs();\r\n if (!isValid(this.configMapping)) {\r\n SystemExitHelper.exit(\"Cannot load the configuations from the configuration file please check the channelConfig.xml\");\r\n }\r\n }", "public void loadConfig(){\r\n File config = new File(\"config.ini\");\r\n if(config.exists()){\r\n try {\r\n Scanner confRead = new Scanner(config);\r\n \r\n while(confRead.hasNextLine()){\r\n String line = confRead.nextLine();\r\n if(line.indexOf('=')>0){\r\n String setting,value;\r\n setting = line.substring(0,line.indexOf('='));\r\n value = line.substring(line.indexOf('=')+1,line.length());\r\n \r\n //Perform the actual parameter check here\r\n if(setting.equals(\"romfile\")){\r\n boolean result;\r\n result = hc11_Helpers.loadBinary(new File(value.substring(value.indexOf(',')+1,value.length())),board,\r\n Integer.parseInt(value.substring(0,value.indexOf(',')),16));\r\n if(result)\r\n System.out.println(\"Loaded a rom file.\");\r\n else\r\n System.out.println(\"Error loading rom file.\");\r\n }\r\n }\r\n }\r\n confRead.close();\r\n } catch (FileNotFoundException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }", "public String readConfig(String path) throws Exception {\n\t\treturn getObject(path + CONFIG);\n\t}", "private static Properties setup() {\n Properties props = System.getProperties();\n try {\n props.load(new FileInputStream(new File(\"src/config.properties\")));\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(-1);\n }\n return props;\n }", "private Properties readProperties() throws IOException {\n\t\tProperties props = new Properties();\n\t\t\n\t\tFileInputStream in = new FileInputStream(\"Config.properties\");\n\t\tprops.load(in);\n\t\tin.close();\n\t\treturn props;\n\t}", "private void loadSettings() {\r\n \tString fname = baseDir + \"/\" + configFile;\r\n\t\tString line = null;\r\n\r\n\t\t// Load the settings hash with defaults\r\n\t\tsettings.put(\"db_url\", \"\");\r\n\t\tsettings.put(\"db_user\", \"\");\r\n\t\tsettings.put(\"db_pass\", \"\");\r\n\t\tsettings.put(\"db_min\", \"2\");\r\n\t\tsettings.put(\"db_max\", \"10\");\r\n\t\tsettings.put(\"db_query\", \"UPDATE members SET is_activated=1 WHERE memberName=? AND is_activated=3\");\r\n\t\t// Read the current file (if it exists)\r\n\t\ttry {\r\n \t\tBufferedReader input = new BufferedReader(new FileReader(fname));\r\n \t\twhile (( line = input.readLine()) != null) {\r\n \t\t\tline = line.trim();\r\n \t\t\tif (!line.startsWith(\"#\") && line.contains(\"=\")) {\r\n \t\t\t\tString[] pair = line.split(\"=\", 2);\r\n \t\t\t\tsettings.put(pair[0], pair[1]);\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \tcatch (FileNotFoundException e) {\r\n\t\t\tlogger.warning( \"[SMF] Error reading \" + e.getLocalizedMessage() + \", using defaults\" );\r\n \t}\r\n \tcatch (Exception e) {\r\n \t\te.printStackTrace();\r\n \t}\r\n }", "public void readConfigXml() throws SerializationException {\n\n IPathManager pm = PathManagerFactory.getPathManager();\n LocalizationContext lc = pm.getContext(LocalizationType.COMMON_STATIC,\n LocalizationLevel.SITE);\n\n lf = pm.getLocalizationFile(lc, CONFIG_FILE_NAME);\n lf.addFileUpdatedObserver(this);\n File file = lf.getFile();\n // System.out.println(\"Reading -- \" + file.getAbsolutePath());\n if (!file.exists()) {\n System.out.println(\"WARNING [FFMP] FFMPRunConfigurationManager: \"\n + file.getAbsolutePath() + \" does not exist.\");\n return;\n }\n\n FFMPRunConfigXML configXmltmp = null;\n\n configXmltmp = jaxb.unmarshalFromXmlFile(file.getAbsolutePath());\n\n configXml = configXmltmp;\n isPopulated = true;\n applySourceConfigOverrides();\n }", "public static void main(String[] args) {\n\t\tpublic static CfgSingletonfactory getpropertiesfromFile() {\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "static void getProps() throws Exception {\r\n\t\tFileReader fileReader = new FileReader(\"C:\\\\repos\\\\test\\\\src\\\\main\\\\java\\\\test\\\\config.properties\");\r\n\t\tProperties properties = new Properties();\r\n\r\n\t\tproperties.load(fileReader);\r\n\r\n\t\tSystem.out.println(\"By using File Reader: \" + properties.getProperty(\"username\"));\r\n\r\n\t}", "private final void config() {\n\t\tfinal File configFile = new File(\"plugins\" + File.separator\n\t\t\t\t+ \"GuestUnlock\" + File.separator + \"config.yml\");\n\t\tif (!configFile.exists()) {\n\t\t\tthis.plugin.saveDefaultConfig();\n\t\t\tMain.INFO(\"Created default configuration-file\");\n\t\t}\n\t}", "private static void processLocalConfig() {\n String localConfigFile = getConfigValue(SYSPROP_LOCAL_CONFIG_FILE);\n if (localConfigFile == null || localConfigFile.isEmpty()) {\n log.log(Level.FINE, \"No local configuration defined, skipping associated processing\");\n return;\n }\n\n log.log(Level.FINE, \"Processing configuration file {0}\", localConfigFile);\n Path p = Paths.get(localConfigFile);\n if (!Files.exists(p)) {\n log.log(Level.WARNING, \"Path {0} does not exist\", p.toString());\n return;\n } else if (!Files.isRegularFile(p)) {\n log.log(Level.WARNING, \"Path {0} is not a file\", p.toString());\n return;\n } else if (!Files.isReadable(p)) {\n log.log(Level.WARNING, \"File {0} is not readable\", p.toString());\n return;\n }\n\n Properties prop = new Properties();\n try (BufferedReader reader = Files.newBufferedReader(p, StandardCharsets.UTF_8)) {\n prop.load(reader);\n } catch (IOException e) {\n log.log(Level.WARNING, \"Error occurred while reading \" + p.toString(), e);\n }\n CONFIG_VALUES.putAll(prop);\n }", "public static void main(String[] args) throws IOException\r\n\t{\n\t\tFileInputStream fis=new FileInputStream(\"D:\\\\QSpiders_2019\\\\html\\\\config.properties.txt\");\r\n\t\t//Create an object of Properties class since getproperty() is a non-static method\r\n\t\tProperties prop=new Properties();\r\n\t\t//load the file into Properties class\r\n\t\tprop.load(fis);\r\n\t\t//read the data from Properties file using Key\r\n\t\tString URL =prop.getProperty(\"url\");\r\n\t\tSystem.out.println(URL);\r\n\t\tSystem.out.println(prop.getProperty(\"username\"));\r\n\t\tSystem.out.println(prop.getProperty(\"password\"));\r\n\t\tSystem.out.println(prop.getProperty(\"browser\"));\r\n\r\n\t}", "@Test\n public void testLoadConfigurationFromFileName()\n throws ConfigurationException\n {\n factory = new DefaultConfigurationBuilder(TEST_FILE.getAbsolutePath());\n checkConfiguration();\n }", "private static void readSiteConfig() {\n\n\t\ttry(BufferedReader br = new BufferedReader(new FileReader(\"SiteConfiguration.txt\"))) {\n\t\t\twhile (br.ready()) {\n\t\t\t\tString line = br.readLine().strip().toUpperCase();\n\t\t\t\tSite readSite = new Site(line);\n\n\t\t\t\tsites.putIfAbsent(readSite.getSiteName(), readSite);\n\t\t\t}\n\t\t}catch (IOException ioe) {\n\t\t\tlogger.log(Level.WARNING, \"Could not read SiteConfig file properly! \" + ioe);\n\t\t}\n\t}", "public void readProperties() {\r\n File directory = new File(OptionItems.XML_DEFINITION_PATH);\r\n if (directory.exists()) {\r\n propertyParserXML.readPropertyDefinition(configData.getPropertyList());\r\n propertyParserXML.processPropertyDependency();\r\n }\r\n Log.info(\"info.progress_control.load_property_description\");\r\n }", "public static void main(String[] args) {\n\t\tString configFileName = args[0];\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\t// Read File\r\n\t\tRIP_v2 reader = new RIP_v2();\r\n\t\treader.readFile(configFileName);\r\n\t}", "public Configuration(File configFile) {\r\n \t\tproperties = loadProperties(configFile);\r\n \t}", "@Override\n public void init(File jsonFile) throws PluginException {\n try {\n config = new JsonSimpleConfig(jsonFile);\n reset();\n } catch (IOException e) {\n log.error(\"Error reading config: \", e);\n }\n }", "private AppConfigLoader() {\r\n\r\n\t\tProperties appConfigPropertySet = new Properties();\r\n\t\tProperties envConfigPropertySet = new Properties();\r\n\r\n\t\ttry {\r\n\r\n\t\t\t// read properties file\r\n\t\t\tInputStream appConfigPropertyStream = AppConfigLoader.class\r\n\t\t\t\t\t.getResourceAsStream(\"/config/baseAppConfig.properties\");\r\n\t\t\tappConfigPropertySet.load(appConfigPropertyStream);\r\n\r\n\t\t\tInputStream envConfigPropertyStream = null;\r\n\r\n\t\t\t// check if current environment is defined (QA, Integration or Staging)\r\n\t\t\tif (System.getProperty(\"environment\") != null) {\r\n\t\t\t\tenvConfigPropertyStream = AppConfigLoader.class\r\n\t\t\t\t\t\t.getResourceAsStream(\"/config/\" + System.getProperty(\"environment\") + \"/appConfig.properties\");\r\n\t\t\t\tSystem.out.println(\"********'ENVIRONMENT Details taken from Runtime'********\");\r\n\t\t\t\tSystem.out.println(\"********'\" + System.getProperty(\"environment\") + \" ENVIRONMENT'********\");\r\n\t\t\t\tenvironment = System.getProperty(\"environment\");\r\n\t\t\t} else {\r\n\t\t\t\tenvConfigPropertyStream = AppConfigLoader.class.getResourceAsStream(\r\n\t\t\t\t\t\t\"/config/\" + appConfigPropertySet.getProperty(\"CurrentEnvironment\") + \"/appConfig.properties\");\r\n\t\t\t\tSystem.out.println(\"********'ENVIRONMENT Details taken from Baseapp config property file'********\");\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"********'\" + appConfigPropertySet.getProperty(\"CurrentEnvironment\") + \" ENVIRONMENT'********\");\r\n\t\t\t\tenvironment = appConfigPropertySet.getProperty(\"CurrentEnvironment\");\r\n\t\t\t}\r\n\r\n\t\t\tenvConfigPropertySet.load(envConfigPropertyStream);\r\n\r\n\t\t\tthis.sampleURL = envConfigPropertySet.getProperty(\"SampleUrl\");\r\n\t\t\tthis.sampleAPIURL = envConfigPropertySet.getProperty(\"SampleAPIUrl\");\r\n\r\n\t\t\tthis.sampleDbConnectionString = envConfigPropertySet.getProperty(\"SampleConnectionString\");\r\n\r\n\t\t\tenvConfigPropertyStream.close();\r\n\t\t\tappConfigPropertyStream.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static void configure(File file) {\r\n Properties prop = new Properties();\r\n FileInputStream in = null;\r\n try {\r\n in = new FileInputStream(file);\r\n prop.load(in);\r\n in.close();\r\n Configuration.configure(prop);\r\n } catch (IOException e) {\r\n LogManager.getLogger(Configuration.class).error(\"While reading configuration file \" \r\n + file.getAbsolutePath() + \": \" + e.getMessage());\r\n if (null != in) {\r\n try {\r\n in.close();\r\n } catch (IOException e1) {\r\n // ignore\r\n }\r\n }\r\n }\r\n }", "@Override\n public int run(String args[]) {\n// for (int i = 0; i < args.length; ++i) {\n// System.out.println(\"Argument \" + i + \": \" + args[i]);\n// }\n//\n this.conf = super.getConf();\n\n FileSystem fileSystem; // = null;\n\n try {\n UserConfig.init(args[0]);\n } catch (IOException ex) {\n System.err.println(\"Cannot open configuration file \" + args[0]);\n ex.printStackTrace(System.err);\n System.exit(1);\n }\n\n if (conf == null) {\n System.err.println(\"Configuration null!\");\n }\n\n try {\n this.bamfileStr = UserConfig.getBamFile();\n File bamFile = new File(bamfileStr);\n String subFolderName = bamFile.getName().substring(0, bamFile.getName().lastIndexOf(\".\"));\n String SRPEFolder = \"workdir\" + File.separator + \"sr_pe\" + File.separator + subFolderName;\n String depthFolder = \"workdir\" + java.io.File.separator + \"depth\" + java.io.File.separator + subFolderName;\n String sortedFolder = \"workdir\" + java.io.File.separator + \"sorted\" + java.io.File.separator + subFolderName;\n String partitioningFolder = \"workdir\" + java.io.File.separator + \"partitioning\" + java.io.File.separator + subFolderName;\n String binsFolder = \"workdir\" + java.io.File.separator + \"bins\" + java.io.File.separator + subFolderName;\n String cnvFolder = \"workdir\" + java.io.File.separator + \"cnv\" + java.io.File.separator + subFolderName;\n// if (debug) {\n// System.out.println(\"\\nbamfileStr: \" + bamfileStr + \" subFolderName: \" + subFolderName\n// + \" depthFolder: \" + depthFolder + \" sortedFolder: \" + sortedFolder\n// + \" partitioningFolder: \" + partitioningFolder\n// + \" binsFolder: \" + binsFolder + \" cnvFolder: \" + cnvFolder);\n// }\n// System.exit(0);\n //Get all the configurations \n float abberation_penalty = UserConfig.getAbberationPenalty();\n \tfloat transition_penalty = UserConfig.getTransitionPenalty(); \n int numReduceTasksBig = UserConfig.getBamFileReducers();\n int numReduceTasksSmall = UserConfig.getTextFileReducers();\n boolean runVcfLookup = UserConfig.getInitVcf();\n boolean runDepthCallJob = UserConfig.getRunDepthCaller();\n boolean runRegionBinJob = UserConfig.getRunBinner();\n boolean runCnvCallJob = UserConfig.getRunCnvCaller();\n boolean runGlobalSortJob = UserConfig.getRunGlobalSort();\n boolean runSR_PE_ExtractionJob = UserConfig.getRun_SR_PE_Extracter();\n \n int numRecudeTasks = UserConfig.getReducerTasks();\n System.err.println(\"L1: \"+UserConfig.getAbberationPenalty() );\n System.err.println(\"L2: \"+UserConfig.getTransitionPenalty() );\n if (debug) {\n System.err.println(\"numReduceTasksBig: \" + numReduceTasksBig\n + \" numReduceTasksSmall: \" + numReduceTasksSmall\n + \" runVcfLookup: \" + runVcfLookup\n + \" runDepthCallJob: \" + runDepthCallJob\n + \" runRegionBinJob: \" + runRegionBinJob\n + \" runCnvCallJob: \" + runCnvCallJob\n + \" runGlobalSortJob: \" + runGlobalSortJob);\n }\n\n fileSystem = FileSystem.get(conf);\n if(runSR_PE_ExtractionJob){\n this.bamfile = new Path(bamfileStr);\n\n Job SRPEJob = Job.getInstance(conf, \"SR PE extracter\");\n SRPEJob.setJobName(\"sr_pe_Extracter\");\n SRPEJob.setNumReduceTasks(1);\n SRPEJob.setInputFormatClass(AnySAMInputFormat.class);\n SRPEJob.setJarByClass(PennCnvSeq.class);\n \n SRPEJob.setMapperClass(SRPEReadMapper.class);\n SRPEJob.setMapOutputKeyClass(RefBinKey.class);\n SRPEJob.setMapOutputValueClass(Text.class);\n \n SRPEJob.setReducerClass(SRPEReducer.class);\n SRPEJob.setOutputKeyClass(NullWritable.class);\n SRPEJob.setOutputValueClass(Text.class);\n //InputSampler.Sampler<String, String> sampler = new InputSampler.RandomSampler<>(pcnt, numSamples, maxSplits);\n \n //SRPEJob.setPartitionerClass(TotalOrderPartitioner.class);\n \n //Delete the directory before processing it\n FileInputFormat.addInputPath(SRPEJob, bamfile);\n fileSystem.delete(new Path(SRPEFolder), true);\n FileOutputFormat.setOutputPath(SRPEJob, new Path(SRPEFolder));\n \n MultipleOutputs.addNamedOutput(SRPEJob, \"sr\", TextOutputFormat.class, NullWritable.class, Text.class);\n MultipleOutputs.addNamedOutput(SRPEJob, \"pe\", TextOutputFormat.class, NullWritable.class, Text.class);\n \n //TotalOrderPartitioner.setPartitionFile(SRPEJob.getConfiguration(), new Path(\"workdir/partitioning\"));\n //InputSampler.writePartitionFile(SRPEJob, sampler);\n \n System.out.println(\"Submitting SR_PE caller.\");\n if (!SRPEJob.waitForCompletion(true)) {\n System.out.println(\"Global sort failed.\");\n return 1;\n }\n \n }\n\n \n if (runDepthCallJob) {\n //conf.setInt(\"dfs.blocksize\",512*1024*1024);\n //conf.set(\"yarn.scheduler.minimum-allocation-mb\",UserConfig.getYarnContainerMinMb());\n //System.out.println(\"Memory configuration YARN min MB: \"+conf.get(\"yarn.scheduler.minimum-allocation-mb\"));\n\n //conf.set(\"yarn.scheduler.maximum-allocation-mb\",UserConfig.getYarnContainerMaxMb());\n //System.out.println(\"Memory configuration YARN max MB: \"+conf.get(\"yarn.scheduler.maximum-allocation-mb\"));\n //conf.set(\"mapred.child.java.opts\", \"-Xms\"+UserConfig.getHeapsizeMinMb()+\"m -Xmx\"+UserConfig.getHeapsizeMaxMb()+\"m\");\n //System.out.println(\"Memory configuration Heap in MB: \"+conf.get(\"mapred.child.java.opts\"));\n //conf.set(\"mapreduce.map.memory.mb\",UserConfig.getMapperMb());\n //System.out.println(\"Memory configuration Mapper MB: \"+conf.get(\"mapreduce.map.memory.mb\"));\n //conf.set(\"mapreduce.reduce.memory.mb\",UserConfig.getReducerMb());\n //System.out.println(\"Memory configuration Reducer MB: \"+conf.get(\"mapreduce.reduce.memory.mb\"));\n// this.bamfileStr = UserConfig.getBamFile();\n this.bamfile = new Path(bamfileStr);\n System.out.println(\"Bamfile is at \" + bamfile);\n Job depthCallJob = Job.getInstance(conf, \"Depth Call Job\");\n depthCallJob.setJobName(\"depth_caller\");\n depthCallJob.setNumReduceTasks(numReduceTasksBig);\n depthCallJob.setInputFormatClass(AnySAMInputFormat.class);\n depthCallJob.setJarByClass(PennCnvSeq.class);\n boolean use_window_mapper = true;\n if (use_window_mapper) {\n depthCallJob.setMapperClass(SAMRecordWindowMapper.class);\n depthCallJob.setMapOutputKeyClass(RefBinKey.class);\n depthCallJob.setMapOutputValueClass(ArrayPrimitiveWritable.class);\n depthCallJob.setReducerClass(AlleleDepthWindowReducer.class);\n } else {\n System.out.println(\"No window mapper version not implemented.\");\n return -1;\n }\n depthCallJob.setOutputKeyClass(RefPosBaseKey.class);\n depthCallJob.setOutputValueClass(DoubleWritable.class);\n //Delete the depth call directory before processing it\n FileInputFormat.addInputPath(depthCallJob, bamfile);\n fileSystem.delete(new Path(depthFolder), true);\n FileOutputFormat.setOutputPath(depthCallJob, new Path(depthFolder));\n System.out.println(\"Submitting read depth caller.\");\n if (!depthCallJob.waitForCompletion(true)) {\n System.out.println(\"Depth caller failed.\");\n return -1;\n }\n\n if (debug) {\n System.out.println(\"Done of submitting read depth caller.\");\n endTime = System.currentTimeMillis();\n String runningTime = \"Running Time: \" + Math.rint((endTime - startTime) * 100) / 100000.0 + \" seconds.\\n\";\n System.out.println(runningTime + \"\\n\");\n }\n }\n \n //The Global Sort is only for debug purposes \n if (runGlobalSortJob) {\n int numReduceTasks = numReduceTasksSmall;\n double pcnt = 10.0;\n int numSamples = numReduceTasks;\n int maxSplits = numReduceTasks - 1;\n if (0 >= maxSplits) {\n maxSplits = Integer.MAX_VALUE;\n }\n// InputSampler.Sampler sampler = new InputSampler.RandomSampler(pcnt, numSamples, maxSplits);\n InputSampler.Sampler<String, String> sampler = new InputSampler.RandomSampler<>(pcnt, numSamples, maxSplits);\n\n// Job regionSortJob = new Job(conf);\n Job regionSortJob = Job.getInstance(conf, \"Region Sort Job\");\n regionSortJob.setJobName(\"sorter\");\n regionSortJob.setJarByClass(PennCnvSeq.class);\n regionSortJob.setNumReduceTasks(numReduceTasks);\n regionSortJob.setInputFormatClass(SortInputFormat.class);\n regionSortJob.setMapperClass(Mapper.class);\n regionSortJob.setMapOutputKeyClass(RefPosBaseKey.class);\n regionSortJob.setMapOutputValueClass(Text.class);\n regionSortJob.setReducerClass(Reducer.class);\n regionSortJob.setOutputKeyClass(RefPosBaseKey.class);\n regionSortJob.setOutputValueClass(Text.class);\n// FileInputFormat.addInputPath(regionSortJob, new Path(\"workdir/depth/\"));\n// fileSystem.delete(new Path(\"workdir/sorted\"), true);\n// FileOutputFormat.setOutputPath(regionSortJob, new Path(\"workdir/sorted/\"));\n FileInputFormat.addInputPath(regionSortJob, new Path(depthFolder));\n fileSystem.delete(new Path(sortedFolder), true);\n FileOutputFormat.setOutputPath(regionSortJob, new Path(sortedFolder));\n regionSortJob.setPartitionerClass(TotalOrderPartitioner.class);\n// TotalOrderPartitioner.setPartitionFile(regionSortJob.getConfiguration(), new Path(\"workdir/partitioning\"));\n TotalOrderPartitioner.setPartitionFile(regionSortJob.getConfiguration(), new Path(partitioningFolder));\n InputSampler.writePartitionFile(regionSortJob, sampler);\n System.out.println(\"Submitting global sort.\");\n if (!regionSortJob.waitForCompletion(true)) {\n System.out.println(\"Global sort failed.\");\n return 1;\n }\n\n if (debug) {\n System.out.println(\"Done of submitting global sort.\");\n endTime = System.currentTimeMillis();\n String runningTime = \"Running Time: \" + Math.rint((endTime - startTime) * 100) / 100000.0 + \" seconds.\\n\";\n System.out.println(runningTime + \"\\n\");\n }\n }\n\n if (runVcfLookup) {\n this.vcffileStr = UserConfig.getVcfFile();\n this.vcffile = new Path(vcffileStr);\n System.out.println(\"Vcffile is at \" + vcffile);\n VcfLookup lookup = new VcfLookup();\n lookup.parseVcf2Text(vcffileStr);\n\n if (debug) {\n System.out.println(\"Done of runVcfLookup.\");\n endTime = System.currentTimeMillis();\n String runningTime = \"Running Time: \" + Math.rint((endTime - startTime) * 100) / 100000.0 + \" seconds.\\n\";\n System.out.println(runningTime + \"\\n\");\n }\n }\n\n if (runRegionBinJob) {\n Job regionBinJob = Job.getInstance(conf, \"Region Bin Job\");\n regionBinJob.setJobName(\"binner\");\n regionBinJob.setJarByClass(PennCnvSeq.class);\n regionBinJob.setNumReduceTasks(numReduceTasksSmall);\n regionBinJob.setInputFormatClass(TextInputFormat.class);\n regionBinJob.setMapperClass(BinMapper.class);\n regionBinJob.setMapOutputKeyClass(RefBinKey.class);\n regionBinJob.setMapOutputValueClass(Text.class);\n regionBinJob.setReducerClass(BinReducer.class);\n regionBinJob.setOutputKeyClass(RefBinKey.class);\n regionBinJob.setOutputValueClass(Text.class);\n\n// FileInputFormat.addInputPath(regionBinJob, new Path(\"workdir/depth/\"));\n// fileSystem.delete(new Path(\"workdir/bins\"), true);\n// FileOutputFormat.setOutputPath(regionBinJob, new Path(\"workdir/bins\"));\n FileInputFormat.addInputPath(regionBinJob, new Path(depthFolder));\n fileSystem.delete(new Path(binsFolder), true);\n FileOutputFormat.setOutputPath(regionBinJob, new Path(binsFolder));\n System.out.println(\"Submitting binner.\");\n if (!regionBinJob.waitForCompletion(true)) {\n System.out.println(\"Binner failed.\");\n return -1;\n }\n\n if (debug) {\n System.out.println(\"Done of submitting binner.\");\n endTime = System.currentTimeMillis();\n String runningTime = \"Running Time: \" + Math.rint((endTime - startTime) * 100) / 100000.0 + \" seconds.\\n\";\n System.out.println(runningTime + \"\\n\");\n }\n }\n\n if (runCnvCallJob) {\n \tconf.set(\"lambda1\", Float.toString(abberation_penalty));\n \tconf.set(\"lambda2\", Float.toString(transition_penalty));\n Job secondarySortJob = Job.getInstance(conf, \"Secondary Sort Job\");\n secondarySortJob.setJobName(\"secondary_sorter\");\n secondarySortJob.setJarByClass(PennCnvSeq.class);\n// secondarySortJob.setNumReduceTasks(24);\n secondarySortJob.setNumReduceTasks(numRecudeTasks);\n secondarySortJob.setInputFormatClass(TextInputFormat.class);\n secondarySortJob.setMapperClass(BinSortMapper.class);\n secondarySortJob.setMapOutputKeyClass(RefBinKey.class);\n secondarySortJob.setMapOutputValueClass(Text.class);\n secondarySortJob.setPartitionerClass(ChrPartitioner.class);\n secondarySortJob.setGroupingComparatorClass(ChrGroupingComparator.class);\n secondarySortJob.setReducerClass(CnvReducer.class);\n secondarySortJob.setOutputKeyClass(Text.class);\n secondarySortJob.setOutputValueClass(Text.class);\n// FileInputFormat.addInputPath(secondarySortJob, new Path(\"workdir/bins/\"));\n// fileSystem.delete(new Path(\"workdir/cnv\"), true);\n// FileOutputFormat.setOutputPath(secondarySortJob, new Path(\"workdir/cnv\"));\n FileInputFormat.addInputPath(secondarySortJob, new Path(binsFolder));\n fileSystem.delete(new Path(cnvFolder), true);\n FileOutputFormat.setOutputPath(secondarySortJob, new Path(cnvFolder));\n System.out.println(\"Submitting CNV caller.\");\n if (!secondarySortJob.waitForCompletion(true)) {\n System.out.println(\"CNV caller failed.\");\n return -1;\n }\n\n if (debug) {\n System.out.println(\"Done of submitting CNV caller.\");\n }\n }\n } catch (IOException | IllegalArgumentException | IllegalStateException | InterruptedException | ClassNotFoundException ex) {\n System.err.println(\"Error in run, caused by \" + ex.toString());\n return -1;\n }\n return 0;\n }", "public Properties() {\n\n\t\tconfig = new java.util.Properties();\n\n\t\ttry {\n\t\t\tInputStream input = new FileInputStream(new File(\n\t\t\t\t\t\"ConfigurationFile.txt\"));\n\t\t\tconfig.load(input);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public static void main(String[] args) {\n System.out.println(readAllStringInFile(\"lua/gray_config.json\"));\n }", "public static ChebiConfig readFromFile(String filePath) throws IOException {\n InputStream is = null;\n try {\n is = ChebiConfig.class.getClassLoader()\n .getResourceAsStream(filePath);\n if (is == null){\n LOGGER.info(filePath + \" not found in the classpath,\"\n + \" trying the working directory...\");\n is = new FileInputStream(filePath);\n }\n return readFromInputStream(is);\n } finally {\n if (is != null) try {\n is.close();\n } catch (IOException e) {\n LOGGER.error(\"Unable to close input stream\", e);\n }\n }\n }", "private File getConfigurationFile() {\n return new File(BungeeBan.getInstance().getDataFolder(), this.filename);\n }", "public static void init(String propfile, String processname, String args[]) throws Exception\r\n\t{\r\n\t\tif(initdone)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Standard file encoding\r\n\t\tSystem.setProperty(\"file.encoding\", Constant.ENCODE_UTF8);\r\n\r\n\t\tLOG.init();\r\n\r\n\t\tlog = LOG.getLog(Option.class);\r\n\r\n\t\tlog.info(\"BINROOT \" + Locator.findBinROOT());\r\n\r\n\t\t// Properties parsen\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// XML Configfile\r\n\t\t\tconfig = new XMLConfiguration();\r\n\t\t\tconfig.setEncoding(\"UTF8\");\r\n\t\t\tconfig.setDelimiterParsingDisabled(true);\r\n\r\n\t\t\tif(Validation.notEmpty(propfile))\r\n\t\t\t{\r\n\t\t\t\t// Include von externen Configfiles: <import file=\"ALIAS\" /> \r\n\t\t\t\tGrouper includer = new Grouper(\"<import file=\\\"(.*?)\\\".?/>\", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);\r\n\r\n\t\t\t\tString org = new String(Tool.readchararray(Locator.findBinROOT() + propfile));\r\n\r\n\t\t\t\tString[] includefile = includer.matchall(org);\r\n\r\n\t\t\t\tfor(int i = 0; i < includefile.length; i = i + 2)\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// read include file\r\n\t\t\t\t\t\tString include = new String(Tool.readchararray(Locator.findBinROOT() + includefile[i + 1]));\r\n\r\n\t\t\t\t\t\torg = org.replace(includefile[i], include.trim());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcatch(Exception e)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlog.error(\"Configfile missing\", e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfig.load(new ByteArrayInputStream(org.trim().getBytes(\"UTF8\")));\r\n\r\n\t\t\t\tstage = config.getString(\"staging\", \"test\");\r\n\r\n\t\t\t\treplace = new Replacer(\"\\\\$\\\\{staging\\\\}\");\r\n\r\n\t\t\t\tSystem.out.println(\"FOUND STAGE: [\" + stage + \"]\");\r\n\t\t\t}\r\n\r\n\t\t\t// Property Configfile\r\n\t\t\t// config = new PropertiesConfiguration(\"TestServer.properties\");\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tlog.error(e);\r\n\t\t\tthrow e;\r\n\t\t}\r\n\r\n\t\tboolean hascmd = isClassInPath(\"org.apache.commons.cli.CommandLineParser\",\r\n\t\t \"Commandline parser disabled Lib is missing!\");\r\n\t\tif(hascmd && options != null)\r\n\t\t{\r\n\t\t\t// keine default options mehr\r\n\t\t\t// initDefaultOptions(); \r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tcmd = new PosixParser().parse(options, args);\r\n\t\t\t\t//cmd = new GnuParser().parse(options, args);\r\n\t\t\t\t//cmd = new BasicParser().parse(options, args);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tprintHelp(processname);\r\n\t\t\t}\r\n\r\n\t\t\tif(cmd.hasOption(HELP))\r\n\t\t\t{\r\n\t\t\t\tprintHelp(processname);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// DB initialisieren\r\n\r\n\t\tif(isClassInPath(\"gawky.database.DB\",\r\n\t\t \"DB wurde nicht gefunden Parameter werden ignoriert!\"))\r\n\t\t{\r\n\t\t\tDB.init();\r\n\t\t}\r\n\r\n\t\tinitdone = true;\r\n\r\n\t\treturn;\r\n\t}", "private void loadConfig() throws IOException {\n File bStatsFolder = new File(plugin.getDataFolder().getParentFile(), \"bStats\");\n File configFile = new File(bStatsFolder, \"config.yml\");\n Config config = new Config(configFile);\n \n // Check if the config file exists\n if (!config.exists(\"serverUuid\")) {\n // Add default values\n config.set(\"enabled\", true);\n // Every server gets it's unique random id.\n config.set(\"serverUuid\", UUID.randomUUID().toString());\n // Should failed request be logged?\n config.set(\"logFailedRequests\", false);\n // Should the sent data be logged?\n config.set(\"logSentData\", false);\n // Should the response text be logged?\n config.set(\"logResponseStatusText\", false);\n \n DumperOptions dumperOptions = new DumperOptions();\n dumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);\n writeFile(configFile,\n \"# bStats collects some data for plugin authors like how many servers are using their plugins.\",\n \"# To honor their work, you should not disable it.\",\n \"# This has nearly no effect on the server performance!\",\n \"# Check out https://bStats.org/ to learn more :)\",\n new Yaml(dumperOptions).dump(config.getRootSection()));\n }\n \n // Load the data\n enabled = config.getBoolean(\"enabled\", true);\n serverUUID = config.getString(\"serverUuid\");\n logFailedRequests = config.getBoolean(\"logFailedRequests\", false);\n logSentData = config.getBoolean(\"logSentData\", false);\n logResponseStatusText = config.getBoolean(\"logResponseStatusText\", false);\n }", "private static void initialize(String configFile)\n\t{\n\t\t\n\t}", "@Override\n public String getDefaultConfig(Log log) throws CommandLineException {\n File defaultCfg = null;\n if (DEFAULT_CONFIG_FILE.equals(defaultConfigFile)) {\n final String conf = ExecutionUtils.executeCommand(log, \"\\\"\" + this.executable + \"\\\" -V SERVER_CONFIG_FILE\");\n final Pattern pattern = Pattern.compile(\"^\\\\s*-D\\\\s*SERVER_CONFIG_FILE=\\\"(.*)?\\\"$\");\n final Matcher matcher = pattern.matcher(conf);\n final String result = matcher.group(1);\n defaultCfg = new File(result);\n if (defaultCfg.isAbsolute()) {\n if (defaultCfg.exists()) {\n return ConfigUtils.readConfigFile(defaultCfg);\n }\n } else {\n final String exec = ExecutionUtils.searchExecutable(log, this.executable);\n if (exec != null) {\n final File execFile = new File(exec);\n File execDir = execFile.getParentFile();\n if (\"bin\".equals(execDir.getName())) {\n execDir = execDir.getParentFile();\n }\n File confDir = new File(execDir, \"conf\");\n if (!confDir.exists()) {\n confDir = execDir;\n }\n defaultCfg = new File(confDir, \"httpd.conf\");\n if (defaultCfg.exists()) {\n return ConfigUtils.readConfigFile(defaultCfg);\n }\n }\n }\n } else {\n defaultCfg = new File(this.defaultConfigFile);\n if (defaultCfg.exists()) {\n return ConfigUtils.readConfigFile(defaultCfg);\n }\n }\n return null;\n }" ]
[ "0.73409015", "0.73303866", "0.69671994", "0.6950462", "0.6867568", "0.686084", "0.68381095", "0.67954063", "0.67825633", "0.6722557", "0.6645627", "0.65851015", "0.6580293", "0.6563833", "0.6541788", "0.65355754", "0.6475287", "0.63667536", "0.6326776", "0.63195163", "0.6318117", "0.62778664", "0.6242643", "0.6221421", "0.62209076", "0.6202068", "0.61891866", "0.6180244", "0.617661", "0.61731064", "0.6166613", "0.61314374", "0.611188", "0.60995466", "0.6089893", "0.6065941", "0.6063001", "0.60465986", "0.6027046", "0.6021179", "0.6019401", "0.6017574", "0.60148364", "0.60053325", "0.6003494", "0.60021394", "0.598691", "0.5950783", "0.5941323", "0.59248567", "0.59219646", "0.5911497", "0.58977914", "0.5892089", "0.5882989", "0.5876703", "0.5864165", "0.58582675", "0.58457", "0.5822221", "0.58185333", "0.5815674", "0.58040667", "0.577839", "0.57766336", "0.57718956", "0.5769846", "0.5766774", "0.57608235", "0.5751443", "0.573151", "0.57221484", "0.57217497", "0.5698662", "0.5674943", "0.56738704", "0.5672042", "0.5671927", "0.5655432", "0.5652779", "0.564988", "0.564918", "0.5646016", "0.5641437", "0.56396997", "0.5637836", "0.56371766", "0.5634589", "0.5619608", "0.5615162", "0.56078094", "0.56059414", "0.5584623", "0.5584248", "0.5571563", "0.55685407", "0.55670226", "0.55617183", "0.5553436", "0.55512434", "0.5550365" ]
0.0
-1
Writes the configuration file. It is called if the configuration should be stored after user invocation.
void writeCfg(File cfgFile) { boolean bOk = true; if(cfgFile.exists()){ String sName = cfgFile.getName() + ".old"; File cfgFileOld = new File(cfgFile.getParentFile(), sName); if(cfgFileOld.exists()){ bOk = cfgFileOld.delete(); if(!bOk){ main.log.writeError("can't delete " + cfgFileOld.getAbsolutePath()); } } if(bOk){ bOk = cfgFile.renameTo(cfgFileOld); if(!bOk){ main.log.writeError("can't rename " + cfgFile.getAbsolutePath()); } } } if(bOk){ bOk = writerCfg.open(cfgFile.getAbsolutePath(), false) ==0; } if(bOk){ try{ for(FcmdFavorPathSelector.FavorFolder folder: listAllFavorPathFolders){ writerCfg.append("==").append(folder.label).append(": ").append(folder.selectNameTab); if((folder.mMainPanel & 7)!=0){ writerCfg.append(", "); } if((folder.mMainPanel & 1)!=0){ writerCfg.append('l'); } if((folder.mMainPanel & 2)!=0){ writerCfg.append('m'); } if((folder.mMainPanel & 4)!=0){ writerCfg.append('r'); } writerCfg.append("==\n"); for(GralFileSelector.FavorPath favor: folder.listfavorPaths){ writerCfg.append(favor.selectName).append(", ").append(favor.path).append("\n"); } writerCfg.append("\n"); } } catch(IOException exc){ main.log.writeError("error writing" , exc); } } writerCfg.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void writeConfiguration(String fileName) throws IOException;", "public void save() {\n\t\tif (fileConfiguration == null || configFile == null)\n\t\t\treturn;\n\n\t\ttry {\n\t\t\tgetConfig().save(configFile);\n\t\t} catch (final IOException e) {\n\t\t\tplugin.getLogger().severe(String.format(\"[%s] Could not save config to %s : %s\", plugin.getName(), configFile, e));\n\t\t}\n\t}", "public void writeToConfigFile() {\n if(properties == null) {\n return;\n }\n\n properties.put(\"MAN-LATITUDE\", String.valueOf(Location.getMan_latitude()));\n properties.put(\"MAN-LONGITUDE\", String.valueOf(Location.getMan_longitude()));\n properties.put(\"CURRENT-DESTINATION-NAME\", currentDestinationName);\n properties.put(\"CURRENT-DESTINATION-ADDRESS\", currentDestination.getCSVAddress());\n properties.put(\"EVENT-START-TIME\", ClockDriver.dfFull.format(Event.globalEventStartTime));\n double[] coefficients = Location.getAdjustmentCoefficients();\n String adjustmentCoefficients = String.valueOf(coefficients[0]) + ',' +\n String.valueOf(coefficients[1]) + ',' + String.valueOf(coefficients[2]) + ',' +\n String.valueOf(coefficients[3]);\n properties.put(\"ADJUSTMENT-COEFFICIENTS\", adjustmentCoefficients);\n StringBuilder blockStringBuilder = new StringBuilder();\n for(Object[] block : Location.getBlockDistances()) {\n if(block.length == 2) {\n blockStringBuilder.append(block[0]);\n blockStringBuilder.append(',');\n blockStringBuilder.append(block[1]);\n blockStringBuilder.append(';');\n }\n }\n properties.put(\"BLOCK-DISTANCES\", blockStringBuilder.toString());\n\n try {\n properties.store(new FileOutputStream(configPath), \"\");\n } catch(IOException e) {\n logger.warning(this.getClass(),\n \"IOException while writing to config file \\'\" + configPath + \"\\': \" + e.getMessage());\n }\n }", "public void saveConfig () {\n if (fileConfiguration == null || config == null) {\n \n if (debug) {\n log.info(\"Can't save config - null\");\n }\n \n return;\n } else {\n try {\n getConfig().save(config);\n } catch (IOException e) {\n log.severe(\"Something happened while saving \" + configName);\n }\n if (debug) {\n log.info(\"Saved \" + configName + \" successfully.\");\n }\n }\n }", "private void saveConfiguration() {\n }", "private static void persistSettings() {\n\t\ttry {\n\t\t\tBufferedWriter userConf = new BufferedWriter(new FileWriter(\n\t\t\t\t\tconf.getAbsolutePath()));\n\t\t\tproperties.store(userConf, null);\n\t\t\t// flush and close streams\n\t\t\tuserConf.flush();\n\t\t\tuserConf.close();\n\t\t} catch (IOException e) {\n\t\t\tlog.severe(\"Couldn't save config file.\");\n\t\t}\n\t}", "public static void saveNewConfig() throws IOException {\n\t\tOutputStream os = new FileOutputStream(fileLocation);\n\t\tconfigurationFile.store(os, \"\");\n\t\tos.flush();\n\t\tos.close();\n\t\tupdateConfigFile();\n\t}", "public static void writeProperties() {\n\t\ttry {\n\t\t\tLogger.getLogger(Configuration.class).info(\"Write properties\");\n\t\t\tFileOutputStream fileOutputStream = new FileOutputStream(new File(configFileName));\n\t\t\tproperties.store(fileOutputStream, \"\");\n\t\t\tfileOutputStream.close();\n\n\t\t\t// externalToolParser.writeInFile(externalToolsList,\n\t\t\t// Configuration.extToolsConfigFileName);\n\t\t} catch (FileNotFoundException fne) {\n\t\t\tAlert.raise(fne, \"Cannot find configuration file: \" + fne.getMessage());\n\t\t} catch (IOException ioe) {\n\t\t\tAlert.raise(ioe, \"Cannot write configuration file: \" + ioe.getMessage());\n\t\t} catch (Exception ex) {\n\t\t\tAlert.raise(ex, \"Cannot write configuration file: \" + ex.getMessage());\n\t\t}\n\t}", "public void save() throws FileNotFoundException, IOException\n {\n settings.store(new FileOutputStream(FILE), \"N3TPD Config File\");\n }", "private static void commit() throws IOException {\n java.io.File out = SessionService.getConfFileByPath(Const.FILE_CONFIGURATION + \".\"\n + Const.FILE_SAVING_FILE_EXTENSION);\n OutputStream str = new FileOutputStream(out);\n // Write the temporary file\n try {\n properties.store(str, \"User configuration\");\n } finally {\n str.flush();\n str.close();\n }\n // Commit with recovery support\n java.io.File finalFile = SessionService.getConfFileByPath(Const.FILE_CONFIGURATION);\n UtilSystem.saveFileWithRecoverySupport(finalFile);\n Log.debug(\"Conf commited to : \" + finalFile.getAbsolutePath());\n }", "public static void saveGameConfiguration() {\n exportJsonFile(new File(FileUtils.getRootFile(), Constant.CONFIG_FILE_NAME));\n }", "void store() {\n UserPreferences.setLogFileCount(Integer.parseInt(logFileCount.getText()));\n if (!agencyLogoPathField.getText().isEmpty()) {\n File file = new File(agencyLogoPathField.getText());\n if (file.exists()) {\n ModuleSettings.setConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP, agencyLogoPathField.getText());\n }\n } else {\n ModuleSettings.setConfigSetting(ReportBranding.MODULE_NAME, ReportBranding.AGENCY_LOGO_PATH_PROP, \"\");\n }\n UserPreferences.setMaxSolrVMSize((int)solrMaxHeapSpinner.getValue());\n if (memField.isEnabled()) { //if the field could of been changed we need to try and save it\n try {\n writeEtcConfFile();\n } catch (IOException ex) {\n logger.log(Level.WARNING, \"Unable to save config file to \" + PlatformUtil.getUserDirectory() + \"\\\\\" + ETC_FOLDER_NAME, ex);\n }\n }\n }", "private void exportConfiguration() {\n if (!Files.exists(languageConfigPath)) this.saveResource(\"language.yml\", false);\n if (!Files.exists(propertiesConfigPath)) this.saveResource(\"properties.yml\", false);\n }", "protected void writeConfigurationFile(FileStore fileStore)\n {\n // TODO: configurable max attempts for creating a configuration file.\n\n try\n {\n AVList configParams = this.getConfigurationParams(null);\n this.writeConfigurationParams(configParams, fileStore);\n }\n catch (Exception e)\n {\n String message = Logging.getMessage(\"generic.ExceptionAttemptingToWriteConfigurationFile\");\n Logging.logger().log(java.util.logging.Level.SEVERE, message, e);\n }\n }", "private void saveConfiguration() {\r\n\tnew File(PROPERTIES_FILE).getParentFile().mkdirs();\r\n\tProperties props = new Properties();\r\n\ttry {\r\n\t props.setProperty(KEY_LAST_SOURCE_DIR, lastSourceDir);\r\n\t props.setProperty(KEY_LAST_TARGET_DIR, lastTargetDir);\r\n\t logger.debug(\"Speichere \" + props + \" nach \" + PROPERTIES_FILE);\r\n\t FileOutputStream stream = new FileOutputStream(PROPERTIES_FILE);\r\n\r\n\t props.store(stream, \"Do not change!\");\r\n\t stream.close();\r\n\t} catch (IOException e) {\r\n\t logger.error(\"Konfiguration konnte nicht gespeichert werden!\", e);\r\n\t}\r\n }", "public void writeConfig(Config config) throws IOException {\n\t\tFile configFile = new File(this.configPath);\n\n\t\tif (configFile.exists()) return;\n\t\tBufferedWriter writer = new BufferedWriter(\n\t\t\tnew OutputStreamWriter(new FileOutputStream(configFile))\n\t\t);\n\t\twriter.write(new Gson().toJson(config));\n\t\twriter.flush();\n\t\twriter.close();\n\t}", "private void savingToConfigurationsFile(FileOutputStream configurationFileOutputStream, byte[] iv,\n\t\t\tbyte[] encryptedSymmetricKey, byte[] mySignature) throws IOException {\n\n\t\tconfigurationFileOutputStream = new FileOutputStream(localWorkingDirectoryPath + \"\\\\Config.txt\");\n\n\t\t// Saving the IV to the configuration file\n\t\tconfigurationFileOutputStream.write(iv);\n\n\t\t// Saving the encrypted symmetric key to the configuration file\n\t\tconfigurationFileOutputStream.write(encryptedSymmetricKey);\n\n\t\t// Saving the my signature to the configuration file\n\t\tconfigurationFileOutputStream.write(mySignature);\n\n\t\t// Closing the output stream\n\t\tconfigurationFileOutputStream.close();\n\n\t}", "public void save() {\n try {\n ConfigurationProvider.getProvider(YamlConfiguration.class).save(this.configuration, this.getConfigurationFile());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void saveProperties() throws IOException {\r\n\t\tsetProperties();\r\n\t\tOutputStream outputStream;\r\n\t\toutputStream = new FileOutputStream(configFile);\r\n\t\tconfigProps.store(outputStream, \"Lot Data Mapper Application\");\r\n\t\tString msg = \"SAVING PROPERTIES WITH VALUES: \\n\\t 1 \\t\" + dt.Root+\"\\n \\t 2 \\t\" + dt.Map+\" \\n\\t 3 \\t\" + dt.Out+\" \\n\\t 4 \\t\" + Trans.ReportTypeName+\" \\n\\t 5 \\t\"+Trans.ReportedByPersonName+\" \\n\\t 6\\t\"+Trans.ReportedDate + \"\\n PROPERTIIES SAVED\";\r\n\t\tlg.l(msg);\r\n\t\toutputStream.close();\r\n\t}", "public static void saveSettings() {\n\n Writer output = null;\n try {\n output = new BufferedWriter(new FileWriter(getConfigFile()));\n final Set<String> set = m_Settings.keySet();\n final Iterator<String> iter = set.iterator();\n while (iter.hasNext()) {\n final String sKey = iter.next();\n final String sValue = m_Settings.get(sKey);\n output.write(sKey + \"=\" + sValue + \"\\n\");\n }\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n finally {\n if (output != null) {\n try {\n output.close();\n }\n catch (final IOException e) {\n Sextante.addErrorToLog(e);\n }\n }\n }\n\n }", "private synchronized void storeAppSettings() {\n\t \n\t\n \tif(_appSettings != null){\t\n \t\tAppLogger.debug2(\"AppFrame.storeAppSettings saving.\");\n\n \t\ttry {\t \n \t\t\tFileOutputStream oFile = new FileOutputStream(_configFile);\n\t\t\tOutputStream setupOutput = new DataOutputStream(oFile);\t\t \t\t\t\t\n\t\t\t_appSettings.store(setupOutput, \"\");\t\t\n \t\t}catch(Exception oEx){\n \t\tAppLogger.error(oEx);\n \t\t}\t\t \t\t\t\t\t\t\n\t}\t\t\t\t \t\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 }", "public void save() {\n if (worldOreConfig == null) {\n return;\n }\n\n final WorldOreConfig worldOreConfig;\n\n if (!(this.worldOreConfig instanceof ConfigurationSerializable)) {\n worldOreConfig = new WorldOreConfigYamlImpl(this.worldOreConfig.getName(), this.worldOreConfig.getConfigType(), this.worldOreConfig.getOreSettings(), this.worldOreConfig.getBiomeOreSettings());\n } else {\n worldOreConfig = this.worldOreConfig;\n }\n\n final Config config = new Config(file);\n\n config.set(\"value\", worldOreConfig);\n\n try {\n config.options().header(\"This file is machine generated, please use the in game commands and gui to change values. \\nModifying this file per hand on your own risk.\").copyHeader(true);\n config.save(file);\n } catch (final IOException e) {\n throw new RuntimeException(\"Unexpected error while saving WorldOreConfig \" + worldOreConfig.getName() + \" to disk!\", e);\n }\n }", "public void write() throws IOException { \n FileOutputStream fos = new FileOutputStream(new File(_propertyFileDir, \n DAS_PROPERTY_FILE_NAME));\n _properties.store(fos, _strMgr.getString(\"dasPropertyFileComment\"));\n fos.close(); \n }", "@Override\n public void saveConfig() {\n IPathManager pm = PathManagerFactory.getPathManager();\n LocalizationContext context = pm.getContext(\n LocalizationType.COMMON_STATIC, LocalizationLevel.SITE);\n String newFileName = getExistingConfigFilePath();\n ILocalizationFile locFile = pm.getLocalizationFile(context,\n newFileName);\n\n try {\n statusHandler.info(\"Saving -- \" + locFile.getPath());\n try (SaveableOutputStream os = locFile.openOutputStream()) {\n jaxb.marshalToStream(mesoCfgXML, os);\n os.save();\n }\n } catch (Exception e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Failed to save \" + getExistingConfigFilePath(), e);\n }\n }", "public void saveConfigXml() {\n // Save the xml object to disk\n IPathManager pm = PathManagerFactory.getPathManager();\n LocalizationContext lc = pm.getContext(LocalizationType.COMMON_STATIC,\n LocalizationLevel.SITE);\n\n LocalizationFile newXmlFile = pm.getLocalizationFile(lc,\n CONFIG_FILE_NAME);\n\n if (newXmlFile.getFile().getParentFile().exists() == false) {\n // System.out.println(\"Creating new directory\");\n\n if (newXmlFile.getFile().getParentFile().mkdirs() == false) {\n // System.out.println(\"Could not create new directory...\");\n }\n }\n\n try {\n // System.out.println(\"Saving -- \"\n // + newXmlFile.getFile().getAbsolutePath());\n jaxb.marshalToXmlFile(configXml, newXmlFile.getFile()\n .getAbsolutePath());\n newXmlFile.save();\n\n lf = newXmlFile;\n } catch (Exception e) {\n statusHandler.handle(Priority.ERROR, \"Couldn't save config file.\",\n e);\n }\n }", "public void storeProperties() throws LogFile.LockException, IOException {\n // If the file has not been set, don't save.\n if (dataFile != null) {\n synchronized (dataFile) {\n if (!dataFile.isDirectory()) {\n if (dataFile.getName().endsWith(EtomoDirector.USER_CONFIG_FILE_EXT)) {\n dataFile.backupOnce();\n }\n else {\n dataFile.doubleBackupOnce();\n }\n }\n if (!dataFile.exists()) {\n dataFile.create();\n }\n LogFile.OutputStreamId outputStreamId = dataFile.openOutputStream();\n dataFile.store(properties, outputStreamId);\n dataFile.closeOutputStream(outputStreamId);\n }\n }\n }", "public void save() {\n try {\n yml.save(config);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void createConfigFile() {\n\t\tFile configFile = new File(projectRoot, SC_CONFIG_FILENAME);\n\t\tif (configFile.exists())\n\t\t\treturn;\n\n\t\tServiceCutterConfig config = createInitialServiceCutterConfig();\n\t\ttry {\n\t\t\tFileWriter writer = new FileWriter(configFile);\n\t\t\twriter.write(new Yaml().dumpAs(config, Tag.MAP, FlowStyle.BLOCK));\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\tthrow new ContextMapperApplicationException(\"Could not create '.servicecutter.yml' file!\", e);\n\t\t}\n\t}", "@SynchronizedMethod(lockType = MethodLockType.EXPLICIT,\n description = \"An explicit private lock which cannot be shared from outside.\",\n otherSynchronizedMethods = {\"getSystemConfigProperties\"})\n public static void storeSystemConfigProperties() {\n synchronized (LOCK) {\n\n if (systemConfigProperties == null) {\n SystemLogger.warn(SystemConfigPropertiesFactory.class, MessageFactory.getMessage(WarnType.ATTEMPT_WRITE_EMPTY_CONFIG_FILE));\n }\n String repositoryPath = SystemConstants.USER_HOME + File.separator + SystemConstants.APPLICATION_HOME_NAME;\n String configPath = repositoryPath + File.separator + SystemConstants.SYSTEM_CONFIG_FILE_NAME;\n FileOutputStream fileOutputStream = null;\n try {\n systemConfigProperties.properties.store(new FileOutputStream(new File(configPath)), MessageFactory.getMessage(InfoType.STORE_CONFIG_FILE));\n SystemLogger.info(SystemConfigPropertiesFactory.class, MessageFactory.getMessage(InfoType.STORE_CONFIG_FILE_SUCCESS));\n } catch (IOException ex) {\n SystemLogger.warn(SystemConfigPropertiesFactory.class, MessageFactory.getMessage(WarnType.CANNOT_STORE_CONFIG_FILE, repositoryPath), ex);\n } finally {\n if (fileOutputStream != null) {\n try {\n fileOutputStream.close();\n } catch (IOException ex) {\n SystemLogger.warn(SystemConfigPropertiesFactory.class, MessageFactory.getMessage(WarnType.CANNOT_CLOSE_CONFIG_FILE, repositoryPath), ex);\n }\n }\n\n }\n }\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 saveDbConfig () {\n\t\ttry {\n\t\t\tthis.databaseConfig.store(new FileWriter(new File(this.databaseAddress)), \"\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"[ERROR] Could not save initialization to database properties file: \" + databaseAddress);\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t}", "public void saveAccountConfig () {\n\t\ttry {\n\t\t\tthis.accountConfig.store(new FileWriter(new File(this.accountAddress)), \"\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"[ERROR] Could not save initialization to account properties file: \" + accountAddress);\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t}", "public synchronized static void writeConfiguration(PhotoConfiguration config) throws IOException {\r\n\t\t\r\n\t\tlog.info(\"Updating config\"); //$NON-NLS-1$\r\n\t\t\r\n\t\tFile internalConfigFile = getInternalConfigurationFile(config.pathToApplication);\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tPropertiesConfiguration configurationFile = new PropertiesConfiguration(internalConfigFile);\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.PATH_TO_IMAGES_KEY , config.getPathToImages() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.PHOTO_FILE_FACTORY_CLASS_NAME_KEY , config.getPhotoFactoryClass() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.PHOTO_USER_FACTORY_CLASS_NAME_KEY , config.getPhotoUserFactoryClass() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.JDBC_DRIVER_KEY , config.getJDBCDriverName() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.JDBC_CONNECTION_URL_KEY , config.getJDBCConnectionUrl() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.DATABASE_LOGIN_KEY , config.getJDBCLogin() );\r\n\t\t\tconfigurationFile.setProperty( PhotoConfigurationConstants.DATABASE_PASSWORD_KEY , config.getJDBCPassword() );\r\n\t\t\tconfigurationFile.save();\r\n\t\t\t\r\n\t\t\tFile configFile = getConfigurationFile(config);\r\n\t\t\tconfigurationFile = new PropertiesConfiguration(configFile);\r\n\t\t\tif ( !configFile.exists()) {\r\n\t\t\t\tlog.info(\"Properties file not found; creating\"); //$NON-NLS-1$\r\n\t\t\t} \r\n\t \r\n\t configurationFile.setProperty( PhotoConfigurationConstants.DEFAULT_THEME_KEY, config.getDefaultTheme());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.DEFAULT_COLUMNS_KEY, config.getDefaultColumns());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.DEFAULT_GROUP_KEY, config.getDefaultGroup()); \r\n\t configurationFile.setProperty( PhotoConfigurationConstants.USER_TIMEOUT_KEY, config.getUserTimeout());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.SUPPORTED_LOCALES_KEY, config.getSupportedLocales()); \r\n\t configurationFile.setProperty( PhotoConfigurationConstants.IMAGE_TIMEOUT_KEY, config.getImageTimeout());\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.SMTP_SERVER_KEY, config.getSMTPServer());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.ADMINISTRATOR_EMAIL_NAME_KEY, config.getAdminEMailName());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.ADMINISTRATOR_EMAIL_KEY, config.getAdminEMailAdress());\r\n\t configurationFile.setProperty( PhotoConfigurationConstants.SECURITY_MODE_KEY, config.isSecurityMode());\r\n\t configurationFile.save();\r\n\t \r\n\t\t} catch (ConfigurationException e) {\r\n\t\t\tthrow new IOException(PhotoConstants.CONFIG_IO_ERROR);\r\n\t\t}\r\n\t}", "private void writeEtcConfFile() throws IOException {\n StringBuilder content = new StringBuilder();\n List<String> confFile = readConfFile(getInstallFolderConfFile());\n for (String line : confFile) {\n if (line.contains(\"-J-Xmx\")) {\n String[] splitLine = line.split(\" \");\n StringJoiner modifiedLine = new StringJoiner(\" \");\n for (String piece : splitLine) {\n if (piece.contains(\"-J-Xmx\")) {\n piece = \"-J-Xmx\" + memField.getText() + \"g\";\n }\n modifiedLine.add(piece);\n }\n content.append(modifiedLine.toString());\n } else {\n content.append(line);\n }\n content.append(\"\\n\");\n }\n Files.write(getUserFolderConfFile().toPath(), content.toString().getBytes());\n }", "public void save(File configFile) {\n configFile.getParentFile().mkdirs();\n\n try {\n this.getProperties().store(new FileWriter(configFile), \"Redis Credentials\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected void writeConfigurationParams(AVList params, FileStore fileStore)\n {\n String fileName = DataConfigurationUtils.getDataConfigFilename(params, \".xml\");\n if (fileName == null)\n {\n String message = Logging.getMessage(\"nullValue.FilePathIsNull\");\n Logging.logger().severe(message);\n throw new WWRuntimeException(message);\n }\n\n // Check if this component needs to write a configuration file. This happens outside of the synchronized block\n // to improve multithreaded performance for the common case: the configuration file already exists, this just\n // need to check that it's there and return. If the file exists but is expired, do not remove it - this\n // removes the file inside the synchronized block below.\n if (!this.needsConfigurationFile(fileStore, fileName, params, false))\n return;\n\n synchronized (this.fileLock)\n {\n // Check again if the component needs to write a configuration file, potentially removing any existing file\n // which has expired. This additional check is necessary because the file could have been created by\n // another thread while we were waiting for the lock.\n if (!this.needsConfigurationFile(fileStore, fileName, params, true))\n return;\n\n this.doWriteConfigurationParams(fileStore, fileName, params);\n }\n }", "public void write() throws IOException {\n // No pairs to write\n if(map.size() == 0 || !isDirty) {\n System.err.println(\"preferences is already updated..\");\n return;\n }\n\n try(BufferedWriter bufferedWriter = Files.newBufferedWriter(fileName,\n StandardOpenOption.TRUNCATE_EXISTING,\n StandardOpenOption.CREATE))\n {\n for(Map.Entry<String, String> entry : map.entrySet()) {\n String key = entry.getKey();\n String value = entry.getValue();\n\n // Writes the current pair value in the format of 'key=value'\n bufferedWriter.write(String.format(\"%s=%s\\n\", key, value));\n }\n }\n\n isDirty = false;\n }", "public void saveConnectionConfiguration(){\n\t\tProperties props = new Properties();\n\t\tif (connectionconfig!=null){\n\t\t\tprops.setProperty(\"server\", connectionconfig.getServer());\n\t\t\tprops.setProperty(\"user\", connectionconfig.getUser());\n\t\t\tprops.setProperty(\"passwd\", connectionconfig.getPasswd());\n\t\t}\n\t\ttry {\n\t\t\tFileOutputStream propOutFile = new FileOutputStream(getConnConfigFile());\n\t\t\ttry {\n\t\t\t\tprops.store(propOutFile, \"Jabber connection parameters\");\n\t\t\t} catch (IOException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} catch (FileNotFoundException e2) {\n\n\t\t\te2.printStackTrace();\n\t\t}\n\t}", "public static void saveConfig(File file, Configuration conf)\n throws IOException {\n Writer writer = new FileWriter(file);\n try {\n conf.writeXml(writer);\n } finally {\n writer.close();\n }\n }", "public void writeConfigToFile(Configuration configuration, File rootDir)\n throws IOException {\n File configDir = createConfigDirIfNecessary(rootDir, configuration.getConfigName());\n\n File propsFile = new File(configDir, configuration.getPropertiesFileName());\n BufferedWriter bw = new BufferedWriter(new FileWriter(propsFile));\n configuration.getGemfireProperties().store(bw, null);\n bw.close();\n\n File xmlFile = new File(configDir, configuration.getCacheXmlFileName());\n FileUtils.writeStringToFile(xmlFile, configuration.getCacheXmlContent(), \"UTF-8\");\n\n // copy the jars if the rootDir is different than the configDirPath\n if (rootDir.getAbsolutePath().equals(configDirPath.toAbsolutePath().toString())) {\n return;\n }\n\n File locatorConfigDir = configDirPath.resolve(configuration.getConfigName()).toFile();\n if (locatorConfigDir.exists()) {\n File[] jarFiles = locatorConfigDir.listFiles(x -> x.getName().endsWith(\".jar\"));\n for (File file : jarFiles) {\n Files.copy(file.toPath(), configDir.toPath().resolve(file.getName()));\n }\n }\n }", "private void saveSettings()\n {\n try\n {\n // If remember information is true then save the ip and port\n // properties to the projects config.properties file\n if ( rememberLoginIsSet_ )\n {\n properties_.setProperty( getString( R.string.saved_IP ), mIP_ );\n properties_.setProperty( getString( R.string.saved_Port ),\n mPort_ );\n }\n\n // Always save the remember login boolean\n properties_.setProperty( getString( R.string.saveInfo ),\n String.valueOf( rememberLoginIsSet_ ) );\n\n File propertiesFile =\n new File( this.getFilesDir().getPath().toString()\n + \"/properties.txt\" );\n FileOutputStream out =\n new FileOutputStream( propertiesFile );\n properties_.store( out, \"Swoop\" );\n out.close();\n }\n catch ( Exception ex )\n {\n System.err.print( ex );\n }\n }", "public void run() {\n WriteConfigJson(jsonString,path);\r\n }", "private final synchronized void writePreferencesImpl() {\n if ( LOGD ) { Log.d( TAG, \"writePreferencesImpl \" + mPrefFile + \" \" + mPrefKey ); }\n\n mForcePreferenceWrite = false;\n\n SharedPreferences pref =\n Utilities.getContext().getSharedPreferences( mPrefFile, Context.MODE_PRIVATE );\n SharedPreferences.Editor edit = pref.edit();\n edit.putString( mPrefKey, getSerializedString() );\n Utilities.commitNoCrash(edit);\n }", "private final void config() {\n\t\tfinal File configFile = new File(\"plugins\" + File.separator\n\t\t\t\t+ \"GuestUnlock\" + File.separator + \"config.yml\");\n\t\tif (!configFile.exists()) {\n\t\t\tthis.plugin.saveDefaultConfig();\n\t\t\tMain.INFO(\"Created default configuration-file\");\n\t\t}\n\t}", "private static void saveSettings() {\n try {\n File settings = new File(\"settings.txt\");\n FileWriter writer = new FileWriter(settings);\n //Options\n writer.append(defaultSliderPosition + \"\\n\");\n writer.append(isVerticalSplitterPane + \"\\n\");\n writer.append(verboseCompiling + \"\\n\");\n writer.append(warningsEnabled + \"\\n\");\n writer.append(clearOnMethod + \"\\n\");\n writer.append(compileOptions + \"\\n\");\n writer.append(runOptions + \"\\n\");\n //Colors\n for(int i = 0; i < colorScheme.length; i++) \n writer.append(colorScheme[i].getRGB() + \"\\n\");\n writer.append(theme + \"\\n\");\n\n writer.close(); \n } catch (IOException i) {\n println(\"IO exception when saving settings.\", progErr);\n }\n }", "private void writeConfigs(File file, LinkedList<TestRerunConfiguration> configs, int numReruns) {\n\t\ttry {\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(file)));\n\t\t\t// Write the total number of configurations - subsequent reruns might remove configurations (if forking)\n\t\t\toos.writeInt(numReruns);\n\t\t\t// Write the configs\n\t\t\toos.writeObject(configs);\n\t\t\t// Write that no original violation have been verified yet\n\t\t\toos.writeObject(new HashSet<String>());\n\t\t\toos.close();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t\tSystem.err.println(\"Failed to write rerun configurations to: \" + file);\n\t\t}\n\t}", "private void generateConfigurationFile() throws IOException {\n // Use a template file to generate the configuration to be used in the sever side\n String srcFileName = \"resources/servlet.config.prop\";\n String destFileName = FIConfiguration.getConfiguration().get(\"SERVLET_CONFIG_FILE\");\n FileUtility fu = new FileUtility();\n fu.setInput(srcFileName);\n fu.setOutput(destFileName);\n String line = null;\n Map<String, String> keyToFileName = getKeyToFileNameMap();\n while ((line = fu.readLine()) != null) {\n for (String key : keyToFileName.keySet()) {\n if (line.startsWith(key)) {\n String value = FIConfiguration.getConfiguration().get(keyToFileName.get(key));\n logger.info(key + \": \" + value);\n // Just need the file only\n File file = new File(value);\n if (!file.exists()) {\n// throw new IllegalStateException(\"Cannot find file for \" + key + \": \" + value);\n logger.error(\"Cannot find file for \" + key + \": \" + value);\n }\n line = assignValue(line, file.getName());\n break;\n }\n }\n // Two special cases\n if (line.startsWith(\"Reactome.src.dbName\") || line.startsWith(\"elv.dbName\")) {\n String value = FIConfiguration.getConfiguration().get(\"REACTOME_SOURCE_DB_NAME\");\n int index = line.indexOf(\"=\");\n line = line.substring(0, index + 1) + \"test_\" + value; // This name pattern should be followed always\n }\n String year = FIConfiguration.getConfiguration().get(\"YEAR\");\n line = line.replaceAll(\"caBigR3WebApp\", \"caBigR3WebApp\" + year);\n fu.printLine(line);\n }\n fu.close();\n }", "public void writeConfig(String path, String data) throws Exception {\n\t\tupdateNode(path + CONFIG, data.getBytes());\n\t}", "public void save() {\n try {\n FileOutputStream fos = new FileOutputStream(file);\n properties.store(fos, \"Preferences\");\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "private void chargeConfiguration() {\n\t\tgetConfig().options().copyDefaults(true);\n\t\tFile config = new File(getDataFolder(), \"config.yml\");\n\t\tFile lang = new File(getDataFolder(), \"lang.properties\");\n\t\ttry {\n\t\t\tif (!config.exists()) {\n\t\t\t\tsaveDefaultConfig();\n\t\t\t}\n\t\t\tif (!lang.exists()) {\n\t\t\t\tsaveResource(\"lang.properties\", false);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthis.error(\"Can not load the configuration\", e);\n\t\t}\n\t}", "public static void saveProperties() {\n try {\n try (FileOutputStream out = new FileOutputStream(propFile)) {\n properties.store(out, \"BitcoinWallet Properties\");\n }\n } catch (Exception exc) {\n Main.logException(\"Exception while saving application properties\", exc);\n }\n }", "private static void writeNewSiteToConfigFile(String siteName) {\n\n\t\ttry(PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(\"SiteConfiguration.txt\", true)))) {\n\t\t\tif(sites.isEmpty())\n\t\t\t\tpw.write(String.format(\"%s\", siteName));\n\t\t\telse\n\t\t\t\tpw.write(String.format(\"\\n%s\", siteName));\n\t\t}catch (IOException ioe) {\n\t\t\tlogger.log(Level.WARNING, \"Could not write to SiteConfiguration file properly! \" + ioe);\n\t\t}\n\t}", "private void outputConfig() {\n //output config info to the user\n Logger.getLogger(Apriori.class.getName()).log(Level.INFO, \"Input configuration: {0} items, {1} transactions, \", new Object[]{numItems, numTransactions});\n Logger.getLogger(Apriori.class.getName()).log(Level.INFO, \"minsup = {0}%\", minSup);\n }", "private static void storePropsFile() {\n try {\n FileOutputStream fos = new FileOutputStream(propertyFile);\n props.store(fos, null);\n fos.close();\n } catch (IOException ex) {\n Debugger.logMessage(ex);\n }\n }", "private static void saveJsonFile() {\n Log.println(Log.INFO, \"FileAccessing\", \"Writing settings file.\");\n JsonObject toSave = new JsonObject();\n JsonArray mappingControls = new JsonArray();\n for (int i = 0; i < TaskDetail.actionToTask.size(); i++) {\n JsonObject individualMapping = new JsonObject();\n TaskDetail detail = TaskDetail.actionToTask.valueAt(i);\n byte combinedAction = (byte) TaskDetail.actionToTask.keyAt(i);\n assert detail != null;\n int outerControl = detail.getTask();\n individualMapping.addProperty(\"combinedAction\", combinedAction);\n individualMapping.addProperty(\"task\", outerControl);\n mappingControls.add(individualMapping);\n }\n toSave.add(\"mappingControls\", mappingControls);\n\n JsonArray generalSettings = new JsonArray();\n for (SettingDetail setting : SettingDetail.settingDetails) {\n JsonObject individualSetting = new JsonObject();\n int status = setting.getCurrentIdx();\n individualSetting.addProperty(\"status\", status);\n generalSettings.add(individualSetting);\n }\n toSave.add(\"generalSettings\", generalSettings);\n\n JsonArray deviceList = new JsonArray();\n for (DeviceDetail device : DeviceDetail.deviceDetails) {\n JsonObject individualDevice = new JsonObject();\n individualDevice.addProperty(\"name\", device.deviceName);\n individualDevice.addProperty(\"mac\", device.macAddress);\n deviceList.add(individualDevice);\n }\n toSave.add(\"devices\", deviceList);\n\n JsonArray sensitivityList = new JsonArray();\n for (SensitivitySetting sensitivity : SensitivitySetting.sensitivitySettings) {\n JsonObject individualSensitivity = new JsonObject();\n individualSensitivity.addProperty(\"factor\", sensitivity.multiplicativeFactor);\n individualSensitivity.addProperty(\"sensitivity\", sensitivity.sensitivity);\n sensitivityList.add(individualSensitivity);\n }\n toSave.add(\"sensitivities\", sensitivityList);\n\n toSave.addProperty(\"currentlySelected\", DeviceDetail.getIndexSelected());\n\n try {\n FileOutputStream outputStreamWriter = context.openFileOutput(\"settingDetails.json\", Context.MODE_PRIVATE);\n outputStreamWriter.write(toSave.toString().getBytes());\n outputStreamWriter.close();\n } catch (IOException e) {\n Log.println(Log.ERROR, \"FileAccessing\", \"Settings file writing error.\");\n }\n }", "private void createPropertiesFile(final File configFile) throws IOException {\n if (configFile.createNewFile()) {\n FileWriter writer = new FileWriter(configFile);\n writer.append(\"ch.hslu.vsk.server.port=1337\\n\");\n writer.append(\"ch.hslu.vsk.server.logfile=\");\n writer.flush();\n writer.close();\n }\n }", "void saveConfig() {\r\n\t\ttry {\r\n\t\t\tPrintWriter out = new PrintWriter(new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(\"open-ig-mapeditor-config.xml\"), 64 * 1024), \"UTF-8\"));\r\n\t\t\ttry {\r\n\t\t\t\tout.printf(\"<?xml version='1.0' encoding='UTF-8'?>%n\");\r\n\t\t\t\tout.printf(\"<mapeditor-config>%n\");\r\n\t\t\t\tout.printf(\" <window x='%d' y='%d' width='%d' height='%d' state='%d'/>%n\", getX(), getY(), getWidth(), getHeight(), getExtendedState());\r\n\t\t\t\tout.printf(\" <language id='%s'/>%n\", ui.languageEn.isSelected() ? \"en\" : \"hu\");\r\n\t\t\t\tout.printf(\" <splitters main='%d' preview='%d' surfaces='%d'/>%n\", split.getDividerLocation(), toolSplit.getDividerLocation(), featuresSplit.getDividerLocation());\r\n\t\t\t\tout.printf(\" <editmode type='%s'/>%n\", ui.buildButton.isSelected());\r\n\t\t\t\tout.printf(\" <tabs selected='%d'/>%n\", propertyTab.getSelectedIndex());\r\n\t\t\t\tout.printf(\" <lights preview='%d' map='%s'/>%n\", alphaSlider.getValue(), Float.toString(alpha));\r\n\t\t\t\tout.printf(\" <filter surface='%s' building='%s'/>%n\", XML.toHTML(filterSurface.getText()), XML.toHTML(filterBuilding.getText()));\r\n\t\t\t\tout.printf(\" <allocation worker='%s' strategy='%d'/>%n\", ui.allocationPanel.availableWorkers.getText(), ui.allocationPanel.strategies.getSelectedIndex());\r\n\t\t\t\tout.printf(\" <view buildings='%s' minimap='%s' textboxes='%s' zoom='%s' standard-fonts='%s' placement-hints='%s'/>%n\", ui.viewShowBuildings.isSelected(), \r\n\t\t\t\t\t\tui.viewSymbolicBuildings.isSelected(), ui.viewTextBackgrounds.isSelected(), Double.toString(renderer.scale), ui.viewStandardFonts.isSelected()\r\n\t\t\t\t\t\t, ui.viewPlacementHints.isSelected());\r\n\t\t\t\tout.printf(\" <custom-surface-names>%n\");\r\n\t\t\t\tfor (TileEntry te : surfaceTableModel.rows) {\r\n\t\t\t\t\tout.printf(\" <tile id='%s' type='%s' name='%s'/>%n\", te.id, XML.toHTML(te.surface), XML.toHTML(te.name));\r\n\t\t\t\t}\r\n\t\t\t\tout.printf(\" </custom-surface-names>%n\");\r\n\t\t\t\tout.printf(\" <custom-building-names>%n\");\r\n\t\t\t\tfor (TileEntry te : buildingTableModel.rows) {\r\n\t\t\t\t\tout.printf(\" <tile id='%s' type='%s' name='%s'/>%n\", te.id, XML.toHTML(te.surface), XML.toHTML(te.name));\r\n\t\t\t\t}\r\n\t\t\t\tout.printf(\" </custom-building-names>%n\");\r\n\t\t\t\tout.printf(\" <recent>%n\");\r\n\t\t\t\tfor (int i = ui.fileRecent.getItemCount() - 1; i >= 2 ; i--) {\r\n\t\t\t\t\tout.printf(\" <entry file='%s'/>%n\", XML.toHTML(ui.fileRecent.getItem(i).getText()));\r\n\t\t\t\t}\r\n\t\t\t\tout.printf(\" </recent>%n\");\r\n\t\t\t\tout.printf(\"</mapeditor-config>%n\");\r\n\t\t\t} finally {\r\n\t\t\t\tout.close();\r\n\t\t\t}\r\n\t\t} catch (IOException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public void saveProperties()\n {\n _appContext.Configuration.save();\n }", "public static void save()\n {\n try\n {\n FileOutputStream fOS = new FileOutputStream(propsFile); \n props.store(fOS, \"\");\n fOS.close();\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public static void saveConfig(File fi){\n\t\ttry {\n\n\t\t\tPrintStream ps = new PrintStream(fi);\n\n\t\t\tps.println(\"Name = \" + name);\n\t\t\tps.println(\"PrepositionLength = \" + prepositionLength);\n\t\t\tps.println(\"PrepositionDelay = \" + prepositionDelay);\n\t\t\tps.println(\"Strings = \" + setOfStrings.length);\n\t\t\tfor(int i = 0; i < setOfStrings.length; i++){\n\t\t\t\tps.println(\"LowNote = \" + setOfStrings[i].lowNote);\n\t\t\t\tps.println(\"HighNote = \" + setOfStrings[i].highNote);\n\t\t\t\tString output = \"\";\n\t\t\t\tfor(int j = 0; j < setOfStrings[i].interval.length;j++){\n\t\t\t\t\toutput += setOfStrings[i].interval[j] + \", \";\n\t\t\t\t}\n\t\t\t\tps.println(output);\n\t\t\t\tps.close();\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public String dumpConfig() \n\t\t\tthrows PermissionDeniedException, FileNotFoundException;", "public static void save() throws IOException {\n FileOutputStream f_out = new\n FileOutputStream(settingsFile);\n ObjectOutputStream o_out = new\n ObjectOutputStream(f_out);\n SettingsSaver s = new SettingsSaver();\n o_out.writeObject(s);\n o_out.close();\n f_out.close();\n }", "public void writeDefaultSettings(){\r\n try{\r\n File propFile;\r\n CodeSource codeSource = EMSimulationSettingsView.class.getProtectionDomain().getCodeSource();\r\n File jarFile = new File(codeSource.getLocation().toURI().getPath());\r\n File jarDir = jarFile.getParentFile();\r\n propFile = new File(jarDir, \"default_EMSettings.txt\");\r\n\r\n // Does the file already exist \r\n if(!propFile.exists()){ \r\n try{ \r\n // Try creating the file \r\n propFile.createNewFile(); \r\n }\r\n catch(IOException ioe) { \r\n ioe.printStackTrace(); \r\n } \r\n }\r\n try{\r\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(propFile)));\r\n out.println(\"Minim Method\\t\"+jComboBox1.getSelectedIndex()); \r\n\r\n if(jTextField1.getText().equals(\"\")){\r\n out.println(\"Step Size\\t0\");\r\n }\r\n else{\r\n out.println(\"Step Size\\t\"+jTextField1.getText().trim());\r\n }\r\n\r\n if(jTextField2.getText().equals(\"\")){\r\n out.println(\"Numsteps\\t0\");\r\n }\r\n else{\r\n out.println(\"Numsteps\\t\"+jTextField2.getText().trim());\r\n }\r\n\r\n if(jTextField3.getText().equals(\"\")){\r\n out.println(\"Convergence\\t0\");\r\n }\r\n else{\r\n out.println(\"Convergence\\t\"+jTextField3.getText().trim());\r\n }\r\n\r\n if(jTextField4.getText().equals(\"\")){\r\n out.println(\"Interval\\t0\");\r\n }\r\n else{\r\n out.println(\"Interval\\t\"+jTextField4.getText().trim());\r\n } \r\n out.close();\r\n }\r\n catch(Exception e){\r\n System.out.println(\"Exception caught writting settings\");\r\n e.printStackTrace();\r\n }\r\n }\r\n catch(Exception e){\r\n System.out.println(\"Exception caught writting settings\");\r\n e.printStackTrace();\r\n }\r\n \r\n }", "private void saveProperties()\n {\n PSConfigUtils.saveObjectToFile(m_props, getPropertiesFile());\n }", "public interface IConfigPersister {\n\n /**\n * Persist the configuration. \n * @throws IOException on error\n */\n void persist() throws IOException;\n}", "public static void saveConfig(Object config, File file) throws IOException {\n file.createNewFile();\n String json = gson.toJson(parser.parse(gson.toJson(config)));\n try (PrintWriter out = new PrintWriter(file)) {\n out.println(json);\n }\n }", "public void forceDefaultConfig()\n {\n plugin.saveResource(fileName, true);\n }", "public void saveConfig(String name) {\n\t\ttry {\n\t\t\tsaveXMLConfig(name);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void writePropertiesFile() throws IOException {\n // stop gradle daemon immediately and set maximum heap size to\n // a low value so the functional tests run well on the CI server\n String content = \"org.gradle.daemon.idletimeout=0\\n\" +\n \"org.gradle.jvmargs=-Xmx128M\\n\";\n\n FileUtils.writeStringToFile(propertiesFile, content, StandardCharsets.UTF_8);\n }", "private void writeProperties() {\n propsMutex.writeAccess(new Runnable() {\n public void run() {\n OutputStream out = null;\n FileLock lock = null;\n try {\n FileObject pFile = file.getPrimaryFile();\n FileObject myFile = FileUtil.findBrother(pFile, extension);\n if (myFile == null) {\n myFile = FileUtil.createData(pFile.getParent(), pFile.getName() + \".\" + extension);\n }\n lock = myFile.lock();\n out = new BufferedOutputStream(myFile.getOutputStream(lock));\n props.store(out, \"\");\n out.flush();\n lastLoaded = myFile.lastModified();\n logger.log(Level.FINE, \"Written AssetData properties for {0}\", file);\n } catch (IOException e) {\n Exceptions.printStackTrace(e);\n } finally {\n if (out != null) {\n try {\n out.close();\n } catch (IOException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n if (lock != null) {\n lock.releaseLock();\n }\n }\n }\n });\n }", "public void write(java.io.File f) throws java.io.IOException, Schema2BeansRuntimeException;", "void save( Configuration configuration )\n throws RegistryException, IndeterminateConfigurationException;", "public static void SavePreferences()\n {\n try\n {\n StartSaveAnimation();\n PrintWriter writer = new PrintWriter(preferences_file_name, \"UTF-8\");\n \n writer.print(Utilities.BoolToInt(MusicManager.enable_music) + \"\\r\\n\");\n writer.print(Utilities.BoolToInt(PassiveDancer.englishMode) + \"\\r\\n\");\n \n writer.close();\n }\n catch(Exception e) { System.out.println(\"Problem writing in the file \" + preferences_file_name + \".\"); }\n }", "private void storeProperties() {\n Path path = getSamplePropertiesPath();\n LOG.info(\"Storing Properties to {}\", path.toString());\n try {\n final FileOutputStream fos = new FileOutputStream(path.toFile());\n final Properties properties = new Properties();\n String privateKey = this.credentials.getEcKeyPair().getPrivateKey().toString(16);\n properties.setProperty(PRIVATE_KEY, privateKey);\n properties.setProperty(CONTRACT1_ADDRESS, this.contract1Address);\n properties.setProperty(CONTRACT2_ADDRESS, this.contract2Address);\n properties.setProperty(CONTRACT3_ADDRESS, this.contract3Address);\n properties.setProperty(CONTRACT4_ADDRESS, this.contract4Address);\n properties.setProperty(CONTRACT5_ADDRESS, this.contract5Address);\n properties.setProperty(CONTRACT6_ADDRESS, this.contract6Address);\n properties.store(fos, \"Sample code properties file\");\n\n } catch (IOException ioEx) {\n // By the time we have reached the loadProperties method, we should be sure the file\n // exists. As such, just throw an exception to stop.\n throw new RuntimeException(ioEx);\n }\n }", "public void saveProperties()\n\t\tthrows Exception\n\t{\n\n\t\t// Make sure dir exists before saving the file\n\t\tif (!imperson.fileExists(propertyDir)) {\n\t\t\timperson.createDirectory(propertyDir);\n\t\t}\n\n\n\t\tString str = \"\";\n\n\t\t// Sort the property names alphabetically\n\t\tEnumeration en = config.propertyNames();\n\t\tTreeSet sortedKeys = new TreeSet();\n\t\twhile (en.hasMoreElements()) {\n\t\t\tsortedKeys.add((String)en.nextElement());\n\t\t}\n\n\t\t// List them out\n\t\tIterator it = sortedKeys.iterator();\n\t\tString name = \"\";\n\t\tString prev = \"\";\n\t\tString group = \"\";\n\t\tint pos = -1;\n\t\twhile (it.hasNext()) {\n\n\t\t\tname = (String)it.next();\n\n\t\t\t// Check if this prop name is in\n\t\t\t// a different group as the previous one.\n\t\t\tpos = name.indexOf('.');\n\t\t\tif (pos > 0) {\n\t\t\t\tgroup = name.substring(0, pos);\n\t\t\t} else {\n\t\t\t\tgroup = name;\n\t\t\t}\n\t\t\t// add a comment line for the new group\n\t\t\tif (!prev.equals(group))\n\t\t\t\tstr += \"\\n# \" + group + \" config group\\n\";\n\n\t\t\t// add the property\n\t\t\tstr += name + \"=\" + (String)config.getProperty(name, \"\") + \"\\n\";\n\t\t\t\n\t\t\tprev = group;\n\t\t}\n\n\n\t\timperson.saveFile(propertyFile, str);\n\n\n\t}", "@Deprecated\n public static void writeConfigurationFile(\n final Configuration conf, final File confFile) throws IOException {\n try (final PrintStream printStream = new PrintStream(new FileOutputStream(confFile))) {\n printStream.print(toConfigurationString(conf));\n }\n }", "public void writeSettings(String name){\r\n try{\r\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(name + \"_EMSettings.txt\")));\r\n out.println(\"Minim Method\\t\"+jComboBox1.getSelectedIndex()); \r\n\r\n if(jTextField1.getText().equals(\"\")){\r\n out.println(\"Step Size\\t0\");\r\n }\r\n else{\r\n out.println(\"Step Size\\t\"+jTextField1.getText().trim());\r\n }\r\n\r\n if(jTextField2.getText().equals(\"\")){\r\n out.println(\"Numsteps\\t0\");\r\n }\r\n else{\r\n out.println(\"Numsteps\\t\"+jTextField2.getText().trim());\r\n }\r\n\r\n if(jTextField3.getText().equals(\"\")){\r\n out.println(\"Convergence\\t0\");\r\n }\r\n else{\r\n out.println(\"Convergence\\t\"+jTextField3.getText().trim());\r\n }\r\n\r\n if(jTextField4.getText().equals(\"\")){\r\n out.println(\"Interval\\t0\");\r\n }\r\n else{\r\n out.println(\"Interval\\t\"+jTextField4.getText().trim());\r\n } \r\n out.close();\r\n \r\n }\r\n catch(Exception e){\r\n System.out.println(\"Exception caught writting settings\");\r\n e.printStackTrace();\r\n }\r\n \r\n }", "protected abstract void writeFile();", "private void writeToFile(String data,Context context) {\n try {\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(context.openFileOutput(\"config.txt\", Context.MODE_PRIVATE));\n outputStreamWriter.write(data);\n outputStreamWriter.close();\n }\n catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "private void finalizeFileSystemFile() throws IOException {\n Path finalConfigPath = getFinalConfigPath(tempConfigPath);\n fileSystem.rename(tempConfigPath, finalConfigPath);\n LOG.info(\"finalize temp configuration file successfully, finalConfigPath=\"\n + finalConfigPath);\n }", "private void saveProps() {\n FileOutputStream out;\n \n try {\n out = new FileOutputStream(\"gamesettings.properties\");\n props.store(out, null);\n } catch (FileNotFoundException ex) {\n try {\n out = new FileOutputStream(new File(\"gamesettings.properties\"));\n props.store(out, null);\n } catch (FileNotFoundException ex1) {\n System.out.println(\"Saving failed!\");\n } catch (IOException ex1) {\n System.out.println(\"Saving failed!\");\n }\n } catch (IOException ex) {\n try {\n out = new FileOutputStream(new File(\"gamesettings.properties\"));\n props.store(out, null);\n } catch (FileNotFoundException ex1) {\n System.out.println(\"Saving failed!\");\n } catch (IOException ex1) {\n System.out.println(\"Saving failed!\");\n }\n }\n }", "private static void exportJsonFile(File configFile) {\n Gson gson = new Gson();\n \n // Java object to JSON, and assign to a String\n String jsonInString = gson.toJson(GameConfig.getInstance());\n \n try {\n FileWriter writer = new FileWriter(configFile);\n \n writer.append(jsonInString);\n writer.flush();\n writer.close();\n } catch (IOException e) {\n LogUtils.error(\"exportJsonFile => \",e);\n }\n }", "private void writeCheckpoint(String filename) {\n File file = new File(checkpointDir, filename);\n try {\n geneticProgram.savePopulation(new FileOutputStream(file));\n } catch (FileNotFoundException e) {\n log.log(Level.WARNING, \"Exception in dump\", e);\n }\n }", "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 }", "@Override\n\tpublic void flush() {\n\t\ttry {\n\t\t\tFile f = new File(path);\n\t\t\tFileWriter fw = new FileWriter(f);\n\t\t\tfw.write(\"\");\n\t\t\tfw.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t \n\t \n\t\n\t try {\n\t\t \n\t\t\n\t\t \n\t\t\tObjectOutputStream os;\n\t\t\tFile file = new File(path);\n\t\t\tFileOutputStream fos = new FileOutputStream(file, true);\n\t\t\tif (file.length() < 1) {\n\t\t\t\tos = new ObjectOutputStream(fos);\n\t\t\t} else {\n\t\t\t\tos = new MyObjectOutputStream(fos);\n\t\t\t}\n\t\t\tos.writeObject(constantPO);\n\t\t\tos.flush();\n\t\t\tos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void saveProject() {\n File f = new File(getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS), projectName + File.separator + \"render.cfg\");\n\n JSONObject json = new JSONObject();\n\n try {\n json.put(\"frames\", frames);\n json.put(\"a\", a);\n json.put(\"b\", b);\n json.put(\"P\", P);\n } catch (JSONException e) {\n Log.v(\"RenderSettings\", \"saveProject failed with a JSON Exception: \" + e.getMessage());\n }\n\n try (FileWriter file = new FileWriter(f)) {\n file.write(json.toString());\n } catch (IOException e) {\n Log.v(\"RenderSettings\", \"saveProject failed with a IO Exception: \" + e.getMessage());\n }\n }", "private void createConfig() {\n try {\n if (!getDataFolder().exists()) {\n getDataFolder().mkdirs();\n }\n File file = new File(getDataFolder(), \"config.yml\");\n if (!file.exists()) {\n getLogger().info(\"config.yml not found :( Creating one with default values...\");\n saveDefaultConfig();\n } else {\n getLogger().info(\"config.yml found :) Loading...\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }", "public static void saveProperties() {\n //if(debug_flag) \n //System.out.println(Util.asctime() + \" Saving properties to \" + propfilename + \" nkeys=\" + prop.size());\n try {\n try (FileOutputStream o = new FileOutputStream(propfilename)) {\n prop.store(o, propfilename + \" via Util.saveProperties() cp=\"\n + System.getProperties().getProperty(\"java.class.path\"));\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"Could not write properties to \" + propfilename);\n System.exit(1);\n } catch (IOException e) {\n System.out.println(\"Write error on properties to \" + propfilename);\n System.exit(1);\n }\n }", "public synchronized static void saveSettings() {\n try {\n ObjectOutputStream objectOutputStream = null;\n try {\n objectOutputStream = new ObjectOutputStream(new FileOutputStream(settingsfile));\n objectOutputStream.writeUnshared(transferITModel.getProperties());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getHostHistory());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getUsernameHistory());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getPasswordHistory());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getUsers());\n objectOutputStream.reset();\n objectOutputStream.writeUnshared(transferITModel.getUserRights());\n objectOutputStream.reset();\n objectOutputStream.flush();\n } catch (IOException ex1) {\n Logger.getLogger(TransferIT.class.getName()).log(Level.SEVERE, null, ex1);\n }\n objectOutputStream.close();\n } catch (IOException ex) {\n Logger.getLogger(TransferIT.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void saveToFile(final File file) throws IOException, AnalysisConfigurationException;", "public void close() {\n saveConfigurationSettings();\n removeAllLogHandlers();\n try {\n Constants.PREFS.flush();\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n }", "private void exportSettings() {\n\t\t\tfinal JFileChooser chooser = new JFileChooser(System.getProperty(\"user.home\"));\n\t\t\tint returnVal = chooser.showSaveDialog(null);\n\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\t\tFile saved = chooser.getSelectedFile();\n\t\t\t\ttry {\n\t\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(saved));\n\t\t\t\t\twriter.write(mySettings);\n\t\t\t\t\twriter.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 }\n\t}", "public boolean writeDataFile();", "private void saveSettings() {\n // Serialize the mIncludes map into a compact String. The mIncludedBy map can be\n // inferred from it.\n String encoded = encodeMap(mIncludes);\n\n try {\n if (encoded.length() >= 2048) {\n // The maximum length of a setting key is 2KB, according to the javadoc\n // for the project class. It's unlikely that we'll\n // hit this -- even with an average layout root name of 20 characters\n // we can still store over a hundred names. But JUST IN CASE we run\n // into this, we'll clear out the key in this name which means that the\n // information will need to be recomputed in the next IDE session.\n mProject.setPersistentProperty(CONFIG_INCLUDES, null);\n } else {\n String existing = mProject.getPersistentProperty(CONFIG_INCLUDES);\n if (!encoded.equals(existing)) {\n mProject.setPersistentProperty(CONFIG_INCLUDES, encoded);\n }\n }\n } catch (CoreException e) {\n AdtPlugin.log(e, \"Can't store include settings\");\n }\n }", "public void flush() {\n\t\tGson gson = new GsonBuilder().serializeNulls().setPrettyPrinting().create();\n\t\tPath systemsFile = this.dir.resolve(SYSTEMS_FILE);\n\t\ttry (var writer = Files.newBufferedWriter(systemsFile)) {\n\t\t\tgson.toJson(this.systemsConfig, writer);\n\t\t\twriter.flush();\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"Could not save systems config.\", e);\n\t\t}\n\t\tfor (var config : this.guilds.values()) {\n\t\t\tconfig.flush();\n\t\t}\n\t}", "public final void writeConfig(Json json) {\n json.writeObjectStart();\n \n // Yeah, this isn't really an array, but DodlesActors assume they're in an array... :(\n json.writeArrayStart(\"actor\");\n actor.writeConfig(json);\n json.writeArrayEnd();\n \n json.writeArrayStart(\"instances\");\n for (CharacterInstance instance : instances) {\n instance.writeConfig(json);\n }\n json.writeArrayEnd();\n \n json.writeValue(\"characterName\", characterName);\n \n json.writeObjectEnd();\n }", "public static void SaveWorldConfiguration(WorldConfiguration worldConfig, String path) {\n Gson gson = new Gson();\n String jsonWorldConfig = gson.toJson(worldConfig);\n StoreJsonToFile(path, jsonWorldConfig);\n }", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }" ]
[ "0.7682369", "0.72228235", "0.7148205", "0.7126673", "0.6941485", "0.69163716", "0.68102586", "0.6779924", "0.677471", "0.6746185", "0.6674763", "0.6659136", "0.6619093", "0.6601776", "0.6591539", "0.6536408", "0.64996165", "0.64658344", "0.64056545", "0.6398627", "0.6334934", "0.63296074", "0.6326595", "0.62981915", "0.6298055", "0.62830186", "0.6253199", "0.6250404", "0.62477493", "0.62169874", "0.61969274", "0.6177022", "0.6120359", "0.60714567", "0.60295534", "0.60276306", "0.6010498", "0.59734696", "0.59343284", "0.59013367", "0.5895919", "0.5888773", "0.58873934", "0.58644414", "0.57929015", "0.5740169", "0.5725375", "0.5719746", "0.5710118", "0.56834173", "0.5669532", "0.5653356", "0.5637445", "0.56345344", "0.56329393", "0.5630772", "0.56060606", "0.5575248", "0.55749726", "0.5571273", "0.55293286", "0.5524357", "0.55195713", "0.54954195", "0.54910886", "0.5474761", "0.5466168", "0.5459893", "0.5458118", "0.54517645", "0.5439465", "0.54156226", "0.5399175", "0.5399104", "0.5397932", "0.53910404", "0.53892034", "0.53872234", "0.53860086", "0.53577924", "0.5354259", "0.53486985", "0.5345091", "0.53442967", "0.53203523", "0.5306869", "0.53006923", "0.5264842", "0.5245324", "0.52443326", "0.5238862", "0.5213694", "0.5200735", "0.5197873", "0.5197548", "0.5189858", "0.518815", "0.5177951", "0.51670027", "0.5160554" ]
0.62776965
26
Builds a tab for file or command view from a selected line of selection.
void buildTabFromSelection(GralFileSelector.FavorPath info, GralPanelContent tabPanel) { assert(false); /* tabPanel.addGridPanel(info.tabName1, info.tabName1,1,1,10,10); mng.setPosition(0, 0, 0, -0, 1, 'd'); //the whole panel. FileSelector fileSelector = new FileSelector("fileSelector-"+info.tabName1, mng); fileSelector.setActionOnEnterFile(main.executer.actionExecute); main.idxFileSelector.put(info.tabName1, fileSelector); fileSelector.setToPanel(mng, info.tabName1, 5, new int[]{2,20,5,10}, 'A'); fileSelector.fillIn(new File(info.path)); */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createSingleTab(String text, Path path) {\r\n\t\tif (text == null) {\r\n\t\t\ttext = \"\";\r\n\t\t}\r\n\t\t\r\n\t\tJTextArea txtArea = new JTextArea(text);\r\n\t\ttxtArea.getDocument().addDocumentListener(new DocumentListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\t\t\r\n\t\t\t\tchangeIcon();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\t\t\r\n\t\t\t\tchangeIcon();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\r\n\t\t\t\tchangeIcon();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tprivate void changeIcon() {\r\n\t\t\t\ttabbedPane.setIconAt(tabbedPane.getSelectedIndex(), redIcon);\r\n\t\t\t}\r\n\t\t});\r\n\t\ttxtArea.addCaretListener(new CaretListener() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void caretUpdate(CaretEvent e) {\r\n\t\t\t\tlengthLab.setText(\"Length: \"+txtArea.getText().length());\r\n\t\t\t\t\r\n\t\t\t\tint offset = txtArea.getCaretPosition();\r\n\t int line= 1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tline = txtArea.getLineOfOffset(offset);\r\n\t\t\t\t} catch (BadLocationException ignorable) {}\r\n\t\t\t\tlnLab.setText(\"Ln: \"+(line+1));\r\n\t\t\t\t\r\n\t\t\t\tint col = 1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcol = offset - txtArea.getLineStartOffset(line);\r\n\t\t\t\t} catch (BadLocationException ignorable) {}\r\n\t\t\t\tcolLab.setText(\"Col: \"+ (col+1));\r\n\t\t\t\t\r\n\t\t\t\tint sel = Math.abs(txtArea.getSelectionStart() - txtArea.getSelectionEnd());\t\r\n\t\t\t\tselLab.setText(\"sel: \"+sel);\r\n\t\t\t\tfor (JMenuItem i : toggable) {\r\n\t\t\t\t\tboolean enabled;\r\n\t\t\t\t\tenabled = sel != 0;\r\n\t\t\t\t\ti.setEnabled(enabled);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJScrollPane scrPane = new JScrollPane(txtArea);\r\n\t\tif (path == null) {\t//create empty tab\t\r\n\t\t\tString name = \"New \" + (count +1);\r\n\t\t\ttabbedPane.addTab(name, greenIcon, scrPane, \"\");\r\n\t\t\tcount++;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\ttabbedPane.addTab(path.getFileName().toString(), greenIcon, scrPane, path.toString());\r\n\t\tcount++;\r\n\t}", "public void openEditor(FileTreeNode selectedNode, VMResource resource, PostProcessHandler handler) {\n String tabId = selectedNode.getAttribute(\"UniqueId\");\n\n for (Tab tab : editorTabSet.getTabs()) {\n long ref = tab.getAttributeAsLong(\"ref\");\n if (resource.getId() == ref) {\n tabId = tab.getAttributeAsString(\"UniqueId\");\n if (tabId.contains(\"_historyEditor\")) {\n tabId = tabId.substring(0, tabId.lastIndexOf(\"_historyEditor\"));\n }\n selectedNode.setAttribute(\"UniqueId\", tabId);\n selectedNode.setResource(resource);\n break;\n }\n }\n if (null == tabId || \"\".equals(tabId)) {\n tabId = HTMLPanel.createUniqueId().replaceAll(\"-\", \"_\");\n selectedNode.setAttribute(\"UniqueId\", tabId);\n selectedNode.setResource(resource);\n }\n String tabName = resource.getName();\n Tab tab = editorTabSet.getTab(tabId);\n if (tab == null) {\n tab = new Tab();\n Extension extension = ((VMFile) resource).getExtension();\n String extensionStr = ((VMFile) resource).getExtensionStr();\n tab.setTitle(getTabImgTitle(tabName, extension));\n tab.setCanClose(true);\n tab.setID(tabId);\n tab.setPrompt(tree.getParentPath(selectedNode));\n tab.setAttribute(\"ref\", resource.getId());\n tab.setAttribute(\"UniqueId\", tabId);\n tab.setAttribute(\"Extension\", extensionStr);\n tab.setAttribute(\"TabName\", tabName);\n createView(tab, (VMFile) resource, handler);\n } else {\n editorTabSet.selectTab(tabId);\n }\n }", "private void createView(Tab tab, VMFile file, PostProcessHandler handler) {\n editResourceService.getFileContent(file.getId(), new AsyncCallback<byte[]>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n BinaryResourceImpl r = new BinaryResourceImpl();\n ByteArrayInputStream bi = new ByteArrayInputStream(result);\n AbstractRootElement root = null;\n try {\n if (file.getExtension() != Extension.TXT && file.getExtension() != Extension.LSC && file.getExtension() != Extension.CSC) {\n r.load(bi, EditOptions.getDefaultLoadOptions());\n root = (AbstractRootElement) r.getContents().get(0);\n }\n } catch (IOException e) {\n SC.warn(e.getMessage());\n }\n Editor editor;\n if (file.getExtension() == null) {\n editor = new TextEditor(tab, file, editResourceService);\n editor.create();\n } else\n switch (file.getExtension()) {\n\n case ARC:\n editor = new ARCEditor((ARCRoot) root, projectId, editResourceService);\n editor.create();\n clickNewStateMachine((ARCEditor) editor, file);\n clickOpenFile((ARCEditor) editor);\n break;\n case FM:\n editor = new FMEditor((FMRoot) root, projectId, file.getId(), editResourceService);\n editor.create();\n clickOpenFile((FMEditor) editor);\n clickCreateChildModel((FMEditor) editor, file);\n setFileNameToReferenceNode((FMEditor) editor);\n break;\n case FMC:\n editor = new FMCEditor((FMCRoot) root, file.getId(), projectId, editResourceService);\n editor.create();\n break;\n case FSM:\n editor = new FSMEditor((FSMDStateMachine) root, file.getId());\n editor.create();\n break;\n case SCD:\n editor = new SCDEditor((SCDRoot) root, tab, projectId, ModelingProjectView.this, editResourceService);\n editor.create();\n clickOpenFile((SCDEditor) editor);\n break;\n case SPQL:\n editor = new SPQLEditor((SPQLRoot) root, tab, projectId, editResourceService);\n editor.create();\n clickOpenFile((SPQLEditor) editor);\n break;\n case TC:\n editor = new TCEditor((TCRoot) root, projectId, file.getName(), editResourceService);\n editor.create();\n break;\n case BPS:\n editor = new BPSEditor((BPSRoot) root, ModelingProjectView.this, projectId, file.getId(), editResourceService);\n editor.create();\n break;\n case BP:\n editor = new BPEditor((BPRoot) root, projectId, file, editResourceService);\n editor.create();\n break;\n case FPS:\n editor = new TPSEditor((TPSRoot) root, ModelingProjectView.this, projectId, file.getId(), editResourceService);\n editor.create();\n break;\n case FP:\n editor = new TPViewer((TPRoot) root, projectId, file, editResourceService);\n editor.create();\n break;\n case CSC:\n editor = new CSCEditor(tab, file, editResourceService);\n editor.create();\n break;\n case SCSS:\n editor = new CBEditor((CBRoot) root, ModelingProjectView.this, projectId, file.getId(), editResourceService);\n editor.create();\n break;\n case SCS:\n editor = new SCSEditor((SCSRoot) root, ModelingProjectView.this, projectId, file, editResourceService);\n editor.create();\n break;\n case CSCS:\n editor = new CSCSEditor((CSCSRoot) root, projectId, file);\n editor.create();\n break;\n default:\n editor = new TextEditor(tab, file, editResourceService);\n editor.create();\n }\n createTabMenu(tab, editor.getSaveItem());\n clickSaveFile(editor, tab);\n\n if (editor instanceof NodeArrangeInterface) {\n NodeArrange.add((NodeArrangeInterface) editor);\n }\n tab.setPane(editor.getLayout());\n tab.setAttribute(EDITOR, editor);\n editorTabSet.addTab(tab);\n editorTabSet.selectTab(tab.getAttributeAsString(\"UniqueId\"));\n if (handler != null) {\n handler.execute();\n }\n }\n });\n }", "public void addTab(DocumentWrapper file, String text) {\n\t\tJTextArea textEditor = new JTextArea();\n\n\t\ttextEditor.setText(text);\n\t\ttextEditor.getDocument().putProperty(\"changed\", false);\n\t\ttextEditor.addCaretListener(new CaretListener() {\n\t\t\t@Override\n\t\t\tpublic void caretUpdate(CaretEvent arg0) {\n\t\t\t\tint dot = arg0.getDot();\n\t\t\t\tint mark = arg0.getMark();\n\n\t\t\t\tint caretpos = textEditor.getCaretPosition();\n\t\t\t\tint lineNum = 1;\n\t\t\t\tint columnNum = 1;\n\t\t\t\ttry {\n\t\t\t\t\tlineNum = textEditor.getLineOfOffset(caretpos);\n\t\t\t\t\tcolumnNum = 1 + caretpos - textEditor.getLineStartOffset(lineNum);\n\t\t\t\t\tlineNum += 1;\n\n\t\t\t\t} catch (BadLocationException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\tstatusLabel.setText(\"length : \" + textEditor.getText().length());\n\t\t\t\tlineLabel.setText(\"Ln : \" + lineNum);\n\t\t\t\tcolumnLabel.setText(\"Col : \" + columnNum);\n\t\t\t\tselectedLabel.setText(\"Sel : \" + Math.abs(dot - mark));\n\t\t\t\t;\n\n\t\t\t\tif (dot == mark) {\n\t\t\t\t\titemInvert.setEnabled(false);\n\t\t\t\t\titemLower.setEnabled(false);\n\t\t\t\t\titemUpper.setEnabled(false);\n\t\t\t\t} else {\n\t\t\t\t\titemInvert.setEnabled(true);\n\t\t\t\t\titemLower.setEnabled(true);\n\t\t\t\t\titemUpper.setEnabled(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttextEditor.getDocument().addDocumentListener(new DocumentListener() {\n\n\t\t\t@Override\n\t\t\tpublic void insertUpdate(DocumentEvent e) {\n\t\t\t\ttextEditor.getDocument().putProperty(\"changed\", true);\n\n\t\t\t\tButtonTabComponent comp = (ButtonTabComponent) pane.getTabComponentAt(pane.getSelectedIndex());\n\n\t\t\t\tcomp.setImage(true);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void removeUpdate(DocumentEvent e) {\n\t\t\t\ttextEditor.getDocument().putProperty(\"changed\", true);\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\ttextEditor.getDocument().putProperty(\"changed\", true);\n\n\t\t\t}\n\t\t});\n\n\t\tfile.setEditor(textEditor);\n\n\t\tJScrollPane scPane = new JScrollPane(textEditor);\n\t\tJPanel panel = new JPanel(new BorderLayout());\n\t\tpanel.add(scPane, BorderLayout.CENTER);\n\n\t\tint index = pane.getTabCount();\n\n\t\tpane.addTab(file.getName(), textEditor);\n\n\t\tinitTabComponent(file, index);\n\t}", "public Tab createOpenEditorTab(long fileId, boolean useSearch) {\n Tab retTab = new Tab();\n long ref = 0;\n StringBuilder tabId = new StringBuilder();\n for (Tab tab : editorTabSet.getTabs()) {\n if (tab.getAttributeAsLong(\"ref\") == fileId) {\n ref = tab.getAttributeAsLong(\"ref\");\n tabId.append(tab.getAttributeAsString(\"UniqueId\"));\n editorTabSet.selectTab(tabId.toString());\n if (useSearch) {\n search.selectSearchResultModel(tab);\n return null;\n } else {\n return tab;\n }\n }\n }\n\n if (ref == 0) {\n editResourceService.getVMFile(fileId, new AsyncCallback<VMFile>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(VMFile result) {\n if (result == null) {\n SC.warn(\"File not found.\");\n return;\n }\n\n tabId.append(HTMLPanel.createUniqueId().replaceAll(\"-\", \"_\"));\n String tabName = result.getName();\n retTab.setTitle(getTabImgTitle(tabName, result.getExtension()));\n retTab.setCanClose(true);\n retTab.setID(tabId.toString());\n String path = result.getFullPath().replaceAll(\"(.*)/\" + result.getName() + \"\\\\.\" + result.getExtensionStr() + \"$\", \"$1\");\n retTab.setPrompt(path);\n retTab.setPane(new Layout());\n retTab.setAttribute(\"ref\", fileId);\n retTab.setAttribute(\"UniqueId\", tabId.toString());\n retTab.setAttribute(\"Extension\", result.getExtension().getValue());\n retTab.setAttribute(\"TabName\", tabName);\n createView(retTab, result, new PostProcessHandler() {\n @Override\n public void execute() {\n if (useSearch) {\n search.selectSearchResultModel(retTab);\n }\n }\n });\n }\n });\n return retTab;\n }\n return retTab;\n }", "@Override\n\tpublic void selectTab(Tab tab) {\n\t\t\n\t}", "private void addNewTab(SingleDocumentModel model) {\n\t\tString title = model.getFilePath()==null ? \"unnamed\" : model.getFilePath().getFileName().toString();\n\t\tImageIcon icon = createIcon(\"icons/green.png\");\n\t\tJScrollPane component = new JScrollPane(model.getTextComponent());\n\t\tString toolTip = model.getFilePath()==null ? \"unnamed\" : model.getFilePath().toAbsolutePath().toString();\n\t\taddTab(title, icon, component, toolTip);\n\t\tsetSelectedComponent(component);\n\t}", "private void buildViewMenu(){\n //Create a Run Payroll menu item\n viewItem = new JMenuItem(\"View CS History\");\n viewItem.setMnemonic(KeyEvent.VK_H);\n viewItem.addActionListener(new ViewListener());\n \n //Create a JMenu object for the run menu\n viewMenu = new JMenu(\"View\");\n viewMenu.setMnemonic(KeyEvent.VK_V);\n \n //Add the item to the menu\n viewMenu.add(viewItem);\n }", "@Override\n public void onClick(View v) {\n switch (v.getId()) {\n case R.id.main_ll_xw:\n setTabSelection(0);\n break;\n case R.id.main_ll_rili:\n setTabSelection(1);\n break;\n case R.id.main_ll_hq:\n setTabSelection(2);\n break;\n case R.id.main_ll_wd:\n setTabSelection(3);\n break;\n\n case R.id.main_ll_self:\n setTabSelection(4);\n break;\n }\n }", "public void tabSelected();", "public ViewScheCommand(String line) throws DukeException {\n String[] arrOfStr = line.split(\"\\\\s+\");\n\n this.option = arrOfStr[0].trim();\n if (option.equals(\"/all\")) {\n if (arrOfStr.length > 1) {\n this.date = Parser.parseDate(arrOfStr[1].trim());\n sortByDate = true;\n }\n } else if (option.equals(\"/member\")) {\n this.memberName = arrOfStr[1].trim();\n if (arrOfStr.length > 2) {\n this.date = Parser.parseDate(arrOfStr[2].trim());\n sortByDate = true;\n }\n }\n }", "public void setSelection(int line, int column){\n if(column > 0 && isEmoji(mText.charAt(line,column - 1))) {\n column++;\n if(column > mText.getColumnCount(line)) {\n column--;\n }\n }\n mCursor.set(line, column);\n if(mHighlightCurrentBlock){\n mCursorPosition = findCursorBlock();\n }\n updateCursorAnchor();\n updateSelection();\n makeCharVisible(line,column);\n mTextActionPanel.hide();\n }", "@Override\r\n public void widgetSelected(final SelectionEvent event) {\r\n System.out.println(\"TN5250JPart: Tab folder selected: \" + tn5250jPart.getClass().getSimpleName());\r\n setFocus();\r\n }", "private void cmdOpen(String line) {\n boolean doEcho = true;\n StringTokenizer st = new StringTokenizer(line);\n\n // if there is no filename and option\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \" + \"Try `help'.\");\n return;\n }\n\n String token = st.nextToken();\n // option quiet\n if (token.equals(\"-q\")) {\n doEcho = false;\n\n // if there is no filename\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \"\n + \"Try `help'.\");\n return;\n }\n token = st.nextToken();\n }\n\n // to find out what command will be needed\n try {\n \t// if quoted add remaining tokens\n \tif (token.startsWith(\"\\\"\")) {\n \t\twhile (st.hasMoreTokens()) {\n \t\t\ttoken += \" \" + st.nextToken();\n \t\t}\n \t}\n \t\n \tString filename = getFilenameToOpen(token);\n String firstWord = getFirstWordOfFile(filename);\n setFileClosed();\n \n // if getFirstWordOfFile returned with error code, than\n // end this method.\n if (firstWord != null && firstWord.equals(\"ERROR: -1\")) {\n return;\n }\n if (firstWord == null) {\n Log.println(\"Nothing to do, because file `\" + line + \"' \"\n + \"contains no data!\");\n // Necessary if USE is started with a cmd-file and option -q or\n // -qv. This call provides the readline stack with the one\n // readline object and no EmptyStackException will be thrown.\n if (Options.cmdFilename != null) {\n cmdRead(Options.cmdFilename, false);\n }\n return;\n }\n if (firstWord.startsWith(\"model\")) {\n cmdOpenUseFile(token);\n } else if (firstWord.startsWith(\"context\")) {\n cmdGenLoadInvariants(token, system(), doEcho);\n } else if (firstWord.startsWith(\"testsuite\")) {\n \tcmdRunTestSuite(token);\n } else {\n cmdRead(token, doEcho);\n }\n \n if (this.openFiles.size() <= 1) {\n \tString opened;\n \t\n \tif (this.openFiles.size() == 0)\n \t\topened = filename;\n \telse\n \t\topened = this.openFiles.peek().toString();\n \t\n \t\tif (Options.getRecentFiles().contains(opened)) {\n \t\t\tOptions.getRecentFiles().remove(opened);\n \t\t}\n \t\t \t\t\t\n \t\tOptions.getRecentFiles().push(opened);\n \t}\n } catch (NoSystemException e) {\n Log.error(\"No System available. Please load a model before \"\n + \"executing this command.\");\n }\n }", "public void jumpToLine(int line) {\n setSelection(line,0);\n }", "public void openTab(String tabName){\r\n\r\n\t\tTabView selectedTabView = new TabView(this);\r\n\t\ttabViews.add(selectedTabView);\r\n\t\t\r\n\t\t\r\n\t\tif(tabName == null){ // If a new tab..\r\n\t\t\t// Ensure that there isn't already a model with that name\r\n\t\t\twhile(propertiesMemento.getTabNames().contains(tabName) || tabName == null){\r\n\t\t\t\ttabName = \"New Model \" + newModelIndex;\r\n\t\t\t\tnewModelIndex++;\r\n\t\t\t}\r\n\t\t}\r\n logger.info(\"Adding tab:\" + tabName);\r\n\r\n\t\t// Just resizes and doesn't scroll - so don't need the scroll pane\r\n\t\t/*JScrollPane scrollPane = new JScrollPane(selectedTabView, \r\n \t\t\t\t\t\t\t\t JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, \r\n \t\t\t\t\t\t\t\t JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\r\n scrollPane.getVerticalScrollBar().setUnitIncrement(20);\r\n tabbedPane.addTab(tabName, scrollPane);*/\r\n\r\n\t\ttabbedPane.addTab(tabName, selectedTabView);\r\n\r\n currentView = selectedTabView;\r\n tabbedPane.setSelectedIndex(tabbedPane.getTabCount() - 1);\r\n setTabName(tabName);\r\n\t\t\t\t\r\n tabbedPane.setTabComponentAt(tabbedPane.getSelectedIndex(), \r\n\t\t\t\t new TabButtonComponent(propertiesMemento.getImageDir(), this, currentView));\r\n \r\n // Add Mouse motion Listener \r\n currentView.addMouseMotionListener(currentView);\r\n currentView.addMouseListener(currentView);\r\n\r\n // Record the tab in the memento\r\n propertiesMemento.addTabRecord(tabName);\r\n \r\n setTabButtons(true);\r\n \r\n setStatusBarText(\"Ready\");\r\n\r\n requestFocusInWindow();\r\n\t}", "private void createTabs() {\r\n\t\ttabbedPane = new JTabbedPane();\r\n\t\t\r\n\t\t//changes title and status bar \r\n\t\ttabbedPane.addChangeListener((l) -> { \r\n\t\t\tint index = tabbedPane.getSelectedIndex();\r\n\t\t\tif (index < 0) {\r\n\t\t\t\tcurrentFile = \"-\";\r\n\t\t\t} else {\r\n\t\t\t\tcurrentFile = tabbedPane.getToolTipTextAt(index);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (currentFile.isEmpty()) {\t//file not yet saved\r\n\t\t\t\tcurrentFile = tabbedPane.getTitleAt(tabbedPane.getSelectedIndex());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tsetTitle(currentFile + \" - JNotepad++\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tJTextArea current = getSelectedTextArea();\r\n\t\t\tif (current == null) return;\r\n\t\t\tCaretListener[] listeners = current.getCaretListeners();\r\n\t\t\tlisteners[0].caretUpdate(new CaretEvent(current) {\r\n\t\t\t\t\r\n\t\t\t\t/**\r\n\t\t\t\t * Serial UID.\r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic int getMark() {\r\n\t\t\t\t\treturn 0;\t//not used\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic int getDot() {\r\n\t\t\t\t\treturn current.getCaretPosition();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t\t\r\n\t\tcreateSingleTab(null, null);\r\n\t\tgetContentPane().add(tabbedPane, BorderLayout.CENTER);\t\r\n\t}", "private void initFileTab()\n\t{\n\t\t\n\t\tMainApp.getMainController().requestAddTab(fileTab);\n\t\t\n\t\t\n\t\tfileTab.getCodeArea().textProperty().addListener((obs, oldv, newv) -> dirty.set(true));\n\t\t\n\t\tdirty.addListener((obs, oldv, newv) -> {\n\t\t\t\n\t\t\tString tabTitle = fileTab.getText();\n\t\t\t\n\t\t\tif (newv && !tabTitle.endsWith(\"*\"))\n\t\t\t\tfileTab.setText(tabTitle + \"*\");\n\t\t\t\n\t\t\telse if (!newv && tabTitle.endsWith(\"*\"))\n\t\t\t\tfileTab.setText(tabTitle.substring(0, tabTitle.length()-1));\n\t\t});\n\t\t\n\t\t\n\t\tfileTab.setOnCloseRequest(e -> {\n\t\t\t\n\t\t\tboolean success = FileManager.closeFile(this);\n\t\t\t\n\t\t\tif (!success)\n\t\t\t\te.consume();\n\t\t});\n\t\t\n\t\tMainApp.getMainController().selectTab(fileTab);\n\t}", "@Override\n\tpublic void createPartControl(Composite parent) {\n\t\tTree tree = new Tree(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); //create a tree \n\t\ttree.setHeaderVisible(true);//show header in interface\n\t\ttree.setLinesVisible(true); //show lines in interface\n\t\tviewer = new TreeViewer(tree);\n\n\t\t//first column\n\t\tTreeColumn column1 = new TreeColumn(tree, SWT.LEFT);\n\t\tcolumn1.setText(\"Project\");\n\t\tcolumn1.setWidth(500);\n\n\t\t//second column\n\t\tTreeColumn column2 = new TreeColumn(tree, SWT.LEFT);\n\t\tcolumn2.setText(\"DUAs Coverage\");\n\t\tcolumn2.setWidth(200);\n\n\t\tlong start = System.currentTimeMillis();\n\t\t\n\t\tviewer.setContentProvider(new CoverageContentProvider());\n\t\tviewer.setLabelProvider(new CoverageLabelProvider());\n\t\tviewer.setInput(new CoverageInput());\t\t// provide the input to the ContentProvider\n\t\tlogger.info(\"Time to show view: \" + (System.currentTimeMillis() - start) / 1000.0);\n\t\t\n\t\t//change selection event\n\t\tviewer.addSelectionChangedListener(new ISelectionChangedListener() {\n\n\t\t\t@Override\n\t\t\tpublic void selectionChanged(SelectionChangedEvent event) {\n\t\t\t\tIStructuredSelection thisSelection = (IStructuredSelection) event.getSelection();\n\t\t\t\tObject selectedNode = thisSelection.getFirstElement();\n\t\t\t\t\n\t\t\t\tif(selectedNode instanceof TreeDua){\n\t\t\t\t\tfinal ICompilationUnit cu = ((TreeDua) selectedNode).getCompilationUnit();\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//remove old markers\n\t\t\t\t\t\tCodeMarkerFactory.removeMarkers(CodeMarkerFactory.findMarkers(cu.getUnderlyingResource()));\n\t\t\t\t\t\t//get the first and last char of definition line to draw\n\t\t\t\t\t\tint[] defOffset = parserLine(cu.getSource(),((TreeDua) selectedNode).getDef());\n\t\t\t\t\t\t//get the first and last char of c-use line to draw\n\t\t\t\t\t\tint[] useOffset = parserLine(cu.getSource(), ((TreeDua) selectedNode).getUse());\n\t\t\t\t\t\t//get the first and last char of target line to draw\n\t\t\t\t\t\tint[] targetOffset = null;\n\t\t\t\t\t\tif(((TreeDua) selectedNode).getTarget() != 1){\n\t\t\t\t\t\t\ttargetOffset = parserLine(cu.getSource(),((TreeDua) selectedNode).getTarget());\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//create new markers based on selected DUA\n\t\t\t\t\t\tfinal TreeDua dua = (TreeDua) selectedNode;\n\t\t\t\t\t\tfinal String covered = dua.isCovered()? \"true\" : \"false\";\n\t\t\t\t\t\tCodeMarkerFactory.mark(cu.getUnderlyingResource(), defOffset, useOffset, targetOffset, covered);\n\t\t\t\t\t\tsetFocus();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t\t//double click event to expand state\n\t\tviewer.addDoubleClickListener(new IDoubleClickListener() {\n\t\t\t@Override\n\t\t\tpublic void doubleClick(DoubleClickEvent event) {\n\t\t\t\tTreeViewer viewer = (TreeViewer) event.getViewer();\n\t\t\t\tIStructuredSelection thisSelection = (IStructuredSelection) event\n\t\t\t\t\t\t.getSelection();\n\t\t\t\tObject selectedNode = thisSelection.getFirstElement();\n\n\t\t\t\tif(selectedNode instanceof TreeMethod \n\t\t\t\t\t\t|| selectedNode instanceof TreeClass \n\t\t\t\t\t\t|| selectedNode instanceof TreePackage \n//\t\t\t\t\t\t|| selectedNode instanceof TreeFolder \n\t\t\t\t\t\t|| selectedNode instanceof TreeProject){\n\n\t\t\t\t\tviewer.setExpandedState(selectedNode,\n\t\t\t\t\t\t\t!viewer.getExpandedState(selectedNode));\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\t\n\t\t//Listener to closing view in workbench shutdown\n\t\tPlatformUI.getWorkbench().addWorkbenchListener(new IWorkbenchListener() {\n\t\t\t@Override\n\t\t\tpublic boolean preShutdown(IWorkbench workbench, boolean forced) {\n\t\t\t\tcloseViews();\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void postShutdown(IWorkbench workbench) {\n\t\t\t}\n\t\t});\n\n\t}", "private static MenuItem createFileTreePasteMenuItem(SongManager model, Item selectedItem) {\n MenuItem paste = new MenuItem(PASTE);\n\n paste.setOnAction((event) -> {\n if (selectedItem != null) {\n File dest = selectedItem.getFile();\n if (!dest.isDirectory()) {\n PromptUI.customPromptError(\"Not a directory!\", null, \"Please select a directory as the paste target.\");\n return;\n }\n try {\n model.copyToDestination(dest);\n } catch (IOException ex) {\n PromptUI.customPromptError(\"Error\", null, \"IOException: \" + ex.getMessage());\n } catch (Exception ex) {\n PromptUI.customPromptError(\"Error\", null, \"Exception: \" + ex.getMessage());\n }\n }\n });\n\n return paste;\n }", "public PathTabView(){\n\t\t\n\t\t//PATH Index directory\n\t\tlblIndexerPath=new JLabel(\"Indexes destination : \");\n\t\ttxtIndexerPath=new JTextField();\n\t\ttxtIndexerPath.setPreferredSize(new Dimension(200,25));\n\t\ttxtIndexerPath.setText(Configuration.getInstance().getIndexPath());\n\t\tpanelIndexer=new JPanel();\n\t\tpanelIndexer.setBorder(BorderFactory.createTitledBorder(\"Indexation\"));\n\t\tbtnBrowserIndexer=new JButton(\"...\");\n\t\tbtnBrowserIndexer.addActionListener(new BrowserClickController(this,1));\n\t\tpanelIndexer.add(lblIndexerPath);\n\t\tpanelIndexer.add(txtIndexerPath);\n\t\tpanelIndexer.add(btnBrowserIndexer);\n\t\t\n\t\t//PATH Data directory\n\t\tlblDataPath=new JLabel(\"Datas directory : \");\n\t\ttxtDataPath=new JTextField();\n\t\ttxtDataPath.setPreferredSize(new Dimension(200,25));\n\t\ttxtDataPath.setText(Configuration.getInstance().getDataPath());\n\t\tpanelData=new JPanel();\n\t\tpanelData.setBorder(BorderFactory.createTitledBorder(\"Data\"));\n\t\tbtnBrowserData=new JButton(\"...\");\n\t\tbtnBrowserData.addActionListener(new BrowserClickController(this,2));\n\t\tpanelData.add(lblDataPath);\n\t\tpanelData.add(txtDataPath);\n\t\tpanelData.add(btnBrowserData);\n\t\t\n\t\t//Init button cancel & save\n\t\tbtnSubmit=new JButton(\"Save\");\n\t\tbtnSubmit.addActionListener(new SubmitPathClickController(this));\n\t\tbtnCancel=new JButton(\"Cancel\");\n\t\tbtnCancel.addActionListener(new CancelPathClickController(this));\n\t\t\n\t\tsplitPath=new JSplitPane(JSplitPane.VERTICAL_SPLIT,panelData,panelIndexer);\n\t\tpanelButton=new JPanel();\n\t\tpanelButton.add(btnSubmit);\n\t\tpanelButton.add(btnCancel);\n\t\t\n\t\tsplitMain=new JSplitPane(JSplitPane.VERTICAL_SPLIT,splitPath,panelButton);\n\t\t\n\t\tthis.add(splitMain);\n\t\trazTextPath();\n\t\tthis.setVisible(true);\n\t}", "protected Tool createSelectionTool() {\n return new SelectionTool(view());\n }", "private void createContents() {\n shell = new Shell(getParent(), SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL);\n shell.setSize(FORM_WIDTH, 700);\n shell.setText(getText());\n shell.setLayout(new GridLayout(1, false));\n\n TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\n tabFolder.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n // STRUCTURE PARAMETERS\n\n TabItem tbtmStructure = new TabItem(tabFolder, SWT.NONE);\n tbtmStructure.setText(\"Structure\");\n\n Composite grpStructure = new Composite(tabFolder, SWT.NONE);\n tbtmStructure.setControl(grpStructure);\n grpStructure.setLayout(TAB_GROUP_LAYOUT);\n grpStructure.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n ParmDialogText.load(grpStructure, parms, \"meta\");\n ParmDialogText.load(grpStructure, parms, \"col\");\n ParmDialogText.load(grpStructure, parms, \"id\");\n ParmDialogChoices.load(grpStructure, parms, \"init\", Activation.values());\n ParmDialogChoices.load(grpStructure, parms, \"activation\", Activation.values());\n ParmDialogFlag.load(grpStructure, parms, \"raw\");\n ParmDialogFlag.load(grpStructure, parms, \"batch\");\n ParmDialogGroup cnn = ParmDialogText.load(grpStructure, parms, \"cnn\");\n ParmDialogGroup filters = ParmDialogText.load(grpStructure, parms, \"filters\");\n ParmDialogGroup strides = ParmDialogText.load(grpStructure, parms, \"strides\");\n ParmDialogGroup subs = ParmDialogText.load(grpStructure, parms, \"sub\");\n if (cnn != null) {\n if (filters != null) cnn.setGrouped(filters);\n if (strides != null) cnn.setGrouped(strides);\n if (subs != null) cnn.setGrouped(subs);\n }\n ParmDialogText.load(grpStructure, parms, \"lstm\");\n ParmDialogGroup wGroup = ParmDialogText.load(grpStructure, parms, \"widths\");\n ParmDialogGroup bGroup = ParmDialogText.load(grpStructure, parms, \"balanced\");\n if (bGroup != null && wGroup != null) {\n wGroup.setExclusive(bGroup);\n bGroup.setExclusive(wGroup);\n }\n\n // SEARCH CONTROL PARAMETERS\n\n TabItem tbtmSearch = new TabItem(tabFolder, SWT.NONE);\n tbtmSearch.setText(\"Training\");\n\n ScrolledComposite grpSearch0 = new ScrolledComposite(tabFolder, SWT.V_SCROLL);\n grpSearch0.setLayout(new FillLayout());\n grpSearch0.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n tbtmSearch.setControl(grpSearch0);\n Composite grpSearch = new Composite(grpSearch0, SWT.NONE);\n grpSearch0.setContent(grpSearch);\n grpSearch.setLayout(TAB_GROUP_LAYOUT);\n grpSearch.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n Enum<?>[] preferTypes = (this.modelType == TrainingProcessor.Type.CLASS ? RunStats.OptimizationType.values()\n : RunStats.RegressionType.values());\n ParmDialogChoices.load(grpSearch, parms, \"prefer\", preferTypes);\n ParmDialogChoices.load(grpSearch, parms, \"method\", Trainer.Type.values());\n ParmDialogText.load(grpSearch, parms, \"bound\");\n ParmDialogChoices.load(grpSearch, parms, \"lossFun\", LossFunctionType.values());\n ParmDialogText.load(grpSearch, parms, \"weights\");\n ParmDialogText.load(grpSearch, parms, \"iter\");\n ParmDialogText.load(grpSearch, parms, \"batchSize\");\n ParmDialogText.load(grpSearch, parms, \"testSize\");\n ParmDialogText.load(grpSearch, parms, \"maxBatches\");\n ParmDialogText.load(grpSearch, parms, \"earlyStop\");\n ParmDialogChoices.load(grpSearch, parms, \"regMode\", Regularization.Mode.values());\n ParmDialogText.load(grpSearch, parms, \"regFactor\");\n ParmDialogText.load(grpSearch, parms, \"seed\");\n ParmDialogChoices.load(grpSearch, parms, \"start\", WeightInit.values());\n ParmDialogChoices.load(grpSearch, parms, \"gradNorm\", GradientNormalization.values());\n ParmDialogChoices.load(grpSearch, parms, \"updater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"learnRate\");\n ParmDialogChoices.load(grpSearch, parms, \"bUpdater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"updateRate\");\n\n grpSearch.setSize(grpSearch.computeSize(FORM_WIDTH - 50, SWT.DEFAULT));\n\n // BOTTOM BUTTON BAR\n\n Composite grpButtonBar = new Composite(shell, SWT.NONE);\n grpButtonBar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n grpButtonBar.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n Button btnSave = new Button(grpButtonBar, SWT.NONE);\n btnSave.setText(\"Save\");\n btnSave.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n Button btnClose = new Button(grpButtonBar, SWT.NONE);\n btnClose.setText(\"Cancel\");\n btnClose.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n shell.close();\n }\n });\n\n Button btnOK = new Button(grpButtonBar, SWT.NONE);\n btnOK.setText(\"Save and Close\");\n btnOK.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n shell.close();\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n }", "private static DataBaseEntry createEntry(String line) {\n int eq = line.indexOf(\"=\");\n if (eq < 0) {\n System.err.println(\"not found '=' in line \" + line);\n }\n int hash = line.indexOf(\"#\");\n if (hash < 0) {\n System.err.println(\"not found '#' in line \" + line);\n }\n String file = line.substring(0, eq);\n String cwd = line.substring(eq+1, hash);\n String compileString = line.substring(hash+1);\n \n CompileLineEntryBuilder builder = new CompileLineEntryBuilder(file);\n for (String option : splitCommandLine(compileString)) {\n builder.handle(option);\n }\n return builder.createDataBaseEntry();\n }", "public interface TabBuilder {\n View getView(int position);\n}", "private TabMenu getTabMenu(VitroRequest vreq) {\n int portalId = vreq.getPortal().getPortalId();\n return new TabMenu(vreq, portalId);\n }", "private void get_Tree(int prevTab, TreeItem<String> root){\n while (it < line.size()){\n int tabs = count_tabs(line.get(it));\n if (tabs > prevTab){ // Si es hijo\n String [] token = line.get(it).split(\" \");\n root.getChildren().add(new TreeItem<>(token[token.length-1])); // El ultimo del split será el token\n it++;\n get_Tree(tabs, root.getChildren().get(root.getChildren().size()-1)); // El ultimo agregado\n }else{\n break;\n }\n }\n }", "public void viewBoatListOptions(int selection, Console console) {\n\t\tif (selection == 1) {\n\t\t\tconsole.viewBoatWindow();\n\t\t} else if (selection == 2) {\n\t\t\tconsole.addOrEditBoatWindow(2);\n\t\t} else if (selection == 3) {\n\t\t\tconsole.viewMemberWindow();\n\t\t} else {\n\t\t\tSystem.out.println(\"Invalid choice! Try again \");\n\t\t\tconsole.viewBoatListWindow();\n\t\t}\n\t}", "public void setCurrent(String sourcePath, int lineNumber){ // debugger line numbers start at 1...\n\t\tif (lineNumber>0 && sourcePath!=null){\n\t\t\tVector<LineBounds> v=this.lineBounds.get(sourcePath);\n\t\t\tif(v!=null){\n\t\t\t\tfinal LineBounds lb=v.get(lineNumber-1); // src line numbers start at 1, but vectors are like array, start at 0...\n\t\t\t\tif (lb!=null){\n\t\t\t\t\tif (this.curLine!=null){\n\t\t\t\t\t\tapplyAttributeSet(this.curLine, otherLineSet);\n\t\t\t\t\t}\n\t\t\t\t\tapplyAttributeSet(lb, currentLineSet);\n\t\t\t\t\t// ensure visibility...\n\t\t\t\t\t// from: http://www.java2s.com/Code/Java/Swing-JFC/AppendingTextPane.htm\n\t\t\t\t\t// The OVERALL protection with invokeLater is mine (LA) and seems very necessary !!\n\t\t\t\t\t SwingUtilities.invokeLater( new Runnable() {\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\tfinal Rectangle r;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tr = textPane.modelToView(lb.start);\n\t\t\t\t\t\t\t\t if (r != null) { // may be null even if no exception has been raised.\n\t\t\t\t\t\t\t\t\t textPane.scrollRectToVisible(r);\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t // this.textPane.scrollRectToVisible(r);\n\t\t\t\t\t\t\t} catch (Throwable any) {\n\t\t\t\t\t\t\t\tLogger.getLogger(\"\").logp(Level.WARNING, this.getClass().getName(), \n\t\t\t\t\t\t\t\t\t\t\"setCurrent\", \"modelToView failed !\", any);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t\t\t });\t\t\t\n\t\t\t\t\tthis.curLine=lb;\n\t\t\t\t}else{\n\t\t\t\t\t// line not found in file !\n\t\t\t\t\tLogger.getLogger(\"\").logp(Level.SEVERE, this.getClass().getName(), \n\t\t\t\t\t\t\t\"setCurrent\", lineNumber+\" out of range in \"+sourcePath);\n\t\t\t\t\t// TODO: what do we do ?\n\t\t\t\t\t// no more Highlight...\n\t\t\t\t\tif (this.curLine!=null){\n\t\t\t\t\t\tapplyAttributeSet(this.curLine, otherLineSet);\n\t\t\t\t\t\tthis.curLine=null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tLogger.getLogger(\"\").logp(Level.SEVERE, this.getClass().getName(), \n\t\t\t\t\t\t\"setCurrent\", sourcePath+\" not loaded in this SourceFrame\");\n\t\t\t}\n\t\t}else{\n\t\t\t// no more Highlight\n\t\t\tif (this.curLine!=null){\n\t\t\t\tapplyAttributeSet(this.curLine, otherLineSet);\n\t\t\t\tthis.curLine=null;\n\t\t\t}\n\t\t}\n\t\t// TODO: clean. System.out.println(vScrollbar.getValue()+\" \"+vScrollbar.getMinimum()+\" \"+vScrollbar.getMaximum());\n\t}", "protected abstract void doTabSelectionChanged(int oldIndex, int newIndex);", "public void selectTab(Predicate<? super CTabItem> tabFilter) {\r\n\t\tthis.displayTab.setSelection(Arrays.stream(this.getTabFolder().getItems()).filter(tabFilter).findFirst().orElseThrow(() -> new UnsupportedOperationException()));\r\n\t\tthis.displayTab.showSelection();\r\n\t}", "public TableViewController(BreakpointView breakpointView, VariableView varView, ExecutionHandler executionHandler) {\t\n \t\tthis.breakpointView = breakpointView;\t\n \t\tthis.varView = varView;\t\n \t\tthis.executionHandler = executionHandler;\n \t\t\n \t\tthis.breakpointView.getGlobalBreakpoint().addSelectionListener(this);\n \t\tthis.breakpointView.getAddButton().addSelectionListener(this);\n \t}", "private void setupTab(final View view, final String tag) {\r\n\t\tView tabview = createTabView(mTabHost.getContext(), tag);\r\n\r\n\t\tTabSpec setContent = mTabHost.newTabSpec(tag).setIndicator(tabview)\r\n\t\t\t\t.setContent(new TabContentFactory() {\r\n\t\t\t\t\tpublic View createTabContent(String tag) {\r\n\t\t\t\t\t\tView view;\r\n\t\t\t\t\t\tif (tag.contains(\"EXTENDED\")) {\r\n\t\t\t\t\t\t\tview = LayoutInflater\r\n\t\t\t\t\t\t\t\t\t.from(mTabHost.getContext())\r\n\t\t\t\t\t\t\t\t\t.inflate(\r\n\t\t\t\t\t\t\t\t\t\t\tR.layout.appa_business_rules_2_layout,\r\n\t\t\t\t\t\t\t\t\t\t\tnull);\r\n\t\t\t\t\t\t\t// --Assembling Widgets\r\n\t\t\t\t\t\t\tedNO = (EditText) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules2_ET1);\r\n\t\t\t\t\t\t\tedNIO = (EditText) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules2_ET2);\r\n\t\t\t\t\t\t\tedNP = (EditText) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules2_ET3);\r\n\t\t\t\t\t\t\tedNIP = (EditText) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules2_ET4);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tedNO.setEnabled(false);\r\n\t\t\t\t\t\t\tedNIO.setEnabled(false);\r\n\t\t\t\t\t\t\tedNP.setEnabled(false);\r\n\t\t\t\t\t\t\tedNIP.setEnabled(false);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tNO= (CheckBox) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules2_CB1);\r\n\t\t\t\t\t\t\tNIO= (CheckBox) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules2_CB2);\r\n\t\t\t\t\t\t\tNP= (CheckBox) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules2_CB3);\r\n\t\t\t\t\t\t\tNIP= (CheckBox) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules2_CB4);\r\n\t\t\t\t\t\t\tNO.setEnabled(false); \r\n\t\t\t\t\t\t\tNIO.setEnabled(false);\r\n\t\t\t\t\t\t\tNP.setEnabled(false);\r\n\t\t\t\t\t\t\tNIP.setEnabled(false);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\textended = (CheckBox) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules2_CB0);\r\n\t\t\t\t\t\t\textended.setOnClickListener(S3R4Listener2);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if (tag.contains(\"CUSTOM\")) {\r\n\t\t\t\t\t\t\tview = LayoutInflater\r\n\t\t\t\t\t\t\t\t\t.from(mTabHost.getContext())\r\n\t\t\t\t\t\t\t\t\t.inflate(\r\n\t\t\t\t\t\t\t\t\t\t\tR.layout.appa_business_rules_3_layout,\r\n\t\t\t\t\t\t\t\t\t\t\tnull);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tview = LayoutInflater\r\n\t\t\t\t\t\t\t\t\t.from(mTabHost.getContext())\r\n\t\t\t\t\t\t\t\t\t.inflate(\r\n\t\t\t\t\t\t\t\t\t\t\tR.layout.appa_business_rules_1_layout,\r\n\t\t\t\t\t\t\t\t\t\t\tnull);\r\n\t\t\t\t\t\t\t// --Assembling Widgets\r\n\t\t\t\t\t\t\tedlevels = (EditText) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules1_ET1);\r\n\t\t\t\t\t\t\tedSons = (EditText) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules1_ET2);\r\n\t\t\t\t\t\t\tedlevel = (EditText) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules1_ET3);\r\n\t\t\t\t\t\t\tedpruduct = (EditText) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules1_ET4);\r\n\t\t\t\t\t\t\tedcampaign = (EditText) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules1_ET5);\r\n\t\t\t\t\t\t\tedadd = (EditText) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules1_ET6);\r\n\t\t\t\t\t\t\tedlevels.setEnabled(false);\r\n\t\t\t\t\t\t\tedSons.setEnabled(false);\r\n\t\t\t\t\t\t\tedlevel.setEnabled(false);\r\n\t\t\t\t\t\t\tedpruduct.setEnabled(false);\r\n\t\t\t\t\t\t\tedcampaign.setEnabled(false);\r\n\t\t\t\t\t\t\tedadd.setEnabled(false);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlevel= (CheckBox) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules1_CB3);\r\n\t\t\t\t\t\t\tpruduct= (CheckBox) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules1_CB4);\r\n\t\t\t\t\t\t\tcampaign= (CheckBox) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules1_CB5);\r\n\t\t\t\t\t\t\tadd= (CheckBox) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules1_CB6);\r\n\t\t\t\t\t\t\tlevel.setEnabled(false); \r\n\t\t\t\t\t\t\tpruduct.setEnabled(false);\r\n\t\t\t\t\t\t\tcampaign.setEnabled(false);\r\n\t\t\t\t\t\t\tadd.setEnabled(false);\r\n\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t\tStructure = (CheckBox) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules1_CB1);\r\n\t\t\t\t\t\t\tRules = (CheckBox) view\r\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.business_rules1_CB2);\r\n\t\t\t\t\t\t\tStructure.setOnClickListener(S3R4Listener);\r\n\t\t\t\t\t\t\tRules.setOnClickListener(S3R4Listener);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn view;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\tmTabHost.addTab(setContent);\r\n\r\n\t}", "private JMenu createFileMenu() {\n\t\tJMenu menu = new JMenu(\"File\"); \n\t\tmenu.add(createDetectiveNotes());\n\t\tmenu.add(createFileExitItem());\n\t\treturn menu;\n\t}", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n final String def = definition.get(position);\n\n // Create an intent for the termDefinitions View\n Intent intent = new Intent(getApplicationContext(), termDefinition.class);\n\n // Parse the data selected\n intent.putExtra(\"definition\", def);\n startActivity(intent);\n }", "public void setSelectedTab(int arg0) {\n\n\t}", "private static View createTabView(final Context context, final String text) {\r\n\t\tView view;\r\n\t\tview = LayoutInflater.from(context).inflate(\r\n\t\t\t\tR.layout.generic_tabs_custom_layout, null);\r\n\t\tTextView tv = (TextView) view.findViewById(R.id.tabsText);\r\n\t\ttv.setText(text);\r\n\t\treturn view;\r\n\t}", "@Override\r\n\tpublic void selectionChanged(IAction action, ISelection selection) {\r\n\t\tif (selection instanceof IStructuredSelection) {\r\n\t\t\tIStructuredSelection ssel = (IStructuredSelection) selection;\r\n\t\t\tObject obj = ssel.getFirstElement();\r\n\t\t\tif (obj != null) {\r\n\t\t\t\tIFile file = (IFile) Platform.getAdapterManager().getAdapter(obj, IFile.class);\r\n\t\t\t\tif (file == null) {\r\n\t\t\t\t\tif (obj instanceof IAdaptable) {\r\n\t\t\t\t\t\tfile = (IFile) ((IAdaptable) obj).getAdapter(IFile.class);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (file != null) {\r\n\t\t\t\t\tString fileExtension = file.getFileExtension();\r\n\t\t\t\t\t//If file is of type Papyrus diagram, call getUMLModelOfDI method to set the selectedFile variable\r\n\t\t\t\t\tif (\"di\".equals(fileExtension)) {\r\n\t\t\t\t\t\tselectedFile = getUMLModelOfDI(file);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tselectedFile = file;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//If the file is null, it might be of type PapyrusFile, then the uml file is found by passing mainFile to the getUMLModelOfDI method\r\n\t\t\t\telse {\r\n\t\t\t\t\tIPapyrusFile papyrusFile = (IPapyrusFile) Platform.getAdapterManager().getAdapter(obj, IPapyrusFile.class);\r\n\t\t\t\t\tif (papyrusFile != null) {\r\n\t\t\t\t\t\tselectedFile = getUMLModelOfDI(papyrusFile.getMainFile());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tIProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(selectedFile.getProject().getName());\r\n\t\t\t\tReportGenerator.INSTANCE.setProject(project);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static String manualTab(String entry)\r\n\t{\r\n\t\tString tab = \"\";\r\n\t\tfor(int count=0; count < 15 - entry.length(); count++)\r\n\t\t\ttab += \" \";\r\n\t\treturn tab;\r\n\t}", "static Extractor byTabs() {\n\t\t\treturn Splitter.TAB_EXTRACTOR;\n\t\t}", "private JMenu createFileMenu() {\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic('f');\r\n\t\tfileMenu.add(createSaveHistoryMenuItem());\r\n\t\tfileMenu.add(createLoadHistoryMenuItem());\r\n\r\n\t\treturn fileMenu;\r\n\t}", "private void processFileLine(String line, RevisionInfo revInfo, Map<String, List<RevisionInfo>> result) {\r\n if (line.matches(FILE_LINE_REGEX)) {\r\n String[] segs = line.split(TAB);\r\n List<RevisionInfo> list = result.get(segs[2]);\r\n if (list == null) {\r\n list = new ArrayList<RevisionInfo>();\r\n result.put(segs[2], list);\r\n }\r\n list.add(new RevisionInfo(revInfo.getAuthor(), revInfo.getDate(), revInfo.getComment(), Integer\r\n .parseInt(segs[0])));\r\n }\r\n }", "private void handleSelectedElement() {\n tabPane.setVisible(true);\n tabPane.getTabs().clear();\n AOElement e = null;\n if (selectedTreeItem.get() != null) e = selectedTreeItem.get().getValue();\n\n if (!(e instanceof AOLight) && !(e instanceof AOCamera) && !(e instanceof AOGeometry)) {\n tabPane.setVisible(false);\n\n } else {\n\n try {\n\n Tab t = FXMLLoader.load(getClass().getResource(\"/fxml/mainSettingsView.fxml\"));\n tabPane.getTabs().addAll(t);\n if (e instanceof ONode) t.setText(\"Node\");\n else if (e instanceof AOLight) t.setText(\"Light\");\n else if (e instanceof AOCamera) t.setText(\"Camera\");\n\n if (e instanceof ONode) {\n if (!((ONode) e).oGeos.isEmpty() && !(((ONode) e).oGeos.get(0) instanceof ONode)) {\n Tab t2 = FXMLLoader.load(getClass().getResource(\"/fxml/mainMaterialSettingsView.fxml\"));\n t2.setText(\"Material\");\n tabPane.getTabs().add(1, t2);\n tabPane.getSelectionModel().select(0);\n }\n }\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n }", "private void insertData(String[] line) throws Exception {\r\n Activity newActivity = getActivity(line);\r\n if (importInputForm.getTaskBox().isSelected()) {\r\n panel.getMainTable().importActivity(newActivity);\r\n panel.getMainTable().insertRow(newActivity);\r\n } else if (importInputForm.getSubtaskBox().isSelected() && panel.getMainTable().getModel().getRowCount() != 0) {\r\n newActivity.setParentId(panel.getMainTable().getActivityIdFromSelectedRow());\r\n panel.getSubTable().importActivity(newActivity);\r\n panel.getSubTable().insertRow(newActivity);\r\n // adjust the parent task\r\n panel.getMainTable().addPomsToSelectedRow(newActivity);\r\n }\r\n }", "private void createView() {\n\t\tTabWidget tWidget = (TabWidget) findViewById(android.R.id.tabs);\r\n\t\tshowLayout = (LinearLayout) LayoutInflater.from(this).inflate(\r\n\t\t\t\tR.layout.tab_layout, tWidget, false);\r\n\t\tImageView imageView = (ImageView) showLayout.getChildAt(0);\r\n\t\tTextView textView = (TextView) showLayout.getChildAt(1);\r\n\t\timageView.setImageResource(R.drawable.main_selector);\r\n\t\ttextView.setText(R.string.show);\r\n\r\n\t\taddLayout = (LinearLayout) LayoutInflater.from(this).inflate(\r\n\t\t\t\tR.layout.tab_layout, tWidget, false);\r\n\t\tImageView imageView1 = (ImageView) addLayout.getChildAt(0);\r\n\t\tTextView textView1 = (TextView) addLayout.getChildAt(1);\r\n\t\timageView1.setImageResource(R.drawable.add_selector);\r\n\t\ttextView1.setText(R.string.add_record);\r\n\r\n\t\tchartLayout = (LinearLayout) LayoutInflater.from(this).inflate(\r\n\t\t\t\tR.layout.tab_layout, tWidget, false);\r\n\t\tImageView imageView2 = (ImageView) chartLayout.getChildAt(0);\r\n\t\tTextView textView2 = (TextView) chartLayout.getChildAt(1);\r\n\t\timageView2.setImageResource(R.drawable.chart_selector);\r\n\t\ttextView2.setText(R.string.chart_show);\r\n\t}", "public static ContextMenu buildFileTreeContextMenu(SongManager model,\n MusicPlayerManager musicPlayerManager,\n DatabaseManager databaseManager,\n Item selectedItem,\n CellType cellType,\n TreeView<Item> tree) {\n MenuItem playSong = createPlaySongMenuItem(musicPlayerManager, selectedItem);\n MenuItem playSongNext = createPlaySongNextMenuItem(musicPlayerManager, tree);\n MenuItem placeSongOnQueue = createPlaceSongOnQueueMenuItem(musicPlayerManager, tree);\n\n MenuItem addToPlaylist = createAddToPlaylistMenuItem(model, musicPlayerManager, tree);\n MenuItem addToCurrentPlaylist = createAddToCurrentPlaylistMenuItem(model, musicPlayerManager, tree);\n\n MenuItem copy = createCopyMenuItem(model, tree);\n MenuItem paste = createFileTreePasteMenuItem(model, selectedItem);\n MenuItem rename = createRenameMenuItem(model, selectedItem);\n MenuItem delete = createTreeViewDeleteMenuItem(model, musicPlayerManager, databaseManager, tree);\n\n MenuItem createNewFolder = createAddNewFolderMenuItem(model, selectedItem);\n MenuItem removeLibrary = createRemoveLibraryMenuItem(model, databaseManager, selectedItem);\n MenuItem showInRightPane = createShowInRightPaneMenuItem(model, selectedItem);\n MenuItem openFileLocation = createShowInExplorerMenuItem(selectedItem);\n MenuItem showInLibrary = createShowInLibraryMenuItem(model, selectedItem);\n\n //separators (non functional menu items, just for display)\n MenuItem folderOptionsSeparator = new SeparatorMenuItem();\n MenuItem songOptionsSeparator = new SeparatorMenuItem();\n MenuItem playlistOptionsSeparator = new SeparatorMenuItem();\n MenuItem fileOptionsSeparator = new SeparatorMenuItem();\n\n ContextMenu contextMenu = new ContextMenu();\n contextMenu.getItems().addAll(playSong, playSongNext, placeSongOnQueue,\n songOptionsSeparator,\n\t\t\t\taddToPlaylist, addToCurrentPlaylist,\n playlistOptionsSeparator,\n createNewFolder,\n folderOptionsSeparator,\n copy, paste, rename, delete,\n fileOptionsSeparator,\n removeLibrary, showInRightPane, openFileLocation, showInLibrary);\n \n contextMenu.setOnShown((event) -> {\n // Hide all if selected item is null\n if (selectedItem == null) {\n for (MenuItem menuItem : contextMenu.getItems()) {\n hideMenuItem(menuItem);\n }\n return;\n }\n\n // Disable paste if nothing is chosen to be copied\n if (model.getM_itemsToCopy() == null) {\n paste.setDisable(true);\n } else {\n paste.setDisable(false);\n }\n\n // Only show the show in right pane option if it is in left pane\n if (cellType != CellType.LEFT_FILE_PANE) {\n hideMenuItem(removeLibrary);\n hideMenuItem(showInRightPane);\n }\n\n if (cellType != CellType.SEARCH_RESULTS) {\n hideMenuItem(showInLibrary);\n }\n\n // Do not show remove library option if selected item is not a library\n if (!selectedItem.isRootItem()) {\n hideMenuItem(removeLibrary);\n }\n\n // Do not show song options if selected item is not a folder\n if (!selectedItem.getFile().isDirectory()) {\n hideMenuItem(createNewFolder);\n hideMenuItem(showInRightPane);\n\n hideMenuItem(folderOptionsSeparator);\n }\n\n // Do not show song options if this is not a song\n if (!(selectedItem instanceof Song)) {\n hideMenuItem(playSong);\n hideMenuItem(playSongNext);\n hideMenuItem(placeSongOnQueue);\n\n hideMenuItem(addToPlaylist);\n hideMenuItem(addToCurrentPlaylist);\n\n hideMenuItem(songOptionsSeparator);\n hideMenuItem(playlistOptionsSeparator);\n }\n });\n\n return contextMenu;\n }", "public void goToLine(int line) {\n // Humans number lines from 1, the rest of PTextArea from 0.\n --line;\n final int start = getLineStartOffset(line);\n final int end = getLineEndOffsetBeforeTerminator(line);\n centerOnNewSelection(start, end);\n }", "public jshellLabEditor(String selectedValue, boolean initConsoleWindow) {\r\n RSyntaxTextArea jep = commonEditingActions(selectedValue, true);\r\n GlobalValues.globalEditorPane = jep;\r\n \r\n }", "private TabView createTabView(ActionBar.Tab tab, boolean forAdapter) {\n\t\t// Workaround for not being able to pass a defStyle on pre-3.0\n\t\tfinal TabView tabView = (TabView) mInflater.inflate(\n\t\t\t\tR.layout.abs__action_bar_tab, null);\n\t\ttabView.init(this, tab, forAdapter);\n\n\t\tif (forAdapter) {\n\t\t\ttabView.setBackgroundDrawable(null);\n\t\t\ttabView.setLayoutParams(new ListView.LayoutParams(\n\t\t\t\t\tandroid.view.ViewGroup.LayoutParams.MATCH_PARENT,\n\t\t\t\t\tmContentHeight));\n\t\t} else {\n\t\t\ttabView.setFocusable(true);\n\n\t\t\tif (mTabClickListener == null) {\n\t\t\t\tmTabClickListener = new TabClickListener();\n\t\t\t}\n\t\t\ttabView.setOnClickListener(mTabClickListener);\n\t\t}\n\t\treturn tabView;\n\t}", "@objid (\"186f4f3d-207c-40ea-baf3-eb495e1b88c4\")\n private void selectUrl(UrlEntry selectedUrlEntry) {\n this.viewer.refresh();\n \n // Pack all columns, to avoid them being too small\n for (TableColumn col : this.viewer.getTable().getColumns()) {\n col.pack();\n }\n \n if (selectedUrlEntry != null) {\n this.viewer.setSelection(new StructuredSelection(selectedUrlEntry));\n } else {\n this.viewer.setSelection(new StructuredSelection());\n }\n }", "public void clickTab(View v) {\n int position = Integer.parseInt(v.getTag().toString());\n update(position);\n }", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\r\n\t\t\r\n\t\tfinal TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\r\n\t\ttabFolder.setToolTipText(\"\");\r\n\t\t\r\n\t\tTabItem tabItem = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem.setText(\"欢迎使用\");\r\n\t\t\r\n\t\tTabItem tabItem_1 = new TabItem(tabFolder, SWT.NONE);\r\n\t\ttabItem_1.setText(\"员工查询\");\r\n\t\t\r\n\t\tMenu menu = new Menu(shell, SWT.BAR);\r\n\t\tshell.setMenuBar(menu);\r\n\t\t\r\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.NONE);\r\n\t\tmenuItem.setText(\"系统管理\");\r\n\t\t\r\n\t\tMenuItem menuItem_1 = new MenuItem(menu, SWT.CASCADE);\r\n\t\tmenuItem_1.setText(\"员工管理\");\r\n\t\t\r\n\t\tMenu menu_1 = new Menu(menuItem_1);\r\n\t\tmenuItem_1.setMenu(menu_1);\r\n\t\t\r\n\t\tMenuItem menuItem_2 = new MenuItem(menu_1, SWT.NONE);\r\n\t\tmenuItem_2.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tTabItem tbtmNewItem = new TabItem(tabFolder,SWT.NONE);\r\n\t\t\t\ttbtmNewItem.setText(\"员工查询\");\r\n\t\t\t\t//创建自定义组件\r\n\t\t\t\tEmpQueryCmp eqc = new EmpQueryCmp(tabFolder, SWT.NONE);\r\n\t\t\t\t//设置标签显示的自定义组件\r\n\t\t\t\ttbtmNewItem.setControl(eqc);\r\n\t\t\t\t\r\n\t\t\t\t//选中当前标签页\r\n\t\t\t\ttabFolder.setSelection(tbtmNewItem);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\tmenuItem_2.setText(\"员工查询\");\r\n\r\n\t}", "private String tab(String str) {\n return assistLogic.tab(str);\n }", "public void branchMenu(int option){\n switch(option){\n case 1:\n System.out.println(\"Starting security view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SECURITY);\n break;\n case 2:\n System.out.println(\"Starting application view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.APPLICATION);\n break;\n case 3:\n System.out.println(\"Starting manager view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.MANAGER);\n break;\n case 4:\n System.out.println(\"Starting swipe view...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.SWIPE);\n break;\n case 5:\n System.out.println(\"Quitting application...\");\n super.setCompleted(true);\n super.setNextState(StateStatus.QUIT);\n break;\n }\n }", "private void initDraftTab() throws IOException {\n // THESE ARE THE CONTROLS FOR THE BASIC SCHEDULE PAGE HEADER INFO\n // WE'LL ARRANGE THEM IN A VBox\n draftTab = new Tab();\n draftWorkspacePane = new VBox();\n draftWorkspacePane.getStyleClass().add(CLASS_DRAFT_PANE);\n \n // ADD PAGE LABEL & BUTTON\n Label draftLabel = new Label();\n draftLabel = initChildLabel(draftWorkspacePane, DraftKit_PropertyType.DRAFT_HEADING_LABEL, CLASS_HEADING_LABEL);\n \n PropertiesManager props = PropertiesManager.getPropertiesManager();\n String imagePath = \"file:\" + PATH_IMAGES + props.getProperty(DraftKit_PropertyType.DRAFT_ICON);\n Image buttonImage = new Image(imagePath);\n draftTab.setGraphic(new ImageView(buttonImage));\n \n // ADD BUTTONS TO THE DRAFT PAGE\n HBox draftButtons = new HBox();\n \n pickPlayer = initHBoxButton(draftButtons, PICK_ICON, PICK_PLAYER_TOOLTIP, false);\n autoPickPlayer = initHBoxButton(draftButtons, PLAY_ICON, AUTO_DRAFT_TOOLTIP, false);\n autoPickPause = initHBoxButton(draftButtons, PAUSE_ICON, AUTO_PAUSE_TOOLTIP, false);\n \n pickPlayer.setMinHeight(10);\n autoPickPlayer.setMinHeight(34);\n autoPickPause.setMinHeight(34);\n pickPlayer.setMinWidth(8);\n autoPickPlayer.setMinWidth(38);\n autoPickPause.setMinWidth(38);\n \n ToolBar draftToolBar = new ToolBar(\n pickPlayer,\n autoPickPlayer,\n autoPickPause\n );\n \n // CREATE THE DRAFT TABLE\n draftTable = new TableView();\n\n draftPick = new TableColumn<>(\"Pick #\");\n draftPick.setCellValueFactory(new Callback<CellDataFeatures<Player, Integer>, ObservableValue<Integer>>() {\n @Override\n public ObservableValue<Integer> call(CellDataFeatures<Player, Integer> p) {\n return new ReadOnlyObjectWrapper(draftTable.getItems().indexOf(p.getValue()) + 1);\n }\n }); \n draftPick.setSortable(false);\n draftFirst = new TableColumn<>(\"First\");\n draftFirst.setCellValueFactory(new PropertyValueFactory<>(\"FirstName\"));\n draftLast = new TableColumn<>(\"Last\");\n draftLast.setCellValueFactory(new PropertyValueFactory<>(\"LastName\"));\n draftTeam = new TableColumn<>(\"Team\");\n draftTeam.setCellValueFactory(new PropertyValueFactory<>(\"ChosenTeam\"));\n draftContract = new TableColumn<>(\"Contract\");\n draftContract.setCellValueFactory(new PropertyValueFactory<>(\"Contract\"));\n draftSalary = new TableColumn<>(\"Salary ($)\");\n draftSalary.setCellValueFactory(new PropertyValueFactory<>(\"Salary\"));\n \n draftTable.getColumns().addAll(draftPick, draftFirst, draftLast, draftTeam, draftContract, draftSalary);\n \n // NEED TO CREATE THE WAY TO ADD THE TABLE (REFRESH IT)\n \n // SET TOOLTIP\n Tooltip t = new Tooltip(\"Draft Summary Page\");\n draftTab.setTooltip(t);\n \n // PUT IN TAB PANE\n draftWorkspacePane.getChildren().add(draftToolBar);\n draftWorkspacePane.getChildren().add(draftTable);\n draftTab.setContent(draftWorkspacePane);\n mainWorkspacePane.getTabs().add(draftTab);\n }", "void onTabSelectionChanged(int tabIndex);", "public native void selectTab(GInfoWindow self, int index)/*-{\r\n\t\tself.selectTab(index);\r\n\t}-*/;", "private void drawTable(int selected){\n\t\ttlCategories.removeAllViews();\n\t\tTableRow.LayoutParams rowParams=new TableRow.LayoutParams \n\t\t\t\t(TableRow.LayoutParams.WRAP_CONTENT,TableRow.LayoutParams.WRAP_CONTENT);\n\t\t\n\t\tfor(int i = 0; i<4; i++){\n\t\t\tTableRow tr = new TableRow(getApplicationContext());\n\t\t\ttr.setLayoutParams(rowParams);\n\t\t\ttr.setTag(2); \n\t\t\tfor(int j = 0; j<4; j++ ){ \n\t\t\t\tView v = mCatAdapter.getView(i*4+j + 1, null, tr);\n\t\t\t\tv.setTag(i*4+j);\n\t\t\t\tv.setOnClickListener(this);\n\t\t\t\ttr.addView(v);\n\t\t\t\tif( i*4+j+1 == selected) onClick(v);\n\t\t\t}\n\t\t\ttlCategories.addView(tr);\n\t\t}\n\t}", "private String tabulatorString(int level) {\r\n String tabs = \"\";\r\n for (int i = 0; i < level; i++) {\r\n tabs += \"\\t\";\r\n }\r\n return tabs;\r\n }", "public void applyTab();", "private void createTab() {\n tab = new char[tabSize];\n for (int i = 0; i < tabSize; i++) {\n tab[i] = tabChar;\n }\n }", "private void createDelimiterPart() {\n\t\t//------------------------------------------------\n\t\t// Delimiter Label & Combo\n\t\t//------------------------------------------------\n\t\tLabel delimiterLabel = new Label(generalSettingsGroup, SWT.NONE);\n\t\tdelimiterLabel.setLayoutData(new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1));\n\t\tdelimiterLabel.setText(\"Result Delimiter:\");\n\t\t\n\t\tdelimiterDeco = new ControlDecoration(delimiterLabel, SWT.LEFT | SWT.TOP);\n\t\tdelimiterDeco.setImage(SWTResourceManager.getImage(GeneralSettingsGroup.class, \"/org/eclipse/jface/fieldassist/images/info_ovr.gif\"));\n\t\tdelimiterDeco.setDescriptionText(\"Choose the delimiter used in the result file.\");\n\t\t\n\t\tdelimiterCombo = new Combo(generalSettingsGroup, SWT.NONE);\n\t\tdelimiterCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 2, 1));\n\t\tdelimiterCombo.setItems(delimiterMap.keySet().toArray(new String[delimiterMap.size()]));\n\t\tdelimiterCombo.select(1);\n\t\t\n\t\tRegexCompilableValidator delimiterValidator = \n\t\t\t\tnew RegexCompilableValidator(delimiterLabel, SWT.BOTTOM | SWT.LEFT) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic String getStringToValidate() {\n\t\t\t\t\t\treturn delimiterCombo.getText();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\tdelimiterCombo.addModifyListener(delimiterValidator);\n\t\tdelimiterValidator.setTag(\"ALWAYS\");\n\t\tCSVComparatorGUI.getValidatorEngine().addValidator(delimiterValidator);\n\t}", "public void onCreateTabClicked(View view) {\n if (mAdapter.isEmpty()) {\n Toast.makeText(this, R.string.you_must_create_at_least_one_tab, Toast.LENGTH_LONG).show();\n return;\n }\n ArrayList<TabInformation> list = new ArrayList<>(mAdapter.getTabInformation());\n startActivity(new Intent(this, DisplayTabsActivity.class).putExtra(TAB_CONTENT, list));\n }", "@Override\r\n public void handle(ActionEvent event) {\n InnerPaneCreator.getChildTabPanes()[2].getSelectionModel().select(1);\r\n }", "public void addTab(String filename) {\n\t\t\n\t\tMinLFile nminl = new MinLFile(filename);\n\t\tJComponent panel = nminl;\n\t\t\n\t\ttabbedPane.addTab(filename, null, panel,\n\t\t\t\tfilename);\t\t\n\t\ttabbedPane.setMnemonicAt(0, 0);\n\t}", "@Override\n\tpublic void addTab(Tab tab, int position, boolean setSelected) {\n\t\t\n\t}", "public void menuSelected (MenuEvent event) {\n TreeEditorPanel panel = (TreeEditorPanel)SwingUtilities.getAncestorOfClass(\n TreeEditorPanel.class, getFocusOwner());\n if (panel != null) {\n edit.getItem(CUT_INDEX).setAction(panel.getCutAction());\n edit.getItem(CUT_INDEX + 1).setAction(panel.getCopyAction());\n edit.getItem(CUT_INDEX + 2).setAction(panel.getPasteAction());\n edit.getItem(CUT_INDEX + 3).setAction(panel.getDeleteAction());\n } else {\n restoreActions();\n }\n }", "public TableSlice(Table table, Selection rowSelection) {\n this.name = table.name();\n this.selection = rowSelection;\n this.table = table;\n }", "private void determineMenuSelection(String filePath) throws IOException {\n\t\tBufferedImage currentImage = Utils.readInImage(filePath);\n\t\tArrayList<Rectangle> boxes = model.getTemplateBoxes();\n\t\tArrayList<Rectangle> used = new ArrayList<>();\n\t\tdetermineInitSelections(boxes, used, currentImage);\n\t\tfor(int i = 7; i < boxes.size(); i++) { // Start at i = 2 for initial selections\n\t\t\t\n\t\t\tif(!used.contains(boxes.get(i))) {\n\t\t\t\tboolean a = searchBlackPixels(boxes.get(i), currentImage);\n\t\t\t\tboolean b = searchBlackPixels(boxes.get(i + 5), currentImage);\n\t\t\t\tif(a) {\n\t\t\t\t\tmodel.getSelections()[i] = 'A';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t} else if(b) {\n\t\t\t\t\tmodel.getSelections()[i] = 'B';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t} else {\n\t\t\t\t\tmodel.getSelections()[i] = 'A';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int getSelectedLine() {\n\t\treturn selectedLine;\n\t}", "private static MenuItem createShowInExplorerMenuItem(Item selectedItem) {\n MenuItem showInExplorer = new MenuItem(SHOW_IN_EXPLORER);\n\n showInExplorer.setOnAction((event) -> {\n if (selectedItem != null) {\n File folderSelected = selectedItem.getFile();\n try {\n Runtime.getRuntime().exec(\"explorer.exe /select,\" + folderSelected.getAbsolutePath());\n } catch (IOException e) {\n PromptUI.customPromptError(\"Failed to Show in Explorer\", null, \"The file or folder location could not be opened.\");\n }\n }\n });\n\n return showInExplorer;\n }", "public void actionPerformed(ActionEvent e) {\r\n final PrintPreview pp = new PrintPreview();\r\n final JEditorPane ep = new JEditorPane();\r\n final JFrame f = new JFrame(\"Print Preview\");\r\n ep.setEditable(false);\r\n ep.setText(getManager().getTabFolder().getSelection().getText());\r\n\r\n Font.decode(PreferenceStore.getString(Preference.FONT));\r\n f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\r\n f.setSize(800, 600);\r\n f.add(new JScrollPane(ep));\r\n f.setVisible(true);\r\n pp.showPreview(ep);\r\n f.dispose();\r\n \r\n }", "private void createTabs(){\n canvasPanel = new JPanel();\n canvasPanel.setLayout(new BorderLayout());\n canvasPanel.add(mCanvas, BorderLayout.CENTER);\n canvasPanel.setMinimumSize(new Dimension(100,50));\n \n // Create the options and properties panel\n optionPanel = new JPanel();\n optionPanel.setLayout(new FlowLayout());\n\n // Set the size\n optionPanel.setMinimumSize(new Dimension(30,30));\t\n optionPanel.setPreferredSize(new Dimension(200,10));\n\n // Create the log area\n mLogArea = new JTextArea(5,20);\n mLogArea.setMargin(new Insets(5,5,5,5));\n mLogArea.setEditable(false);\n JScrollPane logScrollPane = new JScrollPane(mLogArea);\n \n // Das SplitPanel wird in optionPanel (links) und canvasPanel (rechts) unterteilt\n JSplitPane split = new JSplitPane();\n split.setOrientation(JSplitPane.HORIZONTAL_SPLIT);\n split.setLeftComponent(canvasPanel);\n split.setRightComponent(optionPanel);\n \n JSplitPane splitLog = new JSplitPane();\n splitLog.setOrientation(JSplitPane.VERTICAL_SPLIT);\n splitLog.setBottomComponent(logScrollPane);\n splitLog.setTopComponent(split);\n splitLog.setResizeWeight(1);\n \n mMainFrame.add(splitLog, BorderLayout.CENTER); \n }", "@Override\n\tprotected Control createDialogArea(Composite parent) {\n\t\tsetMessage(\"Allows you to create or edit a task\");\n\t\tsetTitle(\"Task's Editor\");\n\t\tComposite area = (Composite) super.createDialogArea(parent);\n\t\tComposite container = new Composite(area, SWT.NONE);\n\t\tcontainer.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\tcontainer.setLayoutData(new GridData(GridData.FILL_BOTH));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(container, SWT.BORDER);\n\t\t\n\t\tTabItem tbtmGeneral = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmGeneral.setText(\"General\");\n\t\t\n\t\tComposite composite = new Composite(tabFolder, SWT.NONE);\n\t\ttbtmGeneral.setControl(composite);\n\t\t\n\t\tLabel lblName = new Label(composite, SWT.NONE);\n\t\tlblName.setBounds(24, 29, 70, 17);\n\t\tlblName.setText(\"Name:\");\n\t\t\n\t\tLabel lblImportance = new Label(composite, SWT.NONE);\n\t\tlblImportance.setBounds(24, 63, 94, 17);\n\t\tlblImportance.setText(\"Importance:\");\n\t\t\n\t\tLabel lblStatus = new Label(composite, SWT.NONE);\n\t\tlblStatus.setBounds(24, 104, 70, 17);\n\t\tlblStatus.setText(\"Status:\");\n\t\t\n\t\tLabel lblDescription = new Label(composite, SWT.NONE);\n\t\tlblDescription.setBounds(24, 152, 94, 17);\n\t\tlblDescription.setText(\"Description:\");\n\t\t\n\t\ttextName = new Text(composite, SWT.BORDER);\n\t\ttextName.setBounds(124, 29, 150, 27);\n\t\t\n\t\ttextDescription = new Text(composite, SWT.BORDER);\n\t\ttextDescription.setBounds(124, 142, 261, 27);\n\t\t\n\t\tcomboImportance = new Combo(composite, SWT.NONE);\n\t\tcomboImportance.setBounds(124, 63, 189, 29);\n\t\tfor(Iterator it = Importance.VALUES.iterator(); it.hasNext(); ){\n\t\t\tImportance i = (Importance) it.next();\n\t\t\tcomboImportance.add(i.getName());\n\t\t}\n\t\t\n\t\tcomboStatus = new Combo(composite, SWT.NONE);\n\t\tcomboStatus.setBounds(124, 104, 189, 29);\n\t\tfor(Iterator it = Status.VALUES.iterator(); it.hasNext(); ){\n\t\t\tStatus i = (Status) it.next();\n\t\t\tcomboStatus.add(i.getName());\n\t\t}\n\t\t\n\t\tTabItem tbtmFolders = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmFolders.setText(\"Folders\");\n\t\t\n\t\tComposite composite_1 = new Composite(tabFolder, SWT.NONE);\n\t\ttbtmFolders.setControl(composite_1);\n\t\tcomposite_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tcheckboxTreeViewer = new CheckboxTreeViewer(composite_1, SWT.BORDER);\n\t\tcheckboxTreeViewer.setContentProvider(new FolderContentProvider());\n\t\tcheckboxTreeViewer.setLabelProvider(new FolderLabelProvider());\n\t\tcheckboxTreeViewer.setInput(EMFManager.getInstance().getToDoListManager());\n\t\tcheckboxTreeViewer.expandAll();\n\t\tTree tree = checkboxTreeViewer.getTree();\n\t\t\n\t\tpreFillDialog();\n\t\tparent.layout();\n\t\treturn area;\n\t}", "public void viewBoatOptions(int selection, Console console) {\n\t\tif (selection == 1) {\n\t\t\tconsole.addOrEditBoatWindow(1);\n\t\t} else if (selection == 2) {\n\t\t\tconsole.removeBoatWindow();\n\t\t} else if (selection == 3) {\n\t\t\tconsole.welcomeWindow();\n\t\t} else {\n\t\t\tSystem.out.println(\"Invalid choice! Try again \");\n\t\t\tconsole.viewBoatListWindow();\n\t\t}\n\t}", "public StrTab() {\n maxIndex = 1;\n }", "public AttributedStringBuilder tabs(int tabsize) {\n/* 378 */ if (tabsize < 0) {\n/* 379 */ throw new IllegalArgumentException(\"Tab size must be non negative\");\n/* */ }\n/* 381 */ return tabs(Arrays.asList(new Integer[] { Integer.valueOf(tabsize) }));\n/* */ }", "private void processCreateView() throws HsqlException {\n\n String name = tokenizer.getName();\n HsqlName schemaname =\n session.getSchemaHsqlNameForWrite(tokenizer.getLongNameFirst());\n int logposition = tokenizer.getPartMarker();\n\n database.schemaManager.checkUserViewNotExists(session, name,\n schemaname.name);\n\n HsqlName viewHsqlName = database.nameManager.newHsqlName(name,\n tokenizer.wasQuotedIdentifier());\n\n viewHsqlName.schema = schemaname;\n\n HsqlName[] colList = null;\n\n if (tokenizer.isGetThis(Token.T_OPENBRACKET)) {\n try {\n HsqlArrayList list = Parser.getColumnNames(database, null,\n tokenizer, true);\n\n colList = new HsqlName[list.size()];\n colList = (HsqlName[]) list.toArray(colList);\n } catch (HsqlException e) {\n\n // fredt - a bug in 1.8.0.0 and previous versions causes view\n // definitions to script without double quotes around column names\n // in certain cases; the workaround here discards the column\n // names\n if (database.isStoredFileAccess()\n && session.isProcessingScript()) {\n while (true) {\n String token = tokenizer.getString();\n\n if (token.equals(Token.T_CLOSEBRACKET)\n || token.equals(\"\")) {\n break;\n }\n }\n } else {\n throw e;\n }\n }\n }\n\n tokenizer.getThis(Token.T_AS);\n tokenizer.setPartMarker();\n\n Parser parser = new Parser(session, database, tokenizer);\n int brackets = parser.parseOpenBracketsSelect();\n Select select;\n\n // accept ORDER BY or ORDRY BY with LIMIT - accept unions\n select = parser.parseSelect(brackets, true, false, true, true);\n\n if (select.sIntoTable != null) {\n throw (Trace.error(Trace.INVALID_IDENTIFIER, Token.INTO));\n }\n\n select.prepareResult(session);\n\n View view = new View(session, database, viewHsqlName,\n tokenizer.getLastPart(), colList);\n\n session.commit();\n database.schemaManager.linkTable(view);\n tokenizer.setPartMarker(logposition);\n }", "private int getSelectedLine(HttpServletRequest request) {\n int selectedLine = -1;\n String parameterName = (String) request.getAttribute(KRADConstants.METHOD_TO_CALL_ATTRIBUTE);\n if (StringUtils.isNotBlank(parameterName)) {\n String lineNumber = StringUtils.substringBetween(parameterName, \".line\", \".\");\n selectedLine = Integer.parseInt(lineNumber);\n }\n\n return selectedLine;\n }", "@Override\n\t\t\tpublic TableRow<Document> call(TableView<Document> param) {\n\t\t\t\tTableRow<Document> row = new TableRow<Document>();\n\t\t\t\tMenuItem openItem = new MenuItem(\"打开\");\n\t\t\t\topenItem.setOnAction(e->{\n\t\t\t\t\tSystem.out.println(\"打开文件\");\n\t\t\t\t});\n\t\t\t\tMenuItem deleteItem = new MenuItem(\"删除\");\n\t\t\t\tMenuItem renameItem = new MenuItem(\"重命名\");\n\t\t\t\tMenuItem setmodeItem = new MenuItem(\"设置属性\");\n\t\t\t\tContextMenu menu = new ContextMenu(openItem,deleteItem,renameItem,setmodeItem);\n\t\t\t\trow.setOnMouseClicked(e->{\n\t\t\t\t\tif (e.getButton() == MouseButton.PRIMARY &&\n\t\t\t\t\t\t\t!row.isEmpty()) {\n\t\t\t\t\t\trow.setContextMenu(menu);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn row;\n\t\t\t}", "@Override\n\tpublic void createPartControl(Composite parent) {\n\t\tComposite top = new Composite(parent, SWT.NONE);\n\t\tFillLayout layout = new FillLayout(SWT.HORIZONTAL);\n\t\tlayout.marginHeight = 10;\n\t\ttop.setLayout(layout);\n\n\t\t// TabFolder\n\t\tCTabFolder tabFolder = new CTabFolder(top, SWT.BORDER);\n\t\ttabFolder.setSelectionBackground(Display.getCurrent().getSystemColor(\n\t\t\t\tSWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));\n\t\tGridLayout tabLayout = new GridLayout();\n\t\ttabLayout.marginHeight = 10;\n\t\ttabLayout.marginWidth = 10;\n\t\ttabLayout.verticalSpacing = 20;\n\t\ttabLayout.numColumns = 1;\n\t\ttabFolder.setLayout(tabLayout);\n\n\t\tnew MQTTTab(tabFolder, SWT.NONE, connection, eventService);\n\n\t\t// Tab Options\n\t\tnew OptionsTab(tabFolder, SWT.NONE, connection);\n\n\t\t// select the first tab by default\n\t\ttabFolder.setSelection(0);\n\t}", "private void selection(int level, int item) {\n switch (level) {\n case 0:\n if (domaineSelectionne != null && item < tvComptes.getItems().size())\n tvComptes.getSelectionModel().select(item);\n break;\n case 1:\n if (donneesActives != null && item < lvDomaines.getItems().size())\n lvDomaines.getSelectionModel().select(item);\n break;\n }\n }", "public static void displayLine( char lineChar, int lineType ) \r\n {\n }", "void populateProductLineTabs() {\n ArrayList<ItemType> typeNames = new ArrayList<ItemType>();\n\n for (ItemType typeValue : ItemType.values()) {\n typeNames.add(typeValue);\n }\n System.out.println(\"type array size = \" + typeNames.size());\n\n for (int i = 0; i < typeNames.size(); i++) {\n choiceType.getItems().add(i, typeNames.get(i));\n }\n choiceType.getSelectionModel().selectFirst();\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 jshellLabEditor(String selectedValue) {\r\n RSyntaxTextArea jep = commonEditingActions(selectedValue, false);\r\n GlobalValues.globalEditorPane = jep;\r\n \r\n }", "public void memberListOptions(int selection, Console console) {\n\t\tif (selection == 1) {\n\t\t\tconsole.viewMemberWindow();\n\t\t} else if (selection == 2) {\n\t\t\tconsole.welcomeWindow();\n\t\t} else {\n\t\t\tSystem.out.println(\"Invalid choice! Try again \");\n\t\t\tconsole.welcomeWindow();\n\t\t}\n\t}", "public void selectTab(int index) {\r\n\t\tthis.displayTab.setSelection(index);\r\n\t\tthis.displayTab.showSelection();\r\n\t}", "@Override\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tif (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) {\n\n\t\t\tif (MainFrame.getInstance().getWorkspaceTree()\n\t\t\t\t\t.getLastSelectedPathComponent() instanceof Diagram) {\n\t\t\t\tDiagram diag1 = (Diagram) MainFrame.getInstance()\n\t\t\t\t\t\t.getWorkspaceTree().getLastSelectedPathComponent();\n\t\t\t\tfor (int i = 0; i < MainFrame.getInstance().getDesktop()\n\t\t\t\t\t\t.getAllFrames().length; i++) {\n\n\t\t\t\t\tif (MainFrame\n\t\t\t\t\t\t\t.getInstance()\n\t\t\t\t\t\t\t.getWorkspaceTree()\n\t\t\t\t\t\t\t.getLastSelectedPathComponent()\n\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t.equals(MainFrame.getInstance().getDesktop()\n\t\t\t\t\t\t\t\t\t.getAllFrames()[i].getName())) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tdiagView = new DiagramView();\n\t\t\t\tdiagView.setTitle(diag1.getName());\n\t\t\t\tdiagView.setName(diag1.getName());\n\t\t\t\tdiagView.setDiagram(diag1);\n\t\t\t\tMainFrame.getInstance().getDesktop().add(diagView);\n\n\t\t\t\ttry {\n\t\t\t\t\tdiagView.setSelected(true);\n\t\t\t\t} catch (PropertyVetoException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t// System.out.println(sel);\n\t\t\t}\n\n\t\t}\n\n\t}", "public abstract String getTab();", "private MenuManager createFileMenu(\tIWorkbenchWindow window) {\n\t\tMenuManager menu = new MenuManager(Messages.getString(\"IU.Strings.39\"),IWorkbenchActionConstants.M_FILE); //$NON-NLS-1$\n\t\t\n\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));\n\n\t\tIContributionItem[] items=menu.getItems();\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));\n\t\t/**/\n\t\t/**/\n\t\tmenu.add(getAction(ActionFactory.CLOSE.getId()));\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.CLOSE_EXT));\n\n\t\tmenu.add(new Separator());\n\n\t\tmenu.add(getAction(ActionFactory.SAVE.getId()));\n\t\tmenu.add(getAction(ActionFactory.SAVE_AS.getId()));\n\t\t//menu.add(getAction(ActionFactory.REVERT.getId()));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.PRINT.getId()));\n\t\t\n\t\tmenu.add(ContributionItemFactory.REOPEN_EDITORS.create(window));\n\n\t\tmenu.add(new Separator());\n\n\t\tmenu.add(getAction(ActionFactory.QUIT.getId()));\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));\n\n\t\t\n\t\t//remove convert line delimiter and open file doublon\n\t\tActionSetRegistry reg = WorkbenchPlugin.getDefault().getActionSetRegistry();\n\t\tIActionSetDescriptor[] actionSets = reg.getActionSets();\n\t\t//String actionSetId = \"org.eclipse.ui.edit.text.actionSet.navigation\"; //$NON-NLS-1$\n\t\tString actionSetId = \"org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo\"; //$NON-NLS-1$\n\t\tString actionSetId2 = \"org.eclipse.ui.actionSet.openFiles\"; //$NON-NLS-1$\n\t\t// Removing convert line delimiters menu.\n\n\t\tfor (int i = 0; i <actionSets.length; i++)\n\t\t{\n\t\t\tif ((!actionSets[i].getId().equals(actionSetId)) && (!actionSets[i].getId().equals(actionSetId2)))\n\t\t\t\tcontinue;\n\t\t\tIExtension ext = actionSets[i].getConfigurationElement()\n\t\t\t\t.getDeclaringExtension();\n\t\t\treg.removeExtension(ext, new Object[] { actionSets[i] });\n\t\t}\n\t\treturn menu;\n\t}", "private void selectedRowGuide(){\r\n xy log_guide_rel_inv = tb_guias.getSelectionModel().getSelectedItem(); \r\n loadTables(log_guide_rel_inv.getGuias());\r\n loadCarga(log_guide_rel_inv.getGuias());\r\n \r\n List<Fxp_Archguid_gfc> data = Ln.getList_log_Archguid_gfc(Ln.getInstance().find_Archguid_gfc(log_guide_rel_inv.getGuias()));\r\n\r\n tp_factura.setText(\r\n \"Relación de Guia / Facturas / Clientes \" + \r\n \" - \" + \r\n data.size() + \" / \" + \r\n data.get(0).getNumfact() + \" / \" + \r\n data.get(0).getNumclie());\r\n\r\n tp_factura.setExpanded(true);\r\n \r\n }", "@Override\n\t\t\tpublic void handle(MouseEvent event) {\n\t\t \t\t tabpane.getSelectionModel().select(customerstab);\n\t\t\t}", "private void changesetTabSelection(int i) {\n\t\tif (i == 1)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.five_direct_double_name));\r\n\t\t}\r\n\t\tif (i == 2)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.five_group_120_name));\r\n\t\t}\r\n\t\tif (i == 3)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.five_group_60_name));\r\n\t\t}\r\n\t\tif (i == 4)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.five_group_30_name));\r\n\t\t}\r\n\t\tif (i == 5)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.five_group_20_name));\r\n\t\t}\r\n\t\tif (i == 6)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.five_group_10_name));\r\n\t\t}\r\n\t\tif (i == 7)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.five_group_5_name));\r\n\t\t}\r\n\t\tif (i == 8)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.four_direct_double_name));\r\n\t\t}\r\n\t\tif (i == 9)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.four_group_24_name));\r\n\t\t}\r\n\t\tif (i == 10)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.four_group_12_name));\r\n\t\t}\r\n\t\tif (i == 11)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.topthree_direct_double_name));\r\n\t\t}\r\n\t\tif (i == 12)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.topthree_group_three_name));\r\n\t\t}\r\n\t\tif (i == 13)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.topthree_group_six_name));\r\n\t\t}\r\n\t\tif (i == 14)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.topthree_group_sum_name));\r\n\t\t}\r\n\t\tif (i == 15)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.topthree_group_container_name));\r\n\t\t}\r\n\t\tif (i == 16)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.bottomthree_direct_double_name));\r\n\t\t}\r\n\t\tif (i == 17)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.bottomthree_group_span_name));\r\n\t\t}\r\n\t\tif (i == 18)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.bottomthree_group_three_name));\r\n\t\t}\r\n\t\tif (i == 19)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.bottomthree_group_six_name));\r\n\t\t}\r\n\t\tif (i == 20)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.bottomthree_group_sum_name));\r\n\t\t}\r\n\t\tif (i == 21)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.bottomthree_group_container_name));\r\n\t\t}\r\n\t\tif (i == 22)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_direct_bottomtwo_double_name));\r\n\t\t}\r\n\t\tif (i == 23)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_direct_bottomtwo_sum_name));\r\n\t\t}\r\n\t\tif (i == 24)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_direct_bottomtwo_span_name));\r\n\t\t}\r\n\t\tif (i == 25)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_direct_toptwo_double_name));\r\n\t\t}\r\n\t\tif (i == 26)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_direct_toptwo_span_name));\r\n\t\t}\r\n\t\tif (i == 27)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_group_bottomtwo_double_name));\r\n\t\t}\r\n\t\tif (i == 28)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_group_toptwo_double_name));\r\n\t\t}\r\n\t\tif (i == 29)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.fixed_position_name));\r\n\t\t}\r\n\t\tif (i == 30)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.three_bottomthree_one_notposition_name));\r\n\t\t}\r\n\t\tif (i == 31)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.three_bottomthree_two_notposition_name));\r\n\t\t}\r\n\t\tif (i == 32)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.three_topthree_one_notposition_name));\r\n\t\t}\r\n\t\tif (i == 33)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.three_topthree_two_notposition_name));\r\n\t\t}\r\n\t\tif (i == 34)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.four_bottomfour_two_notposition_name));\r\n\t\t}\r\n\t\tif (i == 35)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.five_bottomfive_two_notposition_name));\r\n\t\t}\r\n\t\tif (i == 36)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.five_bottomfive_three_notposition_name));\r\n\t\t}\r\n\t\tif (i == 37)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_group_toptwo_sum_name));\r\n\t\t}\r\n\t\tif (i == 38)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.four_group_6_name));\r\n\t\t}\r\n\t\tif (i == 39)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.four_group_4_name));\r\n\t\t}\r\n\t\tif (i == 40)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.bottomthree_direct_sum_name));\r\n\t\t}\r\n\t\tif (i == 41)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.topthree_direct_sum_name));\r\n\t\t}\r\n\t\tif (i == 42)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.topthree_direct_span_name));\r\n\t\t}\r\n\t\tif (i == 43)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.topthree_sum_end_name));\r\n\t\t}\r\n\t\tif (i == 44)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.bottomthree_sum_end_name));\r\n\t\t}\r\n\t\tif (i == 45)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_direct_toptwo_sum_name));\r\n\t\t}\r\n\t\tif (i == 46)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_group_toptwo_container_name));\r\n\t\t}\r\n\t\tif (i == 47)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_group_bottomtwo_container_name));\r\n\t\t}\r\n\t\tif (i == 48)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_group_bottomtwo_sum_name));\r\n\t\t}\r\n\t\tif (i == 49)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.four_bottomfour_one_notposition_name));\r\n\t\t}\r\n\t\tif (i == 50)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.maxmin_bottomtwo_name));\r\n\t\t}\r\n\t\tif (i == 51)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.maxmin_bottomthree_name));\r\n\t\t}\r\n\t\tif (i == 52)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.maxmin_toptwo_name));\r\n\t\t}\r\n\t\tif (i == 53)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.maxmin_topthree_name));\r\n\t\t}\r\n\t\tif (i == 54)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.five_direct_single_name));\r\n\t\t}\r\n\t\tif (i == 55)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.four_direct_single_name));\r\n\t\t}\r\n\t\tif (i == 56)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.topthree_group_three_single_name));\r\n\t\t}\r\n\t\tif (i == 57)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.topthree_group_six_single_name));\r\n\t\t}\r\n\t\tif (i == 58)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.topthree_direct_single_name));\r\n\t\t}\r\n\t\tif (i == 59)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.bottomthree_direct_single_name));\r\n\t\t}\r\n\t\tif (i == 60)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.bottompthree_group_three_single_name));\r\n\t\t}\r\n\t\tif (i == 61)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.bottompthree_group_six_single_name));\r\n\t\t}\r\n\t\tif (i == 62)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_direct_toptwo_single_name));\r\n\t\t}\r\n\t\tif (i == 63)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_group_toptwo_single_name));\r\n\t\t}\r\n\t\tif (i == 64)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_group_bottomtwo_single_name));\r\n\t\t}\r\n\t\tif (i == 65)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.two_direct_bottomtwo_single_name));\r\n\t\t}\r\n\t\tif (i == 66)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.topthree_mix_group_name));\r\n\t\t}\r\n\t\tif (i == 67)\r\n\r\n\t\t{\r\n\t\t\tsetTabSelection(getString(R.string.bottompthree_mix_group_name));\r\n\t\t}\r\n\t\twrite(i);\r\n\t}", "@Override\r\n\t\tpublic void onTabSelected(Tab tab, FragmentTransaction ft) {\n\t\t\tif (mFragment == null) {\r\n\t\t\t\t// If not, instantiate and add it to the activity\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putString(\"mode\", mTag);\r\n\t\t\t\tbundle.putSerializable(\"setDate\", mDate);\r\n\r\n\t\t\t\tmFragment = Fragment.instantiate(mActivity, mClass.getName(),\r\n\t\t\t\t\t\tbundle);\r\n\r\n\t\t\t\tft.add(android.R.id.content, mFragment, mTag);\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// If it exists, simply attach it in order to show it\r\n\t\t\t\tft.attach(mFragment);\r\n\t\t\t}\r\n\r\n\t\t}", "public void buildStagingPanel() {\n if (tabbedPane == null) {\n tabbedPane = new JTabbedPane(SwingConstants.TOP);\n tabbedPane.addTab(\"Query\", _widgetPanel);\n tabbedPane.addTab(om.getProgramName(), om.getTreePanel());\n tabbedPane.addTab(\"Calibrations\", calibrationMenu);\n tabbedPane.setVisible(true);\n } else {\n tabbedPane.setTitleAt(1, om.getProgramName());\n }\n\n tabbedPane.setSelectedIndex(1);\n }", "@FXML \n public void handleSelected() throws Exception{\n \n TablePosition pos = (TablePosition) table.getSelectionModel().getSelectedCells().get(0);\n int index = pos.getRow();\n String selected = table.getItems().get(index).toString();\n String sn = selected.substring(0, selected.indexOf(\",\"));\n String cc =selected.substring(selected.indexOf(\",\")+1, selected.length());\n \n StudentMarkClick.Activate(sn, cc, lastclicked);\n //switch to detail view\n content.getChildren().clear();\n content.getChildren().add(FXMLLoader.load(getClass().getResource(\"viewMarks.fxml\")));\n \n //selected = selected.substring(1, selected.indexOf(\",\")); //only get username\n System.out.println(sn+\"|\"+cc); \n \n }", "public JMenu createFileMenu(){\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmenu.add(createFileResetItem());\n\t\tmenu.add(createFilePracticeItem());\t\t\n\t\tmenu.add(createFileExitItem());\n\t\treturn menu;\n\t}", "public Menu createFileMenu();", "protected abstract StructuredViewer createViewer(Shell shell);" ]
[ "0.5698174", "0.56019294", "0.55359745", "0.5273294", "0.52697974", "0.51383436", "0.5136538", "0.5085602", "0.5062967", "0.5052382", "0.50317675", "0.50178385", "0.4925516", "0.49117932", "0.4906897", "0.4888317", "0.4887507", "0.48773864", "0.48160213", "0.481414", "0.48055285", "0.48040563", "0.478842", "0.477557", "0.47684282", "0.47680047", "0.47679615", "0.472926", "0.47266808", "0.47037056", "0.46786982", "0.4677148", "0.4668386", "0.4667893", "0.46669403", "0.46614656", "0.46373528", "0.46366405", "0.4632426", "0.46269944", "0.46243227", "0.46202424", "0.46107706", "0.46097308", "0.46094012", "0.46005744", "0.45914996", "0.45861366", "0.45835012", "0.4579444", "0.45748365", "0.4568527", "0.4557158", "0.45548072", "0.45526904", "0.4550626", "0.4533966", "0.45291254", "0.4516938", "0.45145056", "0.45136496", "0.45076925", "0.45046246", "0.45030552", "0.4495149", "0.44893503", "0.44883215", "0.44847605", "0.44827646", "0.44803795", "0.44786647", "0.44762844", "0.447589", "0.44609392", "0.44605118", "0.44589642", "0.4444558", "0.44428098", "0.4441492", "0.44386467", "0.44351524", "0.44336033", "0.4429221", "0.442501", "0.44202006", "0.44197544", "0.44191262", "0.4416331", "0.4414437", "0.44061717", "0.4403954", "0.44031864", "0.43987742", "0.43986815", "0.43972293", "0.43901795", "0.43775716", "0.43747398", "0.43725145", "0.43681183" ]
0.64474434
0
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) .setAction("Action", null).show();
@Override public void onClick(View view) { getUserRequest(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n Snackbar.make(v, \"I'm dead! =(\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }", "private void showSnackbarMessage(String message){\n if(view != null){\n Snackbar.make(view, message, Snackbar.LENGTH_SHORT).show();\n }\n }", "void showErrorSnackbar();", "void onSnackBarActionClicked(int uniqueId, View view);", "private void showSnackBar(String message) {\n }", "public static void showSnackbar(Activity activity, final View parent, final String message, final String actionText) {\n activity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n final Snackbar snackbar = Snackbar.make(parent, message, Snackbar.LENGTH_LONG)\n .setAction(actionText, new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n snackbar.show();\n }\n });\n\n }", "public void DisplaySnackBarAboveBar(String message, Boolean setAction) {\n int marginSide = 0;\n int marginBottom = 150;\n Snackbar snackbar = Snackbar.make(\n coordinatorLayout,\n message,\n Snackbar.LENGTH_LONG\n );\n\n if (setAction) {\n snackbar.setAction(\"Share Now\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, \"please visit https://www.noobsplanet.com\");\n sendIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(sendIntent, \"Send to \"));\n }\n });\n }\n\n View snackbarView = snackbar.getView();\n CoordinatorLayout.LayoutParams params = (CoordinatorLayout.LayoutParams) snackbarView.getLayoutParams();\n params.setMargins(\n params.leftMargin + marginSide,\n params.topMargin,\n params.rightMargin + marginSide,\n params.bottomMargin + marginBottom + 100\n );\n\n snackbarView.setLayoutParams(params);\n snackbar.show();\n }", "public void showSnackBar(final View view, final String message) {\n Snackbar.make(view, message, Snackbar.LENGTH_SHORT).show();\n }", "public void SnackBarB() {\n Snackbar.make(getWindow().getDecorView().getRootView(),\n \"Cálculos sobre cinemática de rotación.\", Snackbar.LENGTH_LONG).show();\n }", "private void showUndoSnackbar() {\n View view = ((Activity) this.context).findViewById(R.id.paletteActivity);\n\n Snackbar snackbar = Snackbar.make(view, R.string.undoColorShift,\n Snackbar.LENGTH_LONG);\n\n snackbar.setAction(\"UNDO\", v -> undoChange());\n snackbar.show();\n }", "private void showSnackBar(String message) {\n if(getActivity()!=null) {\n Snackbar snackbar = Snackbar.make(getActivity().findViewById(android.R.id.content),\n message, Snackbar.LENGTH_SHORT);\n View sbView = snackbar.getView();\n TextView textView = sbView\n .findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(ContextCompat.getColor(getActivity(), R.color.white));\n snackbar.show();\n }\n }", "public static void showSnackbar(Activity context, String message){\r\n Snackbar.make(context.findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG)\r\n .setAction(\"Dismiss\", new View.OnClickListener(){\r\n @Override\r\n public void onClick(View v){\r\n // Dismisses automatically\r\n }\r\n }).setActionTextColor(context.getResources().getColor(R.color.colorAccent))\r\n .show();\r\n }", "private void createSnackbar(String message) {\n Snackbar.make(mLayout, message, Snackbar.LENGTH_LONG).show();\n }", "private void snackBar(String msg) {\n MySnackBar.createSnackBar(Objects.requireNonNull(getContext()), Objects.requireNonNull(getView()), msg);\n }", "public static void showRedSnackbar(String message, Activity activity, int snackbarDuration) {\n snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, snackbarDuration);\n View snackbarView = snackbar.getView();\n snackbarView.setBackgroundColor(Color.parseColor(RED));\n\n TextView snackbarText = snackbarView.findViewById(com.google.android.material.R.id.snackbar_text);\n snackbarText.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_vector_cross, 0, 0, 0);\n snackbarText.setCompoundDrawablePadding(ICON_PADDING_SNACKBAR);\n snackbarText.setGravity(Gravity.CENTER);\n\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n params.width = FrameLayout.LayoutParams.MATCH_PARENT;\n snackbarView.setLayoutParams(params);\n\n snackbar.show();\n }", "public interface OnSnackBarActionListener {\n /**\n * On snack bar action clicked.\n *\n * @param uniqueId the unique id\n * @param view the mView\n */\n void onSnackBarActionClicked(int uniqueId, View view);\n}", "@Override\n public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {\n Snackbar.make(findViewById(R.id.activity_coordinator_layout), t.getLocalizedMessage(), Snackbar.LENGTH_INDEFINITE).show();\n }", "@Override\n public void onQuedadaCreadaError() {\n btn_publicar.setEnabled(true);\n Snackbar.make(myView,\"Error al crear la quedada\", Snackbar.LENGTH_SHORT).show();\n\n }", "public static void showSnackBar(Context context, String msg) {\n\n Snackbar.make(((Activity) context).findViewById(android.R.id.content), \"\" + msg, Snackbar.LENGTH_LONG).show();\n }", "public static void showSnackBar(Context context, LinearLayout mainLayout, String msg, String btnText, int length){\n Resources resources = context.getResources();\n\n Snackbar snackbar = Snackbar\n .make(mainLayout, msg, length )\n .setAction(resources.getText(R.string.ok), new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n\n // Changing message text color\n snackbar.setActionTextColor(ContextCompat.getColor(context, R.color.home_yellow));\n\n // Changing action button text color\n View sbView = snackbar.getView();\n sbView.setBackgroundColor(ContextCompat.getColor(context, R.color.background_edittext));\n\n TextView textView = (TextView) sbView.findViewById(com.google.android.material.R.id.snackbar_text);\n textView.setTextColor(ContextCompat.getColor(context, R.color.edittext_text));\n textView.setMaxLines(5);\n snackbar.show();\n }", "public static void showGreenSnackbar(String message, Activity activity, int snackbarDuration) {\n snackbar = Snackbar.make(activity.findViewById(android.R.id.content), message, snackbarDuration);\n View snackbarView = snackbar.getView();\n snackbarView.setBackgroundColor(Color.parseColor(GREEN));\n\n TextView snackbarText = snackbarView.findViewById(com.google.android.material.R.id.snackbar_text);\n snackbarText.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_vector_checkmark, 0, 0, 0);\n snackbarText.setCompoundDrawablePadding(ICON_PADDING_SNACKBAR);\n snackbarText.setGravity(Gravity.CENTER);\n\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n params.width = FrameLayout.LayoutParams.MATCH_PARENT;\n snackbarView.setLayoutParams(params);\n\n snackbar.show();\n }", "public void showHelp() {\n final Snackbar snackBar = Snackbar.make(findViewById(R.id.mapscontainer),\n \"Select a location by clicking the map. Press go to search your categories.\",\n Snackbar.LENGTH_INDEFINITE);\n\n snackBar.setAction(\"Got it!\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n snackBar.dismiss();\n }\n })\n .setActionTextColor(Color.WHITE);\n snackBar.show();\n }", "private SnackbarHelper() {\n\n}", "public void showToast(String text)\n {\n Text icon = GlyphsDude.createIcon(FontAwesomeIconName.CHECK_CIRCLE,\"1.5em\");\n icon.setFill(Color.WHITE);\n Label l = new Label(text) ;\n l.setTextFill(Color.WHITE);\n l.setGraphic(icon);\n snackbar = new JFXSnackbar(PrinciplePane);\n snackbar.enqueue( new JFXSnackbar.SnackbarEvent(l));\n }", "private void showPermissionSnackbar() {\n Snackbar.make(\n findViewById(R.id.container), R.string.permission_explanation, Snackbar.LENGTH_LONG)\n .setAction(R.string.permission_explanation_action, new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n requestFineLocationPermission();\n }\n })\n .show();\n }", "@OnClick(R.id.btnConfirm)\n public void onConfirmClicked(){\n new MaterialAlertDialogBuilder(getActivity(), R.style.MaterialAlertDialog_MaterialComponents_Title_Icon)\n .setTitle(R.string.dialog_confirm_title)\n .setMessage(R.string.card_message_demo_small)\n .setPositiveButton(R.string.dialog_confirm, (dialog, which) -> Toast.makeText(getActivity(),\n R.string.message_action_success, Toast.LENGTH_LONG).show())\n .setNegativeButton(R.string.dialog_cancel, null)\n .show();\n\n }", "private void SnackShowTop(String message, View view) {\n Snackbar snack = Snackbar.make(view, message, Snackbar.LENGTH_LONG);\n View view_layout = snack.getView();\n FrameLayout.LayoutParams params = (FrameLayout.LayoutParams) view_layout.getLayoutParams();\n params.gravity = Gravity.TOP;\n view_layout.setLayoutParams(params);\n snack.show();\n }", "@Override\n public void run() {\n snackbar.setVisibility(View.GONE); //This will remove the View. and free s the space occupied by the View\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n String message = String.valueOf(guardiansName.get(position));\n clickedGuardian = new String[]\n {String.valueOf(guardiansPhone.get(position)),\n String.valueOf(guardiansName.get(position)),};\n snackbar = Snackbar.make(getActivity().findViewById(R.id.myCoordinatorLayout), message, Snackbar.LENGTH_LONG);\n snackbar.setAction(R.string.Update, new UpdateGuardian());\n snackbar.show();\n }", "public void showNotification(String notificationText) {\n View parentLayout = findViewById(android.R.id.content);\n Snackbar mySnackbar = Snackbar.make(parentLayout, notificationText, Snackbar.LENGTH_LONG);\n mySnackbar.show();\n }", "void showToast(String message);", "void showToast(String message);", "@Override\n public void onSuccess(Void unused) {\n Snackbar.make(save, R.string.sucessfull_update, BaseTransientBottomBar.LENGTH_SHORT).show();\n }", "protected void showMessage(@NonNull final String message) {\n SnackbarManager.show(Snackbar.with(this).text(message).colorResource(R.color.blende_red).swipeToDismiss(true));\n }", "void showForbiddenErrorSnackbar();", "public static void showWarningSnackBar(View layout, String text) {\n Snackbar s = Snackbar.make(layout, text, Snackbar.LENGTH_INDEFINITE);\n s.setAction(\"Retry\", v -> {\n s.dismiss();\n });\n s.show();\n }", "private void showDeletedSnackbar() {\n Snackbar.make(parent, \"Selected \" + getTypeDescription() + \" deleted.\", Snackbar.LENGTH_LONG)\n .setAction(\"Undo\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (previouslyDeletedItems.size() > 0) {\n // Re-add the items and update the list.\n listDao.insertRows(previouslyDeletedItems);\n reloadData();\n }\n }\n })\n .show();\n }", "private void muestraMensaje(int idMensaje) {\n final Snackbar snack=Snackbar.make(mLayout,idMensaje,Snackbar.LENGTH_LONG).\n setAction(R.string.texto_cerrar, v -> {\n // No necesitamos hacer nada, solo que se cierre\n });\n snack.show();\n }", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message!\", Toast.LENGTH_SHORT).show();\n\n }", "public void showErrorMessage(){\n Toast.makeText(context, R.string.generic_error_message, Toast.LENGTH_LONG).show();\n }", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tAlertDialog fuck = builder.create();\n\t\t\tfuck.show();\n\t\t}", "protected void showTopSnackBar(String message, int bColor) {\n\n Snackbar snack = Snackbar.make(getWindow().getDecorView().findViewById(android.R.id.content), message, Snackbar.LENGTH_LONG);\n View snackbarView = snack.getView();\n snackbarView.setBackgroundColor(bColor);\n// TextView textView = (TextView) snackbarView.findViewById(com.androidadvance.topsnackbar.R.id.snackbar_text);\n// textView.setTextColor(Color.WHITE);\n// textView.setGravity(Gravity.CENTER_HORIZONTAL);\n// FrameLayout.LayoutParams params =(FrameLayout.LayoutParams)snackbarView.getLayoutParams();\n// params.gravity = Gravity.TOP;\n// snackbarView.setLayoutParams(params);\n snack.show();\n }", "@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Snackbar.make(findViewById(R.id.actie_add), \"Database kan niet gelezen worden\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }", "public void showWarningMessage(View view){\n\n //Show popup to warn user about the entered start and destiantion Addresses\n builder = new AlertDialog.Builder(this);\n //Setting message manually and performing action on button click\n builder.setMessage(\"Please insert a start and a destination address!\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // finish();\n Toast.makeText(getApplicationContext(),\"you choose yes action for the warning popup\",\n Toast.LENGTH_SHORT).show();\n }\n });\n /* .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Action for 'NO' Button\n dialog.cancel();\n Toast.makeText(getApplicationContext(),\"you choose no action for for the warning popup\",\n Toast.LENGTH_SHORT).show();\n }\n } );*/\n //Creating dialog box\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(\"WARNING!\");\n alert.show();\n }", "public void showMessage(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n\n\n Toast.makeText(MainSOSActivity.this, \"Stay Safe and Confirm the Message! Your emergnecy conctacts will be notified!\", Toast.LENGTH_SHORT).show();\n\n }", "public void add(View view){\n displayAlertDialog();\n\n }", "@Override\n public void onClick(View v) {\n limpiarCampos();\n if (validacion()) {//ejecuta la funcion validacion\n guardar_login();\n\n } else {\n Snackbar.make(findViewById(android.R.id.content), \"Faltan completar campos \",\n Snackbar.LENGTH_LONG)\n .setDuration(3000)\n .show();\n\n\n }\n }", "public void displaySnackBar(View layout,int message,int bgcolor){\n Snackbar snack=null;\n View snackView;\n\n if(message == com.ibeis.wildbook.wildbook.R.string.offline)\n snack=Snackbar.make(layout,message,Snackbar.LENGTH_INDEFINITE);\n else\n snack=Snackbar.make(layout,message,Snackbar.LENGTH_SHORT);\n snackView = snack.getView();\n snackView.setBackgroundColor(bgcolor);\n snack.show();\n }", "private void editPoint() {\n Snackbar.make(coordinatorLayout, R.string.feature_not_available, Snackbar.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View view) {\n clearDisplay();\n table.setVisibility(View.INVISIBLE);\n saveButton.setVisibility(View.INVISIBLE);\n cancelButton.setVisibility(View.INVISIBLE);\n Snackbar snackbar = Snackbar.make(view, R.string.cancelled, Snackbar.LENGTH_SHORT);\n snackbar.show();\n }", "void showErrorSnackbar(long syncInterval) {\r\n // Initialize the the parameters that will be used to create the String message\r\n int timePassed;\r\n String timeUnit;\r\n if (syncInterval < DAY_IN_SECONDS) {\r\n // If less than a day has passed, convert the number of seconds to hours\r\n timePassed = (int) (syncInterval / HOUR_IN_SECONDS);\r\n\r\n // Set the time unit to singular or multiple\r\n if (timePassed == 1) {\r\n timeUnit = getString(R.string.hour_singular);\r\n } else {\r\n timeUnit = getString(R.string.hour_multiple);\r\n }\r\n\r\n } else {\r\n // Convert the time passed to days\r\n timePassed = (int) (syncInterval / DAY_IN_SECONDS);\r\n\r\n // Set the time unit to singular or multiple\r\n if (timePassed == 1) {\r\n timeUnit = getString(R.string.day_singular);\r\n } else {\r\n timeUnit = getString(R.string.day_multiple);\r\n }\r\n }\r\n\r\n // Create the String message to display to the user to notify them of how long\r\n // since the last sync\r\n String timeString = getString(R.string.error_last_sync, timePassed + \" \" + timeUnit);\r\n\r\n // Create a Snackbar to hold the message\r\n mSnackBar = Snackbar.make(mDrawerLayout,\r\n timeString,\r\n Snackbar.LENGTH_INDEFINITE\r\n );\r\n\r\n // Set the Snackbar to be dismissed on click\r\n mSnackBar.getView().setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n mSnackBar.dismiss();\r\n }\r\n });\r\n\r\n // Show the Snackbar\r\n mSnackBar.show();\r\n }", "private void showErrorToast() {\n }", "@Override public void onClick(View v) {\n Snackbar.make(groupViewHolder.itemView, \"Group was toggled\", Snackbar.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n Snackbar.make(v, \"断开失败...\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n\n }", "void showAlert(String message);", "public void showToast(String msg){\n Toast.makeText(this, msg, Toast.LENGTH_SHORT).show();\n }", "public void showErrorMessage(String message){\n Toast.makeText(context, message, Toast.LENGTH_LONG).show();\n }", "public void toastKickoff(String message) {\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "private void msg(String s)\n {\n Toast.makeText(getApplicationContext(),s,Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View view) {\n createServer();\n Snackbar.make(view, \"Adding server done\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n\n }", "private void showMessage(String msg) {\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull @NotNull Exception e) {\n Snackbar.make(save, R.string.update_fail, BaseTransientBottomBar.LENGTH_SHORT).show();\n }", "protected void showToast(String message) {\n\tToast.makeText(this, message, Toast.LENGTH_SHORT).show();\n}", "@Override\n public void onClick(View view) {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(\"Discount Code\");\n builder.setMessage(\"Use this code : \" + dis.getDiscountID());\n builder.setIcon(android.R.drawable.ic_input_get); //Delete Icon\n builder.setPositiveButton(\"OK\",null);\n builder.show();\n }", "private void showToastRequired(String message) {\n Toast.makeText(this, getString(R.string.validation_required, message),\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void showError(@StringRes int messageId, @Nullable Object... args) {\n if (getView() != null) {\n //When we have the root view\n\n //Evaluating the message to be shown\n String messageToBeShown;\n if (args != null && args.length > 0) {\n //For the String Resource with args\n messageToBeShown = getString(messageId, args);\n } else {\n //For the String Resource without args\n messageToBeShown = getString(messageId);\n }\n\n if (!TextUtils.isEmpty(messageToBeShown)) {\n //Displaying the Snackbar message of indefinite time length\n //when we have the error message to be shown\n\n new SnackbarUtility(Snackbar.make(getView(), messageToBeShown, Snackbar.LENGTH_INDEFINITE))\n .revealCompleteMessage() //Removes the limit on max lines\n .setDismissAction(R.string.snackbar_action_ok) //For the Dismiss \"OK\" action\n .showSnack();\n }\n }\n }", "private void showToast(String msg) {\n Toast.makeText(getBaseContext(), msg, Toast.LENGTH_LONG).show();\n }", "private void createSnack() {\n }", "private void showToast(String msg) {\r\n Toast.makeText(Imprimir.this, msg, Toast.LENGTH_LONG).show();\r\n }", "private void showErrorView() {\n Log.d(\"lodd\", \"showSuccessView: hjfj91919515\");\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\r\n\t\t\r\n\t\t\t\tToast.makeText(getApplicationContext(), \"등록완료\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\r\n\t\t\t\t\t \r\n\t\t\t}", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void msg(String s) {\n Toast.makeText(getApplicationContext(), s, Toast.LENGTH_LONG).show();\n }", "private void exibe_mensagem(String msg){\n Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();\n }", "@Override\n public void onErrorResponse(VolleyError volleyError) {\n progressDialog.dismiss();\n\n // Showing error message if something goes wrong.\n Snackbar snackbar = Snackbar\n .make(coordinatorLayout, \"No internet connection!\", Snackbar.LENGTH_LONG)\n .setAction(\"RETRY\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n }\n });\n\n // Changing message text color\n snackbar.setActionTextColor(Color.RED);\n\n // Changing action button text color\n View sbView = snackbar.getView();\n TextView textView = (TextView) sbView.findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(Color.YELLOW);\n\n snackbar.show();\n }", "public void toast (String msg)\n\t{\n\t\tToast.makeText (getApplicationContext(), msg, Toast.LENGTH_SHORT).show ();\n\t}", "@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Snackbar.make(findViewById(R.id.actie_add), \"Database kan niet gelezen worden\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }", "void showToast(String value);", "public static void showSnack(final Context context, View view, boolean isConnected) {\n if (snackbar == null) {\n snackbar = Snackbar\n .make(view, context.getString(R.string.network_failure), Snackbar.LENGTH_INDEFINITE)\n .setAction(\"SETTINGS\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(android.provider.Settings.ACTION_SETTINGS);\n context.startActivity(intent);\n }\n });\n View sbView = snackbar.getView();\n TextView textView = sbView.findViewById(android.support.design.R.id.snackbar_text);\n textView.setTextColor(Color.WHITE);\n }\n\n if (!isConnected && !snackbar.isShown()) {\n snackbar.show();\n } else {\n snackbar.dismiss();\n snackbar = null;\n }\n }", "@Override\n protected void notifyUserOnPlayServicesErrorDialogCancelled() {\n final View rootView = findViewById(R.id.root_layout);\n if (rootView == null) return;\n Snackbar.make(rootView, R.string.google_play_services_error, Snackbar.LENGTH_LONG)\n .show();\n }", "private void makeToast(String message){\n Toast.makeText(SettingsActivity.this, message, Toast.LENGTH_LONG).show();\n }", "void showOthersActions(String message);", "public void showMessageDialog(int id, String caption, String message)\n{\n MessageDialog.newInstance(id, caption, message, this)\n .show(getFragmentManager(), \"\");\n}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch (id) {\n case R.id.action_settings:\n Toast.makeText(this, \"Goto Settings\", Toast.LENGTH_SHORT).show();\n return true;\n case R.id.action_call:\n call();\n return true;\n case R.id.action_photo:\n //Some view that is inside the coordinator layout\n //Snackbar.make(toolbar, \"Hi, Snack\", BaseTransientBottomBar.LENGTH_LONG/*view:?*/).show();\n takePicture();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmsg();\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Coming soon.\", Toast.LENGTH_SHORT);\n toast.show();\n\n }", "private void showMessage(String message) {\n Toast.makeText(getApplicationContext(),message, Toast.LENGTH_LONG).show();\n }", "void toast(int resId);", "public void onClickShowAlert(View view) {\n AlertDialog.Builder myAlertBuilder = new\n AlertDialog.Builder(MainActivity.this);\n // Set the dialog title and message.\n myAlertBuilder.setTitle(\"Alert\");\n myAlertBuilder.setMessage(\"Click OK to continue, or Cancel to stop:\");\n // Add the dialog buttons.\n myAlertBuilder.setPositiveButton(\"OK\", new\n DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // User clicked OK button.\n Toast.makeText(getApplicationContext(), \"Pressed OK\",\n Toast.LENGTH_SHORT).show();\n }\n });\n myAlertBuilder.setNegativeButton(\"Cancel\", new\n DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // User cancelled the dialog.\n Toast.makeText(getApplicationContext(), \"Pressed Cancel\",\n Toast.LENGTH_SHORT).show();\n }\n });\n // Create and show the AlertDialog.\n myAlertBuilder.show();\n }", "public void apply(View v) {\n String sound = soundSpinner.getSelectedItem().toString();\n\n Snackbar.make(v, \"Piano sound set to \" + sound, Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }", "private void showErrorDialog(){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.booking_not_created));\n builder.setMessage(getString(R.string.customer_already_has_active_booking_error));\n builder.setIcon(R.drawable.ic_error_black_24dp);\n builder.setCancelable(false);\n // When users confirms dialog, close the activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n // Close the Activity..\n finish();\n });\n\n AlertDialog dialog = builder.create();\n dialog.setCanceledOnTouchOutside(false);\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n }", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void failed(final String message) {\n\t\t\t\t\t\t\tact.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\tact.showToast(message);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t}", "public static void showAlert(String message, Activity context) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setMessage(message).setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n\n }\n });\n try {\n builder.show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "private void toastMessage(String message){\n Toast.makeText(this,message, Toast.LENGTH_SHORT).show();\n }", "void showSuccess(String message);" ]
[ "0.7785257", "0.73442245", "0.73139656", "0.730877", "0.7113198", "0.70190966", "0.69791985", "0.6933952", "0.681869", "0.6780793", "0.677405", "0.67698985", "0.66980565", "0.66907495", "0.65357697", "0.65275043", "0.65271914", "0.6500005", "0.6499267", "0.6454735", "0.6414679", "0.63544285", "0.6350271", "0.632104", "0.6287238", "0.6245872", "0.6191525", "0.61712915", "0.60928607", "0.6062731", "0.60372216", "0.60372216", "0.602796", "0.6012778", "0.6011712", "0.5977039", "0.59765285", "0.5962365", "0.59523964", "0.59356576", "0.5921983", "0.5903302", "0.58821213", "0.5867447", "0.58567053", "0.58476704", "0.58323663", "0.5827387", "0.5826075", "0.5822216", "0.5811714", "0.58063084", "0.57834625", "0.5770094", "0.5732856", "0.5717681", "0.5694905", "0.56938714", "0.56920016", "0.5677886", "0.5677886", "0.566374", "0.5663204", "0.5656798", "0.56499887", "0.564703", "0.56381416", "0.5632468", "0.56276226", "0.5624066", "0.5623664", "0.561811", "0.5613451", "0.5608268", "0.5608268", "0.5608268", "0.5600748", "0.560029", "0.5585414", "0.55832666", "0.55818075", "0.55800486", "0.5576674", "0.55763865", "0.5574379", "0.55673736", "0.5561508", "0.5560134", "0.5550554", "0.5547425", "0.55250996", "0.5517793", "0.55139524", "0.55136186", "0.5510175", "0.5510175", "0.55094975", "0.5507766", "0.55076903", "0.55076903", "0.5507388" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu){\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.menu, menu);\r\n return true;\r\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.72497207", "0.72041494", "0.7198533", "0.71808106", "0.71110344", "0.7044596", "0.7042557", "0.7015272", "0.70119643", "0.6984017", "0.6950008", "0.6944079", "0.6937662", "0.6921333", "0.6921333", "0.6894039", "0.6887707", "0.6880534", "0.68777215", "0.6867014", "0.6867014", "0.6867014", "0.6867014", "0.68559307", "0.6852073", "0.68248004", "0.6820769", "0.68184304", "0.68184304", "0.6817935", "0.6810622", "0.6804502", "0.68026507", "0.67964166", "0.67932844", "0.6791405", "0.67871046", "0.6762318", "0.67619425", "0.67528236", "0.6749201", "0.6749201", "0.6745379", "0.6743501", "0.6731059", "0.67279845", "0.6727818", "0.6727818", "0.67251533", "0.67155576", "0.6709411", "0.6708032", "0.67033577", "0.67028654", "0.67017025", "0.669979", "0.66913515", "0.6688428", "0.6688428", "0.66866416", "0.6685591", "0.6683817", "0.6682796", "0.66729134", "0.6672762", "0.6666433", "0.66600657", "0.66600657", "0.66600657", "0.6659591", "0.6659591", "0.6659591", "0.66593474", "0.66565514", "0.6655428", "0.6654482", "0.665351", "0.665207", "0.6651319", "0.6649983", "0.66496044", "0.6649297", "0.66489553", "0.6648444", "0.6648406", "0.6645919", "0.66434747", "0.66401505", "0.66370535", "0.66367626", "0.66367304", "0.66367304", "0.66367304", "0.6633702", "0.6633666", "0.6631505", "0.6629352", "0.6629109", "0.6624368", "0.66234607", "0.66223407" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577", "0.734109", "0.73295504", "0.7327726", "0.73259085", "0.73188347", "0.731648", "0.73134047", "0.7303978", "0.7303978", "0.7301588", "0.7298084", "0.72932935", "0.7286338", "0.7283324", "0.72808945", "0.72785115", "0.72597474", "0.72597474", "0.72597474", "0.725962", "0.7259136", "0.7249966", "0.7224023", "0.721937", "0.7216621", "0.72045326", "0.7200649", "0.71991026", "0.71923256", "0.71851367", "0.7176769", "0.7168457", "0.71675026", "0.7153402", "0.71533287", "0.71352696", "0.71350807", "0.71350807", "0.7129153", "0.7128639", "0.7124181", "0.7123387", "0.7122983", "0.71220255", "0.711715", "0.711715", "0.711715", "0.711715", "0.7117043", "0.71169263", "0.7116624", "0.71149373", "0.71123946", "0.7109806", "0.7108778", "0.710536", "0.7098968", "0.70981944", "0.7095771", "0.7093572", "0.7093572", "0.70862055", "0.7082207", "0.70808214", "0.7080366", "0.7073644", "0.7068183", "0.706161", "0.7060019", "0.70598614", "0.7051272", "0.70374316", "0.70374316", "0.7035865", "0.70352185", "0.70352185", "0.7031749", "0.703084", "0.7029517", "0.7018633" ]
0.0
-1
This method return PersonFactory object of specific type
Factory<? extends T> buildPersonFactory(String type);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface PersonFactory<P extends Person> {\n P create(String firstname, String lastName);\n}", "public interface PersonFactory {\n\n public Boy getBoy();\n\n public Gril getGril();\n\n}", "public interface PersonFactory<P extends Person> {\n\n P create(String firstName, String lastName);\n}", "Person createPerson();", "Class<?> getFactoryClass();", "public ObjectifyFactory factory() {\n return ofy().factory();\n }", "@objid (\"0078ca26-5a20-10c8-842f-001ec947cd2a\")\n GenericFactory getGenericFactory();", "public Person createPerson(Person p);", "PlanningFactory getFactory();", "public Person getRandomPerson() {\n //Randomize all characteristics of a person\n int age = (int) (rd.nextDouble() * 100); //within 100y old\n int gd = (int) Math.round(rd.nextDouble() * (Person.Gender.values().length - 1));\n int bt = (int) Math.round(rd.nextDouble() * (Person.BodyType.values().length - 1));\n int pf = (int) Math.round(rd.nextDouble() * (Person.Profession.values().length - 1));\n boolean isPreg = rd.nextBoolean();\n\n //Construct a person with random characteristic\n //Person(int age, Profession profession, Gender gender, BodyType bodytype, boolean isPregnant)\n P = new Person(age, Person.Profession.values()[pf], Person.Gender.values()[gd], Person.BodyType.values()[bt], isPreg);\n return P;\n }", "Demo1Factory getDemo1Factory();", "public abstract Product productFactory(String type);", "private static Person createPerson(String type, Scanner input) {\n System.out.println(\"\\nPlease enter the details of the \" + type + \": \");\n System.out.println(\"\\nName: \");\n String name = input.nextLine();\n\n System.out.println(\"\\nContact number: \");\n String contactNo = input.nextLine();\n\n System.out.println(\"\\nEmail address : \");\n String email = input.nextLine();\n\n System.out.println(\"\\nAddress: \");\n String address = input.nextLine();\n\n return new Person(type, name, contactNo, email, address);\n\n }", "public abstract ProductFactory getFactory();", "public interface UnitFactory {\n Gui_Unit createUnit(String name, int team);\n Gui_Unit copy(Gui_Unit guiUnit);\n\n static UnitFactory getUnitFactory(UnitClassNames name){\n UnitFactory factory = null;\n\n switch (name){\n case ARTILLERY:{\n factory = new ArtilleryFactory();\n break;\n }\n case VEHICLE:{\n factory = new VehicleFactory();\n break;\n }\n case LIGHT_INFANTRY:{\n factory = new LightInfantryFactory();\n break;\n }\n case MELEE_INFANTRY:{\n factory = new MeleeInfantryFactory();\n break;\n }\n case HEAVY_INFANTRY:{\n factory = new HeavyInfantryFactory();\n break;\n }\n }\n return factory ;\n }\n}", "public interface Factory<T> {\n\n /**\n * Returns an instance of the required type. The implementation determines whether or not a new or cached\n * instance is created every time this method is called.\n *\n * @return an instance of the required type.\n */\n T getInstance();\n}", "TestModelFactory getTestModelFactory();", "@Override\n\tprotected Employee factoryMethod() {\n\t\treturn new Developer();\n\t}", "public static Factory factory() {\n return ext_dbf::new;\n }", "public Person create() {\n\t\treturn personRepository.create();\n\t}", "public static CarFactory makeFactory(String color, String marca, String placa, String cil, String trans, String puesto, int type) {\n \n switch (type) {\n case 0:\n return new FamiliarFactory(color, marca, placa, cil, trans, puesto);\n case 1:\n return new SportFactory(color, marca, placa, cil, trans, puesto);\n case 2:\n return new StandarFactory(color, marca, placa, cil, trans, puesto);\n default:\n throw new IllegalArgumentException(\"No existe esta categoria de carro\");\n }\n }", "public interface Factory<T> {\n T create();\n}", "public Factory getFactory()\r\n {\r\n if( m_factory != null ) return m_factory;\r\n m_factory = FactoryHelper.narrow( m_primary );\r\n return m_factory;\r\n }", "public interface IFactory {\n ICustomer getCustomer(CustomerType type);\n IAccount getAccount(Enum type);\n// IEntry getEntry(EntryType type);\n DAO getDAO(Enum type);\n\n}", "public static Creature CreaturesFactory(String type , String name , int point ,int power )\r\n\t{\r\n\t\tif (type.compareToIgnoreCase(\"Goblin\") == 0)\r\n\t\t{\r\n\t\t\treturn new Goblin(name, point, power);\r\n\t\t}\r\n\t\telse if (type.compareToIgnoreCase(\"Mummy\") == 0)\r\n\t\t{\r\n\t\t\treturn new Mummy(name, point, power); \r\n\t\t}\r\n\t\t\r\n\t\treturn null ;\r\n\t}", "public static AbstractStackFactory getFactory(String factorial){\n if(factorial.equalsIgnoreCase(\"Lista\")){\n return new StackListFactory();\n\n }else if(factorial.equalsIgnoreCase(\"Vector\")){\n return new StackVectorFactory();\n\n }else if(factorial.equalsIgnoreCase(\"ArrayList\")){\n return new StackArrayListFactory();\n }\n\n return null;\n }", "private ModelFactory _getModelFactory(Class<?> type) {\n \tif (_typeCache.containsKey(type))\r\n \t{\r\n \t\treturn _typeCache.get(type);\r\n \t} else\r\n \t{\r\n \t\tIterator<Class<?>> iterator = _registeredModelFactories.keySet().iterator();\r\n \t\t\r\n \t\tModelFactory modelFactory = null;\r\n \t\t\r\n \t\t//loop through all registered model types to find a modelFactory\r\n \t\twhile (iterator.hasNext())\r\n \t\t{\r\n \t\t\tClass<?> targetType = iterator.next();\r\n \t\t\t\r\n \t\t\t//check if the object is eligible for wrapping by the current registration \r\n \t\t\tif (targetType.isAssignableFrom(type))\r\n \t\t\t{\r\n \t\t\t\tmodelFactory = _registeredModelFactories.get(targetType);\r\n \t\t\t\t\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t//add the type to the cache and wrap the object\r\n \t\t_typeCache.put(type, modelFactory);\r\n \t\treturn modelFactory;\r\n \t}\r\n\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tprivate static XmlEntityObjectFactory getFactory() {\n\t\tif (factory == null) {\n\t\t\tfactory = new XmlEntityObjectFactory();\n\t\t\ttry {\n\t\t\t\tClass<IXmlEntityResolverLoader> loaderClass = (Class<IXmlEntityResolverLoader>) Class\n\t\t\t\t\t\t.forName(defaulEntityResolverLoaderClassName);\n\t\t\t\tIXmlEntityResolverLoader loader;\n\t\t\t\tloader = loaderClass.newInstance();\n\t\t\t\tloader.loadTo(factory);\n\t\t\t} catch (Exception ex) {\n\t\t\t\tthrow new UnexpectedRuntimeException(ex);\n\t\t\t}\n\t\t}\n\t\treturn factory;\n\t}", "public static GestorPersonas instanciar(){\n \n if(gestor == null){\n gestor = new GestorPersonas();\n }\n return gestor;\n }", "@Test\n public void testCreateFactory() {\n setFactory(\"ThaiMoneyFactory\");\n assertEquals(ThaiMoneyFactory.class, moneyFactory.getClass());\n assertNotEquals(MalayMoneyFactory.class, moneyFactory.getClass());\n assertEquals(currency, \"Baht\");\n setFactory(\"MalayMoneyFactory\");\n assertEquals(MalayMoneyFactory.class, moneyFactory.getClass());\n assertNotEquals(ThaiMoneyFactory.class, moneyFactory.getClass());\n assertEquals(currency, \"Ringgit\");\n }", "public static SerializerFactory createFactory(Class factory, \n Class javaType, \n QName xmlType) {\n if (factory == null) {\n return null;\n }\n\n try {\n if (factory == BeanSerializerFactory.class) {\n return new BeanSerializerFactory(javaType, xmlType);\n } else if (factory == SimpleSerializerFactory.class) {\n return new SimpleSerializerFactory(javaType, xmlType);\n } else if (factory == EnumSerializerFactory.class) {\n return new EnumSerializerFactory(javaType, xmlType);\n } else if (factory == ElementSerializerFactory.class) {\n return new ElementSerializerFactory();\n } else if (factory == SimpleListSerializerFactory.class) {\n return new SimpleListSerializerFactory(javaType, xmlType);\n }\n } catch (Exception e) {\n if (log.isDebugEnabled()) {\n log.debug(org.apache.axis.utils.Messages.getMessage(\"exception00\"), e);\n }\n return null;\n }\n\n SerializerFactory sf = null;\n try {\n Method method = \n factory.getMethod(\"create\", CLASS_QNAME_CLASS);\n sf = (SerializerFactory) \n method.invoke(null, \n new Object[] {javaType, xmlType});\n } catch (NoSuchMethodException e) {\n if(log.isDebugEnabled()) {\n log.debug(org.apache.axis.utils.Messages.getMessage(\"exception00\"), e);\n }\n } catch (IllegalAccessException e) {\n if(log.isDebugEnabled()) {\n log.debug(org.apache.axis.utils.Messages.getMessage(\"exception00\"), e);\n }\n } catch (InvocationTargetException e) {\n if(log.isDebugEnabled()) {\n log.debug(org.apache.axis.utils.Messages.getMessage(\"exception00\"), e);\n }\n }\n\n if (sf == null) {\n try {\n Constructor constructor = \n factory.getConstructor(CLASS_QNAME_CLASS);\n sf = (SerializerFactory) \n constructor.newInstance(\n new Object[] {javaType, xmlType});\n } catch (NoSuchMethodException e) {\n if(log.isDebugEnabled()) {\n log.debug(org.apache.axis.utils.Messages.getMessage(\"exception00\"), e);\n }\n } catch (InstantiationException e) {\n if(log.isDebugEnabled()) {\n log.debug(org.apache.axis.utils.Messages.getMessage(\"exception00\"), e);\n }\n } catch (IllegalAccessException e) {\n if(log.isDebugEnabled()) {\n log.debug(org.apache.axis.utils.Messages.getMessage(\"exception00\"), e);\n }\n } catch (InvocationTargetException e) {\n if(log.isDebugEnabled()) {\n log.debug(org.apache.axis.utils.Messages.getMessage(\"exception00\"), e);\n }\n }\n }\n \n if (sf == null) {\n try {\n sf = (SerializerFactory) factory.newInstance();\n } catch (InstantiationException e) {\n } catch (IllegalAccessException e) {}\n }\n return sf;\n }", "static public Person create(String name, String urlpt) {\n Person p;\n p = searchPerson(name);\n if (p == null)\n p = new Person(name, urlpt);\n return p;\n }", "public interface InstanceFactory {\n\n\t<T> T getInstance(Class<T> type);\n}", "public OBStoreFactory getFactory();", "QuestionnaireFactory getQuestionnaireFactory();", "public interface AbstractFactory<T> {\n /**\n * Create a new Object of type T\n * @return the created object\n */\n T create();\n}", "@Override\r\n\tpublic Product factory() {\n\t\treturn new ConcreteProduct2();\r\n\t}", "@Override\n\tpublic Person getT() {\n\t\treturn new Person();\n\t}", "QuestionarioFactory getQuestionarioFactory();", "GramaticaFactory getGramaticaFactory();", "public interface HumanFactory {\n\n Human createYellow();\n\n Human createBlack();\n}", "public static Person createPerson(String name, String occupation) {\n switch (occupation.toLowerCase()) {\n case \"doctor\":\n return new Doctor(name);\n case \"professor\":\n return new Professor(name);\n case \"student\":\n return new Student(name);\n default:\n return null;\n }\n }", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Object getInstance(Person person) {\n this.person = person;\n Class aClass = person.getClass();\n System.out.println(\"the proxy class:\" + person.getClass());\n return MineProxy.newInstance(new MineClassLoader(), aClass.getInterfaces(), this);\n }", "@Override\r\n\tpublic <T> T getInstance(Class<T> type) {\n\t\tfor( Scope key : beanFactories.keySet() ){\r\n\t\t\tT instance = beanFactories.get( key).getInstance(type);\r\n\t\t\tif (instance != null) {\r\n\t\t\t\treturn instance;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public interface IFactory {\n IUser createUser();\n IDepartment createDepartment();\n}", "public interface AddressFactory<A extends Address, P extends PhoneNumber> {\n\n\tpublic A createAddress();\n\n\tpublic P createPhoneNumber();\n\n}", "public interface BeanFactory {\n Object createBean(String name);\n <T> T createBean(Class<T> t);\n}", "public CreationWithParamsFactory getCreationFactory(Class aClass) {\n\t\treturn new CreationWithParamsFactory(aClass);\n\t}", "public interface Factory {\n Animal createAnimal();\n}", "protected Object buildFactory() throws DescriptorException {\n if (this.getFactoryClass() == null) {\n return null;\n }\n\n // If there is a factory class specified but no factory method name,\n // instantiate the factory using the default constructor\n if (this.getFactoryMethodName() == null) {\n return this.buildFactoryUsingDefaultConstructor();\n }\n\n // If both the factory class and the factory method name have been specified,\n // instantiate the factory by invoking the static factory method\n return this.buildFactoryUsingStaticMethod();\n }", "static Sport newInstance(int type) {\n switch (type) {\n case 0:\n return new Football();\n case 1:\n return new Basketball();\n default:\n return () -> System.out.println(\"Undefined sport.\");\n }\n }", "Type createType();", "Type createType();", "Type createType();", "private FacadePerson() throws personNotFoundExeption{}", "public interface TypeFactory {\n int type(Meizi m);\n\n int type(String string);\n\n BaseViewHolder creatViewHolder(int viewType, View view);\n}", "ProvenanceFactory getProvenanceFactory();", "public interface Factory {\r\n}", "public void create(Person p) {\n\t\t\n\t}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "BusinessEntityFactory getBusinessEntityFactory();", "BehaviouralModelFactory getBehaviouralModelFactory();", "public static User createPerson() throws ParserConfigurationException, SAXException, IOException {\n User[] users = XMLReader.parsePersonXML();\n User user = users[0];\n calories = user.getCalories();\n diet = user.getDiet();\n quantity = user.getQuantityOfPeople();\n transport = user.getTransport();\n return user;\n }", "ModelsFactory getModelsFactory();", "private ConcreteFactory() {}", "@Override\r\n\tpublic Person getPerson(Long personId) {\n\r\n\r\n\t\tPerson person = new Person(\"bob\", String.format(\"Unit%d\", personId), \"carol\", \"alice\", \"42\");\r\n\t\tperson.setId(personId);\r\n\t\treturn person;\r\n\t}", "public static Factory factory() {\n return ext_h::new;\n }", "public interface AbstractFactory {\n Bmw produceBmw();\n Benz produceBenz();\n}", "@Override\n IDeviceFactory getFactory();", "public static PetrinetmodelFactory init() {\r\n\t\ttry {\r\n\t\t\tPetrinetmodelFactory thePetrinetmodelFactory = (PetrinetmodelFactory)EPackage.Registry.INSTANCE.getEFactory(PetrinetmodelPackage.eNS_URI);\r\n\t\t\tif (thePetrinetmodelFactory != null) {\r\n\t\t\t\treturn thePetrinetmodelFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new PetrinetmodelFactoryImpl();\r\n\t}", "public Person build(){\n return new Person(this);\n }", "public static ProyectoFactory init() {\r\n\t\ttry {\r\n\t\t\tProyectoFactory theProyectoFactory = (ProyectoFactory)EPackage.Registry.INSTANCE.getEFactory(ProyectoPackage.eNS_URI);\r\n\t\t\tif (theProyectoFactory != null) {\r\n\t\t\t\treturn theProyectoFactory;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception exception) {\r\n\t\t\tEcorePlugin.INSTANCE.log(exception);\r\n\t\t}\r\n\t\treturn new ProyectoFactoryImpl();\r\n\t}", "public T create()\n {\n IProxyFactory<T> proxyFactory = getProxyFactory(type);\n T result = proxyFactory.createProxy();\n return result;\n }", "@Nonnull\n public FactoryType getFactoryType() {\n return type;\n }", "public interface Factory {\n LeiFeng createLeiFeng();\n}", "public static Serviceable getModel(AppModels type)\n {\n Serviceable tempObj;\n switch (type) {\n case KEYWORD_USER:\n tempObj = new KeywordUser();\n break;\n case QUIZ:\n tempObj = new Quiz();\n \n break;\n default:\n tempObj = null;\n break;\n }\n \n return tempObj;\n }", "<U extends T> U create(String name, Class<U> type) throws InvalidUserDataException;", "public static Factory factory() {\n return Document_print::new;\n }", "@Override\r\n\tpublic void create(Person person) {\n\r\n\t}", "public AoDai chooseFactory(){\n\t\treturn new ModernAoDai();\n\t}", "@Override\n\tpublic Factory get(Serializable id) {\n\t\treturn mapper.get(id);\n\t}", "public interface BeanFactory {\n\n Object getBean(Class<?> clazz);\n\n}", "public HeandlerI makePersonCreator() {\n return new HeandlerFileImpl();\n }", "public interface FruitFactory {\n\n Fruit getApple();\n\n Fruit getBanana();\n}", "DomainType createDomainType();", "public interface ICarFactory {\n\t\n\tpublic ICar produce(String carType);\n\t\n\t \n\t\n}", "JUnitDomainFactory getJUnitDomainFactory();", "public interface Factory {\n Product create();\n}", "protected static Object createFactory(Map<String, String> configuration,\n String initParameterName) {\n String factoryName = resolveFactoryName(configuration, initParameterName);\n return ClassUtil.instantiate(factoryName);\n }", "public static EtudiantFactory narrow(org.omg.CORBA.Object obj)\n {\n if (obj == null)\n return null;\n if (obj instanceof EtudiantFactory)\n return (EtudiantFactory)obj;\n\n if (obj._is_a(id()))\n {\n _EtudiantFactoryStub stub = new _EtudiantFactoryStub();\n stub._set_delegate(((org.omg.CORBA.portable.ObjectImpl)obj)._get_delegate());\n return stub;\n }\n\n throw new org.omg.CORBA.BAD_PARAM();\n }", "private TypicalPersons() {}", "private TypicalPersons() {}", "FieldType createFieldType();", "GetRecordByIdType createGetRecordByIdType();", "private Object createInstanceOfType(Class<?> propertyType)\n\t{\n\t\tObject typeInstance = null;\n\t\tif (propertyType.isArray())\n\t\t{\n\t\t\ttypeInstance = createArray(propertyType);\n\t\t}\n\t\telse if (propertyType.isPrimitive())\n\t\t{\n\t\t\ttypeInstance = primitiveTypeFactory.create(propertyType);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttypeInstance = knownTypeFactory.create(propertyType);\n\t\t}\n\t\treturn typeInstance;\n\t}", "interface Factory {\n KeyExtractor create(Class<?> entity);\n }", "@Override\n\tpublic Person getPerson(int id) {\n\t\treturn new Person(\"Philippe\", \"Peeters\");\n\t}", "ObjectFactory<?> getObjectFactory(Injectable attribute);", "For createFor();" ]
[ "0.7403845", "0.73965263", "0.7350962", "0.6720083", "0.6442986", "0.63762176", "0.63507783", "0.6345282", "0.6175233", "0.6138828", "0.61074865", "0.6101863", "0.6092473", "0.60663116", "0.6013203", "0.6011982", "0.6003285", "0.59912455", "0.59858537", "0.59370923", "0.59114915", "0.59029466", "0.5885633", "0.58753026", "0.5861683", "0.5855772", "0.58422494", "0.5838985", "0.58371735", "0.5834549", "0.58320606", "0.58315337", "0.5814292", "0.58053035", "0.57997584", "0.57979536", "0.57821923", "0.57793736", "0.5776353", "0.57751244", "0.57703894", "0.5757977", "0.57435876", "0.57374895", "0.5734577", "0.57310057", "0.5730113", "0.57243264", "0.5721978", "0.5713518", "0.571084", "0.5678846", "0.5672415", "0.5672415", "0.5672415", "0.5660377", "0.56594557", "0.5658742", "0.5653333", "0.5651213", "0.564361", "0.5613286", "0.5610331", "0.5599358", "0.5596947", "0.55927753", "0.55926996", "0.5590235", "0.5589132", "0.5584722", "0.5579497", "0.5578186", "0.5553246", "0.5550743", "0.55486417", "0.55466133", "0.55438197", "0.554147", "0.5540783", "0.5539632", "0.55326253", "0.5531398", "0.5529644", "0.5528569", "0.5527548", "0.5526432", "0.55246425", "0.5519996", "0.5513322", "0.551323", "0.5508421", "0.5499783", "0.5499783", "0.5483991", "0.5478022", "0.54728043", "0.5457603", "0.5442565", "0.5439521", "0.54339874" ]
0.86306125
0
create local map and return registory objects as per type
public static <T> Registry<T> createRegistory(Consumer<Builder<T>> consumer, Function<String, Factory<T>> errorHandler) { Map<String, Factory<T>> registryMap = new HashMap<>(); Builder<T> builder = (type, factory) -> registryMap.put(type, factory); consumer.accept(builder); return personType -> registryMap.computeIfAbsent(personType, errorHandler); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void createTypeMap() {\n\n }", "private void buildMap(int count, char type, String typeName) {\r\n\t\tfor (int i = 1; i <= count; i++) {\r\n\t\t\toriginalMaps.add(new MapType(\"map_\" + type + i, typeName, \"colony/map_\" + type + i));\r\n\t\t}\r\n\t}", "MAP createMAP();", "public abstract void createMap();", "private static HashMap<String, String> initMapping()\n {\n HashMap<String, String> typeMapping = new HashMap<String, String>();\n\n typeMapping.put(\"boolean\", \"boolean\");\n typeMapping.put(\"float\", \"float\");\n typeMapping.put(\"double\", \"double\");\n typeMapping.put(\"byte\", \"byte\");\n typeMapping.put(\"unsignedByte\", \"short\");\n typeMapping.put(\"short\", \"short\");\n typeMapping.put(\"unsignedShort\", \"int\");\n typeMapping.put(\"int\", \"int\");\n typeMapping.put(\"integer\", \"java.math.BigDecimal\");\n typeMapping.put(\"positiveInteger\", \"java.math.BigInteger\");\n typeMapping.put(\"unsignedInt\", \"java.math.BigInteger\");\n typeMapping.put(\"long\", \"java.math.BigInteger\");\n typeMapping.put(\"unsignedLong\", \"java.math.BigDecimal\");\n typeMapping.put(\"decimal\", \"java.math.BigDecimal\");\n typeMapping.put(\"string\", \"String\");\n typeMapping.put(\"hexBinary\", \"byte[]\");\n typeMapping.put(\"base64Binary\", \"byte[]\");\n typeMapping.put(\"dateTime\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"time\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"date\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gDay\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gMonth\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gMonthDay\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gYear\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gYearMonth\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"duration\", \"javax.xml.datatype.Duration\");\n typeMapping.put(\"NOTATION\", \"javax.xml.namespace.QName\");\n typeMapping.put(\"QName\", \"javax.xml.namespace.QName\");\n typeMapping.put(\"anyURI\", \"String\");\n typeMapping.put(\"Name\", \"String\");\n typeMapping.put(\"NCName\", \"String\");\n typeMapping.put(\"negativeInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"NMTOKEN\", \"String\");\n typeMapping.put(\"nonNegativeInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"nonPositiveInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"normalizedString\", \"String\");\n typeMapping.put(\"token\", \"String\");\n typeMapping.put(\"any\", \"Object\");\n\n return typeMapping;\n }", "public Map<ResourceType<L>, Offline<org.hawkular.inventory.api.model.ResourceType.Blueprint>> build(\n List<ResourceType<L>> resourceTypes) {\n\n Map<ResourceType<L>, Offline<org.hawkular.inventory.api.model.ResourceType.Blueprint>> retVal;\n retVal = new HashMap<>(resourceTypes.size());\n\n synchronized (addedIds) {\n prepareAddedIds();\n\n // we don't sync parent-child relations for types; all types are stored at root level in inventory\n for (ResourceType<L> rt : resourceTypes) {\n InventoryStructure.Builder<org.hawkular.inventory.api.model.ResourceType.Blueprint> invBldr;\n org.hawkular.inventory.api.model.ResourceType.Blueprint rtBP = buildResourceTypeBlueprint(rt);\n invBldr = InventoryStructure.Offline.of(rtBP);\n resourceType(rt, invBldr);\n retVal.put(rt, invBldr.build());\n }\n }\n\n return retVal;\n }", "InfiniteMap<K,V> build(MapTypes type);", "public synchronized static void internal_updateKnownTypes() {\r\n Set<ChangeLogType> changeLogTypes = GrouperDAOFactory.getFactory().getChangeLogType().findAll();\r\n GrouperCache<MultiKey, ChangeLogType> newTypes = new GrouperCache<MultiKey, ChangeLogType>(\r\n ChangeLogTypeFinder.class.getName() + \".typeCache\", 10000, false, 60*10, 60*10, false);\r\n \r\n Map<String, ChangeLogType> newTypesById = new HashMap<String, ChangeLogType>();\r\n \r\n for (ChangeLogType changeLogType : GrouperUtil.nonNull(changeLogTypes)) {\r\n newTypes.put(new MultiKey(changeLogType.getChangeLogCategory(), changeLogType.getActionName()), changeLogType);\r\n newTypesById.put(changeLogType.getId(), changeLogType);\r\n }\r\n \r\n //add builtins if necessary\r\n internal_updateBuiltinTypesOnce(newTypes, newTypesById);\r\n \r\n types = newTypes;\r\n typesById = newTypesById;\r\n }", "protected Map createMapMatchingType(MappingContext mappingContext) {\n Class<?> mapType = mappingContext.getTypeInformation().getSafeToWriteClass();\n if (mapType.isAssignableFrom(LinkedHashMap.class)) {\n return new LinkedHashMap();\n } else if (mapType.isAssignableFrom(TreeMap.class)) {\n return new TreeMap();\n } else {\n throw new ConfigMeMapperException(mappingContext, \"Unsupported map type '\" + mapType + \"'\");\n }\n }", "public abstract mapnik.Map createMap(Object recycleTag);", "public void makeMap(){\r\n\t\tint m =1;\r\n\t\t//EnvironObj temp = new EnvironObj(null, 0, 0);\r\n\t\tfor(int i=0; i<map.size(); i++){\r\n\t\t\tfor(int j =0; j<map.get(i).size(); j++){\r\n\t\t\t\tString o = map.get(i).get(j);\r\n\t\t\t\t//System.out.println(\"grabbing o from map, o = \" + o);\r\n\t\t\t\tif(o.equals(\"t\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"treee.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\t//System.out.println(\"objectList: \" + objectList);\r\n\t\t\t\t}else if(o.equals(\"p\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"path.png\", j+m, i*20, true);\r\n\t\t\t\t\t//dont need to add to obj list bc its always in back\r\n\t\t\t\t\twalkables.add(temp);\r\n\r\n\t\t\t\t}else if(o.equals(\"h\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"house.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t}else if(o.equals(\"g\")){\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t}\r\n\t\t\t\telse if(!o.equals(\"g\")){\r\n\t\t\t\t\tString fn = o +\".txt\";\r\n\t\t\t\t\tSystem.out.println(\"filename for NPC: \" + fn);\r\n\t\t\t\t\tnp = new NPC(o, fn, j+m, i*20);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\tcharacters.add(np);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tm=0;\r\n\t\t}\r\n\t}", "Hashtable createTypeMapping()\n {\n Hashtable mapping = new Hashtable();\n \n mapping.put(TypeFactory.getType(\"Double\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n StratmasDecimal sObj = (StratmasDecimal) o;\n if (isBadDecimal(sObj)) {\n return null;\n } else {\n return new StratmasDecimalParameter((StratmasDecimal) o);\n }\n }\n });\n mapping.put(TypeFactory.getType(\"double\", \"http://www.w3.org/2001/XMLSchema\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n StratmasDecimal sObj = (StratmasDecimal) o;\n if (isBadDecimal(sObj)) {\n return null;\n } else {\n return new StratmasDecimalParameter((StratmasDecimal) o);\n }\n }\n });\n mapping.put(TypeFactory.getType(\"NonNegativeInteger\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n return new StratmasIntegerParameter((StratmasInteger) o);\n }\n });\n // Ground type type hiearchy.\n mapping.put(TypeFactory.getType(\"anyType\", \"http://www.w3.org/2001/XMLSchema\"), \n new ParameterFactory() \n {\n public Parameter getParameter(Object o) \n {\n return null;\n }\n });\n\n return mapping;\n }", "private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}", "public Map<T, V> populateMap() {\n Map<T, V> map = new HashMap<>();\n for (int i = 0; i < entryNumber; i++) {\n cacheKeys[i] = (T) Integer.toString(random.nextInt(1000000000));\n String key = cacheKeys[i].toString();\n map.put((T) key, (V) Integer.toString(random.nextInt(1000000000)));\n }\n return map;\n }", "private <T extends Reference> void buildMap(Map<String, T> map, List<T> objects) {\n for (T candidateObject : objects) {\n String rid = candidateObject.getId();\n log.debug(\"...... caching RID: {}\", rid);\n map.put(rid, candidateObject);\n }\n }", "public Map<MeasurementType<L>, Offline<org.hawkular.inventory.api.model.MetricType.Blueprint>> buildMetrics(\n List<ResourceType<L>> resourceTypes) {\n\n Set<MeasurementType<L>> measTypes = new HashSet<>();\n for (ResourceType<L> resourceType : resourceTypes) {\n if (resourceType.isPersisted() == false) {\n measTypes.addAll(resourceType.getMetricTypes().stream().filter(t -> t.isPersisted() == false)\n .collect(Collectors.toList()));\n measTypes.addAll(resourceType.getAvailTypes().stream().filter(t -> t.isPersisted() == false)\n .collect(Collectors.toList()));\n }\n }\n\n Map<MeasurementType<L>, Offline<org.hawkular.inventory.api.model.MetricType.Blueprint>> retVal;\n retVal = new HashMap<>(measTypes.size());\n\n synchronized (addedIds) {\n prepareAddedIds();\n\n // we don't sync parent-child relations for types; all types are stored at root level in inventory\n for (MeasurementType<L> mt : measTypes) {\n if (!addedIds.get(IdType.METRIC_TYPE).add(mt.getID().getIDString())) {\n continue; // we already did this metric type\n }\n InventoryStructure.Builder<org.hawkular.inventory.api.model.MetricType.Blueprint> invBldr;\n org.hawkular.inventory.api.model.MetricType.Blueprint mtBP = buildMetricTypeBlueprint(mt);\n invBldr = InventoryStructure.Offline.of(mtBP);\n retVal.put(mt, invBldr.build());\n }\n }\n\n return retVal;\n }", "private void createMapOfFirstType() {\n\n this.typeOfMap=1;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true, 0, 0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false, 0, 1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.RED, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n\n }", "private void createLookup() {\r\n\t\tcreateLooupMap(lookupMap, objectdef, objectdef.getName());\r\n\t\tcreateChildIndex(childIndex, objectdef, objectdef.getName());\r\n\r\n\t}", "public Hashtable<String,Stock> createMap(){\n\tHashtable table = new Hashtable<String, Stock>();\n\treturn table;\n}", "private static HashMap<String, GLSLMatrixType> createMatrixTypes() {\n HashMap<String, GLSLMatrixType> matrixTypes = new HashMap<String, GLSLMatrixType>();\n for (int x = 2; x <= 4; x++) {\n for (int y = 2; y <= 4; y++) {\n GLSLMatrixType matrixType = new GLSLMatrixType(x, y);\n matrixTypes.put(matrixType.getTypename(), matrixType);\n if (y == x) {\n matrixTypes.put(\"mat\" + x, matrixType);\n }\n }\n }\n\n return matrixTypes;\n }", "public HashMap<String,HashSet<String>> loadTypes(String typeFromO1, String typeFromO2) throws Exception;", "public interface MapObjectType {\n}", "private void copyMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (map[i][j] instanceof Player) {\n\t\t\t\t\tnewMap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof BlankSpace) {\n\t\t\t\t\tnewMap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof Mho) {\n\t\t\t\t\tnewMap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (map[i][j] instanceof Fence) {\n\t\t\t\t\tnewMap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "private OpenTypeFactory() {\n\t\tcompositeTypes = new ConcurrentHashMap<String, CompositeType>();\n\t\tsimpleTypes = new ConcurrentHashMap<String, SimpleType<?>>();\n\t\tarrayTypes = new ConcurrentHashMap<String, ArrayType<?>>();\n\t\ttabularTypes = new ConcurrentHashMap<String, TabularType>();\n\t\topenTypes = new ConcurrentHashMap<String, OpenType<?>>();\n\t\tmasterIndex = new ConcurrentHashMap<String, Map<String, ? extends OpenType<?>>>();\n\t\tmxBeanMappingFactory = MXBeanMappingFactory.DEFAULT;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tfor(Field f: SimpleType.class.getDeclaredFields()) {\n\t\t\t\tif(!Modifier.isStatic(f.getModifiers())) continue;\n\t\t\t\tif(!f.getType().equals(SimpleType.class)) continue;\n\t\t\t\tSimpleType<?> ot = (SimpleType<?>)f.get(null);\n\t\t\t\tsimpleTypes.put(ot.getClassName(), ot);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tthrow new RuntimeException(\"Failed to initialize OpenTypeFactory OpenType Cache\", ex);\n\t\t}\n\t}", "<T> Map<String, T> resolveAll(Class<T> type);", "static Map instanceOfMap(int typeMap)\n {\n if(instanceOfMap==null)\n instanceOfMap = new Map(typeMap);\n return instanceOfMap;\n }", "public HashMap getType(){\n HashMap returnMe=hackerFile.getContent();\n //returnMe.put(\"name\",name);\n return(returnMe);\n }", "private void createMapOfSecondType(){\n\n this.typeOfMap=2;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = createSquare( ColorOfFigure_Square.GREEN, true,0,3);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.YELLOW, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.YELLOW, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, false,2,3);\n\n\n }", "public final native MapTypeRegistry getMapTypeRegistry() /*-{\n return this.mapTypes;\n }-*/;", "protected Map<String, Object> assertMap() {\n if (type == Type.LIST) {\n throw new FlexDataWrongTypeRuntimeException(type, Type.OBJECT); \n }\n if (entryCollectionMap == null) {\n entryCollectionMap = new LinkedHashMap<String, Object>();\n type = Type.OBJECT;\n }\n return entryCollectionMap;\n }", "public static Tile[][] setUpMap() {\n\n Tile[][] tiles = new Tile[5][9];\n String[][] defaultMapLayout = GameMap.getMapLayout();\n\n for (int i = 0; i < 5; i++) {\n\n for (int j = 0; j < 9; j++) {\n\n String tileType = defaultMapLayout[i][j];\n\n if (tileType.equals(\"P\")) {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"R\")) {\n Tile newTileName = new River();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M1\")) {\n Tile newTileName = new Mountain1();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M2\")) {\n Tile newTileName = new Mountain2();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"M3\")) {\n Tile newTileName = new Mountain3();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"SM\")) {\n Tile newTileName = new SwampMonster();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"O\")) {\n Tile newTileName = new Ocean();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"G\")) {\n Tile newTileName = new Grass();\n tiles[i][j] = newTileName;\n\n } else if (tileType.equals(\"V\")) {\n Tile newTileName = new Volcano();\n tiles[i][j] = newTileName;\n\n }else {\n Tile newTileName = new Plain();\n tiles[i][j] = newTileName;\n newTileName.setOwner(null);\n }\n\n }\n }\n return tiles;\n }", "protected void createMaps() {\n\t\tBlueSchellingCell bCell = new BlueSchellingCell();\n\t\tOrangeSchellingCell oCell = new OrangeSchellingCell();\n\t\tEmptyCell eCell = new EmptyCell();\n\t\tTreeCell tCell = new TreeCell();\n\t\tBurningTreeCell bTCell = new BurningTreeCell();\n\t\tEmptyLandCell eLCell = new EmptyLandCell();\n\n\t\tLiveCell lCell = new LiveCell();\n\t\tDeadCell dCell = new DeadCell();\n\t\tGreenRPSCell gcell = new GreenRPSCell();\n\t\tRedRPSCell rcell = new RedRPSCell();\n\t\tBlueRPSCell blcell = new BlueRPSCell();\n\t\tWhiteRPSCell wcell = new WhiteRPSCell();\n\n\t\tFishCell fCell = new FishCell();\n\t\tSharkCell sCell = new SharkCell();\n\n\t\tAntGroupCell aCell = new AntGroupCell();\n\n\t\tsegregation.put('b', bCell);\n\t\tsegregation.put('o', oCell);\n\t\tsegregation.put('e', eCell);\n\n\t\tgameOfLife.put('l', lCell);\n\t\tgameOfLife.put('d', dCell);\n\n\t\trps.put('g', gcell);\n\t\trps.put('r', rcell);\n\t\trps.put('b', blcell);\n\t\trps.put('w', wcell);\n\n\t\tspreadingWildfire.put('t', tCell);\n\t\tspreadingWildfire.put('b', bTCell);\n\t\tspreadingWildfire.put('e', eLCell);\n\n\t\twaTor.put('f', fCell);\n\t\twaTor.put('s', sCell);\n\t\twaTor.put('e', eCell);\n\n\t\tforagingAnts.put('a', aCell);\n\t\tforagingAnts.put('e', eCell);\n\t\tinitExportMap();\n\n\t\tinitCountMap();\n\t}", "public static Map<String, Byte> genNameToTypeMap(){\n byte[] types = genAllTypes();\n String[] names = genAllTypeNames();\n Map<String, Byte> ret = new HashMap<String, Byte>();\n for(int i=0;i<types.length;i++){\n ret.put(names[i], types[i]);\n }\n return ret;\n }", "private Map(int typeMap ) throws IllegalArgumentException\n {\n switch (typeMap){\n case 1:\n createMapOfFirstType();\n setAdjForFirstType();\n break;\n case 2:\n createMapOfSecondType();\n setAdjForSecondType();\n break;\n case 3:\n createMapOfThirdType();\n setAdjForThirdType();\n break;\n case 4:\n createMapOfFourthType();\n setAdjForFourthType();\n break;\n default:\n throw new IllegalArgumentException();\n }\n }", "public static MapObject createMapObject(){\n\t\treturn new MapObject();\n\t}", "ProcessOperation<Map<String, Object>> map();", "private Map<String, PermissionType> getPermissionTypeMapForLabelToMaskChange() {\n\t\tMap<String, PermissionType> permissionTypeMap = new LinkedHashMap<String, PermissionType>();\n\n\t\tList<PermissionType> permissionTypes = permissionTypeRepo.findAll();\n\t\tfor (int i = 0; i < permissionTypes.size(); i++) {\n\t\t\tpermissionTypeMap.put(permissionTypes.get(i).getName(), permissionTypes.get(i));\n\t\t}\n\t\treturn permissionTypeMap;\n\t}", "private static <T> Map<Character,Node<T>> newNodeMap()\n\t\t{\n\t\t\treturn new HashMap<Character,Node<T>>();\n\t\t}", "@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }", "@Override\n public void create() {\n theMap = new ObjectSet<>(2048, 0.5f);\n generate();\n }", "Map<Integer, String> getMetaLocal();", "private void updateMap() {\n\t\tfor (int i = 0; i < 12; i++) {\n\t\t\tfor (int j = 0; j < 12; j++) {\n\t\t\t\tif (newMap[i][j] instanceof Player) {\n\t\t\t\t\tmap[i][j] = new Player(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof BlankSpace) {\n\t\t\t\t\tmap[i][j] = new BlankSpace(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Mho) {\n\t\t\t\t\tmap[i][j] = new Mho(i, j, board);\n\t\t\t\t} else if (newMap[i][j] instanceof Fence) {\n\t\t\t\t\tmap[i][j] = new Fence(i, j, board);\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "private Map<Integer, MessageEncoder> initialiseMap() {\n Map<Integer, MessageEncoder> composerMap = new HashMap<>();\n composerMap.put(AC35MessageType.BOAT_ACTION.getCode(), new BoatActionEncoder());\n composerMap.put(AC35MessageType.REQUEST.getCode(), new RequestEncoder());\n composerMap.put(AC35MessageType.COLOUR.getCode(), new ColourEncoder());\n\n return Collections.unmodifiableMap(composerMap);\n }", "private ProxyMap getFactoryProxyMap(Class type) {\n // we don't lock here; ok if two proxies get generated for same type\n ProxyMap proxy = (ProxyMap) _proxies.get(type);\n if (proxy == null) {\n ClassLoader l = GeneratedClasses.getMostDerivedLoader(type,\n ProxyMap.class);\n Class pcls = loadBuildTimeProxy(type, l);\n if (pcls == null)\n pcls = generateAndLoadProxyMap(type, true, l);\n proxy = (ProxyMap) instantiateProxy(pcls, null, null);\n _proxies.put(type, proxy);\n }\n return proxy;\n }", "public Map instantiateBackingMap(String sName);", "MapType map(List<ReferenceOrderedDatum> rodData, char ref, LocusContext context);", "protected Map<E, ListenerEntry<? extends E>> createMap() {\n\t\treturn new WeakHashMap<>();\n\t}", "private static void initializeMap() {\n addressTypeToSerializerMap = new HashMap<>();\n addressTypeToSerializerMap.put(NoAddressAfi.VALUE, NoAddressSerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4Afi.VALUE, Ipv4Serializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4BinaryAfi.VALUE, Ipv4BinarySerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4PrefixAfi.VALUE, Ipv4PrefixSerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv4PrefixBinaryAfi.VALUE, Ipv4PrefixBinarySerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6Afi.VALUE, Ipv6Serializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6BinaryAfi.VALUE, Ipv6BinarySerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6PrefixAfi.VALUE, Ipv6PrefixSerializer.getInstance());\n addressTypeToSerializerMap.put(Ipv6PrefixBinaryAfi.VALUE, Ipv6PrefixBinarySerializer.getInstance());\n addressTypeToSerializerMap.put(MacAfi.VALUE, MacSerializer.getInstance());\n addressTypeToSerializerMap.put(DistinguishedNameAfi.VALUE, DistinguishedNameSerializer.getInstance());\n addressTypeToSerializerMap.put(Lcaf.VALUE, LcafSerializer.getInstance());\n addressTypeToSerializerMap.put(AfiListLcaf.VALUE, AfiListSerializer.getInstance());\n addressTypeToSerializerMap.put(InstanceIdLcaf.VALUE, InstanceIdSerializer.getInstance());\n addressTypeToSerializerMap.put(ApplicationDataLcaf.VALUE, ApplicationDataSerializer.getInstance());\n addressTypeToSerializerMap.put(ExplicitLocatorPathLcaf.VALUE, ExplicitLocatorPathSerializer.getInstance());\n addressTypeToSerializerMap.put(SourceDestKeyLcaf.VALUE, SourceDestKeySerializer.getInstance());\n addressTypeToSerializerMap.put(KeyValueAddressLcaf.VALUE, KeyValueAddressSerializer.getInstance());\n addressTypeToSerializerMap.put(ServicePathLcaf.VALUE, ServicePathSerializer.getInstance());\n }", "synchronized public Map<String, Set<String>> getTypes() {\n return Collections.unmodifiableMap(\n new HashSet<>(types.entrySet()).stream()\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n e -> Collections.unmodifiableSet(new HashSet<>(e.getValue()))\n ))\n );\n }", "private Map<String, SortedSet<?>> getRegistry(WebRequest request, IPerson user,\n String type) {\n List<IPortletDefinition> allChannels = portletDefinitionRegistry\n .getAllPortletDefinitions();\n\n // construct a new channel registry\n Map<String, SortedSet<?>> registry = new TreeMap<String, SortedSet<?>>();\n SortedSet<ChannelCategoryBean> categories = new TreeSet<ChannelCategoryBean>();\n SortedSet<ChannelBean> channels = new TreeSet<ChannelBean>();\n\n // get user locale\n Locale[] locales = localeStore.getUserLocales(user);\n LocaleManager localeManager = new LocaleManager(user, locales);\n Locale locale = localeManager.getLocales()[0];\n\n // add the root category and all its children to the registry\n PortletCategory rootCategory = portletCategoryRegistry\n .getTopLevelPortletCategory();\n categories.add(addChildren(request, rootCategory, allChannels, user, type,\n locale));\n\n /*\n * uPortal historically has provided for a convention that channels not in\n * any category may potentially be viewed by users but may not be subscribed\n * to. We'd like administrators to still be able to modify these channels\n * through the portlet administration tool. The logic below takes any\n * channels that have not already been identified as belonging to a category\n * and adds them to the top-level of the registry, assuming the current user\n * has manage permissions.\n */\n\n EntityIdentifier ei = user.getEntityIdentifier();\n IAuthorizationPrincipal ap = AuthorizationService.instance().newPrincipal(\n ei.getKey(), ei.getType());\n\n if (type.equals(TYPE_MANAGE)) {\n for (IPortletDefinition channel : allChannels) {\n if (ap.canManage(channel.getPortletDefinitionId().getStringId())) {\n channels.add(getChannel(channel, request, locale));\n }\n }\n }\n\n registry.put(\"channels\", channels);\n registry.put(\"categories\", categories);\n\n return registry;\n }", "public RegistryCreator() {\n this.vehicleRegistry = new VehicleRegistry();\n this.inspectionResultRegistry = new InspectionResultRegistry();\n }", "public void buildMap(){\n map =mapFactory.createMap(level);\n RefLinks.SetMap(map);\n }", "private void createMaps() {\r\n\t\tint SIZE = 100;\r\n\t\tint x = 0, y = -1;\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tif (i % 10 == 0) {\r\n\t\t\t\tx = 0;\r\n\t\t\t\ty = y + 1;\r\n\t\t\t}\r\n\t\t\tshipStateMap.put(new Point(x, y), 0);\r\n\t\t\tshipTypeMap.put(new Point(x, y), 0);\r\n\t\t\tx++;\r\n\t\t}\r\n\t}", "private static <N extends Node> SortedMap<ImmutableContextSet, SortedSet<N>> createMap() {\n return new ConcurrentSkipListMap<>(ContextSetComparator.reverse());\n }", "public static Map<Byte, String> genTypeToNameMap(){\n byte[] types = genAllTypes();\n String[] names = genAllTypeNames();\n Map<Byte,String> ret = new HashMap<Byte, String>();\n for(int i=0;i<types.length;i++){\n ret.put(types[i], names[i]);\n }\n return ret;\n }", "protected void createLookupCache() {\n }", "Map<ParameterInstance, SetType> getInstanceSetTypes();", "private static Map<String, PropertyInfo> createPropertyMap()\r\n {\r\n Map<String, PropertyInfo> map = New.map();\r\n PropertyInfo samplingTime = new PropertyInfo(\"http://www.opengis.net/def/property/OGC/0/SamplingTime\", Date.class,\r\n TimeKey.DEFAULT);\r\n PropertyInfo lat = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Latitude\", Float.class, LatitudeKey.DEFAULT);\r\n PropertyInfo lon = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Longitude\", Float.class, LongitudeKey.DEFAULT);\r\n PropertyInfo alt = new PropertyInfo(\"http://sensorml.com/ont/swe/property/Altitude\", Float.class, AltitudeKey.DEFAULT);\r\n map.put(samplingTime.getProperty(), samplingTime);\r\n map.put(lat.getProperty(), lat);\r\n map.put(lon.getProperty(), lon);\r\n map.put(alt.getProperty(), alt);\r\n map.put(\"lat\", lat);\r\n map.put(\"lon\", lon);\r\n map.put(\"alt\", alt);\r\n return Collections.unmodifiableMap(map);\r\n }", "private Type mapType(TypeResponse typeResponse) {\n return new Type(typeResponse.getType(), typeResponse.getId());\n }", "private static Map<String, Object> parseRelToType(RelToType r) {\n\t\tMap<String, Object> result = new HashMap<>();\n\t\tString clazz = r.getClazz();\n\t\t// System.out.println(\"\\t\\t\\tclazz: \" + clazz);\n\t\tresult.put(\"clazz\", clazz);\n\t\tString scheme = r.getScheme();\n\t\t// System.out.println(\"\\t\\t\\tscheme: \" + scheme);\n\t\tresult.put(\"scheme\", scheme);\n\t\tString type = r.getType();\n\t\t// System.out.println(\"\\t\\t\\ttype: \" + type);\n\t\tresult.put(\"type\", type);\n\t\tString v = r.getValue();\n\t\t// System.out.println(\"\\t\\t\\tv: \" + v);\n\t\tresult.put(\"value\", v);\n\t\treturn result;\n\n\t}", "private void createMapOfThirdType(){\n\n this.typeOfMap=3;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.RED, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, true,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = createSquare( ColorOfFigure_Square.GREEN, true,0,3);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.PURPLE, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.YELLOW, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = createSquare( ColorOfFigure_Square.GREY, true,2,0);\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.YELLOW, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, false,2,3);\n\n }", "public Map initMap(){\n\t\tif (map == null){\n\t\t\tmap = createMap();\n\t\t}\n\t\treturn map;\n\t}", "private Map<String, Object> createDefaultMap() {\n Map<String, Object> result = new LinkedHashMap<>();\n result.put(\"stream_speed0\", 1);\n result.put(\"stream_start0\", 0);\n result.put(\"stream_end0\", 7);\n result.put(\"stream_speed1\", -2);\n result.put(\"stream_start1\", 15);\n result.put(\"stream_end1\", 19);\n\n result.put(\"fish_quantity\", numFishes);\n result.put(\"fish_reproduction\", 3);\n result.put(\"fish_live\", 10);\n result.put(\"fish_speed\", 2);\n result.put(\"fish_radius\", 4);\n\n result.put(\"shark_quantity\", numSharks);\n result.put(\"shark_live\", 20);\n result.put(\"shark_hungry\", 7);\n result.put(\"shark_speed\", 2);\n result.put(\"shark_radius\", 5);\n\n return result;\n }", "private TypeMapper getTypeMapper() {\n\t\tif (JjsUtils.closureStyleLiteralsNeeded(this.options)) {\n\t\t\treturn new ClosureUniqueIdTypeMapper(jprogram);\n\t\t}\n\t\tif (this.options.useDetailedTypeIds()) {\n\t\t\treturn new StringTypeMapper(jprogram);\n\t\t}\n\t\treturn this.options.isIncrementalCompileEnabled()\n\t\t\t\t? compilerContext.getMinimalRebuildCache().getTypeMapper()\n\t\t\t\t: new IntTypeMapper();\n\t}", "private Map<String, Mutator> createMutatorMap() {\n Map<String, Mutator> mutators = new HashMap<String, Mutator>();\n\n Method[] methods = type.getMethods();\n for (int i = 0; i < methods.length; i++) {\n Method method = methods[i];\n\n // implement some rules to decide if this method is a mutator or not\n\n // not interested in methods declared by Object\n if (method.getDeclaringClass() == Object.class) continue;\n\n // method name should start with 'get'\n String fieldName = mutatorMethodNameToFieldName(method.getName());\n if (fieldName == null) continue;\n\n // method should have a single parameter\n Class<?>[] parameterTypes = method.getParameterTypes();\n if (parameterTypes.length != 1) continue;\n Class<?> parameterType = parameterTypes[0];\n\n // method have void return type\n Class<?> returnType = method.getReturnType();\n if (returnType != Void.TYPE) continue;\n\n // everything checks out, add mutator to list\n mutators.put(fieldName, new MethodMutatorImpl(method, fieldName, parameterType));\n }\n\n return mutators;\n }", "private void scanClassMap() {\n Set<Class<?>> classSet = reflections.getTypesAnnotatedWith(Redis.class);\n for (Class cl : classSet) {\n RedisInfo redisInfo = new RedisInfo();\n Redis redis = (Redis) cl.getAnnotation(Redis.class);\n redisInfo.setCls(cl);\n redisInfo.setTableName(redis.name());\n redisInfo.setIncrName(redis.IncrName());\n redisInfo.setDbName(redis.dbName());\n redisInfo.setImmediately(redis.immediately());\n redisInfo.setIncr(redis.incrId());\n redisInfo.setDelete(redis.delete());\n try {\n classMap.put(redis.name(), redisInfo);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "private static <T extends IForgeRegistryEntry<T>> Codec<T> create(IForgeRegistry<T> registry) {\n return ResourceLocation.CODEC.comapFlatMap(\n id -> registry.containsKey(id) ? DataResult.success(registry.getValue(id)) : DataResult.error(\"Unknown registry id: \" + id.toString()),\n IForgeRegistryEntry::getRegistryName);\n }", "private void registerCaches(){\n // Initialize region arraylist\n prisoners = new HashMap<>();\n regions = QueryManager.getRegions();\n prisonBlocks = QueryManager.getPrisonBlocks();\n portals = QueryManager.getPortals();\n }", "Map<String, Object> getServiceSpecificObjects();", "private Map<Integer, Mdr5Record> makeCityMap(MapReader mr) {\n \t\tList<City> cities = mr.getCities();\n \n \t\tMap<Integer, Mdr5Record> cityMap = new LinkedHashMap<Integer, Mdr5Record>();\n \t\tfor (City c : cities) {\n \t\t\tint key = (c.getSubdivNumber() << 8) + (c.getPointIndex() & 0xff);\n \t\t\tassert key < 0xffffff;\n \t\t\tcityMap.put(key, new Mdr5Record(c));\n \t\t}\n \n \t\treturn cityMap;\n \t}", "private Map<String, List<String>> getObjectsGroupedByType() throws SQLException {\n boolean xmlDbAvailable = dbSupport.isXmlDbAvailable();\n String query =\n // Most of objects are seen in ALL_OBJECTS\n \"SELECT OBJECT_TYPE, OBJECT_NAME FROM ALL_OBJECTS WHERE OWNER = ? \" +\n (xmlDbAvailable\n // XML tables are seen in a separate dictionary table\n ? \"UNION ALL SELECT 'TABLE', TABLE_NAME FROM ALL_XML_TABLES WHERE OWNER = ? \" +\n \"AND TABLE_NAME NOT LIKE 'BIN$________________________$_'\" //ignore recycle bin objects\n : \"\");\n\n // Count params\n int n = 1;\n if (xmlDbAvailable) n += 1;\n String[] params = new String[n];\n Arrays.fill(params, name);\n\n List<Map<String, String>> rows = jdbcTemplate.queryForList(query, params);\n Map<String, List<String>> result = new HashMap<String, List<String>>();\n for (Map<String, String> row : rows) {\n String objectType = row.get(\"OBJECT_TYPE\");\n String objectName = row.get(\"OBJECT_NAME\");\n if (result.containsKey(objectType)) {\n result.get(objectType).add(objectName);\n } else {\n List<String> newList = new ArrayList<String>();\n newList.add(objectName);\n result.put(objectType, newList);\n }\n }\n return result;\n }", "public ScopedMap() {\n\t\tmap = new ArrayList<HashMap<K, V>>();\n\n\t}", "public TypeMappingRegistry getTypeMappingRegistry() {\n\t\treturn null;\n\t}", "protected Map createPropertiesMap() {\n return new HashMap();\n }", "private IMapData<Integer, String> getHashMapData1() {\n List<IKeyValueNode<Integer, String>> creationData = new ArrayList<>();\n List<IKeyValueNode<Integer, String>> data = new ArrayList<>();\n List<Integer> keys = this.createKeys(data);\n List<String> values = this.createValues(data);\n\n return new MapData<>(\n creationData,\n data,\n keys,\n values);\n }", "Map<Class<?>, Object> yangAugmentedInfoMap();", "Map<Class<?>, Object> yangAugmentedInfoMap();", "public ClassRegistry() {\n this.classMap.putAll(CLASS_MAP);\n this.conversionMap.putAll(CONVERSION_MAP);\n conversionMap.put(\"key->new\",defaultSupplier);\n conversionMap.put(\"new\",typeName->defaultSupplier.apply(typeName));\n }", "public void initMap()\r\n/* */ {\r\n///* 36 */ putHandler(\"vwkgcode\", PDWkHeadTailVWkgcodeHandler.class);\r\n///* 37 */ putHandler(\"fcapacitycalc\", PDWkHeadTailFcapacitycalcHandler.class);\r\n///* 38 */ putHandler(\"bprodline\", PDWkHeadTailBprodlineHandler.class);\r\n/* */ }", "@SuppressWarnings(\"unchecked\")\n private <T> List<Binding<T>> getFromMap(TypeLiteral<T> type) {\n return (List<Binding<T>>) map.get(type);\n }", "private static <K, V> Map<K, V> newHashMap() {\n return new HashMap<K, V>();\n }", "@Test\n public void mapNew() {\n check(MAPNEW);\n query(EXISTS.args(MAPNEW.args(\"()\")), true);\n query(MAPSIZE.args(MAPNEW.args(\"()\")), 0);\n query(COUNT.args(MAPNEW.args(\"()\")), 1);\n query(MAPSIZE.args(MAPNEW.args(MAPNEW.args(\"()\"))), 0);\n }", "@Override\n protected GSONWorkUnit createGSONWorkUnit(\n final DocWorkUnit workUnit,\n final List<Map<String, String>> groupMaps,\n final List<Map<String, String>> featureMaps)\n {\n GATKGSONWorkUnit gatkGSONWorkUnit = new GATKGSONWorkUnit();\n gatkGSONWorkUnit.setWalkerType((String)workUnit.getRootMap().get(WALKER_TYPE_MAP_ENTRY));\n return gatkGSONWorkUnit;\n }", "public abstract <X extends OSHDBMapReducible> MapReducer<X> createMapReducer(Class<X> forClass);", "@Override\n public Type visit(MapType mapType) {\n Type keyType = mapType.getKeyType().accept(this);\n Type valueType = mapType.getValueType().accept(this);\n if (mapType.getValueType().isNullable()) {\n return Types.MapType.ofOptional(getNextId(), getNextId(), keyType, valueType);\n } else {\n return Types.MapType.ofRequired(getNextId(), getNextId(), keyType, valueType);\n }\n }", "private void createUsedSubTreeRefMap() {\n\n\t\tXmlProcessor simpleXmlProcessor = measureExport.getSimpleXMLProcessor();\n\t\tString typeXpathString = \"\";\n\t\tList<String> usedSubTreeRefIdsPop = new ArrayList<>();\n\t\tList<String> usedSubTreeRefIdsMO = new ArrayList<>();\n\t\tList<String> usedSubTreeRefIDsRA = new ArrayList<>();\n\t\tfor (String typeString : POPULATION_NAME_LIST) {\n\t\t\ttypeXpathString += \"@type = '\" + typeString + \"' or\";\n\t\t}\n\t\ttypeXpathString = typeXpathString.substring(0, typeXpathString.lastIndexOf(\" or\"));\n\t\tString xpathForSubTreeInPOPClause = \"/measure/measureGrouping//clause[\" + typeXpathString + \"]//subTreeRef/@id\";\n\t\tString xpathForSubTreeInMOClause = \"/measure/measureGrouping//clause[@type='measureObservation']//subTreeRef/@id\";\n\t\tString xpathForSubTreeInRAClause = \"/measure//riskAdjustmentVariables/subTreeRef/@id\";\n\t\ttry {\n\n\t\t\t// creating used Subtree Red Map in Populations\n\t\t\tNodeList populationsSubTreeNode = simpleXmlProcessor.findNodeList(simpleXmlProcessor.getOriginalDoc(),\n\t\t\t\t\txpathForSubTreeInPOPClause);\n\t\t\tfor (int i = 0; i < populationsSubTreeNode.getLength(); i++) {\n\t\t\t\tString uuid = populationsSubTreeNode.item(i).getNodeValue();\n\t\t\t\tuuid = checkIfQDMVarInstanceIsPresent(uuid, simpleXmlProcessor);\n\t\t\t\tif (!usedSubTreeRefIdsPop.contains(uuid)) {\n\t\t\t\t\tusedSubTreeRefIdsPop.add(uuid);\n\t\t\t\t}\n\t\t\t}\n\t\t\tusedSubTreeRefIdsPop = checkUnUsedSubTreeRef(simpleXmlProcessor, usedSubTreeRefIdsPop);\n\t\t\tfor (String uuid : usedSubTreeRefIdsPop) {\n\t\t\t\tNode subTreeNode = createUsedSubTreeRefMap(simpleXmlProcessor, uuid);\n\t\t\t\tsubTreeNodeInPOPMap.put(uuid, subTreeNode);\n\t\t\t}\n\n\t\t\t// creating used Subtree Red Map in Measure Observations\n\t\t\tNodeList measureObsSubTreeNode = simpleXmlProcessor.findNodeList(simpleXmlProcessor.getOriginalDoc(),\n\t\t\t\t\txpathForSubTreeInMOClause);\n\t\t\tfor (int i = 0; i < measureObsSubTreeNode.getLength(); i++) {\n\t\t\t\tString uuid = measureObsSubTreeNode.item(i).getNodeValue();\n\t\t\t\tuuid = checkIfQDMVarInstanceIsPresent(uuid, simpleXmlProcessor);\n\t\t\t\tif (!usedSubTreeRefIdsMO.contains(uuid)) {\n\t\t\t\t\tusedSubTreeRefIdsMO.add(uuid);\n\t\t\t\t}\n\t\t\t}\n\t\t\tusedSubTreeRefIdsMO = checkUnUsedSubTreeRef(simpleXmlProcessor, usedSubTreeRefIdsMO);\n\t\t\tfor (String uuid : usedSubTreeRefIdsMO) {\n\t\t\t\tNode subTreeNode = createUsedSubTreeRefMap(simpleXmlProcessor, uuid);\n\t\t\t\tsubTreeNodeInMOMap.put(uuid, subTreeNode);\n\t\t\t}\n\t\t\t// creating used Subtree Red in Risk Adjustment\n\t\t\tNodeList riskAdjSubTreeNode = simpleXmlProcessor.findNodeList(simpleXmlProcessor.getOriginalDoc(),\n\t\t\t\t\txpathForSubTreeInRAClause);\n\t\t\tfor (int i = 0; i < riskAdjSubTreeNode.getLength(); i++) {\n\t\t\t\tString uuid = riskAdjSubTreeNode.item(i).getNodeValue();\n\t\t\t\tuuid = checkIfQDMVarInstanceIsPresent(uuid, simpleXmlProcessor);\n\t\t\t\tif (!usedSubTreeRefIDsRA.contains(uuid)) {\n\t\t\t\t\tusedSubTreeRefIDsRA.add(uuid);\n\t\t\t\t}\n\t\t\t}\n\t\t\tusedSubTreeRefIDsRA = checkUnUsedSubTreeRef(simpleXmlProcessor, usedSubTreeRefIDsRA);\n\t\t\tfor (String uuid : usedSubTreeRefIDsRA) {\n\t\t\t\tNode subTreeNode = createUsedSubTreeRefMap(simpleXmlProcessor, uuid);\n\t\t\t\tsubTreeNodeInRAMap.put(uuid, subTreeNode);\n\t\t\t}\n\n\t\t} catch (XPathExpressionException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private IMapData<Integer, String> getHashMapData2() {\n List<IKeyValueNode<Integer, String>> creationData = ArrayLists.make(\n KeyValueNode.make(1, \"a\"),\n KeyValueNode.make(1, \"a\"),\n KeyValueNode.make(2, \"b\"),\n KeyValueNode.make(2, \"c\"),\n KeyValueNode.make(2, \"b\"),\n KeyValueNode.make(3, \"a\"),\n KeyValueNode.make(3, \"b\"),\n KeyValueNode.make(3, \"c\"));\n\n List<IKeyValueNode<Integer, String>> data = ArrayLists.make(\n KeyValueNode.make(1, \"a\"),\n KeyValueNode.make(2, \"b\"),\n KeyValueNode.make(3, \"c\"));\n\n List<Integer> keys = this.createKeys(data);\n List<String> values = this.createValues(data);\n\n return new MapData<>(\n creationData,\n data,\n keys,\n values);\n }", "public Map<ModelPortfolio, AllocationModel> prepareAllocationModelMap() {\n\n // Iterate through this instead of\n //Needs to be Spring Configured!\n List<FundModel> agrgrwthFundModelList = new ArrayList<>();\n List<FundModel> grwthFundModelList = new ArrayList<>();\n List<FundModel> incomeFundModelList = new ArrayList<>();\n List<FundModel> retirementFundModelList = new ArrayList<>();\n\n HashMap<ModelPortfolio, AllocationModel> allocMap = new HashMap<>();\n\n // AggressiveGrowth\n agrgrwthFundModelList.add(new FundModel(FundType.EQUITY.toString(), .8));\n agrgrwthFundModelList.add(new FundModel(FundType.BOND.toString(), .1));\n agrgrwthFundModelList.add(new FundModel(FundType.CASH.toString(), .1));\n\n //ModelPortfolio.AGGRESSIVEGROWTH, GROWTH, INCOME, RETIREMENT, INVALIDPORTFOLIO}\n allocMap.put(ModelPortfolio.AGGRESSIVEGROWTH, new AllocationModel(ModelPortfolio.AGGRESSIVEGROWTH.toString(), agrgrwthFundModelList));\n\n //Growth\n grwthFundModelList.add(new FundModel(FundType.EQUITY.toString(), .7));\n grwthFundModelList.add(new FundModel(FundType.BOND.toString(), .2));\n grwthFundModelList.add(new FundModel(FundType.CASH.toString(), .1));\n\n allocMap.put(ModelPortfolio.GROWTH, new AllocationModel(ModelPortfolio.GROWTH.toString(), grwthFundModelList));\n\n //Income\n incomeFundModelList.add(new FundModel(FundType.EQUITY.toString(), .50));\n incomeFundModelList.add(new FundModel(FundType.BOND.toString(), .3));\n incomeFundModelList.add(new FundModel(FundType.CASH.toString(), .2));\n\n allocMap.put(ModelPortfolio.INCOME, new AllocationModel(ModelPortfolio.INCOME.toString(), incomeFundModelList));\n\n //Income\n retirementFundModelList.add(new FundModel(FundType.EQUITY.toString(), .50));\n retirementFundModelList.add(new FundModel(FundType.BOND.toString(), .3));\n retirementFundModelList.add(new FundModel(FundType.CASH.toString(), .2));\n\n allocMap.put(ModelPortfolio.RETIREMENT, new AllocationModel(ModelPortfolio.RETIREMENT.toString(), retirementFundModelList));\n\n // TODO return HashMap\n return allocMap;\n }", "IntegerToObjectHashMap<ConstantIdentityKey> getTempMappingSnapshot(int neededTempEntityIndex);", "HashMap <String, Command> getMap();", "private void createMapOfFourthType() {\n\n this.typeOfMap=4;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.RED, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, true,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.PURPLE, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.PURPLE, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = createSquare( ColorOfFigure_Square.GREY, true,2,0);\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n }", "private void initMaps()\r\n\t{\r\n\t\tenergiesForCurrentKOppParity = new LinkedHashMap<Integer, Double>();\r\n\t\tinputBranchWithJ = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedR = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedP = new LinkedHashMap<Integer, Double>();\r\n\t\tassociatedQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularP = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularQ = new LinkedHashMap<Integer, Double>();\r\n\t\ttriangularR = new LinkedHashMap<Integer, Double>();\r\n\t\tupperEnergyValuesWithJ = new LinkedHashMap<Integer, Double>();\r\n\t}", "public void newScope() {\n Map<String, Type> scope = new HashMap<String, Type>();\n scopes.push(scope);\n Map<String, Type> typeScope = new HashMap<String, Type>();\n typeScopes.push(typeScope);\n }", "public Map<String, Object> createFldNames2ValsMap(Record record, ErrorHandler errors)\n {\n this.errors = errors;\n perRecordInitMaster(record);\n Map<String, Object> fldNames2ValsMap = new HashMap<String, Object>();\n\n for (String key : fieldMap.keySet())\n {\n String fieldVal[] = fieldMap.get(key);\n String indexField = fieldVal[0];\n String indexType = fieldVal[1];\n String indexParm = fieldVal[2];\n String mapName = fieldVal[3];\n\n if (indexType.equals(\"constant\"))\n {\n if (indexParm.contains(\"|\"))\n {\n String parts[] = indexParm.split(\"[|]\");\n Set<String> result = new LinkedHashSet<String>();\n result.addAll(Arrays.asList(parts));\n // if a zero length string appears, remove it\n result.remove(\"\");\n addFieldsToMap(fldNames2ValsMap, indexField, null, result);\n }\n else\n addFieldToMap(fldNames2ValsMap, indexField, indexParm);\n }\n else if (indexType.equals(\"first\"))\n addFieldToMap(fldNames2ValsMap, indexField, getFirstFieldVal(record, mapName, indexParm));\n else if (indexType.equals(\"all\"))\n addFieldsToMap(fldNames2ValsMap, indexField, mapName, MarcUtils.getFieldList(record, indexParm));\n else if (indexType.equals(\"DeleteRecordIfFieldEmpty\"))\n {\n Set<String> fields = MarcUtils.getFieldList(record, indexParm);\n if (mapName != null && findTranslationMap(mapName) != null)\n fields = Utils.remap(fields, findTranslationMap(mapName), true);\n\n if (fields.size() != 0)\n addFieldsToMap(fldNames2ValsMap, indexField, null, fields);\n else // no entries produced for field => generate no record in Solr\n throw new SolrMarcIndexerException(SolrMarcIndexerException.DELETE,\n \"Index specification: \"+ indexField +\" says this record should be deleted.\");\n }\n else if (indexType.startsWith(\"join\"))\n {\n String joinChar = \" \";\n if (indexType.contains(\"(\") && indexType.endsWith(\")\"))\n joinChar = indexType.replace(\"join(\", \"\").replace(\")\", \"\");\n addFieldToMap(fldNames2ValsMap, indexField, MarcUtils.getFieldVals(record, indexParm, joinChar));\n }\n else if (indexType.equals(\"std\"))\n {\n if (indexParm.equals(\"era\"))\n addFieldsToMap(fldNames2ValsMap, indexField, mapName, MarcUtils.getEra(record));\n else\n addFieldToMap(fldNames2ValsMap, indexField, getStd(record, indexParm));\n }\n else if (indexType.startsWith(\"custom\"))\n {\n try {\n handleCustom(fldNames2ValsMap, indexType, indexField, mapName, record, indexParm);\n }\n catch(SolrMarcIndexerException e)\n {\n String recCntlNum = null;\n try {\n recCntlNum = record.getControlNumber();\n }\n catch (NullPointerException npe) { /* ignore */ }\n\n if (e.getLevel() == SolrMarcIndexerException.DELETE)\n {\n throw new SolrMarcIndexerException(SolrMarcIndexerException.DELETE,\n \"Record \" + (recCntlNum != null ? recCntlNum : \"\") + \" purposely not indexed because \" + key + \" field is empty\");\n// logger.error(\"Record \" + (recCntlNum != null ? recCntlNum : \"\") + \" not indexed because \" + key + \" field is empty -- \" + e.getMessage(), e);\n }\n else\n {\n logger.error(\"Unable to index record \" + (recCntlNum != null ? recCntlNum : \"\") + \" due to field \" + key + \" -- \" + e.getMessage(), e);\n throw(e);\n }\n }\n }\n }\n this.errors = null;\n return fldNames2ValsMap;\n }", "private Map<Field, ValueRef> createFieldValueRefMap() {\n Map<Field, ValueRef> map = new IdentityHashMap<>(fields.size() + 1);\n map.put(NormalField.MISSING, new ValueRef(0, 0));\n return map;\n }", "@Override\r\n\t\tpublic Map<String, Class<?>> getTypeMap() throws SQLException {\n\t\t\treturn null;\r\n\t\t}", "public static void loadCache() {\n\t\t // it is the temporary replacement to database. We should use DB instead\n\t Circle circle = new Circle();\n\t circle.setId(\"1\");\n\t shapeMap.put(circle.getId(),circle);\n\n\t Square square = new Square();\n\t square.setId(\"2\");\n\t shapeMap.put(square.getId(),square);\n\n\t Rectangle rectangle = new Rectangle();\n\t rectangle.setId(\"3\");\n\t \n\t Circle circle2 = new Circle();\n\t circle2.setId(\"4\");\n\t circle2.setType(\"Big Circle\");\n\t shapeMap.put(circle2.getId(),circle2);\n\t shapeMap.put(rectangle.getId(), rectangle);\n\t }", "private HashMap<DIVISION, CompetitiveRank[]> createRankMap() {\n HashMap<DIVISION, CompetitiveRank[]> ranks = new HashMap<>();\n ranks.put(DIVISION.IRON, createRankTiers(DIVISION.IRON, 3));\n ranks.put(DIVISION.BRONZE, createRankTiers(DIVISION.BRONZE, 3));\n ranks.put(DIVISION.SILVER, createRankTiers(DIVISION.SILVER, 3));\n ranks.put(DIVISION.GOLD, createRankTiers(DIVISION.GOLD, 3));\n ranks.put(DIVISION.PLATINUM, createRankTiers(DIVISION.PLATINUM, 3));\n ranks.put(DIVISION.DIAMOND, createRankTiers(DIVISION.DIAMOND, 3));\n ranks.put(DIVISION.IMMORTAL, createRankTiers(DIVISION.IMMORTAL, 3));\n\n // No tiers\n ranks.put(DIVISION.UNRATED, createRankTier(DIVISION.UNRATED));\n ranks.put(DIVISION.RADIANT, createRankTier(DIVISION.RADIANT));\n return ranks;\n }", "Rule MapType() {\n // Push 1 MapTypeNode onto the value stack\n return Sequence(\n \"map \",\n Optional(CppType()),\n \"<\",\n FieldType(),\n \", \",\n FieldType(),\n \"> \",\n actions.pushMapTypeNode());\n }", "public TimeMap() {\n hashMap = new HashMap<String, List<Data>>();\n }" ]
[ "0.6929714", "0.5989646", "0.5955606", "0.59087616", "0.5887546", "0.5870634", "0.58260846", "0.57667303", "0.5759548", "0.57370126", "0.57108295", "0.5702505", "0.56706196", "0.5659993", "0.5609612", "0.55907875", "0.5581606", "0.5574934", "0.555475", "0.55054027", "0.54809004", "0.5467523", "0.5445732", "0.54276794", "0.54267675", "0.5409686", "0.5392219", "0.5366665", "0.5354745", "0.53540844", "0.5344274", "0.5335359", "0.5326952", "0.53227895", "0.53212553", "0.5303956", "0.5298417", "0.52959657", "0.52767354", "0.526222", "0.5249516", "0.5245024", "0.52313113", "0.5225854", "0.5218739", "0.521852", "0.5203539", "0.5203198", "0.5198542", "0.5187266", "0.51850617", "0.5163799", "0.5144198", "0.51435727", "0.51328796", "0.51307255", "0.5122543", "0.5096479", "0.5093327", "0.5079718", "0.5054344", "0.5050522", "0.5049227", "0.5045871", "0.5037504", "0.50200236", "0.5014065", "0.50110567", "0.5010862", "0.50090545", "0.50086975", "0.50067145", "0.5004262", "0.49938303", "0.49918893", "0.49792743", "0.49792743", "0.49760225", "0.4975603", "0.49735415", "0.4972766", "0.49665114", "0.49645522", "0.49625003", "0.4958854", "0.4955999", "0.49507436", "0.49506685", "0.4947151", "0.49371526", "0.49345228", "0.49282056", "0.4927551", "0.49245882", "0.49242955", "0.49231747", "0.49194074", "0.49135354", "0.49068508", "0.4905386" ]
0.49093404
98
The current location/path used to determine the active route.
public interface Location { /** * Returns the current path such as <code>/app/settings</code>. * * @return Path */ String getPath(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCurrentLocation() {\n return currentLocation;\n }", "public int getCurrentLocation() {\n\t\treturn currentLocation;\n\t}", "public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}", "public Optional<URI> getCurrentSourcePath() {\r\n return context.getAssociatedPath();\r\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n currentPath_ = s;\n return s;\n }\n }", "@java.lang.Override\n public google.maps.fleetengine.v1.TripWaypoint getCurrentRouteSegmentEndPoint() {\n return currentRouteSegmentEndPoint_ == null ? google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance() : currentRouteSegmentEndPoint_;\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n currentPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@java.lang.Override\n public java.lang.String getCurrentRouteSegment() {\n java.lang.Object ref = currentRouteSegment_;\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 currentRouteSegment_ = s;\n return s;\n }\n }", "public Location getCurrentLocation()\n\t{\n\t\treturn currentLocation;\n\t}", "public String getCurrentPath() {\n\t\treturn \"\";\n\t}", "Path getLocation();", "public java.lang.String getCurrentRouteSegment() {\n java.lang.Object ref = currentRouteSegment_;\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 currentRouteSegment_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public Location getCurrentLocation();", "public String getLocationPath();", "public google.maps.fleetengine.v1.TripWaypoint getCurrentRouteSegmentEndPoint() {\n if (currentRouteSegmentEndPointBuilder_ == null) {\n return currentRouteSegmentEndPoint_ == null ? google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance() : currentRouteSegmentEndPoint_;\n } else {\n return currentRouteSegmentEndPointBuilder_.getMessage();\n }\n }", "public static String sActivePath() \r\n\t{\r\n\t\tString activePath = null;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tactivePath = new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn activePath;\r\n\t}", "@java.lang.Override\n public com.google.protobuf.ByteString\n getCurrentRouteSegmentBytes() {\n java.lang.Object ref = currentRouteSegment_;\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 currentRouteSegment_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public URI getCurrentContext();", "@SuppressWarnings(\"unused\")\n Location getCurrentLocation();", "public com.google.protobuf.ByteString\n getCurrentRouteSegmentBytes() {\n java.lang.Object ref = currentRouteSegment_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n currentRouteSegment_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getCurrentPathBytes() {\n java.lang.Object ref = currentPath_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n currentPath_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "String location();", "String location();", "String location();", "String location();", "String location();", "String location();", "String location();", "String location();", "public com.google.protobuf.ByteString\n getCurrentPathBytes() {\n java.lang.Object ref = currentPath_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n currentPath_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static String getCurrentPath() {\n File file = new File(\"\");\n return file.getAbsolutePath();\n }", "public static String getCurrentFolderPath(){\n\t\treturn currentFolderPath;\n\t}", "public String getRoutePoint() {\n\t\t\treturn routePoint;\n\t\t}", "@Override\n\tpublic String getLocation() {\n\t\treturn this.location;\n\t}", "public String getDestination(){\r\n\t\treturn route.getDestination();\r\n\t}", "public String getLocatorCurrent() {\n\t\treturn null;\r\n\t}", "public String getOrigin(){\r\n\t\treturn route.getOrigin();\r\n\t}", "public String getLocation() {\n\t\t\treturn location;\n\t\t}", "public StarSystem getCurrentLocation() {\n\t\treturn player.getLocation();\n\t}", "public Location getCurrentLocation(){\n if (mapController == null){\n logMessage(TAG, \"getCurrentLocation -> mMapController is null\");\n return null;\n }\n return mapController.getCurrentLocation();\n }", "public static int current() {\n\t\tString[] parts = MenuPath.path.split(\"_\");\n\t\tint len = parts.length;\n\t\t\n\t\treturn Integer.parseInt(parts[len-1]);\n\t}", "URI getLocation();", "public java.lang.String getRoute () {\n\t\treturn route;\n\t}", "public String getLocation() {\n\t\treturn location;\n\t}", "String getLocation();", "String getLocation();", "String getLocation();", "public final String getLocation() {\n return location;\n }", "public String getCurrentUrl() {\n \t\treturn getWebDriver().getCurrentUrl();\n \t}", "@Override\n\tpublic String getLocation() {\n\t\treturn location;\n\t}", "public String getLocation() {\r\n\t\treturn location;\r\n\t}", "public String getLocation() {\r\n\t\treturn location; \r\n\t}", "public Location getCurrentLocation() { return entity.getLocation(); }", "public int getLocation() {\n\t\tint location=super.getLocation();\n\t\treturn location;\n\t}", "public ImPoint getCurrentLoc() {\n \treturn this.startLoc;\n }", "public String getCurrentURL()\n\t{\n\t\treturn driver.getCurrentUrl();\n\t}", "public Location getLocation ( ) {\n\t\treturn extract ( handle -> handle.getLocation ( ) );\n\t}", "public String getContextPath() {\n return FxJsfUtils.getRequest().getContextPath();\n }", "public String location() {\n return this.location;\n }", "public String location() {\n return this.location;\n }", "java.lang.String getLocation();", "public static String getCurrentURL() {\n\t\treturn driver.getCurrentUrl();\n\t}", "public String getCurrUrl() {\n return driver.getCurrentUrl();\n }", "public java.lang.String getLocation() {\n return location;\n }", "public PathCode getCurPathCode() { return /*appliedTo.curPathCode*/currentpathcode;}", "public Coordinate getCurrent( )\n\t{\n\t\treturn currentLocation;\n\t}", "String getRouteDest();", "public URL getServerLocation() {\n return serverLocation;\n }", "public String getLocation() {\n\t\treturn mLocation;\n\t}", "public java.lang.String getLocation() {\n return location;\n }", "public String getCurrentUrl() {\n return driver.getCurrentUrl();\n }", "public String getCurrentUrl() {\n return driver.getCurrentUrl();\n }", "public String getCurrentUrl() {\n\n return driver.getCurrentUrl();\n }", "public Location getNeighbouringPath(String enteredPath) {\r\n\t\t\treturn this.getPlayer().getCurrentLocation().getPaths().get(enteredPath);\r\n\t\t}", "public String getLocation() {\n return this.location;\n }", "public Point getLocation() {\n return currentLocation;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\n return this.location;\n }", "public String getLocation() {\n return this.location;\n }", "public String getLocation() {\n return this.location;\n }", "public String getLocation() {\n return this.location;\n }", "public String getLocation() {\n return this.location;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\n return location;\n }", "public String getLocation() {\r\n return location;\r\n }", "public native final String location() /*-{\n\t\treturn this[\"location\"];\n\t}-*/;", "public String getLocation() {\r\n return location;\r\n }", "public String getLocation() {\n return location;\n }", "public google.maps.fleetengine.v1.TripWaypointOrBuilder getCurrentRouteSegmentEndPointOrBuilder() {\n if (currentRouteSegmentEndPointBuilder_ != null) {\n return currentRouteSegmentEndPointBuilder_.getMessageOrBuilder();\n } else {\n return currentRouteSegmentEndPoint_ == null ?\n google.maps.fleetengine.v1.TripWaypoint.getDefaultInstance() : currentRouteSegmentEndPoint_;\n }\n }", "public String getLocation()\n {\n return location;\n }" ]
[ "0.68386954", "0.6681542", "0.6648539", "0.65958005", "0.65821254", "0.65301555", "0.65204245", "0.6520331", "0.65170044", "0.6508295", "0.64911526", "0.64751124", "0.6419349", "0.63509357", "0.6325476", "0.6303775", "0.6235809", "0.62351286", "0.6204425", "0.61987287", "0.61898154", "0.61863303", "0.61863303", "0.61863303", "0.61863303", "0.61863303", "0.61863303", "0.61863303", "0.61863303", "0.6175379", "0.61238843", "0.6083405", "0.60778964", "0.60355836", "0.6032605", "0.60284203", "0.6011337", "0.59989536", "0.59986246", "0.5987229", "0.5950939", "0.59450793", "0.5940386", "0.59283835", "0.5927863", "0.5927863", "0.5927863", "0.5916253", "0.5912275", "0.5907155", "0.5904162", "0.5902821", "0.58976173", "0.5879432", "0.58743745", "0.5859958", "0.58291304", "0.5823074", "0.5816333", "0.5816333", "0.58152544", "0.5814531", "0.58028114", "0.5801856", "0.5797104", "0.5783882", "0.5768451", "0.5745157", "0.57394046", "0.57381725", "0.5730936", "0.5730936", "0.5727814", "0.57176644", "0.5712346", "0.57060087", "0.570266", "0.5694546", "0.5694546", "0.5694546", "0.5694546", "0.5694546", "0.56806153", "0.56806153", "0.56806153", "0.56806153", "0.56806153", "0.56806153", "0.56806153", "0.56806153", "0.56806153", "0.56806153", "0.56806153", "0.56806153", "0.5676842", "0.56646544", "0.56615764", "0.565251", "0.564618", "0.5639494" ]
0.623397
18
Returns the current path such as /app/settings.
String getPath();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getCurrentPath() {\n File file = new File(\"\");\n return file.getAbsolutePath();\n }", "public String getCurrentPath() {\n\t\treturn \"\";\n\t}", "public String getCurrentPath() {\n\t\treturn DataManager.getCurrentPath();\n\t}", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n currentPath_ = s;\n return s;\n }\n }", "public java.lang.String getCurrentPath() {\n java.lang.Object ref = currentPath_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n currentPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static String getCurrentFolderPath(){\n\t\treturn currentFolderPath;\n\t}", "public static String findCurrentDirectory() {\n\t\tString absolutePath = new File(\"\").getAbsolutePath();\n\t return absolutePath;\n\t}", "public String getApplicationContext()\n {\n return configfile.getApplicationPath(getASPManager().getCurrentHostIndex());\n }", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public String getContextPath() {\n return FxJsfUtils.getRequest().getContextPath();\n }", "public String getApplicationPath()\n {\n return getApplicationPath(false);\n }", "public String getPath() {\n\t\treturn this.baseDir.getAbsolutePath();\n\t}", "public String getCurrentTsoPath() {\n return currentTsoPath;\n }", "public static String getBaseDir() {\r\n Path currentRelativePath = Paths.get(System.getProperty(\"user.dir\"));\r\n return currentRelativePath.toAbsolutePath().toString();\r\n }", "public String getBasePath(){\r\n\t\t \r\n\t\t String basePath = properties.getProperty(\"getPath\");\r\n\t\t if(basePath != null) return basePath;\r\n\t\t else throw new RuntimeException(\"getPath not specified in the configuration.properties file.\");\r\n\t }", "public static String sActivePath() \r\n\t{\r\n\t\tString activePath = null;\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\tactivePath = new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn activePath;\r\n\t}", "String getContextPath();", "String getContextPath();", "String getContextPath();", "public String getLocalBasePath() {\n\t\treturn DataManager.getLocalBasePath();\n\t}", "public String getContextUrl() {\n String currentURL = driver.getCurrentUrl();\n return currentURL.substring(0, currentURL.lastIndexOf(\"/login\"));\n }", "public com.google.protobuf.ByteString\n getCurrentPathBytes() {\n java.lang.Object ref = currentPath_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n currentPath_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getPath() {\n return (path == null || path.equals(\"\")) ? \"/\" : path;\n }", "public synchronized static String getCurrentDirectory() {\n if (currentDirectory == null)\n currentDirectory = canon(System.getProperty(\"user.home\"));\n return currentDirectory;\n }", "protected String path() {\n return path(getName());\n }", "public Optional<URI> getCurrentSourcePath() {\r\n return context.getAssociatedPath();\r\n }", "public com.google.protobuf.ByteString\n getCurrentPathBytes() {\n java.lang.Object ref = currentPath_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n currentPath_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public final String getPath() {\n\t\treturn this.path.toString();\n\t}", "public String getRootPath() {\n return root.getPath();\n }", "public String path() {\n return filesystem().pathString(path);\n }", "public String getAbsolutePath() {\n\t\treturn Util.getAbsolutePath();\n\t}", "String rootPath();", "public String getCurrentUrl() {\n \t\treturn getWebDriver().getCurrentUrl();\n \t}", "public String appBaseUrl() {\n int amtToTrim = request.getServletPath().length() + request.getPathInfo().length();\n String appBase = requestURL.substring(0, requestURL.length()-amtToTrim);\n return appBase;\n }", "String getApplicationContextPath();", "FsPath baseDir();", "public String getWebappPathPrefix() {\n return webSiteProps.getWebappPathPrefix();\n }", "public String getPath() {\n String result = \"\";\n Directory curDir = this;\n // Keep looping while the current directories parent exists\n while (curDir.parent != null) {\n // Create the full path string based on the name\n result = curDir.getName() + \"/\" + result;\n curDir = (Directory) curDir.getParent();\n }\n // Return the full string\n result = \"/#/\" + result;\n return result;\n }", "String basePath();", "public String getPath() {\n\t\treturn pfDir.getPath();\n\t}", "public String getCurrUrl() {\n return driver.getCurrentUrl();\n }", "public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "String getContextPath() {\n return contextPath;\n }", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "private String getPath() {\n\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\n\t}", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "@Override\n\tpublic String getContextPath() {\n\t\treturn contextPath;\n\t}", "public static String getWorkingDirectory() {\n // Since System.getProperty(\"user.dir\") and user.home etc. can be confusing\n // and I haven't quite figured out if they really are reliable on all systems,\n // I chose a little more complicated approach. This is exactly the same\n // like if a file is created relatively, like new File(\"testfile.txt\"), which\n // would be relative to the working directory.\n\n File f = new File(\".\");\n\n try {\n return addPathSeparator(f.getCanonicalPath());\n } catch (IOException e) {\n return null;\n }\n }", "public static String getCurrentURL() {\n\t\treturn driver.getCurrentUrl();\n\t}", "public String getCurrentUrl() {\n\n return driver.getCurrentUrl();\n }", "public static String getPath(HttpServletRequest request) {\n return request.getRequestURI().substring(request.getContextPath().length());\n }", "public String workingDirectory() {\n\t\treturn workingDir.getAbsolutePath();\n\t}", "public String getCurrentUrl() {\n return driver.getCurrentUrl();\n }", "public String getCurrentUrl() {\n return driver.getCurrentUrl();\n }", "public File getApplicationPath()\n {\n return validateFile(ServerSettings.getInstance().getProperty(ServerSettings.APP_EXE));\n }", "public String getCurrentURL()\n\t{\n\t\treturn driver.getCurrentUrl();\n\t}", "Path getRootPath();", "private String getPath() {\r\n\t\t\treturn context.getRealPath(\"WEB-INF/ConnectionData\");\r\n\t\t}", "public String getWorkspacePath() {\n\t\tString workspacePath = userSettingsService.getUserSettings().getWorkspacePath();\n\t\treturn getAbsoluteSubDirectoryPath(workspacePath);\n\t}", "public String getPath() {\n\t\treturn getString(\"path\");\n\t}", "public String getGitBasePath() {\n\t\tif (StringUtils.isBlank(gitBasePath)) {\n\t\t\tgitBasePath = System.getProperties().getProperty(\"user.home\") + \"/gittest\";\n\t\t}\n\t\treturn gitBasePath;\n\t}", "public String getRootPath() {\r\n return rootPath;\r\n }", "public String getDocumentBase() {\n return getServerBase() + getContextPath() + \"/\";\n }", "public String getLocationPath();", "@Override\n public String getCurrentDirectory() {\n return (String) gemFileState.get(STATE_SYNC_DIRECTORY);\n }", "private static String getPath (HttpServletRequest request) {\n String path = request.getServletPath();\n return path != null ? path : request.getPathInfo();\n }", "public String getPath()\n\t{\n\t\tString previousPath = File.separator;\n\t\t\n\t\t//if there is a parent\n\t\tif(getParentDirectory() != null)\n\t\t{\n\t\t\t//write over the previous path with the parent's path and a slash\n\t\t\t// /path/to/parent\n\t\t\tpreviousPath = getParentDirectory().getPath() + File.separator;\n\t\t}\n\t\t//else- no parent, this is the root \"/\"\n\t\t\n\t\t//add the name, /path/to/parent/thisdir \n\t\treturn previousPath + getName();\t\t\n\t}", "String path(Configuration configuration);", "public File getWorkingParent()\n {\n return validatePath(ServerSettings.getInstance().getProperty(ServerSettings.WORKING_PARENT));\n }", "public String getCurrentUrl() {\n return webDriver.getCurrentUrl();\n }", "public static String getBasePath() {\n String basePath;\n if (new File(\"../../MacOS/JavaApplicationStub\").canExecute()) {\n basePath = \"../../../..\";\n } else {\n basePath = \".\";\n }\n return basePath;\n }", "public String getCurrentUrl(){\n return seleniumDriver.getCurrentUrl();\n }", "String getCookiePath()\n {\n return getApplicationContext();\n }", "public String getWorkRelativePath() {\n return getWorkRelativePath(testURL);\n }", "public static String getWorkingDirectory() {\r\n try {\r\n // get working directory as File\r\n String path = DBLIS.class.getProtectionDomain().getCodeSource()\r\n .getLocation().toURI().getPath();\r\n File folder = new File(path);\r\n folder = folder.getParentFile().getParentFile(); // 2x .getParentFile() for debug, 1x for normal\r\n\r\n // directory as String\r\n return folder.getPath() + \"/\"; // /dist/ for debug, / for normal\r\n } catch (URISyntaxException ex) {\r\n return \"./\";\r\n }\r\n }", "public String getCurrentProfiledir()\r\n {\r\n String res = null, aux = \"\";\r\n File dir;\r\n Vector<String> profiles = getProfiledirs();\r\n\r\n for (Enumeration<String> e = profiles.elements(); e.hasMoreElements();)\r\n {\r\n aux = e.nextElement();\r\n dir = new File(aux + File.separator + _lockFile);\r\n if (dir.exists())\r\n {\r\n res = aux + File.separator;\r\n }\r\n }\r\n return res;\r\n }", "public final String getPath()\n {\n return path;\n }", "public String getPath() {\n\t\treturn file.getPath();\n\t}", "public static Path getPath() {\n\t\tPath path = Paths.get(getManagerDir(), NAME);\n\t\treturn path;\n\t}", "public String toPathString() {\n return path();\n }", "public String getPath() {\n return this.projectPath;\r\n }", "String getWorkingDirectory();", "private String getHome()\n {\n return this.bufferHome.getAbsolutePath() + \"/\";\n }", "static String getBase(HttpServletRequest request) {\n String fullPath = request.getRequestURI();\n int baseEnd = getDividingIndex(fullPath);\n return fullPath.substring(0, baseEnd + 1);\n }", "public String getWorkDirectory(){\n String wd = \"\";\n try {\n wd = new File(\"test.txt\").getCanonicalPath().replace(\"/test.txt\",\"\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n return wd;\n }", "public String getRelativePath();", "public String path() {\n\treturn path;\n }", "public static String getBaseDir() {\n // 'basedir' is set by Maven Surefire. It always points to the current subproject,\n // even in reactor builds.\n String baseDir = System.getProperty(\"basedir\");\n\n // if 'basedir' is not set, try the current directory\n if (baseDir == null) {\n baseDir = System.getProperty(\"user.dir\");\n }\n return baseDir;\n }", "public String getAppPathname();", "public String getServletPath() {\n return servletPath;\n }", "public static String getProjectPath() {\n\t\tif (!projectPath.isEmpty()) {\n\t\t\treturn projectPath;\n\t\t} else {\n\t\t\treturn \"No file yet\";\n\t\t}\n\t}", "private String getRepositoryPath() {\n if (repoPath != null) {\n return repoPath;\n }\n\n final String pathProp = System.getProperty(SYSTEM_PATH_PROPERTY);\n\n if (pathProp == null || pathProp.isEmpty()) {\n repoPath = getWorkingDirectory();\n } else if (pathProp.charAt(0) == '.') {\n // relative path\n repoPath = getWorkingDirectory() + System.getProperty(\"file.separator\") + pathProp;\n } else {\n repoPath = RepoUtils.stripFileProtocol(pathProp);\n }\n\n log.info(\"Using repository path: \" + repoPath);\n return repoPath;\n }", "public String getSavingLocation()\n {\n return Environment.getExternalStorageDirectory() + File.separator + getResources().getString(R.string.app_name);\n }", "public static String getWorkingDirectory() {\n\n return System.getProperty(\"user.dir\");\n }", "public String getResourcePath() {\n return appPathField.getText().trim();\n }", "public String getServletPath() {\n return servletPath;\n }", "@Override \n public String getPathInfo() {\n if (pathInfo != null) {\n return pathInfo;\n }\n \n StringBuilder buffer = new StringBuilder();\n if (getRequestURIWithoutQuery().length() > 0) {\n if (getScriptName().length() > 0 && getRequestURIWithoutQuery().indexOf(getScriptName()) == 0) {\n buffer.append(getRequestURIWithoutQuery().substring(getScriptName().length()));\n } else {\n buffer.append(getRequestURIWithoutQuery());\n }\n } else {\n buffer.append(getServletPath());\n if (super.getPathInfo() != null) {\n buffer.append(super.getPathInfo());\n }\n }\n return pathInfo = buffer.toString();\n }", "public static String getSettingsPath(User user){\r\n File file = (File)userDirs.get(user);\r\n return file == null ? null : file.getAbsolutePath();\r\n // Not 100% sure we should use the absolute path...\r\n }" ]
[ "0.78409684", "0.7835062", "0.7717049", "0.71748066", "0.7138053", "0.7123333", "0.71081275", "0.7089415", "0.70104283", "0.70104283", "0.6917344", "0.68973345", "0.68847215", "0.6880856", "0.6828742", "0.68019646", "0.67979336", "0.67316484", "0.67316484", "0.67316484", "0.66903687", "0.6661532", "0.66505474", "0.665042", "0.66434497", "0.66209644", "0.66050786", "0.6577878", "0.6562103", "0.6538634", "0.6536273", "0.6504756", "0.6500055", "0.6494179", "0.6488828", "0.64780855", "0.6477165", "0.6468206", "0.6464775", "0.64537", "0.6443617", "0.64340025", "0.6425444", "0.64223677", "0.6422134", "0.6422134", "0.6422134", "0.6422134", "0.6408505", "0.6405315", "0.6402132", "0.64006907", "0.6395116", "0.6372131", "0.6357943", "0.63552004", "0.63552004", "0.6341613", "0.63389564", "0.63387346", "0.63344485", "0.6314887", "0.6297957", "0.6287072", "0.6283845", "0.6281062", "0.62707245", "0.6270273", "0.6265909", "0.6254099", "0.6214577", "0.6199406", "0.618649", "0.61839175", "0.6179893", "0.61749995", "0.6159964", "0.6158584", "0.6153777", "0.61532444", "0.6149278", "0.61179453", "0.6114025", "0.6106944", "0.6103228", "0.60653764", "0.6064422", "0.60605764", "0.60438114", "0.60412395", "0.6033553", "0.60312897", "0.60275537", "0.60081327", "0.6007055", "0.6000538", "0.599951", "0.5995619", "0.59936017", "0.59924793", "0.5988542" ]
0.0
-1
/ JADX WARNING: Illegal instructions before constructor call / Code decompiled incorrectly, please refer to instructions dump.
public KodularChameleonAd(com.google.appinventor.components.runtime.ComponentContainer r8) { /* r7 = this; r0 = r7 r1 = r8 r2 = r0 r3 = r1 com.google.appinventor.components.runtime.Form r3 = r3.$form() r2.<init>(r3) r2 = r0 r3 = r1 com.google.appinventor.components.runtime.Form r3 = r3.$form() r2.form = r3 r2 = r0 r3 = r1 android.app.Activity r3 = r3.$context() r2.activity = r3 r2 = r0 com.kodular.chameleon.ChameleonAds r3 = new com.kodular.chameleon.ChameleonAds r6 = r3 r3 = r6 r4 = r6 r5 = r0 android.app.Activity r5 = r5.activity android.support.v7.app.AppCompatActivity r5 = (android.support.p003v7.app.AppCompatActivity) r5 r4.<init>(r5) r2.chameleonAds = r3 r2 = r0 com.kodular.chameleon.ChameleonAds r2 = r2.chameleonAds com.google.appinventor.components.runtime.KodularChameleonAd$1 r3 = new com.google.appinventor.components.runtime.KodularChameleonAd$1 r6 = r3 r3 = r6 r4 = r6 r5 = r0 r4.<init>(r5) r2.setOnAdLoadedListener(r3) r2 = r0 com.kodular.chameleon.ChameleonAds r2 = r2.chameleonAds com.google.appinventor.components.runtime.KodularChameleonAd$2 r3 = new com.google.appinventor.components.runtime.KodularChameleonAd$2 r6 = r3 r3 = r6 r4 = r6 r5 = r0 r4.<init>(r5) r2.setOnAdFailedToLoadListener(r3) r2 = r0 com.kodular.chameleon.ChameleonAds r2 = r2.chameleonAds com.google.appinventor.components.runtime.KodularChameleonAd$3 r3 = new com.google.appinventor.components.runtime.KodularChameleonAd$3 r6 = r3 r3 = r6 r4 = r6 r5 = r0 r4.<init>(r5) r2.setOnAdFailedToShowListener(r3) r2 = r0 com.kodular.chameleon.ChameleonAds r2 = r2.chameleonAds com.google.appinventor.components.runtime.KodularChameleonAd$4 r3 = new com.google.appinventor.components.runtime.KodularChameleonAd$4 r6 = r3 r3 = r6 r4 = r6 r5 = r0 r4.<init>(r5) r2.setOnAdClosed(r3) java.lang.String r2 = "Kodular Chameleon Ad" java.lang.String r3 = "Kodular Chameleon Ad Created" int r2 = android.util.Log.d(r2, r3) return */ throw new UnsupportedOperationException("Method not decompiled: com.google.appinventor.components.runtime.KodularChameleonAd.<init>(com.google.appinventor.components.runtime.ComponentContainer):void"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void translateConstructor( ) {\n \n Set<MethodInfoFlags> flags = EnumSet.noneOf( MethodInfoFlags.class );\n \n AVM2Method method = new AVM2Method( null, flags );\n avm2Class.avm2Class.constructor = method;\n \n AVM2MethodBody body = method.methodBody;\n body.maxStack = 1;\n body.maxRegisters = 1;\n body.maxScope = 11;\n body.scopeDepth = 10;\n \n InstructionList il = body.instructions;\n \n// il.append( OP_getlocal0 );\n// il.append( OP_pushscope );\n il.append( OP_getlocal0 );\n il.append( OP_constructsuper, 0 );\n \n// il.append( OP_findpropstrict, new AVM2QName( PUBLIC_NAMESPACE, \"drawTest\" ));\n il.append( OP_getlocal0 );\n \n il.append( OP_callpropvoid, new AVM2QName( EmptyPackage.namespace, \"drawTest\" ), 0 );\n\n il.append( OP_returnvoid );\n }", "public C23317d() {\n }", "private void __sep__Constructors__() {}", "AnonymousClass1() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.location.GpsClock.1.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.1.<init>():void\");\n }", "AnonymousClass1() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.telephony.SmsCbCmasInfo.1.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telephony.SmsCbCmasInfo.1.<init>():void\");\n }", "public native void constructor();", "private JadTool() { }", "CollationDataBuilder() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.icu.impl.coll.CollationDataBuilder.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.impl.coll.CollationDataBuilder.<init>():void\");\n }", "public Constructor(){\n\t\t\n\t}", "public WorldPhoneOp01() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.mediatek.internal.telephony.worldphone.WorldPhoneOp01.<init>():void\");\n }", "Constructor() {\r\n\t\t \r\n\t }", "public ecDSAnone() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSAnone.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSAnone.<init>():void\");\n }", "public As21Id27()\n\t{\n\t\tsuper() ;\n\t}", "Reproducible newInstance();", "protected Signer() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: java.security.Signer.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.<init>():void\");\n }", "protected DiagClassVisitor() {\n super(ASM5);\n }", "public dxm(boolean r3) {\n /*\n r2 = this;\n r2.<init>()\n esb r0 = defpackage.esb.a.a\n java.lang.Class<cuh> r1 = defpackage.cuh.class\n esc r0 = r0.a(r1)\n cuh r0 = (defpackage.cuh) r0\n r1 = 0\n if (r0 == 0) goto L_0x001b\n cug r0 = r0.c()\n boolean r0 = r0.c()\n goto L_0x001c\n L_0x001b:\n r0 = 0\n L_0x001c:\n if (r0 == 0) goto L_0x0021\n if (r3 != 0) goto L_0x0021\n r1 = 1\n L_0x0021:\n r3 = 8\n if (r1 == 0) goto L_0x003b\n java.util.ArrayList<java.lang.Integer> r0 = a\n java.lang.Integer r1 = java.lang.Integer.valueOf(r3)\n boolean r0 = r0.contains(r1)\n if (r0 != 0) goto L_0x0056\n java.util.ArrayList<java.lang.Integer> r0 = a\n java.lang.Integer r3 = java.lang.Integer.valueOf(r3)\n r0.add(r3)\n return\n L_0x003b:\n java.util.ArrayList<java.lang.Integer> r0 = a\n java.lang.Integer r1 = java.lang.Integer.valueOf(r3)\n boolean r0 = r0.contains(r1)\n if (r0 == 0) goto L_0x0056\n java.util.ArrayList<java.lang.Integer> r0 = a\n java.lang.Integer r3 = java.lang.Integer.valueOf(r3)\n int r3 = r0.indexOf(r3)\n java.util.ArrayList<java.lang.Integer> r0 = a\n r0.remove(r3)\n L_0x0056:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: defpackage.dxm.<init>(boolean):void\");\n }", "public ecDSA512() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA512.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA512.<init>():void\");\n }", "public Attributes2Impl() {\n /*\n // Can't load method instructions: Load method exception: null in method: org.xml.sax.ext.Attributes2Impl.<init>():void, dex: in method: org.xml.sax.ext.Attributes2Impl.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.xml.sax.ext.Attributes2Impl.<init>():void\");\n }", "public Pitonyak_09_02() {\r\n }", "private Rekenhulp()\n\t{\n\t}", "private Main()\n {{\n System.err.println ( \"Internal error: \"+\n\t \"unexpected call to default constructor for Main.\" );\n System.exit(-127);\n }}", "GpsClock() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.location.GpsClock.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.<init>():void\");\n }", "private BigB()\r\n{\tsuper();\t\r\n}", "private CodeRef() {\n }", "private ElementDebugger() {\r\n\t\t/* PROTECTED REGION ID(java.constructor._17_0_5_12d203c6_1363681638138_829588_2092) ENABLED START */\r\n\t\t// :)\r\n\t\t/* PROTECTED REGION END */\r\n\t}", "private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}", "public Clade() {}", "public Code() {\n\t}", "protected abstract void construct();", "private FlexOrderTransformer() {\n // constructor preventing instantiation.\n }", "private StdDSAEncoder() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.StdDSAEncoder.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.StdDSAEncoder.<init>():void\");\n }", "public ecDSA() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA.<init>():void\");\n }", "public S11()\r\n {\r\n super();\r\n strapAllowed = false;\r\n }", "private Solution() {\n /**.\n * { constructor }\n */\n }", "private CZ()\n {\n }", "private Instantiation(){}", "public static void copyConstructor(){\n\t}", "protected void method_2241() {\r\n // $FF: Couldn't be decompiled\r\n }", "public Hacker() {\r\n \r\n }", "JsrInstruction() {}", "public void testConstructor() throws Exception {\n\t\tStringWriter source = new StringWriter();\n\t\tthis.compiler.writeConstructor(source, \"Simple\", this.compiler.createField(String.class, \"field\"),\n\t\t\t\tthis.compiler.createField(int.class, \"value\"), this.compiler.createField(boolean[].class, \"flags\"));\n\t\tStringWriter expected = new StringWriter();\n\t\texpected.append(\" private java.lang.String field;\\n\");\n\t\texpected.append(\" private int value;\\n\");\n\t\texpected.append(\" private boolean[] flags;\\n\");\n\t\texpected.append(\" public Simple(java.lang.String field, int value, boolean[] flags) {\\n\");\n\t\texpected.append(\" this.field = field;\\n\");\n\t\texpected.append(\" this.value = value;\\n\");\n\t\texpected.append(\" this.flags = flags;\\n\");\n\t\texpected.append(\" }\\n\");\n\t\tassertEquals(\"Incorrect constructor\", expected.toString(), source.toString());\n\t}", "public ContactsProvider() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: org.gsma.joyn.contacts.ContactsProvider.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.gsma.joyn.contacts.ContactsProvider.<init>():void\");\n }", "private SystemInfo() {\r\n // forbid object construction \r\n }", "public SIPDate() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e6 in method: gov.nist.javax.sip.header.SIPDate.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.<init>():void\");\n }", "public ecDSA256() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA256.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA256.<init>():void\");\n }", "protected CodeStub() {\n entry = new Label();\n continuation = new Label();\n }", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public static void __init() {\r\n\t\t__name__ = new str(\"code\");\r\n\r\n\t\t/**\r\n\t\t copyright Sean McCarthy, license GPL v2 or later\r\n\t\t*/\r\n\t\tdefault_0 = null;\r\n\t\tcl_Code = new class_(\"Code\");\r\n\t}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "public FactoryImpl() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.icu.text.TimeZoneNames.DefaultTimeZoneNames.FactoryImpl.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.text.TimeZoneNames.DefaultTimeZoneNames.FactoryImpl.<init>():void\");\n }", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "public Codegen() {\n assembler = new LinkedList<LlvmInstruction>();\n symTab = new SymTab();\n }", "defaultConstructor(){}", "public SourceCode() {\n }", "public MonHoc() {\n }", "private void method_7083() {\r\n // $FF: Couldn't be decompiled\r\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 }", "private SourcecodePackage() {}", "private ByteTools(){}", "public HCERTCHAINENGINE(Pointer p) {\n/* 1085 */ super(p);\n/* */ }", "public Callback() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.hardware.radio.RadioTuner.Callback.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.hardware.radio.RadioTuner.Callback.<init>():void\");\n }", "private TMCourse() {\n\t}", "public p7p2() {\n }", "private Ex() {\n }", "public _355() {\n\n }", "public ecDSA384() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA384.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.ecDSA384.<init>():void\");\n }", "public Self__1() {\n }", "protected TestBench() {}", "public Soil()\n\t{\n\n\t}", "public IncorrectType58119e() {\n }", "public OOP_207(){\n\n }", "private State5() {\n\t}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:41.996 -0500\", hash_original_method = \"CB9D9CAF93B6F7C6AC078700B30D5B3A\", hash_generated_method = \"6EEF3712392D06942F0E7086316BBAB4\")\n \n private void nativeConstructor(){\n }", "public Vbc(java.lang.Object instance) throws Throwable {\n super(instance);\n if (instance instanceof JCObject) {\n classInstance = (JCObject) instance;\n } else\n throw new Exception(\"Cannot manage object, it is not a JCObject\");\n }", "private CompressionTools() {}", "public static void main(String[] args) {\n\t\tthisconstructor rv = new thisconstructor();\n\t\n\t\n\t}", "public static void main(String[] args) throws Exception{\n\t\tUnsafe unsafe = getUnsafe();// unsafe\n\t\t// 它跳过了构造方法\n\t\tInitDemo initDemo = (InitDemo) unsafe.allocateInstance(InitDemo.class);\n\t}", "public MethodEx2() {\n \n }", "public Fun_yet_extremely_useless()\n {\n\n }", "protected Compiler() {\r\n\t\ttempTable = new TempTable();\r\n\t\toriginalTextLength = 0;\r\n\t\tthis.cpt = null;\r\n\t}", "protected void method_2045(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public ParseAce_old ()\n{\n initialize ();\n}", "public D() {}", "public LegacyResultMapper() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: android.hardware.camera2.legacy.LegacyResultMapper.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.hardware.camera2.legacy.LegacyResultMapper.<init>():void\");\n }", "public CSSTidier() {\n\t}", "private void method_7082(class_1293 param1) {\r\n // $FF: Couldn't be decompiled\r\n }", "public Pleasure() {\r\n\t\t}", "private Solution() {\n }", "public AbstractT602()\n {\n }", "protected DenseMatrix()\n\t{\n\t}", "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "private IndexBitmapObject() {\n\t}", "private Solution() { }", "private Solution() { }", "public JavaException()\r\n\t{\r\n\t\tsuper();\r\n\t}", "public AnimationParameters() {\n/* 279 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private SingleObject()\r\n {\r\n }", "@Override\n public String visit(ExplicitConstructorInvocationStmt n, Object arg) {\n return null;\n }", "protected void method_2246(class_1045 param1) {\r\n // $FF: Couldn't be decompiled\r\n }" ]
[ "0.71015143", "0.7059596", "0.6989391", "0.6781889", "0.6726215", "0.67163754", "0.6671958", "0.665917", "0.66513497", "0.6587412", "0.6584786", "0.65427125", "0.65144664", "0.65082955", "0.6488894", "0.6471565", "0.6467171", "0.64512646", "0.64405286", "0.6431756", "0.6430834", "0.6389567", "0.6378872", "0.6369022", "0.63689095", "0.6345528", "0.63360125", "0.6332567", "0.63114005", "0.6303745", "0.62912065", "0.62869126", "0.6269466", "0.6263181", "0.62305385", "0.6226832", "0.62256914", "0.62132907", "0.6200761", "0.6196282", "0.6191469", "0.61778563", "0.6171679", "0.6171058", "0.6170099", "0.6157803", "0.61532795", "0.6149617", "0.6145837", "0.6142204", "0.6139346", "0.61385673", "0.6134378", "0.61322343", "0.61287946", "0.6123413", "0.6117283", "0.6109632", "0.6107482", "0.6106419", "0.6090562", "0.60878205", "0.6084778", "0.6084144", "0.6075915", "0.60758567", "0.60749024", "0.60748315", "0.6068714", "0.60659915", "0.60648376", "0.6064059", "0.6058147", "0.605575", "0.6052822", "0.6051686", "0.60477835", "0.6047027", "0.60431266", "0.6042758", "0.6030025", "0.6025184", "0.6024211", "0.60213375", "0.6006844", "0.60067075", "0.6002124", "0.59998274", "0.5998479", "0.59945077", "0.5990655", "0.5990148", "0.59900665", "0.5987824", "0.5981228", "0.5981228", "0.5980187", "0.5976155", "0.5972846", "0.5970769", "0.5968237" ]
0.0
-1
Interface for a configuration source that provides all its possible keys. This is an optional interface to be implemented by configuration sources supporting it.
public interface IIterableConfigurationSource extends IConfigurationSource { /** * @return A map of all contained keys with their values in this configuration * source. If the underlying source uses some kind of ordering (e.g. * in files), this order should be maintained. Never <code>null</code> * but maybe empty. */ @Nonnull @ReturnsMutableCopy ICommonsMap <String, String> getAllConfigItems (); /** * @return A map of all contained keys and {@link ConfiguredValue} in this * configuration source. If the underlying source uses some kind of * ordering (e.g. in files), this order should be maintained. Never * <code>null</code> but maybe empty. * @see #getAllConfigItems() */ @Nonnull @ReturnsMutableCopy default ICommonsMap <String, ConfiguredValue> getAllConfiguredValues () { return new CommonsLinkedHashMap <> (getAllConfigItems (), Function.identity (), x -> new ConfiguredValue (this, x)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static ConfigSource config()\n {\n return CONFIG_MAPPER_FACTORY.newConfigSource()\n .set(\"type\", \"mailchimp\")\n .set(\"auth_method\", \"api_key\")\n .set(\"apikey\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"access_token\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"list_id\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"email_column\", \"email\")\n .set(\"fname_column\", \"fname\")\n .set(\"lname_column\", \"lname\");\n }", "@Config.LoadPolicy(Config.LoadType.MERGE)\n@Config.Sources({\n \"classpath:test.properties\",\n \"system:properties\",\n \"system:env\"})\npublic interface UserConfiguration extends Config {\n\n @DefaultValue(\"default_Name\")\n @Key(\"user.name\")\n String name();\n @Key(\"user.email\")\n String email();\n @Key(\"user.password\")\n String password();\n}", "@Override\n public Iterable<String> configKeys() {\n Set<String> result = new HashSet<>();\n result.add(CONFIG_NAME);\n\n result.addAll(upgradeProviders.stream()\n .flatMap(it -> it.configKeys().stream())\n .collect(Collectors.toSet()));\n\n return result;\n }", "private ConfigurationKeys() {\n // empty constructor.\n }", "public interface IConfigurationProvider {\r\n String get(String path);\r\n}", "public interface WatchedConfigurationSource {\n /**\n * Add {@link WatchedUpdateListener} listener\n * \n * @param l\n */\n public void addUpdateListener(WatchedUpdateListener l);\n\n /**\n * Remove {@link WatchedUpdateListener} listener\n * \n * @param l\n */\n public void removeUpdateListener(WatchedUpdateListener l);\n\n /**\n * Get a snapshot of the latest configuration data.<BR>\n * \n * Note: The correctness of this data is only as good as the underlying config source's view of the data.\n */\n public Map<String, Object> getCurrentData() throws Exception;\n}", "void configuration(String source, String name, String value);", "public interface Config {\n\t/**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tstring value.\n */\n String getString(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tString value.\n */\n String getString(String key, String defaultValue);\n\n /**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tint value.\n */\n int getInt(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tint value.\n */\n int getInt(String key, int defaultValue);\n\n /**\n * Return with string in contents of config file.\n *\n * @return\n * \tContents of config file.\n */\n String getContents();\n\n /**\n * Return with Configuration object in contents of config file.\n *\n * @return\n * \tContents of Configuration object.\n */\n Configuration getConfiguration();\n\n List<Object> getList(String key);\n}", "public interface ConfigurationProvider extends ContainerProvider, PackageProvider {\n}", "public interface ConfigurationService {\n /**\n * Get configuration by key\n *\n * @param configKey\n * @return\n */\n Configuration getConfigByKey(String configKey);\n}", "@Config.LoadPolicy(Config.LoadType.MERGE)\n@Config.Sources({\n \"system:properties\",\n \"classpath:application.properties\"\n})\npublic interface ProjectConfig extends Config {\n\n @Key(\"app.hostname\")\n String hostname();\n\n @Key(\"browser.name\")\n @DefaultValue(\"chrome\")\n String browser();\n\n}", "public interface ConfigChangeSubscriber {\n String getInitValue(String key);\n void subscribe(String key);\n List<String> listKeys();\n}", "@Override\r\n public void configure(Map<String, ?> configs, boolean isKey) {\n \r\n }", "public interface IDataSourceConfiguration {\r\n\r\n\t/**\r\n\t * \r\n\t * @return Nombre del driver \r\n\t */\r\n\tpublic String getDriverName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param driverName Nombre del driver\r\n\t */\r\n\tpublic void setDriverName(String driverName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return User name de conexion\r\n\t */\r\n\tpublic String getUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName User name de conexion\r\n\t */\r\n\tpublic void setUserName(String userName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Password de conexion\r\n\t */\r\n\tpublic void setPassword(String password);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic String getUrl();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param url URL de conexion. Por ejemplo jdbc:postgresql://55.55.55.55:5432/ehcos\r\n\t */\r\n\tpublic void setUrl(String url);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Alternative User name de conexion\r\n\t */\r\n\tpublic String getAltUserName();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param userName Alternative User name de conexion\r\n\t */\r\n\tpublic void setAltUserName(String altUserName);\r\n\t\r\n\t/**\r\n\t * \r\n\t * @return Password de conexion\r\n\t */\r\n\tpublic String getAltPassword();\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param password Alternative Password de conexion\r\n\t */\r\n\tpublic void setAltPassword(String altPassword);\r\n\t\r\n}", "@Override\n\tpublic void configure(Map<String, ?> configs, boolean isKey) {\n\t}", "public interface Configuration {\n\n}", "public interface Source {\n\n /**\n * Set the system identifier for this Source.\n * <p>\n * The system identifier is optional if the source does not get its data\n * from a URL, but it may still be useful to provide one. The application\n * can use a system identifier, for example, to resolve relative URIs and to\n * include in error messages and warnings.\n * </p>\n *\n * @param systemId\n * The system identifier as a URL string.\n */\n public void setSystemId(String systemId);\n\n /**\n * Get the system identifier that was set with setSystemId.\n *\n * @return The system identifier that was set with setSystemId, or null if\n * setSystemId was not called.\n */\n public String getSystemId();\n}", "public ConfigSource getConfigSource() {\n return _configSource;\n }", "public Object lookupConfigurationEntry(String key);", "@Override\n public void configure(Map<String, ?> configs, boolean isKey) {\n }", "public interface Keys {\n\n String PUBLIC_REPOS = \"repos\";\n String USER = \"user\";\n String ID = \"id\";\n}", "@Override\n public void configure(Map<String, ?> configs, boolean isKey) {\n }", "public interface IResourceSource\n{\n /**\n * Get resource location based on resource name.\n *\n * @param name Name of resource to be searched\n * @return URL of resource\n */\n public URL getResourceLocation( String name );\n\n /**\n * Get resource locations based on resource name.\n *\n * @param name Name of resources to be searched\n * @return Enumeration of URLs of resources\n */\n public Enumeration getResourceLocations( String name );\n\n /**\n * Get resource path this resource source references. Each entry including the last must be\n * terminated with a semicolon.\n *\n * @return Resource path this resource source references\n */\n public String getResourcePath();\n}", "public abstract String getConfigurationFolderKey();", "@Override\n public PropertySource<?> locate(Environment environment) {\n return new MapPropertySource(\"secretKey\", Collections.<String, Object>singletonMap(\"auth.secret-key\", \"Sup3rS3cr37\"));\n }", "public interface ConfigurationHolder {\n\n /**\n * Gets OpenAPI Gateway host.\n *\n * @return the OpenAPI Gateway host.\n */\n public String getGatewayHost();\n\n /**\n * Gets the App ID.\n *\n * @return the App ID.\n */\n public String getAppId();\n\n /**\n * Gets the merchant number.\n *\n * @return the merchant number.\n */\n public String getMerchantNo();\n\n /**\n * Gets the message format.\n *\n * @return the message format.\n */\n public default String getFormat() {\n return Constants.FORMAT_JSON;\n }\n\n /**\n * Gets the message charset.\n *\n * @return the message charset.\n */\n public default String getCharset() {\n return Constants.CHARSET_UTF8;\n }\n\n /**\n * Gets the API version number.\n *\n * @return the API version number.\n */\n public default String getVersion() {\n return Constants.VERSION_1;\n }\n\n /**\n * Gets the language.\n *\n * @return the language.\n */\n public Language getLanguage();\n\n /**\n * Gets the signature type.\n *\n * @return the signature type.\n */\n public SignType getSignType();\n\n /**\n * Gets the public key (used by RSA only).\n *\n * @return the public key.\n */\n public String getPublicKey();\n\n /**\n * Gets the private key.\n *\n * @return the private key.\n */\n public String getPrivateKey();\n\n /**\n * Gets whether the client supports partial payment.\n * This feature is only available for Snaplii payment.\n *\n * @return true if the client supports partial payment, or false otherwise.\n */\n public boolean isPartialPaymentSupported();\n\n /**\n * Gets the prefix for generating alternative order number when making partial payment.\n *\n * @return the alternative order number prefix.\n */\n public String getAlternativeOrderNumberPrefix();\n\n /**\n * Gets the suffix for generating alternative order number when making partial payment.\n *\n * @return the alternative order number suffix.\n */\n public String getAlternativeOrderNumberSuffix();\n\n /**\n * Gets the connection timeout setting.\n *\n * @return connection timeout in seconds.\n */\n public int getConnectionTimeout();\n\n /**\n * Gets the read timeout setting.\n *\n * @return read timeout in seconds.\n */\n public int getReadTimeout();\n\n /**\n * Validates the configuration.\n *\n * @throws OpenApiConfigurationExcepiton if any configuration is missing.\n */\n public default void validate() throws OpenApiConfigurationExcepiton {\n if (StringUtils.isEmpty(getGatewayHost())) {\n throw new OpenApiConfigurationExcepiton(\"Gateway host is not configured\");\n }\n if (StringUtils.isEmpty(getAppId())) {\n throw new OpenApiConfigurationExcepiton(\"App ID is not configured\");\n }\n if (StringUtils.isEmpty(getMerchantNo())) {\n throw new OpenApiConfigurationExcepiton(\"Merchant number is not configured\");\n }\n if (StringUtils.isEmpty(getFormat())) {\n throw new OpenApiConfigurationExcepiton(\"Format is not configured\");\n }\n if (StringUtils.isEmpty(getCharset())) {\n throw new OpenApiConfigurationExcepiton(\"Charset is not configured\");\n }\n if (getLanguage() == null) {\n throw new OpenApiConfigurationExcepiton(\"Language is not configured\");\n }\n if (getSignType() == null) {\n throw new OpenApiConfigurationExcepiton(\"Signature type is not configured\");\n }\n if (StringUtils.isEmpty(getPrivateKey())) {\n throw new OpenApiConfigurationExcepiton(\"Private key is not configured\");\n }\n if (SignType.RSA == getSignType() && StringUtils.isEmpty(getPublicKey())) {\n throw new OpenApiConfigurationExcepiton(\"Public key is not configured\");\n }\n if (getConnectionTimeout() <= 0 || getConnectionTimeout() > 60) {\n throw new OpenApiConfigurationExcepiton(\"Connection timeout needs to be between 1 and 60\");\n }\n if (getReadTimeout() <= 0 || getReadTimeout() > 60) {\n throw new OpenApiConfigurationExcepiton(\"Read timeout needs to be between 1 and 60\");\n }\n }\n\n}", "public interface SshConfigStore {\n\n\t/**\n\t * Locate the configuration for a specific host request.\n\t *\n\t * @param hostName\n\t * to look up\n\t * @param port\n\t * the user supplied; <= 0 if none\n\t * @param userName\n\t * the user supplied, may be {@code null} or empty if none given\n\t * @return the configuration for the requested name.\n\t */\n\t@NonNull\n\tHostConfig lookup(@NonNull String hostName, int port, String userName);\n\n\t/**\n\t * A host entry from the ssh config. Any merging of global values and of\n\t * several matching host entries, %-substitutions, and ~ replacement have\n\t * all been done.\n\t */\n\tinterface HostConfig {\n\n\t\t/**\n\t\t * Retrieves the value of a single-valued key, or the first if the key\n\t\t * has multiple values. Keys are case-insensitive, so\n\t\t * {@code getValue(\"HostName\") == getValue(\"HOSTNAME\")}.\n\t\t *\n\t\t * @param key\n\t\t * to get the value of\n\t\t * @return the value, or {@code null} if none\n\t\t */\n\t\tString getValue(String key);\n\n\t\t/**\n\t\t * Retrieves the values of a multi- or list-valued key. Keys are\n\t\t * case-insensitive, so\n\t\t * {@code getValue(\"HostName\") == getValue(\"HOSTNAME\")}.\n\t\t *\n\t\t * @param key\n\t\t * to get the values of\n\t\t * @return a possibly empty list of values\n\t\t */\n\t\tList<String> getValues(String key);\n\n\t\t/**\n\t\t * Retrieves an unmodifiable map of all single-valued options, with\n\t\t * case-insensitive lookup by keys.\n\t\t *\n\t\t * @return all single-valued options\n\t\t */\n\t\t@NonNull\n\t\tMap<String, String> getOptions();\n\n\t\t/**\n\t\t * Retrieves an unmodifiable map of all multi- or list-valued options,\n\t\t * with case-insensitive lookup by keys.\n\t\t *\n\t\t * @return all multi-valued options\n\t\t */\n\t\t@NonNull\n\t\tMap<String, List<String>> getMultiValuedOptions();\n\n\t}\n\n\t/**\n\t * An empty {@link HostConfig}.\n\t */\n\tstatic final HostConfig EMPTY_CONFIG = new HostConfig() {\n\n\t\t@Override\n\t\tpublic String getValue(String key) {\n\t\t\treturn null;\n\t\t}\n\n\t\t@Override\n\t\tpublic List<String> getValues(String key) {\n\t\t\treturn Collections.emptyList();\n\t\t}\n\n\t\t@Override\n\t\tpublic Map<String, String> getOptions() {\n\t\t\treturn Collections.emptyMap();\n\t\t}\n\n\t\t@Override\n\t\tpublic Map<String, List<String>> getMultiValuedOptions() {\n\t\t\treturn Collections.emptyMap();\n\t\t}\n\n\t};\n}", "public interface LocalCachConfigKey {\n String localCacheMaxSize = \"localCacheMaxSize\";\n String localCacheExpireTime = \"localCacheExpireTime\";\n String localCacheEnableStat = \"localCacheEnableStat\";\n String localCacheStatInterval = \"localCacheStatInterval\";\n}", "public interface KeyPairProvider {\n\n KeyPair getJWTKey();\n\n /**\n * Get a key with the specified alias;\n * If there is no key of this alias, return\n * {@code null}\n *\n * @param alias the alias of key to load\n * @return a valid key pair or {@code null} if a key with this alias is not available\n */\n KeyPair getKey(String alias);\n}", "public Map<String, String> selfConfig(Model source, Model target) {\n\t\tMap<String, String> parameters = new HashMap<String, String>();\n\t\tparameters.putAll(selfConfigAuthority(source, target));\n\t\tparameters.putAll(selfCongfigProperties(source, target));\n\t\tlogger.info(\"Self configuration: \" + parameters);\n\t\treturn parameters;\n\t}", "@JsonProperty(\"configSource\")\n public IoK8sApiCoreV1NodeConfigSource getConfigSource() {\n return configSource;\n }", "@Override\n public Iterable<ConfigSource> getConfigSources(final ConfigSourceContext context,\n final KubernetesClientBuildConfig config) {\n boolean trustAll = getImplicitConverter(Boolean.class)\n .convert(context.getValue(\"quarkus.tls.trust-all\").getValue());\n TlsConfig tlsConfig = new TlsConfig();\n tlsConfig.trustAll = trustAll;\n KubernetesClient client = KubernetesClientUtils.createClient(config, tlsConfig);\n return new KubernetesConfigSourceFactory(client).getConfigSources(context);\n }", "public final void addKeyHandlersTo(HasAllKeyHandlers source) {\n addHandlers(source, this);\n }", "@java.lang.Override\n public com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource\n getSecretManagerKeySource() {\n if (secretSourceCase_ == 7) {\n return (com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource) secretSource_;\n }\n return com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.getDefaultInstance();\n }", "public static interface KeyValueFilter {\r\n\t}", "public interface Configuration {\n// /**\n// * 获取主分词器词库\n// * @return\n// */\n// public String getMainDic();\n// /**\n// * 获取城市词路径\n// * @return String 城市词路径\n// */\n// public String getCityDicionary();\n\n /**\n * 获取城区词路径\n *\n * @return String 获取城区词路径\n */\n public String getRegionDicionary();\n\n /**\n * 获取\"工程师\"类词库路径\n *\n * @return String \"工程师\"类词库路径\n */\n public String getTheoremDicionary();\n\n /**\n * 获取\"总工程师\"类词库路径\n *\n * @return String \"总工程师\"类词库路径\n */\n public String getEngineerDicionary();\n\n /**\n * 获取垃圾类词库路径\n *\n * @return String 垃圾类词库路径\n */\n public String getConjunctionDicionary();\n\n /**\n * 获取多义类词库路径\n *\n * @return String 多义词库路径\n */\n public String getPolysemyDicionary();\n\n /**\n * 获取多职位前词库路径\n *\n * @return String 多职位前词库路径\n */\n public String getManagerDicionary();\n\n /**\n * 获取多职位后词库路径\n *\n * @return String 多职位后词库路径\n */\n public String getAssistantDicionary();\n\n /**\n * 获取数字词库路径\n *\n * @return String 数字词库路径\n */\n public String getNumberDicionary();\n\n /**\n * 获取无用词词库路径\n *\n * @return String 无用词词库路径\n */\n public String getWorthlessDicionary();\n\n /**\n * 获取标签词词库路径\n *\n * @return String 标签词词库路径\n */\n public String getTagDicionary();\n\n /**\n * 获取公司性质词词库路径\n *\n * @return String 公司性质词词库路径\n */\n public String getCorporationDicionary();\n// /**\n// * 获取ik分词器的主路径\n// * @return\n// */\n// public String getIkMainFilePath();\n\n}", "public FileBasedConfigSource() {\n // Intentionally empty.\n }", "public com.google.api.servicemanagement.v1.ConfigSourceOrBuilder getConfigSourceOrBuilder() {\n return getConfigSource();\n }", "public SourceTypeConfiguration() {\n\n\t}", "public interface SKey {\n\n String FAIL_STORE = \"job.fail.store\";\n\n String LOADBALANCE = \"loadbalance\";\n\n String EVENT_CENTER = \"event.center\";\n\n String REMOTING = \"lts.remoting\";\n\n String REMOTING_SERIALIZABLE_DFT = \"lts.remoting.serializable.default\";\n\n String ZK_CLIENT_KEY = \"zk.client\";\n\n String JOB_ID_GENERATOR = \"id.generator\";\n\n String JOB_LOGGER = \"job.logger\";\n\n String JOB_QUEUE = \"job.queue\";\n}", "public Map<String, Boolean> getNamesOfConfigurationSources() {\n\t\tfinal Map<String, Boolean> result = new LinkedHashMap<String, Boolean>();\n\t\tfor (ConfigurationSource configurationSource : configurationSources) {\n\t\t\tresult.put(configurationSource.getName(), configurationSource.isSavingPossible());\n\t\t}\n\t\treturn result;\n\t}", "public interface ConfigurationManager {\n\n String loadRunAsUser();\n\n void storeRunAsUser(String username);\n\n List<String> loadEnabledProjects();\n\n void storeEnabledProjects(List<String> projectKeys);\n\n Map<String, String> loadBranchFilters();\n \n void storeBranchFilters(Map<String, String> branchFilters);\n \n /**\n * @since v1.2\n */\n Collection<String> loadCrucibleUserNames();\n\n /**\n * @since v1.2\n */\n void storeCrucibleUserNames(Collection<String> usernames);\n\n /**\n * @since v1.3\n */\n Collection<String> loadCrucibleGroups();\n\n /**\n * @since v1.3\n */\n void storeCrucibleGroups(Collection<String> groupnames);\n\n CreateMode loadCreateMode();\n\n void storeCreateMode(CreateMode mode);\n\n /**\n * @since v1.4.1\n */\n boolean loadIterative();\n\n /**\n * @since v1.4.1\n */\n void storeIterative(boolean iterative);\n}", "public interface PrcseSource extends Connectable {\n\n\tpublic abstract ArrayList<Object> getFrontPage() throws Exception;\n\t\n\tpublic abstract CustomerInfo login(CustomerInfo request) throws Exception;\n\n\tpublic abstract CustomerInfo syncCustomer(CustomerInfo request) throws Exception;\n\t\n\tpublic abstract CustomerForm getCustomerFormData(CustomerForm request) throws Exception;\n\t\n\tpublic abstract CustomerBooking createBooking(CustomerBooking request) throws Exception;\n\t\n\tpublic abstract CustomerBooking cancelBooking(CustomerBooking request) throws Exception;\n\n\tpublic abstract ArrayList<HashMap<Long, SeatingArea>> getEventSeatingMap(long eventId) throws Exception;\n\n\tpublic abstract AvailableSeats getEventAvailability(AvailableSeats request) throws Exception;\n}", "public interface PacketFormatKeyContext {\n\n}", "interface HostConfig {\n\n\t\t/**\n\t\t * Retrieves the value of a single-valued key, or the first if the key\n\t\t * has multiple values. Keys are case-insensitive, so\n\t\t * {@code getValue(\"HostName\") == getValue(\"HOSTNAME\")}.\n\t\t *\n\t\t * @param key\n\t\t * to get the value of\n\t\t * @return the value, or {@code null} if none\n\t\t */\n\t\tString getValue(String key);\n\n\t\t/**\n\t\t * Retrieves the values of a multi- or list-valued key. Keys are\n\t\t * case-insensitive, so\n\t\t * {@code getValue(\"HostName\") == getValue(\"HOSTNAME\")}.\n\t\t *\n\t\t * @param key\n\t\t * to get the values of\n\t\t * @return a possibly empty list of values\n\t\t */\n\t\tList<String> getValues(String key);\n\n\t\t/**\n\t\t * Retrieves an unmodifiable map of all single-valued options, with\n\t\t * case-insensitive lookup by keys.\n\t\t *\n\t\t * @return all single-valued options\n\t\t */\n\t\t@NonNull\n\t\tMap<String, String> getOptions();\n\n\t\t/**\n\t\t * Retrieves an unmodifiable map of all multi- or list-valued options,\n\t\t * with case-insensitive lookup by keys.\n\t\t *\n\t\t * @return all multi-valued options\n\t\t */\n\t\t@NonNull\n\t\tMap<String, List<String>> getMultiValuedOptions();\n\n\t}", "public String buildConfigurationSourceOptions(String selectedSource) throws BaseException {\n listProductsCommand.invoke();\n\n List<String> sources = Arrays.asList(PreferencesAdaptor.CONFIGURE_BY_PREFERENCES, PreferencesAdaptor.CONFIGURE_BY_REQUEST, PreferencesAdaptor.CONFIGURE_BY_SESSION);\n\n listToOptionCommand.setOptionsArg(sources);\n listToOptionCommand.setSelectedArg(selectedSource);\n listToOptionCommand.setUnknownOptionArg(\"Source?\");\n listToOptionCommand.invoke();\n\n return listToOptionCommand.getOptionMarkupRet();\n }", "public interface ExternalDirectoryConfig\n{\n}", "public interface Config {\n\n /**\n * Converts the config into a Map\n *\n * @param deep If true, instead of putting Maps for subconfigs,\n * use the full path using the separator character to split\n * @return This config as a Map\n */\n Map<String, Object> getValues(boolean deep);\n\n /**\n * @param path The path to check\n * @return If the config contains an item at path\n */\n boolean contains(String path);\n\n /**\n * Load the values from the map into this config.\n *\n * @param values The map to load in.\n */\n default void setAll(Map<String, Object> values) {\n for (String path : values.keySet()) {\n set(path, values.get(path));\n }\n }\n\n /**\n * Sets the value at path to value\n *\n * @param path The path to put the value\n * @param value The value\n * @return The modified config object, to allow for chain calls\n */\n Config set(String path, Object value);\n\n default void setAll(Config values) {\n for (String path : values.getKeys(true)) {\n set(path, values.get(path));\n }\n }\n\n /**\n * @param deep Should full paths be returned for keys in subconfigs, separated by the separator character?\n * @return The keys that have values in this config\n */\n Set<String> getKeys(boolean deep);\n\n /**\n * Finds and retrieves the object at the given path. If the path is empty, returns this object.\n *\n * @param path The path of the object\n * @return The object at the given path, or null if not found\n */\n default Object get(String path) {\n return get(path, null);\n }\n\n /**\n * Gets the raw value this config contains at path, returning the placeholder def is nothing is found.\n *\n * @param path The path to get the value at\n * @param def The placeholder if no value is found at path, e.g. {@code null}\n * @return The raw object contained at path, or def if nothing is there.\n */\n Object get(String path, Object def);\n\n /**\n * @return The separator character.\n */\n char getSeparator();\n\n /**\n *\n * @return toString() of the object at the path, or null if there is none\n */\n default String getString(String path) {\n return getString(path, null);\n }\n\n /**\n *\n * @return toString() of the object at the path, or def if there is none\n */\n default String getString(String path, String def) {\n Object obj = get(path);\n\n if (obj != null) return obj.toString();\n else return def;\n }\n\n /**\n *\n * @return If there is a String stored at the given path\n */\n default boolean isString(String path) {\n return get(path) instanceof String;\n }\n\n /**\n *\n * @return The int value of the number stored at the path, or 0 if there is none\n */\n default int getInt(String path) {\n return getInt(path, 0);\n }\n\n /**\n * @return The int value of the number stored at the path, or def if there is none\n */\n default int getInt(String path, int def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).intValue();\n else return def;\n }\n\n /**\n *\n * @return If the object at the path is an instance of Integer\n */\n default boolean isInt(String path) {\n return get(path) instanceof Integer;\n }\n\n /**\n *\n * @return The short value of the number stored at the path, or 0 if there is none\n */\n default short getShort(String path) {\n return getShort(path, 0);\n }\n\n /**\n * @return The short value of the number stored at the path, or def if there is none\n */\n default short getShort(String path, int def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).shortValue();\n else return (short) def;\n }\n\n /**\n *\n * @return If the object at the path is an instance of Short\n */\n default boolean isShort(String path) {\n return get(path) instanceof Short;\n }\n\n /**\n *\n * @return True if the boolean true is stored at path, otherwise false\n */\n default boolean getBoolean(String path) {\n return getBoolean(path, false);\n }\n\n /**\n * @return The boolean value stored at path, or def is there is none\n */\n default boolean getBoolean(String path, boolean def) {\n Object obj = get(path);\n\n if (obj instanceof Boolean) return (Boolean) obj;\n else return def;\n }\n\n /**\n * @return If there is a boolean stored at path\n */\n default boolean isBoolean(String path) {\n return get(path) instanceof Boolean;\n }\n\n default boolean isNumber(String path) {\n return get(path) instanceof Number;\n }\n\n default double getDouble(String path) {\n return getDouble(path, 0.0d);\n }\n\n default double getDouble(String path, double def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).doubleValue();\n else return def;\n }\n\n default boolean isDouble(String path) {\n return get(path) instanceof Double;\n }\n\n default BigDecimal getBigDecimal(String path) {\n return getBigDecimal(path, BigDecimal.ZERO);\n }\n\n default BigDecimal getBigDecimal(String path, BigDecimal def) {\n Object obj = get(path);\n\n if (obj instanceof Number) {\n if (obj instanceof BigDecimal) {\n return (BigDecimal) obj;\n } else if (obj instanceof BigInteger) {\n return new BigDecimal((BigInteger) obj);\n } else {\n return BigDecimal.valueOf(((Number) obj).doubleValue());\n }\n } else return def;\n }\n\n default boolean isBigDecimal(String path) {\n return get(path) instanceof BigDecimal;\n }\n\n default long getLong(String path) {\n return getLong(path, 0L);\n }\n\n default long getLong(String path, long def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).longValue();\n else return def;\n }\n\n default boolean isLong(String path) {\n return get(path) instanceof Long;\n }\n\n default byte[] getByteArray(String path) {\n return getByteArray(path, new byte[0]);\n }\n\n default byte[] getByteArray(String path, byte[] def) {\n Object obj = get(path);\n\n if (obj instanceof byte[]) return (byte[]) obj;\n else return def;\n }\n\n default boolean isByteArray(String path) {\n return get(path) instanceof byte[];\n }\n\n default List<String> getStringList(String path) {\n return getList(path, String.class);\n }\n\n default <T> List<T> getList(String path, Class<T> clazz) {\n return getList(path, new ArrayList<>(), clazz);\n }\n\n @SuppressWarnings(\"unchecked\")\n default <T> List<T> getList(String path, List<T> def, Class<T> clazz) {\n Object obj = get(path);\n\n if (!(obj instanceof Collection<?>)) return def;\n\n Collection<?> input = (Collection<?>) obj;\n List<T> result = new ArrayList<>();\n\n for (Object o : input) {\n if (!clazz.isInstance(o)) continue;\n\n result.add((T) o);\n }\n\n return result;\n }\n\n default List<Config> getConfigList(String path) {\n return getList(path, Config.class);\n }\n\n default boolean isList(String path) {\n return get(path) instanceof List<?>;\n }\n\n /**\n * @param path The path to check for a list\n * @param type The type that the list should contain\n * @return If there is a list at this path and it contains an object with the type {@code type}\n */\n default boolean isList(String path, Class<?> type) {\n if (!isList(path)) return false;\n\n List<?> list = getList(path, null, type);\n\n return list != null && !list.isEmpty();\n }\n\n default Config getConfigOrNull(String path) {\n Object obj = get(path);\n\n if (!(obj instanceof Config)) return null;\n else return (Config) obj;\n }\n\n Config getConfigOrEmpty(String path);\n\n default boolean isConfig(String path) {\n return get(path) instanceof Config;\n }\n\n /**\n * Modifies the fields of the object passed in to the values specified in this config.\n *\n * @param object The object to modify the fields of.\n * @param <T> The type of the object\n * @return The (now modified) object\n */\n default <T> T getAllFields(T object) {\n Field[] fields = object.getClass().getDeclaredFields();\n\n for (Field field : fields) {\n field.setAccessible(true);\n\n if (Modifier.isStatic(field.getModifiers())) continue;\n if (Modifier.isTransient(field.getModifiers())) continue;\n\n if (!contains(field.getName())) continue;\n\n try {\n if (field.getType().equals(double.class)) {\n if (!isNumber(field.getName())) continue;\n field.setDouble(object, getDouble(field.getName()));\n } else if (field.getType().equals(float.class)) {\n if (!isNumber(field.getName())) continue;\n field.setFloat(object, (float) getDouble(field.getName()));\n } else if (field.getType().equals(int.class)) {\n if (!isNumber(field.getName())) continue;\n field.setInt(object, getInt(field.getName()));\n } else if (field.getType().equals(boolean.class)) {\n if (!isBoolean(field.getName())) continue;\n field.setBoolean(object, getBoolean(field.getName()));\n } else if (field.getType().equals(long.class)) {\n if (!isNumber(field.getName())) continue;\n field.setLong(object, getLong(field.getName()));\n } else if (field.getType().equals(short.class)) {\n if (!isNumber(field.getName())) continue;\n field.setShort(object, (short) getInt(field.getName()));\n } else if (field.getType().equals(byte.class)) {\n if (!isNumber(field.getName())) continue;\n field.setByte(object, (byte) getInt(field.getName()));\n } else {\n Object newValue = getType(field.getName(), field.getType());\n if (newValue == null) continue;\n\n field.set(object, newValue);\n }\n\n } catch (IllegalAccessException e) {\n //This should not happen hopefully.\n e.printStackTrace();\n }\n }\n\n return object;\n }\n\n /**\n * Loads the fields of the object into this config.\n *\n * @param object The object itself\n * @param <T> The type of object\n * @return The object, again\n */\n default <T> T setAllFields(T object) {\n Field[] fields = object.getClass().getDeclaredFields();\n\n for (Field field : fields) {\n field.setAccessible(true);\n\n if (Modifier.isStatic(field.getModifiers()) || Modifier.isTransient(field.getModifiers())) continue;\n\n try {\n set(field.getName(), field.get(object));\n } catch (IllegalAccessException e) {\n //hopefully we will be fine\n e.printStackTrace();\n }\n }\n\n return object;\n }\n\n default <T> T getType(String path, Class<T> type) {\n return getType(path, null, type);\n }\n\n @SuppressWarnings(\"unchecked\")\n default <T> T getType(String path, T def, Class<T> type) {\n Object obj = get(path);\n\n if (!type.isInstance(obj)) return def;\n return (T) obj;\n }\n}", "public interface SupportedConfigurationProperties {\n interface Client {\n String ASK_SERVER_FOR_REPORTS = \"rtest.client.askServerForReports\";\n String SERVER_PORT = \"rtest.client.serverPort\";\n String SERVER_HOST = \"rtest.client.serverHost\";\n String REPORT_DIR = \"rtest.client.reportDir\";\n String MAX_CONNECTION_WAIT_PERIOD = \"rtest.client.maxConnectionWaitPeriodMs\";\n }\n}", "public interface KeyLoader {\n\n <T> T getKey();\n\n}", "@java.lang.Override\n public com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource\n getSecretManagerKeySource() {\n if (secretManagerKeySourceBuilder_ == null) {\n if (secretSourceCase_ == 7) {\n return (com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource)\n secretSource_;\n }\n return com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource\n .getDefaultInstance();\n } else {\n if (secretSourceCase_ == 7) {\n return secretManagerKeySourceBuilder_.getMessage();\n }\n return com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource\n .getDefaultInstance();\n }\n }", "public interface ProducerPropsKeys {\n\n public static String KAFKA_PRODUCER_CONFIG = \"kafka.producer.config\";\n\n public static String KAFKA_MESSAGE_SCHEMA = \"kafka.message.schema\";\n\n}", "protected void configEvent(String[] aKey) {}", "public abstract Configuration configuration();", "public interface IKeysDelegator {\n /**\n * Get a map of the Perforce server's keys.\n *\n * @param opts GetKeysOptions object describing optional parameters; if null,\n * no options are set.\n * @return a non-null (but possibly empty) map of keys.\n * @throws P4JavaException if an error occurs processing this method and its parameters.\n * @since 2013.1\n */\n Map<String, String> getKeys(GetKeysOptions opts) throws P4JavaException;\n}", "@ThreadSafe\n interface KeyFilter<K> {\n\n public static final KeyFilter LOAD_ALL_FILTER = new KeyFilter() {\n @Override\n public boolean shouldLoadKey(Object key) {\n return true;\n }\n };\n\n boolean shouldLoadKey(K key);\n }", "@Override\n\tpublic Iterator getKeyIterator() {\n\t\treturn new KeyIterator();\n\t}", "@java.lang.Override\n public com.google.cloud.video.livestream.v1.Encryption.SecretManagerSourceOrBuilder\n getSecretManagerKeySourceOrBuilder() {\n if (secretSourceCase_ == 7) {\n return (com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource) secretSource_;\n }\n return com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.getDefaultInstance();\n }", "String[] supportedKeys();", "@java.lang.Override\n public boolean hasSecretManagerKeySource() {\n return secretSourceCase_ == 7;\n }", "public interface DataSourceFromParallelCollection extends DataSource{\n\n public static final String SPLITABLE_ITERATOR = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_SPLIT_ITERATOR;\n\n public static final String CLASS = Constants.DATA_SOURCE_FROM_PARALLEL_COLLECTION_CLASS;\n\n\n}", "@java.lang.Override\n public boolean hasSecretManagerKeySource() {\n return secretSourceCase_ == 7;\n }", "public interface ConfigureConfiguration {\n\n\t// A list of names of configuration files\n\t@Option(shortName=\"c\", description = \"Name of one or many configuration \"\n\t\t+ \"files. Parameters in configuration files override each other. If a\"\n\t\t+ \" parameter is provided in more than one file, the first occurrence \"\n\t\t+ \" is used.\"\n\t) \n\tList<File> getConf();\n\tboolean isConf();\n\t\n}", "interface WithSource {\n /**\n * Specifies the source property: Source of the event channel. This represents a unique resource in the\n * partner's resource model..\n *\n * @param source Source of the event channel. This represents a unique resource in the partner's resource\n * model.\n * @return the next definition stage.\n */\n WithCreate withSource(EventChannelSource source);\n }", "public static Iterator getKeys() {\n\t\tConfigManager cg = getConfigManager(null);\n\t\tIterator returnValue = null;\n\t\tif (cg != null) {\n\t\t\treturnValue = cg.getConfig().getKeys();\n\t\t}\n\t\treturn returnValue;\n\t}", "public abstract List<String> getAllKeys();", "public interface FileSystemConfig {\n\n}", "public NodeKey createNodeKeyWithSource( String sourceName );", "public interface DuckSourceRemote {\n\n\t/**\n\t * Provides the controller with the configuration\n\t * @param duckConfiguration\n\t * @return This object\n\t */\n\tpublic DuckSourceRemote setDuckConfiguration(DuckConfiguration duckConfiguration);\n\t\n\t/**\n\t * Sets the security object\n\t * @param duckSecurity Object to encrypt and decrypt \n\t * @return This object\n\t */\n\tpublic DuckSourceRemote setDuckSecurity(DuckSecurity duckSecurity);\n\t\n\t/**\n\t * Sets the logger object\n\t * @param duckLog Logger\n\t * @return This object\n\t */\n\tpublic DuckSourceRemote setDuckLog(DuckLog duckLog);\n\t\n\t/**\n\t * Extracts needed information from the configuration\n\t */\n\tpublic DuckSourceRemote initialize() throws Exception;\n\t\n\t/**\n\t * Retrieves a range of keys from another duck\n\t * @param duckRequest Requested key range\n\t * @return Response from source\n\t * @throws Exception Error\n\t */\n\tpublic DuckRange get(DuckRequest duckRequest) throws Exception;\n}", "public static interface ISourceFunctions extends IDynamicResourceExtension {\r\n\r\n @IDynamicResourceExtension.MethodId(\"4b8d7404-c58d-11e5-aeea-1db9268c0ee9\")\r\n public java.lang.String GetId();\r\n\r\n @IDynamicResourceExtension.MethodId(\"43b904fe-c97a-11e5-a64e-a5d84d8f1b45\")\r\n public List<cleon.architecturemethods.eamod.metamodel.spec.chrv.sources.javamodel.ISource> GetAllSources();\r\n\r\n @IDynamicResourceExtension.MethodId(\"88b17f27-c992-11e5-b35b-8fb753dd0798\")\r\n public java.lang.String GetTypeName();\r\n\r\n @IDynamicResourceExtension.MethodId(\"b217619b-7c0b-11e6-a6f8-61123cfa9fd9\")\r\n public java.lang.String GetName();\r\n\r\n @IDynamicResourceExtension.MethodId(\"769bc163-38e7-11e8-8c35-85f8e4a22f42\")\r\n public List<cleon.architecturemethods.eamod.metamodel.spec.chrv.sources.javamodel.ISourceAware> GetAllUsedSourceAware();\r\n\r\n @IDynamicResourceExtension.MethodId(\"0e17d013-ea68-11e8-8092-1f65b9544bbd\")\r\n public java.lang.String GetCascadingName();\r\n\r\n }", "public interface ResourceConfig {\n\n public ResourceBundle config = ResourceBundle.getBundle(\"resource-config\");\n\n public String DEFAULT_LOCALE = config.getString(\"defaultLocale\");\n\n public String EXCEPTION_MESSAGE_PREFIX = config.getString(\"exception_message_prefix\");\n\n public boolean VALUE_NEED_ENCODE = new Boolean(config.getString(\"stringEncode\")).booleanValue();\n\n public String SOURCE_ENCODE = config.getString(\"sourceEncode\");\n\n public String TARGET_ENCODE = config.getString(\"targetEncode\");\n\n public String LOCALE_LIST = config.getString(\"localeList\");\n\n public String RESOURCEBOX_FILES = config.getString(\"resourcebox_files\");\n\n public String CONSTANTS_FILES = config.getString(\"constants_files\");\n\n}", "public interface IConfiguration extends ISessionAwareObject {\n\n\tString ENV_SOPECO_HOME = \"SOPECO_HOME\";\n\n\tString CONF_LOGGER_CONFIG_FILE_NAME = \"sopeco.config.loggerConfigFileName\";\n\n\tString CONF_SCENARIO_DESCRIPTION_FILE_NAME = \"sopeco.config.measurementSpecFileName\";\n\n\tString CONF_SCENARIO_DESCRIPTION = \"sopeco.config.measurementSpecification\";\n\n\tString CONF_MEASUREMENT_CONTROLLER_URI = \"sopeco.config.measurementControllerURI\";\n\n\tString CONF_MEASUREMENT_CONTROLLER_CLASS_NAME = \"sopeco.config.measurementControllerClassName\";\n\n\tString CONF_APP_NAME = \"sopeco.config.applicationName\";\n\n\tString CONF_MAIN_CLASS = \"sopeco.config.mainClass\";\n\n\tString CONF_MEC_ACQUISITION_TIMEOUT = \"sopeco.config.MECAcquisitionTimeout\";\n\n\n\tString CONF_MEC_SOCKET_RECONNECT_DELAY = \"sopeco.config.mec.reconnectDelay\";\n\n\tString CONF_HTTP_PROXY_HOST = \"sopeco.config.httpProxyHost\";\n\t\n\tString CONF_HTTP_PROXY_PORT = \"sopeco.config.httpProxyPort\";\n\n\t\n\tString CONF_DEFINITION_CHANGE_HANDLING_MODE = \"sopeco.config.definitionChangeHandlingMode\";\n\tString DCHM_ARCHIVE = \"archive\";\n\tString DCHM_DISCARD = \"discard\";\n\n\tString CONF_SCENARIO_DEFINITION_PACKAGE = \"sopeco.config.xml.scenarioDefinitionPackage\";\n\t/** Holds the path to the root folder of SoPeCo. */\n\tString CONF_APP_ROOT_FOLDER = \"sopeco.config.rootFolder\";\n\tString CONF_EXPERIMENT_EXECUTION_SELECTION = \"sopeco.engine.experimentExecutionSelection\";\n\t/**\n\t * Holds the path to the plugins folder, relative to the root folder of\n\t * SoPeCo.\n\t */\n\tString CONF_PLUGINS_DIRECTORIES = \"sopeco.config.pluginsDirs\";\n\n\tString CLA_EXTENSION_ID = \"org.sopeco.config.commandlinearguments\";\n\n\t/** Folder for configuration files relative to the application root folder */\n\tString DEFAULT_CONFIG_FOLDER_NAME = \"config\";\n\n\tString DEFAULT_CONFIG_FILE_NAME = \"sopeco-defaults.conf\";\n\n\tString DIR_SEPARATOR = \":\";\n\t\n\tString EXPERIMENT_RUN_ABORT = \"org.sopeco.experiment.run.abort\";\n\n\t/**\n\t * Export the configuration as a key-value map. Both, the default ones and the ones in the\n\t * system environment are included.\n\t * \n\t * @return a key-value representation of the configuration\n\t * \n\t * @deprecated Use {@code exportConfiguration()} and {@code exportDefaultConfiguration}.\n\t */\n\t@Deprecated\n\tMap<String, Object> getProperties();\n\t\n\t/**\n\t * Exports the configuration as a key-value map. The default configuration and the ones\n\t * defined in the system environment are not included. \n\t * \n\t * @return a key-value representation of the configuration\n\t */\n\tMap<String, Object> exportConfiguration();\n\t\n\t/**\n\t * Exports the default configuration as a key-value map. The actual configuration and the ones\n\t * defined in the system environment are not included. \n\t * \n\t * @return a key-value representation of the configuration\n\t */\n\tMap<String, Object> exportDefaultConfiguration();\n\t\n\t/**\n\t * Imports the configuration as a key-value map. \n\t * \n\t * @param config a key-value map representation of the configuration\n\t */\n\tvoid importConfiguration(Map<String, Object> config);\n\t\n\t/**\n\t * Imports the default configuration as a key-value map. \n\t * \n\t * @param config a key-value map representation of the configuration\n\t */\n\tvoid importDefaultConfiguration(Map<String, Object> config);\n\t\n\t/**\n\t * Overwrites the configuration with the given configuration. \n\t * \n\t * @param config a key-value map representation of the configuration\n\t */\n\tvoid overwriteConfiguration(Map<String, Object> config);\n\t\n\t/**\n\t * Overwrites the default configuration with the given configuration. \n\t * \n\t * @param config a key-value map representation of the default configuration\n\t */\n\tvoid overwriteDefaultConfiguration(Map<String, Object> config);\n\t\n\t/**\n\t * Returns the configured value of the given property in SoPeCo.\n\t * \n\t * It first looks up the current SoPeCo configuration, if there is no value\n\t * defined there, looks up the system properties, if no value is defined\n\t * there, then loads it from the default values; in case of no default\n\t * value, returns null.\n\t * \n\t * @param key\n\t * property key\n\t * @return Returns the configured value of the given property in SoPeCo.\n\t */\n\tObject getProperty(String key);\n\n\t/**\n\t * Returns the configured value of the given property as a String.\n\t * \n\t * This method calls the {@link Object#toString()} of the property value and\n\t * is for convenience only. If the given property is not set, it returns\n\t * <code>null</code>.\n\t * \n\t * @param key\n\t * property key\n\t * \n\t * @see #getProperty(String)\n\t * @return Returns the configured value of the given property as a String.\n\t */\n\tString getPropertyAsStr(String key);\n\n\t/**\n\t * Returns the configured value of the given property as a Boolean value.\n\t * \n\t * This method uses the {@link #getPropertyAsStr(String)} and interprets\n\t * values 'yes' and 'true' (case insensitive) as a Boolean <code>true</code>\n\t * value and all other values as <code>false</code>. If the value of the\n\t * given property is <code>null</code> it returns the passed default value.\n\t * \n\t * @param key\n\t * property key\n\t * @param defaultValue\n\t * the default value returned in case of a null property value\n\t * \n\t * @return the value of the given property as a boolean\n\t * \n\t * @see #getProperty(String)\n\t */\n\tboolean getPropertyAsBoolean(String key, boolean defaultValue);\n\n\t/**\n\t * Returns the configured value of the given property as a Long value.\n\t * \n\t * This method uses the {@link Long.#parseLong(String)} to interpret the\n\t * values. If the value of the given property is <code>null</code> it\n\t * returns the passed default value.\n\t * \n\t * @param key\n\t * property key\n\t * @param defaultValue\n\t * the default value returned in case of a null property value\n\t * \n\t * @return the value of the given property as a long\n\t * \n\t * @see #getProperty(String)\n\t */\n\tlong getPropertyAsLong(String key, long defaultValue);\n\n\t/**\n\t * Returns the configured value of the given property as a Double value.\n\t * \n\t * This method uses the {@link Double.#parseLong(String)} to interpret the\n\t * values. If the value of the given property is <code>null</code> it\n\t * returns the passed default value.\n\t * \n\t * @param key\n\t * property key\n\t * @param defaultValue\n\t * the default value returned in case of a null property value\n\t * \n\t * @return the value of the given property as a double\n\t * \n\t * @see #getProperty(String)\n\t */\n\tdouble getPropertyAsDouble(String key, double defaultValue);\n\n\t/**\n\t * Returns the configured value of the given property as an Integer value.\n\t * \n\t * This method uses the {@link Integer.#parseInt(String)} to interpret the\n\t * values. If the value of the given property is <code>null</code> it\n\t * returns the passed default value.\n\t * \n\t * @param key\n\t * property key\n\t * @param defaultValue\n\t * the default value returned in case of a null property value\n\t * \n\t * @return the value of the given property as an int\n\t * \n\t * @see #getProperty(String)\n\t */\n\tint getPropertyAsInteger(String key, int defaultValue);\n\n\t/**\n\t * Sets the value of a property for the current run.\n\t * \n\t * @param key\n\t * property key\n\t * @param value\n\t * property value\n\t */\n\tvoid setProperty(String key, Object value);\n\n\t/**\n\t * Clears the value of the given property in all layers of configuration,\n\t * including the system property environment.\n\t * \n\t * @param key the property\n\t */\n\tvoid clearProperty(String key);\n\n\t/**\n\t * Returns the default value (ignoring the current runtime configuration)\n\t * for a given property.\n\t * \n\t * @param key\n\t * porperty key\n\t * \n\t * @return Returns the default value for a given property.\n\t */\n\tObject getDefaultValue(String key);\n\n\t/**\n\t * Processes the given command line arguments, the effects of which will\n\t * reflect in the global property values.\n\t * \n\t * @param args\n\t * command line arguments\n\t * @throws ConfigurationException\n\t * if there is any problem with command line arguments\n\t */\n\tvoid processCommandLineArguments(String[] args) throws ConfigurationException;\n\n\t/**\n\t * Loads default configurations from a file name. If the file name is not an\n\t * absolute path, the file is searched in the following places:\n\t * <ol>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory,</li>\n\t * <li>current folder,</li>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory in classpath,</li>\n\t * <li>and finaly the classpath.</li>\n\t * </ol>\n\t * where classpath is determined by the system class loader. See\n\t * {@link #loadDefaultConfiguration(ClassLoader, String)} for loading\n\t * default configuration providing a class loader.\n\t * \n\t * The configuration is loaded in an incremental fashion; i.e., the loaded\n\t * configuration will be added to (and overriding) the existing default\n\t * configuration.\n\t * <p>\n\t * See {@link #getAppRootDirectory()} and {@link #getDefaultValue(String)}.\n\t * \n\t * @param fileName\n\t * the name of a properties file\n\t * @throws ConfigurationException\n\t * if initializing the configuration fails\n\t * \n\t */\n\tvoid loadDefaultConfiguration(String fileName) throws ConfigurationException;\n\n\t/**\n\t * Loads default configurations from a file name. If the file name is not an\n\t * absolute path, the file is searched in the following places:\n\t * <ol>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory,</li>\n\t * <li>current folder,</li>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory in classpath,</li>\n\t * <li>and finaly the classpath.</li>\n\t * </ol>\n\t * where classpath is determined by the given class loader.\n\t * \n\t * The configuration is loaded in an incremental fashion; i.e., the loaded\n\t * configuration will be added to (and overriding) the existing default\n\t * configuration.\n\t * <p>\n\t * See {@link #getAppRootDirectory()} and {@link #getDefaultValue(String)}.\n\t * \n\t * @param classLoader\n\t * an instance of a class loader\n\t * @param fileName\n\t * the name of a properties file\n\t * @throws ConfigurationException\n\t * if initializing the configuration fails\n\t */\n\tvoid loadDefaultConfiguration(ClassLoader classLoader, String fileName) throws ConfigurationException;\n\n\t/**\n\t * Loads user-level configurations from a file name. If the file name is not\n\t * an absolute path, the file is searched in the following places:\n\t * <ol>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory,</li>\n\t * <li>current folder,</li>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory in classpath,</li>\n\t * <li>and finaly the classpath.</li>\n\t * </ol>\n\t * where classpath is determined by the system class loader. See\n\t * {@link #loadConfiguration(ClassLoader, String)} for loading default\n\t * configuration providing a class loader.\n\t * \n\t * The configuration is loaded in an incremental fashion; i.e., the loaded\n\t * configuration will be added to (and overriding) the existing default\n\t * configuration.\n\t * <p>\n\t * See {@link #getAppRootDirectory()} and {@link #getDefaultValue(String)}.\n\t * \n\t * @param fileName\n\t * the name of a properties file\n\t * @throws ConfigurationException\n\t * if initializing the configuration fails\n\t */\n\tvoid loadConfiguration(String fileName) throws ConfigurationException;\n\n\t/**\n\t * Loads user-level configurations from a file name. If the file name is not\n\t * an absolute path, the file is searched in the following places:\n\t * <ol>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory,</li>\n\t * <li>current folder,</li>\n\t * <li>the {@value #DEFAULT_CONFIG_FOLDER_NAME} directory in classpath,</li>\n\t * <li>and finally the classpath.</li>\n\t * </ol>\n\t * where classpath is determined by the given class loader.\n\t * \n\t * The configuration is loaded in an incremental fashion; i.e., the loaded\n\t * configuration will be added to (and overriding) the existing default\n\t * configuration.\n\t * <p>\n\t * See {@link #getAppRootDirectory()} and {@link #getDefaultValue(String)}.\n\t * \n\t * @param classLoader\n\t * an instance of a class loader\n\t * @param fileName\n\t * the name of a properties file\n\t * @throws ConfigurationException\n\t * if initializing the configuration fails\n\t */\n\tvoid loadConfiguration(ClassLoader classLoader, String fileName) throws ConfigurationException;\n\n\t/**\n\t * Performs any post processing of configuration settings that may be\n\t * required.\n\t * \n\t * This method can be called after manually making changes to the\n\t * configuration values. It should be called automatically after a call to\n\t * {@link IConfiguration#loadConfiguration(String)}.\n\t */\n\tvoid applyConfiguration();\n\n\t/**\n\t * Sets the value of scenario description file name.\n\t * \n\t * @param fileName\n\t * file name\n\t * @see #CONF_SCENARIO_DESCRIPTION_FILE_NAME\n\t */\n\tvoid setScenarioDescriptionFileName(String fileName);\n\n\t/**\n\t * Sets the sceanrio description as the given object. This property in\n\t * effect overrides the value of scenario description file name (\n\t * {@link IConfiguration#CONF_SCENARIO_DESCRIPTION_FILE_NAME}).\n\t * \n\t * @param sceanrioDescription\n\t * an instance of a scenario description\n\t * @see #CONF_SCENARIO_DESCRIPTION\n\t */\n\tvoid setScenarioDescription(Object sceanrioDescription);\n\n\t/**\n\t * Sets the measurement controller URI.\n\t * \n\t * @param uriStr\n\t * a URI as an String\n\t * @throws ConfigurationException\n\t * if initializing the configuration fails\n\t * @see #CONF_MEASUREMENT_CONTROLLER_URI\n\t */\n\tvoid setMeasurementControllerURI(String uriStr) throws ConfigurationException;\n\n\t/**\n\t * Sets the measurement controller class name. This also sets the\n\t * measurement controller URI to be '<code>class://[CLASS_NAME]</code>'.\n\t * \n\t * @param className\n\t * the full name of the class\n\t * @see #CONF_MEASUREMENT_CONTROLLER_CLASS_NAME\n\t */\n\tvoid setMeasurementControllerClassName(String className);\n\n\t/**\n\t * Sets the application name for this executable instance.\n\t * \n\t * @param appName\n\t * an application name\n\t */\n\tvoid setApplicationName(String appName);\n\n\t/**\n\t * Sets the main class that runs this thread. This will also be used in\n\t * finding the root folder\n\t * \n\t * @param mainClass\n\t * class to be set as main class\n\t */\n\tvoid setMainClass(Class<?> mainClass);\n\n\t/**\n\t * Sets the logger configuration file name and triggers logger\n\t * configuration.\n\t * \n\t * @param fileName\n\t * a file name\n\t */\n\tvoid setLoggerConfigFileName(String fileName);\n\n\t/**\n\t * @return Returns the application root directory.\n\t */\n\tString getAppRootDirectory();\n\n\t/**\n\t * Sets the application root directory to the given folder.\n\t * \n\t * @param rootDir\n\t * path to a folder\n\t */\n\tvoid setAppRootDirectory(String rootDir);\n\n\t/**\n\t * @return Returns the application's configuration directory.\n\t */\n\tString getAppConfDirectory();\n\n\t/**\n\t * @return Returns the value of scenario description file name.\n\t * \n\t * @see #CONF_SCENARIO_DESCRIPTION_FILE_NAME\n\t */\n\tString getScenarioDescriptionFileName();\n\n\t/**\n\t * @return returns the sceanrio description as the given object.\n\t * \n\t * @see #CONF_SCENARIO_DESCRIPTION\n\t */\n\tObject getScenarioDescription();\n\n\t/**\n\t * @return Returns the measurement controller URI.\n\t * \n\t * @see #CONF_MEASUREMENT_CONTROLLER_URI\n\t */\n\tURI getMeasurementControllerURI();\n\n\t/**\n\t * @return Returns the measurement controller URI as a String.\n\t * \n\t * @see #CONF_MEASUREMENT_CONTROLLER_URI\n\t */\n\tString getMeasurementControllerURIAsStr();\n\n\t/**\n\t * @return Returns the measurement controller class name.\n\t * \n\t * @see #CONF_MEASUREMENT_CONTROLLER_CLASS_NAME\n\t */\n\tString getMeasurementControllerClassName();\n\n\t/**\n\t * @return Returns the application name for this executable instance.\n\t */\n\tString getApplicationName();\n\n\t/**\n\t * @return Returns the main class that runs this thread. This value must\n\t * have been set by a call to\n\t * {@link IConfiguration#setMainClass(Class)}.\n\t */\n\tClass<?> getMainClass();\n\n\t/**\n\t * Writes the current configuration values into a file.\n\t * \n\t * @param fileName\n\t * the name of the file\n\t * @throws IOException\n\t * if exporting the configuration fails\n\t */\n\tvoid writeConfiguration(String fileName) throws IOException;\n\n\t/**\n\t * Overrides the values of this configuration with those of the given\n\t * configuration.\n\t * \n\t * @param configuration\n\t * with the new values\n\t */\n\t void overwrite(IConfiguration configuration);\n\n\t /**\n\t * Adds a new command-line extension to the configuration component. \n\t * \n\t * The same extension will not be added twice. \n\t * \n\t * @param extension a command-line extension\n\t */\n\t void addCommandLineExtension(ICommandLineArgumentsExtension extension);\n\t \n\t /**\n\t * Removes a new command-line extension from the configuration component. \n\t * \n\t * @param extension a command-line extension\n\t */\n\t void removeCommandLineExtension(ICommandLineArgumentsExtension extension);\n}", "@InputFiles\n @SkipWhenEmpty\n @IgnoreEmptyDirectories\n @PathSensitive(PathSensitivity.RELATIVE)\n public ConfigurableFileCollection getSource() {\n return source;\n }", "public interface IFileConfigurationLoader {\r\n\t\r\n\t/**\r\n\t * <p> Loads a FileConfiguration from the given file. </p>\r\n\t * \r\n\t * @param file File to load from\r\n\t * @return the FileConfiguration\r\n\t */\r\n\tpublic FileConfiguration loadConfiguration(File file);\r\n\t\r\n}", "public interface Source {\n /**\n * A listener for changes.\n */\n public interface SourceListener {\n public void added(Source source,\n JavaProject javaProject, String name);\n\n public void removed(Source source,\n JavaProject javaProject, String name);\n\n public void changed(Source source,\n JavaProject javaProject, String name);\n }\n\n public void addListener(SourceListener listener);\n\n public void removeListener(SourceListener listener);\n\n /**\n * Find and return all custom contexts; usually called just before calling\n * addListener(this).\n * \n * @param javaProject the java context to find custom module contexts for\n */\n public Set<String> get(JavaProject javaProject, ProgressMonitor progressMonitor);\n \n public abstract boolean isListeningForChanges();\n \n public abstract void listenForChanges(boolean listenForChanges);\n}", "@NonNull\n\t\tBuilder addSource(@NonNull ConfigSource source);", "@Override\n List<String> keys();", "public LoggingXmlConfiguration(ConfigurationSource configSource) {\n super(configSource);\n }", "public static Iterator paramKeyIterator() {\n return getCurrentConfig().keyIterator();\n }", "public interface KeyBindingContext extends SoliloquyClass {\n /**\n * @return A List of the KeyBindings in this context\n */\n List<KeyBinding> bindings();\n\n /**\n * @return True, if and only if all lower contexts' bindings are blocked\n */\n boolean getBlocksAllLowerBindings();\n\n /**\n * @param blocksLowerBindings Sets whether all lower contexts' bindings are blocked\n */\n void setBlocksAllLowerBindings(boolean blocksLowerBindings);\n}", "@Override\n\t\t\tpublic Set<PathwayImpl> keySet() {\n\t\t\t\treturn null;\n\t\t\t}", "public interface Config {\n String SUCCESS = \"success\";\n String SUCCESS_CODE = \"10000\";\n String ERROR = \"error\";\n String ERROR_CODE = \"20000\";\n\n String ROLE_ADMIN = \"SYS_ADMIN\";\n String ROLE_GUEST = \"SYS_GUEST\";\n String IMG_FILE_PATH = \"upload/image\";\n String IMG_BANNER_TYPE = \"BANNER\";\n String IMG_ALBUM_TYPE = \"ALBUM\";\n String IMG_GLOBAL_TYPE = \"GLOBAL\";\n String GLOBAL_ABOUT_CODE=\"ABOUT\";\n String GLOBAL_REASON_CODE=\"REASON\";\n String AES_KEY = \"harlanking021109\";\n String HMAC_KEY = \"harlanking021109\";\n\n String CURRENT_USER_KEY = \"user\";\n}", "public interface Config {\n\t\t/**\n\t\t * the IdentityX policy which should be used for authentication\n\t\t *\n\t\t * @return the policy name\n\t\t */\n\t\t@Attribute(order = 100, validators = { RequiredValueValidator.class })\n\t\tString policyName();\n\n\t\t/**\n\t\t * the IdentityX application to be used\n\t\t *\n\t\t * @return the application Id\n\t\t */\n\t\t@Attribute(order = 200, validators = { RequiredValueValidator.class })\n\t\tString applicationId();\n\t\t\n\t\t\n\t\t/**\n\t\t * the IdentityX Description to be used\n\t\t *\n\t\t * @return the transactionDescription\n\t\t */\n\t\t@Attribute(order = 300, validators = { RequiredValueValidator.class })\n\t\tdefault String transactionDescription() {\n\t\t\treturn \"OpenAM has Requested an Authentication\";\n\t\t}\n\t}", "public void setSrcKey(String value) {\n\t\tsrcKey = value;\r\n }", "public BindingConfiguration(final String name, final InjectionSource source) {\n if (name == null) {\n throw new IllegalArgumentException(\"Name cannot be null while constructing \" + this.getClass().getName());\n }\n if (source == null) {\n throw new IllegalArgumentException(\"Source cannot be null while constructing \" + this.getClass().getName());\n }\n this.name = name;\n this.source = source;\n }", "Configuration getConfigByKey(String configKey);", "List<PropertyKeySetting> getPropertyKeySettings();", "public interface Configurable {\n\n void configure(Properties properties);\n}", "@Override\n public DataSourceConfiguration getConfiguration() {\n return configuration;\n }", "public com.google.cloud.video.livestream.v1.Encryption.SecretManagerSource.Builder\n getSecretManagerKeySourceBuilder() {\n return getSecretManagerKeySourceFieldBuilder().getBuilder();\n }", "public interface IKeyCreator {\n byte[] generateKey(int n);\n\n byte[] getKeyFromFile(String p);\n\n byte[] inputKey(String s);\n}", "public interface ModuleConfigurationProvider {\n ModuleConfiguration getConfiguration(Module module);\n}", "@Override\n\tpublic Map<String, String> getConfig() {\n\t\treturn null;\n\t}", "public interface ComplexKeyMap<K, V> extends Map<K, V> {\n\n}", "public interface Configurable extends AzureConfigurable<Configurable> {\n /**\n * Creates an instance of RedisManager that exposes Cache management API entry points.\n *\n * @param credentials the credentials to use\n * @param subscriptionId the subscription UUID\n * @return the interface exposing Cache management API entry points that work across subscriptions\n */\n RedisManager authenticate(AzureTokenCredentials credentials, String subscriptionId);\n }", "public interface RepositoryKey {\n\n}", "public interface KeyValueConst {\n\n String PUBLIC_KEY = \"PublicKey\";\n String PRIVATE_KEY = \"PrivateKey\";\n}", "public interface DataSource {\r\n\t\r\n\tstatic final String FILE_PATH = \"plugins/DataManager/\";\r\n\t\r\n\tpublic void setup();\r\n\t\r\n\tpublic void close();\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic boolean addGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean deleteGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean isGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean addMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean removeMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean isMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic Optional<List<UUID>> getMemberIDs(String group, String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(UUID uuid, String pluginKey);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, String data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String group, String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String group, String pluginKey, String dataKey);\r\n\r\n}", "ConfigurationPackage getConfigurationPackage();", "@Override\n public Collection<Source> getSources() {\n\n Map<String, Source> sources = new HashMap<String, Source>();\n\n out: for (Map.Entry<String, Container> path : containers.entrySet()) {\n String sourceId = path.getKey();\n Container container = path.getValue();\n\n for (String map : categoryMaps.keySet()) {\n if (map.endsWith(\"/\")) {\n map = map.substring(0, map.lastIndexOf(\"/\"));\n }\n if (map.endsWith(sourceId)) {\n continue out;\n }\n }\n\n System.err.println(\"Doing source \" + sourceId);\n\n sourceId = applyCategoryMaps(sourceId);\n\n if (sourceId.isEmpty()) {\n continue;\n }\n\n if (sourceId.indexOf(\"/\") == -1 && !sourceId.isEmpty()) {\n if (sources.get(sourceId) == null) {\n String sourceIdShort = sourceId;\n sourceId = \"Catchup/Sources/\" + sourceIdShort;\n String sourceName = container.getTitle();\n Source source = new Source();\n source.setSourceId(sourceIdShort);\n source.setId(sourceId);\n source.setShortName(sourceName);\n source.setLongName(sourceName);\n source.setServiceUrl(\"/category?sourceId=\" + sourceId + \";type=html\");\n URI iconUri = container.getFirstPropertyValue(DIDLObject.Property.UPNP.ALBUM_ART_URI.class);\n URL iconUrl = normaliseURI(iconUri);\n final String iconUrlString = iconUrl == null ? null : iconUrl.toString();\n source.setIconUrl(iconUrlString);\n sources.put(sourceId, source);\n }\n }\n\n\n\n\n }\n\n\n return sources.values();\n }" ]
[ "0.61594117", "0.60004824", "0.5963652", "0.5930655", "0.5813104", "0.578976", "0.57628024", "0.5732648", "0.5729485", "0.5708055", "0.5707151", "0.56723064", "0.5644335", "0.564246", "0.5625276", "0.56174195", "0.56060046", "0.5605757", "0.5591268", "0.55876094", "0.55526435", "0.5517432", "0.5512788", "0.5499326", "0.54903126", "0.5488889", "0.54737043", "0.5408104", "0.5406568", "0.5384129", "0.5364547", "0.53554696", "0.5347828", "0.53174216", "0.52737015", "0.52505684", "0.52450323", "0.52444786", "0.5243029", "0.5242573", "0.52345115", "0.5234395", "0.523337", "0.52275664", "0.5201222", "0.51945245", "0.51906085", "0.5181907", "0.51710224", "0.51634485", "0.5142543", "0.5132917", "0.51299745", "0.5129008", "0.5113495", "0.5085643", "0.5074501", "0.5074486", "0.5072926", "0.5059567", "0.5059233", "0.50424254", "0.50297576", "0.5029375", "0.502668", "0.502579", "0.5022761", "0.5022396", "0.5015837", "0.50075316", "0.49978173", "0.49950415", "0.49929163", "0.49926832", "0.4990516", "0.49879977", "0.4984608", "0.4972484", "0.49686408", "0.49682677", "0.4963031", "0.4959716", "0.49565214", "0.4956205", "0.49543557", "0.49492347", "0.49449408", "0.4943252", "0.49426046", "0.49374375", "0.4933603", "0.49272403", "0.49228382", "0.49223763", "0.4920278", "0.49159375", "0.49097383", "0.4909704", "0.49089146", "0.48990756" ]
0.7471834
0
Created by qiyu on 2018/3/4
public interface IJobInfoService { /** * 列表查询 * @param vo * @return */ DataListVo queryList(QueryJobInfoListVo vo); /** * 列表查询 * @param vo * @return */ JobInfoDetailVo queryDetail(BaseQueryVo vo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "private static void cajas() {\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}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public void memoria() {\n \n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "public void mo6081a() {\n }", "private void kk12() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void strin() {\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 void init() {\n }", "private void init() {\n\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 protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "private void m50366E() {\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\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "public Pitonyak_09_02() {\r\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void initialize() \n {\n \n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tprotected void initdata() {\n\n\t}", "public void mo55254a() {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void init() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "private Singletion3() {}", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo12930a() {\n }", "@Override\n public void init() {}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "Petunia() {\r\n\t\t}", "public void mo9848a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "protected void mo6255a() {\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\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}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "public void mo12628c() {\n }" ]
[ "0.59188855", "0.57034624", "0.562752", "0.5621636", "0.5621636", "0.5603277", "0.5577228", "0.5563589", "0.55362266", "0.55254066", "0.55011255", "0.55003923", "0.54709363", "0.5436861", "0.5426978", "0.54187167", "0.54000676", "0.53854764", "0.53830737", "0.5378018", "0.5377297", "0.537407", "0.53581667", "0.5312255", "0.5289795", "0.52882195", "0.52639866", "0.52639866", "0.52639866", "0.52639866", "0.52639866", "0.52639866", "0.52639866", "0.5260296", "0.5253369", "0.52469826", "0.52400804", "0.52363145", "0.52153385", "0.52089244", "0.5200964", "0.51962954", "0.51962954", "0.51962954", "0.51962954", "0.51962954", "0.5196269", "0.5195468", "0.51927674", "0.51927674", "0.51924413", "0.51850945", "0.51831156", "0.51795185", "0.5169558", "0.51659316", "0.5149855", "0.5149855", "0.5149855", "0.5145358", "0.5145358", "0.5145358", "0.5142748", "0.5134246", "0.51328385", "0.5127286", "0.5125194", "0.5124191", "0.5120231", "0.51170886", "0.5116921", "0.51124966", "0.5111678", "0.5111678", "0.5111678", "0.5111678", "0.5111678", "0.5111678", "0.51109153", "0.51036394", "0.5092919", "0.50928277", "0.5084501", "0.5083846", "0.50815576", "0.5080605", "0.50802267", "0.50790143", "0.5077231", "0.5076854", "0.5076854", "0.50763565", "0.50748444", "0.50639296", "0.50612164", "0.5052745", "0.5049742", "0.5049742", "0.5049742", "0.5049036", "0.50478625" ]
0.0
-1
private static Timestamp Timestamp;
public static Date getStartDateOfWeek(String year, String week) { int y; int w; if (year != null && year.length() == 4 && year.matches("^-?\\d+$") && week != null && week.matches("^-?\\d+$")) { y = Integer.parseInt(year); w = Integer.parseInt(week); } else { Calendar calendar = Calendar.getInstance(); calendar.setFirstDayOfWeek(1); calendar.setMinimalDaysInFirstWeek(1); y = calendar.get(Calendar.YEAR); w = calendar.get(Calendar.WEEK_OF_YEAR); } return getStartDateOfWeek(y, w); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Date getTimestamp()\n{\n return time_stamp;\n}", "public Timestamp() {}", "public Timestamp() {\n makeNow();\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "private TimestampUtils(){}", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public Long getTimestamp() {\n return timestamp;\n }", "@NonNull\n public Date getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public Timestamp() {\n crtime = System.currentTimeMillis() ;\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public String getTimestamp()\n {\n return timestamp;\n }", "public Date getTimestamp() {\r\n return this.timestamp;\r\n }", "public TimeStamp(){\n\t\tdateTime = LocalDateTime.now();\n\t}", "public long getTimeStamp() {return timeStamp;}", "public long getTimestamp();", "public long getTimestamp();", "Date getTimestamp();", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public Integer getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\r\n return mTimestamp;\r\n }", "int getTimestamp();", "static long getDateTime(){\n return System.currentTimeMillis();\n }", "public long getTimestamp() {\n return this.timestamp;\n }", "public long getTimestamp() {\n return this.timestamp;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "@Override\n public long getTimestamp() {\n return timestamp;\n }", "public long getTimeStamp() {\n return timestamp;\n }", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public void setTimestamp() {\n timestamp = System.nanoTime();\n }", "public long getTimestamp() {\n\t\treturn lTimestamp;\n\t}", "public abstract Timestamp getDate();", "private long makeTimestamp() {\n return new Date().getTime();\n }", "private String getTimestamp() {\n return Calendar.getInstance().getTime().toString();\n }", "public Timestamp getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Timestamp getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Double getTimestamp() {\r\n\t\treturn timestamp;\r\n\t}", "public Timestamp getDate(){\n return date;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public int getTimeStamp() {\n return timeStamp;\n }", "public static Timestamp getNowTimestamp()\n {\n return new Timestamp(System.currentTimeMillis());\n }", "public Timestamp getTimestamp() {\n\n\t\treturn new Timestamp(new Date().getTime());\n\n\t}", "String getTimestamp();", "String getTimestamp();", "Date getTimeStamp();", "Long timestamp();", "public Date getTimestamp() {\n return new Date(timestamp.getTime()); // clone\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public Long getTimeStamp() {\n return this.TimeStamp;\n }", "long getTimeStamp();", "public java.lang.String getTimeStamp(){\r\n return localTimeStamp;\r\n }", "public void setTimestamp(Date timestamp) {\r\n this.timestamp = timestamp;\r\n }", "public static Timestamp getNowTimestamp() {\n return new Timestamp(System.currentTimeMillis());\n }", "public void setTimestamp(Date timestamp) {\n this.timestamp = timestamp;\n }", "public int getTimeStamp() {\r\n return fTimeStamp;\r\n }" ]
[ "0.78357506", "0.7701947", "0.76141703", "0.75075793", "0.75075793", "0.75075793", "0.7501484", "0.74903613", "0.74509484", "0.74233145", "0.7417674", "0.7397773", "0.73853475", "0.73800373", "0.7378121", "0.7378121", "0.73769873", "0.73717993", "0.73525476", "0.7337774", "0.73273593", "0.73132604", "0.73132604", "0.7312478", "0.73120475", "0.73120475", "0.7297982", "0.7297982", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.72933173", "0.7289927", "0.7273687", "0.7273687", "0.7273687", "0.7273687", "0.7273687", "0.7273687", "0.7273687", "0.7273687", "0.7257901", "0.724721", "0.7236212", "0.720866", "0.7196415", "0.7196415", "0.7178033", "0.71761054", "0.71742076", "0.7150587", "0.7150587", "0.7150587", "0.7125983", "0.7125983", "0.7125983", "0.7125983", "0.7125983", "0.7125983", "0.7125983", "0.7116956", "0.7089472", "0.70713246", "0.7068861", "0.7061965", "0.70561665", "0.70561665", "0.70448285", "0.7034372", "0.7016734", "0.7016734", "0.7010013", "0.6996387", "0.6988715", "0.69742996", "0.6959803", "0.6959803", "0.6954008", "0.6928715", "0.69281095", "0.69235677", "0.69235677", "0.69123244", "0.68746305", "0.6872807", "0.68560207", "0.6851206", "0.6832759", "0.68300325" ]
0.0
-1
TODO Autogenerated method stub
public void actionPerformed(ActionEvent e) { x1 = 200; y1 = 200; if (e.getActionCommand()=="") { JButton j = (JButton)e.getSource(); gr.setColor(j.getBackground()); } else { zhiling = e.getActionCommand(); if("清除".equals(zhiling)) { //System.out.println("这里是button的清除"); index = 0; // p.set_len(len); jp.repaint(); x4 = 0; y4 = 0; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override // 移出 public void mouseExited(MouseEvent e) { }
{ "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
Created by ajaxfeng on 2017/6/24.
public interface ContentService { public String getConteng(String logMsg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\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 public void inizializza() {\n\n super.inizializza();\n }", "@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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\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}", "private void init() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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}", "public void mo38117a() {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n void init() {\n }", "public void mo4359a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n }", "@Override\n\tprotected void interr() {\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}", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "private void init() {\n\n\n\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 doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n protected void init() {\n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void onPostInit()\n {\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "private void strin() {\n\n\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "@Override\n\tpublic void postInit() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "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 public void init() {}", "public void gored() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {\n\n super.init();\n\n }", "@Override\n\tpublic void onLoad() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo55254a() {\n }", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}" ]
[ "0.62480974", "0.6113099", "0.60995597", "0.60574377", "0.60574377", "0.6031714", "0.60292083", "0.6014622", "0.5966095", "0.5956962", "0.5927101", "0.590665", "0.58877385", "0.58765703", "0.58486557", "0.5845899", "0.5837647", "0.5810861", "0.5810861", "0.5775871", "0.57701474", "0.57690686", "0.57690686", "0.57690686", "0.57690686", "0.57690686", "0.5767377", "0.57583314", "0.57546586", "0.57470113", "0.57445776", "0.57439476", "0.573853", "0.5736775", "0.5736775", "0.5729854", "0.57244617", "0.57223547", "0.57223547", "0.57223547", "0.57216567", "0.571561", "0.5712964", "0.57115376", "0.57115376", "0.57115376", "0.5698826", "0.56913906", "0.56913906", "0.56913906", "0.5681745", "0.56755215", "0.56628007", "0.5658842", "0.56305283", "0.5628052", "0.5624087", "0.56146413", "0.5612105", "0.56120026", "0.5610775", "0.5602126", "0.56017625", "0.56010664", "0.5593321", "0.5592884", "0.5592884", "0.5592884", "0.5592884", "0.5592884", "0.5592884", "0.559234", "0.559234", "0.559234", "0.559234", "0.559234", "0.559234", "0.559234", "0.55914974", "0.55846345", "0.5583994", "0.5582213", "0.5582213", "0.55752885", "0.5572115", "0.5569933", "0.55594444", "0.5554713", "0.5551975", "0.5544944", "0.5541692", "0.5541692", "0.55188143", "0.5512056", "0.55096257", "0.55011654", "0.54911643", "0.5489271", "0.54848224", "0.5481838", "0.54806066" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); String sizeAndX = bf.readLine(); //몇개의 정수를 생성할 지 정하는 size와 x보다 작은 수를 고를 때 사용되는 x StringTokenizer st = new StringTokenizer(sizeAndX); int size = Integer.parseInt(st.nextToken()); //size 정수를 몇 개 생성할지 크기 int x = Integer.parseInt(st.nextToken()); //x보다 작은 수를 구할 때 사용되는 x int[] arr = new int[size]; //입력받은 size크기의 배열을 생성 String num = bf.readLine(); //1이상 size이하의 정수들을 입력 받는다. StringTokenizer st2 = new StringTokenizer(num); //공백을 기준으로 토큰화해서 for(int i=0; i < size; i++) { arr[i] = Integer.parseInt(st2.nextToken()); //배열에 토큰들을 담아서 관리한다. if(arr[i] < x) { //arr배열의 모든 요소를 x보다 작은지 검사한 후 작으면 출력한다. bw.write(arr[i]+" "); } } bw.flush(); bw.close(); bf.close(); }
{ "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
/This method is needed for the apparant problem with LookupDispatchAction class in Struts (nonJavadoc) Doesn't appear that the developer can make a call to any of the methods in this class via a url path (e.g. myaction.do?method=setup). The work around is not specifying a method, in which case struts will call the following "unspecified" method call below. In this case the desired effect is to reset the form(setup) with the prefilled dropdowns... so ALL this method does is call the setup method. TODO change the action to a DispatchAction for more flexibility in the future. KR
public ActionForward unspecified(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { this.setup(mapping,form,request,response); return mapping.findForward("backToGeneExp"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ActionForward populate(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n \t\t\tHttpServletResponse response) throws Exception {\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction populate> ... \");\n \n \t\tViralTreatmentForm viralTreatmentForm = (ViralTreatmentForm) form;\n \n \t\tString aTherapyID = request.getParameter(\"aTherapyID\");\n \n \t\tTherapyManager therapyManager = (TherapyManager) getBean(\"therapyManager\");\n \t\tTherapy therapy = therapyManager.get(aTherapyID);\n \n \t\t// Handle back-arrow on the delete\n \t\tif (therapy == null) {\n \t\t\trequest.setAttribute(Constants.Parameters.DELETED, \"true\");\n \t\t} else {\n \n \t\t\trequest.setAttribute(\"aTherapyID\", aTherapyID);\n \n \t\t\t// Set the otherName and/or the selected name attribute\n \t\t\tif (therapy.getAgent().getNameUnctrlVocab() != null) {\n \t\t\t\tviralTreatmentForm.setName(Constants.Dropdowns.OTHER_OPTION);\n \t\t\t\tviralTreatmentForm.setOtherName(therapy.getAgent().getNameUnctrlVocab());\n \t\t\t} else {\n \t\t\t\tviralTreatmentForm.setName(therapy.getAgent().getName());\n \t\t\t}\n \n \t\t\tif (therapy.getTreatment().getSexDistribution() != null) {\n \t\t\t\tviralTreatmentForm.setType(therapy.getTreatment().getSexDistribution().getType());\n \t\t\t}\n \t\t\tviralTreatmentForm.setAgeAtTreatment(therapy.getTreatment().getAgeAtTreatment());\n \t\t\tviralTreatmentForm.setDosage(therapy.getTreatment().getDosage());\n \n \t\t\tviralTreatmentForm.setRegimen(therapy.getTreatment().getRegimen());\n \t\t\tviralTreatmentForm.setAdministrativeRoute(therapy.getTreatment().getAdministrativeRoute());\n \n if (therapy.getTreatment().getAdminRouteUnctrlVocab() != null) {\n viralTreatmentForm.setAdministrativeRoute(Constants.Dropdowns.OTHER_OPTION);\n viralTreatmentForm.setOtherAdministrativeRoute(therapy.getTreatment().getAdminRouteUnctrlVocab());\n }\n \t\t}\n \n \t\t// Prepopulate all dropdown fields, set the global Constants to the\n \t\t// following\n \t\tthis.dropdown(request, response);\n \n \t\t// Store the Form in session to be used by the JSP\n \t\trequest.getSession().setAttribute(Constants.FORMDATA, viralTreatmentForm);\n \n \t\treturn mapping.findForward(\"submitViralTreatment\");\n \t}", "public ActionForward dropdown(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n \t\t\tHttpServletResponse response) throws Exception {\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction dropdown> ... \");\n \n \t\t// blank out the FORMDATA Constant field\n \t\tViralTreatmentForm viralTreatmentForm = (ViralTreatmentForm) form;\n \t\trequest.getSession().setAttribute(Constants.FORMDATA, viralTreatmentForm);\n \n \t\t// setup dropdown menus\n \t\tthis.dropdown(request, response);\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction> exiting... \");\n \n \t\treturn mapping.findForward(\"submitViralTreatment\");\n \t}", "protected void processPopulate(HttpServletRequest request,\n HttpServletResponse response,\n ActionForm form,\n ActionMapping mapping)\n throws ServletException\n {\n if(form != null)\n {\n if(mapping instanceof GTActionMapping)\n { //20030124AH\n if( ((GTActionMapping)mapping).isPopulate() == false )\n {\n return; //Do not pass go. Do not collect $200.\n }\n }\n super.processPopulate(request,response,form,mapping);\n }\n else\n {\n return; //No form to populate\n }\n }", "@Override\r\n\tprotected String doInit(ActionForm form, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, ActionMapping mapping) {\n\t\tManageSalaryForm myForm = (ManageSalaryForm) form;\r\n\t\tmySalaryService.firstLoadSearch(myForm);\r\n\t\treturn \"gotoCalculateAllStaff\";\r\n\t}", "public void setupActions() {\n getActionManager().setup(getView());\n }", "public void toSelectingAction() {\n }", "public void initiateAction() {\r\n\t\t// TODO Auto-generated method stub\t\r\n\t}", "public void dropdown(HttpServletRequest request, HttpServletResponse response) throws Exception {\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction dropdown> Entering... \");\n \n \t\t// Prepopulate all dropdown fields, set the global Constants to the\n \t\t// following\n \n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.SEXDISTRIBUTIONDROP,\n \t\t\t\tConstants.Dropdowns.ADD_BLANK);\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.AGEUNITSDROP, \"\");\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.VIRUSDROP, Constants.Dropdowns.ADD_BLANK);\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.VIRALTREATUNITSDROP, \"\");\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.ADMINISTRATIVEROUTEDROP,\n \t\t\t\tConstants.Dropdowns.ADD_BLANK);\n \t}", "public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response) throws Exception {\n // TODO Auto-generated method stub\n String forwardName = \"\";\n HttpSession session = ((HttpServletRequest) request).getSession(false);\n EditSearchCityForm searchform = (EditSearchCityForm) form;\n String buttonValue = searchform.getButtonValue();\n UnLocationDAO unLocationDAO = new UnLocationDAO();\n\n CitySelectionBean cbs = new CitySelectionBean();\n if (request.getParameter(\"index\") != null) {\n int ind = Integer.parseInt(request.getParameter(\"index\"));\n List cityList = (List) session.getAttribute(\"cityDetails\");\n CitySelectionBean citySelBean = (CitySelectionBean) cityList.get(ind);\n UnLocation unLoc = citySelBean.getUnloaction();\n RefTerminal terminal = null;\n if (session.getAttribute(\"terminal\") == null) {\n terminal = new RefTerminal();\n } else {\n terminal = (RefTerminal) session.getAttribute(\"terminal\");\n }\n terminal.setCountry(unLoc.getCountryId());\n terminal.setState(unLoc.getStateId().getCodedesc());\n\n terminal.setUnLocation(unLoc);\n request.setAttribute(\"buttonValue\", \"completed\");\n session.removeAttribute(\"cityDetails\");\n }\n if (buttonValue != null && buttonValue.equals(\"search\")) {\n\n List city = unLocationDAO.findbyCity(request.getParameter(\"city\"));\n List cityDetails = cbs.getCityDetails(city);\n session.setAttribute(\"cityDetails\", cityDetails);\n\n }\n return mapping.findForward(\"EditSearchpopup\");\n }", "@Override\r\n\tpublic void initActions() {\n\t\t\r\n\t}", "@Override\n protected Action preSelectAction(State state, Set<Action> actions){\n // adding available actions into the HTML report:\n htmlReport.addActions(actions);\n return(super.preSelectAction(state, actions));\n }", "protected ActionForward performAction(ActionMapping \t\tmapping,\n\t\t\t\t\t\t\t\t\t\t ActionForm\t\t\tform,\n\t\t\t\t\t\t\t\t\t\t HttpServletRequest\trequest,\n\t\t\t\t\t\t\t\t\t\t HttpServletResponse\tresponse)\n\t\tthrows Exception \n\t{\n\t\tString forward = \"success\";\n\t\trequest.setAttribute(ALLOW_EDITS_KEY, \"false\");\n\t\t\n\t\tHttpSession session = request.getSession();\n\t\tArrayList selectedTestIds = new ArrayList();\n\t\tsession.setAttribute(\"selectedTestIds\", selectedTestIds);\n\n\t\tBaseActionForm dynaForm = (BaseActionForm) form;\n\n\t\t// Initialize the form.\n\t\tdynaForm.initialize(mapping);\n\t\t\n\t\tPropertyUtils.setProperty(dynaForm, \"currentDate\", DateUtil.getCurrentDateAsText());\n\t\tPropertyUtils.setProperty(dynaForm, \"sampleTypes\", DisplayListService.getList(ListType.SAMPLE_TYPE_ACTIVE));\n\t\tPropertyUtils.setProperty(dynaForm, \"sampleSources\", DisplayListService.getList(ListType.SAMPLE_SOURCE));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionFormErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_FORM_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionLabelErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_LABEL_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionMiscList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_MISC));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonFormErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_FORM_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonLabelErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_LABEL_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonMiscList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_MISC));\n PropertyUtils.setProperty(dynaForm, \"genderList\", DisplayListService.getList(ListType.GENDERS));\n PropertyUtils.setProperty(dynaForm, \"cityList\", DisplayListService.getList(ListType.CITY));\n PropertyUtils.setProperty(dynaForm, \"districtList\", DisplayListService.getList(ListType.DISTRICT));\n PropertyUtils.setProperty(dynaForm, \"departmentList\", DisplayListService.getList(ListType.DEPARTMENT));\n PropertyUtils.setProperty(dynaForm, \"patientTypeList\", DisplayListService.getList(ListType.PATIENT_TYPE));\n\n // for backwards compatibility with non-modal version of sample entry\n\t\tPropertyUtils.setProperty(dynaForm, \"initialSampleConditionList\", DisplayListService.getList(ListType.INITIAL_SAMPLE_CONDITION));\n\t\tPropertyUtils.setProperty(dynaForm, \"testSectionList\", DisplayListService.getList(ListType.TEST_SECTION));\n\n\t\tSample\tsample\t= new Sample();\n\n\t\t// Set received date and entered date to today's date\n\t\tDate today = Calendar.getInstance().getTime();\n\t\tString dateAsText = DateUtil.formatDateAsText(today);\n\n\t\tSystemConfiguration sysConfig = SystemConfiguration.getInstance();\n\t\t\n\t\tsample.setReceivedDateForDisplay(dateAsText);\n\t\tsample.setEnteredDateForDisplay(dateAsText);\n\t\tsample.setReferredCultureFlag(sysConfig.getQuickEntryDefaultReferredCultureFlag());\n\t\tsample.setStickerReceivedFlag(sysConfig.getQuickEntryDefaultStickerReceivedFlag());\n\t\t\n\t\t// default nextItemSequence to 1 (for clinical - always 1)\n\t\tsample.setNextItemSequence(sysConfig.getQuickEntryDefaultNextItemSequence());\n\n\t\t// revision is set to 0 on insert\n\t\tsample.setRevision(sysConfig.getQuickEntryDefaultRevision());\n\n\t\tsample.setCollectionTimeForDisplay(sysConfig.getQuickEntryDefaultCollectionTimeForDisplay());\n\n\t\tif (sample.getId() != null && !sample.getId().equals(\"0\"))\n\t\t{\n\t\t\trequest.setAttribute(ID, sample.getId());\n\t\t}\n\n\t\t// populate form from valueholder\n\t\tPropertyUtils.copyProperties(form, sample);\n\n\t\tPropertyUtils.setProperty(form, \"currentDate\",\t\tdateAsText);\n\t\trequest.setAttribute(\"menuDefinition\", \"BatchEntryDefinition\");\n\t\treturn mapping.findForward(forward);\n\t}", "public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {\n\t\t\n\t \tCardLookupListForm oform = (CardLookupListForm)form;\n\n\t \tParamsParser.setState( request, Applications.INVENTORY, oform.getAppState());\n\n\t \toform.setStoragetype(null);\n\t fillStoragePlace(oform);\n\t oform.setIsInside(fillAgregate(oform));\n\t fillResource(oform);\n\t fillResourcetypes(oform);\n\t fillManufacturer(oform);\n\t fillOwner(oform);\n\t if(oform.getResource() != null && (oform.getPagetype() == null || \"\".equals(oform.getPagetype()))) {\n\t\t if(\"S\".equals(oform.getPolicy())) {\n\t\t\t oform.setPagetype(\"2\");\n\t\t } else\n\t\t if(\"P\".equals(oform.getPolicy()) || \"B\".equals(oform.getPolicy())) {\n\t\t\t oform.setPagetype(\"3\");\n\t\t }\n\t }\n\t if(request.getParameter(\"pagetype\") != null) {\n\t\t oform.setPagetype(request.getParameter(\"pagetype\"));\n\t } else {\n\t\t oform.setPagetype(\"1\");\n\t\t}\n\t\tsuper.perform( mapping, form, request, response );\n//\t\ttc.finish(\"ACTION\");\n\t\treturn mapping.findForward( \"main\" );\n\t}", "@Override\n\tpublic ActionResult defaultMethod(PortalForm form, HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "public ActionForward myAction1(ActionMapping mapping, ActionForm form,\r\n HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n DataSource ds = null;\r\n TerritoryService territoryService = TerritoryServiceFactory.getTerritoryServiceImpl();\r\n FunctionalNeedReportForm functionalNeedForm = (FunctionalNeedReportForm) form;\r\n ArrayList districtList = new ArrayList();\r\n try {\r\n ds = getDataSource(request);\r\n if (ds == null || \"null\".equals(ds)) {\r\n ds = JNDIDataSource.getConnection();\r\n }\r\n districtList = territoryService.getDistricts(ds);\r\n if (districtList != null && districtList.size() > 0) {\r\n functionalNeedForm.setDistrictList(districtList);\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return mapping.findForward(SUCCESS);\r\n }", "@Override\r\n public void onRender() {\n try {\r\n if (this.isLookupMode) { \r\n //查找返回模式\r\n this.pageActionList.clear();\r\n String divID =\"\";\r\n for(String key : this.divMap.keySet()) {\r\n Control control = this.divMap.get(key);\r\n if (control.getName().equals(this.lookupControlID)) {\r\n divID = key;\r\n break;\r\n }\r\n }\r\n //增加查找返回操作\r\n ActionButton newLink = new ActionButton(this.getClass(),\"lookup\",\"确认选择\",\"\",null);\r\n newLink.setOnClick(\"javascript:doLookupSelectDiv('\"+divID+\"','\"+this.lookupCallback+\"')\");\r\n newLink.setAttribute(\"class\",\"icon\"); \r\n this.regPageButton(newLink);\r\n }\r\n } catch (BizException e) {\r\n throw e;\r\n } catch (Exception ex) {\r\n throw new BizException(BizException.SYSTEM, \"渲染页面失败\", ex);\r\n }\r\n }", "@Override\n public void doInit() {\n action = (String) getRequestAttributes().get(\"action\");\n }", "protected void init_actions()\n {\n action_obj = new CUP$ParserForms$actions(this);\n }", "@Override\r\n \tpublic ActionForward executeSecureAction(ActionMapping mapping, ActionForm form,\r\n \t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException,\r\n \t\t\tServletException\r\n \t{\r\n \t\tsaveActionErrors(form, request);\r\n \t\t// //Gets the value of the operation parameter.\r\n \t\t// String operation = request.getParameter(Constants.OPERATION);\r\n \t\t//\r\n \t\t// //Sets the operation attribute to be used in the Add/Edit Institute\r\n \t\t// Page.\r\n \t\t// request.setAttribute(Constants.OPERATION, operation);\r\n \t\ttry\r\n \t\t{\r\n \t\t\tfinal IFactory factory = AbstractFactoryConfig.getInstance().getBizLogicFactory();\r\n \t\t\tfinal IBizLogic bizLogic = factory.getBizLogic(Constants.DEFAULT_BIZ_LOGIC);\r\n \r\n \t\t\t// ************* ForwardTo implementation *************\r\n \t\t\t// forwarded from Specimen page\r\n \t\t\tfinal HashMap forwardToHashMap = (HashMap) request.getAttribute(\"forwardToHashMap\");\r\n \t\t\tString specimenId = null;\r\n \t\t\tString specimenLabel = null;\r\n \t\t\tString specimenClass = null;\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents start\r\n \t\t\tString fromQuickEvent = (String) request.getAttribute(\"isQuickEvent\");\r\n \t\t\tif (fromQuickEvent == null)\r\n \t\t\t{\r\n \t\t\t\tfromQuickEvent = request.getParameter(\"isQuickEvent\");\r\n \t\t\t}\r\n \t\t\tString eventSelected = \"\";\r\n \t\t\tif (fromQuickEvent != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t\teventSelected = (String) request.getAttribute(Constants.EVENT_SELECTED);\r\n \t\t\t\tif (eventSelected == null && forwardToHashMap != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenClass = (String) forwardToHashMap.get(\"specimenClass\");\r\n \t\t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\t\tif (specimenClass.equalsIgnoreCase(\"Tissue\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[14];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Molecular\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[9];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Cell\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[1];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Fluid\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[7];\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t\trequest.setAttribute(Constants.EVENT_SELECTED, eventSelected);\r\n \t\t\t\t// System.out.println(\"::::::::::::::\\n\\n\\n\\n\"+form.getClass().\r\n \t\t\t\t// getName() );\r\n \t\t\t\tListSpecimenEventParametersForm eventForm = (ListSpecimenEventParametersForm) form;\r\n \t\t\t\tif (eventForm == null)\r\n \t\t\t\t{\r\n \t\t\t\t\teventForm = new ListSpecimenEventParametersForm();\r\n \t\t\t\t}\r\n \t\t\t\teventForm.setSpecimenEventParameter(eventSelected);\r\n \t\t\t\teventForm.setSpecimenId(specimenId.trim());\r\n \r\n \t\t\t}\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents end\r\n \t\t\tif (forwardToHashMap != null)\r\n \t\t\t{\r\n \t\t\t\t// Fetching SpecimenId from HashMap generated by\r\n \t\t\t\t// ForwardToProcessor\r\n \t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\tspecimenLabel = (String) forwardToHashMap.get(Constants.SPECIMEN_LABEL);\r\n \t\t\t\tLogger.out.debug(\"SpecimenID found in \" + \"forwardToHashMap========>>>>>>\"\r\n \t\t\t\t\t\t+ specimenId);\r\n \t\t\t}\r\n \t\t\t// ************* ForwardTo implementation *************\r\n \r\n \t\t\t// If new SpecimenEvent is added, specimenId in forwardToHashMap\r\n \t\t\t// will be null, following code handles that case\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tfinal String eventId = request.getParameter(\"eventId\");\r\n \r\n \t\t\t\t// Added by Vijay Pande. While cliking on events tab both\r\n \t\t\t\t// specimenId and eventId are getting null. Since there was no\r\n \t\t\t\t// check on eventId it was throwing error for following retrieve\r\n \t\t\t\t// call.\r\n \t\t\t\t// Null check is added for eventId. Fix for bug Id: 4731\r\n \t\t\t\tif (eventId != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tLogger.out.debug(\"Event ID added===>\" + eventId);\r\n \t\t\t\t\t// Retrieving list of SpecimenEvents for added\r\n \t\t\t\t\t// SpecimenEventId\r\n \t\t\t\t\tfinal Object object = bizLogic.retrieve(\r\n \t\t\t\t\t\t\tSpecimenEventParameters.class.getName(), new Long(eventId));\r\n \r\n \t\t\t\t\tif (object != null)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\t// Getting object of specimenEventParameters from the\r\n \t\t\t\t\t\t// list of SepcimenEvents\r\n \t\t\t\t\t\tfinal SpecimenEventParameters specimenEventParameters = (SpecimenEventParameters) object;\r\n \r\n \t\t\t\t\t\t// getting SpecimenId of SpecimenEventParameters\r\n \t\t\t\t\t\tfinal AbstractSpecimen specimen = specimenEventParameters.getSpecimen();\r\n \t\t\t\t\t\tspecimenId = specimen.getId().toString();\r\n \t\t\t\t\t\t// specimenLabel = specimen.getLabel();\r\n \t\t\t\t\t\tLogger.out.debug(\"Specimen of Event Added====>\"\r\n \t\t\t\t\t\t\t\t+ (specimenEventParameters.getSpecimen()).getId());\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t}\r\n \r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = request.getParameter(Constants.SPECIMEN_ID);\r\n \t\t\t\tspecimenLabel = request.getParameter(Constants.SPECIMEN_LABEL);\r\n \t\t\t}\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t}\r\n \r\n \t\t\trequest.setAttribute(Constants.SPECIMEN_ID, specimenId);\r\n \r\n \t\t\tfinal Object object = bizLogic.retrieve(Specimen.class.getName(), new Long(specimenId));\r\n \r\n \t\t\tif (object != null)\r\n \t\t\t{\r\n \t\t\t\tfinal Specimen specimen = (Specimen) object;\r\n \t\t\t\tif (specimenLabel == null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenLabel = specimen.getLabel();\r\n \t\t\t\t}\r\n \t\t\t\t// Setting Specimen Event Parameters' Grid\r\n \r\n \t\t\t\t// Ashish - 4/6/07 --- Since lazy=true, retriving the events\r\n \t\t\t\t// collection.\r\n \t\t\t\tfinal Collection<SpecimenEventParameters> specimenEventCollection = this\r\n \t\t\t\t\t\t.getSpecimenEventParametersColl(specimenId, bizLogic);\r\n \t\t\t\tfinal Collection<ActionApplication> dynamicEventCollection = this\r\n \t\t\t\t\t\t.getDynamicEventColl(specimenId, bizLogic);\r\n \t\t\t\t/**\r\n \t\t\t\t * Name: Chetan Patil Reviewer: Sachin Lale Bug ID: Bug#4180\r\n \t\t\t\t * Patch ID: Bug#4180_1 Description: The values of event\r\n \t\t\t\t * parameter is stored in a Map and in turn the Map is stored in\r\n \t\t\t\t * a List. This is then sorted chronologically, using a date\r\n \t\t\t\t * value form the Map. After sorting the List of Map is\r\n \t\t\t\t * converted into the List of List, which is used on the UI for\r\n \t\t\t\t * displaying values form List on the grid.\r\n \t\t\t\t */\r\n \t\t\t\tif (dynamicEventCollection != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tfinal List<Map<String, Object>> gridData = new ArrayList<Map<String, Object>>();\r\n \r\n \t\t\t\t\tfor (final ActionApplication actionApp : dynamicEventCollection)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tfinal Map<String, Object> rowDataMap = new HashMap<String, Object>();\r\n \t\t\t\t\t\tif (actionApp != null)\r\n \t\t\t\t\t\t{\r\n \t\t\t\t\t\t\t//final String[] events = EventsUtil\r\n \t\t\t\t\t\t\t//\t\t.getEvent(eventParameters);\r\n \t\t\t\t\t\t\tlong contId = actionApp.getApplicationRecordEntry().getFormContext()\r\n \t\t\t\t\t\t\t\t\t.getContainerId();\r\n \t\t\t\t\t\t\tList contList = AppUtility\r\n \t\t\t\t\t\t\t\t\t.executeSQLQuery(\"select caption from dyextn_container where identifier=\"\r\n \t\t\t\t\t\t\t\t\t\t\t+ contId);\r\n \t\t\t\t\t\t\tString container = (String) ((List) contList.get(0)).get(0);\r\n \t\t\t\t\t\t\t//final Object container =bizLogic.retrieve(Container.class.getName(),new Long(contId));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.ID, String.valueOf(actionApp.getId()));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_NAME,\r\n \t\t\t\t\t\t\t\t\tedu.wustl.cab2b.common.util.Utility\r\n \t\t\t\t\t\t\t\t\t\t\t.getFormattedString(container));\r\n \r\n \t\t\t\t\t\t\t// Ashish - 4/6/07 - retrieving User\r\n \t\t\t\t\t\t\t// User user = eventParameters.getUser();\r\n \t\t\t\t\t\t\tfinal User user = this.getUser(actionApp.getId(), bizLogic);\r\n \r\n \t\t\t\t\t\t\trowDataMap.put(Constants.USER_NAME, user.getLastName() + \"&#44; \"\r\n \t\t\t\t\t\t\t\t\t+ user.getFirstName());\r\n \r\n \t\t\t\t\t\t\t// rowDataMap.put(Constants.EVENT_DATE,\r\n \t\t\t\t\t\t\t// Utility.parseDateToString\r\n \t\t\t\t\t\t\t// (eventParameters.getTimestamp(),\r\n \t\t\t\t\t\t\t// Constants.TIMESTAMP_PATTERN)); // Sri: Changed\r\n \t\t\t\t\t\t\t// format for bug #463\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_DATE, actionApp.getTimestamp());\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.PAGE_OF, \"pageOfDynamicEvent\");// pageOf\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.SPECIMEN_ID, request\r\n \t\t\t\t\t\t\t\t\t.getAttribute(Constants.SPECIMEN_ID));// pageOf\r\n \t\t\t\t\t\t\tgridData.add(rowDataMap);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\tfinal List<List<String>> gridDataList = this.getSortedGridDataList(gridData);\r\n \t\t\t\t\tfinal String[] columnList1 = Constants.EVENT_PARAMETERS_COLUMNS;\r\n \t\t\t\t\tfinal List<String> columnList = new ArrayList<String>();\r\n \t\t\t\t\tfor (final String element : columnList1)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tcolumnList.add(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tAppUtility.setGridData(gridDataList, columnList, request);\r\n \t\t\t\t\trequest.setAttribute(\r\n \t\t\t\t\t\t\tedu.wustl.simplequery.global.Constants.SPREADSHEET_DATA_LIST,\r\n \t\t\t\t\t\t\tgridDataList);\r\n \t\t\t\t\tfinal Integer identifierFieldIndex = new Integer(0);\r\n \t\t\t\t\trequest.setAttribute(\"identifierFieldIndex\", identifierFieldIndex.intValue());\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (request.getAttribute(Constants.SPECIMEN_LABEL) == null)\r\n \t\t\t{\r\n \t\t\t\trequest.setAttribute(Constants.SPECIMEN_LABEL, specimenLabel);\r\n \t\t\t}\r\n \t\t\trequest.setAttribute(Constants.EVENT_PARAMETERS_LIST, new SOPBizLogic()\r\n \t\t\t\t\t.getAllSOPEventFormNames(dynamicEventMap));\r\n \t\t\trequest.getSession().setAttribute(\"dynamicEventMap\", dynamicEventMap);\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\trequest.setAttribute(Constants.MENU_SELECTED, new String(\"15\"));\r\n \t\tString pageOf = (String) request.getParameter(Constants.PAGE_OF);\r\n \t\tif (pageOf == null)\r\n \t\t\tpageOf = (String) request.getAttribute(Constants.PAGE_OF);\r\n \t\trequest.setAttribute(Constants.PAGE_OF, pageOf);\r\n \r\n \t\tif (pageOf.equals(Constants.PAGE_OF_LIST_SPECIMEN_EVENT_PARAMETERS_CP_QUERY))\r\n \t\t{\r\n \t\t\trequest.getSession().setAttribute(\"CPQuery\", \"CPQuery\");\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tif (request.getSession().getAttribute(\"CPQuery\") != null)\r\n \t\t\t{\r\n \t\t\t\trequest.getSession().removeAttribute(\"CPQuery\");\r\n \t\t\t}\r\n \t\t}\r\n \t\tLong specimenRecEntryEntityId = null;\r\n \t\ttry\r\n \t\t{\r\n \t\t\tif (CatissueCoreCacheManager.getInstance().getObjectFromCache(\r\n \t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID) != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = (Long) CatissueCoreCacheManager.getInstance()\r\n \t\t\t\t\t\t.getObjectFromCache(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID);\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = AnnotationUtil\r\n \t\t\t\t\t\t.getEntityId(AnnotationConstants.ENTITY_NAME_SPECIMEN_REC_ENTRY);\r\n \t\t\t\tCatissueCoreCacheManager.getInstance().addObjectToCache(\r\n \t\t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID, specimenRecEntryEntityId);\r\n \t\t\t}\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\t// request.setAttribute(\"specimenEntityId\", specimenEntityId);\r\n \t\trequest.setAttribute(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID,\r\n \t\t\t\tspecimenRecEntryEntityId);\r\n \t\treturn mapping.findForward(request.getParameter(Constants.PAGE_OF));\r\n \t}", "@Override\n\tprotected void localProcess(String action, List<String> parameters) throws SAFSException {\n\t\ttry{\n\t\t\tcombobox = (org.safs.selenium.webdriver.lib.ComboBox) libComponent;\n\t\t}catch(Exception e){\n\t\t\tthrow new SAFSException(\"Failed to converted \"+libComponent.getClass().getSimpleName()+\" to \"+getType());\n\t\t}\n\n\t\tif(ComboBoxFunctions.HIDELIST_KEYWORD.equalsIgnoreCase(action)){\n\t\t\tcombobox.hidePopup();\n\t\t}else if(ComboBoxFunctions.SHOWLIST_KEYWORD.equalsIgnoreCase(action)){\n\t\t\tcombobox.showPopup();\n\t\t}else if(ComboBoxFunctions.SELECT_KEYWORD.equalsIgnoreCase(action)){\n\t\t\tcombobox.select(parameters.get(0), true, false, true);\n\n\t\t}else if(ComboBoxFunctions.SELECTINDEX_KEYWORD.equalsIgnoreCase(action)){\n\t\t\tint offset = 0;\n\t\t\toffset = Integer.parseInt(parameters.get(0));\n\t\t\tif (offset < 1){\n\t\t\t\tthrow new NumberFormatException(\"IndexValue '\"+parameters.get(0)+\"' is not greater than 0.\");\n\t\t\t}\n\t\t\t// test tables indices are 1-based but Selenium is 0-based\n\t\t\toffset--;\n\t\t\tcombobox.selectIndex(offset, true, true);\n\n\t\t}else if(ComboBoxFunctions.SELECTPARTIALMATCH_KEYWORD.equalsIgnoreCase(action)){\n\t\t\tcombobox.select(parameters.get(0), true, true, true);\n\n\t\t}else if(ComboBoxFunctions.SELECTUNVERIFIED_KEYWORD.equalsIgnoreCase(action)){\n\t\t\tcombobox.select(parameters.get(0), false, false, true);\n\n\t\t}else if(ComboBoxFunctions.SELECTUNVERIFIEDPARTIALMATCH_KEYWORD.equalsIgnoreCase(action)){\n\t\t\tcombobox.select(parameters.get(0), false, true, true);\n\n\t\t}else if(ComboBoxFunctions.VERIFYSELECTED_KEYWORD.equalsIgnoreCase(action)){\n\t\t\tcombobox.verifySelected(parameters.get(0));\n\n\t\t}else if(ComboBoxFunctions.CAPTUREITEMSTOFILE_KEYWORD.equalsIgnoreCase(action)){\n\t\t\tString encoding = null;\n\t\t\ttry{ encoding = parameters.get(1); }catch(Exception e){}\n\t\t\tcaptureItemsToFile(parameters.get(0), encoding);\n\n\t\t}else if(ComboBoxFunctions.SETTEXTVALUE_KEYWORD.equalsIgnoreCase(action)){\n\t\t\tdoSetText(TYPE, parameters.get(0), false, true);\n\n\t\t}else if(ComboBoxFunctions.SETUNVERIFIEDTEXTVALUE_KEYWORD.equalsIgnoreCase(action)){\n\t\t\tdoSetText(TYPE, parameters.get(0), false, false);\n\n\t\t}else{\n\t\t\tthrow new org.safs.SAFSNotImplementedException(\"Unknown action '\"+action+\"' for \"+getType()+\".\");\n\t\t}\n\t}", "public void searchListAction () {//GEN-END:|45-action|0|45-preAction\n // enter pre-action user code here\nString __selectedString = getSearchList ().getString (getSearchList ().getSelectedIndex ());//GEN-LINE:|45-action|1|45-postAction\n // enter post-action user code here\n}", "@Override\n\tpublic void setAction() {\n\t}", "@Override\n\tpublic ActionForward select(HttpServletRequest request, HttpServletResponse response) {\n\t\treturn null;\n\t}", "abstract public void cabMultiselectPrimaryAction();", "public ActionForward initNonContext(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\tlogger.info(\" Started... \");\n\n\t\t/*\n\t\t * No dropdowns to populate, Redirect to Change Password JSP for\n\t\t * Non-Context User.\n\t\t */\n\t\tlogger.info(\" successful redirected to : nonContextInitSuccess\");\n\t\tlogger.info(\" Executed... \");\n\t\treturn mapping.findForward(NON_CONTEXT_INIT_SUCCESS);\n\t}", "protected ActionForward suite(ActionMapping mapping,ActionForm form , HttpServletRequest request, HttpServletResponse response, ActionErrors errors,Hashtable hParamProc ) throws ServletException{\r\n \tString signatureMethode =\r\n\t\t\t\"CompocfAction-suite(paramProc, mapping, form , request, response, errors )\";\r\n\r\n\t\tlogBipUser.entry(signatureMethode);\r\n \t//((CentrefraisForm)form).setLibcfrais(libCentreFrais);\r\n logBipUser.exit(signatureMethode);\r\n return mapping.findForward(\"initial\") ;\r\n\t}", "@Override\r\n public void initAction() {\n \r\n }", "public void setAction(String action);", "public ActionForward init(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\tlogger.info(\" Started... \");\n //Added by Neetika\n\t\tHttpSession session = request.getSession();\n\t\tUserSessionContext sessionContext = (UserSessionContext) session.getAttribute(Constants.AUTHENTICATED_USER);\n\t\tint forceToRecoPage=0;\n\t\tif(sessionContext.getAccountLevel().equalsIgnoreCase((Constants.DIST_ACCOUNT_LEVEL)))\n\t\t{\n\t\t\tforceToRecoPage= AuthorizationFactory.getAuthorizerImpl()\n\t\t\t.forceToRecoPage(sessionContext.getId());\n\t\t\tlogger.info(\"forceToRecoPage = \"+forceToRecoPage);\n\t\t\tif(forceToRecoPage!=0)\n\t\t\t{\n\t\t\t\trequest.setAttribute(\"disabledLink\", Constants.disableLink);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//end neetika\n\t\t/* No dropdowns to populate, Redirect to Change Password JSP. */\n\t\tlogger.info(\" successful redirected to : initSuccess. \");\n\t\tlogger.info(\" Executed... \");\n\t\treturn mapping.findForward(INIT_SUCCESS);\n\t}", "ActionMap createActionMap() {\n ActionMap am = super.createActionMap();\n if (am != null) {\n am.put(\"selectMenu\", new PostAction((JMenu)menuItem, true)); }\n return am; }", "private void setAction(String action)\r\n/* 46: */ {\r\n/* 47: 48 */ this.action = action;\r\n/* 48: */ }", "public void initializeActions(SGControllerActionInitializer actionInitializer);", "@Override\r\n\tpublic void actionMapper(String action) {\n\t\tProperty prop = javaScriptWindow.propertyTable.getPropertyTable()\r\n\t\t\t\t.getSelectedProperty();\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.SAVEASNEWBUTTON)) {\r\n\t\t\tsaveAsNewButtonAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.NEWBUTTON)) {\r\n\t\t\tnewButtonAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.LOADBUTTON)) {\r\n\t\t\tloadButtonAction();\r\n\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(JavaScriptConstants.SEARCHTEXTBOX)) {\r\n\t\t\tsearchTextAction();\r\n\t\t}\r\n\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.RIGHTSIDECENTERTABLE)) {\r\n\t\t\trightSideCenterTableAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.DELETEBUTTON)) {\r\n\t\t\tdeleteButtonAction();\r\n\t\t}\r\n\t}", "public void chooseOptionAssignToOnBulkActionsDropDown() {\n getLogger().info(\"Choose option: Assign to.\");\n clickElement(optionAssignTo, \"Assign To Option\");\n }", "public RefactoringAction(SelectedFileSet init) {\r\n super();\r\n System.out.println(\"RefactoringAction(SelectedFileSet)\");\r\n selectedFileSet = init;\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic void chooseAction(String actionSet, String action) {\n\t\topen();\n\n\t\tnew DefaultCombo().setSelection(actionSet);\n\t\tnew DefaultTreeItem(new TreeItemRegexMatcher(action + \".*\")).doubleClick();\n\t}", "private void initTargetComponentForTransferLookupValue(JComboBox targetComponent) {\r\n\t\tString[] values = null;\r\n\t\tif(singleRulePanel.getLayoutMLRule().isSubformEntity()) {\r\n\t\t\t// its a subform\r\n\t\t\tvalues = LayoutMLRuleValidationLayer.getAllSubformColumns(singleRulePanel.getRuleSourceComponent());\r\n\t\t} else {\r\n\t\t\t// its no subform\r\n\t\t\tvalues = LayoutMLRuleValidationLayer.getAllCollectableComponents(editorPanel);\r\n\t\t}\r\n\r\n\t\tif(values != null) {\r\n\t\t\tfor(String components : values) {\r\n\t\t\t\ttargetComponent.addItem(components);\r\n\t\t\t}\r\n\t\t\ttargetComponent.addItem(\"\");\r\n\t\t} \r\n\t}", "public abstract void init_actions() throws Exception;", "@Override\n public void reset( ActionMapping mapping, HttpServletRequest request )\n {\n //need to reset this to empty array in order to correctly\n //recognize cases where none of the associated checkboxes are selected\n _savedUserRoleCodes = new String[0];\n super.reset(mapping, request);\n }", "public void doInitialAction(){}", "@Override\n\tpublic ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString action = request.getParameter(\"action1\");\n\t\tif (action == null) action = LIST;\n\t\tif (log.isDebugEnabled()) log.debug(\"action:\" + action);\n\t\tActionForward forward = null;\n\t\tUserDefinedQueryForm theForm = (UserDefinedQueryForm) form;\n\t\ttry {\n\t\t\tif (LIST.equalsIgnoreCase(action)) forward = listAdvanceBacth(mapping, theForm, request, response); // 打开复杂查询列表页面\n\t\t\telse if (\"LISTSIMPLE\".equalsIgnoreCase(action)) forward = listSimpleBacth(mapping, theForm, request, response); // 打开简单查询列表页面\n\t\t\telse if (\"SHOWQUERY\".equalsIgnoreCase(action)) forward = queryAdvance(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWSIMPLE\".equalsIgnoreCase(action)) forward = querySimple(mapping, theForm, request, response);\n\t\t\telse if (\"VALID\".equalsIgnoreCase(action)) forward = validate(mapping, theForm, request, response);\n\t\t\telse if (\"PREVIEWSQL\".equalsIgnoreCase(action)) forward = getSQLForPreview(mapping, theForm, request, response);\n\t\t\telse if (\"VALIDSIMPLE\".equalsIgnoreCase(action)) forward = validateSimple(mapping, theForm, request, response);\n\t\t\telse if (\"ADVANCEOVERVIEW\".equalsIgnoreCase(action)) forward = queryAdvanceOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SIMPLEOVERVIEW\".equalsIgnoreCase(action)) forward = querySimpleOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SAVERESULT\".equalsIgnoreCase(action)) forward = saveResult(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWEXPORTEXCEL\".equalsIgnoreCase(action)) forward = showExportExcel(mapping, theForm, request, response);\n\t\t\telse if (\"EXPORTEXCEL\".equalsIgnoreCase(action)) forward = exportExcel(mapping, theForm, request, response);\n\t\t\telse {\n\t\t\t\trequest.setAttribute(\"err\", new WebException(\"找不到该action方法:\" + action));\n\t\t\t\tforward = mapping.findForward(ERROR);// 找不到合适的action\n\t\t\t}\n\n\t\t\t// else if(\"SAVEPARAM\".equalsIgnoreCase(action))\n\t\t\t// forward=saveQueryParam(mapping, theForm, request, response);\n\t\t\t// //保存查询条件到个人空间\n\t\t}\n\t\tcatch (Exception e) {// 其他系统出错\n\t\t\trequest.setAttribute(\"err\", e);\n\t\t\tforward = mapping.findForward(ERROR);\n\t\t}\n\t\treturn forward;\n\t}", "public ActionForward init(\n\t\t\tActionMapping mapping,\n\t\t\tActionForm form,\n\t\t\tHttpServletRequest request,\n\t\t\tHttpServletResponse response)\n\t\t\tthrows Exception {\n\t\t\t\tResourceBundle bundle = ResourceBundle.getBundle(\"ApplicationResources\");\n\t\t\t\tUserMstr userBean = (UserMstr)request.getSession().getAttribute(\"USER_INFO\");\n\t\t\t\tKmElementMstrFormBean formBean = (KmElementMstrFormBean)form;\n\t\t\t\tlogger.info(userBean.getUserLoginId() + \" entered initElement method\");\n\t\t\t\tformBean.reset(mapping,request);\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tKmElementMstrService kmElementService = new KmElementMstrServiceImpl();\n\t\t\t\t\tList firstDropDown;\n\t\t\t\t\tif (userBean.getKmActorId().equals(bundle.getString(\"LOBAdmin\"))||userBean.getKmActorId().equals(bundle.getString(\"Superadmin\"))) {\n\t\t\t\t\t\tfirstDropDown = kmElementService.getAllChildren(userBean.getElementId());\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfirstDropDown = kmElementService.getChildren(userBean.getElementId());\n\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\tif (firstDropDown!=null && firstDropDown.size()!=0){\n\t\t\t\t\t\tformBean.setInitialLevel(((KmElementMstr)firstDropDown.get(0)).getElementLevel());\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\tint initialLevel=Integer.parseInt(kmElementService.getElementLevelId(userBean.getElementId()));\n\t\t\t\t\t\tinitialLevel++;\n\t\t\t\t\t\tformBean.setInitialLevel(initialLevel+\"\");\n\t\t\t\t\t}\n\t\t\t\t\tformBean.setParentId(userBean.getElementId());\n\t\t\t\t\tformBean.setCreateMultiple(null);\n\t\t\t\t\tformBean.setElementPath(\"\");\n\t\t\t\t\trequest.setAttribute(\"elementLevelNames\",kmElementService.getAllElementLevelNames());\n\t\t\t\t\trequest.setAttribute(\"allParentIdString\",kmElementService.getAllParentIdString(\"1\",userBean.getElementId()));\n\t\t\t\t\trequest.setAttribute(\"firstList\",firstDropDown);\n\t\t\t\t\t\n\t\t\t\t} catch (LMSException e) {\n\t\t\t\t\tlogger.error(\"KmException in Loading page for Init Create ELement: \"+e.getMessage());\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlogger.error(\"Exception in Loading page for Init Create ELement: \"+e.getMessage());\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\tlogger.info(userBean.getUserLoginId() + \" exited init Create Element method\");\n\t\t\t\treturn mapping.findForward(\"initialize\");\n\t\t\t\t\n\t\t}", "private void populateMethod(UIBean uiBean) {\r\n String methodName;\r\n if (method != null) {\r\n methodName = eval.evaluateExpression(method);\r\n } else {\r\n methodName = DEFAULT_METHOD;\r\n }\r\n uiBean.addParameter(\"method\", methodName);\r\n }", "public void set(Object requestor, String field, JMenu comp);", "protected ActionForward performAction(ActionMapping mapping,\n ActionForm form, HttpServletRequest request,\n HttpServletResponse response) throws Exception {\n\n String forward = FWD_SUCCESS;\n request.setAttribute(ALLOW_EDITS_KEY, \"true\");\n request.setAttribute(PREVIOUS_DISABLED, \"false\");\n request.setAttribute(NEXT_DISABLED, \"false\");\n\n String id = request.getParameter(ID);\n \n if (StringUtil.isNullorNill(id) || \"0\".equals(id)) {\n isNew = true;\n } else {\n isNew = false;\n }\n \n BaseActionForm dynaForm = (BaseActionForm) form;\n \n ActionMessages errors = dynaForm.validate(mapping, request); \n if (errors != null && errors.size() > 0) {\n // System.out.println(\"Server side validation errors \"\n // + errors.toString());\n saveErrors(request, errors);\n // since we forward to jsp - not Action we don't need to repopulate\n // the lists here\n return mapping.findForward(FWD_FAIL);\n }\n \n String start = (String) request.getParameter(\"startingRecNo\");\n String direction = (String) request.getParameter(\"direction\");\n \n District district = new District();\n //get sysUserId from currentUserId\n district.setSysUserId(currentUserId); \n org.hibernate.Transaction tx = HibernateUtil.getSession().beginTransaction();\n \n // populate value holder from form\n PropertyUtils.copyProperties(district, dynaForm);\n // Get cityId from property \"selectedCityId\"\n String selectedCityId = PropertyUtils\n .getProperty(dynaForm, \"selectedCityId\").toString();\n // Get City object from cityId\n DictionaryDAO dictionaryDAO = new DictionaryDAOImpl();\n Dictionary city = new Dictionary();\n city = dictionaryDAO.getDataForId(selectedCityId);\n \n // Get DictrictEntry from districtName property from form\n String districtName = PropertyUtils\n .getProperty(dynaForm, \"districtName\").toString();\n \n DistrictDAO distDAO = new DistrictDAOImpl();\n \n List<Dictionary> districtEntry = distDAO.getDistrictsEntyByName(districtName);\n \n // Set some property for district\n district.setCity(city);\n district.setDescription(\"\");\n \n try {\n // Check DistrictEntry is already exists or not.\n if (districtEntry.size() == 0) {\n Dictionary newDistrictEntry = new Dictionary();\n newDistrictEntry.setDictEntry(districtName);\n DictionaryCategory dicCategory = new DictionaryCategory();\n DictionaryCategoryDAO dicCategoryDAO = \n new DictionaryCategoryDAOImpl();\n dicCategory = dicCategoryDAO\n .getDictionaryCategoryByName(\"districts\");\n newDistrictEntry.setDictionaryCategory(dicCategory);\n newDistrictEntry.setSysUserId(currentUserId);\n newDistrictEntry.setIsActive(\"Y\");\n dictionaryDAO.insertData(newDistrictEntry);\n district.setDistrictEntry(dictionaryDAO\n .getDictionaryByDictEntry(districtName));\n } else {\n district.setDistrictEntry(districtEntry.get(0));\n }\n if (!isNew) {\n // UPDATE\n distDAO.updateData(district);\n } else {\n // INSERT\n distDAO.insertData(district);\n }\n tx.commit();\n \n } catch (LIMSRuntimeException lre) {\n //bugzilla 2154\n LogEvent.logError(\"DistrictUpdateAction\", \"performAction()\",\n lre.toString());\n tx.rollback();\n errors = new ActionMessages();\n java.util.Locale locale = (java.util.Locale) request.getSession()\n .getAttribute(\"org.apache.struts.action.LOCALE\");\n ActionError error = null;\n if (lre.getException()\n instanceof org.hibernate.StaleObjectStateException) {\n // how can I get popup instead of struts error at the top of\n // page?\n // ActionMessages errors = dynaForm.validate(mapping, request);\n error = new ActionError(\"errors.OptimisticLockException\", null,\n null);\n } else {\n // bugzilla 1482\n if (lre.getException()\n instanceof LIMSDuplicateRecordException) {\n String messageKey = \"district.browse.title\";\n String msg = ResourceLocator.getInstance()\n .getMessageResources().getMessage(locale,\n messageKey);\n error = new ActionError(\"errors.DuplicateRecord\",\n msg, null);\n\n } else {\n error = new ActionError(\"errors.UpdateException\", null,\n null);\n }\n }\n errors.add(ActionMessages.GLOBAL_MESSAGE, error);\n saveErrors(request, errors);\n request.setAttribute(Globals.ERROR_KEY, errors);\n //bugzilla 1485: allow change and try updating again \n //enable save button & disable previous and next\n request.setAttribute(PREVIOUS_DISABLED, \"true\");\n request.setAttribute(NEXT_DISABLED, \"true\");\n forward = FWD_FAIL;\n\n } finally {\n HibernateUtil.closeSession();\n }\n \n if (forward.equals(FWD_FAIL)) {\n return mapping.findForward(forward);\n }\n // initialize the form\n dynaForm.initialize(mapping);\n // repopulate the form from valueholder\n PropertyUtils.copyProperties(dynaForm, district);\n if (\"true\".equalsIgnoreCase(request.getParameter(\"close\"))) {\n forward = FWD_CLOSE;\n }\n\n if (district.getId() != null && !district.getId().equals(\"0\")) {\n request.setAttribute(ID, district.getId());\n\n }\n\n //bugzilla 1400\n if (isNew) {\n forward = FWD_SUCCESS_INSERT;\n }\n //bugzilla 1467 added direction for redirect to NextPreviousAction\n return getForward(mapping.findForward(forward), id, start, direction);\n \n }", "public void setAction(String action) { this.action = action; }", "@Override\n protected void onSubmit(final AjaxRequestTarget _target)\n {\n final DropDownOption option = (DropDownOption) getDefaultModelObject();\n try {\n if (option != null) {\n Context.getThreadContext().getParameters().put(\n getFieldConfig().getName() + \"_eFapsPrevious\",\n new String[] { option.getValue() });\n }\n } catch (final EFapsException e) {\n DropDownField.LOG.error(\"EFapsException\", e);\n }\n super.onSubmit(_target);\n DropDownField.this.converted = false;\n updateModel();\n DropDownField.this.converted = false;\n }", "private void apply(final boolean hideOnSuccess)\r\n {\r\n if (_selectedRadio == _lookupRadio)\r\n {\r\n final String folder = _lookupEditorPanel.getContainer();\r\n final String schema = _lookupEditorPanel.getSchemaName();\r\n final String table = _lookupEditorPanel.getTableName();\r\n final String typeURI = _lookupEditorPanel.getTypeURI();\r\n PropertyType type = null == typeURI ? null : PropertyType.fromURI(typeURI);\r\n\r\n// _log(\"apply \" + folder + \" \" + schema + \" \" + table + \" \" + typeURI);\r\n\r\n if (_empty(schema) || _empty(table))\r\n {\r\n Window.alert(\"Schema name and table name must not be empty\");\r\n return;\r\n }\r\n\r\n if (!_current.isRangeEditable && null != _current.getValue())\r\n type = _current.getValue().getPropertyType();\r\n\r\n if (null == type)\r\n {\r\n Window.alert(\"Type was not set correctly\");\r\n return;\r\n }\r\n\r\n _current.setValue(new LookupConceptType(type, folder, schema, table));\r\n if (hideOnSuccess)\r\n hide();\r\n }\r\n else // !lookup\r\n {\r\n _current.setValue(_selectedRadio._type);\r\n if (hideOnSuccess)\r\n hide();\r\n }\r\n }", "@Override public void doAction(int option)\r\n{\r\n switch(option)\r\n {\r\n case 1: //view the map\r\n viewMap();\r\n break;\r\n case 2: //view/print a list\r\n viewList();\r\n break;\r\n case 3: // Move to a new location\r\n moveToNewLocation();\r\n break;\r\n case 4: // Manage the crops\r\n manageCrops();\r\n break;\r\n case 5: // Return to Main Menu\r\n System.out.println(\"You will return to the Main Menu now\");\r\n \r\n }\r\n}", "@Override\r\n\tpublic void adminSelectAdd() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "protected ActionForward customProcess(ActionMapping actionMapping, ActionForm actionForm, HttpServletRequest request, HttpServletResponse response, String name) throws Throwable {\r\n \treturn performAction(actionMapping, actionForm, request, response);\r\n }", "public ActionForward execute(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\r\n\t\tif (isCancelled(request)) {\r\n\t\t\tActionForward af = cancelled(mapping, form, request, response);\r\n\r\n\t\t\tif (af != null) {\r\n\t\t\t\treturn af;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tMessageResources resources = getResources(request);\r\n\r\n\t\t// Identify the localized message for the cancel button\r\n\t\tString edit = resources.getMessage(Locale.ENGLISH, \"button.edit\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString save = resources.getMessage(Locale.ENGLISH, \"button.save\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString search = resources.getMessage(Locale.ENGLISH, \"button.search\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString view = resources.getMessage(Locale.ENGLISH, \"button.view\")\r\n\t\t\t\t.toLowerCase();\r\n\t\tString[] rules = { edit, save, search, view };\r\n\r\n\t\t// Identify the request parameter containing the method name\r\n\t\t// 得到字符串method,制定变量method中存放的是方法名称\r\n\t\tString parameter = mapping.getParameter();\r\n\r\n\t\t// don't set keyName unless it's defined on the action-mapping\r\n\t\t// no keyName -> unspecified will be called\r\n\t\tString keyName = null;\r\n\r\n\t\tif (parameter != null) {\r\n\t\t\t// 从变量method中取出方法名\r\n\t\t\tkeyName = request.getParameter(parameter);\r\n\t\t}\r\n\r\n\t\tif ((keyName == null) || (keyName.length() == 0)) {\r\n\t\t\tfor (int i = 0; i < rules.length; i++) {\r\n\t\t\t\t// apply the rules for automatically appending the method name\r\n\t\t\t\t// 根据请求路径中的信息,来选择处理方法。\r\n\t\t\t\tif (request.getServletPath().indexOf(rules[i]) > -1) {\r\n\t\t\t\t\treturn dispatchMethod(mapping, form, request, response,\r\n\t\t\t\t\t\t\trules[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn this.unspecified(mapping, form, request, response);\r\n\t\t}\r\n\r\n\t\t// Identify the string to lookup\r\n\t\tString methodName = getMethodName(mapping, form, request, response,\r\n\t\t\t\tparameter);\r\n\r\n\t\treturn dispatchMethod(mapping, form, request, response, methodName);\r\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}", "public abstract void addSelectorForm();", "private void mappingMethodSet() throws SecurityException, NoSuchMethodException{\n\t\tString aux = upFirstLetter();\n\t\tString methodSet = \"set\" + aux;\n\t\tthis.methodSet = this.classFather.getMethod(methodSet, this.classType);\n\t}", "@Override\n public String getAction() {\n return null;\n }", "public ActionForward getInitialValuesForAddSpecialHandling(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\r\n // return load(mapping, form, request, response);\r\n Logger l = LogUtils.enterLog(getClass(), \"getInitialValuesForAddSpecialHandling\", new Object[]{mapping, form, request, response});\r\n try {\r\n // Secure access to the page, load the Oasis Fields without loading the LOVs,\r\n securePage(request, form);\r\n\r\n // get input\r\n Record inputRecord = getInputRecord(request);\r\n Record initialRecord = getSpecialHandlingManager().getInitialValuesForAddSpecialHandling(inputRecord);\r\n\r\n // get LOV labels for initial values\r\n publishOutputRecord(request, initialRecord);\r\n loadListOfValues(request, form);\r\n getLovLabelsForInitialValues(request, initialRecord);\r\n\r\n // prepare return values\r\n writeAjaxXmlResponse(response, initialRecord, true);\r\n }\r\n catch (Exception e) {\r\n handleErrorForAjax(AppException.UNEXPECTED_ERROR, \"Failed to get initial Special Handling data.\", e, response);\r\n }\r\n\r\n ActionForward af = null;\r\n l.exiting(getClass().getName(), \"getInitialValuesForAddSpecialHandling\", af);\r\n return af;\r\n }", "protected ActionForm processActionForm(HttpServletRequest request,\n HttpServletResponse response,\n ActionMapping mapping)\n {\n String scope = mapping.getScope();\n if(scope != null)\n {\n try\n {\n if(scope.equals(\"session\"))\n {\n OperationContext opCon = OperationContext.getOperationContext(request);\n if(opCon != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Looking for ActionForm in OperationContext[id=\" + opCon.getOperationContextId() + \"]\"); //20030124AH\n }\n ActionForm form = opCon.getActionForm();\n if(form != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Found ActionForm in OperationContext\"); //20030124AH\n }\n return form;\n }\n else\n {\n if(_log.isWarnEnabled())\n {\n _log.warn(\"No ActionForm found in OperationContext\"); //20030124AH\n }\n return null; //20030124AH\n }\n }\n }\n }\n catch(OperationException e)\n {\n // OperationExceptions here are normal when we forward from a completed operation\n // to the next action, so we ignore them.\n }\n catch(Throwable t)\n {\n if(_log.isErrorEnabled())\n {\n _log.error(\"Error caught in processActionForm() performing customised ActionForm handling\", t); //20030124AH\n }\n }\n }\n\n if(mapping instanceof GTActionMapping)\n { //20030124AH - Check the mapping to see if we should defer form creation or do it as normal\n if( ((GTActionMapping)mapping).isDeferFormCreation() )\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Deferring ActionForm creation\");\n }\n return null;\n }\n }\n //...\n if(_log.isInfoEnabled())\n {\n _log.info(\"Delegating to superclass to obtain ActionForm\"); //20030124AH\n }\n ActionForm form = super.processActionForm(request, response, mapping);\n return form;\n }", "public void listAction () {//GEN-END:|13-action|0|13-preAction\n // enter pre-action user code here\nString __selectedString = getList ().getString (getList ().getSelectedIndex ());//GEN-BEGIN:|13-action|1|17-preAction\nif (__selectedString != null) {\nif (__selectedString.equals (\"S\\u00F6k text\")) {//GEN-END:|13-action|1|17-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSeatchform ());//GEN-LINE:|13-action|2|17-postAction\n // write post-action user code here\n} else if (__selectedString.equals (\"Tidigare s\\u00F6kningar\")) {//GEN-LINE:|13-action|3|18-preAction\n // write pre-action user code here\nswitchDisplayable (null, getSearchList ());//GEN-LINE:|13-action|4|18-postAction\n // write post-action user code here\n}//GEN-BEGIN:|13-action|5|13-postAction\n}//GEN-END:|13-action|5|13-postAction\n // enter post-action user code here\n}", "private void supplyLookupValues(ModelAndView modelAndView) throws PortalServiceException {\n modelAndView.addObject(\"requestTypesLookup\", lookupService.findAllLookups(RequestType.class));\n modelAndView.addObject(\"enrollmentStatusesLookup\", lookupService.findAllLookups(EnrollmentStatus.class));\n modelAndView.addObject(\"riskLevelsLookup\", lookupService.findAllLookups(RiskLevel.class));\n ProviderTypeSearchCriteria providerTypeSearchCriteria = new ProviderTypeSearchCriteria();\n providerTypeSearchCriteria.setAscending(true);\n providerTypeSearchCriteria.setSortColumn(\"description\");\n providerTypeSearchCriteria.setPageNumber(1);\n providerTypeSearchCriteria.setPageSize(-1);\n List<ProviderType> items = providerTypeService.search(providerTypeSearchCriteria).getItems();\n modelAndView.addObject(\"providerTypesLookup\", items);\n }", "public CMPanelFormulasSelect() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public ActionForward initChangeMPassword(ActionMapping mapping,\n\t\t\tActionForm form, HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws Exception {\n\t\tlogger.info(\" Started...\");\n\t\t \n\t\t/* No dropdowns to populate, Redirect to Change M-Password JSP. */\n\t\tlogger.info(\" successful redirected to : initChangeMPasswordSuccess\");\n\t\tlogger.info(\" Executed... \");\n\t\treturn mapping.findForward(INIT_MPASSWORD_SUCCESS);\n\t}", "public void click_defineSetupPage_LoadDescField() {\r\n\t\tclickOn(DefineSetup_LoadDesc_txtBx);\r\n\t}", "private static List<SelectItem> retrieveLookupList(String className, boolean insertBlank) {\r\n\t\tList<SelectItem> lookupList = new ArrayList<SelectItem>();\r\n\r\n\t\t// get ServiceLocator instance\r\n\t\tServiceLocator svcLocator = ServiceLocator.getInstance();\r\n\t\t// get instance of lookup facade from service locator\r\n\t\tLookupFacade lookupFacade = (LookupFacade) svcLocator.getBean(\"lookupFacade\");\r\n\t\t// retrieve result by calling lookupfacade\r\n\t\tLookupFacadeResult lookupResult = lookupFacade.getLookupList(className);\r\n\r\n\t\t// List<SelectItem> lookupList = new ArrayList<SelectItem>();\r\n\r\n\t\tif (insertBlank) {\r\n\t\t\t// insert blank select item first\r\n\t\t\tlookupList.add(new SelectItem(\"\", \"\"));\r\n\t\t}\r\n\r\n\t\t// iterate through result list and create collection of SelectItem\r\n\t\t// components\r\n\t\tfor (ILookupProfile element : lookupResult.getLookupList()) {\r\n\t\t\tlookupList.add(new SelectItem(element.getCode(), element.getDescription()));\r\n\t\t}\r\n\r\n\t\treturn lookupList;\r\n\t}", "@Override\n\tvoid setupAction() {\n\n\t\tgetButton().setOnAction(event -> {\n\t\t\tmainPrevCommandBox.addText(mainTextInput.getText());\n\t\t\tfor (Turtle t : getThisTurtleList()) {\n\n\t\t\t\tlanguage = ((LanguageCombo) mainLanguageComboBox).getLanguage();\n\t\t\t\tCommand test = new Command(mainTextInput.getText(), t, variableMap, userCommandMap, language);\n\t\t\t\ttest.execute();\n\n\t\t\t}\n\t\t\tmainVarTable.updateVars(variableMap);\n\t\t\tmainFuncTable.updateCommandFuncs(userCommandMap);\n\t\t\tmainTurtleTable.updateValues();\n\n\t\t\tmainTextInput.clear();\n\n\t\t});\n\t}", "public GetMarkerSetMembershipAction() {\n }", "private SelectOSAction() {\r\n }", "protected void declareGlobalActionKeys() {\n\r\n }", "protected ActionForward processActionPerform(HttpServletRequest request,\n HttpServletResponse response,\n Action action,\n ActionForm form,\n ActionMapping mapping)\n throws IOException, ServletException\n { //20030502AH - Copied from struts src, with extra code added \n try\n {\n if(mapping instanceof GTActionMapping)\n {\n //20050317AH - mod to also check for asdmin rights where spec'd in mapping\n GTActionMapping gtMapping = (GTActionMapping)mapping;\n boolean needsSession = gtMapping.isRequiresGtSession() ||gtMapping.isRequiresAdmin() \n \t\t\t\t\t\t\t\t\t\t\t\t|| gtMapping.isRequiresP2P() || gtMapping.isRequiresUDDI();\n if( needsSession )\n {\n //We will try to obtain a reference to the IGTSession using the method provided\n //in StaticWebUtils. This will throw a NoSessionException if we have no IGTSession.\n //By putting this check here it will be captured as though it was thrown by the action.\n IGTSession gtasSession = StaticWebUtils.getGridTalkSession(request);\n //NSL20060424 Check for P2P and UDDI requirement\n if (gtMapping.isRequiresP2P() && gtasSession.isNoP2P())\n {\n \tthrow new IllegalStateException(\"P2P functionality access required for mapped path \"+gtMapping.getPath());\n }\n if (gtMapping.isRequiresUDDI() && gtasSession.isNoUDDI())\n {\n \tthrow new IllegalStateException(\"UDDI functionality access required for mapped path \"+gtMapping.getPath());\n }\n if(gtMapping.isRequiresAdmin() && !gtasSession.isAdmin())\n {\n throw new IllegalStateException(\"Admin access required for mapped path \" + gtMapping.getPath());\n }\n }\n }\n return (action.execute(mapping, form, request, response));\n }\n catch (Exception e)\n {\n return (processException(request, response,e, form, mapping));\n }\n \n }", "protected abstract void beforeLookup(Lookup.Template t);", "@Override\r\n\tprotected String doExecute(ActionForm form, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, ActionMapping mapping)\r\n\t\t\tthrows Exception {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "public final java_cup.runtime.Symbol CUP$ParserForms$do_action(\n int CUP$ParserForms$act_num,\n java_cup.runtime.lr_parser CUP$ParserForms$parser,\n java.util.Stack CUP$ParserForms$stack,\n int CUP$ParserForms$top)\n throws java.lang.Exception\n {\n return CUP$ParserForms$do_action_part00000000(\n CUP$ParserForms$act_num,\n CUP$ParserForms$parser,\n CUP$ParserForms$stack,\n CUP$ParserForms$top);\n }", "public ActionForward init(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response) {\n\n\t\tHttpSession session = request.getSession();\n\t\tif (session.getAttribute(\"admin\") == null) {\n\t\t\treturn mapping.findForward(\"wrong\");\n\t\t} else {\n\t\t\tMessageService messageService = new MessageService();\n\t\t\tList<Message> msglist = messageService.getMessage();\n\t\t\trequest.setAttribute(\"msglist\", msglist);\n\t\t\tif (session.getAttribute(\"message\") != null) {\n\t\t\t\trequest.removeAttribute(\"message\");\n\t\t\t}\n\t\t\tOrderService orderService = new OrderService();\n\t\t\tint back = orderService.getOrderCount();\n\t\t\trequest.setAttribute(\"count\", back);\n\t\t\treturn mapping.findForward(\"list\");\n\t\t}\n\t}", "public String ajaxMethod() {\n\t\tAppLog.begin();\n\t\ttry {\n\t\t\tMap<String, Object> session = ActionContext.getContext()\n\t\t\t\t\t.getSession();\n\t\t\tString userId = (String) session.get(\"userId\");\n\t\t\tif (null == userId || \"\".equals(userId)) {\n\t\t\t\taddActionError(getText(\"error.login.expired\"));\n\t\t\t\tinputStream = new StringBufferInputStream(\"ERROR:\"\n\t\t\t\t\t\t+ getText(\"error.login.expired\")\n\t\t\t\t\t\t+ \", Please re login and try Again!\");\n\t\t\t\tAppLog.end();\n\t\t\t\treturn \"login\";\n\t\t\t}\n\t\t\tif (\"populateMRNo\".equalsIgnoreCase(hidAction)) {\n\t\t\t\tMap<String, String> returnMap = (HashMap<String, String>) GetterDAO\n\t\t\t\t\t\t.getMRNoListMap(selectedZone);\n\t\t\t\tStringBuffer dropDownSB = new StringBuffer(512);\n\t\t\t\tdropDownSB\n\t\t\t\t\t\t.append(\"<select name=\\\"selectedMRNo\\\" id=\\\"selectedMRNo\\\" class=\\\"selectbox\\\" onfocus=\\\"fnCheckZone();\\\" onchange=\\\"fnGetArea();\\\">\");\n\t\t\t\tdropDownSB.append(\"<option value=''>Please Select</option>\");\n\t\t\t\tif (null != returnMap && !returnMap.isEmpty()) {\n\t\t\t\t\tfor (Entry<String, String> entry : returnMap.entrySet()) {\n\t\t\t\t\t\tdropDownSB.append(optionTagBeginPart1);\n\t\t\t\t\t\tdropDownSB.append(entry.getKey());\n\t\t\t\t\t\tdropDownSB.append(optionTagBeginPart2);\n\t\t\t\t\t\tdropDownSB.append(entry.getValue());\n\t\t\t\t\t\tdropDownSB.append(optionTagEnd);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdropDownSB.append(selectTagEnd);\n\t\t\t\tsession.put(\"MRNoListMap\", returnMap);\n\t\t\t\tinputStream = new StringBufferInputStream(dropDownSB.toString());\n\t\t\t}\n\t\t\tif (\"populateArea\".equalsIgnoreCase(hidAction)) {\n\t\t\t\tMap<String, String> returnMap = (HashMap<String, String>) GetterDAO\n\t\t\t\t\t\t.getAreaListMap(selectedZone, selectedMRNo);\n\t\t\t\tStringBuffer dropDownSB = new StringBuffer(512);\n\t\t\t\tdropDownSB\n\t\t\t\t\t\t.append(\"<select name=\\\"selectedArea\\\" id=\\\"selectedArea\\\" class=\\\"selectbox-long\\\" onfocus=\\\"fnCheckZoneMRNo();\\\" >\");\n\n\t\t\t\tdropDownSB.append(\"<option value=''>Please Select</option>\");\n\t\t\t\tif (null != returnMap && !returnMap.isEmpty()) {\n\t\t\t\t\tfor (Entry<String, String> entry : returnMap.entrySet()) {\n\t\t\t\t\t\tdropDownSB.append(optionTagBeginPart1);\n\t\t\t\t\t\tdropDownSB.append(entry.getKey());\n\t\t\t\t\t\tdropDownSB.append(optionTagBeginPart2);\n\t\t\t\t\t\tdropDownSB.append(entry.getValue());\n\t\t\t\t\t\tdropDownSB.append(optionTagEnd);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdropDownSB.append(selectTagEnd);\n\t\t\t\tsession.put(\"AreaListMap\", returnMap);\n\t\t\t\tinputStream = new StringBufferInputStream(dropDownSB.toString());\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @Added by Madhuri as per Jtrac -Djb:- 4464 & Open Project id 1203 to match mrkey tagged with AMR user & The mrkey selected by User for new job submit\n\t\t\t * @return\n\t\t\t * @author 735689\n\t\t\t * @since 03-06-2016\n\t\t\t */\n\n\t\t\tif (\"validateMrkey\".equalsIgnoreCase(hidAction)) {\n\t\t\t\t\n\t\t\t\tMap<String, String> mrkyFromSession = (Map<String, String>) session.get(\"taggedMrkey\");\n\t\t\t\tString validMrkey = MRDScheduleDownloadDAO.getMrdCode(\n\t\t\t\t\t\tselectedZone, selectedMRNo, selectedArea);\n\t\t\t\t\n\t\t\t\tAppLog.info(\"Mrkeys Tagged to Logged In users is/Are\" +mrkyFromSession.size());\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\tif(null != validMrkey && null != mrkyFromSession && mrkyFromSession.containsValue(validMrkey)){\n\t\t\t\t\tinputStream = new StringBufferInputStream(\"validMrkey\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tinputStream = new StringBufferInputStream(\"ERROR:You do not have security rights for this action. Please select the input fields correctly.\");\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\tcatch(Exception e){\n\t\t\t\t\tinputStream = new StringBufferInputStream(\"ERROR:\");\n\t\t\t\t\tAppLog.error(e);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t /*@Ended by Madhuri as per Jtrac -Djb:- 4464 & Open Project id 1203 to match mrkey tagged with AMR user & The mrkey selected by User for new job submit */\n\t\t\t}\n\n\t\t\tresponse.setHeader(\"Expires\", \"0\");\n\t\t\tresponse.setHeader(\"Pragma\", \"cache\");\n\t\t\tresponse.setHeader(\"Cache-Control\", \"private\");\n\t\t} catch (Exception e) {\n\t\t\tinputStream = new StringBufferInputStream(\n\t\t\t\t\t\"ERROR:There was an error at Server end.\");\n\t\t\t// response.setHeader(\"Expires\", \"0\");\n\t\t\t// response.setHeader(\"Pragma\", \"cache\");\n\t\t\t// response.setHeader(\"Cache-Control\", \"private\");\n\t\t\tAppLog.error(e);\n\n\t\t}\n\t\tAppLog.end();\n\t\treturn SUCCESS;\n\t}", "public void initialize(Collection actionNames) {\n\t\tJLabel[] labels = new JLabel[1];\n\t\tlabels[0] = new JLabel(I18N.getLocalizedMessage(\"Action Name\"));\n\n\t\tm_actionscombo = new TSComboBox();\n\t\tJComponent[] components = new JComponent[1];\n\t\tcomponents[0] = m_actionscombo;\n\n\t\tJPanel panel = TSGuiToolbox.alignLabelTextRows(labels, components);\n\n\t\t// set panel preferred size based on JLabel\n\t\tDimension d = labels[0].getPreferredSize();\n\t\td.width *= 3;\n\t\td.height *= 3;\n\t\tpanel.setPreferredSize(d);\n\n\t\t// now populate the combo list with all users in system\n\t\ttry {\n\t\t\tPopupList list = m_actionscombo.getPopupList();\n\t\t\tSortedListModel listmodel = new SortedListModel();\n\n\t\t\tIterator iter = actionNames.iterator();\n\t\t\twhile (iter.hasNext()) {\n\t\t\t\tString actionname = (String) iter.next();\n\t\t\t\tlistmodel.add(actionname);\n\t\t\t}\n\t\t\tlist.setModel(listmodel);\n\n\t\t} catch (Exception se) {\n\t\t\tse.printStackTrace();\n\t\t}\n\t\tsetPrimaryPanel(panel);\n\t\tsetInitialFocusComponent(m_actionscombo);\n\t}", "@Override\n\tpublic ActionForward doDefault(ActionMapping mapping, ActionForm form,\n\t\t\tHttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows Exception {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\n\t}", "public void set(Object requestor, String field, JMenuItem comp);", "public void resetAction()\r\n {\r\n this.action = null;\r\n }", "public void action() {\n action.action();\n }", "public void init() {\n FacesContext context = FacesContext.getCurrentInstance();\n Map<String, String> paramMap = context.getExternalContext().getRequestParameterMap();//gets the info from the URL\n this.setFormId(paramMap.get(\"id\"));//gets the form ID from the URL and sets it to the variable\n\n\n this.startDateQuestionSet();//executes the method\n this.startMultQuestionSet();//executes the method\n this.startSingleQuestionSet();//executes the method\n this.startTextQuestionSet();//executes the method\n }", "protected ActionForward initialiser(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response,\r\n\t\t\tActionErrors errors, Hashtable hParams) throws ServletException {\r\n\t\tVector vParamOut = new Vector();\r\n\t\tString signatureMethode = this.getClass().getName()\r\n\t\t\t\t+ \" - initialiser(paramProc, mapping, form , request, response, errors )\";\r\n\t\tlogBipUser.entry(signatureMethode);\r\n\t\tRecupModeContractuelForm rechercheForm = (RecupModeContractuelForm) form;\r\n\t\t// Détruit la liste de la session si elle existait suite à uen recherche\r\n\t\tif (request.getSession(false).getAttribute(LISTE_RECHERCHE_ID) != null)\r\n\t\t\trequest.getSession(false).removeAttribute(LISTE_RECHERCHE_ID);\r\n\t\ttry {\r\n\t\t\trechercheForm.setAction(\"modifier\");\r\n\t\t\trechercheForm.setListePourPagination(null);\r\n\t\t\trequest.setAttribute(\"RecupModeContractuelForm\", rechercheForm);\r\n\t\t} catch (Exception ex) {\r\n\t\t\t return mapping.findForward(processSsimpleException(this.getClass()\r\n\t\t\t\t\t.getName(), \"consulter\", ex, rechercheForm, request));\r\n\t\t}\r\n\t\tlogBipUser.exit(signatureMethode);\r\n\t\t return mapping.findForward(\"ecran\");\r\n\t}", "@Override\n public void resolve(MapChoice mapChoice, Query query, Result result, Resolution resolution) {\n assertEquals(\"myMethod\",mapChoice.getMethod());\n super.resolve(mapChoice,query,result,resolution);\n }", "@Override\n\tpublic void setUpMenu() {\n\t\t\n\t}", "public String thuchienAction(){\n\t\tXuatReport();\n\t\tresetFormB4135=null;\n\t\treturn \"B4160_Chonmenuxuattaptin\";\n\t}", "public ActionForward multiUse(ActionMapping mapping, ActionForm form,\n \t\t\tHttpServletRequest request, HttpServletResponse response)\n \tthrows Exception {\n \t\t\n \t\treturn mapping.findForward(\"backToGeneExp\");\n }", "@Override\n\tpublic void action() {\n\n\t}", "public void setActionInfo(String actionInfo);", "@Override\r\n\tpublic int resolveActions() {\n\t\treturn 0;\r\n\t}", "@ActionMapping(\"select\")\n public void select(ActionRequest request, ActionResponse response, @ModelAttribute(\"form\") SearchFiltersLocationForm form) throws PortletException {\n // Portal controller context\n PortalControllerContext portalControllerContext = new PortalControllerContext(this.portletContext, request, response);\n\n this.service.select(portalControllerContext, form);\n }", "@Override\n protected Action selectAction(State state, Set<Action> actions){\n //Call the preSelectAction method from the DefaultProtocol so that, if necessary,\n //unwanted processes are killed and SUT is put into foreground.\n Action retAction = preSelectAction(state, actions);\n if (retAction == null)\n //if no preSelected actions are needed, then implement your own strategy\n retAction = RandomActionSelector.selectAction(actions);\n return retAction;\n }", "@Override\n public String getFunctionName() {\n return \"internalChoice\";\n }", "public void reset() {\r\n availableOptionsModel.getObject().clear();\r\n selectedOptionsModel.getObject().clear();\r\n paletteForm.visitChildren(FormComponent.class, new IVisitor<Component>() {\r\n @Override\r\n public Object component(Component component) {\r\n ((FormComponent<?>) component).clearInput();\r\n return Component.IVisitor.CONTINUE_TRAVERSAL;\r\n }\r\n });\r\n paletteForm.getModelObject().setSearchString(\"\");\r\n }", "private ActionForward displayAction(ActionMapping mapping, ActionForm form,\r\n\t\t\tHttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\t\r\n\t\tExceptionDisplayDTO expDTO = new ExceptionDisplayDTO(\"displayPage\",\"\");\r\n\t\texpDisplayDetails.set(expDTO);\r\n\t\t\r\n\t\t//condition to not display search results by default\r\n\t\t/*if(isNavigationDone(request)){\r\n\t\t\tgetPaginatedSearchResults(request,bean,null);\r\n\t\t}*/\r\n\t\t\r\n\t\treturn mapping.findForward(\"displayPage\");\t\t\r\n\t}", "public void selected(String action);", "public void setAction(NameIdAction action) {\n\t\tif (nameidRequest != null) {nameidRequest.execute(action);}\n\t}", "private PSContentTypeActionMenuHelper(){}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }" ]
[ "0.6234708", "0.57938915", "0.5637894", "0.55531603", "0.5397049", "0.53687185", "0.5361194", "0.5303856", "0.5228459", "0.5227633", "0.5225896", "0.51797974", "0.5171688", "0.5162128", "0.5147293", "0.5100455", "0.50952786", "0.50918156", "0.5068369", "0.50217175", "0.5003081", "0.50002116", "0.49964413", "0.499113", "0.49898973", "0.4968404", "0.49554643", "0.4955347", "0.49393567", "0.49373353", "0.49369413", "0.4936337", "0.49320158", "0.49146152", "0.48955524", "0.48812357", "0.48780832", "0.48678714", "0.4860393", "0.48589605", "0.48506016", "0.48448914", "0.48402536", "0.48185846", "0.4802804", "0.48023644", "0.4792202", "0.47736585", "0.47726506", "0.47570175", "0.47546127", "0.47514507", "0.47423482", "0.47398707", "0.47364748", "0.47354242", "0.47245467", "0.47195598", "0.47134072", "0.4709943", "0.47098613", "0.4708688", "0.47060484", "0.4705396", "0.470141", "0.46982008", "0.46942437", "0.4688851", "0.46884465", "0.4685931", "0.4685647", "0.46855518", "0.4682145", "0.4669435", "0.46688613", "0.4664243", "0.46611765", "0.46523866", "0.46492773", "0.46462846", "0.46456513", "0.46414486", "0.4629971", "0.46272123", "0.4622984", "0.46048614", "0.4602705", "0.45922327", "0.45919284", "0.45829836", "0.4582439", "0.45802018", "0.457796", "0.4577397", "0.45731342", "0.4570391", "0.4569479", "0.45661196", "0.45661196", "0.45661196" ]
0.49393055
29
if multiUse button clicked (with styles deactivated) forward back to page
public ActionForward multiUse(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { return mapping.findForward("backToGeneExp"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void backButtonClicked()\r\n {\n manager = sond.getManager();\r\n AnimatorThread animThread = model.getThread();\r\n\r\n if (button.getPlay() && animThread != null && animThread.isAlive())\r\n {\r\n if (!animThread.getWait())\r\n {\r\n animThread.interrupt();\r\n }\r\n else\r\n {\r\n animThread.wake();\r\n }\r\n }\r\n else if (manager.canUndo())\r\n {\r\n manager.undo();\r\n }\r\n }", "public void onDiscardClick(){\n if (mHomeChecked){ // at Home Checkmark\n NavUtils.navigateUpFromSameTask(EditSymptomActivity.this);\n }\n if (!mHomeChecked) { // at BackPressed\n finish();\n }\n }", "void setActionBtnBack(LinkActionGUI mainAction, LinkActionGUI linkAction);", "public void activateButton() {\n\t\tif (isBrowser) this.bringToBack();\r\n\t\tMainActivity.resetXY();\r\n\t}", "@Override\n protected boolean canGoBack() {\n return false;\n }", "private void backActionPerformed(ActionEvent e) {\r\n ctr_pres.principal();\r\n setVisible(false);\r\n }", "private void backButton() {\n navigate.goPrev(this.getClass(), stage);\n }", "@Override\r\n\tpublic void backButton() {\n\t\t\r\n\t}", "public void GoBack(){\n if (prev_hostgui != null){\n this.setVisible(false);\n prev_hostgui.setVisible(true);\n } else{\n this.setVisible(false);\n prev_guestgui.setVisible(true);\n }\n }", "public void goBack() {\n goBackBtn();\n }", "public void backArrowButtonOnTouch1(int scaledX, int scaledY, OnePlayerState oneplayerstate){\n if(backArrowButton.isPressed(scaledX, scaledY)){\n instructionsScreen = false;\n }\n }", "@Secured(\"@\")\n public void doBackPage() {\n infoOrderDetail = false;\n haveDepositPrice = false;\n orderStockTag.resetOrderStock();\n }", "public void Back(View view) // back button pressed - go back to previous class\n {\n Intent intent = new Intent(ImportingOCR.this, AddedCmc.class); // back to previous page--which should be addedcmc.class and not importing manual(i change to Addedcmc.class)\n intent.putExtra(\"personid\", personid);\n intent.putExtra(\"amount\", amount);\n intent.putExtra(\"date\", date);\n intent.putExtra(\"username\", uploader);\n startActivity(intent);\n }", "public void actionPerformed(GuiButton b){\t\r\n\t\tif(b.displayString.contains(\"back to game\")){\r\n\t\t\tspeicher.getMinecraft().displayGuiScreen(null);\r\n\t\t}\r\n\t}", "void onUpOrBackClick();", "@Override\n\t\t\t\n\t\t\tpublic void onClick(final View e) {\n\t\t\t\t\n\t\t\t\tif(e == buttonStartExam)\n\t \t{ \n\t\t\t\t\tbuttonStartExam.setBackgroundResource(R.drawable.btn4);\n\t }\n\t\t new Handler().postDelayed(new Runnable() {\n\t\t public void run() {\n\t\t \tif( e == buttonStartExam)\n\t\t \t{\n\t\t \t\tbuttonStartExam.setBackgroundResource(R.drawable.btn2);\n\t\t }\n\t\t }\n\t\t }, 100L); \n\t\t SharedPreferences setting = getSharedPreferences(\"Pref\", 0);\n\t\t String imported= setting.getString(\"imported\", \"\");\n\t\t if(imported.equals(\"Yes\"))\n\t\t {\n\t\t\t\tif(Chkagree.isChecked())\n\t\t\t\t{\n\t\t\tIntent mIntent = new Intent(RulesActivity.this, DispalyQuestion.class);\n\t\t\tstartActivity(mIntent);\n\t\t\tfinish();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tToast.makeText(RulesActivity.this, \"Please Agree\",Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t }\n\t\t else\n\t\t {\n\t\t \t Toast.makeText(RulesActivity.this, \"Answers not imported\",Toast.LENGTH_LONG).show();\n\t\t }\n\t\t\t}", "private void clickOn() {\n\t\tll_returnbtn.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic boolean onNaviBackClick() {\n\t\treturn false;\n\t}", "@Override\n // Function for once the button gets clicked\n public void onClick(View v) {\n Intent i = new Intent(FindOutMore.this, Tab_Main.class);\n // The activity is started and the variable i is placed into this\n startActivity(i);\n // This is an animation overrider...\n // This means that once the button has been pressed it will perform an animation to take\n // the users back to the new page that they have selected...\n overridePendingTransition(R.animator.ui_animation_in, R.animator.ui_animation_out);\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n public void onClick(View v) {\n Intent PreviousScreen = new Intent(RoundSetting.this, MainPage.class);\n startActivity(PreviousScreen);\n finish();\n //m_newRound.setBackgroundResource(R.drawable.buttonselected);\n\n }", "@Override\n\t\t public void onClick(View view) {\n\t\t \n\t\t finish();\n\t\t }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\ttry\n\t\t\t\t{if(wb.canGoBack())\n\t\t\t\t\twb.goBack();\n\t\t\t\t}catch(Exception e)\n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onClick(View v) {\n MyConstants.IS_CHANGE_TO_3D = true;\n finish();\n }", "@Override\n public void onClick(View view) {\n\n if (!prefs.getBoolean(Constants.KEY_IS_MINI_GUIDE_SHOWN, false)) {\n openMiniGuide1();\n } else {\n prefs.edit().putString(Constants.KEY_IS_FIRST_TIME, \"true\");\n startActivity(new Intent(SplashLandingActivity.this, SignUpActivity.class));\n finish();\n }\n\n }", "@Override\n\tpublic boolean onBackPressed() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean onBackPressed() {\n\t\treturn false;\n\t}", "@Override\n\tpublic void backButton() {\n\n\t}", "void actionBack();", "public void returnToPrev(){\r\n Stage stage = (Stage) exitButton.getScene().getWindow();\r\n stage.close();\r\n }", "@Override\n protected void handleImput() {\n buttonBack.getButton().addListener(new ChangeListener() {\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n if(!buttonLocker) {\n gsm.pop();\n gsm.push(new MenuState(gsm));\n buttonLocker = true;\n }\n }\n });\n if (Gdx.input.isKeyJustPressed(Input.Keys.BACK)){\n gsm.pop();\n gsm.push(new MenuState(gsm));\n }\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\ttry\n\t\t\t\t{if(wb.canGoForward())\n\t\t\t\t\twb.goForward();\n\t\t\t\t}catch(Exception e1)\n\t\t\t\t{\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\tif(screen.equalsIgnoreCase(\"reward\"))\n\t\t\t{\n\t\t\t\tRewards.getInstance().onBackPressed();\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\tInfo.getInstance().onBackPressed();\n\t\t\t}\n\t\t\t\n\t\t\t}", "@Override\n\t\tpublic boolean handleBackPressed() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tGlobalClaass.activitySlideBackAnimation(context);\n\t\t\t\tfinish();\n\t\t\t}", "@FXML public void handleBackButton() {\n\t\tSystem.out.println(\"Back Button clicked\");\n\t\t\n\t\tif (sentimentRelatedFeatures.isSelected()) {\n\t\t\tFeatures.setUseSentimentFeatures(true);\n\t\t}\n\t\t\n\t\tif (punctuationFeatures.isSelected()) {\n\t\t\tFeatures.setUsePunctuationFeatures(true);\n\t\t}\n\t\t\n\t\tif (stylisticFeatures.isSelected()) {\n\t\t\tFeatures.setUseStylisticFeatures(true);\n\t\t}\n\t\t\n\t\tif (semanticFeatures.isSelected()) {\n\t\t\tFeatures.setUseSemanticFeatures(true);\n\t\t}\n\t\t\n\t\tif (unigramFeatures.isSelected()) {\n\t\t\tFeatures.setUseUnigramFeatures(true);\n\t\t}\n\t\t\n\t\tif (topWordsFeatures.isSelected()) {\n\t\t\tFeatures.setUseTopWords(true);\n\t\t}\n\t\t\n\t\tif (patternFeatures.isSelected()) {\n\t\t\tFeatures.setUsePatternFeatures(true);\n\t\t}\n\t\t\n\t\tif (previousWindow==null) {\n\t\t\ttry {\n\t\t\t\tMain.root = FXMLLoader.load(getClass().getResource(\"/windows/main/StartNewProjectWindow.fxml\"));\n\t\t\t\tMain.primaryStage.setScene(new Scene(Main.root, 800, 600));\n\t\t\t\tMain.primaryStage.show();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tif (previousWindow.equals(Previous.startProjectWindow)) {\n\t\t\t\ttry {\n\t\t\t\t\tMain.root = FXMLLoader.load(getClass().getResource(\"/windows/main/StartNewProjectWindow.fxml\"));\n\t\t\t\t\tMain.primaryStage.setScene(new Scene(Main.root, 800, 600));\n\t\t\t\t\tMain.primaryStage.show();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} else if (previousWindow.equals(Previous.importProjectWindow)) {\n\t\t\t\ttry {\n\t\t\t\t\tMain.root = FXMLLoader.load(getClass().getResource(\"/windows/main/OpenProjectWindow.fxml\"));\n\t\t\t\t\tMain.primaryStage.setScene(new Scene(Main.root, 800, 600));\n\t\t\t\t\tMain.primaryStage.show();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "private void backToMenu() {\n game.setScreen(new StartScreen(game));\n }", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tIntent intent = new Intent();\n\t\t\tintent.setClass(MainPage.this, AddPage.class);\n\t\t\tstartActivityForResult(intent,0);\n\t\t\toverridePendingTransition(R.anim.push_up_in, R.anim.push_up_out);\n\t\t}", "@Override\r\n public void onClick(View v) {\n setResult(1);\r\n finish();\r\n }", "public void GoBackbtn(View view){\n Intent backIntent = new Intent(this, MainActivity.class);\n backIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(backIntent);\n finish();\n }", "@Override\n\t\t\tpublic void onClickLeftBut() {\n\t\t\t\tfinish();\n\t\t\t}", "private void backPage()\n {\n page--;\n open();\n }", "public void actionPerformed(ActionEvent e){\r\n JButton eventSource = (JButton) e.getSource();\r\n HelperControl control = new HelperControl();\r\n //Turn to OrderMenu\r\n if(eventSource.equals(customerButton)){\r\n this.setVisible(false);\r\n \r\n control.skipOrderMenu();\r\n System.out.println(\"Turn to 2nd page: OrderMenu\"); \r\n }\r\n //Turn to manager\r\n else if(eventSource.equals(managerButton)){\r\n this.setVisible(false);\r\n // manager mng = new manager();\r\n // mng.setVisible(true);\r\n control.skipManager();\r\n System.out.println(\"Turn to 7Th page: manager\");\r\n }\r\n \r\n }", "@Override\n public void onClick(View view) {\n isFromResultActivity=false;\n finish();\n }", "private void backButtonAction() {\n CurrentUI.changeScene(SceneNames.LOGIN);\n }", "@Override\n public void onClick(View v) {\n MyConstants.IS_CHANGE_TO_2D = true;\n finish();\n }", "protected void goBack() {\r\n\t\tfinish();\r\n\t}", "public void pageListAtmosphere(View view) {\n start_button.setEnabled(false);\n Intent intent = new Intent(getApplicationContext(), PageVersion2.class);\n startActivity(intent);\n\n }", "private void onBack(McPlayerInterface player, GuiSessionInterface session, ClickGuiInterface gui)\r\n {\r\n session.setNewPage(this.prevPage);\r\n }", "@Override\r\n public void onBackPressed() {\n if(TripPlannerFragment.mCanGoNextState)\r\n {\r\n TripPlannerFragment.mCanGoNextState = false;\r\n finish();\r\n }\r\n }", "public boolean onCancelClicked() {\n setRedirect(UserListPage.class);\n return false;\n }", "public void back() {\n Views.goBack();\n }", "public void proceedToCheckOut()\n\t{\n\t\tproceedtocheckoutpage = productpage.addToCartBtnClick();\n\t}", "public void onBack(View view){\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"Back\");\n saveTemplate(filename);\n Intent intent = new Intent(this, FileManager.class);\n startActivity(intent);\n }", "@Override\n public void onBackPressed(){\n setSound.startButtonNoise(MemoryThemeActivity.this);\n finish();\n }", "@Override\n\tpublic void LeftButtonClick() {\n\t\tfinish();\n\t}", "private void backButton() {\n // Set up the button to add a new fish using a seperate activity\n backButton = (Button) findViewById(R.id.backButton);\n backButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View view) {\n // Start up the add fish activity with an intent\n Intent detailActIntent = new Intent(view.getContext(), MainActivity.class);\n finish();\n startActivity(detailActIntent);\n\n\n }\n });\n }", "@Override\n\tpublic void goToBack() {\n\t\tif(uiHomePrestamo!=null){\n\t\tuiHomePrestamo.getHeader().getLblTitulo().setText(constants.prestamos());\n\t\tuiHomePrestamo.getHeader().setVisibleBtnMenu(true);\n\t\tuiHomePrestamo.getContainer().showWidget(1);\n\t\t}else if(uiHomeCobrador!=null){\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tuiHomeCobrador.getContainer().showWidget(2);\n\t\t\tuiHomeCobrador.getUiClienteImpl().cargarClientesAsignados();\n\t\t\tuiHomeCobrador.getUiClienteImpl().reloadTitleCobrador();\n\t\t}\n\t}", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t sendStopMicroToService(activity);\r\n\t\t\t\t\tStartActivityUtil.backPreActivity(activity);\r\n\t\t\t\t}", "@Override\n public void onBackPressed() {\n replaceUseCase(meetingManager);\n replaceUseCase(traderManager);\n super.onBackPressed();\n }", "private void subscribeBackButton() {\n mProductDetailsViewModel.onClick().observe(this, result -> {\n switch (result) {\n case CROSS_ICON:\n finish();\n break;\n case OPEN_LOGIN:\n startActivity(new Intent(this, EcomLoginActivity.class));\n break;\n case SIZE_CHART:\n startWebViewAct();\n break;\n case SELLER_INFORMATION:\n break;\n case GOTO_CART:\n startGoToCartAct();\n break;\n case RATING_AND_REVIEWS:\n mBinding.nsPdp.smoothScrollTo(ZERO, (int) mBinding.tvPdpRateOption.getY() - FIFTY);\n break;\n case MORE:\n moreIndex += ONE;\n setLinesCount(mDescription, TRUE);\n break;\n case LOGIN:\n startBoardingAct();\n break;\n case OPEN_SHEET:\n onVariantClick(mVariantsData, mUnitId);\n break;\n }\n });\n }", "public void back(){\n\t\tswitch(state){\n\t\tcase LOGINID:\n\t\t\tbreak; //do nothing, already at top menu\n\t\tcase LOGINPIN:\n\t\t\tloginMenu();\n\t\t\tbreak;\n\t\tcase TRANSACTION:\n\t\t\tbreak; //do nothing, user must enter the choice to log out\n\t\tcase DEPOSIT:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase DEPOSITNOTIFICATION:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAW:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase BALANCE:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAWALNOTIFICATION:\n\t\t\tbreak; //do onthing, user must press ok\n\t\t}\n\t\t\n\t\tcurrentInput = \"\";\n\t}", "@Override\n public void onClick(View view) {\n switch (view.getId())\n {\n case R.id.activity_slider_btn_skip:\n Intent loginIntent = new Intent(IntroductionActivity.this, MainActivity.class);\n loginIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(loginIntent);\n finish();\n break;\n }\n }", "@Override\n public void onBackPressed() {\n if(web.canGoBack()){\n web.goBack();\n } else {\n super.onBackPressed();\n }\n }", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent intent = new Intent(LeadModeActivity.this,MainFrameActivity.class);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\n\t\tcase R.id.sureBtn:\n\t\t\tIntent intent = new Intent(GroupChatListActivity.this,\n\t\t\t\t\tSortListViewActivity.class);\n\t\t\tintent.putExtra(\"fromtag\", \"GroupChatListActivity\");\n\t\t\tintent.putExtra(\"opt\", 3);\n\t\t\tstartActivityForResult(intent, 1);\n\t\t\t\n\t\t\toverridePendingTransition(R.anim.in_from_left, R.anim.out_to_right);\n\t\t\tbreak;\n\t\tcase R.id.backlayout:\n\t\t\tthis.finish();\n\t\t\tbreak;\n\t\t}\n\t}", "private void backJButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n\n userProcessContainer.remove(this);\n CardLayout layout = (CardLayout) userProcessContainer.getLayout();\n layout.previous(userProcessContainer);\n }", "@Override\n public void onClick(View v)\n {\n finish();\n }", "boolean onBackPressed();", "boolean onBackPressed();", "default public void clickBack() {\n\t\tclickMenu();\n\t}", "@Override\n public void onClick(View v) {\n finish();\n }", "void onGoBackButtonClick();", "@Override\n public void backButton() {\n\n\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tfinish();\t\r\n\t\t\t}", "protected void ACTION_B_BACK(ActionEvent arg0) {\n\t\tthis.setVisible(false);\r\n\t\tnew SnifferWindow().setVisible(true);\r\n\t}", "private void backToMain() {\n // https://stackoverflow.com/questions/5446565\n // Checks to see if they are still on this activity\n if (getWindow().getDecorView().getRootView().isShown()) {\n onBackPressed();\n }\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(action.recover()) {\r\n\t\t\tSystem.out.println(\"backButton\");\r\n\t\t\tui.closeBackButton();//backButton设置为不可用\r\n\t\t\tui.paint(ui.getGraphics());\r\n\t\t\tui.upgradeScore();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"can't back\");\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n public void onClick(View v) {\n ButtonRectangle btn = (ButtonRectangle) v;\n SharedPreferences sp = getUserPref();\n String currentColor = sp.getString(BaseActivity.SF_THEME_COLOR, \"Teal\");\n if (currentColor.equals(btn.getText()))\n return;\n SharedPreferences.Editor editor = sp.edit();\n editor.putString(BaseActivity.SF_THEME_COLOR, btn.getText());\n editor.apply();\n getActivity().finish();\n startActivity(getActivity().getIntent());\n// android.os.Process.killProcess(android.os.Process.myPid());\n }", "public boolean onBackButtonPressed(MenuItem item){\n Intent goBack = new Intent(getApplicationContext(), MainActivity.class);\n startActivityForResult(goBack, 0);\n return true;\n }", "@Override\n\tpublic void onBackPressed() {\n\treturn;\n\t}", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\n public void onClick(View view) {\n finish();\n }", "@Override\r\n public void onClick(View v) {\n finish();\r\n IntentToStartView();\r\n }", "@Override\n public void onClick(View theView) {\n if(frontSideShowing){\n setBackSide();\n }else{\n setFrontSide();\n }\n\n\n }", "private static boolean backToMenu() {\n boolean exit = false;\n System.out.println(\"Return to Main Menu? Type Yes / No\");\n Scanner sc2 = new Scanner(System.in);\n if (sc2.next().equalsIgnoreCase(\"no\"))\n exit = true;\n return exit;\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\tIntent intent = new Intent(getApplicationContext(), Page_forty_four.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "@Override\r\n public void onClick(View view) {\r\n if(view == switchModeButton){\r\n Intent intent = new Intent(this, MainActivity.class);\r\n startActivityForResult(intent, MainActivity.TRAEMODE_RESIGTER_REQUEST_CODE);\r\n }\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (!loadingURL.contains(\"/Shared/ProgressPayment\")) {\n\t\t\t\t\tif (loadingURL.contains(\"/Flight/ShowTicket\") ||\n\t\t\t\t\t\t\tloadingURL.contains(\"/Hotel/Voucher\")) {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\tIntent home = new Intent(SearchPageActivity.this, MenuSelectionAcitivity.class);\n\t\t\t\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t\tstartActivity(home);\n\t\t\t\t\t} else if (wv1.canGoBack()) {\n\t\t\t\t\t\twv1.goBack();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}", "@Override\n\t public void onBackPressed() {\n\t\t Intent intent = new Intent(this,MainActivity.class);\n\t //intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP Intent.FLAG_ACTIVITY_SINGLE_TOP);\n\t\t intent.putExtra(\"overlayVisible\", \"noOverlay\");// als vanuit donatiescherm weer terug wil niet opnieuw de uitleg overlay\n\t\t startActivity(intent);\n\n\t }", "@Override\n\tpublic void onBackPressed () {\n\t\tif (searchMode) {\n\t\t\ttoggleSearch();\n\t\t\treturn;\n\t\t}\n\t\tsuper.onBackPressed();\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tback.startAnimation(animAlpha);\r\n\t\t\t\tIntent i = new Intent(Train.this, Boat.class);\r\n\t\t\t\tstartActivity(i);\r\n\t\t\t\toverridePendingTransition(R.anim.bottom_in,R.anim.top_out);\r\n\t\t\t\tfinish();\r\n\t\t\t}", "@Override\n public void onClick(View arg0) {\n Intent i = new Intent(mContext, AddCameraThirdActivity.class);\n startActivity(i);\n finish();//@@8.10\n }" ]
[ "0.6243767", "0.6099121", "0.60748583", "0.6057869", "0.6033233", "0.6030937", "0.6027457", "0.5986505", "0.5960901", "0.59439635", "0.5940072", "0.5934213", "0.5919729", "0.5916989", "0.59116167", "0.591069", "0.59090847", "0.59055394", "0.58479995", "0.5840344", "0.5840344", "0.5840344", "0.583395", "0.5832757", "0.5826824", "0.58079076", "0.57988477", "0.57988477", "0.57942456", "0.5791591", "0.5790378", "0.57894635", "0.5782077", "0.5777585", "0.5776252", "0.5774967", "0.57712084", "0.57664514", "0.57637", "0.5758894", "0.5751934", "0.5737224", "0.57308805", "0.57224876", "0.57223034", "0.5721185", "0.5718289", "0.5709894", "0.56995255", "0.56932145", "0.56928986", "0.5691185", "0.5690705", "0.5690695", "0.5685099", "0.5679103", "0.56688464", "0.5665489", "0.5655332", "0.5653841", "0.5652155", "0.56486076", "0.56447953", "0.56441134", "0.56428117", "0.56390744", "0.5635685", "0.5634701", "0.56333005", "0.5632843", "0.5632843", "0.56251156", "0.56113535", "0.5610763", "0.56100744", "0.5609521", "0.56089085", "0.559583", "0.55957854", "0.55947137", "0.5588948", "0.55874443", "0.5586033", "0.5586033", "0.5586033", "0.5586033", "0.5586033", "0.5586033", "0.5586033", "0.5586033", "0.5586033", "0.5580951", "0.55735165", "0.5570883", "0.55706066", "0.556873", "0.5564486", "0.55637896", "0.5563285", "0.5559886", "0.5554598" ]
0.0
-1
This action is called when the user has selected the preview button on the GeneExpression build query page. It takes the current values that the user has input and creates a GeneExpressionQuery. It then creates a CompoundQuery with the query and gives it a temp name. It then calls the ReportGeneratorHelper which will construct a report and drop it in the sessionCache for later retrieval for rendering in a jsp.
public ActionForward preview(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { request.getSession().setAttribute("currentPage", "0"); request.getSession().removeAttribute("currentPage2"); GeneExpressionForm geneExpressionForm = (GeneExpressionForm) form; logger.debug("This is a Gene Expression Preview"); // Create Query Objects GeneExpressionQuery geneExpQuery = createGeneExpressionQuery(geneExpressionForm, request.getSession()); if(geneExpQuery != null){ geneExpQuery.setInstitutionCriteria(InsitutionAccessHelper.getInsititutionCriteria(request.getSession())); } request.setAttribute("previewForm",geneExpressionForm.cloneMe()); logger.debug("This is a Preview Report"); CompoundQuery compoundQuery = new CompoundQuery(geneExpQuery); //compoundQuery.setQueryName(RembrandtConstants.PREVIEW_RESULTS); compoundQuery.setQueryName(RembrandtConstants.PREVIEW_RESULTS); logger.debug("Setting query name to:"+compoundQuery.getQueryName()); compoundQuery.setAssociatedView(ViewFactory.newView(ViewType.GENE_SINGLE_SAMPLE_VIEW)); logger.debug("Associated View for the Preview:"+compoundQuery.getAssociatedView().getClass()); //Save the sessionId that this preview query is associated with compoundQuery.setSessionId(request.getSession().getId()); //Generate the reportXML for the preview. It will be stored in the session //cache for later retrieval //request.getSession().setAttribute("emailQueryName", geneExpressionForm.getQueryName()); //ReportGeneratorHelper reportHelper = new ReportGeneratorHelper(compoundQuery, new HashMap()); //return mapping.findForward("previewReport"); RembrandtAsynchronousFindingManagerImpl asynchronousFindingManagerImpl = new RembrandtAsynchronousFindingManagerImpl(); try { asynchronousFindingManagerImpl.submitQuery(request.getSession(), compoundQuery); } catch (FindingsQueryException e) { logger.error(e.getMessage()); } //wait for few seconds for the jobs to get added to the cache Thread.sleep(1000); return mapping.findForward("viewResults"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void btnGenReport_actionPerformed(ActionEvent e) {\n JButtonQueryButtonAction(e);\r\n }", "public GeneQueryResultBean() {\n\t if (debug)\n\t\tSystem.out.println(\"GeneQueryResultBean.constructor\");\n\n\t\tinput = Visit.getRequestParam(\"input\");\n\t query = Visit.getRequestParam(\"query\");\n\t\tif (query.equalsIgnoreCase(\"\")) {\n\t\t\tfocusedOrgan = null;\n\t\t} else {\n\t\t\tfocusedOrgan = Visit.getRequestParam(\"focusedOrgan\"); \n\t\t}\n\t\t\n//\t\tsearchResultOption = Visit.getRequestParam(\"searchResultOption\");\n\t\tif (TableUtil.isTableViewInSession()) {\n\t\t\treturn;\n\t\t}\n\t\tTableUtil.saveTableView(populateGeneQueryResultTableView(\"geneQueryResult\"));\n\t}", "public void genNewRep() {\r\n\r\n /** can possibly delete conditional? or complete this to make a secondary safeguard against error **/\r\n if (tx_cb.getValue() == null || filter.getValue() == null || switchPatch.getValue() == null) {\r\n //conditional to tell if enough information was provide to construct a rf diagram/report\r\n return;\r\n } else{\r\n try {/** when genRep button is clicked, a event occurs and opens a new window, if unable to open, a error is caught **/\r\n\r\n /** get needed product ID's (PID) **/\r\n getSwPID();\r\n getFilterPID();\r\n getPaPID();\r\n getSwitchPID();\r\n\r\n /** get selected values to pass to new window **/\r\n selectedSWDescription = (String)mainExciterSW.getValue();\r\n selectedFilterDescription = (String)filter.getValue();\r\n selectedPADescription = (String)paModules.getValue();\r\n txSelection = (String)tx_cb.getValue();\r\n txSelectionCabinets = cabinets;\r\n if(auxAntFeed.getValue() == null)\r\n auxAntFeedSelection = \"No Aux Antenna\";\r\n else\r\n auxAntFeedSelection = (String)auxAntFeed.getValue();\r\n\r\n\r\n /** load a new scene **/\r\n FXMLLoader fxmlLoader = new FXMLLoader();\r\n fxmlLoader.setLocation(getClass().getResource(\"repStage.fxml\"));\r\n Scene scene = new Scene(fxmlLoader.load(), 1500, 1000);\r\n stage.setTitle(\"Generated report\");\r\n stage.setScene(scene);\r\n stage.setMaximized(true);\r\n stage.show();\r\n } catch (IOException e) {/** catch error opening window **/\r\n Logger logger = Logger.getLogger(getClass().getName());\r\n logger.log(Level.SEVERE, \"Failed to create generate report.\", e);\r\n }\r\n /** displays and opens new window when proper input is detected for all cases **/\r\n return;\r\n }\r\n }", "private void btnPrintEmployeeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPrintEmployeeActionPerformed\n if(searched == false){\n JOptionPane.showMessageDialog(rootPane, \"Please Perform a search on database first.\");\n return;\n }\n try {\n String report = \"IReports\\\\Employee.jrxml\";\n JasperReport jReport = JasperCompileManager.compileReport(report);\n JasperPrint jPrint = JasperFillManager.fillReport(jReport, null, newHandler.getConnector());\n JasperViewer.viewReport(jPrint, false);\n } catch (JRException ex) {\n JOptionPane.showMessageDialog(rootPane, ex.getMessage());\n }\n }", "protected String buildDrillAction( IAction action, IReportContext context )\n \t{\n \t\tif ( action == null || context == null )\n \t\t\treturn null;\n \n \t\tString baseURL = null;\n \t\tObject renderContext = getRenderContext( context );\n \t\tif ( renderContext instanceof HTMLRenderContext )\n \t\t{\n \t\t\tbaseURL = ( (HTMLRenderContext) renderContext ).getBaseURL( );\n \t\t}\n \t\tif ( renderContext instanceof PDFRenderContext )\n \t\t{\n \t\t\tbaseURL = ( (PDFRenderContext) renderContext ).getBaseURL( );\n \t\t}\n \n \t\tif ( baseURL == null )\n \t\t\tbaseURL = IBirtConstants.VIEWER_PREVIEW;\n \n \t\tStringBuffer link = new StringBuffer( );\n \t\tString reportName = getReportName( context, action );\n \n \t\tif ( reportName != null && !reportName.equals( \"\" ) ) //$NON-NLS-1$\n \t\t{\n \t\t\tlink.append( baseURL );\n \n \t\t\tlink\n \t\t\t\t\t.append( reportName.toLowerCase( )\n \t\t\t\t\t\t\t.endsWith( \".rptdocument\" ) ? \"?__document=\" : \"?__report=\" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n \n \t\t\ttry\n \t\t\t{\n \t\t\t\tlink.append( URLEncoder.encode( reportName,\n \t\t\t\t\t\tParameterAccessor.UTF_8_ENCODE ) );\n \t\t\t}\n \t\t\tcatch ( UnsupportedEncodingException e1 )\n \t\t\t{\n \t\t\t\t// It should not happen. Does nothing\n \t\t\t}\n \n \t\t\t// add format support\n \t\t\tString format = action.getFormat( );\n \t\t\tif ( format == null || format.length( ) == 0 )\n \t\t\t\tformat = hostFormat;\n \t\t\tif ( format != null && format.length( ) > 0 )\n \t\t\t{\n \t\t\t\tlink.append( ParameterAccessor.getQueryParameterString(\n \t\t\t\t\t\tParameterAccessor.PARAM_FORMAT, format ) );\n \t\t\t}\n \n \t\t\t// Adds the parameters\n \t\t\tif ( action.getParameterBindings( ) != null )\n \t\t\t{\n \t\t\t\tIterator paramsIte = action.getParameterBindings( ).entrySet( )\n \t\t\t\t\t\t.iterator( );\n \t\t\t\twhile ( paramsIte.hasNext( ) )\n \t\t\t\t{\n \t\t\t\t\tMap.Entry entry = (Map.Entry) paramsIte.next( );\n \t\t\t\t\ttry\n \t\t\t\t\t{\n \t\t\t\t\t\tString key = (String) entry.getKey( );\n \t\t\t\t\t\tObject valueObj = entry.getValue( );\n \t\t\t\t\t\tif ( valueObj != null )\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tObject[] values;\n \t\t\t\t\t\t\tif ( valueObj instanceof Object[] )\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\tvalues = (Object[]) valueObj;\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\telse\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\tvalues = new Object[1];\n \t\t\t\t\t\t\t\tvalues[0] = valueObj;\n \t\t\t\t\t\t\t}\n \n \t\t\t\t\t\t\tfor ( int i = 0; i < values.length; i++ )\n \t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t// TODO: here need the get the format from the\n \t\t\t\t\t\t\t\t// parameter.\n \t\t\t\t\t\t\t\tString value = DataUtil\n \t\t\t\t\t\t\t\t\t\t.getDisplayValue( values[i] );\n \n \t\t\t\t\t\t\t\tif ( value != null )\n \t\t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t\tlink\n \t\t\t\t\t\t\t\t\t\t\t.append( ParameterAccessor\n \t\t\t\t\t\t\t\t\t\t\t\t\t.getQueryParameterString(\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tURLEncoder\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.encode(\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey,\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tParameterAccessor.UTF_8_ENCODE ),\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tURLEncoder\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.encode(\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvalue,\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tParameterAccessor.UTF_8_ENCODE ) ) );\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\telse\n \t\t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t\t// pass NULL value\n \t\t\t\t\t\t\t\t\tlink\n \t\t\t\t\t\t\t\t\t\t\t.append( ParameterAccessor\n \t\t\t\t\t\t\t\t\t\t\t\t\t.getQueryParameterString(\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tParameterAccessor.PARAM_ISNULL,\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\tURLEncoder\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.encode(\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkey,\n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tParameterAccessor.UTF_8_ENCODE ) ) );\n \t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tcatch ( UnsupportedEncodingException e )\n \t\t\t\t\t{\n \t\t\t\t\t\t// Does nothing\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\t// Adding overwrite.\n \t\t\t\tif ( !reportName.toLowerCase( ).endsWith(\n \t\t\t\t\t\tParameterAccessor.SUFFIX_REPORT_DOCUMENT )\n \t\t\t\t\t\t&& baseURL\n \t\t\t\t\t\t\t\t.lastIndexOf( IBirtConstants.SERVLET_PATH_FRAMESET ) > 0 )\n \t\t\t\t{\n \t\t\t\t\tlink.append( ParameterAccessor.getQueryParameterString(\n \t\t\t\t\t\t\tParameterAccessor.PARAM_OVERWRITE, String\n \t\t\t\t\t\t\t\t\t.valueOf( true ) ) );\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tif ( locale != null )\n \t\t\t{\n \t\t\t\tlink.append( ParameterAccessor.getQueryParameterString(\n \t\t\t\t\t\tParameterAccessor.PARAM_LOCALE, locale.toString( ) ) );\n \t\t\t}\n \t\t\tif ( isRtl )\n \t\t\t{\n \t\t\t\tlink.append( ParameterAccessor.getQueryParameterString(\n \t\t\t\t\t\tParameterAccessor.PARAM_RTL, String.valueOf( isRtl ) ) );\n \t\t\t}\n \n \t\t\tif ( svg != null )\n \t\t\t{\n \t\t\t\tlink.append( ParameterAccessor.getQueryParameterString(\n \t\t\t\t\t\tParameterAccessor.PARAM_SVG, String.valueOf( svg\n \t\t\t\t\t\t\t\t.booleanValue( ) ) ) );\n \t\t\t}\n \n \t\t\tif ( isDesigner != null )\n \t\t\t{\n \t\t\t\tlink.append( ParameterAccessor.getQueryParameterString(\n \t\t\t\t\t\tParameterAccessor.PARAM_DESIGNER, String\n \t\t\t\t\t\t\t\t.valueOf( isDesigner ) ) );\n \t\t\t}\n \n \t\t\t// add isMasterPageContent\n \t\t\tlink.append( ParameterAccessor.getQueryParameterString(\n \t\t\t\t\tParameterAccessor.PARAM_MASTERPAGE, String\n \t\t\t\t\t\t\t.valueOf( this.isMasterPageContent ) ) );\n \n \t\t\t// append resource folder setting\n \t\t\ttry\n \t\t\t{\n \t\t\t\tif ( resourceFolder != null )\n \t\t\t\t{\n \t\t\t\t\tString res = URLEncoder.encode( resourceFolder,\n \t\t\t\t\t\t\tParameterAccessor.UTF_8_ENCODE );\n \t\t\t\t\tlink.append( ParameterAccessor.getQueryParameterString(\n \t\t\t\t\t\t\tParameterAccessor.PARAM_RESOURCE_FOLDER, res ) );\n \t\t\t\t}\n \t\t\t}\n \t\t\tcatch ( UnsupportedEncodingException e )\n \t\t\t{\n \t\t\t}\n \n \t\t\t// add bookmark\n \t\t\tString bookmark = action.getBookmark( );\n \t\t\tif ( bookmark != null )\n \t\t\t{\n \n \t\t\t\ttry\n \t\t\t\t{\n \t\t\t\t\t// In PREVIEW mode or pdf format, don't support bookmark as\n \t\t\t\t\t// parameter\n \t\t\t\t\tif ( baseURL\n \t\t\t\t\t\t\t.lastIndexOf( IBirtConstants.SERVLET_PATH_PREVIEW ) > 0\n \t\t\t\t\t\t\t|| IBirtConstants.PDF_RENDER_FORMAT\n \t\t\t\t\t\t\t\t\t.equalsIgnoreCase( format ) )\n \t\t\t\t\t{\n \t\t\t\t\t\tlink.append( \"#\" ); //$NON-NLS-1$\n \n \t\t\t\t\t\t// use TOC to find bookmark, only link to document file\n \t\t\t\t\t\tif ( !action.isBookmark( )\n \t\t\t\t\t\t\t\t&& reportName.toLowerCase( ).endsWith(\n \t\t\t\t\t\t\t\t\t\t\".rptdocument\" ) ) //$NON-NLS-1$\n \t\t\t\t\t\t{\n \t\t\t\t\t\t\tInputOptions options = new InputOptions( );\n \t\t\t\t\t\t\toptions.setOption( InputOptions.OPT_LOCALE, locale );\n \t\t\t\t\t\t\tbookmark = BirtReportServiceFactory\n \t\t\t\t\t\t\t\t\t.getReportService( ).findTocByName(\n \t\t\t\t\t\t\t\t\t\t\treportName, bookmark, options );\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\tlink.append( URLEncoder.encode( bookmark,\n \t\t\t\t\t\t\t\tParameterAccessor.UTF_8_ENCODE ) );\n \t\t\t\t\t}\n \t\t\t\t\telse\n \t\t\t\t\t{\n \t\t\t\t\t\tbookmark = URLEncoder.encode( bookmark,\n \t\t\t\t\t\t\t\tParameterAccessor.UTF_8_ENCODE );\n \t\t\t\t\t\tlink.append( ParameterAccessor.getQueryParameterString(\n \t\t\t\t\t\t\t\tParameterAccessor.PARAM_BOOKMARK, bookmark ) );\n \n \t\t\t\t\t\t// Bookmark is TOC name.\n \t\t\t\t\t\tif ( !action.isBookmark( ) )\n \t\t\t\t\t\t\tlink.append( ParameterAccessor\n \t\t\t\t\t\t\t\t\t.getQueryParameterString(\n \t\t\t\t\t\t\t\t\t\t\tParameterAccessor.PARAM_ISTOC,\n \t\t\t\t\t\t\t\t\t\t\t\"true\" ) ); //$NON-NLS-1$\n \t\t\t\t\t}\n \n \t\t\t\t}\n \t\t\t\tcatch ( UnsupportedEncodingException e )\n \t\t\t\t{\n \t\t\t\t\t// Does nothing\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\treturn link.toString( );\n \t}", "private void btnPrintReceiptActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPrintReceiptActionPerformed\n \n if(searched == false){\n JOptionPane.showMessageDialog(rootPane, \"Please Perform a search on database first.\");\n return;\n }\n try {\n String report = \"IReports\\\\ReceiptReport.jrxml\";\n JasperReport jReport = JasperCompileManager.compileReport(report);\n JasperPrint jPrint = JasperFillManager.fillReport(jReport, null, newHandler.getConnector());\n JasperViewer.viewReport(jPrint, false);\n } catch (JRException ex) {\n JOptionPane.showMessageDialog(rootPane, ex.getMessage());\n }\n }", "public static JasperReportBuilder generateReport(ExportData metaData,HttpServletRequest request){\n session = request.getSession(false);\n report = report(); // Creer le rapport\n \n //Logo\n// logoImg = cmp.image(inImg).setStyle(DynamicReports.stl.style().setHorizontalAlignment(HorizontalAlignment.LEFT)); \n //logoImg.setDimension(80,80); \n \n //Definit le style des colonnes d'entàte\n report.setColumnTitleStyle(getHeaderStyle(metaData));\n \n \n \n LinkedHashMap <String,String> criteria = metaData.getCriteria(); \n //Ajout la date d'àdition au critere d'impression\n String valDateProperty = getDateTxt(metaData.getLang()) ;\n String keyDateProperty = \"\" ;\n if ( session.getAttribute(\"activedLocale\").equals(\"fr\") ) {\n keyDateProperty = \"Edité le \" ;\n }\n else {\n keyDateProperty = \"Printed on \" ;\n }\n criteria.put(keyDateProperty,valDateProperty);\n \n StyleBuilder titleStyle = stl.style(boldStyle).setFontSize(16).setForegroundColor(new Color(0, 0, 0)).setHorizontalAlignment(HorizontalAlignment.RIGHT).setRightIndent(20);\n ComponentBuilder<?, ?> logoComponent = cmp.horizontalList(\n //cmp.image(Templates.class.getResource(\"/logopalm.png\")).setFixedDimension(150, 50).setStyle(stl.style().setLeftIndent(20)),\n cmp.verticalList(\n cmp.text(metaData.getTitle()).setStyle(titleStyle)\n )\n ).newRow()\n .add(cmp.horizontalList().add(cmp.hListCell(createCriteriaComponent(criteria,metaData)).heightFixedOnTop()))\n .newRow(); \n \n report.noData(logoComponent, cmp.text(\"Aucun enregistrement trouvà\").setStyle(stl.style().setHorizontalAlignment(HorizontalAlignment.CENTER).setTopPadding(30)));\n\n \n \n lblStyle = stl.style(Templates.columnStyle).setForegroundColor(new Color(60, 91, 31)); // Couleur du text \n colStyle = stl.style(Templates.columnStyle).setHorizontalAlignment(HorizontalAlignment.CENTER);\n \n groupStyle = stl.style().setForegroundColor(new Color(60, 91, 31)) \n .setBold(Boolean.TRUE)\n .setPadding(5)\n .setFontSize(13)\n .setHorizontalAlignment(HorizontalAlignment.CENTER); \n \n\n \n if(metaData.getTitle().equals(ITitle.PARCEL)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PARCEL_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SECTOR)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SECTOR_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BLOCK)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BLOCK_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ATTACK_PHYTO)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TREATMENT)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TREATMENT_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVEST)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVEST_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SERVICING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.SERVICING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_PLANTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_PLANTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.FERTILIZATION)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.FERTILIZATION_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.CONTROL_PHYTO_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_FOLDING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.EVENT_FOLDING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.MORTALITY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.MORTALITY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVESTING)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HARVESTING_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.BUDGET)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.REPLACEMENT)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.REPLACEMENT_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.METEOROLOGY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.METEOROLOGY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_MATERIAL)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLANTING_MATERIAL_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLUVIOMETRY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.PLUVIOMETRY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ETP)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.ETP_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HYGROMETRY)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.HYGROMETRY_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TEMPERATURE)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.TEMPERATURE_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.INSULATION)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.INSULATION_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.WORK)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }else if(metaData.getTitle().equals(ITitle.WORK_en)){\n report.setPageFormat(PageType.A4, PageOrientation.LANDSCAPE);\n }\n \n \n drColumns = new HashMap<String, TextColumnBuilder>(); \n groups = new ArrayList<String>();\n subtotals = new ArrayList<String>();\n \n //Definit la liste des colonnes du rapport\n ExportGenerator.getColumns(metaData); \n //Definit la liste des sous-totaux du rapport\n ExportGenerator.getSubTotals(metaData);\n \n \n //Genration des sous totaux\n for (String group : groups) {\n ColumnGroupBuilder group2 = grp.group(drColumns.get(group));\n report.groupBy(group2);\n for (String subtotal : subtotals) {\n report.subtotalsAtGroupFooter(group2,sbt.sum(drColumns.get(subtotal)));\n }\n }\n\n for (String subtotal : subtotals) {\n report.subtotalsAtSummary(sbt.sum(drColumns.get(subtotal))); \n }\n \n /*if(ExportGenerator.getColumnByNameField(\"plantingName\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL \"), ExportGenerator.getColumnByNameField(\"plantingName\"), Calculation.NOTHING));\n }*//*else if(ExportGenerator.getColumnByNameField(\"invoiceCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"invoiceCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"planterCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL\"), ExportGenerator.getColumnByNameField(\"planterCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"transportTicket\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"transportTicket\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"deliveryDate\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"deliveryDate\"), Calculation.NOTHING));\n }\n else if(ExportGenerator.getColumnByNameField(\"arroundPlantingTicketNumber\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"arroundPlantingTicketNumber\"), Calculation.NOTHING));\n }\n else if(ExportGenerator.getColumnByNameField(\"planterNumber\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"planterNumber\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"startPaymentDate\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"startPaymentDate\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"sectorCode\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL GENERAL \"), ExportGenerator.getColumnByNameField(\"sectorCode\"), Calculation.NOTHING));\n }else if(ExportGenerator.getColumnByNameField(\"month\") != null){\n report.subtotalsAtSummary(sbt.aggregate(exp.text(\"TOTAL \"), ExportGenerator.getColumnByNameField(\"month\"), Calculation.NOTHING));\n }*/\n \n\n \n \n //Genere la source de donnàes du rapport\n report.setDataSource(metaData.getData());\n \n report.highlightDetailEvenRows(); \n \n \n // Definition de l'entete : valable uniquement pour la 1ere page\n HorizontalListBuilder hlb= null;\n \n hlb = cmp.horizontalList().add(\n cmp.hListCell(createCriteriaComponent(criteria,metaData)).heightFixedOnTop()\n );\n\n \n report.title(\n createCustomTitleComponent(metaData.getTitle()), // Titre\n hlb,// Liste Horizontal des Critàres \n cmp.verticalGap(12) // Marge de 12 px entre chaque critàre\n ); \n \n \n \n report.setPageMargin(DynamicReports.margin().setLeft(15).setTop(30).setRight(15).setBottom(30));\n report.setPageFormat(PageType.A3, PageOrientation.LANDSCAPE);\n report.pageFooter(DynamicReports.cmp.pageXslashY());\n return report;\n \n }", "public void action_call(ActionEvent actionEvent) {\n ViewObject searchVO=am.getPOCHeaderView1();\n ViewObject pocvo=am.getpocSearchVo1();\n String poc_id=null;\n int Buyer=0;\n int org=0;\n String orgname=null;\n try{\n poc_id=pocvo.getCurrentRow().getAttribute(\"PocId\").toString();\n }\n catch(Exception e) {\n poc_id=null;\n }\n \n int pram=1;\n am.getDBTransaction().commit();\n /***ViewObject oder=am.getOrderRecapSummary1();\n ViewObject oder=am.getorder_recap_new_view1();\n oder.setNamedWhereClauseParam(\"param\",pram);\n oder.setWhereClause(\"SEASON = '\"+season+\"' AND BUYER_ID = '\"+Buyer+\"' AND ORG_ID= '\"+org+\"'\");\n **/\n \n \n searchVO.setNamedWhereClauseParam(\"param\",pram);\n searchVO.setWhereClause(\"POC_ID = '\"+poc_id+\"'\");\n \n \n \n searchVO.executeQuery();\n \n \n AdfFacesContext.getCurrentInstance().addPartialTarget(pocTable); \n \n \n \n \n \n }", "public GenerateReport() {\n initComponents();\n displayLogs();\n }", "private void btnReporteActionPerformed(java.awt.event.ActionEvent evt) {\n HashMap parametros = new HashMap();\n parametros.put(\"Logo\", \".//src//Imagenes//BuscarComputadora.png\");\n parametros.put(\"Titulo\", \"Resultado de Análisis\");\n parametros.put(\"Subtitulo\", \"Documentos\");\n JasperPrint jprint = EvaluacionBL.generaReporte(\"rptReporteAnalisis\", parametros, null);\n\n try {\n JRViewer jrv = new JRViewer(jprint);\n JFrame frmReporteAnalisis = new JFrame();\n frmReporteAnalisis.getContentPane().add(jrv,BorderLayout.CENTER);\n frmReporteAnalisis.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n frmReporteAnalisis.setSize(706, 478);\n\n frmReporteAnalisis.setTitle(\"Pre - View de Resultado de Análisis\");\n frmReporteAnalisis.setVisible(true);\n\n }catch(Exception e){\n System.out.println(e.getMessage());\n }\n\n }", "private void btnPrintPaymentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnPrintPaymentActionPerformed\n if(searched == false){\n JOptionPane.showMessageDialog(rootPane, \"Please Perform a search on database first.\");\n return;\n }\n try {\n String report = \"IReports\\\\PaymentReport.jrxml\";\n JasperReport jReport = JasperCompileManager.compileReport(report);\n JasperPrint jPrint = JasperFillManager.fillReport(jReport, null, newHandler.getConnector());\n JasperViewer.viewReport(jPrint, false);\n } catch (JRException ex) {\n JOptionPane.showMessageDialog(rootPane, ex.getMessage());\n } \n }", "public void actionPerformed(ActionEvent e) {\n\t\tObject target = e.getSource();\n\t\toptData = new OperationData();\n\t\n\t\t String[] column = new String[3];\n\t\tint userChoice = 0;\n\n\t\tif (target.equals(createReportButton)) {\n\t\t\t\n\t\t\tif (r1.isSelected()) {\n\t\t\t\tuserChoice = 1;\n\t\t\t\t column[0]=\"COUNTY\";column[1]=\"AVG AMOUNT\";column[2]= \" \";\n\t\t\t} else if (r2.isSelected()) {\n\t\t\t\tuserChoice = 2;\n\t\t\t\t column[0]=\"COUNTY\";column[1]=\"CITY\";column[2]= \"TOTAL AMOUNT\";\n\t\t\t} else if (r3.isSelected()) {\n\t\t\t\tuserChoice = 3;\n\t\t\t\t column[0]=\"AVG AGE\";column[1]=\"GENDER\";column[2]= \" \";\n\t\t\t}\n\n\t\t\tList<String[]> list = optData.createReport(userChoice);\n\t\t\tString[][] data = new String[list.size()][3];\n\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\tfor (int j = 0; j < 3; j++) {\n\t\t\t\t\tString[] a = list.get(i);\n\t\t\t\t\tdata[i][j] = a[j];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tjt = new JTable(data, column);\n\t\t\tjsp = new JScrollPane(jt);\n\t\t\tjsp.setPreferredSize(new Dimension(300, 100));\n\t\t\tx.add(jsp);\n\t\t\tx.revalidate();\n\t\t\tx.repaint();\n\t\t} else if (target.equals(closeSearchButton)) {\n\t\t\tsetVisible(false);\n\t\t}\n\t}", "public String f9Action() throws Exception {\r\n\t\tString query = \"SELECT NVL(EXP_CATEGORY_NAME,' '),\"\r\n\t\t\t\t+ \" DECODE(EXP_CATEGORY_UNIT,'D','Per Day','T','Per Travel') ,\"\r\n\t\t\t\t+ \" DECODE(EXP_CATEGORY_STATUS,'A','Active','D','Deactive') , \"\r\n\t\t\t\t+ \" EXP_CATEGORY_ID FROM HRMS_TMS_EXP_CATEGORY\t ORDER BY EXP_CATEGORY_ID\";\r\n\r\n\t\tString[] headers = { getMessage(\"expense.type\"),\r\n\t\t\t\tgetMessage(\"expense.unit\"), getMessage(\"expense.sts\") };\r\n\r\n\t\tString[] headerWidth = { \"15\", \"15\", \"10\" };\r\n\r\n\t\t/**\r\n\t\t * -SET THE FIELDNAMES INTO WHICH THE VALUES ARE BEING POPULATED AFTER A\r\n\t\t * ROW IS SELECTED. -USEFULL IN CASES WHERE SUBMIT FLAG IS 'false'\r\n\t\t * -PARENT FORM WILL SHOW THE VALUES IN THE FILDS CORRSPONDING TO COLUMN\r\n\t\t * INDEX. NOTE: LENGHT OF COLUMN INDEX MUST BE SAME AS THE LENGTH OF\r\n\t\t * FIELDNAMES\r\n\t\t */\r\n\r\n\t\tString[] fieldNames = { \"expenseName\", \"expenseUnit\", \"status\",\r\n\t\t\t\t\"expenseId\" };\r\n\r\n\t\t/**\r\n\t\t * SET THE COLUMN INDEX E.G. SUPPOSE THE POP-UP SHOWS 4 COLUMNS, BUT ON\r\n\t\t * CLICKING A ROW ONLY SECOND AND FORTH COLUMN VALUES NEED TO BE SHOWN\r\n\t\t * IN THE PARENT WINDOW FIELDS THEN THE COLUMN INDEX CAN BE {1,3}\r\n\t\t * \r\n\t\t * NOTE: COLUMN NUMBERS STARTS WITH 0\r\n\t\t * \r\n\t\t */\r\n\t\tint[] columnIndex = { 0, 1, 2, 3 };\r\n\r\n\t\t/**\r\n\t\t * WHEN SET TO 'true' WILL SUBMIT THE FORM\r\n\t\t * \r\n\t\t */\r\n\t\tString submitFlag = \"true\";\r\n\r\n\t\t/**\r\n\t\t * IF THE 'submitFlag' IS 'true' , THE FORM WILL SUBMIT AND CALL\r\n\t\t * FOLLOWING METHOD IN THE ACTION * NAMING CONVENSTION: <NAME OF\r\n\t\t * ACTION>_<METHOD TO CALL>.action\r\n\t\t */\r\n\t\tString submitToMethod = \"ExpensesCategory_details.action\";\r\n\r\n\t\t/**\r\n\t\t * CALL THIS METHOD AFTER ALL PARAMETERS ARE DEFINED *\r\n\t\t */\r\n\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}", "public void onReportClick(){\r\n\t\tmyView.advanceToReport();\r\n\t}", "private void startEvaluation(IPartialPageRequestHandler aTarget, MarkupContainer aForm )\n {\n chartPanel = new ChartPanel(MID_CHART_CONTAINER, \n LoadableDetachableModel.of(this::renderChart));\n chartPanel.setOutputMarkupPlaceholderTag(true);\n chartPanel.setOutputMarkupId(true);\n \n aForm.addOrReplace(chartPanel);\n aTarget.add(chartPanel);\n }", "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 _createPageDef()\n {\n _pageDef = new DemoPageDef();\n _pageDef.setupAttributes();\n \n List<DemoPageDef.SavedSearchDef> searchDefList = _pageDef.setupSavedSearchDefList();\n \n // Mark the first sabved Search definition as the current\n _currentDescriptor = new DemoQueryDescriptor(searchDefList.get(0));\n for (DemoPageDef.SavedSearchDef searchDef: searchDefList)\n {\n DemoQueryDescriptor qd = new DemoQueryDescriptor(searchDef);\n _QDMap.put(searchDef.getName(), qd); \n if (_currentDescriptor == null)\n _currentDescriptor = qd;\n }\n\n _queryModel = new DemoQueryModel(_QDMap);\n \n }", "@SuppressWarnings(\"unchecked\")\n\tprivate CompoundQuery handleQuery() throws Exception{\n\t\tif (this.resultant != null && this.resultant.getResultsContainer() != null){\n\t\t\t//compoundQuery = (CompoundQuery) resultant.getAssociatedQuery();\n\t\t\tViewable view = newCompoundQuery.getAssociatedView();\n\t\t\tResultsContainer resultsContainer = this.resultant.getResultsContainer();\n\t\t\tsampleCrit = null;\n\t Collection sampleIDs = new ArrayList(); \n\t\t\t//Get the samples from the resultset object\n\t\t\tif(resultsContainer!= null){\n\t\t\t\tCollection samples = null;\n\t\t\t\tif(resultsContainer != null &&resultsContainer instanceof DimensionalViewContainer){\t\t\t\t\n\t\t\t\t\tDimensionalViewContainer dimensionalViewContainer = (DimensionalViewContainer)resultsContainer;\n\t\t\t\t\t\tCopyNumberSingleViewResultsContainer copyNumberSingleViewContainer = dimensionalViewContainer.getCopyNumberSingleViewContainer();\n\t\t\t\t\t\tGeneExprSingleViewResultsContainer geneExprSingleViewContainer = dimensionalViewContainer.getGeneExprSingleViewContainer();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(copyNumberSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = copyNumberSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(geneExprSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = geneExprSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t \t\tsampleCrit = new SampleCriteria();\n\t\t \t\t\tsampleCrit.setSampleIDs(sampleIDs);\n\n AddConstrainsToQueriesHelper constrainedSamplesHandler= new AddConstrainsToQueriesHelper();\n constrainedSamplesHandler.constrainQueryWithSamples(newCompoundQuery,sampleCrit);\n\t\t\t\tnewCompoundQuery = getShowAllValuesQuery(newCompoundQuery);\n\t\t\t\tnewCompoundQuery.setAssociatedView(view);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn newCompoundQuery;\n\t\t}", "public String report() {\r\n\t\tsession2 = ServletActionContext.getRequest().getSession();\r\n\t\tlogger.info(session2);\r\n\t\tif (session2 == null || session2.getAttribute(\"login\") == null) {\r\n\t\t\tlogger.error(\"if=====session error reporting===='\");\r\n\t\t\treturn LOGIN;\r\n\t\t} else {\r\n\t\t\tfactory = LoginAndSession.getFactory();\r\n\t\t\tdao_userWise = (Productivity_user_wiseDao) factory.getBean(\"d27\");\r\n\t\t\tdao_propwise = (Productivity_property_wiseDao) factory.getBean(\"d29\");\r\n\t\t\tpcw = (Productivity_client_wiseDao) factory.getBean(\"d30\");\r\n\t\t\tif (colorRadio.equalsIgnoreCase(\"red\")) {\r\n\r\n\t\t\t\t// for all user\r\n\t\t\t\ttry {\r\n\t\t\t\t\tlst = dao_userWise\r\n\t\t\t\t\t\t\t.viewRecord(\"select puw.curr_date, puw.source_link, puw.infringing_link, puw.youtube,\"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.social_media, puw.white_list, puw.grey_list, puw.duplicate , mu.name\"\r\n\t\t\t\t\t\t\t\t\t+ \" , puw.facebook, puw.instagram, puw.twitter, puw.vk, puw.periscope, puw.source_domain,\"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.infringing_domain , puw.user_id \"\r\n\t\t\t\t\t\t\t\t\t+ \" from Productivity_user_wise puw, Markscan_users mu where puw.curr_date \"\r\n\t\t\t\t\t\t\t\t\t+ \" between '\" + date + \"' and '\" + date1 + \"' and mu.id= puw.user_id\");\r\n\t\t\t\t\tmonthlyGraph = new ArrayList<>();\r\n\r\n\t\t\t\t\tcud = (Crawle_url2Dao) factory.getBean(\"dash\");\r\n\r\n\t\t\t\t\t// lst1= cud.viewRecord(\"select DISTINCT count(domain_name)\r\n\t\t\t\t\t// ,date(created_on), link_logger from crawle_url3 where\r\n\t\t\t\t\t// user_id= 75 and created_on >'2017-06-01' and\r\n\t\t\t\t\t// link_logger=1 group by date(created_on)\")\r\n\r\n\t\t\t\t\tfor (int i = 0; i < lst.size(); i++) {\r\n\t\t\t\t\t\t obj = (Object[]) lst.get(i);\r\n\r\n\t\t\t\t\t\t data = new DashBoardData();\r\n\r\n\t\t\t\t\t\tdata.setDate(obj[0].toString());\r\n\t\t\t\t\t\tdata.setSource((Integer) obj[1]);\r\n\t\t\t\t\t\tdata.setInfringing((Integer) obj[2]);\r\n\r\n\t\t\t\t\t\tdata.setYoutube((Integer) obj[3]);\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[4]);\r\n\r\n\t\t\t\t\t\tdata.setWhite_list((Integer) obj[5]);\r\n\t\t\t\t\t\tdata.setGrey_list((Integer) obj[6]);\r\n\t\t\t\t\t\tdata.setDuplicate((Integer) obj[7]);\r\n\t\t\t\t\t\tdata.setProj_name(obj[8].toString()); // user_name\r\n\r\n\t\t\t\t\t\tdata.setFacebook((Integer) obj[9]);\r\n\t\t\t\t\t\tdata.setInstagram((Integer) obj[10]);\r\n\t\t\t\t\t\tdata.setTwitter((Integer) obj[11]);\r\n\t\t\t\t\t\tdata.setVk((Integer) obj[12]);\r\n\t\t\t\t\t\tdata.setPeriscope((Integer) obj[13]);\r\n\t\t\t\t\t\tdata.setSource_domain((Integer) obj[14]);\r\n\t\t\t\t\t\tdata.setInfringing_domain((Integer) obj[15]);\r\n\t\t\t\t\t\tdata.setUser_id((Integer) obj[16]);\r\n\t\t\t\t\t\tlst1 = dao_propwise.viewRecord(\r\n\t\t\t\t\t\t\t\t\"select DISTINCT cm.client_name , mp.name , cm.id from Productivity_property_wise ppw, \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" Project_info pi, Client_master cm, Markscan_projecttype mp where \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" ppw.project_id= pi.id and \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" pi.client_type= cm.id and pi.project_type = mp.id and ppw.user_id =\"\r\n\t\t\t\t\t\t\t\t\t\t+ (Integer) obj[16] + \" and \" + \" ppw.created_on = '\" + obj[0].toString()\r\n\t\t\t\t\t\t\t\t\t\t+ \"'\");\r\n\t\t\t\t\t\tin_side = new ArrayList<>();\r\n\t\t\t\t\t\tfor (int i1 = 0; i1 < lst1.size(); i1++) {\r\n\t\t\t\t\t\t\t obj1 = (Object[]) lst1.get(i1);\r\n\r\n\t\t\t\t\t\t\tlst0 = dao_propwise.viewRecord(\"select sum( productivi0_.source_count), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.infringing_count),sum( productivi0_.youtube), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.facebook), sum(productivi0_.instagram), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.twitter),sum(productivi0_.vk), sum(productivi0_.periscope) \"\r\n\t\t\t\t\t\t\t\t\t+ \" from Productivity_property_wise productivi0_, Project_info project_in1_ \"\r\n\t\t\t\t\t\t\t\t\t+ \" where project_in1_.id=productivi0_.project_id and \" + \" productivi0_.user_id=\"\r\n\t\t\t\t\t\t\t\t\t+ (Integer) obj[16] + \" and \" + \" productivi0_.created_on='\" + obj[0].toString()\r\n\t\t\t\t\t\t\t\t\t+ \"' and \" + \"project_in1_.client_type=\" + (Integer) obj1[2]);\r\n\r\n\t\t\t\t\t\t\tfor (int i0 = 0; i0 < lst0.size(); i0++) {\r\n\t\t\t\t\t\t\t\t obj0 = (Object[]) lst0.get(i0);\r\n\r\n\t\t\t\t\t\t\t\t craw = new Crawle_url2();\r\n\t\t\t\t\t\t\t\tcraw.setWid(obj1[0].toString()); // client_name\r\n\t\t\t\t\t\t\t\tcraw.setIs_valid(((Long) obj0[0]).intValue());// source\r\n\t\t\t\t\t\t\t\tcraw.setStatus(((Long) obj0[1]).intValue());// infringing\r\n\t\t\t\t\t\t\t\tcraw.setUser_id(((Long) obj0[2]).intValue());// youtube\r\n\t\t\t\t\t\t\t\tcraw.setProject_id(((Long) obj0[3]).intValue());// FB\r\n\t\t\t\t\t\t\t\tcraw.setType(((Long) obj0[4]).intValue());// instagram\r\n\t\t\t\t\t\t\t\tcraw.setVerified(((Long) obj0[5]).intValue());// twitter\r\n\t\t\t\t\t\t\t\tcraw.setSite_down(((Long) obj0[6]).intValue());// vk\r\n\t\t\t\t\t\t\t\tcraw.setIs_new(((Long) obj0[7]).intValue());// pscp\r\n\r\n\t\t\t\t\t\t\t\tin_side.add(craw);\r\n\t\t\t\t\t\t\t\tobj0=null;\r\n\t\t\t\t\t\t\t\tcraw=null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tobj1=null;\r\n\t\t\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// System.out.println(client_names);\r\n\t\t\t\t\t\tdata.setInside(in_side);\r\n\r\n\t\t\t\t\t\tmonthlyGraph.add(data);\r\n\t\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\t\tdata=null;\r\n\t\t\t\t\t\t\t\tobj=null;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn ERROR;\r\n\t\t\t\t}\r\n\t\t\t\tfinally{\r\n\t\t\t\t\tobj0=null;\r\n\t\t\t\t\tcraw=null;\r\n\t\t\t\t\tobj1=null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tdata=null;\r\n\t\t\t\t\t\t\tobj=null;\r\n\t\t\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t\t\t\tlst = null;\r\n\t\t\t\t\t\t\tfactory=null;\r\n\t\t\t\t\t\t\tdao_userWise=null;\r\n\t\t\t\t\t\t\tdao_propwise=null;\r\n\t\t\t\t\t\t\tsession2=null;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"allEmpReport\";\r\n\t\t\t} else if (colorRadio.equalsIgnoreCase(\"green\")) {\r\n\t\t\t\t// for single user\r\n\t\t\t\ttry {\r\n\t\t\t\t\tlst = dao_userWise\r\n\t\t\t\t\t\t\t.viewRecord(\"select puw.curr_date, puw.source_link, puw.infringing_link, puw.youtube, \"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.social_media, puw.white_list, puw.grey_list, puw.duplicate , puw.facebook,\"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.instagram, puw.twitter, puw.vk, puw.periscope, puw.source_domain, \"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.infringing_domain from \" + \" Productivity_user_wise puw where puw.user_id=\"\r\n\t\t\t\t\t\t\t\t\t+ usertype + \" and puw.curr_date between\" + \" '\" + date + \"' and '\" + date1 + \"'\");\r\n\t\t\t\t\tmonthlyGraph = new ArrayList<>();\r\n\r\n\t\t\t\t\tfor (int i = 0; i < lst.size(); i++) {\r\n\t\t\t\t\t\t obj = (Object[]) lst.get(i);\r\n\r\n\t\t\t\t\t\t data = new DashBoardData();\r\n\t\t\t\t\t\tdata.setDate(obj[0].toString());\r\n\t\t\t\t\t\tdata.setSource((Integer) obj[1]);\r\n\t\t\t\t\t\tdata.setInfringing((Integer) obj[2]);\r\n\r\n\t\t\t\t\t\tdata.setYoutube((Integer) obj[3]);\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[4]);\r\n\r\n\t\t\t\t\t\tdata.setWhite_list((Integer) obj[5]);\r\n\t\t\t\t\t\tdata.setGrey_list((Integer) obj[6]);\r\n\t\t\t\t\t\tdata.setDuplicate((Integer) obj[7]);\r\n\r\n\t\t\t\t\t\tdata.setFacebook((Integer) obj[8]);\r\n\t\t\t\t\t\tdata.setInstagram((Integer) obj[9]);\r\n\t\t\t\t\t\tdata.setTwitter((Integer) obj[10]);\r\n\t\t\t\t\t\tdata.setVk((Integer) obj[11]);\r\n\t\t\t\t\t\tdata.setPeriscope((Integer) obj[12]);\r\n\t\t\t\t\t\tdata.setSource_domain((Integer) obj[13]);\r\n\t\t\t\t\t\tdata.setInfringing_domain((Integer) obj[14]);\r\n\r\n\t\t\t\t\t\tlst1 = dao_propwise.viewRecord(\r\n\t\t\t\t\t\t\t\t\"select DISTINCT cm.client_name , mp.name , cm.id from Productivity_property_wise ppw, \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" Project_info pi, Client_master cm, Markscan_projecttype mp where \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" ppw.project_id= pi.id and \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" pi.client_type= cm.id and pi.project_type = mp.id and ppw.user_id =\"\r\n\t\t\t\t\t\t\t\t\t\t+ usertype + \" and \" + \" ppw.created_on = '\" + obj[0].toString() + \"'\");\r\n\t\t\t\t\t\tin_side = new ArrayList<>();\r\n\t\t\t\t\t\tfor (int i1 = 0; i1 < lst1.size(); i1++) {\r\n\t\t\t\t\t\t\t obj1 = (Object[]) lst1.get(i1);\r\n\r\n\t\t\t\t\t\t\tlst0 = dao_propwise.viewRecord(\"select sum( productivi0_.source_count), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.infringing_count),sum( productivi0_.youtube), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.facebook), sum(productivi0_.instagram), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.twitter),sum(productivi0_.vk), sum(productivi0_.periscope) \"\r\n\t\t\t\t\t\t\t\t\t+ \" from Productivity_property_wise productivi0_, Project_info project_in1_ \"\r\n\t\t\t\t\t\t\t\t\t+ \" where project_in1_.id=productivi0_.project_id and \" + \" productivi0_.user_id=\"\r\n\t\t\t\t\t\t\t\t\t+ usertype + \" and \" + \" productivi0_.created_on='\" + obj[0].toString() + \"' and \"\r\n\t\t\t\t\t\t\t\t\t+ \"project_in1_.client_type=\" + (Integer) obj1[2]);\r\n\r\n\t\t\t\t\t\t\tfor (int i0 = 0; i0 < lst0.size(); i0++) {\r\n\t\t\t\t\t\t\t\t obj0 = (Object[]) lst0.get(i0);\r\n\r\n\t\t\t\t\t\t\t\t craw = new Crawle_url2();\r\n\t\t\t\t\t\t\t\tcraw.setWid(obj1[0].toString()); // client_name\r\n\t\t\t\t\t\t\t\tcraw.setIs_valid(((Long) obj0[0]).intValue());// source\r\n\t\t\t\t\t\t\t\tcraw.setStatus(((Long) obj0[1]).intValue());// infringing\r\n\t\t\t\t\t\t\t\tcraw.setUser_id(((Long) obj0[2]).intValue());// youtube\r\n\t\t\t\t\t\t\t\tcraw.setProject_id(((Long) obj0[3]).intValue());// FB\r\n\t\t\t\t\t\t\t\tcraw.setType(((Long) obj0[4]).intValue());// instagram\r\n\t\t\t\t\t\t\t\tcraw.setVerified(((Long) obj0[5]).intValue());// twitter\r\n\t\t\t\t\t\t\t\tcraw.setSite_down(((Long) obj0[6]).intValue());// vk\r\n\t\t\t\t\t\t\t\tcraw.setIs_new(((Long) obj0[7]).intValue());// pscp\r\n\r\n\t\t\t\t\t\t\t\tin_side.add(craw);\r\n\t\t\t\t\t\t\t\tobj0=null;\r\n\t\t\t\t\t\t\t\tcraw=null;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tobj1=null;\r\n\t\t\t\t\t\t\tlst0=null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdata.setInside(in_side);\r\n\t\t\t\t\t\tmonthlyGraph.add(data);\r\n\t\t\t\t\t\tobj=null;\r\n\t\t\t\t\t\tdata= null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn ERROR;\r\n\t\t\t\t}\r\n\t\t\t\tfinally\r\n\t\t\t\t{\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t\tdata=null;\r\n\t\t\t\t\tcraw= null;\r\n\t\t\t\t\tfactory=null;\r\n\t\t\t\t\tdao_userWise=null;\r\n\t\t\t\t\tdao_propwise=null;\r\n\t\t\t\t\tsession2=null;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"empReport\";\r\n\t\t\t} else if (colorRadio.equalsIgnoreCase(\"blue\")) {\r\n\t\t\t\t// for client wise\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\tlst = pcw.viewRecord(\"select pcw.curr_date, pcw.source_link, pcw.infringing_link, pcw.youtube,\"\r\n\t\t\t\t\t\t\t+ \" pcw.social_media, pcw.white_list, pcw.grey_list , pcw.facebook, pcw.instagram, pcw.twitter,\"\r\n\t\t\t\t\t\t\t+ \" pcw.vk, pcw.periscope, pcw.source_domain, pcw.infringing_domain from Productivity_client_wise \"\r\n\t\t\t\t\t\t\t+ \" pcw where pcw.curr_date between '\" + date + \"' and '\" + date1 + \"' and pcw.client_id=\"\r\n\t\t\t\t\t\t\t+ clientname);\r\n\t\t\t\t\tmonthlyGraph = new ArrayList<>();\r\n\r\n\t\t\t\t\tfor (int i = 0; i < lst.size(); i++) {\r\n\t\t\t\t\t\t obj = (Object[]) lst.get(i);\r\n\r\n\t\t\t\t\t\t data = new DashBoardData();\r\n\t\t\t\t\t\tdata.setDate(obj[0].toString());\r\n\t\t\t\t\t\tdata.setSource((Integer) obj[1]);\r\n\t\t\t\t\t\tdata.setInfringing((Integer) obj[2]);\r\n\r\n\t\t\t\t\t\tdata.setYoutube((Integer) obj[3]);\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[4]);\r\n\r\n\t\t\t\t\t\tdata.setWhite_list((Integer) obj[5]);\r\n\t\t\t\t\t\tdata.setGrey_list((Integer) obj[6]);\r\n\r\n\t\t\t\t\t\tdata.setFacebook((Integer) obj[7]);\r\n\t\t\t\t\t\tdata.setInstagram((Integer) obj[8]);\r\n\t\t\t\t\t\tdata.setTwitter((Integer) obj[9]);\r\n\t\t\t\t\t\tdata.setVk((Integer) obj[10]);\r\n\t\t\t\t\t\tdata.setPeriscope((Integer) obj[11]);\r\n\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[7] + (Integer) obj[8] + (Integer) obj[9] + (Integer) obj[10]\r\n\t\t\t\t\t\t\t\t+ (Integer) obj[11]);\r\n\r\n\t\t\t\t\t\tdata.setSource_domain((Integer) obj[12]);\r\n\t\t\t\t\t\tdata.setInfringing_domain((Integer) obj[13]);\r\n\r\n\t\t\t\t\t\tlst1 = dao_propwise.viewRecord(\r\n\t\t\t\t\t\t\t\t\"select DISTINCT mu.name, ppw.created_on ,ppw.user_id from Productivity_property_wise ppw ,\"\r\n\t\t\t\t\t\t\t\t\t\t+ \" Markscan_users mu where mu.id= ppw.user_id and ppw.client_id = \"\r\n\t\t\t\t\t\t\t\t\t\t+ clientname + \" and ppw.created_on='\" + obj[0].toString() + \"' \");\r\n\t\t\t\t\t\tin_side = new ArrayList<>();\r\n\t\t\t\t\t\tfor (int i1 = 0; i1 < lst1.size(); i1++) {\r\n\t\t\t\t\t\t\t obj1 = (Object[]) lst1.get(i1);\r\n\r\n\t\t\t\t\t\t\tlst0 = dao_propwise.viewRecord(\" select sum( productivi0_.source_count),\"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.infringing_count),sum( productivi0_.youtube), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.facebook),sum(productivi0_.instagram),sum(productivi0_.twitter) \"\r\n\t\t\t\t\t\t\t\t\t+ \" ,sum(productivi0_.vk),sum( productivi0_.periscope) from \"\r\n\t\t\t\t\t\t\t\t\t+ \" Productivity_property_wise productivi0_, Markscan_users markscan_u1_ where \"\r\n\t\t\t\t\t\t\t\t\t+ \" markscan_u1_.id=productivi0_.user_id and productivi0_.client_id= \" + clientname\r\n\t\t\t\t\t\t\t\t\t+ \" and productivi0_.created_on='\" + obj[0].toString() + \"' and \"\r\n\t\t\t\t\t\t\t\t\t+ \" productivi0_.user_id=\" + (Integer) obj1[2]);\r\n\r\n\t\t\t\t\t\t\tfor (int i0 = 0; i0 < lst0.size(); i0++) {\r\n\t\t\t\t\t\t\t\t obj0 = (Object[]) lst0.get(i0);\r\n\r\n\t\t\t\t\t\t\t\t craw = new Crawle_url2();\r\n\t\t\t\t\t\t\t\tcraw.setWid(obj1[0].toString()); // client_name\r\n\t\t\t\t\t\t\t\tcraw.setIs_valid(((Long) obj0[0]).intValue());// source\r\n\t\t\t\t\t\t\t\tcraw.setStatus(((Long) obj0[1]).intValue());// infringing\r\n\t\t\t\t\t\t\t\tcraw.setUser_id(((Long) obj0[2]).intValue());// youtube\r\n\t\t\t\t\t\t\t\tcraw.setProject_id(((Long) obj0[3]).intValue());// FB\r\n\t\t\t\t\t\t\t\tcraw.setType(((Long) obj0[4]).intValue());// instagram\r\n\t\t\t\t\t\t\t\tcraw.setVerified(((Long) obj0[5]).intValue());// twitter\r\n\t\t\t\t\t\t\t\tcraw.setSite_down(((Long) obj0[6]).intValue());// vk\r\n\t\t\t\t\t\t\t\tcraw.setIs_new(((Long) obj0[7]).intValue());// pscp\r\n\r\n\t\t\t\t\t\t\t\tin_side.add(craw);\r\n\t\t\t\t\t\t\t\tobj0=null;\r\n\t\t\t\t\t\t\t\tcraw=null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tobj1=null;\r\n\t\t\t\t\t\t\tlst0=null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tdata.setInside(in_side);\r\n\r\n\t\t\t\t\t\tmonthlyGraph.add(data);\r\n\t\t\t\t\t\tobj= null;\r\n\t\t\t\t\t\tdata= null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpcw = null;\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn ERROR;\r\n\t\t\t\t}\r\n\t\t\t\tfinally{\r\n\t\t\t\t\tpcw = null;\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t\tobj=null;\r\n\t\t\t\t\tdata=null;\r\n\t\t\t\t\tcraw=null;\r\n\t\t\t\t\tfactory=null;\r\n\t\t\t\t\tdao_userWise=null;\r\n\t\t\t\t\tdao_propwise=null;\r\n\t\t\t\t\tsession2=null;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"clientReport\";\r\n\t\t\t}\r\n\r\n\t\t\tfactory=null;\r\n\t\t\tdao_userWise=null;\r\n\t\t\tdao_propwise=null;\r\n\t\t\tsession2=null;\r\n\t\t\tSystem.gc();\r\n\t\t\treturn SUCCESS;\r\n\t\t}\r\n\t}", "public void generateReport() {\n ReportGenerator rg = ui.getReportGenerator();\n if (rg == null || !rg.isVisible()) {\n ui.openReportGenerator();\n rg = ui.getReportGenerator();\n }\n Image img = getImage();\n if (img == null) {\n return;\n }\n rg.addImage(img, \"Plot\");\n }", "public void actionPerformed(ActionEvent ae) {\n\n //\n // Process the action command\n //\n // \"create report\" - Create the report\n // \"cancel\" - All done\n //\n try {\n switch (ae.getActionCommand()) {\n case \"create report\":\n Date startDate, endDate;\n CategoryRecord category;\n int sortMode;\n if (!startField.isEditValid() || !endField.isEditValid()) {\n JOptionPane.showMessageDialog(this, \"You must specify start and end dates\",\n \"Error\", JOptionPane.ERROR_MESSAGE);\n } else {\n startDate = (Date)startField.getValue();\n endDate = (Date)endField.getValue();\n if (endDate.compareTo(startDate) < 0) {\n JOptionPane.showMessageDialog(this, \"The end date is before the start date\",\n \"Error\", JOptionPane.ERROR_MESSAGE);\n } else {\n int index = categoryField.getSelectedIndex();\n if (index > 0)\n category = (CategoryRecord)categoryModel.getDBElementAt(index);\n else\n category = null;\n\n if (sortAccountField.isSelected())\n sortMode = SORT_BY_ACCOUNT;\n else if (sortNameField.isSelected())\n sortMode = SORT_BY_NAME;\n else if (sortCategoryField.isSelected())\n sortMode = SORT_BY_CATEGORY;\n else\n sortMode = SORT_BY_DATE;\n\n generateReport(startDate, endDate, category, sortMode);\n }\n }\n break;\n \n case \"cancel\":\n setVisible(false);\n dispose();\n break;\n }\n } catch (ReportException exc) {\n Main.logException(\"Exception while generating transaction report\", exc);\n } catch (Exception exc) {\n Main.logException(\"Exception while processing action event\", exc);\n }\n }", "public void makeReport()\n\t{\n\t\tif (currentStage[currentSlice-1] > 1)\n\t\t{\n\t\t\tResultsTable rt = new ResultsTable();\n\t\t\tfor (int j=0;j<popSequence.N;j++)\n\t\t\t{\n\t\t\t\tpop = popSequence.PopList[j];\n\t\t\t\tint N = pop.N;\n\t\t\t\tfor (int i=0;i<N;i++)\n\t\t\t\t{\n\t\t\t\t\trt.incrementCounter();\n\t\t\t\t\tBalloon bal;\n\t\t\t\t\tbal = (Balloon)(pop.BallList.get(i));\n\t\t\t\t\tbal.mass_geometry();\n\t\t\t\t\trt.addValue(\"X\",bal.x0);\n\t\t\t\t\trt.addValue(\"Y\",bal.y0);\n\t\t\t\t\trt.addValue(\"Z\",j);\n\t\t\t\t\trt.addValue(\"ID\",bal.id);\n\t\t\t\t\trt.addValue(\"AREA\",bal.area);\n\t\t\t\t\trt.addValue(\"Ixx\",bal.Ixx);\n\t\t\t\t\trt.addValue(\"Iyy\",bal.Iyy);\n\t\t\t\t\trt.addValue(\"Ixy\",bal.Ixy);\n\t\t\t\t\trt.addValue(\"Lx\",bal.lx);\n\t\t\t\t\trt.addValue(\"Ly\",bal.ly);\n\t\t\t\t}\n\t\t\t}\n\t\t\trt.show(\"Report\");\n\t\t\tcurrentSlice = i1.getCurrentSlice();\n\t\t\tipWallSegment = (i1.getStack()).getProcessor(i1.getCurrentSlice());\n\t\t\tpop = popSequence.PopList[currentSlice-1];\n\t\t}\n\t}", "public void generateReport()\r\n {\r\n ProfilerGUI reportGUI = new ProfilerGUI(map,mapCountTracker);\r\n //reportGUI.\r\n }", "public String f9action() throws Exception {\r\n\t\tString query = \" SELECT QUES_NAME , QUES_TYPE,QUES_CODE FROM HRMS_QUES \" \r\n\t\t\t\t\t+\" ORDER BY upper(QUES_NAME) \";\t\t\r\n\t\t\r\n\t\t/**\r\n\t\t * \t\tSET THE HEADER NAMES OF TABLE WHICH IS DISPLAYED IN POP-UP WINDOW.\t\t * \r\n\t\t */ \r\n\t\tString[] headers={ getMessage(\"questionname\")};\r\n\t\t\r\n\t\tString[] headerWidth={ \"100\"};\r\n\t\t\r\n\t\t/**\r\n\t\t * \t\t-SET THE FIELDNAMES INTO WHICH THE VALUES ARE BEING POPULATED AFTER A ROW IS SELECTED.\r\n\t\t * \t\t-USEFULL IN CASES WHERE SUBMIT FLAG IS 'false'\r\n\t\t * \t\t-PARENT FORM WILL SHOW THE VALUES IN THE FILDS CORRSPONDING TO COLUMN INDEX.\r\n\t\t * \t\tNOTE: LENGHT OF COLUMN INDEX MUST BE SAME AS THE LENGTH OF FIELDNAMES\t\t \r\n\t\t * */ \t\r\n\t\t\r\n\t\tString[] fieldNames={\"quesName\",\"quesType\",\"quesCode\"};\r\n\t\t\r\n\t\t/**\r\n\t\t * \t \tSET THE COLUMN INDEX\r\n\t\t * \t\tE.G. SUPPOSE THE POP-UP SHOWS 4 COLUMNS, BUT ON CLICKING A ROW\r\n\t\t * \t\t\tONLY SECOND AND FORTH COLUMN VALUES NEED TO BE SHOWN IN THE PARENT WINDOW FIELDS\r\n\t\t * \t\t\tTHEN THE COLUMN INDEX CAN BE {1,3}\r\n\t\t * \t\t\r\n\t\t * \t\tNOTE: COLUMN NUMBERS STARTS WITH 0\t\t \t\r\n\t\t * \r\n\t\t */ \r\n\t\tint[] columnIndex={0,1,2};\r\n\t\t\r\n\t\t/**\r\n\t\t * \t\tWHEN SET TO 'true' WILL SUBMIT THE FORM\r\n\t\t * \r\n\t\t */\r\n\t\tString submitFlag = \"true\";\r\n\t\t\r\n\t\t/**\t\t \r\n\t\t * \t\tIF THE 'submitFlag' IS 'true' , THE FORM WILL SUBMIT AND CALL FOLLOWING METHOD IN THE ACTION * \r\n\t\t * \t\tNAMING CONVENSTION: <NAME OF ACTION>_<METHOD TO CALL>.action\r\n\t\t */\r\n\t\tString submitToMethod=\"QuestionnaireMaster_showRecord.action\";\r\n\t\t\r\n\t\t/**\r\n\t\t * \t\tCALL THIS METHOD AFTER ALL PARAMETERS ARE DEFINED\t\t * \r\n\t\t */\r\n\t\t\r\n\t\tsetF9Window(query,headers,headerWidth,fieldNames,columnIndex,submitFlag,submitToMethod);\r\n\t\t\r\n\t\treturn \"f9page\";\r\n\t}", "public void actionPerformed(ActionEvent ae) {\n\n //\n // Process the action command\n //\n // \"create report\" - Create the report\n // \"done\" - All done\n //\n try {\n switch (ae.getActionCommand()) {\n case \"create report\":\n AccountRecord account;\n SecurityRecord security;\n int index = accountField.getSelectedIndex();\n if (index < 0) {\n JOptionPane.showMessageDialog(this, \"You must specify an investment account\",\n \"Error\", JOptionPane.ERROR_MESSAGE);\n } else {\n account = (AccountRecord)accountModel.getDBElementAt(index);\n index = securityField.getSelectedIndex();\n if (index >= 0)\n security = (SecurityRecord)securityModel.getDBElementAt(index);\n else\n security = null;\n\n securityField.setSelectedIndex(-1);\n generateReport(account, security);\n }\n break;\n \n case \"done\":\n setVisible(false);\n dispose();\n break;\n }\n } catch (ReportException exc) {\n Main.logException(\"Exception while generating report\", exc);\n } catch (Exception exc) {\n Main.logException(\"Exception while processing action event\", exc);\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\tnew ReportPage(value);\r\n\t\t\t}", "public void displayReport() {\n\t\treport = new ReportFrame(fitnessProg);\n\t\treport.buildReport();\n\t\treport.setVisible(true);\n\t}", "public QueryExecution createQueryExecution(Query qry);", "public void detailReport() {\r\n\t\tint testStepId = 1;\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><table class=\\\"width100\\\"><tr><td><div class=\\\"headertext1 bold\\\">Test Execution Detail Report</div></td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><div class=\\\"headertext1 bold\\\">Execution Browser Name: \"+ GlobalVariables.getBrowserName() + \"</div></td></tr>\");\r\n\t\tstrBufferReportAppend.append(\r\n\t\t\t\t\"<tr><td><div class=\\\"headertext1 bold\\\">Test Case Name: \"+ GlobalVariables.getTestCaseName() + \"</div></td></tr>\");\r\n\t\t\r\n\t\t\r\n\t\tstrBufferReportAppend.append(\"<tr><td>\");\r\n\t\tstrBufferReportAppend\r\n\t\t\t\t.append(\"<table colspan=3 border=0 cellpadding=3 cellspacing=1 class=\\\"reporttable width100\\\">\");\r\n\t\tstrBufferReportAppend.append(\"<tr><th class=\\\"auto-style1\\\">Test Step No</th>\" + \"<th class=\\\"auto-style2\\\">Action</th>\"\r\n\t\t\t\t+ \"<th class=\\\"auto-style3\\\">Actual Result</th>\" + \"<th class=\\\"auto-style4\\\">Status</th></tr>\");\r\n\t\tfor (ReportBean reportValue : GlobalVariables.getReportList()) {\r\n\r\n\t\t\tif (reportValue.getStatus().equalsIgnoreCase(\"Passed\")) {\r\n\r\n\t\t\t\tstrBufferReportAppend.append(\"<tr>\" + \"<td class=\\\"auto-style1 blue\\\">\" + testStepId++ + \"</td>\"// teststepid\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style2 blue\\\">\" + reportValue.getStrAction() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style3 blue\\\">\" + reportValue.getResult() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style4 green\\\">\" + reportValue.getStatus() + \"</td></tr>\");\r\n\t\t\t} else if (reportValue.getStatus().equalsIgnoreCase(\"Failed\")) {\r\n\t\t\t\tstrBufferReportAppend.append(\"<tr>\" + \"<td class=\\\"auto-style1 blue\\\">\" + testStepId++ + \"</td>\"// teststepid\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style2 blue\\\">\" + reportValue.getStrAction() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style3 blue\\\">\" + reportValue.getResult() + \"</td>\"\r\n\t\t\t\t\t\t+ \"<td class=\\\"auto-style4 red\\\">\" + reportValue.getStatus() + \"</td></tr>\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tstrBufferReportAppend.append(\"</table>\");\r\n\t\tstrBufferReportAppend.append(\"</td></tr>\");\r\n\t\tstrBufferReportAppend.append(\"</table></td></tr></table></body></html>\");\r\n\t}", "@Override\n\tpublic void search() {\n\n\t\tif (firstMonth.equalsIgnoreCase(secondMonth)) {\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(\n\t\t\t\t\t\t\t\"please choose different months to compare\"));\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\n\t\t\tString queury = \"SELECT nvl(TO_CHAR(INVOICES.INVOICE_ORDER) ,'NA') AS INVOICE_ORDER \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.INVOICE_NUMBER ,'NA') AS INVOICE_NUMBER \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.BOOKING_FILE_NUMBER ,'NA') AS BOOKING_FILE_NUMBER \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.DEPARTURE_DATE, 'dd/mm/yyyy') ,'NA') AS DEPARTURE_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.ARRIVAL_DATE, 'dd/mm/yyyy') ,'NA') AS ARRIVAL_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.EMPLOYEE_ID ,'NA') AS EMPLOYEE_ID \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.COST_CENTER ,'NA') AS COST_CENTER \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.COST_CENTER_DEPARTMENT ,'NA') AS COST_CENTER_DEPARTMENT \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.PASSENGER_NAME ,'NA') AS PASSENGER_NAME \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.SERVICE_TYPE ,'NA') AS SERVICE_TYPE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.SERVICE_DESC ,'NA') AS SERVICE_DESC \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.ROUTING ,'NA') AS ROUTING \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.INTER_DOM ,'NA') AS INTER_DOM \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.CHECK_IN, 'dd/mm/yyyy') ,'NA') AS CHECK_IN \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.CHECK_OUT, 'dd/mm/yyyy') ,'NA') AS CHECK_OUT \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.NUMBER_OF_NIGHTS) ,0) AS NUMBER_OF_NIGHTS \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.NUMBER_OF_ROOMS) ,0) AS NUMBER_OF_ROOMS \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.AIRLINE ,'NA') AS AIRLINE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.ROOM_TYPE ,'NA') AS ROOM_TYPE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.SUPPLIER_NAME ,'NA') AS SUPPLIER_NAME \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.NET_AMOUNT ,0) AS NET_AMOUNT \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.OPERATION_FEES ,0) AS OPERATION_FEES \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.TOTAL_AMOUNT ,0) AS TOTAL_AMOUNT \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.TICKET_NO ,'NA') AS TICKET_NO \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.TRAVEL_FORM_NUMBER ,'NA') AS TRAVEL_FORM_NUMBER \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.DESCRIPTION ,'NA') AS DESCRIPTION \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.FROM_DATE, 'dd/mm/yyyy') ,'NA') AS FROM_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.TO_DATE, 'dd/mm/yyyy') ,'NA') AS TO_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(INVOICES.EMPLOYEE_DEPARTMENT ,'NA') AS EMPLOYEE_DEPARTMENT \\n\"\n\t\t\t\t\t+ \" ,nvl(TO_CHAR(INVOICES.INVOICE_DATE, 'dd/mm/yyyy') ,'NA') AS INVOICE_DATE \\n\"\n\t\t\t\t\t+ \" ,nvl(UPLOADED_INVOICE_FILE.INVOICES_MONTH ,'NA') AS INVOICES_MONTH \\n\"\n\t\t\t\t\t+ \" FROM INVOICES INNER JOIN UPLOADED_INVOICE_FILE \\n\"\n\t\t\t\t\t+ \" ON INVOICES.UPLOADED_INVOICE_FILE_ID = UPLOADED_INVOICE_FILE.ID \\n\"\n\t\t\t\t\t+ \" WHERE UPLOADED_INVOICE_FILE.INVOICES_MONTH IN ('\"\n\t\t\t\t\t+ firstMonth\n\t\t\t\t\t+ \"','\"\n\t\t\t\t\t+ secondMonth\n\t\t\t\t\t+ \"') \\n\"\n\t\t\t\t\t+ \" ORDER BY UPLOADED_INVOICE_FILE.INVOICES_MONTH,INVOICES.INVOICE_ORDER \\n\";\n\n\t\t\tdynamicReport = new GenerateDynamicReport();\n\t\t\tdynamicReport.setReportName(\"InvoicesComparisonReport\");\n\t\t\tdynamicReport.setReportTitle(\"Invoices Comparison Report\");\n\t\t\tdynamicReport.setReportQuery(queury);\n\n\t\t\tdynamicReport.columnsNames.add(\"Invoice Order\");\n\t\t\tdynamicReport.columnsNames.add(\"Invoice Number\");\n\t\t\tdynamicReport.columnsNames.add(\"Booking File Number\");\n\t\t\tdynamicReport.columnsNames.add(\"Departure Date\");\n\t\t\tdynamicReport.columnsNames.add(\"Arrival Date\");\n\t\t\tdynamicReport.columnsNames.add(\"Employee Id\");\n\t\t\tdynamicReport.columnsNames.add(\"Cost Center\");\n\t\t\tdynamicReport.columnsNames.add(\"Cost Center Department\");\n\t\t\tdynamicReport.columnsNames.add(\"Passenger Name\");\n\t\t\tdynamicReport.columnsNames.add(\"Service Type\");\n\t\t\tdynamicReport.columnsNames.add(\"Service Description\");\n\t\t\tdynamicReport.columnsNames.add(\"Routing\");\n\t\t\tdynamicReport.columnsNames.add(\"Int'l / Dom\");\n\t\t\tdynamicReport.columnsNames.add(\"Check In\");\n\t\t\tdynamicReport.columnsNames.add(\"Check Out\");\n\t\t\tdynamicReport.columnsNames.add(\"Number of Nights\");\n\t\t\tdynamicReport.columnsNames.add(\"Number of Rooms\");\n\t\t\tdynamicReport.columnsNames.add(\"Airline\");\n\t\t\tdynamicReport.columnsNames.add(\"Room Type\");\n\t\t\tdynamicReport.columnsNames.add(\"Supplier Name\");\n\t\t\tdynamicReport.columnsNames.add(\"Net Amount\");\n\t\t\tdynamicReport.columnsNames.add(\"Operation Fees\");\n\t\t\tdynamicReport.columnsNames.add(\"Total Amount\");\n\t\t\tdynamicReport.columnsNames.add(\"Ticket No\");\n\t\t\tdynamicReport.columnsNames.add(\"Travel Form Number\");\n\t\t\tdynamicReport.columnsNames.add(\"Description\");\n\t\t\tdynamicReport.columnsNames.add(\"From Date\");\n\t\t\tdynamicReport.columnsNames.add(\"To Date\");\n\t\t\tdynamicReport.columnsNames.add(\"Employee Department\");\n\t\t\tdynamicReport.columnsNames.add(\"Invoice Date\");\n\t\t\tdynamicReport.columnsNames.add(\"Invoices Month\");\n\n\t\t\tdynamicReport.fieldsNames.add(\"INVOICE_ORDER\");\n\t\t\tdynamicReport.fieldsNames.add(\"INVOICE_NUMBER\");\n\t\t\tdynamicReport.fieldsNames.add(\"BOOKING_FILE_NUMBER\");\n\t\t\tdynamicReport.fieldsNames.add(\"DEPARTURE_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"ARRIVAL_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"EMPLOYEE_ID\");\n\t\t\tdynamicReport.fieldsNames.add(\"COST_CENTER\");\n\t\t\tdynamicReport.fieldsNames.add(\"COST_CENTER_DEPARTMENT\");\n\t\t\tdynamicReport.fieldsNames.add(\"PASSENGER_NAME\");\n\t\t\tdynamicReport.fieldsNames.add(\"SERVICE_TYPE\");\n\t\t\tdynamicReport.fieldsNames.add(\"SERVICE_DESC\");\n\t\t\tdynamicReport.fieldsNames.add(\"ROUTING\");\n\t\t\tdynamicReport.fieldsNames.add(\"INTER_DOM\");\n\t\t\tdynamicReport.fieldsNames.add(\"CHECK_IN\");\n\t\t\tdynamicReport.fieldsNames.add(\"CHECK_OUT\");\n\t\t\tdynamicReport.fieldsNames.add(\"NUMBER_OF_NIGHTS\");\n\t\t\tdynamicReport.fieldsNames.add(\"NUMBER_OF_ROOMS\");\n\t\t\tdynamicReport.fieldsNames.add(\"AIRLINE\");\n\t\t\tdynamicReport.fieldsNames.add(\"ROOM_TYPE\");\n\t\t\tdynamicReport.fieldsNames.add(\"SUPPLIER_NAME\");\n\t\t\tdynamicReport.fieldsNames.add(\"NET_AMOUNT\");\n\t\t\tdynamicReport.fieldsNames.add(\"OPERATION_FEES\");\n\t\t\tdynamicReport.fieldsNames.add(\"TOTAL_AMOUNT\");\n\t\t\tdynamicReport.fieldsNames.add(\"TICKET_NO\");\n\t\t\tdynamicReport.fieldsNames.add(\"TRAVEL_FORM_NUMBER\");\n\t\t\tdynamicReport.fieldsNames.add(\"DESCRIPTION\");\n\t\t\tdynamicReport.fieldsNames.add(\"FROM_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"TO_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"EMPLOYEE_DEPARTMENT\");\n\t\t\tdynamicReport.fieldsNames.add(\"INVOICE_DATE\");\n\t\t\tdynamicReport.fieldsNames.add(\"INVOICES_MONTH\");\n\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.DOUBLE.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.DOUBLE.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.DOUBLE.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\t\t\tdynamicReport.dataTypes.add(DataType.STRING.toString());\n\n\t\t\tString reportPath = dynamicReport.exportDynamicReportToExcel();\n\t\t\tgetDownloadableReportFile(reportPath);\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public String f9employee() throws Exception {\r\n\t\t/**\r\n\t\t * BUILD COMPLETE QUERY (ALONG WITH PARAMETERS) WHICH GIVES THE DESIRED\r\n\t\t * OUTPUT ALONG WITH PROFILES\r\n\t\t */\r\n\t\tString query = \"SELECT EMP_TOKEN, EMP_FNAME || ' ' || EMP_MNAME || ' ' || EMP_LNAME,\"\r\n\t\t\t\t+ \" EMP_ID,CENTER_NAME,RANK_NAME\"\r\n\t\t\t\t+ \" FROM HRMS_EMP_OFFC\"\r\n\t\t\t\t+ \" LEFT JOIN HRMS_CENTER ON(HRMS_CENTER.CENTER_ID=HRMS_EMP_OFFC.EMP_CENTER)\"\r\n\t\t\t\t+ \" LEFT JOIN HRMS_RANK ON(HRMS_RANK.RANK_ID=HRMS_EMP_OFFC.EMP_RANK) \";\r\n\r\n\t\tquery += \"\tORDER BY EMP_ID ASC \";\r\n\r\n\t\t/**\r\n\t\t * SET THE HEADER NAMES OF TABLE WHICH IS DISPLAYED IN POP-UP WINDOW. *\r\n\t\t */\r\n\r\n\t\tString[] headers = { getMessage(\"employee.id\"), getMessage(\"employee\") };\r\n\r\n\t\t/**\r\n\t\t * DEFINE THE PERCENT WIDTH OF EACH COLUMN\r\n\t\t */\r\n\t\tString[] headerWidth = { \"15\", \"35\" };\r\n\r\n\t\t/**\r\n\t\t * -SET THE FIELDNAMES INTO WHICH THE VALUES ARE BEING POPULATED AFTER A\r\n\t\t * ROW IS SELECTED. -USEFULL IN CASES WHERE SUBMIT FLAG IS 'false'\r\n\t\t * -PARENT FORM WILL SHOW THE VALUES IN THE FILDS CORRSPONDING TO COLUMN\r\n\t\t * INDEX. NOTE: LENGHT OF COLUMN INDEX MUST BE SAME AS THE LENGTH OF\r\n\t\t * FIELDNAMES\r\n\t\t */\r\n\r\n\t\tString[] fieldNames = { \"searchemptoken\", \"searchempName\",\r\n\t\t\t\t\"searchempId\" };\r\n\r\n\t\t/**\r\n\t\t * SET THE COLUMN INDEX E.G. SUPPOSE THE POP-UP SHOWS 4 COLUMNS, BUT ON\r\n\t\t * CLICKING A ROW ONLY SECOND AND FORTH COLUMN VALUES NEED TO BE SHOWN\r\n\t\t * IN THE PARENT WINDOW FIELDS THEN THE COLUMN INDEX CAN BE {1,3}\r\n\t\t * \r\n\t\t * NOTE: COLUMN NUMBERS STARTS WITH 0\r\n\t\t * \r\n\t\t */\r\n\t\tint[] columnIndex = { 0, 1, 2 };\r\n\r\n\t\t/**\r\n\t\t * WHEN SET TO 'true' WILL SUBMIT THE FORM\r\n\t\t * \r\n\t\t */\r\n\t\tString submitFlag = \"false\";\r\n\r\n\t\t/**\r\n\t\t * IF THE 'submitFlag' IS 'true' , THE FORM WILL SUBMIT AND CALL\r\n\t\t * FOLLOWING METHOD IN THE ACTION * NAMING CONVENSTION: <NAME OF\r\n\t\t * ACTION>_<METHOD TO CALL>.action\r\n\t\t */\r\n\t\tString submitToMethod = \"\";\r\n\r\n\t\t/**\r\n\t\t * CALL THIS METHOD AFTER ALL PARAMETERS ARE DEFINED *\r\n\t\t */\r\n\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}", "private JMenuItem getQuery_5() {\n\t\tif (Query_5 == null) {\n\t\t\tQuery_5 = new JMenuItem(\"销售记录\");\n\t\t\tQuery_5.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tnew ShowOutStock();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn Query_5;\n\t}", "private void helperDisplayResults ()\r\n\t{\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint tableSize = DataController.getTable().getTableSize();\r\n\r\n\t\t\t//---- Check if the project is empty or not\r\n\t\t\tif (tableSize != 0)\r\n\t\t\t{\r\n\t\t\t\tint indexImage = mainFormLink.getComponentPanelLeft().getComponentComboboxFileName().getSelectedIndex();\r\n\r\n\t\t\t\tif (indexImage >= 0 && indexImage < tableSize)\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\tint samplesCount = DataController.getTable().getElement(indexImage).getChannelCount();\r\n\r\n\t\t\t\t\tfor (int i = 0; i < Math.min(samplesCount, FormMainPanelRight.TABLE_SIZE); i++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//---- ABSOLUTE --------------------------------------------\r\n\r\n\t\t\t\t\t\t//---- Count\r\n\t\t\t\t\t\tint featureCount = DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getAbsoluteCellCount();\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featureCount, 0, i + 1);\r\n\r\n\t\t\t\t\t\t//---- Length\r\n\t\t\t\t\t\tdouble featureLength = (double) Math.round(DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getAbsoluteCellLengthMean() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featureLength, 1, i + 1);\r\n\r\n\t\t\t\t\t\t//---- Pixel density\r\n\t\t\t\t\t\tdouble featurePixelDensity = (double) Math.round (DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getAbsolutePixelDensity() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featurePixelDensity, 2, i + 1);\r\n\r\n\t\t\t\t\t\t//---- RELATIVE --------------------------------------------\r\n\r\n\t\t\t\t\t\t//---- Count\r\n\t\t\t\t\t\tdouble featureCountR = (double) Math.round(DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getRelativeCellCount() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featureCountR, 3, i + 1);\r\n\r\n\t\t\t\t\t\t//---- Length\r\n\t\t\t\t\t\tdouble featureLengthR = (double) Math.round(DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getRelativeCellLengthMean() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featureLengthR, 4, i + 1);\r\n\r\n\t\t\t\t\t\t//---- Pixel density\r\n\t\t\t\t\t\tdouble featurePixelDensityR = (double) Math.round (DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getFeatureVector().getRelativeCellPixelDensity() * 1000) / 1000;\r\n\t\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(featurePixelDensityR, 5, i + 1);\r\n\r\n\t\t\t\t\t\t//---- SENSETIVITY\r\n\t\t\t\t\t\tSensitivity sampleSensitivity = DataController.getTable().getElement(indexImage).getDataDevice().getChannel(i).getSensitivity();\r\n\r\n\t\t\t\t\t\tswitch (sampleSensitivity)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tcase RESISTANT: mainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"R\", 6, i + 1); break;\r\n\t\t\t\t\t\tcase SENSITIVE: mainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"S\", 6, i + 1); break;\r\n\t\t\t\t\t\tcase UNKNOWN: mainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"U\", 6, i + 1); break;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\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\tfor (int i = 0; i < FormMainPanelRight.TABLE_SIZE; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\t//---- ABSOLUTE\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 0, i + 1);\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 1, i + 1);\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 2, i + 1);\r\n\r\n\t\t\t\t\t//---- RELATIVE\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 3, i + 1);\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 4, i + 1);\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 5, i + 1);\r\n\r\n\t\t\t\t\t//---- SENSETIVITY\r\n\t\t\t\t\tmainFormLink.getComponentPanelRight().getComponentTableFeatures().setValueAt(\"\", 6, i + 1);\r\n\t\t\t\t}\r\n\r\n\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage exception)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(exception);\r\n\t\t}\r\n\t}", "private void crearReporte() {\n medirTiempoDeEnvio();\n SimpleDateFormat variableFecha = new SimpleDateFormat(\"dd-MM-yyyy\");\n Calendar cal = Calendar.getInstance();\n String dia = String.valueOf(cal.get(cal.DATE));\n String mes = String.valueOf(cal.get(cal.MONTH) + 1);\n String año = String.valueOf(cal.get(cal.YEAR));\n String fechainicio;\n String fechafin;\n Map parametro = new HashMap();\n cargando.setVisible(true);\n try {\n JasperViewer v;\n switch (listaTipoReporte.getSelectedIndex()) {\n case 0:\n if (rb_diario.isSelected() || this.reporte.getSelectedIndex() == 1) {\n if (this.reporte.getSelectedIndex() == 1) {\n fechafin = u.fechaCorrecta(variableFecha.format(this.fin.getDate()));\n fechainicio = u.fechaCorrecta(variableFecha.format(this.inicio.getDate()));\n parametro.put(\"fecha\",fechainicio+\" al \"+fechafin);\n } else {\n fechainicio = u.fechaCorrecta(variableFecha.format(this.dia.getDate()));\n fechafin = fechainicio;\n parametro.put(\"fecha\",\" dia \"+fechainicio);\n }\n \n String p = \"('\" + fechainicio + \"','\" + fechafin + \"')\";\n if (u.ejecutarSP(p, \"ordenes_procesadas_diarias\")) {\n v = u.runReporte(\"reporte_ordenes_procesadas_diario\", parametro);\n v.setTitle(\"Reporte de ordenes procesadas\");\n v.setVisible(true);\n } else {\n System.out.println(\"mal\");\n }\n } else {\n int mess = cb_mes.getSelectedIndex();\n mess = mess + 1;\n if (rb_mensual.isSelected()) {\n int dia2 = u.numero(mess);\n String fechanueva1 = año + \"-\" + mess + \"-\" + \"01\";\n String fechai1 = año + \"-\" + mess + \"-\" + \"15\";\n String fechai2 = año + \"-\" + mess + \"-\" + \"16\";\n String fechaf1 = año + \"-\" + mess + \"-\" + dia2;\n //----------------------------- ojo son 4 fechas finico-ffinal1 y fechafinal2 -a fechafinal2\n // String fechainicio = u.fechaCorrecta(variableFecha.format(jDateChooser1.getDate()));\n // String f = u.fechaCorrecta(variableFecha.format(jDateChooser2.getDate()));\n // String fechafin =fechainicio;\n String p = \"('\" + fechanueva1 + \"','\" + fechai1 + \"','\" + fechai2 + \"','\" + fechaf1 + \"')\";\n if (u.ejecutarSP(p, \"ordenes_procesadas_mensual\")) {\n v = u.runReporte(\"reporte_ordenes_procesadas_mensual\", parametro);\n v.setTitle(\"Reporte mensual de ordenes procesadas\");\n v.setVisible(true);\n } else {\n System.out.println(\"mal\");\n }\n } else {\n Reporte r = new Reporte();\n String nombreReporte = \"\";\n if (this.primera.isSelected()) {\n r.reporteQuincena(Integer.toString(mess), \"2014\", 1);\n parametro.put(\"periodo\", \"De la primera quincena del mes de \" + u.obtenerMes(mess));\n nombreReporte = \"procesadasQuincena\";\n } else {\n if (this.segunda.isSelected()) {\n r.reporteQuincena(Integer.toString(mess), \"2014\", 2);\n parametro.put(\"periodo\", \"De la segunda quincena del mes de \" + u.obtenerMes(mess));\n nombreReporte = \"procesadasQuincenaSegunda\";\n }\n }\n v = u.runReporte(nombreReporte, parametro);\n v.setTitle(\"Reporte quincenal de ordenes procesadas\");\n v.setVisible(true);\n u.ejecutarSQL(\"DROP TABLE IF EXISTS temporal1\");\n }\n }\n break;\n case 1:\n //RordeAuditada\n if (rb_mensual.isSelected()) {\n int mess = cb_mes.getSelectedIndex();\n mess = mess + 1;\n int dia2 = u.numero(mess);\n String fechanueva = año + \"-\" + mess + \"-\" + \"01\"; //calcular el anho\n String fechai = año + \"-\" + mess + \"-\" + \"15\";\n String fechaf = año + \"-\" + mess + \"-\" + dia2;\n String p1 = \"('\" + fechanueva + \"','\" + fechai + \"','\" + fechaf + \"')\";\n if (u.ejecutarSP(p1, \"Raudita_mensual\")) {\n parametro.put(\"fecha\", fechanueva);\n parametro.put(\"fecha_p\", fechai);\n parametro.put(\"fecha_s\", fechaf);\n parametro.put(\"año\", año);\n parametro.put(\"mes\", mes);\n v = u.runReporte(\"report7\", parametro);\n v.setTitle(\"Reporte mensual de ordenes auditadas\");\n v.setVisible(true);\n } else {\n System.out.println(\"mal\");\n }\n\n }\n if (rb_diario.isSelected() || this.reporte.getSelectedIndex() == 1) {\n if (this.reporte.getSelectedIndex() == 1) {\n fechafin = u.fechaCorrecta(variableFecha.format(this.fin.getDate()));\n fechainicio = u.fechaCorrecta(variableFecha.format(this.inicio.getDate()));\n } else {\n fechainicio = u.fechaCorrecta(variableFecha.format(this.dia.getDate()));\n fechafin = fechainicio;\n parametro.put(\"fecha1\", \"Del dia \" + fechainicio);\n }\n String p = \"('\" + fechainicio + \"','\" + fechafin + \"')\";\n if (u.ejecutarSP(p, \"reporteJoel\")) {\n v = u.runReporte(\"RordeAuditada\", parametro);\n v.setTitle(\"Reporte diario de ordenes auditadas\");\n v.setVisible(true);\n } else {\n System.out.println(\"mal\");\n }\n }\n if (rb_quincenal.isSelected()) {\n int mess = cb_mes.getSelectedIndex();\n mess = mess + 1;\n String ms = u.obtenerMes(mess);\n if (this.primera.isSelected()) {\n q = \"Primera\";\n String p = \"('\" + (año + \"-\" + mess + \"-\" + \"01\") + \"','\" + (año + \"-\" + mess + \"-\" + \"02\") + \"','\" + (año + \"-\" + mess + \"-\" + \"03\") + \"','\" + (año + \"-\" + mess + \"-\" + \"04\") + \"','\" + (año + \"-\" + mess + \"-\" + \"05\") + \"','\" + (año + \"-\" + mess + \"-\" + \"06\") + \"','\" + (año + \"-\" + mess + \"-\" + \"07\") + \"','\" + (año + \"-\" + mess + \"-\" + \"08\") + \"','\" + (año + \"-\" + mess + \"-\" + \"09\") + \"','\" + (año + \"-\" + mess + \"-\" + \"10\") + \"','\" + (año + \"-\" + mess + \"-\" + \"01\") + \"','\" + (año + \"-\" + mess + \"-\" + \"11\") + \"','\" + (año + \"-\" + mess + \"-\" + \"12\") + \"','\" + (año + \"-\" + mess + \"-\" + \"13\") + \"','\" + (año + \"-\" + mess + \"-\" + \"14\") + \"','\" + (año + \"-\" + mess + \"-\" + \"15\") + \"')\";\n if (u.ejecutarSP(p, \"Rauditada_quincenal\")) {\n parametro.put(\"d1\", ms);\n parametro.put(\"d2\", año);\n parametro.put(\"q\", q);\n v = u.runReporte(\"Raudita_quincenal\", parametro);\n v.setTitle(\"Reporte quincenal de ordenes auditadas\");\n v.setVisible(true);\n } else {\n System.out.println(\"mal\");\n }\n } else {\n if (this.segunda.isSelected()) {\n q = \"Segunda\";\n if (mess == 2) {\n String p = \"('\" + (año + \"-\" + mess + \"-\" + \"16\") + \"','\" + (año + \"-\" + mess + \"-\" + \"17\") + \"','\" + (año + \"-\" + mess + \"-\" + \"18\") + \"','\" + (año + \"-\" + mess + \"-\" + \"19\") + \"','\" + (año + \"-\" + mess + \"-\" + \"20\") + \"','\" + (año + \"-\" + mess + \"-\" + \"21\") + \"','\" + (año + \"-\" + mess + \"-\" + \"22\") + \"','\" + (año + \"-\" + mess + \"-\" + \"23\") + \"','\" + (año + \"-\" + mess + \"-\" + \"24\") + \"','\" + (año + \"-\" + mess + \"-\" + \"25\") + \"','\" + (año + \"-\" + mess + \"-\" + \"16\") + \"','\" + (año + \"-\" + mess + \"-\" + \"26\") + \"','\" + (año + \"-\" + mess + \"-\" + \"27\") + \"','\" + (año + \"-\" + mess + \"-\" + \"28\") + \"','\" + (año + \"-\" + mess + \"-\" + \"28\") + \"','\" + (año + \"-\" + mess + \"-\" + \"28\") + \"')\";\n if (u.ejecutarSP(p, \"Rauditada_quincenal\")) {\n\n parametro.put(\"d1\", ms);\n parametro.put(\"d2\", año);\n\n parametro.put(\"q\", q);\n v = u.runReporte(\"Raudita_quincenal\", parametro);\n v.setTitle(\"Reporte quincenal de ordenes auditadas\");\n v.setVisible(true);\n } else {\n System.out.println(\"mal\");\n }\n } else {\n String p = \"('\" + (año + \"-\" + mess + \"-\" + \"16\") + \"','\" + (año + \"-\" + mess + \"-\" + \"17\") + \"','\" + (año + \"-\" + mess + \"-\" + \"18\") + \"','\" + (año + \"-\" + mess + \"-\" + \"19\") + \"','\" + (año + \"-\" + mess + \"-\" + \"20\") + \"','\" + (año + \"-\" + mess + \"-\" + \"21\") + \"','\" + (año + \"-\" + mess + \"-\" + \"22\") + \"','\" + (año + \"-\" + mess + \"-\" + \"23\") + \"','\" + (año + \"-\" + mess + \"-\" + \"24\") + \"','\" + (año + \"-\" + mess + \"-\" + \"25\") + \"','\" + (año + \"-\" + mess + \"-\" + \"16\") + \"','\" + (año + \"-\" + mess + \"-\" + \"26\") + \"','\" + (año + \"-\" + mess + \"-\" + \"27\") + \"','\" + (año + \"-\" + mess + \"-\" + \"28\") + \"','\" + (año + \"-\" + mess + \"-\" + \"29\") + \"','\" + (año + \"-\" + mess + \"-\" + \"30\") + \"')\";\n if (u.ejecutarSP(p, \"Rauditada_quincenal\")) {\n parametro.put(\"d1\", ms);\n parametro.put(\"d2\", año);\n parametro.put(\"q\", q);\n v = u.runReporte(\"Raudita_quincenal\", parametro);\n v.setTitle(\"Reporte quincenal de ordenes auditadas\");\n v.setVisible(true);\n } else {\n System.out.println(\"mal\");\n }\n\n }\n }\n }\n }\n break;\n case 2:\n try {\n fechainicio = u.fechaCorrecta(variableFecha.format(this.inicio.getDate()));\n fechafin = u.fechaCorrecta(variableFecha.format(this.fin.getDate()));\n parametro.put(\"fechaInicio\", fechainicio);\n parametro.put(\"fechaFin\", fechafin);\n v = u.runReporte(\"reporte_errores_diarios\", parametro);\n v.setTitle(\"Reporte de Errores\");\n v.setVisible(true);\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"No se pudo generar el reporte\", \"Reporte\", JOptionPane.ERROR_MESSAGE);\n ErroresSiapo.agregar(ex, \"codigo 39\");\n }\n break;\n case 3:\n \n if (this.reporte.getSelectedIndex() == 1) {\n fechafin = u.fechaCorrecta(variableFecha.format(this.fin.getDate()));\n fechainicio = u.fechaCorrecta(variableFecha.format(this.inicio.getDate()));\n parametro.put(\"PERIODO\", \"Del \" + u.fechaReves(fechainicio) + \" al \" + u.fechaReves(fechafin));\n } else {\n String m = Integer.toString(this.cb_mes.getSelectedIndex() + 1);\n fechafin = año + \"-\" + m + \"-\" + u.numero(this.cb_mes.getSelectedIndex() + 1);\n fechainicio = año + \"-\" + m + \"-01\";\n parametro.put(\"PERIODO\", \"Del mes de \" + u.obtenerMes(this.cb_mes.getSelectedIndex() + 1) + \" del año \" + año);\n }\n String p = \"('\" + fechainicio + \"','\" + fechafin + \"')\";\n if (u.ejecutarSP(p, \"ERRORES\")) {\n v = u.runReporte(\"analisisDeEficiencia\", parametro);\n v.setTitle(\"Reporte de Analisis de Eficiencia\");\n v.setVisible(true);\n } else {\n ErroresSiapo.agregar(null, \"codigo 39\");\n System.out.println(\"mal\");\n }\n break;\n case 4: \n try {\n fechainicio = u.fechaCorrecta(variableFecha.format(this.inicio.getDate()));\n fechafin = u.fechaCorrecta(variableFecha.format(this.fin.getDate()));\n parametro.put(\"fecha\", fechainicio);\n parametro.put(\"fechaFin\", fechafin);\n v = u.runReporte(\"reporteDiarioOrdenesRegreso\", parametro);\n v.setTitle(\"Reporte de Razones\");\n v.setVisible(true);\n } catch (Exception e) {\n ErroresSiapo.agregar(e, \"codigo 38\");\n JOptionPane.showMessageDialog(null, \"No se pudo generar el reporte\", \"Reporte\", JOptionPane.ERROR_MESSAGE);\n }\n break;\n }\n } catch (Exception e) {\n }\n\n }", "private void createSearch(boolean realSearch) {\n\n\t\tString sqlQuery = new String();\n\n\t\tif (useLucene.isSelected()) {\n\n\t\t\tif (datachoose.getSelectedIndex() == data_ABOVE) {\n\t\t\t\t// need to reference the above data.\n\t\t\t\tString usp = (String) winG.getSelectedUser();\n\t\t\t\tString dates[] = winG.getDateRange_toptoolbar();\n\t\t\t\tsqlQuery = \"select distinct mailref,dates from email where sender = '\" + usp + \"' or rcpt = '\" + usp\n\t\t\t\t\t\t+ \"' and dates BETWEEN '\" + dates[winGui.startDate] + \"' AND '\" + dates[winGui.endDate]\n\t\t\t\t\t\t+ \"' \";\n\n\t\t\t} else if (datachoose.getSelectedIndex() == data_ALL) {\n\t\t\t\tsqlQuery = \"select distinct mailref,dates from email where type like 'text%'\";\n\t\t\t} else {\n\t\t\t\t// need to pop up sql\n\t\t\t\tsqlQuery = \"select distinct mailref,dates from email \" + queryText.getText().trim();\n\t\t\t}\n\n\t\t\tString results[][];\n\t\t\t// actual fetch of data\n\t\t\ttry {\n\t\t\t\tsynchronized (DBConnect) {\n\t\t\t\t\tresults = DBConnect.getSQLData(sqlQuery);\n\t\t\t\t}\n\t\t\t} catch (SQLException sqle) {\n\t\t\t\tsqle.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (!realSearch) {\n\n\t\t\t\tJOptionPane.showMessageDialog(SearchEMT.this, \"The number of returned mailrefs are: \" + results.length);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tBusyWindow bw = new BusyWindow(\"Search Engine Setup\", \"Running\",true);\n\t\t\tbw.setMax(results.length);\n\t\t\tbw.setVisible(true);\n\t\t\t// need to setup prefetch cache\n\t\t\ttry {\n\t\t\t\tPreparedStatement ps = DBConnect\n\t\t\t\t\t\t.prepareStatementHelper(\"select hash,filename,type,body from message where mailref=?\");\n\n\t\t\t\t// real search need to build index here\n\t\t\t\t// TODO: see about adding path between folder and name\n\t\t\t\tIndexWriter writer = null;\n\t\t\t\t// stopanalyzer\n\t\t\t\t//writer = new IndexWriter(indexfolder + indexName.getText().trim(), new StandardAnalyzer(), true);\n\t\t\t\twriter = new IndexWriter(getIndexFileName(indexName.getText()), analyzer, true);\n\n\t\t\t\tDate start = new Date();\n\t\t\t\tfor (int i = 0; i < results.length; i++) {\n\t\t\t\t\tbw.progress(i);\n\n\t\t\t\t\tps.setString(1, results[i][0]);\n\n\t\t\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\t\twhile (rs.next()) {\n\t\t\t\t\t\tString type = rs.getString(3).toLowerCase();\n\n\t\t\t\t\t\tif (type.startsWith(\"image\") || type.startsWith(\"video\") || type.startsWith(\"audio\")) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tString hash = rs.getString(1);\n\t\t\t\t\t\tString name = rs.getString(2);\n\n\t\t\t\t\t\t// make a new, empty document\n\t\t\t\t\t\tDocument doc = new Document();\n\n\t\t\t\t\t\t// Add the path of the file as a field named \"path\". Use\n\t\t\t\t\t\t// a Text field, so\n\t\t\t\t\t\t// that the index stores the path, and so that the path\n\t\t\t\t\t\t// is searchable\n\t\t\t\t\t\tdoc.add(new Field(\"path\", hash,Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\tdoc.add(new Field(\"Date\", results[i][1],Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\tdoc.add(new Field(\"Type\", type,Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\tdoc.add(new Field(\"Name\", name,Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\tdoc.add(new Field(\"Mailref\", new String(results[i][0]),Field.Store.YES, Field.Index.UN_TOKENIZED));\n\t\t\t\t\t\t// Add the last modified date of the file a field named\n\t\t\t\t\t\t// \"modified\". Use a\n\t\t\t\t\t\t// Keyword field, so that it's searchable, but so that\n\t\t\t\t\t\t// no attempt is made\n\t\t\t\t\t\t// to tokenize the field into words.\n\t\t\t\t\t\t// doc.add(Field.Keyword(\"modified\",\n\t\t\t\t\t\t// DateField.timeToString(f.lastModified())));\n\n\t\t\t\t\t\t// Add the contents of the file a field named\n\t\t\t\t\t\t// \"contents\". Use a Text\n\t\t\t\t\t\t// field, specifying a Reader, so that the text of the\n\t\t\t\t\t\t// file is tokenized.\n\t\t\t\t\t\t// ?? why doesn't FileReader work here ??\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tjava.sql.Blob blob = rs.getBlob(4);\n\t\t\t\t\t\t\tint c;\n\t\t\t\t\t\t\tbyte buf[] = new byte[512];//\n\n\t\t\t\t\t\t\tInputStream is = blob.getBinaryStream();\n\t\t\t\t\t\t\tStringBuffer small2 = new StringBuffer(256);\n\t\t\t\t\t\t\twhile ((c = is.read(buf)) != -1) {\n\t\t\t\t\t\t\t\tsmall2.append(new String(buf, 0, c));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tString bodytext = small2.toString();\n\n\t\t\t\t\t\t\tdoc.add(new Field(\"contents\", bodytext,Field.Store.YES, Field.Index.TOKENIZED));\n\n\t\t\t\t\t\t\t// now to insert this doc.\n\t\t\t\t\t\t\twriter.addDocument(doc);\n\t\t\t\t\t\t} catch (IOException ioe) {\n\t\t\t\t\t\t\tioe.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbw.setTitle(\"optimizing\");\n\t\t\t\twriter.optimize();\n\t\t\t\twriter.close();\n\n\t\t\t\tDate end = new Date();\n\n\t\t\t\tSystem.out.print(end.getTime() - start.getTime());\n\t\t\t\tSystem.out.println(\" total milliseconds\");\n\n\t\t\t\tbw.setVisible(false);\n\n\t\t\t} catch (SQLException se) {\n\t\t\t\tse.printStackTrace();\n\t\t\t\treturn;\n\t\t\t} catch (IOException eio) {\n\t\t\t\teio.printStackTrace();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t} else {\n\t\t\t// we use emt indexing\n\t\t\t// TODO: create code here\n\n\t\t}\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response) \n throws ServletException, IOException { \n\n\n //String operations=request.getParameter(\"ops\");\n //String query=request.getParameter(\"query\");\n String op=request.getParameter(\"visualization\");\n String query=null;\n if(Character.toLowerCase(op.charAt(0)) == '1')\n query=\"select Year,count(songname) from spotifymusic group by year\";\n \n if(Character.toLowerCase(op.charAt(0)) == '2')\n query=\"select Artists,count(Songname) as count from spotifymusic group by Artists ORDER BY count(Songname) \";\n if(Character.toLowerCase(op.charAt(0)) == '3')\n query=\"SELECT Artists,mode,count(songname) FROM SpotifyMusic group by artists,mode\";\n if(Character.toLowerCase(op.charAt(0)) == '4')\n query=\"SELECT Artists,key,count(songname) FROM SpotifyMusic group by artists,key\";\n \n try{\n NoSQLHandle handle=generateNoSQLHandle();\n //List<MapValue> result=display(handle,query);\n List<MapValue> result=display(handle,query);\n \n String destination = \"show.jsp\";\n RequestDispatcher requestDispatcher = request.getRequestDispatcher(destination);\n \n request.setAttribute(\"result\", result);\n request.setAttribute(\"op\", op);\n requestDispatcher.forward(request, response);\n \n\n }\n catch (Exception exp)\n {\n System.err.print(exp); \n } \n\n\n}", "protected void startReport(){\n Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(cameraIntent,REQUEST_CODE);\n }", "private void viewReportList(int userGroupID){\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(\"select * from reports where user_group_id=\" + userGroupID + \" order by week asc\");\n\t\t\t//create table\n\t\t\tout.println(\"<form name=\" + formElement(\"input\") + \" method=\" + formElement(\"post\")+ \">\");\n\t\t\tout.println(\"<h1>Time Reports - View</h1>\");\n\t\t\tout.println(\"Select a time report to view\");\n\t\t out.println(\"<table border=\" + formElement(\"1\") + \">\");\n\t\t out.println(\"<tr><td>Selection</td><td>Last update</td><td>Week</td><td>Total Time</td><td>Signed</td></tr>\");\n\t\t int inWhile = 0; \n\t \t\n\t\t while(rs.next()){\t\t \t\n\t\t \tinWhile = 1;\n\t\t \tString reportID = \"\"+rs.getInt(\"ID\");\n\t\t\t\tDate date = rs.getDate(\"date\"); \n\t\t\t\tint week = rs.getInt(\"week\");\n\t\t\t\tint totalTime = rs.getInt(\"total_time\");\n\t\t\t\tint signed = rs.getInt(\"signed\");\n\t\t\t\t//print in box\n\t\t\t\tout.println(\"<tr>\");\n\t\t\t\tout.println(\"<td>\" + \"<input type=\" + formElement(\"radio\") + \" name=\" + formElement(\"reportID\") +\n\t\t\t\t\t\t\" value=\" + formElement(reportID) +\"></td>\");\t\t//radiobutton\n\t\t\t\tout.println(\"<td>\" + date.toString() + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + week + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + totalTime + \"</td>\");\n\t\t\t\tout.println(\"<td>\" + signString(signed) + \"</td>\");\n\t\t\t\tout.println(\"</tr>\");\n\t\t\t}\n\t\t out.println(\"</table>\");\n\t\t out.println(\"<hidden name='function' value='viewReport'>\");\t\t \n\t\t out.println(\"<input type=\" + formElement(\"submit\") + \" value=\"+ formElement(\"View\") +\">\");\n\t\t out.println(\"</form>\");\n\t\t if (inWhile == 0){\n\t\t \tout.println(\"No reports to show\");\n\t\t }\n\t\t} catch(SQLException e) {\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\t\n\t}", "public int \r\nomStudent_BuildMajorGPA_Report( View mStudent )\r\n{\r\n zVIEW lDegTrkM = new zVIEW( );\r\n //:VIEW mDegree BASED ON LOD mDegree\r\n zVIEW mDegree = new zVIEW( );\r\n //:VIEW mStudenC BASED ON LOD mStudenC\r\n zVIEW mStudenC = new zVIEW( );\r\n //:VIEW mStudenCO BASED ON LOD mStudenC\r\n zVIEW mStudenCO = new zVIEW( );\r\n //:INTEGER CourseID\r\n int CourseID = 0;\r\n //:STRING ( 2 ) szFinalGrade\r\n String szFinalGrade = null;\r\n int RESULT = 0;\r\n int lTempInteger_0 = 0;\r\n int lTempInteger_1 = 0;\r\n zVIEW vTempViewVar_0 = new zVIEW( );\r\n int lTempInteger_2 = 0;\r\n int lTempInteger_3 = 0;\r\n int lTempInteger_4 = 0;\r\n\r\n\r\n //:// Build the subobject for the Major GPA Report for the current StudentMajorDegreeTrack.\r\n //:// We try to use the derived DegreeTrack path in mStudent. If it's not there, we will activate\r\n //:// lDegTrkM and include it.\r\n\r\n //:SET CURSOR FIRST mStudent.MajorGPA_DegreeTrack \r\n //: WHERE mStudent.MajorGPA_DegreeTrack.ID = mStudent.MajorDegreeTrack.ID \r\n {MutableInt mi_lTempInteger_0 = new MutableInt( lTempInteger_0 );\r\n GetIntegerFromAttribute( mi_lTempInteger_0, mStudent, \"MajorDegreeTrack\", \"ID\" );\r\n lTempInteger_0 = mi_lTempInteger_0.intValue( );}\r\n RESULT = mStudent.cursor( \"MajorGPA_DegreeTrack\" ).setFirst( \"ID\", lTempInteger_0 ).toInt();\r\n //:IF RESULT < zCURSOR_SET\r\n if ( RESULT < zCURSOR_SET )\r\n { \r\n //:ACTIVATE lDegTrkM WHERE lDegTrkM.DegreeTrack.ID = mStudent.MajorDegreeTrack.ID \r\n {MutableInt mi_lTempInteger_1 = new MutableInt( lTempInteger_1 );\r\n GetIntegerFromAttribute( mi_lTempInteger_1, mStudent, \"MajorDegreeTrack\", \"ID\" );\r\n lTempInteger_1 = mi_lTempInteger_1.intValue( );}\r\n omStudent_fnLocalBuildQual_2( mStudent, vTempViewVar_0, lTempInteger_1 );\r\n RESULT = ActivateObjectInstance( lDegTrkM, \"lDegTrkM\", mStudent, vTempViewVar_0, zSINGLE );\r\n DropView( vTempViewVar_0 );\r\n //:INCLUDE mStudent.MajorGPA_DegreeTrack FROM lDegTrkM.DegreeTrack \r\n RESULT = IncludeSubobjectFromSubobject( mStudent, \"MajorGPA_DegreeTrack\", lDegTrkM, \"DegreeTrack\", zPOS_AFTER );\r\n //:DropObjectInstance( lDegTrkM )\r\n DropObjectInstance( lDegTrkM );\r\n } \r\n\r\n //:END \r\n\r\n //:GET VIEW mStudenCO NAMED \"mStudenC\"\r\n RESULT = GetViewByName( mStudenCO, \"mStudenC\", mStudent, zLEVEL_TASK );\r\n //:IF RESULT >= 0\r\n if ( RESULT >= 0 )\r\n { \r\n //:CreateViewFromView( mStudenC, mStudenCO )\r\n CreateViewFromView( mStudenC, mStudenCO );\r\n //:FOR EACH mStudenC.Registration WHERE ( mStudenC.Registration.Status = \"C\" // Completed\r\n //: OR mStudenC.Registration.Status = \"F\" // Transferred\r\n //: OR mStudenC.Registration.Status = \"X\" ) // L. Transferred\r\n //: AND mStudenC.Registration.wRepeatedClass != \"R\"\r\n RESULT = mStudenC.cursor( \"Registration\" ).setFirst().toInt();\r\n while ( RESULT > zCURSOR_UNCHANGED )\r\n { \r\n if ( ( CompareAttributeToString( mStudenC, \"Registration\", \"Status\", \"C\" ) == 0 || CompareAttributeToString( mStudenC, \"Registration\", \"Status\", \"F\" ) == 0 || CompareAttributeToString( mStudenC, \"Registration\", \"Status\", \"X\" ) == 0 ) &&\r\n CompareAttributeToString( mStudenC, \"Registration\", \"wRepeatedClass\", \"R\" ) != 0 )\r\n { \r\n\r\n //:IF mStudenC.RegistrationCourse EXISTS\r\n lTempInteger_2 = CheckExistenceOfEntity( mStudenC, \"RegistrationCourse\" );\r\n if ( lTempInteger_2 == 0 )\r\n { \r\n //:CourseID = mStudenC.RegistrationCourse.ID \r\n {MutableInt mi_CourseID = new MutableInt( CourseID );\r\n GetIntegerFromAttribute( mi_CourseID, mStudenC, \"RegistrationCourse\", \"ID\" );\r\n CourseID = mi_CourseID.intValue( );}\r\n //:ELSE\r\n } \r\n else\r\n { \r\n //:IF mStudenC.EquivalentCourse EXISTS\r\n lTempInteger_3 = CheckExistenceOfEntity( mStudenC, \"EquivalentCourse\" );\r\n if ( lTempInteger_3 == 0 )\r\n { \r\n //:CourseID = mStudenC.EquivalentCourse.ID \r\n {MutableInt mi_CourseID = new MutableInt( CourseID );\r\n GetIntegerFromAttribute( mi_CourseID, mStudenC, \"EquivalentCourse\", \"ID\" );\r\n CourseID = mi_CourseID.intValue( );}\r\n //:ELSE\r\n } \r\n else\r\n { \r\n //:CourseID = 0\r\n CourseID = 0;\r\n } \r\n\r\n //:END \r\n } \r\n\r\n //:END\r\n //:SET CURSOR FIRST mStudent.MajorGPA_Course WHERE mStudent.MajorGPA_Course.ID = CourseID\r\n RESULT = mStudent.cursor( \"MajorGPA_Course\" ).setFirst( \"ID\", CourseID ).toInt();\r\n //:IF RESULT >= zCURSOR_SET \r\n if ( RESULT >= zCURSOR_SET )\r\n { \r\n //:szFinalGrade = mStudenC.Registration.FinalGrade\r\n {MutableInt mi_lTempInteger_4 = new MutableInt( lTempInteger_4 );\r\n StringBuilder sb_szFinalGrade;\r\n if ( szFinalGrade == null )\r\n sb_szFinalGrade = new StringBuilder( 32 );\r\n else\r\n sb_szFinalGrade = new StringBuilder( szFinalGrade );\r\n GetVariableFromAttribute( sb_szFinalGrade, mi_lTempInteger_4, 'S', 3, mStudenC, \"Registration\", \"FinalGrade\", \"\", 0 );\r\n lTempInteger_4 = mi_lTempInteger_4.intValue( );\r\n szFinalGrade = sb_szFinalGrade.toString( );}\r\n //:mStudent.MajorGPA_Course.wFinalGrade = szFinalGrade\r\n SetAttributeFromString( mStudent, \"MajorGPA_Course\", \"wFinalGrade\", szFinalGrade );\r\n } \r\n\r\n } \r\n\r\n RESULT = mStudenC.cursor( \"Registration\" ).setNext().toInt();\r\n //:END\r\n } \r\n\r\n //:END\r\n //:DropView( mStudenC )\r\n DropView( mStudenC );\r\n } \r\n\r\n //:END\r\n\r\n //:// Position on correct DegreeYearData for display of Minimum Credits Required.\r\n //:SET CURSOR FIRST mStudent.DegreeYearData \r\n //: WHERE mStudent.DegreeYearData.FromYear <= mStudent.MajorDegreeTrackCollegeYear.Year\r\n //: AND mStudent.DegreeYearData.ThroughYear >= mStudent.MajorDegreeTrackCollegeYear.Year\r\n RESULT = mStudent.cursor( \"DegreeYearData\" ).setFirst().toInt();\r\n if ( RESULT > zCURSOR_UNCHANGED )\r\n { \r\n while ( RESULT > zCURSOR_UNCHANGED && ( CompareAttributeToAttribute( mStudent, \"DegreeYearData\", \"FromYear\", mStudent, \"MajorDegreeTrackCollegeYear\", \"Year\" ) > 0 ||\r\n CompareAttributeToAttribute( mStudent, \"DegreeYearData\", \"ThroughYear\", mStudent, \"MajorDegreeTrackCollegeYear\", \"Year\" ) < 0 ) )\r\n { \r\n RESULT = mStudent.cursor( \"DegreeYearData\" ).setNext().toInt();\r\n } \r\n\r\n } \r\n\r\n return( 0 );\r\n// END\r\n}", "public QueryFrame( String driver, String databaseURL, \n\t\t\t\t\t String username, String password )\n\t{\n\t\tsuper( \"Database Queries\" ); // call superclass constructor with frame title\n\t\t\n\t\tDRIVER = driver; // set the jdbc driver\n\t\tDATABASE_URL = databaseURL; // set the database URL\n\t\tUSERNAME = username; // set the username for accessing the database\n\t\tPASSWORD = password; // set the password for accessing the database\n\t\t\n\t\t// initialise Instructions label\n\t\tlblInstructions = new JLabel( \"Choose a defined query or create a custom query in the text area below\" );\n\t\t\n\t\t// initialise Defined Queries combo box with element DefinedQueriesEnum\n\t\tcmbDefinedQueries = new JComboBox< DefinedQueriesEnum >( DefinedQueriesEnum.values() );\n\t\t\n\t\ttxtCustomQuery = new JTextArea( 10, 30 ); // initialise Custom Query text area with 10 rows and 30 columns\n\t\ttxtCustomQuery.setLineWrap( true ); // set line wrap true for text area\n\t\ttxtCustomQuery.setWrapStyleWord( true ); // set wrap style word for text area\n\t\t\n\t\ttry // begin try block\n\t\t{\n\t\t\t// initialise JTable data model to the currently selected query in the Defined Queries combo box\n\t\t\t// using five argument constructor as employee type is not relevant for this result model\n\t\t\tqueryResultsModel = new ResultSetTableModel( DRIVER, DATABASE_URL, USERNAME, PASSWORD,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t ( ( DefinedQueriesEnum ) cmbDefinedQueries.getSelectedItem() ).getQuery() );\n\t\t\t\n\t\t\tbtnDefinedQueries = new JButton( \"Execute Defined Query\" ); // initialise Defined Queries button\n\t\t\tbtnDefinedQueries.addActionListener( // add an action listener for the Defined Queries button\n\t\t\t\tnew ActionListener() // begin anonymous inner class\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t// override method actionPerformed\n\t\t\t\t\tpublic void actionPerformed( ActionEvent event )\n\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\ttry // begin try block\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// set the query of the table model to the currently selected query in the Defined Queries combo box\n\t\t\t\t\t\t\tqueryResultsModel.setQuery( ( ( DefinedQueriesEnum ) cmbDefinedQueries.getSelectedItem() ).getQuery() );\n\t\t\t\t\t\t} // end try block\n\t\t\t\t\t\tcatch( SQLException sqlException ) // catch SQLException\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// display message to user indicating that an error occurred\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\n\t\t\t\t\t\t\t\tnull, // use default parent component\n\t\t\t\t\t\t\t\tsqlException.getMessage(), // message to display\n\t\t\t\t\t\t\t\t\"Table Model Error\", // title of the message dialog\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE ); // message type is error\n\t\t\t\t\t\t\tsqlException.printStackTrace(); // print stack trace\n\t\t\t\t\t\t} // end catch SQLException\n\t\t\t\t\t} // end method actionPerformed\n\t\t\t\t} // end anonymous inner class\n\t\t\t); // end registering of event handler for Defined Queries button\n\t\t\n\t\t\tbtnCustomQuery = new JButton( \"Execute Custom Query\" ); // initialise Custom Query button\n\t\t\tbtnCustomQuery.addActionListener( // add an action listener for the Custom Query button\n\t\t\t\tnew ActionListener() // begin anonymous inner class\n\t\t\t\t{\n\t\t\t\t\t// override method actionPerformed\n\t\t\t\t\tpublic void actionPerformed( ActionEvent event )\n\t\t\t\t\t{\n\t\t\t\t\t\ttry // begin try block\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// set the query of the table model to that entered in the Custom Query text area\n\t\t\t\t\t\t\tqueryResultsModel.setQuery( txtCustomQuery.getText() );\n\t\t\t\t\t\t} // end try block\n\t\t\t\t\t\tcatch( SQLException sqlException ) // catch SQLException\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// display message to user indicating that an error occurred\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\n\t\t\t\t\t\t\t\tnull, // use default parent component\n\t\t\t\t\t\t\t\tString.format( \"Not a valid SQL query\\n%s\\n%s\",\n\t\t\t\t\t\t\t\t\ttxtCustomQuery.getText(),\n\t\t\t\t\t\t\t\t\tsqlException.getMessage() ), // message to display\n\t\t\t\t\t\t\t\t\"Query Invalid\", // title of the message dialog\n\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE ); // message type is error\n\t\t\t\t\t\t} // end catch SQLException\n\t\t\t\t\t} // end method actionPerformed\n\t\t\t\t} // end anonymous inner class\n\t\t\t); // end registering of event handler for Custom Query button\n\t\t\n\t\t\ttblQueryResults = new JTable( queryResultsModel ); // initialise data table\n\t\t\ttblQueryResults.setGridColor( Color.BLACK ); // set table gridline colour to black\n\t\t\ttablePanel = new JPanel(); // initialise the table panel\n\t\t\ttablePanel.setLayout( new BorderLayout() ); // set border layout as the layout of the table panel\n\t\t\t\n\t\t\t// add data table to table panel within a scroll pane with center alignment\n\t\t\ttablePanel.add( new JScrollPane( tblQueryResults ), BorderLayout.CENTER );\n\t\t\n\t\t\tgridBagLayout = new GridBagLayout(); // initialise grid bag layout\n\t\t\tgridBagConstraints = new GridBagConstraints(); // initialise grid bag constraints\n\t\t\tsetLayout( gridBagLayout ); // set the layout of this frame to grid bag layout\n\t\t\t\n\t\t\t// add GUI components to the frame with the specified constraints\n\t\t\t// component, gridx, gridy, gridwidth, gridheight, weightx, weighty, insets, anchor, fill\t\t\n\t\t\taddComponent( lblInstructions, 0, 0, 2, 1, 0, 0, new Insets( 5, 5, 5, 5 ), gridBagConstraints.CENTER, gridBagConstraints.NONE );\n\t\t\taddComponent( cmbDefinedQueries, 0, 1, 1, 1, 0, 0, new Insets( 5, 5, 5, 5 ), gridBagConstraints.WEST, gridBagConstraints.NONE );\n\t\t\taddComponent( btnDefinedQueries, 1, 1, 1, 1, 0, 0, new Insets( 5, 5, 5, 5 ), gridBagConstraints.WEST, gridBagConstraints.NONE );\n\t\t\taddComponent( txtCustomQuery, 0, 2, 1, 1, 0, 0, new Insets( 5, 5, 5, 5 ), gridBagConstraints.WEST, gridBagConstraints.HORIZONTAL );\n\t\t\taddComponent( btnCustomQuery, 1, 2, 1, 1, 0, 0, new Insets( 5, 5, 5, 5 ), gridBagConstraints.NORTHWEST, gridBagConstraints.HORIZONTAL );\n\t\t\taddComponent( tablePanel, 0, 3, 3, 1, 1, 1, new Insets( 5, 0, 5, 0 ), gridBagConstraints.CENTER, gridBagConstraints.BOTH );\n\t\t\n\t\t\t// add a window listener to this frame\n\t\t\taddWindowListener(\n\t\t\t\tnew WindowAdapter() // declare anonymous inner class\n\t\t\t\t{\n\t\t\t\t\t// override method windowClosing\n\t\t\t\t\t// when window is closing, disconnect from the database if connected\n\t\t\t\t\tpublic void windowClosing( WindowEvent event )\n\t\t\t\t\t{\n\t\t\t\t\t\tif( queryResultsModel != null ) // if the JTable data model has been initialised\n\t\t\t\t\t\t\tqueryResultsModel.disconnectFromDatabase(); // disconnect the data model from database\n\t\t\t\t\t} // end method windowClosing\n\t\t\t\t} // end anonymous inner class\n\t\t\t); // end registering of event handler for the window\n\t\t\n\t\t\tpack(); // resize the frame to fit the preferred size of its components\n\t\t\tsetVisible( true ); // set the frame to be visible\n\t\t} // end try block\n\t\tcatch ( SQLException sqlException ) // catch SQLException\n\t\t{\n\t\t\t// display message to user indicating that an error occurred\n\t\t\tJOptionPane.showMessageDialog(\n\t\t\t\tnull, // use default parent component\n\t\t\t\tsqlException.getMessage(), // message to display\n\t\t\t\t\"Table Model Error\", // title of the message dialog\n\t\t\t\tJOptionPane.ERROR_MESSAGE ); // message type is error\n\t\t\tsqlException.printStackTrace(); // print stack trace\n\t\t\t\n\t\t\t// if table model cannot be initialised then frame is useless\n\t\t\t// so set the frame invisible and dispose of it\n\t\t\tsetVisible( false ); // set the frame to be invisible\n\t\t\tdispose(); // dispose of this frame\n\t\t} // end catch SQLException\n\t\tcatch ( ClassNotFoundException classNotFoundException )\n\t\t{\n\t\t\t// display message to user indicating that an error occurred\n\t\t\tJOptionPane.showMessageDialog(\n\t\t\t\tnull, // use default parent component\n\t\t\t\tString.format( \"Could not find database driver %s\\n%s\", // message to display\n\t\t\t\t\tDRIVER,\n\t\t\t\t\tclassNotFoundException.getMessage() ),\n\t\t\t\t\"Driver Not Found\", // title of the message dialog\n\t\t\t\tJOptionPane.ERROR_MESSAGE ); // message type is error\n\t\t\tclassNotFoundException.printStackTrace(); // print stack trace\n\t\t\t\n\t\t\t// if table model cannot be initialised then frame is useless\n\t\t\t// so set the frame invisible and dispose of it\n\t\t\tsetVisible( false ); // set the frame to be invisible\n\t\t\tdispose(); // dispose of this frame\n\t\t} // end catch ClassNotFoundException\n\t}", "public void generarReporteEvaluacionProveedors(String sAccionBusqueda,List<EvaluacionProveedor> evaluacionproveedorsParaReportes) throws Exception {\n\t\tLong iIdUsuarioSesion=0L;\t\r\n\t\t\r\n\t\t\r\n\t\tif(usuarioActual==null) {\r\n\t\t\tthis.usuarioActual=new Usuario();\r\n\t\t}\r\n\t\t\r\n\t\tiIdUsuarioSesion=usuarioActual.getId();\r\n\t\t\r\n\t\tString sPathReportes=\"\";\r\n\t\t\r\n\t\tInputStream reportFile=null;\r\n\t\tInputStream imageFile=null;\r\n\t\t\t\r\n\t\timageFile=AuxiliarImagenes.class.getResourceAsStream(\"LogoReporte.jpg\");\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\tString sPathReporteFinal=\"\";\r\n\t\t\r\n\t\tif(!esReporteAccionProceso) {\r\n\t\t\tif(!this.sTipoReporte.equals(\"RELACIONES\")) {//!isEsReporteRelaciones\r\n\t\t\t\tif(!this.esReporteDinamico) {\r\n\t\t\t\t\tsPathReporteFinal=\"EvaluacionProveedor\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsPathReporteFinal=this.sPathReporteDinamico;\r\n\t\t\t\t\treportFile = new FileInputStream(sPathReporteFinal);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsPathReporteFinal=\"EvaluacionProveedorMasterRelaciones\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\r\n\t\t\t\t//sPathReportes=reportFile.getPath().replace(\"EvaluacionProveedorMasterRelacionesDesign.jasper\", \"\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t\tsPathReporteFinal=\"EvaluacionProveedor\"+this.sTipoReporteExtra+\"Design.jasper\";\r\n\t\t\t\treportFile = AuxiliarReportes.class.getResourceAsStream(sPathReporteFinal);\t\r\n\t\t}\r\n\t\t\r\n\t\tif(reportFile==null) {\r\n\t\t\tthrow new JRRuntimeException(sPathReporteFinal+\" no existe\");\r\n\t\t}\r\n\t\t\r\n\t\tString sUsuario=\"\";\r\n\t\t\r\n\t\tif(usuarioActual!=null) {\r\n\t\t\tsUsuario=usuarioActual.getuser_name();\r\n\t\t}\r\n\t\t\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"usuario\", sUsuario);\r\n\t\t\r\n\t\tparameters.put(\"titulo\", Funciones.GetTituloSistemaReporte(this.parametroGeneralSg,this.moduloActual,this.usuarioActual));\r\n\t\tparameters.put(\"subtitulo\", \"Reporte De Evaluacion Proveedores\");\t\t\r\n\t\tparameters.put(\"busquedapor\", EvaluacionProveedorConstantesFunciones.getNombreIndice(sAccionBusqueda)+sDetalleReporte);\r\n\t\t\r\n\t\t\r\n\t\tif(this.sTipoReporte.equals(\"RELACIONES\")) {//isEsReporteRelaciones\r\n\t\t\tparameters.put(\"SUBREPORT_DIR\", sPathReportes);\r\n\t\t}\r\n\t\t\r\n\t\tparameters.put(\"con_grafico\", this.conGraficoReporte);\r\n\t\t\r\n\t\tJasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile);\r\n\t\t\t\t\r\n\t\tthis.cargarDatosCliente();\r\n\t\t\r\n\t\tArrayList<Classe> classes=new ArrayList<Classe>();\t\t\r\n\t\t\r\n\t\tif(this.sTipoReporte.equals(\"RELACIONES\")) {//isEsReporteRelaciones\r\n\t\t\t\r\n\t\t\tclasses.add(new Classe(DetalleEvaluacionProveedor.class));\r\n\t\t\t\r\n\t\t\t//ARCHITECTURE\r\n\t\t\tif(Constantes.ISUSAEJBLOGICLAYER) {\t\t\r\n\t\t\t\ttry\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tEvaluacionProveedorLogic evaluacionproveedorLogicAuxiliar=new EvaluacionProveedorLogic();\r\n\t\t\t\t\tevaluacionproveedorLogicAuxiliar.setDatosCliente(evaluacionproveedorLogic.getDatosCliente());\t\t\t\t\r\n\t\t\t\t\tevaluacionproveedorLogicAuxiliar.setEvaluacionProveedors(evaluacionproveedorsParaReportes);\r\n\t\t\t\t\t\r\n\t\t\t\t\tevaluacionproveedorLogicAuxiliar.cargarRelacionesLoteForeignKeyEvaluacionProveedorWithConnection(); //deepLoadsWithConnection(false, DeepLoadType.INCLUDE, classes, \"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tevaluacionproveedorsParaReportes=evaluacionproveedorLogicAuxiliar.getEvaluacionProveedors();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//evaluacionproveedorLogic.getNewConnexionToDeep();\r\n\t\t\t\t\t\r\n\t\t\t\t\t//for (EvaluacionProveedor evaluacionproveedor:evaluacionproveedorsParaReportes) {\r\n\t\t\t\t\t//\tevaluacionproveedorLogic.deepLoad(evaluacionproveedor, false, DeepLoadType.INCLUDE, classes);\r\n\t\t\t\t\t//}\t\t\t\t\t\t\r\n\t\t\t\t\t//evaluacionproveedorLogic.commitNewConnexionToDeep();\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t} catch(Exception e) {\r\n\t\t\t\t\tthrow e;\r\n\t\t\t\t\t\r\n\t\t\t\t} finally {\r\n\t\t\t\t\t//evaluacionproveedorLogic.closeNewConnexionToDeep();\r\n\t\t\t\t}\r\n\t\t\t} else if(Constantes.ISUSAEJBREMOTE) {\r\n\t\t\t} else if(Constantes.ISUSAEJBHOME) {\r\n\t\t\t}\r\n\t\t\t//ARCHITECTURE\t\t\r\n\t\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\tInputStream reportFileDetalleEvaluacionProveedor = AuxiliarReportes.class.getResourceAsStream(\"DetalleEvaluacionProveedorDetalleRelacionesDesign.jasper\");\r\n\t\t\tparameters.put(\"subreport_detalleevaluacionproveedor\", reportFileDetalleEvaluacionProveedor);\r\n\t\t} else {\r\n\t\t\t//FK DEBERIA TRAERSE DE ANTEMANO\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\t//CLASSES PARA REPORTES OBJETOS RELACIONADOS\r\n\t\tif(!this.sTipoReporte.equals(\"RELACIONES\")) {//!isEsReporteRelaciones\r\n\t\t\tclasses=new ArrayList<Classe>();\r\n\t\t}\r\n\t\t\r\n\t\tJRBeanArrayDataSource jrbeanArrayDataSourceEvaluacionProveedor=null;\r\n\t\t\r\n\t\tif(this.sTipoReporteExtra!=null && !this.sTipoReporteExtra.equals(\"\")) {\r\n\t\t\tEvaluacionProveedorConstantesFunciones.S_TIPOREPORTE_EXTRA=this.sTipoReporteExtra;\r\n\t\t} else {\r\n\t\t\tEvaluacionProveedorConstantesFunciones.S_TIPOREPORTE_EXTRA=\"\";\r\n\t\t}\r\n\t\t\r\n\t\tjrbeanArrayDataSourceEvaluacionProveedor=new JRBeanArrayDataSource(EvaluacionProveedorJInternalFrame.TraerEvaluacionProveedorBeans(evaluacionproveedorsParaReportes,classes).toArray());\r\n\t\t\r\n\t\tjasperPrint = JasperFillManager.fillReport(jasperReport,parameters,jrbeanArrayDataSourceEvaluacionProveedor);\r\n\t\t\t\t\r\n\t\t\r\n\t\tString sPathDest=Constantes.SUNIDAD_ARCHIVOS+\":/\"+Constantes.SCONTEXTSERVER+\"/\"+EvaluacionProveedorConstantesFunciones.SCHEMA+\"/reportes\";\r\n\t\t\r\n\t\tFile filePathDest = new File(sPathDest);\r\n\t\t\r\n\t\tif(!filePathDest.exists()) {\r\n\t\t\tfilePathDest.mkdirs();\t\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\tString sDestFileName=sPathDest+\"/\"+EvaluacionProveedorConstantesFunciones.CLASSNAME;\r\n\t\t\t\t\r\n\t\tif(this.sTipoArchivoReporte==\"VISUALIZAR\") {\r\n\t\t\tJasperViewer jasperViewer = new JasperViewer(jasperPrint,false) ;\r\n\t\t\tjasperViewer.setVisible(true) ; \r\n\r\n\t\t} else if(this.sTipoArchivoReporte==\"HTML\"||this.sTipoArchivoReporte==\"PDF\"||this.sTipoArchivoReporte==\"XML\") {\t\r\n\t\t\t//JasperFillManager.fillReportToFile(reportFile.getAbsolutePath(),parameters, new JRBeanArrayDataSource(EvaluacionProveedorBean.TraerEvaluacionProveedorBeans(evaluacionproveedorsParaReportes).toArray()));\r\n\t\t\t\t\t\t\t\r\n\t\t\tif(this.sTipoArchivoReporte==\"HTML\") {\r\n\t\t\t\tsDestFileName+=\".html\";\r\n\t\t\t\tJasperExportManager.exportReportToHtmlFile(jasperPrint,sDestFileName);\r\n\t\t\t\t\t\r\n\t\t\t} else if(this.sTipoArchivoReporte==\"PDF\") {\r\n\t\t\t\tsDestFileName+=\".pdf\";\r\n\t\t\t\tJasperExportManager.exportReportToPdfFile(jasperPrint,sDestFileName);\r\n\t\t\t} else {\r\n\t\t\t\tsDestFileName+=\".xml\";\r\n\t\t\t\tJasperExportManager.exportReportToXmlFile(jasperPrint,sDestFileName, false);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t} else if(this.sTipoArchivoReporte==\"WORD\"||this.sTipoArchivoReporte==\"EXCEL\") {\r\n\t\t\t\t\r\n\t\t\tif(this.sTipoArchivoReporte==\"WORD\") {\r\n\t\t\t\tsDestFileName+=\".rtf\";\r\n\t\t\t\t\t\r\n\t\t\t\tJRRtfExporter exporter = new JRRtfExporter();\r\n\t\t\r\n\t\t\t\texporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);\r\n\t\t\t\texporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sDestFileName);\r\n\t\t\r\n\t\t\t\texporter.exportReport();\r\n\t\t\t\t\r\n\t\t\t} else\t{\r\n\t\t\t\tsDestFileName+=\".xls\";\r\n\t\t\t\t\t\r\n\t\t\t\tJRXlsExporter exporterXls = new JRXlsExporter();\r\n\t\t\r\n\t\t\t\texporterXls.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);\r\n\t\t\t\texporterXls.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, sDestFileName);\r\n\t\t\t\texporterXls.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);\r\n\t\t\r\n\t\t\t\texporterXls.exportReport();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} else if(this.sTipoArchivoReporte==\"EXCEL2\"||this.sTipoArchivoReporte==\"EXCEL2_2\") {\r\n\t\t\t//sDestFileName+=\".xlsx\";\r\n\t\t\t\r\n\t\t\tif(this.sTipoReporte.equals(\"NORMAL\")) {\r\n\t\t\t\tthis.generarExcelReporteEvaluacionProveedors(sAccionBusqueda,sTipoArchivoReporte,evaluacionproveedorsParaReportes);\r\n\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"FORMULARIO\")){\r\n\t\t\t\tthis.generarExcelReporteVerticalEvaluacionProveedors(sAccionBusqueda,sTipoArchivoReporte,evaluacionproveedorsParaReportes,false);\r\n\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"DINAMICO\")){\r\n\t\t\t\t\r\n\t\t\t\tif(this.sTipoReporteDinamico.equals(\"NORMAL\")) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tthis.jButtonGenerarExcelReporteDinamicoEvaluacionProveedorActionPerformed(null);\r\n\t\t\t\t\t//this.generarExcelReporteEvaluacionProveedors(sAccionBusqueda,sTipoArchivoReporte,evaluacionproveedorsParaReportes);\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t} else if(this.sTipoReporteDinamico.equals(\"FORMULARIO\")){\r\n\t\t\t\t\tthis.generarExcelReporteVerticalEvaluacionProveedors(sAccionBusqueda,sTipoArchivoReporte,evaluacionproveedorsParaReportes,true);\r\n\t\t\t\t\r\n\t\t\t\t} else if(this.sTipoReporteDinamico.equals(\"RELACIONES\")){\r\n\t\t\t\t\tthis.generarExcelReporteRelacionesEvaluacionProveedors(sAccionBusqueda,sTipoArchivoReporte,evaluacionproveedorsParaReportes,true);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} else if(this.sTipoReporte.equals(\"RELACIONES\")){\r\n\t\t\t\tthis.generarExcelReporteRelacionesEvaluacionProveedors(sAccionBusqueda,sTipoArchivoReporte,evaluacionproveedorsParaReportes,false);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(this.sTipoArchivoReporte==\"HTML\"||this.sTipoArchivoReporte==\"PDF\"||this.sTipoArchivoReporte==\"XML\"||this.sTipoArchivoReporte==\"WORD\"||this.sTipoArchivoReporte==\"EXCEL\") {\t\t\t\t\r\n\t\t\tJOptionPane.showMessageDialog(this,\"REPORTE \"+sDestFileName+\" GENERADO SATISFACTORIAMENTE\",\"REPORTES \",JOptionPane.INFORMATION_MESSAGE);\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tpnlReportGeneration.setVisible(true);\n\t\t\t\tloadProjects();\n\t\t\t}", "void jbtnExtract_actionPerformed(ActionEvent e) {\n java.util.HashMap conditions=new java.util.HashMap();\r\n\r\n for(int i=0;i<guis.size();i++){\r\n exgui.DataBindGUIObject dbGUIOBJ=(exgui.DataBindGUIObject)guis.get(i);\r\n if(dbGUIOBJ instanceof exgui.DataBindTextWithChecker ){\r\n if(!((exgui.DataBindTextWithChecker)dbGUIOBJ).isValidx()) return;\r\n if(dbGUIOBJ instanceof exgui.SwingSingleSelection){\r\n Object value=((exgui.SwingSingleSelection)dbGUIOBJ).getSelectedValue();\r\n if(value!=null)conditions.put(dbGUIOBJ.getOrgRecField(),value);\r\n }\r\n }else{\r\n exgui.SwingSingleSelection slk=(exgui.SwingSingleSelection)dbGUIOBJ;\r\n if(slk.getSelectedValue()!=null){\r\n conditions.put(dbGUIOBJ.getOrgRecField(),slk.getSelectedValue());\r\n }\r\n }\r\n }\r\n if(cbxAuditStatus.getSelectedIndex()>0){\r\n conditions.put(prdHead.QRY_CONDITION_ADT_STATUS,\r\n String.valueOf(cbxAuditStatus.getSelectedIndex()));\r\n }\r\n if(null!=slkVender.getSelectedValue()){\r\n conditions.put(\"CT_VENDER\",slkVender.getSelectedValue().toString());\r\n }\r\n //handing all the conditions to Commnad set object,wait for querry result.\r\n if(rdoOnlySamle.isSelected()){\r\n conditions.put(\"a.PROD_IS_SAMPLE\",\"Y\");\r\n }\r\n if(txtBatchNo.getText().trim().length()>0){\r\n conditions.put(\"TPE_NB_BATCH_NO\",txtBatchNo.getText().trim());\r\n }\r\n//\r\n if(txtCust_Po.getText().trim().length()>0){\r\n conditions.put(\"CUST_PO\",txtCust_Po.getText().trim());\r\n }\r\n//\r\n\r\n newtimes.preproduction.process.PP_Maintain_CmdSet.qryConditions=conditions;\r\n util.ApplicationProperites.removeProperites(processhandler.template.Constants.XNT_LIST_QRY_RESLUT_BGN_AT);\r\n goCommand();\r\n }", "public static void CreateReport() {\n\t\tString fileName = new SimpleDateFormat(\"'Rest_Country_Report_'YYYYMMddHHmm'.html'\").format(new Date());\n\t\tString path = \"Report/\" + fileName;\n\t\treport = new ExtentReports(path);\n\t}", "private void buildReport() {\n StringBuilder stringBuilder = new StringBuilder();\n\n // Header of report\n stringBuilder.append(\"Games\\tCPU wins\\t\"\n + \"Human wins\\tDraw avg\\tMax rounds\\n\");\n stringBuilder.append(\"=============================================\\n\");\n\n // shows the number of overall games\n stringBuilder.append(dbConnection.executeQuery(\"SELECT COUNT(game_id) FROM game\", \"count\"));\n stringBuilder.append(\"\\t\");\n // shows the number of times the computer won\n stringBuilder.append(dbConnection.executeQuery(\"SELECT COUNT(game_id) FROM game WHERE winner = 'CPU'\", \"count\"));\n stringBuilder.append(\"\\t\");\n // shows the number of times the human player won\n stringBuilder.append(dbConnection.executeQuery(\"SELECT COUNT(game_id) FROM game WHERE winner = 'human'\", \"count\"));\n stringBuilder.append(\"\\t\");\n // shows the average number of draws per game\n stringBuilder.append((int)Float.parseFloat(dbConnection.executeQuery(\"SELECT AVG(draws) FROM game\", \"avg\")));\n stringBuilder.append(\"\\t\");\n // shows the maximum number of rounds played\n stringBuilder.append(dbConnection.executeQuery(\"SELECT MAX(rounds) FROM game\", \"max\"));\n\n // Converts stringBuilder to a String\n reportContent = stringBuilder.toString();\n }", "void genReport() {\n\n current_part.save_state(); \n\n JTextArea ta = text;\n\n ta.setText(\"\");\n\n if (!t_foil_name.equals(\"Test\"))\n ta.append(\"Hydrofoil: \" + t_foil_name);\n\n java.util.Date date = new java.util.Date();\n ta.append(\"\\n Date: \" + date);\n \n wing.print( \"Main Wing\", ta);\n stab.print( \"Stabilizer Wing\", ta);\n strut.print(\"Mast (a.k.a. Strut)\", ta);\n fuse.print( \"Fuselage\", ta);\n\n ta.append( \"\\n\\n\");\n // tail volume is LAElev * AreaElev / (MACWing * AreaWing)\n // LAElev : The elevator's Lever Arm measured at the wing's and elevator's quarter chord point\n double LAElev = stab.xpos + stab.chord_xoffs + 0.25*stab.chord - (wing.xpos + wing.chord_xoffs + 0.25*wing.chord);\n // MAC : The main wing's Mean Aerodynamic Chord\n // AreaWing : The main wing's area\n // AreaElev : The elevator's area\n \n ta.append( \"\\nTail Voulume: \" + LAElev*stab.span*stab.chord/(wing.chord*wing.chord*wing.span));\n \n\n ta.append( \"\\n\\n\");\n switch (planet) {\n case 0: { \n ta.append( \"\\n Standard Earth Atmosphere\" );\n break;\n }\n case 1: { \n ta.append( \"\\n Martian Atmosphere\" );\n break;\n }\n case 2: { \n ta.append( \"\\n Water\" );\n break;\n }\n case 3: { \n ta.append( \"\\n Specified Conditions\" );\n break;\n }\n case 4: { \n ta.append( \"\\n Specified Conditions\" );\n break;\n }\n }\n\n // ta.append( \"\\n Altitude = \" + filter0(alt_val) );\n // if (lunits == IMPERIAL) ta.append( \" ft ,\" );\n // else /*METRIC*/ ta.append( \" m ,\" );\n \n switch (lunits) {\n case 0: { /* English */\n ta.append( \"\\n Density = \" + filter5(rho_EN) );\n ta.append( \"slug/cu ft\" );\n ta.append( \"\\n Pressure = \" + filter3(ps0/144.) );\n ta.append( \"lb/sq in,\" );\n ta.append( \" Temperature = \" + filter0(ts0 - 460.) );\n ta.append( \"F,\" );\n break;\n }\n case 1: { /* Metric */\n ta.append( \" Density = \" + filter3(rho_EN*515.4) );\n ta.append( \"kg/cu m\" );\n ta.append( \"\\n Pressure = \" + filter3(101.3/14.7*ps0/144.) );\n ta.append( \"kPa,\" );\n ta.append( \" Temperature = \" + filter0(ts0*5.0/9.0 - 273.1) );\n ta.append( \"C,\" );\n break;\n }\n }\n\n ta.append( \"\\n Speed = \" + filter1(velocity * (lunits==IMPERIAL? 0.868976 : 0.539957 )) + \"Kts, or\" );\n ta.append( \" \" + filter1(velocity) );\n if (lunits == IMPERIAL) ta.append( \" mph ,\" );\n else /*METRIC*/ ta.append( \" km/hr ,\" );\n\n // if (out_aux_idx == 1)\n // ta.append( \"\\n Lift Coefficient = \" + filter3(current_part.cl) );\n // if (out_aux_idx == 0) {\n // if (Math.abs(lift) <= 10.0) ta.append( \"\\n Lift = \" + filter3(lift) );\n // if (Math.abs(lift) > 10.0) ta.append( \"\\n Lift = \" + filter0(lift) );\n // if (lunits == IMPERIAL) ta.append( \" lbs \" );\n // else /*METRIC*/ ta.append( \" Newtons \" );\n // }\n // if ( polarOut == 1)\n // ta.append( \"\\n Drag Coefficient = \" + filter3(current_part.cd) );\n // if (out_aux_idx == 0) {\n // ta.append( \"\\n Drag = \" + filter0(drag) );\n // if (lunits == IMPERIAL) ta.append( \" lbs \" );\n // else /*METRIC*/ ta.append( \" Newtons \" );\n // }\n\n ta.append( \"\\n Lift = \" + dash.outTotalLift.getText());\n ta.append( \"\\n Drag = \" + dash.outTotalDrag.getText());\n\n if (min_takeoff_speed_info != null) \n ta.append( \"\\n\\n\" + min_takeoff_speed_info);\n\n if (cruising_info != null) \n ta.append( \"\\n\\n\" + cruising_info);\n\n if (max_speed_info != null) \n ta.append( \"\\n\\n\" + max_speed_info);\n\n // ensure end ta.setCaretPosition(ta.getText().length());\n // ensure start\n ta.setCaretPosition(0);\n }", "private void generateReports() {\r\n\t\tLOGGER.debug(\"Report generation trigerred\");\r\n\t\tgenerateIncomingReport();\r\n\t\tgenerateOutgoingReport();\r\n\t\tgenerateIncomingRankingReport();\r\n\t\tgenerateOutgoingRankingReport();\r\n\t\tLOGGER.debug(\"Report generation completed\");\r\n\t}", "public ActionReport getActionReport();", "protected StringBuilder generateQuery() {\n StringBuilder sb = new StringBuilder();\n sb.append(\" FROM \") \n .append(dao.getParameterClass(0).getName())\n .append(\" d WHERE (:incorrectEvent = '' OR d.incorrectEvent.id = :incorrectEvent) \")\n .append(\"AND (d.createDate BETWEEN :dateFrom AND :dateTo ) \")\n .append(\"AND ( ((:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName) \")\n .append(\" OR (:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName)) \")\n .append(\" OR (:search='' OR d.searchField LIKE :search) ) \");\n return sb;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(results.isEmpty())\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tif(viewNumber.getText().trim().isEmpty())\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\tint num = 0;\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tnum = Integer.parseInt(viewNumber.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException nfe){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(num <= 0){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(num > results.size()){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Number\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString collectionName = \toutputTypes_dropDown.getSelectedItem().equals(\"PackageDataSet\")? \"packageDataSets\" : \n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"PackageFamily\")? \"packageFamilies\" :\n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"File\")? \"files\" :\n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"Package\")? \"packages\" :\n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"ParentFile\")? \"parentFiles\" :\n\t\t\t\t\toutputTypes_dropDown.getSelectedItem().equals(\"Source\")? \"sources\" : \"\";\n\t\t\t\t\n\t\t\t\tnew Thread(new Printer(results.get(num - 1), client, dbname_txtfield.getText(), output_txtarea, collectionName)).start();\n\t\t\t\t\n\t\t\t}", "public void getQuery() {\n\n\t\tString[] columnNames = { \"Customer ID\", \"Product ID\", \"Product Quantity\", \"Date Issued\", \"Time Issued\" };\n\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\n\t\ttry {\n\t\t\tconnection = DriverManager.getConnection(DATABASE_URL, UserName_SQL, Password_SQL);\n\t\t\tstatement = connection.createStatement();\n\t\t\t\n\t\t\tResultSet resultSet = statement\n\t\t\t\t\t.executeQuery(\"SELECT customerID, productId, qtyProduct, invoiceDate, invoiceTime FROM invoice\");\n\n\t\t\tResultSetMetaData metaData = resultSet.getMetaData();\n\n\t\t\tint numberOfColumns = metaData.getColumnCount();\n\t\t\tint numberOfRows = getJTableNumberOfRows();\n\t\t\tObject[][] data = new Object[numberOfRows][numberOfColumns];\n\n\t\t\tint j = 0, k = 0;\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tfor (int i = 1; i <= numberOfColumns; i++) {\n\t\t\t\t\tdata[j][k] = resultSet.getObject(i);\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t\tk = 0;\n\t\t\t\tj++;\n\t\t\t} // end while\n\n\t\t\tmodel = new DefaultTableModel(data, columnNames);\n\n\t\t\t/* create non-editable JTable */\n\t\t\tjtable = new JTable(model) {\n\t\t\t\tpublic boolean isCellEditable(int row, int column) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t};\n\t\t\t;\n\t\t\tjtable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);\n\t\t\tjtable.setPreferredScrollableViewportSize(new Dimension(1230, 450));\n\t\t\tJScrollPane scrollPane = new JScrollPane(jtable);\n\n\t\t\tjtablePanel.add(scrollPane);\n\t\t\tjtable.getColumnModel().getColumn(0).setPreferredWidth(250);\n\t\t\tjtable.getColumnModel().getColumn(1).setPreferredWidth(250);\n\t\t\tjtable.getColumnModel().getColumn(2).setPreferredWidth(250);\n\t\t\tjtable.getColumnModel().getColumn(3).setPreferredWidth(400);\n\t\t\tjtable.getColumnModel().getColumn(4).setPreferredWidth(400);\n\t\t\tjtable.setAutoResizeMode(jtable.AUTO_RESIZE_LAST_COLUMN);\n\t\t\tjtable.setBackground(Color.white);\n\t\t\tjtable.setForeground(Color.black);\n\t\t\tjtable.setRowHeight(30);\n\t\t\tjtable.getTableHeader().setFont(new Font(\"Calibri\", Font.BOLD, 15));\n\t\t\tjtable.setFont(new Font(\"Calibri\", Font.PLAIN, 13));\n\n\t\t} // end try\n\t\t\n\t\tcatch (SQLException sqlException) {\n\t\t\tsqlException.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} // end catch\n\t\t\n\t\tfinally // ensure statement and connection are closed properly\n\t\t{\n\t\t\ttry {\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t} // end try\n\t\t\tcatch (Exception exception) {\n\t\t\t\texception.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t} // end catch\n\t\t} // end finally\n\t\t\n\t}", "public void sendToStagingArea() {\n if (queryExpired) {\n String[] options = {\"Resubmit\", \"New Query\"};\n int rtn = JOptionPane.showOptionDialog(this,\n \"Query has Expired;\\nNew Query Required\", null,\n JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,\n null, options, options[0]);\n\n if (rtn == JOptionPane.YES_OPTION) {\n // Resubmit the existing query\n InfoPanel.searchButton.doClick();\n\n return;\n\n } else {\n // Reset the panel to the search panel\n tabbedPane.setSelectedIndex(0);\n\n // Clear the summary model\n msbQTM.clear();\n\n // Clear the project model\n ((ProjectTableModel) projectTable.getModel()).clear();\n initProjectTable();\n\n return;\n }\n }\n\n if (table.getSelectedRow() != -1) {\n performSendToStagingArea();\n om.updateDeferredList();\n\n } else {\n JOptionPane.showMessageDialog(this,\n \"Must select a project summary first!\");\n }\n }", "@FXML\n private void generateReportData() {\n\n if (storage.getHistory().size() == 0) {\n Alert ErrorAlert = new Alert(Alert.AlertType.NONE);\n ErrorAlert.setAlertType(Alert.AlertType.ERROR);\n ErrorAlert.setContentText(\"You have not selected any data to be in your Flight History\");\n ErrorAlert.show();\n } else {\n updateTravelledAndVisited();\n setUpData();\n\n try {\n displayCarbonEmissionGoalField.setText(String.valueOf(Double.parseDouble(carbonEmissionGoalField.getText())));\n generalStatsCalculator.setCarbonEmissionsGoal(Double.parseDouble(carbonEmissionGoalField.getText()));\n\n displayTotalEmissionsField.setText(\n String.format(\"%.2f\", generalStatsCalculator.getTotalCarbonEmissions()));\n displayTotalDistanceTravelledField.setText(\n String.format(\"%.2f\", generalStatsCalculator.getTotalDistanceTravelled()));\n displayMostEmissionsRouteField.setText(MostEmissionsRouteString);\n displayLeastEmissionsRouteField.setText(LeastEmissionsRouteString);\n displayMostDistanceRouteField.setText(MostDistanceRouteString);\n displayLeastDistanceRouteField.setText(LeastDistanceRouteString);\n displayMostVisitedSourceAirportField.setText(MostVisitedSourceAirportString);\n displayLeastVisitedSourceAirportField.setText(LeastVisitedSourceAirportString);\n displayMostVisitedDestinationAirportField.setText(MostVisitedDestAirportString);\n displayLeastVisitedDestinationAirportField.setText(LeastVisitedDestAirportString);\n displayTreeOffsetField.setText(numOfTreesString);\n generalStatsCalculator.createCarbonEmissionsComment();\n displayStatusCommentField.setText(generalStatsCalculator.getCarbonEmissionsComment());\n } catch (NumberFormatException e) {\n carbonEmissionGoalField.setText(\"\");\n carbonEmissionGoalField.setPromptText(\n \"NO GOAL WAS ENTERED. PLEASE ENTER A GOAL AS A DOUBLE.\");\n }\n }\n }", "DocumentData getPreviewReport(String documentId,\n String filename, String mimetype) throws IOException;", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tdoQuery();\n\t\t\t}", "public static void generateReport()\n\t{\n\t\tlong time=System.currentTimeMillis();\n\t\tString reportPath=System.getProperty(\"user.dir\")+\"//automationReport//Report\"+time+\".html\";\n\t\t\n\t\thtmlreporter=new ExtentHtmlReporter(reportPath);\n\t\textent=new ExtentReports();\n\t\textent.attachReporter(htmlreporter);\n\t\t\n\t\tString username=System.getProperty(\"user.name\");\n\t\tString osname=System.getProperty(\"os.name\");\n\t\tString browsername=CommonFunction.readPropertyFile(\"Browser\");\n\t\tString env=CommonFunction.readPropertyFile(\"Enviornment\");\n\t\t\n\t\t\n\t\textent.setSystemInfo(\"User Name\", username);\n\t\textent.setSystemInfo(\"OS Name\", osname);\n\t\textent.setSystemInfo(\"Browser Name\", browsername);\n\t\textent.setSystemInfo(\"Enviornment\", env);\n\t\t\n\t\t\n\t\thtmlreporter.config().setDocumentTitle(\"Automation Report\");\n\t\thtmlreporter.config().setTheme(Theme.STANDARD);\n\t\thtmlreporter.config().setChartVisibilityOnOpen(true);\n \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}", "boolean generateReport();", "public ActionForward LocomotorReport(ActionMapping mapping, ActionForm form,\r\n HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n\r\n String ur = \"/LocomotorReport.do?LocomotorReport=LocomotorReport\";\r\n request.setAttribute(\"ur\", ur);\r\n\r\n String target = \"success\";\r\n String subquery = null, columns = null;\r\n String districtId = null;\r\n String mandalId = null;\r\n String villageId = null;\r\n String rationcard = null, agee = null;\r\n DataSource ds = null;\r\n FunctionalReportDAO funDao = new FunctionalReportDAO();\r\n int cou = 1;\r\n String edu = null, em = null, ma = null, caste = null, religion = null, disability = null, gender = null, total = null, pmarige = null;\r\n FunctionalNeedReportForm functionalNeedForm = (FunctionalNeedReportForm) form;\r\n FunctionalNeedReportDAO dao = new FunctionalNeedReportDAO();\r\n ArrayList habitationlist = new ArrayList();\r\n try {\r\n String fdate = (String) request.getParameter(\"fromdate\");\r\n String tdate = (String) request.getParameter(\"todate\");\r\n functionalNeedForm.setFromdate(fdate);\r\n functionalNeedForm.setTodate(tdate);\r\n Iterator itr = null;\r\n ds = getDataSource(request);\r\n if (ds == null || \"null\".equals(ds)) {\r\n ds = JNDIDataSource.getConnection();\r\n }\r\n FunctionalNeedReportService functionalNeedService =\r\n FunctionalNeedServiceFactory.getFunctionalNeedServiceImpl();\r\n TerritoryService territoryService = TerritoryServiceFactory.getTerritoryServiceImpl();\r\n ArrayList ohWiseDetails = new ArrayList();\r\n ArrayList empWiseSingleDetails = new ArrayList();\r\n ArrayList districtList = new ArrayList();\r\n ArrayList mandallist = new ArrayList();\r\n ArrayList villagelist = new ArrayList();\r\n ReportDAO rdao = new ReportDAO();\r\n\r\n // Get District list\r\n\r\n districtList = territoryService.getDistricts(ds);\r\n if (districtList != null && districtList.size() > 0) {\r\n functionalNeedForm.setDistrictList(districtList);\r\n }\r\n\r\n if (request.getParameter(\"district_id\") != null && !request.getParameter(\"district_id\").equals(\"\")) {\r\n mandallist = functionalNeedService.getMandals(ds, request.getParameter(\"district_id\"), functionalNeedForm.getUrban_id());\r\n functionalNeedForm.setMandallist(mandallist);\r\n }\r\n if (request.getParameter(\"mandal_id\") != null && !request.getParameter(\"mandal_id\").equals(\"\")) {\r\n habitationlist = functionalNeedService.getVillageAll(ds, request.getParameter(\"district_id\"), request.getParameter(\"mandal_id\"));\r\n functionalNeedForm.setVillagelist(habitationlist);\r\n }\r\n if (request.getParameter(\"district_id\") == null) {\r\n districtId = \"0\";\r\n } else {\r\n districtId = request.getParameter(\"district_id\");\r\n }\r\n if (request.getParameter(\"mandal_id\") == null) {\r\n mandalId = \"0\";\r\n } else {\r\n mandalId = request.getParameter(\"mandal_id\");\r\n }\r\n if (request.getParameter(\"village_id\") == null) {\r\n villageId = \"0\";\r\n } else {\r\n villageId = request.getParameter(\"village_id\");\r\n }\r\n if (\"getDetails\".equalsIgnoreCase(request.getParameter(\"mode\"))) {\r\n\r\n String name = dao.getDistMandVilHabname(ds, districtId, mandalId, villageId, \"0\");\r\n request.setAttribute(\"names\", name);\r\n // ohWiseDetails=rdao.getVisiualDisabilityCount(ds, districtId, mandalId, villageId,fdate,tdate);\r\n ohWiseDetails = funDao.getDisabilityCount(ds, districtId, mandalId, villageId, fdate, tdate, \"1\");\r\n if (ohWiseDetails.size() == 0) {\r\n request.setAttribute(\"msg\", \"No Data Found\");\r\n } else {\r\n\r\n request.setAttribute(\"ohWiseDetails\", ohWiseDetails);\r\n }\r\n\r\n } else if (\"getempWiseReport\".equalsIgnoreCase(request.getParameter(\"status\"))) {\r\n String dist = null;\r\n String mandal = null;\r\n String village = null;\r\n String vi = request.getParameter(\"villagesId\");\r\n if (request.getParameter(\"districtId\") == null) {\r\n dist = \"0\";\r\n } else {\r\n dist = request.getParameter(\"districtId\");\r\n }\r\n if (request.getParameter(\"mandalId\") == null) {\r\n mandal = \"0\";\r\n } else {\r\n mandal = request.getParameter(\"mandalId\");\r\n }\r\n if (!mandal.equals(\"0\") && !dist.equals(\"0\")) {\r\n if (request.getParameter(\"villagesId\") == null) {\r\n village = \"0\";\r\n } else {\r\n village = request.getParameter(\"villagesId\");\r\n }\r\n } else {\r\n village = \"0\";\r\n }\r\n\r\n String name = dao.getDistMandVilHabname(ds, dist, mandal, village, \"0\");\r\n request.setAttribute(\"names\", name);\r\n // ohWiseDetails=rdao.getVisiualDisabilityCount(ds, dist, mandal, village,fdate,tdate);\r\n ohWiseDetails = funDao.getDisabilityCount(ds, dist, mandal, village, fdate, tdate, \"1\");\r\n if (ohWiseDetails.size() == 0) {\r\n\r\n request.setAttribute(\"msg\", \"No Data Found\");\r\n\r\n } else {\r\n request.setAttribute(\"ohWiseDetails\", ohWiseDetails);\r\n\r\n }\r\n target = \"excel\";\r\n\r\n } else if (\"getempWiseReportPrint\".equalsIgnoreCase(request.getParameter(\"status\"))) {\r\n String dist = null;\r\n String mandal = null;\r\n String village = null;\r\n String cast = null;\r\n String hab = null;\r\n if (request.getParameter(\"hid\") == null) {\r\n hab = \"0\";\r\n } else {\r\n hab = request.getParameter(\"hid\");\r\n }\r\n\r\n if (request.getParameter(\"districtId\") == null) {\r\n dist = \"0\";\r\n } else {\r\n dist = request.getParameter(\"districtId\");\r\n }\r\n if (request.getParameter(\"mandalId\") == null) {\r\n mandal = \"0\";\r\n } else {\r\n mandal = request.getParameter(\"mandalId\");\r\n }\r\n if (!mandal.equals(\"0\") && !dist.equals(\"0\")) {\r\n if (request.getParameter(\"villagesId\") == null) {\r\n village = \"0\";\r\n } else {\r\n village = request.getParameter(\"villagesId\");\r\n }\r\n } else {\r\n village = \"0\";\r\n }\r\n String name = dao.getDistMandVilHabname(ds, dist, mandal, village, \"0\");\r\n request.setAttribute(\"names\", name);\r\n ohWiseDetails = funDao.getDisabilityCount(ds, dist, mandal, village, fdate, tdate, \"1\");\r\n // ohWiseDetails=rdao.getVisiualDisabilityCount(ds, dist, mandal, village,fdate,tdate);\r\n if (ohWiseDetails.size() == 0) {\r\n request.setAttribute(\"msg\", \"No Data Found\");\r\n } else {\r\n request.setAttribute(\"ohWiseDetails\", ohWiseDetails);\r\n }\r\n target = \"print\";\r\n } else if (\"getDetails\".equalsIgnoreCase(request.getParameter(\"details\"))) {\r\n String dist = null;\r\n String mandal = null;\r\n String village = null;\r\n String refId = null;\r\n if (request.getParameter(\"dID\") == null) {\r\n dist = \"0\";\r\n } else {\r\n dist = request.getParameter(\"dID\");\r\n }\r\n if (request.getParameter(\"mID\") == null || request.getParameter(\"mID\") == \"\") {\r\n mandal = \"0\";\r\n } else {\r\n mandal = request.getParameter(\"mID\");\r\n }\r\n if (!mandal.equals(\"0\") && !dist.equals(\"0\")) {\r\n if (request.getParameter(\"vID\") == null || request.getParameter(\"vID\") == \"\") {\r\n village = \"0\";\r\n } else {\r\n village = request.getParameter(\"vID\");\r\n }\r\n } else {\r\n village = \"0\";\r\n }\r\n\r\n String hab = null;\r\n if (request.getParameter(\"hid\") == null || request.getParameter(\"hid\") == \"\") {\r\n hab = \"0\";\r\n } else {\r\n hab = request.getParameter(\"hid\");\r\n }\r\n String name = dao.getDistMandVilHabname(ds, dist, mandal, village, \"0\");\r\n request.setAttribute(\"names\", name);\r\n subquery = (String) request.getParameter(\"tablee\");\r\n columns = (String) request.getParameter(\"colu\");\r\n String selectmethod = request.getParameter(\"query\");\r\n String co = columns, type = null;\r\n type = (String) request.getParameter(\"type\");\r\n request.setAttribute(\"type\", type);\r\n co = co.replace(\"'\", \"%27\");\r\n co = co.replace(\"(\", \"%28\");\r\n co = co.replace(\")\", \"%29\");\r\n co = co.replace(\"+\", \"%2B\");\r\n co = co.replace(\",\", \"%2C\");\r\n//co=co.replace(\"%\", \"%25\");\r\n co = co.replace(\"%%\", \"%25%\");\r\n request.setAttribute(\"tablee\", subquery);\r\n request.setAttribute(\"colu\", co);\r\n request.setAttribute(\"query\", selectmethod);\r\n if (selectmethod != null && selectmethod.equalsIgnoreCase(\"query\")) {\r\n ohWiseDetails = dao.getPersonalDetailsAllQuery(ds, dist, mandal, village, hab, fdate, tdate, \"1\", subquery, columns);\r\n } else {\r\n ohWiseDetails = dao.getPersonalDetailsAll(ds, dist, mandal, village, hab, fdate, tdate, \"1\", subquery, columns);\r\n }\r\n request.setAttribute(\"ohWiseDetails\", ohWiseDetails);\r\n if (ohWiseDetails.size() == 0) {\r\n request.setAttribute(\"msg\", \"No Data \");\r\n }\r\n target = \"personal\";\r\n } else if (\"getempDetailsAction\".equalsIgnoreCase(request.getParameter(\"empStatus\"))) {\r\n String dist = null;\r\n String mandal = null;\r\n String village = null;\r\n String refId = null;\r\n if (request.getParameter(\"dID\") == null) {\r\n dist = \"0\";\r\n } else {\r\n dist = request.getParameter(\"dID\");\r\n }\r\n if (request.getParameter(\"mID\") == null || request.getParameter(\"mID\") == \"\") {\r\n mandal = \"0\";\r\n } else {\r\n mandal = request.getParameter(\"mID\");\r\n }\r\n if (!mandal.equals(\"0\") && !dist.equals(\"0\")) {\r\n if (request.getParameter(\"vID\") == null || request.getParameter(\"vID\") == \"\") {\r\n village = \"0\";\r\n } else {\r\n village = request.getParameter(\"vID\");\r\n }\r\n } else {\r\n village = \"0\";\r\n }\r\n\r\n String hab = null;\r\n if (request.getParameter(\"hid\") == null || request.getParameter(\"hid\") == \"\") {\r\n hab = \"0\";\r\n } else {\r\n hab = request.getParameter(\"hid\");\r\n }\r\n String name = dao.getDistMandVilHabname(ds, dist, mandal, village, \"0\");\r\n request.setAttribute(\"names\", name);\r\n subquery = (String) request.getParameter(\"tablee\");\r\n columns = (String) request.getParameter(\"colu\");\r\n String selectmethod = request.getParameter(\"query\");\r\n if (selectmethod != null && selectmethod.equalsIgnoreCase(\"query\")) {\r\n ohWiseDetails = dao.getPersonalDetailsAllQuery(ds, dist, mandal, village, hab, fdate, tdate, \"1\", subquery, columns);\r\n } else {\r\n\r\n ohWiseDetails = dao.getPersonalDetailsAll(ds, dist, mandal, village, hab, fdate, tdate, \"1\", subquery, columns);\r\n }\r\n request.setAttribute(\"ohWiseDetails\", ohWiseDetails);\r\n target = \"EmpWisePersonalDetailsExcel\";\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return mapping.findForward(target);\r\n }", "Report createReport();", "public QueryController(String[] args){\n // Parse Args\n QueryArgs queryArgs = new QueryArgs();\n try {\n queryArgs.parseArgs(args);\n } catch (FileNotFoundException e) {\n //e.printStackTrace();\n System.err.println(\"Invalid Arguments received. Please check your arguments passed to ./search\");\n return;\n }\n\n // Run the Term Normaliser\n TermNormalizer normalizer = new TermNormalizer();\n String[] queryTerms = normalizer.transformedStringToTerms(queryArgs.queryString);\n\n //create the model\n Model model = new Model();\n model.loadCollectionFromMap(queryArgs.mapPath);\n model.loadLexicon(queryArgs.lexiconPath);\n model.loadInvertedList(queryArgs.invlistPath);\n if(queryArgs.stopListEnabled)\n {\n model.loadStopList(queryArgs.stopListPath);\n }\n if(queryArgs.printSummary && queryArgs.collectionPath != \"\")\n {\n model.setPathToCollection(queryArgs.collectionPath);\n }\n\n\n //fetch the top results from the query module\n QueryModule queryModule = new QueryModule();\n queryModule.doQuery(queryTerms, model, queryArgs.bm25Enabled);\n List<QueryResult> topResults = queryModule.getTopResult(queryArgs.maxResults);\n\n\n\n ResultsView resultsView = new ResultsView();\n if(queryArgs.printSummary)\n {\n\n DocSummary docSummary = new DocSummary();\n for(QueryResult result:topResults)\n {\n // retrieve the actualy text from the document collection\n result.setDoc(model.getDocumentCollection().getDocumentByIndex(result.getDoc().getIndex(), true));\n\n //set the summary on the result object by fetching it from the docSummary object\n result.setSummaryNQB(docSummary.getNonQueryBiasedSummary(result.getDoc(), model.getStopListModule()));\n result.setSummaryQB(docSummary.getQueryBiasedSummary(result.getDoc(), model.getStopListModule(), Arrays.asList(queryTerms)));\n }\n resultsView.printResultsWithSummary(topResults,queryArgs.queryLabel);\n }else\n {\n resultsView.printResults(topResults,queryArgs.queryLabel);\n }\n\n }", "public String OnSubmit() {\n\t\tFacesContext context = FacesContext.getCurrentInstance();\r\n\t\tUser user1 = context.getApplication().evaluateExpressionGet(context, \"#{user}\", User.class);\r\n\t\t\r\n\t\t// test purposes, log results to console\r\n\t\tSystem.out.println(\"First Name is: \" + user1.getFirstName());\r\n\t\tSystem.out.println(\"Last Name: \" + user1.getLastName());\r\n\t\t\r\n\t\t// prints message to console to tell us which business service selected in beans.xml\r\n\t\tservice.test();\r\n\t\t\r\n\t\t// start timer when log is clicked\r\n\t\t\r\n\t\ttimer.setTimer(5000);\r\n\t\t\r\n\t\t// put user back in context\r\n\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"user\", user1);\r\n\t\t\r\n\t\t// show next page\r\n\t\treturn \"Response.xhtml\";\r\n\t}", "public void createTemplate(ReportContent reportContent, String fileName) {\n\n ArrayList<Detail> detailList = reportContent.getDetails();\n\n // create Test Data\n HashMap<String, Object> parameter = createBasicParameters(reportContent);\n\n // read and modify file\n \n \n File file = Main_Gui.openFile(\"report_template.jrxml\", \"report template\", \".jrxml\");\n\n try {\n // define namespace of the jrxml-file and document\n Namespace ns = Namespace\n .getNamespace(\"http://jasperreports.sourceforge.net/jasperreports\");\n Document doc = new SAXBuilder(false).build(file);\n\n // set Color of the result conistency ratio (red, if Cr is higher than\n // the critical CR --> else: black)\n @SuppressWarnings(\"unchecked\")\n List<Element> list = doc.getRootElement().getChild(\"detail\", ns)\n .getChild(\"band\", ns).getChildren();\n\n \n for (Element element : list) {\n\n if (element.getName().equals(\"textField\")\n && element.getChild(\"textFieldExpression\", ns)\n .getText()\n .equals(\"$P{RESULT_CONSISTENCY_RATIO}\")) {\n\n setConsistencyRatioColor(\n reportContent.getResultConsistencyRatio(), element,\n ns);\n }\n }\n\n // addDetail band(s)\n for (Detail detail : detailList) {\n this.addDetailFrame(doc, ns, parameter, detail);\n\n }\n\n // remove detail pattern band (last band under \"detail\" in \"report_template.jrxml\")\n doc.getRootElement().getChild(\"detail\", ns).getChildren().remove(4);\n\n // create output of the modified template \n XMLOutputter out = new XMLOutputter();\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n out.output(doc, baos);\n\n ByteArrayInputStream bais = new ByteArrayInputStream(\n baos.toByteArray());\n\n // -----------\n // --JASPER\n // ----------\n \n // compile, fill and export the report as PDF-file to the given path\n JasperReport jasperReport = JasperCompileManager\n .compileReport(bais);\n\n JasperPrint jasperPrint = JasperFillManager.fillReport(\n jasperReport, parameter,\n new net.sf.jasperreports.engine.JREmptyDataSource(1));\n\n JasperExportManager.exportReportToPdfFile(jasperPrint, fileName);\n\n } catch (JRException e) {\n // print out standard exception\n e.printStackTrace();\n } catch (JDOMException e1) {\n // print out standard exception\n e1.printStackTrace();\n } catch (IOException e1) {\n // print out standard exception\n \n //!!NOT YET IMPLEMENTED!!:\n //show user dialog, if file which shall be overwritten is still opened.\n \n e1.printStackTrace();\n }\n\n }", "public int doStartTag() throws JspException \n\t{\n\t\twrite(MessageFormat.format(FORM_START, new Object[] { getActionAddress() }));\n\t\twrite(MessageFormat.format(HIDDEN, new Object[] { ACTION_ID_PARAMETER, getActionID() }));\n\t\twrite(MessageFormat.format(HIDDEN, new Object[] { FINISHED_ADDRESS_PARAMETER, getFinalReturnAddress() }));\n\t\twrite(MessageFormat.format(HIDDEN, new Object[] { WORKFLOW_ID_PARAMETER, getWorkflowID() }));\n\t\treturn EVAL_BODY_INCLUDE;\n\t}", "CampusSearchQuery generateQuery();", "public String f9payBill() throws Exception {\r\n\t\t/**\r\n\t\t * BUILD COMPLETE QUERY (ALONG WITH PARAMETERS) WHICH GIVES THE DESIRED\r\n\t\t * OUTPUT ALONG WITH PROFILES\r\n\t\t */\r\n\t\tString query = \" SELECT DISTINCT PAYBILL_GROUP,PAYBILL_ID FROM HRMS_PAYBILL \"\r\n\t\t\t\t\t\t+\" LEFT JOIN HRMS_EMP_OFFC ON (EMP_PAYBILL=PAYBILL_ID) \";\r\n\t\t\r\n\t\tquery += getprofilePaybillQuery(tabRec);\r\n\t\t/**\r\n\t\t * SET THE HEADER NAMES OF TABLE WHICH IS DISPLAYED IN POP-UP WINDOW. *\r\n\t\t */\r\n\t\tString[] headers = { \"PAY BILL NAME\",\"PAY BILL NO\" };\r\n\r\n\t\t/**\r\n\t\t * DEFINE THE PERCENT WIDTH OF EACH COLUMN\r\n\t\t */\r\n\t\tString[] headerWidth = { \"80\",\"20\" };\r\n\t\t/**\r\n\t\t * -SET THE FIELDNAMES INTO WHICH THE VALUES ARE BEING POPULATED AFTER A\r\n\t\t * ROW IS SELECTED. -USEFULL IN CASES WHERE SUBMIT FLAG IS 'false'\r\n\t\t * -PARENT FORM WILL SHOW THE VALUES IN THE FILDS CORRSPONDING TO COLUMN\r\n\t\t * INDEX. NOTE: LENGHT OF COLUMN INDEX MUST BE SAME AS THE LENGTH OF\r\n\t\t * FIELDNAMES\r\n\t\t */\r\n\r\n\t\tString[] fieldNames = { \"tabRec.payBillNo\",\"tabRec.payBillNo\"};\r\n\r\n\t\t/**\r\n\t\t * SET THE COLUMN INDEX E.G. SUPPOSE THE POP-UP SHOWS 4 COLUMNS, BUT ON\r\n\t\t * CLICKING A ROW ONLY SECOND AND FORTH COLUMN VALUES NEED TO BE SHOWN\r\n\t\t * IN THE PARENT WINDOW FIELDS THEN THE COLUMN INDEX CAN BE {1,3}\r\n\t\t * \r\n\t\t * NOTE: COLUMN NUMBERS STARTS WITH 0\r\n\t\t * \r\n\t\t */\r\n\t\tint[] columnIndex = { 0,1 };\r\n\r\n\t\t/**\r\n\t\t * WHEN SET TO 'true' WILL SUBMIT THE FORM\r\n\t\t * \r\n\t\t */\r\n\t\tString submitFlag = \"false\";\r\n\r\n\t\t/**\r\n\t\t * IF THE 'submitFlag' IS 'true' , THE FORM WILL SUBMIT AND CALL\r\n\t\t * FOLLOWING METHOD IN THE ACTION * NAMING CONVENSTION: <NAME OF\r\n\t\t * ACTION>_<METHOD TO CALL>.action\r\n\t\t */\r\n\t\tString submitToMethod = \"\";\r\n\r\n\t\t/**\r\n\t\t * CALL THIS METHOD AFTER ALL PARAMETERS ARE DEFINED *\r\n\t\t */\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\t\t\r\n\t\treturn \"f9page\";\r\n\t}", "private void todayReport() {\n\t\tListSeries dollarEarning = new ListSeries();\n\t\tString[] dates = new String[1];\n\t\t/* Create a DateField with the default style. */\n Calendar calendar=Calendar.getInstance();\n\t\t\n\t\tvReportDisplayLayout.removeAllComponents();\n\t\tdates[0] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\tdollarEarning = getTodayData();\n\t\t\n\t\tdisplayChart chart = new displayChart();\n\t\t\n\t\tdReportPanel.setContent(chart.getDisplayChart(dates, dollarEarning));\n\t\tvReportDisplayLayout.addComponent(dReportPanel);\n\t}", "public void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tisButtonClick = true;\r\n\t\t\t\t\tpageSize = 0;\r\n\t\t\t\t\tcurrentPage = 1;\r\n\t\t\t\t\tgetQx();\r\n\t\t\t\t}", "@Override\n public Object build() {\n return AggregationBuilders.filter(this.getName(),\n (org.opensearch.index.query.QueryBuilder)this.queryBuilder.seekRoot().query().filtered().filter().getCurrent().build());\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n ExecuteReport = new javax.swing.JButton();\n txtParameter = new javax.swing.JTextField();\n SendParameter = new javax.swing.JButton();\n ExecuteQuery = new javax.swing.JButton();\n txtName = new javax.swing.JTextField();\n SendParameterToQuery = new javax.swing.JButton();\n ExecuteBarChartReport = new javax.swing.JButton();\n fecha1 = new com.toedter.calendar.JDateChooser();\n fecha2 = new com.toedter.calendar.JDateChooser();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n EnviarFecha = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n ExecuteReport.setText(\"Execute Report\");\n ExecuteReport.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ExecuteReportActionPerformed(evt);\n }\n });\n\n SendParameter.setText(\"Send Parameter\");\n SendParameter.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SendParameterActionPerformed(evt);\n }\n });\n\n ExecuteQuery.setText(\"Execute Query\");\n ExecuteQuery.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ExecuteQueryActionPerformed(evt);\n }\n });\n\n txtName.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNameActionPerformed(evt);\n }\n });\n\n SendParameterToQuery.setText(\"Send Parameter to Query\");\n SendParameterToQuery.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n SendParameterToQueryActionPerformed(evt);\n }\n });\n\n ExecuteBarChartReport.setText(\"Execute BarChartReport\");\n ExecuteBarChartReport.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n ExecuteBarChartReportActionPerformed(evt);\n }\n });\n\n jLabel1.setText(\"Fecha de Inicio:\");\n\n jLabel2.setText(\"Fecha de Termino:\");\n\n EnviarFecha.setText(\"Enviar\");\n EnviarFecha.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n EnviarFechaActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(101, 101, 101)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(ExecuteBarChartReport)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(SendParameterToQuery, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtName)\n .addComponent(ExecuteQuery, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(SendParameter, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(txtParameter)\n .addComponent(ExecuteReport, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(81, 81, 81)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(EnviarFecha)\n .addComponent(jLabel1)\n .addComponent(jLabel2)))\n .addGroup(layout.createSequentialGroup()\n .addGap(56, 56, 56)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(fecha2, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(fecha1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(93, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(ExecuteReport)\n .addComponent(jLabel1))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtParameter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(fecha1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(SendParameter)\n .addGap(18, 18, 18))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addGap(7, 7, 7)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(ExecuteQuery)\n .addComponent(fecha2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(EnviarFecha)\n .addGap(1, 1, 1)\n .addComponent(SendParameterToQuery)\n .addGap(18, 18, 18)\n .addComponent(ExecuteBarChartReport)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "public String generarReporte (HttpServletRequest request,\n HttpServletResponse response) throws IOException {\n Empresa empresaSesion = (Empresa)request.getSession().getAttribute(\"emp\");\n String simbolo_moneda;\n \n if (empresaSesion != null && empresaSesion.getSimboloMoneda() != null && \n !empresaSesion.getSimboloMoneda().isEmpty()) {\n simbolo_moneda = empresaSesion.getSimboloMoneda();\n } else {\n simbolo_moneda = \"$\";\n }\n \n // Se restauran variables iniciadas\n ReporteUtil.restaurarValores();\n \n String tipoReporte = request.getParameter(\"tipoReporte\");\n String fechaInicio = request.getParameter(\"fechaInicio\");\n String fechaFinal = request.getParameter(\"fechaFinal\");\n String placa = request.getParameter(\"splaca\"); // id,placa,numInterno\n String mplaca = request.getParameter(\"smplaca_v\");\n String esteDia = request.getParameter(\"esteDia\");\n String tipoArchivo = request.getParameter(\"tipoArchivo\");\n String ruta = request.getParameter(\"sruta\");\n String mruta = request.getParameter(\"smruta_v\");\n String malarma = request.getParameter(\"smalarma_v\");\n String base = request.getParameter(\"sbase\");\n String idLiquidador = request.getParameter(\"sliquidador\");\n String meta = request.getParameter(\"smeta\");\n String mconductor = request.getParameter(\"smconductor_v\"); \n \n boolean dia_actual = verificarDiaActual(fechaInicio, fechaFinal);\n \n// Etiquetas etiquetas = null;\n// etiquetas = LiquidacionBD.searchTags();\n ConfiguracionLiquidacion etiquetas = obtenerEtiquetasLiquidacionPerfil(request);\n \n if (etiquetas != null) {\n ReporteUtil.establecerEtiquetas(etiquetas);\n } \n \n //String reportesPath = \"D:\\\\rdw\\\\\"; \n \n // En caso de estar sobre un SO_WIN, se quita ultimo delimitador\n String reportesPath = getServletContext().getRealPath(\"\");\n if (reportesPath.endsWith(\"\\\\\")) {\n reportesPath = reportesPath.substring(0, reportesPath.length()-1); \n }\n \n Map<String,String> h = new HashMap<String,String>();\n \n h.put(\"tipoReporte\", tipoReporte);\n h.put(\"fechaInicio\", fechaInicio);\n h.put(\"fechaFinal\", fechaFinal); \n h.put(\"tipoArchivo\", tipoArchivo);\n h.put(\"path\", reportesPath); \n \n \n // Informacion de usuario en sesion\n HttpSession session = request.getSession(); \n Usuario u = (Usuario) session.getAttribute(\"login\");\n \n h.put(\"idUsuario\", \"\" + u.getId());\n h.put(\"nombreUsuario\", u.getNombre() +\" \"+ u.getApellido());\n h.put(\"usuarioPropietario\", (u.esPropietario()) ? \"1\" : \"0\");\n \n // Nombre y titulo del reporte\n String nt[] = nombreReporte(tipoReporte, dia_actual).split(\":\");\n \n // Verifica si se considera una o todas las rutas\n // para reportes nivel_ocupacion, despachador, descripcion ruta,\n // cumplimiento ruta por conductor\n int ntp = Integer.parseInt(tipoReporte);\n if (ntp == 5 || ntp == 14 || ntp == 16) {\n if (!ruta.equals(\"0\")) { // Se elige una ruta\n nt[0] += \"_X1Ruta\";\n h.put(\"unaRuta\", \"t\");\n } else {\n h.put(\"unaRuta\", \"f\");\n }\n } \n if (ntp == 25) {\n String una_ruta = (!ruta.equals(\"0\")) ? \"t\" : \"f\";\n h.put(\"unaRuta\", una_ruta);\n }\n \n h.put(\"nombreReporte\", nt[0]);\n h.put(\"tituloReporte\", nt[1]);\n \n // Verifica si es reporte gerencia, gerencia x vehiculo para incluir\n // todos los vehiculos o todas las rutas\n ReporteUtil.incluirTotalidadRutas = false;\n ReporteUtil.incluirTotalidadVehiculos = false;\n ReporteUtil.incluirVehiculosPropietario = false;\n \n if (ntp == 15) {\n ReporteUtil.incluirTotalidadVehiculos = true; \n } else if (ntp == 18) {\n ReporteUtil.incluirTotalidadRutas = true;\n } else if (ntp == 11) {\n if (u.esPropietario()) { \n ReporteUtil.incluirVehiculosPropietario = true;\n } else {\n ReporteUtil.incluirTotalidadVehiculos = true; \n }\n }\n \n // Verifica si es reporte ruta x vehiculo para generar\n // reporte desde codigo\n if (ntp == 3) { \n ReporteUtil.desdeCodigo = true;\n } else {\n ReporteUtil.desdeCodigo = false;\n }\n \n // Verifica si es reporte ruta x vehiculo, vehiculo x ruta, despachador\n // para establecer un dia en parametro fecha y no un rango\n if (ntp == 3 || ntp == 11 || ntp == 16) {\n h.put(\"fechaFinal\", fechaInicio);\n } \n \n // No se necesitan fechas para reporte estadistico y descripcion ruta\n if (ntp == 13 || ntp == 14) {\n h.put(\"fechaInicio\", \"\");\n h.put(\"fechaFinal\", \"\");\n }\n \n // Eleccion de reportes gerencia segun empresa\n if (ntp == 15 || ntp == 18) {\n String empresa = u.getNombreEmpresa();\n String nombre_reporte = h.get(\"nombreReporte\");\n if (ReporteUtil.esEmpresa(empresa, ReporteUtil.EMPRESA_FUSACATAN)) {\n nombre_reporte += \"Fusa\";\n h.put(\"nombreReporte\", nombre_reporte);\n } \n }\n \n // Reportes de liquidacion\n if (ntp == 19 || ntp == 20 || ntp == 21 || ntp == 22) { \n h.put(\"fechaInicio\", fechaInicio + \" 00:00:00\");\n h.put(\"fechaFinal\", fechaFinal + \" 23:59:59\");\n \n //System.out.println(\"---> \"+EtiquetasLiquidacion.getEtq_total1() );\n /*SI EL REPORTE ES LIQUIDACION POR LIQUIDADOR SE MODIFICA EL NOMBRE SI LA EMPRESA ES DIFERENTE DE NEIVA*/\n if (ntp == 21) {\n if ((u.getNombreEmpresa().equalsIgnoreCase(\"FUSACATAN\")) || \n (u.getNombreEmpresa().equalsIgnoreCase(\"TIERRA GRATA\")) || \n (u.getNombreEmpresa().equalsIgnoreCase(\"Tierragrata\"))) {\n h.put(\"nombreReporte\", \"Reporte_LiquidacionXLiquidador_new_dcto\"); \n }\n }\n \n if (tipoArchivo.equals(\"w\")) {\n Usuario liquidador = UsuarioBD.getById(Restriction.getNumber(idLiquidador));\n if (liquidador != null) { \n String nom = liquidador.getNombre();\n String ape = liquidador.getApellido(); \n h.put(\"idUsuarioLiquidador\", idLiquidador);\n h.put(\"nombresUsuarioLiquidador\", ape + \" \" + nom);\n }\n } else {\n h.put(\"idUsuario\", idLiquidador);\n }\n } \n \n if (ntp == 23 || ntp == 24 || ntp == 25) {\n h.put(\"meta\", \"\" + meta);\n if (tipoArchivo.equals(\"r\")) {\n ReporteUtil.reporteWeb = true;\n }\n }\n \n if (ntp == 26 || ntp == 27) {\n h.put(\"fechaInicio\", fechaInicio);\n h.put(\"fechaFinal\", fechaFinal);\n ReporteUtil.reporteWeb = true;\n } \n \n // ======================= Verificacion de campos ======================\n \n // Id, placa, numeroInterno vehiculo\n if (placa.indexOf(\",\") >= 0) {\n h.put(\"idVehiculo\", placa.split(\",\")[0]);\n h.put(\"placa\", placa.split(\",\")[1]);\n h.put(\"numInterno\", placa.split(\",\")[2]);\n h.put(\"capacidad\", placa.split(\",\")[3]);\n ReporteUtil.incluirVehiculo = true;\n } else\n ReporteUtil.incluirVehiculo = false;\n \n // Id de multiples vehiculos\n if (mplaca != \"\" || mplaca.indexOf(\",\") >= 0) {\n h.put(\"strVehiculos\", mplaca);\n h.put(\"strVehiculosPlaca\", id2placa(mplaca));\n ReporteUtil.incluirVehiculos = true;\n } else\n ReporteUtil.incluirVehiculos = false;\n \n // Id ruta y nombre ruta\n if (ruta.indexOf(\",\") >= 0) {\n String arrayRuta[] = ruta.split(\",\");\n h.put(\"idRuta\", arrayRuta[0]);\n h.put(\"nombreRuta\", arrayRuta[1]);\n ReporteUtil.incluirRuta = true;\n } else \n ReporteUtil.incluirRuta = false;\n \n // Id ruta \n if (mruta != \"\" || mruta.indexOf(\",\") >= 0) {\n h.put(\"strRutas\", mruta);\n ReporteUtil.incluirRutas = true;\n } else\n ReporteUtil.incluirRutas = false;\n \n // Id alarma\n if (malarma != \"\" || malarma.indexOf(\",\") >= 0) {\n h.put(\"strAlarmas\", malarma);\n ReporteUtil.incluirAlarma = true;\n } else \n ReporteUtil.incluirAlarma = false; \n \n // Id base, nombre\n if (base.indexOf(\",\") >= 0) {\n String arrayBase[] = base.split(\",\");\n h.put(\"idBase\", arrayBase[0]);\n h.put(\"nombreBase\", arrayBase[1]);\n ReporteUtil.incluirBase = true;\n } else \n ReporteUtil.incluirBase = false; \n \n // Se verifica y establece parametros de empresa\n Empresa emp = EmpresaBD.getById(u.getIdempresa()); \n if (emp != null) {\n h.put(\"nombreEmpresa\", emp.getNombre());\n h.put(\"nitEmpresa\", emp.getNit());\n h.put(\"idEmpresa\", \"\" + emp.getId());\n } else {\n request.setAttribute(\"msg\", \"* Usuario no tiene relaci&oacute;n y/o permisos adecuados con la empresa.\");\n request.setAttribute(\"msgType\", \"alert alert-warning\");\n return \"/app/reportes/generaReporte.jsp\";\n }\n \n int id_ruta = Restriction.getNumber(h.get(\"idRuta\")); \n String pplaca = \"'\" + h.get(\"placa\") + \"'\";\n \n // Se verifica si existe despacho para cruzar sus datos,\n // en caso contrario se extrae los datos unicamente desde tabla info. registradora\n if (ntp == 3) {\n if (!DespachoBD.existe_planilla_en(fechaInicio, pplaca)) {\n ReporteUtil.desdeCodigo = true; \n h.put(\"nombreReporte\", \"reporte_RutaXVehiculo2\");\n h.put(\"cruzarDespacho\", \"0\"); \n } else {\n ReporteUtil.desdeCodigo = false; // Reporte con cruce despacho es dinamico\n h.put(\"cruzarDespacho\", \"1\"); \n }\n }\n if (ntp == 11) {\n if (!DespachoBD.existe_planilla_en(fechaInicio, id_ruta)) {\n h.put(\"nombreReporte\", \"reporte_VehiculosXRuta\");\n h.put(\"cruzarDespacho\", \"0\"); \n } else {\n h.put(\"cruzarDespacho\", \"1\");\n }\n }\n \n if (ntp == 30) {\n h.put(\"fechaInicio\", fechaInicio);\n h.put(\"fechaFinal\", fechaFinal);\n h.put(\"strConductores\", mconductor);\n ReporteUtil.reporteWeb = true;\n \n // Se verifica que exista una configuracion de desempeno activa\n ConfCalificacionConductor ccc = CalificacionConductorBD.confCalificacionConductor();\n if (ccc == null) {\n request.setAttribute(\"msg\", \"* No existe ninguna configuraci&oacute;n de desempe&ntilde;o registrada. Por favor registre una.\");\n request.setAttribute(\"msgType\", \"alert alert-warning\");\n request.setAttribute(\"result_error\", \"1\");\n return \"/app/reportes/generaReporte.jsp\";\n }\n }\n \n // Creacion de reporte\n JasperPrint print = null;\n if (tipoArchivo.equals(\"r\")) {\n \n // Reporte de solo lectura << PDF / Web >>\n ReporteUtil rpt;\n \n if (ReporteUtil.reporteWeb) { \n ReporteWeb rptw = new ReporteWeb(h, request, response);\n return rptw.generarReporteWeb(ntp); \n \n } else if (ReporteUtil.desdeCodigo) {\n rpt = new ReporteUtil(h);\n print = rpt.generarReporteDesdeCodigo(Integer.parseInt(h.get(\"tipoReporte\")), simbolo_moneda);\n \n } else {\n rpt = new ReporteUtil(h);\n print = rpt.generarReporte(simbolo_moneda);\n }\n \n } else {\n \n // Reporte editable << XLS >>\n ReporteUtilExcel rue = new ReporteUtilExcel();\n MakeExcel rpte = rue.crearReporte(ntp, dia_actual, h, u, etiquetas);\n \n // Restablece placa de reportes que no necesitan\n restablecerParametro(\"placa\", ntp, h);\n String splaca = h.get(\"placa\");\n splaca = (splaca == null || splaca == \"\") ? \"\" : \"_\" + splaca;\n String nombreArchivo = h.get(\"nombreReporte\") + splaca + \".xls\";\n \n //response.setContentType(\"application/vnd.ms-excel\");\n response.setContentType(\"application/ms-excel\"); \n response.setHeader(\"Content-Disposition\", \"attachment; filename=\"+nombreArchivo);\n \n HSSFWorkbook file = rpte.getExcelFile();\n file.write(response.getOutputStream()); \n response.flushBuffer();\n response.getOutputStream().close();\n \n return \"/app/reportes/generaReporte.jsp\";\n }\n \n // Impresion de reporte de solo lectura PDF\n if (print != null) {\n \n try { \n // Se comprueba existencia de datos en el reporte obtenido\n boolean hayDatos = true;\n List<JRPrintPage> pp = print.getPages(); \n if (pp.size() > 0) {\n JRPrintPage ppp = pp.get(0);\n if (ppp.getElements().size() <= 0) \n hayDatos = false; \n } else \n hayDatos = false;\n \n if (!hayDatos) {\n request.setAttribute(\"msg\", \"* Ning&uacute;n dato obtenido en el reporte.\");\n request.setAttribute(\"msgType\", \"alert alert-warning\");\n request.setAttribute(\"data_reporte\", \"1\");\n return \"/app/reportes/generaReporte.jsp\";\n }\n \n byte[] bytes = JasperExportManager.exportReportToPdf(print);\n \n // Inicia descarga del reporte\n response.setContentType(\"application/pdf\");\n response.setContentLength(bytes.length);\n ServletOutputStream outStream = response.getOutputStream();\n outStream.write(bytes, 0, bytes.length);\n outStream.flush();\n outStream.close();\n \n } catch (JRException e) {\n System.err.println(e);\n } catch (IOException e) {\n System.err.println(e);\n } \n }\n return \"/app/reportes/generaReporte.jsp\";\n }", "public void actionPerformed(final ActionEvent e) {\n\t\t//dynmanic graph modification\n\t\tif (e.getActionCommand().equals(\"show\")) {\n\n\t\t\t//clear the datatsets I have to put a new fresh one \n\t\t\t// set infinite to false in order to let my button be released\n\t\t\tinfinite=false;\n\t\t\tseriesAvg.clear();\n\t\t\tseries99.clear();\n\t\t\tseries95.clear();\n\n\t\t\t//getting the entred values\n\t\t\tactionString = actionsListDynamic.getSelectedItem().toString();\n\t\t\tfeatureString = featuresListDynamic.getSelectedItem().toString();\n\t\t\t\n\t\t\t//modifying the query with the entred values\n\t\t\tif(actionString.equals(\"All\") && featureString.equals(\"All\")){\n\t\t\t\tactionString=\"%\";\n\t\t\t\tfeatureString=\"%\";\n\t\t\t}\n\t\t\telse if(!actionString.equals(\"All\") && featureString.equals(\"All\")) {\t\t\t\t\t\t\n\t\t\t\tfeatureString=\"%\";\t\n\t\t\t}\n\t\t\telse if(actionString.equals(\"All\") && !featureString.equals(\"All\")) {\n\t\t\t\tactionString=\"%\";\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//do nothing\n\t\t\t}\n\t\t\tinfinite=true;\n\t\t}\n\t\t\n\t\t//static chart modification\n\t\tif (e.getActionCommand().equals(\"showStatic\")) {\t\n\t\t\t//getting the entred values\n\t\t\tactionStringH = actionsListStatic.getSelectedItem().toString();\n\t\t\tfeatureStringH = featuresListStatic.getSelectedItem().toString();\n\t\t\tyear=textAreaYearStatic.getText();\n\t\t\tmonth=textAreaMonthStatic.getText();\n\t\t\tday=textAreaDayStatic.getText();\n\t\t\thourString=textAreaMinuteStatic.getText().toString();\t\n\t\t\t\n\t\t\t//modifying the graph with entered values \n\t\t\tif (year.isEmpty()&&month.isEmpty()&&day.isEmpty()){\n\t\t\t\tqueryNumber=0;\n\t\t\t\tyear=\"2016\";\n\t\t\t\tmonth=\"09\";\n\n\t\t\t}\n\n\t\t\tif ((!year.isEmpty())&&(!month.isEmpty())&&(day.isEmpty())){\n\t\t\t\tqueryNumber=0;\n\n\t\t\t}\n\n\t\t\tif ((!day.isEmpty())&&(hourString.isEmpty())) {\n\t\t\t\tqueryNumber=1; \n\t\t\t}\t\n\n\t\t\tif (!(hourString.isEmpty())) {\n\t\t\t\tqueryNumber=2; \n\t\t\t}\n\n\t\t\tif(actionStringH.equals(\"All\") && featureStringH.equals(\"All\") ){\n\t\t\t\tactionStringH=\"%\";\n\t\t\t\tfeatureStringH=\"%\";\n\t\t\t}\n\t\t\telse if(!actionStringH.equals(\"All\") && featureStringH.equals(\"All\")) {\t\t\t\t\t\t\n\t\t\t\tfeatureStringH=\"%\";\t\n\t\t\t}\n\t\t\telse if(actionStringH.equals(\"All\") && !featureStringH.equals(\"All\")) {\n\t\t\t\tactionStringH=\"%\";\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t//do nothing\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tdatasetStatic=createDataset();\n\t\t\t} catch (SQLException | InterruptedException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\t\n\n\t\t\t//remove what is drawing in the static chart and replace it with a fresh \n\t\t\t//vearsion of the chart depending on the values entred by the user\n\t\t\tpanelStatic.remove(chartPanelStatic);\n\t\t\tchartStatic = createChart(datasetStatic);\n\t\t\torg.jfree.chart.axis.CategoryAxis domainAxis = chartStatic.getCategoryPlot().getDomainAxis(); \n\t\t\tdomainAxis.setTickLabelFont(font1);\n\t\t\tdomainAxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(Math.PI/6));\n\t\t\tchartPanelStatic = new ChartPanel(chartStatic, false);\n\t\t\tpanelStatic.add(chartPanelStatic);\n\t\t\tpanelStatic.setVisible(true);\n\t\t\tpanelStatic.repaint();\n\t\t\tpanelStatic.validate();\t\t\t\n\t\t}\t\t\n\t}", "private void generateQuery() {\n\t\tString edgeType = \"\";\n\n\t\tif (isUnionTraversal || isTraversal || isWhereTraversal) {\n\t\t\tString previousNode = prevsNode;\n\t\t\tif (isUnionTraversal) {\n\t\t\t\tpreviousNode = unionMap.get(unionKey);\n\t\t\t\tisUnionTraversal = false;\n\t\t\t}\n\n\t\t\tEdgeRuleQuery edgeRuleQuery = new EdgeRuleQuery.Builder(previousNode, currentNode).build();\n\t\t\tEdgeRule edgeRule = null;\n\n\t\t\ttry {\n\t\t\t\tedgeRule = edgeRules.getRule(edgeRuleQuery);\n\t\t\t} catch (EdgeRuleNotFoundException | AmbiguousRuleChoiceException e) {\n\t\t\t}\n\n\t\t\tif (edgeRule == null) {\n\t\t\t\tedgeType = \"EdgeType.COUSIN\";\n\t\t\t} else if (\"none\".equalsIgnoreCase(edgeRule.getContains())){\n\t\t\t\tedgeType = \"EdgeType.COUSIN\";\n\t\t\t}else {\n\t\t\t\tedgeType = \"EdgeType.TREE\";\n\t\t\t}\n\n\t\t\tquery += \".createEdgeTraversal(\" + edgeType + \", '\" + previousNode + \"','\" + currentNode + \"')\";\n\n\t\t}\n\n\t\telse\n\t\t\tquery += \".getVerticesByProperty('aai-node-type', '\" + currentNode + \"')\";\n\t}", "public void generateReport(ReportGenerationData data)throws ChangeApplicationException;", "public QueryInvoiceForm() {\n\t\tTimeZone.setDefault(TimeZone.getTimeZone(\"UTC\"));\n\t\tgetQuery();\n\t\tJLabel topicLabel = new JLabel(\"Query Invoice Table \");\n\t\tJButton addButton = new JButton(\"Create\");\n\t\tJButton updateButton = new JButton(\"Update\");\n\t\tJButton deleteButton = new JButton(\"Delete\");\n\n\t\taddButtonHandler addHandler = new addButtonHandler();\n\t\taddButton.addActionListener(addHandler);\n\t\tupdateButtonHandler updateHandler = new updateButtonHandler();\n\t\tupdateButton.addActionListener(updateHandler);\n\t\tdeleteButtonHandler deleteHandler = new deleteButtonHandler();\n\t\tdeleteButton.addActionListener(deleteHandler);\n\n\t\t// set up table search bar and sorter\n\t\tfinal TableRowSorter<TableModel> sorter = new TableRowSorter<TableModel>(model);\n\t\tjtable.setRowSorter(sorter);\n\n\t\tsearchBarField = new JTextField(\n\t\t\t\t\"Enter query here (Click on the field to clear it, then press Enter to clear query)\");\n\t\tsearchBarField.setHorizontalAlignment(JTextField.CENTER);\n\t\tsearchBarField.setPreferredSize(new Dimension(500, 40));\n\n\t\tsearchBarField.addKeyListener(new KeyListener() {\n\t\t\tString query;\n\n\t\t\t@Override\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyPressed(KeyEvent event) {\n\t\t\t\tif (event.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\t\t\tquery = searchBarField.getText();\n\t\t\t\t\tif (query.length() == 0) {\n\t\t\t\t\t\tsorter.setRowFilter(null);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsorter.setRowFilter(RowFilter.regexFilter(query));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t}\n\t\t});\n\n\t\tClearFieldHandler clickClear = new ClearFieldHandler();\n\t\tsearchBarField.addMouseListener(clickClear);\n\n\t\ttopPadding = BorderFactory.createEmptyBorder(-15, 0, 0, 0);\n\t\ttopPanel.setLayout(new BorderLayout());\n\t\ttopPanel.setBorder(topPadding);\n\t\t\n\t\t/* add components */\n\t\ttopPanel.add(topicLabel);\n\t\ttopPanel.add(searchBarField);\n\t\tpanel.add(jtablePanel);\n\t\tbottomPanel.add(addButton);\n\t\tbottomPanel.add(new JLabel(\" \"));\n\t\tbottomPanel.add(updateButton);\n\t\tbottomPanel.add(new JLabel(\" \"));\n\t\tbottomPanel.add(deleteButton);\n\t\tqueryInvoiceFormPanel.add(topPanel);\n\t\tqueryInvoiceFormPanel.add(panel);\n\t\tqueryInvoiceFormPanel.add(bottomPanel);\n\n\t\t/* set Style */\n\t\tFont topicFont = new Font(\"Calibri\", Font.BOLD, 25);\n\t\tFont buttonFont = new Font(\"Calibri\", Font.BOLD, 15);\n\t\tBorder formBorder = BorderFactory.createLineBorder(Color.LIGHT_GRAY, 3);\n\t\tDimension buttonSize = new Dimension(200, 50);\n\n\t\ttopicLabel.setFont(topicFont);\n\t\t\n\t\taddButton.setFont(buttonFont);\n\t\tupdateButton.setFont(buttonFont);\n\t\tdeleteButton.setFont(buttonFont);\n\t\t\n\t\taddButton.setBackground(Color.lightGray);\n\t\tupdateButton.setBackground(Color.lightGray);\n\t\tdeleteButton.setBackground(Color.lightGray);\n\t\t\n\t\taddButton.setPreferredSize(buttonSize);\n\t\tupdateButton.setPreferredSize(buttonSize);\n\t\tdeleteButton.setPreferredSize(buttonSize);\n\t\t\n\t\tjtablePanel.setPreferredSize(new Dimension(1260, 500));\n\t\tjtablePanel.setBorder(formBorder);\n\t\ttopPanel.setLayout(new FlowLayout(1, 0, 30));\n\t\ttopPanel.setPreferredSize(new Dimension(1260, 100));\n\t\ttopPanel.setOpaque(false);\n\t\tpanel.setPreferredSize(new Dimension(1280, 520));\n\t\tpanel.setOpaque(false);\n\t\tbottomPanel.setLayout(new FlowLayout(1, 0, 10));\n\t\tbottomPanel.setPreferredSize(new Dimension(1260, 80));\n\t\tbottomPanel.setOpaque(false);\n\t\tqueryInvoiceFormPanel.setBackground(Color.WHITE);\n\t}", "public void actionPerformed(ActionEvent e) {\n displayInfoText(\" \");\n // Turn the search string into a Query\n String queryString = queryWindow.getText().toLowerCase().trim();\n query = new Query(queryString);\n // Take relevance feedback from the user into account (assignment 3)\n // Check which documents the user has marked as relevant.\n if (box != null) {\n boolean[] relevant = new boolean[box.length];\n for (int i = 0; i < box.length; i++) {\n if (box[i] != null)\n relevant[i] = box[i].isSelected();\n }\n query.relevanceFeedback(results, relevant, engine);\n }\n // Search and print results. Access to the index is synchronized since\n // we don't want to search at the same time we're indexing new files\n // (this might corrupt the index).\n long startTime = System.currentTimeMillis();\n synchronized (engine.indexLock) {\n results = engine.searcher.search(query, queryType, rankingType);\n }\n long elapsedTime = System.currentTimeMillis() - startTime;\n // Display the first few results + a button to see all results.\n //\n // We don't want to show all results directly since the displaying itself\n // might take a long time, if there are many results.\n if (results != null) {\n displayResults(MAX_RESULTS, elapsedTime / 1000.0);\n } else {\n displayInfoText(\"Found 0 matching document(s)\");\n\n if (engine.speller != null) {\n startTime = System.currentTimeMillis();\n SpellingOptionsDialog dialog = new SpellingOptionsDialog(50);\n String[] corrections = engine.speller.check(query, 10);\n elapsedTime = System.currentTimeMillis() - startTime;\n System.err.println(\"It took \" + elapsedTime / 1000.0 + \"s to check spelling\");\n if (corrections != null && corrections.length > 0) {\n String choice = dialog.show(corrections, corrections[0]);\n if (choice != null) {\n queryWindow.setText(choice);\n queryWindow.grabFocus();\n\n this.actionPerformed(e);\n }\n }\n }\n }\n }", "@Override\n\tpublic DataSet evaluate(DataSetDefinition dataSetDefinition, EvaluationContext context) throws EvaluationException {\n\t\tFormRecentlyFilledDataSetDefinition dsd = (FormRecentlyFilledDataSetDefinition) dataSetDefinition;\n\t\tInteger total = dsd.getTotal();\n\t\t//PatientIdentifierType primaryIdentifierType = emrApiProperties.getPrimaryIdentifierType();\n\t\tStringBuilder sqlQuery = new StringBuilder(\n\t\t \"select\"\n\t\t + \" p.st_id as 'No. de patient attribué par le site', usr.username as utilisateur, entype.name as Fiche,\"\n\t\t + \" DATE(enc.date_created) as 'Date de création',\"\n\t\t + \" CASE WHEN enc.date_changed is null then enc.date_created ELSE enc.date_changed END as 'Dernière modification',\"\n\t\t + \" f.name as Fiches\");\n\t\tsqlQuery.append(\" FROM isanteplus.patient p, openmrs.encounter enc, openmrs.encounter_type entype, openmrs.form f, openmrs.users usr\");\n\t\tsqlQuery.append(\" WHERE p.patient_id=enc.patient_id\");\n\t\tsqlQuery.append(\" AND enc.encounter_type=entype.encounter_type_id\");\n\t\tsqlQuery.append(\" AND enc.form_id=f.form_id\");\n\t\tsqlQuery.append(\" AND enc.creator=usr.user_id\");\n\t\tsqlQuery.append(\" GROUP BY DATE(enc.date_created) DESC\");\n\t\tif (total > 0) {\n\t\t\tsqlQuery.append(\" LIMIT :total\");\n\t\t}\n\t\tSQLQuery query = sessionFactory.getCurrentSession().createSQLQuery(sqlQuery.toString());\n\t\t//query.setInteger(\"primaryIdentifierType\", primaryIdentifierType.getId());\n\t\t/*if (startDate != null) {\n\t\t\tquery.setTimestamp(\"startDate\", startDate);\n\t\t}\n\t\tif (startDate != null) {\n\t\t\tquery.setTimestamp(\"endDate\", endDate);\n\t\t}*/\n\t\t\n\t\tList<Object[]> list = query.list();\n\t\tSimpleDataSet dataSet = new SimpleDataSet(dataSetDefinition, context);\n\t\tfor (Object[] o : list) {\n\t\t\tDataSetRow row = new DataSetRow();\n\t\t\trow.addColumnValue(new DataSetColumn(\"numero\", \"numero\", String.class), o[0]);\n\t\t\trow.addColumnValue(new DataSetColumn(\"utilisateur\", \"utilisateur\", String.class), o[1]);\n\t\t\trow.addColumnValue(new DataSetColumn(\"fiche\", \"fiche\", String.class), o[2]);\n\t\t\trow.addColumnValue(new DataSetColumn(\"creation\", \"creation\", String.class), o[3]);\n\t\t\trow.addColumnValue(new DataSetColumn(\"modification\", \"modification\", String.class), o[4]);\n\t\t\trow.addColumnValue(new DataSetColumn(\"fiches\", \"fiches\", String.class), o[5]);\n\t\t\tdataSet.addRow(row);\n\t\t}\n\t\treturn dataSet;\n\t}", "@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 }", "void onReportResult(Report report, boolean isNew);", "void createReport(Report report);", "public Report build() {\n return new Report(this);\n }", "@RequestMapping(\"/customer/customerReport\")\n public String viewCustomerReport() {\n Connection connection = null;\n try {\n connection = DriverManager.getConnection(\"jdbc:h2:tcp://localhost/~/test\", \"sa\", \"\");\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n JasperReportBuilder report = DynamicReports.report(); // A new report\n\n StyleBuilder boldStyle = stl.style().bold();\n StyleBuilder boldCenteredStyle = stl.style(boldStyle).setHorizontalAlignment(HorizontalAlignment.CENTER);\n StyleBuilder columnTitleStyle = stl.style(boldCenteredStyle)\n .setBorder(stl.pen1Point())\n .setBackgroundColor(Color.LIGHT_GRAY);\n\n\n\n report\n .setColumnTitleStyle(columnTitleStyle)\n .highlightDetailEvenRows()\n .columns(\n Columns.column(\"Id\", \"customerId\", DataTypes.integerType()),\n Columns.column(\"First Name\", \"firstName\", DataTypes.stringType()),\n Columns.column(\"SecondName\", \"secondName\", DataTypes.stringType()),\n Columns.column(\"Email Address\", \"email\", DataTypes.stringType()),\n Columns.column(\"Phone No\", \"phoneNo\", DataTypes.stringType()),\n Columns.column(\"Street Name\", \"streetName\", DataTypes.stringType()),\n Columns.column(\"House Name\", \"houseName\", DataTypes.stringType()),\n Columns.column(\"City\", \"city\", DataTypes.stringType()),\n Columns.column(\"County\", \"county\", DataTypes.stringType()),\n Columns.column(\"Postcode\", \"postCode\", DataTypes.stringType()))\n .title( //title of the report\n Components.text(\"Customer Report\")\n .setHorizontalAlignment(HorizontalAlignment.CENTER)\n .setStyle(boldCenteredStyle))\n .pageFooter(Components.pageXofY().setStyle(boldCenteredStyle)) //Show page number on the page footer\n .setDataSource(\"SELECT customerId, firstName, secondName, email, phoneNo, streetName, houseName, city, county, postCode FROM customer\", connection);\n\n try {\n // Show the report\n report.show();\n\n try {\n connection.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n //export the report to a pdf file\n report.toPdf(new FileOutputStream(\"c:/report.pdf\"));\n } catch (DRException e) {\n e.printStackTrace();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n return \"customerReport\";\n }", "private void addDailyReportButtonFunction() {\n\t\tdailyReportButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tGUIViewTransactionHistory h = new GUIViewTransactionHistory(true);\n\t\t\t}\t\t\n\t\t});\n\t}", "public String preview(HttpServletRequest request, Campaign campaign) throws Exception {\t\n\t\tthrow new Exception(\"Base class preview with Campaign - not implemented\");\n\t}", "public abstract Expression generateExpression(GenerationContext context);", "@Test\n\tpublic void generateGosByStockItemReport(){\n\t\t\t\tWebDriver driver = new FirefoxDriver();\n\t\t\t\t// Alternatively the same thing can be done like this\n\t\t // driver.get(\"http://www.google.com\");\n\t\t\t\tdriver.navigate().to(determineUrl());\n\t\t\t\t// Find the text input element by its name\n\t\t\t\tWebElement user_name = driver.findElement(By.id(\"user_email\"));\n\t\t\t\tuser_name.sendKeys(user);\n\t\t\t\t\n\t\t\t\tWebElement password = driver.findElement(By.id(\"user_password\"));\n\t\t\t\tpassword.sendKeys(password_login);\n\t\t\t\tpassword.submit();\n\t\t\t\t\n\t\t\t\tWebElement select_venue = driver.findElement(By.id(\"change_venue\"));\n\t\t\t\tselect_venue.sendKeys(venue);\n\t\t\t\tselect_venue.submit();\n\t\t\t\t\n\t\t\t\tWebElement report = driver.findElement(By.linkText(\"Reporting\"));\n\t\t\t\treport.click();\n\t\t\t\t\n\t\t\t\tWebElement select_report = driver.findElement(By.id(\"report_type_chooser\"));\n\t\t\t\tselect_report.sendKeys(\"GOS By Stock Item Report\");\n\t\t\t\tWebElement select_event = driver.findElement(By.id(\"report_event\"));\n\t\t\t\tselect_event.sendKeys(event);\n\t\t\t\tselect_event.submit();\n\t\t\t\tdriver.close();\n\t\t\n\t}", "public String generateReport() {\n throw new UnsupportedOperationException(\"ERROR: generateReport() Not yet implemented.\");\n }", "void gen() {\n if (val != null) {\r\n\tX86.Operand r = val.gen_source_operand(true,X86.RAX); \r\n\tX86.emitMov(X86.Size.Q,r,X86.RAX);\r\n }\r\n // exit sequence\r\n // pop the frame\r\n if (frameSize != 0)\r\n\tX86.emit2(\"addq\",new X86.Imm(frameSize),X86.RSP);\r\n // restore any callee save registers\r\n for (int i = X86.calleeSaveRegs.length-1; i >= 0; i--) {\r\n\tX86.Reg r = X86.calleeSaveRegs[i]; \r\n\tif (env.containsValue(r))\r\n\t X86.emit1(\"popq\",r);\r\n }\r\n // and we're done\r\n X86.emit0(\"ret\");\r\n }", "public EtsIssSaveQryModel deriveSaveQryModel(EtsIssFilterDetailsBean etsFilterBean, String queryView) {\n\n\t\t\tEtsIssSaveQryModel saveQryModel = new EtsIssSaveQryModel();\n\n\t\t\tStringBuffer sb = new StringBuffer();\n\n\t\t\tArrayList prevIssueTypeList = etsFilterBean.getPrevIssueTypeList();\n\t\t\tArrayList prevSeverityList = etsFilterBean.getPrevSeverityTypeList();\n\t\t\tArrayList prevStatusList = etsFilterBean.getPrevStatusTypeList();\n\t\t\tArrayList prevSubmitterList = etsFilterBean.getPrevIssueSubmitterList();\n\t\t\tArrayList prevCurOwnerList = etsFilterBean.getPrevIssueOwnerList();\n\n\t\t\t//////////////////////////\n\t\t\tString issueDateAllStr = AmtCommonUtils.getTrimStr(etsFilterBean.getPrevIssueDateAll());\n\t\t\tString issueStartDateStr = AmtCommonUtils.getTrimStr(etsFilterBean.getPrevIssueStartDate());\n\t\t\tString issueEndDateStr = AmtCommonUtils.getTrimStr(etsFilterBean.getPrevIssueEndDate());\n\n\t\t\t/////////////////////////add issue type\n\t\t\tif (EtsIssFilterUtils.isArrayListDefnd(prevIssueTypeList)) {\n\n\t\t\t\tsb.append(\"ISSUETYPE\");\n\t\t\t\tsb.append(\"#%#\");\n\t\t\t\tsb.append(EtsIssFilterUtils.getCommSepStrFromStrList(prevIssueTypeList));\n\t\t\t\tsb.append(\"#%#\");\n\t\t\t\tsb.append(\"~$~\");\n\t\t\t}\n\n\t\t\t//\t\t///////////////////////add severity\n\t\t\tif (EtsIssFilterUtils.isArrayListDefnd(prevSeverityList)) {\n\n\t\t\t\tsb.append(\"SEVERITY\");\n\t\t\t\tsb.append(\"#%#\");\n\t\t\t\tsb.append(EtsIssFilterUtils.getCommSepStrFromStrList(prevSeverityList));\n\t\t\t\tsb.append(\"#%#\");\n\t\t\t\tsb.append(\"~$~\");\n\t\t\t}\n\n\t\t\t/////////////////////add status\n\t\t\tif (EtsIssFilterUtils.isArrayListDefnd(prevStatusList)) {\n\n\t\t\t\tsb.append(\"STATUS\");\n\t\t\t\tsb.append(\"#%#\");\n\t\t\t\tsb.append(EtsIssFilterUtils.getCommSepStrFromStrList(prevStatusList));\n\t\t\t\tsb.append(\"#%#\");\n\t\t\t\tsb.append(\"~$~\");\n\t\t\t}\n\n\t\t\t///////////////////add submitter list\n\t\t\tif (EtsIssFilterUtils.isArrayListDefnd(prevSubmitterList)) {\n\n\t\t\t\tsb.append(\"SUBMITTER\");\n\t\t\t\tsb.append(\"#%#\");\n\t\t\t\tsb.append(EtsIssFilterUtils.getCommSepStrFromStrList(prevSubmitterList));\n\t\t\t\tsb.append(\"#%#\");\n\t\t\t\tsb.append(\"~$~\");\n\t\t\t}\n\n\t\t\t/////////////////add owner list\n\t\t\tif (EtsIssFilterUtils.isArrayListDefnd(prevCurOwnerList)) {\n\n\t\t\t\tsb.append(\"OWNER\");\n\t\t\t\tsb.append(\"#%#\");\n\t\t\t\tsb.append(EtsIssFilterUtils.getCommSepStrFromStrList(prevCurOwnerList));\n\t\t\t\tsb.append(\"#%#\");\n\t\t\t\tsb.append(\"~$~\");\n\t\t\t}\n\n\t\t\t////date all\n\n\t\t\tsb.append(\"DATESALL\");\n\t\t\tsb.append(\"#%#\");\n\t\t\tsb.append(issueDateAllStr);\n\t\t\tsb.append(\"#%#\");\n\t\t\tsb.append(\"~$~\");\n\n\t\t\tsb.append(\"STARTDT\");\n\t\t\tsb.append(\"#%#\");\n\t\t\tsb.append(issueStartDateStr);\n\t\t\tsb.append(\"#%#\");\n\t\t\tsb.append(\"~$~\");\n\n\t\t\tsb.append(\"ENDDT\");\n\t\t\tsb.append(\"#%#\");\n\t\t\tsb.append(issueEndDateStr);\n\t\t\tsb.append(\"#%#\");\n\t\t\tsb.append(\"~$~\");\n\n\t\t\tGlobal.println(\"FINAL USER SAVE QRY STR====\" + sb.toString());\n\n\t\t\tsaveQryModel.setEdgeUserId(issFilterObjKey.getEs().gUSERN);\n\t\t\tsaveQryModel.setProjectId(issFilterObjKey.getProjectId());\n\t\t\tsaveQryModel.setQueryView(queryView);\n\t\t\tsaveQryModel.setQueryName(\"\");\n\t\t\tsaveQryModel.setQueryComment(\"\");\n\t\t\tsaveQryModel.setQuerySql(sb.toString());\n\t\t\tsaveQryModel.setLastUserId(issFilterObjKey.getEs().gUSERN);\n\n\t\t\treturn saveQryModel;\n\t\t}", "public void verReporte(){\n //Guardamos en variables los valores de los parametros que pasaremos al reporte\n int cc = this.clienteTMP.getCodCliente();\n int cv = this.vendedor.getCodVendedor();\n int cf = this.facturaTMP.getCodFactura();\n \n System.out.println(\"Codigo cliente: \"+cc);\n System.out.println(\"Codigo vendedor: \"+cv);\n System.out.println(\"Codigo factura: \"+cf);\n \n //obtenemos la ruta en el sistema de archivos del archivo .jasper a\n //partir de la ruta relativa en el proyecto\n //Obtenemos el contexto de la aplicacion y lo depositamos en una variable\n //ServletContext\n ServletContext servletContext = \n (ServletContext)FacesContext.getCurrentInstance().getExternalContext().getContext();\n \n String rutaReporte = servletContext.getRealPath(\"/reportes/factura503.jasper\");\n System.out.println(\"Ruta del reporte: \"+rutaReporte);\n //Limpiamos la variables Temporales\n clienteTMP = new Cliente();\n facturaTMP = new Factura();\n \n //Creamos el reporte\n ReporteFactura.createReport(rutaReporte, cc, cv, cf);\n //exportamos el reporte a PDF\n ReporteFactura.exportReportToPdfWeb();\n \n //Cerramos el contexto\n FacesContext.getCurrentInstance().responseComplete();\n \n }", "public void performEvaluation(){\n if(validateExp(currentExp)){\n try {\n Double result = symbols.eval(currentExp);\n currentExp = Double.toString(result);\n calculationResult.onExpressionChange(currentExp,true);\n count=0;\n }catch (SyntaxException e) {\n calculationResult.onExpressionChange(\"Invalid Input\",false);\n e.printStackTrace();\n }\n }\n\n }", "@Override\n\tpublic void refresh() {\n\t\tif (selectedModule != null) {\n\t\t\tselectedModule = batchClass.getModuleByWorkflowName(selectedModule.getWorkflowName());\n\t\t}\n\t\tif (selectedPlugin != null) {\n\t\t\tselectedPlugin = selectedModule.getPluginByName(selectedPlugin.getPlugin().getPluginName());\n\t\t}\n\n\t\tif (pluginConfigDTO != null) {\n\t\t\tif (pluginConfigDTO.getQualifier() != null) {\n\t\t\t\tpluginConfigDTO = selectedPlugin.getBatchClassPluginConfigDTOByQualifier(pluginConfigDTO.getQualifier());\n\t\t\t} else {\n\t\t\t\tpluginConfigDTO = selectedPlugin.getBatchClassPluginConfigDTOByName(pluginConfigDTO.getName());\n\t\t\t}\n\t\t}\n\n\t\tif (selectedDocument != null) {\n\t\t\tselectedDocument = batchClass.getDocTypeByName(selectedDocument.getName());\n\t\t}\n\n\t\tif (selectedWebScannerConfiguration != null) {\n\t\t\tselectedWebScannerConfiguration = batchClass.getScannerConfigurationByProfileName(selectedWebScannerConfiguration\n\t\t\t\t\t.getValue());\n\t\t}\n\n\t\tif (selectedEmailConfiguration != null) {\n\t\t\tselectedEmailConfiguration = batchClass.getEmailConfigurationByFields(selectedEmailConfiguration.getUserName(),\n\t\t\t\t\tselectedEmailConfiguration.getPassword(), selectedEmailConfiguration.getServerName(), selectedEmailConfiguration\n\t\t\t\t\t\t\t.getServerType(), selectedEmailConfiguration.getFolderName());\n\t\t}\n\n\t\tif (selectedField != null && selectedDocument != null) {\n\t\t\tselectedField = selectedDocument.getFieldTypeByName(selectedField.getName());\n\t\t}\n\n\t\tif (tableInfoSelectedField != null && selectedDocument != null) {\n\t\t\ttableInfoSelectedField = selectedDocument.getTableInfoByName(tableInfoSelectedField.getName());\n\t\t}\n\n\t\tif (selectedFunctionKeyDTO != null && selectedDocument != null) {\n\t\t\tselectedFunctionKeyDTO = selectedDocument.getFunctionKeyDTOByShorcutKeyName(selectedFunctionKeyDTO.getShortcutKeyName());\n\t\t}\n\n\t\tif (selectedTableColumnInfoField != null && tableInfoSelectedField != null) {\n\t\t\tselectedTableColumnInfoField = tableInfoSelectedField.getTCInfoDTOByNameAndPattern(selectedTableColumnInfoField\n\t\t\t\t\t.getColumnName(), selectedTableColumnInfoField.getColumnPattern());\n\t\t}\n\n\t\tif (kvExtractionDTO != null && kvExtractionDTO.isSimpleKVExtraction() && selectedField != null) {\n\t\t\tkvExtractionDTO = selectedField.getKVExtractionByKeyAndDataTypeAndLocation(kvExtractionDTO.getKeyPattern(),\n\t\t\t\t\tkvExtractionDTO.getValuePattern(), kvExtractionDTO.getLocationType());\n\t\t}\n\n\t\tif (regexDTO != null && selectedField != null) {\n\t\t\tregexDTO = selectedField.getRegexDTOByPattern(regexDTO.getPattern());\n\t\t}\n\n\t\tif (kvPageProcessDTO != null && pluginConfigDTO != null) {\n\t\t\tkvPageProcessDTO = pluginConfigDTO.getKVPageProcessByKeyAndDataTypeAndLocation(kvPageProcessDTO.getKeyPattern(),\n\t\t\t\t\tkvPageProcessDTO.getValuePattern(), kvPageProcessDTO.getLocationType());\n\t\t}\n\n\t\tif (batchClassDynamicPluginConfigDTO != null && selectedPlugin != null) {\n\t\t\tbatchClassDynamicPluginConfigDTO = selectedPlugin\n\t\t\t\t\t.getBatchClassPluginConfigDTOByDescription(batchClassDynamicPluginConfigDTO.getDescription());\n\t\t}\n\t\tif (selectedBatchClassField != null) {\n\t\t\tselectedBatchClassField = batchClass.getBatchClassFieldByName(selectedBatchClassField.getName());\n\t\t}\n\n\t\teventBus.fireEvent(new BindEvent());\n\t}", "public String render()\r\n/* 24: */ {\r\n/* 25:51 */ if (!this.init_flag)\r\n/* 26: */ {\r\n/* 27:52 */ this.init_flag = true;\r\n/* 28:53 */ return \"\";\r\n/* 29: */ }\r\n/* 30: */ try\r\n/* 31: */ {\r\n/* 32:56 */ ConnectorResultSet res = this.sql.get_variants(this.request);\r\n/* 33:57 */ return render_set(res);\r\n/* 34: */ }\r\n/* 35: */ catch (ConnectorOperationException e) {}\r\n/* 36:59 */ return \"\";\r\n/* 37: */ }", "@Override\n\t\tpublic void postShow() {\n\t\t\tif (bmoRequisition.getSupplierId().toInteger() > 0)\n\t\t\t\tsetFormatEmailTo(bmoRequisition.getBmoSupplier().getEmail().toString(), bmoRequisition.getBmoSupplier().getName().toString());\n\n\t\t\tif (!newRecord)\n\t\t\t\tbuttonPanel.add(lifeCycleShowButton);\n\t\t\t// Mostrar boton cuando NO tenga un recibo(en parcial/total) y tenga un pagos de anticipo\n\t\t\tif (enableCheekingCostTravelExpense(false))\n\t\t\t\tbuttonPanel.add(verifyTravelExpenseShowButton);\n\t\t\telse {\n\t\t\t\tbuttonPanel.add(copyRequisitionDialogButton);\n\t\t\t}\n\n\t\t\tgetBmoOrderType(((BmoFlexConfig)getSFParams().getBmoAppConfig()).getDefaultOrderTypeId().toInteger());\t\n\t\t}", "void displayReport ()\n {\n\tStatFrame statTable;\n String winTitle = new String (\"Statistical Results Window\");\n\n\tif (use_xml) {\n\t try {\n\t\tVector data = new Vector (); data.add (modelReport);\n\t\tString xmlStr = XMLSerializer.serialize (data);\n\t\tstatTable = new StatFrame (winTitle, xmlStr);\n\t } catch (Exception e) {\n\t\ttrc.tell (\"displayReport\", e.getMessage ());\n\t\te.printStackTrace ();\n\t\treturn;\n\t }\n\t} else {\n statTable = new StatFrame (winTitle, modelReport);\n\t}; // if\n\n statTable.showWin ();\n\n }", "private void search() {\n String result = \"<body bgcolor=\\\"black\\\"> \" +\n \"<font color=\\\"#009933\\\"\";\n gs.setQueryString(txtQueury.getText());\n try {\n gsr = gs.doSearch();\n txtCountRes.setText(\"\" + gsr.getEstimatedTotalResultsCount());\n gsre = gsr.getResultElements();\n\n for (int i = 0; i < gsre.length; i++) {\n if (googleTitle.isSelected()) {\n result +=\n \"<font color=\\\"red\\\"><u><b>Title: </u></b><a href=\\\"\" +\n gsre[i].getURL() + \"\\\">\"\n + gsre[i].getTitle() + \"</a><br>\" +\n \"<br><b>URL: \" +\n gsre[i].getHostName() + gsre[i].getURL() +\n \"</b></font><br>\";\n }\n if (googleSummary.isSelected()) {\n result += \"<u><b>Summary: </u></b>\" +\n gsre[i].getSummary() +\n \"<br>\";\n }\n if (googleSnippet.isSelected()) {\n result += \"<u><b>Snippet: </u></b>\" +\n gsre[i].getSnippet() +\n \"<br>\";\n }\n if (googleHostName.isSelected()) {\n result += \"<u><b>Host: </u></b>\" + gsre[i].getHostName() +\n \"<br>\";\n }\n if (googleDirectoryTitle.isSelected()) {\n result += \"<u><b>Directory Title: </u></b>\" +\n gsre[i].getDirectoryTitle() + \"<br>\";\n }\n if (googleCachedSize.isSelected()) {\n result += \"<u><>Cached Size: </u></b>\" +\n gsre[i].getCachedSize() + \"<br>\";\n }\n result += \"<br>\";\n }\n } catch (GoogleSearchFault e) {\n msg(\"Erreur d'exécution \" + e.getMessage(), \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n\n //affichage de la recherche\n editor.setText(result);\n }", "public static void generateReport() {\n PrintImpl printer = new PrintImpl(realtorLogImpl, propertyLogImpl);\n printer.generateReport(REQUESTS_FILE);\n }", "public PathologyReportDetailQueryBuilder() {\n super();\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JTextField inputCell = (JTextField) e.getSource();\n String[] operands = inputCell.getText().split(\" \");\n InterpreterDesignPattern interpreter = new InterpreterDesignPattern();\n\n if (listenerF == null) {\n listenerF = new ValueViewObserverF(equationView.getValView());\n }\n\n //following line fetches current expression from the jTextField where user made changes\n ((ValueViewObserverF) listenerF).setExpression(inputCell.getText());\n\n //This line unregisters listenerF from unwanted subjects\n equationView.getValView().removeObserver(listenerF);\n\n //This line dynamically registers listenerF object in jTextFields according to cell labels in operands\n equationView.getValView().registerObserver(listenerF, operands);\n\n //Following line evaluates an expression entered by user and displays that result in value view\n equationView.getValView().getjTextField7().setText(interpreter.interpretPostfixExpression(\n equationView.getInputString(operands)));\n\n //Following line will store a state of the Equation View GUI, after the user changes an expression.\n equationView.createMemento();\n }", "public String f9action() throws Exception {\r\n\r\n\t\tString query = \"SELECT VENDOR_CODE,NVL(VENDOR_NAME,''),NVL(VENDOR_ADDRESS,''),NVL(VENDOR_CONTACT_NO,''),\"\r\n\t\t\t\t+ \" NVL(VENDOR_CITY,''),NVL(VENDOR_STATE,''), NVL(L1.LOCATION_NAME,'') AS CITY,NVL(L2.LOCATION_NAME,'') AS CITY FROM HRMS_VENDOR\"\r\n\t\t\t\t+ \" LEFT JOIN HRMS_LOCATION L1 ON(HRMS_VENDOR.VENDOR_CITY=L1.LOCATION_CODE)\"\r\n\t\t\t\t+ \" LEFT JOIN HRMS_LOCATION L2 ON(HRMS_VENDOR.VENDOR_STATE=L2.LOCATION_CODE) ORDER BY VENDOR_CODE \";\r\n\r\n\t\tString[] headers = { \"Vendor Code\", getMessage(\"vendor.name\")};\r\n\r\n\t\tString[] headerWidth = { \"30\", \"50\" };\r\n\r\n\t\tString[] fieldNames = { \"vendorCode\", \"vendorName\", \"vendorAdd\",\r\n\t\t\t\t\"vendorCon\", \"ctyId\", \"stateId\", \"vendorCty\", \"vendorState\" };\r\n\r\n\t\tint[] columnIndex = { 0, 1, 2, 3, 4, 5, 6, 7 };\r\n\r\n\t\tString submitFlag = \"true\";\r\n\r\n\t\tString submitToMethod = \"VendorMaster_setData.action\";\r\n\r\n\t\tsetF9Window(query, headers, headerWidth, fieldNames, columnIndex,\r\n\t\t\t\tsubmitFlag, submitToMethod);\r\n\r\n\t\treturn \"f9page\";\r\n\t}", "@Override\n\tpublic void actionPerformed (ActionEvent e)\n\t{\n\t\n\t\t// Create the File Save dialog.\n\t\tFileDialog fd = new FileDialog(\n\t\t\tAppContext.cartogramWizard, \n\t\t\t\"Save Computation Report As...\", \n\t\t\tFileDialog.SAVE);\n\n\t\tfd.setModal(true);\n\t\tfd.setBounds(20, 30, 150, 200);\n\t\tfd.setVisible(true);\n\t\t\n\t\t// Get the selected File name.\n\t\tif (fd.getFile() == null)\n\t\t\treturn;\n\t\t\n\t\tString path = fd.getDirectory() + fd.getFile();\n\t\tif (path.endsWith(\".txt\") == false)\n\t\t\tpath = path + \".txt\";\n\t\t\n\t\t\n\t\t// Write the report to the file.\n\t\ttry\n\t\t{\n\t\t\tBufferedWriter out = new BufferedWriter(new FileWriter(path));\n\t\t\tout.write(AppContext.cartogramWizard.getCartogram().getComputationReport());\n\t\t\tout.close();\n\t\t} \n\t\tcatch (IOException exc)\n\t\t{\n\t\t}\n\n\t\t\n\t\n\t}" ]
[ "0.54658103", "0.54188395", "0.5223541", "0.5091299", "0.50523037", "0.5044288", "0.5033122", "0.5029569", "0.49598745", "0.49024242", "0.4843779", "0.4827962", "0.48192832", "0.4797482", "0.47274482", "0.47247782", "0.47012293", "0.46976173", "0.46892837", "0.46782312", "0.4676883", "0.46688077", "0.4658504", "0.46471244", "0.46331784", "0.45963958", "0.4585525", "0.45805237", "0.45713016", "0.45677212", "0.4560315", "0.45380116", "0.45220995", "0.45069566", "0.4505566", "0.449425", "0.4492055", "0.44731715", "0.4461424", "0.44586492", "0.44429106", "0.44396025", "0.4435366", "0.44283584", "0.44234663", "0.44178832", "0.44166285", "0.43951812", "0.43931788", "0.4388057", "0.4378575", "0.43753138", "0.43719208", "0.43668672", "0.4364022", "0.43597516", "0.43582517", "0.4352225", "0.43402156", "0.43340626", "0.43247357", "0.43207765", "0.4318696", "0.43160638", "0.43145972", "0.43124682", "0.43118754", "0.43102333", "0.43095246", "0.43035963", "0.4303281", "0.4274515", "0.42721593", "0.4270994", "0.42632416", "0.4262823", "0.42559478", "0.42539886", "0.42506343", "0.42476827", "0.4247403", "0.42473066", "0.42416257", "0.42403796", "0.42370895", "0.42331064", "0.42283246", "0.42273435", "0.42241275", "0.42192644", "0.4218219", "0.42165437", "0.42164242", "0.42102003", "0.4207222", "0.4205422", "0.42007634", "0.4200402", "0.41984987", "0.41966072" ]
0.6975158
0
Returns a index to the first occurrence of target in source, or 1 if target is not part of source.
public int strStr(String source, String target) { //write your code here if(target == null || source == null || source.length() < target.length()) { return -1; } for(int i = 0; i < source.length() - target.length() + 1; i++) {//注意这里, i < source.length() - target.length() + 1 int j = 0; for(j = 0; j < target.length(); j++) { if(target.charAt(j) != source.charAt(i + j)) { break; } } if(j == target.length()) { return i; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getIndex(T target) {\r\n for (int i = 0; i < SIZE; i++) {\r\n if (tree[i] == target) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "public int indexOf(E target) {\n\t\tint first = 0;\n\t\tint last = data.size() - 1;\n\n\t\twhile (first <= last) {\n\t\t\tint mid = (first + last) / 2;\n\t\t\tif (cmp.compare(target, data.get(mid)) == 0) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\telse if (cmp.compare(target, data.get(mid)) < 0) {\n\t\t\t\tlast = mid - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfirst = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "public int search(int target)\n {\n for(int i = 0; i<list.length; i++)\n {\n if(target == list[i])\n {\n return i;\n }\n }\n }", "public int linearSearch(int target)\n {\n int location = -1;\n for (int i=0; i<list.length && location == -1; i++)\n if (list[i] == target)\n location = i;\n return location;\n }", "public static int indexOf(int[] numbers, int target) {\n for (int i = 0; i < numbers.length; i++) {\n if (numbers[i] == target) {\n return i; // found it!\n }\n }\n \n return -1; // not found\n }", "public static int indexOf2(int[] numbers, int target) {\n int i = 0;\n while (i < numbers.length && numbers[i] <= target) {\n if (numbers[i] == target) {\n return i; // found it!\n } else {\n i++;\n }\n }\n \n return -1; // not found\n }", "static int linearSearch(int[] arr, int target){\r\n if(arr.length == 0){\r\n return -1;\r\n }\r\n\r\n for (int i = 0; i < arr.length; i++) {\r\n if(arr[i] == target){\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n }", "public int linearSearch(int[] array,int target) {\n for (var index = 0; index < array.length; index++) {\n if (array[index] == target)\n return index;\n }\n return -1;\n }", "public int find (E target)\n {\n Node<E> tmpNode = headNode;\n int counter = 1;\n\n if (tmpNode == null)\n return -1;\n\n while (tmpNode.next != null)\n {\n if (tmpNode.data.equals(target))\n return counter;\n\n tmpNode = tmpNode.next;\n counter++;\n }\n\n return -1;\n }", "@Override // com.google.common.collect.ImmutableSortedSet\n public int indexOf(Object target) {\n if (!contains(target)) {\n return -1;\n }\n Comparable comparable = (Comparable) target;\n long total = 0;\n UnmodifiableIterator it = ImmutableRangeSet.this.ranges.iterator();\n while (it.hasNext()) {\n Range range = (Range) it.next();\n if (range.contains(comparable)) {\n return Ints.saturatedCast(((long) ContiguousSet.create(range, this.domain).indexOf(comparable)) + total);\n }\n total += (long) ContiguousSet.create(range, this.domain).size();\n }\n throw new AssertionError(\"impossible\");\n }", "public int findPosition(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start <= end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) return mid;\n if (nums[mid] < target)\n start = mid + 1;\n else\n end = mid - 1;\n }\n return -1;\n }", "static int indexOf(char[] source, int sourceOffset, int sourceCount, char[] target, int targetOffset, int targetCount, int fromIndex) {\n\t\tif (fromIndex >= sourceCount) {\n\t\t\treturn (targetCount == 0 ? sourceCount : -1);\n\t\t}\n\t\tif (fromIndex < 0) {\n\t\t\tfromIndex = 0;\n\t\t}\n\t\tif (targetCount == 0) {\n\t\t\treturn fromIndex;\n\t\t}\n\n\t\tchar first = target[targetOffset];\n\t\tint max = sourceOffset + (sourceCount - targetCount);\n\n\t\tfor (int i = sourceOffset + fromIndex; i <= max; i++) {\n\t\t\t/* Look for first character. */\n\t\t\tif (source[i] != first) {\n\t\t\t\twhile (++i <= max && source[i] != first)\n\t\t\t\t\t;\n\t\t\t}\n\n\t\t\t/* Found first character, now look at the rest of v2 */\n\t\t\tif (i <= max) {\n\t\t\t\tint j = i + 1;\n\t\t\t\tint end = j + targetCount - 1;\n\t\t\t\tfor (int k = targetOffset + 1; j < end && source[j] == target[k]; j++, k++)\n\t\t\t\t\t;\n\n\t\t\t\tif (j == end) {\n\t\t\t\t\t/* Found whole string. */\n\t\t\t\t\treturn i - sourceOffset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int search(int[] A, int target) {\n if(A.length == 0)\n return -1;\n int res = helper(A, 0, A.length - 1, target);\n return res;\n }", "public static int indexOf(Object[] objects, Object target) {\n for (int i = 0; i < objects.length; i++) {\n if (objects[i].equals(target)) {\n return i; // found it!\n }\n }\n \n return -1; // not found\n }", "static int indexOf(char[] source, int sourceOffset, int sourceCount, String target, int fromIndex) {\n\t\treturn indexOf(source, sourceOffset, sourceCount, target.value, 0, target.value.length, fromIndex);\n\t}", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\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}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "public static int find(char[] a, char target) {\r\n\t\tint i;\r\n\t\tfor (i = 0; i < 9; i++)\r\n\t\t\tif (a[i] == target)\r\n\t\t\t\tbreak;\r\n\t\treturn i;\r\n\t}", "private int findPosition(int[] src, int start, int end, int key) {\n\t\tif (end < start || start < 0)\n\t\t\treturn -1;\n\n\t\tfor (int i = start; i <= end; i++) {\n\t\t\tif (src[i] == key) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t} \n\n\t\treturn -1;\n\t}", "static int findFirstPosition(int[] nums, int target,int left,int right){\n while(left<=right){\n int mid=left+(right-left)/2;\n\n //If the target found\n if(nums[mid]==target){\n //if this is the first target from left\n if(mid==0 ||nums[mid-1]<nums[mid])\n return mid;\n else{\n //there are more targets available at left\n right=mid-1;\n }\n }\n if(target<nums[mid]){\n right=mid-1;\n }else if(target>nums[mid]){\n left=mid+1;\n }\n\n }\n return -1;\n }", "public static int search(int[] nums, int target) {\n int low=0;\n int high=nums.length-1;\n int middle=(high+low)>>1;\n\n for(int i=0;i<nums.length;i++){\n int num = nums[middle];\n if(target>num){\n low=middle+1;\n middle=(high+low)>>1;\n }else if(target<num){\n high=middle-1;\n middle=(high+low)>>1;\n } else{\n return middle;\n }\n\n }\n\n return -1;\n }", "public static int binarySearch(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "private int insertIndex(int[] arr, int target) {\n int low = 0, high = arr.length - 1;\n if (target < arr[0]) {\n return -1;\n }\n if (target >= arr[arr.length - 1]) {\n return arr.length - 1;\n }\n while (low <= high) {\n int mid = low + (high - low) / 2;\n if (arr[mid] <= target && arr[mid + 1] > target) {\n // index found\n return mid;\n }\n if (arr[mid] <= target) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n return -1;\n }", "private int findSingleHit(double target) {\n int hits = 0;\n int idxFound = -1;\n int n = orgGridAxis.getNcoords();\n for (int i = 0; i < n; i++) {\n if (intervalContains(target, i)) {\n hits++;\n idxFound = i;\n }\n }\n if (hits == 1)\n return idxFound;\n if (hits == 0)\n return -1;\n return -hits;\n }", "public int search(int[] A, int target) {\n\n\t\tint s = 0;\n\t\tint e = A.length - 1;\n\n\t\twhile (s <= e) {\n\t\t\tint m = (s + e) / 2;\n\n\t\t\tif (target == A[m])\n\t\t\t\treturn m;\n\t\t\telse if (A[s] <= A[m]) {\n\t\t\t\tif (A[s] <= target && target < A[m])\n\t\t\t\t\te = m;\n\t\t\t\telse\n\t\t\t\t\ts = m + 1;\n\t\t\t} else {\n\t\t\t\tif (A[m] < target && target <= A[e])\n\t\t\t\t\ts = m + 1;\n\t\t\t\telse\n\t\t\t\t\te = m;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "private static int search(int[] nums, int target, int start, int end)\r\n\t{\n\t\tif (end == start)\r\n\t\t\treturn nums[start] == target ? start : -1;\r\n\t\t\r\n\t\tif(end - start == 1)\r\n\t\t{\r\n\t\t\tif(nums[start] == target)\r\n\t\t\t\treturn start;\r\n\t\t\tif(nums[end] == target)\r\n\t\t\t\treturn end;\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\t// If there are more than two elements\r\n\t\tint mid = (start + end) / 2;\r\n\t\tif (nums[mid] == target)\r\n\t\t\treturn mid;\r\n\t\telse if (nums[mid] > target)\r\n\t\t\treturn search(nums, target, start, mid - 1);\r\n\t\telse\r\n\t\t\treturn search(nums, target, mid + 1, end);\r\n\t}", "public int find(Object o) {\n int currentIndex = 0;\n int index = -1;\n ListNode current = start;\n while(current != null) {\n if (o.equals(current.data)) {\n index = currentIndex;\n break;\n }\n currentIndex++;\n current = current.next;\n }\n return index;\n }", "public int strStr(String source, String target) {\n //write your code here\n if (source == null || target == null) return -1;\n int len1 = source.length(), len2 = target.length();\n for (int i = 0; i + len2 - 1 < len1; i ++) {\n int cur = 0, cnt = i;\n while (cur < len2 && source.charAt(cnt) == target.charAt(cur)) {\n cnt ++;\n cur ++;\n }\n if (cur == len2) return i;\n }\n return -1;\n }", "private int findPos(byte[] contents, String target)\n {\n String contentsStr = null;\n try\n {\n contentsStr = new String(contents, \"ISO-8859-1\");\n }\n catch (UnsupportedEncodingException e)\n {\n e.printStackTrace();\n }\n return contentsStr.indexOf(target);\n }", "public int ternarySearch(int[] array,int target) {\n return 1;\n }", "public static int search(int[] nums, int target) {\n\n int length = nums.length;\n int i = 0;\n int j = length - 1;\n if (length == 0) return -1;\n\n while (true) {\n int index = (i + j) / 2;\n\n int value = nums[index];\n if (value == target) return index;\n\n //Using the invariant that either i - mid OR mid-j has\n //to be sorted at any point of the computation\n if (nums[j] >= value) {\n if (target > value && target <= nums[j]) i = index;\n else if (target > value && target > nums[j]) j = index;\n else j = index;\n }\n else {\n if (target < value && target >= nums[i]) j = index;\n else if (target < value && target < nums[i]) i = index;\n else i = index;\n }\n\n if (i + 1 == j) {\n if (nums[i] == target) return i;\n if (nums[j] == target) return j;\n return -1;\n }\n\n if (i == j || i >= length || j >= length) return -1;\n }\n\n }", "public int search(int[] nums, int target) {\n if (null == nums || nums.length == 0) {\n return -1;\n }\n int start = 0;\n int end = nums.length - 1;\n while (start <= end) {\n int mid = (start + end) / 2;\n if (nums[mid] == target)\n return mid;\n if (nums[start] <= nums[mid]) {\n if (target < nums[mid] && target >= nums[start])\n end = mid - 1;\n else\n start = mid + 1;\n }\n if (nums[mid] <= nums[end]) {\n if (target > nums[mid] && target <= nums[end])\n start = mid + 1;\n else\n end = mid - 1;\n }\n }\n return -1;\n }", "@VisibleForTesting\n int[] findMatches(Token[] source, Token[] target) {\n final LevenshteinDistance table = new LevenshteinDistance(source, target);\n table.calculate();\n final int targetLen = target.length;\n final int[] result = new int[targetLen];\n LevenshteinDistance.EditOperation[] ops = table.getTargetOperations();\n for (int i = 0; i < targetLen; ++i) {\n if (ops[i].getType() == LevenshteinDistance.EDIT_UNCHANGED) {\n result[i] = ops[i].getPosition();\n } else {\n result[i] = -1;\n }\n }\n return result;\n }", "private int findLowerBound(int[] nums, int target) {\n int left = 0, right = nums.length;\n while (left < right) {\n int mid = (right - left) / 2 + left;\n if (nums[mid] >= target) right = mid;\n else left = mid + 1;\n }\n return (left < nums.length && nums[left] == target) ? left : -1;\n }", "public abstract int getSourceIndex(int index);", "public static void searchRange(int[] nums, int target){\n int index = binarySearch(nums, target);\n System.out.println(index);\n\n }", "public static int linearSearch(List<Integer> values,\r\n int target) {\r\n /**\r\n * this is a linearSearch for finding the first integer in the\r\n * list of integers that matched a given integer \r\n */\r\n int result = -1;\r\n /**\r\n * result = -1 is one directly indicate the if there is \r\n * not one certain number in the list of integers \r\n */\r\n\r\n int index = 0;\r\n /**\r\n * this indicates that we start to search at position 0 \r\n */\r\n while (index < values.size() && result < 0) {\r\n if (target == values.get(index)) {\r\n result = index;\r\n } // if\r\n /**\r\n * this condition makes sure that we are searching in the list called \r\n * valus and if statement means once we find a numver which equal \r\n * to our target the result will equal to this index \r\n */\r\n index = index + 1;\r\n } // while\r\n return result;\r\n }", "public int indexOf(Object o) {\n\t\treturn getFirstOccurrence(o).index;\n\t}", "public static int binarySearch(int[] arr, int target){\n\t\tint start = 0;\n\t\tint end = arr.length - 1;\n\n\t\twhile (start <= end){\n\t\t\tint mid = (end + start) / 2;\n\t\t\tif(arr[mid] == target){\n\t\t\t\treturn mid;\n\t\t\t} else if(target < arr[mid]){\n\t\t\t\tend = mid - 1;\n\t\t\t} else if(target > arr[mid]){\n\t\t\t\tstart = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "static int lastIndexOf(char[] source, int sourceOffset, int sourceCount, char[] target, int targetOffset, int targetCount, int fromIndex) {\n\t\t/*\n\t\t * Check arguments; return immediately where possible. For consistency, don't check for null str.\n\t\t */\n\t\tint rightIndex = sourceCount - targetCount;\n\t\tif (fromIndex < 0) {\n\t\t\treturn -1;\n\t\t}\n\t\tif (fromIndex > rightIndex) {\n\t\t\tfromIndex = rightIndex;\n\t\t}\n\t\t/* Empty string always matches. */\n\t\tif (targetCount == 0) {\n\t\t\treturn fromIndex;\n\t\t}\n\n\t\tint strLastIndex = targetOffset + targetCount - 1;\n\t\tchar strLastChar = target[strLastIndex];\n\t\tint min = sourceOffset + targetCount - 1;\n\t\tint i = min + fromIndex;\n\n\t\tstartSearchForLastChar: while (true) {\n\t\t\twhile (i >= min && source[i] != strLastChar) {\n\t\t\t\ti--;\n\t\t\t}\n\t\t\tif (i < min) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tint j = i - 1;\n\t\t\tint start = j - (targetCount - 1);\n\t\t\tint k = strLastIndex - 1;\n\n\t\t\twhile (j > start) {\n\t\t\t\tif (source[j--] != target[k--]) {\n\t\t\t\t\ti--;\n\t\t\t\t\tcontinue startSearchForLastChar;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn start - sourceOffset + 1;\n\t\t}\n\t}", "static int search(int[] A, int target) {\n if(A==null||A.length==0) return -1;\n if(A.length==1) return A[0]==target?0:-1;\n int maxidx = findMaxPos(A);\n //find the partition position\n if(maxidx==A.length-1) return findPos(A,0,A.length-1, target);\n else if(A[A.length-1]>=target) return findPos(A, maxidx+1, A.length-1, target);\n else return findPos(A,0, maxidx, target);\n }", "public int find(int[] nums, int target, int start, int end){\n int middle = (start + end) / 2;\n\n while (start <= end){\n middle = (start + end) >> 1;\n if(nums[middle] == target){\n return middle;\n }\n else if(nums[middle] > target){\n end = middle - 1;\n }\n else {\n start = middle + 1;\n }\n }\n return -1;\n }", "public int searchInsert(int[] nums, int target) {\n\t if (nums == null)\n\t return -1;\n\t \n\t if (nums.length == 0 || target < nums[0])\n\t return 0;\n\t \n\t if (target > nums[nums.length-1])\n\t return nums.length;\n\t \n\t return binarySearch(nums, 0, nums.length-1, target);\n\t }", "public int search(String searchValue, LinkedList target, int start) {\n\t\t\n\t\treturn 1;\n\t}", "public int search(int[] nums, int target) {\n int left = 0;\n int right = nums.length - 1;\n while (left < right) {\n int mid = (left + right) / 2;\n if (nums[mid] > nums[right]) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n int pivot = left;\n left = 0;\n right = nums.length - 1;\n while (left <= right) {\n int mid = (left + right) / 2;\n int realmid = (mid + pivot) % nums.length;\n if (nums[realmid] == target) {\n return realmid;\n } else if (nums[realmid] < target) {\n left = mid + 1;\n } else {\n right = mid - 1;\n }\n }\n return -1;\n }", "public static int binarySearch(int[] numbers, int target) {\n int min = 0;\n int max = numbers.length - 1;\n \n while (min <= max) {\n int mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid; // found it!\n } else if (numbers[mid] < target) {\n min = mid + 1; // too small\n } else { // numbers[mid] > target\n max = mid - 1; // too large\n }\n }\n \n return -1; // not found\n }", "public static int getIndexWithLinearSearch(String targetName, List<String> names) {\n\t\tnumComparisons = 0;\n\t\tfor (int i = 0; i < names.size(); i++) {\n\t\t\tif (names.get(i).equalsIgnoreCase(targetName)) {\n\t\t\t\treturn i;\n\t\t\t} else {\n\t\t\t\tnumComparisons++;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int searchInsert(int[] nums, int target) {\n\t\t return binarySearch(nums, target, 0, nums.length-1);\n\t }", "@Override\n public int indexOf(Object o) {\n Node n = this.head;\n int i = 0;\n while (n != null) {\n if (o.equals(n.getData())) {\n return i;\n }\n i++;\n n = n.next;\n }\n return -1;\n }", "static int question2(int target, int[] arr) {\r\n\t\treturn binarySearch(arr, arr[0], arr[arr.length-1], target);\r\n\t}", "public int strStr(String source, String target) {\n // write your code here\n if (source == null || target == null) {\n return -1;\n }\n int m = source.length();\n int n = target.length();\n for (int i = 0; i + n <= m; i++) {\n int j = 0;\n for (; j < n; j++) {\n if (source.charAt(i + j) != target.charAt(j)) {\n break;\n }\n }\n if (j == n) {\n return i;\n }\n }\n return -1;\n }", "public static int getIndexWithBinarySearch(String targetName, List<String> names) {\n\t\tnumComparisons = 0;\n\t\tint low = 0;\n\t\tint high = names.size() - 1;\n\t\twhile (low <= high) {\n\t\t\tint middle = low + (high - low) / 2;\n\t\t\t\n\t\t\tint compare = targetName.compareTo(names.get(middle));\n\t\t\t\n\t\t\t// Check if targetName is present at mid\n\t\t\tif (compare == 0) {\n\t\t\t\tnumComparisons++;\n\t\t\t\treturn middle;\n\t\t\t}\n\t\t\t\n\t\t\t// If targetName greater, ignore left half\n\t\t\tif (compare > 0) {\n\t\t\t\tnumComparisons++;\n\t\t\t\tlow = middle + 1;\n\t\t\t}\n\t\t\t\n\t\t\t// If targetName is smaller, ignore right half\n\t\t\telse {\n\t\t\t\tnumComparisons++;\n\t\t\t\thigh = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "public int binarySearch(int[] nums, int target) {\n // write your code here\n if (nums == null || nums.length == 0) return -1;\n int start = 0, end = nums.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) {\n end = mid;\n }\n else if (nums[mid] < target) {\n start = mid;\n }\n else {\n end = mid;\n }\n }\n if (nums[start] == target) return start;\n if (nums[end] == target) return end;\n return -1;\n }", "public static int searchInMountainArray(int[] arr, int target){\n int indexOfPeak = peakIndexInMountainArray(arr);\n\n int firstIndex = BinarySearch(arr, target, 0, indexOfPeak);\n if(firstIndex != -1){\n return firstIndex;\n }\n //try to search in second half.\n return BinarySearch(arr, target, indexOfPeak, arr.length-1);\n }", "public static int searchInsert(int[] nums, int target) {\n\t\tif (nums == null || nums.length <= 0)\n\t\t\treturn -1;\n\t\tif (nums[nums.length - 1] < target)\n\t\t\treturn nums.length;\n\t\treturn searchInsert(nums, 0, nums.length - 1, target);\n\t}", "public static int searchInsert(int[] nums, int target) {\n if(target< nums[0])\n return 0;\n if(target>nums[nums.length-1])\n return nums.length;\n int l=0, mid, h=nums.length-1;\n while(l<nums.length && h<nums.length && l<=h) {\n mid = l+(h-l)/2;\n if(nums[mid]==target)\n return mid;\n else if(target<nums[mid])\n h=mid-1;\n else if(target>nums[mid])\n l=mid+1;\n }\n if(nums[l]>target)\n return l;\n else\n return l+1;\n }", "private int findIndexOfGivenObject(Object o) {\n\n for(int i = 0; i < size(); i++) {\n if(content[i].equals(o)) {\n return i;\n }\n }\n\n return -1;\n }", "public int indexOf(Object o);", "static int BinarySearch(int[] arr, int target, int start, int end) {\n boolean isAsc = arr[start] < arr[end];\n\n while(start <= end) {\n // find the middle element\n// int mid = (start + end) / 2; // might be possible that (start + end) exceeds the range of int in java\n int mid = start + (end - start) / 2;\n\n if (arr[mid] == target) {\n return mid;\n }\n\n if (isAsc) {\n if (target < arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n } else {\n if (target > arr[mid]) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n }\n return -1;\n }", "public int searchBigSortedArray(ArrayReader reader, int target) {\n int start = 0, end = start + 2;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (reader.get(mid) < target) {\n start = mid;\n end *= 2;\n }\n else {\n end = mid;\n }\n }\n if (reader.get(start) == target) return start;\n if (reader.get(end) == target) return end;\n return -1;\n }", "public static int binarySearch2(int[] numbers, int target) {\n int min = 0;\n int max = numbers.length - 1;\n \n int mid = -1;\n while (min <= max) {\n mid = (max + min) / 2;\n if (numbers[mid] == target) {\n return mid; // found it!\n } else if (numbers[mid] < target) {\n min = mid + 1; // too small\n } else { // numbers[mid] > target\n max = mid - 1; // too large\n }\n mid = (max + min) / 2;\n }\n \n return -min - 1; // not found\n }", "public int searchInsert(int[] A, int target) {\n if (A.length == 0 || A == null) {\n return -1;\n }\n if (target < A[0]) {\n return 0;\n }\n\n int start = 0;\n int end = A.length - 1;\n int mid;\n\n // Binary search:\n while ((start + 1) < end) {\n mid = start + (end - start) / 2;\n if (A[mid] == target) {\n return mid;\n } else if (A[mid] < target) {\n start = mid;\n } else if (A[mid] > target) {\n end = mid;\n }\n }\n\n // Now that target should be\n // 1.equals start or end. Then the index of start/end should be returned\n if (A[start] == target) {\n return start;\n }\n if (A[end] == target) {\n return end;\n }\n // 2. larger than end. Then it should be inserted after end. So index is end + 1.\n if (A[end] < target) {\n return end + 1;\n }\n // 3. larger than start but smaller than end. Should be inserted after start. So index is start + 1.\n return start + 1;\n }", "public int search(int[] A, int target) {\n\n int start = 0;\n int end = A.length - 1;\n int mid;\n\n while (start + 1 < end) {\n mid = start + (end - start) / 2;\n if (A[mid] == target) {\n return mid;\n }\n if (A[start] < A[mid]) {\n // situation 1, red line\n if (A[start] <= target && target <= A[mid]) {\n end = mid;\n } else {\n start = mid;\n }\n } else {\n // situation 2, green line\n if (A[mid] <= target && target <= A[end]) {\n start = mid;\n } else {\n end = mid;\n }\n }\n } // while\n\n if (A[start] == target) {\n return start;\n }\n if (A[end] == target) {\n return end;\n }\n return -1;\n }", "public int indexOf(O o)\r\n {\r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n if (vi.getObject().equals(o)) return i;\r\n vi = vi.getNext();\r\n }\r\n return -1;\r\n }", "private static int firstGreaterEqual(int[] A, int target) {\n int low = 0, high = A.length;\n while (low < high) {\n int mid = low + ((high - low) >> 1);\n //low <= mid < high\n if (A[mid] < target) {\n low = mid + 1;\n } else {\n //should not be mid-1 when A[mid]==target.\n //could be mid even if A[mid]>target because mid<high.\n high = mid;\n }\n }\n return low;\n }", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "String getFirstIndex();", "public int search(int[] A, int target) {\n // write your code here\n if (A == null || A.length == 0) return -1;\n int start = 0, end = A.length - 1;\n while (start + 1 < end) {\n int mid = start + (end - start) / 2;\n if (A[mid] == target) return mid;\n if (A[mid] < A[start]) {\n if (target <= A[end] && target > A[mid]){\n start = mid;\n }\n else {\n end = mid;\n }\n }\n else {\n if (target >= A[start] && target < A[mid]) {\n end = mid;\n }\n else {\n start = mid;\n }\n }\n }\n if (A[start] == target) return start;\n if (A[end] == target) return end;\n return -1;\n }", "public int searchInsert(int[] A, int target) {\n return helper(A,target, 0, A.length-1);\n }", "public int searchInsert(int[] A, int target) {\n if(A.length == 0)\n {\n return 0;\n }\n \n return binarySearch(A, 0, A.length - 1, target);\n }", "private static int binary_Search(int[] arr, int target) {\n\n\t\tint low = 0;\n\t\tint high = arr.length - 1;\n\n\t\twhile (low <= high) {\n\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tSystem.out.println(\"low = \" + low + \" mid = \" + mid + \" high =\" + high);\n\t\t\tif (arr[mid] == target) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\tif (arr[mid] < target) {\n\t\t\t\tlow = mid + 1;\n\n\t\t\t} else {\n\t\t\t\thigh = mid - 1;\n\t\t\t}\n\n\t\t\t// System.out.println(\"low = \" + low + \" high =\" + high);\n\t\t}\n\t\treturn -1;\n\t}", "public int indexOf(Object o) {\n int index = -1;\n for(int i = 0; i < size; i++) {\n if(list[i].equals(o)) {\n index = i; break;\n }\n }\n return index;\n }", "int indexOf(Advice advice);", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "public int searchInsert(int[] A, int target) {\n // write your code here\n if (A.length == 0) {\n return 0;\n }\n return findPosition(0, A.length - 1, A, target);\n }", "private Integer serialSearch() {\n int currentIndex = startIndex;\n for (int i = start; i < end; i++) {\n if (this.searchIndex == currentIndex) {\n return currentIndex;\n }\n currentIndex++;\n }\n return 0;\n }", "public static int binarySearchWithTheClosestNum(int[] num, int target) {\n\t\tint left = 0;\n\t\tint right = num.length - 1;\n\t\twhile (left <= right) {\n\t\t\tint middle = (left+right)/2;\n\t\t\tif (num[middle] == target) {\n\t\t\t\treturn middle;\n\t\t\t} else if (num[middle] < target) {\n\t\t\t\tleft = middle + 1;\n\t\t\t} else {\n\t\t\t\tright = middle - 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// when we reach here, means target is not in the array, so we need to find the closet element from num[left] or num[right]\n\t\t// notice that, right is smailler than left now, according to the while condition, if it breaks, left > right\n\t\treturn Math.abs(target - num[left]) > Math.abs(target - num[right]) ? right : left;\n\t}", "int indexOf(int val);", "public static int binarySearch(String[] strings,\n String target) {\n int min = 0;\n int max = strings.length - 1;\n \n while (min <= max) {\n int mid = (max + min) / 2;\n int compare = strings[mid].compareTo(target);\n if (compare == 0) {\n return mid; // found it!\n } else if (compare < 0) {\n min = mid + 1; // too small\n } else { // compare > 0\n max = mid - 1; // too large\n }\n }\n \n return -1; // not found\n }", "public void search(int target){\n\t\t\n\t\tint position = 0;\n\t\tfor(Node temp = head; temp != null; temp = temp.next){ // loops through list to find the node\n\t\t\tif(temp.data == target){\n\t\t\t\tSystem.out.println(target + \" was found at position \" + position);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tposition++;\n\t\t}\n\t\tSystem.out.println(target + \" was not found\"); // printed if node was not found\n}", "private static int[] searchRange2(int[] nums, int target) {\n int targetPos = findTargetPosition(nums, target);\n if (targetPos == -1) {\n return new int[] {-1, -1};\n }\n int leftPos = findLeftTargetPos(nums, target, targetPos);\n int rightPos = findRightTargetPos(nums, target, targetPos);\n\n return new int[] {leftPos, rightPos};\n }", "public int getShortestDistance(final Node source, final Node target) {\n return D[source.id][target.id];\n }", "public int indexOf(Object o) {\n\t\tfor(int i = 0; i < size; i++) {\r\n\t\t\tif(getNode(i).getData().equals(o))\r\n\t\t\t\treturn i;\r\n\t\t} return -1;\r\n\t}", "public int[] searchRange(int[] nums, int target) {\n final int len = null != nums ? nums.length : 0;\n if (len <= 0) {\n return new int[]{-1, -1};\n }\n \n int[] result = new int[2];\n int start = 0, end = len-1, idx = -1;\n int mid = 0;\n while (start <= end) {\n mid = start + ((end - start) >> 1);\n if (nums[mid] == target) {\n idx = mid;\n }\n if(nums[mid] >= target){\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n result[0] = idx;\n \n //reset start and end value\n start = 0;\n end = len-1;\n idx = -1;\n while (start <= end) {\n mid = start + ((end - start) >> 1);\n if (nums[mid] == target) {\n idx = mid;\n }\n if(nums[mid] <= target){\n start = mid + 1;\n }else{\n end = mid - 1;\n }\n }\n result[1] = idx;\n return result;\n }", "private int indexOf(Object o) {\n int current = 0;\n while (current < size && !(data[current].equals(o))) {\n ++current;\n }\n return current == size ? -1 : current;\n }", "public static int binarySearch(int[] ary, int target, int start, int end){\r\n\t\t//get the middle index\r\n\t\tint middle = (end-start)/2 + start;\r\n\t\tint result = 0;\r\n\t\t\r\n\t\t//Some end cases (error, out of scope, etc)\r\n\t\tif(end-start<0||target<ary[0]||target>ary[ary.length-1])\r\n\t\t\t\r\n\t\t\t//If element is not in the array display \r\n\t\t\treturn -1;\r\n\r\n\r\n\t\t//Recursive case 1: If target is less than, the next search occurs within start and middle-1\r\n\r\n\t\tif (target < ary[middle]) {\r\n\t\t\tresult = binarySearch(ary, target, start, middle-1 );\r\n\t\t}\r\n\t\t\r\n\t\t//Recursive case 2: If target is greater than, the next search occurs within middle+1 and end \r\n\t\telse if(target > ary[middle]) {\r\n\t\t\tresult = binarySearch(ary, target, middle+1, end);\r\n\t\t\r\n\t\t//End cases: If target is equal, done.\r\n\t\t}\r\n\t\telse if (target == ary[middle]) {\r\n\t\t\tresult = middle;\r\n\t\t}\r\n\r\n\t\t//Return results\r\n\t\treturn result;\r\n\t}", "public T find (T target);", "private int getPosition(int[][] matrix, int target) {\n int rows = matrix.length;\n int columns = matrix[0].length;\n // Indices to traverse the matrix\n int i = rows - 1;\n int j = 0;\n // Position of the element\n int position = 0;\n // Loop until we are inside the boundary of the matrix\n while (i >= 0 && j < columns) {\n if (target >= matrix[i][j]) {\n position += i + 1;\n j++;\n } else {\n i--;\n }\n }\n return position;\n }", "@DISPID(-2147417088)\n @PropGet\n int sourceIndex();" ]
[ "0.734023", "0.72197896", "0.7042772", "0.6858031", "0.6847926", "0.675282", "0.66922545", "0.6614897", "0.65724534", "0.6451646", "0.6398589", "0.63589567", "0.63211673", "0.6315457", "0.63110554", "0.6220095", "0.6171932", "0.61569417", "0.61541945", "0.61190593", "0.60911167", "0.60887325", "0.60834664", "0.6065082", "0.6060905", "0.60575503", "0.6044005", "0.6028313", "0.5966439", "0.5966097", "0.59501", "0.5948947", "0.59422696", "0.5933601", "0.5928347", "0.59032315", "0.58958256", "0.58817714", "0.58810306", "0.5855239", "0.5812689", "0.58078754", "0.58069783", "0.579909", "0.5797737", "0.57961607", "0.5789385", "0.57755405", "0.5770131", "0.5745126", "0.5739598", "0.5734771", "0.5731481", "0.57262665", "0.57250136", "0.5704346", "0.5703574", "0.5662276", "0.56569636", "0.56558955", "0.56536144", "0.5646133", "0.5632002", "0.56316745", "0.5628615", "0.5614331", "0.56140846", "0.5600204", "0.55963886", "0.5571221", "0.55669665", "0.556542", "0.5548983", "0.5548983", "0.5548983", "0.5548983", "0.5548983", "0.5548983", "0.5548983", "0.5548983", "0.5548983", "0.5548983", "0.5548983", "0.5548983", "0.5548983", "0.55476516", "0.55341357", "0.55279446", "0.5522541", "0.55138415", "0.5507006", "0.5504145", "0.5497533", "0.54956365", "0.5492088", "0.5487176", "0.5484306", "0.54761785", "0.54691404", "0.54626316" ]
0.585802
39
TODO Autogenerated method stub
@Override public ErrorType pseudoDelete(String search, SearchBy searchBy) { return null; }
{ "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
Todo1 add the newly added todo to the database
@Override public void addTodo(Todo todo) { todos.add(todo); adapter.notifyDataSetChanged(); dismissFragment(); //this will remove the dialog from screen }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean addTodo(Todo todo) {\n\t\tString sql=\"insert into todo(user_id,heading,subheading,details,datetime,active,done)\"+\" values(?,?,?,?,?,?,?)\";\n\t\ttry {\n\t\t\tPreparedStatement statement=connection.prepareStatement(sql);\n\t\t\tstatement.setInt(1,todo.getUser_idInt());\n\t\t\tstatement.setString(2,todo.getHeadingString());\n\t\t\tstatement.setString(3,todo.getSubheadingString());\n\t\t\tstatement.setString(4,todo.getDetailsString());\n\t\t\tstatement.setTimestamp(5,todo.getDatetimeTimestamp());\n\t\t\tstatement.setShort(6, todo.getActiveShort());\n\t\t\tstatement.setShort(7,todo.getDoneShort());\n\t\t\tint rows=statement.executeUpdate();\n\t\t\tif(rows>0) {\n\t\t\t\tSystem.out.println(\"Successfully inserted:\"+todo.getHeadingString());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Not added\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "public void add(String name, String newToDo)\n {\n if (newToDo == null || name == null || newToDo.length() == 0 || name.length() == 0 )\n return;\n try {\n //Open a connection and create a statement and query.\n Connection con = ConnectDB();\n PreparedStatement prepStmt;\n \n //With NULL for an integer unique value, SQLite will automatically pick the next biggest integer for\n //the REFERENCE number\n String query = \"INSERT INTO TASKS VALUES(NULL, ?, ?, '0')\";\n prepStmt = con.prepareStatement(query);\n \n prepStmt.setString(1,name);\n prepStmt.setString(2, newToDo);\n \n prepStmt.executeUpdate();\n } catch (SQLException ex) {\n Logger.getLogger(SQLConnect.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public TodoDto addTodo(TodoDto todo)\n {\n Todo model = new Todo();\n model.setTitle(todo.getTitle());\n model.setDescription(todo.getDescription());\n model.setFinished_quantity(todo.getFinished_quantity());\n model.setTotal_quantity(todo.getTotal_quantity());\n todo.setId(dao.addTodo(model).getId());\n return todo;\n }", "public Todo addTodoAndGetIt(Todo todo) {\n\t\tString sql=\"insert into todo(user_id,heading,subheading,details,datetime,active,done)\"+\" values(?,?,?,?,?,?,?)\";\n\t\ttry {\n\t\t\tPreparedStatement statement=connection.prepareStatement(sql,Statement.RETURN_GENERATED_KEYS);\n\t\t\tstatement.setInt(1,todo.getUser_idInt());\n\t\t\tstatement.setString(2,todo.getHeadingString());\n\t\t\tstatement.setString(3,todo.getSubheadingString());\n\t\t\tstatement.setString(4,todo.getDetailsString());\n\t\t\tstatement.setTimestamp(5,todo.getDatetimeTimestamp());\n\t\t\tstatement.setShort(6, todo.getActiveShort());\n\t\t\tstatement.setShort(7,todo.getDoneShort());\n\t\t\tint rows=statement.executeUpdate();\n\t\t\tif(rows>0) {\n\t\t\t\tResultSet rs = statement.getGeneratedKeys();\n\t\t\t\tif(rs.next()) {\n\t\t\t\t\tSystem.out.println(\"-----------\");\n\t\t\t\t\tSystem.out.println(\"-----------\");\n\t\t\t\t\tSystem.out.println(rs.getLong(1));\n\t\t\t\t\tSystem.out.println(\"-----------\");\n\t\t\t\t\tSystem.out.println(\"-----------\");\n\t\t\t\t\tTodo createdTodo=getTodoById((int)rs.getLong(1));\n\t\t\t\t\tcreatedTodo.setTodo_idInt((int)rs.getLong(1));\t\n\t\t\t\t\tSystem.out.println(\"Successfully inserted:\"+todo.getHeadingString());\n\t\t\t\t\treturn createdTodo;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Not added\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public int addTodo(Todo t) throws SQLException{\n \n \n String sql = \"INSERT INTO todos (task, difficulty, dueDate, status) VALUES (?, ?, ?, ?)\";\n\n PreparedStatement statement = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n\n statement.setString(1, t.getTask());\n statement.setInt(2, t.getDifficulty());\n statement.setDate(3, t.getDueDate());\n statement.setString(4, t.getStatus().toString());\n\n statement.executeUpdate(); //SQLException\n\n //obtain ID of the newly inserted record if you need to\n ResultSet rs = statement.getGeneratedKeys();\n \n if(rs.next()){\n int lastInsertedId = rs.getInt(1);\n return lastInsertedId;\n }\n //return -1; // not good choice without any documentation\n throw new SQLException(\"Id after insert not found\");\n }", "public void insertToDoList(Context context, String title) {\n\n // insert in to database\n ToDoListDbHelper toDoListDbHelper = new ToDoListDbHelper(context);\n long listId = toDoListDbHelper.insert(title);\n\n // insert into list of lists\n ToDoList toDoList = new ToDoList(listId, title);\n toDoListList.add(toDoList);\n\n }", "public void addToList(View view) {\n Items newItem = new Items();\n EditText ETNew = (EditText) findViewById(R.id.ETNew);\n newItem.todo = ETNew.getText().toString();\n newItem.done = false;\n helper.create(newItem);\n Toast.makeText(this, \"Item added\", Toast.LENGTH_SHORT).show();\n adaptList2();\n ETNew.setText(\"\");\n ETNew.setHint(\"my new to-do\");\n }", "public void addToDo() {\n\n ToDoDBContract.ToDoListDbHelper dbHelper = new ToDoDBContract.ToDoListDbHelper(context);\n\n String name = et_name.getText().toString(); // gets the name the user has entered in the et_name edit text\n\n // If the name is null or empty, alert the user that they must enter a name\n if (name.equals(null) || name.equals(\"\")) {\n Log.d(\"ERROR\", \"name is not valid\", null);\n AlertDialog alertDialog = new AlertDialog.Builder(context)\n .setMessage(R.string.dialog_message_input_error_name)\n .setTitle(R.string.dialog_title_input_error_name)\n .setPositiveButton(\"Ok!\", null).create();\n alertDialog.show();\n } else {\n // If the name was NOT null or empty, create a new ToDoItem with the valid to-do name entered by the user\n ToDoItem addToDo = new ToDoItem(name);\n String note = et_note.getText().toString();\n\n // Get the other inputs from the use and make sure they are not null or invalid\n // If not null or invalid, set the ToDoItem's instance variables to the corresponding inputs\n if (!note.equals(null) || !note.equals(\"\")) {\n addToDo.setNote(note);\n }\n if (dueDateDate != null) {\n if (dueDateDate.getTime() > 0)\n addToDo.setDueDate(dueDateDate);\n } else {\n addToDo.setDueDate(null);\n }\n if (alarmDate != null) {\n if (alarmDate.getTimeInMillis() > 0)\n addToDo.setAlarmDate(new Date(alarmDate.getTimeInMillis()));\n } else {\n alarmDate = null;\n addToDo.setAlarmDate(null);\n }\n dbHelper.insertNewToDo(addToDo); // add the to-do to the database\n\n // If the user set a valid alarm, schedule it.\n if (alarmDate != null && alarmDate.getTimeInMillis() > 0) {\n int alarmID = dbHelper.getID(addToDo);\n Intent intent = new Intent(context, ToDoAlarmReceiver.class);\n intent.putExtra(\"ToDoName\", name);\n intent.putExtra(\"AlarmID\", alarmID);\n Log.d(TAG, \"alarm id = \" + alarmID);\n AlarmManager alarm = (AlarmManager) getContext().getSystemService(Context.ALARM_SERVICE);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0);\n alarm.setExactAndAllowWhileIdle(AlarmManager.RTC_WAKEUP, alarmDate.getTimeInMillis(), pendingIntent);\n }\n\n // Make a toast confirming that the to do has been added and redirect back to the ToDoFragment\n Toast.makeText(context, \"To do \\\"\" + name + \"\\\" added\", Toast.LENGTH_LONG).show();\n ToDoFragment newFragment = new ToDoFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.fragment_container, newFragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }\n }", "public static void addOrUpdateTodo(TodoItem todoItem) {\n FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser();\n if (currentUser == null) {\n return;\n }\n\n DatabaseReference db = FirebaseDatabase.getInstance().getReference();\n if (todoItem.getUid() == null || TextUtils.isEmpty(todoItem.getUid().trim())) {\n // New TO-DO to be added\n todoItem.setUid(db.child(currentUser.getUid()).push().getKey());\n todoItem.setCompleted(false);\n }\n\n // db.child(TODO_DATA).child(todoItem.getUid()).setValue(todoItem);\n // Add to-do for particular user\n db.child(currentUser.getUid()).child(todoItem.getUid()).setValue(todoItem);\n }", "public void addNewToDo(String description) {\n Todo todo = new Todo(description);\n taskList.add(todo);\n printSuccessfulAddMessage(todo.toString());\n }", "public void addItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n\n db.insert(TABLE_NAME, null, values); //Insert query to store the record in the database\n db.close();\n\n }", "public Long insertData(ToDo toDo) {\n SQLiteDatabase db = myDBHelper.getWritableDatabase();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n Date date = toDo.getDate();\n ContentValues values = new ContentValues();\n values.put(myDBHelper.COLUMN_NAME, toDo.getName());\n values.put(myDBHelper.COLUMN_DESCRIPTION, toDo.getDescription());\n values.put(myDBHelper.COLUMN_DATE, dateFormat.format(date));\n values.put(myDBHelper.COLUMN_TYPE, toDo.getType());\n values.put(myDBHelper.COLUMN_PROGRESS, toDo.getProgress());\n values.put(myDBHelper.COLUMN_ISDONE, toDo.getIsdone());\n values.put(myDBHelper.COLUMN_PARENTID, toDo.getParentId());\n\n Long id = db.insert(myDBHelper.TABLE_NAME, null, values);\n return id;\n }", "public Todo create(long todoId);", "@PostMapping(\"/addToDoItem\")\n\tpublic String addToDoItem(@ModelAttribute(\"toDoListForm\") ToDoList toDoListForm) {\n\n\t\tloggedUser = userService.findLoggedUser(); // Access the logged user.\n\n\t\ttoDoListForm.setUser(loggedUser);\n\n\t\ttoDoListForm.setLastUpdate(getDateTime());\n\n\t\ttoDoListService.save(toDoListForm); // Save a new to do list\n\n\t\treturn \"redirect:/welcome\";\n\t}", "public String addTodo(String description) {\n Todo toAdd = new Todo(description);\n records.add(toAdd);\n return String.format(\"Got it. I've added this todo:\\n\\t %1$s \\n\\t\" +\n \"Now you have %2$d tasks in the list.\\n\\t\", toAdd.toString(), records.size());\n }", "@RequestMapping(value = \"/api/todo-items\", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n\tpublic TodoItem createTodoItem(@RequestBody TodoItem todoItem) {\n\n\t\tSystem.out.println(\"Creating new task :\" + todoItem.getDescription());\n\n\t\treturn todoItemService.create(todoItem);\n\t}", "public void addTodoItem(TodoItem item) {\n todoItems.add(item);\n }", "public void addToDo() throws StringIndexOutOfBoundsException {\n System.out.println(LINEBAR);\n try {\n String taskDescription = userIn.substring(TODO_HEADER);\n ToDo todo = new ToDo(taskDescription);\n tasks.add(todo);\n storage.writeToFile(todo);\n ui.echoUserInput(todo, tasks.taskIndex);\n } catch (StringIndexOutOfBoundsException e) {\n ui.printStringIndexOOB();\n }\n System.out.println(LINEBAR);\n }", "public void add(Task t)\n {\n\ttoDo.add(t);\n }", "public void AddTaskToDB(View view){\n\t\tif (TASK_CREATED == true){\n\t\t\tString name = taskName.getText().toString();\n\t\t\tString desc = taskDescription.getText().toString();\n//\t\t\tlong millisecondsToReminder = 0;\n\t\t\tlong millisecondsToCreated = 0;\n//\t\t\tyear = taskDatePicker.getYear();\n//\t\t\tmonth = taskDatePicker.getMonth() + 1;\n//\t\t\tday = taskDatePicker.getDayOfMonth();\n//\t\t\thour = taskTimePicker.getCurrentHour();\n//\t\t\tminute = taskTimePicker.getCurrentMinute();\n\t\t\ttry {\n\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\tDate dateCreated = cal.getTime();\n\t\t\t\tmillisecondsToCreated = dateCreated.getTime();\n//\t\t\t\tString dateToParse = day + \"-\" + month + \"-\" + year + \" \" + hour + \":\" + minute;\n//\t\t\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"d-M-yyyy hh:mm\");\n//\t\t\t\tDate date = dateFormatter.parse(dateToParse);\n//\t\t\t\tmillisecondsToReminder = date.getTime();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} // You will need try/catch around this\n\n\t\t\tBujoDbHandler taskHandler = new BujoDbHandler(view.getContext());\n\t\t\tcurrentTask = new Task(name, desc, millisecondsToCreated);\n\t\t\ttaskHandler.addTask(currentTask);\n\t\t}\n\t}", "private void doAddTask() {\n System.out.println(\n \"Kindly enter the time, description and date of the task you would like to add on separate lines.\");\n String time = input.nextLine();\n String description = input.nextLine();\n String date = input.nextLine();\n todoList.addTask(new Task(time,description,date));\n System.out.println(time + \" \" + description + \" \" + date + \" \" + \"has been added.\");\n }", "public Task addTodo(String specifications) throws DukeException {\n Task newTask = new ToDo(specifications);\n tasks.add(newTask);\n return newTask;\n }", "public boolean updateTodo(TodoDto todo)\n {\n Todo model = new Todo();\n model.setTitle(todo.getTitle());\n model.setTotal_quantity(todo.getTotal_quantity());\n model.setDescription(todo.getDescription());\n model.setVersion(todo.getVersion());\n model.setId(todo.getId());\n model.setFinished_quantity(todo.getFinished_quantity());\n dao.updateTodo(model);\n return false;\n }", "public void addTask(View v) {\n int taskId = Integer.parseInt(txtId.getText().toString());\n String tskName = txtTaskName.getText().toString();\n String taskDesc = txtTaskDescription.getText().toString();\n ContentValues values = new ContentValues();\n values.put(\"taskId\", taskId);\n values.put(\"taskName\", tskName);\n values.put(\"taskDescription\", taskDesc);\n try {\n taskManager.addTask(values);\n Toast.makeText(this, \"Data Inserted\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }", "private void newTodo() {\r\n String myTodoName = \"Unknown\";\r\n for (Component component : panelSelectFile.getComponents()) {\r\n if (component instanceof JTextField) {\r\n if (component.getName().equals(\"Name\")) {\r\n JTextField textFieldName = (JTextField) component;\r\n myTodoName = textFieldName.getText();\r\n }\r\n }\r\n }\r\n if (myTodoName == null || myTodoName.isEmpty()) {\r\n JOptionPane.showMessageDialog(null, \"New Todo List name not entered!\");\r\n return;\r\n }\r\n myTodo = new MyTodoList(myTodoName);\r\n int reply = JOptionPane.showConfirmDialog(null, \"Do you want to save this todoList?\",\r\n \"Save New Todolist\", JOptionPane.YES_NO_OPTION);\r\n if (reply == JOptionPane.YES_OPTION) {\r\n saveTodo();\r\n }\r\n fileName = null;\r\n todoListGui();\r\n }", "public Todo addTodo(Long userId, Todo newTodo) throws UserNotFoundException {\n User owner = userService.getUser(userId);\n List<User> assignedUsers = userService.getAllUsersById(newTodo.getCreatedForIds());\n\n newTodo.setCreatedBy(owner);\n newTodo.setCreatedFor(assignedUsers);\n\n return todoRepository.save(newTodo);\n }", "public void create(Note newNote) {\n\t\t// TODO generate unique ID\n\n\t\tnewNote.setId(Long.valueOf(getNotes().size()));\n\n\t\tString sql = \"INSERT INTO todo VALUES ('\" + newNote.getId() + \"','\" + newNote.getName() + \"','\" + newNote.getAbbreviation() + \"','\" + newNote.getDescription() + \"' );\";\n\n\t\tList<Note> todos = sqlUpdate(sql);\n\t\tsetNotes(todos);\n\n\t\t// this.getHibernateTemplate().delete(project);\n\t}", "@Override\r\n public void add() {\n String ID =id.getText();\r\n String Name =name.getText();\r\n String form_date =date_start.getText();\r\n String to_date =date_finish.getText();\r\n String Status =status.getText();\r\n String MemberID = MemberId.getText();\r\n ArrayList<String> arr = new ArrayList<String>();\r\n arr.add(ID);\r\n arr.add(Name);\r\n arr.add(form_date);\r\n arr.add(to_date);\r\n arr.add(Status);\r\n arr.add(MemberID);\r\n String PathFile = \"/home/yara/Documents/4year/OODP/Task.txt\";\r\n FileFacade facade = new FileFacade();\r\n facade.Add(PathFile, arr);\r\n }", "@Test\r\n\tpublic void testAddTask() {\n\t\ttodo.addTask(new Task(\"Test task1\"));\r\n\t\t\r\n\t\tCollection<Task> col = todo.getAllTasks();\r\n\t\tassertTrue(\"Expected collectioon to contain 1 task object\", col.size() == 1);\t\t\r\n\t\t\r\n\t\tTask[] tasks = new Task[] {};\r\n\t\tTask t = col.toArray(tasks)[0];\r\n\t\t\r\n\t\tassertEquals(\"Test task1\", t.getDescription());\t\t\r\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String task = String.valueOf(taskEditText.getText());\n SQLiteDatabase db = OpenDB.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(AccessData.ToDoEntry.todo_title, task);\n db.insertWithOnConflict(AccessData.ToDoEntry.table,\n null,\n values,\n SQLiteDatabase.CONFLICT_REPLACE);\n db.close();\n updateUI(); /* Updating the todo list with new changes made to the database, and displaying it on screen. */\n }", "public void addTask(Task task){\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID, task.getId());\n values.put(KEY_LABEL, task.getLabel());\n values.put(KEY_TIME, task.getTime());\n db.insert(TABLE_NAME, null, values);\n db.close();\n }", "public void btnAddClicked(View view){\n List list = new List(input.getText().toString());\n dbHandler.addProduct(list);\n printDatabase();\n }", "public void addTask(View view) {\n // Model of the list data\n ListModel model = ListModel.getInstance();\n\n // String for the date in \"mm/dd/yyyy\" format\n String date;\n\n // Get the name of the task\n EditText text = (EditText) findViewById(R.id.taskInput);\n String taskName = text.getText().toString();\n\n // Add list to model\n model.addTask(listName, taskName);\n\n\n // Return to the single list activity\n Log.i(TAG, \"Creating intent to return to the single list activity\");\n Intent intent = new Intent(this, SingleListActivity.class);\n intent.putExtra(Extra.LIST, listName);\n Log.i(TAG, \"Intent created with extra message (list name).\");\n Log.i(TAG, \"Starting single list activity\");\n startActivity(intent);\n }", "public void addTask(View v) {\n EditText field = (EditText) findViewById(R.id.list_edittext);\n String task = field.getText().toString().trim();\n\n // Do not add empty tasks\n if(!task.equals(\"\")) {\n database.addTask(task);\n field.setText(\"\");\n Toast.makeText(this, String.format(getResources().getString(R.string.list_add_toast),\n task), Toast.LENGTH_LONG).show();\n }\n }", "public long addTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_TASKNAME, task.getTaskName()); // task name\n // status of task- can be 0 for not done and 1 for done\n values.put(KEY_STATUS, task.getStatus());\n values.put(KEY_DATE,task.getDateAt());\n\n // Inserting Row\n long task_id= db.insert(TABLE_TASKS, null, values);\n // insert row\n\n return task_id;\n\n }", "protected void add(HttpServletRequest request) throws ClassNotFoundException, SQLException{\n if(!request.getParameter(\"nome\").equals(\"\")){\n //Adiciona pessoa\n PessoaDAO dao = new PessoaDAO(); \n //String acao = request.getParameter(\"add\");\n int id = 0;\n for(Pessoa t:dao.findAll()){\n id =t.getId();\n }\n id++; \n Pessoa p = new Pessoa(new Integer((String)request.getParameter(\"id\")),request.getParameter(\"nome\"),request.getParameter(\"telefone\"),request.getParameter(\"email\"));\n dao.create(p);\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n Log.i(TAG, \"Got a result back from the add activity.\");\n // We need to make sure the requestCode matches the task that we asked for above.\n // If result is OK - We have something we need to look at.\n if (requestCode == TODO_ADDED && resultCode == RESULT_OK) {\n // Get the string value that has the ID entered in the parameter.\n DatabaseManager.toDoItemHelper().addToDo(data.getStringExtra(AddToDoActivity.ToDo_Desc));\n this.toDoFragment.refreshToDos(this.drawerPosition);\n }\n }", "@Override\n\tpublic ResultWrapper<Todos> save(Todos todos) {\n\t\tResultWrapper<Todos> rs = new ResultWrapper<Todos>();\n\t\tif (todos.getTitle() == null || todos.getTitle() == \"\") {\n\t\t\trs.error(todos, \"Title can not be empty\");\n\t\t\treturn rs;\n\n\t\t} else if (todos.getDescription() == null || todos.getDescription() == \"\") {\n\t\t\trs.error(todos, \"Description can not be empty\");\n\t\t\treturn rs;\n\t\t} \n\t\telse {\n\t\t\ttodos = todosRepo.save(todos);\n\t\t\trs.succeedCreated(todos);\n\t\t\treturn rs;\n\t\t}\n\t}", "public void add(@NonNull Context context, @NonNull Note newNote)\n {\n boolean closeDatabase = false;\n if (databaseClosed)\n {\n //the database will be opened by this call, set this to true to\n // ensure it is closed upon exit.\n closeDatabase = true;\n openDatabase(context);\n }\n addNewNoteQuery(newNote);\n if (closeDatabase)\n {\n noteDatabase.close();\n }\n }", "public void onClick_AddRecord(View v, String task, int status) {\n\t\t\n\t\t// insertRow() returns a long which is the id number\n\t\tlong newId = myDb.insertRow(task, status);\n\t\tpopulateListViewFromDB();\n\t\t\n\t\t\n\t}", "public void addFavourite(RecipeDbItem1 recipeDbItem1)\n {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID,recipeDbItem1.getID());\n values.put(KEY_TITLE,recipeDbItem1.getTitle());\n //insert a row\n db.insert(TABLE_FAVOURITES,null,values);\n db.close();\n //System.out.println(\"\\n Inserted into Favourites Table: \"+recipeDbItem1.getID()+\" \"+recipeDbItem1.getTitle());\n }", "public void createTask() {\n \tSystem.out.println(\"Inside createTask()\");\n \tTask task = Helper.inputTask(\"Please enter task details\");\n \t\n \ttoDoList.add(task);\n \tSystem.out.println(toDoList);\n }", "public long createToDo(String title, String name, String surname, String borndate, String city, String street, String number, String email, String phone, String gender, String attribute, int clientId, int status) {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(FeedEntry.COLUMN_TITLE, title);\r\n values.put(FeedEntry.COLUMN_NAME,name);\r\n values.put(FeedEntry.COLUMN_SURNAME,surname);\r\n values.put(FeedEntry.COLUMN_BORNDATE,borndate);\r\n values.put(FeedEntry.COLUMN_CITY,city);\r\n values.put(FeedEntry.COLUMN_STREET,street);\r\n values.put(FeedEntry.COLUMN_NUMBER,number);\r\n values.put(FeedEntry.COLUMN_EMAIL,email);\r\n values.put(FeedEntry.COLUMN_PHONE,phone);\r\n values.put(FeedEntry.COLUMN_GENDER,gender);\r\n values.put(FeedEntry.COLUMN_ATTRIBUTE, attribute);\r\n values.put(FeedEntry.COLUMN_CLIENT_ID, clientId);\r\n values.put(FeedEntry.COLUMN_CLIENT_STATUS, status);\r\n // insert row\r\n\r\n long todo_id = db.insert(FeedEntry.TABLE_NAME, null, values);\r\n\r\n return todo_id;\r\n }", "public void addToDoEntry(String toDoItem) {\n\t\t// adds a new item at the end of the list\n\t\ttoDoList.add(new ToDoEntry(toDoItem));\n\t}", "@Override\n public void onClick(View v) {\n TODO.deleteTodo(todo.getId());\n TODO.saveTodos(context);\n recreate();\n }", "public static void testAddTask(final Todoist todo, final String[] tokens) {\n try {\n todo.addTask(createTask(tokens));\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }", "public static void testAddTask(final Todoist todo, final String[] tokens) {\n try {\n todo.addTask(createTask(tokens));\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK && requestCode == REQUEST_CODE) {\n // Extract name value from result extras\n String description = data.getExtras().getString(\"todo_description\");\n Todo todo = new Todo(description);\n // Toast the name to display temporarily on screen\n //Toast.makeText(this, name, Toast.LENGTH_SHORT).show();\n todos.add(todo);\n }\n }", "public void addTask(Task task) {\n\t\tSystem.out.println(\"Inside createTask()\");\n\t\t\n\t\ttoDoList.add(task);\n\t\tdisplay();\n\t}", "private void addTask(ToDoList toDoList, JSONObject jsonObject) {\n String name = jsonObject.getString(\"title\");\n LocalDate dueDate = LocalDate.parse(jsonObject.getString(\"dueDate\"));\n boolean complete = jsonObject.getBoolean(\"complete\");\n boolean important = jsonObject.getBoolean(\"important\");\n Task newTask = new Task(name, dueDate);\n newTask.setComplete(complete);\n newTask.setImportant(important);\n\n toDoList.addTask(newTask);\n }", "public void AddReliquias(){\n DLList reliquias = new DLList();\n reliquias.insertarInicio(NombreReliquia); \n }", "@Autowired\n private void instansierData() {\n todoRepository.save(new Todo(\"Handle melk på butikken\",false, \"04/09/2017\",\"10/10/2017\"));\n todoRepository.save(new Todo(\"Plukk opp barna i barnehagen\",false, \"05/09/2017\",\"10/10/2017\"));\n todoRepository.save(new Todo(\"Vask klær\",true, \"08/09/2017\",\"12/09/2017\"));\n }", "private void addNote(){\n DatabaseReference noteRef = mDB.getReference(\"Notes\");\n\n Long time = System.currentTimeMillis();\n\n Bundle bundleNote = new Bundle();\n bundleNote.putString(\"notesDetail\", notes.getText().toString());\n bundleNote.putString(\"notesTime\", time.toString());\n\n Note note = new Note(bundleNote);\n String currNoteKey;\n currNoteKey = noteRef.push().getKey();\n noteRef.child(LoginActivity.currUserID).child(currNoteKey).setValue(note);\n\n }", "public void addButtonClicked(View view) {\n\n Products product = new Products(johnsInput.getText().toString());\n\n dbHandler.addProduct(product);\n printDatabase();\n }", "public void onAddTaskButtonPressed(View view) {\n\t\tString taskName = taskNameField.getText().toString();\n\t\tif (taskName.equals(\"\"))\n\t\t\treturn;\n\t\ttaskNameField.setText(\"\");\n\t\ttodoList.addTask(taskName);\n\t}", "public ToDoCreate(User user) {\n\t\tthis.user = user;\n\t\tinit();\n\t}", "public String addToDo(String name) {\n USER_TASKS.add(new ToDo(name));\n return \" \" + USER_TASKS.get(USER_TASKS.size() - 1).toString();\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n\n Button addBtn = (Button)findViewById(R.id.add);\n addBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(getBaseContext(), AddNewTask.class);\n startActivity(intent);\n }\n });\n\n note_Singleton Notes = note_Singleton.getInstance(this);\n final ListView listView = (ListView) findViewById(R.id.listV_main);\n\n listView.setAdapter(new ItemListBaseAdapter(this, Notes.getItems()));\n ((BaseAdapter) listView.getAdapter()).notifyDataSetChanged();\n }", "public void addTodoModule(){\n final Dialog dialog = new Dialog(context);\n dialog.setContentView(R.layout.add_todomodule);\n dialog.setTitle(R.string.name_module_todo);\n\n Button cancel = (Button) dialog.findViewById(R.id.cancel);\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n Button validate = (Button) dialog.findViewById(R.id.validatenewmodule);\n validate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n TodoModuleService service = TodoModuleAPI.getInstance();\n service.addTodoModule(event.getId(),new Callback<Response>() {\n @Override\n public void success(Response s, Response response) {\n Toast.makeText(AddModule.this, \"Le module a bien été ajouté!\", Toast.LENGTH_SHORT).show();\n finish();\n }\n\n @Override\n public void failure(RetrofitError error) {\n error.printStackTrace();\n finish();\n }\n });\n dialog.dismiss();\n }\n });\n\n dialog.show();\n }", "public void add(String entry, int priority) {\n\t\tmy_DB = helper.getWritableDatabase();\n\t\tContentValues cv = new ContentValues();\n\t\tcv.put(\"entry\", entry);\n\t\tcv.put(\"priority\", priority);\n\t\tcv.put(\"finished\", 0);\n\t\tmy_DB.insert(\"todo\", null, cv);\n\t}", "public void registry(TodoItemForm todoItemForm) throws RecordNotFoundException {\n TodoItem todoItem = new TodoItem();\n if (todoItemForm.getId() != null) {\n todoItem = getTodoItemById(todoItemForm.getId());\n }\n todoItem.setItemName(todoItemForm.getItemName());\n todoItem.setDescription(todoItemForm.getDescription());\n todoItem.setTargetDate(Util.strToDt(todoItemForm.getTargetDate()));\n\n todoItemRepository.save(todoItem);\n }", "public void add(T ob) throws ToDoListException;", "@Override\n public void onClick(View view) {\n if (title.getText() == null || content.getText() == null) {\n Toast.makeText(getActivity(), \"Missing fields!\", Toast.LENGTH_SHORT).show();\n } else {\n viewModel.addTodo(new Todo(\n title.getText().toString(),\n content.getText().toString()\n ));\n title.getText().clear();\n content.getText().clear();\n Toast.makeText(getActivity(), \"Added Todo!\", Toast.LENGTH_SHORT).show();\n }\n }", "public static void addNewItem(String itemName,Context context){\n\t\tItem item=new Item();\n\t\titem.updateName(itemName);\n\t\titem.updateCheckmark(false);\n\t\titem.updateArchived(false);\n\t\tItemListController.getItemListInstance().add(item);\n\t\ttodoList.add(itemName);\n\t\tItemListManager.saveListItem(context);\n\t}", "public void addAgenda(AgendaItem agendaItem) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(KEY_AGENDA_NAME, agendaItem.getAgendaName()); // Agenda Name\n values.put(KEY_AGENDA_DATE, agendaItem.getAgendaDate()); // Agenda Name\n // Inserting Row\n db.insert(TABLE_AGENDA, null, values);\n\n db.close(); // Closing database connection\n\n\n }", "public void insert( View v ) {\n EditText nameEditText = ( EditText) findViewById( R.id.input_name );\n EditText dateEditText = (EditText) findViewById( R.id.input_date );\n String name = nameEditText.getText( ).toString( );\n String date = dateEditText.getText( ).toString( );\n\n // insert new candy in database\n try {\n Task task = new Task( 0, name, date );\n db.insert( task );\n Toast.makeText( this, \"Task added\", Toast.LENGTH_SHORT ).show( );\n } catch( NumberFormatException nfe ) {\n Toast.makeText( this, \"Task error\", Toast.LENGTH_LONG ).show( );\n }\n\n // clear data\n nameEditText.setText( \"\" );\n dateEditText.setText( \"\" );\n }", "@Test\n public void testDAM30204001() {\n {\n clearAndCreateTestDataForBook();\n }\n\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n // Connect to DB and fetch the Todo list\n TodoListPage todoListPage = dam3IndexPage.dam30204001Click();\n\n TodoRegisterPage registerTodoPage = todoListPage.registerTodo();\n\n registerTodoPage.setTodoId(\"0000000030\");\n registerTodoPage.setTodoCategory(\"CA2\");\n\n TodoDetailsPage todoDetailsPage = registerTodoPage\n .addTodoWithNullTitle();\n // confirm that the ToDo registered with null title is saved in DB\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000030\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA2\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"In-Complete\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/28\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"0\"));\n }", "private void addToTodoTaskGui(JLabel createLabelName, JLabel createLabelDescription,\r\n JLabel createLabelDueDate, JLabel createLabelPriority) {\r\n panelTask.add(createLabelName);\r\n panelTask.add(createLabelDescription);\r\n panelTask.add(createLabelDueDate);\r\n panelTask.add(createLabelPriority);\r\n panelTask.add(textFieldDueDate);\r\n\r\n panelTask.add(textFieldName);\r\n panelTask.add(textFieldDescription);\r\n panelTask.add(textFieldDueDate);\r\n panelTask.add(comboPriority);\r\n\r\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 }", "public void addButtonClicked(){\n Products products = new Products(buckysInput.getText().toString());\n dbHandler.addProduct(products);\n printDatabase();\n }", "public void navigateAddNewToDoPage() throws Exception {\n getLogger().info(\"Run createToDoPage()\");\n waitForClickableOfElement(createToDoBtnEle, \"create todo button.\");\n clickElement(createToDoBtnEle, \"click to createToDoBtnEle\");\n }", "public void add(ToDoItem item) {\n mItems.add(item);\n notifyDataSetChanged();\n }", "public ServiceClient2 createTODO(String title, String desc) {\n\t\tInstant time = Instant.now();\n\t\tTimestamp timestamp = Timestamp.newBuilder().setSeconds(time.getEpochSecond()).setNanos(time.getNano()).build();\n\n\t\ttodo = ToDo.newBuilder().setTitle(title).setDescription(desc).setReminder(timestamp).build();\n\n\t\treturn this;\n\t}", "public Todo dBObject2Todo(DBObject dbObject, Todo todo) {\n\n\t\tObject title = dbObject.get(\"title\");\n\t\tif(title != null) {\n\t\t\ttodo.setTitle(title.toString());\n\t\t}\n\t\n\t\tObject body = dbObject.get(\"body\");\n\t\tif(body != null) {\n\t\t\ttodo.setBody(body.toString());\n\t\t}\n\t\n\t\tObject done = dbObject.get(\"done\");\n\t\tif(done != null) {\n\t\t\ttodo.setDone(done.toString().contains(\"true\"));\n\t\t}\n\t\tString id = dbObject.get(\"_id\").toString();\n\t\tif(id != null) {\n\t\t\ttodo.setId(id);\n\t\t}\n\t\treturn todo;\n }", "public Triplet add(Triplet t) throws DAOException;", "void addNewEntry(BlogEntry entry) throws DAOException;", "public void addItemsToList(ArrayList<Todo> toDosToBeAdded, String fromListName){\n\t\tInteger lastItemIndex = toDosToBeAdded.size() - 1;\n\t\tfor (int i = lastItemIndex; i >= 0; i--){\n\n\t\t\tTodo todo = toDosToBeAdded.get(i);\n\t\t\t// if the todo is coming from the todolist we\n\t\t\t// we need to set it as an archived to do.\n\t\t\t// otherwise its come from the archive and\n\t\t\t// needs to be unarchived.\n\t\t\tif (fromListName == \"TODOLIST\"){\n\t\t\t\ttodo.setArchived(true);\n\t\t\t} else if (fromListName == \"ARCHIVEDTODOLIST\") { \n\t\t\t\ttodo.setArchived(false);\n\t\t\t} else {\n\t\t\t\t// this is a little akward I know\n\t\t\t\t// if the to do is coming from the input text\n\t\t\t\t// box setArchive does not need to be set\n\t\t\t\t// so we pass in an empty string to dodge the above\n\t\t\t\t// conditions\n\t\t\t}\n\t\t\tmTodos.add(0, todo);\n\t\t\tmAdapter.notifyDataSetChanged();\t\t\n\t\t}\n\t\t// update the save file\n\t\tDataLoader dataLoader = new DataLoader(getActivity(), \"TO_DO_DATA\");\n\t\tdataLoader.setData(mKeyNameForToDoList, mTodos);\n\t}", "@Test\n public void testDAM30102001() {\n\n // データ初期化\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n // Connect to DB and fetch the Todo list\n TodoListPage todoListPage = dam3IndexPage.dam30102001Click();\n\n // Open todo registration page\n TodoRegisterPage registerTodoPage = todoListPage.registerTodo();\n\n // input todo details\n registerTodoPage.setTodoId(\"0000000030\");\n registerTodoPage.setTodoCategory(\"CA2\");\n registerTodoPage.setTodoTitle(\"Todo 30\");\n\n TodoDetailsPage todoDetailsPage = registerTodoPage.addTodo();\n\n // assert all the properties of fetched record.\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 30\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000030\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA2\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"In-Complete\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/28\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"0\"));\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n\n if (requestCode == REQUEST_CREATE && resultCode == RESULT_OK && data != null) {\n Log.i(LOG_TAG, \"onActivityResult CREATE\");\n\n String text = data.getStringExtra(\"todo\");\n this._adapter.add(text);\n return;\n }\n\n if (requestCode == REQUEST_EDIT && data != null) {\n String original = data.getStringExtra(\"todo\");\n String updated = data.getStringExtra(\"todo_updated\");\n\n if (resultCode == EditActivity.RESULT_UPDATE) {\n Log.i(LOG_TAG, \"onActivityResult UPDATE\");\n\n this._adapter.update(original, updated);\n } else if (resultCode == EditActivity.RESULT_DELETE) {\n Log.i(LOG_TAG, \"onActivityResult DELETE\");\n\n this._adapter.remove(original);\n }\n return;\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }", "public void addNote(Note note) throws ChangeVetoException;", "@Override\n\tpublic Tutorial insert(Tutorial t) {\n\t\treturn cotizadorRepository.save(t);\n\n\t\t\n\t}", "public ServiceClient2 updateTODO(int id, String title, String desc) {\n\t\tInstant time = Instant.now();\n\t\tTimestamp timestamp = Timestamp.newBuilder().setSeconds(time.getEpochSecond()).setNanos(time.getNano()).build();\n\n\t\ttodo = ToDo.newBuilder().setId(id).setTitle(title).setDescription(desc).setReminder(timestamp).build();\n\n\t\treturn this;\n\t}", "public boolean inputdata(itemTodo item){\n ContentValues z = new ContentValues();\n //menyamakan kolom dan nilai\n z.put(kolom1, item.getTodo());\n z.put(kolom2, item.getDeskripsi());\n z.put(kolom3, item.getPrioritas());\n long hasil = data.insert(nama_table,null, z);\n if (hasil==-1){\n return false;\n } else {\n return true;\n }\n }", "@Override\n public void onCreate(SQLiteDatabase db) {\n String CREATE_POSTS_TABLE = \"CREATE TABLE \" + TABLE_TODOS +\n \"(\" +\n KEY_TODO_ID + \" INTEGER PRIMARY KEY,\" + // Define a primary key\n KEY_TODO_VALUE + \" TEXT,\" +\n KEY_TODO_DUE_DATE + \" TEXT,\" +\n KEY_TODO_STATUS + \" INTEGER DEFAULT 0,\" + // 1: complete\n KEY_TODO_NOTES + \" TEXT,\" +\n KEY_TODO_PRIORITY + \" INTEGER DEFAULT 0\" + // 0: low\n \")\";\n\n db.execSQL(CREATE_POSTS_TABLE);\n }", "public static void testAddTodoView(){\n }", "private void addSomeItemsToDB () throws Exception {\n/*\n Position pos;\n Course course;\n Ingredient ing;\n\n PositionDAO posdao = new PositionDAO();\n CourseDAO coursedao = new CourseDAO();\n IngredientDAO ingdao = new IngredientDAO();\n\n ing = new Ingredient(\"Mozzarella\", 10,30);\n ingdao.insert(ing);\n\n // Salads, Desserts, Main course, Drinks\n pos = new Position(\"Pizza\");\n posdao.insert(pos);\n\n course = new Course(\"Salads\", \"Greek\", \"Cucumber\", \"Tomato\", \"Feta\");\n coursedao.insert(course);\n\n ing = new Ingredient(\"-\", 0,0);\n ingdao.insert(ing);\n */\n }", "public static void addTask(Task taskToAdd)\n\t{\n\t\tStatement statement = dbConnect.createStatement();\n\t\t\n\t\tCalendar cal = taskToAdd.getCal();\n\t\tint year = cal.get(YEAR);\n\t\tint month = cal.get(MONTH);\n\t\tint day = cal.get(DAY_OF_MONTH);\n\t\tint hour = cal.get(HOUR_OF_DAY);\n\t\tint minute = cal.get(MINUTE);\n\t\t\n\t\tString descrip = taskToAdd.getDescription();\n\t\tboolean recur = taskToAdd.getRecurs();\n\t\tint recurI;\n\t\tif(recur) recurI = 1;\n\t\telse recurI = 0;\n\t\tint recursDays = taskToAdd.getRecurIntervalDays();\n\t\t\n\t\tstatement.executeUpdate(\"INSERT INTO tasks (Year, Month, Date, Hour, Minute, Description, Recursion, RecursionDays) VALUES(\" +year+\", \"+month+\", \"+day+\", \"+hour+\", \"+minute+\", '\"+descrip+\"', \"+recurI+\", \"+recursDays+\")\");\n\t\tstatement.close();\n\t\treturn;\n\t}", "public int addTask(Item item) {\n try (Session session = this.factory.openSession()) {\n session.beginTransaction();\n session.save(item);\n session.getTransaction().commit();\n } catch (Exception e) {\n this.factory.getCurrentSession().getTransaction().rollback();\n }\n return item.getId();\n }", "com.soa.SolicitarServicioDocument.SolicitarServicio addNewSolicitarServicio();", "public String addTask(TasksModel obj)\n\t{\n\t\t\tString memo=\"\"; \n\t\t\tif(obj.getMemo()!=null)\n\t\t\t{\n\t\t\t\tmemo=obj.getMemo().replaceAll(\"'\",\"`\");\n\t\t\t}\n\t\t\tobj.setMemo(memo);\n\t\t\t\n\t\t\tString commnets=\"\"; \n\t\t\tif(obj.getComments()!=null)\n\t\t\t{\n\t\t\t\tcommnets=obj.getComments().replaceAll(\"'\",\"`\");\n\t\t\t}\n\t\t\tobj.setComments(commnets);\n\t\t\t\t\n\t\t\tString stepsToReproduce=\"\"; \n\t\t\tif(obj.getTaskStep()!=null)\n\t\t\t{\n\t\t\t\tstepsToReproduce=obj.getTaskStep().replaceAll(\"'\",\"`\");\n\t\t\t}\n\t\t\tobj.setTaskStep(stepsToReproduce);\n\t\t\t\n\t\t query=new StringBuffer();\t\t \n\t\t query.append(\" Insert into tasks (taskID,createDate,expectedDateTofinsh,toBeReminderIn,createdUser,taskNo,tasktype,taskName,steps,linkid,customerrefKey,projectrefKey,servicerefKey,assignedUser,ccemployeeKey,priorityrefKey,estTime,memo,actualTime,status,usercomments,hourOrDays,customerType,reminderDate,createdAutomaticFeedback,customerNameFeedback,feedBackKey)\");\n\t\t query.append(\" values(\"+obj.getTaskid()+\",'\"+sdf.format(obj.getCreationDate())+\"','\"+sdf.format(obj.getExpectedDatetofinish())+\"',\"+obj.getRemindIn()+\",\" + obj.getCreatedUserID()+\",'\"+obj.getTaskNumber()+\"',\"+obj.getTaskTypeId()+\",'\"+obj.getTaskName()+\"',\");\n\t\t query.append(\"'\"+obj.getTaskStep()+\"',\"+obj.getPrviousTaskLinkId()+\",\"+obj.getCustomerRefKey()+\",\"+obj.getProjectKey()+\",\"+obj.getSreviceId()+\",\"+obj.getEmployeeid()+\",\"+obj.getCcEmployeeKey()+\",\"+obj.getPriorityRefKey()+\",\");\n\t\t query.append(\"\"+obj.getEstimatatedNumber()+\",'\"+obj.getMemo()+\"',\"+obj.getActualNumber()+\",\"+obj.getStatusKey()+\",'\"+obj.getComments()+\"','\"+obj.getHoursOrDays()+\"','\"+obj.getClientType()+\"','\"+sdf.format(obj.getReminderDate())+\"','\"+obj.getCreatedAutommaticTask()+\"','\"+obj.getCustomerNamefromFeedback()+\"',\"+obj.getFeedbackKey()+\")\");\n\t\t return query.toString();\n\t}", "public void insert(Service servico){\n Database.servico.add(servico);\n }", "void handle_push_note(LinkedList<Object> args) {\n try {\n String name = (String)args.get(1);\n String create = (String)args.get(2);\n String modify = (String)args.get(3);\n String content = (String)args.get(4);\n\n PreparedStatement pst =\n con.prepareStatement(\"SELECT user_id \" +\n \"FROM data WHERE note_name=? AND user_id=?\");\n pst.setString(1, name);\n pst.setInt(2, userid);\n rsl = pst.executeQuery();\n String state;\n if(rsl.next()) { //查询到结果\n state = \"UPDATE data SET \"+\n \"time_create=?,\" +\n \"time_modify=?,\" +\n \"note_content=? WHERE note_name=? AND user_id=?\";\n pst = con.prepareStatement(state);\n pst.setString(1, create);\n pst.setString(2, modify);\n pst.setString(3, content);\n pst.setString(4, name);\n pst.setInt(5, userid);\n System.out.println(username + \" updated \" + name + \":\" + content);\n } else {\n state = \"INSERT INTO \" +\n \"data(user_id,note_name,time_create,\" +\n \"time_modify,note_content) VALUES(?,?,?,?,?)\";\n pst = con.prepareStatement(state);\n pst.setInt(1, userid);\n pst.setString(2, name);\n pst.setString(3, create);\n pst.setString(4, modify);\n pst.setString(5, content);\n System.out.println(username + \" added \" + name + \":\" + content);\n }\n pst.executeUpdate();\n args.set(1, \"yes\");\n } catch (Exception e) {\n e.printStackTrace();\n args.set(1, \"no\");\n args.set(2, e.toString());\n }\n }", "private void addTodoMenu(User u,Scanner sc) {\n\t\t\n\t\tSystem.out.println(\"Title:\");\n\t\tString title = sc.nextLine();\n\t\t\n\t\tSystem.out.println(\"Description: \");\n\t\tString description = sc.nextLine();\n\t\t\n\t\t\n\t\tTodo todo = new Todo();\n\t\ttodo.setTitle(title);\n\t\ttodo.setDescription(description);\n\t\ttodo.setComplete(false);\n\t\t\n\t\tboolean success = todoService.insertTodo(todo);\n\t\t\n\t\tUser u = auth.getUser(u.getUsername());\n\t\t\n\t\t\n\t}", "public void onClickAddTask(View view) {\n\n // Insert new Movie data via a ContentResolver\n\n\n ContentValues mUpdateValues = new ContentValues();\n // Defines selection criteria for the rows you want to update\n /*\n * Sets the updated value and updates the selected words.\n */\n\n if (fav == 0) {\n mRatingBar.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), android.R.drawable.btn_star_big_on));\n mUpdateValues.put(MoviesContract.MovieEntry.COLUMN_PRIORITY, 1);\n } else {\n mRatingBar.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), android.R.drawable.btn_star_big_off));\n mUpdateValues.put(MoviesContract.MovieEntry.COLUMN_PRIORITY, 0);\n }\n int mRowsUpdated = getContentResolver().update(\n MoviesContract.MovieEntry.buildMoviesUri(_id),\n mUpdateValues,\n MoviesContract.MovieEntry._ID+\"=?\",\n new String[] {String.valueOf(_id)});\n\n\n }", "long addTask(Task task) {\n SQLiteDatabase db = this.getWritableDatabase();\n double time;\n\n ContentValues values = new ContentValues();\n values.put(KEY_INFO, task.getInfo()); // task info\n if (task.calendarExists()) {\n time = task.getCalendar().getTimeInMillis();\n } else {\n time = 0;\n }\n values.put(KEY_CALENDAR, time); // Task calendar\n values.put(KEY_LATITUDE, task.getLatitude());\n values.put(KEY_LONGITUDE, task.getLongitude());\n\n // Inserting Row\n long id;\n id = db.insert(TABLE_TASKS, null, values);\n Log.d(TAG, \"ID: \" + Long.toString(id));\n db.close(); // Closing database connection\n return id;\n }", "public void saveTask() {\r\n if (validateTask(textFieldName, textFieldDescription, textFieldDueDate, comboPriority)) {\r\n if (myTask == null) {\r\n myTask = new Task(textFieldName.getText(), textFieldDescription.getText(),\r\n LocalDate.parse(textFieldDueDate.getText()),\r\n Priority.valueOf(Objects.requireNonNull(comboPriority.getSelectedItem()).toString()));\r\n } else {\r\n myTask.setName(textFieldName.getText());\r\n myTask.setDescription(textFieldDescription.getText());\r\n myTask.setDueDate(LocalDate.parse(textFieldDueDate.getText()));\r\n myTask.setPriority(Priority.valueOf(Objects.requireNonNull(\r\n comboPriority.getSelectedItem()).toString()));\r\n }\r\n myTodo.getTodo().put(myTask.getHashKey(), myTask);\r\n todoListGui();\r\n }\r\n }", "private void newTask()\n {\n \t//TODO add alarm\n \tTask task = new Task(taskName.getText().toString(), taskDetails.getText().toString());\n \tdb.createTask(task);\n \t//TODO Tie notification to an alarm\n \t//Create notification\n \tIntent notifyIntent = new Intent(this, TaskNotification.class);\n \tnotifyIntent.putExtra(\"title\", task.name); //add title name\n \tnotifyIntent.putExtra(\"id\", (int) task.id); //add id\n \tstartActivity(notifyIntent); //create the intent\n \t\n \trefreshData();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n //Initialize the Firebase database reference\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n //get a reference to the Button and EditText Views using their ID's\n addTaskButton = (Button) findViewById(R.id.addTask_id);\n taskDescription = (EditText) findViewById(R.id.taskDescription_id);\n\n addTaskButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n writeNewTask();\n }\n });\n }", "@Override\n public void onClick(View view) {\n String newItemText = newToDoEditText.getText().toString();\n\n //Make sure some data was entered. Show error Toast and return if not\n if (newItemText.length() == 0) {\n Toast.makeText(MainActivity.this, \"Enter a todo item\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n //Else, create a new ToDoItem from the text, and add to the ArrayAdapter\n ToDoItem newItem = new ToDoItem(newItemText);\n toDoListAdapter.add(newItem);\n\n //And notify the ArrayAdapter that the data set has changed, to request UI update\n toDoListAdapter.notifyDataSetChanged();\n\n //Clear EditText, ready to type in next item\n newToDoEditText.getText().clear();\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tnewNote();//新建一条记录\n\t\t\t}" ]
[ "0.71048284", "0.6959012", "0.6949926", "0.68574524", "0.6848887", "0.68249327", "0.6711249", "0.670364", "0.6626052", "0.662565", "0.6571865", "0.6562366", "0.6558621", "0.6400185", "0.63536173", "0.6332076", "0.6269981", "0.6268585", "0.6264358", "0.6255243", "0.62276626", "0.6187522", "0.618512", "0.61748934", "0.61580324", "0.6129238", "0.6110069", "0.6108572", "0.6081533", "0.6073701", "0.603531", "0.6015378", "0.6008218", "0.6004531", "0.6003254", "0.59970176", "0.5991098", "0.598062", "0.59637386", "0.596342", "0.5962502", "0.59544265", "0.59515566", "0.59505284", "0.5948557", "0.5931964", "0.5931964", "0.5907392", "0.5904117", "0.58862865", "0.58781105", "0.58750033", "0.5868834", "0.5848702", "0.5844957", "0.5832175", "0.58299047", "0.58297056", "0.58289784", "0.58247864", "0.5823736", "0.58160084", "0.58124536", "0.58084965", "0.5804486", "0.58013767", "0.5799557", "0.57725376", "0.5767012", "0.5760993", "0.5741193", "0.5732068", "0.5728052", "0.57280505", "0.57177556", "0.5716181", "0.57141215", "0.57077974", "0.57074183", "0.56927365", "0.565452", "0.565301", "0.5651722", "0.5651328", "0.5646659", "0.56439376", "0.5638652", "0.5628527", "0.56249225", "0.5617165", "0.56167144", "0.561368", "0.5610529", "0.56096894", "0.5606004", "0.5602561", "0.5589009", "0.55846", "0.5572127", "0.555051" ]
0.6243589
20
Todo2 update the selected todo in the database
@Override public void updateTodo(Todo todo) { todos.set(currentEditPosition, todo); adapter.notifyDataSetChanged(); dismissFragment(); //this will remove the dialog from screen }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n todoTaskGui(\"Update\", task);\r\n }\r\n }", "public boolean updateTodo(TodoDto todo)\n {\n Todo model = new Todo();\n model.setTitle(todo.getTitle());\n model.setTotal_quantity(todo.getTotal_quantity());\n model.setDescription(todo.getDescription());\n model.setVersion(todo.getVersion());\n model.setId(todo.getId());\n model.setFinished_quantity(todo.getFinished_quantity());\n dao.updateTodo(model);\n return false;\n }", "@PostMapping(\"/updateToDoItem\")\n\tpublic String updateItem(@ModelAttribute(\"toDoListUpdateForm\") ToDoList toDoListUpdateForm) {\t\t\n\t\t\n\t\tloggedUser = userService.findLoggedUser(); // Access the logged user.\n\t\t\n\t\ttoDoListUpdateForm.setUser(loggedUser);\t\n\t\t\n\t\ttoDoListUpdateForm.setLastUpdate(getDateTime()); // Set the current date and time to the to do list record.\n\t\t\n\t\ttoDoListService.update(toDoListUpdateForm); // Update the to do list item. \n\t\t\n\t\treturn \"redirect:/welcome\";\n\t}", "public boolean updateTodo(Todo todo) {\n\t\tString sql=\"update todo set heading=?,subheading=?,details=?,active=?,done=? where todo_id=?\";\n\t\ttry {\n\t\t\tPreparedStatement statement=connection.prepareStatement(sql);\n\t\t\tstatement.setString(1,todo.getHeadingString());\n\t\t\tstatement.setString(2,todo.getSubheadingString());\n\t\t\tstatement.setString(3,todo.getDetailsString());\n\t\t\tstatement.setShort(4,todo.getActiveShort());\n\t\t\t//statement.setTimestamp(5,todo.getDatetimeTimestamp());\n\t\t\tstatement.setShort(5, todo.getDoneShort());\n\t\t\tstatement.setInt(6,todo.getTodo_idInt());\n\t\t\t\n\t\t\tint rows=statement.executeUpdate();\n\t\t\tif(rows>0) {\n\t\t\t\tSystem.out.println(\"Successfully updated:\"+todo.getTodo_idInt());\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Not updated\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "public void update(TheatreMashup todo) {\n\t\t\n\t}", "public Todo updateTodo(Todo todo) {\n\t\tif (todo != null && !CommonUtil.isNullOrEmpty(todo.getStatus())) {\n\t\t\tif (todo.getStatus().equalsIgnoreCase(CommonUtil.NO)) {\n\t\t\t\ttodo.setStatus(CommonUtil.YES);\n\t\t\t\ttodo.setChecked(true);\n\t\t\t}else{\n\t\t\t\ttodo.setStatus(CommonUtil.NO);\n\t\t\t\ttodo.setChecked(false);\n\t\t\t}\n\t\t}\n\t\treturn todo;\n\t}", "private void updateAction(String taskId) {\n setupPrioritySpinner();\n try {\n QueryBuilder<Task, String> queryBuilder = taskDao.queryBuilder();\n taskForUpdate = taskDao.queryForFirst(queryBuilder.where().eq(Task.TASK_ID, taskId).prepare());\n mTitle.setText(taskForUpdate.getTitle());\n mDescription.setText(taskForUpdate.getDescription());\n mDate.setDate(taskForUpdate.getDate().getTime());\n mPriority.setSelection(taskForUpdate.getPriority());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void update(T ob) throws ToDoListException;", "@Override\n\tpublic ResultWrapper<Todos> update(Todos todos) {\n\t\tResultWrapper<Todos> rs = new ResultWrapper<Todos>();\n\t\tif (todos.getTodoId()<= 0 || todos.getTodoId() == null) {\n\t\t\trs.error(todos, \"Id Should be greater than 0 or can not be null\");\n\t\t\treturn rs;\n\t\t} else if (todos.getTitle() == null || todos.getTitle() == \"\") {\n\t\t\trs.error(todos, \"Title can not be empty\");\n\t\t\treturn rs;\n\t\t} else if (todos.getDescription() == null || todos.getDescription() == \"\") {\n\t\t\trs.error(todos, \"Description can not be empty\");\n\t\t\treturn rs;\n\t\t} else {\n\t\t\ttodos = todosRepo.save(todos);\n\t\t\trs.succeedUpdated(todos);\n\t\t\treturn rs;\n\t\t}\n\t}", "private void updateDB(final Item item) {\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... params) {\n TodoApplication.getDbHelper().writeItemToList(item);\n return null;\n }\n }.execute();\n }", "public ServiceClient2 updateTODO(int id, String title, String desc) {\n\t\tInstant time = Instant.now();\n\t\tTimestamp timestamp = Timestamp.newBuilder().setSeconds(time.getEpochSecond()).setNanos(time.getNano()).build();\n\n\t\ttodo = ToDo.newBuilder().setId(id).setTitle(title).setDescription(desc).setReminder(timestamp).build();\n\n\t\treturn this;\n\t}", "private void updateNote(int noteId, final String noteTitle, final String noteDescription, final int position) {\n mDispose.add(\n AppConfig.getApiClient().updateNote(noteId, noteTitle, noteDescription)\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribeWith(new DisposableCompletableObserver() {\n @Override\n public void onComplete() {\n Toast.makeText(MainActivity.this, \"Updated\", Toast.LENGTH_SHORT).show();\n\n ToDo toDo = toDoList.get(position);\n toDo.setName(noteTitle);\n toDo.setDescription(noteDescription);\n\n mAdapterNote.notifyItemChanged(position);\n }\n\n @Override\n public void onError(Throwable e) {\n showError(e);\n }\n })\n );\n }", "@RequestMapping(value = \"/update-todo\", method = RequestMethod.POST)\n\tpublic String updateTodo( ModelMap model, @Valid Todo todo , BindingResult result ) {\n\t\tif(result.hasErrors()) {\n\t\t\treturn \"add-todo\";\n\t\t}\n\t\ttodo.setUser(getLoggedinUserName());\n\t\trepository.save(todo);\n\t\treturn \"redirect:/list-todo\";\n\t}", "@Override\n\tpublic void setActive(Todo todo) {\n\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK && requestCode == REQUEST_CODE) {\n\n int position = data.getExtras().getInt(\"editPos\");\n\n Task task = items.get(position);\n task.taskName = data.getExtras().getString(\"updatedText\");\n\n if (DEBUG) {\n Toast.makeText(this, task.taskName, Toast.LENGTH_SHORT).show();\n }\n\n db.updateTask(task);\n\n items.remove(position);\n items.add(position, task);\n\n taskAdapter.notifyDataSetChanged();\n }\n }", "@Override\n public void onClick(View v) {\n TODO.deleteTodo(todo.getId());\n TODO.saveTodos(context);\n recreate();\n }", "public long updateToDo(int personId, String title, String name, String surname, String borndate, String city, String street, String number, String email, String phone, String gender, String attribute) {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(FeedEntry.COLUMN_TITLE, title);\r\n values.put(FeedEntry.COLUMN_NAME,name);\r\n values.put(FeedEntry.COLUMN_SURNAME,surname);\r\n values.put(FeedEntry.COLUMN_BORNDATE,borndate);\r\n values.put(FeedEntry.COLUMN_CITY,city);\r\n values.put(FeedEntry.COLUMN_STREET,street);\r\n values.put(FeedEntry.COLUMN_NUMBER,number);\r\n values.put(FeedEntry.COLUMN_EMAIL,email);\r\n values.put(FeedEntry.COLUMN_PHONE,phone);\r\n values.put(FeedEntry.COLUMN_GENDER,gender);\r\n values.put(FeedEntry.COLUMN_ATTRIBUTE, attribute);\r\n values.put(FeedEntry.COLUMN_CLIENT_STATUS, 1);\r\n // insert row\r\n\r\n long todo_id = db.update(FeedEntry.TABLE_NAME, values, \"_id=\" + personId, null);\r\n\r\n return todo_id;\r\n }", "@Test\n public void testDAM30904001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30904001Click();\n\n // Select Action\n TodoUpdatePage todoUpdatePage = todoListPage.updateTodo(\"0000000001\");\n\n assertThat(todoUpdatePage.getTodoTitle(), equalTo(\"Todo 1\"));\n assertThat(todoUpdatePage.getTodoID(), equalTo(\"0000000001\"));\n assertThat(todoUpdatePage.getTodoCategory(), equalTo(\"CA1\"));\n assertThat(todoUpdatePage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoUpdatePage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n assertThat(todoUpdatePage.getTodoVersion(), equalTo(\"1\"));\n\n todoUpdatePage.setTodoTitle(\":Update\");\n // Update action, SET tag is used for set clause\n TodoDetailsPage todoDetailsPage = todoUpdatePage.updateTodo();\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 1:Update\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000001\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA1\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"2\"));\n }", "@Override\n public void onChanged(@Nullable List<Todo> todos) {\n adapter.submitList(todos);\n }", "public void onClick(View v) {\n Task task = new Task();\n task.setTask_id(key); // Use the generated key from the database as id.\n task.setMessage(editText.getText().toString());\n String rating = spinner.getSelectedItem().toString();\n task.setPriority(rating);\n\n // we need to convert our model into a Hashmap since Firebase cannot save custom classes.\n // String/ArrayList/Integer and Hashmap are the only supported types.\n Map<String, Object> childUpdates = new HashMap<>();\n childUpdates.put( key, task.toFirebaseObject());\n\n database.child(\"users\").child(currentUserID).child(\"taskList\").updateChildren(childUpdates, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError == null) {\n // Return to previous activity\n finish();\n }\n }\n });\n }", "@Override\r\n\tpublic void atualizar(Tipo tipo) {\n String sql = \"update tipos_servicos set nome = ? \"\r\n + \"where id = ?\";\r\n try {\r\n stmt = conn.prepareStatement(sql);\r\n \r\n stmt.setString(1, tipo.getNome());\r\n \r\n \r\n stmt.setInt(3, tipo.getId());\r\n \r\n stmt.executeUpdate();\r\n \r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n }\r\n\t}", "public int updateItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n ContentValues values = new ContentValues();\n values.put(TITLE, item.getTitle());\n values.put(DETAILS, item.getDetails());\n // updating record\n return db.update(TABLE_NAME, values, KEY_ID + \" = ?\", // update query to make changes to the existing record\n new String[]{String.valueOf(item.getId())});\n }", "public void edit(Note editedProject) {\n\t\tfor (Note project : getNotes()) {\n\t\t\tif (project.getId().equals(editedProject.getId())) {\n\n\t\t\t\tString sql = \"DELETE FROM todo WHERE ID='\" + project.getId() + \"';\";\n\t\t\t\tsqlUpdate(sql);\n\n\t\t\t\tsql = \"INSERT INTO todo VALUES ('\" + editedProject.getId() + \"','\" + editedProject.getName() + \"','\"\n\t\t\t\t\t\t+ editedProject.getAbbreviation() + \"','\" + editedProject.getDescription() + \"' );\";\n\n\t\t\t\tList<Note> todos = sqlUpdate(sql);\n\n\t\t\t\tsetNotes(todos);\n\t\t\t}\n\t\t}\n\n\t}", "public void updateTask(int tid,String title,String detail,int money,String type,int total_num,int current_num,Timestamp start_time,Timestamp end_time,String state);", "public void editarData(){\n\t\talunoTurmaService.inserirAlterar(alunoTurmaAltera);\n\t\t\n\t\t\n\t\tmovimentacao.setDataMovimentacao(alunoTurmaAltera.getDataMudanca());\n\t\tmovimentacaoService.inserirAlterar(movimentacao);\n\t\t\n\t\tFecharDialog.fecharDialogDATAAluno();\n\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\talunoTurmaAltera = new AlunoTurma();\n\t\tmovimentacao = new Movimentacao();\n\t\t\n\t\tatualizarListas();\n\t}", "@Override\n\t\tpublic void update(Metodologia metodologia,String name) {\n\t\t\t\n\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String task = String.valueOf(taskEditText.getText());\n SQLiteDatabase db = OpenDB.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(AccessData.ToDoEntry.todo_title, task);\n db.insertWithOnConflict(AccessData.ToDoEntry.table,\n null,\n values,\n SQLiteDatabase.CONFLICT_REPLACE);\n db.close();\n updateUI(); /* Updating the todo list with new changes made to the database, and displaying it on screen. */\n }", "private void doModifyTask() {\n System.out.println(\"Select the task you would like to modify by entering the appropriate index number.\");\n int index = input.nextInt();\n try {\n todoList.validateIndex(index);\n System.out.println(\"Enter the modified time and description to be added.\");\n String time = input.nextLine();\n String description = input.nextLine();\n System.out.println(\"Enter the modified date to be added.\");\n String date = input.nextLine();\n todoList.modifyTask(index, time, description, date);\n System.out.println(\"The selected task has been modified.\");\n } catch (IllegalInputException e) {\n System.err.println(\"Invalid index number entered\");\n }\n }", "int updateByPrimaryKey(Tipologia record);", "void setTodos(ArrayList<Task> tasks);", "public void updateTask(Task task){//needs to depend on row num\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(KEY_ID,task.getId());\n values.put(KEY_LABEL,task.getLabel());\n values.put(KEY_TIME, task.getTime());\n db.update(TABLE_NAME, values, KEY_ID+\" = ?\",\n new String[] { String.valueOf(task.getId()) });\n }", "private void updateUI() {\n /* Making an array of strings to store tasks entered by the user. */\n ArrayList<String> taskList = new ArrayList<>();\n SQLiteDatabase db = OpenDB.getReadableDatabase();\n Cursor cursor = db.query(AccessData.ToDoEntry.table,\n new String[]{AccessData.ToDoEntry._ID, AccessData.ToDoEntry.todo_title},\n null, null, null, null, null);\n while (cursor.moveToNext()) {\n int idx = cursor.getColumnIndex(AccessData.ToDoEntry.todo_title);\n taskList.add(cursor.getString(idx));\n }\n\n /* Check if array adapter is created. */\n if (listAdapter == null) {\n /* If adapter is not created i.e. NULL, create a new adapter */\n listAdapter = new ArrayAdapter<>(this,\n R.layout.todo_item,\n R.id.task_title,\n taskList);\n /* Set the above created adapter as the todoListView adapter */\n todoListView.setAdapter(listAdapter);\n } else {\n /* If created: it is assigned to the todoListView */\n listAdapter.clear(); // clear it\n listAdapter.addAll(taskList); // re-populate it\n listAdapter.notifyDataSetChanged(); // notify view to refresh with new data values\n }\n\n cursor.close();\n db.close();\n }", "public void updateToDone(int _id) {\n\n ContentValues values = new ContentValues();\n String date = DateFormat.getDateInstance().format(new Date());\n\n values.put(\"dateDone\", date);\n values.put(\"done\", 1);\n\n getWritableDatabase().update(\"tasks\", values, \"_id = '\"+_id+\"'\", null);\n }", "@Test\n public void testDAM30701001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30701001Click();\n\n TodoUpdatePage todoUpdatePage = todoListPage.updateTodo(\"0000000001\");\n\n // Confirm the values before update.\n assertThat(todoUpdatePage.getTodoTitle(), equalTo(\"Todo 1\"));\n assertThat(todoUpdatePage.getTodoID(), equalTo(\"0000000001\"));\n assertThat(todoUpdatePage.getTodoCategory(), equalTo(\"CA1\"));\n assertThat(todoUpdatePage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoUpdatePage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n assertThat(todoUpdatePage.getTodoVersion(), equalTo(\"1\"));\n\n // modify ToDo properties\n todoUpdatePage.setTodoTitle(\"TitleUpdate1\");\n todoUpdatePage.setTodoStatus(\"true\");\n\n // Call Update process\n TodoDetailsPage todoDetailsPage = todoUpdatePage.updateTodoOpt();\n\n // confirmation of update values : value 1\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\n \"Todo 1TitleUpdate1\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000001\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA1\"));\n\n // confirmation of update values : value 2\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"true\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n\n // confirmation of update values : value 3\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"2\"));\n }", "public void update(Triplet t) throws DAOException;", "@Override\n\tpublic void editar(ProdutoPedido produtoPedido) {\n\t\tdao.update(produtoPedido);\n\t}", "void showTodoViewToEdit(Task task);", "@Override\r\npublic int update(Detalle_pedido d) {\n\treturn detalle_pedidoDao.update(d);\r\n}", "void update(int id, int teacherid, int noteid );", "public void setTodo(java.util.Collection aTodo);", "@Test\n public void testDAM31502001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30702001Click();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n // Assert todo id 00001 for sample. this will be updated in batch update\n TodoDetailsPage todoDetailsPage = todoListPage.displayTodoDetail(\n \"0000000001\");\n // assert all the properties of fetched record.\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 1\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000001\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA1\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"1\"));\n\n // Back to list page:\n todoListPage = todoDetailsPage.showTodoListPage();\n\n // Assert todo id 00002 for sample. this will be updated in batch update\n todoDetailsPage = todoListPage.displayTodoDetail(\"0000000002\");\n // assert all the properties of fetched record.\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 2\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000002\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA2\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"1\"));\n\n // Back to list page:\n todoListPage = todoDetailsPage.showTodoListPage();\n\n // set the ids of the ToDo to be updated in batch\n todoListPage.setTodoIDList(\n \"0000000001,0000000002,0000000003,0000000004\");\n\n todoListPage = todoListPage.updateUsingBatchRepo();\n\n String cntOfUpdatedTodo = todoListPage.getCountOfBatchRegisteredTodos();\n\n // In case of Batch mode fixed value -2147482646 is returned if the update is successful.\n // the integer vallue is returned if the repository method return type is int\n assertThat(cntOfUpdatedTodo, equalTo(\n \"Total Todos Registered/Updated in Batch : -2147482646\"));\n\n todoDetailsPage = todoListPage.displayTodoDetail(\"0000000001\");\n // assert all the properties of fetched record.\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 1\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000001\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA1\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"true\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"2\"));\n\n // Back to list page:\n todoListPage = todoDetailsPage.showTodoListPage();\n\n // Assert todo id 00002 for sample. this will be updated in batch update\n todoDetailsPage = todoListPage.displayTodoDetail(\"0000000002\");\n // assert all the properties of fetched record.\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 2\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000002\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA2\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"true\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"2\"));\n }", "public Todo dBObject2Todo(DBObject dbObject, Todo todo) {\n\n\t\tObject title = dbObject.get(\"title\");\n\t\tif(title != null) {\n\t\t\ttodo.setTitle(title.toString());\n\t\t}\n\t\n\t\tObject body = dbObject.get(\"body\");\n\t\tif(body != null) {\n\t\t\ttodo.setBody(body.toString());\n\t\t}\n\t\n\t\tObject done = dbObject.get(\"done\");\n\t\tif(done != null) {\n\t\t\ttodo.setDone(done.toString().contains(\"true\"));\n\t\t}\n\t\tString id = dbObject.get(\"_id\").toString();\n\t\tif(id != null) {\n\t\t\ttodo.setId(id);\n\t\t}\n\t\treturn todo;\n }", "@RequestMapping(value = \"/api/todo-items/{id}\", method = RequestMethod.PUT, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n\tpublic ResponseEntity<TodoItem> updateItem(@PathVariable(\"id\") long id, @RequestBody TodoItem item) {\n\n\t\ttodoItemService.update(item);\n\t\treturn new ResponseEntity<TodoItem>(HttpStatus.NO_CONTENT);\n\t}", "void update ( priorizedListObject v ) throws DAOException;", "public void editarImovel_QntdQuartos (String titulo, int novaQntdQuartos) {\n\t\tString sql = \"UPDATE imovel SET quartos='\"+novaQntdQuartos+\"' WHERE titulo ='\" +titulo+\"'\";\n\t\tboolean imovelEncontrado = buscaImovel_BD(titulo);\n\t\tif(imovelEncontrado==false) {\n\t\t\ttry{\n\t\t\t\tPreparedStatement stmt = conexaoBD.prepareStatement(sql); \n\t\t\t\tstmt.execute();\n\t\t\t\tstmt.close();\n\t\t\t}catch(Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage()); \n\t\t\t}\n\t\t}else {\n\t\t\tJOptionPane.showMessageDialog(null, \"Verifique o título do imóvel.\");\n\t\t}\n\t}", "public void setToDoId(int index,long newId){\n\t\t//int index = getToDoIndex(oldId);\n\t\tif (index < 0)\n\t\t\tthrow new IllegalArgumentException(\"Index of an ObjectListElement object cannot be a negative number\");\n\t\t\n\t\tObjectListElement e= allToDoLists.get(index);\n\t\te.setId(newId);\n\t}", "@Test\n public void testDAM30702001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30702001Click();\n\n // Confirmation of database state before batch update\n assertThat(todoListPage.getCompletedTodoCount(), equalTo(\"3\"));\n assertThat(todoListPage.getIncompletTodoCount(), equalTo(\"7\"));\n assertThat(todoListPage.getTotalTodoCount(), equalTo(\"10\"));\n\n // Assert todo id 00001 for sample. this will be updated in batch update\n TodoDetailsPage todoDetailsPage = todoListPage.displayTodoDetail(\n \"0000000001\");\n // assert all the properties of fetched record.\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 1\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000001\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA1\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"1\"));\n\n // Back to list page:\n todoListPage = todoDetailsPage.showTodoListPage();\n\n // Assert todo id 00002 for sample. this will be updated in batch update\n todoDetailsPage = todoListPage.displayTodoDetail(\"0000000002\");\n // assert all the properties of fetched record.\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 2\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000002\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA2\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"1\"));\n\n // Back to list page:\n todoListPage = todoDetailsPage.showTodoListPage();\n\n // set the ids of the ToDo to be updated in batch\n todoListPage.setTodoIDList(\n \"0000000001,0000000002,0000000003,0000000004\");\n\n todoListPage = todoListPage.batchUpdate();\n\n String cntOfUpdatedTodo = todoListPage.getCountOfBatchRegisteredTodos();\n\n assertThat(cntOfUpdatedTodo, equalTo(\n \"Total Todos Registered/Updated in Batch : 4\"));\n\n todoDetailsPage = todoListPage.displayTodoDetail(\"0000000001\");\n // assert all the properties of fetched record.\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 1\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000001\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA1\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"true\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"2\"));\n\n // Back to list page:\n todoListPage = todoDetailsPage.showTodoListPage();\n\n // Assert todo id 00002 for sample. this will be updated in batch update\n todoDetailsPage = todoListPage.displayTodoDetail(\"0000000002\");\n // assert all the properties of fetched record.\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo 2\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000002\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA2\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"true\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/24\"));\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"2\"));\n }", "public void updateEntry(String ti, String t2) throws SQLException {\n\t\tContentValues cvUpdate = new ContentValues();\r\n\t\t//cvUpdate.put(KEY_APP_ID, t1);\r\n\t\tcvUpdate.put(KEY_STATUS, t2);\r\n\t\tourDatabase.update(DATABASE_TABLE, cvUpdate ,KEY_APP_ID + \"=?\", new String[] { ti });\r\n\t\t\r\n\t}", "public void actualizarList(int id, String name, String descripcion) {\n ContentValues values = new ContentValues();\n\n //Seteando body y author\n values.put(ColumnList.NAME_LIST, name);\n values.put(ColumnList.DESCRIPTION_LIST, descripcion);\n\n //Clausula WHERE\n String selection = ColumnList.ID_LIST + \" = ?\";\n String[] selectionArgs = {Integer.toString(id)};\n\n //Actualizando\n database.update(LIST_TABLE_NAME, values, selection, selectionArgs);\n }", "public void update(TipoPk pk, Tipo dto) throws TipoDaoException;", "@Override\r\n\tpublic void updateItem(Items updateItem, String itemNameToUpdate) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t try\r\n\t\t {\r\n\t\t session.beginTransaction();\r\n\t\t Query query = session.createQuery(\"from Items where userName = :user AND ItemName = :item\");\r\n\t\t query.setParameter(\"user\", updateItem.getUserName());\r\n\t\t Items ifItemExist =(Items) query.setParameter(\"item\", itemNameToUpdate).uniqueResult();\r\n\t\t \r\n\t\t long id=0;\r\n\t\t if(ifItemExist != null){\r\n\t\t \tid = ifItemExist.getId();\r\n\t\t }\r\n\t\t System.out.println(id + \" \" + ifItemExist );\r\n\t\t Query query2 = session.createQuery(\"UPDATE Items SET status = :stat , itemName = :item , userName= :user , priority= :prio , dueDate= :date , note= :note\" +\r\n\t\t \" where id = :d\");\r\n\t\t query2.setParameter(\"stat\", updateItem.getStatus());\r\n\t\t query2.setParameter(\"item\", updateItem.getItemName());\r\n\t\t query2.setParameter(\"user\", updateItem.getUserName());\r\n\t\t query2.setParameter(\"prio\", updateItem.getPriority());\r\n\t\t query2.setParameter(\"date\", updateItem.getDueDate());\r\n\t\t query2.setParameter(\"note\", updateItem.getNote());\r\n\t\t query2.setParameter(\"d\", id);\r\n\t\t query2.executeUpdate();\r\n\t\t session.getTransaction().commit();\r\n\t\t \r\n\t\t }\r\n\t\t catch (HibernateException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t if(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t }\r\n\t\t finally\r\n\t\t {\r\n\t\t\t if(session != null) \r\n\t\t\t\t{ \r\n\t\t\t\t\tsession.close(); \r\n\t\t\t\t}\r\n\t\t } \r\n\r\n\t}", "public String editTask(TasksModel obj)\n\t{\n\t\tString memo=\"\"; \n\t\tif(obj.getMemo()!=null)\n\t\t{\n\t\t\tmemo=obj.getMemo().replaceAll(\"'\",\"`\");\n\t\t}\n\t\tobj.setMemo(memo);\n\t\t\n\t\tString commnets=\"\"; \n\t\tif(obj.getComments()!=null)\n\t\t{\n\t\t\tcommnets=obj.getComments().replaceAll(\"'\",\"`\");\n\t\t}\n\t\tobj.setComments(commnets);\n\t\t\t\n\t\tString stepsToReproduce=\"\"; \n\t\tif(obj.getTaskStep()!=null)\n\t\t{\n\t\t\tstepsToReproduce=obj.getTaskStep().replaceAll(\"'\",\"`\");\n\t\t}\n\t\tobj.setTaskStep(stepsToReproduce);\n\t\tquery=new StringBuffer();\n\t\tquery.append(\"Update tasks set customerType='\"+obj.getClientType()+\"',taskNo='\"+obj.getTaskNumber()+\"',tasktype=\"+obj.getTaskTypeId()+\",expectedDateTofinsh='\"+sdf.format(obj.getExpectedDatetofinish())+\"',reminderDate='\"+sdf.format(obj.getReminderDate())+\"',toBeReminderIn=\"+obj.getRemindIn()+\",taskName='\"+obj.getTaskName()+\"',steps='\"+obj.getTaskStep()+\"',linkid=\"+obj.getPrviousTaskLinkId()+\",customerrefKey=\"+obj.getCustomerRefKey()+\",\");\t\n\t\tquery.append(\"projectrefKey=\"+obj.getProjectKey()+\",servicerefKey=\"+obj.getSreviceId()+\",assignedUser=\"+obj.getEmployeeid()+\",ccemployeeKey=\"+obj.getCcEmployeeKey()+\",priorityrefKey=\"+obj.getPriorityRefKey()+\",estTime=\"+obj.getEstimatatedNumber()+\",memo='\"+obj.getMemo()+\"',actualTime=\"+obj.getActualNumber()+\",status=\"+obj.getStatusKey()+\",usercomments='\"+obj.getComments()+\"',hourOrDays='\"+obj.getHoursOrDays()+\"' where taskID=\"+obj.getTaskid()+\"\");\n\t\tquery.append(\" \");\n\t\treturn query.toString();\n\t}", "int updateByPrimaryKeySelective(Tipologia record);", "public CompletionStage<Result> updateItem(Long id) {\n MessageDispatcher jdbcDispatcher = AkkaDispatcher.jdbcDispatcher;\n\n JsonNode nItem = request().body().asJson();\n ItemEntity item = Json.fromJson( nItem , ItemEntity.class ) ;\n ItemEntity itemViejo = ItemEntity.FINDER.byId(id);\n return CompletableFuture.supplyAsync(\n ()->{\n if(itemViejo == null)\n {\n return itemViejo;\n }else\n { item.setId(id);\n item.update();\n return item;\n }\n }\n ).thenApply(\n itemEntity -> {\n if(itemEntity == null)\n {\n return notFound();\n }else\n {\n return ok(Json.toJson(itemEntity));\n }\n }\n\n );\n }", "public Task update(Task item) {\n\t\t// set the user id (not sure this is where we should be doing this)\n\t\titem.setUserId(getUserId());\n\t\titem.setEmailAddress(getUserEmail());\n\t\tif (item.getDueDate() == null) {\n\t\t\tCalendar c = Calendar.getInstance();\n\t\t\tc.set(2011, 5, 11);\n\t\t\titem.setDueDate(c.getTime());\n\t\t}\n\t\tPersistenceManager pm = PMF.get().getPersistenceManager();\n\t\ttry {\n\t\t\tpm.makePersistent(item);\n\t\t\treturn item;\n\t\t} finally {\n\t\t\tpm.close();\n\t\t}\n\t}", "public static void addOrUpdateTodo(TodoItem todoItem) {\n FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser();\n if (currentUser == null) {\n return;\n }\n\n DatabaseReference db = FirebaseDatabase.getInstance().getReference();\n if (todoItem.getUid() == null || TextUtils.isEmpty(todoItem.getUid().trim())) {\n // New TO-DO to be added\n todoItem.setUid(db.child(currentUser.getUid()).push().getKey());\n todoItem.setCompleted(false);\n }\n\n // db.child(TODO_DATA).child(todoItem.getUid()).setValue(todoItem);\n // Add to-do for particular user\n db.child(currentUser.getUid()).child(todoItem.getUid()).setValue(todoItem);\n }", "int updateByPrimaryKey(UserTips record);", "@Override\n public void success(Response response, Response response2) {\n context.refreshLists();\n //Toast.makeText(getActivity(), \"Successful edit of project \"+p.getName(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void success(Response response, Response response2) {\n context.refreshLists();\n //Toast.makeText(getActivity(), \"Successful edit of project \"+p.getName(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onItemClick(AdapterView<?> adapter, View item, int pos, long id) {\n Intent editIntent = new Intent(TodoListActivity.this, EditItemActivity.class);\n editIntent.putExtra(\"position\", pos);\n editIntent.putExtra(\"value\", todos.get(pos));\n\n startActivityForResult(editIntent, EDIT_ITEM_REQUEST_CODE); // brings up the second activity\n }", "public void editEntry(int entryIndex, String toDoItem) {\n\t\ttoDoList.get(entryIndex).setToDoItem(toDoItem);\n\t}", "int updateByPrimaryKey(Tour record);", "@Override\n\tpublic void editar(Contato contato) {\n\t\tthis.dao.editar(contato);\n\t\t\n\t}", "public void onClickAddTask(View view) {\n\n // Insert new Movie data via a ContentResolver\n\n\n ContentValues mUpdateValues = new ContentValues();\n // Defines selection criteria for the rows you want to update\n /*\n * Sets the updated value and updates the selected words.\n */\n\n if (fav == 0) {\n mRatingBar.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), android.R.drawable.btn_star_big_on));\n mUpdateValues.put(MoviesContract.MovieEntry.COLUMN_PRIORITY, 1);\n } else {\n mRatingBar.setImageDrawable(ContextCompat.getDrawable(getApplicationContext(), android.R.drawable.btn_star_big_off));\n mUpdateValues.put(MoviesContract.MovieEntry.COLUMN_PRIORITY, 0);\n }\n int mRowsUpdated = getContentResolver().update(\n MoviesContract.MovieEntry.buildMoviesUri(_id),\n mUpdateValues,\n MoviesContract.MovieEntry._ID+\"=?\",\n new String[] {String.valueOf(_id)});\n\n\n }", "public void UpdateItem(View view) {\n /*update a friend record given the id*/\n updateFriend(friendsDatabaseReference);\n /*the alternative*/\n// updateFriend_updateChildren(friendsDatabaseReference);\n }", "@Test\n public void testDAM30301001() {\n // Data preparation\n {\n clearAndCreateTestDataForBook();\n }\n\n // Index page\n DAM3IndexPage dam3IndexPage = new DAM3IndexPage(driver);\n\n TodoListPage todoListPage = dam3IndexPage.dam30301001Click();\n\n // Register a ToDo : Insert action\n TodoRegisterPage registerTodoPage = todoListPage.registerTodo();\n\n registerTodoPage.setTodoCategory(\"CA2\");\n registerTodoPage.setTodoId(\"0000000025\");\n registerTodoPage.setTodoTitle(\"Todo Insert Test\");\n\n // Call the insert operation\n TodoDetailsPage todoDetailsPage = registerTodoPage.addTodo();\n\n // assert all the properties of fetched record.\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\"Todo Insert Test\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000025\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA2\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"In-Complete\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/28\"));\n // initial version is 0\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"0\"));\n\n // Now update the title of the above todo\n webDriverOperations.displayPage(getPackageRootUrl());\n dam3IndexPage = new DAM3IndexPage(driver);\n todoListPage = dam3IndexPage.dam30301001Click();\n\n // Select Action\n TodoUpdatePage todoUpdatePage = todoListPage.updateTodo(\"0000000025\");\n\n assertThat(todoUpdatePage.getTodoTitle(), equalTo(\"Todo Insert Test\"));\n assertThat(todoUpdatePage.getTodoID(), equalTo(\"0000000025\"));\n assertThat(todoUpdatePage.getTodoCategory(), equalTo(\"CA2\"));\n assertThat(todoUpdatePage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoUpdatePage.getTodoCreatedDate(), equalTo(\"2016/12/28\"));\n\n todoUpdatePage.setTodoTitle(\":Update\");\n // Update action\n todoDetailsPage = todoUpdatePage.updateTodo();\n assertThat(todoDetailsPage.getTodoTitle(), equalTo(\n \"Todo Insert Test:Update\"));\n assertThat(todoDetailsPage.getTodoID(), equalTo(\"0000000025\"));\n assertThat(todoDetailsPage.getTodoCategory(), equalTo(\"CA2\"));\n assertThat(todoDetailsPage.getTodoStatus(), equalTo(\"false\"));\n assertThat(todoDetailsPage.getTodoCreatedDate(), equalTo(\"2016/12/28\"));\n // initial version is 0\n assertThat(todoDetailsPage.getTodoVersion(), equalTo(\"1\"));\n\n // Delete Action\n webDriverOperations.displayPage(getPackageRootUrl());\n dam3IndexPage = new DAM3IndexPage(driver);\n todoListPage = dam3IndexPage.dam30301001Click();\n\n todoUpdatePage = todoListPage.updateTodo(\"0000000025\");\n\n // delete action\n todoListPage = todoUpdatePage.deleteTodo();\n\n boolean isTodoPresent = todoListPage.isTodoDisplayed(\"0000000025\");\n\n assertThat(isTodoPresent, is(false));\n\n }", "@PostMapping(\"/addToDoItem\")\n\tpublic String addToDoItem(@ModelAttribute(\"toDoListForm\") ToDoList toDoListForm) {\n\n\t\tloggedUser = userService.findLoggedUser(); // Access the logged user.\n\n\t\ttoDoListForm.setUser(loggedUser);\n\n\t\ttoDoListForm.setLastUpdate(getDateTime());\n\n\t\ttoDoListService.save(toDoListForm); // Save a new to do list\n\n\t\treturn \"redirect:/welcome\";\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n\n if (requestCode == REQUEST_CREATE && resultCode == RESULT_OK && data != null) {\n Log.i(LOG_TAG, \"onActivityResult CREATE\");\n\n String text = data.getStringExtra(\"todo\");\n this._adapter.add(text);\n return;\n }\n\n if (requestCode == REQUEST_EDIT && data != null) {\n String original = data.getStringExtra(\"todo\");\n String updated = data.getStringExtra(\"todo_updated\");\n\n if (resultCode == EditActivity.RESULT_UPDATE) {\n Log.i(LOG_TAG, \"onActivityResult UPDATE\");\n\n this._adapter.update(original, updated);\n } else if (resultCode == EditActivity.RESULT_DELETE) {\n Log.i(LOG_TAG, \"onActivityResult DELETE\");\n\n this._adapter.remove(original);\n }\n return;\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }", "@Test\n public void testUpdateItem() throws Exception {\n\n Tracker tracker = new Tracker();\n\n String action = \"0\";\n String yes = \"y\";\n String no = \"n\";\n\n // add first item\n\n String name1 = \"task1\";\n String desc1 = \"desc1\";\n String create1 = \"3724\";\n\n Input input1 = new StubInput(new String[]{action, name1, desc1, create1, yes});\n new StartUI(input1).init(tracker);\n\n // add second item\n\n String name2 = \"task2\";\n String desc2 = \"desc2\";\n String create2 = \"97689\";\n\n Input input2 = new StubInput(new String[]{action, name2, desc2, create2, yes});\n new StartUI(input2).init(tracker);\n\n // get first item id\n\n String id = \"\";\n\n Filter filter = new FilterByName(name1);\n Item[] result = tracker.findBy(filter);\n for (Item item : result) {\n if(item != null && item.getName().equals(name1)) {\n id = item.getId();\n break;\n }\n }\n\n // update first item\n\n String action2 = \"1\";\n\n String name3 = \"updated task\";\n String desc3 = \"updated desc\";\n String create3 = \"46754\";\n\n Input input3 = new StubInput(new String[]{action2, id, name3, desc3, create3, yes});\n new StartUI(input3).init(tracker);\n\n Item foundedItem = tracker.findById(id);\n\n Assert.assertEquals(name3, foundedItem.getName());\n\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tif (!Utilities.checkLogin(req.getSession())) {\n\t\t\tresp.sendRedirect(\"Login.jsp\");\n\t\t\treturn;\n\t\t}\n\n\t\tString itemId = req.getParameter(\"itemId\");\n\t\tString title = req.getParameter(\"title\");\n\t\tString description = req.getParameter(\"description\");\n\n\t\tToDoListService todoListService = new ToDoListService();\n\t\tItem item = Utilities.getItemById(Integer.valueOf(itemId));\n\t\titem.setTitle(title);\n\t\titem.setDescription(description);\n\t\ttodoListService.updateItem(item);\n\n\t\tresp.sendRedirect(\"TodoListController\");\n\t}", "int updateByPrimaryKey(Tourst record);", "int updateByPrimaryKeySelective(Tour record);", "T edit(long id, T obj);", "@Override\n public void onEditClick(Tasks tasks) {\n if(tasks!=null){\n taskEditRequest(tasks);\n }\n }", "int updateByPrimaryKeySelective(Tourst record);", "int updateByPrimaryKey(SelectUserRecruit record);", "protected void doListEdit() {\r\n String nameInput = mEditTextForList.getText().toString();\r\n\r\n /**\r\n * Set input text to be the current list item name if it is not empty and is not the\r\n * previous name.\r\n */\r\n if (!nameInput.equals(\"\") && !nameInput.equals(mItemName)) {\r\n Firebase firebaseRef = new Firebase(Constants.FIREBASE_URL);\r\n\r\n /* Make a map for the item you are editing the name of */\r\n HashMap<String, Object> updatedItemToAddMap = new HashMap<String, Object>();\r\n\r\n /* Add the new name to the update map*/\r\n updatedItemToAddMap.put(\"/\" + Constants.FIREBASE_LOCATION_SHOPPING_LIST_ITEMS + \"/\"\r\n + mListId + \"/\" + mItemId + \"/\" + Constants.FIREBASE_PROPERTY_ITEM_NAME,\r\n nameInput);\r\n\r\n /* Make the timestamp for last changed */\r\n HashMap<String, Object> changedTimestampMap = new HashMap<>();\r\n changedTimestampMap.put(Constants.FIREBASE_PROPERTY_TIMESTAMP, ServerValue.TIMESTAMP);\r\n\r\n /* Add the updated timestamp */\r\n updatedItemToAddMap.put(\"/\" + Constants.FIREBASE_LOCATION_ACTIVE_LISTS +\r\n \"/\" + mListId + \"/\" + Constants.FIREBASE_PROPERTY_TIMESTAMP_LAST_CHANGED, changedTimestampMap);\r\n\r\n /* Do the update */\r\n firebaseRef.updateChildren(updatedItemToAddMap);\r\n\r\n }\r\n }", "private void updateDB() {\n }", "@Override\n public boolean updateTask(String id,String name, String[] taskTypeNames, String state, HashMap inputParameter, HashMap outputParameter, String title, String subject, String description, String priority, String claimed) {\n boolean response = false;\n try {\n response = dataAccessTosca.updateTask(id, name, taskTypeNames, state, inputParameter ,outputParameter, title, subject, description, priority, claimed);\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n return response;\n }", "Product editProduct(Product product);", "int updateByPrimaryKey(_task record);", "public void updatePago(Integer idPago, Context context){\n SQLiteDatabase db = getWritableDatabase();\n ContentValues actualizarPago = new ContentValues();\n actualizarPago.put(\"activo\",false);\n try{\n db.update(pago,actualizarPago,\"idPago=\"+idPago+\" AND activo = 1\",null);\n Log.d(TAG, \"ACTUALIZACION DE PAGO CORRECTAMENTE \");\n }catch (SQLiteException ex){\n Log.d(TAG, \"SIN PAGO: \"+ex.getMessage());\n Toast.makeText(context, \"No se actualizó el pago\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n \tpublic void update(DbManager db)\n \t{\n \t\tDbController DbC = DbController.getInstance(this, this);\n \t\tviewedRecipe = DbC.getUserRecipe(uri);\n \t\trecipeName.setText(viewedRecipe.getTitle());\n \t\tinstructions.setText(viewedRecipe.getInstructions());\n \t\t\n \t}", "public static void ManageTodoList (int option, List <String> todoItems){\n switch (option){\n case (1):\n addtolist(todoItems);\n break;\n case (2):\n showlist(todoItems);\n break;\n case (3):\n clearlist(todoItems);\n break;\n case (4):\n deleteitem(todoItems);\n break;\n default:\n System.out.println (\"Error\");\n }\n }", "@Override\n\tpublic Dispositivo update(Dispositivo t) {\n\t\treturn dispositivoDao.save(t);\n\t}", "public int updateById(EvaluetingListDO evaluetingList) throws DataAccessException;", "public void insertToDoList(Context context, String title) {\n\n // insert in to database\n ToDoListDbHelper toDoListDbHelper = new ToDoListDbHelper(context);\n long listId = toDoListDbHelper.insert(title);\n\n // insert into list of lists\n ToDoList toDoList = new ToDoList(listId, title);\n toDoListList.add(toDoList);\n\n }", "@Test\n public void updateTaskAndGetById() {\n mDatabase.taskDao().insertTask(TASK);\n\n // When the task is updated\n Task updatedTask = new Task(\"title2\", \"description2\", \"id\", true);\n mDatabase.taskDao().updateTask(updatedTask);\n\n // When getting the task by id from the database\n Task loaded = mDatabase.taskDao().getTaskById(\"id\");\n\n // The loaded data contains the expected values\n assertTask(loaded, \"id\", \"title2\", \"description2\", true);\n }", "public TodoList updateOneForCustomer(Customer customer, TodoListForm todoListForm) throws EntityAlreadyExistException {\n String title = todoListForm.getTitle();\n int todoListNum = todoListForm.getNum();\n TodoList todoList = todoListDao.findByCustomerAndNum(customer, todoListNum);\n todoList.setTitle(title);\n todoList.setFinished(todoListForm.isFinished());\n try {\n return todoListDao.save(todoList);\n } catch (DaoConstraintViolationException e) {\n throw new EntityAlreadyExistException(\"There is already a todo-list with name: \" + title);\n }\n }", "@Override\n\tpublic ResultMessage update(PaymentOrderPO po) {\n\t\tString sql=\"update paymentlist set date=?,amount=?,payer=?,bankaccount=?,entry=?,note=? where ID=?\";\n\t\ttry {\n\t\t\tstmt=con.prepareStatement(sql);\n\t\t\tstmt.setString(1, po.getDate());\n\t\t\tstmt.setDouble(2, po.getAmount());\n\t\t\tstmt.setString(3, po.getPayer());\n\t\t\tstmt.setString(4, po.getBankAccount());\n\t\t\tstmt.setString(5, po.getEntry());\n\t\t\tstmt.setString(6, po.getNote());\n\t\t\tstmt.setString(7, po.getID());\n\t\t\tstmt.executeUpdate();\n\t\t\treturn ResultMessage.Success;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\treturn ResultMessage.NotExist;\n\t\t}\n\t}", "public void editar(ParadaUtil paradaUtil) {\n\t\tiniciarTransacao();\r\n\t\ttry {\r\n\t\t\ts.update(paradaUtil);\r\n\t\t\ttx.commit();\r\n\t\t} catch (Exception e) {\r\n\t\t} finally {\r\n\t\t\ts.close();\r\n\t\t}\r\n\t}", "int updateByPrimaryKeySelective(UserTips record);", "@Override\r\n\tpublic void update(ExecuteTask executeTask) {\n\t\tString sql = \"UPDATE executetask SET et_comments = ? WHERE et_id = ?\";\r\n\t\tupdate(sql,executeTask.getComments(),executeTask.getId());\r\n\t}", "int updateByPrimaryKeySelective(Movimiento record);", "@Override\n public void onClick(View v) {\n if (AppUtils.isEmptyString(edtNoteTitle.getText().toString())) {\n Toast.makeText(MainActivity.this, \"Enter note!\", Toast.LENGTH_SHORT).show();\n return;\n } else {\n alertDialog.dismiss();\n }\n\n final String noteTitle = edtNoteTitle.getText().toString();\n final String noteDes = edtNoteDes.getText().toString();\n // check if user updating note\n if (shouldUpdate && todo != null) {\n // update note by it's id\n updateNote(todo.getTodoId(), noteTitle, noteDes, position);\n } else {\n // create new note\n createNote(noteTitle, noteDes, mUserId);\n }\n }", "public void update(ItemsPk pk, Items dto) throws ItemsDaoException;", "@Override\n\tpublic Opcion update(Opcion t) throws Exception {\n\t\treturn opcionRepository.save(t);\n\t}", "int updateByPrimaryKey(Movimiento record);", "Motivo update(Motivo update);", "public void updateAdapter() {\n// \tContentValues values = new ContentValues(); \n// \tvalues.put(\"note_title\", \"Title of Note 4.4_\" + Math.random());\n// \tString whereClause = \"note_id = ?\";\n// \tString[] whereArgs = new String[] { \"4\" };\n// \t\t\n// \tthis.loader.update(DBConstants.NOTES_TABLE, values, whereClause, whereArgs);\n// dba = new DBAdapter(getActivity());\n// dba.open();\n// \tCursor notes = dba.getAllNotes();\n// \t((SimpleCursorAdapter) notesAdapter).changeCursor(notes);\n//\t\t((SimpleCursorAdapter) lvNotes.getAdapter()).notifyDataSetChanged();\n//\t\tdba.close();\n }" ]
[ "0.6839816", "0.67459005", "0.6722572", "0.6644665", "0.6622513", "0.65761924", "0.63863796", "0.63531363", "0.6214568", "0.5961123", "0.5954651", "0.5952205", "0.5940015", "0.5934718", "0.59293634", "0.59194314", "0.5915713", "0.59061325", "0.5902019", "0.58367056", "0.5807993", "0.58073455", "0.5798262", "0.5780499", "0.5758634", "0.5753093", "0.57519937", "0.5743003", "0.5737962", "0.5736858", "0.5734826", "0.57318497", "0.57306606", "0.5727625", "0.5716202", "0.5712667", "0.56960666", "0.5694734", "0.5665149", "0.5661584", "0.56600386", "0.5643981", "0.5642788", "0.56418836", "0.56400216", "0.561749", "0.56092334", "0.5600575", "0.55993503", "0.5592869", "0.5586105", "0.5584173", "0.5583287", "0.55821115", "0.556802", "0.5566511", "0.55609775", "0.5556337", "0.5556337", "0.5550149", "0.55342495", "0.5520244", "0.5500918", "0.5497919", "0.54968405", "0.54879326", "0.5481143", "0.54764", "0.54755205", "0.54637665", "0.54603267", "0.5459375", "0.5459059", "0.54544157", "0.54543704", "0.5451355", "0.5446522", "0.5438045", "0.54269075", "0.54239994", "0.54224247", "0.54202306", "0.5407611", "0.5401054", "0.53989893", "0.53982276", "0.53917795", "0.5390821", "0.53887254", "0.5376006", "0.53739125", "0.53653497", "0.5356327", "0.5343574", "0.53413594", "0.5335886", "0.53316885", "0.5323111", "0.53225935", "0.5316729" ]
0.6569541
6
Todo3 delete the selected todo from the database
@Override public void deleteTodo(final int position) { new AlertDialog.Builder(this) .setIcon(R.drawable.ic_warning_red_24dp) .setTitle(R.string.delete_todo_title) .setMessage(getString(R.string.delete_body_message) + todos.get(position).getTitle() + "'") .setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { todos.remove(position); Toast.makeText(MainActivity.this, "Deleted", Toast.LENGTH_SHORT).show(); adapter.notifyDataSetChanged(); } }) .setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); } }).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteTask() {\r\n int selected = list.getSelectedIndex();\r\n if (selected >= 0) {\r\n Task task = myTodo.getTaskByIndex(selected + 1);\r\n myTodo.getTodo().remove(task.getHashKey());\r\n playSound(\"click.wav\");\r\n }\r\n todoListGui();\r\n }", "public void deleteToDo(View view) {\n View parent = (View) view.getParent();\n TextView taskTextView = (TextView) parent.findViewById(R.id.task_title);\n String task = String.valueOf(taskTextView.getText());\n SQLiteDatabase db = OpenDB.getWritableDatabase();\n db.delete(AccessData.ToDoEntry.table,\n AccessData.ToDoEntry.todo_title + \" = ?\",\n new String[]{task});\n db.close();\n updateUI();\n }", "@Override\n public void onClick(View v) {\n TODO.deleteTodo(todo.getId());\n TODO.saveTodos(context);\n recreate();\n }", "public void deleteTask(String item){\n SQLiteDatabase db = this.getWritableDatabase();\n db.execSQL(\"DELETE FROM ToDo where task='\"+item+\"'\");\n }", "public void deleteTask(View v) {\n //grab the parent view of the DONE button\n View parent = (View)v.getParent();\n\n //grab the TextView from item_todo.xml\n TextView taskTextView = (TextView)parent.findViewById(R.id.taskTitle);\n String task = String.valueOf(taskTextView.getText());\n\n //a read/write database object will be returned\n SQLiteDatabase db = dbHelper.getWritableDatabase();\n\n //delete the entry in the database that matches the selected task\n db.delete(TaskContract.TaskEntry.TABLE,\n TaskContract.TaskEntry.COL_TASK_TITLE + \" =?\",\n new String[]{task});\n db.close(); //close the database object\n updateUI(); //update the look of the ListView\n }", "public void removeByTodoId(long todoId);", "public void deleteToDoList(Context context, ToDoList toDoList) {\n\n // delete from database\n ToDoListDbHelper toDoListDbHelper = new ToDoListDbHelper(context);\n toDoListDbHelper.delete(toDoList);\n\n // delete from list of lists\n toDoListList.remove(toDoList);\n }", "@FXML\n\tprivate void deleteSelected(ActionEvent event) {\n\t\tint selectedIndex = taskList.getSelectionModel().getSelectedIndex();\n\t\tString task = taskList.getItems().get(selectedIndex);\n\t\ttaskList.getSelectionModel().clearSelection();\n\t\ttaskList.getItems().remove(task);\n\t\tchatView.setText(\"\");\n\t\ttaskList.getItems().removeAll();\n\t\tString task_split[] = task.split(\" \", 2);\n\t\tString removeTask = task_split[1];\n\t\tif (task.contains(\"due by\")) {\n\t\t\tString[] taskDate = task_split[1].split(\"\\\\s+\");\n\t\t\tSystem.out.println(taskDate);\n\t\t\tString end = taskDate[taskDate.length - 3];\n\t\t\tSystem.out.println(end);\n\t\t\tremoveTask = task_split[1].substring(0, task_split[1].indexOf(end)).trim();\n\t\t\tSystem.out.println(removeTask);\n\n\t\t}\n\t\tclient.removeTask(removeTask.replace(\"\\n\", \"\"));\n\t}", "public void delete(T ob) throws ToDoListException;", "public void deleteTodoById(@PathVariable(\"id\") long id, Model model) throws RecordNotFoundException {\n TodoItem todoItem = getTodoItemById(id);\n todoItemRepository.delete(todoItem);\n model.addAttribute(\"todoItems\", todoItemRepository.findAll());\n }", "public void deleteItem(ToDoList item) {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME, KEY_ID + \" = ?\",\n new String[]{String.valueOf(item.getId())});\n db.close();\n }", "private void deleteTodoMenu(User u) {\n\t\t\n\t}", "public void deleteTodo(Long todoId) {\n todoRepository.deleteById(todoId);\n }", "public Todo remove(long todoId) throws NoSuchTodoException;", "public void deleteTodoItem(TodoItem item) {\n todoItems.remove(item);\n }", "private void deleteItem()\n {\n Category categoryToDelete = dataCategories.get(dataCategories.size()-1);\n AppDatabase db = Room.databaseBuilder(getApplicationContext(),\n AppDatabase.class, \"database-name\").allowMainThreadQueries().build();\n db.categoryDao().delete(categoryToDelete);\n testDatabase();\n }", "public void removerTodos() {\n\t\t\n\t}", "@Override\n\tpublic Item delete() {\n\t\treadAll();\n\t\tLOGGER.info(\"\\n\");\n\t\t//user can select either to delete a customer from system with either their id or name\n\t\tLOGGER.info(\"Do you want to delete record by Item ID\");\n\t\tlong id = util.getLong();\n\t\titemDAO.deleteById(id);\n\t\t\t\t\n\t\t\t\t\n\t\treturn null;\n\t}", "public void borrarTodo(){\n diccionario.clear();\n }", "public void eliminar(){\n SQLiteDatabase db = conn.getWritableDatabase();\n String[] parametros = {cajaId.getText().toString()};\n db.delete(\"personal\", \"id = ?\", parametros);\n Toast.makeText(getApplicationContext(), \"Se eliminó el personal\", Toast.LENGTH_SHORT).show();\n db.close();\n }", "private void delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query = \"select * from items where IT_ID=?\";\n\t\t\t\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\tpst.setString(1, txticode.getText());\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tif(count == 1)\n\t\t\t{\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Are you sure you want to delete selected item data?\", \"ALERT\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(choice==JOptionPane.YES_OPTION)\n\t\t\t\t{\n\t\t\t\t\tquery=\"delete from items where IT_ID=?\";\n\t\t\t\t\tpst = con.prepareStatement(query);\n\t\t\t\t\t\n\t\t\t\t\tpst.setString(1, txticode.getText());\n\t\t\t\t\t\n\t\t\t\t\tpst.execute();\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Deleted Successfully\", \"RESULT\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tloadData();\n\t\t\t\t\n\t\t\t\trs.close();\n\t\t\t\tpst.close();\n\t\t\t\tcon.close();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Record Not Found!\", \"Alert\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t\tcon.close();\n\t\t\t\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t}", "@RequestMapping(value = \"/api/todo-items/{id}\", method = RequestMethod.DELETE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n\tpublic ResponseEntity<TodoItem> deleteItem(@PathVariable(\"id\") long id) {\n\t\tSystem.out.println(\"Fetching & Deleting task with id \" + id);\n\n\t\tTodoItem item = todoItemService.findById(id);\n\t\tif (item == null) {\n\t\t\tSystem.out.println(\"Unable to delete. Item with id \" + id + \" not found\");\n\t\t\treturn new ResponseEntity<TodoItem>(HttpStatus.NOT_FOUND);\n\t\t}\n\n\t\ttodoItemService.delete(id);\n\t\treturn new ResponseEntity<TodoItem>(HttpStatus.NO_CONTENT);\n\t}", "public void delete(Exercise item) {\n mAdapter.deleteItem(item);\n new AsyncDelete().execute(item);\n }", "private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }", "@Override\n\tpublic boolean eliminarTodos() {\n\t\treturn false;\n\t}", "private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}", "@GetMapping(\"/deleteItem\")\n\tpublic String deleteItem(HttpServletRequest servletRequest) {\n\t\t\n\t\ttoDoListService.deleteById(Long.parseLong(servletRequest.getParameter(\"itemId\"))); // Delete the to do list item record.\n\t\t\n\t\treturn \"redirect:/welcome\";\n\t}", "private void deleteNoteOnFirebaseManager(Note note){\n firebase.deleteNoteOnDB(note, unused -> {\n Toast.makeText(this, R.string.note_deletion_success, Toast.LENGTH_LONG).show();\n finish();\n }, e -> {\n Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();\n });\n }", "@Override\n\tpublic void delete(CorsoDiLaurea corso) {\n\t\t\n\t}", "public void delete(Doacao doacao) {\n SQLiteDatabase sqLiteDatabase = getWritableDatabase();\n\n String[] params = {doacao.getId_doacao().toString()};\n sqLiteDatabase.delete(\"doacao\",\"id_doacao = ?\",params);\n\n }", "public boolean removedata(String ToDo) {\n return db.delete(nama_tabel, kolom_1+\"=\\\"\"+ToDo+\"\\\"\", null)>0;\n }", "@Override\n public void deleteItem(P_CK t) {\n \n }", "public void borrarTodosTripulantes();", "@Override\n\tpublic void deleteItem(Object toDelete) {}", "@Override\r\n\tpublic void deletes(String did) {\n\t\tdao.deletes(did);\r\n\t}", "public void onDeleteList() {\n ListsManager listManager = ListsManager.getInstance(context);\n listManager.deleteTable(deletePosition,context);\n Toast.makeText(context, \"deleted TodoList\", Toast.LENGTH_SHORT).show();\n data.remove(deletePosition);\n notifyItemRemoved(deletePosition);\n }", "int deleteByPrimaryKey(Integer tfId);", "public Integer DeletarTodos(){\n\n //REMOVENDO OS REGISTROS CADASTRADOS\n return databaseUtil.GetConexaoDataBase().delete(\"tb_log\",\"log_ID = log_ID\",null);\n\n }", "public void removeByTodoText(String todoText);", "@Command(\"delete\")\n @NotifyChange({\"events\", \"selectedEvent\"})\n public void delete() {\n if(this.selectedEvent != null) {\n eventDao.delete(this.selectedEvent);\n this.selectedEvent = null;\n }\n }", "@Override\n\tpublic ResultWrapper<Boolean> delete(Integer todoId) {\n\t\tResultWrapper<Boolean> rs = new ResultWrapper<Boolean>();\n\t\tif (todoId <= 0 || todoId == null) {\n\t\t\trs.error(false, \"Id Should be greater than 0 or can not be null\");\n\t\t} else {\n\t\t\ttry {\n\t\t\t\ttodosRepo.deleteById(todoId);\n\t\t\t\trs.succeedDeleted(true);\n\n\t\t\t} catch (Exception e) {\n\t\t\t\trs.fail(false, \" Exception Occurs \"+e);\n\t\t\t\treturn rs;\n\t\t\t}\n\n\t\t}\n\t\treturn rs;\n\n\t}", "int deleteByPrimaryKey(String taskid);", "@FXML\r\n public void deleteTreatmentButton(){\r\n int sIndex = treatmentTabletv.getSelectionModel().getSelectedIndex();\r\n String sID = treatmentData.get(sIndex).getIdProperty();\r\n\r\n String deleteTreatment = \"delete from treatment where treatmentID = ?\";\r\n try{\r\n ps = mysql.prepareStatement(deleteTreatment);\r\n ps.setString(1,sID);\r\n ps.executeUpdate();\r\n ps.close();\r\n ps = null;\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n //maybe more in this exception\r\n }\r\n\r\n treatmentData.remove(sIndex);\r\n }", "@Override\n\tpublic void delete(BatimentoCardiaco t) {\n\t\t\n\t}", "public void delete(Long id) {\n\t\tfor (Note project : getNotes()) {\n\t\t\tif (project.getId().equals(id)) {\n\t\t\t\tString sql = \"DELETE FROM todo WHERE ID='\" + id + \"'\";\n\n\t\t\t\tList<Note> todos = sqlUpdate(sql);\n\n\t\t\t\tsetNotes(todos);\n\t\t\t}\n\t\t}\n\n\t\t// this.getHibernateTemplate().delete(project);\n\t}", "public void deleteNote() {\n if (cursor == 0) {\n JOptionPane.showMessageDialog(null, \"There's no note to delete!\", \"Invalid Delete\", JOptionPane.WARNING_MESSAGE);\n } else {\n if (sequence.getNote(cursor) == REST) {\n cursor--;\n controller.setSelected(cursor);\n\n sequence = sequence.withNote(REST, cursor);\n controller.setMidiSequence(sequence);\n } else {\n sequence = sequence.withNote(REST, cursor);\n controller.setMidiSequence(sequence);\n }\n }\n }", "public void deleteToDoTag(long id) {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_TODO_TAG, KEY_ID + \" = ?\", new String[] { String.valueOf(id) });\n }", "public void deleteCt() {\n\t\tlog.info(\"-----deleteCt()-----\");\n\t\t//int index = selected.getCtXuatKho().getCtxuatkhoThutu().intValue() - 1;\n\t\tlistCtKhoLeTraEx.remove(selected);\n\t\tthis.count = listCtKhoLeTraEx.size();\n\t\ttinhTien();\n\t}", "int deleteByExample(ComplainNoteDOExample example);", "int deleteByExample(TourstExample example);", "int deleteByExample(TourExample example);", "int deleteByExample(TipologiaExample example);", "public void deleteButtonClicked(View view) {\n String inputText = johnsInput.getText().toString();\n dbHandler.deleteProduct(inputText);\n printDatabase();\n }", "@Override\n public void onClick(View v) {\n SQLiteDatabaseHelper db = new SQLiteDatabaseHelper(getContext());\n db.deleteTask(task.id);\n ((MainActivity) getActivity()).refreshTaskLists(1);\n getActivity().onBackPressed();\n }", "@Override\r\n\tpublic void delete(Usuario t) {\n\t\t\r\n\t}", "@Override\n public void onClick(View view) {\n todoDBAdapter.open();\n todoDBAdapter.deleteContact(contactID);\n todoDBAdapter.close();\n Toast toast = Toast.makeText(context.getApplicationContext(), R.string.DetailTodo_info_successful_contact_delete, Toast.LENGTH_SHORT);\n toast.show();\n Intent overviewIntent = new Intent(context, Overview.class);\n context.startActivity(overviewIntent);\n }", "public void delete(MainItemOrdered mainItemOrdered);", "@Override\r\n\tpublic void delete(String did) {\n\t\tdao.delete(did);\r\n\t}", "@FXML\n private void deleteUser(ActionEvent event) throws IOException {\n User selectedUser = table.getSelectionModel().getSelectedItem();\n\n boolean userWasRemoved = selectedUser.delete();\n\n if (userWasRemoved) {\n userList.remove(selectedUser);\n UsermanagementUtilities.setFeedback(event,selectedUser.getName().getFirstName()+\" \"+LanguageHandler.getText(\"userDeleted\"),true);\n } else {\n UsermanagementUtilities.setFeedback(event,LanguageHandler.getText(\"userNotDeleted\"),false);\n }\n }", "private void deleteAllTodo() {\n todos.clear();\n adapter.notifyDataSetChanged();\n }", "@FXML\r\n\r\n private void deleteFriend(){\r\n // Delete from GUI\r\n final int selectIndex = udb_FriendsListView.getSelectionModel().getSelectedIndex();\r\n if(selectIndex != -1){\r\n String itemToRemove = udb_FriendsListView.getSelectionModel().getSelectedItem();\r\n final int newSelectedIndex = (selectIndex == udb_FriendsListView.getItems().size() - 1) ? selectIndex - 1 : selectIndex;\r\n udb_FriendsListView.getItems().remove(selectIndex);\r\n udb_FriendsListView.getSelectionModel().select(newSelectedIndex);\r\n\r\n //Delete from DB\r\n try{\r\n FriendsDao.deleteFriend(userName, itemToRemove);\r\n }catch (Exception e){\r\n\r\n }\r\n }\r\n\r\n }", "@FXML\n\tpublic void deleteUser(ActionEvent e) {\n\t\tint i = userListView.getSelectionModel().getSelectedIndex();\n//\t\tUser deletMe = userListView.getSelectionModel().getSelectedItem();\n//\t\tuserList.remove(deletMe); this would work too just put the admin warning\n\t\tdeleteUser(i);\n\t}", "public void deleteParticipacao(Integer id) {\n participacaoRepository.deleteById(id);\n //listClient();\n \n}", "@Override\n\tpublic void delete(Note e) {\n\t\t\n\t}", "public void removeByTodoInteger(int todoInteger);", "int deleteByPrimaryKey(Integer taskid);", "public void borrarTodo()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\tStatement st = conexion.createStatement();\r\n\t\tst.execute(\"DROP TABLE usuarios\");\r\n\t\tst.execute(\"DROP TABLE prestamos\");\r\n\t\tst.execute(\"DROP TABLE libros\");\r\n\t\t}\r\n\t\tcatch (SQLException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void deleteEntry(String ti) throws SQLException{\n\t\tourDatabase.delete(DATABASE_TABLE,KEY_APP_ID + \"=?\", new String[] { ti });\r\n\t\t\r\n\t}", "@Override\n public void onClick(View view) {\n mDatabase.deleteNote(singleNote.getId());\n //refresh the activity page.\n ((Activity)context).finish();\n context.startActivity(((Activity) context).getIntent());\n }", "public static void delTask(ArrayList<Task> taskList) {\n // String response; // String variable for the user's input\n String prompt = \"delete\"; // initializing the type of prompt to the user\n int index = promptIndex(taskList, prompt); // prompting, receiving, and error checking the user's input\n if (index != -1) { // if there was not an invalid index value\n taskList.remove(index); // remove the element at this index\n }\n System.out.print(\"\\n\"); // printing a newline for formatting \n pause(); // pausing the screen\n }", "@Override\r\npublic int delete(int id) {\n\treturn detalle_pedidoDao.delete(id);\r\n}", "int deleteByPrimaryKey(String idTipoPersona) throws SQLException;", "int deleteByExample(MovimientoExample example);", "private void deleteItem(final int id){\n // Instantiate AlertDialog builder\n builder = new AlertDialog.Builder(context);\n\n // Inflate the confirmation dialog\n inflater = LayoutInflater.from(context);\n View view = inflater.inflate(R.layout.confirmation_popup, null);\n\n // Instantiate buttons\n Button noButton = view.findViewById(R.id.conf_no_button);\n Button yesButton = view.findViewById(R.id.conf_yes_button);\n\n builder.setView(view);\n dialog = builder.create();\n dialog.show();\n\n\n // When user confirms to delete, delete the task item and clear the dialog\n yesButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // DatabaseHandler\n DatabaseHandler db1 = new DatabaseHandler(context, \"task_details\"); // MODIFIED JUNE 5TH\n\n // Delete the task from database\n db1.deleteTask(id);\n todoItems.remove(getAdapterPosition());\n notifyItemRemoved(getAdapterPosition());\n\n dialog.dismiss();\n }\n });\n\n // When user confirms not to delete, just get rid of the dialog\n noButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n\n }", "@Override\n\tpublic void deleteSelected() {\n\n\t}", "public void Delete(){\n String whereClause2 = PostDatabase.ID + \" = ?\";\n // Specify arguments in placeholder order.\n String[] whereArgs2 = { \"6\" };\n // Issue SQL statement.\n sqlDB.delete(PostDatabase.TABLE_POSTS, whereClause2, whereArgs2);\n\n }", "@FXML\r\n\tprivate void deleteEmployee(ActionEvent event) {\r\n\t\teraseFieldsContent();\r\n\t\tEmployee e = listaStaff.getSelectionModel().getSelectedItem();\r\n\t\tservice.deleteEmployee(e);\r\n\t\tlistaStaff.getItems().remove(e);\r\n\t\tbtDelete.setDisable(true);\r\n\t\tbtEditar.setDisable(true);\r\n\t\tupdateList();\r\n\t}", "@Override\n\tpublic int delete(Uri uri, String selection, String[] selectionArgs) {\n\t\tint cnt = 1;\n\t\tmChallengesDB.del();\n\t\treturn cnt;\n\t}", "int deleteByExample(CliStaffProjectExample example);", "private void handleDeletePressed() {\n if (mCtx == Context.CREATE) {\n finish();\n return;\n }\n\n DialogFactory.deletion(this, getString(R.string.dialog_note), () -> {\n QueryService.awaitInstance(service -> deleteNote(service, mNote.id()));\n }).show();\n }", "private void deleteActionPerformed(ActionEvent evt) throws Exception {\n String teaID = this.teaIDText.getText();\n if(StringUtil.isEmpty(teaID)){\n JOptionPane.showMessageDialog(null, \"请先选择一条老师信息!\");\n return;\n }\n int confirm = JOptionPane.showConfirmDialog(null, \"确认删除?\");\n if(confirm == 0){//确认删除\n Connection con = dbUtil.getConnection();\n int delete = teacherInfo.deleteInfo(con, teaID);\n if(delete == 1){\n JOptionPane.showMessageDialog(null, \"删除成功!\");\n resetValues();\n }\n else{\n JOptionPane.showMessageDialog(null, \"删除失败!\");\n return;\n }\n initTable(new Teacher());//初始化表格\n }\n }", "private void excluirAction() {\r\n Integer i = daoPedido.excluir(this.pedidoVO);\r\n\r\n if (i != null && i > 0) {\r\n msg = activity.getString(R.string.SUCCESS_excluido, pedidoVO.toString());\r\n Toast.makeText(activity, msg + \"(\" + i + \")\", Toast.LENGTH_SHORT).show();\r\n Log.i(\"DB_INFO\", \"Sucesso ao Alterar: \" + this.pedidoVO.toString());\r\n\r\n// this.adapter.remove(this.pedidoVO);\r\n this.refreshData(2);\r\n } else {\r\n msg = activity.getString(R.string.ERROR_excluir, pedidoVO.toString());\r\n Toast.makeText(activity, msg, Toast.LENGTH_SHORT).show();\r\n Log.e(\"DB_INFO\", \"Erro ao Excluir: \" + this.pedidoVO.toString());\r\n }\r\n }", "int deleteByPrimaryKey(Integer did);", "int deleteByPrimaryKey(Integer fitemid);", "public void deleteExercise(User user) {\n\n\t}", "@Override\n public void onClick(View view) {\n long result = typeBookDAO.deleteTypeBook(typeBook.id);\n\n if (result < 0) {\n\n Toast.makeText(context,\"Xoa ko thanh cong!!!\",Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(context,\"Xoa thanh cong!!!\",Toast.LENGTH_SHORT).show();\n // xoa typebook trong arraylist\n arrayList.remove(position);\n\n // f5 adapter\n notifyDataSetChanged();\n\n }\n\n\n\n }", "public void deleteTask(Integer tid);", "@Test\n void deleteNoteSuccess() {\n noteDao.delete(noteDao.getById(2));\n assertNull(noteDao.getById(2));\n }", "@FXML\n\tprivate void handleDeleteTaxi() {\n\t\tint selectedIndex = TaxiTable.getSelectionModel().getSelectedIndex();\n\t\tif (selectedIndex >= 0) {\n\t\t\tTaxiTable.getItems().remove(selectedIndex);\n\t\t} else {\n\t\t\t// Nothing selected.\n\t\t}\n\t}", "public void deleteAllExistedTodoItems() {\n waitForVisibleElement(createToDoBtnEle, \"createTodoBtn\");\n getLogger().info(\"Try to delete all existed todo items.\");\n try {\n Boolean isInvisible = findNewTodoItems();\n System.out.println(\"isInvisible: \" + isInvisible);\n if (isInvisible) {\n Thread.sleep(smallTimeOut);\n waitForClickableOfElement(todoAllCheckbox);\n getLogger().info(\"Select all Delete mail: \");\n System.out.println(\"eleTodo CheckboxRox is: \" + eleToDoCheckboxRow);\n todoAllCheckbox.click();\n waitForClickableOfElement(btnBulkActions);\n btnBulkActions.click();\n deleteTodoSelectionEle.click();\n waitForCssValueChanged(deteleConfirmForm, \"Delete confirm form\", \"display\", \"block\");\n waitForClickableOfElement(deleteTodoBtn);\n waitForTextValueChanged(deleteTodoBtn, \"Delete Todo Btn\", \"Delete\");\n deleteTodoBtn.click();\n waitForCssValueChanged(deteleConfirmForm, \"Delete confirm form\", \"display\", \"none\");\n getLogger().info(\"Delete all Todo items successfully\");\n NXGReports.addStep(\"Delete all Todo items\", LogAs.PASSED, null);\n } else {\n getLogger().info(\"No items to delele\");\n NXGReports.addStep(\"Delete all Todo items\", LogAs.PASSED, null);\n }\n } catch (Exception e) {\n AbstractService.sStatusCnt++;\n e.printStackTrace();\n NXGReports.addStep(\"Delete all Todo items\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n\n }\n\n }", "public void deleteSelection() {\n deleteFurniture(Home.getFurnitureSubList(this.home.getSelectedItems())); \n }", "@Override\n public void onClick(View view) {\n\n mdatabase.deleteTasks(tasks.getId());\n\n //refresh the activity page.\n ((Activity)context).finish();\n context.startActivity(((Activity) context).getIntent());\n }", "@Override\n\tpublic boolean delete(Item obj) {\n\t\ttry{\n\t\t\tString query=\"DELETE FROM items WHERE id = ?\";\n\t\t\tPreparedStatement state = conn.prepareStatement(query,ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n\t\t\tstate.setInt(1, obj.getIndex());\n\t\t\tint nb_rows = state.executeUpdate();\n\t\t\tSystem.out.println(\"Deleted \"+nb_rows+\" lines\");\n\t\t\tstate.close();\n\t\t\t\n\t\t\t// Notify the Dispatcher on a suitable channel.\n\t\t\tthis.publish(EntityEnum.ITEM.getValue());\n\t\t\t\n\t\t\treturn true;\n\t\t} catch (SQLException e){\n\t\t\tJOptionPane jop = new JOptionPane();\n\t\t\tjop.showMessageDialog(null, e.getMessage(),\"PostgreSQLItemDao.delete -- ERROR!\",JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\t\n\t}", "@Override\n\tpublic void delete(Long primaryKey) {\n\t\t\n\t}", "public boolean removeTodo(TodoDto todo)\n {\n Todo model = new Todo();\n model.setId(todo.getId());\n return dao.removeTodo(model);\n }", "int deleteByExample(TNavigationExample example);", "@Test\r\n\tpublic void testDelete() {\n\t\tint todos = modelo.getAll().size();\r\n\r\n\t\tassertTrue(modelo.delete(1));\r\n\r\n\t\t// comprobar que este borrado\r\n\t\tassertNull(modelo.getById(1));\r\n\r\n\t\t// borrar un registro que no existe\r\n\t\tassertFalse(modelo.delete(13));\r\n\t\tassertNull(modelo.getById(13));\r\n\r\n\t\tassertEquals(\"debemos tener un registro menos\", (todos - 1), modelo\r\n\t\t\t\t.getAll().size());\r\n\r\n\t}", "public void eliminarNotas(int id ){\n String[] campos = {Integer.toString(id)};\n db.delete(\"nota\",\"_id=?\",campos);\n }", "public void deleteTask(long id){\n open(); // open the database\n database.delete(\"tasks\", \"_id=\" + id, null);\n close(); // close the database\n Log.v(TAG, \"deleteTask\");\n }", "int deleteByExample(SelectUserRecruitExample example);" ]
[ "0.7428573", "0.73788977", "0.7291981", "0.71556884", "0.711656", "0.69909173", "0.69901514", "0.6924037", "0.6915579", "0.68968636", "0.6867438", "0.68644696", "0.6806292", "0.6700522", "0.6699841", "0.65738696", "0.65702057", "0.65552795", "0.65483224", "0.65401936", "0.652144", "0.651926", "0.6516772", "0.6506859", "0.6498917", "0.6498703", "0.6482134", "0.6481795", "0.6478653", "0.6469584", "0.6469289", "0.6442128", "0.6438307", "0.6434168", "0.6415663", "0.6413001", "0.64119506", "0.6402163", "0.63806355", "0.6379778", "0.6363846", "0.63552445", "0.6351886", "0.63504404", "0.63458294", "0.63403", "0.6339549", "0.6336748", "0.63343346", "0.631543", "0.6315341", "0.6306505", "0.63056594", "0.6293295", "0.6280314", "0.627996", "0.6279302", "0.62791216", "0.62774205", "0.6274659", "0.62702936", "0.6269279", "0.62669843", "0.62628657", "0.6256334", "0.6255632", "0.6253951", "0.6240502", "0.6240366", "0.623973", "0.6228578", "0.6228386", "0.62201303", "0.6210643", "0.6209842", "0.62052256", "0.61991364", "0.619531", "0.61942524", "0.61830443", "0.6179948", "0.6179671", "0.61647403", "0.61643744", "0.6163691", "0.6156095", "0.6154852", "0.61540514", "0.61437744", "0.61431897", "0.6141987", "0.6139177", "0.6138863", "0.61369425", "0.6136784", "0.6135569", "0.6132609", "0.6132419", "0.6130634", "0.6130401" ]
0.6621908
15
Todo4 delete all the todos from the database
private void deleteAllTodo() { todos.clear(); adapter.notifyDataSetChanged(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removerTodos() {\n\t\t\n\t}", "public void deleteAll() {\n new Thread(new DeleteAllRunnable(dao)).start();\n }", "public void deleteAll();", "@Query(\"DELETE FROM note_table\")\n void deleteAllNotes();", "public void deleteAll();", "public void deleteAll();", "public void deleteAll();", "public static void deleteAll() {\n String sql = \"DELETE FROM articulo\";\n try(Connection conn = connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)){\n pstmt.executeUpdate();\n }\n catch(SQLException e) {\n System.out.println(\"Error al eliminar en la base de datos.\");\n //Descomentar la siguiente linea para mostrar el mensaje de error.\n //System.out.println(e.getMessage());\n }\n }", "public Integer DeletarTodos(){\n\n //REMOVENDO OS REGISTROS CADASTRADOS\n return databaseUtil.GetConexaoDataBase().delete(\"tb_log\",\"log_ID = log_ID\",null);\n\n }", "private void deletedAllNewsFromDatabase() {\n new DeleteNewsAsyncTask(newsDao).execute();\n }", "public void borrarTodo()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\tStatement st = conexion.createStatement();\r\n\t\tst.execute(\"DROP TABLE usuarios\");\r\n\t\tst.execute(\"DROP TABLE prestamos\");\r\n\t\tst.execute(\"DROP TABLE libros\");\r\n\t\t}\r\n\t\tcatch (SQLException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void borrarTodosTripulantes();", "public void deleteTodo(Long todoId) {\n todoRepository.deleteById(todoId);\n }", "public void deleteAll() {\n\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\tdao.deleteAll();\n\n\t}", "public void deleteAll() {\n repository.deleteAll();\n }", "public void deleteTableRecords()\n {\n coronaRepository.deleteAll();\n }", "public void deleteToDoList(Context context, ToDoList toDoList) {\n\n // delete from database\n ToDoListDbHelper toDoListDbHelper = new ToDoListDbHelper(context);\n toDoListDbHelper.delete(toDoList);\n\n // delete from list of lists\n toDoListList.remove(toDoList);\n }", "@Override\n public void onClick(View v) {\n TODO.deleteTodo(todo.getId());\n TODO.saveTodos(context);\n recreate();\n }", "void deleteAll();", "void deleteAll();", "void deleteAll();", "public void deleteAllArticles();", "@Override\n\tpublic boolean eliminarTodos() {\n\t\treturn false;\n\t}", "public void deleteTodoById(@PathVariable(\"id\") long id, Model model) throws RecordNotFoundException {\n TodoItem todoItem = getTodoItemById(id);\n todoItemRepository.delete(todoItem);\n model.addAttribute(\"todoItems\", todoItemRepository.findAll());\n }", "public void deleteAll() {\n\t\t\n\t}", "public void deleteAll()\n\t{\n\t}", "public void deleteAll()\n\t{\n\t}", "@Test\n @Sql({\"classpath:sql/truncate.sql\", \"classpath:/sql/single_todolist_with_two_todos.sql\"})\n public void shouldDeleteTodoFromTodoList() {\n ApiTodoList todoList = given()\n .standaloneSetup(controller, apiControllerAdvice)\n .spec(RequestSpecification.SPEC)\n .delete(\"/todolists/1/todos/2\")\n .then()\n .statusCode(HttpStatus.NO_CONTENT.value())\n .extract()\n .as(ApiTodoList.class);\n\n // And: The returned todolist should only contain the correct todo\n assertThat(todoList.getItems().size()).isEqualTo(1);\n assertThat(todoList.getItems().get(0).getText()).isEqualTo(\"Existing Todo 1\");\n\n // And: The todolist should only contain one todo in the db\n doInJPA(this::getEntityManagerFactory, em -> {\n TodoList todoListInDb = em.find(TodoList.class, 1L);\n assertThat(todoListInDb.getItems().size()).isEqualTo(1);\n });\n }", "@Override\n\tpublic void deleteAll() {\n\n\t}", "@Override\n\tpublic void deleteAll() {\n\n\t}", "@Override\n\tpublic void deleteAll() {\n\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}", "public void delete(Long id) {\n\t\tfor (Note project : getNotes()) {\n\t\t\tif (project.getId().equals(id)) {\n\t\t\t\tString sql = \"DELETE FROM todo WHERE ID='\" + id + \"'\";\n\n\t\t\t\tList<Note> todos = sqlUpdate(sql);\n\n\t\t\t\tsetNotes(todos);\n\t\t\t}\n\t\t}\n\n\t\t// this.getHibernateTemplate().delete(project);\n\t}", "@Override\r\n\tpublic void deleteAll() {\n\r\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Override\n\tpublic void deleteAll() {\n\t\t\n\t}", "@Query(\"DELETE FROM issue_table\")\n void deleteAll();", "public void deleteAll() {\n\t\ttry{\t\n\t\t\tbanco.delete(meuBancoHelper.TABELA_MTAG,null,null);\n\t\t\t}\n\t\t\tcatch(NullPointerException e)\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t}", "@RequestMapping(value = \"/deleteAllmensajes\", method = RequestMethod.DELETE)\n\tpublic ResponseEntity<Void> deleteAll(){\n\t\tList<Mensaje> mensajeBorrar = chatDAO.getAllMessages();\n\t\tchatDAO.deleteAll(mensajeBorrar);\n\t\treturn new ResponseEntity<Void>(HttpStatus.OK);\n\t}", "void deleteAll() throws Exception;", "void deleteAll() throws Exception;", "@Override\n\tpublic void deleteAll() {\n\t\t List<User> userList = selectAllUser();\n\t\t for (User user : userList) {\n\t\t\tuserMapper.deleteUser(user.getId());\n\t\t}\n\t}", "public void deleteAll(){\n SQLiteDatabase db = this.getWritableDatabase();\n db.execSQL(\"delete from \" + TABLE_NAME);\n }", "public void deleteAll()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSessionwithTransation();\r\n\t\t\tbookdao.deleteAll();\r\n\t\t\tbookdao.closeSessionwithTransaction();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void deleteAllPets() {\n// int rowsDeleted = getContentResolver().delete(ArtistsContracts.GenderEntry.CONTENT_URI, null, null);\n// Log.v(\"CatalogActivity\", rowsDeleted + \" rows deleted from pet database\");\n }", "public void borrarTodo(){\n diccionario.clear();\n }", "public abstract void deleteAll();", "public void deleteAllExistedTodoItems() {\n waitForVisibleElement(createToDoBtnEle, \"createTodoBtn\");\n getLogger().info(\"Try to delete all existed todo items.\");\n try {\n Boolean isInvisible = findNewTodoItems();\n System.out.println(\"isInvisible: \" + isInvisible);\n if (isInvisible) {\n Thread.sleep(smallTimeOut);\n waitForClickableOfElement(todoAllCheckbox);\n getLogger().info(\"Select all Delete mail: \");\n System.out.println(\"eleTodo CheckboxRox is: \" + eleToDoCheckboxRow);\n todoAllCheckbox.click();\n waitForClickableOfElement(btnBulkActions);\n btnBulkActions.click();\n deleteTodoSelectionEle.click();\n waitForCssValueChanged(deteleConfirmForm, \"Delete confirm form\", \"display\", \"block\");\n waitForClickableOfElement(deleteTodoBtn);\n waitForTextValueChanged(deleteTodoBtn, \"Delete Todo Btn\", \"Delete\");\n deleteTodoBtn.click();\n waitForCssValueChanged(deteleConfirmForm, \"Delete confirm form\", \"display\", \"none\");\n getLogger().info(\"Delete all Todo items successfully\");\n NXGReports.addStep(\"Delete all Todo items\", LogAs.PASSED, null);\n } else {\n getLogger().info(\"No items to delele\");\n NXGReports.addStep(\"Delete all Todo items\", LogAs.PASSED, null);\n }\n } catch (Exception e) {\n AbstractService.sStatusCnt++;\n e.printStackTrace();\n NXGReports.addStep(\"Delete all Todo items\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n\n }\n\n }", "public void deleteAll() {\n tasks = new ArrayList<>();\n }", "@Override\n\t@Transactional\n\tpublic void deleteAll() throws Exception {\n\t\tdetalleCarritoRepository.deleteAll();\n\t}", "private void deleteItem()\n {\n Category categoryToDelete = dataCategories.get(dataCategories.size()-1);\n AppDatabase db = Room.databaseBuilder(getApplicationContext(),\n AppDatabase.class, \"database-name\").allowMainThreadQueries().build();\n db.categoryDao().delete(categoryToDelete);\n testDatabase();\n }", "public List<Todo> clear() {\n final Collection<Todo> values = get();\n todos.remove(new BasicDBObject());\n return new ArrayList<Todo>(values);\n }", "public void deleteAll() {\n\t\t mongoTemplate.remove(new Query(), COLLECTION);\n\t}", "public void deleteallCart() {\n db = helper.getWritableDatabase();\n db.execSQL(\"delete from \" + DatabaseConstant.TABLE_NAME_CART);\n db.close();\n }", "@Override\r\n\t@Transactional\r\n\tpublic void deleteAll() {\n\t\ttopicContentDao.deleteAll();\r\n\t}", "public void deleteAll() {\n try (Connection connection = dataSource.getConnection();\n Statement statement = connection.createStatement()) {\n statement.execute(INIT.DELETE_ALL.toString());\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }", "public void deleteAllTransactions();", "int deleteAll();", "@GetMapping(\"/deleteAll\")\n public void deleteAll() {\n userRepository.deleteAll().subscribe();\n }", "public void clearDatabase() {\n\n\t\tObjectSet<Article> articles = db.query(Article.class);\n\t\tarticles.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<CreditCard> creditCards = db.query(CreditCard.class);\n\t\tcreditCards.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Customer> customers = db.query(Customer.class);\n\t\tcustomers.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<OrderDetail> orderDetails = db.query(OrderDetail.class);\n\t\torderDetails.stream()\n\t\t\t.forEach(db::delete);\n\t\t\n\t\tSystem.out.println(\"\\nBase de dades esborrada per complet\");\n\t}", "public void deleteAllArtisti() throws RecordCorrelatoException;", "private void deleteTodoMenu(User u) {\n\t\t\n\t}", "@Override\n\t@Transactional\n\tpublic void deleteAll() throws Exception {\n\t\tclienteRepository.deleteAll();\n\t}", "public void deleteAll() {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME , null , null);\n }", "public void deleteAllRepeaters() {\n new DeleteAllRepeatersAsyncTask(repeaterDao).execute();\n }", "public static void clean(Context context) {\n try (SQLiteDatabase db = new DatabaseFactory(context, null).getWritableDatabase()) {\n UploadingFilesRepository uploadRepo = new UploadingFilesRepository(db);\n Response response = uploadRepo.deleteAll();\n\n SyncQueueRepository syncRepo = new SyncQueueRepository(db);\n List<SyncQueueEntryModel> syncEntries = syncRepo.getAll();\n\n for (SyncQueueEntryModel syncEntry : syncEntries) {\n\n boolean isProcessing = syncEntry.getStatus() == SyncStateEnum.PROCESSING.getValue();\n boolean isQued = syncEntry.getStatus() == SyncStateEnum.QUEUED.getValue();\n\n if (isProcessing || isQued) {\n\n SyncQueueEntryDbo dbo = new SyncQueueEntryDbo(syncEntry);\n dbo.setProp(SynchronizationQueueContract._STATUS, SyncStateEnum.IDLE.getValue());\n\n Response updateResponse = syncRepo.update(dbo.toModel());\n }\n }\n } catch (Exception e) {\n\n }\n }", "@Test\r\n\tpublic void testDeleteAll() throws Exception {\n\t\tArrayList<Calificacion> calificaciones = modelo.getAll();\r\n\t\tfor (Calificacion calificacion : calificaciones) {\r\n\t\t\tassertTrue(modelo.delete(calificacion.getId()));\r\n\t\t}\r\n\t\tassertNull(modelo.getAll());\r\n\t}", "@Override\r\n public void removeAll() {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n em.getTransaction().begin();\r\n Query query = em.createQuery(\"DELETE FROM Assunto \");\r\n query.executeUpdate();\r\n em.getTransaction().commit();\r\n }", "public void deleteParticipacao(Integer id) {\n participacaoRepository.deleteById(id);\n //listClient();\n \n}", "public void deleteAllRequests() {\n try {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME, null, null);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME);\n db.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Modifying\n @Transactional\n @Query(\"DELETE FROM \" + dbName)\n void deleteAllFromTable();", "@Test\r\n\tpublic void testDelete() {\n\t\tint todos = modelo.getAll().size();\r\n\r\n\t\tassertTrue(modelo.delete(1));\r\n\r\n\t\t// comprobar que este borrado\r\n\t\tassertNull(modelo.getById(1));\r\n\r\n\t\t// borrar un registro que no existe\r\n\t\tassertFalse(modelo.delete(13));\r\n\t\tassertNull(modelo.getById(13));\r\n\r\n\t\tassertEquals(\"debemos tener un registro menos\", (todos - 1), modelo\r\n\t\t\t\t.getAll().size());\r\n\r\n\t}", "@Delete\n void delete(Task... task);", "@Override\n\tpublic void deleteAll() {\n\t\tmDB.execSQL(\"DROP TABLE EVENT\");\n\t}", "public void removeByTodoId(long todoId);", "@Override\n\tpublic void deleteAll() throws Exception {\n\t\tcomproRepository.deleteAll();\n\t}", "private void deleteAllBooks(){\n int rowsDeleted = getContentResolver().delete(BookContract.BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", rowsDeleted + \" rows deleted from database\");\n }", "public void deleteTask(String item){\n SQLiteDatabase db = this.getWritableDatabase();\n db.execSQL(\"DELETE FROM ToDo where task='\"+item+\"'\");\n }", "public void deleteAll() {\n Session session = getSessionFactory().openSession();\n\n try {\n session.beginTransaction();\n Query query = session.createQuery(\"DELETE FROM Person \");\n query.executeUpdate();\n session.getTransaction().commit();\n LOGGER.log(Level.INFO,\"Successfully deleted all persons.\");\n }\n catch (Exception e){\n session.getTransaction().rollback();\n LOGGER.log(Level.INFO,\"Deletion of all persons failed\");\n }\n finally {\n session.close();\n }\n }", "public void eliminarTodosLosElementos(){\n\t\tlistModel.removeAllElements();\n\t}", "@Override\r\n\tpublic boolean deleteAll_de() throws Exception {\n\t\treturn tableDao.deleteAll_de();\r\n\t}", "@Override\n\tpublic void deleteAll() throws Exception {\n\t\t\n\t}", "@Test\n public void deleteTaskByIdAndGettingTasks() {\n mDatabase.taskDao().insertTask(TASK);\n\n //When deleting a task by id\n mDatabase.taskDao().deleteTaskById(TASK.getId());\n\n //When getting the tasks\n List<Task> tasks = mDatabase.taskDao().getTasks();\n // The list is empty\n assertThat(tasks.size(), is(0));\n }", "private void deleteAllBooks() {\n int booksDeleted = getContentResolver().delete(BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", booksDeleted + getString(R.string.all_deleted));\n }", "public void deleteToDo(View view) {\n View parent = (View) view.getParent();\n TextView taskTextView = (TextView) parent.findViewById(R.id.task_title);\n String task = String.valueOf(taskTextView.getText());\n SQLiteDatabase db = OpenDB.getWritableDatabase();\n db.delete(AccessData.ToDoEntry.table,\n AccessData.ToDoEntry.todo_title + \" = ?\",\n new String[]{task});\n db.close();\n updateUI();\n }", "public void deleteAllFromDB() {\r\n for (int i = 0; i < uploads.size(); i++) {\r\n FileUtil.deleteFile(uploads.get(i).getFilepath());\r\n }\r\n super.getBasebo().remove(uploads);\r\n }", "void deleteAll(Collection<?> entities);", "@Test\n void testDeleteAllEntries() {\n ToDoList todoList = new ToDoList();\n ToDo todo1 = new ToDo(\"Todo1\");\n todo1.setInhalt(\"Dies ist ein Test\");\n todoList.add(todo1);\n todo1.setStatus(Status.BEENDET);\n todoList.add(new ToDo((\"Todo2\")));\n ToDo todo3 = new ToDo(\"Todo3\");\n todo3.setInhalt(\"3+3=6\");\n todo3.setStatus(Status.IN_ARBEIT);\n todoList.add(todo3);\n\n //Entferne alle Elemente mittels Iterator\n Iterator it = todoList.iterator();\n while (it.hasNext()){\n it.next();\n it.remove();\n }\n\n assertEquals(0, todoList.size());\n }", "public void onDeleteList() {\n ListsManager listManager = ListsManager.getInstance(context);\n listManager.deleteTable(deletePosition,context);\n Toast.makeText(context, \"deleted TodoList\", Toast.LENGTH_SHORT).show();\n data.remove(deletePosition);\n notifyItemRemoved(deletePosition);\n }", "@DeleteMapping(\"/deleteAll\")\n\tpublic void deleteAll()\n\t{\n\t\tcourseService.deleteAll();\n\t}" ]
[ "0.70670944", "0.7014486", "0.6944846", "0.6934081", "0.6928904", "0.6928904", "0.6928904", "0.6927215", "0.6924829", "0.6877527", "0.6839954", "0.6768211", "0.6760028", "0.6756001", "0.6746103", "0.67372686", "0.66911364", "0.66906613", "0.668834", "0.66869825", "0.66869825", "0.66869825", "0.66715807", "0.6669577", "0.6667461", "0.66471416", "0.6643118", "0.6643118", "0.6626364", "0.6617223", "0.6617223", "0.6617223", "0.65880054", "0.65880054", "0.65880054", "0.65880054", "0.6582699", "0.6570174", "0.65433407", "0.65433407", "0.65433407", "0.65433407", "0.65433407", "0.65433407", "0.65433407", "0.65433407", "0.65148675", "0.6497888", "0.6496029", "0.6489513", "0.6489513", "0.6476194", "0.6457306", "0.64552873", "0.6437973", "0.64319265", "0.6415274", "0.6410683", "0.64033115", "0.6401513", "0.63972795", "0.6382741", "0.6366754", "0.63624686", "0.6362059", "0.6350103", "0.6339982", "0.6332012", "0.63291967", "0.63179094", "0.6316016", "0.6310223", "0.6302771", "0.62990993", "0.62986124", "0.6292739", "0.62900746", "0.62864864", "0.6284625", "0.62820184", "0.62653023", "0.62652105", "0.62523603", "0.6250576", "0.6237384", "0.62296844", "0.6222398", "0.6212173", "0.620662", "0.62032324", "0.62027514", "0.62008184", "0.61989164", "0.61895394", "0.618709", "0.6183624", "0.6182954", "0.6170906", "0.6167243", "0.6164518" ]
0.75315905
0
Todo5 load all the todos from the database
public ArrayList<Todo> getAllTodo() { todos = new ArrayList<>(); todos.add(new Todo("Homework", "Not Done", "High", "20/10/2018", "12:00 PM")); layoutManager = new LinearLayoutManager(this); return todos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.util.List<Todo> findAll();", "public List<Todo> getAllTodos() {\n List<Todo> todos = new ArrayList<>();\n\n String TASKS_SELECT_QUERY = String.format(\"SELECT * FROM %s\", TABLE_TODOS);\n\n // \"getReadableDatabase()\" and \"getWriteableDatabase()\" return the same object (except under low\n // disk space scenarios)\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(TASKS_SELECT_QUERY, null);\n try {\n if (cursor.moveToFirst()) {\n do {\n long id = cursor.getLong(cursor.getColumnIndex(KEY_TODO_ID));\n String value = cursor.getString(cursor.getColumnIndex(KEY_TODO_VALUE));\n String dueDate = cursor.getString(cursor.getColumnIndex(KEY_TODO_DUE_DATE));\n boolean status = cursor.getInt(cursor.getColumnIndex(KEY_TODO_STATUS)) == 1;\n String notes = cursor.getString(cursor.getColumnIndex(KEY_TODO_NOTES));\n int priority = cursor.getInt(cursor.getColumnIndex(KEY_TODO_PRIORITY));\n todos.add(new Todo(id, value, dueDate, status, notes, priority));\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n Log.d(TAG, \"Error while trying to get todos from database\");\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n return todos;\n }", "private void getTodoItemsFromDatabase(){\n Cursor result = todoDatabaseHelper.getAllData();\n if(result.getCount() > 0){\n //there is some data\n while(result.moveToNext()){\n TodoItem todoItem = new TodoItem(result.getInt(0) ,result.getString(1), result.getString(2));\n todoItem.setSelected(false);\n todoItem.setCollapsed(true);\n todoItems.add(todoItem);\n }\n }\n }", "public List<TodoItemEntity> findAll(){\n return todoItemRepository.findAll();\n }", "public List<TodoDto> getAllTodos()\n {\n List<Todo> models = dao.getAllTodos();\n List<TodoDto> dtos = new ArrayList<TodoDto>();\n for(Todo model : models){\n TodoDto dto = new TodoDto();\n dto.setTotal_quantity(model.getTotal_quantity());\n dto.setTitle(model.getTitle());\n dto.setDescription(model.getDescription());\n dto.setId(model.getId());\n dtos.add(dto);\n }\n return dtos;\n }", "List<O> obtenertodos() throws DAOException;", "@GetMapping(\"/api/todoItems\")\n\t public ResponseEntity<?> fetchAllTodoItems (){\n\t\t \n\t\t \n\t\t \n\t\t \n\t }", "public void readToDos(Context context) {\n ToDoListDbHelper dbHelper = new ToDoListDbHelper(context);\n dbHelper.readAll(toDoListList);\n }", "public ArrayList<Todo> getAllTodos() throws SQLException{\n \n ArrayList<Todo> resultList = new ArrayList<>();\n \n try {\n \n\n String sql = \"SELECT * FROM todos\";\n\n Statement statement = conn.createStatement();\n ResultSet result = statement.executeQuery(sql); //SQLException\n\n while (result.next()){\n \n int id = result.getInt(\"id\");\n String task = result.getString(\"task\");\n int difficulty = result.getInt(\"difficulty\");\n Date dueDate = result.getDate(\"dueDate\");\n Status status = Status.valueOf(result.getString(\"status\"));\n\n \n resultList.add(new Todo(id, task, difficulty, dueDate, status));\n \n }\n } catch (InvalidDataException | IllegalArgumentException ex) {\n throw new SQLException(\"Error getting todo from database\", ex.getMessage());\n }\n return resultList;\n }", "public static List<Task> getTaskFromDb() {\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 return taskList;\n\n }", "public static TodoItemList getTodoItems(){\n TodoItemList todoItemList = new TodoItemList();\n ArrayList<TodoItem> todoItems = new ArrayList<>();\n\n try(Statement statement = connection.createStatement()){\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM todo_items\");\n while(resultSet.next()){\n String title, description, bit;\n boolean isCompleted;\n title = resultSet.getString(\"title\");\n description = resultSet.getString(\"description\");\n bit = resultSet.getString(\"completed\");\n if(bit.equals(\"1\")){\n isCompleted = true;\n }else{\n isCompleted = false;\n }\n TodoItem todoItem = new TodoItem(title, description, isCompleted);\n todoItems.add(todoItem);\n }\n }catch (SQLException exc){\n Logger.getLogger(Database.class.getName()).log(Level.SEVERE, \"Attempting to get todo items.\", exc);\n }\n\n todoItemList.setTodoItems(todoItems);\n return todoItemList;\n }", "@Override\n\tpublic ResultWrapper<List<Todos>> getAll() {\n\t\tResultWrapper<List<Todos>> rs = new ResultWrapper<List<Todos>>();\n\t\tList<Todos> todosList = todosRepo.findAllTodos();\n\t\tif (todosList.size() > 0) {\n\t\t\trs.succeedGet(todosList);\n\t\t\treturn rs;\n\t\t} else {\n\t\t\trs.setResult(todosList);\n\t\t\trs.setStatus(Result.SUCCESS);\n\t\t\trs.setMessage(\"List is empty\");\n\t\t\treturn rs;\n\t\t}\n\t}", "public java.util.Collection getTodos();", "private void getAllNewsFromDatabase() {\n new GetAllNewsAsyncTask(newsDao).execute(newsList);\n }", "public java.util.List<Todo> findByTodoId(long todoId);", "List<Entidade> listarTodos();", "public List<TodoItem> getAllTodoItems() {\n List<TodoItem> result = todoItemRepository.findByOrderByTargetDateAsc();\n\n if (result.size() > 0) {\n return result;\n } else {\n return new ArrayList<>();\n }\n }", "public List<Todo> getAllTodos(String sortOrder)\n {\n return null;\n }", "public List<Todo> getAllToDosByTag(String tag_name) {\n List<Todo> todos = new ArrayList<Todo>();\n \n String selectQuery = \"SELECT * FROM \" + TABLE_TODO + \" td, \"\n + TABLE_TAG + \" tg, \" + TABLE_TODO_TAG + \" tt WHERE tg.\"\n + KEY_TAG_NAME + \" = '\" + tag_name + \"'\" + \" AND tg.\" + KEY_ID\n + \" = \" + \"tt.\" + KEY_TAG_ID + \" AND td.\" + KEY_ID + \" = \"\n + \"tt.\" + KEY_TODO_ID;\n \n Log.e(LOG, selectQuery);\n \n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n \n // prechadza vsetky riadky a pridava do listu\n if (c.moveToFirst()) {\n do {\n \tTodo td = new Todo();\n td.setId(c.getInt((c.getColumnIndex(KEY_ID))));\n td.setPoznamka((c.getString(c.getColumnIndex(KEY_TODO))));\n td.setStatus((c.getInt(c.getColumnIndex(KEY_STATUS))));\n td.setPriority((c.getInt(c.getColumnIndex(KEY_PRIORITY))));\n td.setDateRealized((c.getString(c.getColumnIndex(KEY_DATE))));\n td.setCreated(c.getString(c.getColumnIndex(KEY_CREATED_AT)));\n \n todos.add(td);\n } while (c.moveToNext());\n }\n \n return todos;\n }", "@Override\n\tpublic List<ExamenDTO> obtenerTodos() {\n\t\tList<ExamenDTO> examenes= new ArrayList<ExamenDTO>();\n\t\tdao.findAll().forEach(e -> examenes.add(Mapper.getDTOFromEntity(e)));\n\t\treturn examenes;\n\t}", "public List<Todos> fetchTodos(User user) {\n\t\treturn null;\n\t}", "public java.util.Collection getTodo();", "public Todo fetchByPrimaryKey(long todoId);", "private void loadNotesFromDB(){\n AppDB appDB = Room.databaseBuilder(getApplicationContext(), AppDB.class, \"app-database\").build();\n\n new Thread(new Runnable() {\n @Override\n public void run() {\n List<Note> notes = appDB.notesDao().getAllNotes();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // TODO: setup My RecyclerView\n setupNotesRecyclerView(notes);\n Log.d(\"MainActivity\", \"Notes Count: \" + notes.size());\n }\n });\n }\n }).start();\n }", "public List<Ejemplar> getAll();", "public LiveData<List<Task>> getAllTasks(){\n allTasks = dao.getAll();\n return allTasks;\n }", "public void loadToDoList() {\n try {\n toDoList = jsonReader.read();\n System.out.println(\"Loaded \" + toDoList.getName() + \" from \" + JSON_STORE);\n } catch (IOException e) {\n System.out.println(\"Unable to read from file: \" + JSON_STORE);\n }\n }", "public ArrayList<ToDoList> getAllItems() {\n ArrayList<ToDoList> itemsList = new ArrayList<ToDoList>();\n String selectQuery = \"SELECT * FROM \" + TABLE_NAME;\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (cursor.moveToFirst()) {\n do {\n ToDoList item = new ToDoList(cursor.getString(1), cursor.getString(2), cursor.getInt(0));\n itemsList.add(item);\n } while (cursor.moveToNext());\n }\n return itemsList;\n }", "@Query(\"SELECT * from task_table ORDER BY task ASC\")\n LiveData<List<Task>> getAllTasks();", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "public List<ModelObject> readAll();", "public java.util.List<Todo> findByUserId(long userId);", "public List<ViajeroEntity> findAll() {\n LOGGER.log(Level.INFO, \"Consultando todos\");\n TypedQuery<ViajeroEntity> query = em.createQuery(\"select u from ViajeroEntity u\", ViajeroEntity.class);\n return query.getResultList();\n }", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "WsTodoList[] getAllTodoLists();", "public List<Aplicativo> buscarTodos() {\n return repositorio.findAll();\n }", "@GetMapping(\"/all\")\n\tpublic ResponseEntity<List<DashBoard>> retrieveAllTodos() {\n\t\treturn new ResponseEntity<List<DashBoard>>(todoRepoImpl.findAll(), HttpStatus.OK);\n\t}", "public Cursor fetchAllTodos() {\n\t\treturn database.query(DATABASE_TABLE, new String[] { KEY_COMPANYID,\n\t\t\t\tKEY_COMPANYNAME, KEY_COMPANYDESCRIPTION, KEY_WEBSITE, KEY_COMPANYIMG }, null, null, null,\n\t\t\t\tnull, null);\n\t}", "public List<Todo> getTodosByUserId(Long userId) {\n return todoRepository.findByCreatedById(userId);\n }", "@Dao\n@TypeConverters({DateConverter.class})\npublic interface DAO {\n\n @Insert(onConflict = OnConflictStrategy.REPLACE)\n void insert(DatabaseModel databaseModels);\n\n @Query(\"Select *from todoitem\")\n LiveData<List<DatabaseModel>> getAllTask();\n\n @Query(\"Select * from todoitem where id = :id\")\n LiveData<DatabaseModel> getTaskById(int id);\n\n @Query(\"Select * from todoitem where tag = :tag\")\n LiveData<List<DatabaseModel>> getTaskByTag(String tag);\n\n @Query(\"Select * from todoitem where priority = :priority\")\n LiveData<List<DatabaseModel>> getTaskByPriority(String priority);\n\n @Query(\"Select * from todoitem where isTaskDone = :isDone\")\n LiveData<List<DatabaseModel>> getTaskByStatus(Boolean isDone);\n\n @Query(\"Delete from todoitem where id = :id\")\n void deleteById(int id);\n\n @Delete\n void delete(DatabaseModel databaseModel);\n\n\n}", "public List<Task> getAllTasks() {\n List<Task> tasks = new ArrayList<Task>();\n String selectQuery = \"SELECT * FROM \" + TABLE_TASKS+\" ORDER BY \"+KEY_DATE;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Task tk = new Task();\n tk.setId(c.getLong((c.getColumnIndex(KEY_ID))));\n tk.setTaskName((c.getString(c.getColumnIndex(KEY_TASKNAME))));\n tk.setDateAt(c.getString(c.getColumnIndex(KEY_DATE)));\n tk.setStatus(c.getInt(c.getColumnIndex(KEY_STATUS)));\n\n // adding to todo list\n tasks.add(tk);\n } while (c.moveToNext());\n }\n c.close();\n return tasks;\n }", "public List<TodoTag> getAllTodosTags() {\n List<TodoTag> todoTags = new ArrayList<TodoTag>();\n String vyber = \"SELECT * FROM \" + TABLE_TODO_TAG;\n \n Log.e(LOG, vyber);\n \n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(vyber, null);\n \n if (c.moveToFirst()) {\n do {\n \tTodoTag t = new TodoTag();\n t.setId(c.getInt((c.getColumnIndex(KEY_ID))));\n t.setTodo_id(c.getInt(c.getColumnIndex(KEY_TODO_ID)));\n t.setTag_id(c.getInt(c.getColumnIndex(KEY_TAG_ID)));\n todoTags.add(t);\n } while (c.moveToNext());\n }\n return todoTags;\n }", "public ArrayList<Socio> obtenerTodos() {\n return (ArrayList<Socio>) socioRepo.findAll();\n }", "public List<Note> findAllNotes() {\n\n\t\tMap<String, Object> params = new HashMap<String, Object>();\n\n\t\tString sql = \"SELECT * FROM todo\";\n\n\t\tList<Note> result = getInstance().namedParameterJdbcTemplate.query(sql, params, new UserMapper());\n\t\tfor (Note project : result) {\n\t\t\tSystem.out.println(\"id:\" + project.getId() + \", name:\" + project.getName() + \", shortcut:\" + project.getAbbreviation() + \", description:\" + project.getDescription());\n\t\t}\n\n\t\tsetNotes(result);\n\n\t\treturn getNotes();\n\t\t// return\n\t\t// this.getHibernateTemplate().findByNamedQuery(\"project.findAllProjects\");\n\t}", "List<User> loadAll();", "public List<GrauParentesco> getListTodos();", "@GetMapping(\"/getall\")\n public List<Task> getAll() {\n return taskService.allTasks();\n\n }", "public List<Empleado> getAll();", "private LiveData<List<AlarmEntity>> getAllAlarmItems(){\n // content of the database table\n return mDb.alarmDao().getAll();\n }", "@Override\n\t@Transactional\n\tpublic List<DetalleCarrito> readAll() throws Exception {\n\t\treturn detalleCarritoRepository.findAll();\n\t}", "List<T> getAll() throws PersistException;", "@Override\n\tpublic void getAll() {\n\t\tArrayList<Post> list = new ArrayList<Post>();\n\t\tlist = dao.selectAll();\n\t\t\n\t\tfor (Post p : list) {\n\t\t\tSystem.out.println(p.getPostId() + \".\" + p.getPostName() + \" 작성자:\" + p.getMemberId());\n\t\t}\n\t}", "@Override\r\n\tpublic List<Task> findAll() {\n\t\treturn taskRepository.findAll();\r\n\t}", "public Collection<T> getAll() throws DaoException;", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Empresa> listarTodos() {\n\t\tList<Empresa> lista = new ArrayList<Empresa>();\n\t\t\n\t\ttry {\n\t\t\tlista = empresaDAO.listarTodosDesc();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn lista;\n\t}", "@Query(\"SELECT * FROM \" + TABLE)\n LiveData<List<Task>> getAll();", "@Override\n\tpublic List<T> getAll() {\n\t\treturn getDao().findAll();\n\t}", "private void populateList() {\n new AsyncTask<Void, Void, Boolean>() {\n @Override\n protected Boolean doInBackground(Void... params) {\n List<Item> list = TodoApplication.getDbHelper().getAllItems();\n if(list == null) {\n Log.d(TAG, \"doInBackground: no items in the database.\");\n return false;\n } else {\n itemsList = list;\n adapter.setUpdatedList(itemsList);\n }\n // Successfully loaded the list.\n return true;\n }\n\n @Override\n protected void onPostExecute(Boolean isSuccess) {\n super.onPostExecute(isSuccess);\n if(isCancelled()) {\n return;\n }\n if(isSuccess) {\n if(adapter != null) {\n adapter.notifyDataSetChanged();\n }\n if(itemsList == null || itemsList.size() == 0) {\n setEmptyScreen();\n } else {\n emptyText.setVisibility(View.GONE);\n todoRecyclerView.setVisibility(View.VISIBLE);\n }\n } else {\n setEmptyScreen();\n }\n }\n }.execute();\n }", "public ArrayList<Libro> recuperaTodos();", "public Tipo[] findAll() throws TipoDaoException;", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<Items> getAllItems() throws ToDoListDAOException{\r\n\t\t\r\n\t\tSession session = factory.openSession();\r\n\t\t\r\n\t\tList<Items> allDoList = new ArrayList<Items>();\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tsession.beginTransaction();\r\n\t\t\tallDoList = session.createQuery(\"from Items\").list();\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t}\r\n\t\tcatch (HibernateException e)\r\n\t\t{\r\n\t\t\tsession.getTransaction().rollback();\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tif(session != null) \r\n\t\t\t{ \r\n\t\t\t\tsession.close(); \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn allDoList;\r\n\t}", "@Override\n\tpublic List<Materia> recuperarTodo() throws DataAccessException {\n\t\treturn null;\n\t}", "@GetMapping(\"\")\n public String index(Model model) {\n Slice<Todo> todosDone;\n Slice<Todo> todosTodo;\n todosDone = todoRepository.findAllByStatus(true,null);\n todosTodo = todoRepository.findAllByStatus(false,null);\n model.addAttribute(\"todosDone\",todosDone);\n model.addAttribute(\"todosTodo\",todosTodo);\n\n\n return \"todo/index\";\n }", "public List<Usuario> listarUsuario() {\n \n List<Usuario> lista = usuarioDAO.findAll();\n return lista;\n \n \n\n }", "@SuppressWarnings({ \"unchecked\", \"static-access\" })\n\t@Override\n\t/**\n\t * Leo todos los empleados.\n\t */\n\tpublic List<Employees> readAll() {\n\t\tList<Employees> ls = null;\n\n\t\tls = ((SQLQuery) sm.obtenerSesionNueva().createQuery(\n\t\t\t\tInstruccionesSQL.CONSULTAR_TODOS)).addEntity(Employees.class)\n\t\t\t\t.list();// no creo que funcione, revisar\n\n\t\treturn ls;\n\t}", "List<Persona> obtenerTodasLasPersona();", "List<T> findAll() ;", "public static List<Task> findAll() {\n\t\treturn getPersistence().findAll();\n\t}", "public Todo findByPrimaryKey(long todoId) throws NoSuchTodoException;", "public List<Aluno> buscarTodos() {\n\t\treturn null;\n\t}", "public java.util.List<Todo> findAll(int start, int end);", "List<ItemPedido> findAll();", "public void loadQuestions() \n {\n try{\n ArrayList<QuestionPojo> questionList=QuestionDao.getQuestionByExamId(editExam.getExamId());\n for(QuestionPojo obj:questionList)\n {\n qstore.addQuestion(obj);\n }\n }\n catch(SQLException ex)\n {\n JOptionPane.showMessageDialog(null, \"Error while connecting to DB!\",\"Exception!\",JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n\n }\n }", "WsTodo[] getTodosByTodoList(String listId);", "@GetMapping (\"/servicos\")\n\t\tpublic List<ServicoModel> pegarTodos() {\t\t\n\t\t\treturn repository.findAll();\n\t\t}", "@Test\n void getAllSuccess() {\n List<Event> events = genericDao.getAll();\n assertEquals(5, events.size());\n }", "public Faq[] findAll() throws FaqDaoException;", "private void loadTasks() {\n try {\n List<Task> tasks = Reader.readTasks(new File(TASKS_FILE));\n for (Task t1 : tasks) {\n todoList.addTask(t1);\n }\n } catch (IOException e) {\n System.err.println(\"No file exists\");\n }\n }", "@Override\r\n\tpublic List<Trainee> getAll() {\n\t\treturn dao.getAll();\r\n\t}", "@Test\n\t \t\n\t public void listAll() {\n\t \n\t List<Persona> list = personaDao.listPersons();\n\t \n\t Assert.assertNotNull(\"Error listado\", list);\n\n\t }", "private void cargarDeDB() {\n Query query = session.createQuery(\"SELECT p FROM Paquete p WHERE p.reparto is NULL\");\n data = FXCollections.observableArrayList();\n\n List<Paquete> paquetes = query.list();\n for (Paquete paquete : paquetes) {\n data.add(paquete);\n }\n\n cargarTablaConPaquetes();\n }", "List<Task> getAllTasks();", "@Test\n void getAllNotesSuccess() {\n List<Note> notes = noteDao.getAll();\n assertEquals(2, notes.size());\n }", "@Transactional(readOnly = true)\n Collection<DataRistorante> getAll();", "private void getDataFromSQLite() {\n // AsyncTask is used that SQLite operation not blocks the UI Thread.\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... params) {\n listUsers.clear();\n listUsers.addAll(databaseHelper.getAllUser());\n\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n super.onPostExecute(aVoid);\n usersRecyclerAdapter.notifyDataSetChanged();\n }\n }.execute();\n }", "public abstract List<Usuario> seleccionarTodos();", "@GetMapping\n\tpublic String getTodoList(Model model) {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"Empezar curso de JavaScript\");\n\t\tlist.add(\"Realizar curso de creacion de SPA, AJAX, JSON, RESTAPI\");\n\t\tlist.add(\"Hacer ejercicio tres veces a la semana\");\n\t\t\n\t\tmodel.addAttribute(\"todolist\", list);\n\t\treturn \"todolist\";\n\t}", "private List<TaskObject> getAllTasks(){\n RealmQuery<TaskObject> query = realm.where(TaskObject.class);\n RealmResults<TaskObject> result = query.findAll();\n result.sort(\"completed\", RealmResults.SORT_ORDER_DESCENDING);\n\n tasks = new ArrayList<TaskObject>();\n\n for(TaskObject task : result)\n tasks.add(task);\n\n return tasks;\n }", "void db_all(Context context);", "public LiveData<List<FoodEntity>> getAllFoods() {\n return mDb.foodDAO().getAll();\n }", "public List<TodoItem> findByTodoListId(Long todoListId);", "public void loadTodoItems() throws IOException {\n //todoItems zmenime na observableArraylist, aby sme mohli pouzit metodu setItems() v Controlleri\n todoItems = FXCollections.observableArrayList();\n //vytvorime cestu k nasmu suboru\n Path path = Paths.get(filename);\n //vytvorime bufferedReader na citanie suboru\n BufferedReader br = Files.newBufferedReader(path);\n\n String input;\n\n //pokial subor obsahuje riadky na citanie, vytvorime pole, do ktoreho ulozime rozsekany citany riadok, nastavime datum\n //vytvorime novy item pomocou dát z citaneho suboru a tento item ulozime do nasho listu.\n try {\n while ((input = br.readLine()) != null) {\n String[] itemPieces = input.split(\"\\t\");\n String shortDescription = itemPieces[0];\n String details = itemPieces[1];\n String dateString = itemPieces[2];\n\n LocalDate date = LocalDate.parse(dateString, formatter);\n\n TodoItem todoItem = new TodoItem(shortDescription, details, date);\n todoItems.add(todoItem);\n }\n } finally {\n if (br != null) {\n br.close();\n }\n }\n }", "public List<Tipousr> findAllTipos(){\n\t\t List<Tipousr> listado;\n\t\t Query q;\n\t\t em.getTransaction().begin();\n\t\t q=em.createQuery(\"SELECT u FROM Tipousr u ORDER BY u.idTipousr\");\n\t\t listado= q.getResultList();\n\t\t em.getTransaction().commit();\n\t\t return listado;\n\t\t \n\t\t}", "public java.util.List<Todo> findByTodoInteger(int todoInteger);", "@Override\n\tpublic ArrayList<DetailedTask> selectAllTasks() throws SQLException, ClassNotFoundException\n\t{\n\t\tArrayList<DetailedTask> returnValue = new ArrayList<DetailedTask>();\n\t\t \n\t\t Gson gson = new Gson();\n\t\t Connection c = null;\n\t Statement stmt = null;\n\t \n\t \n\t Class.forName(\"org.postgresql.Driver\");\n\t c = DriverManager.getConnection(dataBaseLocation, dataBaseUser, dataBasePassword);\n\t c.setAutoCommit(false);\n\t \n\t logger.info(\"Opened database successfully (selectAllTasks)\");\n\n\t stmt = c.createStatement();\n\t ResultSet rs = stmt.executeQuery( \"SELECT * FROM task;\" );\n\n\t while(rs.next())\n\t {\n\t \t Type collectionType = new TypeToken<List<Item>>() {}.getType();\n\t \t List<Item> items = gson.fromJson(rs.getString(\"items\"), collectionType);\n\t \n\t \t returnValue.add(new DetailedTask(rs.getInt(\"id\"), rs.getString(\"description\"), \n\t \t\t rs.getDouble(\"latitude\"), rs.getDouble(\"longitude\"), rs.getString(\"status\"), \n\t \t\t items, rs.getInt(\"plz\"), rs.getString(\"ort\"), rs.getString(\"strasse\"), rs.getString(\"typ\"), \n\t \t\t rs.getString(\"information\"), gson.fromJson(rs.getString(\"hilfsmittel\"), String[].class), rs.getString(\"auftragsfrist\"), \n\t \t\t rs.getString(\"eingangsdatum\")));\n\t }\n\n\t rs.close();\n\t stmt.close();\n\t c.close();\n\t \n\t \n\t return returnValue;\n\t}", "@Override\r\n public List<Assunto> buscarTodas() {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"FROM Assunto As a\");\r\n return query.getResultList();\r\n }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ItemMedicamentoEntity> listaTodos(){\r\n\r\n\t\treturn this.entityManager.createQuery(\"SELECT * FROM ItemMedicamentoEntity ORDER BY codigo\").getResultList();\r\n\t}", "void setTodos(ArrayList<Task> tasks);", "public List<Post> retriveAllPosts()\n\t {\n\t\t List<Post> Posts =(List<Post>) Postrepository.findAll();\n\t\t \n\t\t for(Post Post :Posts)\n\t\t {\n\t\t\t //l.info(\"Post +++ :\" +Post);\n\t\t }\n\t\t return Posts;\n\t\t\t \n\t }", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<ProdutoPedido> buscarTodos() {\n\t\treturn dao.findAll();\n\t}" ]
[ "0.7271823", "0.7138131", "0.6936512", "0.68532693", "0.6774433", "0.6724384", "0.6668676", "0.66317046", "0.6623554", "0.64844155", "0.64160156", "0.63985395", "0.6354753", "0.62968975", "0.6260111", "0.62271565", "0.6218766", "0.62020904", "0.6171954", "0.6118925", "0.6111243", "0.61046475", "0.60918885", "0.60106707", "0.5990617", "0.598492", "0.59825224", "0.59609205", "0.5916239", "0.5907553", "0.5878698", "0.58724755", "0.5863389", "0.5857156", "0.5854833", "0.58478904", "0.58435106", "0.58337224", "0.58300817", "0.5798016", "0.5789047", "0.5771705", "0.57697093", "0.57662725", "0.576474", "0.5760397", "0.57499325", "0.57427466", "0.5739208", "0.572824", "0.57265615", "0.57247174", "0.5722738", "0.5722646", "0.57226115", "0.572104", "0.5719942", "0.5702409", "0.56979847", "0.5696596", "0.5693174", "0.5688056", "0.5687811", "0.56656766", "0.5662214", "0.56318", "0.5631791", "0.5622281", "0.5619599", "0.56089777", "0.55976325", "0.5595833", "0.5594566", "0.55875564", "0.55748", "0.55725074", "0.5550616", "0.55484277", "0.5545812", "0.5543496", "0.5542311", "0.55384696", "0.5529257", "0.55277586", "0.5527371", "0.5526009", "0.55169827", "0.5509197", "0.5500776", "0.549607", "0.5492323", "0.5489797", "0.5485141", "0.5482822", "0.54762524", "0.547451", "0.5472799", "0.54718477", "0.5471272", "0.54652023" ]
0.64939934
9
TODO Autogenerated method stub
@Override public void collide(Entity e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void move(Direction d) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "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
// Allow super to paint super.paintComponent(g); // Apply our own painting effect Graphics2D g2d = (Graphics2D) g.create(); // 0% transparent Alpha g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opa)); g2d.setColor(getBackground()); // g2d.fill(getBounds()); g2d.fillRect(0, 0, getWidth(), getHeight()); g2d.dispose();
@Override protected void paintComponent(Graphics g) { Graphics2D g2d = (Graphics2D) g.create(); g2d.setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setComposite(AlphaComposite.getInstance( AlphaComposite.SRC_OVER, opa)); g2d.setColor(color); if (!round) { g2d.fillRect(0, 0, getWidth(), getHeight()); } else { g2d.fillRoundRect(0, 0, getWidth(), getHeight(), corner, corner); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void paint(Graphics g) {\n AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER,\n .8f);\n Color old = g.getColor();\n Graphics2D g2d = (Graphics2D) g;\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n RenderingHints.VALUE_ANTIALIAS_ON);\n Composite composite = g2d.getComposite();\n g2d.setColor(new Color(0, 0, 0, 0));\n g2d.fillRect(0, 0, getWidth(), getHeight());\n g2d.setColor(Color.blue);\n g2d.setComposite(ac);\n g2d.fillPolygon(new int[]{3, 3, 7, 7}, new int[]{0, 8, 8, 0}, 4);\n g2d.fillPolygon(new int[]{0, 10, 5}, new int[]{8, 8, 12}, 3);\n g2d.setComposite(composite);\n g2d.setColor(old);\n\n }", "@Override\n public void paintComponent (Graphics g)\n {\n ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g.setColor(BACKGROUND_COLOR);\n g.fillRect(0, 0, getHeight(), getHeight());\n g.setColor(color);\n g.fillOval(0, 0, 30, 30);\n }", "@Override\r\n public void paintComponent(Graphics g) {\r\n\r\n //Paint background\r\n g.drawImage (background, 0, 0, null);\r\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n paintBackground(g);\n }", "@Override\r\n\tpublic void paintComponent(Graphics g)\r\n {\r\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(getForeground());\r\n\t\tg.fillOval(0,0, this.getWidth(),this.getHeight());\r\n }", "@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\n\t\t RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t \n\t\t GradientPaint gp = new GradientPaint(0, 0,\n\t\t Const.BACKGROUND_COLOR.brighter(), 0, getHeight(),\n\t\t Color.BLUE);\n\t\t \n\t\t g2d.setPaint(gp);\n\t\t g2d.fillRect(0, 0, getWidth(), getHeight());\n\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t}", "@Override\r\n\tpublic void paintComponent (Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawImage(background, 0, 0, 800, 660, null);\r\n\t}", "public static void paint(Graphics2D g) {\n Shape shape = null;\n Paint paint = null;\n Stroke stroke = null;\n Area clip = null;\n \n float origAlpha = 1.0f;\n Composite origComposite = g.getComposite();\n if (origComposite instanceof AlphaComposite) {\n AlphaComposite origAlphaComposite = \n (AlphaComposite)origComposite;\n if (origAlphaComposite.getRule() == AlphaComposite.SRC_OVER) {\n origAlpha = origAlphaComposite.getAlpha();\n }\n }\n \n\t Shape clip_ = g.getClip();\nAffineTransform defaultTransform_ = g.getTransform();\n// is CompositeGraphicsNode\nfloat alpha__0 = origAlpha;\norigAlpha = origAlpha * 1.0f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0 = g.getClip();\nAffineTransform defaultTransform__0 = g.getTransform();\ng.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\nclip = new Area(g.getClip());\nclip.intersect(new Area(new Rectangle2D.Double(0.0,0.0,48.0,48.0)));\ng.setClip(clip);\n// _0 is CompositeGraphicsNode\nfloat alpha__0_0 = origAlpha;\norigAlpha = origAlpha * 1.0f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0 = g.getClip();\nAffineTransform defaultTransform__0_0 = g.getTransform();\ng.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\n// _0_0 is CompositeGraphicsNode\nfloat alpha__0_0_0 = origAlpha;\norigAlpha = origAlpha * 1.0f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_0 = g.getClip();\nAffineTransform defaultTransform__0_0_0 = g.getTransform();\ng.transform(new AffineTransform(0.023640267550945282f, 0.0f, 0.0f, 0.022995369508862495f, 45.02649688720703f, 39.46533203125f));\n// _0_0_0 is CompositeGraphicsNode\nfloat alpha__0_0_0_0 = origAlpha;\norigAlpha = origAlpha * 0.40206185f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_0_0 = g.getClip();\nAffineTransform defaultTransform__0_0_0_0 = g.getTransform();\ng.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\n// _0_0_0_0 is ShapeNode\npaint = new LinearGradientPaint(new Point2D.Double(302.8571472167969, 366.64788818359375), new Point2D.Double(302.8571472167969, 609.5050659179688), new float[] {0.0f,0.5f,1.0f}, new Color[] {new Color(0, 0, 0, 0),new Color(0, 0, 0, 255),new Color(0, 0, 0, 0)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(2.7743890285491943f, 0.0f, 0.0f, 1.9697060585021973f, -1892.178955078125f, -872.8853759765625f));\nshape = new Rectangle2D.Double(-1559.2523193359375, -150.6968536376953, 1339.633544921875, 478.357177734375);\ng.setPaint(paint);\ng.fill(shape);\norigAlpha = alpha__0_0_0_0;\ng.setTransform(defaultTransform__0_0_0_0);\ng.setClip(clip__0_0_0_0);\nfloat alpha__0_0_0_1 = origAlpha;\norigAlpha = origAlpha * 0.40206185f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_0_1 = g.getClip();\nAffineTransform defaultTransform__0_0_0_1 = g.getTransform();\ng.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\n// _0_0_0_1 is ShapeNode\npaint = new RadialGradientPaint(new Point2D.Double(605.7142944335938, 486.64788818359375), 117.14286f, new Point2D.Double(605.7142944335938, 486.64788818359375), new float[] {0.0f,1.0f}, new Color[] {new Color(0, 0, 0, 255),new Color(0, 0, 0, 0)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(2.7743890285491943f, 0.0f, 0.0f, 1.9697060585021973f, -1891.633056640625f, -872.8853759765625f));\nshape = new GeneralPath();\n((GeneralPath)shape).moveTo(-219.61876, -150.68037);\n((GeneralPath)shape).curveTo(-219.61876, -150.68037, -219.61876, 327.65042, -219.61876, 327.65042);\n((GeneralPath)shape).curveTo(-76.74459, 328.55087, 125.78146, 220.48074, 125.78138, 88.45424);\n((GeneralPath)shape).curveTo(125.78138, -43.572304, -33.655437, -150.68036, -219.61876, -150.68037);\n((GeneralPath)shape).closePath();\ng.setPaint(paint);\ng.fill(shape);\norigAlpha = alpha__0_0_0_1;\ng.setTransform(defaultTransform__0_0_0_1);\ng.setClip(clip__0_0_0_1);\nfloat alpha__0_0_0_2 = origAlpha;\norigAlpha = origAlpha * 0.40206185f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_0_2 = g.getClip();\nAffineTransform defaultTransform__0_0_0_2 = g.getTransform();\ng.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\n// _0_0_0_2 is ShapeNode\npaint = new RadialGradientPaint(new Point2D.Double(605.7142944335938, 486.64788818359375), 117.14286f, new Point2D.Double(605.7142944335938, 486.64788818359375), new float[] {0.0f,1.0f}, new Color[] {new Color(0, 0, 0, 255),new Color(0, 0, 0, 0)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(-2.7743890285491943f, 0.0f, 0.0f, 1.9697060585021973f, 112.76229858398438f, -872.8853759765625f));\nshape = new GeneralPath();\n((GeneralPath)shape).moveTo(-1559.2523, -150.68037);\n((GeneralPath)shape).curveTo(-1559.2523, -150.68037, -1559.2523, 327.65042, -1559.2523, 327.65042);\n((GeneralPath)shape).curveTo(-1702.1265, 328.55087, -1904.6525, 220.48074, -1904.6525, 88.45424);\n((GeneralPath)shape).curveTo(-1904.6525, -43.572304, -1745.2157, -150.68036, -1559.2523, -150.68037);\n((GeneralPath)shape).closePath();\ng.setPaint(paint);\ng.fill(shape);\norigAlpha = alpha__0_0_0_2;\ng.setTransform(defaultTransform__0_0_0_2);\ng.setClip(clip__0_0_0_2);\norigAlpha = alpha__0_0_0;\ng.setTransform(defaultTransform__0_0_0);\ng.setClip(clip__0_0_0);\nfloat alpha__0_0_1 = origAlpha;\norigAlpha = origAlpha * 1.0f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_1 = g.getClip();\nAffineTransform defaultTransform__0_0_1 = g.getTransform();\ng.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\n// _0_0_1 is ShapeNode\npaint = new RadialGradientPaint(new Point2D.Double(25.0, 4.311681747436523), 19.996933f, new Point2D.Double(25.0, 4.311681747436523), new float[] {0.0f,0.25f,0.68f,1.0f}, new Color[] {new Color(143, 179, 217, 255),new Color(114, 159, 207, 255),new Color(52, 101, 164, 255),new Color(32, 74, 135, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(0.01216483861207962f, 2.585073947906494f, -3.2504982948303223f, 0.015296213328838348f, 38.710994720458984f, -60.38692092895508f));\nshape = new RoundRectangle2D.Double(4.499479293823242, 4.50103759765625, 38.993865966796875, 39.00564193725586, 4.95554780960083, 4.980924129486084);\ng.setPaint(paint);\ng.fill(shape);\npaint = new LinearGradientPaint(new Point2D.Double(20.0, 4.0), new Point2D.Double(20.0, 44.0), new float[] {0.0f,1.0f}, new Color[] {new Color(52, 101, 164, 255),new Color(32, 74, 135, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\nstroke = new BasicStroke(1.0f,0,1,4.0f,null,0.0f);\nshape = new RoundRectangle2D.Double(4.499479293823242, 4.50103759765625, 38.993865966796875, 39.00564193725586, 4.95554780960083, 4.980924129486084);\ng.setPaint(paint);\ng.setStroke(stroke);\ng.draw(shape);\norigAlpha = alpha__0_0_1;\ng.setTransform(defaultTransform__0_0_1);\ng.setClip(clip__0_0_1);\nfloat alpha__0_0_2 = origAlpha;\norigAlpha = origAlpha * 0.5f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_2 = g.getClip();\nAffineTransform defaultTransform__0_0_2 = g.getTransform();\ng.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\n// _0_0_2 is ShapeNode\npaint = new LinearGradientPaint(new Point2D.Double(25.0, -0.05076269432902336), new Point2D.Double(25.285715103149414, 57.71428680419922), new float[] {0.0f,1.0f}, new Color[] {new Color(255, 255, 255, 255),new Color(255, 255, 255, 0)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\nstroke = new BasicStroke(1.0f,0,1,4.0f,null,0.0f);\nshape = new RoundRectangle2D.Double(5.5017547607421875, 5.489577293395996, 36.996883392333984, 37.007320404052734, 3.013584613800049, 2.9943172931671143);\ng.setPaint(paint);\ng.setStroke(stroke);\ng.draw(shape);\norigAlpha = alpha__0_0_2;\ng.setTransform(defaultTransform__0_0_2);\ng.setClip(clip__0_0_2);\nfloat alpha__0_0_3 = origAlpha;\norigAlpha = origAlpha * 0.5f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_3 = g.getClip();\nAffineTransform defaultTransform__0_0_3 = g.getTransform();\ng.transform(new AffineTransform(0.19086800515651703f, 0.1612599939107895f, 0.1612599939107895f, -0.19086800515651703f, 7.2809157371521f, 24.306129455566406f));\n// _0_0_3 is CompositeGraphicsNode\norigAlpha = alpha__0_0_3;\ng.setTransform(defaultTransform__0_0_3);\ng.setClip(clip__0_0_3);\nfloat alpha__0_0_4 = origAlpha;\norigAlpha = origAlpha * 1.0f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_4 = g.getClip();\nAffineTransform defaultTransform__0_0_4 = g.getTransform();\ng.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\n// _0_0_4 is ShapeNode\norigAlpha = alpha__0_0_4;\ng.setTransform(defaultTransform__0_0_4);\ng.setClip(clip__0_0_4);\nfloat alpha__0_0_5 = origAlpha;\norigAlpha = origAlpha * 0.44444442f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_5 = g.getClip();\nAffineTransform defaultTransform__0_0_5 = g.getTransform();\ng.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\n// _0_0_5 is ShapeNode\npaint = new LinearGradientPaint(new Point2D.Double(31.0, 12.875), new Point2D.Double(3.2591991424560547, 24.893844604492188), new float[] {0.0f,1.0f}, new Color[] {new Color(255, 255, 255, 255),new Color(255, 255, 255, 0)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.535999596118927f, 5.498996734619141f));\nshape = new GeneralPath();\n((GeneralPath)shape).moveTo(0.91099966, 27.748999);\n((GeneralPath)shape).curveTo(28.15259, 29.47655, 10.984791, 13.750064, 32.036, 13.248998);\n((GeneralPath)shape).lineTo(37.325214, 24.364037);\n((GeneralPath)shape).curveTo(27.718748, 19.884726, 21.14768, 42.897034, 0.78599966, 29.373999);\n((GeneralPath)shape).lineTo(0.91099966, 27.748999);\n((GeneralPath)shape).closePath();\ng.setPaint(paint);\ng.fill(shape);\norigAlpha = alpha__0_0_5;\ng.setTransform(defaultTransform__0_0_5);\ng.setClip(clip__0_0_5);\nfloat alpha__0_0_6 = origAlpha;\norigAlpha = origAlpha * 1.0f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_6 = g.getClip();\nAffineTransform defaultTransform__0_0_6 = g.getTransform();\ng.transform(new AffineTransform(0.665929913520813f, 0.0f, 0.0f, 0.665929913520813f, 11.393279075622559f, 4.907034873962402f));\n// _0_0_6 is ShapeNode\npaint = new RadialGradientPaint(new Point2D.Double(32.5, 16.5625), 14.4375f, new Point2D.Double(32.5, 16.5625), new float[] {0.0f,1.0f}, new Color[] {new Color(255, 255, 255, 255),new Color(255, 255, 255, 0)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\nshape = new GeneralPath();\n((GeneralPath)shape).moveTo(46.9375, 16.5625);\n((GeneralPath)shape).curveTo(46.9375, 24.536112, 40.47361, 31.0, 32.5, 31.0);\n((GeneralPath)shape).curveTo(24.526388, 31.0, 18.0625, 24.536112, 18.0625, 16.5625);\n((GeneralPath)shape).curveTo(18.0625, 8.588889, 24.526388, 2.125, 32.5, 2.125);\n((GeneralPath)shape).curveTo(40.47361, 2.125, 46.9375, 8.588889, 46.9375, 16.5625);\n((GeneralPath)shape).closePath();\ng.setPaint(paint);\ng.fill(shape);\norigAlpha = alpha__0_0_6;\ng.setTransform(defaultTransform__0_0_6);\ng.setClip(clip__0_0_6);\nfloat alpha__0_0_7 = origAlpha;\norigAlpha = origAlpha * 1.0f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_7 = g.getClip();\nAffineTransform defaultTransform__0_0_7 = g.getTransform();\ng.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\n// _0_0_7 is ShapeNode\npaint = new LinearGradientPaint(new Point2D.Double(39.0, 26.125), new Point2D.Double(36.375, 20.4375), new float[] {0.0f,1.0f}, new Color[] {new Color(27, 31, 32, 255),new Color(186, 189, 182, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.535999596118927f, -1.5010031461715698f));\nstroke = new BasicStroke(4.0f,1,0,4.0f,null,0.0f);\nshape = new GeneralPath();\n((GeneralPath)shape).moveTo(33.036, 14.998998);\n((GeneralPath)shape).lineTo(46.036, 43.999);\ng.setPaint(paint);\ng.setStroke(stroke);\ng.draw(shape);\norigAlpha = alpha__0_0_7;\ng.setTransform(defaultTransform__0_0_7);\ng.setClip(clip__0_0_7);\nfloat alpha__0_0_8 = origAlpha;\norigAlpha = origAlpha * 1.0f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_8 = g.getClip();\nAffineTransform defaultTransform__0_0_8 = g.getTransform();\ng.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\n// _0_0_8 is ShapeNode\npaint = new Color(255, 255, 255, 255);\nshape = new GeneralPath();\n((GeneralPath)shape).moveTo(33.036, 14.998998);\n((GeneralPath)shape).lineTo(46.036, 43.999);\ng.setPaint(paint);\ng.fill(shape);\npaint = new LinearGradientPaint(new Point2D.Double(42.90625, 42.21875), new Point2D.Double(44.8125, 41.40625), new float[] {0.0f,0.64444447f,1.0f}, new Color[] {new Color(46, 52, 54, 255),new Color(136, 138, 133, 255),new Color(85, 87, 83, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.535999596118927f, -1.5010031461715698f));\nstroke = new BasicStroke(2.0f,1,0,4.0f,null,0.0f);\nshape = new GeneralPath();\n((GeneralPath)shape).moveTo(33.036, 14.998998);\n((GeneralPath)shape).lineTo(46.036, 43.999);\ng.setPaint(paint);\ng.setStroke(stroke);\ng.draw(shape);\norigAlpha = alpha__0_0_8;\ng.setTransform(defaultTransform__0_0_8);\ng.setClip(clip__0_0_8);\nfloat alpha__0_0_9 = origAlpha;\norigAlpha = origAlpha * 1.0f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_9 = g.getClip();\nAffineTransform defaultTransform__0_0_9 = g.getTransform();\ng.transform(new AffineTransform(1.272613286972046f, 0.0f, 0.0f, 1.272613286972046f, 12.072080612182617f, -6.673644065856934f));\n// _0_0_9 is ShapeNode\npaint = new Color(255, 255, 255, 255);\nshape = new GeneralPath();\n((GeneralPath)shape).moveTo(15.5, 24.75);\n((GeneralPath)shape).lineTo(11.728554, 24.19539);\n((GeneralPath)shape).lineTo(9.451035, 27.075687);\n((GeneralPath)shape).lineTo(8.813057, 23.317446);\n((GeneralPath)shape).lineTo(5.3699408, 22.041456);\n((GeneralPath)shape).lineTo(8.747095, 20.273342);\n((GeneralPath)shape).lineTo(8.896652, 16.604443);\n((GeneralPath)shape).lineTo(11.621825, 19.26993);\n((GeneralPath)shape).lineTo(15.157373, 18.278416);\n((GeneralPath)shape).lineTo(13.464468, 21.69389);\n((GeneralPath)shape).lineTo(15.5, 24.75);\n((GeneralPath)shape).closePath();\ng.setPaint(paint);\ng.fill(shape);\norigAlpha = alpha__0_0_9;\ng.setTransform(defaultTransform__0_0_9);\ng.setClip(clip__0_0_9);\nfloat alpha__0_0_10 = origAlpha;\norigAlpha = origAlpha * 1.0f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_10 = g.getClip();\nAffineTransform defaultTransform__0_0_10 = g.getTransform();\ng.transform(new AffineTransform(0.5838837027549744f, 0.5838837027549744f, -0.5838837027549744f, 0.5838837027549744f, 24.48128318786621f, 9.477374076843262f));\n// _0_0_10 is ShapeNode\npaint = new Color(255, 255, 255, 255);\nshape = new GeneralPath();\n((GeneralPath)shape).moveTo(15.5, 24.75);\n((GeneralPath)shape).lineTo(11.728554, 24.19539);\n((GeneralPath)shape).lineTo(9.451035, 27.075687);\n((GeneralPath)shape).lineTo(8.813057, 23.317446);\n((GeneralPath)shape).lineTo(5.3699408, 22.041456);\n((GeneralPath)shape).lineTo(8.747095, 20.273342);\n((GeneralPath)shape).lineTo(8.896652, 16.604443);\n((GeneralPath)shape).lineTo(11.621825, 19.26993);\n((GeneralPath)shape).lineTo(15.157373, 18.278416);\n((GeneralPath)shape).lineTo(13.464468, 21.69389);\n((GeneralPath)shape).lineTo(15.5, 24.75);\n((GeneralPath)shape).closePath();\ng.setPaint(paint);\ng.fill(shape);\norigAlpha = alpha__0_0_10;\ng.setTransform(defaultTransform__0_0_10);\ng.setClip(clip__0_0_10);\nfloat alpha__0_0_11 = origAlpha;\norigAlpha = origAlpha * 1.0f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_11 = g.getClip();\nAffineTransform defaultTransform__0_0_11 = g.getTransform();\ng.transform(new AffineTransform(0.5791025757789612f, 0.12860369682312012f, -0.12860369682312012f, 0.5791025757789612f, 5.244583606719971f, 16.59849739074707f));\n// _0_0_11 is ShapeNode\npaint = new Color(255, 255, 255, 255);\nshape = new GeneralPath();\n((GeneralPath)shape).moveTo(15.5, 24.75);\n((GeneralPath)shape).lineTo(11.728554, 24.19539);\n((GeneralPath)shape).lineTo(9.451035, 27.075687);\n((GeneralPath)shape).lineTo(8.813057, 23.317446);\n((GeneralPath)shape).lineTo(5.3699408, 22.041456);\n((GeneralPath)shape).lineTo(8.747095, 20.273342);\n((GeneralPath)shape).lineTo(8.896652, 16.604443);\n((GeneralPath)shape).lineTo(11.621825, 19.26993);\n((GeneralPath)shape).lineTo(15.157373, 18.278416);\n((GeneralPath)shape).lineTo(13.464468, 21.69389);\n((GeneralPath)shape).lineTo(15.5, 24.75);\n((GeneralPath)shape).closePath();\ng.setPaint(paint);\ng.fill(shape);\norigAlpha = alpha__0_0_11;\ng.setTransform(defaultTransform__0_0_11);\ng.setClip(clip__0_0_11);\nfloat alpha__0_0_12 = origAlpha;\norigAlpha = origAlpha * 1.0f;\ng.setComposite(AlphaComposite.getInstance(3, origAlpha));\nShape clip__0_0_12 = g.getClip();\nAffineTransform defaultTransform__0_0_12 = g.getTransform();\ng.transform(new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.005668648984283209f, 1.9989968538284302f));\n// _0_0_12 is ShapeNode\npaint = new LinearGradientPaint(new Point2D.Double(31.994285583496094, 16.859249114990234), new Point2D.Double(37.7237434387207, 16.859249114990234), new float[] {0.0f,0.7888889f,1.0f}, new Color[] {new Color(238, 238, 236, 255),new Color(255, 255, 255, 255),new Color(238, 238, 236, 255)}, MultipleGradientPaint.CycleMethod.NO_CYCLE, MultipleGradientPaint.ColorSpaceType.SRGB, new AffineTransform(1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f));\nshape = new GeneralPath();\n((GeneralPath)shape).moveTo(32.9375, 11.9375);\n((GeneralPath)shape).curveTo(32.87939, 11.943775, 32.84168, 11.954412, 32.78125, 11.96875);\n((GeneralPath)shape).curveTo(32.480507, 12.044301, 32.22415, 12.283065, 32.09375, 12.5625);\n((GeneralPath)shape).curveTo(31.963346, 12.841935, 31.958935, 13.12817, 32.09375, 13.40625);\n((GeneralPath)shape).lineTo(35.84375, 21.75);\n((GeneralPath)shape).curveTo(35.837093, 21.759354, 35.837093, 21.771896, 35.84375, 21.78125);\n((GeneralPath)shape).curveTo(35.853104, 21.787907, 35.865646, 21.787907, 35.875, 21.78125);\n((GeneralPath)shape).curveTo(35.884354, 21.787907, 35.896896, 21.787907, 35.90625, 21.78125);\n((GeneralPath)shape).curveTo(35.912907, 21.771896, 35.912907, 21.759354, 35.90625, 21.75);\n((GeneralPath)shape).curveTo(36.14071, 21.344227, 36.483208, 21.082874, 36.9375, 20.96875);\n((GeneralPath)shape).curveTo(37.18631, 20.909716, 37.44822, 20.917711, 37.6875, 20.96875);\n((GeneralPath)shape).curveTo(37.696854, 20.975407, 37.709396, 20.975407, 37.71875, 20.96875);\n((GeneralPath)shape).curveTo(37.725407, 20.959396, 37.725407, 20.946854, 37.71875, 20.9375);\n((GeneralPath)shape).lineTo(33.96875, 12.59375);\n((GeneralPath)shape).curveTo(33.824844, 12.242701, 33.48375, 11.983006, 33.125, 11.9375);\n((GeneralPath)shape).curveTo(33.06451, 11.929827, 32.99561, 11.931225, 32.9375, 11.9375);\n((GeneralPath)shape).closePath();\ng.setPaint(paint);\ng.fill(shape);\norigAlpha = alpha__0_0_12;\ng.setTransform(defaultTransform__0_0_12);\ng.setClip(clip__0_0_12);\norigAlpha = alpha__0_0;\ng.setTransform(defaultTransform__0_0);\ng.setClip(clip__0_0);\norigAlpha = alpha__0;\ng.setTransform(defaultTransform__0);\ng.setClip(clip__0);\ng.setTransform(defaultTransform_);\ng.setClip(clip_);\n\n\t}", "@Override\r\n protected void paintComponent(Graphics g) {\r\n\r\n Graphics2D g2d = (Graphics2D) g;\r\n\r\n g2d.setColor(new Color(52, 73, 94));\r\n g2d.fillRect(0, 0, getWidth(), getHeight());\r\n }", "public void paintComponent(Graphics g) {\n\n Graphics2D g2 = (Graphics2D) g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\n Color bg = new Color(237,237,237,0);//getBackground();\n g2.setColor(new Color(bg.getRed(),bg.getGreen(),bg.getBlue()));\n g2.fillRoundRect(0,0, getWidth()-1, getHeight()-1, radius, radius);\n g2.setColor(new Color(164,164,164));\n g2.drawRoundRect(0,0, getWidth()-1, getHeight()-1, radius, radius);\n }", "protected void paintComponentWithPainter(Graphics2D g)\n/* */ {\n/* 200 */ if (this.ui != null)\n/* */ {\n/* */ \n/* */ \n/* 204 */ Graphics2D scratchGraphics = (Graphics2D)g.create();\n/* */ try {\n/* 206 */ scratchGraphics.setColor(getBackground());\n/* 207 */ scratchGraphics.fillRect(0, 0, getWidth(), getHeight());\n/* 208 */ paintPainter(g);\n/* 209 */ this.ui.paint(scratchGraphics, this);\n/* */ }\n/* */ finally {\n/* 212 */ scratchGraphics.dispose();\n/* */ }\n/* */ }\n/* */ }", "@Override\n public void paint (Graphics graphics) \n {\n if (image_ == null) return;\n //graphics.drawImage (image_, 0, 0, width_, height_, this);\n Graphics2D g2d=(Graphics2D)graphics;\n g2d.drawImage(image_,null,0,0);\n g2d.setComposite(AlphaComposite.Src);\n g2d.dispose();\n }", "protected void paintComponent(Graphics g) {\n if (getModel().isArmed()) {\n g.setColor(Color.lightGray);\n } else {\n g.setColor(getBackground());\n }\n g.fillOval(0, 0, getSize().width-1, getSize().height-1);\n super.paintComponent(g);\n }", "protected void paintComponent(Graphics g) {\n\t\t\tif (getModel().isArmed()) {\r\n\t\t\t\tg.setColor(Color.lightGray);\r\n\t\t\t} else {\r\n\t\t\t\tg.setColor(getBackground());\r\n\t\t\t}\r\n\r\n\t\t\tg.fillOval(0, 0, getSize().width - 1, getSize().height - 1);\r\n\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t}", "@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t\t\tg2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n\t\t\t\tint w = getWidth();\n\t\t\t\tint h = getHeight();\n//\t\t\t\tColor color1 = new Color(30, 255, 90);\n//\t\t\t\tColor color2 = new Color(45, 110, 35);\n\t\t\t\tGradientPaint gp = new GradientPaint(0, 0, color1, 0, h, color2);\n\t\t\t\tg2d.setPaint(gp);\n\t\t\t\tg2d.fillRect(0, 0, w, h);\n\t\t\t}", "@Override\n\n protected void paintComponent(Graphics g) {\n\n\t\tint width = getWidth();\n\t\tint height = getHeight();\n\t\t \n\t\tsuper.paintComponent(g);\n\t\t\n\t\t// draw the landscape in greyscale as an image\n\t\tif (land.getImage() != null){\n\t\t\tg.drawImage(land.getImage(), 0, 0, null);\n\t\t}\n\t\t//?paid overlay image graphic from water.getImage()\n\t\tflood.deriveImage();\n\t\tif(flood.getImage() != null){\n\t\t\tg.drawImage(flood.getImage(),0,0,null);\n\t\t}\n\t\t/**\n\t\tBufferedImage background = land.getImage();\n\t\tBufferedImage foreground = flood.getImage();\n\t\tBufferedImage overlayedImage = overLa\n\t\t**/\n\t}", "protected void doPaint(Graphics2D g, T component, int width, int height)\n/* */ {\n/* 353 */ for (Painter p : getPainters()) {\n/* 354 */ Graphics2D temp = (Graphics2D)g.create();\n/* */ try\n/* */ {\n/* 357 */ p.paint(temp, component, width, height);\n/* 358 */ if (isClipPreserved()) {\n/* 359 */ g.setClip(temp.getClip());\n/* */ }\n/* */ } finally {\n/* 362 */ temp.dispose();\n/* */ }\n/* */ }\n/* */ }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "@Override\n public void paint(Graphics g) {\n\tsuper.paint(g);\n\t// getContentPane().setBackground(Color.orange);\n\timg = Util.createImage(getContentPane());\n\tbackColor = new Color(img.getRGB(3, 3));\n\t// img.getGraphics().setColor(Color.blue);\n\t// img.getGraphics().fillRect(0, 0, img.getWidth(), img.getHeight());\n\tdrawEntrance(new Point(557, 70), 0, img.getGraphics());\n\tgetContentPane().getGraphics().drawImage(img, 0, 0, null);\n\tanimate(g);\n\t// img = Util.createImage(getContentPane());\n\n }", "protected void paintBackground(Graphics g){\n Dimension size = getSize();\n\n g.setColor(properties.backgroundColor);\n g.fillRect(0,0,size.width,size.height);\n\n }", "protected void paintComponent(Graphics g)\n/* */ {\n/* 126 */ if ((this.painter != null) || (isNimbus()))\n/* */ {\n/* */ \n/* */ \n/* */ \n/* 131 */ if (isOpaque())\n/* */ {\n/* 133 */ paintComponentWithPainter((Graphics2D)g);\n/* */ }\n/* */ else {\n/* 136 */ paintPainter(g);\n/* 137 */ super.paintComponent(g);\n/* */ }\n/* */ }\n/* */ else {\n/* 141 */ super.paintComponent(g);\n/* */ }\n/* */ }", "@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t\t\tg2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n\t\t\t\tint w = getWidth();\n\t\t\t\tint h = getHeight();\n//\t\t\t\tColor color1 = new Color(30, 255, 90);\n//\t\t\t\tColor color2 = new Color(45, 110, 35);\n\t\t\t\tGradientPaint gp = new GradientPaint(0, 0, shortColor1, 0, h, shortColor2);\n\t\t\t\tg2d.setPaint(gp);\n\t\t\t\tg2d.fillRect(0, 0, w, h);\n\t\t\t}", "@Override\n protected void paintBackground(Graphics2D g) {\n g.drawImage(image, 0, 0, this);\n }", "@Override\n\t\t\tpublic void paintControl(PaintEvent arg0) {\n\t\t\t\tgc.drawImage(background,0,0);\n\t\t\t}", "public void draw() {\n background(0);\n}", "@Override\n\tprotected void drawBackground(Graphics2D g2) {\n\t\tg2.setColor(BACKGROUND_FILL_COLOR);\n\t\tg2.fillRect(0, 0, this.getWidth(), this.getHeight());\n\t}", "public void paintComponent(Graphics g) {\r\n super.paintComponent(g);\r\n if (isDrawBackground()) {\r\n paintComponentBackground(g, getBackgroundInsets(), getUiPrefs().getBackgroundColor());\r\n } else if (!isBackgroundTransparent()) {\r\n paintComponentBackground(g, null, Color.WHITE);\r\n }\r\n if (isDrawBorder()) {\r\n paintComponentBorder(g);\r\n }\r\n }", "@Override\n protected void paintComponent(Graphics g) {\n RoundRectangle2D bar = new RoundRectangle2D.Float(\n innerRadius, -barWidth / 2, outerRadius, barWidth, barWidth, barWidth);\n // x, y, width, height, arc width,arc height\n\n // angle in radians\n double angle = Math.PI * 2.0 / nBars; // between bars\n\n\n Graphics2D g2d = (Graphics2D) g;\n g2d.translate(getWidth() / 2, getHeight() / 2); // center the original point\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, // rendering hints\n RenderingHints.VALUE_ANTIALIAS_ON);\n\n\n // == Added for white bg\n // gets the current clipping area\n Rectangle clip = g.getClipBounds();\n\n // sets a 65% translucent composite\n AlphaComposite alpha = AlphaComposite.SrcOver.derive(0.65f);\n Composite composite = g2d.getComposite();\n g2d.setComposite(alpha);\n\n // fills the background\n g2d.setColor(getBackground());\n g2d.fillRect(clip.x, clip.y, clip.width, clip.height);\n\n\n // for each bar\n for (int i = 0; i < nBars; i++) {\n // compute bar i's color based on the frame index\n Color barColor = new Color((int) barGray, (int) barGray, (int) barGray);\n if (frame != -1) {\n for (int t = 0; t < trailLength; t++) {\n if (i == ((frame - t + nBars) % nBars)) {\n float tlf = trailLength;\n float pct = 1.0f - ((tlf - t) / tlf);\n int gray = (int) ((barGray - (pct * barGray)) + 0.5f);\n barColor = new Color(gray, gray, gray);\n }\n }\n }\n // draw the bar\n g2d.setColor(barColor);\n g2d.fill(bar);\n g2d.rotate(angle);\n }\n\n g2d.setComposite(composite);\n }", "public void paintNonVisible(Graphics g){\n\n float MIN_OPACITY = 0.4f; // The min opacity for a visible tile\n Graphics2D g2 = (Graphics2D) g.create();\n float opacity = 1.0f - (1 - MIN_OPACITY);\n AlphaComposite acomp = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity);\n g2.setComposite(acomp);\n paintVisible(g2); //for now just paint visible\n }", "@Override\n public void paintComponent(Graphics g)\n {\n super.paintComponent(g); \n Graphics2D g2d = (Graphics2D) g; // cast g to Graphics2D\n\n // draw 2D ellipse filled with a blue-yellow gradient\n g2d.setPaint(new GradientPaint(5, 30, Color.BLUE, 35, 100, \n Color.YELLOW, true)); \n g2d.fill(new Ellipse2D.Double(5, 30, 65, 100));\n\n // draw 2D rectangle in red\n g2d.setPaint(Color.RED); \n g2d.setStroke(new BasicStroke(10.0f)); \n g2d.draw(new Rectangle2D.Double(80, 30, 65, 100));\n\n // draw 2D rounded rectangle with a buffered background\n BufferedImage buffImage = new BufferedImage(10, 10, \n BufferedImage.TYPE_INT_RGB);\n\n // obtain Graphics2D from buffImage and draw on it\n Graphics2D gg = buffImage.createGraphics(); \n gg.setColor(Color.YELLOW); \n gg.fillRect(0, 0, 10, 10); \n gg.setColor(Color.BLACK); \n gg.drawRect(1, 1, 6, 6); \n gg.setColor(Color.BLUE); \n gg.fillRect(1, 1, 3, 3); \n gg.setColor(Color.RED); \n gg.fillRect(4, 4, 3, 3); \n\n // paint buffImage onto the JFrame\n g2d.setPaint(new TexturePaint(buffImage, \n new Rectangle(10, 10)));\n g2d.fill(\n new RoundRectangle2D.Double(155, 30, 75, 100, 50, 50));\n\n // draw 2D pie-shaped arc in white\n g2d.setPaint(Color.WHITE);\n g2d.setStroke(new BasicStroke(6.0f)); \n g2d.draw(\n new Arc2D.Double(240, 30, 75, 100, 0, 270, Arc2D.PIE));\n\n // draw 2D lines in green and yellow\n g2d.setPaint(Color.GREEN);\n g2d.draw(new Line2D.Double(395, 30, 320, 150));\n\n // draw 2D line using stroke\n float[] dashes = {10}; // specify dash pattern\n g2d.setPaint(Color.YELLOW); \n g2d.setStroke(new BasicStroke(4, BasicStroke.CAP_ROUND,\n BasicStroke.JOIN_ROUND, 10, dashes, 0)); \n g2d.draw(new Line2D.Double(320, 30, 395, 150));\n }", "private void drawBackground(Graphics2D g2d, ScreenParameters screenParameters) {\n Composite defaultComposite = g2d.getComposite();\n g2d.setComposite(LOW_OPACITY);\n g2d.drawImage(background, 0, 0, screenParameters.x, screenParameters.y, null);\n g2d.setComposite(defaultComposite);\n }", "@Override\n public void paintComponent(Graphics g) \n {\n super.paintComponent(g);\n doDrawing(g);\n }", "private AlphaComposite makeTransparent(float alpha){\n return(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,alpha));\n }", "@Override\n public void paintComponent(final Graphics g) {\n if (!isOpaque()) {\n super.paintComponent(g);\n return;\n }\n \n // use value of JTextField for consistency\n g.setColor(UIManager.getColor(\"TextField.inactiveBackground\"));\n g.fillRect(3, 3, getWidth() - 6, getHeight() - 6);\n \n // do rest, changing opaque to ensure background is not overwritten\n setOpaque(false);\n super.paintComponent(g);\n setOpaque(true);\n }", "public void paint (Graphics g) {\r\n super.paint (g);\r\n\r\n Graphics2D g2d = (Graphics2D) g;\r\n\r\n g2d.setPaint (new GradientPaint (5, 30, Color.BLUE, 35, 100, \r\n Color.YELLOW, true));\r\n g2d.fill (new Ellipse2D.Double (5, 30, 65, 100));\r\n\r\n g2d.setPaint (Color.RED);\r\n g2d.setStroke (new BasicStroke (10.0f));\r\n g2d.draw (new Rectangle2D.Double (80, 30, 65, 100));\r\n\r\n BufferedImage buffImage = new BufferedImage (10, 10, \r\n BufferedImage.TYPE_INT_RGB);\r\n\r\n Graphics2D gg = buffImage.createGraphics ();\r\n\r\n gg.setColor (Color.YELLOW);\r\n gg.fillRect (0, 0, 10, 10);\r\n\r\n gg.setColor (Color.BLACK);\r\n gg.drawRect (1, 1, 6, 6);\r\n\r\n gg.setColor (Color.BLUE);\r\n gg.fillRect (1, 1, 3, 3);\r\n\r\n gg.setColor (Color.RED);\r\n gg.fillRect (4, 4, 3, 3);\r\n\r\n g2d.setPaint (new TexturePaint (buffImage, new Rectangle (10, 10)));\r\n g2d.fill (new RoundRectangle2D.Double (155, 30, 75, 100, 50, 50));\r\n\r\n g2d.setPaint (Color.WHITE);\r\n g2d.setStroke (new BasicStroke (6.0f));\r\n g2d.draw (new Arc2D.Double (240, 30, 75, 100, 0, 270, Arc2D.PIE));\r\n\r\n float dashes [] = {10};\r\n\r\n g2d.setPaint (Color.YELLOW);\r\n g2d.setStroke (new BasicStroke (4, BasicStroke.CAP_ROUND, \r\n BasicStroke.JOIN_ROUND, 10, dashes, 0));\r\n g2d.draw (new Line2D.Double (320, 30, 395, 150));\r\n }", "@Override\n public void paint(Graphics g) {\n g.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 200));\n\n g.setColor(Color.cyan);\n String GameName = \"BALLAND BAR\";\n int x_pos = 150;\n int y_pos = 300;\n int alpha = 8;\n for (int i = 0; i < GameName.length(); i++) {\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n\n g.setColor(Color.orange);\n GameName = \"GAME\";\n x_pos = 700;\n y_pos = 550;\n for (int i = 0; i < GameName.length(); i++) {\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha * 0.1f));\n g.drawString(Character.toString(GameName.charAt(i)), x_pos, y_pos);\n x_pos += 150;\n // alpha -= 1;\n }\n /*\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"G\", 650, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"A\", 800, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"M\", 950, 300);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"E\", 1150, 300);\n\n g.setColor(Color.cyan);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 4 * 0.1f));\n g.drawString(\"N\", 650, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 5 * 0.1f));\n g.drawString(\"A\", 800, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 6 * 0.1f));\n g.drawString(\"M\", 950, 500);\n\n ((Graphics2D) g).setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 7 * 0.1f));\n g.drawString(\"E\", 1150, 500);\n */\n }", "@Override\r\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t\r\n\t\r\n\t}", "@Override\n public void onPaint(Graphics2D g) {\n\n }", "@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t\t\tg2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n\t\t\t\tint w = getWidth();\n\t\t\t\tint h = getHeight();\n//\t\t\t\tColor color1 = new Color(30, 255, 90);\n//\t\t\t\tColor color2 = new Color(45, 110, 35);\n\t\t\t\tGradientPaint gp = new GradientPaint(0, 0, longColor1, 0, h, longColor2);\n\t\t\t\tg2d.setPaint(gp);\n\t\t\t\tg2d.fillRect(0, 0, w, h);\n\t\t\t}", "@Override\r\n\t\tpublic void paint(Graphics g) {\n\t\t\tsuper.paint(g);\r\n\t\t}", "private void decorate() {\n setBorderPainted(false);\n setOpaque(true);\n \n setContentAreaFilled(false);\n setMargin(new Insets(1, 1, 1, 1));\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g); // paint parent's background\n setBackground(Color.WHITE); // set background color for this JPanel\n if (img != null) {\n g.drawImage(img, 100, 100, this);\n }\n }", "@Override\n\tprotected void paintComponent(Graphics g) {\n\t\t\n\t\tGraphics2D graphics2d = (Graphics2D) g;\n\t\tgraphics2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\t\t\n\t\tgraphics2d.setColor(new Color(255, 255, 255, 230));\n\t\tgraphics2d.fillRoundRect(1, 1, getWidth() - 2, getHeight() - 2, 20, 20);\n\t\t\n\t\tgraphics2d.setColor(Color.WHITE);\n\t\tgraphics2d.setClip(0, 0, getWidth(), 30);\n\t\tgraphics2d.fillRoundRect(1, 3, getWidth() - 2, getHeight() - 1, 20, 20);\n\t\tgraphics2d.setClip(null);\n\t\t\n\t\tgraphics2d.setStroke(new BasicStroke(2));\n\t\tgraphics2d.setColor(Color.GRAY);\n\t\tgraphics2d.drawRoundRect(1, 1, getWidth() - 2, getHeight() - 2, 20, 20);\n\t\t\n\t\tgraphics2d.setFont(new Font(\"Arial\", Font.BOLD, 16));\n\t\tgraphics2d.setColor(Color.DARK_GRAY);\n\t\tgraphics2d.drawString(title, 15, 23);\n\n\t}", "@Override\n protected void paintBackground(Graphics2D g) {\n super.paintBackground(g);\n if (Game.level == 0) {\n g.drawImage(bg, 0, 0, this);\n } else if (Game.level == 1) {\n g.drawImage(bg, 0, 0, this);\n } else if (Game.level == 2) {\n g.drawImage(bg2, 0, 0, this);\n } else if (Game.level == 3) {\n g.drawImage(bg3, 0, 0, this);\n }\n\n }", "protected void paintComponent(Graphics g) {\n if (getModel().isPressed()) {\n g.setColor(pressedBackgroundColor);\n } else if (getModel().isRollover()) {\n g.setColor(hoverBackgroundColor);\n } else {\n g.setColor(getBackground());\n }\n g.fillRect(0, 0, getWidth(), getHeight());\n super.paintComponent(g);\n }", "@Override\n\tpublic void paint(Graphics2D g) {\n\t\tg.setColor(Color.WHITE);\n\t\tg.drawOval(this.x,this.y, width,height);\n\t\tg.fillOval(this.x,this.y, width,height);\n\t}", "public void paint (Graphics g) {\n super.paint(g);\n // g.setColor(Color.BLUE);\n // g.drawRect(0, 0, 100, 100);\n }", "public void paint(Graphics g)\n/* */ {\n/* 100 */ Graphics2D g2d = (Graphics2D)g.create();\n/* */ try\n/* */ {\n/* 103 */ this.painter.paint(g2d, this.c, this.c.getWidth(), this.c.getHeight());\n/* */ } finally {\n/* 105 */ g2d.dispose();\n/* */ }\n/* */ }", "protected void paintComponent(Graphics g) {\n g.setColor(getBackground());\n g.fillRect(0, 0, getWidth(), getHeight());\n int x = (getWidth() - image.getWidth(null)) / 2;\n int y = (getHeight() - image.getHeight(null)) / 2;\n if (((BufferedImage) image).getType() != BufferedImage.BITMASK) {\n g.drawImage(image, x, y, this);\n }\n }", "protected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\n\t\tImageIcon background = new ImageIcon(\"pictures\\\\到达单填写right.png\");\n\t\tImage bg = background.getImage();\n\t\tg.drawImage(bg, 0, 0, frameWidth / 4 * 3, frameHeight, null);\n\t}", "private void drawBackground(Graphics g){\r\n g.setColor(Colors.ColorAlpha(Colors.blacks,a1));\r\n g.fillRect(0,0,w,h);\r\n if(moving){\r\n g.drawImage(Assets.burst.get((int)((game.counter%8)*0.625)),(int)(w*0.472),(int)(h*0.455),null);\r\n g.drawImage(Assets.sparks.get(((game.counter%20)/2)),(int)(w*0.465),(int)(h*0.345),null);\r\n }\r\n drawWires(g);\r\n }", "void paintOverall(Graphics g);", "@Override\n public void paint(Graphics g) {\n }", "@Override\n public void paint(final Graphics g)\n {\n try\n {\n offScreenG.setColor(getBackground());\n offScreenG.fillRect(0, 0, getSize().width, getSize().height);\n\n if(offG == null)\n \toffG = offScreenG.create();\n\n if(backGround != null)\n {\n \t//System.out.println(\"drawing the loaded background image\");\n \toffG.drawImage(backGround, 0, 0, this);\n \tfinal int h = backGround.getHeight(this);\n \tfinal int w = backGround.getWidth(this);\n \toffG.setColor(Color.BLACK);\n \t//offG.drawRect(0, 0, w, h);\n }\n\n offScreenG.setColor(Color.BLACK);\n //offScreenG.drawRect(0, 0, this.getWidth()-1, this.getHeight()-1); //disable drawing of bounding box\n\n final Graphics2D g2 = (Graphics2D)offG;\n\t\t\tfinal Composite normC = g2.getComposite();\n\t\t\tg2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP,(float)0.8));\n for(int i=0; i < associations.size(); i++)\n \tassociations.elementAt(i).render(offG);\n if(mpos != null && start != null)\n {\n \toffG.setColor(Color.DARK_GRAY);\n \tfinal Point rPoint = start.getPoint(mpos);\n \toffG.drawLine(rPoint.x, rPoint.y, mpos.x, mpos.y);\n \tif(retType.equals(\"pair\"))\n \t{\n \t\tdrawArrow(g2, mpos.x, mpos.y, rPoint.x, rPoint.y, 1);\n \t}\n \tdrawArrow(g2, rPoint.x, rPoint.y, mpos.x, mpos.y, 1);\n }\n\t\t\tif(hotspots != null)\n\t\t\t{\n\t\t\t\tfor(int i=0; i < hotspots.size(); i++)\n\t\t\t\t\thotspots.elementAt(i).render(g2);\n\t\t\t}\n\n\t\t\tif(movableObjects != null)\n\t\t\t{\n\t\t\t\tfor(int i=0; i < movableObjects.size(); i++)\n\t\t\t\t{\n\t\t\t\t\tmovableObjects.elementAt(i).render2(g2);\n\t\t\t\t}\n\t\t\t}\n g2.setComposite(normC);\n if(drawHSLabel != null)\n {\n \tif(drawHSLabel.hotSpotLabel != null && !drawHSLabel.hotSpotLabel.equals(\"\"))\n \t{\n\n \t\tfinal Rectangle2D bounds = (new TextLayout(drawHSLabel.hotSpotLabel,g2.getFont(),g2.getFontRenderContext())).getBounds();\n \t\tg2.setColor(Color.YELLOW);\n \t\tg2.fillRect(mpos.x, mpos.y-((int)bounds.getHeight()+4), (int)bounds.getWidth()+10, (int)bounds.getHeight()+8);\n \t\tg2.setColor(Color.BLACK);\n \t\tg2.drawRect(mpos.x, mpos.y-((int)bounds.getHeight()+4), (int)bounds.getWidth()+10, (int)bounds.getHeight()+8);\n \t\tg2.drawString(drawHSLabel.hotSpotLabel, mpos.x+5, mpos.y);\n \t}\n }\n\n g.drawImage(offScreenImg, 0, 0, this);\n\n if (om.equals(\"figure_placement_interaction\")) {\n for (int h=0; h < hotspots.size(); h++) {\n //g.drawRect(hotspots.elementAt(h).coords[0],hotspots.elementAt(h).coords[1],hotspots.elementAt(h).coords[2],hotspots.elementAt(h).coords[3]);\n }\n }\n }\n catch(final Exception exception)\n {\n \texception.printStackTrace();\n }\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}", "void paintComponent(Graphics g);", "protected void paintComponent(Graphics g) {\n\t\tGraphics2D g2 = (Graphics2D) g; // El Graphics realmente es Graphics2D\n\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\t\tg2.setRenderingHint(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);\n\t\tg2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);\t\n g2.drawImage(originalImage, 0, 0, anchuraObjeto, alturaObjeto, null);\n\t}", "protected void paintComponent(Graphics g) {\n g.setColor(Color.WHITE);\n g.fillRect(0, 0, getWidth(), getHeight());\n }", "@Override\n\t\t\tprotected void paintComponent(Graphics g) {\n\t\t\t\tsuper.paintComponent(g);\n\t\t\t\tGraphics2D g2d = (Graphics2D) g;\n\t\t\t\tg2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);\n\t\t\t\tint w = getWidth();\n\t\t\t\tint h = getHeight();\n//\t\t\t\tColor color1 = new Color(30, 255, 90);\n//\t\t\t\tColor color2 = new Color(45, 110, 35);\n\t\t\t\tGradientPaint gp = new GradientPaint(0, 0, marsColor1, 0, h, marsColor2);\n\t\t\t\tg2d.setPaint(gp);\n\t\t\t\tg2d.fillRect(0, 0, w, h);\n\t\t\t}", "public void paint(Graphics g) {\n super.paint(g);\n\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}", "@Override\r\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\r\n Graphics2D g2d = (Graphics2D) g;\r\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n RenderingHints.VALUE_ANTIALIAS_ON);\r\n g2d.setRenderingHint(RenderingHints.KEY_RENDERING,\r\n RenderingHints.VALUE_RENDER_QUALITY);\r\n \r\n\r\n Image icon = new ImageIcon(getClass().getClassLoader().getResource(\"wallpaper.jpg\")).getImage();\r\n g2d.drawImage(icon,0,0,this);\r\n //drawScenario(g2d);\r\n if(currentState == Common.GAME_STATE.INGAME){\r\n drawGaming(g2d);\r\n }\r\n if(currentState == Common.GAME_STATE.MENU || currentState == Common.GAME_STATE.LOSE){\r\n drawMenu(g2d);\r\n }\r\n\r\n Toolkit.getDefaultToolkit().sync();\r\n }", "public void paintComponent(Graphics g);", "private void paintPainter(Graphics g)\n/* */ {\n/* 165 */ if (this.painter == null) { return;\n/* */ }\n/* */ \n/* */ \n/* 169 */ Graphics2D scratch = (Graphics2D)g.create();\n/* */ try {\n/* 171 */ this.painter.paint(scratch, this, getWidth(), getHeight());\n/* */ }\n/* */ finally {\n/* 174 */ scratch.dispose();\n/* */ }\n/* */ }", "@Override //paint component is overridden to allow super.paintCompnent to be called\r\n public void paintComponent(Graphics g) {\n \tsuper.paintComponent(g); //The super.paintComponent() method calls the method of the parent class, prepare a component for drawing\r\n doDrawing(g); //The drawing is delegated inside the doDrawing() method\r\n }", "void effacer() {\r\n Graphics g = this.zoneDessin.getGraphics();\r\n g.setColor(Color.gray);\r\n g.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n Graphics2D g2 = (Graphics2D) g;\n g2.scale(2, 2);\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setColor(Color.WHITE);\n\n Application.grid.draw(g2);\n ui.draw(g2);\n }", "public void paint(Graphics g)\r\n {\r\n \r\n super.paint(g);\r\n g.drawImage(backgroundImage, 0, 0, null); //Draws Background image in background of panel\r\n \r\n if(mode == 0)\r\n {\r\n g.setColor(Color.magenta); \r\n g.setFont(new Font(\"Copperplate Gothic Bold\", Font.BOLD, 50));\r\n g.drawString(\"Yeet Fighter\",37,300); //Draws Title in magenta in font specified\r\n \r\n \r\n g.setColor(Color.gray);\r\n g.setFont(new Font(\"Impact\", Font.ITALIC, 20));\r\n g.drawString(\"Press any key to start\",700,550); //Draws prompt to start specification in gray in font specified\r\n }\r\n else if(mode == 1)\r\n {\r\n\r\n g.setColor(Color.white);\r\n g.fillRect(0,yMin, 1000, 10); //rectangle platform is drawn\r\n Color healthbar1 = new Color(255-(int)((dFs[0].getHealth()/totalH) * 255),(int)((dFs[0].getHealth()/totalH) * 255),0);\r\n g.setColor(healthbar1); \r\n g.fillRect(10,10,(int)((dFs[0].getHealth()/totalH) * 465),10); // health bar is drawn with color in spectrum of red through green based on red fighter health\r\n Color healthbar2 = new Color(255-(int)((dFs[1].getHealth()/totalH) * 255),(int)((dFs[1].getHealth()/totalH) * 255),0);\r\n g.setColor(healthbar2);\r\n g.fillRect(480+(465-(int)((dFs[1].getHealth()/totalH) * 465)),10,(int)((dFs[1].getHealth()/totalH) * 465),10); \r\n // health bar is drawn with color in spectrum of red through green based on red fighter health with x coordinates so that health bar moves away from center\r\n\r\n g.setColor(Color.red);\r\n \r\n \r\n if(dFs[0].getAttacking() == 2)\r\n {\r\n g.setColor(new Color(150, 0, 0)); //the fighter is drawn darker if they are in cooldown\r\n }else\r\n {\r\n g.setColor(new Color(255, 0, 0));\r\n }\r\n\r\n g.fillRect((int)dFs[0].getPos()[0],(int)dFs[0].getPos()[1],dFs[0].getSize(),dFs[0].getSize()); //red fighter is drawn\r\n //sets color of fighter to darker color if attack is in cooldown method else in norml state\r\n\r\n if(dFs[0].getAttacking() == 1)\r\n {\r\n g.setColor(Color.red);\r\n \r\n int[] i = new int[4];\r\n i = attackHitBox(dFs[0]);\r\n\r\n g.fillRect(i[0],i[1],i[2],i[3]); //draws the attack onto the screen\r\n }\r\n\r\n if(dFs[0].getBlocking() != 0)\r\n {\r\n if(dFs[0].getBlocking() == 1)\r\n {\r\n g.setColor(new Color(255, 255, 255)); //draws a white box if blocking\r\n }else\r\n {\r\n g.setColor(new Color(150, 150, 150)); //draws a gray box if in cooldown\r\n }\r\n g.fillRect((int) (dFs[0].getPos()[0] + 10) ,(int) (dFs[0].getPos()[1] + 10), dFs[0].getSize() -20 , dFs[0].getSize() - 20); \r\n //draws square used to indicate blocking on fighter that is blocking and in color based on whether block is in active state\r\n }\r\n\r\n\r\n if(dFs[1].getAttacking() == 2)\r\n {\r\n g.setColor(new Color(0, 150, 150));\r\n }else\r\n {\r\n g.setColor(new Color(0, 255, 255));\r\n }\r\n\r\n g.fillRect((int)dFs[1].getPos()[0],(int)dFs[1].getPos()[1],dFs[1].getSize(),dFs[1].getSize()); //blue fighter is drawn\r\n //sets color of fighter to darker color if attack is in cooldown method else in norml state\r\n\r\n if(dFs[1].getAttacking() == 1)\r\n {\r\n g.setColor(new Color(0, 255, 255));\r\n \r\n int[] i = new int[4];\r\n i = attackHitBox(dFs[1]);\r\n\r\n g.fillRect(i[0],i[1],i[2],i[3]);\r\n }\r\n\r\n if(dFs[1].getBlocking() != 0)\r\n {\r\n if(dFs[1].getBlocking() == 1)\r\n {\r\n g.setColor(new Color(255, 255, 255));\r\n }else\r\n {\r\n g.setColor(new Color(150, 150, 150));\r\n }\r\n g.fillRect((int) (dFs[1].getPos()[0] + 10) ,(int) (dFs[1].getPos()[1] + 10), dFs[1].getSize() -20 , dFs[1].getSize() - 20);\r\n //draws square used to indicate blocking on fighter that is blocking and in color based on whether block is in active state\r\n }\r\n\r\n\r\n\r\n\r\n }else if(mode == 2)\r\n {\r\n \r\n g.setFont(new Font(\"Agency FB\", Font.BOLD, 30)); \r\n g.setColor(Color.white);\r\n g.drawString(\"Developed By Joseph Rother & Akshan Sameullah\",200,570); //draws author label with color white and specified font\r\n \r\n if(dFs[0].getHealth() > 0)\r\n {\r\n g.setFont(new Font(\"Agency FB\", Font.BOLD, 190));\r\n g.setColor(Color.red);\r\n g.drawString(\"Red\",500,200);\r\n g.drawString(\"Wins\",500,400); //Draws Red Wins in specified font and in red if Red wins\r\n \r\n \r\n }else\r\n {\r\n \r\n \r\n g.setColor(Color.cyan);\r\n g.setFont(new Font(\"Agency FB\", Font.BOLD, 190));\r\n g.drawString(\"Blue\",500,200);\r\n g.drawString(\"Wins\",500,400); //Draws Blue Wins in specified font if red health is 0\r\n \r\n \r\n }\r\n Graphics2D g2 = (Graphics2D) g;\r\n AffineTransform at = new AffineTransform();\r\n at.setToRotation(Math.toRadians(270), 440, 380);\r\n g2.setTransform(at);\r\n g2.setColor(Color.magenta);\r\n g2.setFont(new Font(\"Magneto\", Font.BOLD, 170));\r\n g2.drawString(\"Game\",250,80);\r\n g2.drawString(\"Over\",300,250); //draws game over in vertical position in font specified and in pink (same color as title)\r\n }\r\n \r\n g.dispose();\r\n }", "public void paint (Graphics g){\n \r\n }", "@Override\n public void paint(Graphics g) {\n g.drawImage(imgFond.getImage(), 0, 0, getWidth(), getHeight(),this);\n setOpaque(false);\n super.paint(g);\n }", "@Override\r\n\tprotected void paintComponent(Graphics g) {\r\n\t\tGraphics2D g2 = (Graphics2D) g; // El Graphics realmente es Graphics2D\r\n\t\tg2.setRenderingHint(RenderingHints.KEY_INTERPOLATION,RenderingHints.VALUE_INTERPOLATION_BILINEAR);\r\n\t\tg2.setRenderingHint(RenderingHints.KEY_RENDERING,RenderingHints.VALUE_RENDER_QUALITY);\r\n\t\tg2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON);\t\r\n g2.drawImage(imagenObjeto, 0, 0, anchuraObjeto, alturaObjeto, null);\r\n\t}", "public void paintComponentBackground(Graphics g, Insets insets, Color aColor) {\r\n int x = 0;\r\n int y = 0;\r\n int width = getWidth();\r\n int height = getHeight();\r\n if (insets != null) {\r\n x += insets.left;\r\n y += insets.top;\r\n height = height - insets.top - insets.bottom;\r\n width = width - insets.left - insets.right;\r\n } else {\r\n height = height - getInsets().bottom;\r\n }\r\n Color c = g.getColor();\r\n g.setColor(aColor);\r\n g.fillRoundRect(x, y, width, height, 10, 10);\r\n g.setColor(c);\r\n }", "protected void paintComponent(Graphics g)\n\t{\n\t}", "@Override\r\n\tpublic void paint(Graphics g, JComponent c) {\n\t\tsuper.paint(g, c);\r\n\t}", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawImage(img, 0, 0, null);\n }", "@Override\r\npublic void mouseEntered(MouseEvent arg0) {\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "private static boolean setGraphicsTransparency(Graphics g, float alpha) {\r\n\t\tif (g instanceof Graphics2D) {\r\n\t\t\tGraphics2D g2d = (Graphics2D) g;\r\n\t\t\tComposite comp = g2d.getComposite();\r\n\t\t\tif (comp instanceof AlphaComposite) {\r\n\t\t\t\tAlphaComposite acomp = (AlphaComposite) comp;\r\n\r\n\t\t\t\tif (acomp.getAlpha() != alpha) {\r\n\t\t\t\t\tif (alpha < 1.0f) {\r\n\t\t\t\t\t\tg2d.setComposite(AlphaComposite.getInstance(\r\n\t\t\t\t\t\t\t\tAlphaComposite.SRC_OVER, alpha));\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tg2d.setComposite(AlphaComposite.SrcOver);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void paint(Graphics g) {\n\n \t\n \tsuper.paint(g);\n \n \tg.drawRect(0, 0, \n \t\t getSize().width - 1,\n \t\t getSize().height - 1); \t\n \t\n\n }", "@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 }", "@Override\n protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {\n }", "private void makeTransparent(JButton component)\n {\n component.setOpaque(false);\n component.setContentAreaFilled(false);\n component.setBorderPainted(false);\n }", "public boolean isOpaque()\n/* */ {\n/* 83 */ Color back = getBackground();\n/* 84 */ Component p = getParent();\n/* 85 */ if (p != null) {\n/* 86 */ p = p.getParent();\n/* */ }\n/* */ \n/* 89 */ boolean colorMatch = (back != null) && (p != null) && (back.equals(p.getBackground())) && (p.isOpaque());\n/* */ \n/* */ \n/* 92 */ return (!colorMatch) && (super.isOpaque());\n/* */ }", "public void paint(Graphics g){\n\t\tsuper.paint(g);\n\t\t//the Background\n\t\tg.drawImage(background, 0, 0, null);\n\t\t\n\t\t//Pad 1\n\t\tg.drawImage(pad1, pad1_x, pad1_y, null);\n\t\t\n\t\t//Pad 2\n\t\tg.drawImage(pad2, pad2_x, pad2_y, null);\n\t}", "@Override\r\n\tpublic void renderBackground() {\n\r\n\t}", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n Graphics2D g2 = (Graphics2D)g;\n g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);\n if (icon != null) icon.paintIcon(this, g, 0, 0);\n\n // draw a grey grid over the bitmap background\n for(int y = 0; y < bitmapHeight; y++) {\n g2.setColor(Color.GRAY);\n // g2.draw(new Line2D.Float(0, (y+1)*pixelScale, canvasWidth, (y+1)*pixelScale));\n }\n for(int x = 0; x < bitmapWidth; x++) {\n g2.setColor(Color.GRAY);\n // g2.draw(new Line2D.Float((x+1)*pixelScale, 0, (x+1)*pixelScale, canvasHeight));\n }\n\n // draw the polygon\n g2.setColor(Color.BLUE);\n Point2D.Float prev = null;\n float r = 4;\n for (Point2D.Float gp : points) {\n Point2D.Float p = screenPosition(gp);\n g2.fill(new Ellipse2D.Float(p.x - r, p.y - r, 2*r, 2*r));\n if (prev != null) {\n g2.draw(new Line2D.Float(prev, p));\n }\n prev = p;\n }\n }", "public void paintComponent(Graphics g) {\n\t\tImage bg1 = null;\r\n\t\ttry {\r\n\t\t\t bg1 = ImageIO.read(new File(\"background.png\"));\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\r\n\t\tg.drawImage(bg1,0,0,null);\r\n\t\trepaint();\t\r\n\t\r\n\t}", "@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 drawOverGlass(Graphics g, ImageObserver c) {\n\tg.drawImage(ovenTop.getImage(), baseXCoord, baseYCoord,c);\n}", "@Override\r\npublic void mousePressed(MouseEvent arg0) {\n\t\r\n\tb1.setBackground(Color.pink);\r\n\t\r\n}", "@Override\n public boolean shouldPaint() {\n return false;\n }", "protected void paintComponent(Graphics g){\n g.drawOval(110,110,50,50);\n }", "protected void paintBackground(Graphics g) {\n g.setColor(editor.getBackground());\n g.fillRect(0, 0, editor.getWidth(), editor.getHeight());\n }", "@Override\n\tpublic void setTransparency(float transparency) {\n\t\t\n\t}", "public void paintComponent(Graphics g) {\n // Setup\n Graphics2D g2d = (Graphics2D) g; int txt_h = Utils.txtH(g2d, \"0\");\n g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);\n\n // Paint the super\n super.paintComponent(g2d); \n\n // Get the render context and draw if it's valid\n RenderContext myrc = (RenderContext) rc;\n if (myrc != null) {\n // Draw the interactions\n drawInteractions(g2d, myrc);\n\n // Draw the edge lens\n if (mode() == UI_MODE.EDGELENS) drawEdgeLens(g2d, myrc);\n else if (mode() == UI_MODE.TIMELINE) drawTimeLine(g2d, myrc);\n\n // Draw the selection\n Set<String> sel = getRTParent().getSelectedEntities(); if (sel == null) sel = new HashSet<String>();\n if (sel.size() > 0 || sticky_labels.size() > 0) { drawSelectedEntities(g2d, myrc, sel, sticky_labels, txt_h);\n } else { String str = \"\" + mode(); modeColor(g2d); g2d.drawString(\"\" + str, 5, txt_h); }\n\n // Draw the dynamic labels -- under the mouse for context\n String dyn_labeler_copy = dyn_labeler;\n if (dyn_label_cbmi.isSelected() && \n dyn_labeler_copy != null && \n myrc.node_coord_set.containsKey(dyn_labeler_copy)) drawDynamicLabels(g2d, myrc, dyn_labeler_copy);\n\n // If graph info mode, provide additional information\n if (myrc.provideGraphInfo()) { drawGraphInfo(g2d, myrc, sel); }\n\n // Draw the vertex placement heatmap (experimental)\n if (vertex_placement_heatmap_cbmi.isSelected()) {\n\t// Make sure it's a single selection (and that it's also a vertex);\n if (sel != null && sel.size() == 1) {\n\t String sel_str = sel.iterator().next(); if (entity_to_wxy.containsKey(sel_str)) {\n\t int hm_w = myrc.getRCWidth()/4, hm_h = myrc.getRCHeight()/4;\n\t // Determine if the heatmap will be large enough to provide value\n\t if (hm_w >= 50 && hm_h >= 50) {\n\t // Determine if the heatmap needs to be recalculated (doesn't consider if the size is still correct... or if the node shifted...\n\t if (hm_sel == null || hm_sel.equals(sel_str) == false || hm_bi == null) {\n\t hm_bi = GraphUtils.vertexPlacementHeatmap(new UniGraph(graph), sel_str, entity_to_wxy, hm_w, hm_h);\n\t\thm_sel = sel_str;\n }\n Composite orig_comp = g2d.getComposite(); g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.7f)); // Partially transparent\n\t g2d.drawImage(hm_bi, myrc.getRCWidth() - hm_bi.getWidth(null), myrc.getRCHeight() - hm_bi.getHeight(null), null);\n\t g2d.setComposite(orig_comp);\n\t }\n\t }\n\t}\n }\n\n // Draw the highlighted entities\n highlightEntities(g2d, myrc);\n\n // Draw the excerpts\n drawExcerpts(g2d, myrc);\n }\n\n // Draw the help chart\n if (draw_help) drawHelp(g2d);\n }", "public void paintComponent(Graphics g){\n\r\n int x, y, w, h, clientWidth, clientHeight;\r\n double scale;\r\n float rC, gC, bC;\r\n Color c = new Color(0F, 0F, 0F);\r\n boolean clipped, tooSmall;\r\n\r\n Graphics2D g2 = (Graphics2D) g;\r\n\r\n clientWidth = getSize().width;\r\n clientHeight = getSize().height;\r\n\r\n\r\n for (int i = 1; i <= 200; i++){\r\n x = (int)(Math.floor(Math.random() * clientWidth));\r\n y = (int)(Math.floor(Math.random() * clientHeight));\r\n\r\n scale = 0.2;\r\n w = (int)(scale * Math.floor(Math.random() * getSize().width));\r\n h = (int)(scale * Math.floor(Math.random() * getSize().height));\r\n\r\n g2.setColor(colors[i % 7]);\r\n\r\n clipped = (x > clientWidth - w) || (y > clientHeight - h);\r\n tooSmall = (w < 0.2 * scale * clientWidth) || (h < 0.2 * scale * clientHeight);\r\n\r\n if (clipped || tooSmall) //prevent clipping\r\n i--; // dangerous hack\r\n else\r\n g2.fillOval(x, y, w, h);\r\n\r\n }\r\n\r\n\r\n\r\n //strokeWidth = (int)(Math.floor(Math.random() * 10));\r\n //g2.setStroke(new BasicStroke(strokeWidth));\r\n\r\n //g2.setColor(new Color(rC, gC, bC));\r\n\r\n //g2.drawLine(sx, sy, ex, ey);\r\n }", "public void drawNonEssentialComponents(){\n\t\t\n\t}", "@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 public void paint(Graphics g) {\n g.drawImage(carretera.getImage(),5,5,1200,80,this); //agrego la imagen de la carretera\n g.drawImage(imagen,x,y,ancho,alto,this); // agrego la imagen del carro\n setOpaque(false);\n super.paint(g); // pinto \n\n \n }", "public void paintBackground(Graphics g) {\n\t\t// Set color to black\n\t\tg.setColor(Color.BLACK);\n\t\t// Draw black on the whole screen\n\t\tg.fillRect(0, 0, this.getWidth(), this.getHeight());\n\n\t}", "void paintMainArea(Graphics g);" ]
[ "0.7701637", "0.74403834", "0.72709125", "0.72087777", "0.7155981", "0.7071222", "0.7030654", "0.7022591", "0.7015079", "0.69680464", "0.69375604", "0.6919871", "0.68413574", "0.67506534", "0.66824466", "0.66568244", "0.6605868", "0.6603722", "0.65706587", "0.6558335", "0.6556042", "0.65535265", "0.654233", "0.6527229", "0.65241104", "0.651403", "0.6510925", "0.65043026", "0.64983946", "0.64943355", "0.64858", "0.6481504", "0.6469958", "0.6457483", "0.644501", "0.6442644", "0.6422932", "0.64066136", "0.63895166", "0.6331824", "0.63244516", "0.6296941", "0.6279068", "0.62751156", "0.6267671", "0.6265515", "0.62515116", "0.62467647", "0.6242221", "0.62329227", "0.62323993", "0.622422", "0.62226254", "0.6218561", "0.62162364", "0.6196565", "0.61936194", "0.618926", "0.61698645", "0.61620283", "0.61599153", "0.6148475", "0.614818", "0.613944", "0.6138711", "0.61275816", "0.6119181", "0.6111633", "0.6105444", "0.6087822", "0.6084106", "0.60840416", "0.60800385", "0.60686874", "0.60568935", "0.6054339", "0.6052689", "0.6051101", "0.60450876", "0.6043465", "0.6041184", "0.6031113", "0.6027489", "0.60213387", "0.60034966", "0.5999079", "0.5993565", "0.59826785", "0.5967967", "0.5962228", "0.5957417", "0.59522855", "0.59522593", "0.5951231", "0.5951038", "0.5950673", "0.5950052", "0.59480536", "0.5947302", "0.59464777" ]
0.7680996
1
This method is an enhanced parseInt checking for null and empty strings Please note this still throws an exception if the string is malformed
public static Integer parseInt(Object s) { if (s == null) return 0; if (s != null && s.toString().isEmpty()) ; return Integer.parseInt(s.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static int parseInt(String val)\n {\n if(val == null || val.trim().length() == 0)\n {\n return 0;\n }\n else\n {\n return Integer.parseInt(val);\n }\n }", "private static int parseInt(String s) {\n int value;\n try {\n value = Integer.parseInt(s);\n } catch (NumberFormatException e) {\n value = 0;\n }\n return value;\n }", "@Test\n public void parseReturnsNullIfNotInteger() {\n assertNull(InputProcessing.tryParse(\"assdf\"));\n }", "public static Integer tryParseToInt(String str) {\n\t\ttry {\n\t\treturn Integer.parseInt(str);\t\n\t\t}\t\n\t\tcatch(NumberFormatException e) {\n\t\t\treturn null;\n\t\t}\n\t\t}", "public static Integer parseInt(String s){\n\t\ttry{\n\t\t\treturn Integer.parseInt(s);\n\t\t}catch(NumberFormatException e){\n\t\t\treturn null;\n\t\t}\n\t}", "private static Integer parseIntString( String valueString ) {\n return Integer.parseInt( valueString.replaceAll( \"[^0-9]\", \"\" ) );\n }", "static Integer parseInteger(String s) {\n try {\n return Integer.parseInt(s);\n } catch (NumberFormatException e) {\n return null;\n }\n }", "public static int parseInt(String s){\r\n\t\tint a =0;\r\n\t\ttry {\r\n\t\t a = Integer.parseInt(s);\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t System.out.println(\"To use this function you have to enter string that is a number, otherwise it will return 0.\");\r\n\t\t}\r\n\t\treturn a;\r\n\t}", "public static int parseInt(String s){\r\n int v=-1;\r\n try{\r\n v = Integer.parseInt(s);\r\n }catch(NumberFormatException e){\r\n \r\n }\r\n return v;\r\n }", "private int isInteger(String s) {\r\n\t\t\tint retInt;\r\n\t\t try { \r\n\t\t \tretInt = Integer.parseInt(s); \r\n\t\t } catch(NumberFormatException e) { \r\n\t\t return -1; \r\n\t\t } catch(NullPointerException e) {\r\n\t\t return -1;\r\n\t\t }\r\n\t\t // only got here if we didn't return false\r\n\t\t return retInt;\r\n\t\t}", "public static Integer toInteger(String str){\r\n\t\tif(isEmpty(str)){\r\n\t\t\treturn null;\r\n\t\t}else{\r\n\t\t\ttry {\r\n\t\t\t\treturn Integer.valueOf(str.trim());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Integer tryIntParsing(String s) {\n try {\n int parsedInt = Integer.parseInt(s);\n return parsedInt;\n } catch (NumberFormatException e) {\n return 0;\n }\n }", "private boolean tryParseInt(String str) {\n try {\n Integer.parseInt(str);\n } catch (Exception ex) {\n return false;\n }\n return true;\n }", "private static boolean stringTest(String s){\n try{ //depending on whether this is successful or not will return the relevant value\n Integer.parseInt(s);\n return true;\n } catch (NumberFormatException ex){\n return false;\n }\n }", "private static int parseIntWithDefault(String p_78862_0_, int p_78862_1_) {\n/* */ try {\n/* 108 */ return Integer.parseInt(p_78862_0_.trim());\n/* */ }\n/* 110 */ catch (Exception var3) {\n/* */ \n/* 112 */ return p_78862_1_;\n/* */ } \n/* */ }", "public Integer fromString(String s) {\n if (s == null || s.trim().length() == 0)\n return 0;\n try {\n return Integer.parseInt(s);\n }\n catch (NumberFormatException e) {\n return null;\n }\n }", "static int convertToInt(String s){\n\n int value = -1;\n\n try{\n value = Integer.parseInt(s);\n return value;\n }\n catch(NumberFormatException e) {\n return value;\n }\n catch(NullPointerException e) {\n return value;\n }\n }", "@Override\n public Integer fromString(String value) {\n if (value == null) {\n return null;\n }\n\n // Take off the spaces\n value = value.trim();\n\n // If it's 0 (Was full of spaces) return 0\n if (value.length() < 1) {\n return null;\n }\n int valueConverted = 0;\n try {\n valueConverted = Integer.valueOf(value);\n } catch (NumberFormatException e) {\n System.err.println(\"[ERROR-INFO (IntegerString Converter)] - \" + e);\n }\n return valueConverted;\n }", "public static int atoi(String str) {\n // Start typing your Java solution below\n // DO NOT write main() function\n \n \n //possible input\n //positive \n //negative\n //and zero.\n //what are the allowed chars + -, [1-9].\n //if invalid, what to do?\n //white spaces in input it is possible. zero value\n //if the number is out of range of representable value. max_int or min_int is returned.\n //ignore anything after the last digit.\n \n if(str == null || str.length() == 0) return 0;\n \n //remove empty space at beginning.\n int pos = 0;\n \n boolean isNeg = false;\n long res = 0;\n \n while(str.charAt(pos) == ' ') pos ++;\n \n if(str.charAt(pos) == '+' || str.charAt(pos) == '-'){\n if(str.charAt(pos) == '-') isNeg = true;\n pos ++;\n }\n \n \n while(pos < str.length() ){\n int tmp = str.charAt(pos) - '0'; //need to check overflow situation while iterating through it.\n if(tmp >=0 && tmp <= 9 ){\n res = res * 10 + tmp;\n pos ++;\n }else break; // invalid or ignore subsequent chars.\n }\n \n res = isNeg? -res: res;\n \n if(res > Integer.MAX_VALUE) res = Integer.MAX_VALUE;\n if(res < Integer.MIN_VALUE) res = Integer.MIN_VALUE;\n return (int) res;\n \n }", "public static int atoi1(String str) {\n\t // Start typing your Java solution below\n\t // DO NOT write main() function\n\t \n\t \n\t //possible input\n\t //positive \n\t //negative\n\t //and zero.\n\t //what are the allowed chars + -, [1-9].\n\t //if invalid, what to do?\n\t //white spaces in input it is possible. zero value\n\t //if the number is out of range of representable value. max_int or min_int is returned.\n\t //ignore anything after the last digit.\n\t \n\t if(str == null || str.length() == 0) return 0;\n\t \n\t //remove empty space at beginning.\n\t int pos = 0;\n\t \n\t boolean isNeg = false;\n\t int res = 0;\n\t \n\t //pure char by char empty space removal.\n\t while(str.charAt(pos) == ' ') pos ++;\n\t \n\t if(str.charAt(pos) == '+' || str.charAt(pos) == '-'){\n\t if(str.charAt(pos) == '-') isNeg = true;\n\t pos ++;\n\t }\n\t \n\t \n\t while(pos < str.length() ){\n\t int tmp = str.charAt(pos) - '0';\n\t if(tmp >=0 && tmp <= 9 ){\n\t if(Integer.MAX_VALUE /10 >= res) res *= 10;\n\t else{\n\t return isNeg?Integer.MIN_VALUE: Integer.MAX_VALUE; //overflow situation.\n\t }\n\t \n\t if(Integer.MAX_VALUE - tmp >= res){\n\t res += tmp;\n\t }\n\t else{\n\t return isNeg?Integer.MIN_VALUE: Integer.MAX_VALUE;\n\t }\n\t pos ++;\n\t }else break; // invalid or ignore subsequent chars.\n\t }\n\t \n\t res = isNeg? -res: res;\n\t \n\t return res;\n\t \n\t }", "public static int parseInt(final CharSequence s)\n {\n // no string\n if (s == null)\n {\n throw new NumberFormatException(\"null\");\n }\n\n // determine length\n final int length = s.length();\n\n if (length == 0)\n {\n throw new NumberFormatException(\"length = 0\");\n }\n\n // that is safe, we already know that we are > 0\n final int digit = s.charAt(0);\n\n // turn the compare around to allow the compiler and cpu\n // to run the next code most of the time\n if (digit < '0' || digit > '9')\n {\n return Integer.parseInt(s.toString());\n }\n\n int value = digit - DIGITOFFSET;\n\n for (int i = 1; i < length; i++)\n {\n final int d = s.charAt(i);\n if (d < '0' || d > '9')\n {\n throw new NumberFormatException(\"Not an int \" + s.toString());\n }\n\n value = ((value << 3) + (value << 1));\n value += (d - DIGITOFFSET);\n }\n\n return value;\n }", "public int parseInt() {\n\t\tboolean validInt = false;\n\t\tint num = -1;\n\t\twhile(!validInt) {\n\t\t\ttry {\n\t\t\t\tnum = scanner.nextInt();\n\t\t\t\tvalidInt = true;\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(ConsoleColors.RED +\"Invalid input. Please enter a number\" + ConsoleColors.RESET);\n\t\t\t\tscanner.next();\n\t\t\t}\n\t\t}\n\t\treturn num;\n\t}", "public int atoi(String str)\n {\n if(str==null)\n return 0;\n str=str.trim();\n if(str.isEmpty())\n return 0;\n int result=0;\n\n boolean negative=false;\n int i=0;\n if(str.charAt(0)=='-' || str.charAt(0)=='+')\n {\n i++;\n if(str.charAt(0)=='-')\n negative=true;\n }\n for(; i<str.length(); i++)\n {\n char c=str.charAt(i);\n //return the result before non-digit char\n if(!Character.isDigit(c))\n break;\n //now begin to check corner case for boundary values\n if(!negative && result > Integer.MAX_VALUE/10)\n return Integer.MAX_VALUE;\n if(!negative && result==Integer.MAX_VALUE/10 && (c-'0')>=7)\n return Integer.MAX_VALUE;\n if(negative && -result < Integer.MIN_VALUE/10)\n return Integer.MIN_VALUE;\n if(negative && -result == Integer.MIN_VALUE/10 && (c-'0')>=8)\n return Integer.MIN_VALUE;\n result=result*10 + (c-'0');\n }\n return negative? -result : result;\n }", "private int safeStringToInt(String str) {\n\t\tif(stringIsNumeric(str)) {\n\t\t\tif(str.length() > 10) {\n\t\t\t\tstr = str.substring(0, 10);\n\t\t\t}\n\n\t\t\tif(Double.parseDouble(str) > Integer.MAX_VALUE) {\n\t\t\t\treturn Integer.MAX_VALUE - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn Integer.parseInt(str);\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public static boolean tryParse(String str) { \n try { \n Integer.parseInt(str); \n return true;\n } catch (NumberFormatException ex) {\n return false; \n } catch (Exception ex) {\n\t logError(ex);\n\t return false;\n }\n }", "public static int parseInt(String str) {\n\t\tif (str == null || str.trim().length() <= 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tstr = str.trim();\n\t\tint result = 0;\n\t\tint startIndex = 0;\n\t\tboolean sign = false;\n\t\tif (str.charAt(0) == '-') {\n\t\t\tsign = true;\n\t\t\tstartIndex = 1;\n\t\t}\n\t\tif (str.charAt(0) == '+') {\n\t\t\tstartIndex = 1;\n\t\t}\n\t\tfor (int i = startIndex; i < str.length(); ++i) {\n\t\t\tif (!Character.isDigit(str.charAt(i))) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tint digit = str.charAt(i) - '0';\n\t\t\tresult *= 10;\n\t\t\tif ((result + digit) > Integer.MAX_VALUE\n\t\t\t\t\t|| (result + digit) <= Integer.MIN_VALUE) {\n\t\t\t\tif (sign) {\n\t\t\t\t\treturn Integer.MIN_VALUE;\n\t\t\t\t} else {\n\t\t\t\t\tresult = Integer.MAX_VALUE;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tresult += digit;\n\t\t}\n\n\t\treturn sign ? -result : result;\n\t}", "public int myAtoi(String str) {\n\t\tboolean isStarted = false;\n\t\tint startPos = str.length();\n\t\tint endPos = str.length();\n\t\tif (str == null || str.length() == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tchar[] s = str.toCharArray();\n\t\tfor (int i = 0; i < s.length; i++) {\n\t\t\tif (s[i] == ' ') {\n\t\t\t\tif (!isStarted) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tendPos = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isValidNumber(s[i])) {\n\t\t\t\tif (!isStarted) {\n\t\t\t\t\tisStarted = true;\n\t\t\t\t\tstartPos = i;\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (isValidChar(i, s[i], str)) {\n\t\t\t\tisStarted = true;\n\t\t\t\tstartPos = i;\n\t\t\t} else {\n\t\t\t\tif (!isStarted) {\n\t\t\t\t\treturn 0;\n\t\t\t\t} else {\n\t\t\t\t\tendPos = i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tString valueStr = str.substring(startPos, endPos);\n\t\tvalueStr = (valueStr.equals(\"+\") || valueStr.equals(\"-\") || valueStr.isEmpty()) ? \"0\" : valueStr;\n\t\treturn filterOverflow(Double.valueOf(valueStr));\n\t}", "public static int parseIntOrDefault(String s, int defaultInt) {\n try {\n return Integer.parseInt(s);\n } catch (NumberFormatException e) {\n Logger.trace(MESSAGE, s, e);\n return defaultInt;\n }\n }", "private boolean isInt (String s) {\n\t\ttry {\n\t\t\tif(Integer.parseInt(s) < 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(NumberFormatException e) {\n\t\t\treturn false;\n\t\t}\n\t\tcatch(NullPointerException e) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "private int getInt(String next) {\n\t\ttry {\n\t\t\tint a = Integer.parseInt(next);\n\t\t\tif (a > 10) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn a;\n\t\t} catch (NumberFormatException e) {\n\t\t\treturn 0;\n\t\t}\n\t}", "int toInteger(String value) {\n value = value.trim();\n if (\"9999\".equals(value)) value = \"\";\n return (!\"\".equals(value)\n ? new Integer(value).intValue()\n : Tables.INTNULL);\n }", "private static int tryParse(String number) {\r\n\t\ttry {\r\n\t\t\treturn Integer.parseInt(number);\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tthrow new java.lang.Error(\"Could not convert input to integer.\");\r\n\t\t}\r\n\t}", "public static int parseInt(String S1){\n return Integer.parseInt(S1);\n }", "private int strToInt(String str) {\n\t\tif (str.equals(\"\")) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Integer.parseInt(str);\n\t}", "@Override\n public int strToInt(String source) {\n try {\n return Integer.parseInt(source);\n } catch (NumberFormatException nfe) {\n return 0;\n }\n }", "static int numberFrom(String s) throws NumberFormatException {\n return Integer.parseInt(s.replaceAll(\"[,+\\\\s+]\", EMPTY));\n }", "public static Integer stringToInteger(String s) {\n\t Integer ret = null;\n\t if (!Controleur.isVide(s))\n\t try {\n ret = Integer.valueOf(s);\n } catch (NumberFormatException e) {\n }\n\t\treturn ret;\n\t}", "public static int parseInt(String value)\n\t{\n\t\treturn value.matches(\"-?\\\\d+\") ? Integer.parseInt(value) : 0;\n\t}", "private static boolean isPositiveInteger(String s){\n\t\ttry{\n\t\t\t//If the token is an integer less than 0 return false\n\t\t\tif(Integer.parseInt(s) < 0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t//If an exception occurs return false\n\t\tcatch(NumberFormatException e){\n\t\t\treturn false;\n\t\t}\n\t\t//otherwise return true\n\t\treturn true;\n\t}", "public boolean checkInput(String str)\n {\n try\n {\n Integer.parseInt(str);\n } \n catch(NumberFormatException ex)\n {\n return false;\n } \n return true;\n }", "public int convertStringToInt(String value) throws NumberFormatException, IOException {\n\t\t\t\ttry {\n\t\t\t\t return Integer.parseInt(value);\n\t\t\t\t } catch(NumberFormatException e) {\n\t\t\t\t \tfileWriterPrinter(\"NullPointerException:\\nString '\" + value + \"is not convertable to Integer...\");\n\t\t\t\t \treturn 0;\n\t\t\t\t }\n\t\t\t\t}", "static Value<Integer> parseInteger(String value) {\n try {\n if (value == null || value.isEmpty()) return empty();\n return of(Integer.parseInt(value));\n } catch (NumberFormatException error) {\n return empty();\n }\n }", "protected static Integer getIntegerString(String string) {\n Integer i;\n try {\n i = Integer.parseInt(string);\n } catch(Exception e) {\n return null;\n }\n\n return i;\n }", "private static boolean validateInteger(String intString) {\n try {\n Integer.parseInt(intString);\n } catch (NumberFormatException e) {\n // Not a valid integer\n return false;\n }\n return true;\n }", "public static int parseInt(String s) {\r\n // s consists of digit characters.\r\n // For example, if s is \"125\", the return value\r\n // should be 125.\r\n return Integer.parseInt(s);\r\n\r\n }", "public int parseInt()\r\n {\r\n String str = feed.findWithinHorizon( INTEGER_PATTERN, 0 );\r\n \r\n if( str == null )\r\n throw new NumberFormatException( \"[Line \" + lineNum + \"] Input did not match an integer\" );\r\n else if( str.length() == 0 )\r\n throw new NumberFormatException( \"Input did not match an integer\" );\r\n \r\n return Integer.parseInt( str );\r\n }", "public static int parseInt(String value) throws ServiceException {\n OMUtil.nullCheck(value);\n\n try {\n return Integer.parseInt(value);\n } catch (NumberFormatException ex) {\n throw new ServiceException(ServiceStatus.MALFORMED_REQUEST);\n }\n }", "private boolean isInt(String str) { \n\t try { \n\t int d = Integer.parseInt(str); \n\t } catch(NumberFormatException nfe) { \n\t return false; \n\t } \n\t return true; \n\t}", "public static Option<Integer> parseInt(final String str) {\n\t\ttry {\n\t\t\treturn Option.some(Integer.parseInt(str));\n\t\t} catch (final NumberFormatException e) {\n\t\t\treturn Option.none();\n\t\t}\n\t}", "public static boolean isIntValid (String str) {\r\n try {Integer.parseInt(str);} catch (NumberFormatException e) {return false;}\r\n return true;\r\n }", "public static boolean isInteger(String s) {\n\t\ttry { \n\t\t\tInteger.parseInt(s); \n\t\t} catch(NumberFormatException e) { \n\t\t\treturn false; \n\t\t} catch(NullPointerException e) {\n\t\t\treturn false;\n\t\t}\n\t\t// only got here if we didn't return false\n\t\treturn true;\n\t}", "private boolean isStringAnInt(String s) {\n // false if string is null\n if (s == null) {\n return false;\n }\n // if scanner get parse string for int then return true\n try {\n Scanner sc = new Scanner(s);\n int num = sc.nextInt();\n }\n // return false if it throws an exception\n catch (Exception e) {\n return false;\n }\n return true;\n }", "public int myAtoi(String str) {\n\n\t\t// 去除前后空格\n\t\tstr = str.trim();\n\n\t\tif (str.equals(\"\"))\n\t\t\treturn 0;\n\n\t\tString s = \"\";\n\t\tint symbol = -1;\n\n\t\tfor (int i = 0, j = 0; i < 12 && i < str.length(); i++) {\n\n\t\t\tif (i == 0) {\n\t\t\t\tchar ch = str.charAt(i);\n\n\t\t\t\tif (str.charAt(i) > '9' || str.charAt(i) < '0')\n\t\t\t\t\tif (str.charAt(i) != '+' && str.charAt(i) != '-')\n\t\t\t\t\t\treturn 0;\n\t\t\t}\n\n\t\t\tif (i > 1 && s.equals(\"\"))\n\t\t\t\treturn 0;\n\n\t\t\tif (str.charAt(i) <= '9' && str.charAt(i) >= '0') {\n\t\t\t\ts += str.charAt(i);\n\t\t\t\tif (symbol < 0)\n\t\t\t\t\tsymbol = i;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (i > j)\n\t\t\t\tbreak;\n\t\t\tj++;\n\t\t}\n\n\t\tif (s.equals(\"\"))\n\t\t\treturn 0;\n\n\t\tif (symbol > 0 && str.charAt(symbol - 1) == '-') {\n\t\t\ts = \"-\" + s;\n\t\t\tif (s.length() > 11 || Long.parseLong(s) <= Integer.MIN_VALUE)\n\t\t\t\treturn Integer.MIN_VALUE;\n\t\t\telse\n\t\t\t\treturn Integer.parseInt(s);\n\t\t}\n\n\t\tif (s.length() > 10 || Long.parseLong(s) >= Integer.MAX_VALUE) {\n\t\t\treturn Integer.MAX_VALUE;\n\t\t}\n\n\t\treturn Integer.parseInt(s);\n\t}", "public static int parseInt(String val) {\n\n\t\tif (val == null) {\n\t\t\tval = \"0\";\n\t\t}\n\n\t\tint ret = 0;\n\n\t\ttry {\n\t\t\tret = Integer.parseInt(val);\n\t\t} catch (NumberFormatException e) {\n\t\t}\n\n\t\treturn ret;\n\t}", "public static int atoi(String s)\n {\n return (int) atol(s);\n }", "public static int parseInt(String string) {\n return (int) Double.parseDouble(string);\n }", "public static Integer getIntegerFromString(String value) {\n\n if (value == null) {\n return null;\n }\n\n Integer intVal = null;\n\n try {\n intVal = Integer.parseInt(value);\n } catch (RuntimeException exc) {\n // could not parse into int, null will be returned\n }\n return intVal;\n }", "private int getValueAsInteger(String valueToBeReturnAsInteger) {\n\t\t\n\t\tint defaultValue = 0;\n\t\t\n\t\ttry {\n\t\t\tif(null != valueToBeReturnAsInteger && StringUtils.isNotBlank(valueToBeReturnAsInteger)) {\n\t\t\t\tdefaultValue = Integer.parseInt(valueToBeReturnAsInteger);\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"Error in parsing the String value to Integer for[{}]\", valueToBeReturnAsInteger);\n\t\t}\n\t\t\n\t\treturn defaultValue;\n\t}", "@Test(expectedExceptions=NumberFormatException.class)\r\n\tpublic void chkNumberFrmtExcep(){\r\n\t\tString x=\"100A\";\r\n\t\tint f=Integer.parseInt(x);//it will throw exception bcoz x=100A, if it is 100 it will not throw exception\r\n\t}", "private static boolean isInteger(String s) {\r\n try {\r\n Integer.parseInt(s);\r\n return true;\r\n } catch (Exception ex) {\r\n return false;\r\n }\r\n }", "public static int toInt(String str){\r\n\t\tInteger i = toInteger(str);\r\n\t\treturn i==null?0:i;\r\n\t}", "public static int integerValidation() {\n\t\tboolean flag = true;\n\t\tint input = 0;\n\t\tString temp = \"\";\n\t\twhile (flag) {\n\t\t\ttry {\n\t\t\t\ttemp = in.nextLine().trim();\n\t\t\t\tinput = Integer.parseInt(temp);\n\t\t\t\tflag = false;\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Please Enter a valid input\");\n\t\t\t}\n\t\t}\n\t\treturn input;\n\t}", "public int parseNumber(String str) {\r\n \r\n try {\r\n int i = Integer.parseInt(str);\r\n return i;\r\n } catch (Exception e) {\r\n \r\n }\r\n \r\n return 0;\r\n }", "public static int validInt(String message){\n boolean success = false;\n int value = -1;\n do {\n try {\n value = (int)readNumber(message, \"int\");\n success = true;\n } catch (InputMismatchException e){\n System.out.println(\"Debe introducir un valor numérico... \");\n }\n } while(!success);\n return value;\n }", "private boolean isInteger(String a) {\n try \n {\n Integer.parseInt(a);\n return true;\n }\n catch(Exception e) {\n return false;\n }\n }", "public static Optional<Integer> parseOptionalInt(final String input)\n {\n try\n {\n return Optional.ofNullable(input).map(Integer::parseInt);\n }\n catch(NumberFormatException e)\n {\n return Optional.empty();\n }\n }", "public static boolean isInteger(String s)\r\n {\r\n if (s == null || s.length() == 0)\r\n return false;\r\n \r\n //integer regular expression\r\n String regex = \"[-|+]?\\\\d+\";\r\n if (!s.matches(regex))\r\n return false;\r\n \r\n if (s.startsWith(\"+\"))\r\n s = s.substring(1);\r\n \r\n //try convert the string to an int\r\n //if it can not be converted, then return false\r\n try\r\n {\r\n Integer.parseInt(s);\r\n }catch(Exception e)\r\n {\r\n return false;\r\n }\r\n \r\n return true;\r\n }", "public static int stringToInt(String numb) {\r\n\t\tint temp = 0;\r\n\t\t\r\n\t\t//Convert the string to an int. Set it to a value of zero if not a number.\r\n\t\ttry {\r\n\t\t\ttemp = Integer.parseInt(numb);\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\ttemp = 0;\r\n\t\t}\r\n\t\t\r\n\t\treturn temp;\r\n\t}", "public boolean isParsable(String input){\n boolean parsable = true;\n try{\n Integer.parseInt(input);\n }catch(NumberFormatException e){\n parsable = false;\n }\n return parsable;\n}", "public static int strToInt(String s) {\n int result = 0;\n boolean negative = false;\n int i = 0, len = s.length();\n int limit = -Integer.MAX_VALUE;\n int multmin;\n int digit;\n if (len > 0) {\n char firstChar = s.charAt(0);\n if (firstChar < '0') { // Possible leading \"+\" or \"-\"\n if (firstChar == '-') {\n negative = true;\n limit = Integer.MIN_VALUE;\n } else if (firstChar != '+')\n return 0;\n\n if (len == 1) // Cannot have lone \"+\" or \"-\"\n return 0;\n i++;\n }\n multmin = limit / 10;\n while (i < len) {\n // Accumulating negatively avoids surprises near MAX_VALUE\n digit = s.charAt(i++) - '0';\n if (digit < 0||digit > 9) {\n return 0;\n }\n if (result < multmin) {\n return 0;\n }\n result *= 10;\n if (result < limit + digit) {\n return 0;\n }\n result -= digit;\n }\n } else {\n return 0;\n }\n return negative ? result : -result;\n }", "static Integer stringToInt(String s){\n int result = 0;\n for(int i = 0; i < s.length(); i++){\n //If the character is not a digit\n if(!Character.isDigit(s.charAt(i))){\n return null;\n }\n //Otherwise convert the digit to a number and add it to result\n result += (s.charAt(i) - '0') * Math.pow(10, s.length()-1-i);\n }\n return result;\n }", "static int getNumberFromString(String s) {\n if (s == null) {\n throw new NumberFormatException(\"null\");\n }\n int result = 0;\n int startIndex = 0;\n int length = s.length();\n boolean negative = false;\n char firstChar = s.charAt(0);\n if (firstChar == '-') {\n negative = true;\n startIndex = 1;\n }\n\n for (int i = startIndex; i < length; i++) {\n char num = s.charAt(i);\n result = result * 10 + num - '0';\n }\n\n return negative ? -result : result;\n }", "public int atoi(String input) {\n\t\n\t\tfinal int maxDiv10 = Integer.MAX_VALUE / 10;\n\t\t\n\t\tif(input == null) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tint len = input.length();\n\t\tint index = 0;\n\t\tint sign = 1;\n\t\tint res = 0;\n\t\t\n\t\t//if white space just continue\n\t\twhile(index < len && Character.isWhitespace(input.charAt(index))) {\n\t\t\tindex++;\n\t\t}\n\t\t\n\t\t//check if still in bounds\n\t\tif(index == len) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t//signal \n\t\tif(input.charAt(index) == '-') {\n\t\t\tsign = -1;\n\t\t\t//continue\n\t\t\tindex++;\n\t\t}\n\t\telse if(input.charAt(index) == '+') {\n\t\t\tsign = 1;\n\t\t\tindex++;\n\t\t}\n\n\t\twhile(index < len && Character.isDigit(input.charAt(index))) {\n\t\t\tint digit = Character.getNumericValue(input.charAt(index));\n\t\t\t\n\t\t\t//if result greater than max or equal to it \n\t\t\tif(res > maxDiv10 || res == maxDiv10 && digit >= 8) {\n\t\t\t\treturn sign == 1 ? Integer.MAX_VALUE : Integer.MIN_VALUE;\n\t\t\t}\n\t\t\tres = res * 10 + digit;\n\t\t\tindex++;\n\t\t}\n\t\treturn sign * res;\n\t}", "private void validateData(String input) {\n String[] inputStringArray = input.split(\" \");\n\n for (String s : inputStringArray) {\n try {\n Integer.parseInt(s);\n } catch (NumberFormatException e) {\n throw new NumberFormatException(\n \"Looks like your input - \" + s + \", is not a number. Try again\");\n }\n }\n }", "private boolean isInteger(String s)\n{\n\t boolean isNumber = true;\n\ttry{\n\t\t\tint n = Integer.parseInt(s);\n\t }catch(NumberFormatException n)\n\t {\n\t\t isNumber = false;\n\t }\n\n\treturn isNumber;\n}", "private static int extractInt(String str) {\n\n String num = \"\";\n for (int i = 0; i < str.length(); i++) {\n if (java.lang.Character.isDigit(str.charAt(i))) num += str.charAt(i);\n }\n return (num.equals(\"\")) ? 0 : java.lang.Integer.parseInt(num);\n\n }", "private static boolean isBadInput(String s) {\n\t\tString[] split = s.split(\"\\\\s+\");\n\t\tif (split.length != 3) {\n\t\t\tSystem.err.printf(\"Unknow length: %d\\n\", split.length);\n\t\t\treturn true;\n\t\t}\n\t\ttry {\n\t\t\tInteger.parseInt(split[0]);\n\t\t\tInteger.parseInt(split[2]);\n\t\t} catch (NumberFormatException e) {\n\t\t\tSystem.err.printf(\"Input numbers only.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif (split[1].length() != 1) {\n\t\t\tSystem.err.printf(\"Operator should be one character.\\n\");\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static boolean isInteger(String s) {\r\n\t\ttry {\r\n\t\t\tInteger.parseInt(s);\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\treturn false;\r\n\t\t} catch (NullPointerException e) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static int getInt (String ask)\r\n {\r\n boolean badInput = false;\r\n String input = new String(\"\");\r\n int value = 0;\r\n do {\r\n badInput = false;\r\n input = getString(ask);\r\n try {\r\n value = Integer.parseInt(input);\r\n }\r\n catch(NumberFormatException e){\r\n badInput = true;\r\n }\r\n }while(badInput);\r\n return value;\r\n }", "private boolean checkInt(String str) {\n\t\ttry {\n\t\t\tint integer = Integer.parseInt(str);\n\t\t\tif(integer>=0&&integer<100000){\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} catch(Exception e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public int atoi(final String A) {\r\n if (A.isEmpty()) {\r\n return 0;\r\n }\r\n String[] strs = A.split(\"\\\\s+\");\r\n boolean signFlag = true;\r\n if (!strs[0].isEmpty() && strs[0].charAt(0) == '-') {\r\n signFlag = false;\r\n }\r\n\r\n char[] nums = strs[0].toCharArray();\r\n StringBuilder sb = new StringBuilder(\"\");\r\n int firstChar = 0;\r\n\r\n for (char num : nums) {\r\n if (Character.isDigit(num)) {\r\n firstChar = 1;\r\n sb.append(num);\r\n } else if (firstChar == 0 && (num == '+' || num == '-')) {\r\n firstChar = 1;\r\n continue;\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n if (sb.length() == 0) {\r\n return 0;\r\n }\r\n int ans = 0;\r\n try {\r\n ans = Integer.parseInt(sb.toString());\r\n ans *= signFlag == true ? 1 : -1;\r\n } catch (Exception e) {\r\n if (signFlag) {\r\n ans = Integer.MAX_VALUE;\r\n } else {\r\n ans = Integer.MIN_VALUE;\r\n }\r\n }\r\n\r\n return ans;\r\n }", "public static int checkValidity (String stringChoice) {\n int choice;\n Scanner parser = new Scanner(stringChoice);\n String modStringChoice = stringChoice.replaceAll(\"[\\\\d]\", \"\");\n if (modStringChoice.length() == 0 && parser.hasNextInt()) {\n choice = parser.nextInt();\n }\n else {\n choice = -1;\n }\n parser.close();\n return choice;\n }", "@Test\n\tpublic void TestR1NonIntegerParseableChars() {\n\t\tString invalid_solution = \"a74132865635897241812645793126489357598713624743526189259378416467251938381964572\";\n\t\tassertEquals(-1, sv.verify(invalid_solution));\n\t}", "public static boolean isInt(String strNum) {\n try {\n int d = Integer.parseInt(strNum);\n } catch (NumberFormatException | NullPointerException nfe) {\n System.out.println(\"Invalid data format\");\n log.error(nfe);\n return false;\n }\n return true;\n }", "public Integer ValidateOption(String option){\n try {\n return Integer.parseInt(option.trim());\n }\n catch (NumberFormatException ex){\n return -1;\n }\n }", "public boolean checkInt( String s ) {\n \tchar[] c = s.toCharArray();\n \tboolean d = true;\n\n \tfor ( int i = 0; i < c.length; i++ )\n \t // verifica se o char não é um dígito\n \t if ( !Character.isDigit( c[ i ] ) ) {\n \t d = false;\n \t break;\n \t }\n \treturn d;\n \t}", "public boolean isInteger(String input){\r\n try{\r\n Integer.parseInt(input);\r\n } catch (NumberFormatException e){\r\n return false;\r\n } catch (NullPointerException e){\r\n return false;\r\n }\r\n return true;\r\n }", "private boolean isInt(String num) {\n boolean isInt;\n try {\n Integer.parseInt(num);\n isInt = true;\n } catch (Exception e) {\n isInt = false;\n }\n return isInt;\n }", "private boolean isInteger(String str)\r\n {\r\n try\r\n {\r\n int i = Integer.parseInt(str);\r\n } catch (NumberFormatException nfe)\r\n {\r\n MyLogger.log(Level.INFO, LOG_CLASS_NAME + \"Non numeric value. Value was: {0}\", str);\r\n return false;\r\n }\r\n return true;\r\n }", "private static boolean isValidDigit(String strInput) {\n boolean isValid = true;\n if (isPrimitive(strInput)) {\n int input = Integer.parseInt(strInput);\n if (input < 1 || input > 255) {\n log.debug(\"Wrong config input value: {}\", strInput);\n isValid = false;\n } else {\n isValid = true;\n }\n\n } else {\n isValid = false;\n }\n\n return isValid;\n }", "@Override\r\n\tpublic int getInt(String string) {\n\t\treturn 0;\r\n\t}", "public static boolean isInteger(String s) {\n\t try { Integer.parseInt(s); }\n\t catch(NumberFormatException e) { return false; }\n\t catch(NullPointerException e) { return false; }\n\t // only gets here if the entered String is Integer:\n\t return true;\n\t}", "protected Integer inputToInt(String input) {\n try {\n return Integer.parseInt(input);\n } catch (NumberFormatException e) {\n System.out.println(\"Please input a number\");\n return inputToInt(getInput());\n }\n }", "public static int convert(String entry) throws InvalidInputException {\r\n\r\n\t\ttry {\r\n\t\t\tint x = Integer.parseInt(entry);\r\n\t\t\treturn x;\r\n\t\t}catch(NumberFormatException nf) {\r\n\t\t\tthrow new InvalidInputException(\"The input is not an integer\");\r\n\t\t}\r\n\t\t\r\n\t}", "private static int getIntValue(String s) {\n try {\n return Integer.parseInt(s, 16);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n return -1;\n }\n }", "public static boolean isInteger(String s) {\n try {\n Integer.parseInt(s);\n } catch(NumberFormatException e) {\n return false;\n } catch(NullPointerException e) {\n return false;\n }\n return true;\n }", "public static boolean isInteger(String s) {\n\t try { \n\t Integer.parseInt(s); \n\t } catch(NumberFormatException e) { \n\t return false; \n\t }\n\t return true;\n\t}", "private static int parseInt(String sn) {\n\t\treturn Integer.parseInt(sn.substring(2), 16);\n\t}", "public String validateNumberString() {\n String tempNumber = numberString;\n int start = 0;\n Pattern pattern = Pattern.compile(\"\\\\D+\");\n Matcher matcher = pattern.matcher(tempNumber);\n if (isZero()) {\n return \"0\";\n }\n if (isNegative()) {\n start++;\n }\n if (matcher.find(start)) {\n throw new IllegalArgumentException(\"Wrong number: \" + tempNumber);\n }\n pattern = Pattern.compile(\"([1-9][0-9]*)\");\n matcher.usePattern(pattern);\n if (!matcher.find(0)) {\n throw new IllegalArgumentException(\"Wrong number: \" + tempNumber);\n }\n return tempNumber.substring(matcher.start(), matcher.end());\n }", "public boolean isAnInt(String str) {\r\n \ttry {\r\n \t\tInteger.parseInt(str);\r\n \t} catch (NumberFormatException e) {\r\n \t\treturn false;\r\n \t}\r\n \treturn true;\r\n }" ]
[ "0.7221164", "0.7182256", "0.70913446", "0.70679665", "0.7060415", "0.70497096", "0.7009694", "0.7009226", "0.6968684", "0.6898192", "0.68601036", "0.6841307", "0.6810958", "0.67697304", "0.6743946", "0.6718964", "0.66890895", "0.66743314", "0.6663799", "0.6659731", "0.66506743", "0.6646355", "0.6641346", "0.6614511", "0.6583152", "0.6573608", "0.65574586", "0.65539056", "0.65508485", "0.6542156", "0.6538861", "0.6537913", "0.6526107", "0.6510843", "0.65072817", "0.6505793", "0.6484525", "0.6464982", "0.6410086", "0.64077735", "0.6381422", "0.6367417", "0.6357879", "0.6355183", "0.6354742", "0.6341812", "0.63318974", "0.63276273", "0.6325969", "0.6279996", "0.62625206", "0.6257457", "0.6253493", "0.6218026", "0.6204728", "0.6185469", "0.61816204", "0.617982", "0.6175681", "0.6171527", "0.61639833", "0.61633795", "0.61211395", "0.6116252", "0.61134636", "0.6101008", "0.6077614", "0.6075237", "0.6070753", "0.60671926", "0.60612303", "0.6054787", "0.6048009", "0.60337603", "0.6031423", "0.6025764", "0.6024749", "0.6018632", "0.59914404", "0.5989934", "0.5984483", "0.5982686", "0.59817624", "0.59769803", "0.5976583", "0.59693426", "0.59577113", "0.5951122", "0.5944786", "0.59313816", "0.5923739", "0.5923398", "0.59127545", "0.5894135", "0.58924484", "0.5883115", "0.58813953", "0.5861558", "0.5851476", "0.58491087" ]
0.7055863
5
parses the token and creates searchOptionsBean bean object for search options
public static AutoBean<SnipBean> parseSearchToken(Beanery beanery, String token, String parentId) { AutoBean<SnipBean> searchOptionsBean = beanery.snipBean(); if (parentId != null) searchOptionsBean.as().setParentSnip(parentId); String[] tokenSplit = token.split(":"); if (tokenSplit.length > 2) { buildBeanFromToken(searchOptionsBean, tokenSplit); } else { buildDefaultBean(searchOptionsBean, tokenSplit[0]); } return searchOptionsBean; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void readInSearchTokens() {\n String propFile = properties.getProperty(\"classpath.search.tokens\");\n //Try with resources\n try (InputStream inputStream = this.getClass().getResourceAsStream(propFile);\n \n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n BufferedReader searchTokensReader = new BufferedReader(inputStreamReader)) {\n //Tells the stream that it is ready to be read\n while (searchTokensReader.ready()) {\n String line = searchTokensReader.readLine();\n //eliminating leading and trailing spaces with trim and split\n //creating a string array of tokens\n String[] tokens = line.trim().split(\"\\\\s*,\\\\s\");\n List<Integer> lArray = new ArrayList<Integer>();\n // Notes: String is the type - element is the identifier. Tokens is the name\n for (String element : tokens) {\n if (element.isEmpty() == false) {\n //using containsKey to ensure the FoundLocations is in the tokens array\n if (getFoundLocations().containsKey(element) == false) {\n getFoundLocations().put(element, lArray);\n }\n }\n }\n }\n } catch (IOException inputOutputException) {\n inputOutputException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }", "private LdapContactSearchBean getSearchBean(HttpServletRequest request) {\r\n\t\t// get the data from request\r\n\t\tint start = WebCommonService.toInt(getData(request, IContactInfoService.SEARCHING_START), 0);\r\n\t\tint limit = WebCommonService.toInt(getData(request, IContactInfoService.SEARCHING_LIMIT), this.getDefaultLimit());\r\n\t\tString keyword= getData(request, IContactInfoService.KEYWORD_PARAM);\r\n\t\tString domain = getData(request, IContactInfoService.GROUP_PARAM);\r\n\t\t\r\n\t\t// get the token\r\n\t\tString token = null;\r\n\t\tif(start == 0) {\r\n\t\t\t// put data to cache again\r\n\t\t\tremoveDataFromCache(SEARCH_CACHE_KEY);\r\n\t\t} else {\r\n\t\t\t// get the tokens from cache\r\n\t\t\ttoken = getDataFromCache(SEARCH_CACHE_KEY, String.class);\r\n\t\t}\r\n\t\t\r\n\t\t// create the search bean\r\n\t\tLdapContactSearchBean searchBean = new LdapContactSearchBean(start, limit, token);\r\n\t\tsearchBean.setKey(keyword);\r\n\t\tif(DOMAIN.equals(this.category)) {\r\n\t\t this.getCode();\r\n\t\t searchBean.setDomainName(domain); \r\n\t\t}else if(GROUP.equals(this.category)) {\r\n\t\t searchBean.setDomainName(getDomain());\r\n\t\t searchBean.setDepartment(domain);\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\r\n\t\t// return the search bean.\r\n\t\treturn searchBean;\r\n\t}", "public void setToken(String token) {\r\n this.token = token;\r\n }", "public GenToken scan(ParseString ps, GenToken token) throws ParserException {\n if (token != null) {\n //a token is already found, so handle it here\n GenToken result = token;\n if (token.getType().equals(\"id\")) {\n //token is an identifier\n String name = (String)token.get(\"name\");\n if ((name.equals(\"true\")) || (name.equals(\"false\"))) {\n //token is a boolean constant\n result = new GenToken(\"const\");\n result.add(\"value\", new Boolean(name));\n }\n if (name.equals(\"hash\")) {\n //token is a hash operator\n result = opToken(\"~\");\n }\n }\n return result;\n }\n //no token is found yet\n char ch = ps.nextChar();\n GenToken result = null;\n if (ch == ';') {\n result = new GenToken(\"semicol\");\n } else if (ch == ',') {\n result = new GenToken(\"comma\");\n } else if (ch == '(') {\n result = new GenToken(\"lbrack\");\n } else if (ch == ')') {\n result = new GenToken(\"rbrack\");\n } else if (ch == '{') {\n result = new GenToken(\"lacc\");\n } else if (ch == '}') {\n result = new GenToken(\"racc\");\n } else if (ch == '+') {\n char ach = ps.nextChar();\n if (ach=='=') result = new GenToken(\"plusassign\"); else {\n ps.returnChar(ach);\n result = opToken(\"+\");\n }\n } else if (ch == '-') {\n char ach = ps.nextChar();\n if (ach=='=') result = new GenToken(\"minusassign\"); else {\n ps.returnChar(ach);\n result = opToken(\"-\");\n }\n } else if (ch == '*') {\n result = opToken(\"*\");\n } else if (ch == '/') {\n result = opToken(\"/\");\n } else if (ch == '%') {\n result = opToken(\"%\");\n } else if (ch == '~') {\n result = opToken(\"~\");\n } else if (ch == '|') {\n char ach = ps.nextChar();\n if (ach == '|') result = opToken(\"||\"); else ps.returnChar(ach);\n } else if (ch == '&') {\n char ach = ps.nextChar();\n if (ach == '&') result = opToken(\"&&\"); else ps.returnChar(ach);\n } else if (ch == '=') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\"==\"); else\n if (ach == '>') result = opToken(\"=>\"); else {\n ps.returnChar(ach);\n result = new GenToken(\"assign\");\n }\n } else if (ch == '!') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\"!=\"); else {\n ps.returnChar(ach);\n result = opToken(\"!\");\n }\n } else if (ch == '<') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\"<=\"); else {\n ps.returnChar(ach);\n result = opToken(\"<\");\n }\n } else if (ch == '>') {\n char ach = ps.nextChar();\n if (ach == '=') result = opToken(\">=\"); else {\n ps.returnChar(ach);\n result = opToken(\">\");\n }\n } else if (ch == '\"') {\n StringBuffer aconst = new StringBuffer();\n char ach = ps.nextChar();\n while ( ach != '\"' ) {aconst.append(ach); ach = ps.nextChar();}\n result = new GenToken(\"const\");\n result.add(\"value\", aconst.toString());\n } else if (Character.isDigit(ch)) {\n StringBuffer aconst = new StringBuffer();\n aconst.append(ch);\n char ach = ps.nextChar();\n while ( (Character.isDigit(ach)) || (ch == '.') ) {aconst.append(ach); ach = ps.nextChar();}\n ps.returnChar(ach);\n\n float f = Float.parseFloat(aconst.toString());\n result = new GenToken(\"const\");\n result.add(\"value\", new Float(f));\n } else {\n ps.returnChar(ch);\n }\n return result;\n }", "@Transactional\r\n\tpublic SearchBean getSearchBean(SearchForm vo) {\n\t\tSearchBean bean = new SearchBean(vo, allTripList);\r\n\t\treturn bean;\r\n\t}", "public PostingsList getPostings( String token ) {\n PostingsList post = new PostingsList();\n if(this.index.containsKey(token))\n post = (this.index.get(token)).clone();\n /*System.err.println(\"start search...\");\n // Read JSON file associated to token and return it as a postingslist\n String filename = \"postings/t\"+hash(token)+\".json\";\n PostingsList post = new PostingsList();\n try(Reader reader = new FileReader(filename)){\n post = (new Gson()).fromJson(reader, PostingsList.class);\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n return post;\n }", "public void setToken(String token) {\n\t\tthis.token = token;\n\t}", "Search getSearch();", "private LdapPersonalContactSearchBean getPersonalSearchBean(HttpServletRequest request) {\r\n\t\t// get the data from request\r\n\t\tint start = WebCommonService.toInt(getData(request, IContactInfoService.SEARCHING_START), 0);\r\n\t\tint limit = WebCommonService.toInt(getData(request, IContactInfoService.SEARCHING_LIMIT), this.getDefaultLimit());\r\n\t\tString keyword= getData(request, IContactInfoService.KEYWORD_PARAM);\r\n\t\t\r\n\t\t// get the token\r\n\t\tString token = null;\r\n\t\tif(start == 0) {\r\n\t\t\t// put data to cache again\r\n\t\t\tremoveDataFromCache(SEARCH_CACHE_KEY);\r\n\t\t} else {\r\n\t\t\t// get the tokens from cache\r\n\t\t\ttoken = getDataFromCache(SEARCH_CACHE_KEY, String.class);\r\n\t\t}\r\n\t\t\r\n\t\t// create the search bean\r\n\t\tLdapPersonalContactSearchBean searchBean = new LdapPersonalContactSearchBean(start, limit, token);\r\n\t\tsearchBean.setKey(keyword);\r\n\t\tsearchBean.setOwner(getUserName());\r\n\t\t\r\n\t\t// return the search bean.\r\n\t\treturn searchBean;\r\n\t}", "public Token setToken(String token) {\n this.token = token;\n return this;\n }", "@PostConstruct\n @SuppressWarnings(\"unchecked\")\n protected void initialize() {\n checkRequiredFields();\n try {\n // Create new instance of ConfigurationFileManager:\n ConfigurationFileManager cfm = new ConfigurationFileManager(\n configFileName);\n // Get ConfigurationObject with key configNamespace and extract\n // properties as per CS 3.2.3.\n ConfigurationObject config = cfm.getConfiguration(configNamespace);\n if (config == null) {\n throw new DAOConfigurationException(\n \"Cannot found ConfigurationObject with namespace:\"\n + configNamespace);\n }\n ConfigurationObject configObject = config.getChild(configNamespace);\n if (configObject == null) {\n throw new DAOConfigurationException(\n \"Cannot found ConfigurationObject with name:\"\n + configNamespace);\n }\n String tokenKey = \"search_by_filter_utility_token\";\n String token = null;\n try {\n token = (String) configObject.getPropertyValue(tokenKey);\n } catch (ClassCastException e) {\n throw new DAOConfigurationException(\"The '\" + tokenKey\n + \"' should be String.\", e);\n }\n if (token == null || token.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'search_by_filter_utility_token' property should\"\n + \" be configed and not be empty string.\");\n }\n // Create a new SearchByFilterUtility instance through Object\n // Factory get ConfigurationObjectSpecificationFactory\n ConfigurationObjectSpecificationFactory configurationObjectSpecificationFactory =\n new ConfigurationObjectSpecificationFactory(\n configObject);\n // get ObjectFactory\n ObjectFactory objectFactory = new ObjectFactory(\n configurationObjectSpecificationFactory);\n String searchBundleName = \"HibernateSearchBundle_\"\n + entityBeanType.getSimpleName();\n Object obj = objectFactory.createObject(token, null,\n (ClassLoader) null, new String[] {\n searchBundleManagerNamespace, searchBundleName },\n new Class[] { String.class, String.class },\n ObjectFactory.BOTH);\n if (!(obj instanceof SearchByFilterUtility)) {\n throw new DAOConfigurationException(\n \"The object configed use key:\"\n + token\n + \"should be instance of SearchByFilterUtility.\");\n }\n // Initialize the searchByFilterUtility field.\n this.searchByFilterUtility = (SearchByFilterUtility<T, Id>) obj;\n } catch (Exception e) {\n if (!(e instanceof DAOConfigurationException)) {\n throw new DAOConfigurationException(\n \"Failed to initialize searchByFilterUtility fields of DAO.\",\n e);\n }\n throw (DAOConfigurationException) e;\n }\n }", "public void setToken(final String token) {\n this.token = token;\n }", "private AutoBean<SnipBean> buildUserProfileSearchOptions(String username) {\n\t\tAutoBean<SnipBean> searchOptionsBean = beanery.snipBean();\n\t\tsearchOptionsBean.as().setAuthor(username);\n\t\tsearchOptionsBean.as().setSnipType(SnipType.PROFILE.getSnipType());\n\t\treturn searchOptionsBean;\n\t}", "public List<SearchedItem> getAllSearchedItems(StaplerRequest req, String tokenList) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, ServletException {\n Set<String> filteredItems= new TreeSet<String>();\n AbstractProject p;\n \n if(\"Filter\".equals(req.getParameter(\"submit\"))){ //user wanto to change setting for this search\n filteredItems = getFilter(req);\n }\n else{\n filteredItems = User.current().getProperty(SearchProperty.class).getFilter();\n }\n req.setAttribute(\"filteredItems\", filteredItems);\n return getResolvedAndFilteredItems(tokenList, req, filteredItems);\n }", "public void setSearchOptions(SearchOptions options) {\n searchOptions_ = options;\n }", "@Override\n\tpublic List<T> searchInfo(String flag, String token) {\n\t\treturn trendsDao.searchInfo(flag, token);\n\t}", "public TokenLocationSearchAnalyzer(Properties properties) {\n this();\n this.properties = properties;\n readInSearchTokens();\n }", "private static PredicateTokens toPredicateToken(Token token) {\n return PredicateTokens.of(token.getAttribute());\n }", "private void parseConfig() {\n try {\n synonymAnalyzers = new HashMap<>();\n\n Object xmlSynonymAnalyzers = args.get(\"synonymAnalyzers\");\n\n if (xmlSynonymAnalyzers != null && xmlSynonymAnalyzers instanceof NamedList) {\n NamedList<?> synonymAnalyzersList = (NamedList<?>) xmlSynonymAnalyzers;\n for (Entry<String, ?> entry : synonymAnalyzersList) {\n String analyzerName = entry.getKey();\n if (!(entry.getValue() instanceof NamedList)) {\n continue;\n }\n NamedList<?> analyzerAsNamedList = (NamedList<?>) entry.getValue();\n\n TokenizerFactory tokenizerFactory = null;\n TokenFilterFactory filterFactory;\n List<TokenFilterFactory> filterFactories = new LinkedList<>();\n\n for (Entry<String, ?> analyzerEntry : analyzerAsNamedList) {\n String key = analyzerEntry.getKey();\n if (!(entry.getValue() instanceof NamedList)) {\n continue;\n }\n Map<String, String> params = convertNamedListToMap((NamedList<?>)analyzerEntry.getValue());\n\n String className = params.get(\"class\");\n if (className == null) {\n continue;\n }\n\n params.put(\"luceneMatchVersion\", luceneMatchVersion.toString());\n\n if (key.equals(\"tokenizer\")) {\n try {\n tokenizerFactory = TokenizerFactory.forName(className, params);\n } catch (IllegalArgumentException iae) {\n if (!className.contains(\".\")) {\n iae.printStackTrace();\n }\n // Now try by classname instead of SPI keyword\n tokenizerFactory = loader.newInstance(className, TokenizerFactory.class, new String[]{}, new Class[] { Map.class }, new Object[] { params });\n }\n if (tokenizerFactory instanceof ResourceLoaderAware) {\n ((ResourceLoaderAware)tokenizerFactory).inform(loader);\n }\n } else if (key.equals(\"filter\")) {\n try {\n filterFactory = TokenFilterFactory.forName(className, params);\n } catch (IllegalArgumentException iae) {\n if (!className.contains(\".\")) {\n iae.printStackTrace();\n }\n // Now try by classname instead of SPI keyword\n filterFactory = loader.newInstance(className, TokenFilterFactory.class, new String[]{}, new Class[] { Map.class }, new Object[] { params });\n }\n if (filterFactory instanceof ResourceLoaderAware) {\n ((ResourceLoaderAware)filterFactory).inform(loader);\n }\n filterFactories.add(filterFactory);\n }\n }\n if (tokenizerFactory == null) {\n throw new SolrException(ErrorCode.SERVER_ERROR,\n \"tokenizer must not be null for synonym analyzer: \" + analyzerName);\n } else if (filterFactories.isEmpty()) {\n throw new SolrException(ErrorCode.SERVER_ERROR,\n \"filter factories must be defined for synonym analyzer: \" + analyzerName);\n }\n\n TokenizerChain analyzer = new TokenizerChain(tokenizerFactory,\n filterFactories.toArray(new TokenFilterFactory[filterFactories.size()]));\n\n synonymAnalyzers.put(analyzerName, analyzer);\n }\n }\n } catch (IOException e) {\n throw new SolrException(ErrorCode.SERVER_ERROR, \"Failed to create parser. Check your config.\", e);\n }\n }", "@GET\n @Produces(value= MediaType.APPLICATION_JSON_VALUE)\n @Path(value = \"/search/{token}\")\n @Timed\n public ResponseEntity<String> searchProduct(@PathVariable final String token) {\n AsyncViewResult viewResult = couchbaseService.findAllBeersAsync().toBlocking().single();\n if (viewResult.success()) {\n return couchbaseService.searchBeer(viewResult.rows(), token)\n //transform the array into a ResponseEntity with correct status\n .map(new Func1<JsonArray, ResponseEntity<String>>() {\n @Override\n public ResponseEntity<String> call(JsonArray objects) {\n return new ResponseEntity<String>(objects.toString(), HttpStatus.OK);\n }\n })\n //in case of errors during this processing, return a ERROR 500 response with detail\n .onErrorReturn(new Func1<Throwable, ResponseEntity<String>>() {\n @Override\n public ResponseEntity<String> call(Throwable throwable) {\n return new ResponseEntity<String>(\"Error while parsing results - \" + throwable,\n HttpStatus.INTERNAL_SERVER_ERROR);\n }\n })\n //block and send back the response\n .toBlocking().single();\n } else {\n return new ResponseEntity<String>(\"Error while searching - \" + viewResult.error(),\n HttpStatus.INTERNAL_SERVER_ERROR);\n }\n }", "private static StringBuilder searchNextPage(String nextToken){\r\n\t\tHttpURLConnection conn = null;\r\n\t\tStringBuilder jsonResults = new StringBuilder();\r\n\t\ttry{\r\n\t\t\tStringBuilder request = new StringBuilder(PLACES_API_SOURCE);\r\n\t\t\trequest.append(typeSearch);\r\n\t\t\trequest.append(JSON_OUT);\r\n\t\t\trequest.append(\"?pagetoken=\");\r\n\t\t\trequest.append(nextToken);\r\n\t\t\trequest.append(\"&key=\");\r\n\t\t\trequest.append(KEY);\r\n\r\n\t\t\tURL url = new URL(request.toString());\r\n\t\t\tconn = (HttpURLConnection) url.openConnection();\r\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream(), \"UTF-8\"));\r\n\t\t\tString line = \"\";\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tjsonResults.append(line);\r\n\t\t\t}\r\n\t\t}catch(MalformedURLException e){\r\n\t\t\tSystem.out.println(\"URL ERROR [search] \");\r\n\t\t}catch(IOException e){\r\n\t\t\tSystem.out.println(\"CONNECTION ERROR [search] \"+ e);\r\n\t\t}finally{\r\n\t\t\tif(conn!=null)\r\n\t\t\t\tconn.disconnect();\r\n\t\t}\r\n\t\treturn jsonResults;\r\n\t}", "public interface NextTokenOptions {\n\n\t/**\n\t * Returns the abstract options.\n\t * \n\t * @return The set of abstract options.\n\t */\n\tpublic Set<? extends AbstractOption> getAbstractOptions();\n\n\t/**\n\t * Returns the concrete options.\n\t * \n\t * @return The set of concrete options.\n\t */\n\tpublic Set<? extends ConcreteOption> getConcreteOptions();\n\t\n\t/**\n\t * Returns true if the specified token is a possible next token.\n\t * \n\t * @param token The token text.\n\t * @return true if it is a possible next token.\n\t */\n\tpublic boolean containsToken(String token);\n\t\n\t/**\n\t * Returns true if the specifed category represents a possible next token.\n\t * \n\t * @param categoryName The name of the category.\n\t * @return true if it represents a possible next token.\n\t */\n\tpublic boolean containsCategory(String categoryName);\n\n}", "private void setNextToken() {\n\t\t\n\t\tif (token != null && token.getType() == TokenType.EOF)\n\t\t\tthrow new QueryLexerException(\"There is no more tokens\");\n\n\t\tskipWhitespaces();\n\t\t\n\t\tif (currentIndex >= data.length) {\n\t\t\ttoken = new Token(TokenType.EOF, null);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Character.isLetter(data[currentIndex])) {\n\t\t\tint beginningOfWord = currentIndex;\n\t\t\tcurrentIndex++;\n\t\t\twhile(currentIndex < data.length && Character.isLetter(data[currentIndex])) {\n\t\t\t\tcurrentIndex++;\n\t\t\t}\n\t\t\tString word = new String(data, beginningOfWord, currentIndex - beginningOfWord);\n\t\t\tToken mappedToken = keywordsTokenMap.get(word.toUpperCase());\n\t\t\tif (mappedToken != null) {\n\t\t\t\ttoken = mappedToken;\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tthrow new QueryLexerException(\"Word that you inputed is not keyword.\\n You entered: \" + word);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif (data[currentIndex] == '\\\"') {\n\t\t\tcurrentIndex++;\n\t\t\tint beginningOfText = currentIndex;\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\tif (currentIndex >= data.length)\n\t\t\t\t\tthrow new QueryLexerException(\"Wrong input. Missing one double quote.\");\n\t\t\t\t\n\t\t\t\tif (data[currentIndex] == '\\\"') \n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcurrentIndex++;\n\t\t\t}\n\t\t\t\n\t\t\tString text = new String(data, beginningOfText, currentIndex - beginningOfText);\n\t\t\ttoken = new Token(TokenType.TEXT, text);\n\t\t\tcurrentIndex++;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (isOperator(data[currentIndex])) {\n\t\t\tsetOperatorToken();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// everything else is invalid\n\t\tthrow new QueryLexerException(\"Invalid input: Last character was: \" + data[currentIndex]);\n\t}", "private Search() {}", "@Override\n\t\tpublic void configure(JobConf job) {\n\t\t\twords = job.get(\"search.word\").split(\"[ \\t]+\");\n\t\t}", "public QueryResultBuilder<T> applySearch(Option<Search> search);", "TSearchQuery prepareSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);", "@SuppressWarnings(\"unchecked\")\n private void initSearch() {\n if (searchBasic != null) {\n return;\n }\n try {\n // get a search class instance\n if (searchRecordTypeDesc.getSearchClass() != null) {\n search = (SearchT) searchRecordTypeDesc.getSearchClass().newInstance();\n }\n\n // get a advanced search class instance and set 'savedSearchId' into it\n searchAdvanced = null;\n if (StringUtils.isNotEmpty(savedSearchId)) {\n if (searchRecordTypeDesc.getSearchAdvancedClass() != null) {\n searchAdvanced = (SearchT) searchRecordTypeDesc.getSearchAdvancedClass().newInstance();\n Beans.setProperty(searchAdvanced, SAVED_SEARCH_ID, savedSearchId);\n } else {\n throw new NetSuiteException(new NetSuiteErrorCode(NetSuiteErrorCode.OPERATION_NOT_SUPPORTED),\n i18n.advancedSearchNotAllowed(recordTypeName));\n }\n }\n\n // basic search class not found or supported\n if (searchRecordTypeDesc.getSearchBasicClass() == null) {\n throw new NetSuiteException(new NetSuiteErrorCode(NetSuiteErrorCode.OPERATION_NOT_SUPPORTED),\n i18n.searchNotAllowed(recordTypeName));\n }\n\n // get a basic search class instance\n searchBasic = (SearchT) searchRecordTypeDesc.getSearchBasicClass().newInstance();\n\n } catch (InstantiationException | IllegalAccessException e) {\n throw new NetSuiteException(new NetSuiteErrorCode(NetSuiteErrorCode.INTERNAL_ERROR), e.getMessage(), e);\n }\n }", "public MagicSearch createMagicSearch();", "Authentication findByToken(String token);", "public MicrosoftLanguageStemmingTokenizer setIsSearchTokenizer(Boolean isSearchTokenizer) {\n this.isSearchTokenizer = isSearchTokenizer;\n return this;\n }", "@GET(\"w/api.php?action=opensearch&format=json&suggest&redirects=resolve\")\n Call<JsonElement> getSuggestionsFromSearch(@Query(\"search\") String search);", "BsonToken getCurrentToken();", "private Token () { }", "@POST\n\t @Produces(\"application/json\")\n\t @Path(\"/validateToken\")\n\t public Response validateToken(@HeaderParam(\"Authorization\") String token){\n\t\t String result=\"\";\n\t\t String Role=\"Visitor\";\n\t\t boolean isValid=false;\n\t\t TokenFactory tokens= listBook.tokens;\n\t\t JSONObject jsonObject= new JSONObject(); \n\t\t System.out.println(token);\n\t\t JSONObject verifyToken =tokens.tokenConsume(token);\n\t\t if(verifyToken.length()>1){\n\t\t\t\t try {\n\t\t\t\t\tif(verifyToken.getInt(\"ID\")>0){\n\t\t\t\t\t\tisValid=true;\n\t\t\t\t\t\tHashMap<String,String> memberData = new HashMap<String,String>();\n\t\t\t\t\t\tmemberData.put(\"ID_Member\", verifyToken.getInt(\"ID\")+\"\");\n\t\t\t\t\t\tmemberData.put(\"Role\", verifyToken.getString(\"Role\")); \n\t\t\t\t\t\tif(retrieveMember(memberData).length()>0){\n\t\t\t\t\t\t\tRole=verifyToken.getString(\"Role\");\n\t\t\t\t\t\t}\n\t\t\t\t\t }\n\t\t\t\t} catch (JSONException 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 }\n\t\t\t \t\t\t \n\t\t\ttry {\n\t\t\t\tjsonObject.put(\"isValid\", isValid);\n\t\t\t\tjsonObject.put(\"Role\", Role);\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tresult=jsonObject+\"\";\n\t\t\treturn listBook.makeCORS(Response.status(200), result);\t\n \t }", "public DefaultRolesFinder(TokenConfiguration tokenConfiguration) {\n this.tokenConfiguration = tokenConfiguration;\n }", "@Override\n\tpublic void setToken(Token token) {\n\t\tthis.token = token;\n\t\t\n\t}", "FetchRequest<Customer> byToken(String token);", "public ConceptToken(String token) {\n _multiToken = false;\n _text = \"\";\n _tokens = new String[]{token};\n }", "public BCActTokenValueExample() {\n oredCriteria = new ArrayList<Criteria>();\n offset = 0;\n limit = Integer.MAX_VALUE;\n }", "public TokenLocationSearchAnalyzer() {\n foundLocations = new LinkedHashMap<String, List<Integer>>();\n currentTokenLocation = -1;\n }", "@RequestMapping(value={\"/search\"}, method={RequestMethod.GET})\n \tpublic ModelAndView handleSearch(@RequestParam(required=false) String q, @RequestParam(required=false,defaultValue=\"1\") Integer page){\n \t\tMap<String,Object> model = new HashMap<String,Object>();\n \t\t\n \t HashMap<String,Object> search = new HashMap<String,Object>();\n \t search.put(\"term\", \"\");\n \t search.put(\"total\",0);\n \n \t List<Map<String,String>> searchResult = new ArrayList<Map<String,String>>();\n \t if(StringUtils.isNotBlank(q)){\n \t \tsearch.put(\"term\", q);\n \t \tLimitedResult<List<NameConceptModelIF>> nameConceptModelList = null;\n \t \tint pageIndex = (page <= 0)?0:(page-1);\n \t \t//use page index +1 to avoid returning a bad page number\n \t\tsearch.put(\"pageNumber\", (pageIndex+1));\n \t\tsearch.put(\"pageSize\", searchService.getPageSize());\n \t\t//check if we want another page than the first one\n \t \tif(pageIndex > 0){\n \t \t\tnameConceptModelList = searchService.searchName(q,pageIndex);\n \t \t}\n \t \telse{\n \t \t\tnameConceptModelList = searchService.searchName(q);\n \t \t}\n \n \t\t search.put(\"total\",nameConceptModelList.getTotal_rows());\n \t\t List<Map<String,String>> searchResults = new ArrayList<Map<String,String>>();\n \t\t Map<String,String> searchRow = null;\n \t\t //TODO use objects directly instead of map\n \t\t for(NameConceptModelIF currNameConceptModel : nameConceptModelList.getRows()){\n \t\t \tif(currNameConceptModel.getClass().equals(NameConceptTaxonModel.class)){\n \t\t \t\tsearchRow = new HashMap<String,String>();\n \t\t \t\tsearchRow.put(\"type\",\"taxon\");\n \t\t \t\tsearchRow.put(\"name\", currNameConceptModel.getName());\n \t\t \t\tsearchRow.put(\"id\", currNameConceptModel.getTaxonId().toString());\n \t\t \t\tsearchRow.put(\"status\", currNameConceptModel.getStatus());\n \t\t \t\tsearchRow.put(\"namehtml\",((NameConceptTaxonModel)currNameConceptModel).getNamehtml());\n \t\t \t\tsearchRow.put(\"namehtmlauthor\",((NameConceptTaxonModel)currNameConceptModel).getNamehtmlauthor());\n \t\t \t\tsearchRow.put(\"rankname\",((NameConceptTaxonModel)currNameConceptModel).getRankname());\n \t\t \t\tsearchRow.put(\"parentid\",((NameConceptTaxonModel)currNameConceptModel).getParentid().toString());\n \t\t \t\tsearchRow.put(\"parentnamehtml\",((NameConceptTaxonModel)currNameConceptModel).getParentnamehtml());\n \t\t \t\tsearchResult.add(searchRow);\n \t\t \t}\n \t\t \telse if(currNameConceptModel.getClass().equals(NameConceptVernacularNameModel.class)){\n \t\t \t\tsearchRow = new HashMap<String, String>();\n \t\t \t\tsearchRow.put(\"type\",\"vernacular\");\n \t\t \t\tsearchRow.put(\"name\", currNameConceptModel.getName());\n \t\t \t\tsearchRow.put(\"id\", Integer.toString(((NameConceptVernacularNameModel)currNameConceptModel).getId()));\n \t\t \t\tsearchRow.put(\"status\", currNameConceptModel.getStatus());\n \t\t \t\tsearchRow.put(\"lang\",((NameConceptVernacularNameModel)currNameConceptModel).getLang());\n \t\t \t\tsearchRow.put(\"taxonid\",currNameConceptModel.getTaxonId().toString());\n \t\t \t\tsearchRow.put(\"taxonnamehtml\",((NameConceptVernacularNameModel)currNameConceptModel).getTaxonnamehtml());\n \t\t \t\tsearchResult.add(searchRow);\n \t\t \t}\n \t\t \telse{\n \t\t \t\t//logger\n \t\t \t\tsearchRow = null;\n \t\t \t}\n \t\t \tsearchResults.add(searchRow);\n \t\t }\n \t\t model.put(\"results\",searchResults);\n \t }\n \t \n \t model.put(\"search\",search);\n \t return new ModelAndView(\"search\", model);\n \t}", "@Override\n public void ParseRequestBean() {\n\n }", "List<DataTerm> search(String searchTerm);", "@Bean\n\tpublic JobDetailFactoryBean searchCandidatesJob(){\n\t\tJobDetailFactoryBean factory = new JobDetailFactoryBean();\n\t\tfactory.setJobClass(SearchCandidatesJob.class);\n\t\tMap<String,Object> map = new HashMap<String,Object>();\n\t\tmap.put(\"searchCandidatesService\", appContext.getBean(\"searchCandidatesService\") );\n\t\tmap.put(\"adminServiceSC\", appContext.getBean(\"adminService\") );\n\t\tfactory.setJobDataAsMap(map);\n\t\tfactory.setName(\"searchCandidatesJob\");\n\t\tfactory.setDurability(true);\n\t\treturn factory;\n\t}", "SearchResult findNext(SearchOptions searchOptions);", "public void processToken(String token) {\n \n // Create an int with an id of currentTokenLength and set it equal to the token.length()\n int currentTokenLength = token.length();\n processTokenHelper(currentTokenLength);\n\n /**\n * Create an int with an id of tokenLengthReps and set it equal to \n * tokenSizes.get(currentTokenLength);\n */\n int tokenLengthReps = tokenSizes.get(currentTokenLength);\n\n /**\n * Create an if statement that will determine if the tokenLength is \n * larger than the maximumSize int variable\n */\n if (tokenLengthReps > maximumSize) {\n maximumSize = tokenSizes.get(currentTokenLength);\n }\n }", "@Override\r\n public void annotate(Annotation annotation) {\r\n// System.out.println(\"Tokens\");\r\n// for(CoreLabel token : annotation.get(CoreAnnotations.TokensAnnotation.class)){\r\n for(int i=0;i<annotation.get(CoreAnnotations.TokensAnnotation.class).size();i++){\r\n CoreLabel token = annotation.get(CoreAnnotations.TokensAnnotation.class).get(i);\r\n// System.out.println(token.word() +\", tokenIndex = \"+i);\r\n if(token.word().equals(sch)) {\r\n// positions.add(token.index());\r\n token.set(SearchAnnotation.class,i); //index of the token is saved\r\n\r\n }\r\n }\r\n }", "public ProductSearchCriteriaBean() {\n }", "public void processToken(String token) {\n currentTokenLocation++;\n if (foundLocations.containsKey(token)) {\n List<Integer> list = foundLocations.get(token);\n list.add(currentTokenLocation);\n } \n }", "public Token() {\n }", "protected void init(String command){\n\t\tStringTokenizer st = new StringTokenizer(command);\n\t\t\n\t\tthis.numberOfTokens = st.countTokens() ;\n\t\tthis.tokens = new String[this.numberOfTokens];\n\t\t\n\t\tString currentToken;\n\t\tint tokenNumber = 0;\n\t\t\n\t\t/*inizialize the entire array or cannot concatenate strings\n\t\tin the while belowe: looks like null!Command nullArgument1 ...*/\n\t\t//for(int i = 0; i < this.numberOfTokens; i++) this.tokens[i] = \"\";\n\t\t\n\t\twhile (st.hasMoreTokens()) {\n\t\t\tcurrentToken = st.nextToken();\n\t\t\t//System.out.println(\"token\"+tokenNumber+\": \"+currentToken);\n\t\t\t\n\t\t\tthis.tokens[tokenNumber] = currentToken;\n\t\t\tif(tokenNumber>1)\n\t\t\t\tmiscParam += \" \"+currentToken;\n\t\t\tif(tokenNumber>0 && !currentToken.startsWith(\"$\")) \n\t\t\t\tallParam += \" \"+currentToken;\n\t\t\t\n\t\t\ttokenNumber++;\n\t\t}\n\t\t/*this is just for remove the first <space> from the second param of the command*/\n\t\t//if(this.hasAllParam()) this.tokens[2] = this.tokens[2].substring(1);\n\t}", "public void setToken(String token) {\r\n hc.setToken(token);\r\n }", "public void setToken(String token) {\r\n this.token = token == null ? null : token.trim();\r\n }", "public ForumSearchDTO getSearchDTO() {\n return searchDTO;\n }", "public void setToken(String token) {\n this.token = token == null ? null : token.trim();\n }", "List<OwnerOperatorDTO> search(String query);", "public Builder setToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n token_ = value;\n onChanged();\n return this;\n }", "public Token() {\n }", "public void setToken(String token) {\n\t\tthis.token = token == null ? null : token.trim();\n\t}", "public ChequesSearchBean() {\n }", "public Builder setToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n token_ = value;\n onChanged();\n return this;\n }", "public Builder setToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n token_ = value;\n onChanged();\n return this;\n }", "public Builder setToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n token_ = value;\n onChanged();\n return this;\n }", "public Builder setToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n token_ = value;\n onChanged();\n return this;\n }", "public Builder setToken(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n token_ = value;\n onChanged();\n return this;\n }", "public Builder setToken(\n String value) {\n copyOnWrite();\n instance.setToken(value);\n return this;\n }", "public Builder setToken(\n String value) {\n copyOnWrite();\n instance.setToken(value);\n return this;\n }", "public Builder setToken(\n String value) {\n copyOnWrite();\n instance.setToken(value);\n return this;\n }", "@Override\n public Optional<ApiSession> findApiSessionToken(String token) {\n // log.debug(\"findApiSessionToken({})\", token);\n if (null == this.hashOperations) {\n log.warn(\"hash is null\");\n return Optional.empty();\n }\n if (null == token) {\n log.warn(\"token is null\");\n return Optional.empty();\n }\n try {\n return Optional.ofNullable((ApiSession) hashOperations.get(HASH_KEY, token));\n } catch (Exception e) {\n log.warn(\"token is null \", e);\n return Optional.empty();\n }\n }", "public abstract Search create(String search, SearchBuilder builder);", "public String getTokenValue() { return tok; }", "public void buildSearcher() throws IOException {\n IndexReader rdr = DirectoryReader.open(FSDirectory.open(new File(indexDir).toPath()));\n searcher = new IndexSearcher(rdr);\n parser = new QueryParser(\"text\", new StandardAnalyzer());\n }", "private void updateToken() throws IOException\n\t{\n\t\ttheCurrentToken = theNextToken;\n\t\ttheNextToken = theScanner.GetToken();\n\t}", "public TokensParser(Token<?>... tokens) {\n this.tokens = tokens;\n\n setParserName(\"tokens\");\n }", "public FindCommand(String searchTerms) {\n super(false);\n this.searchTerms = searchTerms;\n }", "@In String search();", "public Builder setSearch(\n com.clarifai.grpc.api.Search.Builder builderForValue) {\n if (searchBuilder_ == null) {\n inputSource_ = builderForValue.build();\n onChanged();\n } else {\n searchBuilder_.setMessage(builderForValue.build());\n }\n inputSourceCase_ = 10;\n return this;\n }", "public Iterable<JMDictEntry> getEntriesFromPron(Iterable<ForwardingToken> tokensToSearch, Mode mode, POS pos) {\n Set<String> readingsToQuery = new HashSet<>();\n List<String> acceptablePOS;\n final String restrictPOSClause;\n final String properNounsClause;\n boolean ignoreProperNouns = true;\n\n switch (mode) { // Note: most likely could search by baseForm for all of these. Not sure there's ever any difference in these cases.\n case READINGS_IN_HIRAGANA:\n tokensToSearch.forEach(forwardingToken -> {\n if (forwardingToken.isVerb()) readingsToQuery.add(forwardingToken.getBaseForm()); // search for verbsAndAux by their baseform eg. する\n else readingsToQuery.add(Utils.convertKana(forwardingToken.getReading())); // search for native words in hiragana eg. として\n });\n break;\n case READINGS_IN_KATAKANA:\n tokensToSearch.forEach(forwardingToken ->\n readingsToQuery.add(forwardingToken.getReading()) // search for possible loan words in their native katakana. eg. キャンパス\n );\n break;\n default:\n throw new NotImplementedException();\n }\n\n\n switch(pos){\n case particles:\n case conjunctions:\n// acceptablePOS = particles;\n restrictPOSClause = \"AND s.particles = 1 \";\n break;\n case adverbs:\n// acceptablePOS = adverbs;\n restrictPOSClause = \"AND s.adverbs = 1 \";\n break;\n case adjectives:\n// acceptablePOS = adjectives;\n restrictPOSClause = \"AND s.adjectives = 1 \";\n break;\n case adnominals:\n// acceptablePOS = adnominals;\n restrictPOSClause = \"AND s.adnominals = 1 \";\n break;\n case prefixes:\n// acceptablePOS = adfixes;\n restrictPOSClause = \"AND s.adfixes = 1 \";\n break;\n case nouns:\n// acceptablePOS = nouns;\n restrictPOSClause = \"AND s.nouns = 1 \";\n break;\n case properNouns:\n// acceptablePOS = properNouns;\n restrictPOSClause = \"AND s.propernouns = 1 \";\n ignoreProperNouns = false;\n break;\n case verbsAndAux:\n// acceptablePOS = verbsAndAux;\n restrictPOSClause = \"AND s.verbsandaux = 1 \";\n break;\n // Take all you can find\n case exclamations:\n case symbols:\n case fillers:\n case others:\n case unclassified:\n restrictPOSClause = \"\";\n// acceptablePOS = all;\n break;\n default:\n throw new IllegalStateException();\n }\n\n\n if(ignoreProperNouns) properNounsClause = \"WHERE a.id < \" + START_OF_PROPER_NOUNS_ID + \" \";\n else properNounsClause = \"WHERE a.id > \" + (START_OF_PROPER_NOUNS_ID - 1) + \" \";\n// restrictPOSClause = \"AND t.senseDataKey.data IN :acceptablePOS \";\n\n if(readingsToQuery.isEmpty()) return new ArrayList<>(); // bail out if nothing to search database with.\n\n List<List<String>> partitionedReadingsToQuery = Lists.partition(\n// readingsToQuery.stream().collect(Collectors.toList()), MAX_HOST_PARAMETERS - acceptablePOS.size()\n readingsToQuery.stream().collect(Collectors.toList()), MAX_HOST_PARAMETERS\n );\n\n List<JMDictEntry> resultList = new ArrayList<>();\n partitionedReadingsToQuery.parallelStream().forEach(partition -> {\n TypedQuery<JMDictEntry> query = em.createQuery(\n \"SELECT a \" + // JOIN FETCH is certainly faster (2s).\n \"FROM JMDictEntry a \" +\n \"JOIN FETCH JMDictPron p \" +\n \" ON a.id = p.idDataKey.id \" +\n \"JOIN FETCH JMDictSense s \" +\n \" ON s.id = a.id \"\n// + \"JOIN JMDictType t \" +\n// \"ON t.senseDataKey.sense = s.data \"\n + properNounsClause\n + \" AND p.idDataKey.data IN :readingsToQuery \"\n + restrictPOSClause\n + \" GROUP BY p.idDataKey.id\"\n ,\n JMDictEntry.class\n );\n query.setParameter(\"readingsToQuery\", partition);\n// query.setParameter(\"acceptablePOS\", acceptablePOS);\n resultList.addAll(query.getResultList());\n });\n\n return resultList;\n }", "public void setToken(Parcelable token) {\n\n this.mToken = token;\n\n }", "public Tokenizer(TokenHandler tokenHandler) {\n this.tokenHandler = tokenHandler;\n }", "public Set<SearchedItem> getAllItems(StaplerRequest req, String tokenList){\n List<Ancestor> ancestors = req.getAncestors(); \n Set<SearchedItem> searchedItems = new TreeSet<SearchedItem>();\n if(tokenList==null){\n return searchedItems;\n }\n for (int i = 0; i < ancestors.size(); i++) {\n Ancestor a = ancestors.get(i);\n if (a.getObject() instanceof SearchableModelObject) {\n SearchIndex index = ((SearchableModelObject) a.getObject()).getSearchIndex();\n //unfortunatelly the token list is protected\n String tokens[] = tokenList.split(\"(?<=\\\\s)(?=\\\\S)\");\n List<SearchItem> items = new ArrayList<SearchItem>();\n for (String token : tokens) {\n index.suggest(token, items); \n searchedItems.addAll(createSearchItems(items, a));\n }\n }\n }\n return searchedItems;\n }", "public Search createSearch(String searchText)\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder(searchText);\n\t\t\ttrim(sb);\n\t\t\tSearch current = null;\n\t\t\twhile(sb.length() > 0)\n\t\t\t{\n\t\t\t\tboolean not = false;\n\t\t\t\tif(sb.length() > 1 && lower(sb.charAt(0)) == 'o' && lower(sb.charAt(1)) == 'r')\n\t\t\t\t{ // OR operator\n\t\t\t\t\tsb.delete(0, 2);\n\t\t\t\t\tExpressionSearch exp = exp(false);\n\t\t\t\t\texp.add(current);\n\t\t\t\t\tcurrent = exp;\n\t\t\t\t\ttrim(sb);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\telse if(sb.length() > 2 && lower(sb.charAt(0)) == 'a' && lower(sb.charAt(1)) == 'n'\n\t\t\t\t\t&& lower(sb.charAt(2)) == 'd')\n\t\t\t\t{\n\t\t\t\t\tsb.delete(0, 3);\n\t\t\t\t\ttrim(sb);\n\t\t\t\t}\n\t\t\t\telse if(sb.length() > 1 && sb.charAt(0) == '!')\n\t\t\t\t{\n\t\t\t\t\tsb.delete(0, 1);\n\t\t\t\t\ttrim(sb);\n\t\t\t\t\tnot = true;\n\t\t\t\t}\n\n\t\t\t\tSearch next;\n\t\t\t\tif(sb.charAt(0) == '(')\n\t\t\t\t{\n\t\t\t\t\tint c = goPastParen(sb, 0);\n\t\t\t\t\tString nextExpr = sb.substring(1, c).trim();\n\t\t\t\t\tif(nextExpr.length() == 0)\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Empty parenthetical expression\");\n\t\t\t\t\tnext = createSearch(nextExpr);\n\t\t\t\t\tsb.delete(0, c + 1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tnext = parseNext(sb);\n\t\t\t\tif(not)\n\t\t\t\t{\n\t\t\t\t\tNotSearch notS = not();\n\t\t\t\t\tnotS.setOperand(next);\n\t\t\t\t\tnext = notS;\n\t\t\t\t}\n\n\t\t\t\tif(current instanceof ExpressionSearch\n\t\t\t\t\t&& ((ExpressionSearch) current).getOperandCount() == 1)\n\t\t\t\t\t((ExpressionSearch) current).add(next);\n\t\t\t\telse if(current != null)\n\t\t\t\t{\n\t\t\t\t\tExpressionSearch exp = exp(true);\n\t\t\t\t\texp.addOps(current, next);\n\t\t\t\t\tcurrent = exp;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tcurrent = next;\n\n\t\t\t\ttrim(sb);\n\t\t\t}\n\t\t\tif(current instanceof ExpressionSearch)\n\t\t\t\t((ExpressionSearch) current).simplify();\n\t\t\treturn current;\n\t\t}", "public void setSearchBackingBean(Search_Backing searchBackingBean)\r\n\t{\r\n\t\tthis.searchBackingBean = searchBackingBean;\r\n\t}", "private static String[] parseStartWordDelimiter(final String token) {\r\n String[] tokenArray = null;\r\n if (token != null && token.length() > 0) {\r\n final Iterator iterator = TagOptionSingleton.getInstance().getStartWordDelimiterIterator();\r\n int index;\r\n String delimiter;\r\n while (iterator.hasNext()) {\r\n delimiter = (String) iterator.next();\r\n if (token.startsWith(delimiter)) {\r\n index = token.indexOf(delimiter, delimiter.length());\r\n } else {\r\n index = token.indexOf(delimiter);\r\n }\r\n if (index > 0) {\r\n tokenArray = new String[3];\r\n tokenArray[0] = delimiter;\r\n tokenArray[1] = token.substring(0, index);\r\n tokenArray[2] = token.substring(index);\r\n }\r\n }\r\n }\r\n return tokenArray;\r\n }", "TSearchQuery createSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);", "public SearchSettings() { }", "@java.lang.Override\n public com.clarifai.grpc.api.SearchOrBuilder getSearchOrBuilder() {\n if (inputSourceCase_ == 10) {\n return (com.clarifai.grpc.api.Search) inputSource_;\n }\n return com.clarifai.grpc.api.Search.getDefaultInstance();\n }", "public static AccSearch parse(\r\n javax.xml.stream.XMLStreamReader reader)\r\n throws java.lang.Exception {\r\n AccSearch object = new AccSearch();\r\n\r\n int event;\r\n javax.xml.namespace.QName currentQName = null;\r\n java.lang.String nillableValue = null;\r\n java.lang.String prefix = \"\";\r\n java.lang.String namespaceuri = \"\";\r\n\r\n try {\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n currentQName = reader.getName();\r\n\r\n if (reader.getAttributeValue(\r\n \"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\") != null) {\r\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\r\n \"type\");\r\n\r\n if (fullTypeName != null) {\r\n java.lang.String nsPrefix = null;\r\n\r\n if (fullTypeName.indexOf(\":\") > -1) {\r\n nsPrefix = fullTypeName.substring(0,\r\n fullTypeName.indexOf(\":\"));\r\n }\r\n\r\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\r\n\r\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\r\n \":\") + 1);\r\n\r\n if (!\"AccSearch\".equals(type)) {\r\n //find namespace for the prefix\r\n java.lang.String nsUri = reader.getNamespaceContext()\r\n .getNamespaceURI(nsPrefix);\r\n\r\n return (AccSearch) ExtensionMapper.getTypeObject(nsUri,\r\n type, reader);\r\n }\r\n }\r\n }\r\n\r\n // Note all attributes that were handled. Used to differ normal attributes\r\n // from anyAttributes.\r\n java.util.Vector handledAttributes = new java.util.Vector();\r\n\r\n reader.next();\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if ((reader.isStartElement() &&\r\n new javax.xml.namespace.QName(\r\n \"http://tempuri.org/\", \"request\").equals(\r\n reader.getName())) ||\r\n new javax.xml.namespace.QName(\"\", \"request\").equals(\r\n reader.getName())) {\r\n object.setRequest(Request.Factory.parse(reader));\r\n\r\n reader.next();\r\n } // End of if for expected property start element\r\n\r\n else {\r\n }\r\n\r\n while (!reader.isStartElement() && !reader.isEndElement())\r\n reader.next();\r\n\r\n if (reader.isStartElement()) {\r\n // 2 - A start element we are not expecting indicates a trailing invalid property\r\n throw new org.apache.axis2.databinding.ADBException(\r\n \"Unexpected subelement \" + reader.getName());\r\n }\r\n } catch (javax.xml.stream.XMLStreamException e) {\r\n throw new java.lang.Exception(e);\r\n }\r\n\r\n return object;\r\n }", "public SpreedlyPaymentMethod token(String token) {\r\n\t\tparent.requestData.put(\"transaction[payment_method_token]\", token);\r\n\t\treturn this;\r\n\t}", "public abstract S getSearch();", "@ZAttr(id=600)\n public void setGalTokenizeSearchKey(ZAttrProvisioning.GalTokenizeSearchKey zimbraGalTokenizeSearchKey) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalTokenizeSearchKey, zimbraGalTokenizeSearchKey.toString());\n getProvisioning().modifyAttrs(this, attrs);\n }", "@Test\n public void parseToken() {\n }", "public static void placeFinderOptions(String keyword) {\n PlaceFinderFactory factory = new PlaceFinderFactory();\n IPlaceFinder finder = factory.getFinder(keyword);\n if(finder == null) {\n logger.log(Level.SEVERE, \"finder not found\");\n return;\n }\n\n MessageOut.printPlaceFinderOptions();\n while(scanner.hasNextLine()) {\n String input = scanner.nextLine().strip();\n if (ValidInput.FINDALL.getInput().equals(input)) {\n MessageOut.printResults(finder.find());\n } else if (ValidInput.FINDOPENNOW.getInput().equals(input)) {\n List<? extends Place> results = finder.findOpenNow();\n if (!results.isEmpty()) {\n MessageOut.printResults(results);\n } else {\n MessageOut.printNoResults();\n }\n // paginated request\n } else if (ValidInput.FINDOPENNOWPAGINATED.getInput().equals(input)) {\n handlePaginated(finder, 10);\n } else if (ValidInput.END.getInput().equals(input)) {\n break;\n } else {\n MessageOut.notValidInput();\n }\n MessageOut.printPlaceFinderOptions();\n }\n }", "OAuth2Token getToken();", "ReagentSearch getReagentSearch();", "List<ResultDTO> search(String query);", "public interface Resolver {\n\n String resolveToken(String token);\n }", "public SearchResponse prepareSearchScrollRequest() {\n GetSettingsResponse getSettingsResponse = client.admin().indices().getSettings(new GetSettingsRequest().indices(dataPointer.getIndexName())).actionGet();\n int numShards = 0, numIndices = 0;\n for(ObjectCursor<Settings> settings : getSettingsResponse.getIndexToSettings().values()) {\n numShards += settings.value.getAsInt(\"index.number_of_shards\", 0);\n numIndices++;\n }\n\n int sizePerShard = (int)Math.ceil((double)SCROLL_SHARD_LIMIT/numShards);\n logger.info(\"Found \" + numIndices + \" indices and \" + numShards + \" shards matching the index-pattern, thus setting the sizePerShard to \" + sizePerShard);\n\n SearchRequestBuilder searchRequestBuilder = client.prepareSearch(dataPointer.getIndexName())\n .setTypes(dataPointer.getTypeName())\n .setSearchType(SearchType.SCAN)\n .addFields(\"_ttl\", \"_source\")\n .setScroll(new TimeValue(SCROLL_TIME_LIMIT))\n .setSize(sizePerShard);\n\n if (!Strings.isNullOrEmpty(query.getQuery())) {\n searchRequestBuilder.setQuery(query.getQuery());\n }\n if (!Strings.isNullOrEmpty(query.getSortField())) {\n searchRequestBuilder.addSort(new FieldSortBuilder(query.getSortField()).order(query.getSortOrder()));\n }\n\n bound.map(resolvedBound -> boundedFilterFactory.createBoundedFilter(segmentationField.get(), resolvedBound))\n .ifPresent(searchRequestBuilder::setQuery);\n\n return searchRequestBuilder.execute().actionGet();\n }", "public Boolean isSearchTokenizer() {\n return this.isSearchTokenizer;\n }" ]
[ "0.5251489", "0.517271", "0.51408577", "0.5096305", "0.49640018", "0.49428156", "0.4898078", "0.48931977", "0.48737493", "0.48671037", "0.4844318", "0.48087502", "0.4787248", "0.47210693", "0.469928", "0.46819618", "0.46611795", "0.4659799", "0.46497586", "0.46444562", "0.46270376", "0.46259317", "0.46214136", "0.4608802", "0.45959228", "0.4587954", "0.45809287", "0.45755854", "0.4556222", "0.45549014", "0.45310375", "0.44762227", "0.44734204", "0.44421944", "0.44386905", "0.44304514", "0.44242916", "0.4424049", "0.44163185", "0.4412591", "0.4385321", "0.43730038", "0.43588457", "0.43545562", "0.4343404", "0.4341636", "0.43350294", "0.43212962", "0.43178123", "0.43168744", "0.43141538", "0.43135402", "0.4311127", "0.43100986", "0.42953905", "0.42904317", "0.42601612", "0.42546862", "0.4253337", "0.42500344", "0.42476717", "0.42440253", "0.42440253", "0.42440253", "0.42440253", "0.42440253", "0.42388773", "0.42388773", "0.42388773", "0.42368415", "0.4231347", "0.4220904", "0.42184433", "0.42140177", "0.42075962", "0.420486", "0.42001656", "0.41937822", "0.4190919", "0.41786337", "0.41778967", "0.417519", "0.4172494", "0.4170027", "0.4167512", "0.4165023", "0.41645104", "0.416404", "0.4158956", "0.41496333", "0.4149603", "0.41450384", "0.41424525", "0.41423467", "0.41362387", "0.41338953", "0.41317794", "0.41281024", "0.41232395", "0.41188022" ]
0.66202915
0
Extracts a snip ID from the token
public static String extractCurrentSnipId(String token) { String[] tokenSplit = token.split(":"); if (tokenSplit.length > 1) return tokenSplit[1]; return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getID() {\n return tokenString_ID != null ? tokenString_ID : \"\";\n }", "public String getId() {\n\t\treturn this.token.get(\"id\").toString();\n\t}", "java.lang.String getRecognitionId();", "String getTokenConversionIdentifier(String prependE);", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "String getTokenString();", "public String getToken(String line){ \n String[] tokensArr = splitTokens(line, \" &,+.'`\");\n ArrayList<String> tokens = new ArrayList<String>(Arrays.asList(tokensArr));\n \n // filter tokens\n tokens = filterTokens(tokens);\n String token = tokens.get(r.nextInt(tokens.size()));\n return token;\n }", "@Test\r\n\tpublic void testTokenizeIdentifiers() {\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\"))\r\n\t\t\t\t.sendKeys(\"the_best_cat = \\\"Noogie Cat\\\"\\nputs \\\"The best cat is: \\\" + the_best_cat\");\r\n\r\n\t\t// Look for the \"Tokenize\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(0).click();\r\n\r\n\t\t// Check that there is corresponding quantity of the word \":on_ident\"\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tString res = code.getText();\r\n\t\t\tint count = 0;\r\n\t\t\tfor (int i = 0; i <= res.length() - 9; i++) {\r\n\t\t\t\tString sub = res.substring(i, i + 9);\r\n\t\t\t\tif (sub.equals(\":on_ident\"))\r\n\t\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tassertEquals(count, 3);\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public String getIdToken() throws IOException {\n return (String)userInfo.get(\"id_token\");\n }", "private String findTID(String s) {\n\t\tint firstP = s.indexOf(\"(\");\n\t\tint lastP = s.indexOf(\")\");\n\n\t\treturn s.substring(firstP + 1, lastP);\n\t}", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "private void AnalyzeIdentNum(String s, int lineNum){\n if (s.matches(\"[a-z](([a-z]|[0-9])*)\")){\n arrL.add(new Token(s, 61, lineNum));\n }\n //check s is number or not\n else if (s.matches(\"[1-9]([0-9]*)\")||s.matches(\"0\")){\n arrL.add(new Token(s, 60, lineNum));\n }\n // check s is a\n // none of above, then s is an errorToken\n else{\n arrL.add(new Token(s, 0, lineNum));\n Error(\"Error: Invalid input \\\"\" + s + \"\\\" on line \" + lineNum);\n }\n }", "public Long getUserIdFromToken(String token) {\n\t\t//Extract claims\n\t\tClaims claims= Jwts.parser().setSigningKey(SecurityConstants.SECRET).parseClaimsJws(token).getBody();\n\t\t//return ID\n\t\treturn Long.parseLong((String)claims.get(\"id\"));\t\t\n\t}", "String getLongToken();", "String getLongToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "String getShortToken();", "protected String getIDToken(EObject semanticObject, RuleCall ruleCall, INode node) {\r\n\t\tif (node != null)\r\n\t\t\treturn getTokenText(node);\r\n\t\treturn \"\";\r\n\t}", "java.lang.String getIdentifier();", "public String getFeatureID(long offset) throws IOException {\n\t\tdataBase.seek(offset);\n\t\tString[] array = dataBase.readLine().split(\"\\\\|\");\n\t\treturn array[0];\n\t}", "private @Nullable IdentifierToken eatId() {\n if (peekId()) {\n return eatIdOrKeywordAsId();\n } else {\n reportExpectedError(peekToken(), TokenType.IDENTIFIER);\n if (peekIdOrKeyword()) {\n return eatIdOrKeywordAsId();\n } else {\n return null;\n }\n }\n }", "@Override\r\n public int getTokenId()\r\n {\r\n return this.tokenId;\r\n }", "public String identifier(){\n\n if (currentTokenType == TYPE.IDENTIFIER){\n\n return currentToken;\n\n }else {\n throw new IllegalStateException(\"Current token is not an identifier! current type:\" + currentTokenType);\n }\n }", "private void nextKwId() {\n\t\tint old=pos;\n\t\tmany(letters);\n\t\tmany(legits);\n\t\tString lexeme=program.substring(old,pos);\n\t\ttoken=new Token((keywords.contains(lexeme) ? lexeme : \"id\"),lexeme);\n }", "Token fixID( Token token) throws TokenStreamException\r\n {\r\n String text = token.getText();\r\n if ( text.endsWith( \"`\")) {\r\n \ttoken.setType( MExprANTLRParserTokenTypes.ERROR);\r\n \treturn token;\r\n }\r\n \r\n //This ID has already been used in one pattern\r\n if ( ((MExprToken)token).fixedID) {\r\n return token;\r\n }\r\n Token next = getNextToken();\r\n int type = next.getType();\r\n int newType = 0;\r\n switch ( type) {\r\n case MExprANTLRParserTokenTypes.BLANKDOT:\r\n newType = MExprANTLRParserTokenTypes.IDBLANKDOT;\r\n \tbreak;\r\n \r\n case MExprANTLRParserTokenTypes.BLANK1:\r\n newType = MExprANTLRParserTokenTypes.IDBLANK1;\r\n \tbreak;\r\n \r\n case MExprANTLRParserTokenTypes.BLANK2:\r\n newType = MExprANTLRParserTokenTypes.IDBLANK2;\r\n \tbreak;\r\n \r\n case MExprANTLRParserTokenTypes.BLANK3:\r\n newType = MExprANTLRParserTokenTypes.IDBLANK3;\r\n \tbreak;\r\n \r\n default:\r\n pushToken( next);\r\n \treturn token;\r\n }\r\n \r\n next.setType( newType);\r\n \r\n if ( type == MExprANTLRParserTokenTypes.BLANKDOT) {\r\n pushToken( next);\r\n return token;\r\n }\r\n \r\n Token next1 = getNextToken();\r\n if ( next1.getType() != MExprANTLRParserTokenTypes.ID) {\r\n pushToken( next1);\r\n pushToken( next);\r\n return token;\r\n }\r\n \r\n //So this ID does not form another \r\n ((MExprToken)next1).fixedID = true;\r\n switch ( type) {\r\n case MExprANTLRParserTokenTypes.BLANK1:\r\n newType = MExprANTLRParserTokenTypes.IDBLANKID1;\r\n \tbreak;\r\n \r\n case MExprANTLRParserTokenTypes.BLANK2:\r\n newType = MExprANTLRParserTokenTypes.IDBLANKID2;\r\n \tbreak;\r\n \r\n case MExprANTLRParserTokenTypes.BLANK3:\r\n newType = MExprANTLRParserTokenTypes.IDBLANKID3;\r\n \tbreak;\r\n }\r\n \r\n next.setType( newType);\r\n pushToken( next1);\r\n pushToken( next);\r\n \r\n return token;\r\n }", "private static String extractVolumeIDFromFilePath(String path) {\n\t\tString prefix = \"loc\";\r\n\r\n\t\tString filename = \"ark+=13960=t9765kx0j.mets.xml\";\r\n\r\n\t\t// the full filename sans the extension is the cleaned headless ID\r\n\t\tString cleanedHeadlessID = filename.substring(0, filename.length()\r\n\t\t\t\t- \".mets.xml\".length());\r\n\r\n\t\t// must unclean this token using Pairtree\r\n\t\tPairtree pairtree = new Pairtree();\r\n\t\tString uncleanedHeadlessID = pairtree.uncleanId(cleanedHeadlessID);\r\n\r\n\t\tString str = prefix + \".\" + uncleanedHeadlessID;\r\n\r\n\t\treturn prefix + \".\" + uncleanedHeadlessID;\r\n\r\n\t}", "public java.lang.String getTokenId() {\n java.lang.Object ref = tokenId_;\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 tokenId_ = s;\n return s;\n }\n }", "public String nextIdentifier()\n {\n int end = scanForIdentifier();\n if (end == position)\n return null;\n String result = input.substring(position, end);\n position = end;\n return result;\n }", "public String getIdentifierString();", "long extractI2b2QueryId(byte[] bytes);", "public String getIdentifier() {\n/* 222 */ return getValue(\"identifier\");\n/* */ }", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}", "protected abstract int getErrorTokenId();", "@SuppressWarnings(\"unchecked\")\n public T decodeIdentifier() throws IOException {\n Class<? extends TokenIdentifier> cls = getClassForIdentifier(getKind());\n if (cls == null) {\n return null;\n }\n TokenIdentifier tokenIdentifier = ReflectionUtils.newInstance(cls, null);\n ByteArrayInputStream buf = new ByteArrayInputStream(identifier);\n DataInputStream in = new DataInputStream(buf);\n tokenIdentifier.readFields(in);\n in.close();\n return (T) tokenIdentifier;\n }", "java.lang.String getRecognizerId();", "String getSlingId();", "String getParseObjectId();", "public void setID(String value) {\n tokenString_ID = value;\n }", "private void parseId(Node node) {\r\n if (switchTest) return;\r\n skipTrace = true;\r\n parse(node.ref());\r\n }", "protected String firstToken(String unparsedLine) {\r\n\t\tStringTokenizer t = new StringTokenizer(unparsedLine, \" ,\\011\\042\");\r\n\t\tString returnValue = null;\r\n\t\ttry {\r\n\t\t\treturnValue = t.nextToken();\r\n\t\t} catch (NoSuchElementException e) {\r\n\t\t\tSystem.out.println(\"ERROR in IrregularXsectsInpAsciiInput\");\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}", "public java.lang.String getTokenId() {\n java.lang.Object ref = tokenId_;\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 tokenId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "private static Long readAnnotationId(String url) {\r\n\t\treturn Long.parseLong(url.replace(Config.getInstance().getAnnotationBaseUrl(), \"\"));\r\n\t}", "public static String getIdentifierBefore(BaseDocument doc, int offset)\n throws BadLocationException {\n int wordStart = getWordStart(doc, offset);\n if (wordStart != -1) {\n String word = new String(doc.getChars(wordStart,\n offset - wordStart), 0, offset - wordStart);\n if (doc.getSyntaxSupport().isIdentifier(word)) {\n return word;\n }\n }\n return null;\n }", "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}", "private @Nullable IdentifierToken eatIdOrKeywordAsId() {\n Token token = nextToken();\n if (token.type == TokenType.IDENTIFIER) {\n return (IdentifierToken) token;\n } else if (Keywords.isKeyword(token.type)) {\n return new IdentifierToken(token.location, Keywords.get(token.type).toString());\n } else {\n reportExpectedError(token, TokenType.IDENTIFIER);\n }\n return null;\n }", "com.microsoft.schemas.office.x2006.digsig.STUniqueIdentifierWithBraces xgetSignatureProviderId();", "public String getToken();", "public String getIdString(CharSequence line) {\n\t\tList<String> values = parseCsvLine(line);\n\t\treturn values.get(id);\n\t}", "public String getTokenId() {\n return tokenId;\n }", "String getBShortToken();", "private String findXID(String s) {\n\t\tint firstP = s.indexOf(\"(\");\n\t\tint lastP = s.indexOf(\")\");\n\n\t\treturn s.substring(firstP + 1, lastP);\n\t}", "int getNidFromSNOMED(String sctid);", "private String loadToken(String sid, String timestamp) {\n\n return \"abcdef\";\n }", "@Nullable\n public String getIdToken() {\n return idToken;\n }", "java.lang.String getTid();", "java.lang.String getTid();", "String getPrimaryToken();", "private String extract_transcript_id_fasta(String str) {\n String value = \"\";\n\n Matcher transcriptMatcher;\n if (PepGenomeTool.useExonCoords) {\n transcriptMatcher = excoTRANSCRIPTPATTERN.matcher(str);\n } else {\n transcriptMatcher = originalTRANSCRIPTPATTERN.matcher(str);\n\n // From original method\n String[] split = str.split(\"\\\\|\");\n if(split.length==8) {\n String[] dotsplit = split[1].split(\"\\\\.\");\n value = dotsplit[0];\n }\n }\n\n if (transcriptMatcher.find()) {\n value = transcriptMatcher.group(1);\n //System.out.println(\"Transcript extracted correctly\"+value);\n } else {\n //System.out.println(\"Transcript not extracted correctly: \"+value);\n }\n return value;\n }", "private String readToken( PushbackInputStream stream ) throws IOException {\n buffer = new StringBuffer();\n for ( boolean done = false; ! done; ) {\n int c = stream.read();\n switch ( (char) c ) {\n case '\\n':\n case '\\r':\n stream.unread( c );\n done = true;\n break;\n case ' ':\n case '\\t':\n case END:\n done = true;\n break;\n default:\n buffer.append( (char) c );\n }\n }\n return buffer.toString();\n }", "int getSourceSnId();", "public String getIdentificationPrefix();", "private String computeHeaderIdForNumber(String header) {\n\t\tString id = header;\n\t\tif (isKramdownFix()) {\n\t\t\tid = id .replaceAll(\"\\\\.\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t}\n\t\tid = id.replaceAll(\"[^a-zA-Z0-9]+\", \"-\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tid = id.toLowerCase();\n\t\tid = id.replaceFirst(\"^[^a-zA-Z0-9]+\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tid = id.replaceFirst(\"[^a-zA-Z0-9]+$\", \"\"); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tif (Strings.isEmpty(id)) {\n\t\t\treturn \"section\"; //$NON-NLS-1$\n\t\t}\n\t\treturn id;\n\t}", "int getTokenStart();", "protected abstract int getLastTokenId();", "private static void findPanIds(String s) {\n\n try {\n Pattern regex = Pattern.compile(\"[Pp][Aa][Nn][Ii][Dd]\\\\s+=\\\\s+(?<panID>[0-9].*)\");\n Matcher regexMatcher = regex.matcher(s);\n if (regexMatcher.find()) {\n panIds.add(regexMatcher.group(\"panID\"));\n }\n } catch (PatternSyntaxException ex) {\n ex.printStackTrace();\n }\n\n }", "int getSnId();", "int getSnId();", "int getSnId();", "int getSnId();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "String getIdentifier();", "private String getIdentifierToken(char[] characters) \n\t{\n\t\tString currentToken = \"\";\n\t\t//pos of current character\n\t\tint i;\n\t\t//look at each character\n\t\tfor (i=0; i<characters.length; i++)\n\t\t{\n\t\t\t//working with char ch\n\t\t\tchar ch = characters[i];\n\t\t\t//check if whitespace\n\t\t\tboolean ws = Character.isWhitespace(ch);\n\t\t\t//check type\n\t\t\tString type = getType(ch);\n\n\t\t\tif ( !ws && Objects.equals(type, \"uppercase\"))\n\t\t\t{\n\t\t\t\tcurrentToken = currentToken.concat(String.valueOf(ch));\n\t\t\t}\n\t\t\t//not whitespace and special ch, token found, must be valid token\n\t\t\telse if ( !ws && Objects.equals(type, \"special\"))\n\t\t\t{\n\t\t\t\treturn currentToken;\n\t\t\t}\n\t\t\t//whitespace found\n\t\t\telse if ( ws )\n\t\t\t{\n\t\t\t\treturn currentToken;\n\t\t\t}\n\t\t\telse if (Objects.equals(type, \"int\"))\n\t\t\t{\n\t\t\t\tcurrentToken = currentToken.concat(String.valueOf(ch));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"\\n\"+\"not a valid identifier!\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\t//ran out of tokens to process (end of line)\n\t\treturn currentToken;\n\t}", "default String getUnid() {\n return meta(\"nlpcraft:nlp:unid\");\n }", "public String getIdentNo() {\n return identNo;\n }", "String mo10312id();", "public static String extractIdFromPropertyExpression(String expression)\n {\n return replace(expression, NON_WORD_PATTERN, \"\");\n }", "private void handleIdentifier() {\n\n while (isAlphaNumeric(peek())) {\n advance();\n }\n\n // Get the lexeme\n String text = source.substring(start, current);\n\n // Find a matching keyword (if any)\n TokenType type = keywords.get(text);\n if (type == null) {\n type = IDENTIFIER; // ie not a keyword\n }\n addToken(type);\n }", "@Override\n protected String getStationId(String filename) {\n Matcher matcher = stationIdPattern.matcher(filename);\n if (matcher.matches()) {\n return matcher.group(1);\n }\n return null;\n }" ]
[ "0.57686013", "0.56881136", "0.565717", "0.55853707", "0.55600005", "0.55600005", "0.55600005", "0.55600005", "0.55600005", "0.55500156", "0.55401236", "0.55333775", "0.54953456", "0.5487729", "0.547733", "0.547733", "0.547733", "0.547733", "0.547733", "0.547733", "0.5372998", "0.5363734", "0.5353371", "0.5353371", "0.53017145", "0.53017145", "0.53017145", "0.53017145", "0.53017145", "0.53017145", "0.53017145", "0.53017145", "0.53017145", "0.53017145", "0.5299072", "0.52879816", "0.52863735", "0.52584296", "0.5243678", "0.5240144", "0.523813", "0.52210647", "0.5211588", "0.52019686", "0.5181359", "0.5171799", "0.51696634", "0.51571107", "0.5154265", "0.51528984", "0.51374924", "0.51315224", "0.5121", "0.51083505", "0.5102165", "0.5100457", "0.50893503", "0.5086289", "0.506048", "0.50595134", "0.50540364", "0.50518835", "0.5047733", "0.504341", "0.50429285", "0.50337946", "0.50312674", "0.5015713", "0.50156164", "0.50129074", "0.50095314", "0.5008005", "0.5008005", "0.5005528", "0.50022393", "0.50015557", "0.50007474", "0.49982208", "0.49944383", "0.49934503", "0.4987359", "0.49827164", "0.4972655", "0.4972655", "0.4972655", "0.4972655", "0.49697876", "0.49697876", "0.49697876", "0.49697876", "0.49697876", "0.49697876", "0.49697876", "0.49586257", "0.49498296", "0.4948198", "0.49279186", "0.49234194", "0.49224082", "0.49059322" ]
0.72152007
0
sharing private issue test
@org.junit.jupiter.api.Test void toArray() { mll.add("A"); Object [] backDoor = mll.toArray(); backDoor[0] = "HAHHA"; assertEquals("A", mll.get(0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testGitHub() {\n\t}", "@Test\n\tpublic void testGetQuestionsWithPrivateReplies() {\n\t\tList<QnaQuestion> questions = questionLogic.getQuestionsWithPrivateReplies(LOCATION1_ID);\n\t\tAssert.assertEquals(1, questions.size());\n\t\tAssert.assertTrue(questions.contains(tdp.question2_location1));\n\t}", "@Test\n\tpublic void testReadTicketFail() {\n\t}", "@Override\r\n\tpublic void testPrivateWithViewPrivateScope() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.testPrivateWithViewPrivateScope();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void testPrivateBelongsToOtherUser() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.testPrivateBelongsToOtherUser();\r\n\t\t}\r\n\t}", "@Test\n public void actionsFail() throws Exception {\n Language english = (Language)new English();\n Issue issue1 = this.githubIssue(\"amihaiemil\", \"@charlesmike index\");\n Issue issue2 = this.githubIssue(\"jeff\", \"@charlesmike index\");\n \n Comments comments = Mockito.mock(Comments.class);\n Comment com = Mockito.mock(Comment.class);\n Mockito.when(com.json()).thenThrow(new IOException(\"expected IOException...\"));\n Mockito.when(comments.iterate()).thenReturn(Arrays.asList(com));\n \n Issue mockedIssue1 = Mockito.mock(Issue.class);\n Mockito.when(mockedIssue1.comments())\n .thenReturn(comments)\n .thenReturn(issue1.comments());\n\n Issue mockedIssue2 = Mockito.mock(Issue.class);\n Mockito.when(mockedIssue2.comments())\n .thenReturn(comments)\n .thenReturn(issue2.comments());\n \n final Action ac1 = new Action(mockedIssue1);\n final Action ac2 = new Action(mockedIssue2);\n \n final ExecutorService executorService = Executors.newFixedThreadPool(5);\n List<Future> futures = new ArrayList<Future>();\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac1.perform();;\n }\n }));\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac2.perform();\n }\n }));\n\n for(Future f : futures) {\n assertTrue(f.get()==null);\n }\n \n List<Comment> commentsWithReply1 = Lists.newArrayList(issue1.comments().iterate());\n List<Comment> commentsWithReply2 = Lists.newArrayList(issue2.comments().iterate());\n\n String expectedStartsWith = \"There was an error when processing your command. [Here](/\";\n assertTrue(commentsWithReply1.get(1).json().getString(\"body\")\n .startsWith(expectedStartsWith)); //there should be only 2 comments - the command and the reply.\n \n assertTrue(commentsWithReply2.get(1).json().getString(\"body\")\n .startsWith(expectedStartsWith)); //there should be only 2 comments - the command and the reply.\n \n }", "@Test\n\tpublic void testReadTicketOk() {\n\t}", "@Test\n public void testCorrectUsage() throws\n IOException, AuthorCommitsFailedException {\n EasyMock.expect(mockManager.openRepository(new Project.NameKey(\"trial\")))\n .andReturn(\n RepositoryCache.open(FileKey.lenient(new File(\n \"../../review_site/git\", \"trial.git\"), FS.DETECTED)));\n EasyMock.expect(mockUser.getCapabilities()).andReturn(mockCapability);\n EasyMock.expect(mockCapability.canListAuthorCommits()).andReturn(true);\n replay(mockUser, mockCapability, mockManager);\n List<CommitInfo> expected = new LinkedList<CommitInfo>();\n CommitInfo ex = new CommitInfo();\n ex.setId(\"ede945e22cba9203ce8a0aae1409e50d36b3db72\");\n ex.setAuth(\"Keerath Jaggi <keerath.jaggi@gmail.com> 1401771779 +0530\");\n ex.setMsg(\"init commit\\n\");\n ex.setDate(\"Tue Jun 03 10:32:59 IST 2014\");\n expected.add(ex);\n cmd_test.setCommits(new Project.NameKey(\"trial\"), \"kee\");\n assertEquals(expected, cmd_test.getCommits());\n }", "@Test\n\tpublic void testCreateTicketFail() {\n\t}", "@Override\r\n\tpublic void testPrivateWithNoViewPrivateScope() throws Exception {\n\t\tif (JavastravaApplicationConfig.STRAVA_ALLOWS_CHALLENGES_ENDPOINT) {\r\n\t\t\tsuper.testPrivateWithNoViewPrivateScope();\r\n\t\t}\r\n\t}", "@Test\n public void testModuloExpectedUse() {\n MainPanel mp = new MainPanel();\n ProgramArea pa = new ProgramArea();\n ProgramStack ps = new ProgramStack();\n\n ps.push(10);\n ps.push(3);\n\n ProgramExecutor pe = new ProgramExecutor(mp, ps, pa);\n\n pe.modulo();\n\n Assert.assertEquals(1, ps.pop());\n }", "@Test\n public void testPostOverrideAccess2() {\n // create discussion which will be limited for user\n Discussion limitedDiscussion = new Discussion(-11L, \"Limited discussion\");\n limitedDiscussion.setTopic(topic);\n Post p = new Post(\"Post in limited discussion\");\n p.setDiscussion(limitedDiscussion);\n\n // set permissions\n // has full access to every post in category except the ones in the limited discussion\n // note that limitedDiscussion permission is added as the second one so that sorting in PermissionService.checkPermissions is tested also\n PermissionData categoryPostPerms = new PermissionData(true, true, true, true);\n PermissionData discussionPostPerms = new PermissionData(true, false, false, true);\n pms.configurePostPermissions(testUser, limitedDiscussion, discussionPostPerms);\n pms.configurePostPermissions(testUser, category, categoryPostPerms);\n\n // override mock so that correct permissions are returned\n when(permissionDao.findForUser(any(IDiscussionUser.class), anyLong(), anyLong(), anyLong())).then(invocationOnMock -> {\n Long discusionId = (Long) invocationOnMock.getArguments()[1];\n if(discusionId != null && discusionId == -11L) {\n return testPermissions;\n } else {\n return testPermissions.subList(1,2);\n }\n });\n\n // test access control in category\n assertTrue(accessControlService.canViewPosts(discussion), \"Test user should be able to view posts in discussion!\");\n assertTrue(accessControlService.canAddPost(discussion), \"Test user should be able to add posts in discussion!\");\n assertTrue(accessControlService.canEditPost(post), \"Test user should be able to edit posts in discussion!\");\n assertTrue(accessControlService.canRemovePost(post), \"Test user should be able to delete posts from discussion!\");\n\n // test access in user's discussion\n assertTrue(accessControlService.canViewPosts(limitedDiscussion), \"Test user should be able to view posts in limited discussion!\");\n assertTrue(accessControlService.canAddPost(limitedDiscussion), \"Test user should be able to add posts in limited discussion!\");\n assertFalse(accessControlService.canEditPost(p), \"Test user should not be able to edit post in limited discussion!\");\n assertFalse(accessControlService.canRemovePost(p), \"Test user should not be able to remove post from limited discussion!\");\n }", "@Test\n public void testGetOwner() {\n \n }", "@Test\n public void questionIfNotAlreadyAccusedTest() throws Exception {\n\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyYourdetailsGasOverLayLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"verify the Gas OverLay Link's In Your details\");\n\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Gas\")\t\t\n\t\t.verifyGasWhyWeNeedThisLink()\n\t\t.verifyGasAcctnoWhereCanIfindthisLink()\n\t\t.verifyGasMeterPointWhereCanIfindthisLink()\n\t\t.verifyGasMeterIDWhereCanIfindthisLink();\n}", "@Test\r\n public void dummyCanGiveXP() {\n\r\n dummy.giveExperience();\r\n\r\n assertEquals(DUMMY_EXPERIENCE, dummy.giveExperience());\r\n }", "@Test\n\tpublic void testPublishQuestion() {\n\t\t\n\t\t// try publish with invalid user (no update rights)\n\t\tQnaQuestion question = questionLogic.getQuestionById(tdp.question1_location3.getId());\n\t\tAssert.assertFalse(question.isPublished());\n\t\texternalLogicStub.currentUserId = USER_LOC_3_NO_UPDATE_1;\n\t\ttry {\n\t\t\tquestionLogic.publishQuestion(question.getId(),LOCATION3_ID);\n\t\t\tAssert.fail(\"Should have thrown exception\");\n\t\t} catch(SecurityException se){\n\t\t\tAssert.assertNotNull(se);\n\t\t}\n\t\tquestion = questionLogic.getQuestionById(tdp.question1_location3.getId());\n\t\tAssert.assertFalse(question.isPublished());\n\t\tAssert.assertNotNull(question.getCategory());\n\t\t\n\t\t// try publish with valid user (update rights)\n\t\texternalLogicStub.currentUserId = USER_LOC_3_UPDATE_1;\n\t\ttry {\n\t\t\tquestionLogic.publishQuestion(question.getId(),LOCATION3_ID);\n\t\t\tquestion = questionLogic.getQuestionById(tdp.question1_location3.getId());\n\t\t\tAssert.assertTrue(question.isPublished());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail(\"Should not have thrown Exception\");\n\t\t}\n\t}", "@Test(expected = RuntimeException.class)\r\n \tpublic void testCommit2() throws ESException {\n \t\tlocalProject.commit(ESLogMessage.FACTORY.createLogMessage(\"test\", \"super\"), null, new NullProgressMonitor());\r\n \t\tfail(\"Should not be able to commit an unshared Project!\");\r\n \t}", "@Test\n public void reopenClosedTeamUnavalableOption() {\n\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyMeterReadingGasOverLayLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Gas Page Overlay Links\");\nSMRAccountDetails smrProfile = new TestDataHelper().getAllSMRUserProfile(\"AnonymousSMRGas\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Gas\")\n\t\t.verifyGassitenoWhereCanIfindthisLink(smrProfile);\n\t\t\n}", "private test5() {\r\n\t\r\n\t}", "@Test\n public void should_compare_issues_with_database_format() {\n DefaultIssue newIssue = newDefaultIssue(\" message \", 1, RuleKey.of(\"squid\", \"AvoidCycle\"), \"checksum1\");\n IssueDto referenceIssue = newReferenceIssue(\"message\", 1, \"squid\", \"AvoidCycle\", \"checksum2\");\n \n IssueTrackingResult result = new IssueTrackingResult();\n tracking.mapIssues(newArrayList(newIssue), newArrayList(referenceIssue), null, null, result);\n assertThat(result.matching(newIssue)).isSameAs(referenceIssue);\n }", "@Test\n public void testAddACopy() {\n }", "@Test\n public void testingTheTwoPlane2016Order() {\n }", "@Test (groups = {\"regressionTest\"})\n public void testPrivateQueries() {\n test = extent.createTest(\"Verify Private Query Button\");\n driver.manage().timeouts().implicitlyWait(time_to_wait, TimeUnit.SECONDS);//this is global so no need to mention multiple times\n try {\n login.doLogin(test);\n test.createNode(\"Clicking on Help Button\");\n //test.log(Status.INFO, \"Clicking on Help Button\");\n WebElement helpButton = driver.findElement(By.cssSelector(\".explore-quiries-inner\"));\n highlightHelper.highLightElement(driver, helpButton);\n helpButton.click();\n\n test.createNode(\"Clicking on Private Query Button\");\n //test.log(Status.INFO, \"Clicking on Private Query Button\");\n WebElement privateQueryButton = driver.findElement(By.id(\"scrollable-auto-tab-1\"));\n highlightHelper.highLightElement(driver, privateQueryButton);\n privateQueryButton.click();\n } catch (Exception e) {\n test.createNode(\"Exception (\" + e.toString() + \") found\").fail(e);\n Assert.assertTrue(false);\n }\n test.createNode(\"Verified Private Query Successfully\");\n }", "@Test(groups ={Slingshot,Regression,SubmitMeterRead})\npublic void verifyYourdetailsElectricityOverLayLink()\t\n{\t\n\tReport.createTestLogHeader(\"Anonymous Submit meter read\", \"Verifies the Your details Electricity Page Overlay Links\");\n\t\tnew SubmitMeterReadAction()\n\t\t.openSMRpage(\"Electricity\")\t\t\n\t\t.verifyElectricWhyWeNeedThisLink()\n\t\t.verifyElectricAcctnoWhereCanIfindthisLink()\n\t\t.verifyElectricMeterPointWhereCanIfindthisLink()\n\t\t.verifyElectricMeterIDWhereCanIfindthisLink();\n}", "@Test\n public void temporaryTeamClosingUnavalableOption() {\n\n }", "@Test\n public void actionsExecute() throws Exception {\n Language english = (Language)new English();\n Issue issue1 = this.githubIssue(\"amihaiemil\", \"@charlesmike hello there\");\n Issue issue2 = this.githubIssue(\"jeff\", \"@charlesmike hello\");\n Issue issue3 = this.githubIssue(\"vlad\", \"@charlesmike, hello\");\n Issue issue4 = this.githubIssue(\"marius\", \"@charlesmike hello\");\n final Action ac1 = new Action(issue1);\n final Action ac2 = new Action(issue2);\n final Action ac3 = new Action(issue3);\n final Action ac4 = new Action(issue4);\n \n final ExecutorService executorService = Executors.newFixedThreadPool(5);\n List<Future> futures = new ArrayList<Future>();\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac1.perform();\n }\n }));\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac2.perform();\n }\n }));\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac3.perform();\n \n }\n }));\n futures.add(executorService.submit(new Runnable() {\n @Override\n public void run() {\n ac4.perform();\n }\n }));\n\n for(Future f : futures) {\n assertTrue(f.get()==null);\n }\n \n List<Comment> commentsWithReply1 = Lists.newArrayList(issue1.comments().iterate());\n List<Comment> commentsWithReply2 = Lists.newArrayList(issue2.comments().iterate());\n List<Comment> commentsWithReply3 = Lists.newArrayList(issue3.comments().iterate());\n List<Comment> commentsWithReply4 = Lists.newArrayList(issue4.comments().iterate());\n String expectedReply1 = \"> @charlesmike hello there\\n\\n\" + String.format(english.response(\"hello.comment\"),\"amihaiemil\");\n assertTrue(commentsWithReply1.get(1).json().getString(\"body\")\n .equals(expectedReply1)); //there should be only 2 comments - the command and the reply.\n \n String expectedReply2 = \"> @charlesmike hello\\n\\n\" + String.format(english.response(\"hello.comment\"),\"jeff\");\n assertTrue(commentsWithReply2.get(1).json().getString(\"body\")\n .equals(expectedReply2)); //there should be only 2 comments - the command and the reply.\n \n String expectedReply3 = \"> @charlesmike, hello\\n\\n\" + String.format(english.response(\"hello.comment\"),\"vlad\");\n assertTrue(commentsWithReply3.get(1).json().getString(\"body\")\n .equals(expectedReply3)); //there should be only 2 comments - the command and the reply.\n \n String expectedReply4 = \"> @charlesmike hello\\n\\n\" + String.format(english.response(\"hello.comment\"),\"marius\");\n assertTrue(commentsWithReply4.get(1).json().getString(\"body\")\n .equals(expectedReply4)); //there should be only 2 comments - the command and the reply.\n \n }", "@Test\n public void testPostOverrideAccess() {\n // create user's discussion\n Discussion usersDiscussion = new Discussion(-11L, \"Users own discussion\");\n usersDiscussion.setTopic(topic);\n Post p = new Post(\"Post in user's discussion\");\n p.setDiscussion(usersDiscussion);\n\n // set permissions\n // can create and view posts in category\n PermissionData categoryPostPerms = new PermissionData(true, false, false, true);\n // has complete control over posts in his discussion\n PermissionData discussionPostPerms = new PermissionData(true, true, true, true);\n pms.configurePostPermissions(testUser, usersDiscussion, discussionPostPerms);\n pms.configurePostPermissions(testUser, category, categoryPostPerms);\n\n // override mock so that correct permissions are returned\n when(permissionDao.findForUser(any(IDiscussionUser.class), anyLong(), anyLong(), anyLong())).then(invocationOnMock -> {\n Long discusionId = (Long) invocationOnMock.getArguments()[1];\n if(discusionId != null && discusionId == -11L) {\n return testPermissions;\n } else {\n return testPermissions.subList(1,2);\n }\n });\n\n // test access control in category\n assertTrue(accessControlService.canViewPosts(discussion), \"Test user should be able to view posts in discussion!\");\n assertTrue(accessControlService.canAddPost(discussion), \"Test user should be able to add posts in discussion!\");\n assertFalse(accessControlService.canEditPost(post), \"Test user should not be able to edit posts in discussion!\");\n assertFalse(accessControlService.canRemovePost(post), \"Test user should not be able to delete posts from discussion!\");\n\n // test access in user's discussion\n assertTrue(accessControlService.canViewPosts(usersDiscussion), \"Test user should be able to view posts in his discussion!\");\n assertTrue(accessControlService.canAddPost(usersDiscussion), \"Test user should be able to add posts in his discussion!\");\n assertTrue(accessControlService.canEditPost(p), \"Test user should be able to edit post in his discussion!\");\n assertTrue(accessControlService.canRemovePost(p), \"Test user should be able to remove post from his discussion!\");\n }", "@Test\n public void canObtainOwnRelease() throws Exception {\n final Release release = release();\n final RtReleaseAsset asset = new RtReleaseAsset(\n new FakeRequest(),\n release,\n 1\n );\n MatcherAssert.assertThat(\n asset.release(),\n Matchers.is(release)\n );\n }", "@Test\r\n\t public void hasSubmitted2() {\n\t \tthis.admin.createClass(\"ecs60\",2017,\"sean\",50);\r\n\t \tthis.student.registerForClass(\"gurender\", \"ecs60\", 2017);\r\n\t this.instructor.addHomework(\"sean\", \"ecs60\", 2017, \"p1\");\r\n\t this.student.submitHomework(\"gurender\", \"p1\", \"abc\", \"ecs61\", 2017); \r\n\t assertFalse(this.student.hasSubmitted(\"gurender\", \"p1\", \"ecs61\", 2017));\r\n\t }", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "@Test\n public void solve1() {\n }", "@Test(expected=UnauthorizedException.class)\n\tpublic void testI(){\n\t\tSystem.out.println(\"Test I\");\n\t\tUUID aliceSecret = secretService.storeSecret(\"Alice\", new Secret());\n\t\tsecretService.shareSecret(\"Alice\", aliceSecret, \"Bob\");\n\t\tsecretService.shareSecret(\"Bob\", aliceSecret, \"Carl\");\n\t\tsecretService.unshareSecret(\"Alice\", aliceSecret, \"Bob\");\n\t\tsecretService.shareSecret(\"Bob\", aliceSecret, \"Carl\");\n\t}", "@Test\n\tpublic void testEvilPuzzleGeneration() {\n\t}", "private void test() {\n\n\t}", "@Test\n public void testWrongPartner() {\n /* Set up scenario. As one might see, no partnership was registered hence we throw an\n error.\n */\n this.quotes = Controller.getQuotes(desiredBikes, this.dateRange,\n this.customer.getLocation(),\n true);\n Quote chosenQuote = this.quotes.get(0);\n Provider originalProvider = chosenQuote.provider;\n Payment orderInfo = BookingController.bookQuote(chosenQuote, this.customer);\n deliveryService.carryOutPickups(this.bookingDate);\n deliveryService.carryOutDropoffs();\n assertThrows(AssertionError.class, () ->\n {\n this.provider2.registerReturn(orderInfo.getOrderNumber());\n });\n }", "@When(\"Try to Access & exfiltrate data within the victim's security zone\")\npublic void tryaccessexfiltratedatawithinthevictimssecurityzone(){\n}", "@Ignore\n public void testDisapproveReason() throws Exception {\n\n }", "@Test\n void userStory1() throws ValidationException, NoShoppingListExist {\n ShoppingListFactory factory = api.createShoppingList();\n factory.setName(\"My Shoopping List\");\n factory.setDescription(\"A short description\");\n ShoppingList list = factory.validateAndCommit();\n\n // Times go on\n\n ShoppingList list2 = api.find(list.getId());\n\n // Test\n\n assertEquals(list.getId(), list2.getId());\n assertEquals(list.getName(), list2.getName());\n assertEquals(list.getDescription(), list2.getDescription());\n }", "@Test\r\n\tpublic void testContributormanagerInstance() {\r\n\t\tcm = Contributormanager.getInstance();\r\n\t\tassertTrue(cm.isEmpty());\r\n\t\tassertTrue(cm.addContributor(\"Chris\"));\r\n\t\tcm = Contributormanager.getInstance();\r\n\t\tassertFalse(cm.isEmpty());\r\n\t\tassertFalse(cm.addContributor(\"Chris\"));\r\n\t}", "@Test\n\tpublic void testHardPuzzleGeneration() {\n\t}", "@Test\n public void publicInstanceTest() {\n // TODO: test publicInstance\n }", "@Disabled\n @Test\n void processDepositValidatorPubkeysDoesNotContainPubkey() {\n }", "@Test\n public void testRemoveACopy() {\n }", "@Test\r\n public void testReadWhenThirdPersonShare() {\n System.out.println(\"Test : Meg shares her file with Dan and Dan can read it. Dan shares Meg's file with Ken, Ken can also read it\");\r\n System.out.println();\r\n String userId = \"Meg\";\r\n String filePath = \"/home/Meg/shared/Mf1.txt\";\r\n String targetUserId = \"Dan\";\r\n String fileName = \"Mf1.txt\";\r\n File file = new File (filePath, userId, fileName);\r\n List<File> fileList = FileList.getFileList();\r\n fileList.add(file);\r\n service.shareFile(userId, targetUserId, filePath);\r\n try {\r\n assertNotNull(service.readFile(targetUserId, filePath));\r\n } catch (Exception e) {\r\n assertFalse(\"Should not throw any exception\", true);\r\n }\r\n\r\n service.shareFile(targetUserId, \"Ken\", filePath);\r\n try {\r\n assertNotNull(service.readFile(\"Ken\", filePath));\r\n } catch (Exception e) {\r\n assertFalse(\"Should not throw any exception\", true);\r\n }\r\n System.out.println();\r\n\r\n }", "@Test\r\n\tpublic void acreditar() {\r\n\t}", "@Test\n public void protectionKeyTest() {\n // TODO: test protectionKey\n }", "@Disabled\n @Test\n void processDepositValidatorPubkeysContainsPubkey() {\n }", "@Test\n\tpublic void test01_ViewADraftForAnotherUser() {\n\t\tinfo(\"Test 1: View a draft for another user\");\n\t\t/*Step Number: 1\n\t\t*Step Name: Step 1: \n\t\t*Step Description: \n\t\t\t- Connect with the user A\n\t\t\t- Go to [Intranet] --> [Wiki]\n\t\t\t- Click [Add Page] --> [Blank Page]/[From Template...]\n\t\t\t- Enter the required fields without saving for 30s\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tThe draft is saved after 30s*/\n\t\t\n\t\tinfo(\"Create a draft\");\n\t\tString title = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tString content = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\thp.goToWiki();\n\t\twHome.goToAddBlankPage();\n\t\trichEditor.addSimplePageHasAutoSaveWithoutSave(title, content);\n\t\t\n\t\tinfo(\"Verify draft exists in draft list\");\n\t\twHome.goToMyDraft();\n\t\twValidate.verifyDraftExistsInDraftListOrNot(title, true);\n\t\tarrayDraft.add(title);\n\t\t\n\t\t/*Step Number: 2\n\t\t*Step Name: Step 2: \n\t\t*Step Description: \n\t\t\t- Connect with the user B\n\t\t\t- Go to [Intranet] --> [Wiki]\n\t\t\t- From the menu \"Browse\", choose \"My drafts\"\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tThe draft created by the user A doesn't appear in the list of drafts of the user B*/\n\t\tinfo(\"Sign in with Mary\");\n\t\tmagAc.signIn(DATA_USER2, DATA_PASS);\n\t\tinfo(\"Go to Myfraft and verify that draft created in step 1 does not exist in draft list\");\n\t\thp.goToWiki();\n\t\twHome.goToMyDraft();\n\t\twValidate.verifyDraftExistsInDraftListOrNot(title, false);\n\t\t\n\t\tinfo(\"Clear Data\");\n\t\tinfo(\"Sign in as John\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n \t}", "@Test\n\tpublic void acceptedOfferCanNotBeRejected() {\n\t}", "@Test \n\tpublic void testbookticket(){\n\t\tboolean check =theater.bookTicket( \"Regal_Jack\",\"Star Wars\", 80, \"1500\");\t\t\n\t\tassertEquals(false,check);\n\t\tboolean check1 =theater.bookTicket( \"Regal_Jack\",\"Star Wars\", 40, \"1500\");\n\t\tassertEquals(false,check1);\n\t}", "@Test\n public void agreementTest() {\n // TODO: test agreement\n }", "@Test\n\tpublic void getWorksTest() throws Exception {\n\t}", "@Test\n void checkTheManagerGetAlertAfterOwnerChangeTheBid() {\n String guest= tradingSystem.ConnectSystem().returnConnID();\n tradingSystem.Register(guest, \"Manager2\", \"123\");\n Response res= tradingSystem.Login(guest, \"Manager2\", \"123\");\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,res.returnUserID());\n tradingSystem.subscriberBidding(NofetID,NconnID,storeID,4,20,2);\n store.changeSubmissionBid(EuserId,NofetID,4,30,1);\n }", "@When(\"Try to Attempt sending crafted records to DNS cache\")\npublic void tryattemptsendingcraftedrecordstodnscache(){\n}", "@Test\r\n public void test() {\r\n Owner owner = new Owner();\r\n owner.setOauthToken(\"CAACEdEose0cBAMCKHcqSEOcS5O40e4co26HaL6YyEtM7PZAUlPSSDbIca80wF2w3G9B43ZCAx8vojAQKfeyk8ZAapSjv5ala0FPAawudbeNPpFMgyGCDmR0bEhNUuj9gbRjKHQqvVt28DUegx6uAVtMy5PYGhoFSYHstHBtt8Hby7wp2cIczDeZAiuoKe0L6qbGJnFRHqzO87pyZBEhPDpbAZBWjrtCyQZD\");\r\n owner.setFacebookID(\"1492826064306740\");\r\n\r\n MonitorRunner runner = new MonitorRunner(owner);\r\n //runner.run();\r\n }", "@Test\n public void test_access_to_modify_team_success() {\n try {\n Assert.assertTrue(authBO.hasAccessToModifyTeam(1, 1));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }", "@Test\r\n\t public void hasSubmitted1() {\n\t \tthis.admin.createClass(\"ecs60\",2017,\"sean\",50);\r\n\t \tthis.student.registerForClass(\"gurender\", \"ecs60\", 2017);\r\n\t // this.instructor.addHomework(\"sean\", \"ecs60\", 2017, \"p1\");\r\n\t this.student.submitHomework(\"gurender\", \"p1\", \"abc\", \"ecs60\", 2017);\r\n\t // assertFalse(this.student.isRegisteredFor(\"gurender\", \"ecs60\", 2018));\r\n\t\t assertFalse(this.student.hasSubmitted(\"gurender\", \"p1\", \"ecs60\", 2017));\r\n\t }", "@Override\n public void testTwoRequiredGroups() {\n }", "@Override\n public void testTwoRequiredGroups() {\n }", "@Test\n public void testCheckout() throws Exception {\n }", "@Test\n\tpublic void test04_RefuseARequest(){\n\t\tinfo(\"Test 04: Refuse a request\");\n\t\tinfo(\"prepare data\");\n\t\t/*Create data test*/\n\t\tString username1 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password1 = username1;\n\t\tString email1 = username1 + mailSuffixData.getMailSuffixRandom();\n\n\t\tString username2 = txData.getContentByArrayTypeRandom(4) + getRandomString();\n\t\tString password2 = username2;\n\t\tString email2= username2 + mailSuffixData.getMailSuffixRandom();\n\n\t\tinfo(\"Add new user\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToAddUser();\n\t\taddUserPage.addUser(username1, password1, email1, username1, username1);\n\t\taddUserPage.addUser(username2, password2, email2, username2, username2);\n\n\t\t//createRequestsConnections();\n\t\t/*Step Number: 1\n\t\t *Step Name: Refuse a request\n\t\t *Step Description: \n\t\t\t- Login as mary\n\t\t\t- Open intranet homepage\n\t\t\t- On this gadget, mouse over an invitation of Jack(demo)\n\t\t\t- Click on Refuse icon\n\t\t *Input Data: \n\n\t\t *Expected Outcome: \n\t\t\t- Invitations of root, james are displayed on Invitation gadget\n\t\t\t- The Accept and Refuse button are displayed.\n\t\t\t- The invitation of jack fades out and is permanently removed from the list\n\t\t\t- Requests of James is moved to the top of the gadget*/\n\t\tinfo(\"Sign in with mary account\");\n\t\tmagAc.signIn(username1, password1);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"--Send request 2 to John\");\n\t\tmagAc.signIn(username2, password2);\n\t\thp.goToConnections();\n\t\tconnMg.connectToAUser(DATA_USER1);\n\n\t\tinfo(\"Sign in with john account\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tmouseOver(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2),true);\n\t\tUtils.pause(2000);\n\t\tclick(hp.ELEMENT_INVITATIONS_PEOPLE_REFUSE_BTN.replace(\"${name}\",username2), 2,true);\n\t\twaitForElementNotPresent(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username2));\n\t\twaitForAndGetElement(hp.ELEMENT_INVITATIONS_PEOPLE_AVATAR .replace(\"${name}\",username1));\n\n\t\tinfo(\"Clear Data\");\n\t\tmagAc.signIn(DATA_USER1, DATA_PASS);\n\t\tnavToolBar.goToUsersAndGroupsManagement();\n\t\tuserAndGroup.deleteUser(username1);\n\t\tuserAndGroup.deleteUser(username2);\n\t}", "@Test\r\n\t public void feelingLucky() {\r\n\t \t Assert.fail();\r\n\t Assert.fail();\r\n\t }", "@Test\n\tpublic void testTotalPuzzleGenerated() {\n\t}", "@Test\r\n\tpublic void testScanePage_malformedLink() {\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Test\r\n public void testUnauthorizedShare() {\n System.out.println(\"Test : Bob cannot share Alice's file with Carl if the file has not been shared with Bob\");\r\n System.out.println();\r\n String userId = \"Bob\";\r\n String filePath = \"/home/Carl/shared/Cf1.txt\";\r\n String targetUserId = \"Alice\";\r\n String owner = \"Carl\";\r\n String fileName = \"Cf1.txt\";\r\n List<File> fileList = FileList.getFileList();\r\n File file = new File(filePath, owner, fileName);\r\n fileList.add(file);\r\n try {\r\n service.shareFile(userId, targetUserId, filePath);\r\n } catch (UnauthorizedException e) {\r\n Assert.assertTrue(e instanceof UnauthorizedException);\r\n } catch (Throwable t) {\r\n Assert.assertFalse(\"Other exception caught\", true);\r\n t.printStackTrace();\r\n }\r\n System.out.println();\r\n\r\n }", "@Test\n public void issuerTest() {\n // TODO: test issuer\n }", "@Test\n public void askForCardSmart2() throws Exception {\n Map<Integer,Integer> allMovesMade = new HashMap<Integer,Integer>();\n allMovesMade.put(3, 2);\n SmartPlayer x = new SmartPlayer(0,1);\n x.setCards(3,2);\n x.setMovesMadeByOtherPlayers(allMovesMade);\n SmartPlayer y = new SmartPlayer(0,2);\n y.setCards(2,2);\n int rankToAsk = x.askForCard(2);\n assertTrue(rankToAsk == 3);\n\n }", "public void copyIssues() {\r\n\ttry {\r\n\t SearchResult jiraResults = getJiraIssues();\r\n\t Iterable<Issue> issues = jiraResults.getIssues();\r\n\r\n\t GitHub github = GitHub.connectUsingPassword(getGitHubUsername(), getGitHubPassword());\r\n\t GHMyself me = github.getMyself();\r\n\t GHRepository sitewhere = github.getRepository(getGitHubRepository());\r\n\r\n\t for (Issue issue : issues) {\r\n\t\tint number = Integer.parseInt(issue.getKey().substring(10));\r\n\t\tif (number != 12) {\r\n\t\t System.out.println(\"Skipping issue \" + issue.getKey());\r\n\t\t} else {\r\n\t\t System.out.println(\"Converting issue \" + issue.getKey());\r\n\t\t GHIssue created = sitewhere.createIssue(issue.getSummary()).assignee(me)\r\n\t\t\t .body(issue.getDescription()).create();\r\n\t\t created.comment(\"From https://sitewhere.atlassian.net/browse/\" + issue.getKey());\r\n\t\t for (Comment comment : issue.getComments()) {\r\n\t\t\tcreated.comment(comment.getBody());\r\n\t\t }\r\n\t\t String typeLabel = issue.getIssueType().getName().toLowerCase();\r\n\t\t created.setLabels(typeLabel);\r\n\t\t created.close();\r\n\r\n\t\t try {\r\n\t\t\tThread.sleep(5 * 1000);\r\n\t\t } catch (InterruptedException e) {\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t} catch (JiraAccessException e) {\r\n\t e.printStackTrace();\r\n\t} catch (IOException e) {\r\n\t e.printStackTrace();\r\n\t}\r\n }", "@Test\n public void testDiscussionAccessControl() {\n // set permissions\n PermissionData data = new PermissionData(true, false, false, true);\n pms.configureDiscussionPermissions(testUser, category, data);\n\n // test access control\n assertTrue(accessControlService.canViewDiscussions(topic), \"Test user should be able to view discussion in topic!\");\n assertTrue(accessControlService.canAddDiscussion(topic), \"Test user should be able to create discussion in topic!\");\n assertFalse(accessControlService.canEditDiscussion(discussion), \"Test user should not be able to edit discussion in topic!\");\n assertFalse(accessControlService.canRemoveDiscussion(discussion), \"Test user should not be able to remove discussion from topic!\");\n }", "@Test\n\tpublic void rejectedOfferCanNotBeAccepted() {\n\t}", "@Test(expected = RuntimeException.class)\r\n \tpublic void testCommit() throws ESException {\n \t\tlocalProject.commit();\r\n \t\tfail(\"Should not be able to commit an unshared Project!\");\r\n \t}", "@Test\n public void testDAM30203001() {\n testDAM30102001();\n }", "@Test\n public void idempotentcyTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n paymentDto = initPayment(inAccountId, outAccountId, \"100\");\n\n final String paymentId = paymentDto.getId();\n\n\n //we mistakenly try to confirm unauthorized payment (even twice) - that is OK, payment should stay in INITIAL\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status INITIAL\", PaymentStatus.INITIAL, paymentDto.getStatus());\n\n\n //eventually we authorize payment\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n paymentDto = authorizePayment(paymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //and confirm\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n paymentDto = confirmPayment(paymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n }", "@Test\n public void testProcessCheckoutIllegalToolCode() {\n String toolCode = \"Not A Tool Code\";\n int rentalDays = 3;\n int discountPercentage = 10;\n LocalDate checkoutDate = LocalDate.of(2015, Month.SEPTEMBER, 3);\n String expectedMessage = \"Illegal tool code. LADW, CHNS, JAKR and JAKD are the valid tool codes, please enter a valid tool code.\";\n\n String message = \"\";\n try {\n RentalAgreement result = checkout.processCheckout(toolCode, rentalDays, discountPercentage, checkoutDate);\n } catch (Exception e) {\n message = e.getMessage();\n }\n\n assertEquals(expectedMessage, message);\n }", "@Test\n\tpublic void testCanEnter(){\n\t}", "@Test\n\tpublic void updateTestPaperQuestion() throws Exception {\n\t}", "@Test\n public void testIDPChange() throws Exception {\n UserMultiID umk = createUMK();\n UserMultiID eppnKey = new UserMultiID(umk.getEppn());\n UserMultiID eptidKey = new UserMultiID(umk.getEptid());\n UserMultiID openIdKey = new UserMultiID(umk.getOpenID());\n UserMultiID openIdConnectKey = new UserMultiID(umk.getOpenIDConnect());\n UserMultiID ruKey = new UserMultiID(umk.getRemoteUserName());\n\n String badIdp = \"fake:idp\";\n // now we save a user with the right id, then try to get it with a different idp.\n checkGetUser(ruKey, badIdp);\n checkGetUser(eppnKey, badIdp);\n checkGetUser(eptidKey, badIdp);\n checkGetUser(openIdKey, badIdp);\n checkGetUser(openIdConnectKey, badIdp);\n }", "@Test\n public void testFailureParUsedByOtherClient() throws Exception {\n // create client dynamically\n String victimClientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.FALSE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation victimOidcCRep = getClientDynamically(victimClientId);\n String victimClientSecret = victimOidcCRep.getClientSecret();\n assertEquals(Boolean.FALSE, victimOidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(victimOidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n assertEquals(OIDCLoginProtocol.CLIENT_SECRET_BASIC, victimOidcCRep.getTokenEndpointAuthMethod());\n\n authManageClients();\n\n String attackerClientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n clientRep.setRedirectUris(new ArrayList<String>(Arrays.asList(CLIENT_REDIRECT_URI)));\n });\n OIDCClientRepresentation attackerOidcCRep = getClientDynamically(attackerClientId);\n assertEquals(Boolean.TRUE, attackerOidcCRep.getRequirePushedAuthorizationRequests());\n assertTrue(attackerOidcCRep.getRedirectUris().contains(CLIENT_REDIRECT_URI));\n assertEquals(OIDCLoginProtocol.CLIENT_SECRET_BASIC, attackerOidcCRep.getTokenEndpointAuthMethod());\n\n // Pushed Authorization Request\n oauth.clientId(victimClientId);\n oauth.redirectUri(CLIENT_REDIRECT_URI);\n ParResponse pResp = oauth.doPushedAuthorizationRequest(victimClientId, victimClientSecret);\n assertEquals(201, pResp.getStatusCode());\n String requestUri = pResp.getRequestUri();\n\n // Authorization Request with request_uri of PAR\n // remove parameters as query strings of uri\n // used by other client\n oauth.clientId(attackerClientId);\n oauth.redirectUri(null);\n oauth.scope(null);\n oauth.responseType(null);\n oauth.requestUri(requestUri);\n String state = oauth.stateParamRandom().getState();\n oauth.stateParamHardcoded(state);\n UriBuilder b = UriBuilder.fromUri(oauth.getLoginFormUrl());\n driver.navigate().to(b.build().toURL());\n OAuthClient.AuthorizationEndpointResponse errorResponse = new OAuthClient.AuthorizationEndpointResponse(oauth);\n Assert.assertFalse(errorResponse.isRedirected());\n }", "protected Problem() {/* intentionally empty block */}", "@Test\n public void testFailureNotParByParRequiredCilent() throws Exception {\n // create client dynamically\n String clientId = createClientDynamically(generateSuffixedName(CLIENT_NAME), (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.TRUE);\n });\n OIDCClientRepresentation oidcCRep = getClientDynamically(clientId);\n String clientSecret = oidcCRep.getClientSecret();\n assertEquals(Boolean.TRUE, oidcCRep.getRequirePushedAuthorizationRequests());\n\n oauth.clientId(clientId);\n oauth.openLoginForm();\n assertEquals(OAuthErrorException.INVALID_REQUEST, oauth.getCurrentQuery().get(OAuth2Constants.ERROR));\n assertEquals(\"Pushed Authorization Request is only allowed.\", oauth.getCurrentQuery().get(OAuth2Constants.ERROR_DESCRIPTION));\n\n updateClientDynamically(clientId, (OIDCClientRepresentation clientRep) -> {\n clientRep.setRequirePushedAuthorizationRequests(Boolean.FALSE);\n });\n\n OAuthClient.AuthorizationEndpointResponse loginResponse = oauth.doLogin(TEST_USER_NAME, TEST_USER_PASSWORD);\n String code = loginResponse.getCode();\n\n // Token Request\n OAuthClient.AccessTokenResponse res = oauth.doAccessTokenRequest(code, clientSecret);\n assertEquals(200, res.getStatusCode());\n }", "@Test\n public void testAdviceCopy() {\n//TODO: Test goes here... \n }", "@Test\n public void testCheckin() throws Exception {\n }", "@Test\n public void askForCardSmart() throws Exception {\n Map<Integer,Integer> allMovesMade = new HashMap<Integer,Integer>();\n allMovesMade.put(1, 2);\n SmartPlayer x = new SmartPlayer(0,1);\n x.setCards(2,2);\n x.setMovesMadeByOtherPlayers(allMovesMade);\n SmartPlayer y = new SmartPlayer(1,2);\n y.setCards(2,2);\n int rankToAsk = x.askForCard(2);\n assertTrue(rankToAsk == 2);\n //assertTrue(rankToAsk<=13 && rankToAsk> 0);\n }", "@Test(expected = AuthorCommitsFailedException.class)\n public void testIncorrectAuthorPattern() throws AuthorCommitsFailedException {\n EasyMock.expect(mockUser.getCapabilities()).andReturn(mockCapability);\n EasyMock.expect(mockCapability.canListAuthorCommits()).andReturn(true);\n replay(mockUser, mockCapability);\n cmd_test.setCommits(new Project.NameKey(\"trial\"), \"ke*\");\n }", "@Test\n public void checkBook2() throws Exception {\n SmartPlayer x = new SmartPlayer(0,0);\n boolean gotBook = x.checkBook();\n assertTrue(!gotBook);\n }", "@Test\n public void testAssignReinforcements() {\n IssueOrderPhase l_issueOrder = new IssueOrderPhase(d_gameEngine);\n l_issueOrder.d_gameData = d_gameData;\n l_issueOrder.assignReinforcements();\n d_gameData = l_issueOrder.d_gameData;\n int l_actualNoOfArmies = d_gameData.getD_playerList().get(0).getD_noOfArmies();\n int l_expectedNoOfArmies = 8;\n assertEquals(l_expectedNoOfArmies, l_actualNoOfArmies);\n }", "@Test\n void checkManagerWithPermissionGetAlert(){\n LinkedList<PermissionEnum.Permission> list=new LinkedList<>();\n list.add(PermissionEnum.Permission.RequestBidding);\n tradingSystem.AddNewManager(EuserId,EconnID,storeID,NofetID);\n tradingSystem.EditManagerPermissions(EuserId,EconnID,storeID,NofetID,list);\n Response Alert=new Response(\"Alert\");\n store.sendAlertOfBiddingToManager(Alert);\n //??\n }", "@Test\n public void trimsBidAndAsk() {\n }", "@Test\n public void test() {\n Assert.assertEquals(3L, Problem162.solve(/* change signature to provide required inputs */));\n }", "public StackAndQueueChallengesTest() {\n super();\n }", "@Test\n public void pledgeRedeemVoteTest() throws IOException {\n TestCommon.getAccountInfo(topj, account);\n\n // redeem vote\n// ResponseBase<XTransactionResponse> redeemTokenVote = topj.unStakeVote(account, new BigInteger(\"1000\"));\n// System.out.println(\"un stake vote hash >> \" + redeemTokenVote.getData().getOriginalTxInfo().getTxHash() + \" > is success > \" + redeemTokenVote.getData().isSuccess());\n// TestCommon.getAccountInfo(topj, account);\n\n // set vote\n// Map<String, BigInteger> voteInfo = new HashMap<>();\n// String nodeAddress = \"T-0-LaFmRAybSKTKjE8UXyf7at2Wcw8iodkoZ8\";\n// voteInfo.put(nodeAddress, BigInteger.valueOf(5000));\n// ResponseBase<XTransactionResponse> setVoteResult = topj.voteNode(account, voteInfo);\n// System.out.println(\"set vote hash >> \" + setVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n // cancel vote\n// voteInfo.put(nodeAddress, BigInteger.valueOf(200));\n// ResponseBase<XTransactionResponse> cancelVoteResult = topj.unVoteNode(account, voteInfo);\n// System.out.println(\"cancel vote hash >> \" + cancelVoteResult.getData().getOriginalTxInfo().getTxHash() + \" >> is success > \" + setVoteResult.getData().isSuccess());\n//\n// TestCommon.getAccountInfo(topj, account);\n\n// account.setAddress(\"T-0-LeP9oXqB8uLCBNCd9BsfULUYhSyDknt1q2\");\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account);\n// ResponseBase<VoteUsedResponse> r = topj.listVoteUsed(account, \"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\");\n// System.out.println(\"list vote used > \" + r.getData().getVoteInfos().get(\"T00000LKF18dpN5yGuBBpg38ZQyC8vpdzy6YQfPe\"));\n\n Map<String, String> result = Topj.generateV3Args(\"T80000968927100f3cb7b23e8d477298311648978d8613\", Arrays.asList(\"f8a49466ab344963eaa071f9636faac26b0d1a399003259466ab344963eaa071f9636faac26b0d1a3990032586010203040506830304058801020304050607088831323334353637388b68656c6c6f20776f726c648d746f7020756e69742074657374b8410051a134afd1fc323b4477d774a249742860c0d200f874ad6f3299c5270304e7f501423897a3d8e1613d339102af7f3011f901d85b0f848a27434a261563e259ee\"));\n\n System.out.println(\"generateV3Args > \" + JSON.toJSONString(result));\n }", "@Override\r\n\tprotected void doVerify() {\n\t\t\r\n\t}", "@Test\r\n public void testReadWhenShared() {\n System.out.println(\"Test : Alice shares her file with Bob and Bob can read it\");\r\n System.out.println();\r\n String userId = \"Alice\";\r\n String filePath = \"/home/Alice/shared/Af1.txt\";\r\n String targetUserId = \"Bob\";\r\n String fileName = \"Af1.txt\";\r\n File file = new File (filePath, userId, fileName);\r\n List<File> fileList = FileList.getFileList();\r\n fileList.add(file);\r\n service.shareFile(userId, targetUserId, filePath);\r\n try {\r\n assertNotNull(service.readFile(targetUserId, filePath));\r\n } catch (Exception e) {\r\n assertFalse(\"Should not throw any exception\", true);\r\n }\r\n System.out.println();\r\n\r\n }", "@Test\n public void updateDecline() throws Exception {\n }", "@Test\r\n public void testUnshare() {\n System.out.println(\"Test : John shares his file with Jane. Jane shares John's file with Harry. John unshares his file with Harry. Harry \" +\r\n \"cannot read John's file\");\r\n String userId = \"John\";\r\n String filePath = \"/home/John/shared/Jof1.txt\";\r\n String targetUserId = \"Jane\";\r\n String fileName = \"Jof1.txt\";\r\n File file = new File (filePath, userId, fileName);\r\n List<File> fileList = FileList.getFileList();\r\n fileList.add(file);\r\n service.shareFile(userId, targetUserId, filePath);\r\n try {\r\n assertNotNull(service.readFile(targetUserId, filePath));\r\n } catch (Exception e) {\r\n assertFalse(\"Should not throw any exception\", true);\r\n }\r\n\r\n service.shareFile(targetUserId, \"Harry\", filePath);\r\n try {\r\n assertNotNull(service.readFile(\"Harry\", filePath));\r\n } catch (Exception e) {\r\n assertFalse(\"Should not throw any exception\", true);\r\n }\r\n System.out.println();\r\n service.unshareFile(userId, \"Harry\", filePath);\r\n try {\r\n service.readFile(\"Harry\", filePath);\r\n } catch (UnauthorizedException e) {\r\n assertTrue(e instanceof UnauthorizedException);\r\n return;\r\n } catch (Throwable t){\r\n assertFalse(\"Other exception caught\", true);\r\n t.printStackTrace();\r\n }\r\n }", "@Test(expected = DoesNotOwnException.class)\n\tpublic void cannotPlayDevCardTest() throws DoesNotOwnException, CannotPlayException\n\t{\n\t\tp.playDevelopmentCard(c, game.getBank());\n\t}", "@Then(\"Assert the success of Attempt sending crafted records to DNS cache\")\npublic void assattemptsendingcraftedrecordstodnscache(){\n}", "@Test\n void test() {\n Game g = init(\"gen_2p_02\");\n List<Player> players = g.getData().getPlayers();\n wrappedIllegalCommand(g, players.get(0), \"tool 6\");\n wrappedLegalCommand(g, players.get(0), \"pick 1\");\n assertTrue(g.isUndoAvailable());\n wrappedLegalCommand(g, players.get(0), \"tool 6\");\n assertFalse(g.isUndoAvailable());\n lightestShade(g, players);\n notLightestShade(g, players);\n }" ]
[ "0.6124957", "0.6002859", "0.59548134", "0.5928713", "0.5905771", "0.58655703", "0.58487946", "0.5816199", "0.5799106", "0.5737278", "0.56953484", "0.5666773", "0.5638521", "0.5620033", "0.5596353", "0.55571526", "0.5553796", "0.55527663", "0.55495554", "0.55493784", "0.55448407", "0.5537879", "0.5527522", "0.5518203", "0.5516693", "0.5512168", "0.549658", "0.5490861", "0.54894745", "0.54734516", "0.54588425", "0.54474926", "0.5446246", "0.5433881", "0.54281217", "0.5427974", "0.54074466", "0.5405216", "0.540418", "0.5393809", "0.5393767", "0.539341", "0.53924036", "0.5382061", "0.5379331", "0.5368349", "0.53673947", "0.5362423", "0.53617805", "0.5361252", "0.53578377", "0.5357305", "0.534663", "0.5343364", "0.5342766", "0.5334604", "0.5332068", "0.53298426", "0.5325737", "0.5313539", "0.5313539", "0.53112394", "0.5309456", "0.53053325", "0.53044105", "0.53041965", "0.5300603", "0.5295664", "0.5291228", "0.52811146", "0.5280729", "0.52776086", "0.5277593", "0.52743477", "0.527388", "0.5272096", "0.5272004", "0.5271123", "0.5270315", "0.5267283", "0.5267098", "0.5266457", "0.5265982", "0.52624774", "0.5262022", "0.5260356", "0.525529", "0.52507496", "0.52499336", "0.5246817", "0.5242654", "0.52417123", "0.5240414", "0.52364993", "0.52292895", "0.52277946", "0.5225324", "0.5224817", "0.5223092", "0.5219132", "0.52180153" ]
0.0
-1
implemented but no funcitonality
public void mouseExited(MouseEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "public final void mo51373a() {\n }", "public abstract void mo70713b();", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\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\tprotected void getExras() {\n\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo56925d();", "private stendhal() {\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "public abstract Object mo26777y();", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "public abstract void mo27386d();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract Object mo1771a();", "public void mo4359a() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public abstract void mo27385c();", "public void method_4270() {}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "public abstract void mo6549b();", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract String mo118046b();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "public abstract String mo41079d();", "public abstract Object mo1185b();", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\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\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func01() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public abstract void mo35054b();", "protected void mo6255a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo55254a() {\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "protected boolean func_70814_o() { return true; }", "public void smell() {\n\t\t\n\t}", "private void m50366E() {\n }", "public void m23075a() {\n }", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "protected abstract Set method_1559();", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public abstract void mo42329d();", "public void mo21825b() {\n }", "public void mo21779D() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public abstract void mo30696a();", "public abstract String mo13682d();", "protected boolean func_70041_e_() { return false; }", "public abstract void mo27464a();", "public void mo12628c() {\n }", "public void mo21791P() {\n }", "private final void i() {\n }", "public void mo9848a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo21877s() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void mo21793R() {\n }", "public void mo115190b() {\n }", "void mo57277b();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public void mo21794S() {\n }", "public void mo21878t() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "public abstract void m15813a();", "public void mo97908d() {\n }", "public void gored() {\n\t\t\n\t}", "public abstract void mo42331g();", "@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 nghe() {\n\n\t}" ]
[ "0.68516415", "0.68516415", "0.6624817", "0.66203314", "0.6599649", "0.6459215", "0.6432879", "0.6419134", "0.6410098", "0.64086765", "0.63864785", "0.63657516", "0.6355935", "0.63394284", "0.6326466", "0.63016623", "0.63016623", "0.62966365", "0.6295546", "0.62843937", "0.62622625", "0.6259124", "0.62465376", "0.62278694", "0.6221926", "0.62173784", "0.6215763", "0.6211932", "0.61964464", "0.6195282", "0.6185476", "0.6166176", "0.6145306", "0.61446154", "0.61376816", "0.6137455", "0.61295253", "0.61178637", "0.61165786", "0.61155266", "0.61092937", "0.6108495", "0.61019003", "0.6101217", "0.6100044", "0.6100044", "0.6100044", "0.6100044", "0.6100044", "0.6100044", "0.6100044", "0.60996443", "0.60996443", "0.6098451", "0.6097126", "0.6096246", "0.6090215", "0.6088931", "0.6084088", "0.6077246", "0.60647696", "0.6051895", "0.6049758", "0.6039332", "0.6021106", "0.6020061", "0.6016767", "0.6014487", "0.6013215", "0.6007708", "0.6002477", "0.60014576", "0.5998569", "0.5989007", "0.59885544", "0.5988477", "0.59867", "0.59700894", "0.59639317", "0.5963166", "0.5940594", "0.5939616", "0.59355706", "0.593234", "0.59312135", "0.5929601", "0.5928498", "0.5927042", "0.59264594", "0.5913802", "0.59054357", "0.59042346", "0.5901955", "0.5901363", "0.589793", "0.5894912", "0.5886496", "0.5882956", "0.58804005", "0.58804005", "0.5878474" ]
0.0
-1
implemented but no functionality
public void mouseEntered(MouseEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n protected void prot() {\n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "private stendhal() {\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public abstract void mo70713b();", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "protected abstract Set method_1559();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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 }", "protected void mo6255a() {\n }", "public abstract Object mo1771a();", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public abstract void mo56925d();", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void nghe() {\n\n\t}", "public abstract Object mo1185b();", "public void method_4270() {}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public abstract Object mo26777y();", "public void mo55254a() {\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void apply() {\n }", "public abstract void mo27386d();", "@Override\n\tpublic void processing() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "public abstract void mo6549b();", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public abstract void mo27385c();", "public void mo12628c() {\n }", "private ProcessedDynamicData( ) {\r\n super();\r\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}" ]
[ "0.67391837", "0.67196316", "0.67196316", "0.6560799", "0.6550124", "0.64572704", "0.639092", "0.63862985", "0.63595617", "0.6350766", "0.6331985", "0.6314788", "0.6292037", "0.6284783", "0.6284783", "0.6271054", "0.6269297", "0.6236242", "0.62106234", "0.61951584", "0.6147464", "0.6134723", "0.6113568", "0.6095428", "0.6079474", "0.6079087", "0.6068618", "0.60655236", "0.606205", "0.6060916", "0.6055302", "0.60476625", "0.6047266", "0.6015056", "0.6008119", "0.59935516", "0.5990271", "0.5988637", "0.5987863", "0.59767205", "0.5974876", "0.595896", "0.5954631", "0.59499896", "0.5948883", "0.5948645", "0.59378105", "0.59338635", "0.59321886", "0.5930412", "0.5922499", "0.5918434", "0.5905071", "0.5899466", "0.58922416", "0.5884205", "0.5884205", "0.5884205", "0.5884205", "0.5884205", "0.5884205", "0.5884205", "0.5875257", "0.58554864", "0.5851631", "0.5849431", "0.5848833", "0.5848195", "0.5848195", "0.5845019", "0.58404565", "0.5839588", "0.58390796", "0.5838059", "0.58273554", "0.58252484", "0.5823624", "0.58177096", "0.58177096", "0.5815674", "0.5813835", "0.58068395", "0.5804177", "0.5798651", "0.5794222", "0.5793433", "0.57867587", "0.57659656", "0.57659656", "0.57658195", "0.5765448", "0.5760775", "0.57572", "0.5751933", "0.57514745", "0.57472813", "0.57472813", "0.57472813", "0.57472813", "0.57472813", "0.57472813" ]
0.0
-1
implemeted but no functionality
public void mouseReleased(MouseEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\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}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "protected boolean func_70814_o() { return true; }", "public void mo38117a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void stg() {\n\n\t}", "public void mo4359a() {\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void furyo ()\t{\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void prot() {\n }", "private final void i() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void function() {\n\t\t\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\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "public void Tyre() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void jugar() {}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "protected void h() {}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "Petunia() {\r\n\t\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\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}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "public void sinyal();", "public void mo55254a() {\n }", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public void miseAJour();", "public contrustor(){\r\n\t}", "public void mo9848a() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void leti() \n\t{\n\t}", "protected void mo6255a() {\n }", "protected Doodler() {\n\t}", "private void kk12() {\n\n\t}", "public void mo12930a() {\n }", "@Override\n public void memoria() {\n \n }", "Consumable() {\n\t}", "@Override\n\tpublic void pausaParaComer() {\n\n\t}", "protected boolean func_70041_e_() { return false; }", "public void mo21877s() {\n }", "public void m23075a() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public abstract void alimentarse();", "private void test() {\n\n\t}", "void berechneFlaeche() {\n\t}", "private zza.zza()\n\t\t{\n\t\t}", "public abstract void mo70713b();", "public void mo21825b() {\n }", "public void mo97908d() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void onderbreek(){\n \n }", "public void baocun() {\n\t\t\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic boolean livre() {\n\t\treturn true;\n\t}", "public abstract Object mo26777y();" ]
[ "0.6620887", "0.65499216", "0.6498789", "0.63853997", "0.63222593", "0.6317839", "0.6303151", "0.6276593", "0.6266924", "0.62444097", "0.62336546", "0.62336546", "0.6230373", "0.62103426", "0.6161855", "0.61616147", "0.61616147", "0.61537325", "0.61536425", "0.6146556", "0.6136321", "0.6132246", "0.612499", "0.60649395", "0.60628694", "0.6051318", "0.60506725", "0.6050079", "0.60389984", "0.6023245", "0.60208523", "0.6019173", "0.6015954", "0.5994176", "0.5982878", "0.59640497", "0.5963816", "0.59588253", "0.5943725", "0.59426326", "0.5926908", "0.59268665", "0.58962244", "0.5893488", "0.5893488", "0.5893488", "0.5893488", "0.5893488", "0.5893488", "0.5893488", "0.58909863", "0.5879739", "0.58764994", "0.5864949", "0.5855714", "0.5855583", "0.58387256", "0.58299893", "0.5821407", "0.58151925", "0.58064264", "0.58036256", "0.58011264", "0.58011264", "0.57955515", "0.57939994", "0.57927555", "0.57807404", "0.57677114", "0.57612795", "0.57606006", "0.57444316", "0.57359004", "0.5730845", "0.57275873", "0.57254493", "0.57181716", "0.5707875", "0.5689017", "0.5688727", "0.56756884", "0.56737244", "0.56726444", "0.566654", "0.5665195", "0.5664195", "0.56594867", "0.5659385", "0.5654221", "0.56541467", "0.56517327", "0.56509966", "0.5649251", "0.5646182", "0.56441116", "0.56369513", "0.5629791", "0.56268656", "0.5624441", "0.56169754", "0.5610811" ]
0.0
-1
implemented but no functionality
public void mousePressed(MouseEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n protected void prot() {\n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public int describeContents() { return 0; }", "private stendhal() {\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public abstract void mo70713b();", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void getData() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "protected abstract Set method_1559();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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 }", "protected void mo6255a() {\n }", "public abstract Object mo1771a();", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public abstract void mo56925d();", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void nghe() {\n\n\t}", "public abstract Object mo1185b();", "public void method_4270() {}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public abstract Object mo26777y();", "public void mo55254a() {\n }", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n public void apply() {\n }", "public abstract void mo27386d();", "@Override\n\tpublic void processing() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "public abstract void mo6549b();", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public abstract void mo27385c();", "public void mo12628c() {\n }", "private ProcessedDynamicData( ) {\r\n super();\r\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}" ]
[ "0.67391837", "0.67196316", "0.67196316", "0.6560799", "0.6550124", "0.64572704", "0.639092", "0.63862985", "0.63595617", "0.6350766", "0.6331985", "0.6314788", "0.6292037", "0.6284783", "0.6284783", "0.6271054", "0.6269297", "0.6236242", "0.62106234", "0.61951584", "0.6147464", "0.6134723", "0.6113568", "0.6095428", "0.6079474", "0.6079087", "0.6068618", "0.60655236", "0.606205", "0.6060916", "0.6055302", "0.60476625", "0.6047266", "0.6015056", "0.6008119", "0.59935516", "0.5990271", "0.5988637", "0.5987863", "0.59767205", "0.5974876", "0.595896", "0.5954631", "0.59499896", "0.5948883", "0.5948645", "0.59378105", "0.59338635", "0.59321886", "0.5930412", "0.5922499", "0.5918434", "0.5905071", "0.5899466", "0.58922416", "0.5884205", "0.5884205", "0.5884205", "0.5884205", "0.5884205", "0.5884205", "0.5884205", "0.5875257", "0.58554864", "0.5851631", "0.5849431", "0.5848833", "0.5848195", "0.5848195", "0.5845019", "0.58404565", "0.5839588", "0.58390796", "0.5838059", "0.58273554", "0.58252484", "0.5823624", "0.58177096", "0.58177096", "0.5815674", "0.5813835", "0.58068395", "0.5804177", "0.5798651", "0.5794222", "0.5793433", "0.57867587", "0.57659656", "0.57659656", "0.57658195", "0.5765448", "0.5760775", "0.57572", "0.5751933", "0.57514745", "0.57472813", "0.57472813", "0.57472813", "0.57472813", "0.57472813", "0.57472813" ]
0.0
-1
has to be implemented but does not actually do anything
public void mouseDragged(MouseEvent e){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\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\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "protected void mo6255a() {\n }", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public void mo4359a() {\n }", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n public void memoria() {\n \n }", "private void m50366E() {\n }", "public abstract void mo70713b();", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void method() {\n\t\r\n\t}", "public void mo38117a() {\n }", "@Override\n\tpublic void dosomething() {\n\t\t\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}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private final void i() {\n }", "public final void mo91715d() {\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n public void init() {\n }", "@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void doIt() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public void gored() {\n\t\t\n\t}", "public void m23075a() {\n }", "@Override\n\tpublic void processing() {\n\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void init() {\n\n }", "public abstract void mo56925d();", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "void berechneFlaeche() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void processingInstruction() {\n\t\t\n\t}", "@Override\n void init() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\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\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void apply() {\n\t\t\n\t}", "public void mo21779D() {\n }" ]
[ "0.71757174", "0.70603657", "0.6993608", "0.6993608", "0.6960684", "0.6955817", "0.6840552", "0.68141025", "0.6797506", "0.6797506", "0.67906606", "0.6777425", "0.67178816", "0.6713588", "0.6694152", "0.6690531", "0.6690531", "0.66873986", "0.6668496", "0.66635597", "0.66546786", "0.66425914", "0.6638694", "0.6636604", "0.6625892", "0.6601412", "0.6577043", "0.6572922", "0.6566032", "0.65266055", "0.6526487", "0.64995545", "0.64937824", "0.64933664", "0.64523375", "0.6439602", "0.6435158", "0.6420747", "0.64150894", "0.6407899", "0.6393156", "0.6390065", "0.638859", "0.63870084", "0.63795197", "0.63753724", "0.63703525", "0.63699025", "0.6365652", "0.6349141", "0.634625", "0.6345876", "0.63283265", "0.63283265", "0.6316472", "0.6314078", "0.6310158", "0.6304473", "0.6288012", "0.6282285", "0.62784094", "0.6275079", "0.62716377", "0.6260271", "0.6259276", "0.62591237", "0.6259079", "0.62562984", "0.62562984", "0.62562984", "0.62562984", "0.62562984", "0.62562984", "0.6251474", "0.6246197", "0.6244609", "0.6243144", "0.6236382", "0.62356836", "0.6220205", "0.62188977", "0.6217979", "0.6215708", "0.6213706", "0.6210264", "0.6209844", "0.61980456", "0.6195172", "0.6195172", "0.6195172", "0.6195172", "0.6195172", "0.6195172", "0.6195172", "0.61891115", "0.61891115", "0.61891115", "0.61849624", "0.61849624", "0.6178951", "0.61771274" ]
0.0
-1
Return the formatted date string (i.e. "4:30 PM") from a Date object.
private String formatTime(Date dateObject) { @SuppressLint("SimpleDateFormat") SimpleDateFormat timeFormat = new SimpleDateFormat("h:mm a"); return timeFormat.format(dateObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getStrDate(Date date) {\n //TODO get date\n SimpleDateFormat formatter;\n if (DateUtils.isToday(date.getTime())) {\n formatter = new SimpleDateFormat(\"HH:mm\");\n return formatter.format(date);\n }\n formatter = new SimpleDateFormat(\"MMM dd\");\n return formatter.format(date);\n }", "public static String convertDateToString(Date aDate) {\n\t\treturn getDateTime(getDatePattern(), aDate);\n\t}", "public static synchronized String formatDate(Date d) {\n return dateFormat.format(d);\n }", "private String formatDate(Date date){\n SimpleDateFormat format = new SimpleDateFormat(\"dd-MM-yyyy HH:mm\", Locale.getDefault());\n\n return format.format(date);\n }", "public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}", "public static String dateToString(Date date)\r\n/* 19: */ {\r\n/* 20: 23 */ return sdfDate.format(date);\r\n/* 21: */ }", "public String getDateString(){\n return Utilities.dateToString(date);\n }", "public static String getDateTime(Date date)\n\t{\n\t\treturn getFormatString(date, getDateTimeFormat());\n\t}", "public static String toStringFormat_4(Date date) {\r\n\r\n\t\treturn dateToString(date, DATE_FORMAT_4);\r\n\t}", "public String getDateString() {\n DateFormat format = DateFormat.getDateInstance(DateFormat.FULL, Locale.getDefault());\n return format.format(mDate);\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 }", "public String formatDate(Date date) {\n\t\tString formattedDate;\n\t\tif (date != null) {\n\t\t\tformattedDate = simpleDateFormat.format(date);\n\t\t\tformattedDate = formattedDate.substring(0,\n\t\t\t\t\tformattedDate.length() - 5);\n\t\t} else {\n\t\t\tformattedDate = Constants.EMPTY_STRING;\n\t\t}\n\t\treturn formattedDate;\n\t}", "public String convertDateToString(Date date) {\n\t\tString dateTime = SDF.format(date);\n\t\treturn dateTime;\t\n\t}", "private String convertDate2String(Date date) {\n DateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy HH:mm:ss\");\n return dateFormat.format(date);\n }", "private String dateToString(Date d){\r\n\t\tSimpleDateFormat fmt = new SimpleDateFormat(DATE_FORMAT);\r\n\t\treturn fmt.format(d);\r\n\t}", "public static String getDate(Date date)\n\t{\n\t\treturn getFormatString(date, getDateFormat());\n\t}", "public static String formatterDate(Date date){\n\t\tString retour = null;\n\t\tif(date != null){\n\t\t\tretour = dfr.format(date);\n\t\t}\n\t\treturn retour;\n\t}", "public static String formatDateToString(Date dateObj) {\n return formatDateToString(dateObj, DATE_FORMAT.DEFAULT);\n }", "public static String formatDate(Date date) {\n return DateFormat.getDateFormat(BaracusApplicationContext.getContext()).format(date);\n }", "public static String formatDate(Date date) {\n\t\tString newstring = new SimpleDateFormat(\"MM-dd-yyyy\").format(date);\n\t\treturn newstring;\n\t}", "public static String getDateAsString(Date date) {\r\n\t\tSimpleDateFormat dateform = new SimpleDateFormat(_dateFormat);\r\n\r\n\t\treturn dateform.format(date);\r\n\t}", "public static String getStandardDate(Date date){\n\t\t\n\t\tif(date == null)\n\t\t\tthrow new RuntimeException(\"Given date object is null...\");\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\treturn format.format(date.getTime());\n\t}", "public String getFormattedDateOnly(DateTime date) {\n String datePattern = context.getString(R.string.general_date_pattern_date_only);\n DateTimeFormatter dtfOut = DateTimeFormat.forPattern(datePattern);\n return dtfOut.print(date);\n }", "public String getPrintFormattedDate() {\n return this.date.format(DateTimeFormatter.ofPattern(\"MMM d yyyy\"));\n }", "public String toDate(Date date) {\n DateFormat df = DateFormat.getDateInstance();\r\n String fecha = df.format(date);\r\n return fecha;\r\n }", "private String formatDate (Date date) {\n SimpleDateFormat sdf = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss\", Locale.ENGLISH);\n return sdf.format(date);\n }", "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 String formatDateTime(Date date) {\n String result = \"\";\n if (date != null) {\n result = DateUtility.simpleFormat(date, MEDIUM_DATETIME_FORMAT);\n }\n return result;\n }", "public String getStringDate(){\n String finalDate = \"\";\n Locale usersLocale = Locale.getDefault();\n DateFormatSymbols dfs = new DateFormatSymbols(usersLocale);\n String weekdays[] = dfs.getWeekdays();\n int day = date.get(Calendar.DAY_OF_WEEK);\n String nameOfDay = weekdays[day];\n\n finalDate += nameOfDay + \" \" + date.get(Calendar.DAY_OF_MONTH) + \", \";\n\n String months[] = dfs.getMonths();\n int month = date.get(Calendar.MONTH);\n String nameOfMonth = months[month];\n\n finalDate += nameOfMonth + \", \" + date.get(Calendar.YEAR);\n\n return finalDate;\n }", "public static String dateToString(Date date) {\n\t\tDateTime dt = new DateTime(date.getTime());\n\t\tDateTimeFormatter fmt = DateTimeFormat.forPattern(SmartMoneyConstants.DATE_FORMAT);\n\t\tString dtStr = fmt.print(dt);\n\n\t\treturn dtStr;\n\t}", "public static String getDate(Date aDate) {\n\t\tSimpleDateFormat df;\n\t\tString returnValue = \"\";\n\n\t\tif (aDate != null) {\n\t\t\tdf = new SimpleDateFormat(getDatePattern());\n\t\t\treturnValue = df.format(aDate);\n\t\t}\n\n\t\treturn (returnValue);\n\t}", "public String getFormatedDate(Date date) {\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/mm/yyyy\");\r\n\t\treturn sdf.format(date);\r\n\t}", "public static String getTimeString() {\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss yyyy\");\n return formatter.format(new java.util.Date());\n }", "public String getDateTime(final Date date) {\r\n\t\tDateFormat df = getDateTimeFormat();\r\n\t\tsynchronized (df) {\r\n\t\t\treturn df.format(date);\r\n\t\t}\r\n\t}", "protected String formatDateToString(Date date) {\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy.MM.dd HH:mm:ss\");\n\t\tString formatted = format.format(date);\n\t\treturn formatted;\n\t}", "public static String timeToString(Date date)\r\n/* 24: */ {\r\n/* 25: 31 */ return sdfTime.format(date);\r\n/* 26: */ }", "public static String formatDateToDefault(Date date)\n\t{\n\t\tDateFormat format = new SimpleDateFormat(\"MMM dd, yyyy hh:mm a\", Locale.getDefault());\n\t\tformat.setTimeZone(TimeZone.getDefault());\n\t\tString rv = format.format(date);\n\t\treturn rv;\n\t}", "public String formatDate (Date date){\r\n\t\tDateFormat df = new SimpleDateFormat(\"EEE, d MMM yyyy HH:mm:ss z\", Locale.ENGLISH);\r\n\t\treturn df.format(date);\r\n\t}", "public static String convert( Date date )\r\n {\r\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat( \"yyyy-MM-dd\" );\r\n\r\n return simpleDateFormat.format( date );\r\n }", "public static String formatDate(Date date) {\n final SimpleDateFormat formatter = new SimpleDateFormat(\"MM-dd-yyyy\");\n return formatter.format(date);\n }", "public String getEntryDateString() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy MMM dd\");\n return sdf.format(entryDate.getTime());\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 formatDateForDetails(Timestamp date) {\n SimpleDateFormat format = new SimpleDateFormat(\"dd MMM yyyy | hh:mm aaa\", Locale.getDefault());\n return format.format(new Date(date.getTime()));\n }", "public static String getFormattedDateForVisualization(Date date) {\n SimpleDateFormat curFormater = new SimpleDateFormat(\"EEE, d MMM yyyy HH:mm\");\n String newDateStr = curFormater.format(date);\n return newDateStr;\n }", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "private String stringifyDate(Date date){\n\t\tDateFormat dateFormatter = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\treturn dateFormatter.format(date);\n\t}", "public String formatDate(Date date) {\n String result = \"\";\n if (date != null) {\n result = DateUtility.simpleFormat(date, MEDIUM_DATE_FORMAT);\n }\n return result;\n }", "public static String getTime(Date date)\n\t{\n\t\treturn getFormatString(date, getTimeFormat());\n\t}", "private String formatDate(Date date) {\n String resultDate;\n SimpleDateFormat dateFormat;\n dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n resultDate = dateFormat.format(date);\n return resultDate;\n }", "public String convertDateToString(){\n\t\tString aDate = \"\";\n\t\taDate += Integer.toString(day);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(month);\n\t\taDate += \"/\";\n\t\taDate += Integer.toString(year);\n\t\treturn aDate;\n\t}", "public static String dateToDateTime(Date date) {\n DateTime dateTime = new DateTime(date);\n return DATE_TIME_FORMATTER.print(dateTime);\n }", "public static String formatDate(Date time) {\n\t\tSimpleDateFormat df = new SimpleDateFormat(PreferenceProperties.JMS_DATE_FORMAT);\n\t\treturn df.format(time);\n\t}", "public static String dateToString(Date date){\r\n SimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n return df.format(date);\r\n }", "private String getDate() {\n\t\tSimpleDateFormat parseFormat = new SimpleDateFormat(\"hh:mm a\");\n\t\tDate date = new Date();\n\t\tString s = parseFormat.format(date);\n\t\treturn s;\n\t}", "public String getFormattedTimeOnly(DateTime date) {\n String datePattern = context.getString(R.string.general_date_pattern_time_only);\n DateTimeFormatter dtfOut = DateTimeFormat.forPattern(datePattern);\n return dtfOut.print(date);\n }", "public String dateToString() {\n\t\treturn new String(year + \"/\"\n\t\t\t\t+ month + \"/\"\n\t\t\t\t+ day);\n }", "public static String formatDate(java.sql.Date date){\n\t\treturn date!=null?toTheString(date):\"\";\n\t}", "public static String getDate()\n {\n Date date = new Date();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n return dateFormat.format(date);\n }", "private static String timeFor(Date date)\n\t{\n\t\tDateFormat df = new InternetDateFormat();\n\t\tString theTime = df.format(date);\n\t\treturn theTime;\n\t}", "public String formatDateAndTime(String date){\n\n return dateTimeFormatter.parse(date).toString();\n\n }", "private String formatDate(Date dateObject) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\");\n return dateFormat.format(dateObject);\n }", "private String formatTime(Date dateObject) {\r\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"h:mm a\");\r\n return timeFormat.format(dateObject);\r\n }", "private String getFecha() {\n\t\tLocalDateTime myDateObj = LocalDateTime.now();\n\t\tDateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n\t\tString formattedDate = myDateObj.format(myFormatObj);\n \n\t\treturn formattedDate;\n }", "public static String formatDate(Date d) {\n\t\tint month = d.getMonth() + 1;\n\t\tint dayOfMonth = d.getDate();\n\t\tint year = d.getYear() + 1900;\n\t\tString y = \"\" + year;\n\t\tString m = \"\" + month;\n\t\tString dom = \"\" + dayOfMonth;\n\t\tif (month < 10) {\n\t\t\tm = \"0\" + m;\n\t\t}\n\t\tif (dayOfMonth < 10) {\n\t\t\tdom = \"0\" + dom;\n\t\t}\n\t\treturn m + \"/\" + dom + \"/\" + y.substring(2);\n\t}", "private String formatDate(Date dateObject) {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\", Locale.getDefault());\n return dateFormat.format(dateObject);\n }", "public String getFormattedDateShort(DateTime date) {\n String datePattern = context.getString(R.string.general_date_pattern_short);\n DateTimeFormatter dtfOut = DateTimeFormat.forPattern(datePattern);\n return dtfOut.print(date);\n }", "public static String dateOnly() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "private 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 static String formatDate(Date date, String userId)\n\t{\n\t\tDateFormat format = new SimpleDateFormat(\"MMM dd, yyyy hh:mm a\", getPreferredLocale(userId));\n\t\tformat.setTimeZone(getPreferredTimeZone(userId));\n\t\tString rv = format.format(date);\n\t\treturn rv;\n\t}", "public static String formatDateTime(String date) {\n\t\tif(date == null) return \"\";\n\t\tdate = date.trim();\n\t\tif(date.equals(\"&nbsp;\")) return \"\";\n\t\tif (date.length() == 0 || date.length() != 14) return date;\n\t\tdate = date.substring(0,4) + \"/\" + date.substring(4,6) \n\t\t\t\t+ \"/\" + date.substring(6,8)\n\t\t\t\t+\" \"+date.substring(8,10)\n\t\t\t\t+\":\"+date.substring(10,12)\n\t\t\t\t+\":\"+date.substring(12,14);\n\t\treturn date;\n\t}", "private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMddyyy\");\n\t\tString dateStr = dateFormat.format(date);\n\t\treturn dateStr;\n\t}", "public static String getDateTime() {\n\t\tString sDateTime=\"\";\n\t\ttry {\n\t\t\tSimpleDateFormat sdfDate = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\t\tSimpleDateFormat sdfTime = new SimpleDateFormat(\"HH:mm:ss\");\n\t\t\tDate now = new Date();\n\t\t\tString strDate = sdfDate.format(now);\n\t\t\tString strTime = sdfTime.format(now);\n\t\t\tstrTime = strTime.replace(\":\", \"-\");\n\t\t\tsDateTime = \"D\" + strDate + \"_T\" + strTime;\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(e);\n\t\t}\n\t\treturn sDateTime;\n\t}", "private String formatDate(Date dateObject) {\r\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"LLL dd, yyyy\");\r\n return dateFormat.format(dateObject);\r\n }", "public static String ConvertToStandardtime(Date date) {\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\tformat.setLenient(false);\r\n\t\tif (date == null)\r\n\t\t\treturn \"\";\r\n\t\tString strDate = format.format(date);\r\n\t\treturn strDate;\r\n\t}", "public static String getDbDateString(Date date){\n SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);\n return sdf.format(date);\n }", "public static synchronized String utilDateToString(java.util.Date date) {\r\n\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n return sdf.format(date.getTime());\r\n }", "public static String getLegibleDate(Date date) {\n\n\t\tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yy\"); // \"d MMM yyyy hh:mm aaa\"\n\t\tString dateInit = simpleDateFormat.format(date);\n\n\t\n\n\t\treturn dateInit;\n\t}", "public static String formatDate(Date date) {\n\t\tDateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);\n\n\t\tif (dateFormat instanceof SimpleDateFormat) {\n\t\t\tSimpleDateFormat sdf = (SimpleDateFormat) dateFormat;\n\t\t\t// we want short date format but with 4 digit year\n\t\t\tsdf.applyPattern(sdf.toPattern().replaceAll(\"y+\", \"yyyy\").concat(\" z\"));\n\t\t}\n\n\t\treturn dateFormat.format(date);\n\t}", "public static String getDbDateString(Date date){\n SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);\n return sdf.format(date);\n }", "protected final static String getDateStamp() {\n\n\t\treturn\n\n\t\tnew SimpleDateFormat(\"MMM d, yyyy h:mm:ss a zzz\").format(new Date());\n\n\t}", "public static String getISOFormattedTime( Date date ) {\n return sdf.format( date ).replace( ' ', 'T' );\n }", "public String getDateAsString(){\n\t\t//\tGet Date\n Date date = getDate();\n if(date != null)\n \treturn backFormat.format(date);\n\t\treturn null;\n\t}", "public static String asString (Date date, TimeZone timezone) {\n SimpleDateFormat formatter = new SimpleDateFormat(\"EEE, MM MMM yyyy HH:mm:ss z\");\n \n StringBuffer buffer = new StringBuffer();\n \n formatter.format( date, buffer, new FieldPosition( DateFormat.TIMEZONE_FIELD ) );\n \n return buffer.toString();\n }", "public String getDateTimeFormated(Context context){\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\"\n , context.getResources().getConfiguration().locale);\n sdf.setTimeZone(TimeZone.getDefault());\n return sdf.format(new Date(mDateTime));\n //setting the dateformat to dd/MM/yyyy HH:mm:ss which is how the date is displayed when a dream is saved\n }", "public String getDateString() {\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH); // month is stored from 0-11 so adjust +1 for final display\n int day_of_month = date.get(Calendar.DAY_OF_MONTH);\n return String.valueOf(month + 1) + '/' + String.valueOf(day_of_month) + '/' + year;\n }", "public static String formatDate(String strDate) {\n return formatDate(strDate, false);\n }", "public static String getFormatedDate(Date date, Locale locale) {\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd-nn-aaaa\"); \n \treturn formatter.format(date);\n }", "java.lang.String getDate();", "java.lang.String getToDate();", "public static String getFormattedDateString(Date date, String format) {\n Calendar cal = Calendar.getInstance();\n TimeZone timeZone = cal.getTimeZone();\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(format);\n dateFormat.setTimeZone(timeZone);\n\n return dateFormat.format(date);\n }", "public static String getDate() {\n return getDate(System.currentTimeMillis());\n }", "public static String formatDateToDateTimePickerView(Date date) {\r\n if (date != null) {\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"dd-MM-yyyy hh:mm:ss\");\r\n return formatter.format(date);\r\n }\r\n return \"\";\r\n }", "public static String formatterDateUS(Date date){\n\t\tString retour = null;\n\t\tif(date != null){\n\t\t\tretour = df.format(date);\n\t\t}\n\t\treturn retour;\n\t}", "public static String formatDateOnly(Date date, String userId)\n\t{\t\t\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMM dd, yyyy\", getPreferredLocale(userId));\n\t\tdateFormat.setTimeZone(getPreferredTimeZone(userId));\n\t\tString rv = dateFormat.format(date);\n\t\treturn rv;\n\t}", "public String getUserDateString() {\n\t\tString[] tmpArr = this.getUserDate();\n\t\tString year = tmpArr[0];\n\t\tString month = tmpArr[1];\n\t\tString day = tmpArr[2];\n\t\tString out = year + \"/\" + month + \"/\" + day;\n\t\treturn out;\n\t}", "private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }", "private String getDateTime() {\n DateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy HH:mm\");\n Date date = new Date();\n return dateFormat.format(date);\n }", "public static final String getDate(Date aDate,String formate) {\r\n SimpleDateFormat df = null;\r\n String returnValue = \"\";\r\n\r\n if (aDate != null) {\r\n df = new SimpleDateFormat(formate);\r\n returnValue = df.format(aDate);\r\n }\r\n\r\n return (returnValue);\r\n }", "public String getTime(DateTime date) {\n DateTimeFormatter time = DateTimeFormat.forPattern(\"hh:mm a\");\n return date.toString(time);\n }", "public String convertDayToString(Date date) {\n SimpleDateFormat formatDate = new SimpleDateFormat(\"yyyy-MM-dd\");\n return formatDate.format(date);\n }" ]
[ "0.7290456", "0.70799637", "0.70657235", "0.7013248", "0.6976909", "0.6924429", "0.69046956", "0.6830554", "0.681327", "0.67951465", "0.67642665", "0.675734", "0.6752738", "0.6728155", "0.6720861", "0.671131", "0.6699011", "0.66795343", "0.66653395", "0.66183436", "0.6611428", "0.6603773", "0.659899", "0.65657914", "0.656358", "0.6558775", "0.65550375", "0.65408605", "0.65401524", "0.6540132", "0.6519137", "0.6517098", "0.65168875", "0.65151626", "0.6501056", "0.649937", "0.6496186", "0.64941543", "0.6484078", "0.6471507", "0.6470668", "0.64547765", "0.6449725", "0.64462215", "0.644279", "0.64395386", "0.64234865", "0.64061254", "0.6402737", "0.6400854", "0.63809806", "0.6373388", "0.63726366", "0.63607335", "0.6360564", "0.63481444", "0.6347118", "0.6344721", "0.6334419", "0.6333979", "0.63286906", "0.6324202", "0.6322319", "0.631263", "0.6311513", "0.6308291", "0.6302858", "0.6296161", "0.628943", "0.6281282", "0.6279254", "0.626472", "0.62631595", "0.62618285", "0.62515765", "0.62479275", "0.6240038", "0.62382245", "0.6232963", "0.62232727", "0.62164384", "0.62047327", "0.6193166", "0.618309", "0.6169601", "0.61662817", "0.61630255", "0.6161323", "0.6148536", "0.6142626", "0.61403227", "0.6133445", "0.61226", "0.6115922", "0.61138386", "0.6112742", "0.6105467", "0.6090857", "0.60887223", "0.60874987" ]
0.64838666
39
This is our own custom constructor (it doesn't mirror a superclass constructor). The context is used to inflate the layout file, and the list is the data we want to populate into the lists.
public EarthquakeAdapter(Activity context, ArrayList<Earthquake> earthquakes) { super(context, 0, earthquakes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PassengerAdapter(Context context, List<PassengerDataVo> list) {\n\t\tarrayList = list;\n\t\tthis.context = context;\n\t\tinflater = LayoutInflater.from(context);\n\t}", "public ItemListAdapter(Context inContext) {\n context = inContext;\n }", "public PersonneAdapter(Context context, List<Personne> aListP) {\n mContext = context;\n mListP = aListP;\n mInflater = LayoutInflater.from(mContext);\n\n\n }", "public FishListAdapter (Context context) {\n\n super(context, R.layout.faqlist);//calls the superclass constructor\n list = new ArrayList<Fish>();//initalize the list as Fish\n Log.d(\"Adapter\", \"constructor\");\n }", "public DataPenemuanListAdapter(Context context) { mInflater = LayoutInflater.from(context); }", "public NameAdapter(Context context, List<NameListBean> datas) {\n this.datas = datas;\n inflater = LayoutInflater.from(context);\n }", "public FeedAdapter(Context context, List<DailyInfo.IssueListBean.ItemListBean> list) {\n super(context);\n this.list = list;\n }", "public ListViewCostumeAdapter(Context context, List<App> data) {\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n this.context = context;\n }", "public MyAdapter(Context context, List<ListLocationsQuery.Item> locations) {\n this.mContext = context;\n this.locations = locations;\n this.mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n }", "TaskukirjaListAdapter(Context context) { mInflater = LayoutInflater.from(context); }", "public MyListAdapter(Context context, int resource, List<CompanyUser> companyObjList) {\n super(context, resource, companyObjList);\n this.context = context;\n this.resource = resource;\n this.companyObjList = companyObjList;\n }", "public PlayerAdapter(Context context, List<Player> playerList) {\n this.context = context;\n this.playerList = playerList;\n }", "public CountryListAdapter(Context context) {\n mInflater = LayoutInflater.from(context);\n mcontext = context;\n\n }", "public CardAdapter(Context context, List<information> informationList){\n this.context = context;\n this.informationList = informationList;\n }", "public ExamsAdapter(AppCompatActivity context, List<Exam> data) {\n this.LayoutInflater = LayoutInflater.from(context);\n this.context = context;\n this.mData = data;\n }", "public ThingAdapter(Context context) {\n mInflater = LayoutInflater.from(context);\n this.context = context;\n }", "public Adapter(Context context, ArrayList<String> values) {\n\t\t\t\n\t\t\tsuper(context, R.layout.list_layout_no_image, values);\t\t\n\t\t\tthis.values = values;\n\t\t\tthis.context = context;\n//\t\t\tthis.values = values;\n\t\t}", "public CategorysAdapter(Context context, List<CategorysModel.Categorys> list) {\n this.context = context;\n this.list = list;\n }", "public ReviewsAdapter(Context context, List<ReviewData> list) {\n this.reviewDataList = list;\n }", "public MyAdapter(Context context, ArrayList<String> dataset) {\n mContext = context;\n mDataset = dataset;\n setHasStableIds(true);\n }", "public MyRecyclerViewAdapter(Context context, ArrayList<itemView> data) {\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n }", "public MyAdapter(Context mContext, List<Matches> mModelList1) {\n this.mContext = mContext;\n this.mModelList = mModelList1;\n }", "public MyAdapter(List<Brawler> listValues, Context context) {\n this.listValues = listValues;\n listValuesFull = new ArrayList<>(listValues); // permet d'avoir une copie de la liste des brawlers listValues (on évite ainsi d'avoir un même liste qui pointe vers la même adresse)\n this.context = context;\n }", "public WordListAdapter(Context context) { mInflater = LayoutInflater.from(context); }", "public FollowAdapter(Context context, List<String> list) {\r\n entries = list;\r\n mContext = context;\r\n }", "public MyAdapterTopics(List<Topics> listItems, Context context) {\n this.listItems = listItems;\n this.context = context;\n }", "public NotificationRecyclerAdapter(ArrayList<Notification> arrayList, Context context){\n this.arrayList = arrayList;\n this.context = context;\n }", "CardAdapter(List<Word> mList, Context context, int currentList, MainActivity mainActivity) {\n this.mList = mList;\n this.context = context;\n this.currentList = currentList;\n this.mainActivity = mainActivity;\n }", "public MyAdapter(@NonNull Context context, @LayoutRes int resource, @NonNull List<Model> objects) {\n super(context,resource,objects);\n this.context=context;\n this.resource=resource;\n modelList=objects;\n inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n }", "QuestionListAdapter(Context context) { mInflater = LayoutInflater.from(context); }", "public WordAdapter(Activity context, ArrayList<Word> numbers, int resourceId)\n {\n //calls constructor of superclass with a 0 because the views\n // will be manually inflated\n super(context, 0, numbers);\n mResourceID = resourceId;\n }", "public DailyRecommendationsAdapter(Context context, ArrayList<TimelineModel> list, Display display)\n {\n this.context = context;\n this.list = list;\n this.display = display;\n }", "public ModsAdapter(List<ModsItem> itemList, Context context) {\n mItemList = itemList;\n mContext = context;\n }", "public news_adapter(Context context,ArrayList<data> dataset) {\n mData=dataset;\n mInflater = LayoutInflater.from(context);\n }", "public Tracklist(Activity context, List<Track> track) {\n super(context, R.layout.layout_track,track);\n\n this.context = context;\n this.track = track;\n }", "public IngredientAdapter(@NonNull Context context, ArrayList<Ingredient> list){\n super(context, 0, list);\n mContext = context;\n ingredientList = list;\n }", "public MenuAdapter(Activity activity, Context context, ArrayList<Dish> list, int menuNumber) {\n this.context = context;\n this.activity = activity;\n this.mInflater = LayoutInflater.from(context);\n this.list = list;\n this.menuNumber = menuNumber;\n fullList = new ArrayList<>(list);\n }", "public ButtonAdapter(Context context, List<planListDb> list) {\n\t\tinflater = LayoutInflater.from(context);\n\t\tmcontext = context;\n\t\tthis.list = list;\n\n\t}", "public EntityAdapter(List<String> entityList, Context mContext){\n this.entityList = entityList;\n this.mContext = mContext;\n }", "public AdapterFish(Context context, List<DataFish2> data5) {\n this.context = context;\n inflater = LayoutInflater.from(context);\n this.data2 = data5;\n }", "MyRecyclerViewAdapter(Context context, List<Integer> data) {\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n }", "protected EntriesBaseAdapter(Context context, ArrayList<String> sortedFilesArrList, ArrayList<String> tag1ArrList, ArrayList<String> tag2ArrList, ArrayList<String> tag3ArrList,\n ArrayList<Boolean> favArrList, CustomAttributes userUIPreferences) {\n super(context, userUIPreferences);\n // transfers all the info from the calling activity to this adapter.\n this.sortedFilesArrList = new ArrayList<>(sortedFilesArrList);\n this.tag1ArrList = new ArrayList<>(tag1ArrList);\n this.tag2ArrList = new ArrayList<>(tag2ArrList);\n this.tag3ArrList = new ArrayList<>(tag3ArrList);\n this.favArrList = new ArrayList<>(favArrList);\n\n setupData();\n }", "public SubgenreAdapter(Context context, List<Subgenre> data) {\n this.mInflater = LayoutInflater.from(context);\n this.subgenreList = data;\n }", "public UserAdapter(@NonNull Context context, @SuppressLint(\"SupportAnnotationUsage\") @LayoutRes ArrayList<User> list) {\n super(context, 0 , list);\n mContext = context;\n usersList = list;\n }", "public MoodAdapter(Context context, int layout_timeline_list, ArrayList<Mood> moodTimeline){\n super(context, layout_timeline_list, moodTimeline);\n this.filteredMoodTimeline = moodTimeline; //current 'filter' is whatever is passed in.\n this.context = context;\n this.layout_timeline_list = layout_timeline_list;\n\n }", "public FollowAdapter(List<FollowObject> usersList, Context context){\r\n this.usersList = usersList;\r\n this.context = context;\r\n }", "public UsersAdapter(Context context, List<User> usersList) {\n usersManipulator = (UsersManipulator) context;\n this.mContext = context;\n contentUsersList = usersList;\n }", "public PlanFormulateListAdapter(List<PlanListBean> data, Context context) {\n super(data);\n addItemType(PlanListBean.START, R.layout.cdqj_patrol_plan_my_start_item);\n addItemType(PlanListBean.OTHER, R.layout.cdqj_patrol_plan_my_other_item);\n this.context = context;\n }", "public CountryAdapter(Context context, ArrayList<Country> countryList){\n countryArrayList = countryList;\n }", "public SongAdapter(Context context, ArrayList<Song> songs) {\n super(context, 0, songs);\n }", "public List(int arg1, int arg2, String arg3, int arg4) {\n titleResId = arg1;\n summaryResId = arg2;\n intent = arg3;\n type = arg4;\n }", "public ModelRecyclerAdapter(Context context, ArrayList<Model> myDataset) {\n mDataset = myDataset;\n mContext = context.getApplicationContext();\n mInflater = LayoutInflater.from(context);\n }", "public ProjectItemAdapter(Context context)\r\n {\r\n super();\r\n \r\n inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n projects = new ArrayList<Project>();\r\n }", "public WordListAdapter(Context context, List<Word> words) {\n\t\tsuper(context, android.R.id.content, words);\n\t\tthis.context = context;\n\t\tthis.words = words;\n\t}", "public MsgAdapter(List<Msg> myItemList, Context mContext) {\n this.itemList = myItemList;\n this.mContext = mContext;\n }", "public TaskAdapter(Context context, ArrayList<Task> tasks) {\n\t taskList = tasks;\n\t mInflater = LayoutInflater.from(context);\n\t }", "public ListAdapter(Context ctx, List<Product> product) {\n super(ctx, -1, product);\n this.productList = product;\n listener = (Listener) getContext();\n }", "public PostsAdapter(Context context, List<Post> posts) {\n this.context = context;\n this.posts = posts;\n }", "public HorizontalListView(Context context) {\n this(context, null);\n\n }", "public ExpandableListAdapter(Context context, ArrayList<DefinitionListVO> definationList) {\r\n\t this._context = context;\r\n\t this.definationList = definationList;\r\n\t imageLoader=new BitmapImageLoader(this._context);\r\n\t }", "public MyAdapter(Context context, ArrayList Etab) {\n this.context = context;\n this.Hospitals = Etab;\n\n }", "protected CoolPagedListAdapter(Context context) {\n super(diffCallback);\n this.context = context;\n }", "public MemberAdapter(Context context) {\r\n mContext = context;\r\n mVoList = new ArrayList<>();\r\n }", "public TownAdapter(Activity context, ArrayList<Town> towns) {\n // Here, we initialize the ArrayAdapter's internal storage for the context and the list.\n // the second argument is used when the ArrayAdapter is populating a single TextView.\n // Because this is a custom adapter for four TextViews the adapter is not\n // going to use this second argument, so it can be any value. Here, we used 0.\n super(context, 0, towns);\n }", "public NoDoListAdapter(Context context) {\n noDoInflater = LayoutInflater.from(context);\n }", "public NewsArticleAdapter(Context mContext, int layoutResourceId, ArrayList<NewsArticleObject> newsArticleList) {\n super();\n this.layoutResourceId = layoutResourceId;\n this.mContext = mContext;\n this.newsArticleList = newsArticleList;\n\n }", "public ExampleDetailsAdapter(Context context, ArrayList<ExampleDetailObjects> objects) {\n super(context, R.layout.detail_itemtype_item, objects);\n this.context = context;\n this.objects = objects;\n }", "public FenceAdapt(Context context, List<MyGeoFenceCont> listItems) {\n\t\tbaseAct = (Base) context;\n\t\tlistContainer = LayoutInflater.from(context);\n\t\tmListItems = listItems;\n\t\t//isSelected = new HashMap<Integer, Boolean>();\n\t}", "UserRecyclerView(Context context, List<User> userList){\n this.context=context;\n this.userList = userList;\n this.mInflater = LayoutInflater.from(context);\n }", "public LessonListAdapter(Context ctx, int resourceId, List<Lesson> objects) {\n super( ctx, resourceId, objects );\n resource = resourceId;\n inflater = LayoutInflater.from( ctx );\n context = ctx;\n\n }", "public ProductAdapter(Context context, ArrayList<Product> products){\n super(context, R.layout.list_item, products);\n adapterContext = context;\n this.products = products;\n }", "public MoreVersionsAdapter(List<ParseObject> data, Activity context) {\n mData = data;\n appcontext = context;\n }", "public OrderAdapter(Context mCtx, List<ReadOrdersFromDB> orderList, List<Product> productList) {\n this.mCtx = mCtx;\n this.orderList = orderList;\n this.productList = productList;\n }", "GameAdapter(Context context, List<DestinationCard> destinationCards) {\n this.mInflater = LayoutInflater.from(context);\n this.destinationCards = destinationCards;\n //this.trainCards = trainCards;\n }", "public PollHandler(List<Poll> myDataset , Context context) {\n mDataset = myDataset;\n this.context = context;\n }", "public CustomAdapter(List<Quiz> quizList) {// Now lets add stuff to the quiz.\n this.quizList = quizList;\n }", "public RowListaCustomAdapter ( Context c, ArrayList<Row>data){\n Log.v(TAG, \"Construir Adaptador\");\n this.data = data;\n inflater = LayoutInflater.from(c);\n\n }", "public ListViewAdapter(Event[] dataset, Context context) {\n this.dataset = dataset;\n this.context = context;\n }", "public NewsFeed_Adapter(List<NewsFeed> news, Context context) {\n this.news = news;\n this.context = context;\n this.inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n }", "public SocialScreenAdapter(Context context, List<UserSocial> list) {\n this.users = list;\n this.context = context;\n }", "public TweetsAdapter(Context context, List<Tweet> tweets) {\n this.context = context;\n this.tweets = tweets;\n }", "public DirectoryAdapter(Activity context, ArrayList<String> data, SharedPreferences sharedPreferences) {\r\n inflater = LayoutInflater.from(context);\r\n this.data = data;\r\n this.sharedPreferences = sharedPreferences;\r\n this.context = context;\r\n }", "public Comm2Adapter(List<String> titleList, List<String> urlList,\r\n\t\t\tContext context) {\r\n\t\tthis.mContext = context;\r\n\t\tthis.titleList = titleList;\r\n\t\tthis.urlList = urlList;\r\n\t\tinflater = LayoutInflater.from(mContext);\r\n//\t\timageLoader = ImageLoader.getInstance();\r\n//\t\toptions = new DisplayImageOptions.Builder().cacheInMemory(true)\r\n//\t\t\t\t.cacheOnDisk(true)\r\n//\t\t\t\t.showImageOnLoading(R.drawable.default_title)\r\n//\t\t\t\t.showImageForEmptyUri(R.drawable.default_title)\r\n//\t\t\t\t.showImageOnFail(R.drawable.default_title).build();\r\n\t}", "public ListsAdapter(ArrayList<TodoList> tempData){\n data = tempData;\n\n // produces an intent to go to the SingleList class,\n // passing along the TodoList of the clicked list as an extra\n listener = new View.OnClickListener() {\n @Override\n public void onClick(View view){\n int position = ((ViewGroup) view.getParent()).indexOfChild(view);\n TodoList currentViewData = data.get(position);\n Intent intent = new Intent(context,SingleList.class);\n intent.putExtra(\"TodoLists\",currentViewData);\n context.startActivity(intent);\n }\n };\n\n // delete an list when it is long clicked\n longlistener = new View.OnLongClickListener(){\n @Override\n public boolean onLongClick(View view){\n deletePosition = ((ViewGroup) view.getParent()).indexOfChild(view);\n\n // starts up a dialog fragment asking for a confirmation.\n // if confirm button is pressed the function onDeleteList below is called,\n // otherwise nothing happens.\n android.app.DialogFragment newFragment = InputFrag.newInstance(true,false);\n newFragment.show(((Activity) context).getFragmentManager(), \"delete all\");\n return true;\n }\n };\n }", "public MyListAdapterCliente(Context context, int resource, List<ReunionCliente> reunionList) {\n super(context, resource, reunionList);\n this.context = context;\n this.resource = resource;\n this.reunionList = reunionList;\n }", "public gradeListAdapter(Context context, List<Course> courseList ){\n this.context = context;\n this.courseList = courseList;\n// helper.setDB(context, \"member.db\");\n// helper = new MySQLiteOpenHelper(context);\n }", "public ChatBackbone(Activity context, List<ChatMessage> list)\n\t {\n\t\t this.context = context;\n\t\t this.list = list;\n\t }", "public ProductAdapter(Context context, List<Product> products){\n super(context, -1, products);\n this.products = products;\n\n }", "public AdapterCountry(List<Country> countryList, Context context) {\n this.countryList = countryList;\n this.context = context;\n }", "public ShoppingListView(Context context, AttributeSet attrs) {\n super(context, attrs);\n LayoutInflater.from(context).inflate(R.layout.shoppinglist_item_view_children, this, true);\n setupChildren();\n }", "public TaskListAdapter(Context activityContext, List<Task> tasks) {\r\n\t\tsuper();\r\n\t\tthis.context = activityContext;\r\n\t\tthis.taskList = tasks;\r\n\t}", "public RecyclerViewAdapter(Context context, List<DummyData> dummyDataList) {\n this.dummyDataList = dummyDataList;\n listener = (onItemClicked) context;\n }", "public ListItems() {\n itemList = new ArrayList();\n }", "public CustomListAdapter(Activity activity, List<Ticket> TicketItems) {\n this.activity = activity;\n this.TicketItems = TicketItems;\n }", "public ComicSearch_Adapter(Context aContext, ArrayList<Comic> listData) {\n this.listData = listData;\n layoutInflater = LayoutInflater.from(aContext);\n copie = new ArrayList<Comic>();\n copie.addAll(listData);\n this.context=aContext;\n }", "public BookAdapter(Context context, List<Book> books) {\n super(context, 0, books);\n }", "public TravlerAdapter(ArrayList<UserProfileVO> myDataset, Context context) {\n\n mArrayList = myDataset;\n mContext = context;\n\n }", "public AdapterShop(Activity context, List<shoppingcard> dades){\n super(context, R.layout.listitem_shop,dades);\n this.context = context;\n this.dades = dades;\n }", "public RestaurantListAdapter(Context c) {\n // Create query Factory and setup superclass\n super(new ParseQueryAdapter.QueryFactory<Restaurant>() {\n public ParseQuery<Restaurant> create() {\n return RestaurantManager.getInstance().queryForAllRestaurants();\n }\n }, false);\n\n this.context = c;\n RestaurantManager.getInstance().registerRestaurantChangeListener(this);\n }", "public RateAdapter(ArrayList<Rate> myDataset, Context context) {\n mRates = myDataset;\n mContext = context;\n }", "public ChatAdapter(Context context,List<ChatEntity> chatList){\n \t\tthis.context = context;\n \t\tthis.chatList = chatList;\n \t\tinflater = LayoutInflater.from(this.context);\n// \t\toptions = new DisplayImageOptions.Builder()\n// \t\t\t\t.showStubImage(R.drawable.no_portrait_male)\n// \t\t\t\t.showImageForEmptyUri(R.drawable.no_portrait_male).cacheInMemory()\n// \t\t\t\t.cacheOnDisc().build();\n// \t\timageLoader = ImageLoader.getInstance();\n \t}" ]
[ "0.7474043", "0.72895986", "0.720175", "0.71711487", "0.716455", "0.7103845", "0.70643514", "0.7017609", "0.7015182", "0.7002116", "0.6999626", "0.69716054", "0.694772", "0.69291306", "0.69149107", "0.6911918", "0.6899437", "0.689525", "0.6869028", "0.68362564", "0.68169796", "0.68089867", "0.6804602", "0.6799725", "0.67950577", "0.6779862", "0.6756298", "0.6755477", "0.67489445", "0.67466545", "0.6727097", "0.67200506", "0.67158335", "0.6705814", "0.66929203", "0.6683874", "0.6640736", "0.6634209", "0.66340166", "0.66321576", "0.6629157", "0.66056216", "0.66036046", "0.6602993", "0.65830314", "0.65697306", "0.6568072", "0.65589124", "0.6549172", "0.65484834", "0.6536701", "0.6518797", "0.651467", "0.6514492", "0.65143985", "0.65118444", "0.6509383", "0.6504097", "0.64948136", "0.6478867", "0.647681", "0.64620435", "0.6456022", "0.6446627", "0.64461744", "0.64440054", "0.64431375", "0.6437144", "0.6431648", "0.6417154", "0.64099526", "0.6398623", "0.63961506", "0.6393443", "0.6391286", "0.63907546", "0.6389547", "0.637806", "0.63739926", "0.6361705", "0.63442177", "0.6341109", "0.63338757", "0.63332963", "0.6329909", "0.63235176", "0.6323203", "0.632078", "0.6319968", "0.6318926", "0.6317862", "0.63149244", "0.6306082", "0.63030237", "0.62932456", "0.62892175", "0.6280607", "0.6275367", "0.6256404", "0.6253916", "0.6252194" ]
0.0
-1
Provides a view for an AdapterView (ListView, GridView, etc.)
@Override public View getView(int position, View convertView, ViewGroup parent) { // Check if the existing view is being reused, otherwise inflate the view View listItemView = convertView; if(listItemView == null) { listItemView = LayoutInflater.from(getContext()).inflate(list_item, parent, false); } Earthquake currentEarthquake = getItem(position); TextView MagnitudeTextView = (TextView) listItemView.findViewById(R.id.magnitude_text); MagnitudeTextView.setText(currentEarthquake.getMagnitude()); TextView LocationTextView = (TextView) listItemView.findViewById(R.id.primary_location); String test = primaryLocationSplit(currentEarthquake.getLocation()); LocationTextView .setText(test); TextView locationOffsetTextView = (TextView) listItemView.findViewById(R.id.location_offset); String test1 = locationOffsetSplit(currentEarthquake.getLocation()); locationOffsetTextView .setText(test1); Date dateObject = new Date(currentEarthquake.getTimeInMilliseconds()); TextView DateTextView = (TextView) listItemView.findViewById(R.id.date_text); String formattedDate = formatDate(dateObject); DateTextView.setText(formattedDate); TextView timeView = (TextView) listItemView.findViewById(R.id.date_time); // Format the time string (i.e. "4:30PM") String formattedTime = formatTime(dateObject); // Display the time of the current earthquake in that TextView timeView.setText(formattedTime); return listItemView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public View getView() { return view; }", "@Override\n public View getView()\n {\n return view;\n }", "@Override\n public View getView(LayoutInflater inflater, View convertView) {\n return getViewItem(inflater, convertView);\n }", "@Override\n public View getView() {\n return mView;\n }", "@Override\r\n\tpublic View getView() {\n\t\treturn super.getView();\r\n\t}", "@Override\n\tpublic View getView() {\n\t\treturn super.getView();\n\t}", "@NonNull\n @Override\n public View getView(final int position, final View convertView, @NonNull final ViewGroup parent) {\n return mDataBinder.bind(position, getItem(position),\n convertView == null ? mViewInflater.inflate(parent): convertView);\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tif(convertView == null) {\n\t\t\tconvertView = creatView(parent);\n\t\t}\n\t\tbindViewWithData(position, convertView);\n\t\treturn convertView;\n\t}", "@Override\n\tprotected String getView() {\n\t\treturn ORSView.COLLEGE_LIST_VIEW;\n\t}", "public View getView() {\n return view;\n }", "@Override\r\n\tpublic View getView() {\n\t\treturn this.view;\r\n\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n return convertView;\n }", "@Override\r\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\r\n\r\n\t\tRelativeLayout mLayout = new RelativeLayout(context);\r\n\t\tmLayout.setLayoutParams(new ListView.LayoutParams(ListView.LayoutParams.FILL_PARENT,\r\n\t\t\t\tListView.LayoutParams.FILL_PARENT));\r\n\r\n\t\tRelativeLayout.LayoutParams mParams = new RelativeLayout.LayoutParams(\r\n\t\t\t\tRelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\r\n\t\tmParams.addRule(RelativeLayout.CENTER_IN_PARENT);\r\n\r\n\t\tTextView textView = new TextView(context);\r\n\t\ttextView.setText(getItem(position).name);\r\n\t\ttextView.setTextSize(13);\r\n\t\ttextView.setLayoutParams(mParams);\r\n\t\tmLayout.addView(textView);\r\n\t\treturn mLayout;\r\n\t}", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\treturn super.getView(position, convertView, parent);\n\t\t}", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\treturn super.getView(position, convertView, parent);\n\t\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n return initView(position, convertView, parent);\n }", "@Override\n public View getView(final int position, final View convertView, final ViewGroup parent) {\n return mBaseAdapter.getView(position, convertView, parent);\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\n\t\treturn super.getView(position, convertView, parent);\n\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n return getCustomView(position, convertView, parent);\n }", "@Override\r\n public View getView() {\r\n return mBaseView;\r\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n CatItem item = items.get(position);\n View view;\n if (convertView == null) {\n view = LayoutInflater.from(mContext).inflate(\n R.layout.category_item, parent, false);\n view.setLayoutParams(new GridView.LayoutParams(size, size));\n } else {\n view = convertView;\n }\n TextView textView = (TextView) view.findViewById(R.id.detail_text);\n ImageView imageView = (ImageView) view.findViewById(R.id.detail_img);\n// loadBitmap(item.id,imageView);\n imageView.setImageResource(item.getId());\n textView.setText(item.getName());\n\n return view;\n }", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tView view = LayoutInflater.from(getActivity()).inflate(R.layout.discovery_fragment_listitem, null);\n\t\t\tImageView icon = (ImageView)view.findViewById(R.id.itemIcon);\n\t\t\tTextView textView = (TextView)view.findViewById(R.id.itemTv);\n\t\t\tImageView inImageView = (ImageView)view.findViewById(R.id.itemInImg);\n\t\t\t\n\t\t\ticon.setImageResource(imgs[position]);\n\t\t\ttextView.setText(names[position]);\n\t\t\tinImageView.setImageResource(R.drawable.in);\n\t\t\treturn view;\n\t\t}", "public @Override View getView(int index) {\n return getChild(index).getView();\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tif(convertView == null)\n\t\t{\n\t\t\tmGridViewItem = new GridViewItem();\n\t\t\tLayoutInflater inflater = LayoutInflater.from(mContext);\n\t\t\tconvertView = inflater.inflate(R.layout.diagnosis_grid_view_item, parent, false);\n\t\t\tmGridViewItem.mTextView = (TextView) convertView.findViewById(R.id.diagnosis_grid_view_item_textview);\n\t\t\tmGridViewItem.mImageView = (ImageView) convertView.findViewById(R.id.diagnosis_grid_view_item_imageview);\n\t\t\tconvertView.setTag(mGridViewItem);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tmGridViewItem = (GridViewItem) convertView.getTag();\n\t\t}\n\t\tmGridViewItem.mTextView.setText(mDiagnosisItemName[position]);\n\t\treturn convertView;\n\t}", "@NonNull\n @Override\n public View getView(int position, View convertView, @NonNull ViewGroup parent) {\n return getCustomView(position, convertView, parent);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.list_item, container, false);\n\n // Create a list of items\n final ArrayList<Item> items = new ArrayList<Item>();\n\n items.add(new Item(getResources().getString(R.string.about_1),getResources().getString(R.string.about_1_1),R.drawable.bydgoszcz_logo));\n items.add(new Item(getResources().getString(R.string.about_2),getResources().getString(R.string.about_2_1)));\n items.add(new Item(getResources().getString(R.string.about_3),getResources().getString(R.string.about_3_1)));\n items.add(new Item(getResources().getString(R.string.about_4),getResources().getString(R.string.about_4_1)));\n\n // Create an {@link ItemAdapter}, whose data source is a list of {@link Item}s.\n ItemAdapter adapter = new ItemAdapter(getActivity(), items, R.color.tan_background);\n\n // Find the {@link ListView} object in the view hierarchy of the {@link Activity}.\n ListView listView = (ListView) rootView.findViewById(R.id.list);\n\n listView.setAdapter(adapter);\n\n return rootView;\n }", "public String getView();", "public String getView();", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tif(null == convertView){\n\t\t\t\t// Our view has not been recycled, let's create a new one!\n\t\t\t\tconvertView = getLayoutInflater().inflate(R.layout.item_list_image, null);\n\t\t\t}\n\t\t\t// Update recycled or old view\n\t\t\tTextView label = (TextView) convertView.findViewById(R.id.text);\n\t\t\tlabel.setText(activities[position].getSimpleName());\n\t\t\t\n\t\t\treturn convertView;\n\t\t}", "private void showSimpleAdaptView() {\n\t\tList<HashMap<String, Object>> data = new ArrayList<HashMap<String,Object>>();\n\t\tfor (Person person : persons) {\n\t\t\tHashMap<String, Object> hashMap = new HashMap<String, Object>();\n\t\t\thashMap.put(\"name\", person.getNameString());\n\t\t\thashMap.put(\"phone\", person.getPhoneNum());\n\t\t\thashMap.put(\"amount\", person.getAmount());\n\t\t\thashMap.put(\"personid\", person.getId());\n\t\t\tdata.add(hashMap);\n\t\t}\n\t\tSimpleAdapter simpleAdapter = new SimpleAdapter(this, data, R.layout.listview_item,\n\t\t\t\tnew String[]{\"name\",\"phone\",\"amount\"}, \n\t\t\t\tnew int[]{R.id.name,R.id.phone,R.id.account});\n\t\t\n\t\tlistView.setAdapter(simpleAdapter);\n\t}", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\treturn listlayout.get(position);\n\n\t\t}", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\treturn listlayout.get(position);\n\n\t\t}", "@Override\n\tpublic View getView(Context context, ViewGroup parent) {\n\t\ttv = new TextView(context);\n\t\treturn tv;\n\t}", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\n\n\t\tLayoutInflater inflater=activity.getLayoutInflater();\n\n\t\tif(convertView == null){\n\n\t\t\tconvertView=inflater.inflate(R.layout.column_row, null);\n }\n\t\t \n\t\ttxtFirst=(TextView) convertView.findViewById(R.id.idView);\n\t\ttxtSecond=(TextView) convertView.findViewById(R.id.dateView);\n\t\ttxtThird=(TextView) convertView.findViewById(R.id.discriptionView);\n\t\ttxtFourth=(TextView) convertView.findViewById(R.id.amountView);\n\n\t\tHashMap<String, String> map=list.get(position);\n\t\ttxtFirst.setText(map.get(FIRST_COLUMN));\n\t\ttxtSecond.setText(map.get(SECOND_COLUMN));\n\t\ttxtThird.setText(map.get(THIRD_COLUMN));\n\t\ttxtFourth.setText(map.get(FOURTH_COLUMN));\n\n\t\treturn convertView;\n\t}", "private void showCursorAdaptView() {\n\t\tCursor cursor = personService.getCursor(0, personService.getCnt());\n\t\tSimpleCursorAdapter adapter = new SimpleCursorAdapter(this, R.layout.listview_item, cursor,\n\t\t\t\tnew String[]{\"name\",\"phone\",\"amount\"}, \n\t\t\t\tnew int[]{R.id.name,R.id.phone,R.id.account});\n\t\t\n\t\tlistView.setAdapter(adapter);\n\t}", "public View getView(int position, View convertView, ViewGroup parent) {\n return itemViews[position];\r\n// return convertView;\r\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n ImageView iv = new ImageView(mContext);\n\n iv.setImageURI(Uri.parse(list.get(position).getURL()));\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(265, 265);\n iv.setLayoutParams(lp);\n iv.setPadding(15, 15, 15, 15);\n\n return iv;\n }", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\t\tViewHolder viewHolder;\n\t\t\tAVTravelDiary avTravelDiary = diaries.get(position);\n\t\t\tif(null == convertView) {\n\t\t\t\tviewHolder = new ViewHolder();\n\t\t\t\tconvertView = LayoutInflater.from(parentAct).inflate(R.layout.item_diary_list,null);\n\t\t\t\tviewHolder.coverImageView = (ImageView) convertView.findViewById(R.id.diary_cover_imageview);\n\t\t\t\tviewHolder.baseInfoTextView = (TextView) convertView.findViewById(R.id.diary_base_info_tv);\n\t\t\t\tviewHolder.headlineTextView = (TextView) convertView.findViewById(R.id.diary_headline_tv);\n\t\t\t\tviewHolder.praiseTimesTextView = (TextView) convertView.findViewById(R.id.praise_times_tv);\n\t\t\t\tviewHolder.userNicknameTextView = (TextView) convertView.findViewById(R.id.user_nickname_tv);\n\t\t\t\tconvertView.setTag(viewHolder);\n\t\t\t}\n\n\t\t\tviewHolder = (ViewHolder) convertView.getTag();\n\t\t\tviewHolder = (ViewHolder) convertView.getTag();\n\t\t\tviewHolder.headlineTextView.setText(avTravelDiary.getHeadline());\n\t\t\tviewHolder.baseInfoTextView.setText(getDiaryBaseInfo(avTravelDiary));\n\t\t\tviewHolder.praiseTimesTextView.setText(avTravelDiary.getPraiseTimes()+\"\");\n\t\t\tcom.nostra13.universalimageloader.core.ImageLoader.getInstance().displayImage(avTravelDiary.getCover().getUrl(), viewHolder.coverImageView, ImageLoaderOptionsSetting.getConstantImageLoaderDefaultOptions());\n\t\t\tAVBaseUserInfo avBaseUserInfo = avTravelDiary.getAuthorBaseInfo();\n\t\t\tif(null != avBaseUserInfo)\n\t\t\t\tviewHolder.userNicknameTextView.setText(avBaseUserInfo.getNickname());\n\t\t\treturn convertView;\n\t\t}", "public View getViewImpl(int position, View convertView, ViewGroup parent) {\n ViewHolder holder = null;\n PhotoItem photoItem = getItem(position);\n View viewToUse = null;\n\n // This block exists to inflate the photo list item conditionally based on whether\n // we want to support a grid or list view.\n LayoutInflater mInflater = (LayoutInflater) context.getSystemService(Activity.LAYOUT_INFLATER_SERVICE);\n\n if (convertView == null) {\n holder = new ViewHolder();\n viewToUse = mInflater.inflate(resourceId, null);\n holder.photoImageView = (ImageView) viewToUse.findViewById(R.id.img_galley_thumb);\n viewToUse.setTag(holder);\n } else {\n viewToUse = convertView;\n holder = (ViewHolder) viewToUse.getTag();\n }\n\n Glide.with(context)\n .load(photoItem.getImageUri().getPath())\n .centerCrop()\n .crossFade()\n .into(holder.photoImageView);\n\n return viewToUse;\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n final Horse horse = (Horse) getItem(position);\n if (convertView == null) {\n LayoutInflater layoutInflater = (LayoutInflater) this.context\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n convertView = layoutInflater.inflate(R.layout.custom__list_item__horse_list, null);\n }\n TextView horseName = (TextView) convertView.findViewById(R.id.horse_name);\n TextView horseStall = (TextView) convertView.findViewById(R.id.horse_stall);\n TextView horseDescription = (TextView) convertView.findViewById(R.id.horse_description);\n\n horseName.setText(horse.getName());\n horseStall.setText(\"Stall \" + horse.getStallNumber());\n horseDescription.setText(horse.getColor() + \" \" + horse.getBreed());\n\n return convertView;\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n\t\t\r\n\t\tif (convertView == null) {\r\n\t\t\tconvertView = newView(position, parent);\r\n\t\t}\r\n\t\tbindView(position, convertView);\r\n\t\t\r\n\t\treturn convertView;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_tv_list, container, false);\n this.gridView = view.findViewById(R.id.tv_list);\n TVAdapter TVAdapter = new TVAdapter(getContext(), tvArrayList);\n this.gridView.setAdapter(TVAdapter);\n this.gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n TV tv = tvArrayList.get(i);\n Intent intent = new Intent(getContext(), TVDetailActivity.class);\n intent.putExtra(\"tv\", tv);\n getActivity().startActivity(intent);\n }\n });\n this.gridView.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int pos, long id) {\n //倒数第几行开始加载下一页\n int preRows = 2;\n if (pos > tvArrayList.size() - preRows * gridView.getNumColumns() && !isLoading && !isEnded) {\n loadMore();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n\n }\n });\n return view;\n }", "public View getView(int position, View convertView, ViewGroup parent) {\r\n\r\n\t\tApplicationInfo currentItem = packages.get(position);\r\n\t\tLayoutInflater inflater = (LayoutInflater) context\r\n\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n\r\n\t\tView gridView;\r\n\r\n\t\tif (convertView == null) {\r\n\r\n\t\t\t// get layout from mobile.xml\r\n\t\t\tgridView = inflater.inflate(R.layout.application_cell, null);\r\n\r\n\r\n\t\t} else {\r\n\t\t\tgridView = (View) convertView;\r\n\t\t}\r\n\t\t// set value into textview\r\n\t\tTextView textView = (TextView) gridView\r\n\t\t\t\t.findViewById(R.id.grid_app_label);\r\n\t\t// TODO: research better item\r\n\t\ttextView.setText(currentItem.nonLocalizedLabel);\r\n\r\n\t\t// set image based on selected text\r\n\t\tImageView imageView = (ImageView) gridView\r\n\t\t\t\t.findViewById(R.id.grid_app_icon);\r\n\t\timageView.setImageDrawable(currentItem.loadIcon(context.getPackageManager()));\r\n\r\n\r\n\t\treturn gridView;\r\n\t}", "ImageView getView() {\n return view;\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tView v = convertView;\n\n\t\tif (v == null) {\n\t\t\tLayoutInflater li = (LayoutInflater) this.ctx\n\t\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\tv = li.inflate(res, parent, false);\n\t\t}\n\n\t\tContacts cts = getItem(position);\n\n\t\tTextView name = (TextView) v.findViewById(R.id.name);\n\t\tTextView number = (TextView) v.findViewById(R.id.number);\n\n\t\tname.setText(cts.getContactName());\n\n\t\tnumber.setText(cts.getContactNumber());\n\n\t\treturn v;\n\t}", "@Override\n\tpublic View getView(int arg0, View arg1, ViewGroup arg2) {\n\t\tListItem item=list.get(arg0);\n\t\tViewHolder holder=null;\n\t\tif(arg1==null){\n\t\t\tholder=new ViewHolder();\n\t\t\n\t\t\targ1=LayoutInflater.from(context).inflate(R.layout.layout_item, null);\t\n\t\t\tholder.ll=(LinearLayout)arg1;\n\t\t\targ1.setTag(holder);\n\t\t}else{\n\t\t\tholder=(ViewHolder)arg1.getTag();\n\t\t}\n\t\tList<Stories> stories=item.getList();\n\t\tTextView date=(TextView)holder.ll.findViewById(R.id.textView);\n\t\tLinearLayout l=(LinearLayout)holder.ll.findViewById(R.id.container);\n\t\tdate.setText(item.getDate());\n\t\tl.removeAllViews();\n\n\t\tfor(int i=0;i<stories.size();i++){\n\t\t\tfinal Stories s=stories.get(i);\n\t\t\tView v=LayoutInflater.from(context).inflate(R.layout.news_layout, null);\n\t\t\tv.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tIntent intent=new Intent(context,TextActivity.class);\n\t\t\t\t\tintent.putExtra(\"ID\", s.getId());\n\t\t\t\t\tcontext.startActivity(intent);\n\t\t\t\t}\n\t\t\t});\n\t\t\tTextView tv=(TextView)v.findViewById(R.id.tvTitle);\n\t\t\ttv.setText(s.getTitle());\n\t\t\tImageView iv=(ImageView)v.findViewById(R.id.ivTitle);\n\t\t\tString url = s.getImages().replace(\"\\\\\", \"\");\n\t\t\t\n\t\t\tImageLoaderUtil.display(url, iv);\n\t\t\tl.addView(v);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn arg1;\n\t}", "public View getView(int n) {\n return view;\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n BluetoothDevice device = getItem(position);\n // Check if an existing view is being reused, otherwise inflate the view\n RecyclerView.ViewHolder viewHolder; // view lookup cache stored in tag\n if (convertView == null) {\n LayoutInflater inflater = LayoutInflater.from(getContext());\n } else {\n\n }\n\n // Populate the data into the template view using the data object\n // Return the completed to render on screen\n return convertView;\n }", "@Override\n\t\t\tpublic ViewHolder onCreateViewHolder(View itemView) {\n\t\t\t\treturn new MylisViewHoder(itemView);\n\t\t\t}", "@CheckForNull\n View getView(String viewName);", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tView itemView=convertView;\n\t\t\tif(itemView==null){\n\t\t\t\titemView=getLayoutInflater().inflate(R.layout.house_view, parent, false);\n\t\t\t}\n\t\t\t\n\t\t\tHomeData myHouse=houseList.get(position);\n\t\t\t\n\t\t\tImageView houseTypeIv=(ImageView)itemView.findViewById(R.id.houseTypeIv);\n\t\t\t\n\t\t\tTextView roomTv=(TextView) itemView.findViewById(R.id.roomLvTv);\n\t\t\tTextView priceTv=(TextView) itemView.findViewById(R.id.priceLvTv);\n\t\t\tTextView addressTv=(TextView) itemView.findViewById(R.id.addressLvTv);\n\t\t\tTextView ownerNameTv=(TextView) itemView.findViewById(R.id.ownerNameLvTv);\n\t\t\t\n\t\t\t//assign value to each view\n\t\t\thouseType=String.valueOf(myHouse.mHouseType);\n\t\t\t\n\t\t\tif(houseType==\"House\"){\n\t\t\t\thouseTypeIv.setImageResource(R.drawable.pizza);\n\t\t\t}else if(houseType==\"Apartment\"){\n\t\t\t\thouseTypeIv.setImageResource(R.drawable.apt);\n\t\t\t}else if(houseType==\"Condo\"){\n\t\t\t\thouseTypeIv.setImageResource(R.drawable.condo);\n\t\t\t}\n\t\t\t\n\t\t\tif(myHouse.mNumOfRoom==1){\n\t\t\t\troomTv.setText(String.valueOf(myHouse.mNumOfRoom)+\" room\");\n\t\t\t}else{\n\t\t\t\troomTv.setText(String.valueOf(myHouse.mNumOfRoom)+\" rooms\");\n\t\t\t}\n\t\t\t\n\t\t\tpriceTv.setText(\"as $\"+String.valueOf(myHouse.mPrice));\n\t\t\taddressTv.setText(myHouse.mAddress);\n\t\t\townerNameTv.setText(myHouse.mOwnerName);\n\t\t\t\n\t\t\treturn itemView;\n\t\t}", "@Override\r\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tViewHolder viewHolder;\r\n\t\tif (convertView == null) {\r\n\t\t\tviewHolder = new ViewHolder();\r\n\t\t\tconvertView = InjectProcessor.injectListViewHolder(viewHolder);\r\n\t\t\tconvertView.setTag(viewHolder);\r\n\t\t} else {\r\n\t\t\tviewHolder = (ViewHolder) convertView.getTag();\r\n\t\t}\r\n\t\tminfo = models.get(position);\r\n\t\tviewHolder.image.setImageUrl(minfo.getImagesrc(),\r\n\t\t\t\tHttpRequest.getInstance().imageLoader);\r\n\t\tviewHolder.name.setText(minfo.getTitle());\r\n\t\treturn convertView;\r\n\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n if (convertView == null) {\n convertView = ListAdapterInflater.createLayout(resourceLayout, mContext, parent);\n }\n\n setupItemView(convertView, getItem(position));\n\n return convertView;\n }", "@Override\n\tpublic View getView(LayoutInflater inflater, View convert) {\n\t\tView view;\n\t\tview = (View) inflater.inflate(R.layout.adapter_word_popup_body, null);\n\t\t// Do some initialization\n\n\t\tTextView title = (TextView) view.findViewById(R.id.title);\n\t\tTextView count = (TextView) view.findViewById(R.id.count);\n\n\t\ttitle.setText(this.title);\n\t\tcount.setText(this.count);\n\n\t\treturn view;\n\t}", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tif(convertView == null){\n\t\t\tif(StoreDetailActivity.isGridView){\n\t\t\t\tconvertView = inflater.inflate(R.layout.listcell_store_grid, parent, false);\n\t\t\t}else {\n\t\t\t\tconvertView = inflater.inflate(R.layout.store_list_layout, parent, false);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(StoreDetailActivity.isGridView){\n\t\t\tfor(int i = 0; i < mRows; i++){\n\t\t\t\tJSONObject goodsList = mGoodsList.optJSONObject(position * mRows + i);\n\t\t\t\tLinearLayout contentView = (LinearLayout) convertView;\n\t\t\t\tsetItemView(contentView.getChildAt(i % 2 == 0 ? 0 : 1), goodsList);\n\t\t\t}\n\t\t}else {\n\t\t\tJSONObject goodsList = mGoodsList.optJSONObject(position);\n\t\t\tsetItemView(convertView, goodsList);\n\t\t}\n\t\t\n\t\t\n\t\treturn convertView;\n\t}", "@Override\n public MainListAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {\n // create a new view\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_view, parent, false);\n // set the view's size, margins, paddings and layout parameters\n MainListAdapter.ViewHolder vh = new MainListAdapter.ViewHolder(v);\n return vh;\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent)\n {\n View grid;\n LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\n if (convertView == null)\n {\n grid = new View(context);\n grid = inflater.inflate(R.layout.activity_grid, null);\n TextView textView = (TextView) grid.findViewById(R.id.text);\n ImageView imageView = (ImageView)grid.findViewById(R.id.image);\n textView.setText(namesid[position]);\n imageView.setImageResource(imagesid[position]);\n }\n\n else\n grid = convertView;\n\n return grid;\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tView layout3_item = inflater.inflate(R.layout.layout4_lvitem,null);\n\t\treturn layout3_item;\n\t}", "@Override\n\tpublic View newView(Context arg0, Cursor arg1, ViewGroup arg2) {\n\t\tView row = (View) inflater.inflate(R.layout.list_row, arg2, false);\n\t\treturn row;\n\t}", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t// Take the data source at position (i.e 0)\n\t\t// get data items\n\t\tInstagramModel igModel = getItem(position);\n\t\t\n\t\t// check if we are using a recycled view\n\t\tif (convertView == null) {\n\t\t\t// if not using recycled view, create it\n\t\t\t// LayoutInflater.from(<arg1>, <arg2>, <arg3>)\n\t\t\t// getContext() == returning the activity instance within the adapter\n\t\t\t// R.layout.item_photo == to which XML template we want to inflate\n\t\t\t// parent == listView itself\n\t\t\t// false == not to attach yet, will attach when ready\n\t\t\tconvertView = LayoutInflater.from(getContext()).inflate(R.layout.item_photo, parent, false);\t\n\t\t}\n\t\t\n\t\t// Lookup the subview within the template\n\t\tTextView tvCaption = (TextView) convertView.findViewById(R.id.tvCaption);\n\t\tTextView tvUN\t= (TextView) convertView.findViewById(R.id.tvUN);\n\t\tTextView tvLikesCount = (TextView) convertView.findViewById(R.id.tvLikesCount);\n\t\tTextView tvPostedTime = (TextView) convertView.findViewById(R.id.tvPostedTime);\n//\t\tTextView tvComment = (TextView) convertView.findViewById(R.id.tvComment);\n\t\tImageView imgPhoto = (ImageView) convertView.findViewById(R.id.imgPhoto);\n//\t\tCircularImageView imgProfile = (CircularImageView) convertView.findViewById(R.id.imgUN);\n\t\tImageView imgProfile = (ImageView) convertView.findViewById(R.id.imgUN);\n\t\t\n\t\t// populate the subviews (textfield, imageview) with the correct data\n\t\tSpanned UNColor = Html.fromHtml(\"<font color=\\\"#206199\\\"><b>\" + igModel.usernmae + \"</b></font><font color=\\\"#000000\\\"></font>\");\n\t\ttvCaption.setText(UNColor + \" \" + igModel.caption);\n\t\ttvUN.setText(UNColor);\n\t\ttvPostedTime.setText(setToDays(igModel.postedTime));\n//\t\ttvComment.setText(igModel.commentUser + \" \" + igModel.comment);\n\t\ttvLikesCount.setText(Html.fromHtml(\"<font color=\\\"#206199\\\"><b>\" + igModel.likesCount + \" likes\" + \" \" + \"</b></font><font color=\\\"#000000\\\"></font>\"));\n\t\t// set image height before loading\n//\t\timgPhoto.getLayoutParams().height = igModel.imageHeight;\n\t\t// reset images from recycled view\n\t\timgPhoto.setImageResource(0);\n\t\t// ask for photo to be added to imageview based on the photo url\n\t\t// BACKGROUND: send a network request to url, download image bytes, convert into bitmap, resizing image, insert bitmap into imageview\n\t\t// now using \"picasso\" library\n\t\tPicasso.with(getContext()).load(igModel.imageUrl).into(imgPhoto);\n\t\tPicasso.with(getContext()).load(igModel.imageProfile).into(imgProfile);\n\t\t\n\t\t// return the view for that data item\n\t\treturn convertView;\n\t}", "@NonNull\n @Override\n public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {\n View v = LayoutInflater.from(ctx).inflate(layoutTemplate, parent, false);\n\n // 1. Get the current Restaurant\n Restaurant current = restaurantList.get(position);\n\n // 2. Get the restaurant information\n String name = current.getName();\n String address = current.getAddress();\n String photo = current.getPhotoUrl();\n int rate = current.getRate();\n\n // 3. Get the view components references\n ImageView ivPhoto = v.findViewById(R.id.imageViewPhoto);\n TextView tvName = v.findViewById(R.id.textViewName);\n TextView tvAddress = v.findViewById(R.id.textViewAddress);\n RatingBar ratingBar = v.findViewById(R.id.ratingBarRate);\n\n // 4. Set the restaurant information into the view components\n tvName.setText(name);\n tvAddress.setText(address);\n ratingBar.setRating((float) rate);\n Glide.with(ctx)\n .load(photo)\n .centerCrop()\n .into(ivPhoto);\n\n return v;\n }", "@Override\n \tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n \t\t\tBundle savedInstanceState) {\n \t\treturn inflater.inflate(R.layout.list, container, false);\n \t}", "@Override\n\t public View getView(int position, View convertView, ViewGroup parent) {\n\t ViewHolder view;\n\t LayoutInflater inflator = activity.getLayoutInflater();\n\t \n\t if(convertView==null)\n\t {\n\t view = new ViewHolder();\n\t convertView = inflator.inflate(R.layout.gridview_row, null);\n\t \n\t view.imgView = (ImageView) convertView.findViewById(R.id.imageView1);\n\t \n\t convertView.setTag(view);\n\t }\n\t else\n\t {\n\t view = (ViewHolder) convertView.getTag();\n\t }\n\t view.imgView.setImageDrawable(listImg.get(position));\n\t \n\t return convertView;\n\t }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\tif (convertView == null) {\n\t\t\tconvertView = View.inflate(c,R.layout.follower,\n\t\t\t\t\tnull);\n\t\t}\n\n\t\t// setupView(convertView, book);\n\n\t\treturn convertView;\n\t}", "@Override\n\tsynchronized public View getView(final int pos, final View convertView,\n\t\t\tfinal ViewGroup parent) {\n\t\tView view = null;\n\t\tViewHolder wrapper = null;\n\n\t\tCardData data = (CardData) getItem(pos);\n\t\tif (convertView == null) {\n\t\t\t// Context context = parent.getContext();\n\t\t\tview = inflater.inflate(layout, null);\n\t\t\tMyActivity.recursiveViewSetTypeFace((ViewGroup)view);\n\t\t\twrapper = new ViewHolder(view);\n\t\t\tview.setTag(wrapper);\n\t\t} else {\n\t\t\tview = convertView;\n\t\t\twrapper = (ViewHolder) view.getTag();\n\t\t}\n\n\n\t\twrapper.getNameTv().setText(data.getShop());\n\t\twrapper.getTelTv().setText(data.getPrice());\n\n\t\treturn wrapper.getBase();\n\t}", "@Override\n\t\tpublic View getView(int arg0, View arg1, ViewGroup arg2) {\n\t\t\tif (arg1 == null) {\n\t\t\t\tLayoutInflater inflater = (LayoutInflater) MainActivity.this\n\t\t\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\t\t\targ1 = inflater.inflate(R.layout.listitem, arg2, false);\n\t\t\t}\n\n\t\t\tTextView chapterName = (TextView) arg1\n\t\t\t\t\t.findViewById(R.id.feed_text1);\n\t\t\tTextView chapterDesc = (TextView) arg1\n\t\t\t\t\t.findViewById(R.id.feed_text2);\n\n\t\t\tnewsfeed recent_update = newsfeedList.get(arg0);\n\n\t\t\tchapterName.setText(recent_update.username);\n\t\t\tchapterDesc.setText(recent_update.recommendation_detail);\n\n\t\t\treturn arg1;\n\t\t}", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n //Inflate a list item view using the layout specified in list_item.xml\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n // Inflate a list item view using the layout specified in list_item.xml\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n // Inflate a list item view using the layout specified in list_item.xml\n return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false);\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tView view = inflater.inflate(R.layout.contact_item, null);\n\t\ttv_name = (TextView)view.findViewById(R.id.name);\n\t\ttv_number = (TextView)view.findViewById(R.id.number);\n\t\t\n\t\tContactInfo info = contacts.get(position);\n\t\ttv_name.setText(info.getName());\n\t\ttv_number.setText(info.getNumber());\n\t\t\n\t\treturn view;\n\t}", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n\n LayoutInflater inflater = LayoutInflater.from(mContext);\n View rowView = inflater.inflate(R.layout.main_fragment_grid_category_buttons, null,true);\n\n TextView txtTitle = (TextView) rowView.findViewById(R.id.main_fragment_grid_category_element_text);\n ImageView imageView = (ImageView) rowView.findViewById(R.id.main_fragment_grid_category_element_pic);\n\n txtTitle.setText(drawerMainElements[position]);\n imageView.setImageResource(drawerMainElementsPics[position]);\n\n return rowView;\n }", "default View getView() {\n return null;\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItemView = convertView;\n if (listItemView == null) {\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.item_layout, parent, false);\n }\n // get the current object located at position\n ItemObject currentObject = getItem(position);\n // Find the TextView in the list_item.xml layout with the ID version_name\n TextView nameTextView = listItemView.findViewById(R.id.item_name);\n nameTextView.setText(currentObject.getPlanetName());\n ImageView itemImage = listItemView.findViewById(R.id.item_img);\n itemImage.setImageResource(currentObject.getImageID());\n return listItemView;\n }", "public void initView() {\n ArrayAdapter<String> arrayAdapter=new ArrayAdapter<String>(getView().getContext(),android.R.layout.simple_list_item_1,tracks);\n list.setAdapter(arrayAdapter);\n }", "public View getView(int position, View convertView, ViewGroup parent) {\n\t\tImageView imageView;\n\t\tif (convertView == null) { // if it's not recycled, initialize some\n\t\t\t\t\t\t\t\t\t// attributes\n\t\t\timageView = new ImageView(mContext);\n\t\t\timageView.setLayoutParams(new GridView.LayoutParams(85, 85));\n\t\t\timageView.setScaleType(ImageView.ScaleType.FIT_CENTER);\n\t\t\timageView.setPadding(8, 8, 8, 8);\n\t\t} else {\n\t\t\timageView = (ImageView) convertView;\n\t\t}\n\n\t\timageView.setImageResource(mThumbIds[position]);\n\t\treturn imageView;\n\t}", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tImageView imageView = new ImageView(GridViewAnimationActivity.this);\n\t\t\tResolveInfo info = mApps.get(position % mApps.size());\n\t\t\timageView.setImageDrawable(info.activityInfo\n\t\t\t\t\t.loadIcon(getPackageManager()));\n\t\t\timageView.setScaleType(ImageView.ScaleType.FIT_CENTER);\n\t\t\tfinal int w = (int) (45 * getResources().getDisplayMetrics().density + 0.5f);\n\t\t\timageView.setLayoutParams(new GridView.LayoutParams(w, w));\n\t\t\treturn imageView;\n\t\t}", "public View getView(int position, View convertView, ViewGroup parent) {\n ImageView imageView;\n if (convertView == null) {\n // if it's not recycled, initialize some attributes\n imageView = new ImageView(mContext);\n imageView.setLayoutParams(new GridView.LayoutParams(300,300));\n imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);\n imageView.setPadding(8, 8, 8, 8);\n } else {\n imageView = (ImageView) convertView;\n }\n\n imageView.setImageResource(mThumbIds[position]);\n return imageView;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.list_fragment, container, false);\r\n\t\tlist_view = (ListView) view.findViewById(R.id.list_view);\r\n\t\tadapter=new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, Data.items);\r\n\t\tlist_view.setAdapter(adapter);\r\n\t\tlist_view.setOnItemClickListener(this);\r\n\t\treturn view;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_todotasks, container, false);\n\n listAdapter = new ListAdapterTodoTasks(getActivity(), nameArray, infoArray, imageArray, priceArray);\n\n listView = view.findViewById(R.id.listViewTodotask);\n listView.setAdapter(listAdapter);\n\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n //String item = (String)listView.getAdapter().getItem(position);\n //Toast.makeText(getApplicationContext(), item, Toast.LENGTH_SHORT).show();\n }\n });\n\n return view;\n }", "public View getView() {\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tViewHolder holder;\n\t\t\tif (convertView == null) {\n\t\t\t\tconvertView = View.inflate(MainActivity.this, \n\t\t\t\t\t\tR.layout.demo_list_item, null);\n\t\t\t\tholder = new ViewHolder();\n\t\t\t\tholder.tvLable = (TextView)convertView.findViewById(R.id.label);\n\t\t\t\tholder.tvDesc = (TextView)convertView.findViewById(R.id.desc);\n\t\t\t\tconvertView.setTag(holder);\n\t\t\t} else {\n\t\t\t\tholder = (ViewHolder)convertView.getTag();\n\t\t\t}\n\n\t\t\tholder.tvLable.setText(demos[position].lable);\n\t\t\tholder.tvDesc.setText(demos[position].desc);\n\n\t\t\treturn convertView;\n\t\t}", "public View getView(int position, View convertView, ViewGroup parent) {\n\t\t TextView tv;\n\t\t \n//\t\t \n\t\t if (convertView == null) {\n\t\t tv = new TextView(mContext);\n\t\t if(v==1)\n\t\t {\n\t\t tv.setLayoutParams(new GridView.LayoutParams(70, 30));\n\t\t }\n\t\t else if(v==2)\n\t\t {\n\t\t \t tv.setLayoutParams(new GridView.LayoutParams(100, 30));\n\t\t }\n\t\t }\n\t\t else {\n\t\t tv = (TextView) convertView;\n\t\t }\n\n\t\t tv.setText(grddispitems[position]);\n\t\t \n\t\t return tv;\n\n\t\t }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tfinal ViewHolder holder;\n\t\tif (convertView == null) {\n\t\t\tconvertView = mInflater.inflate(R.layout.list_single, null);\n\t\t\tholder = new ViewHolder();\n\t\t\t\n\t\t\tholder.tv_Title = (TextView) convertView.findViewById(R.id.txt);\n\t\t\tholder.imgvw_pic = (ImageView) convertView.findViewById(R.id.img);\n\t\t\t//ad=new AvatarDownloader(mContext);\n\t\t\tmImageLoader=new ImageLoader(mContext);\n\t\t\tmImageLoader.DisplayImage(ArrayList.get(position).GetThumbURL(), ArrayList.get(position).GetTitle(), null, holder.imgvw_pic);\n\t\t\t\n\t\t\tconvertView.setTag(holder);\n\t\t} else {\n\t\t\tholder = (ViewHolder) convertView.getTag();\n\t\t}\n\t\t\n\t\tholder.tv_Title.setText(ArrayList.get(position).GetTitle());\n\t\t\n\t\t\n\t\t\t \t\t\t\t\n\t\treturn convertView;\n\t}", "@Override\n public View getView(Context context) {\n this.mContext = context;\n LayoutInflater factory = LayoutInflater.from(context);\n View view = factory.inflate(R.layout.item_wifi, null);\n mlvWifi = (ListView) view.findViewById(R.id.mlswifi);\n mbtnWifiConnect = (TextView) view.findViewById(R.id.mtvwificon);\n\t\tlistOnItemLongclick();\n return view;\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItem = convertView;\n int pos = position;\n\n if(listItem == null){\n listItem = layoutInflater.inflate(R.layout.item_list, null);\n }\n\n //Colocando na tela os elementos da busca\n ImageView iv = (ImageView) listItem.findViewById(R.id.thumb);\n TextView tvTitle = (TextView) listItem.findViewById(R.id.title);\n TextView tvDate = (TextView) listItem.findViewById(R.id.date);\n\n //aplicando as views no form_contato\n imageLoader.DisplayImage(feed.getItem(pos).getImage(), iv);\n tvTitle.setText(feed.getItem(pos).getTitle());\n tvDate.setText(feed.getItem(pos).getDate());\n\n return listItem;\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\tAQuery aq = new AQuery(context);\n\n\t\tStandouter qapp = (Standouter) activity.getApplication();\n\t\t// aq = new AQuery(context);\n\n\t\tmInflater = (LayoutInflater) context\n\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n\t\tif (convertView == null) {\n\t\t\tconvertView = mInflater.inflate(R.layout.galleryadapter, null);\n\t\t\tholder = new ViewHolder();\n\t\t\tholder.galleryimg = (ImageView) convertView\n\t\t\t\t\t.findViewById(R.id.imggallery);\n\t\t\tconvertView.setTag(holder);\n\t\t} else {\n\t\t\tholder = (ViewHolder) convertView.getTag();\n\t\t}\n\t\tint height = (qapp.width - 20) / 2 - qapp.width / 8 - 20;\n\t\tint width = height / 9 * 16;\n\t\tFrameLayout.LayoutParams flp = new FrameLayout.LayoutParams(width,\n\t\t\t\theight);\n\t\tflp.gravity = Gravity.CENTER;\n\t\tholder.galleryimg.setLayoutParams(flp);\n\t\taq.id(holder.galleryimg).image(getItem(position).getimgurl(),\n\t\t\t\tqapp.getmemCache(), qapp.getfileCache(), width, 0);\n\n\t\tholder.galleryimg.setScaleType(ScaleType.FIT_XY);\n\t\treturn convertView;\n\t}", "public View getView(int position, View convertView, ViewGroup parent) {\n ImageView imageView;\n if (convertView == null) { // if it's not recycled, initialize some attributes\n imageView = new ImageView(mContext);\n imageView.setLayoutParams(new GridView.LayoutParams(180, 180));\n imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);\n imageView.setPadding(8, 8, 8, 8);\n\n } else {\n imageView = (ImageView) convertView;\n }\n\n imageView.setImageResource(electronics[position]);\n return imageView;\n }", "@Override\n public View getView(final int position, View convertView, ViewGroup parent) {\n Holder holder=new Holder();\n View rowView;\n rowView = inflater.inflate(R.layout.contact_list, null);\n holder.tvname=(TextView) rowView.findViewById(R.id.txtname);\n holder.tvnumber=(TextView) rowView.findViewById(R.id.txtnumber);\n\n holder.tvname.setText(contacts.get(position).getName());\n holder.tvnumber.setText(contacts.get(position).getNumber());\n\n /*\n rowView.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n // TODO Auto-generated method stub\n\n }\n });\n\n */\n return rowView;\n }", "private void showArrayAdaptView() {\n\t\tPersonAdapt personAdapt = new PersonAdapt(this, persons, R.layout.listview_item);\n\t\tlistView.setAdapter(personAdapt);\n\t}", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\n\t\tViewHolder holder;\n\t\t// Recycle existing view if passed as parameter\n\t\t// This will save memory and time on Android\n\t\t// This only works if the base layout for all classes are the same\n\t\tView rowView = convertView;\n\t\tif (rowView == null) {\n\t\t\tLayoutInflater inflater = context.getLayoutInflater();\n\t\t\trowView = inflater.inflate(R.layout.about_screen_item, null, true);\n\t\t\tholder = new ViewHolder();\n\t\t\t\n\t\t\tholder.image = (ImageView) rowView.findViewById(R.id.AS_item_image);\n\t\t\tholder.label = (TextView) rowView.findViewById(R.id.AS_item_label);\n\t\t\tholder.subtext = (TextView) rowView.findViewById(R.id.AS_item_subtext);\n\t\t\t\n\t\t\trowView.setTag(holder);\n\t\t} else {\n\t\t\tholder = (ViewHolder) rowView.getTag();\n\t\t}\n\n\n\t\tif (items.get(position).getType().equals(\"email\")){\n\t\t\tholder.image.setImageDrawable(context.getResources().getDrawable(R.drawable.email));\n\t\t}\n\t\telse if (items.get(position).getType().equals(\"link\")){\n\t\t\tholder.image.setImageDrawable(context.getResources().getDrawable(R.drawable.link));\n\t\t}\n\t\t\n\t\tholder.label.setText(items.get(position).getLabel());\n\t\tholder.subtext.setText(items.get(position).getSubtext());\n\t\t\n\t\treturn rowView;\n\t}", "public View getView(final int position, View view, ViewGroup parent) {\n final ViewHolder holder;\n\n //LayoutInflater inflator = activity.getLayoutInflater();\n\n if (view == null) {\n holder = new ViewHolder();\n view = inflater.inflate(R.layout.drawer_list_item, null);//gridview_row //fra_browse_gridview_item\n holder.txtName = (CustomTextView) view.findViewById(R.id.txt_item_name);\n holder.imgIcon = (ImageView) view.findViewById(R.id.icon);\n\n\n view.setTag(holder);\n } else {\n //holder = (ViewHolder) view.getTag();\n holder = (ViewHolder) view.getTag();\n }\n\n holder.txtName.setText(listName[position]);\n\n\n if (mstr_lang.equals(org.undp_iwomen.iwomen.utils.Utils.ENG_LANG)) {\n holder.txtName.setTypeface(MyTypeFace.get(mContext, MyTypeFace.NORMAL));\n\n } else if (mstr_lang.equals(org.undp_iwomen.iwomen.utils.Utils.MM_LANG)) {\n holder.txtName.setTypeface(MyTypeFace.get(mContext, MyTypeFace.ZAWGYI));\n\n }\n\n\n holder.imgIcon.setImageResource(listicon[position]);\n\n return view;\n }", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent)\n\t\t{\n\t\t\t\n\t\t\tViewHolder viewHolder = null;\n\t\t\t\n\t\t\tif(convertView == null)\n\t\t\t{\n\t\t\t\tconvertView = getLayoutInflater().inflate(R.layout.customadapterview_item, parent, false);\n\t\t\t\tviewHolder = new ViewHolder();\n\t\t\t\tviewHolder.imageView = (ImageView) convertView.findViewById(R.id.imageView);\n\t\t\t\tviewHolder.textView = (TextView) convertView.findViewById(R.id.textView);\n\t\t\t\tconvertView.setTag(viewHolder);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tviewHolder = (ViewHolder) convertView.getTag();\n\t\t\t}\n\t\t\t\n\t\t\tviewHolder.imageView.setImageResource(imageIds[position]);\n\t\t\tviewHolder.textView.setText(\"Image\"+position);\n\t\t\t\n\t\t\treturn convertView;\n\t\t}", "@Override\n\t\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\t\tLayoutInflater inflater=(LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);\n\t\t\tView v=inflater.inflate(R.layout.custom, null);\n\t\t\t\n\t\t\ttv1=(TextView)v.findViewById(R.id.text1);\n\t\t\ttv1.setText(names[position]);\n\t\t\t\n\t\t\t\n\t\t\ttv2=(TextView)v.findViewById(R.id.text2);\n\t\t\ttv2.setText(phones[position]);\n\t\t\t\n\t\t\t\n\t\t\treturn v;\n\t\t}", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tInboxItemHolder drawerHolder;\n\t\tView view = convertView;\n\n\t\tif (view == null) {\n\t\t\tLayoutInflater inflater = ((Activity) context).getLayoutInflater();\n\t\t\tdrawerHolder = new InboxItemHolder();\n\n\t\t\tview = inflater.inflate(layoutResID, parent, false);\n\t\t\tdrawerHolder.TxtSubject = (TextView) view\n\t\t\t\t\t.findViewById(R.id.txt_subject);\n\t\t\tdrawerHolder.TxtFrom = (TextView) view.findViewById(R.id.txt_from);\n\t\t\tdrawerHolder.TxtDate = (TextView)view.findViewById(R.id.txt_date);\n\t\t\tdrawerHolder.icon = (ImageView) view.findViewById(R.id.email_ava_list);\n\n\t\t\tview.setTag(drawerHolder);\n\t\t} else {\n\t\t\tdrawerHolder = (InboxItemHolder) view.getTag();\n\t\t}\n\n\t\tInboxEntity dItem = (InboxEntity) this.drawerItemList.get(position);\n\t\t\n\t\tdrawerHolder.TxtSubject.setText(dItem.getSubject());\n\t\tdrawerHolder.TxtFrom.setText(dItem.getFrom());\n\t\tdrawerHolder.TxtDate.setText(dItem.getDate());\n\t\t\n\t\tColorGenerator generator = ColorGenerator.MATERIAL;\n\t\tint color = generator.getColor(dItem.getFrom());\n\t\tTextDrawable.IBuilder builder = TextDrawable.builder().round();\n\t\tString icon = (dItem.getFrom().matches(\"^[a-zA-Z].*$\"))?dItem.getFrom().substring(0, 1):dItem.getFrom().substring(1, 2);\n\t\ticon = (icon.matches(\"^[a-zA-Z].*$\")?icon:dItem.getFrom().substring(2,3));\n\t\tTextDrawable td = builder.build(icon.toUpperCase(), color);\n\t\tdrawerHolder.icon.setImageDrawable(td);\n\t\treturn view;\n\t}", "@Override\n public View getView(Context context) {\n LayoutInflater layoutInflator = LayoutInflater.from(context);\n\n LinearLayout view = new LinearLayout(context);\n layoutInflator.inflate(R.layout.list_item_logs, view);\n \n Drawable iconImage = context.getResources().getDrawable(mLogLevel.getDrawable());\n ImageView icon = (ImageView) view.findViewById(R.id.list_item_icon);\n icon.setImageDrawable(iconImage);\n \n TextView mainText = (TextView) view.findViewById(R.id.list_item_text);\n mainText.setText(mDescription);\n \n TextView subText = (TextView) view.findViewById(R.id.list_item_subtext);\n \n // mTime is parsed from a String for RAIDiator 4\n // if we didn't succeed in parsing the date, fall back to the original string\n if (mTime != null) {\n subText.setText(mTime.toString());\n } else {\n subText.setText(mDateString);\n }\n \n return view;\n }", "@NonNull\n @Override\n public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {\n String name = getItem(position).getName();\n int image = getItem(position).getImage();\n\n //Create the Activity\n //Activity act = new Activity(name);\n LayoutInflater inflater = LayoutInflater.from(mContext);\n convertView = inflater.inflate(mResource, parent, false);\n\n //Create textview items and set values\n TextView tvName = (TextView) convertView.findViewById(R.id.textView2);\n\n tvName.setText(name);\n\n\n ImageView myIV = (ImageView) convertView.findViewById(R.id.MainimageView);\n myIV.setImageResource(image);\n\n return convertView;\n }", "@Override\n\tpublic View getView(int position, View convertView, ViewGroup parent) {\n\t\tView v = convertView;\n\t\tif (v == null) {\n\t\t\tLayoutInflater inflater = (LayoutInflater)getContext().getSystemService(Service.LAYOUT_INFLATER_SERVICE);\n\t\t\tv = inflater.inflate(R.layout.rss_item, null);\n\t\t}\n\t\tTextView tvTitle = (TextView)v.findViewById(R.id.tvTitle);\n\t\tTextView tvSummary = (TextView)v.findViewById(R.id.tvSummary);\n\t\tRSSItem item = this.getItem(position);\n\t\ttvTitle.setText(item.getTitle());\n\t\ttvSummary.setText(item.getDescription());\n\t\treturn v;\n\t}", "@Override\n public ListAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType)\n {\n // create a new view\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_row, parent, false);\n // set the view's size, margins, paddings and layout parameters\n\n ViewHolder vh = new ViewHolder(v);\n return vh;\n }", "@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View listItemView = convertView; // initialise recycler view\n if (listItemView == null) { // if there are no views to recycle, inflate a view\n listItemView = LayoutInflater.from(getContext()).inflate(\n R.layout.list_item, parent, false);\n }\n\n Song currentSong = getItem(position);\n\n TextView artistTextView = (TextView) listItemView.findViewById(R.id.artist);\n artistTextView.setText(currentSong.getArtistName());\n\n TextView albumTextView = (TextView) listItemView.findViewById(R.id.album);\n albumTextView.setText(currentSong.getAlbum());\n\n TextView songTextView = (TextView) listItemView.findViewById(R.id.song);\n songTextView.setText(currentSong.getSong());\n\n ImageView albumCover = (ImageView) listItemView.findViewById(R.id.album_cover);\n albumCover.setImageResource(currentSong.getImageId());\n\n return listItemView;\n }", "public abstract String getView();", "public View getView(int position, View convertView, ViewGroup parent) {\n\t\tRowView view;\n\t\tif (null == convertView) {\n\t\t\t// if there isn't one to recycle, init a new view\n\t\t\t// view = new TextView(this.mContext);\n\t\t\t// view = new Button(mContext);\n\t\t\t// view.setTextSize(18); // Properties where all views are the same\n\t\t\t// view = new ImageView(this.mContext);\n\t\t\t// view.setImageResource(R.drawable.ic_launcher);\n\t\t\tview = new RowView(this.mContext);\n\t\t} else {\n\t\t\t// use the recycled view (convert this view)\n\t\t\t// view = (TextView) convertView;\n\t\t\t// view = (Button) convertView;\n\t\t\t// view = (ImageView) convertView;\n\t\t\tview = (RowView) convertView;\n\t\t}\n\t\t// Properties where each view is different\n\t\t// view.setText(\" Row \" + position);\n\t\t// view.setTextColor(Color.rgb(position * 10, 255 - position * 10,\n\t\t// 200));\n\t\tview.setLeftText(\"\" + (position + 1) + \".\");\n\t\tview.setRightText(mNamesArray[position % 12]);\n\n\t\treturn view;\n\t}" ]
[ "0.7156826", "0.7130499", "0.7109641", "0.69379836", "0.6912278", "0.6905601", "0.6727164", "0.6715931", "0.6703116", "0.66985863", "0.66848433", "0.6651084", "0.6624867", "0.6622616", "0.6622616", "0.6617467", "0.66094905", "0.6600301", "0.65976864", "0.65966547", "0.6585918", "0.6577227", "0.6544331", "0.65383774", "0.6522474", "0.6518225", "0.6508683", "0.6508683", "0.65070677", "0.6491636", "0.648068", "0.648068", "0.6479547", "0.64738894", "0.64547956", "0.64352494", "0.641905", "0.6405823", "0.64047426", "0.64020437", "0.6397047", "0.63925356", "0.63923216", "0.63857263", "0.63812566", "0.6380687", "0.6379714", "0.63786316", "0.63736", "0.63625014", "0.6349756", "0.63488764", "0.63428456", "0.63367766", "0.6333408", "0.63315964", "0.632802", "0.6325982", "0.63239", "0.63207185", "0.6319177", "0.6317568", "0.6311627", "0.6308254", "0.63081205", "0.63073707", "0.6303802", "0.63030297", "0.63030297", "0.6302193", "0.6301971", "0.62951297", "0.62937665", "0.6289999", "0.6287728", "0.62763", "0.6275406", "0.6275014", "0.62728375", "0.6269711", "0.62685037", "0.6267008", "0.62656486", "0.62619585", "0.62553126", "0.6255144", "0.62516904", "0.62511986", "0.62502533", "0.6249896", "0.6243272", "0.623953", "0.6238847", "0.6236496", "0.62362266", "0.6235089", "0.6234868", "0.62319213", "0.62306684", "0.62267756", "0.62258416" ]
0.0
-1
Called when the application is started.
@Override public void start(Stage primaryStage) throws Exception { // set up window. primaryStage.setWidth(600); primaryStage.setHeight(400); primaryStage.setResizable(false); // set up scenes. FXMLLoader mainMenuLoader = new FXMLLoader(getClass().getResource("FXML/mainMenuLayout.fxml")); Scene mainMenuScene = new Scene(mainMenuLoader.load()); FXMLLoader gameLoader = new FXMLLoader(getClass().getResource("FXML/gameLayout.fxml")); Scene gameScene = new Scene(gameLoader.load()); // set the main menu to load into the game. MainMenuController mainMenuController = (MainMenuController) mainMenuLoader.getController(); mainMenuController.setGameScene(gameScene); primaryStage.setScene(mainMenuScene); primaryStage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void appStart() {\n }", "@Override\n public void firstApplicationStartup()\n {\n System.out.println(\"firstApplicationStartup\");\n \n }", "public void startApp()\r\n\t{\n\t}", "@Override\n public void startup() {\n }", "public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }", "@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }", "public void startup() {\n\t\tstart();\n }", "public void startup(){}", "protected void onStart ()\n\t{\n\t\tsuper.onStart ();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tSystem.out.println(\"onStart...\");\n\t}", "protected void start() {\n }", "public void onStart() {\n\t\t\n\t}", "public void onStart() {\n }", "protected void onFirstTimeLaunched() {\n }", "public void init()\n {\n _appContext = SubAppContext.createOMM(System.out);\n _serviceName = CommandLine.variable(\"serviceName\");\n initGUI();\n }", "public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }", "public static void init() {\n\n\t\tsnapshot = new SnapshotService();\n\t\tlog.info(\"App init...\");\n\t}", "public void start() {\r\n\t\tsetupWWD();\r\n\t\tsetupStatusBar();\r\n\t\tsetupViewControllers();\r\n\t\tsetupSky();\r\n\t\t//setupAnnotationToggling();\r\n\r\n\t\t// Center the application on the screen.\r\n\t\tWWUtil.alignComponent(null, this, AVKey.CENTER);\r\n\t\t\r\n\t\tgetLayerEnableCmd().run(); // Enable/disable the desired layers.\r\n\t}", "@Override\n public void onStart() {\n GuiMain gui = new GuiMain(this);\n gui.setVisible(true);\n log(\"Script is starting!\");\n\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitMain();\n\n\t}", "public void onStart() {\n }", "@Override\r\n\tprotected void onStart() {\n\t\tXSDK.getInstance().onStart();\r\n\t\tsuper.onStart();\r\n\t}", "@Override\n public void onCreate() {\n\n createApplicationFolders();\n\n m_logger = LogManager.getLogger();\n\n m_logger.verbose(\"in onCreate\");\n\n s_instance = this;\n\n if (BuildConfig.DEBUG) {\n ButterKnife.setDebug(true);\n m_logger.debug(\"Butter Knife initialized in debug mode.\");\n }\n\n initConfigurationFile();\n\n super.onCreate();\n }", "public void onStart() {\n super.onStart();\n }", "@Override\n protected void startUp() {\n }", "@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tpublic void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t}", "public void startUp() {\n\t\t/* Language of App */\n\t\t\n\t\t/* Init Icons */\n\t\tPaintShop.initIcons(display);\n\t\t/* Init all components */\n\t\tinitComponents();\n\t\t\n\t\t\n\t}", "@Override\n protected void onStart() {\n super.onStart();\n initializeLogging();\n }", "@Override\n public void onCreate() {\n if (DEBUG) {\n Log.d(TAG, \"start\");\n }\n super.onCreate();\n init();\n }", "@Override\n\tprotected void onStart() {\n\t\tSystem.out.println(\"onStart\");\n\t}", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tSystem.out.println(\"onStart\");\n\t\t\t\tif(listener!=null) listener.onMessage(\"onStart\");\n\t\t\t\tisRun = true;\n\t\t\t}", "@Override\n\t\tprotected void onStart() {\n\t\t\tsuper.onStart();\n\t\t}", "public void start()\n {\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tSystem.out.println(\"Método onStart\");\n\t}", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t\tsuper.onStart();\n\t\t\t\t}", "@Override\n protected void onStart() {\n super.onStart();\n\n Log.d(TAG, \"now running: onStart\");\n }", "@Override\n\tprotected void onStart()\n\t{\n\t\tsuper.onStart();\n\t}", "@Override\n protected void onCreate(Bundle bundle) {\n super.onCreate(bundle);\n mTAG = this.getClass().getSimpleName();\n initConfigure();\n //PushAgent.getInstance(mContext).onAppStart();\n\n }", "void onStart() {\n\n }", "@Override public void start() {\n }", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t}", "@Override\r\n public void onStart() {\n super.onStart();\r\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tLogger.d(TAG, \"onStart.....\");\n\t}", "public abstract void startup();", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n public void onStart() {\n \n }", "@Override\n public void onStart() {\n \n }", "@Override\n public void onStart() {\n System.out.println(\"ONstart\");\n super.onStart();\n\n }", "void startup();", "void startup();", "private void start() {\n\n\t}", "public void initialize() {\n\n getStartUp();\n }", "@Override\n\t\t\tpublic void onStart()\n\t\t\t{\n\t\t\t\tsuper.onStart();\n\t\t\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tmApplication = null;\n\t\tContext appCtx = getApplicationContext();\n\t\tif (appCtx instanceof DSCApplication) {\n\t\t\tmApplication = (DSCApplication) appCtx;\n\t\t}\n\t\tif (mApplication != null) {\n\t\t\tmApplication.initFolderObserverList(false);\n\t\t}\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n mainLoad();\n onListeningDataChange();\n }", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tLog.i(TAG, \"onStart\");\n\t}", "@Override\n public void simpleInitApp() {\n this.viewPort.setBackgroundColor(ColorRGBA.LightGray);\n im = new InteractionManager();\n setEdgeFilter();\n initEnemies();\n initCamera();\n initScene();\n initPlayer();\n initCrossHairs();\n }", "@Override\n public void onCreate() {\n Thread.setDefaultUncaughtExceptionHandler(new TryMe());\n\n super.onCreate();\n\n // Write the content of the current application\n context = getApplicationContext();\n display = context.getResources().getDisplayMetrics();\n\n\n // Initializing DB\n App.databaseManager.initial(App.context);\n\n // Initialize user secret\n App.accountModule.initial();\n }", "@Override\n\tprotected void onCreate (Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAndroidApplicationConfiguration config = new AndroidApplicationConfiguration();\n\t\tinitialize(new MainClass(), config);\n\t\tstartService(new Intent(getBaseContext(),MyServices.class));\n\t}", "@Override\n\t\t\t\tpublic void onStart() {\n\t\t\t\t}", "@Override\r\n public void start() {\r\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}", "@Override\n public void run() {\n startup();\n }", "@Override\n public void start() {\n }", "public void start() {\n }", "void onStarted();", "@Override\n public void onStart() {\n super.onStart();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n if(!Synergykit.isInit()) {\n Synergykit.init(APPLICATION_TENANT, APPLICATION_KEY);\n Synergykit.setDebugModeEnabled(BuildConfig.DEBUG);\n }\n }" ]
[ "0.77088106", "0.7487664", "0.7473342", "0.7438125", "0.73537135", "0.7306675", "0.7234206", "0.7169201", "0.7083496", "0.7075781", "0.706173", "0.70574486", "0.7047982", "0.699822", "0.6985246", "0.6973327", "0.6954216", "0.6944699", "0.6939572", "0.6935951", "0.69259304", "0.6910966", "0.69099784", "0.69098014", "0.6907746", "0.69061255", "0.69041437", "0.69041437", "0.6895431", "0.6895431", "0.6895431", "0.6895431", "0.6895431", "0.6894818", "0.68771523", "0.68766993", "0.686979", "0.6861746", "0.6859372", "0.6846272", "0.68438786", "0.68274945", "0.68274945", "0.682736", "0.68263173", "0.6821245", "0.681934", "0.68189275", "0.6816664", "0.6816664", "0.6816664", "0.6816664", "0.6816664", "0.6816664", "0.68003285", "0.68003285", "0.68003285", "0.68003285", "0.68003285", "0.68003285", "0.68003285", "0.68003285", "0.68003285", "0.68003285", "0.68003285", "0.67854273", "0.6784389", "0.67843604", "0.67800105", "0.67800105", "0.67800105", "0.6777981", "0.6777981", "0.677716", "0.6774075", "0.6774075", "0.67736346", "0.6772077", "0.6772077", "0.67602897", "0.67553645", "0.6749599", "0.6748638", "0.6740187", "0.673979", "0.6729197", "0.6726553", "0.6715157", "0.6715157", "0.6715157", "0.6715157", "0.6715157", "0.6715157", "0.6715157", "0.6703419", "0.6698747", "0.6698039", "0.6697635", "0.6697626", "0.66916037", "0.6690408" ]
0.0
-1
Convert the given recipe into an up to 3x3 grid of ingredients
Ingredient[] shape(IRecipe recipe);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void readRecipes() {\n\t\tBufferedReader br = null;\n\t\tString line = \"\";\n\t\tString cvsSplitBy = \",\";\n\t\ttry {\n\n\t\t\tbr = new BufferedReader(new FileReader(inputFileLocation));\n\t\t\twhile ((line = br.readLine()) != null) {\n\n\t\t\t\tString[] currentLine = line.split(cvsSplitBy);\n\t\t\t\tRecipe currentRecipe = new Recipe(currentLine[0]);\n\t\t\t\t/*\n\t\t\t\t * String[] recipe=new String[currentLine.length-1];\n\t\t\t\t * System.arraycopy(currentLine,1,recipe,0,recipe.length-2);\n\t\t\t\t */\n\t\t\t\tString[] recipe = java.util.Arrays.copyOfRange(currentLine, 1,\n\t\t\t\t\t\tcurrentLine.length);\n\t\t\t\tArrayList<String> ingredients = new ArrayList<String>();\n\t\t\t\tfor (String a : recipe) {\n\t\t\t\t\tingredients.add(a);\n\t\t\t\t}\n\t\t\t\tcurrentRecipe.setIngredients(ingredients);\n\t\t\t\tRecipes.add(currentRecipe);\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (br != null) {\n\t\t\t\ttry {\n\t\t\t\t\tbr.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "private void generateRecipeList(List<Match> recipeDataList, int ingredients) {\n allMatches.clear();\n // Produces numerical score for each recipe\n weightedSearchByIngredients(recipeDataList, ingredients);\n allMatches.addAll(recipeDataList);\n adapter = new IngredientSearchAdapter(allMatches);\n recyclerView.setAdapter(adapter);\n for (Match recipe : recipeDataList){\n System.out.println(\"Recipe: \" + recipe.getRecipeName()\n + \"| Weight: \" + recipe.getWeight()\n + \"| Ingredients: \" + recipe.getIngredients().size());\n }\n }", "public static void main(String[] args) {\n Recipe recipe ;\n Scanner keyboard= new Scanner (System.in);\n ArrayList<Recipe> recipeArrayList= new ArrayList<> ();\n ArrayList<String> ingridetList= new ArrayList<>();\n ArrayList<String>directionsList= new ArrayList<>();\n String answer;\n\n do{\n recipe = new Recipe ();\n System.out.println (\"Enter the ingredient :\" );\n recipe.setIngredients ( keyboard.nextLine () );\n\n\n\n\n System.out.println (\"Do you want to add more ingredients?(yes/no)\" );\n answer=keyboard.nextLine ();\n ingridetList.add(recipe.getIngredients());\n recipe.setArrayIngredients(ingridetList);\n\n }while(answer.equalsIgnoreCase ( \"yes\" )||!answer.equalsIgnoreCase ( \"no\" ));\n\n\n\n System.out.println (\"Enter the directions for the ingredients: \" );\n recipe.setDirections ( keyboard.nextLine () );\n // directionsList.add(recipe.getIngredients());\n\n\n\n recipeArrayList.add ( recipe );\n\n for(Recipe recipe1:recipeArrayList) {\n\n\n for(String ingRec: recipe1.getArrayIngredients())\n {\n System.out.println ( \"The Ingredients is : \" + ingRec );\n }\n System.out.println (\"The Directions is : \" + recipe1.getDirections () );\n }\n\n }", "public Recipe getRecipe(){\n\t\tRecipe recipe = new Recipe();\n\t\trecipe.setName(name);\n\t\trecipe.setNumPersons(numPersons);\n\t\trecipe.setPrepTime(prepTime);\n\t\trecipe.setRestTime(restTime);\n\t\trecipe.setCookingTime(cookingTime);\n\t\tHashMap<Ingredient, Quantity> ingredients = new HashMap<Ingredient,Quantity>();\n\t\tfor(int i = 0; i<ingredientsList.size(); i++){\n\t\t\tingredients.put(ingredientsList.get(i), quantities.get(i));\n\t\t}\n\t\trecipe.setIngredients(ingredients);\n\t\trecipe.setSteps(steps);\n\t\treturn recipe;\n\t}", "private static Object[] formatShapedGrid(Object[] itemStacksRaw, int width, int height) {\n int rawIndex = 0;\n Object[] itemStacks = new Object[9];\n for(int y = 0; y < height; y++) {\n for(int x = 0; x < width; x++) {\n itemStacks[y * 3 + x] = itemStacksRaw[rawIndex++];\n if(rawIndex >= itemStacksRaw.length) break;\n }\n if(rawIndex >= itemStacksRaw.length) break;\n }\n return itemStacks;\n }", "private void loadRecipe(ArrayList<Recipe> recipe) throws SQLException, ClassNotFoundException {\r\n ArrayList<Ingredient> ingredients = new IngredientControllerUtil().getAllIngredient();\r\n ObservableList<RecipeTM> obList = FXCollections.observableArrayList();\r\n\r\n for (Recipe r : recipe) {\r\n for (Ingredient ingredient : ingredients) {\r\n if (r.getIngreID().equals(ingredient.getIngreID())) {\r\n\r\n String scale;\r\n Button btn = new Button(\"Remove\");\r\n double unit = 1;\r\n\r\n if (ingredient.getIngreUnit().matches(\"[0-9]*(g)$\")) {\r\n scale = \"g\";\r\n unit = Double.parseDouble(ingredient.getIngreUnit().split(\"g\")[0]);\r\n } else if (ingredient.getIngreUnit().matches(\"[0-9]*(ml)$\")) {\r\n scale = \"ml\";\r\n unit = Double.parseDouble(ingredient.getIngreUnit().split(\"m\")[0]);\r\n } else {\r\n scale = \"\";\r\n unit = Double.parseDouble(ingredient.getIngreUnit());\r\n }\r\n\r\n double price = (ingredient.getUnitePrice() / unit) * r.getQty();\r\n RecipeTM tm = new RecipeTM(\r\n r.getIngreID(),\r\n ingredient.getIngreName(),\r\n ingredient.getIngreUnit(),\r\n r.getQty() + scale,\r\n price,\r\n btn\r\n );\r\n obList.add(tm);\r\n removeIngre(btn, tm, obList);\r\n break;\r\n }\r\n\r\n }\r\n }\r\n tblRecipe.setItems(obList);\r\n }", "private Recipe mapToRecipeObject(RecipeEntity recipeEntity) {\n\t\tRecipe recipe = new Recipe();\n\t\t//Map primitive fields\n\t\trecipe.setId(recipeEntity.getId());\n\t\trecipe.setName(recipeEntity.getName());\n\t\trecipe.setType(recipeEntity.getType());\n\t\trecipe.setServingCapacity(recipeEntity.getServingCapacity());\n\t\t\n\t\t//Format creation date time to required format\n\t\tif(recipeEntity.getCreationDateTime() != null)\n\t\t\trecipe.setCDateTimeString(Util.formatDateTime(recipeEntity.getCreationDateTime()));\n\t\trecipe.setCreationDateTime(recipeEntity.getCreationDateTime());\n\t\t\n\t\t//Convert ingredients string into list and set to recipe object \n\t\tlog.debug(\"Ingredients String from DB: \"+recipeEntity.getIngredients());\n\t\tList<Ingredient> ingredientsList = Util.convertJSONStringToIngredientsList(recipeEntity.getIngredients());\n\t\tlog.debug(\"Ingredients List size after conversion: \"+ingredientsList.size());\n\t\trecipe.setIngredientsList(ingredientsList);\n\n\t\trecipe.setInstructions(recipeEntity.getInstructions());\n\n\t\treturn recipe;\n\t}", "private RecipeEntity mapToRecipeEntity(Recipe recipe) {\n\t\tRecipeEntity rEntity = new RecipeEntity();\n\t\t//Map primitive fields\n\t\trEntity.setId(recipe.getId());\n\t\trEntity.setName(recipe.getName());\n\t\trEntity.setType(recipe.getType());\n\t\trEntity.setServingCapacity(recipe.getServingCapacity());\n\t\t\n\t\t//Save current date time into recipe instance, if not given\n\t\tif(recipe.getCreationDateTime() == null) {\n\t\t\tOptional<Date> currentDateTime = Util.getCurrentDateTime();\n\t\t\tif(currentDateTime.isPresent())\n\t\t\t\tlog.debug(\"Current DateTime to be set in recipe entity: \"+currentDateTime.toString());\n\t\t\telse\n\t\t\t\tlog.warn(\"Setting null to current date time field in recipe entity\");\n\t\t\trEntity.setCreationDateTime(currentDateTime.get());\n\t\t} else {\n\t\t\tlog.debug(\"Retaining given creation date time value into recipe entity\");\n\t\t\trEntity.setCreationDateTime(recipe.getCreationDateTime());\n\t\t}\n\t\t\n\t\t//Convert ingredients list into String and set to recipe entity\n\t\tlog.debug(\"Number of ingredients to convert to string: \"+recipe.getIngredientsList().size());\n\t\tString ingredients = Util.convertToJSONString(recipe.getIngredientsList());\n\t\tlog.debug(\"Ingredients String: \"+ingredients);\n\t\trEntity.setIngredients(ingredients);\n\t\t\n\t\trEntity.setInstructions(recipe.getInstructions());\n\t\t\n\t\treturn rEntity;\n\t}", "private void createRecipe(Plugin plugin) {\n\t\tNamespacedKey nk = new NamespacedKey(plugin, \"AC_CHAINMAIL_BOOTS_A\");\n\t\tShapedRecipe recipe = new ShapedRecipe(nk, new ItemStack(Material.CHAINMAIL_BOOTS, 1));\n\n\t\trecipe.shape(\"C C\", \"C C\", \" \");\n\n\t\trecipe.setIngredient('C', Material.CHAIN);\n\t\t\n\t\tBukkit.addRecipe(recipe);\n\t}", "private void populateIngredientView() {\n\t\tListView ingredientsLV = (ListView) findViewById(R.id.lv_Ingredients);\n\t\tregisterForContextMenu(ingredientsLV);\n\n\t\tArrayList<String> combined = RecipeView\n\t\t\t\t.formCombinedArray(currentRecipe);\n\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(this,\n\t\t\t\tR.layout.list_item, combined);\n\t\tingredientsLV.setAdapter(adapter);\n\t\tsetListViewHeightBasedOnChildren(ingredientsLV);\n\t}", "private void drawIngredients(){\n\t\tingredientLayout.removeAllViews(); \n\t\tfor (int i = 0; i < ingredientAdapter.getCount(); i++){\n\t\t\tingredientLayout.addView(ingredientAdapter.getView(i, null, null));\n\t\t}\n\t\tingredientLayout.requestFocus();\n\t}", "public static List<RecipeItemSelector> getRequireItemsFromRecipe(IRecipe recipe){\n\t\tif(recipe instanceof ShapelessRecipes){\n\t\t\tList<ItemStack> isList = ((ShapelessRecipes)recipe).recipeItems;\n\t\t\treturn isList.stream().map(input -> RecipeItemSelector.of(input, null)).collect(Collectors.toList());\n\t\t}\n\t\tif(recipe instanceof ShapedRecipes){\n\t\t\tItemStack[] isarray = ((ShapedRecipes)recipe).recipeItems;\n\n\t\t\treturn Lists.<ItemStack>newArrayList(isarray).stream().map( is ->RecipeItemSelector.of(is, null)).collect(Collectors.toList());\n\t\t}\n\t\tif(recipe instanceof ShapelessOreRecipe){\n\n\n\n\t\t\tList<RecipeItemSelector> list1 = (((ShapelessOreRecipe)recipe).getInput()).stream().filter(obj -> obj instanceof ItemStack)\n\t\t\t\t\t.map(obj -> RecipeItemSelector.of((ItemStack)obj, null)).collect(Collectors.toList());\n\t\t\tList<RecipeItemSelector> list2 = (((ShapelessOreRecipe)recipe).getInput()).stream().filter(obj -> obj instanceof String)\n\t\t\t\t\t.map(obj -> RecipeItemSelector.of(null, new OreDict((String)obj))).collect(Collectors.toList());\n\t\t\tList<RecipeItemSelector> rt = Lists.newArrayList();\n\t\t\trt.addAll(list1);\n\t\t\trt.addAll(list2);\n\t\t\treturn rt;\n\n\t\t}\n\t\tif(recipe instanceof ShapedOreRecipe){\n\t\t\tObject[] isarray = ((ShapedOreRecipe)recipe).getInput();\n\t\t\tList<Object> objList = Lists.newArrayList(isarray);\n\t\t\tobjList.stream().flatMap(obj ->{\n\t\t\t\t//\t\t\t\t\tUnsagaMod.logger.trace(\"recipe\", input.getClass());\n\t\t\t\tList<RecipeItemSelector> rt = Lists.newArrayList();\n\t\t\t\tif(obj instanceof List){\n\t\t\t\t\t//\t\t\t\t\t\tUnsagaMod.logger.trace(\"shaped\", \"array\");\n\t\t\t\t\trt.addAll(convertListTypeObject(obj));\n\t\t\t\t}\n\t\t\t\tif(obj instanceof ItemStack){\n\t\t\t\t\t//\t\t\t\t\t\tUnsagaMod.logger.trace(\"shaped\", \"itemstack\");\n\t\t\t\t\tList<RecipeItemSelector> list = Lists.newArrayList(RecipeItemSelector.of((ItemStack)obj, null));\n\t\t\t\t\trt.addAll(list);\n\t\t\t\t}\n\n\t\t\t\t//\t\t\t\t\tif(objs!=null){\n\t\t\t\t//\t\t\t\t\t\tObject[] objarray = (Object[]) objs;\n\t\t\t\t//\t\t\t\t\t\treturn ListHelper.stream(objarray).map(new Function<Object,Tuple<ItemStack,OreDict>>(){\n\t\t\t\t//\n\t\t\t\t//\t\t\t\t\t\t\t@Override\n\t\t\t\t//\t\t\t\t\t\t\tpublic Tuple<ItemStack, OreDict> apply(Object input) {\n\t\t\t\t//\t\t\t\t\t\t\t\tUnsagaMod.logger.trace(\"shaped\", input);\n\t\t\t\t//\t\t\t\t\t\t\t\tif(input instanceof ItemStack){\n\t\t\t\t//\t\t\t\t\t\t\t\t\treturn Tuple.of((ItemStack)input,null);\n\t\t\t\t//\t\t\t\t\t\t\t\t}\n\t\t\t\t//\t\t\t\t\t\t\t\tif(input instanceof String){\n\t\t\t\t//\t\t\t\t\t\t\t\t\treturn Tuple.of(null, new OreDict((String) input));\n\t\t\t\t//\t\t\t\t\t\t\t\t}\n\t\t\t\t//\t\t\t\t\t\t\t\treturn null;\n\t\t\t\t//\t\t\t\t\t\t\t}}\n\t\t\t\t//\t\t\t\t\t\t).getList();\n\t\t\t\t//\t\t\t\t\t}\n\n\t\t\t\treturn rt.stream();\n\t\t\t});\n\t\t}\n\t\tHSLib.logger.trace(\"recipeutil\", \"どのレシピにも合致しない?\");\n\t\treturn Lists.newArrayList();\n\t}", "public Recipe(String[] in)\r\n {\r\n double temp;\r\n if (in.length == 3){\r\n this.origQty = in[0];\r\n this.measure = in[1];\r\n this.ingredient = in[2];\r\n this.w_qty = makeDecimal(in[0]);\r\n }\r\n else {if (in.length == 5) {\r\n this.origQty = in[0] + \" \" + in[1];\r\n this.measure = in[2];\r\n this.ingredient = in[3] + \" \" + in[4];\r\n temp = makeDecimal(in[1]);\r\n this.w_qty = Double.parseDouble(in[0])+ temp;\r\n }\r\n else if (in.length == 4) {\r\n if (in[1].contains(\"/\")) {\r\n this.origQty = in[0] + \" \" + in[1];\r\n this.measure = in[2];\r\n this.ingredient = in[3];\r\n temp = makeDecimal(in[1]);\r\n this.w_qty = temp + Double.parseDouble(in[0]);}\r\n else {\r\n this.origQty = in[0];\r\n this.measure = in[1];\r\n this.ingredient = in[2] + \" \" + in[3];\r\n this.w_qty = makeDecimal(in[0]);}\r\n }\r\n }\r\n this.working_measure = measure;\r\n this.final_measure = measure;\r\n }", "public static void craft()\r\n\t{\r\n\t\tList<IRecipe> recipeList = CraftingManager.getInstance().getRecipeList();\r\n\t\tIterator<IRecipe> recipe = recipeList.iterator();\r\n\r\n\t\twhile (recipe.hasNext())\r\n\t\t{\r\n\t\t\tItemStack stack = recipe.next().getRecipeOutput();\r\n\r\n\t\t\tif (stack != null && stack.areItemsEqual(stack, new ItemStack(Blocks.STONEBRICK, 1, 0)))\r\n\t\t\t{\r\n\t\t\t\trecipe.remove();\r\n\t\t\t} else if (stack != null && stack.areItemsEqual(stack, new ItemStack(Blocks.END_BRICKS, 1, 0)))\r\n\t\t\t{\r\n\t\t\t\trecipe.remove();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\r\n\t\t * Adds all the 2 by 2 crafting Recipes\r\n\t\t */\r\n\t\tcraft2by2(new ItemStack(Blocks.STONE, 1, 2), new ItemStack(BBBlocks.moreStones, 4, 1));\r\n\t\tcraft2by2(new ItemStack(Blocks.STONE, 1, 4), new ItemStack(BBBlocks.moreStones, 4, 3));\r\n\t\tcraft2by2(new ItemStack(Blocks.STONE, 1, 6), new ItemStack(BBBlocks.moreStones, 4, 5));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 6), new ItemStack(BBBlocks.moreStones, 4, 9));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 9), new ItemStack(BBBlocks.moreStones, 4, 8));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 10), new ItemStack(BBBlocks.moreStones, 4, 13));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 13), new ItemStack(BBBlocks.moreStones, 4, 12));\r\n\t\tcraft2by2(new ItemStack(Blocks.SANDSTONE, 1, 2), new ItemStack(BBBlocks.moreStones, 4, 14));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 8), new ItemStack(BBBlocks.cotswoldBricks, 4));\r\n\t\tcraft2by2(new ItemStack(Blocks.BRICK_BLOCK, 1), new ItemStack(BBBlocks.agedBricks, 4));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 2), new ItemStack(BBBlocks.moreStones2, 4, 5));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 5), new ItemStack(BBBlocks.moreStones2, 4, 4));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 1), new ItemStack(BBBlocks.moreStones2, 4, 0));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones, 1, 14), new ItemStack(BBBlocks.moreStones2, 4, 1));\r\n\t\tcraft2by2(new ItemStack(Blocks.RED_SANDSTONE, 1, 2), new ItemStack(BBBlocks.moreStones2, 4, 6));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 6), new ItemStack(BBBlocks.moreStones2, 4, 9));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 9), new ItemStack(BBBlocks.moreStones2, 4, 8));\r\n\t\tcraft2by2(new ItemStack(Blocks.NETHERRACK, 1), new ItemStack(BBBlocks.moreStones2, 4, 11));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 11), new ItemStack(BBBlocks.moreStones2, 4, 10));\r\n\t\tcraft2by2(new ItemStack(Blocks.STONE), new ItemStack(BBBlocks.moreStones2, 4, 12));\r\n\t\tcraft2by2(new ItemStack(Blocks.END_STONE), new ItemStack(BBBlocks.moreStones2, 4, 13));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 12), new ItemStack(Blocks.STONEBRICK, 4, 0));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones2, 1, 13), new ItemStack(Blocks.END_BRICKS, 4, 0));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones3, 1, 0), new ItemStack(BBBlocks.moreStones3, 4, 2));\r\n\t\tcraft2by2(new ItemStack(BBBlocks.moreStones3, 1, 2), new ItemStack(BBBlocks.moreStones3, 4, 1));\r\n\r\n\r\n\t\t/**\r\n\t\t * Adds all the stair Recipes\r\n\t\t */\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 0), new ItemStack(BBBlocks.cobbleGraniteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 2), new ItemStack(BBBlocks.cobbleDioriteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 4), new ItemStack(BBBlocks.cobbleAndesiteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 7), new ItemStack(BBBlocks.cobbleLimestoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 11), new ItemStack(BBBlocks.cobbleMarbleStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 15), new ItemStack(BBBlocks.cobbleSandstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 3), new ItemStack(BBBlocks.cobbleBasaltStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 7), new ItemStack(BBBlocks.cobbleRedsandstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 1), new ItemStack(BBBlocks.brickGraniteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 3), new ItemStack(BBBlocks.brickDioriteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 5), new ItemStack(BBBlocks.brickAndesiteStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 8), new ItemStack(BBBlocks.brickLimestoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones, 1, 12), new ItemStack(BBBlocks.brickMarbleStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 0), new ItemStack(BBBlocks.brickSandstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 4), new ItemStack(BBBlocks.brickBasaltStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 8), new ItemStack(BBBlocks.brickRedsandstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones2, 1, 10), new ItemStack(BBBlocks.brickNetherrackStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.cotswoldBricks, 1), new ItemStack(BBBlocks.brickCotswoldStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.agedBricks, 1), new ItemStack(BBBlocks.brickAgedbrickStair, 4));\r\n\t\tcraftStair(new ItemStack(Blocks.END_BRICKS, 1), new ItemStack(BBBlocks.brickEndstoneStair, 4));\r\n\t\tcraftStair(new ItemStack(Blocks.RED_NETHER_BRICK, 1), new ItemStack(BBBlocks.brickRednetherStair, 4));\r\n\t\tcraftStair(new ItemStack(BBBlocks.moreStones3, 1, 1), new ItemStack(BBBlocks.brickAcheriteStair, 4));\r\n\r\n\t\t/**\r\n\t\t * Adds all the slab Recipes\r\n\t\t */\r\n\t\tcraftSlab(BBBlocks.cobbleAndesiteSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleGraniteSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleDioriteSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleMarbleSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleLimestoneSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleSandstoneSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleBasaltSlab);\r\n\t\tcraftSlab(BBBlocks.cobbleRedsandstoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickAndesiteSlab);\r\n\t\tcraftSlab(BBBlocks.brickGraniteSlab);\r\n\t\tcraftSlab(BBBlocks.brickDioriteSlab);\r\n\t\tcraftSlab(BBBlocks.brickMarbleSlab);\r\n\t\tcraftSlab(BBBlocks.brickLimestoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickSandstoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickBasaltSlab);\r\n\t\tcraftSlab(BBBlocks.brickRedsandstoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickRednetherSlab);\r\n\t\tcraftSlab(BBBlocks.brickEndstoneSlab);\r\n\t\tcraftSlab(BBBlocks.brickNetherrackSlab);\r\n\t\tcraftSlab(BBBlocks.brickCotswoldSlab);\r\n\t\tcraftSlab(BBBlocks.brickAgedbrickSlab);\r\n\t\tcraftSlab(BBBlocks.brickAcheriteSlab);\r\n\t\t\r\n\t\t/**\r\n\t\t * Other Crafting Recipes\r\n\t\t */\r\n\t\tGameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BBBlocks.moreStones2, 16, 14), new Object[] { Blocks.CLAY, \"sand\", Blocks.GRAVEL, Items.WATER_BUCKET}));\r\n\t\tNBTTagCompound concreteTag = new NBTTagCompound();\r\n\t\tconcreteTag.setInteger(\"color\", 16777215);\r\n\t\tItemStack concreteStack = new ItemStack(BBBlocks.concreteDyeable, 8, 0);\r\n\t\tconcreteStack.setTagCompound(concreteTag);\r\n\t\tGameRegistry.addRecipe(concreteStack, new Object[] { \"###\", \"#O#\", \"###\", '#', new ItemStack(BBBlocks.moreStones2, 1, 15), 'O', Items.PAPER });\r\n\t\tGameRegistry.addRecipe(new RecipesConcreteDyeable());\r\n\t\tGameRegistry.addRecipe(new RecipesConcreteTiles());\r\n\t\tGameRegistry.addRecipe(new RecipesConcreteDyeable.RecipeDuplicateConcrete());\r\n\t\tGameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BBBlocks.overgrowth, 8),new Object[] { \"treeLeaves\", \"treeLeaves\"}));\r\n\r\n\t\t/**\r\n\t\t * Adds all the smelting Recipes\r\n\t\t */\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 0), new ItemStack(Blocks.STONE, 1, 1));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 2), new ItemStack(Blocks.STONE, 1, 3));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 4), new ItemStack(Blocks.STONE, 1, 5));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 7), new ItemStack(BBBlocks.moreStones, 1, 6));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 11), new ItemStack(BBBlocks.moreStones, 1, 10));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones, 1, 15), new ItemStack(BBBlocks.moreStones, 1, 14));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones2, 1, 3), new ItemStack(BBBlocks.moreStones2, 1, 2));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones2, 1, 7), new ItemStack(BBBlocks.moreStones2, 1, 6));\r\n\t\tsmelt(new ItemStack(BBBlocks.moreStones2, 1, 14), new ItemStack(BBBlocks.moreStones2, 1, 15));\r\n\r\n\t}", "@Override\n\tpublic void addRecipes() \n\t{\n GameRegistry.addRecipe(new ItemStack(this), \"xxx\", \"xyx\", \"xxx\",\t\t\t\t\t\t\n 'x', Items.fireworks, \n 'y', Items.string\n ); \n \n // Bundle of rockets back to 8 rockets\n GameRegistry.addShapelessRecipe(new ItemStack(Items.fireworks, 8), new ItemStack(this));\n\t}", "private void organizeTiles(){\n\t\tfor(int i = 1; i <= size * size; i++){\n\t\t\tif(i % size == 0){\n\t\t\t\tadd(tiles[i - 1]);\n\t\t\t\trow();\n\t\t\t}else{\n\t\t\t\tadd(tiles[i - 1]);\n\t\t\t}\n\t\t}\n\t}", "public static ArrayList<String> findRecipesWithIngredients(int numRecipesToReturn, User curUser) {\n HashSet<String> ingredientList = curUser.getIngredients();\n //if no ingredients in user's fridge, no recipes can be made\n if (ingredientList == null || ingredientList.size() == 0) {\n return new ArrayList<String>();\n }\n LinkedHashMap<String, Integer> recipeMap = new LinkedHashMap<>();\n /* for every ingredient find recipes that have that ingredient\n count maintains a number representing how many ingredients in\n ingredientList (the user's inventory) are in the given recipe.\n For e.g. if count for \"lasagna\" is 2, then two of the ingredients\n in the lasagna recipe are in the user's inventory. */\n for (String ingredient : ingredientList) {\n //gets all recipes with ingredient\n String recipesString = getRecipesWithIngredient(ingredient);\n if (recipesString == null) {\n continue;\n }\n String[] rec = recipesString.trim().split(\"\\\\s*,\\\\s*\");\n for (String recipe : rec) {\n // get the number of occurences of the specified recipe\n Integer count = recipeMap.get(recipe);\n // if the map contains no mapping for the recipe,\n // map the recipe with a value of 1\n if (count == null) {\n recipeMap.put(recipe, 1);\n } else { // else increment the found value by 1\n recipeMap.put(recipe, count + 1);\n }\n }\n }\n //create hashmap where keys are count and value is arraylist of recipes with that count\n Map<Integer, ArrayList<String>> invertedHashMap = new HashMap<>();\n for (Map.Entry<String, Integer> entry : recipeMap.entrySet()) {\n ArrayList<String> recipe = invertedHashMap.get(entry.getValue());\n if (recipe == null) {\n ArrayList<String> recipeList = new ArrayList<>();\n recipeList.add(entry.getKey());\n invertedHashMap.put(entry.getValue(), recipeList);\n } else {\n recipe.add(entry.getKey());\n invertedHashMap.put(entry.getValue(), recipe);\n }\n }\n\n //create a new treemap with recipes with the most number of ingredients in the user's inventory.\n TreeMap<Integer, ArrayList<String>> top = treeMapOfTop(invertedHashMap, numRecipesToReturn);\n //creates a new treemap, where the top (numRecipesToReturn*2) are sorted based on the user's\n //rating preferences\n TreeMap<Double, ArrayList<String>> ratedMap = factorInRatings(top, curUser);\n //converts to arraylist of size numRecipesToReturn of top recipes\n return topSortedRecipes(ratedMap, numRecipesToReturn);\n }", "public static ArrayList<Recipe> convertJsonToRecipeObjects() throws JSONException {\n //Convert fullJsonMoviesData to JsonObject\n String urlResponse = null;\n URL jsonURL = buildUrl();\n try {\n urlResponse = getResponseFromHttpUrl(jsonURL);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n JSONArray bakingDataArray = new JSONArray(urlResponse);\n ArrayList<Recipe> results = new ArrayList<>();\n for (int i = 0; i < bakingDataArray.length(); i++) {\n Recipe recipe = new Recipe();\n recipe.setId(bakingDataArray.getJSONObject(i).getInt(ID));\n recipe.setName(bakingDataArray.getJSONObject(i).getString(NAME));\n recipe.setImage(getDefaultorActualImage(bakingDataArray.getJSONObject(i).getString(IMAGE)));\n recipe.setServings(bakingDataArray.getJSONObject(i).getString(SERVINGS));\n JSONArray ingredientsJSONArray = bakingDataArray.getJSONObject(i).getJSONArray(INGREDIENTS);\n ArrayList<Ingredient> ingredientsArray = new ArrayList<>();\n for (int j = 0; j < ingredientsJSONArray.length(); j++) {\n Ingredient ingredient = new Ingredient();\n ingredient.setIngredient(ingredientsJSONArray.getJSONObject(j).getString(INGREDIENT));\n ingredient.setMeasure(ingredientsJSONArray.getJSONObject(j).getString(MEASURE));\n ingredient.setQuantity(ingredientsJSONArray.getJSONObject(j).getString(QUANTITY));\n ingredientsArray.add(ingredient);\n }\n recipe.setIngredients(ingredientsArray);\n JSONArray stepJSONArray = bakingDataArray.getJSONObject(i).getJSONArray(STEPS);\n ArrayList<Step> stepArray = new ArrayList<>();\n for (int k = 0; k < stepJSONArray.length(); k++) {\n Step step = new Step();\n step.setId(stepJSONArray.getJSONObject(k).getString(STEP_ID));\n step.setDescription(stepJSONArray.getJSONObject(k).getString(DESCRIPTION));\n step.setShortDescription(stepJSONArray.getJSONObject(k).getString(SHORT_DESCRIPTION));\n step.setThumbnailURL(stepJSONArray.getJSONObject(k).getString(thumbnailURL));\n step.setVideoURL(stepJSONArray.getJSONObject(k).getString(videoURL));\n stepArray.add(step);\n }\n recipe.setSteps(stepArray);\n results.add(recipe);\n }\n return results;\n }", "public static Recipes[] ParseRecipeJson(String jsonresponse) throws JSONException {\n JSONArray recipesArray = new JSONArray(jsonresponse);\n Recipes[] recipe = new Recipes[recipesArray.length()];\n\n for (int i = 0; i < recipesArray.length(); i++) {\n recipe[i] = new Recipes();\n JSONObject currentRecipe = recipesArray.getJSONObject(i);\n\n recipe[i].setRecipeId(currentRecipe.getString(\"id\"));\n recipe[i].setRecipeItemName(currentRecipe.getString(\"name\"));\n recipe[i].setRecipeServings(currentRecipe.getString(\"servings\"));\n\n// PARSES INGREDIENTS ARRAY\n JSONArray ingredientsArray = currentRecipe.getJSONArray(\"ingredients\");\n ArrayList<String> ingredientsList = new ArrayList<>();\n ArrayList<String> ingredientsQtyList = new ArrayList<>();\n ArrayList<String> ingredientsMeasureList = new ArrayList<>();\n for (int j = 0; j < ingredientsArray.length(); j++) {\n\n JSONObject currentIngredients = ingredientsArray.getJSONObject(j);\n ingredientsList.add(currentIngredients.getString(\"ingredient\"));\n ingredientsQtyList.add(currentIngredients.getString(\"quantity\"));\n ingredientsMeasureList.add(currentIngredients.getString(\"measure\"));\n }\n\n recipe[i].setRecipeIngredient(ingredientsList);\n recipe[i].setIngredientQuantity(ingredientsQtyList);\n recipe[i].setIngredientMeasure(ingredientsMeasureList);\n\n// PARSES INGREDIENTS ARRAY\n JSONArray stepsArray = currentRecipe.getJSONArray(\"steps\");\n ArrayList<String> stepId = new ArrayList<>();\n ArrayList<String> shortDescription = new ArrayList<>();\n ArrayList<String> description = new ArrayList<>();\n ArrayList<String> videoURL = new ArrayList<>();\n ArrayList<String> thumbnailURL = new ArrayList<>();\n for (int k = 0; k < stepsArray.length(); k++) {\n\n JSONObject currentStep = stepsArray.getJSONObject(k);\n stepId.add(currentStep.getString(\"id\"));\n shortDescription.add(currentStep.getString(\"shortDescription\"));\n description.add(currentStep.getString(\"description\"));\n videoURL.add(currentStep.getString(\"videoURL\"));\n thumbnailURL.add(currentStep.getString(\"thumbnailURL\"));\n }\n\n recipe[i].setStepId(stepId);\n recipe[i].setShortDescription(shortDescription);\n recipe[i].setDescription(description);\n recipe[i].setVideoUrl(videoURL);\n recipe[i].setThumbnilUrl(thumbnailURL);\n }\n return recipe;\n }", "static ArrayList<Ingredient> getIngredients() {\n\t\tArrayList<Ingredient> Ingredients = new ArrayList<Ingredient>();\n\t\tfor (Recipe rec : Recipes) {\n\t\t\tfor (String ing : rec.Ingredients) {\n\t\t\t\taddIngredient(Ingredients, ing);\n\t\t\t}\n\t\t}\n\t\treturn Ingredients;\n\t}", "public void addRecipes(CraftingManager par1CraftingManager)\n {\n for (int var2 = 0; var2 < this.recipeItems[0].length; ++var2)\n {\n Object var3 = this.recipeItems[0][var2];\n\n for (int var4 = 0; var4 < this.recipeItems.length - 1; ++var4)\n {\n Item var5 = (Item)this.recipeItems[var4 + 1][var2];\n par1CraftingManager.addRecipe(new ItemStack(var5), new Object[] {this.recipePatterns[var4], 'X', var3});\n }\n }\n }", "public static List<BakingRecipe> getBakingRecipes(String bakingJsonStr) throws JSONException {\n // Declare and initialize variables to return results\n\n List<BakingRecipe> bakingRecipes = new ArrayList<>();\n\n // Check if there are actual results\n JSONArray bakingJsonArray = new JSONArray(bakingJsonStr);\n if (bakingJsonArray.length() == 0) {\n return null;\n }\n for (int i = 0; i < bakingJsonArray.length(); i++) {\n // Create a bakingRecipe object to put data\n BakingRecipe bakingRecipe = new BakingRecipe();\n // Get the current json recipe\n JSONObject currentRecipeJson = bakingJsonArray.getJSONObject(i);\n // Get information for this recipe\n bakingRecipe.setId(currentRecipeJson.getInt(ID));\n bakingRecipe.setName(currentRecipeJson.getString(NAME));\n // Get ingredients array\n JSONArray ingredientJsonArray = currentRecipeJson.getJSONArray(INGREDIENTS);\n // Create List to hold the recipe ingredients\n List<BakingIngredient> bakingIngredients = new ArrayList<>();\n // Retrieve ingredients\n for (int j = 0; j < ingredientJsonArray.length(); j++) {\n // Create a baking ingredient object to hold the ingredient data\n BakingIngredient bakingIngredient = new BakingIngredient();\n // Get the current json ingredient\n JSONObject currentIngredientJson = ingredientJsonArray.getJSONObject(j);\n // Get ingredient data\n bakingIngredient.setQuantity(currentIngredientJson.getDouble(QUANTITY));\n bakingIngredient.setMeasure(currentIngredientJson.getString(MEASURE));\n bakingIngredient.setIngredient(currentIngredientJson.getString(INGREDIENT));\n // Add recipe key to baking ingredient\n bakingIngredient.setRecipeKey(bakingRecipe.getId());\n // add ingredient to ingredients list\n bakingIngredients.add(bakingIngredient);\n }\n // Add ingredients list to baking recipe\n bakingRecipe.setIngredientList(bakingIngredients);\n // Get steps array\n JSONArray stepJsonArray = currentRecipeJson.getJSONArray(STEPS);\n // Create List to hold the recipe ingredients\n List<BakingStep> bakingSteps = new ArrayList<>();\n // Retrieve ingredients\n for (int j = 0; j < stepJsonArray.length(); j++) {\n // Create a baking step object to hold the step data\n BakingStep bakingStep = new BakingStep();\n // Get the current JSON step\n JSONObject currentStepJson = stepJsonArray.getJSONObject(j);\n // Get step data\n bakingStep.setId(currentStepJson.getInt(ID));\n bakingStep.setShortDescription(currentStepJson.getString(SHORT_DESCRIPTION));\n bakingStep.setDescription(currentStepJson.getString(DESCRIPTION));\n bakingStep.setVideoURL(currentStepJson.getString(VIDEO_URL));\n bakingStep.setThumbnailURL(currentStepJson.getString(THUMBNAIL_URL));\n // add recipe key to baking step\n bakingStep.setRecipeKey(bakingRecipe.getId());\n // add step to steps list\n bakingSteps.add(bakingStep);\n }\n // add steps list to baking recipe\n bakingRecipe.setStepList(bakingSteps);\n bakingRecipe.setServings(currentRecipeJson.getInt(SERVINGS));\n bakingRecipe.setImage(currentRecipeJson.getString(IMAGE));\n // add baking recipe to baking recipe list\n bakingRecipes.add(bakingRecipe);\n }\n // return completed recipe list\n return bakingRecipes;\n }", "public static String[][] createPattern()\n {\n //the game is more like a table of 6 columns and 6 rows\n\t\n\t//we're going to have to make a 2D array of 7 rows \n\n String[][] f = new String[7][15];\n\n //Time to loop over each row from up to down\n\n for (int i = 0; i < f.length; i++)\n { \n for (int j = 0; j < f[i].length; j++)\n {\n if (j % 2 == 0) f[i][j] =\"|\";\n\n else f[i][j] = \" \";\n \n if (i==6) f[i][j]= \"-\";\n } \n }\n return f;\n }", "public static void createRecipe(Recipe r, final Shell shell)\r\n {\n final Shell newShell = new Shell(shell.getDisplay());\r\n GridLayout gridLayout = new GridLayout();\r\n gridLayout.numColumns = 1;\r\n newShell.setLayout(gridLayout);\r\n newShell.setSize(800, 600);\r\n newShell.addShellListener(new ShellListener()\r\n {\r\n\r\n public void shellActivated(ShellEvent shellevent)\r\n {\r\n }\r\n\r\n public void shellClosed(ShellEvent shellevent)\r\n {\r\n shell.setEnabled(true);\r\n }\r\n\r\n public void shellDeactivated(ShellEvent shellevent)\r\n {\r\n }\r\n\r\n public void shellDeiconified(ShellEvent shellevent)\r\n {\r\n }\r\n\r\n public void shellIconified(ShellEvent shellevent)\r\n {\r\n }\r\n });\r\n shell.setEnabled(false);\r\n\r\n // Construct edit window\r\n createEditWin(r, newShell);\r\n newShell.open();\r\n }", "public void registerRecipe() {\n\t ItemStack itemStackDroidParts = new ItemStack(SuperDopeJediMod.entityManager.droidParts);\n\t ItemStack itemStackQuadaniumSteelIngot = new ItemStack(SuperDopeJediMod.quadaniumSteelIngot); \n\t ItemStack itemStackThis = new ItemStack(this);\n\t \n\t GameRegistry.addRecipe(itemStackThis, \"xxx\", \"xyx\", \"xxx\", 'x', itemStackDroidParts,\n\t \t\t\t'y', itemStackQuadaniumSteelIngot);\t\n\t}", "private void generateRows() {\n\t\tfor (int i=0; i<squares.length; i++) {\n\t\t\trows[i]=new Row(squares[i]);\n\t\t}\n\t}", "ArrayList<ArrayList<GamePiece>> makeBoard() {\n ArrayList<ArrayList<GamePiece>> row = new ArrayList<ArrayList<GamePiece>>();\n for (int i = 0; i < this.width; i++) {\n ArrayList<GamePiece> column = new ArrayList<GamePiece>();\n for (int j = 0; j < this.height; j++) {\n GamePiece temp = new GamePiece(i, j);\n column.add(temp);\n nodes.add(temp);\n }\n row.add(column);\n }\n return row;\n }", "public void createBox(Context context){\n\t\t\n\t\tLog.d(TAG, \"Begin creating recipe box\");\n\t\t\n\t\t//Open the file containing the recipes\n final Resources resources = context.getResources();\n InputStream inputStream = resources.openRawResource(R.raw.recipes);\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n\t\t\n Log.v(TAG, \"Buffered Reader Ready\");\n \n // VAriable to hold the lines as they are read\n\t\tString line;\n try {\n \t//Read in one line from the recipe file \n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tLog.v(TAG, \"Read line from buffer: \" + line);\n\t\t\t\t\n\t\t\t\t//Split the based on the pipe delimiter \"|\"\n\t\t\t\tString[] strings = TextUtils.split(line, \"\\\\|\\\\|\");\n\t\t\t\t\n\t\t\t\t//Position zero will always be the Recipe Name\n\t\t\t\tLog.v(TAG, \"Set recipe name: \" + strings[0]);\n\t\t\t\tString recipeName = strings[0];\n\t\t\t\t\n\t\t\t\t//Position zero will always be the Recipe Name\n\t\t\t\tLog.v(TAG, \"Set recipe description: \" + strings[1]);\n\t\t\t String recipeDescription = strings[1];\n\t\t\t\t\n\t\t\t String splitter = \"\\\\|\";\n\t\t\t \n\t\t\t // The array lists for the recipe\n\t\t\t ArrayList<String> recipeCategories = stringToArrayList(strings[2], splitter);\n\t\t\t\tArrayList<String> recipeIngredients = stringToArrayList(strings[3], splitter);\n\t\t\t ArrayList<String> recipeInstructions = stringToArrayList(strings[4], splitter);\n\t\t\t\t\n\t\t\t\tRECIPES.add(new Recipe(recipeName, recipeDescription, recipeCategories, recipeIngredients, recipeInstructions));\n\t\t\t\t\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 Log.d(TAG, \"Recipe box complete\");\n\t}", "@Override\r\n\tpublic int getRecipeSize() {\r\n\t\treturn this.recipeWidth * this.recipeHeight;\r\n\t}", "public void loadIngredients(){\n llingerdientDetails.removeAllViews();\n for(int i = 0; i < llDishes.getChildCount();i++) {\n\n ((LinearLayout) llDishes.getChildAt(i).findViewById(R.id.llborderColor)).setBackgroundColor(Color.parseColor(\"#00800000\"));\n\n }\n //llborderColor_ingredients.setBackgroundColor(Color.parseColor(\"#800000\"));\n for(Dish dish: dinnerModel.getDishes()){\n\n for (Ingredient ing : dish.getIngredients()) {\n\n View ingtredientsItemView = layoutInflater.inflate(R.layout.ingredients_item_view,null);\n TextView txtingredientName = (TextView)ingtredientsItemView.findViewById(R.id.txtIngredientName);\n TextView txtingredientUnit = (TextView)ingtredientsItemView.findViewById(R.id.txtIngredientUnit);\n TextView txtingredientqty = (TextView)ingtredientsItemView.findViewById(R.id.txtIngredientqty);\n txtingredientName.setText(ing.getName());\n txtingredientqty.setText(Double.toString(Double.parseDouble(ing.getQuantity()) * dinnerModel.getNumberOfGuests()));\n txtingredientUnit.setText(ing.getUnit());\n llingerdientDetails.addView(ingtredientsItemView);\n }\n }\n }", "@Test\n public void testCorrectIngredientsDisplayedForRecipe(){\n onView(ViewMatchers.withId(R.id.recipeRecyclerView))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0,\n click()));\n\n //Verify that ingredients match up for that recipe by scrolling to that element using a custom matcher\n // If an ingredient is not there, then test will fail indicating that can't find the view\n\n for(String s:ingredientsOfNutellaPie){\n onView(withId(R.id.ingredientRecyclerView)).perform(\n RecyclerViewActions.scrollToHolder(\n withIngredientHolderTextView(s)\n )\n );\n }\n }", "public List<Recipe> getRecipe()\n {\n SQLiteDatabase db = getReadableDatabase();\n SQLiteQueryBuilder qb = new SQLiteQueryBuilder();\n\n //Attributes as they appear in the database\n String[] sqlSelect = {\"recipeid\",\"name\",\"type\",\"description\",\"ingredients\",\"instruction\",\"imageid\",\"nutritionimage\",\"cookingtime\",\"totalcost\"};\n String RECIPE_TABLE = \"Recipe\"; //Table name as it is in database\n\n qb.setTables(RECIPE_TABLE);\n Cursor cursor = qb.query(db,sqlSelect, null,null, null, null, null);\n List<Recipe> result = new ArrayList<>();\n if(cursor.moveToFirst())\n {\n do{\n Recipe recipe = new Recipe();\n recipe.setRecipeid(cursor.getInt(cursor.getColumnIndex(\"recipeid\")));\n recipe.setName(cursor.getString(cursor.getColumnIndex(\"name\")));\n recipe.setType(cursor.getString(cursor.getColumnIndex(\"type\")));\n recipe.setDescription(cursor.getString(cursor.getColumnIndex(\"description\")));\n recipe.setIngredients(cursor.getString(cursor.getColumnIndex(\"ingredients\")));\n recipe.setInstruction(cursor.getString(cursor.getColumnIndex(\"instruction\")));\n recipe.setImageid(cursor.getString(cursor.getColumnIndex(\"imageid\")));\n recipe.setNutritionimage(cursor.getString(cursor.getColumnIndex(\"nutritionimage\")));\n recipe.setCookingtime(cursor.getInt(cursor.getColumnIndex(\"cookingtime\")));\n recipe.setTotalcost(cursor.getFloat(cursor.getColumnIndex(\"totalcost\")));\n\n result.add(recipe);\n }while(cursor.moveToNext());\n }\n return result;\n }", "public static void reci(){\n\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(generatorBase, 1),\"XXX\", \"XXX\", \"XXX\", 'X', ItemHandler.ironHard));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(generatorCombust, 1), \"XYX\", \"DFD\", \"XXX\", 'X', generatorBase, 'Y', \"gemDiamond\", 'D', \"dustRedstone\", 'F', Blocks.furnace));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(tank, 1), \"XXX\", \"XYX\", \"XXX\", 'X', ItemHandler.ironHard, 'Y', \"blockGlass\"));\n GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(charcoalBlock, 1), \"CCC\", \"CCC\", \"CCC\", 'C', new ItemStack(Items.coal, 1, 1)));\n GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.coal, 9, 1), new ItemStack(charcoalBlock)));\n }", "public String matchIngredientsToRecipes() {\n String query = \"SELECT DISTINCT r.id, r.name, count(RecipeID) AS count FROM recipes AS r JOIN ingredientamount AS i ON r.id = i.RecipeID where i.IngredientID IN (\";\n\n for (int i = 0; i < selectedIngredients.size(); i++) {\n if (i != 0) {\n query = query + \",\";\n }\n query = query + selectedIngredients.get(i);\n }\n query = query + \") GROUP BY RecipeID\";\n return query;\n }", "public void drawImg(Graphics g, ArrayList<Atom> recipe){\n for(int i = 0; i < chkArr.length; i++){\n for(int j = 0; j < chkArr[0].length; j++){\n for(int k = 0; k < recipe.size(); k++){\n if(chkArr[i][j] == k+1 ){\n recipe.get(k).drawImg(g,j*32,i*32);\n }\n }\n }\n }\n }", "private void handleActionGetIngredients(int recipeId) {\n mDb = AppDatabase.getInstance(getApplicationContext());\n final List<Ingredient> ingredients = mDb.recipeDao().getRecipe(recipeId).getIngredients();\n StringBuilder ingredientsList = new StringBuilder();\n for (int i = 0; i < ingredients.size(); i++) {\n String quantity = ingredients.get(i).getQuantity();\n String measure = ingredients.get(i).getMeasure();\n String ingredient = ingredients.get(i).getIngredient();\n\n String string = \"\\n\" + quantity + \" \" + measure + \" \" + ingredient + \"\\n\";\n ingredientsList.append(string);\n }\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this,\n BakingWidgetProvider.class));\n //Now update all widgets\n BakingWidgetProvider.updateIngredientWidgets(this, appWidgetManager, appWidgetIds,\n ingredientsList.toString());\n }", "public void getNutritionixIngredientInfo(Recipe curRecipe) {\r\n\r\n ArrayList<NutritionixInfo> nutritionixIngredientList = new ArrayList<NutritionixInfo>();\r\n List<RecipeIngredient> ingredients = this.recipe.getIngredients();\r\n\r\n try {\r\n\r\n // Use the Nutritionix API to lookup nutrition facts info for each one of our ingredients\r\n for (RecipeIngredient ingredient : ingredients) {\r\n String ingredientName = ingredient.getIngredient().getIngredientName();\r\n nutritionixIngredientList.add(nutritionixBean.searchForIngredient(ingredientName, 0, 1));\r\n }\r\n\r\n // Calculate and set the nutrition attributes for this class\r\n for (RecipeIngredient ingredient : ingredients) {\r\n int servings = Math.round(ingredient.getIngredientAmount());\r\n for (NutritionixInfo ni : nutritionixIngredientList) {\r\n this.setCalories(servings * (this.getCalories() + ni.getNfCalories()));\r\n this.setCaloriesFromFat(servings * (this.getCaloriesFromFat() + ni.getNfCaloriesFromFat()));\r\n this.setCholesterol(servings * (this.getCholesterol() + ni.getNfCholesterol()));\r\n this.setDietaryFiber(servings * (this.getDietaryFiber() + ni.getNfDietaryFiber()));\r\n this.setProtein(servings * (this.getProtein() + ni.getNfProtein()));\r\n this.setSaturatedFat(servings * (this.getSaturatedFat() + ni.getNfSaturatedFat()));\r\n this.setSodium(servings * (this.getSodium() + ni.getNfSodium()));\r\n this.setSugars(servings * (this.getSugars() + ni.getNfSugars()));\r\n this.setTotalCarbohydrates(servings * (this.getTotalCarbohydrates() + ni.getNfTotalCarbohydrate()));\r\n this.setTotalFat(servings * (this.getTotalFat() + ni.getNfTotalFat()));\r\n this.setTransFat(servings * (this.getTransFat() + ni.getNfTransFat()));\r\n\r\n this.setCalciumPercentage(servings * (this.getCalciumPercentage() + ni.getNfCalciumDv()));\r\n this.setIronPercentage(servings * (this.getIronPercentage() + ni.getNfIronDv()));\r\n this.setVitaminAPercentage(servings * (this.getVitaminAPercentage() + ni.getNfVitaminADv()));\r\n this.setVitaminCPercentage(servings * (this.getVitaminCPercentage() + ni.getNfVitaminCDv()));\r\n }\r\n }\r\n\r\n } catch (MalformedURLException ex) {\r\n Logger.getLogger(ViewRecipeBean.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (IOException ex) {\r\n Logger.getLogger(ViewRecipeBean.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (JSONException ex) {\r\n Logger.getLogger(ViewRecipeBean.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "private void getTiles() {\n for (int i=0; i<rows.size(); i++) {\n LinearLayout row = rows.get(i);\n int count = row.getChildCount();\n for (int j=0; j<count; j++) {\n LinearLayout tile = (LinearLayout) row.getChildAt(j);\n TextView textView = (TextView) tile.getChildAt(1);\n String text = (String) textView.getText();\n String id = \"tile\" + text.replaceAll(\"\\\\s+\",\"\");\n tiles.put(id, tile);\n }\n }\n }", "private List<Ingredient> fillFirstMeal(List<Ingredient> ingredients) throws Exception {\n List<Ingredient> availableIngredients = new ArrayList<Ingredient>(ingredients);\n mMeals.get(0).fillCarbs(ingredients);\n mMeals.get(0).fillSauce(ingredients);\n availableIngredients.removeAll(mMeals.get(0).getIngredients());\n return availableIngredients;\n }", "public void addShapelessRecipe(ItemStack stack, Object... recipeComponents) {\n List<ItemStack> list = Lists.newArrayList();\n\n for (Object object : recipeComponents) {\n if (object instanceof ItemStack) {\n list.add(((ItemStack) object).copy());\n } else if (object instanceof Item) {\n list.add(new ItemStack((Item) object));\n } else {\n assert object instanceof Block : \"Invalid shapeless recipe: unknown type \" + object.getClass().getName() + \"!\";\n\n list.add(new ItemStack((Block) object));\n }\n }\n\n this.recipes.add(new ShapelessRecipe(stack, list));\n }", "public ItemStack getResultOf(ItemStack[] contents) {\n for(int i=0;i<9;i++){ \r\n if(this.isBlankRareEssence(contents[i])){\r\n int hashCode = this.getRecipeHashCode(contents);\r\n \r\n RareItemProperty rip = this.essenceRecipes.get(hashCode);\r\n \r\n if(rip != null){\r\n return this.generateRareEssence(rip);\r\n }\r\n \r\n return null;\r\n }\r\n }\r\n \r\n ItemStack isAddPropertiesTo = null;\r\n Map<RareItemProperty,Integer> propertyLevels = new HashMap<>();\r\n \r\n // allow one itemstack to add properties to\r\n // and rare essences of a specific type\r\n // otherwise it's an invalid recipe\r\n for(ItemStack is : contents) {\r\n if(is != null && !is.getType().equals(Material.AIR)){\r\n if(is.getType().equals(Material.MAGMA_CREAM)){\r\n RareItemProperty rip = this.getPropertyFromRareEssence(is);\r\n \r\n if(rip != null){\r\n Integer currentLevel = propertyLevels.get(rip);\r\n \r\n if(currentLevel == null){\r\n propertyLevels.put(rip,1);\r\n }\r\n else if(currentLevel < rip.getMaxLevel() && propertyLevels.size() < this.MAX_PROPERTIES_PER_ITEM){\r\n propertyLevels.put(rip,currentLevel+1);\r\n }\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n else if(isAddPropertiesTo == null){\r\n isAddPropertiesTo = is.clone();\r\n \r\n isAddPropertiesTo.setAmount(1);\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n }\r\n \r\n if(isAddPropertiesTo != null && !propertyLevels.isEmpty()){\r\n // strip existing properties from the item and add them to the properties to add\r\n ItemMeta meta = isAddPropertiesTo.getItemMeta();\r\n List<String> lore;\r\n List<String> newLore = new ArrayList<>();\r\n \r\n if(meta.hasLore()){\r\n lore = meta.getLore();\r\n\r\n for(String sLore : lore){\r\n if(sLore.startsWith(PROPERTY_LINE_PREFIX)){\r\n String sPID = sLore.substring(sLore.lastIndexOf(ChatColor.COLOR_CHAR)+2);\r\n int itemPropertyLevel = 1;\r\n \r\n try{\r\n itemPropertyLevel = RomanNumeral.valueOf(sLore.substring(\r\n sLore.lastIndexOf(ChatColor.GREEN.toString())+2,\r\n sLore.lastIndexOf(ChatColor.COLOR_CHAR)-1\r\n ));\r\n }\r\n catch(IllegalArgumentException ex){\r\n continue;\r\n }\r\n \r\n int pid;\r\n \r\n try{\r\n pid = Integer.parseInt(sPID);\r\n }\r\n catch(NumberFormatException ex){\r\n continue;\r\n }\r\n \r\n RareItemProperty rip = this.plugin.getPropertymanager().getProperty(pid);\r\n \r\n if(rip != null){\r\n Integer currentLevel = propertyLevels.get(rip);\r\n \r\n if(currentLevel == null){\r\n currentLevel = 0;\r\n }\r\n \r\n int newLevel = currentLevel + itemPropertyLevel;\r\n\r\n if(currentLevel < rip.getMaxLevel() && propertyLevels.size() < this.MAX_PROPERTIES_PER_ITEM){\r\n propertyLevels.put(rip,newLevel);\r\n }\r\n }\r\n }\r\n else if(!sLore.equals(PROPERTY_HEADER)){\r\n newLore.add(sLore);\r\n }\r\n }\r\n }\r\n else{\r\n lore = new ArrayList<>();\r\n }\r\n \r\n lore = newLore;\r\n \r\n lore.add(PROPERTY_HEADER);\r\n \r\n for(Entry<RareItemProperty,Integer> entry : propertyLevels.entrySet()){\r\n RareItemProperty rip = entry.getKey();\r\n int level = entry.getValue();\r\n \r\n lore.add(String.format(PROPERTY_LINE,new Object[]{\r\n rip.getName(),\r\n RomanNumeral.convertToRoman(level),\r\n rip.getID()\r\n }));\r\n }\r\n \r\n meta.setLore(lore);\r\n \r\n isAddPropertiesTo.setItemMeta(meta);\r\n \r\n return isAddPropertiesTo;\r\n }\r\n \r\n return null;\r\n }", "private Recipe grabRecipeInfo() {\n\t\t// Get the number of images the recipe has\n\t\tImageController.updateImageNumber(currentRecipe);\n\n\t\tEditText etTitle = (EditText) findViewById(R.id.etRecipeTitle);\n\t\tEditText etDescription = (EditText) findViewById(R.id.etRecipeDescription);\n\t\tEditText etDirections = (EditText) findViewById(R.id.etDirectionsList);\n\n\t\tString title = etTitle.getText().toString();\n\t\tString description = etDescription.getText().toString();\n\t\tString directions = etDirections.getText().toString();\n\t\tString email = currentRecipe.getCreatorEmail();\n\t\tRecipe newRecipe = new Recipe();\n\t\tnewRecipe.setName(title);\n\t\tnewRecipe.setDescription(description);\n\t\tnewRecipe.setDirections(directions);\n\t\tnewRecipe.setIngredients(currentRecipe.getIngredients());\n\t\tnewRecipe.setQuantities(currentRecipe.getQuantities());\n\t\tnewRecipe.setUnits(currentRecipe.getUnits());\n\t\tnewRecipe.setCreatorEmail(email);\n\t\tnewRecipe.setRecipeId(currentRecipe.getRecipeId());\n\t\treturn newRecipe;\n\n\t}", "private void UpdateRecipeList(List<Match> recipeDataList, int ingredients) {\n weightedSearchByIngredients(recipeDataList, ingredients);\n List<Match> moreMatches = recipeDataList;\n int curSize = adapter.getItemCount();\n allMatches.addAll(moreMatches);\n adapter.notifyItemRangeInserted(curSize, allMatches.size() - 1);\n// for (Match recipe : allMatches){\n// System.out.println(\"Recipe: \" + recipe.getRecipeName()\n// + \"| Weight: \" + recipe.getWeight()\n// + \"| Ingredients: \" + recipe.getIngredients().size());\n// }\n }", "private void getRecipeFields(View view) throws JSONException {\n EditText recipeTitleEditText = findViewById(R.id.recipeTitleInput);\n String recipeTitle = recipeTitleEditText.getText().toString();\n\n EditText caloriesEditText = findViewById(R.id.caloriesInput);\n String calories = caloriesEditText.getText().toString();\n\n EditText timeEditText = findViewById(R.id.timeInput);\n String time = timeEditText.getText().toString();\n\n LinearLayout ingredientsLayout = findViewById(R.id.recipeIngredientsInputLayout);\n String[] ingredientsArray = new String[ingredientsLayout.getChildCount()];\n for (int i = 0; i < ingredientsLayout.getChildCount(); ++i) {\n EditText ingredientText = (EditText) ingredientsLayout.getChildAt(i);\n ingredientsArray[i] = ingredientText.getText().toString();\n }\n\n LinearLayout instructionsLayout = findViewById(R.id.recipeInstructionsInputLayout);\n String[] instructionsArray = new String[instructionsLayout.getChildCount()];\n for (int i = 0; i < instructionsLayout.getChildCount(); ++i) {\n EditText instructionText = (EditText) instructionsLayout.getChildAt(i);\n instructionsArray[i] = instructionText.getText().toString();\n }\n\n recipeSubmit = new JSONObject();\n List ingredientsList;\n List instructionsList;\n\n ingredientsList = Arrays.asList(ingredientsArray);\n instructionsList = Arrays.asList(instructionsArray);\n\n recipeSubmitFireStore.put(\"recipeTitle\", recipeTitle);\n recipeSubmitFireStore.put(\"recipeIngredients\", ingredientsList);\n recipeSubmitFireStore.put(\"recipeInstruction\", instructionsList);\n recipeSubmitFireStore.put(\"calories\", calories);\n recipeSubmitFireStore.put(\"time\", time);\n recipeSubmitFireStore.put(\"recipePublisher\", firebaseAuth.getCurrentUser().getUid());\n\n recipeSubmit.put(\"recipeTitle\", recipeTitle);\n recipeSubmit.put(\"recipeIngredients\", ingredientsList);\n recipeSubmit.put(\"recipeInstruction\", instructionsList);\n recipeSubmit.put(\"calories\", calories);\n recipeSubmit.put(\"time\", time);\n recipeSubmit.put(\"recipePublisher\", firebaseAuth.getCurrentUser().getUid());\n }", "@Override\n\tpublic void addRecipes() {\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_BROWN), \"coralBrown\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_RED), \"coralRed\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_YELLOW), \"coralYellow\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.LIGHT_BLUE), \"coralLightBlue\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.MAGENTA), \"coralMagenta\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.ORANGE), \"coralOrange\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.PINK), \"coralPink\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.PURPLE), \"coralPurple\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.GREY), \"coralGray\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Items.dye, 1, Dye.LIGHT_GREY), \"coralLightGray\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_WHITE), \"coralWhite\", false);\n\t\tRecipeHelper.addCrushRecipe(new ItemStack(Core.materials, 1, MaterialsMeta.DYE_GREEN), \"plantKelp\", true);\n\t\t\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_BLUE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_BRAIN), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_CANDYCANE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_CUCUMBER), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_ORANGE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_PINK), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_PURPLE), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_RED), new ItemStack(coral, 1, CoralMeta.CORAL_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_GREY), new ItemStack(coral, 1, CoralMeta.CORAL_LIGHT_GREY), 5);\n\t\tRecipeHelper.addBleachRecipe(new ItemStack(coral, 1, CoralMeta.CORAL_LIGHT_GREY), new ItemStack(coral, 1, CoralMeta.CORAL_WHITE), 5);\n\t\t\n\t\t//Kelp Wrap Recipe\n\t\tRecipeHelper.add9x9Recipe(new ItemStack(Core.food, 1, FoodMeta.KELP_WRAP), \"plantKelp\");\n\t\t\n\t\taddOceanChestLoot();\n\t}", "private void populateRecipeInfo() {\n\t\tString title = currentRecipe.getTitle();\n\t\tString directions = currentRecipe.getDirections();\n\t\tString description = currentRecipe.getDescription();\n\n\t\tfillTextViews(title, description, directions);\n\t\tpopulateIngredientView();\n\t}", "@PostMapping(\"/recipes\")\n\tpublic String postRecipe(@RequestBody Recipe recipe) {\n\t\tSystem.out.println(\"hit recipes post\");\n\t\tSystem.out.println(recipe.getName());\n\t\tSystem.out.println(recipe.getSpoonacularId());\n\t\tSystem.out.println(recipe.getImage());\n\t\t\n\t\tList<Food> newFoods = recipe.getFoods();\n\t\tList<Step> newSteps = recipe.getSteps();\n\t\trecipe.setFoods(null);\n\t\trecipe.setSteps(null);\n\t\tRecipe newRecipe = rRepo.save(recipe);\n\t\t\n\t\tfor (Food food: newFoods) {\n\t\t\tFood newFood = new Food(food.getName(), food.getAmount());\n\t\t\tnewFood.setRecipe(newRecipe);\n\t\t\tfRepo.save(newFood);\n\t\t}\n\t\tfor (Step step: newSteps) {\n\t\t\tStep newStep = new Step(step.getName());\n\t\t\tnewStep.setRecipe(newRecipe);\n\t\t\tsRepo.save(newStep);\n\t\t}\n\n\t\treturn \"success\";\n\t}", "Recipe createRecipe(String title, String description, String ingredients, String instructions, byte[] photo, byte[] photoSmall);", "public List<Ingredient> toIngredient(List<String> ingredientsList) {\n\t\tList<Ingredient> ingredients = new ArrayList<Ingredient>();\n\t\tfor (int i = 0; i < ingredientsList.size(); i++) {\n\t\t\tingredients.add(new Ingredient(ingredientsList.get(i)));\n\t\t}\n\t\treturn ingredients;\n\t}", "public static ArrayList<Recipe> getAllRecipes() {\n allRecipes.add(new Recipe(\"Pizza\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients2\"));\n allRecipes.add(new Recipe(\"Pasta\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients\"));\n\n allRecipes.add(new Recipe(\"Sushi Rolls\", 2.0, \"mkp_logo\", \"Japanese\", \"5\", \"instr\", \"ingredients\"));\n\n allRecipes.add(new Recipe(\"Crepe\", 3.5, \"mt_logo\", \"French\", \"5\", \"instr\", \"ingredients\"));\n\n allRecipes.add(new Recipe(\"Baked Salmon\", 0, \"pb_logo\", \"American\", \"5\", \"1. prep ingredients\\n2.cook food\\n3.eat your food\", \"ingredients1 ingredient 2 ingredient3\"));\n\n return allRecipes;\n }", "List<RecipeObject> searchRecipes(String query, String number, String offset, String diet, String intolerances, String type, String cuisine, String ingredients) throws EntityException;", "public static FluidIngredient of(FluidIngredient... ingredients) {\n return new FluidIngredient.Compound(ingredients);\n }", "public void addIngredientRecipe(ArrayList<IngredientRecipePOJO> ingr);", "@Override\r\n\tpublic void fillByRows(List<Category> categorys,int row) {\n\t\t\tfill(categorys);\r\n\t\tfor(Category category : categorys) {\r\n\t\t\tList<Product> products = category.getProducts();\t\r\n\t\t\tint i = 0;\r\n\t\t\tList<List<Product>> list = new ArrayList<>();\r\n\t\t\tList<Product> p = new ArrayList<>();\r\n\t\t\tif(!category.getProducts().isEmpty()) {\r\n\t\t\tfor(Product product : products) {\r\n\t\t\t\tp.add(product);i++;\r\n\t\t\t\tif(i%8==0) {\r\n\t\t\t\t\tlist.add(p);\r\n\t\t\t\t\tp = new ArrayList<>();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(!p.isEmpty()) {\r\n\t\t\t\tlist.add(p);\r\n\t\t\t}\r\n\t\t\tcategory.setProductsByRows(list);\r\n\t\t}\r\n\t}\r\n\t}", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_recipe, container, false);\n\n // Get a reference to the recycler view\n mRecyclerView = rootView.findViewById(R.id.recipe_steps_recycler_view);\n mRecyclerView.setNestedScrollingEnabled(false);\n\n // Set a layoutmanager to the recycler view\n mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n\n // Instantiate StepAdapter and set it to recycler view\n mStepAdapter = new StepAdapter(new StepAdapter.StepAdapterOnClickHandler() {\n @Override\n public void onClick(Step step) {\n mCallback.onStepSelected(step);\n }\n });\n mRecyclerView.setAdapter(mStepAdapter);\n\n // Get the Recipe object\n mRecipe = getActivity().getIntent().getParcelableExtra(MainActivity.INTENT_EXTRA_RECIPE_KEY);\n\n // Extract the Ingredient object from the Recipe object\n mIngredientList = mRecipe.getIngredients();\n\n // Create Lists to hold the information for each ingredient needed for this recipe\n List<Double> quantities = new ArrayList<>();\n List<String> units = new ArrayList<>();\n List<String> ingredients = new ArrayList<>();\n\n // Loop through each ingredient object in the list and extract the relevant information\n // then add it to the proper list\n for (Ingredient ingredient : mIngredientList) {\n quantities.add(ingredient.getQuantity());\n units.add(ingredient.getMeasure());\n ingredients.add(ingredient.getIngredient());\n }\n\n // Create one String to hold all of the ingredients information in this list\n StringBuilder stringBuilder = new StringBuilder();\n for (int i = 0; i < quantities.size(); i++) {\n stringBuilder.append(quantities.get(i) + \" \" +\n units.get(i).toLowerCase() + \" \" +\n ingredients.get(i) + \"\\n\");\n }\n String ingredientsString = stringBuilder.toString();\n\n // Set the ingredients string to the appropriate textview\n TextView ingredientsTextView = rootView.findViewById(R.id.recipe_ingredients_text_view);\n ingredientsTextView.setText(ingredientsString);\n\n // Extract the list of Step objects from the Recipe object\n mStepAdapter.setStepData(mRecipe.getSteps());\n\n return rootView;\n }", "private List<Tile> makeTiles() {\n List<Tile> tiles = new ArrayList<>();\n Board board = (Board) boardManager.getBoard();\n final int numTiles = board.getNumRows() * board.getNumCols();\n for (int tileNum = 0; tileNum != numTiles; tileNum++) {\n tiles.add(new Tile(tileNum + 1, tileNum, 4));\n }\n\n return tiles;\n }", "private void makeGrid(JLabel moves, JLabel remainingBombs) {\r\n this.grid = new Tile[gridSize][gridSize]; \r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (solution[r][c] == 1) {\r\n grid[r][c] = new Tile(r, c, true);\r\n } else {\r\n grid[r][c] = new Tile(r, c, false);\r\n }\r\n final Tile t = grid[r][c];\r\n t.repaint();\r\n handleClicksAndMoves(t, moves, remainingBombs); \r\n }\r\n }\r\n }", "private ICalculator[][] createMultipleRows(int rowCount, ICalculator[] calcPrototypes ){\n ICalculator[][] result = new ICalculator[rowCount][calcPrototypes.length];\n \tfor(int i=0; i< rowCount; i++){\n \t\tresult[i] = new ICalculator[calcPrototypes.length];\n \t\tfor (int j = 0; j < calcPrototypes.length; j++) {\n \t\t\tresult[i][j] = (ICalculator)calcPrototypes[j].clone();\n \t\t}\n \t}\n return result;\n }", "public Ingredient(String name, BigDecimal amount, String unitmeasure, List<Recipe> recipes) {\n this.name = name;\n this.amount = amount;\n this.unitMeasure = unitmeasure;\n this.recipes = recipes;\n }", "private static ArrayList<String> expandColumns(int size,String[] template){\n\n\t\tArrayList<String> ret= transmit(template);\n\n\t\tint i = template.length-1;\n\t\twhile ( i > 0 ) {\n\t\t\tif(template[i].equals(HOR)||template[i].equals(NOT)){\n\t\t\t\tfor (int j = 0; j < size-1; j++) {\n\t\t\t\t\tret.add(i, template[i]);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ti=i-3;\n\t\t\t}else{\n\t\t\t\ti--;\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t}\n\t\treturn ret;\n\t}", "private ImageView[] createTiledWord(String tilesToCreate) {\n int count;\n int length = tilesToCreate.length();\n ImageView[] imagesViewList = new ImageView[length];\n for (count = 0; count < length; count++) {\n ImageView iv = new ImageView(this);\n iv.setImageResource(tileMap.getTile(tilesToCreate.charAt(count)));\n iv.setContentDescription(String.valueOf(tilesToCreate.charAt(count)));\n iv.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View sender) {\n ImageView tile = (ImageView) sender;\n if (tile.getParent() == MainActivity.this.imageLayout) {\n MainActivity.this.imageLayout.removeView(tile);\n MainActivity.this.answerLayout.addView(tile);\n MainActivity.this.checkAnswer();\n\n } else {\n MainActivity.this.answerLayout.removeView(tile);\n MainActivity.this.imageLayout.addView(tile);\n MainActivity.this.convertAnswerString();\n }\n }\n });\n imagesViewList[count] = iv;\n }\n return imagesViewList;\n }", "private void buildRow(int x, int y, int rowBricks) {\r\n\t\tfor (int i = 0; i < rowBricks; i++) {\r\n\t\t\tadd(makeBrick(x, y));\r\n\t\t\tx += BRICK_WIDTH;\r\n\t\t}\r\n\t}", "private void rearrangeSolution() {\r\n List<Integer> trinity = new ArrayList<Integer>();\r\n trinity.add(0); trinity.add(1); trinity.add(2);\r\n permutateDigits();\r\n for (int i = 0; i<9; i+=3) {\r\n Collections.shuffle(trinity);\r\n swapRow(trinity.get(0)+i, trinity.get(1)+i);\r\n }\r\n for (int i = 0; i<9; i+=3) {\r\n Collections.shuffle(trinity);\r\n swapCol(trinity.get(0)+i, trinity.get(1)+i);\r\n }\r\n }", "private Board create3by3Board() {\n Tile[][] tiles;\n Tile t1 = new Tile(0, 3);\n Tile t2 = new Tile(1, 3);\n Tile t3 = new Tile(2, 3);\n Tile t4 = new Tile(3, 3);\n Tile t5 = new Tile(4, 3);\n Tile t6 = new Tile(5, 3);\n Tile t7 = new Tile(6, 3);\n Tile t8 = new Tile(7, 3);\n Tile t9 = new Tile(8, 3);\n tiles = new Tile[3][3];\n tiles[0][0] = t7;\n tiles[0][1] = t6;\n tiles[0][2] = t2;\n tiles[1][0] = t5;\n tiles[1][1] = t9;\n tiles[1][2] = t3;\n tiles[2][0] = t1;\n tiles[2][1] = t8;\n tiles[2][2] = t4;\n return new Board(tiles);\n }", "public static void doRecycleRecipes()\n {\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore, 2, 0), 30.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore, 2, 0), 30.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.golden_horse_armor, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.gold_ore, 2, 0), 30.0F);\n // extra Gold recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.clock), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, 1), new ItemStack(Blocks.gold_ore), 15.0F);\n //\n // recycle your Leather\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.leather_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.leather_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.leather_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.leather_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n //\n // recycle your Wood\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.wooden_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.wooden_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.wooden_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.wooden_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.wooden_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.bow, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n // extra Wood recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.boat), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.bed), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.wooden_door), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.fishing_rod, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 3.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.bookshelf), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.chest), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.trapped_chest), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.hay_block), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.crafting_table), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), 3.0F);\n //\n // recycle your Stone\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.stone_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.stone), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.stone_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.stone), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.stone_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.stone), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.stone_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.stone), 5.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.stone_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.stone), 5.0F);\n // extra Stone recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.furnace), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.stone, 2, 0), 10.0F);\n //\n // recycle your Iron\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_horse_armor, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n // extra Iron recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.chainmail_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.chainmail_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.chainmail_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.chainmail_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.bucket), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.cauldron), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.compass), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.iron_door), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.flint_and_steel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.minecart), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.hopper_minecart), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.shears, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.anvil, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 4, 0), new ItemStack(Items.coal, 4, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore, 4, 0), 40.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Blocks.hopper), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(Blocks.iron_ore), 10.0F);\n //\n // recycle your Diamond\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore, 2, 0), 40.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore, 2, 0), 40.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(Items.diamond_horse_armor, 1, WILDCARD_VALUE), new ItemStack(Blocks.coal_ore, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(Blocks.diamond_ore, 2, 0), 20.0F);\n //\n\t\tif(Loader.isModLoaded(\"simpleores\") && Settings.enableSimpleOres){\n // recycle your Copper\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.copper_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.copper_ore, 2, 0), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n // extra Copper recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_bucket), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n// FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.copper_door_block), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.copper_ore), 10.0F);\n //\n // recycle your Tin\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.tin_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.tin_ore, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n // extra Tin recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.tin_shears, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.tin_ore), 10.0F);\n //\n // recycle your Mythril\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore, 2, 0), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore, 2, 0), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_bow, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n // extra Mythril recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_rod), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore), 15.0F);\n// FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.mythril_furnace), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.mythril_ore, 2, 0), 15.0F);\n //\n // recycle your Adamantium\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore, 2, 0), 30.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore, 2, 0), 30.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n // extra Adamantium recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.adamantium_shears, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soBase.adamantium_ore), 15.0F);\n //\n // recycle your Onyx\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore, 2, 0), 40.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore, 2, 0), 40.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_bow, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n // extra Onyx recycling\n// FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_door_block), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_rod), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_shears, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore), 20.0F);\n// FusionFurnaceRecipes.addSmelting(new ItemStack(soBase.onyx_furnace), new ItemStack(Blocks.netherrack, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soBase.onyx_ore, 2, 0), 40.0F);\n //\n // recycle your Bronze\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.coal, 2, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.bronze_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.coal, 1, WILDCARD_VALUE), new ItemStack(soAlloy.large_bronze_chunk), 10.0F);\n //\n // recycle your Thyrium\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk, 2, 0), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk, 2, 0), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_bow, 1, WILDCARD_VALUE), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n // extra Thyrium recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.thyrium_rod), new ItemStack(Blocks.gravel), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_thyrium_chunk), 15.0F);\n //\n // recycle your Sinisite\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_helmet, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_chestplate, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_leggings, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack, 2, 0), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk, 2, 0), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_boots, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_sword, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_shovel, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_pickaxe, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_axe, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_hoe, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_bow, 1, WILDCARD_VALUE), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n // extra Sinisite recycling\n FusionFurnaceRecipes.addSmelting(new ItemStack(soAlloy.sinisite_rod), new ItemStack(Blocks.netherrack), new ItemStack(Items.lava_bucket), new ItemStack(soAlloy.large_sinisite_chunk), 20.0F);\n }}", "public abstract ArrayList<Inhabitant> reproduce(ArrayList<Cell> toBeBorn);", "public JsonObject getRecipesByIngredients(String ingredients) throws Exception\n {\n URL url = new URL(baseUrl+\"i=\"+ingredients);\n/* TODO \nYou have to use the url to retrieve the contents of the website. \nThis will be a String, but in JSON format. */\n String contents = \"\";\n Scanner urlScanner = new Scanner(url.openStream());\n while (urlScanner.hasNextLine()){\n contents += urlScanner.nextLine();\n }\n urlScanner.close();\n JsonObject recipes = (JsonObject)Jsoner.deserialize(contents,new JsonObject());\n\n return recipes;\n }", "private static int[][] mixColumns(int[][] state, int round)\n\t{\n\t\tint[][] result = new int[state.length][state[0].length];\n\t\t\n\t\tfor(int row=0; row<state.length; row++)\n\t\t\tresult[row] = multRow(state[row]);\n\t\t\n\t\tSystem.out.println(\"After mixColumns(\"+round+\"):\");\n\t\tprintTranspose(result, false, false);\t\t\n\t\treturn result;\n\t}", "public static FluidIngredient read(FriendlyByteBuf buffer) {\n int count = buffer.readInt();\n FluidIngredient[] ingredients = new FluidIngredient[count];\n for (int i = 0; i < count; i++) {\n Fluid fluid = ForgeRegistries.FLUIDS.getValue(new ResourceLocation(buffer.readUtf(32767)));\n if (fluid == null) {\n fluid = Fluids.EMPTY;\n }\n int amount = buffer.readInt();\n ingredients[i] = of(fluid, amount);\n }\n // if a single ingredient, do not wrap in compound\n if (count == 1) {\n return ingredients[0];\n }\n // compound for anything else\n return of(ingredients);\n }", "private void addItems() {\n int random3 = 0;\n for (int i = 0; i < MAP_LENGTH; i++) {\n for (int j = 0; j < MAP_LENGTH; j++) {\n random3 = (int)(Math.round(Math.random()*9));\n if (tileMap[i][j].getTerrain() instanceof Grass) {\n if (adjacentCity(i, j) && tileMap[i][j].getCity() == null) { //Only have an item if possibly within city borders\n if (random3 == 0) {\n tileMap[i][j].setResource(new Fruit(i,j)); //Rep Fruit\n } else if (random3 == 1) {\n tileMap[i][j].setResource(new Animal(i,j)); //Rep Animal\n } else if (random3 == 2) {\n tileMap[i][j].setResource(new Forest(i,j)); //Rep Trees (forest)\n } else if (random3 == 3) {\n tileMap[i][j].setResource(new Crop(i,j)); //Rep Crop\n }\n }\n } else {\n if (adjacentCity(i, j)) {\n if (random3 < 2) {\n tileMap[i][j].setResource(new Fish(i, j)); //Rep fish\n } else if (random3 == 4) {\n if (Math.random() < 0.5) {\n tileMap[i][j].setResource(new Whale(i, j)); //Rep whale\n }\n }\n }\n }\n }\n }\n }", "private void createTileViews() {\n\t\tfor (short row = 0; row < gridSize; row++) {\n\t\t\tfor (short column = 0; column < gridSize; column++) {\n\t\t\t\tTileView tv = new TileView(context, row, column);\n\t\t\t\ttileViews.add(tv);\n\t\t\t\ttableRow.get(row).addView(tv);\n\t\t\t} // end column\n\t\t\tparentLayout.addView(tableRow.get(row));\n\t\t} // end row\n\n\t}", "private static int[][] invMixColumns(int[][] state, int round)\n\t{\n\t\tint[][] result = new int[state.length][state[0].length];\n\t\t\n\t\tfor(int row=0; row<state.length; row++)\n\t\t\tresult[row] = invMultRow(state[row]);\n\t\t\n\t\tSystem.out.println(\"After invMixColumns(\"+round+\"):\");\n\t\tprintTranspose(result, false, false);\t\t\n\t\treturn result;\n\t}", "@Test\n\tpublic void testAddRecipe(){\n\t\t\n\t\ttestingredient1.setName(\"Peanut Butter\");\n\t\ttestingredient2.setName(\"Jelly\");\n\t\ttestingredient3.setName(\"Bread\");\n\t\t\n\t\t\n\t\tingredients.add(testingredient1);\n\t\tingredients.add(testingredient2);\n\t\tingredients.add(testingredient3);\n\t\t\n\t\ttestRecipe.setName(\"PB and J\");\n\t\ttestRecipe.setDescription(\"A nice, tasty sandwich\");\n\t\ttestRecipe.setIngredients(ingredients);\n\t\t\n\t\ttest2.saveRecipe(testRecipe);\n\t\t//test2.deleteRecipe(testRecipe);\n\t}", "public ArrayList<Integer> getIdRecipeCraftable() {\n ArrayList<Integer> idRecipes = new ArrayList<>();\n\n int lineRecipe = 0;\n for (int recipe = 0; recipe < MathDataBuilder.countLinesInFiles(RECIPES); recipe++) {\n\n lineRecipe = getRecipeLine(lineRecipe);\n\n String idItemCraft = \"\";\n boolean isFinished = false;\n for (int c = 0; c < line.length() && !isFinished; c++) {\n idItemCraft = idItemCraft + line.charAt(c);\n if (line.charAt(c + 1) == ';') {\n isFinished = true;\n }\n }\n idRecipes.add(Integer.parseInt(idItemCraft));\n }\n\n return idRecipes;\n }", "static ArrayList<RecipeList> GetRegionalRecipes() {\n\t\tArrayList<RecipeList> RegionalRecipes = new ArrayList<RecipeList>();\n\n\t\tfor (Recipe rec : Recipes) {\n\t\t\tboolean added = false;\n\t\t\tfor (RecipeList recList : RegionalRecipes) {\n\t\t\t\tif (rec.Region.equalsIgnoreCase(recList.Region)) {\n\t\t\t\t\tfor (String ing : rec.Ingredients) {\n\t\t\t\t\t\trecList.addIngredient(ing);\n\t\t\t\t\t\tadded = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (added == false) {\n\t\t\t\tRecipeList newList = new RecipeList(rec.Region);\n\t\t\t\tfor (String ing : rec.Ingredients) {\n\t\t\t\t\tnewList.addIngredient(ing);\n\t\t\t\t}\n\t\t\t\tRegionalRecipes.add(newList);\n\t\t\t\tadded = true;\n\t\t\t\tSystem.out.println(\"add\");\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t * for(RecipeList a:RegionalRecipes){ System.out.println(a.get(2)); }\n\t\t */\n\t\treturn RegionalRecipes;\n\t}", "private void generateBoardLayout() {\n Collections.shuffle(availableDice);\n List<GameCube> row1 = Arrays.asList(availableDice.get(0), availableDice.get(1), availableDice.get(2), availableDice.get(3));\n List<GameCube> row2 = Arrays.asList(availableDice.get(4), availableDice.get(5), availableDice.get(6), availableDice.get(7));\n List<GameCube> row3 = Arrays.asList(availableDice.get(8), availableDice.get(9), availableDice.get(10), availableDice.get(11));\n List<GameCube> row4 = Arrays.asList(availableDice.get(12), availableDice.get(13), availableDice.get(14), availableDice.get(15));\n board = new ArrayList<>();\n board.add(0, row1);\n board.add(1, row2);\n board.add(2, row3);\n board.add(3, row4);\n }", "public static List<Cell> parsePizza(String file) throws IOException {\n try (FileReader fileReader = new FileReader(file)) {\n BufferedReader br = new BufferedReader(fileReader);\n //skip a line with slice instructions\n br.readLine();\n //declare a pizza cells array\n List<Cell> cells = new ArrayList<>();\n int row = 0;\n String fileLine;\n while ((fileLine = br.readLine()) != null) {\n for (int column = 0; column < fileLine.length(); column++) {\n Character literal = fileLine.charAt(column);\n if (literal.toString().equals(Ingredient.TOMATO.toString())) {\n cells.add(new Cell(row, column, Ingredient.TOMATO));\n } else if (literal.toString().equals(Ingredient.MUSHROOM.toString())) {\n cells.add(new Cell(row, column, Ingredient.MUSHROOM));\n }\n }\n row++;\n }\n return cells;\n }\n }", "private static ArrayList<String> ingredientParse (JSONArray array) {\n\n ArrayList<String> list = new ArrayList<>();\n\n for (int index = 0; index < array.length(); index++) {\n try {\n JSONObject ingredientObject = array.getJSONObject(index);\n double quantity = ingredientObject.optDouble(JSON_QUANTITY);\n String measure = ingredientObject.optString(JSON_MEASURE);\n String ingredient = ingredientObject.optString(JSON_INGREDIENT);\n list.add(quantity + \" \" + measure + \" \" + ingredient + \"\\n\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n return list;\n }", "public ArrayList<IngredientRecipePOJO> getAllIngredientRecipeByIdRecipe(String idRecipe);", "public IntermediateIngredient(){\n ingredients=new ArrayList<>();\n intermediateIngredients=new ArrayList<>();\n }", "@Override\n protected void populate()\n {\n for (int i = 0; i < getHeight(); i++)\n {\n add(new Tile(), 1, i);\n add(new Block(), 2, i);\n add(new Tile(), 3, i);\n }\n for (int i = 2; i < 5; i++)\n {\n add(new LightableTile(), 4, i);\n }\n }", "public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}", "@Override\n public IRecipe addRecipe() {\n return RecipeRegistry.addShapedRecipe(new ItemStack(this),\n \"igi\",\n \"gog\",\n \"igi\",\n 'o', \"obsidian\", 'i', \"ingotIron\", 'g', \"blockGlass\");\n }", "private void loadRecipes() {\n\t\tGameRegistry.addRecipe(new ItemStack(RamsesMod.ramsesHelmet),\n\t\t\t\t\"XXX\",\n\t\t\t\t\"X X\",\n\t\t\t\t\" \", 'X', Blocks.lapis_ore);\n\n\t\tGameRegistry.addRecipe(new ItemStack(RamsesMod.ramsesChestplate),\n\t\t\t\t\"X X\",\n\t\t\t\t\"XXX\",\n\t\t\t\t\"XXX\", 'X', Blocks.lapis_ore);\n\n\t\tGameRegistry.addRecipe(new ItemStack(RamsesMod.ramsesLeggings),\n\t\t\t\t\"XXX\",\n\t\t\t\t\"X X\",\n\t\t\t\t\"X X\", 'X', Blocks.lapis_ore);\n\n\t\tGameRegistry.addRecipe(new ItemStack(RamsesMod.ramsesBoots),\n\t\t\t\t\" \",\n\t\t\t\t\"X X\",\n\t\t\t\t\"X X\", 'X', Blocks.lapis_ore);\n\t}", "private TilePane createGrid() {\n\t\tTilePane board = new TilePane();\n\t\tboard.setPrefRows(9);\n\t\tboard.setPrefColumns(9);\n\t\tboard.setPadding(new Insets(3,3,3,3));\n\t\tboard.setHgap(3); //Horisontal gap between tiles\n\t\tboard.setVgap(3); //Vertical gap between tiles\n\t\t\n\t\t//Creates and colors tiles\n\t\tfor(int i = 0; i < 9; i++){\n\t\t\tfor(int k = 0; k < 9; k++){\n\t\t\t\tLetterTextField text = new LetterTextField();\n\t\t\t\ttext.setPrefColumnCount(1);\n\t\t\t\t\n\t\t\t\tif(!(i/3 == 1 || k/3 == 1) || (i/3 == 1 && k/3 == 1)){\n\t\t\t\t\ttext.setStyle(\"-fx-background-color: #daa520;\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfield[i][k] = text;\n\t\t\t\tboard.getChildren().add(text);\n\t\t\t}\n\t\t}\t\t\n\t\treturn board;\n\t}", "@Override\n\tpublic String ingredients() {\n\t\treturn \"Chicken, Bread, seasoning , cheese\";\n\t}", "private Float[][] expandEntries(ArrayList<Float[][]> emb)\n {\n int rows = 0;\n for (int i = 0; i < emb.size(); i++)\n {\n rows += emb.get(i).length;\n }\n\n // Define the new array and assign the values\n int previous_size = 0;\n Float[][] all_emb = new Float[rows][512];\n for (Float[][] mat: emb)\n {\n for (int i = 0; i < mat.length; i++)\n {\n for (int j = 0; j < mat[i].length; j++)\n {\n all_emb[i + previous_size][j] = mat[i][j];\n }\n }\n previous_size += mat.length;\n }\n\n return all_emb;\n }", "private HashMap<String, JTextArea> CreateRecipeViewer()\n\t{\n\t\tBufferedReader br; //the reader for all recipe files\n\t\t//will store the recipe text\n\t\tHashMap<String, JTextArea> map = new HashMap<String, JTextArea>();\n\n\t\tfor (food thisFood: items) //for all food items\n\t\t{\n\t\t\t//will hold the text to display\n\t\t\tJTextArea textBox = new JTextArea();\n\t\t\tFile recipePath;\n\t\t\t//if the food has a file object instead of a file path\n\t\t\tif(thisFood.getTxtFile() != null)\n\t\t\t\trecipePath = thisFood.getTxtFile();\n\t\t\telse //if this food has a file path instead of a file object\n\t\t\t\trecipePath = new File(thisFood.getFile());\n\t\t\ttry{\n\t\t\t\t//make a reader for that file\n\t\t\t\tbr = new BufferedReader(new FileReader(recipePath));\n\t\t\t\tString line = br.readLine(); //read 1st line of the file\n\t\t\t\twhile(line != null) //while there is another line\n\t\t\t\t{\n \t\t\t\t\ttextBox.append(line + \"\\n\"); //add line to the JTextArea\n \t\t\t\t\tline = br.readLine(); //read the next line\n\t\t\t\t}//the text file should now be loaded into textBox\n\t\t\t\t//loads the textField into a map accessed by the recipes name\n\t\t\t\tmap.put(thisFood.getName(), textBox);\n\t\t\t} catch(IOException e){\n\t\t\t\t//create an error message if IO problems encountered\n\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\"ERROR: Recipe Viewer encountered an IOException\");\n\t\t\t\treturn map;}\n\t\t}\n\t\treturn map;\n\t}", "private static void createRecipe(int code, String name, int quantity ) {\n\t\tString sqlTotalkcal=\"select sum(kcal) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqlTotalcarb=\"select sum(carbohidrates) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqlTotalProt=\"select sum(Proteines) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqlTotalFat=\"select sum(Fat) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqlTotalSalt=\"select sum(Salt) from ingredient where code in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\tString sqltotalAllergen=\"select codeAllergen from allergenxingredients where codeIngredient in (select code_ingredient from ingredientxrecipe where code_recipe=\"+code+\")\";\r\n\t\t\r\n\t\t//recuperar datos\r\n\t\t\r\n\t\ttry {\r\n\t\t\tdouble kcal = dataRecovery(sqlTotalkcal);\r\n\t\t\tdouble carb = dataRecovery(sqlTotalcarb);\r\n\t\t\tdouble prot = dataRecovery(sqlTotalProt);\r\n\t\t\tdouble fat = dataRecovery(sqlTotalFat);\r\n\t\t\tdouble salt = dataRecovery(sqlTotalSalt);\r\n\t\t\tString aler = dataRecoveryAllergenList(sqltotalAllergen);\r\n\t\t\tcreateRecipeData(code, name, quantity, kcal, carb, prot, fat, salt, aler);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Hubo un error al crear la receta\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static List<Recipe> parseJson(String recipeJson) {\n //Verify Json is valid\n if (TextUtils.isEmpty(recipeJson)) {\n return null;\n }\n\n try {\n //Instantiate a JsonArray containing the response from the network request\n JSONArray baseJsonArray = new JSONArray(recipeJson);\n\n //Iterate through the list of objects inside the first array\n for (int i = 0; i < baseJsonArray.length(); i++) {\n\n //Get the first object in the list of objects from the baseJson\n JSONObject jsonObject = baseJsonArray.getJSONObject(i);\n\n //Get the name of the recipe\n String recipeName = jsonObject.optString(JSON_RECIPE_NAME);\n\n //Get the array listing the various ingredients\n JSONArray ingredients = jsonObject.optJSONArray(JSON_RECIPE_INGREDIENTS);\n\n //Generate a list of the amount, measure, and names of the ingredients\n ArrayList<String> ingredientList = ingredientParse(ingredients);\n\n //Get the array listing the recipe steps, and videos\n JSONArray steps = jsonObject.optJSONArray(JSON_RECIPE_STEPS);\n\n //Generate a list of short recipe steps\n ArrayList<String> briefList = briefDescriptionParse(steps);\n\n //Generate a list of detailed recipe steps\n ArrayList<String> detailedList = detailedDescriptionParse(steps);\n\n //Generate a list of video URLs\n ArrayList<String> videoUrlList = videoUrlParse(steps);\n\n //Generate a list of thumbnail URLs\n ArrayList<String> thumbnailUrlList = thumbnailParse(steps);\n\n recipes.add(new Recipe(\n recipeName,\n ingredientList,\n briefList,\n detailedList,\n videoUrlList,\n thumbnailUrlList));\n }\n } catch (JSONException e) {\n Log.e(LOG_TAG, \"JSON Error\", e);\n }\n\n return recipes;\n }", "public void addRecipes(CraftingManager par1CraftingManager) {\r\n\t\tpar1CraftingManager.addRecipe(new ItemStack(Block.chest), new Object[] {\r\n\t\t\t\t\"###\", \"# #\", \"###\", '#', Block.planks });\r\n\t\tpar1CraftingManager.addRecipe(new ItemStack(Block.stoneOvenIdle),\r\n\t\t\t\tnew Object[] { \"###\", \"# #\", \"###\", '#', Block.cobblestone });\r\n\t\tpar1CraftingManager.addRecipe(new ItemStack(Block.workbench),\r\n\t\t\t\tnew Object[] { \"##\", \"##\", '#', Block.planks });\r\n\t\tpar1CraftingManager.addRecipe(new ItemStack(Block.sandStone),\r\n\t\t\t\tnew Object[] { \"##\", \"##\", '#', Block.sand });\r\n\t\tpar1CraftingManager.addRecipe(new ItemStack(Block.sandStone, 4, 2),\r\n\t\t\t\tnew Object[] { \"##\", \"##\", '#', Block.sandStone });\r\n\t\tpar1CraftingManager.addRecipe(new ItemStack(Block.sandStone, 1, 1),\r\n\t\t\t\tnew Object[] { \"#\", \"#\", '#',\r\n\t\t\t\t\t\tnew ItemStack(Block.stairSingle, 1, 1) });\r\n\t\tpar1CraftingManager.addRecipe(new ItemStack(Block.stoneBrick, 4),\r\n\t\t\t\tnew Object[] { \"##\", \"##\", '#', Block.stone });\r\n\t\tpar1CraftingManager.addRecipe(new ItemStack(Block.fenceIron, 16),\r\n\t\t\t\tnew Object[] { \"###\", \"###\", '#', Item.ingotIron });\r\n\t\tpar1CraftingManager.addRecipe(new ItemStack(Block.thinGlass, 16),\r\n\t\t\t\tnew Object[] { \"###\", \"###\", '#', Block.glass });\r\n\t\tpar1CraftingManager.addRecipe(new ItemStack(Block.redstoneLampIdle, 1),\r\n\t\t\t\tnew Object[] { \" R \", \"RGR\", \" R \", 'R', Item.redstone, 'G',\r\n\t\t\t\t\t\tBlock.glowStone });\r\n\t}", "public static void makePieces() {\n\t\tPiece[] pieces = new Piece[35];\n\t\tfor (int i = 0; i < pieces.length; i++) {\n\t\t\tTile t = new Tile(false, true, 0, 0);\n\t\t\tTile f = new Tile(false, false, 0, 0);\n\t\t\tTile[][] tiles = new Tile[6][6];\n\t\t\tswitch (i) {\n\t\t\tcase 0:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\ttiles = new Tile[][] { { f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, t, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 11:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 12:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 13:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 14:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 15:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 16:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, t, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 17:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 18:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 19:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 20:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 21:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 22:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 23:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, f, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 24:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, t, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 25:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, t, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 26:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 27:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, t, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 28:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, f, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 29:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, f, t, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 30:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, t, t, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 31:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, t, t, t, f, f }, { f, t, f, t, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, f, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 32:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, f, t, f, f }, { f, f, t, t, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 33:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, t, t, f, f, f },\n\t\t\t\t\t\t{ f, t, f, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\tcase 34:\n\t\t\t\ttiles = new Tile[][] { { f, f, f, f, f, f }, { f, f, t, t, f, f }, { f, f, t, f, f, f },\n\t\t\t\t\t\t{ f, t, t, f, f, f }, { f, t, f, f, f, f }, { f, f, f, f, f, f } };\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tpieces[i] = new Piece(tiles);\n\t\t}\n\t\ttry {\n\t\t\tFileOutputStream saveFile = new FileOutputStream(\"pieces.data\");\n\t\t\tObjectOutputStream save = new ObjectOutputStream(saveFile);\n\t\t\tsave.reset();\n\t\t\tsave.writeObject(pieces);\n\t\t\tsave.close();\n\t\t} catch (Exception exc) {\n\t\t\texc.printStackTrace(); // If there was an error, print the info.\n\t\t}\n\t}", "@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }", "private void createTile(){\n for(int i = 0; i < COPY_TILE; i++){\n for(int k = 0; k < DIFF_TILES -2; k++){\n allTiles.add(new Tile(k));\n }\n }\n }", "private void addMetalPlateSteps()\n {\n // How many plates total?\n final int COUNT_OF_METAL_PLATES = 20;\n final int PLATES_PER_GROUP = 4;\n\n // Add groups of plates\n for (int i = 0; i < COUNT_OF_METAL_PLATES / PLATES_PER_GROUP; i += 1)\n {\n // Group of four metal plates all at same y position\n int y = VISIBLE_HEIGHT - HALF_TILE_SIZE * 3 - i * TILE_SIZE;\n\n // Add the individual plates in a given group\n for (int j = 0; j < PLATES_PER_GROUP; j += 1)\n {\n int x = VISIBLE_WIDTH + TILE_SIZE * 2 + TILE_SIZE * (i + j) + TILE_SIZE * 5 * i;\n MetalPlate plate = new MetalPlate(x, y);\n addObject(plate, x, y);\n }\n }\n }", "List<Recipe> getAllRecipes();", "private void populateShelf() {\n for (int floor = 1; floor <= 3; floor++) {\n for (int aisle = 1; aisle <= 5; aisle++) {\n for (int shelf = 1; shelf <= 3; shelf++) {\n System.out\n .println(\"INSERT INTO `4400`.`Shelf` (`shelfNumber`, `aisleNumber`, `floorNumber`) VALUES ('\"\n + floor\n + aisle\n + shelf\n + \"', '\"\n + aisle\n + \"', '\" + floor + \"');\");\n }\n }\n }\n }", "public Recipe(Item[] inputs, Item output, int craftingLevel) {\n this.inputs = Arrays.asList(inputs);\n this.output = output;\n this.craftingLevel = craftingLevel;\n this.id = nextId++;\n RECIPE_INDEX.put(id, this);\n }", "@Test\n\tpublic void testAddCorrectNumberOfRecipes() throws RecipeException {\n\t\tcoffeeMaker.addRecipe(recipe1);\n\t\tcoffeeMaker.addRecipe(recipe2);\n\t\tcoffeeMaker.addRecipe(recipe3);\n\t}", "private void startGame() { \n \n int body = 0;\n int column = 0;\n int end = 0;\n int fill = 0;\n int increment = 2; \n int numPerSide = 0; \n int prefixIndex = 0;\n int row = 0; \n int start = 1; \n int userNum = 0; \n \n String lineContent = \"\";\n \n // Get user input\n System.out.println(\"FOR A PRETTY DIAMOND PATTERN,\");\n System.out.print(\"TYPE IN AN ODD NUMBER BETWEEN 5 AND 21? \");\n userNum = scan.nextInt();\n System.out.println(\"\");\n \n // Calcuate number of diamonds to be drawn on each side of screen\n numPerSide = (int) (LINE_WIDTH / userNum); \n\n end = userNum; \n \n // Begin loop through each row of diamonds\n for (row = 1; row <= numPerSide; row++) {\n \n // Begin loop through top and bottom halves of each diamond\n for (body = start; increment < 0 ? body >= end : body <= end; body += increment) {\n\n lineContent = \"\";\n \n // Add whitespace\n while (lineContent.length() < ((userNum - body) / 2)) {\n lineContent += \" \";\n }\n \n // Begin loop through each column of diamonds\n for (column = 1; column <= numPerSide; column++) {\n \n prefixIndex = 1;\n \n // Begin loop that fills each diamond with characters\n for (fill = 1; fill <= body; fill++) {\n \n // Right side of diamond\n if (prefixIndex > PREFIX.length()) {\n \n lineContent += SYMBOL; \n \n }\n // Left side of diamond\n else {\n \n lineContent += PREFIX.charAt(prefixIndex - 1);\n prefixIndex++;\n \n } \n \n } // End loop that fills each diamond with characters\n \n // Column finished\n if (column == numPerSide) {\n \n break;\n \n }\n // Column not finishd\n else {\n \n // Add whitespace\n while (lineContent.length() < (userNum * column + (userNum - body) / 2)) {\n lineContent += \" \";\n }\n \n } \n \n } // End loop through each column of diamonds\n \n System.out.println(lineContent);\n\n } // End loop through top and bottom half of each diamond\n\n if (start != 1) {\n\n start = 1;\n end = userNum;\n increment = 2; \n \n }\n else {\n \n start = userNum - 2;\n end = 1;\n increment = -2; \n row--;\n\n } \n\n } // End loop through each row of diamonds\n \n }" ]
[ "0.5852143", "0.5533523", "0.528389", "0.52492386", "0.5239874", "0.5210155", "0.52089196", "0.5163043", "0.5155086", "0.513877", "0.5079471", "0.50747323", "0.50495756", "0.5016779", "0.4976871", "0.49418467", "0.49240687", "0.4909115", "0.49053016", "0.48990035", "0.4857633", "0.4848909", "0.48265895", "0.4815738", "0.48141396", "0.48099527", "0.47560507", "0.47523385", "0.47515693", "0.47400266", "0.4727389", "0.4700123", "0.46922356", "0.4682172", "0.46718252", "0.4665201", "0.46433204", "0.4614741", "0.46136644", "0.4612926", "0.46105504", "0.46078935", "0.46076724", "0.45972192", "0.457876", "0.45776856", "0.45762414", "0.45679507", "0.45601767", "0.45601606", "0.45545512", "0.4543324", "0.45380628", "0.45336312", "0.45321655", "0.45010993", "0.45010042", "0.4485753", "0.4476079", "0.44537625", "0.4452776", "0.44459605", "0.44443476", "0.44350117", "0.44311345", "0.44193432", "0.4406595", "0.44017893", "0.44017467", "0.439932", "0.43990692", "0.43980578", "0.43950024", "0.43949002", "0.4391504", "0.4387432", "0.43813577", "0.4369571", "0.43683487", "0.43615434", "0.43586218", "0.43575016", "0.43406752", "0.43235788", "0.43211603", "0.4315519", "0.43110985", "0.43082145", "0.4306454", "0.43055895", "0.430207", "0.42989063", "0.42985177", "0.42838565", "0.42829773", "0.42774537", "0.4273013", "0.42705223", "0.4265558", "0.42428786" ]
0.5550789
1
The size of the output stack
default int amount(IRecipe recipe) { return recipe.getRecipeOutput().getCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getSize() {\r\n\t\treturn stack.size();\r\n\t}", "int size() {\n return stackSize;\n }", "public int size() {\n \treturn stack.size();\n }", "public int getSize(){\n return this.stack.size();\n }", "@Override\r\n\tpublic int size() {\r\n\t\treturn stack.length;\r\n\t}", "@Override\r\n\tpublic int size() {\r\n\t\treturn stack.size();\r\n\t}", "public final int size() {\n\t\treturn opstack.size();\n\t}", "public int getSize(){\r\n return topOfStack;\r\n }", "public int getStackSize() {\n\t\treturn stackSize;\n\t}", "public int size() \n {\n return stack1.size() + stack2.size(); \n }", "public int stackCount() {\r\n\t\t return count;\r\n\t }", "public int getSize() {\r\n\t\treturn 5; // 1 (code) + 2 (data length) + 2 (branch offset)\r\n\t}", "public void size()\r\n\t{\r\n\t\tSystem.out.println(\"size = \"+top);\r\n\t}", "int getMapEntrySize() {\n if (frameType >= Const.SAME_FRAME && frameType <= Const.SAME_FRAME_MAX) {\n return 1;\n }\n if (frameType >= Const.SAME_LOCALS_1_STACK_ITEM_FRAME && frameType <= Const.SAME_LOCALS_1_STACK_ITEM_FRAME_MAX) {\n return 1 + (typesOfStackItems[0].hasIndex() ? 3 : 1);\n }\n if (frameType == Const.SAME_LOCALS_1_STACK_ITEM_FRAME_EXTENDED) {\n return 3 + (typesOfStackItems[0].hasIndex() ? 3 : 1);\n }\n if (frameType >= Const.CHOP_FRAME && frameType <= Const.CHOP_FRAME_MAX || frameType == Const.SAME_FRAME_EXTENDED) {\n return 3;\n }\n if (frameType >= Const.APPEND_FRAME && frameType <= Const.APPEND_FRAME_MAX) {\n int len = 3;\n for (final StackMapType typesOfLocal : typesOfLocals) {\n len += typesOfLocal.hasIndex() ? 3 : 1;\n }\n return len;\n }\n if (frameType != Const.FULL_FRAME) {\n throw new IllegalStateException(\"Invalid StackMap frameType: \" + frameType);\n }\n int len = 7;\n for (final StackMapType typesOfLocal : typesOfLocals) {\n len += typesOfLocal.hasIndex() ? 3 : 1;\n }\n for (final StackMapType typesOfStackItem : typesOfStackItems) {\n len += typesOfStackItem.hasIndex() ? 3 : 1;\n }\n return len;\n }", "public abstract int getStackSizeWishInKb();", "public static int size() {\n\t\treturn (anonymousSize() + registeredSize());\n\t}", "public static int size_count() {\n return (16 / 8);\n }", "public void testSize() {\n assertEquals(this.stack.size(), 10, 0.01);\n assertEquals(this.empty.size(), 0, 0.01);\n }", "public long getSizeOfStackCommit()\n throws IOException, EndOfStreamException\n {\n return (imageState_ == ImageStateType.PE64\n ? peFile_.readInt64(relpos(Offsets.SIZE_OF_STACK_COMMIT_64.position))\n : peFile_.readInt32(relpos(Offsets.SIZE_OF_STACK_COMMIT_32.position)));\n }", "public int size() {\n //TODO: Fill in this method, then remove the RuntimeException\n throw new RuntimeException(\"RatPolyStack->size() unimplemented!\\n\");\n }", "int treeSize() {\r\n\t\treturn\r\n\t\t\tmemSize()\r\n\t\t\t+ (this.expression == null ? 0 : getExpression().treeSize())\r\n\t\t\t+ (this.newArguments.listSize())\r\n\t\t\t+ (this.constructorArguments.listSize())\r\n\t\t\t+ (this.baseClasses.listSize())\r\n\t\t\t+ (this.declarations.listSize())\r\n\t;\r\n\t}", "private static int calcStackSize(Code32 code) {\r\n\t\tint size = 8 + nofNonVolGPR * 4 + nofNonVolEXTRD * 8 + nofNonVolEXTRS * 4;\t// includes LR and SP for back trace\r\n\t\tsize += callParamSlotsOnStack * 4 + RegAllocator.maxLocVarStackSlots * 4 + (intfMethStorage? 12: 0);\t\r\n\t\tassert(nofNonVolEXTRD < 16);\r\n\t\tif (nofNonVolEXTRD >= 16) ErrorReporter.reporter.error(1000);\r\n\t\t// enFloatsInExc could be true, even if this is no exception method\r\n\t\t// such a case arises when this method is called from within an exception method\r\n\t\tif (enFloatsInExc) size += nonVolStartEXTR * 8 + 4;\t// save volatile FPR's and FPSCR\r\n\t\tparamOffset = 4;\r\n\t\tcode.localVarOffset = paramOffset + callParamSlotsOnStack * 4;\r\n\t\tintfMethStorageOffset = paramOffset + callParamSlotsOnStack * 4 + RegAllocator.maxLocVarStackSlots * 4;\r\n\t\treturn size;\r\n\t}", "public static int size_hop() {\n return (8 / 8);\n }", "public int getTotalSize();", "int getLocalOnHeapSize();", "public static int size_length() {\n return (8 / 8);\n }", "int getCurrentSize();", "int getTotalSize();", "public long getSizeOfStackReserve()\n throws IOException, EndOfStreamException\n {\n return (imageState_ == ImageStateType.PE64\n ? peFile_.readInt64(relpos(Offsets.SIZE_OF_STACK_RESERVE_64.position))\n : peFile_.readInt32(relpos(Offsets.SIZE_OF_STACK_RESERVE_32.position)));\n }", "public int getLocalSize();", "int treeSize() {\n return memSize() + (this.expression == null ? 0 : getExpression().treeSize()) + (this.typeArguments == null ? 0 : this.typeArguments.listSize()) + (this.methodName == null ? 0 : getName().treeSize());\n }", "final int threadLocalSize()\r\n/* 154: */ {\r\n/* 155:182 */ return ((Stack)this.threadLocal.get()).size;\r\n/* 156: */ }", "int getLocalOffHeapSize();", "public int size()\r\n/* 41: */ {\r\n/* 42:69 */ return this.pop.size();\r\n/* 43: */ }", "@Test\n public void testSize() {\n System.out.println(\"size\");\n instance = new Stack();\n int expResult = 10;\n for (int i = 0; i < 10; i++) {\n instance.push(i*3);\n }\n assertEquals(expResult, instance.size());\n }", "public int GetSize() \n\t{\n\t\treturn numEntries; //dummy return so file would compile\n\t}", "public long getSize() {\n long size = 0L;\n \n for (GTSEncoder encoder: chunks) {\n if (null != encoder) {\n size += encoder.size();\n }\n }\n \n return size;\n }", "int size() {\r\n\t\treturn top; \r\n\t}", "public int maxStack();", "public int getCurrentSize() {\n return count;\n }", "public int size () {\n\t\treturn size;\n\t}", "public int size () {\n\t\treturn size;\n\t}", "int getLocalSize();", "public int size() {\n return this.top;\n }", "public int sizeof() {\n return Type.getSourceABI().getPointerSize();\n }", "public int size()\r\n\t{\r\n\t\treturn currentSize;\r\n\t}", "int getPenultimateOutputSize() {\n\t\treturn lastStrLen[0];\n\t}", "public static int size_max() {\n return (8 / 8);\n }", "public static int size_counter() {\n return (32 / 8);\n }", "public int size() {\n return sz;\n }", "public abstract int getSmallStackSizeWishInKb();", "int memSize() {\r\n\t\treturn BASE_NODE_SIZE + 5 * 4;\r\n\t}", "int treeSize() {\n return\n memSize()\n + initializers.listSize()\n + updaters.listSize()\n + (optionalConditionExpression == null ? 0 : getExpression().treeSize())\n + (body == null ? 0 : getBody().treeSize()); }", "public int size()\r\n\t{\r\n\t\treturn heap.size();\r\n\t}", "public static int getSize() {\n\n\t\treturn strategyChain.size();\n\t}", "public int Size(){\n \treturn size;\n\t}", "public long size() {\n\t\treturn size;\n\t}", "public int size( )\r\n {\r\n int size = (int) manyNodes;// Student will replace this return statement with their own code:\r\n return size;\r\n }", "@Override\n\tpublic int size() {\n\t\treturn (top + 1);\n\t}", "public int size() {\n\t\treturn heap.size();\n\t}", "int memSize() {\n // treat Code as free\n return BASE_NODE_SIZE + 3 * 4;\n }", "public Integer getTotalStackInstancesCount() {\n return this.totalStackInstancesCount;\n }", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int size() {\n\t\treturn N;\n\t}", "public int returnSize()\r\n {\r\n \treturn length;\r\n }", "public int size() {\r\n\t\treturn size;\r\n\t}", "public int size() {\r\n\t\treturn size;\r\n\t}", "public int size() {\r\n\t\treturn size;\r\n\t}", "public int size() {\r\n\t\treturn size;\r\n\t}", "public int size() {\r\n\t\treturn size;\r\n\t}", "public int size() {\r\n\t\treturn size;\r\n\t}", "public int get_size();", "public int get_size();", "public int size() {\n // DO NOT MODIFY THIS METHOD!\n return size;\n }", "public int size() {\n \t\treturn size;\n \t}", "public int size() {\n\t\treturn size;\r\n\t}", "public int size() {\n\t\treturn size;\r\n\t}", "public int size()\n {\n return currentSize;\n }", "public int get_size()\r\n\t{\r\n\t\treturn this.size;\r\n\t}", "public int size()\r\n {\r\n return top;\r\n }", "public int size() {\n // DO NOT MODIFY!\n return size;\n }", "public int size ()\n {\n return size;\n }", "public int getStructureSize() {\n if (structureSize < 0) {\n structureSize = calcStructureSize();\n }\n return structureSize;\n }", "public int getDepth()\n {\n return traversalStack.size();\n }", "public static int size_source() {\n return (8 / 8);\n }", "public int size() {\n\t\treturn currentSize;\n\n\t}", "public int sizeInBytes() {\n\t\treturn this.actualsizeinwords * 8;\n\t}", "public int size(){\r\n return currentSize;\r\n }", "public int size() {\n // TODO: Implement this method\n return size;\n }", "long getLocalOnHeapSizeInBytes();", "public static int sizeOf()\n {\n return 4;\n }", "public int size(){\n\t\treturn currentsize;\n\n\t}", "public int size() {\n\t\treturn size;\n\t}", "public int size() {\n\t\treturn size;\n\t}", "public int size() {\n\t\treturn size;\n\t}", "public int size() {\n\t\treturn size;\n\t}", "public int size() {\n\t\treturn size;\n\t}", "public int size() {\n\t\treturn size;\n\t}" ]
[ "0.82299787", "0.8021182", "0.8014374", "0.8003259", "0.7992162", "0.78964525", "0.77313226", "0.7447218", "0.72529954", "0.72042865", "0.70660275", "0.700023", "0.69175595", "0.6758235", "0.67120034", "0.6709062", "0.6707795", "0.6704134", "0.67029935", "0.6648612", "0.6618446", "0.657034", "0.6553456", "0.6535867", "0.6513995", "0.6512593", "0.6500018", "0.643654", "0.64101154", "0.6401565", "0.6385831", "0.63822603", "0.63750005", "0.63738966", "0.63666815", "0.63657403", "0.6359026", "0.63571936", "0.6351423", "0.6347473", "0.6345587", "0.6345587", "0.63296866", "0.6321338", "0.63208604", "0.63201463", "0.6318553", "0.6313803", "0.62976456", "0.62690926", "0.62676", "0.62562615", "0.62466764", "0.6243976", "0.6239683", "0.62378067", "0.623769", "0.6236418", "0.6233659", "0.62311953", "0.62160164", "0.621101", "0.6209188", "0.6209188", "0.6209188", "0.6209188", "0.6209188", "0.6202865", "0.6198827", "0.6198827", "0.6198827", "0.6198827", "0.6198827", "0.6198827", "0.61957014", "0.61957014", "0.6189105", "0.6188441", "0.6185409", "0.6185409", "0.61846095", "0.6179724", "0.6179216", "0.61773205", "0.61744565", "0.6166943", "0.61657184", "0.6163788", "0.61627656", "0.61576366", "0.6151627", "0.6145523", "0.61452746", "0.6144855", "0.6142835", "0.6140155", "0.6140155", "0.6140155", "0.6140155", "0.6140155", "0.6140155" ]
0.0
-1
TODO Autogenerated method stub
public Supplier addSupplier(Supplier supplier) { return supplierRepository.save(supplier); }
{ "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
This method is called if TEXT_PLAIN is request
@GET @Produces(MediaType.TEXT_PLAIN) public String sayPlainTextHello() { return "Hello Jersey"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onQueryTextSubmit(String s) {\n return false;\n }", "@GET\r\n\t@Produces(MediaType.TEXT_PLAIN)\r\n\tpublic String sayPlainTextHello() {\r\n\t\treturn \"You have sent a text/plain request to the Expense Server. It needs to see JSON data.\";\r\n\t}", "private void processText(){\n if(text == null || text.length() == 0){\n // When posting a tweet, Twitter returns the \"text\" JSON field even if it's not trimmed...\n text = trimmedText;\n }else{\n // Trim the original contents received from Twitter\n text = text.substring(0, text.offsetByCodePoints(0, displayTextRange[1]));\n }\n\n // Transform HTML characters (for some reason Twitter sends those)\n text = org.apache.commons.text.StringEscapeUtils.unescapeHtml4(text);\n }", "@Override\n \t\tpublic boolean onQueryTextSubmit(String query) {\n \t\t\t\t\n \t\t\treturn false;\n \t\t}", "@Override\n\t\tpublic boolean onQueryTextSubmit(String query) {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean onQueryTextSubmit(String query) {\n\t\t\treturn true;\n\t\t}", "public String getPlainText();", "@Override\n public boolean onQueryTextSubmit(String query) {\n return true;\n }", "@Override\n public boolean onQueryTextSubmit(String query) {\n return true;\n }", "@Override\r\n\t\t\tpublic boolean onQueryTextSubmit(String query) {\n\t\t\t\tdebugMemory(\"onQueryTextSubmit\");\r\n\t\t\t\treturn false;\r\n\t\t\t}", "public void deliverRawText(String text) {\n \n }", "@Override\n\tpublic boolean onQueryTextSubmit(String query) {\n\t\tLog.v(\"query\", \"onQueryTextSubmit\");\n\t\treturn false;\n\t}", "public boolean onQueryTextSubmit (String query) {\n return true;\n }", "@Override\n\t\t\t\tpublic boolean onQueryTextChange(String arg0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}", "public final boolean isText() {\n return this.getTopLevelType().equals(\"text\");\n }", "@Test\n void parseInvalidTextInRelaxedMode() {\n HttpMediaType type = HttpMediaType.create(\"text\", ParserMode.RELAXED);\n assertThat(type.text(), is(\"text/plain\"));\n }", "@Override\n\tpublic boolean onQueryTextSubmit(String query) {\n\t\treturn false;\n\t}", "@Override\n public boolean onQueryTextSubmit(String query) {\n return false;\n }", "@Override\n public boolean onQueryTextSubmit(String query) {\n return false;\n }", "@Override\n public boolean onQueryTextSubmit(String query) {\n return false;\n }", "@Override\n public boolean onQueryTextSubmit(String query) {\n return false;\n }", "@Override\n public boolean onQueryTextSubmit(String query) {\n return false;\n }", "public boolean isContentTypeSupported(int mimeType) {\n // we only support plain text for chat rooms for now\n return (IMessage.ENCODE_PLAIN == mimeType);\n }", "@PUT\n\t@Consumes(\"text/plain\")\n\tpublic void setTextPlain(String msg) {\n\t\tthis.msg = msg;\n\t}", "public boolean onQueryTextSubmit(String query) {\n return false;\n }", "@Override\n protected void onTextData(Reader r) throws IOException {\n\n }", "@java.lang.Override\n public boolean hasText() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "@Override\n public boolean onQueryTextChange(String newText) {\n return false;\n }", "@Override\n\tpublic boolean onQueryTextSubmit(String arg0) {\n\t\treturn false;\n\t}", "@PUT\r\n @Consumes(\"text/plain\")\r\n public void putText(String content) {\r\n }", "@Override\n\t\tpublic boolean onQueryTextChange(String newText) {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean onQueryTextChange(String newText) {\n return false;\n }", "@Override\n public boolean onQueryTextChange(String newText) {\n return false;\n }", "@Override\n public boolean onQueryTextChange(String newText) {\n return false;\n }", "@Override\n public boolean onQueryTextChange(String newText) {\n return false;\n }", "@Override\n public boolean onQueryTextChange(String newText) {\n return false;\n }", "@Override\n public boolean onQueryTextChange(String newText)\n {\n return false;\n }", "public String getPlainText() {\n return plainText;\n }", "@Override\n public boolean onQueryTextChange(String newText) {\n return false;\n }", "@Override\n public String getBodyContentType() {\n return \"application/x-www-form-urlencoded; charset=UTF-8\";\n }", "public void ach_doc_type_txt_test () {\n\t\t\n\t}", "@Override\n public boolean onQueryTextChange(String arg0) {\n return false;\n }", "protected boolean isTextFile(File pathname) {\n\t\treturn false;\n\t}", "@Override\n public boolean onQueryTextChange(String newText) {\n\n return false;\n }", "public boolean hasText() {\n return ((bitField0_ & 0x00000004) != 0);\n }", "public boolean hasText() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean hasText() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasText() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "@Override\n\tpublic boolean onQueryTextChange(String newText) {\n\t\treturn false;\n\t}", "public boolean sendTextMessageToChoreo( String jsonTextMessage );", "public boolean hasText() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean onQueryTextChange (String newText) {\n return true;\n }", "@BodyParser.Of(value = BodyParser.Text.class, maxLength = 10 * 1024)\n public Result index() {\n return ok(\"Got body: \" + request().body().asText());\n }", "void sendText(String content);", "@Override\n\tpublic String type() {\n\t\treturn \"TEXT\";\n\t}", "@Override\n public boolean onQueryTextSubmit(String query) {\n Log.i(TAG, \"on query submit: \" + query);\n return true;\n }", "public boolean onQueryTextChange(String newText) {\n return true;\n }", "public boolean onQueryTextChange(String newText) {\n return true;\n }", "@AutoEscape\n\tpublic String getRespondText();", "private void processContentEn() {\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.nlp = new NLP(this.content, this.traceId, this.setting);\r\n }", "@Override\r\n\t\t\tpublic boolean onQueryTextChange(String newText) {\n\t\t\t\tdebugMemory(\"onQueryTextChange\");\r\n\t\t\t\treturn false;\r\n\t\t\t}", "@Override\n public void handleString(String s) {\n\n }", "public boolean hasRqText() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean isTextValue()\n {\n return getFieldType().equalsIgnoreCase(TYPE_TEXT);\n }", "public static String checkTextPlainEntity(HttpResponse response, int... expectedCodes) throws IOException {\n\t\tHttpUtils.checkStatusCodes(response, expectedCodes);\n\t\tHttpEntity entity = HttpUtils.checkIsEntity(response, ContentType.TEXT_PLAIN);\n\t\tHeader header = entity.getContentEncoding();\n\t\tString encoding = header == null ? null : header.getValue();\n\t\tif (encoding == null)\n\t\t\treturn IOUtils.toString(entity.getContent());\n\t\telse\n\t\t\treturn IOUtils.toString(entity.getContent(), encoding);\n\t}", "private boolean parseBody() {\n return true;\n }", "public void setRespondText(String respondText);", "public boolean isUseActualText() {\r\n\t\treturn useActualText;\r\n\t}", "public boolean hasRqText() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "boolean hasRqText();", "public boolean isStringBody() throws IOException {\n\t\treturn !this.wrappedOut.hasData() || ServletUtil.isStringBody(getContentType());\n\t}", "private boolean writeToServer(@NotNull String text) {\n try {\n outToServer.writeUTF(text);\n return true;\n\n } catch (IOException e) {\n System.out.println(\"IOExeption \" + e);\n }\n return false;\n }", "@Override\n public String getRequestString() {\n return null;\n }", "protected void TextHttp() {\n\t\tLoginBean loginb = new LoginBean();\n\t\tloginb.setPhone(\"15236290644\");\n\t\tActivityDataRequest.getLoginCheck(TagConfig.TAG_MSG,this, loginb);\n\t\t\n\t\tLoginBean loginb2 = new LoginBean();\n\t\tloginb2.setPhone(\"15631001601\");\n\t\tActivityDataRequest.getLoginCheck(2,this, loginb2);\n\t\t\n\t}", "@GET\r\n @Produces(MediaType.TEXT_PLAIN)\r\n public String sayPlainTextHello() {\r\n return \"Hello Jersey Plain\";\r\n }", "public final boolean hasTextForm ()\r\n {\r\n return isSpecialForm() && !specialForm().isValue();\r\n }", "private void servicePlain(Connection conn) \n throws IOException {\n conn.getResponse().setContentType(getContnentType().getMimeType());\n conn.getWriter().print(content);\n }", "public boolean setRawText(String text) {\n\t\ttry {\n\t\t\ttext = text.replace(\" \", \"\");\n\t\t\tString[] line = text.split(\"\\n\");\n\n\t\t\tif (line.length != 2) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tline[0] = replaceWithChars(line[0]);\n\t\t\tline[0] = line[0].substring(5);\n\n\t\t\tString[] names = line[0].split(\"<\");\n\n\t\t\tthis.nume = names[0];\n\n\t\t\tthis.prenume = \"\";\n\t\t\tfor (int i=1; i<names.length; i++) {\n\t\t\t\tif (names[i] != null && ! names[i].equals(\"\")) {\n\t\t\t\t\tthis.prenume += names[i] + \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t//\n\t\t\t// Start processing second line. \n\t\t\t//\n\t\t\tnames = line[1].split(\"<\");\n\n\t\t\tif (names.length != 2) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis.seria = \"\" + names[0].charAt(0); \n\t\t\tif (names[0].charAt(1) == '0') {\n\t\t\t\tthis.seria += \"D\";\n\t\t\t} else {\n\t\t\t\tthis.seria += names[0].charAt(1);\n\t\t\t}\n\n\t\t\tthis.numarul = replaceWithNumbers( names[0].substring(2) );\n\t\t\tthis.cetatenia = replaceWithNumbers( names[1].substring(0,4) ) ;\n\t\t\tthis.dataNasteri = replaceWithNumbers( names[1].substring(4,10) ) ;\n\t\t\tthis.sex = names[1].charAt(11);\n\t\t\tif (sex == 'H') {\n\t\t\t\tsex = 'M';\n\t\t\t}\n\t\t\t\n\t\t\tthis.valabilitate = replaceWithNumbers(names[1].substring(12,18));\n\n\t\t\tthis.CNP = sex == 'F'?\"2\" : \"1\";\n\t\t\tthis.CNP += this.dataNasteri + replaceWithNumbers( names[1].substring(20,26));\n\t\t\t\n\t\t\tthis.validate();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static boolean plainText(Comparable value) {\r\n return value != null && value.toString().matches(REGEX_PLAINTEXT);\r\n }", "public StringHttpResponseHandler() {\n\t\tsuper();\n\t}", "abstract boolean ignoreContentLength();", "@Override\n public boolean onQueryTextSubmit(String arg0) {\n fetch(arg0);\n return false;\n }", "@SuppressWarnings(\"static-access\")\n\tpublic void detection(Request text) {\n\t\t//Fichiertxt fichier;\n\t\ttry {\t\t\t\t\t\n\t\t\t//enregistrement et affichage de la langue dans une variable lang\n\t\t\ttext.setLang(identifyLanguage(text.getCorpText()));\n\t\t\t//Ajoute le fichier traité dans la Base\n\t\t\tajouterTexte(text);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"fichier texte non trouvé\");\n\t e.printStackTrace();\n\t\t}\n\t}", "@POST\n \t@Path(\"/text\")\n \t@Consumes(MediaType.TEXT_PLAIN)\n \t@Produces(MediaType.TEXT_PLAIN)\n \tpublic String textMethod(@QueryParam(\"token\") String token, String json) {\n \t\t// map json to json object \n \t\treturn token + \"::\" + json + \"\\n\";\n \t}", "public boolean encodeText(CharBuffer src, boolean last, ByteBuffer dst)\n throws IOException\n {\n if (debug.on()) {\n debug.log(\"encode text src=[pos=%s lim=%s cap=%s] last=%s dst=%s\",\n src.position(), src.limit(), src.capacity(), last, dst);\n }\n if (closed) {\n throw new IOException(\"Output closed\");\n }\n if (!started) {\n if (!previousText && !previousFin) {\n // Previous data message was a partial binary message\n throw new IllegalStateException(\"Unexpected text message\");\n }\n started = true;\n headerBuffer.position(0).limit(0);\n intermediateBuffer.position(0).limit(0);\n charsetEncoder.reset();\n }\n while (true) {\n if (debug.on()) {\n debug.log(\"put\");\n }\n if (!putAvailable(headerBuffer, dst)) {\n return false;\n }\n if (debug.on()) {\n debug.log(\"mask\");\n }\n if (maskAvailable(intermediateBuffer, dst) < 0) {\n return false;\n }\n if (debug.on()) {\n debug.log(\"moreText\");\n }\n if (!moreText) {\n previousFin = last;\n previousText = true;\n return true;\n }\n intermediateBuffer.clear();\n CoderResult r = null;\n if (!flushing) {\n r = charsetEncoder.encode(src, intermediateBuffer, true);\n if (r.isUnderflow()) {\n flushing = true;\n }\n }\n if (flushing) {\n r = charsetEncoder.flush(intermediateBuffer);\n if (r.isUnderflow()) {\n moreText = false;\n }\n }\n if (r.isError()) {\n try {\n r.throwException();\n } catch (CharacterCodingException e) {\n throw new IOException(\"Malformed text message\", e);\n }\n }\n if (debug.on()) {\n debug.log(\"frame #%s\", headerCount);\n }\n intermediateBuffer.flip();\n Opcode opcode = previousFin && headerCount == 0\n ? Opcode.TEXT : Opcode.CONTINUATION;\n boolean fin = last && !moreText;\n setupHeader(opcode, fin, intermediateBuffer.remaining());\n headerCount++;\n }\n }", "public boolean isPlain() {\n\treturn style == 0;\n }", "@Override\n public Result.Datatype getDefaultDatatype() {\n return Result.Datatype.TEXT;\n }", "public boolean canProvideString();", "@Override\r\n\tpublic boolean isTraditional() {\n\t\treturn false;\r\n\t}", "public T caseUbqText(UbqText object) {\r\n\t\treturn null;\r\n\t}", "public int canEnhance(ContentItem ci) {\n String mimeType = ci.getMimeType().split(\";\", 2)[0];\n if (TEXT_PLAIN_MIMETYPE.equalsIgnoreCase(mimeType)) {\n return ENHANCE_SYNCHRONOUS;\n }\n return CANNOT_ENHANCE;\n }", "private void sendErrorResponse(String aText, int aStatus, HttpServletRequest aRequest, HttpServletResponse aResponse){\n try {\n aResponse.setStatus(aStatus);\n //fLogger.fine(\"Sending response in uncompressed form, as UTF-8. Length: \" + aText.length());\n String utf8Text = new String(aText.getBytes(), ENCODING);\n aResponse.setCharacterEncoding(\"UTF-8\");\n aResponse.setContentLength(utf8Text.getBytes().length); \n aResponse.setContentType(\"application/text\");\n PrintWriter out = aResponse.getWriter();\n out.append(utf8Text);\n } \n catch (IOException ex) {\n //in practice this won't happen\n logProblem(\"Problem sending an error response.\", ex);\n }\n }", "@Override\n\t\tprotected boolean handleIrregulars(String s) {\n\t\t\treturn false;\n\t\t}", "@Override\n public boolean onQueryTextSubmit(String s) {\n mAdapter.getFilter().filter(s);\n return false;\n }", "@GET\n\t@Produces(\"text/plain\")\n\tpublic String getPlain() {\n\t\treturn msg + \"\\n\";\n\t}", "@Override\n public abstract String asText();", "public boolean realtimeTextEnabled();", "boolean isText(Object object);", "public boolean hasPlainTransfer() {\n return dataCase_ == 2;\n }", "public boolean isPlainText(File src, int k_p) throws IOException {\n\t\tboolean isPlainText = true;\r\n\t\tMap<String, Integer> bifreq = Frequencies.getBigramQuantities(src, Main.alphabet, true); //src\r\n\t\tlong prohibitedBigramClasses = bifreq.entrySet().stream()\r\n\t\t\t.filter(x -> x.getValue() != 0)\r\n\t\t\t.filter(x -> A_prh.contains(x.getKey()))\r\n\t\t\t.count();\r\n\t\tif(prohibitedBigramClasses < 3) {\r\n\t\t\tbifreq.entrySet().stream()\r\n\t\t\t.filter(x -> x.getValue() != 0)\r\n\t\t\t.filter(x -> A_prh.contains(x.getKey()))\r\n\t\t\t.forEach(System.out::println);\r\n\t\t}\r\n\t\tSystem.out.println(\"prohibitedBigramClasses: \" + prohibitedBigramClasses);\r\n\t\tif(prohibitedBigramClasses >= k_p) {\r\n\t\t\tisPlainText = false;\r\n\t\t}\r\n\t\treturn isPlainText;\r\n\t}", "@Override\n public boolean onQueryTextChange(String newText) {\n filter(newText);\n return true;\n }" ]
[ "0.57880193", "0.56217563", "0.5570193", "0.55695766", "0.5568881", "0.55586565", "0.54589283", "0.5400404", "0.5400404", "0.53740203", "0.537191", "0.5355088", "0.53437316", "0.53414303", "0.53197896", "0.52946264", "0.5274794", "0.5264212", "0.5248375", "0.5248375", "0.5248375", "0.5248375", "0.5220514", "0.5201229", "0.52010345", "0.52001435", "0.5198878", "0.51943344", "0.5179328", "0.51792395", "0.51776856", "0.51605123", "0.51572067", "0.51572067", "0.51572067", "0.51572067", "0.51562846", "0.5149435", "0.5125483", "0.5122808", "0.5113915", "0.5112525", "0.5110141", "0.5104961", "0.51015997", "0.5097764", "0.5085034", "0.5085034", "0.50760835", "0.50506073", "0.5042416", "0.50352305", "0.50330687", "0.5029196", "0.50216097", "0.5007268", "0.49948138", "0.49948138", "0.49942467", "0.49788743", "0.4975742", "0.4972081", "0.49655494", "0.4958465", "0.49442625", "0.49388033", "0.49365285", "0.4924196", "0.4918301", "0.49115086", "0.4895645", "0.48731762", "0.48702136", "0.48547396", "0.48448956", "0.48248783", "0.48237032", "0.4821907", "0.4814607", "0.47873667", "0.47855452", "0.47777", "0.47638503", "0.4754551", "0.47515517", "0.47421628", "0.47365645", "0.47303855", "0.47287548", "0.471448", "0.47132614", "0.4712691", "0.47119978", "0.4711565", "0.47098356", "0.47090533", "0.470147", "0.4697356", "0.46964535", "0.46923807", "0.4691811" ]
0.0
-1
This method is called if XML is request
@GET @Produces(MediaType.TEXT_XML) public String sayXMLHello() { return "<?xml version=\"1.0\"?>" + "<hello> Hello Jersey" + "</hello>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRequestInXML() throws Exception;", "public java.lang.String getRequestXml(){\n return localRequestXml;\n }", "public java.lang.String getRequestXml(){\n return localRequestXml;\n }", "public java.lang.String getRequestXml(){\n return localRequestXml;\n }", "public java.lang.String getRequestXml(){\n return localRequestXml;\n }", "public java.lang.String getRequestXml(){\n return localRequestXml;\n }", "public java.lang.String getRequestXml(){\n return localRequestXml;\n }", "public java.lang.String getRequestXml(){\n return localRequestXml;\n }", "public java.lang.String getRequestXml(){\n return localRequestXml;\n }", "public java.lang.String getRequestXml(){\n return localRequestXml;\n }", "public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localRequestXmlTracker = true;\n } else {\n localRequestXmlTracker = true;\n \n }\n \n this.localRequestXml=param;\n \n\n }", "public void handle(Element xmlRequest, HttpServletRequest req, HttpServletResponse res) throws IOException;", "@Override\n\t\tpublic boolean hasPassedXMLValidation() {\n\t\t\treturn false;\n\t\t}", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "@Override\n public String getXmlDocument( HttpServletRequest request )\n {\n return XmlUtil.getXmlHeader( ) + getXml( request );\n }", "@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void updateRequest(Request request) {\n\n\t\tString requestBody = request.getBodyAsString();\n\t\tif ( (requestBody == null)\n\t\t || (requestBody.trim().isEmpty()) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tboolean toArguments = true;\n\t\tXMLRequestParser parser = new XMLwithAttributesParser(request,toArguments);\n\n\t\ttry {\n\t\t\tparser.parseXml().saveResultsToRequest();\n\t\t} catch (IOException ex) {\n\t\t\tLOGGER.error(ex.getMessage(), ex);\n\t\t\tthrow new RuntimeException(ex.getMessage(), ex);\n\t\t} catch (SAXException ex) {\n\t\t\tLOGGER.error(ex.getMessage(), ex);\n\t\t\tthrow new RuntimeException(ex.getMessage(), ex);\n\t\t}\n\t}", "public java.lang.String getResponseXml(){\n return localResponseXml;\n }", "@Override\n\tpublic boolean buildWebRequest(JSONObject jsonRequest, MDGlobalData data, List<MDGlobalRequest> requests) throws KettleException {\n\t\tthrow new KettleException(\"Error Global Email Service uses XML \");\n\t\t//return false;\n\t}", "public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }", "public void setRequestXml(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localRequestXml=param;\n \n\n }", "@Override\r\n public boolean isRequest() {\n return false;\r\n }", "public void setResponseXml(java.lang.String param){\n \n if (param != null){\n //update the setting tracker\n localResponseXmlTracker = true;\n } else {\n localResponseXmlTracker = true;\n \n }\n \n this.localResponseXml=param;\n \n\n }", "@Override\n public void parseXml(Element ele, LoadContext lc) {\n\n }", "@Override\n\tpublic void OnRequest() {\n\t\t\n\t}", "private void onPreRequestData(int tag) {\n }", "protected void onBeginRequest()\n\t{\n\t}", "@Override\n public String getContentType() {\n return \"text/xml; charset=UTF-8\";\n }", "private void getTransactionDetailsRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_TRANSACTION_DETAILS.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingTransactionId(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "@Override\n\t\t\t\t\tpublic void onReqStart() {\n\t\t\t\t\t}", "private void testProXml(){\n\t}", "public boolean isRequest(){\n return false;\n }", "@Override\n\t\tpublic void startDocument() throws SAXException {\n\t\t\t\n\t\t}", "public String doneXML() {\n if ( (MyLocation != null) && (MyName != null)) {\n return null;\n }\n return new String(\"Incomplete \" + XML_TAG + \" XML specification\");\n }", "private void refreshXML() {\n\t\t// Build a new thread to handle the request, since fetching files from\n\t\t// a remove server shouldn't block screen drawing.\n\t\tToast.makeText(\n\t\t\t\tthis,\n\t\t\t\tgetString(R.string.xml_requested_from) + \": \"\n\t\t\t\t\t\t+ PreferencesManager.getXmlUri(this), Toast.LENGTH_LONG)\n\t\t\t\t.show();\n\t\t// We use a separate runnable class instead of an anonymous inner class\n\t\t// so that when the async request is completed, it can signal the viewer\n\t\t// to toast.\n\t\tFetchThread ft = new FetchThread(this);\n\t\tft.start();\n\t}", "@Override\r\n\t\tpublic void startDocument() throws SAXException {\n\t\t}", "public String doneXML() {\r\n return null;\r\n }", "abstract protected String getOtherXml();", "public boolean processXml() throws Exception {\n\t\ttry {\n\t\t\tFile f = new File(fileOutboundLocation);\n\t\t\tString filesList[] = f.list();\n\t\n\t\t\tif (filesList != null) {\n\t\t\t\tfor (int i = 0; i < filesList.length; i++) {\n\t\t\t\t\tfileName = filesList[i];\n\t\t\t\t\tAppLogger.info(\"XmlProcessor.processXml()... file Name=\"+ filesList[i]);\n\t\t\t\t\tcopyFile(filesList[i], fileOutboundLocation, fileBackupLocation);\n\t\t\t\t\tSchemaValidator sv = new SchemaValidator();\n\t\t\t\t\tsv.validateXml(fileOutboundLocation+File.separator+filesList[i], xsdFileLocation, fileErrorLocation);\n\t\t\t\t\tString xmlString = fileRead(fileOutboundLocation + File.separator+ filesList[i]);\n\n\t\t\t\t\tconvertXmlToJavaObject(xmlString);\n\t\t\t\t\tpolicyNo = tXLifeType.getTXLifeRequest().getOLifE().getHolding().getPolicy().getPolNumber(); //RL_009109 - Changed by Kayal\n\t\t\t\t\tint indexOfUnderScore = fileName.indexOf(\"_\");\n\t\t\t\t\tString backupFileName = fileName.substring(0,indexOfUnderScore+1).concat(policyNo+\"_\").concat(fileName.substring(indexOfUnderScore+1));\n\t\t\t\t\t\n\t\t\t\t\trenameFile(fileName, fileBackupLocation, backupFileName, fileBackupLocation); //RL_009109 - Changed by Kayal\n\t\t\t\t\t\n\t\t\t\t\tsaveDetails();\n\t\t\t\t\tdeleteFile(filesList[i], fileOutboundLocation);\n\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tStringWriter sw = new StringWriter();\n\t\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t\te.printStackTrace(pw);\n\t\t\tAppLogger.error(\"Error Occurred: Exception is=\"+sw.toString());\n\t\t\tcopyFile(fileName, fileOutboundLocation, fileErrorLocation);\n\t\t\tdeleteFile(fileName, fileOutboundLocation);\n\t\t\tApcDAO dao = new ApcDAO();\n\t\t\tdao.saveErrorMsg(fileName, sw.toString(), policyNo); //RL_009109\n\t\t}\n\n\t\treturn true;\n\t}", "public void xmlPresentation () {\n System.out.println ( \"****** XML Data Module ******\" );\n ArrayList<Book> bookArrayList = new ArrayList<Book>();\n Books books = new Books();\n books.setBooks(new ArrayList<Book>());\n\n bookArrayList = new Request().postRequestBook();\n\n for (Book aux: bookArrayList) {\n books.getBooks().add(aux);\n }\n\n try {\n javax.xml.bind.JAXBContext jaxbContext = JAXBContext.newInstance(Books.class);\n Marshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\n jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\n jaxbMarshaller.marshal(books, System.out);\n } catch (JAXBException e) {\n System.out.println(\"Error: \"+ e);\n }\n ClientEntry.showMenu ( );\n }", "@Override\n\tpublic void parseXML(Element root) throws Exception {\n\t\t\n\t}", "public BasicXmlDocument getCurrentRequest(){\r\n\t\treturn currentRequest;\r\n\r\n\t}", "@Override\r\n public void startDocument() throws SAXException {\n }", "public void setInputXml(java.lang.String param) {\r\n localInputXmlTracker = param != null;\r\n\r\n this.localInputXml = param;\r\n }", "public void setInputXml(java.lang.String param) {\r\n localInputXmlTracker = param != null;\r\n\r\n this.localInputXml = param;\r\n }", "private void loadXmlTree(HttpServletRequest request, HttpServletResponse response) throws Exception, IOException {\n XMLTree m;\n boolean ifByPath = Boolean.parseBoolean(request.getParameter(\"ifByPath\"));\n\n m = XMLTree.getInstance();\n m.parse(ifByPath);\n response.getWriter().write(m.getResult().toString());\n }", "@Override\n public void startDocument() throws SAXException {\n }", "public String handleRequest(String requestXmlString)\r\n\t\t\tthrows SpeedarException;", "public String getXmlDocument( HttpServletRequest request )\n {\n return XmlUtil.getXmlHeader( ) + getXml( request );\n }", "public void setXML(String xml) {\n\t\tthis.xml = xml;\n\t}", "private void initializeXml() {\n Bundle bundle = this.getIntent().getExtras();\n\n // Texts.\n dateText = (TextView)findViewById(R.id.date_text);\n typeText = (TextView)findViewById(R.id.packet_type_text);\n sourceAddressText = (TextView)findViewById(R.id.source_address_text);\n packetDataText = (TextView)findViewById(R.id.packet_data_text);\n\n dateText.setText(bundle.getString(\"date\"));\n typeText.setText(bundle.getString(\"type\"));\n sourceAddressText.setText(bundle.getString(\"sourceAddress\"));\n data = bundle.getString(\"packetData\");\n packetDataText.setText(data);\n\n // Buttons.\n Button compareButton = (Button)findViewById(R.id.compare_button);\n compareButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n handleCompareButtonPressed();\n }\n });\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "@Override\n public void ParseRequestBean() {\n\n }", "protected abstract String getEventChildXML();", "public interface XmlService {\n\n\t/**\n\t * Parse response file.\n\t * \n\t * @param xmlPath\n\t * @param orderId\n\t * @param complete_on\n\t * @return\n\t * @throws JAXBException\n\t */\n ResponseMQ parseResponseFile(String xmlPath, Long orderId, Date complete_on) throws JAXBException;\n \n /**\n * \n * @param xml\n * @param orderId\n * @param complete_on\n * @return\n * @throws JAXBException\n */\n\tResponseMQ parseResponse(String xml, Long orderId, Date complete_on) throws JAXBException;\n\n\t/**\n\t * Generate change status request.\n\t * \n\t * @param requestMQ\n\t * @return result string or NULL\n\t */\n\tString generateChangeStatusRequest(RequestMQ requestMQ);\n\t\n}", "private boolean parseXMLData(String XMLData) {\n boolean clientRequestStatus = false;\n try {\n\n //Reference:https://www.tutorialspoint.com/java_xml/java_dom_parse_document.htm\n //creating the document builder and factory object to parse the xml data\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder;\n builder = factory.newDocumentBuilder();\n Document blockchainMessage = null;\n InputSource ifs = new InputSource(new StringReader(XMLData));\n //parse the XML message\n blockchainMessage = builder.parse(ifs);\n blockchainMessage.getDocumentElement().normalize();\n //get the message by the tag names in XML data sent\n NodeList XMLList = blockchainMessage.getElementsByTagName(\"blockChainMessage\");\n //get the node (single) from the send data\n Node XMLNode = XMLList.item(0);\n //extract the elements associated with the node 0 \n Element XMLElement = (Element) XMLNode;\n String Transactiondata = XMLElement.getElementsByTagName(\"data\").item(0).getTextContent();\n String difficulty = XMLElement.getElementsByTagName(\"difficulty\").item(0).getTextContent();\n //call the client function associated with client choice\n clientRequestStatus = AddBlock(Transactiondata, Integer.valueOf(difficulty));\n } catch (SAXException ex) {\n System.out.println(\"SAXException\");\n } catch (IOException ex) {\n System.out.println(\"IOException\");\n } catch (ParserConfigurationException ex) {\n System.out.println(\"ParserConfigurationException\");\n }\n return clientRequestStatus;\n }", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws IOException, ServletException {\n boolean wasXmlRequested = isRequestedFormatXml(request);\n if( ! wasXmlRequested ){\n super.doGet(request,response);\n }else{\n try {\n VitroRequest vreq = new VitroRequest(request);\n Configuration config = getConfig(vreq); \n ResponseValues rvalues = processRequest(vreq);\n \n response.setCharacterEncoding(\"UTF-8\");\n response.setContentType(\"text/xml;charset=UTF-8\");\n writeTemplate(rvalues.getTemplateName(), rvalues.getMap(), config, request, response);\n } catch (Exception e) {\n log.error(e, e);\n }\n }\n }", "public static GetEntrancePage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetEntrancePage object =\n new GetEntrancePage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getEntrancePage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetEntrancePage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档开始----\");\n\t}", "@Override\n protected void loadXMLDescription() {\n\n }", "public static GetVehicleInfoPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleInfoPage object =\n new GetVehicleInfoPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleInfoPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleInfoPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "public static GetVehicleBookPage parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{\n GetVehicleBookPage object =\n new GetVehicleBookPage();\n\n int event;\n java.lang.String nillableValue = null;\n java.lang.String prefix =\"\";\n java.lang.String namespaceuri =\"\";\n try {\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n \n if (reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"type\")!=null){\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n if (fullTypeName!=null){\n java.lang.String nsPrefix = null;\n if (fullTypeName.indexOf(\":\") > -1){\n nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(\":\"));\n }\n nsPrefix = nsPrefix==null?\"\":nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\":\")+1);\n \n if (!\"getVehicleBookPage\".equals(type)){\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);\n return (GetVehicleBookPage)ExtensionMapper.getTypeObject(\n nsUri,type,reader);\n }\n \n\n }\n \n\n }\n\n \n\n \n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n \n\n \n \n reader.next();\n \n \n while (!reader.isStartElement() && !reader.isEndElement()) reader.next();\n \n if (reader.isStartElement() && new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\"requestXml\").equals(reader.getName())){\n \n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\"nil\");\n if (!\"true\".equals(nillableValue) && !\"1\".equals(nillableValue)){\n \n java.lang.String content = reader.getElementText();\n \n object.setRequestXml(\n org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));\n \n } else {\n \n \n reader.getElementText(); // throw away text nodes if any.\n }\n \n reader.next();\n \n } // End of if for expected property start element\n \n else {\n \n }\n \n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n \n if (reader.isStartElement())\n // A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\"Unexpected subelement \" + reader.getLocalName());\n \n\n\n\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\n\tpublic String getFormat() {\n\t\treturn \"xml\";\n\t}", "@Override\n public void Wsdl2CodeStartedRequest() {\n }", "protected String xmlType()\n {\n return PRS_XML;\n }", "public void startDocument() throws SAXException {\n\t\ttry {\n\t\t\tlogger.info(\"Parsing XML buddies\");\n\t\t} catch (Exception e) {\n\t\t\tbuddies = null;\n\t\t\tthrow new SAXException(\"XMLBuddyParser error\", e);\n\t\t}\n\t}", "public void notifyLegacyRequest(String xmlLegacyRequest);", "private void onRequestData(int tag) {\n \ttry {\n \t data = request.request();\n \t} catch(MatjiException e) {\n \t lastOccuredException = e;\n \t}\n }", "@Override\n\tprotected void loadXml() {\n\t\tsetContentView(R.layout.activity_my_message);\n\t}", "public Document getXML() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}" ]
[ "0.6968174", "0.6555981", "0.6555981", "0.6555981", "0.6555981", "0.6555981", "0.6555981", "0.6555981", "0.6555981", "0.6555981", "0.6369555", "0.6369555", "0.6369555", "0.6369555", "0.6369555", "0.6369555", "0.6369555", "0.6369555", "0.6369555", "0.62699366", "0.62641084", "0.6212073", "0.6212073", "0.6212073", "0.6212073", "0.6212073", "0.6212073", "0.6212073", "0.6212073", "0.6212073", "0.6212073", "0.6212073", "0.62115264", "0.6199553", "0.60556555", "0.6054584", "0.5999553", "0.5981623", "0.5981623", "0.5981623", "0.5981623", "0.5981623", "0.5981623", "0.5981623", "0.5981623", "0.5981623", "0.5981623", "0.5981623", "0.5938762", "0.5923822", "0.58755964", "0.5867778", "0.5851715", "0.57927144", "0.57731843", "0.5710957", "0.5682815", "0.5680316", "0.56793326", "0.5674901", "0.56376797", "0.563698", "0.5626318", "0.5616741", "0.5616347", "0.5602361", "0.5575385", "0.55737907", "0.55538183", "0.5552067", "0.55339026", "0.55339026", "0.55271786", "0.55218846", "0.55100036", "0.55009246", "0.54747105", "0.54721516", "0.5469482", "0.5469482", "0.5468588", "0.5468126", "0.5449704", "0.5440237", "0.54380554", "0.5427363", "0.5425646", "0.5420456", "0.5420256", "0.541796", "0.54025495", "0.5401039", "0.53999144", "0.53987855", "0.5397553", "0.5392405", "0.5375265", "0.5359783", "0.53554183", "0.53554183", "0.53554183" ]
0.0
-1
This method is called if HTML is request
@GET @Produces(MediaType.TEXT_HTML) public String sayHtmlHello() { return "<html> " + "<title>" + "Hello Jersey" + "</title>" + "<body><h1>" + "Hello Jersey" + "</body></h1>" + "</html> "; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String renderHTML();", "@Override\r\n\tpublic boolean doFilter(Request request, Response response,\r\n\t\t\tFilterChain chain) {\n\t\trequest.setRequestStr(request.getRequestStr().replaceAll(\"<\", \"[\"));\r\n\t\trequest.setRequestStr(request.getRequestStr().replaceAll(\">\", \"]\"));\r\n\t\trequest.setRequestStr(request.getRequestStr() + \"HtmlFilter:doFilter:request\");\r\n\t\tchain.doFilter(request, response);\r\n\t\tresponse.setResponseStr(response.getResponseStr() + \"HtmlFilter:doFilter:response\");\r\n\t\treturn false;\r\n\t}", "protected boolean isFullyInitialized() {\n return html == null;\n }", "@Test\n public void parserHtml() throws JSONException, IOException {\n }", "abstract protected void processHTMLLine(String line);", "private boolean parseBody() {\n return true;\n }", "default boolean visitContent() {\n\t\treturn true;\n\t}", "@Override\n public void handleRequest(HttpServletRequest request,\n HttpServletResponse response) throws ServletException, IOException\n {\n response.setHeader(\"Expires\", \"Tue, 03 Jul 2001 06:00:00 GMT\");\n response.setHeader(\"Last-Modified\", new Date().toString());\n response.setHeader(\"Cache-Control\", \"no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0\");\n response.setHeader(\"Pragma\", \"no-cache\");\n response.setContentType(\"application/json\");\n\n\n String format = (request.getParameter(\"format\") != null) ? request.getParameter(\"format\") : \"html\";\n\t\tString action = (request.getParameter(\"action\") != null) ? request.getParameter(\"action\") : \"view\";\n\n if (format.equals(\"json\")) {\n \tif (action.equals(\"load\")) {\n\t\t\t\tactionIsLoad(response);\n\t\t\t} else if (action.equals(\"clear\")) {\n \t\tactionIsClear(response);\n\t\t\t} else if (action.equals(\"showXML\")) {\n\t\t\t\tactionIsShowXml(response);\n\t\t\t} else {\n \t\tfinal PrintWriter writer = response.getWriter();\n \t\twriter.write(new Gson().toJson(\"Error\"));\n\t\t\t}\n } else {\n request.getRequestDispatcher(\"/WEB-INF/jsp/init.jsp\").forward(request, response);\n }\n\n }", "@Override\r\n\tpublic boolean isHtmlbyTemplate() {\n\t\treturn singleItem || headless?false:freeMarkerSupport.isHtmlbyTemplate();\r\n\t}", "private String renderSpecific( String strHTML )\n {\n String strRender = strHTML;\n strRender = strRender.replaceAll( \"\\\\[lt;\", \"&lt;\" );\n strRender = strRender.replaceAll( \"\\\\[gt;\", \"&gt;\" );\n strRender = strRender.replaceAll( \"\\\\[nbsp;\", \"&nbsp;\" );\n strRender = strRender.replaceAll( \"\\\\[quot;\", \"&quot;\" );\n strRender = strRender.replaceAll( \"\\\\[amp;\", \"&amp;\" );\n strRender = strRender.replaceAll( \"\\\\[hashmark;\", \"#\" );\n\n if ( _strPageUrl != null )\n {\n strRender = strRender.replaceAll( \"#page_url\", _strPageUrl );\n }\n\n return strRender;\n }", "public void setHTML(String html);", "private boolean containsHtml(final String str) {\n if (str == null)\n return false;\n return str.indexOf('<') != -1 || str.indexOf('&') != -1;\n }", "protected String completeHtml(String data) {\n if (data.indexOf(\"<html>\") == -1) {\n\t\t\tdata = \"<html><head></head><body style='margin:0;padding:0;'>\"\n\t\t\t\t\t+ data + \"</body></html>\";\n }\n\n\t\treturn data;\n\t}", "@Override\n public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {\n LOG(\"shouldInterceptRequest:\");\n return super.shouldInterceptRequest(view, request);\n }", "@Override\n\tpublic void service(Request request, Response response) {\n\t\tresponse.print(\"其他测试页面\");\n\t\t\n\t\t\n\t}", "@Nullable\n @Override\n public WebResourceResponse shouldInterceptRequest(WebView view, WebResourceRequest request) {\n\n\n return super.shouldInterceptRequest(view, request);\n }", "public void startDocument() throws IOException {\n FacesContext context = FacesContext.getCurrentInstance();\n UIViewRoot viewRoot = context.getViewRoot();\n HtmlPage page = FacesUtils.getHtmlPage(viewRoot);\n if (page == null || !page.isRendered()) {\n HtmlPageRenderer renderer = getHtmlPageRenderer(context);\n if (renderer != null) {\n renderer.encodePageBegin(context, viewRoot);\n }\n }\n }", "@Override\n public void onPageFinished(WebView view, String url) {\n browser.loadUrl(\"javascript:HtmlOut.processHTML\" +\n \"('<html>'+document.getElementsByTagName('html')[0].innerHTML+'</html>');\");\n }", "@Override\n\t\t public void onPageFinished(WebView view, String url) {\n\t\t webView.loadUrl(\"javascript:HTMLOUT.processHTML(document.documentElement.outerHTML);\");\n\t\t }", "public abstract void doTagLogic() throws JspException, IOException;", "private String renderBody() {\n return \"\";\n }", "@Test\n\tpublic void html_test() {\n\t\tString text = \"\";\n\t\tassertEquals(\"<html></html>\", createHTML(text));\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n try {\n String url = request.getParameter(\"url\");\n URL u = new URL(url);\n URLConnection urlConnection = u.openConnection();\n BufferedReader in = new BufferedReader(new InputStreamReader(urlConnection.getInputStream())); //send request\n String inputLine;\n StringBuffer html = new StringBuffer();\n\n while ((inputLine = in.readLine()) != null) {\n html.append(inputLine);\n }\n in.close();\n out.print(html.toString());\n }catch(Exception e) {\n e.printStackTrace();\n out.print(e);\n }\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n \n \n }", "public void renderBody(HtmlStream stream) {\n }", "@Override\n\tpublic boolean validateContent()\n\t{\n\t\treturn true;\n\t}", "@Override\n public void render(String name, String page, String info, String contentType, String encoding, HttpServletRequest request, HttpServletResponse\n response) throws ViewHandlerException {\n\n if (request == null) {\n throw new ViewHandlerException(\"Null HttpServletRequest object\");\n }\n if (UtilValidate.isEmpty(page)) {\n throw new ViewHandlerException(\"Null or empty source\");\n }\n\n if (Debug.infoOn()) {\n Debug.logInfo(\"Retreiving HTTP resource at: \" + page, MODULE);\n }\n try {\n HttpClient httpClient = new HttpClient(page);\n String pageText = httpClient.get();\n\n // TODO: parse page and remove harmful tags like <HTML>, <HEAD>, <BASE>, etc - look into the OpenSymphony piece for an example\n response.getWriter().print(pageText);\n } catch (IOException e) {\n throw new ViewHandlerException(\"IO Error in view\", e);\n } catch (HttpClientException e) {\n throw new ViewHandlerException(e.getNonNestedMessage(), e.getNested());\n }\n }", "@Override\r\n public boolean isRequest() {\n return false;\r\n }", "private WebResponse() {\n initFields();\n }", "private void doBeforeRenderResponse(final PhaseEvent arg0) {\n\t}", "@Override\n public void xhtmlSuccess(String xhtml)\n {\n cur_html = xhtml;\n markdown_failed = false;\n refreshDisplay();\n }", "private void getHtmlCode() {\n\t try {\n\t Document doc = Jsoup.connect(\"http://www.example.com/\").get();\n\t Element content = doc.select(\"a\").first();\n//\t return content.text();\n\t textView.setText(content.text());\n\t } catch (IOException e) {\n\t // Never e.printStackTrace(), it cuts off after some lines and you'll\n\t // lose information that's very useful for debugging. Always use proper\n\t // logging, like Android's Log class, check out\n\t // http://developer.android.com/tools/debugging/debugging-log.html\n\t Log.e(TAG, \"Failed to load HTML code\", e);\n\t // Also tell the user that something went wrong (keep it simple,\n\t // no stacktraces):\n\t Toast.makeText(this, \"Failed to load HTML code\",\n\t Toast.LENGTH_SHORT).show();\n\t }\n\t }", "@Override\n\tpublic int doStartTag() throws JspException {\n\t\treturn EVAL_BODY_INCLUDE;\n\t}", "@Override\n\tpublic int doStartTag() throws JspException {\n\t\treturn EVAL_BODY_INCLUDE;\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n\n }", "@Override\n public boolean accept(String link) {\n \n URL url;\n URLConnection connection;\n String type;\n boolean ret;\n\n ret = false;\n try {\n url = new URL (link);\n connection = url.openConnection ();\n type = connection.getContentType ();\n if (type == null)\n ret = false;\n else\n ret = type.startsWith (\"text/html\");\n }catch (IOException e) {\n// XLogger.getInstance().log(Level.WARNING, \"{0}. {1}\", this.getClass(), e, link);\n }\n \n return (ret);\n }", "protected void page () throws HTMLParseException {\r\n while (block.restSize () == 0) {\r\n switch (nextToken) {\r\n case END:\r\n return;\r\n case LT:\r\n lastTagStart = tagStart;\r\n tagmode = true;\r\n match (LT);\r\n tag (lastTagStart);\r\n break;\r\n case COMMENT:\r\n //block.addToken (new Token (pagepart, Token.COMMENT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.COMMENT, tagStart, stringLength));\r\n match (COMMENT);\r\n break;\r\n case SCRIPT:\r\n //block.addToken (new Token (pagepart, Token.SCRIPT, tagStart, stringLength));\r\n addTokenCheck(new Token (pagepart, Token.SCRIPT, tagStart, stringLength));\r\n match (SCRIPT);\r\n break;\r\n case STRING:\r\n if(stringLength > -1){\r\n //block.addToken (new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n }\r\n match (nextToken);\r\n break;\r\n case MT:\r\n if(!tagmode) {\r\n scanString();\r\n }\r\n default:\r\n if(stringLength > -1){\r\n //block.addToken (new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n // 2009.05.28 by in-koo cho\r\n addTokenCheck(new Token (pagepart, Token.TEXT, tagStart, stringLength));\r\n }\r\n match (nextToken);\r\n }\r\n }\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException, UnsupportedEncodingException {\n try {\n processRequest(request, response);\n } catch (ParseException ex) {\n Logger.getLogger(EditSettingsServlet.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n public void onPourSoupRaised() {\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n }", "@Override\r\n\t\t\tpublic void onRequest() {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n public void render(HttpServletRequest request, HttpServletResponse response, Object result) throws Throwable\r\n {\n \r\n }", "@Override\n public void logHtml(@NonNull String html, boolean override) {\n if (getLogger().isDebugEnabled()) {\n getLogger().debug(\"logHtml {}, override: {}\", html, override);\n }\n\n sendSynchronously(restApiClient::logHtml, createLogHtmlRequest(html, override));\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n AuraContext context = Aura.getContextService().getCurrentContext();\n response.setCharacterEncoding(AuraBaseServlet.UTF_ENCODING);\n String ret = null;\n long now = System.currentTimeMillis();\n long ifModifiedSince = request.getDateHeader(\"If-Modified-Since\");\n if(ifModifiedSince != -1 && ifModifiedSince + 1000 > now) {\n response.sendError(HttpServletResponse.SC_NOT_MODIFIED);\n return;\n }\n \n setLongCache(response);\n AuraContext.Format format = context.getFormat();\n response.setContentType(getContentType(format));\n switch(format){\n case MANIFEST:\n writeManifest(request, response);\n break;\n case CSS:\n try {\n writeCss(request, response);\n } catch (Throwable t) {\n handleServletException(t, true, context, request, response, true);\n }\n break;\n case JS:\n try {\n ret = writeDefinitions(request, response);\n response.getWriter().println(ret);\n } catch (Throwable t) {\n handleServletException(t, true, context, request, response, ret != null);\n }\n break;\n case JSON:\n try {\n Aura.getConfigAdapter().validateCSRFToken(csrfToken.get(request));\n writeComponents(request, response);\n } catch (Throwable t) {\n handleServletException(t, true, context, request, response, true);\n }\n break;\n default:\n break;\n }\n }", "public AdmClientePreferencialHTML() {\n/* 191 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 193 */ buildDocument();\n/* */ }", "@GET\r\n @Produces(\"text/html\")\r\n public String getHtml() {\r\n return \"<html><body>the solution is :</body></html> \";\r\n }", "public String getHtml() {\n return html;\n }", "private void startHtmlPage(PrintWriter out,ITestResult result)\r\n\t{\r\n\t\tout.println(\"<html>\");\r\n\t\tout.println(\"<head>\");\r\n\t\tout.println(\"<meta content=\\\"text/html; charset=UTF-8\\\" http-equiv=\\\"content-type\\\"/><meta content=\\\"cache-control\\\" http-equiv=\\\"no-cache\\\"/><meta content=\\\"pragma\\\" http-equiv=\\\"no-cache\\\"/>\");\r\n\t\tout.println(\"<style type=\\\"text/css\\\">\");\r\n\t\tout.println(\"body, table {\");\r\n\t\tout.println(\"font-family: Verdana, Arial, sans-serif;\");\r\n\t\tout.println(\"font-size: 12;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"table {\");\r\n\t\tout.println(\"border-collapse: collapse;\");\r\n\t\tout.println(\"border: 1px solid #ccc;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"th, td {\");\r\n\t\tout.println(\"padding-left: 0.3em;\");\r\n\t\tout.println(\"padding-right: 0.3em;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\"a {\");\r\n\t\tout.println(\"text-decoration: none;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".title {\");\r\n\t\tout.println(\"font-style: italic;\");\r\n\t\tout.println(\"background-color: #B2ACAC;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".selected {\");\r\n\t\tout.println(\"background-color: #ffffcc;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t\tout.println(\".status_done {\");\r\n\t\tout.println(\"background-color: #eeffee;\");\r\n\t\tout.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_passed {\");\r\n\t out.println(\"background-color: #ccffcc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_failed {\");\r\n\t out.println(\"background-color: #ffcccc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".status_maybefailed {\");\r\n\t out.println(\"background-color: #ffffcc;\");\r\n\t out.println(\"}\");\r\n\t\t\r\n\t out.println(\".breakpoint {\");\r\n\t out.println(\"background-color: #cccccc;\");\r\n\t out.println(\"border: 1px solid black;\");\r\n\t out.println(\"}\");\r\n\t out.println(\"</style>\");\r\n\t out.println(\"<title>Test results</title>\");\r\n\t out.println(\"</head>\");\r\n\t out.println(\"<body>\");\r\n\t out.println(\"<h1>Test results </h1>\");\r\n\t out.println(\"<h2>Test Name: \"+className+\".\"+result.getName()+\"</h2>\");\r\n\t \r\n\t out.println(\"<table border=\\\"1\\\">\");\r\n\t out.println(\"<tbody>\");\r\n\t out.println(\"<tr>\");\r\n\t out.println(\"<td><b>Selenium-Command</b></td>\");\r\n\t out.println(\"<td><b>Parameter-1</b></td>\");\r\n\t\tout.println(\"<td><b>Parameter-2</b></td>\");\r\n\t\tout.println(\"<td><b>Status</b></td>\");\r\n\t\tout.println(\"<td><b>Screenshot</b></td>\");\r\n\t\tout.println(\"<td><b>Calling-Class with Linenumber</b></td>\");\r\n\t\tout.println(\"</tr>\");\r\n\t\t\r\n\t}", "private String processHtmlDocumentFromBrowser(SessionState state, String strFromBrowser)\n\t{\n\t\tStringBuffer alertMsg = new StringBuffer();\n\t\tString text = FormattedText.processHtmlDocument(strFromBrowser, alertMsg);\n\t\tif (alertMsg.length() > 0) addAlert(state, alertMsg.toString());\n\t\treturn text;\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n processRequest(request, response);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(Editoras.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(Editoras.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n viewModule(request, response);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void OnRequest() {\n\t\t\n\t}", "public boolean isRawInlineHtmlEnabled()\n {\n \treturn rawInlineHtmlEnabled;\n }", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "@Override\n public void onResponse(Call call, Response response) throws IOException {\n String html = null;\n try {\n JSONObject jsonObject = new JSONObject(response.body().string()).getJSONObject(\"data\");\n// Log.d(TAG, \"onResponse: \" + jsonObject);\n// OneData.contentData = new Gson().fromJson(jsonObject.toString(), OneContentData.class);\n html = jsonObject.getString(\"html_content\");\n // Todo: Jsoup解析一下\n Log.d(TAG, \"onResponse: \" + html.substring(html.indexOf(\"body\", 0), html.length()));\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "protected SafeHtml getInnerHtml() {\n return html;\n }", "protected void onBeginRequest()\n\t{\n\t}", "@Override\n public void onResponse(String response) {\n progressDialog.dismiss();\n Log.d(\"Text on webpage: \", \"\" + response);\n checkResponse(response);\n }", "public void setInfoHtmlContent(String htmlInfoContent);", "private DefaultHTMLs(String contents){\r\n\t\tthis.contents = contents;\r\n\t}", "@Override\n public void doTag() throws JspException, IOException {\n setAttributes();\n\n String layout = getBodyContent();\n jspContext.getOut().write(layout);\n }", "private boolean firstTimeVisiting(HttpServletRequest request)\n throws ServletException, IOException {\n return request.getParameter(\"title\") == null || request.getParameter(\"body\") == null ||\n request.getParameter(\"tags\") == null;\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp)\n throws ServletException, IOException {\n \tresp.getWriter().write(\"<html><body>\"+NOTICE);\n processRequest(req, resp);\n }", "public int doEndTag(){\r\n try {\r\n JspWriter out = pageContext.getOut();\r\n return SKIP_BODY;\r\n } catch (Exception ex){\r\n throw new Error(\"Error\");\r\n }\r\n }", "HTML createHTML();", "@Override\n public void process(IeDocument document) {\n\n }", "private void postErrorPage() throws IOException {\n out.println(OK);\n System.out.println(NO);\n out.println(htmlType);\n out.println(closed);\n out.println(\"Content-Length: \" + ERROR_FILE.length());\n out.println(ENDLINE);\n String htmlLine = ERROR_READER.readLine();\n while (htmlLine != null) {\n out.println(htmlLine);\n htmlLine = ERROR_READER.readLine();\n }\n ERROR_READER.close();\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (ParseException ex) {\n Logger.getLogger(CommenterProduitServlet.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public WebResourceResponse shouldInterceptRequest(\n final WebView view,\n WriteHandlingWebResourceRequest request\n ){\n return null;\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n }", "@Override\n public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {\n\n return super.shouldOverrideUrlLoading(view, request);\n }", "public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException {\r\n\r\n\t\t// Set the MIME type for the render response\r\n\t\tresponse.setContentType(request.getResponseContentType());\r\n\r\n\t\t// Invoke the HTML to render\r\n\t\tPortletRequestDispatcher rd = getPortletContext().getRequestDispatcher(getHtmlFilePath(request, VIEW_HTML));\r\n\t\trd.include(request,response);\r\n\t}", "public void handler(AbstractRequest request) {\n\t\tSystem.out.println(\"===handle1\" + request.getContent());\n\t}", "public void setInfoHtmlBodyContent(String infoHtmlBodyContent);", "protected void handleInitResultContent(final Request request) {\n\t\t// Do Nothing\n\t}", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response\n )\n throws ServletException\n , IOException {\n processRequest(request, response);\n }", "@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\tprotected void processRespond() {\n\r\n\t}", "@Override\r\n\tprotected void processRespond() {\n\r\n\t}", "@Test\n\tpublic void testHTML(){\n \tFile xml = new File(testData,\"html/htmlsidekick.html\");\n \t\n \tBuffer b = TestUtils.openFile(xml.getPath());\n\t\t\n \t// wait for end of parsing\n \tdoInBetween(new Runnable(){\n \t\t\tpublic void run(){\n \t\t\t\taction(\"sidekick-parse\",1);\n \t\t}}, \n \t\tmessageOfClassCondition(sidekick.SideKickUpdate.class),\n \t\t10000);\n\t\t\n \taction(\"sidekick-tree\");\n \tPause.pause(2000);\n\n \tHyperlinkSource src = HTMLHyperlinkSource.create();\n\t\tfinal Hyperlink h = src.getHyperlink(TestUtils.view().getBuffer(), 3319);\n\t\tassertNotNull(h);\n\t\tassertTrue(h instanceof jEditOpenFileHyperlink);\n\t\tassertEquals(67, h.getStartLine());\n\t\tassertEquals(67, h.getEndLine());\n\t\tGuiActionRunner.execute(new GuiTask() {\n\t\t\t\n\t\t\t@Override\n\t\t\tprotected void executeInEDT() throws Throwable {\n\t\t\t\th.click(TestUtils.view());\n\t\t\t}\n\t\t});\n\t\t\n\t\tassertEquals(\"jeditresource:/SideKick.jar!/index.html\",TestUtils.view().getBuffer().getPath());\n\t\t\n\t\tTestUtils.close(TestUtils.view(), TestUtils.view().getBuffer());\n\t\tTestUtils.close(TestUtils.view(), b);\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n try {\n /* TODO output your page here. You may use following sample code. */\n\t\t\tout.println(\"<!DOCTYPE html> \");\n\t\t\tout.println(\"<html> \");\n\t\t\tout.println(\" \");\n\t\t\tprintHeader(out, response);\n\t\t\tprintBody(out, response);\n\t\t\tout.println(\"</html> \");\n } finally {\n out.close();\n }\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n preprocess(request, response);\n User loggedIn = getUserFromSession(request, response);\n saveURL(request, response);\n \n if (firstTimeVisiting(request))\n showPage(\"ask.jsp\", request, response);\n else\n {\n String title = request.getParameter(\"title\");\n String body = request.getParameter(\"body\");\n String[] tags = extractTags(request);\n List<String> errors = searchForErrors(title, body, tags);\n if (errors.isEmpty())\n {\n Question q = new Question(title, body);\n q.addToDatabase(loggedIn);\n for (String t : tags)\n new Tag(t).addToDatabase(q);\n setNotification(Info.quesSuccess, request, response);\n response.sendRedirect(\"question?id=\" + q.getID());\n }\n else\n {\n setErrors(errors, request, response);\n showPage(\"ask.jsp\", request, response);\n }\n }\n }", "@Override\n public void prepareHtmlDataList() {\n makeGCDataInfoOutputData();\n makeLaunchDataInfoOutputData();\n }", "@JavascriptInterface\n @SuppressWarnings(\"unused\")\n public void processHTML(String html) {\n\n Element content;\n String value = \"\";\n try {\n org.jsoup.nodes.Document doc = Jsoup.parse(html, \"UTF-8\");\n content = doc.getElementsByClass(\"rupee\").get(0);\n value = content.text();\n } catch (Exception e) {\n e.printStackTrace();\n }\n listener.update(value);\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n PrintWriter out = response.getWriter();\r\n try {\r\n } finally { \r\n out.close();\r\n }\r\n }", "public boolean shouldOverrideUrlLoading(WebView view, String url){\n Log.d(\"debug\",\"url to open:\"+url);\n if(url.contains(\"?code=\")){\n String[] codepiece = url.split(\"code=\");\n String code=codepiece[1];\n Log.d(\"debug\",\"code is :\"+code+\":\");\n }else {\n view.loadUrl(url);\n }\n return false; // then it is not handled by default action\n }", "public IndicadoresEficaciaHTML() {\n/* 163 */ this(StandardDocumentLoader.getInstance());\n/* */ \n/* 165 */ buildDocument();\n/* */ }", "@Override\n\tpublic void sendHtmlEmail(MimeMessage mm) {\n\t\t\n\t}", "@Override\n public void onReceivedError(WebView view, WebResourceRequest request, WebResourceError error) {\n Log.v(\"WVClient.onReceiveError\", \" receieved an error\" + error);\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n onSendUpdate(\"WVClient has received an error!\");\n }\n });\n\n //do what would be done in processHTML but avoid anything to do with scraping, move onto next page\n crawlComplete = false;\n\n if (masterEmailSet.size() > 20){\n //if more than twenty emails have been discovered, the crawl is done\n crawlComplete = true;\n }\n\n if (masterEmailSet.size() > 0 && !searchTerm.equals(\"\")){\n //if at least one email with the search term has been found, crawl is done\n crawlComplete = true;\n }\n\n\n if (collectedLinks.iterator().hasNext() && !crawlComplete){\n //if there's another link and crawl isn't deemed complete, hit next URL\n browser.post(new Runnable() {\n @Override\n public void run() {\n Log.v(\"processHTML\", \" loading page on browser:\" + collectedLinks.iterator().next());\n visitedLinks.add(collectedLinks.iterator().next());\n browser.loadUrl(collectedLinks.iterator().next());\n }\n });\n }\n }", "protected void render(){}", "@Override\n public View checkContentValidation() {\n return null;\n }", "@Override\n public View checkContentValidation() {\n return null;\n }", "public int doStartTag() throws JspException \n\t{\n\t return EVAL_BODY_INCLUDE;\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n try (PrintWriter out = response.getWriter()) {\n /* TODO output your page here. You may use following sample code. */\n out.println(\"<!DOCTYPE html>\");\n out.println(\"<html>\");\n out.println(\"<head>\");\n out.println(\"<title>Get e Post</title>\"); \n out.println(\"</head>\");\n }\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n }", "@Override\n protected void doPost\n (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}", "public boolean isScanFromWebPage() {\n return this.returnUrlTemplate != null;\n }" ]
[ "0.60727143", "0.5889271", "0.57828397", "0.57280874", "0.57084703", "0.5693344", "0.5693128", "0.56882155", "0.5661713", "0.5661037", "0.56394714", "0.56237453", "0.55572397", "0.55439746", "0.5532084", "0.55287725", "0.551941", "0.551559", "0.5511702", "0.54774356", "0.545788", "0.5451523", "0.54509646", "0.54433596", "0.5427458", "0.5426592", "0.5415762", "0.5399163", "0.53989714", "0.539858", "0.5390309", "0.5348227", "0.5333906", "0.5333906", "0.53249377", "0.53249377", "0.53249377", "0.53249377", "0.5320169", "0.53196615", "0.53160584", "0.5314332", "0.53097093", "0.5306614", "0.53041166", "0.5302443", "0.52981406", "0.52943254", "0.5288014", "0.528692", "0.5277304", "0.5269916", "0.52672464", "0.5264417", "0.52387214", "0.5237115", "0.52363783", "0.52297044", "0.52282643", "0.5226656", "0.52258116", "0.52201384", "0.52161753", "0.52151686", "0.5205583", "0.5201265", "0.5198259", "0.5198252", "0.51978433", "0.51962864", "0.51859134", "0.51743495", "0.5170094", "0.51699585", "0.5169068", "0.51665413", "0.51663625", "0.5162266", "0.51564354", "0.51554585", "0.5143758", "0.5143758", "0.51358026", "0.5133731", "0.51118183", "0.5109112", "0.5105969", "0.5098789", "0.50952214", "0.50885224", "0.50866956", "0.5084655", "0.5083216", "0.5083111", "0.5083111", "0.50823754", "0.50821316", "0.5069431", "0.50693923", "0.506226", "0.50605136" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { int result =10; result += 1;//result = result +1; System.out.println(result); }
{ "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
arr: input array n: size of array Function to find the sum of contiguous subarray with maximum sum.
int maxSubarraySum(int arr[], int n){ // Your code here int cursum = arr[0]; int osum = arr[0]; for(int i=1;i<n;i++){ if(cursum>=0){ cursum+=arr[i]; }else{ cursum=arr[i]; } if(cursum>osum){ osum=cursum; } } return osum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int maxSubarraySum(int arr[], int n)\r\n {\r\n int maxSoFar = Integer.MIN_VALUE;\r\n int currMax = 0;\r\n for(int i = 0; i < n; i++) {\r\n currMax = Math.max(arr[i], currMax+arr[i]);\r\n maxSoFar = Math.max(currMax, maxSoFar);\r\n }\r\n return maxSoFar;\r\n }", "int maxSubarraySum(int arr[], int n){\n \n // Your code here\n int max = Integer.MIN_VALUE, curr = 0; \n \n for (int i = 0; i < n; i++) { \n curr = curr + arr[i]; \n if (max < curr) \n max = curr; \n if (curr < 0) \n curr = 0; \n } \n return max;\n }", "static int maxSubsetSum(int[] arr) {\n int n = arr.length;\n int[] dp = new int[n];\n dp[0] = arr[0];\n dp[1] = Math.max(arr[0], arr[1]);\n\n for (int i = 2; i < n; ++i) {\n dp[i] = Math.max(dp[i - 2], Math.max(dp[i - 2] + arr[i], Math.max(dp[i - 1], arr[i])));\n }\n\n return dp[n - 1];\n }", "public static Result maxSum_DC(int arr[], int n) {\n int ans = Integer.MIN_VALUE;\n Result rest = maxSum_DC_recursive(arr, n, 0, n - 1);\n return rest;\n }", "private static int maxSubSumN(int[] a) {\n int maxSum = 0;\n int thisSum = 0;\n\n for (int i = 0; i < a.length; i++) {\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n } else if (thisSum < 0) {\n thisSum = 0;\n }\n }\n\n return maxSum;\n }", "private static int maxSubSumN2(int[] a) {\n int maxSum = 0;\n\n for (int first = 0; first < a.length; first++) {\n int thisSum = 0;\n for (int i = first; i < a.length; i++) {\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n }\n }\n }\n\n return maxSum;\n }", "public static Result maxSum2Pointer(int arr[], int n) {\n int start = 0, end = 0;\n int max_sum = Integer.MIN_VALUE, s_idx = -1, e_idx = -1;\n int t_sum = 0;\n while (start < n && end < n) {\n t_sum += arr[end];\n //store info for the max subarray\n if (t_sum > max_sum) {\n s_idx = start;\n e_idx = end;\n }\n max_sum = Math.max(max_sum, t_sum);\n if (t_sum < 0) {\n t_sum = 0;\n start = end + 1;\n }\n end++;\n }\n return new Result(s_idx, e_idx, max_sum);\n }", "private static int maxSum(int arr[]) {\n int sum = 0;\n Arrays.sort(arr);\n\n // Subtracting a1, a2, a3,....., a(n/2)-1,\n // an/2 twice and adding a(n/2)+1, a(n/2)+2,\n // a(n/2)+3,....., an - 1, an twice.\n for (int i = 0; i < arr.length / 2; i++) {\n sum -= (2 * arr[i]);\n sum += (2 * arr[arr.length - i - 1]);\n }\n\n return sum;\n }", "public static int maximumSubArray(int arr[])\n\t{\n\t\tint sum=arr[0];\n\t\tint maxSum = arr[0];\n\t\tint n = arr.length;\n\t\tfor(int i=1;i<n;i++)\n\t\t{\n\t\t\tsum = Math.max(sum+arr[i], arr[i]);\n\t\t\t\n\t\t\tmaxSum = Math.max(maxSum, sum);\n\t\t}\n\t\t\n\t\treturn maxSum;\n\t}", "public static void maxSubArray(Integer[] arr){\n\n int maxSum = arr[0]; // start with smallest number\n int i =0;\n int j =1;\n\n while (j< arr.length){\n if((maxSum + arr[j] > maxSum) ){\n maxSum = arr[j];\n i++;\n j++;\n }\n\n }\n\n }", "static void maxSubArraySum1(int a[], int size)\n {\n int max_so_far = Integer.MIN_VALUE,\n max_ending_here = 0,start = 0,\n end = 0, s = 0;\n\n for (int i = 0; i < size; i++)\n {\n max_ending_here += a[i];\n\n if (max_so_far < max_ending_here)\n {\n max_so_far = max_ending_here;\n start = s;\n end = i;\n }\n\n if (max_ending_here < 0)\n {\n max_ending_here = 0;\n s = i + 1;\n }\n }\n System.out.println(\"Maximum contiguous sum is \" + max_so_far);\n System.out.println(\"Starting index \" + start);\n System.out.println(\"Ending index \" + end);\n }", "public static int maxSubsum(int[] arr) {\n int minInArray = 0;\n int maxInArray = 0;\n int minSoFar = minInArray;\n int maxSoFar = maxInArray;\n int sum = 0;\n\n for (int i = 0; i < arr.length; i++) {\n sum += arr[i];\n minSoFar += arr[i];\n maxSoFar += arr[i];\n\n if (minSoFar > 0) {\n minSoFar = 0;\n }\n\n if (maxSoFar < 0) {\n maxSoFar = 0;\n }\n\n if (minInArray > minSoFar) {\n minInArray = minSoFar;\n }\n\n if (maxInArray < maxSoFar) {\n maxInArray = maxSoFar;\n }\n }\n\n return Math.max(sum - minInArray, maxInArray);\n }", "private static int maxSubSumN3(int[] a) {\n int maxSum = 0;\n\n for (int first = 0; first < a.length; first++) {\n for (int last = first; last < a.length; last++) {\n int thisSum = 0;\n\n for (int i = first; i <= last; i++)\n thisSum += a[i];\n\n if (thisSum > maxSum) {\n maxSum = thisSum;\n }\n }\n }\n\n return maxSum;\n }", "static int[] maxSubarray(int[] arr) {\n\n if(arr == null || arr.length == 0)\n return new int[0];\n\n int sum = arr[0];\n int subArrayMax = Integer.MIN_VALUE;\n for(int i=1; i<arr.length; i++) {\n\n if(sum <= 0) {\n sum = 0;\n }\n\n sum+= arr[i];\n\n if(sum > subArrayMax) {\n subArrayMax = sum;\n }\n }\n\n subArrayMax = Math.max(subArrayMax, sum);\n\n Arrays.sort(arr);\n\n int subSeqMax = 0;\n if(arr[arr.length-1] < 0) {\n subSeqMax = arr[arr.length-1];\n } else {\n for(int a : arr){\n subSeqMax+= a < 0 ? 0 : a;\n }\n }\n\n return new int[]{subArrayMax, subSeqMax};\n }", "public static int maxSubArrayWithZeroSum(int[] arr) {\r\n\t\tMap<Integer, Integer> sumToIndexMap = new HashMap<>();\r\n\r\n\t\tint sum = 0;\r\n\t\tsumToIndexMap.put(0, -1);\r\n\t\tint max = Integer.MIN_VALUE;\r\n\r\n\t\tfor (int index = 0; index < arr.length; index++) {\r\n\r\n\t\t\tif (arr[index] == 0) {\r\n\t\t\t\tmax = Integer.max(max, 1);\r\n\t\t\t}\r\n\r\n\t\t\tsum = sum + arr[index];\r\n\t\t\tif (sumToIndexMap.containsKey(sum)) {\r\n\r\n\t\t\t\tint prevSumIndex = sumToIndexMap.get(sum);\r\n\t\t\t\tmax = Integer.max(max, index - prevSumIndex);\r\n\t\t\t} else {\r\n\t\t\t\tsumToIndexMap.put(sum, index);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn max;\r\n\t}", "public static int circularArrayMaxSubarraySum(int[] arr) {\n\t\tint ceNotWrapping = kadane(arr);\n\n\t\t// Case 2 : CE are wrapping\n\t\tint totalSum = 0;\n\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\ttotalSum += arr[i];\n\t\t\tarr[i] = -arr[i];\n\t\t}\n\n\t\tint nonContributingElementSum = kadane(arr);\n\n\t\tint ceWrapping = totalSum + nonContributingElementSum;\n\n\t\treturn Math.max(ceNotWrapping, ceWrapping);\n\n\t}", "public static int maxSubArray(int[] arr) {\n\n int arr_size = arr.length;\n int max_curr = Integer.MIN_VALUE, max_global = 0;\n\n for (int i = 0; i < arr_size; ++i)\n {\n max_global += arr[i];\n if (max_curr < max_global)\n max_curr = max_global;\n if (max_global < 0)\n max_global = 0;\n }\n return max_curr;\n }", "public static int findMaxSumSubArray(int k, int[] arr) {\n int windowSum = 0, maxSum = Integer.MIN_VALUE;\n int windowStart = 0;\n for (int windowEnd = 0; windowEnd < arr.length; windowEnd++) {\n windowSum += arr[windowEnd]; // add the next element\n // slide the window, we don't need to slide if we've not hit the required window size of 'k'\n if (windowEnd >= k - 1) {\n maxSum = Math.max(maxSum, windowSum);\n windowSum -= arr[windowStart]; // subtract the element going out\n windowStart++; // slide the window ahead\n }\n }\n return maxSum;\n }", "public static int getMaxSum(int[] arr) {\n int maxSum = 0;\n int sum = 0;\n for (int i : arr) {\n sum += i;\n if (maxSum < sum) maxSum = sum;\n else if (sum < 0) sum = 0;\n }\n return maxSum;\n }", "static int maxSubArraySum(int a[], int size)\n {\n int Cur_Max = a[0];\n int Prev_Max = a[0];\n \n for (int i = 1; i < size; i++)\n {\n //we want to know if the summition is increassing or not\n Prev_Max = Math.max(a[i], Prev_Max+a[i]);\n //Take Decision to change the value of the largest sum or not\n Cur_Max = Math.max(Cur_Max, Prev_Max);\n }\n return Cur_Max;\n }", "public static int[] maxSumSubArray(int[] arr, int sum) {\n\t\tint cur = 0, left = 0, right = 0;\n\t\twhile(right < arr.length) {\n\t\t\twhile (right < arr.length && cur < sum) {\n\t\t\t\tcur += arr[right++];\n\t\t\t}\n\t\t\tif (cur == sum) {\n\t\t\t\treturn new int[] {left, right - 1};\n\t\t\t}\n\t\t\twhile (left < right && cur > sum) {\n\t\t\t\tcur -= arr[left++];\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static int[] maxSumInSubArray(int array[]) {\n int maxSoFar = array[0];\n int maxEndingHere = array[0];\n int startIndex = 0;\n int endIndex = 0;\n int j = 1;\n for (; j < array.length; j++) {\n int val = array[j];\n if (val >= val + maxEndingHere) {\n maxEndingHere = val;\n startIndex = j;\n } else {\n maxEndingHere += val;\n }\n if (maxSoFar < maxEndingHere) {\n maxSoFar = maxEndingHere;\n endIndex = j;\n }\n }\n return Arrays.copyOfRange(array, startIndex, endIndex + 1);// Make copyofRange to copy new max subsequence array\n }", "private static int LargestSubArraySum(int[] array) {\n\t\tint maximumSum=0;\n\t\tfor(int i=0; i< array.length; i++) {\n\t\t\tfor(int j=i; j < array.length; j++) {\n\t\t\t\t\n\t\t\t\tint sum=0;\n\t\t\t\tfor(int k=i; k<= j; k++) \n\t\t\t\t\tsum += array[k];\n\t\t\t\t\n\t\t\t\tmaximumSum=Math.max(maximumSum, sum);\n\t\t\t} \n\t\t}\n\t\treturn maximumSum;\n\t}", "public static int maxSubArraySum(int a[]) {\n\t\tint max_so_far = a[0];\n\t\tint curr_max = a[0];\n\n\t\tfor (int i = 1; i < a.length; i++) {\n\t\t\tcurr_max = Math.max(a[i], curr_max + a[i]);\n\t\t\tmax_so_far = Math.max(max_so_far, curr_max);\n\t\t}\n\t\treturn max_so_far;\n\t}", "private static int MaxSubarraySum(int[] a) {\n\t\t\n\t\tint max_so_for =Integer.MIN_VALUE;\n\t\tint max_ending_here = 0;;\n\t\t\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\tmax_ending_here = max_ending_here + a[i];\n\t\t\t\n\t\t\tif(max_so_for < max_ending_here )\n\t\t\t\tmax_so_for = max_ending_here;\n\t\t\tif(max_ending_here < 0)\n\t\t\t\tmax_ending_here = 0;\n\t\t}\n\t\t\n\t\treturn max_so_for;\n\t}", "int subArraySum(int arr[], int n, int sum) \r\n { \r\n int curr_sum, i, j; \r\n \r\n // Pick a starting point \r\n for (i = 0; i < n; i++) \r\n { \r\n curr_sum = arr[i]; \r\n \r\n // try all subarrays starting with 'i' \r\n for (j = i + 1; j <= n; j++) \r\n { \r\n if (curr_sum == sum) \r\n { \r\n int p = j - 1; \r\n System.out.println(\"Sum found between indexes \" + i \r\n + \" and \" + p); \r\n return 1; \r\n } \r\n if (curr_sum > sum || j == n) \r\n break; \r\n curr_sum = curr_sum + arr[j]; \r\n } \r\n } \r\n \r\n System.out.println(\"No subarray found\"); \r\n return 0; \r\n }", "static int maximumDifferenceSum(int arr[], int N)\n {\n int dp[][] = new int [N][2];\n\n for (int i = 0; i < N; i++)\n dp[i][0] = dp[i][1] = 0;\n\n for (int i = 0; i< (N - 1); i++)\n {\n /* for [i+1][0] (i.e. current modified\n value is 1), choose maximum from\n dp[i][0] + abs(1 - 1) = dp[i][0] and\n dp[i][1] + abs(1 - arr[i]) */\n dp[i + 1][0] = Math.max(dp[i][0],\n dp[i][1] + Math.abs(1 - arr[i]));\n\n /* for [i+1][1] (i.e. current modified value\n is arr[i+1]), choose maximum from\n dp[i][0] + abs(arr[i+1] - 1) and\n dp[i][1] + abs(arr[i+1] - arr[i])*/\n dp[i + 1][1] = Math.max(dp[i][0] +\n Math.abs(arr[i + 1] - 1),\n dp[i][1] + Math.abs(arr[i + 1]\n - arr[i]));\n }\n\n return Math.max(dp[N - 1][0], dp[N - 1][1]);\n }", "public int maxSubArray(int[] nums) {\n if (nums.length == 0) return 0;\n int maxSum = nums[0];\n int sum = maxSum;\n for (int i = 1; i < nums.length; i++) {\n sum += nums[i];\n if (nums[i] > sum) {\n sum = nums[i];\n }\n if (sum > maxSum) {\n maxSum = sum;\n }\n }\n return maxSum;\n\n }", "int maxLen(int arr[], int n) \n {\n \tHashMap< Integer,Integer> map =new HashMap<Integer, Integer>();\n \t\n \t//set zero's as -1\n \tfor(int i= 0; i<n;i++)\n \t{\n \t\tif(arr[i]== 0){arr[i] = -1;}\n \t}\n \t\n \tint sum =0, maxLen =0;\n \t\n \tfor(int i= 0; i<n;i++)\n \t{\n \t\tsum += arr[i];\n \t\tif(sum == 0)\n \t\t{\n \t\t\tmaxLen = i+1;\n \t\t} \n \t\t\n \t\tif(map.containsKey(sum))\n \t\t{ maxLen = Math.max(maxLen, (i -map.get(sum))); \n \t\t}\n \t\telse{ map.put(sum, i);}\n \t}\n \t\n \treturn maxLen;\n }", "int maxSum(int[] arr){\n\t\tint sum=0;\n\t\tint arrayMin = findMin(arr);\n\t\tfor (int i=0; i<arr.length; i++) {\n\t\t\tif (arr[i] != arrayMin) {\n\t\t\t\tsum += arr[i];\n\t\t\t}\n\t\t}\n\t\treturn sum;\n\t}", "public static int maxSumOfAdjancentElementsSubArray( int[] array ) {\n\t\tassertThat( array ).isNotNull();\n\n\t\tint arrLength = array.length;\n\n\t\tif( arrLength == 0 )\n\t\t\treturn 0;\n\t\tif( arrLength == 1 )\n\t\t\treturn array[0];\n\n\t\tint maximumSum = array[0];\n\t\tfor( int i = 1; i < arrLength; i++ ) {\n\n\t\t\tarray[i] = Math.max( array[i - 1] + array[i], array[i] );\n\t\t\tmaximumSum = maximumSum > array[i] ? maximumSum : array[i];\n\t\t}\n\n\t\treturn maximumSum;\n\t}", "public int maxSubArraySum(int[] nums) {\n int maxSoFar = 0;\n int maxEndingHere = 0;\n\n for (int i = 0; i < nums.length; i++) {\n maxEndingHere = maxEndingHere + nums[i];\n if (maxEndingHere > maxSoFar)\n maxSoFar = maxEndingHere;\n if (maxEndingHere < 0)\n maxEndingHere = 0;\n }\n return maxSoFar;\n }", "public static int maxSubArrayO1(int[] nums) {\n int maxSum=nums[0];\n int sum=nums[0];\n for(int i=1;i<nums.length;i++){\n sum=sum+nums[i];\n sum=Math.max(sum,nums[i]);\n maxSum= Math.max(sum,maxSum);\n }\n return maxSum;\n }", "public int maxSubArray3(int[] nums) {\n int length = nums.length;\n //dp[i]表示数组开始索引为i的子数组的和\n int[] dp = new int[length];\n int max = nums[0] - 1;\n for (int i = 0; i < length; i++) {\n for (int j = i; j < length; j++) {\n int sum = dp[i] + nums[j];\n dp[i] = sum;\n if (max < sum) {\n max = sum;\n }\n }\n }\n return max;\n }", "static int[] maxSubarray(int[] arr) {\n int n=arr.length;\n int t[]=new int[n];\n for(int i=0;i<arr.length;i++)\n {\n t[i]=arr[i];\n if(i==0)\n {\n\n }\n else\n {\n if(arr[i-1]<0)\n {\n\n }\n else\n {\n arr[i]+=arr[i-1];\n }\n\n }\n }\n Arrays.sort(arr);\n int res[]=new int[2];\n res[0]=arr[n-1];\n res[1]=0;\n Arrays.sort(t);\n int sum=0;\n for(int i=(n-1);i>-1;i--)\n {\n if( t[i]<0)\n {\n \n if(i==(n-1))\n {\n res[1]=t[n-1];\n break;\n\n }\n \n }\n else\n {\n if(t[i]>0)\n {\n res[1]+=t[i];\n //System.out.println(t[i]);\n\n\n }\n else\n {\n break;\n }\n }\n }\n System.out.println(\"Sub array sum is: \"+res[0]+\"\\n\"+\"Subsequence of array: \"+res[1]);\n //res[1]=-112;\n return res;\n }", "public static int maxSubArray(int[] nums) {\n int[] max_subarray= new int[nums.length];\n int max_sum=0;\n max_subarray[0]=nums[0];\n for (int i=1;i<nums.length;i++){\n max_subarray[i]=Math.max(max_subarray[i-1]+nums[i],nums[i]);\n max_sum=Math.max(max_subarray[i],max_sum);\n }\n System.out.println(Arrays.toString(max_subarray));\n return max_sum;\n }", "private int FindMaxSum(int[] arr, int length) {\r\n\t\t\r\n\t\tint incl = arr[0];\r\n\t\tint excl = 0;\r\n\t\tint excl_new = 0;\r\n\t\t\r\n\t\tfor(int i = 1;i<arr.length;i++)\r\n\t\t{\r\n\t\t\texcl_new = (incl > excl) ? incl : excl;\r\n\t\t\t \r\n /* current max including i */\r\n incl = excl + arr[i];\r\n excl = excl_new;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn excl>incl?excl:incl;\r\n\t}", "private static int maximumSubarray(int[] array) {\n\t\tint max = array[0];\n for (int i = 0; i < array.length; i++)\n {\n int sum = 0;\n for (int j = i; j < array.length; j++)\n {\n sum += array[j];\n if (sum > max)\n max = sum;\n }\n }\n return max; \n\t}", "static\nint\nfindMaxSum(\nint\n[]arr, \nint\nn) \n\n{ \n\n\n// Array to store prefix sum. \n\nint\n[]preSum = \nnew\nint\n[n]; \n\n\n// Array to store suffix sum. \n\nint\n[]suffSum = \nnew\nint\n[n]; \n\n\n// Variable to store maximum sum. \n\nint\nans = \nint\n.MinValue; \n\n\n// Calculate prefix sum. \n\npreSum[0] = arr[0]; \n\nfor\n(\nint\ni = 1; i < n; i++) \n\npreSum[i] = preSum[i - 1] + arr[i]; \n\n\n// Calculate suffix sum and compare \n\n// it with prefix sum. Update ans \n\n// accordingly. \n\nsuffSum[n - 1] = arr[n - 1]; \n\n\nif\n(preSum[n - 1] == suffSum[n - 1]) \n\nans = Math.Max(ans, preSum[n - 1]); \n\n\nfor\n(\nint\ni = n - 2; i >= 0; i--) \n\n{ \n\nsuffSum[i] = suffSum[i + 1] + arr[i]; \n\n\nif\n(suffSum[i] == preSum[i]) \n\nans = Math.Max(ans, preSum[i]); \n\n} \n\n\nreturn\nans; \n\n}", "public static int getMax(int arr[], int n)\n {\n int mx = arr[0];\n for (int i = 1; i < n; i++)\n {\n if (arr[i] > mx)\n {\n mx = arr[i];\n }\n }\n return mx;\n }", "public static int jKadaneAlgo(int A[], int n)\n\t{\n\t\t // initialize variables as first value in array\n\t\t int currentMax=A[0]; \n\t\t int maxSubarray=A[0]; \n\t\t for(int i=1; i<n; i++) \n\t\t { \n\t\t\t //compare the first element of array with the sum of first element of array and the iterating value of array\n\t\t\t currentMax=Math.max(A[i],(currentMax+A[i])); \n\t\t\t //keep updating the maxSubarray with highest value by comparing currentMax and maxSubArray\n\t\t\t maxSubarray=Math.max(maxSubarray,currentMax); \n\t\t }\n\t\t return maxSubarray;\n\t}", "static int maxSum()\n {\n // Find array sum and i*arr[i] with no rotation\n int arrSum = 0; // Stores sum of arr[i]\n int currVal = 0; // Stores sum of i*arr[i]\n for (int i=0; i<arr.length; i++)\n {\n arrSum = arrSum + arr[i];\n currVal = currVal+(i*arr[i]);\n }\n\n // Initialize result as 0 rotation sum\n int maxVal = currVal;\n\n // Try all rotations one by one and find\n // the maximum rotation sum.\n for (int j=1; j<arr.length; j++)\n {\n currVal = currVal + arrSum-arr.length*arr[arr.length-j];\n if (currVal > maxVal)\n maxVal = currVal;\n }\n\n // Return result\n return maxVal;\n }", "static void miniMaxSum(int[] arr) {\n Arrays.sort(arr);\n long sum = 0;\n for (int i : arr) {\n sum += i;\n }\n System.out.println((sum - arr[4]) + \" \" + (sum - arr[0]));\n }", "private static int maxConti(int[] arr) {\n\t\tint sum=0;\n\t\tint maxValue=arr[0];\n\t\tint start=0;int end=0;\n\t\tfor(int i=0;i<arr.length;i++)\n\t\t{ \n\t\t\tsum=Math.max(sum+arr[i], arr[i]);\n\t\t\t\n\t\t\t\n\t\t\tmaxValue=Math.max(maxValue,sum);\n\t\t\t\n\t\t}\n\t\tSystem.out.println(start+\" \"+end);\n\t\treturn maxValue;\n\t}", "public static int maxSubsetSumNoAdjacent(int[] array) {\n\t\tint[] solution = array.clone();\n\t\t\n\t\t//edge cases\n\t\tif(array.length ==0){\n\t\t\treturn 0;\n\t\t}else if(array.length==1){\n\t\t\treturn array[0];\n\t\t}\n\t\t//base case\t\t\n\t\tsolution[1] = Math.max(array[0], array[1]);\n\t\t//Dynamic programming implemntation\n\t\tfor(int i=2; i< array.length; i++){\n\t\t\tsolution[i] = Math.max((solution[i-2] + array[i]), solution[i-1]);\n\t\t\t\n\t\t}\n return solution[array.length-1];\n }", "static int getMaxCoinValGeeks(int arr[], int n)\n {\n // Create a table to store solutions of subproblems\n int table[][] = new int[n][n];\n int gap, gapStartIndx, gapEndIndx, x, y, z;\n\n // Fill table using above recursive formula.\n // Note that the tableis filled in diagonal\n // fashion (similar to http://goo.gl/PQqoS),\n // from diagonal elements to table[0][n-1]\n // which is the result.\n for (gap = 0; gap < n; ++gap)\n {\n // both gapStartIndx and gapEndIndx are incremented in each loop iteration\n // for each gap, gapStartIndx keeps moving\n // gapEndIndx is always gap more than the gapStartIndx\n // when gap == 0, gapStartIndx = gapEndIndx\n // table[i,j] identifies the max value obtained by the player who picks first\n // first player = i to get val[i] , range of coins left = i+1, j\n // second player max value = table[i+1,j], range of coins left = i+2, j\n // first player max value = table[i+2,j]. So total value for player 1 is\n // val[i] + table[i+2, j]\n // first player picks j to get val[j], range of coins left i, j-1.\n // second player max = table[i, j-1] range of coins left i, j-2\n // first player max = table[i,j-2]\n // so for finding max value for a p\n for (gapStartIndx = 0, gapEndIndx = gap; gapEndIndx < n; ++gapStartIndx, ++gapEndIndx)\n {\n // Here x is value of F(i+2, j),\n // y is F(i+1, j-1) and z is\n // F(i, j-2) in above recursive formula\n // if gapStartIndx and gapEndIndx are two or more apart\n x = ((gapStartIndx + 2) <= gapEndIndx) ? table[gapStartIndx + 2][gapEndIndx] : 0;\n y = ((gapStartIndx + 1) <= (gapEndIndx - 1)) ? table[gapStartIndx +1 ][gapEndIndx - 1] : 0;\n z = (gapStartIndx <= (gapEndIndx - 2)) ? table[gapStartIndx][gapEndIndx - 2]: 0;\n\n table[gapStartIndx][gapEndIndx] = Math.max(arr[gapStartIndx] +\n Math.min(x, y), arr[gapEndIndx] +\n Math.min(y, z));\n }\n }\n\n return table[0][n - 1];\n }", "public int[] solution(int N, int[] A) {\n int maxSum = 0, max = 0;\n int[] resultArr = new int[N];\n for (int a : A) {\n if (1 <= a && a <= N) {\n // 모든 값에 적용 되어야 하는 maxSum 값보다 작으면, maxSum 값이 적용되지 않은 것이다.\n // 이 경우, maxSum 값을 적용 하고, +1 값을 해준다.\n // 그 외의 경우, 현 값에 +1 만 해주면 된다.\n if (resultArr[a - 1] < maxSum) {\n resultArr[a - 1] = (maxSum + 1);\n } else {\n resultArr[a - 1] += 1;\n }\n // 현 resultArr 배열 에서의 최대값 max 를 구한다\n if (max < resultArr[a - 1]) {\n max = resultArr[a - 1];\n }\n } else if (a == N + 1) {\n // 모든 resultArr 에 적용 되어야 하는 maxSum 값으로 적용 시킨다\n maxSum = max;\n }\n }\n // result[i] 가 maxSum 값 미만 이라는 것은, 위에서 해당 index 에 maxSum 값을 반영 해주지 않았음 을 의미(+변화가 없었음)\n // 해당 index 에 maxSum 값을 반영 해주면 된다.\n for (int i = 0; i < resultArr.length; i++) {\n if (resultArr[i] < maxSum) {\n resultArr[i] = maxSum;\n }\n }\n return resultArr;\n }", "static ArrayList<Integer> subarraySum(int[] arr, int n, int s) {\n ArrayList<Integer> res = new ArrayList<>();\n int i = 0;\n int j = 1;\n int sum = arr[0];\n while(i < n) {\n if(sum < s && j < n) {\n sum += arr[j++];\n }\n else if(sum == s) {\n res.add(i + 1);\n res.add(j);\n return res;\n }\n else {\n sum -= arr[i++];\n }\n }\n res.add(-1);\n return res;\n }", "public int maxSubArray(int[] nums) {\n int maxValue = Integer.MIN_VALUE;\n int currentSum = 0;\n for(int i = 0; i < nums.length;i++){\n currentSum = Math.max(currentSum + nums[i],nums[i]);\n maxValue = Math.max(maxValue,currentSum);\n }\n return maxValue;\n }", "public int maxSubarraySumCircular(int[] A) {\n \n int n = (A == null) ? 0 : A.length;\n if (n == 0) return 0;\n \n int[] cumSum = new int[n]; // cumulative sum for A[0:i] inclusive\n int cSum = 0;\n for (int i = 0; i < n; i++) {\n cSum += A[i];\n cumSum[i] = cSum;\n }\n \n int total = cumSum[n - 1];\n \n int cMin = 0;\n int cMax = cumSum[0];\n \n int result = Integer.MIN_VALUE;\n \n for (int i = 0; i < n; i++) {\n result = Math.max(result, cumSum[i] - cMin);\n result = Math.max(result, total - (cumSum[i] - cMax));\n \n cMin = Math.min(cMin, cumSum[i]);\n cMax = Math.max(cMax, cumSum[i]);\n }\n \n return result;\n \n }", "public static int maxSumForConsecutiveElements(int[] array, int k) {\r\n int length = array.length;\r\n\r\n // O(n)\r\n for (int i = 0; i < length - 1; i++) {\r\n array[i + 1] += array[i];\r\n }\r\n\r\n int maxSum = 0;\r\n int startIndex = k - 1;\r\n // O(n)\r\n for (int i = startIndex; i < length; i++) {\r\n int firstElementIndex = i - startIndex;\r\n int currentSum;\r\n\r\n if (firstElementIndex == 0) {\r\n maxSum = array[i];\r\n continue;\r\n } else {\r\n currentSum = array[i] - array[firstElementIndex - 1];\r\n }\r\n\r\n if (currentSum > maxSum) {\r\n maxSum = currentSum;\r\n }\r\n }\r\n\r\n return maxSum;\r\n }", "public int sumSubarrayMins(int[] arr) {\n final int n = arr.length;\n final int[] lengths = new int[n];\n final LinkedList<Integer> monoStack = new LinkedList<>(); // storing index info.\n\n int p = 0;\n while (p < n) {\n if (monoStack.isEmpty()) {\n monoStack.addLast(p++);\n continue;\n }\n\n final int num = arr[p];\n while (!monoStack.isEmpty() && arr[monoStack.peekLast()] > num) {\n final int idx = monoStack.pollLast();\n lengths[idx] = p - idx;\n }\n monoStack.addLast(p++);\n }\n\n while (!monoStack.isEmpty()) {\n final int idx = monoStack.poll();\n lengths[idx] = p - idx;\n }\n\n long result = 0L;\n final long modulo = 1_000_000_007L;\n \n final int[] times = new int[n];\n Arrays.fill(times, 1);\n for (int i = 0; i < n; i++) {\n final long time = times[i];\n final int len = lengths[i];\n final long num = arr[i];\n\n result = (result + num * time * len) % modulo;\n if (i + len < n) {\n times[i + len] += time;\n }\n }\n\n return (int)(result % modulo);\n }", "public int maxSubArray2(int[] nums) {\n int res = nums[0];\n int sum = nums[0];\n for (int i = 1; i < nums.length; i++) {\n sum = Math.max(nums[i], sum + nums[i]);\n res = Math.max(res, sum);\n }\n return res;\n }", "public static int example3(int[] arr) { // O(n)\r\n\t\tint n = arr.length, total = 0; // O(1)\r\n\t\tfor (int j = 0; j < n; j++) // loop from 0 to n-1 // O(n^2)\r\n\t\t\tfor (int k = 0; k <= j; k++) // loop from 0 to j\r\n\t\t\t\ttotal += arr[j];\r\n\t\treturn total;\r\n\r\n\t\t/*\r\n\t\t * Explanation: Since we have nested for loop which dominates here and it is\r\n\t\t * O(n^2) and we always take the maximum. so the answer is quadratic time O(n^2)\r\n\t\t * \r\n\t\t */\r\n\t}", "public static int solution(int[] arr) {\n int[] dp = new int[arr.length];\n dp[0] = arr[0];\n int max = Integer.MIN_VALUE;\n \n for(int i = 1; i < arr.length; i++){\n if(dp[i - 1] > 0) dp[i] = arr[i] + dp[i - 1];\n else dp[i] = arr[i];\n max = Math.max(max, dp[i]);\n }\n \n return max;\n }", "public static int maxSale(int[] arr, int m) {\n Queue<Integer> queue = new PriorityQueue<Integer>(new Comparator<Integer>(){\n @Override\n public int compare(Integer a, Integer b) {\n return b - a;\n }\n });\n // (a,b) -> (b,a));\n for(int ticket : arr) {\n queue.offer(ticket);\n }\n int sum = 0;\n while (m > 0) {\n if (queue.isEmpty()) {\n break;\n }\n int max = queue.poll();\n int top = (queue.isEmpty() ? 0 : queue.peek());\n for(; m > 0 && max >= top; m--, max--) {\n sum += max;\n }\n if (max > 0) {\n queue.offer(max);\n }\n }\n return sum;\n }", "public int maxSubArray(int[] nums) {\n if (nums == null || nums.length == 0) return 0;\n int max = Integer.MIN_VALUE, min = 0;\n int sum = 0;\n for (int i = 0; i < nums.length; i++){\n sum += nums[i];\n max = Math.max(max, sum - min);\n min = Math.min(min, sum);\n }\n return max;\n }", "public int maxSubArray(int[] nums) {\n int[] dp = new int[nums.length];\n dp[0] = nums[0];\n int res = nums[0];\n for (int i = 1; i < nums.length; i++) {\n dp[i] = nums[i] + (dp[i - 1] < 0 ? 0 : dp[i - 1]);\n res = Math.max(res, dp[i]);\n }\n return res;\n }", "public static int maxSubArray1(int[] nums) {\n if (nums == null || nums.length == 0) return 0;\n int sum = 0;\n int max = nums[0];\n for (int i = 0; i < nums.length; i++) {\n sum = 0;\n for (int j = i; j < nums.length; j++) {\n sum += nums[j];\n if (max < sum) {\n max = sum;\n }\n }\n }\n System.out.println(max);\n return max;\n }", "public int maxSubarraySumCircular(int[] A) {\n int total = 0, maxSum = -30000, curMax = 0, minSum = 30000, curMin = 0;\n for (int a :\n A) {\n curMax = Math.max(curMax + a, a);\n maxSum = Math.max(maxSum, curMax);\n curMin = Math.min(curMin + a, a);\n minSum = Math.min(minSum, curMin);\n total += a;\n }\n return maxSum > 0 ? Math.max(maxSum, total - minSum) : maxSum;\n }", "int findMaxProfit(Job arr[], int n)\n {\n // Sort jobs according to finish time\n sort(arr, arr+n, myfunction);\n\n // Create an array to store solutions of subproblems. table[i]\n // stores the profit for jobs till arr[i] (including arr[i])\n int *table = new int[n];\n table[0] = arr[0].profit;\n\n // Fill entries in M[] using recursive property\n for (int i=1; i<n; i++)\n {\n // Find profit including the current job\n int inclProf = arr[i].profit;\n int l = latestNonConflict(arr, i);\n if (l != -1)\n inclProf += table[l];\n\n // Store maximum of including and excluding\n table[i] = max(inclProf, table[i-1]);\n }\n\n // Store result and free dynamic memory allocated for table[]\n int result = table[n-1];\n delete[] table;\n\n return result;\n }", "public static int maxSubsetSumNoAdjacent( int[] array ) {\n\t\tassertThat( array ).isNotNull();\n\n\t\tif( array.length == 0 )\n\t\t\treturn 0;\n\t\tif( array.length == 1 )\n\t\t\treturn array[0];\n\n\t\tarray[1] = array[0] > array[1] ? array[0] : array[1];\n\n\t\tfor( int i = 2; i < array.length; i++ ) {\n\t\t\tint prevIndexSum = array[i - 1];\n\t\t\tint currentIdxSum = array[i - 2] + array[i];\n\n\t\t\tarray[i] = prevIndexSum > currentIdxSum ? prevIndexSum : currentIdxSum;\n\t\t}\n\n\t\treturn array[array.length - 1];\n\t}", "static void longestSubWithMaxSum(int arr[], int N)\n{\n \n // Stores the largest element\n // of the array\n int Max = Arrays.stream(arr).max().getAsInt();\n System.out.println(\"MAX \"+Max);\n System.out.println(\"ARR \"+Arrays.toString(arr));\n \n // If Max is less than 0\n if (Max < 0)\n {\n System.out.println(\"HERE \"+Max);\n // Print the largest element\n // of the array\n System.out.print(Max);\n return;\n }\n \n // Traverse the array\n for(int i = 0; i < N; i++)\n {\n \n // If arr[i] is greater\n // than or equal to 0\n if (arr[i] >= 0)\n {\n \n // Print elements of\n // the subsequence\n System.out.print(arr[i] + \" \");\n }\n }\n}", "static void miniMaxSum(int[] arr) {\n long minSum=0,maxSum=0;\n int temp=0;\n for(int k=0; k<arr.length-1; k++) {\n for(int i=0; i <arr.length-k-1;i++) {\n if(arr[i]>arr[i+1] ) {\n temp=arr[i];\n arr[i]=arr[i+1];\n arr[i+1]=temp;\n }\n }\n }\n for(int i=1;i<arr.length;i++){\n minSum+=arr[i-1];\n maxSum+=arr[i];\n }\n System.out.print(minSum+\" \"+maxSum);\n\n }", "boolean SubArraySum( int arr[] , int n , int sum ){\n HashSet<Integer> s = new HashSet<Integer>();\n int pre_sum = 0 ;\n for( int i = 0 ; i < n ; i++ ){\n pre_sum += arr[i];\n if( pre_sum == sum ) // Corner case if pre-sum is equal to sum.\n return true;\n if( s.contains(pre_sum - sum))\n return true;\n s.add(pre_sum);\n }\n return false;\n }", "public static long maximumSubarraySum(int[] nums, int k) {\n int len = nums.length;\n\n long ans = 0;\n\n Map<Integer, Integer> map = new HashMap<>();\n long sum = 0;\n for (int i = 0, j = 0; j <= len; j++) {\n if (j - i == k) {\n if (map.size() == k) {\n ans = Math.max(ans, sum);\n }\n\n int cnt = map.getOrDefault(nums[i], 0);\n if (cnt > 1) {\n map.put(nums[i], cnt - 1);\n } else {\n map.remove(nums[i]);\n }\n sum -= nums[i];\n i++;\n }\n\n if (j == len) {\n break;\n }\n\n map.put(nums[j], map.getOrDefault(nums[j], 0) + 1);\n sum += nums[j];\n }\n\n return ans;\n }", "static int countOfSubsetsOfSum(int[] arr,int sum){\n int n = arr.length;\n int[][] dp = new int[n + 1][sum + 1];\n\n for (int j = 0;j<=sum; j++){\n dp[0][j] = 0;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = 1;\n }\n\n for (int i=1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] + dp[i-1][j - arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }", "public kd kadenMaxSum(Integer [] arr){\n \n kd max = new kd();\n kd max_cur = new kd();\n kd result = new kd();\n \n for( int i =0; i<arr.length; i++ ){\n \n if(max_cur.sum < 0){\n max_cur.sum = arr[i];\n max_cur.i = i;\n max_cur.j = i;\n } else {\n max_cur.sum += arr[i];\n max_cur.j = i;\n }\n \n if(max_cur.sum>max.sum){\n max= max_cur;\n }\n System.out.println(\"Current max_cur \"+ max_cur.sum + \" max_cur.i \"+ max_cur.i + \" max_cur.j \"+ max_cur.j);\n System.out.println(\"Current max \"+ max.sum + \" max.i \"+ max.i + \" max.j \"+ max.j);\n }\n System.out.println(\"Max \"+ max.sum + \" max.i \"+ max.i + \" max.j \"+ max.j);\n result = max;\n \n return result;\n }", "private static int getHighestSum(List<? extends ISubsetSum> list, int n, int sum) {\n\t\tboolean subset[][] = new boolean[sum + 1][n + 1];\n\n\t\t// primeira coluna toda true, pois se considera que com qualquer\n\t\t// conjunto se pode obter uma somatoria de 0.\n\t\tfor (int i = 0; i <= n; i++)\n\t\t\tsubset[0][i] = true;\n\n\t\t// nenhuma somatoria é possível com nenhum elemento.\n\t\tfor (int i = 1; i <= sum; i++)\n\t\t\tsubset[i][0] = false;\n\n\t\t// Vai verificando se com aqueles elementos se obtem a sum iterada.\n\t\tfor (int i = 1; i <= sum; i++) {\n\t\t\tfor (int j = 1; j <= n; j++) {\n\t\t\t\tsubset[i][j] = subset[i][j - 1];\n\t\t\t\tif (i >= list.get(j - 1).getValue()) {\n\t\t\t\t\tsubset[i][j] = subset[i][j] || subset[i - list.get(j - 1).getValue()][j - 1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// itera sobre a ultima row de tras para frente até achar um valor true\n\t\t// e retorna a maior somatoria, tal que somatoria <= sum.\n\t\tint maxSum = 0;\n\t\tfor (int i = sum; i > 0; i--) {\n\t\t\tif (subset[i][n] == true) {\n\t\t\t\tmaxSum = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn maxSum;\n\n\t}", "int findMaxProfit(Job arr[], int n)\n {\n // Sort jobs according to finish time\n sort(arr, arr+n, myfunction);\n\n return findMaxProfitRec(arr, n);\n }", "public static int findMaxSubarray(int[] array) {\r\n\t\tint max = Integer.MIN_VALUE;\r\n//\t\tint index = 0;\r\n\t\tint currMax = 0;\r\n\t\tfor(int v : array) {\r\n\t\t\tcurrMax += v;\r\n\t\t\tif(currMax > max) {\r\n\t\t\t\tmax = currMax;\r\n\t\t\t} \r\n\t\t\tif(currMax < 0) {\r\n\t\t\t\tcurrMax = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "static int printMaxContiguousProductSubArray(int arr[]){\n\t\tint max_Ending_Here = 1, min_Ending_Here = 1, temp, max_So_Far = Integer.MIN_VALUE;\n\t\t\n\t\tfor(int i=0; i< arr.length; i++){\n\t\t\t\n\t\t\t//1. if the element inside the array is greater than 0, then going forward multiply it with old max_Ending_Here, to maintain the maximum product, \n\t\t\t//and min_Ending_Here should be one in this case.\n\t\t\t//2. \n\t\t\tif(arr[i]>0){\n\t\t\t\tmax_Ending_Here = max_Ending_Here * arr[i];\n\t\t\t\tmin_Ending_Here = Math.min(min_Ending_Here*arr[i], 1);\n\t\t\t}\n\t\t\t\n\t\t\telse if(arr[i] == 0){\n\t\t\t\tmax_Ending_Here = 1;\n\t\t\t\tmin_Ending_Here = 1;\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\t//If after all positives one negative comes then we have to make max_Ending_Here = 1, and maintain a minimum in min_Ending_Here.\n\t\t\t\t// there could be case that again one more negative comes in future to hanlde that we are using Math.max, same for above math.min\n\t\t\t\ttemp = max_Ending_Here;\n\t\t\t\tmax_Ending_Here = Math.max(min_Ending_Here*arr[i], 1);\n\t\t\t\tmin_Ending_Here = temp*arr[i];\n\t\t\t}\n\t\t\t\n\t\t\tif(max_So_Far < max_Ending_Here){\n\t\t\t\tmax_So_Far = max_Ending_Here;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn max_So_Far;\n\t\t\n\t}", "public int maxSubArray(int[] nums) {\n int maxNow = Integer.MIN_VALUE, maxEnd = 0;\n for (int i = 0; i < nums.length; i++) {\n maxEnd = maxEnd + nums[i];\n if (maxNow < maxEnd) {\n maxNow = maxEnd;\n }\n if (maxEnd < 0) {\n maxEnd = 0;\n }\n }\n return maxNow;\n\n }", "public int maxSubArray_improve(int[] nums) {\n if (nums==null || nums.length==0)\n return 0;\n int len = nums.length, res = nums[0];\n int cur = nums[0];\n for (int i = 1; i<len; i++) {\n if (cur<0)\n cur = nums[i];\n else\n cur += nums[i];\n res = Math.max(cur, res);\n }\n return res;\n }", "public static int getSum(int arr[], int n)\n{\n\tint total = 0;\n\tfor (int i = 0; i < n; i++)\n\t\ttotal += arr[i];\n\treturn total;\n}", "public static int maxSumContiniousSubArray(int[] data) {\n\t\tint[] sums = new int[data.length];\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tsum += data[i];\n\t\t\tsum = Math.max(0, sum);\n\t\t\tsums[i] = sum;\n\t\t}\n\t\treturn Arrays.stream(sums).max().getAsInt();\n\t}", "static int maxProduct(int A[], int n) {\n\t int r = A[0];\n\n\t // imax/imin stores the max/min product of\n\t // subarray that ends with the current number A[i]\n\t for (int i = 1, imax = r, imin = r; i < n; i++) {\n\t // multiplied by a negative makes big number smaller, small number bigger\n\t // so we redefine the extremums by swapping them\n\t if (A[i] < 0)\n\t {\n\t \tint temp = imax;\n\t \timax = imin;\n\t \timin = temp;\n\t \t//swap(imax, imin);\n\t }\n\n\t // max/min product for the current number is either the current number itself\n\t // or the max/min by the previous number times the current one\n\t imax = Math.max(A[i], imax * A[i]);\n\t imin = Math.min(A[i], imin * A[i]);\n\n\t // the newly computed max value is a candidate for our global result\n\t r = Math.max(r, imax);\n\t }\n\t return r;\n\t}", "private int bepaalByes(int[] arr, int n) {\r\n\t\tint tot = 0;\r\n\t\tfor (int v : arr)\r\n\t\t\ttot += v;\r\n\t\treturn (tot - n);\r\n\t}", "public static int maxSum(int[] a, int k) \n {\n PriorityQueue<Integer> pq = new PriorityQueue<>(); \n for (int x : a) \n pq.add(x); \n \n // Do k negations by removing a minimum element k times \n while (k-- > 0) \n { \n // Retrieve and remove min element \n int temp = pq.poll(); \n \n // Modify the minimum element and add back \n // to priority queue \n temp *= -1; \n pq.add(temp); \n } \n \n // Compute sum of all elements in priority queue. \n int sum = 0; \n for (int x : pq) \n sum += x; \n return sum; \n }", "public static int maxCircularSum(int[] arr) {\n\t\tint sumNotWrapping = kadane(arr);\n\n\t\t// case 2 : CE are wrapping : NCE are not wrapping\n\t\tint totalSum = 0;\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\ttotalSum += arr[i];\n\t\t\tarr[i] = -arr[i];\n\t\t}\n\n\t\tint sumNCE = kadane(arr);\n\n\t\tint sumWrapping = totalSum + sumNCE;\n\n\t\treturn Math.max(sumNotWrapping, sumWrapping);\n\t}", "int maxPathSum(int tri[][], int m, int n)\n {\n // loop for bottom-up calculation\n //i是row,j是column\n for (int i = m - 1; i >= 0; i--)\n {\n for (int j = 0; j <= i; j++)\n {\n // for each element, check both\n // elements just below the number\n // and below right to the number\n // add the maximum of them to it\n if (tri[i + 1][j] > tri[i + 1][j + 1])\n tri[i][j] += tri[i+1][j];\n else\n tri[i][j] += tri[i + 1][j + 1];\n }\n }\n\n // return the top element\n // which stores the maximum sum\n return tri[0][0];\n }", "static int subArraySum(int arr[], int sum) {\n int n = arr.length;\n int curr_sum = arr[0], start = 0, i;\n\n // Pick a starting point\n for (i = 1; i <= n; i++) {\n // If curr_sum exceeds the sum, then remove the starting elements\n while (curr_sum > sum && start < i - 1) {\n curr_sum = curr_sum - arr[start];\n start++;\n }\n\n // If curr_sum becomes equal to sum, then return true\n if (curr_sum == sum) {\n int p = i - 1;\n System.out.println(\"Sum found between indexes \" + start\n + \" and \" + p);\n return 1;\n }\n\n // Add this element to curr_sum\n if (i < n)\n curr_sum = curr_sum + arr[i];\n\n }\n\n System.out.println(\"No subarray found\");\n return 0;\n }", "public int maxSumSubmatrix(int[][] matrix, int target) {\n int row = matrix.length;\n if(row==0)return 0;\n int col = matrix[0].length;\n int m = Math.min(row,col);\n int n = Math.max(row,col);\n //indicating sum up in every row or every column\n boolean colIsBig = col>row;\n int res = Integer.MIN_VALUE;\n for(int i = 0;i<m;i++){\n int[] array = new int[n];\n // sum from row j to row i\n for(int j = i;j>=0;j--){\n int val = 0;\n TreeSet<Integer> set = new TreeSet<Integer>();\n set.add(0);\n //traverse every column/row and sum up\n for(int k = 0;k<n;k++){\n array[k]=array[k]+(colIsBig?matrix[j][k]:matrix[k][j]);\n val = val + array[k];\n //use TreeMap to binary search previous sum to get possible result \n Integer subres = set.ceiling(val-target);\n if(null!=subres){\n res=Math.max(res,val-subres);\n }\n set.add(val);\n }\n }\n }\n return res;\n}", "public int maxSubArray(int[] A) {\n if(A==null||A.length==0)\n return 0;\n int maxSub = A[0];\n int sum=A[0];\n for(int i=1;i<A.length;i++){\n if(sum<0)\n sum=0;\n sum+=A[i];\n maxSub=Math.max(maxSub,sum); \n }\n return maxSub;\n }", "public static int LongestIncreasingSubSequenceEff(int[] arr,int n){\n\n int tail[] =new int[n];\n\n tail[0] = arr[0];\n int len =1;\n\n for (int i=1;i<n;i++){\n if (arr[i]> tail[len -1]){\n tail[len] = arr[i];\n len++;\n }else {\n int c =ceilIndex(tail,0,len -1,arr[i]);\n tail[c] =arr[i];\n }\n }\n return len;\n }", "private static boolean findEqualSumSubsetBottomUp(int[] arr, int n) {\n\t\tint sum=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tsum+=arr[i];\n\t\t}\n\t\tif(sum%2==1) {\n\t\t\treturn false;\n\t\t}\n \t\treturn findEqualSumBottomUp(arr,n,sum/2);\n\t}", "public static double maxSubsequenceSum(double[] a) {\r\n\t\tdouble[] s = new double[a.length];\r\n\t\tdouble max = s[0] = a[0];\r\n\t\tfor (int i = 1; i < a.length; i++) {\r\n\t\t\ts[i] = s[i - 1] < 0 ? a[i] : s[i - 1] + a[i];\r\n\t\t\tmax = Math.max(max, s[i]);\r\n\t\t}\r\n\t\treturn max;\r\n\t}", "static boolean subSetSumProblem(int[] arr,int sum){\n// init\n int n = arr.length;\n boolean[][] dp = new boolean[n+1][sum+1];\n\n for (int j = 0;j<=sum;j++){\n dp[0][j] = false;\n }\n\n for (int i = 0;i<=n;i++){\n dp[i][0] = true;\n }\n\n for (int i = 1;i<=n;i++){\n for (int j = 1;j<=sum;j++){\n if (arr[i-1] <= j){\n dp[i][j] = dp[i-1][j] || dp[i-1][j-arr[i-1]];\n }else{\n dp[i][j] = dp[i-1][j];\n }\n }\n }\n return dp[n][sum];\n }", "public static int sumElementsUpTo(int[] arr, int n) {\n int i = 0;\n int res = 0;\n\n while (i <= n) {\n res += arr[i];\n i++;\n }\n\n return res;\n }", "public int maxSubArrayLen(int[] nums, int k) {\n if(nums == null || nums.length == 0) {\n return 0;\n }\n int maxLength = 0;\n int[] sums = new int[nums.length];\n sums[0] = nums[0];\n HashMap<Integer, Integer> map = new HashMap<>();\n map.put(sums[0], 0);\n for(int i = 1; i < nums.length; i++) {\n sums[i] = sums[i - 1] + nums[i];\n map.put(sums[i], i);\n if(sums[i] == k && i + 1 > maxLength) {\n maxLength = i + 1;\n }\n Integer index = map.get(sums[i] - k);\n if(index == null) {\n continue;\n }\n int length = i - index; // length = i - (index + 1) + 1 = i - index\n if(length > maxLength) {\n maxLength = length; \n }\n }\n return maxLength;\n }", "public static int ArrayMax(int[] A, int n){\r\n int temp,max;\r\n // Se guarda el ultimo valor del arreglo\r\n max = A[n];\r\n \r\n if (n != 0){\r\n // Se almacena la siguiente posicion en temp\r\n temp = ArrayMax(A,n-1);\r\n // Si temp es mayopr entonces es el actual maximo\r\n if (temp > max){\r\n max = temp;\r\n }\r\n }\r\n return max;\r\n }", "private static int maxSubArrayGolden(int[] nums) {\n if (nums == null || nums.length == 0) {\n return 0;\n }\n // in case the result is negative.\n int max = Integer.MIN_VALUE;\n int sum = 0;\n for (int num : nums) {\n sum += num;\n max = Math.max(sum, max);\n sum = Math.max(sum, 0);\n }\n return max;\n }", "public static int maxSubArrayLen(int[] nums, int k) {\n Map<Integer, Integer> map = new HashMap<>();\n int sum = 0, maxLen = 0;\n for (int i = 0; i < nums.length; i++) {\n sum += nums[i];\n\n if (!map.containsKey(sum)) {\n map.put(sum, i);\n }\n\n if (sum == k) {\n maxLen = i + 1;\n } else {\n int diff = sum - k;\n if (map.containsKey(diff)) {\n maxLen = Math.max(maxLen, i - map.get(diff));\n }\n }\n }\n return maxLen;\n }", "static ArrayList<Integer> subarraySum(int[] arr, int n, int S){\r\n \r\n ArrayList<Integer> list = new ArrayList<>();\r\n \r\n int first = 0;\r\n int last = 0;\r\n int sum = 0;\r\n \r\n while(last < n || first < n){\r\n \r\n if(sum < S && last < n){\r\n sum = sum + arr[last]; \r\n ++last;\r\n }\r\n else if(sum == S){\r\n list.add(first+1);\r\n list.add(last);\r\n return list;\r\n }\r\n else if(first < n){\r\n sum = sum - arr[first];\r\n ++first;\r\n }\r\n }\r\n \r\n if(list.isEmpty()){\r\n list.add(-1);\r\n }\r\n return list;\r\n \r\n }", "public int arraySum(int[] array, int n) {\n\t\tif (n == 0) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn arraySum(array, n - 1) + array[n - 1];\n\t\t}\n\t}", "public static int kadaneMaxSumPrintRange(int[] nums) {\n if(nums == null || nums.length == 0) return -1;\n\n int maxSoFar = 0, maxEndingHere = 0, maxStartIdx = 0, maxEndIdx = 0, start = 0;\n for(int i = 0; i < nums.length; i++) {\n maxEndingHere += nums[i];\n\n if(maxEndingHere < 0) {\n maxEndingHere = 0;\n start = i + 1;\n } else if(maxSoFar < maxEndingHere) {\n maxSoFar = maxEndingHere;\n maxStartIdx = start;\n maxEndIdx = i;\n }\n }\n\n System.out.format(\"kadane maxSubarray start at %d, end at %d\\n\", maxStartIdx, maxEndIdx);\n System.out.println(\"kadane the maxsum is \" + maxSoFar);\n return maxSoFar;\n }", "public static int maxSumSubSequence(int[] d) {\n\t\tint[] sum = new int[d.length];\n\t\tfor (int i = 0; i < d.length; i++) {\n\t\t\tsum[i] = d[i];\n\t\t}\n\t\tfor (int i = 1; i < d.length; i++) {\n\t\t\tfor (int j = 0; j < i; j++) {\n\t\t\t\tif (d[j] < d[i] && sum[i] < sum[j] + d[i]) {\n\t\t\t\t\tsum[i] = sum[j] + d[i];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint max = Integer.MIN_VALUE;\n\t\tfor (int i = 0; i < sum.length; i++) {\n\t\t\tmax = Math.max(max, sum[i]);\n\t\t}\n\t\treturn max;\n\t}", "static void miniMaxSum(int[] arr) {\n int min=arr[0];\n int max=0;\n long maxsum=0,minsum=0;\n for(int i:arr)\n {\n if(i<min)\n {\n min=i;\n }\n if(i>max)\n {\n max=i;\n }\n }\n for(int i:arr)\n {\n if(i==max)\n {\n max=0;\n continue;\n }\n else\n {\n minsum+=i;\n }\n }\n for(int i:arr)\n {\n if(i==min)\n {\n min=0;\n continue;\n }\n else\n {\n maxsum+=i;\n }\n }\n System.out.println(minsum+\" \"+maxsum);\n }", "public int findMax(int[] arr) {\n return 0;\n }", "private static int f(int n, int complete, int other, int[] arr) {\n if(n<=0)\n return 0;\n int res=0;\n ArrayList<Integer>list=new ArrayList<Integer>();\n for(int a:arr)\n if(a>0)\n list.add(a);\n int brr[]=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n while(brr.length!=0){\n int index=0;\n for(int i=1;i<brr.length;i++)\n if(brr[index]<brr[i])\n index=i;\n for(int i=0;i<brr.length;i++){\n if(index==i)\n brr[i]-=complete;\n else\n brr[i]-=other;\n }\n list=new ArrayList<Integer>();\n for(int a:brr)\n if(a>0)\n list.add(a);\n brr=new int[list.size()];\n for(int i=0;i<brr.length;i++)\n brr[i]=list.get(i);\n res++;\n }\n return res;\n }" ]
[ "0.82359976", "0.7934398", "0.782738", "0.7762262", "0.77063155", "0.7575972", "0.7556952", "0.7472032", "0.73915535", "0.7311645", "0.7280142", "0.7258929", "0.71641594", "0.71528137", "0.7117334", "0.71131796", "0.710812", "0.7095323", "0.7066452", "0.7055878", "0.6987471", "0.6967412", "0.6964235", "0.69623315", "0.6952263", "0.6939623", "0.69281936", "0.69188476", "0.6884419", "0.68781364", "0.68754023", "0.6864253", "0.68582964", "0.68068135", "0.6797082", "0.67967016", "0.67772585", "0.6773428", "0.6761709", "0.6748088", "0.6736887", "0.66488457", "0.66429585", "0.6640094", "0.66356516", "0.66239375", "0.65850264", "0.65547216", "0.65325856", "0.6508213", "0.6495903", "0.6478795", "0.64703774", "0.6468335", "0.64633924", "0.64549506", "0.6451976", "0.64519536", "0.6439996", "0.64201415", "0.64135796", "0.6398259", "0.6396176", "0.6392503", "0.6379078", "0.63764393", "0.63716143", "0.63592345", "0.63479865", "0.6339748", "0.633177", "0.63191867", "0.6312488", "0.6311811", "0.6304656", "0.6300284", "0.629461", "0.6282205", "0.6280418", "0.62762177", "0.6269074", "0.6238924", "0.6187529", "0.61843365", "0.61701864", "0.6160535", "0.6151175", "0.6148163", "0.614676", "0.61247915", "0.6124121", "0.6120916", "0.61176014", "0.6112779", "0.6111989", "0.6097225", "0.6092277", "0.6080707", "0.60724086", "0.605224" ]
0.80581015
1
Objects which are BaseObject just for class compatibility, not designed for handling in general BaseObject way
@ReflectionDisable public interface BaseObjectNominal extends BaseObjectNoOwnProperties { @Override @ReflectionHidden default String baseClass() { return this.getClass().getSimpleName(); } @Override default BaseProperty baseFindProperty(final BasePrimitiveString name) { return null; } @Override default BaseProperty baseFindProperty(final BasePrimitive<?> name) { return null; } @Override default BaseProperty baseFindProperty(final BasePrimitiveString name, final BaseObject stop) { return null; } @Override default BaseProperty baseFindProperty(final CharSequence name) { return null; } @Override default BaseProperty baseFindProperty(final String name) { return null; } @Override default BaseProperty baseFindProperty(final String name, final BaseObject stop) { return null; } @Override default BaseObject baseGet(final BaseObject name, final BaseObject defaultValue) { return defaultValue; } @Override default BaseObject baseGet(final BasePrimitive<?> name, final BaseObject defaultValue) { return defaultValue; } @Override @ReflectionHidden default BaseObject baseGet(final BasePrimitiveString name, final BaseObject defaultValue) { return defaultValue; } @Override default BaseObject baseGet(final CharSequence name, final BaseObject defaultValue) { return defaultValue; } @Override @ReflectionHidden default BaseObject baseGet(final String name, final BaseObject defaultValue) { return defaultValue; } @Override @ReflectionHidden default BaseObject basePrototype() { return null; } @Override @ReflectionHidden default BasePrimitiveNumber baseToNumber() { return BasePrimitiveNumber.NAN; } @Override @ReflectionHidden default BasePrimitiveString baseToString() { return Base.forString(this.toString()); } @Override @ReflectionHidden default Object baseValue() { return this; } @Override default ExecStateCode vmPropertyRead(final ExecProcess ctx, final BaseObject name, final BaseObject defaultValue, final ResultHandler store) { return store.execReturn(ctx, defaultValue); } @Override default ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitive<?> name, final BaseObject defaultValue, final ResultHandler store) { return store.execReturn(ctx, defaultValue); } @Override @ReflectionHidden default ExecStateCode vmPropertyRead(final ExecProcess ctx, final BasePrimitiveString name, final BaseObject defaultValue, final ResultHandler store) { return store.execReturn(ctx, defaultValue); } @Override default ExecStateCode vmPropertyRead(final ExecProcess ctx, final CharSequence name, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) { return store.execReturn(ctx, defaultValue); } @Override default ExecStateCode vmPropertyRead(final ExecProcess ctx, final int index, final BaseObject originalIfKnown, final BaseObject defaultValue, final ResultHandler store) { return store.execReturn(ctx, defaultValue); } @Override default ExecStateCode vmPropertyRead(final ExecProcess ctx, final String name, final BaseObject defaultValue, final ResultHandler store) { return store.execReturn(ctx, defaultValue); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface BaseObject {\n}", "Object getBase();", "public abstract Object getUnderlyingObject();", "@Override\n public Class<Object> getObjectType() {\n return Object.class;\n }", "private static interface WithObjectOverrides {\n\n public boolean equals(Object obj);\n\n public int hashCode();\n\n public String toString();\n }", "ObjectRealization createObjectRealization();", "@Override\n public boolean isObject() {\n return false;\n }", "public void setupConvenienceObjects();", "public BaseObject()\n\t {\n\t className=\"BaseObject\";\n\t objectName=\"default object\";\n\t }", "default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }", "public T caseBase(Base object) {\n\t\treturn null;\n\t}", "public abstract String getObjectType();", "public TransferableObject(ObjBase obj) {\n this.obj = obj;\n }", "public Object getObject() ;", "@Override\n protected void checkSubclass() {\n }", "public abstract B zzt(Object obj);", "@Override\r\n\tprotected void ResetBaseObject() {\r\n\t\tsuper.ResetBaseObject();\r\n\r\n\t\t// new Base Object\r\n\t\tbaseEntity = new Chooseval();\r\n\r\n\t\t// new other Objects and set them into Base object\r\n\r\n\t\t// refresh Lists\r\n\t\tbaseEntityList = ChoosevalService.FindAll(\"id\", JPAOp.Asc);\r\n\t}", "public abstract void mo1184a(Object obj);", "public void testObjectSuperclassOfInterface() throws NoSuchMethodException {\n assertEquals(Object.class, GenericTypeReflector.getExactSuperType(ArrayList.class, Object.class));\n assertEquals(Object.class, GenericTypeReflector.getExactSuperType(List.class, Object.class));\n assertEquals(Object.class, GenericTypeReflector.getExactSuperType(String[].class, Object.class));\n }", "private SingleObject(){}", "Object getObject();", "Object getObject();", "Object getObject();", "Object getObject();", "public Object getObject();", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "public abstract org.omg.CORBA.Object read_Object();", "BoundObject(){}", "public ObjectUtils() {\n super();\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "public interface Object {\n\n /**\n * Checks whether this object is an instance of a class that\n * implements the given interface.\n *\n * @param repositoryIdentifier the interface to check against\n * @return <code>true</code> if this object reference is an instance of a class that implements\n * the interface; <code>false</code> otherwise\n */\n boolean _is_a(String repositoryIdentifier);\n\n\n /**\n * Determines whether the two object references are equivalent,\n * so far as the ORB can easily determine. Two object references are equivalent\n * if they are identical. Two distinct object references which in fact refer to\n * the same object are also equivalent. However, ORBs are not required\n * to attempt determination of whether two distinct object references\n * refer to the same object, since such determination could be impractically\n * expensive.\n *\n * @param other the other object reference with which to check for equivalence\n * @return <code>true</code> if this object reference is known to be equivalent to the given\n * object reference. Note that <code>false</code> indicates only that the two object references\n * are distinct, not necessarily that they reference distinct objects.\n */\n boolean _is_equivalent(org.omg.CORBA.Object other);\n\n\n /**\n * Determines whether the server object for this object reference has been\n * destroyed.\n *\n * @return <code>true</code> if the ORB knows authoritatively that the server object does not\n * exist; <code>false</code> otherwise\n */\n boolean _non_existent();\n\n\n /**\n * Returns an ORB-internal identifier for this object reference.\n * This is a hash identifier, which does\n * not change during the lifetime of the object reference, and so\n * neither will any hash function of that identifier change. The value returned\n * is not guaranteed to be unique; in other words, another object\n * reference may have the same hash value.\n * If two object references hash differently,\n * then they are distinct object references; however, both may still refer\n * to the same CORBA object.\n *\n * @param maximum the upper bound on the hash value returned by the ORB\n * @return the ORB-internal hash identifier for this object reference\n */\n int _hash(int maximum);\n\n\n /**\n * Returns a duplicate of this CORBA object reference.\n * The server object implementation is not involved in creating\n * the duplicate, and the implementation cannot distinguish whether\n * the original object reference or a duplicate was used to make a request.\n * <P>\n * Note that this method is not very useful in the Java platform,\n * since memory management is handled by the VM.\n * It is included for compliance with the CORBA APIs.\n * <P>\n * The method <code>_duplicate</code> may return this object reference itself.\n *\n * @return a duplicate of this object reference or this object reference itself\n */\n org.omg.CORBA.Object _duplicate();\n\n\n /**\n * Signals that the caller is done using this object reference, so\n * internal ORB resources associated with this object reference can be\n * released. Note that the object implementation is not involved in\n * this operation, and other references to the same object are not affected.\n */\n void _release();\n\n\n /**\n * Obtains an <code>InterfaceDef</code> for the object implementation\n * referenced by this object reference.\n * The <code>InterfaceDef</code> object\n * may be used to introspect on the methods, attributes, and other\n * type information for the object referred to by this object reference.\n *\n * @return the <code>InterfaceDef</code> object in the Interface Repository which provides type\n * information about the object referred to by this object reference\n */\n org.omg.CORBA.Object _get_interface_def();\n\n\n /**\n * Creates a <code>Request</code> instance for use in the\n * Dynamic Invocation Interface.\n *\n * @param operation the name of the method to be invoked using the <code>Request</code> instance\n * @return the newly-created <code>Request</code> instance\n */\n Request _request(String operation);\n\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, and container\n * for the method's return value.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result);\n\n /**\n * Creates a <code>Request</code> instance initialized with the\n * given context, method name, list of arguments, container\n * for the method's return value, list of possible exceptions,\n * and list of context strings needing to be resolved.\n *\n * @param ctx a <code>Context</code> object containing a list of properties\n * @param operation the name of the method to be invoked\n * @param arg_list an <code>NVList</code> containing the actual arguments to the method being\n * invoked\n * @param result a <code>NamedValue</code> object to serve as a container for the method's return\n * value\n * @param exclist an <code>ExceptionList</code> object containing a list of possible exceptions\n * the method can throw\n * @param ctxlist a <code>ContextList</code> object containing a list of context strings that need\n * to be resolved and sent with the <code>Request</code> instance\n * @return the newly-created <code>Request</code> object\n * @see Request\n * @see NVList\n * @see NamedValue\n * @see ExceptionList\n * @see ContextList\n */\n\n Request _create_request(Context ctx,\n String operation,\n NVList arg_list,\n NamedValue result,\n ExceptionList exclist,\n ContextList ctxlist);\n\n\n /**\n * Returns the <code>Policy</code> object of the specified type\n * which applies to this object.\n *\n * @param policy_type the type of policy to be obtained\n * @return A <code>Policy</code> object of the type specified by the policy_type parameter\n * @throws org.omg.CORBA.BAD_PARAM when the value of policy type is not valid either because the\n * specified type is not supported by this ORB or because a policy object of that type is not\n * associated with this Object\n */\n Policy _get_policy(int policy_type);\n\n\n /**\n * Retrieves the <code>DomainManagers</code> of this object.\n * This allows administration services (and applications) to retrieve the\n * domain managers, and hence the security and other policies applicable\n * to individual objects that are members of the domain.\n *\n * @return the list of immediately enclosing domain managers of this object. At least one domain\n * manager is always returned in the list since by default each object is associated with at least\n * one domain manager at creation.\n */\n DomainManager[] _get_domain_managers();\n\n\n /**\n * Returns a new <code>Object</code> with the given policies\n * either replacing any existing policies in this\n * <code>Object</code> or with the given policies added\n * to the existing ones, depending on the value of the\n * given <code>SetOverrideType</code> object.\n *\n * @param policies an array of <code>Policy</code> objects containing the policies to be added or\n * to be used as replacements\n * @param set_add either <code>SetOverrideType.SET_OVERRIDE</code>, indicating that the given\n * policies will replace any existing ones, or <code>SetOverrideType.ADD_OVERRIDE</code>,\n * indicating that the given policies should be added to any existing ones\n * @return a new <code>Object</code> with the given policies replacing or added to those in this\n * <code>Object</code>\n */\n org.omg.CORBA.Object _set_policy_override(Policy[] policies,\n SetOverrideType set_add);\n\n\n}", "public interface DerivedType extends EObject {\r\n}", "protected abstract Object createObjectInternal(ObjectInformation objectInformation) throws FillingException;", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "Object defaultReplaceObject(Object obj) throws IOException {\n\t logger.log(Level.FINEST, \"Object in stream instance of: {0}\", obj.getClass());\n\t try {\n\t\tif (obj instanceof DynamicProxyCodebaseAccessor ){\n\t\t logger.log(Level.FINEST, \"Object in stream instance of DynamicProxyCodebaseAccessor\");\n\t\t obj = \n\t\t ProxySerializer.create(\n\t\t\t (DynamicProxyCodebaseAccessor) obj,\n\t\t\t aout.defaultLoader,\n\t\t\t aout.getObjectStreamContext()\n\t\t );\n\t\t} else if (obj instanceof ProxyAccessor ) {\n\t\t logger.log(Level.FINEST, \"Object in stream instance of ProxyAccessor\");\n\t\t obj = \n\t\t ProxySerializer.create(\n\t\t\t (ProxyAccessor) obj,\n\t\t\t aout.defaultLoader,\n\t\t\t aout.getObjectStreamContext()\n\t\t );\n\t\t}\n\t } catch (IOException e) {\n\t\tlogger.log(Level.FINE, \"Unable to create ProxyAccessorSerializer\", e);\n\t\tthrow e;\n\t }\n\t Class c = obj.getClass();\n\t Class s = serializers.get(c);\n\t if (c.isAnnotationPresent(AtomicSerial.class)){} // Ignore\n\t else if (c.isAnnotationPresent(AtomicExternal.class)){} // Ignore\n\t // REMIND: stateless objects, eg EmptySet?\n\t else if (s != null){\n\t\ttry {\n\t\t Constructor constructor = s.getDeclaredConstructor(c);\n\t\t obj = constructor.newInstance(obj);\n\t\t} catch (NoSuchMethodException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (SecurityException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (InstantiationException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (IllegalAccessException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (IllegalArgumentException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t} catch (InvocationTargetException ex) {\n\t\t logger.log(Level.FINE, \"Unable to contruct serializer\", ex);\n\t\t}\n\t }\n\t else if (obj instanceof Map) obj = new MapSerializer((Map) obj);\n\t else if (obj instanceof Set) obj = new SetSerializer((Set) obj);\n\t else if (obj instanceof Collection) obj = new ListSerializer((Collection) obj);\n\t else if (obj instanceof Permission) obj = new PermissionSerializer((Permission) obj);\n\t else if (obj instanceof Throwable) obj = new ThrowableSerializer((Throwable) obj);\n\t logger.log(Level.FINEST, \"Returning object in stream instance of: {0}\", obj.getClass());\n\t return obj;\n\t}", "void m21806b(Object obj);", "void m21808d(Object obj);", "void m21807c(Object obj);", "public Value restrictToTypeofObject() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.flags &= (~PRIMITIVE) | NULL;\n r.num = null;\n r.str = null;\n r.getters = r.setters = null;\n r.excluded_strings = r.included_strings = null;\n r.object_labels = newSet();\n if (object_labels != null)\n for (ObjectLabel objlabel : object_labels)\n if (objlabel.getKind() != Kind.FUNCTION && objlabel.getKind() != Kind.SYMBOL)\n r.object_labels.add(objlabel);\n if (r.object_labels.isEmpty())\n r.object_labels = null;\n return canonicalize(r);\n }", "void m21809e(Object obj);", "public interface ICustomObjectSerializer {\n\n\t/**\n\t * Must return true if the handler can serialize this object.\n\t * @param object\n\t * @return\n\t */\n\tpublic boolean handlesObject(Object object);\n\t\n\t/**\n\t * Must return true if the handler can deserialize objects of this type.\n\t * @param clazz\n\t * @return\n\t */\n\tpublic boolean handlesType(Class<?> clazz);\n\t\n\t/**\n\t * Serialize an object.\n\t * @param elm\n\t * @param object\n\t */\n\tpublic void serialize(Element elm, Object object) throws TransportException;\n\t\n\t/**\n\t * Deserialize an object.\n\t * @param elm\n\t * @return\n\t */\n\tpublic Object deserialize(Element elm) throws TransportException;\n\t\n}", "protected abstract Object transform(Object o);", "public abstract boolean isObject(T type);", "public abstract Object deserialize(Object object);", "@Override\n public T getObjRaiz() {\n return (super.getObjRaiz());\n }", "public interface BaseItem {\n}", "public abstract void importObj(Object obj);", "public boolean isObject() {\n\t\t// Object is the class that has itself as superclass\n\t\treturn getSuperClass() == this;\n\t}", "void m21805a(Object obj);", "public interface ObjectInfoService {\n\n ObjectInfo getSubObjectInfo(SubObjectInfoPo subObjectInfoPo);\n\n int fixObject(SubObjectInfoPo objectInfoPo);\n}", "public abstract String createObjectCopy(OwObject obj_p, OwPropertyCollection properties_p, OwPermissionCollection permissions_p, OwObject parent_p, int[] childTypes_p) throws Exception;", "public Object getObject() {\r\n/* 109 */ return this.object;\r\n/* */ }", "public abstract T create(T obj);", "private static void LessonPolymorphism() {\n Employee empOne = new Employee(\"Bob\");\n Employee empTwo = new Employee(\"Linda\", \"Belcher\");\n System.out.println(empOne.getFirstName());\n System.out.println(empTwo.getFirstName() + \" \" + empTwo.getLastName());\n // run-time polymorphism - override\n //Override a method that is in a super class in a lower class\n // Create a method in BaseBO and create the same method in Empl\n BaseBO obj1 = new BaseBO();\n System.out.println(obj1.test_method());\n\n EntityType obj2 = new EntityType();\n System.out.println(obj2.test_method());\n }", "public T caseRequestBaseType(RequestBaseType object) {\n\t\treturn null;\n\t}", "OBJECT createOBJECT();", "protected void checkSubclass() {\n }", "protected abstract DBObject getNewObject();", "private interface Base {\n\t\tString getId();\n\t\tvoid setId(String identifier);\n\t\tboolean isValid();\n\t\tvoid setValid(boolean valid);\n\t}", "public abstract Object getObservedObject();", "@Override\n public String getObjectClassName() {\n return className;\n }", "public T caseCapabilitiesBaseType(CapabilitiesBaseType object) {\n\t\treturn null;\n\t}", "Objet getObjetAlloue();", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }" ]
[ "0.7299989", "0.67274743", "0.66261464", "0.65071636", "0.62619674", "0.6254937", "0.61758584", "0.61598957", "0.6132483", "0.60619974", "0.6061099", "0.6059726", "0.60534805", "0.6033371", "0.6015994", "0.5974285", "0.5926093", "0.59131086", "0.5906998", "0.5864273", "0.5862034", "0.5862034", "0.5862034", "0.5862034", "0.58590925", "0.58499575", "0.58499575", "0.58499575", "0.5848705", "0.5841602", "0.5836545", "0.5834548", "0.5834548", "0.5834548", "0.5829445", "0.5827123", "0.5824116", "0.5793188", "0.5793188", "0.5793188", "0.5793188", "0.5793188", "0.5793188", "0.5793188", "0.5793188", "0.5793188", "0.5793188", "0.5793188", "0.5793188", "0.5793188", "0.5793188", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.57731533", "0.5769844", "0.5732468", "0.5722942", "0.57097226", "0.57003886", "0.5647518", "0.5647143", "0.56399846", "0.56318325", "0.5620627", "0.5620132", "0.5612788", "0.5611118", "0.5606063", "0.5592856", "0.5584993", "0.55649006", "0.5560798", "0.5556448", "0.5545578", "0.55446655", "0.554355", "0.55417436", "0.55285233", "0.55251366", "0.55235547", "0.5518686", "0.551606", "0.550837", "0.55015963", "0.55015963", "0.55015963" ]
0.6211212
6
TODO Autogenerated method stub get the data from the file
public static void main(String[] args) { final int K = 1; System.out.println("Reading raw data..."); List <List<Float>> data = CsvReader.read("src/mypackage/abalone.data.csv"); //choose training set and test set RandomNumberGenerator random = new RandomNumberGenerator(data.size()); int nRemaining = data.size(); // size of data int nNeeded = nRemaining / 10; // number of sample needed random.algorithm(nNeeded, nRemaining); double [] chosenData = random.getData(); //get the result //split the data into training and test set List<List<Float>> training = new ArrayList(); List<List<Float>> test = new ArrayList(); for(int i = 0; i < data.size(); i++){ // iterate through the dataset //String[] currentData = (String[])data.get(i); if(chosenData[i] != 0) training.add(data.get(i)); else test.add(data.get(i)); } System.out.println("Finished choosing training..."); float[][] trainingMatrix = UtilFunctions.listToMatrix(training); float[][] testMatrix = UtilFunctions.listToMatrix(test); double[][] trainingMatrixDouble = new double[trainingMatrix.length] [trainingMatrix[0].length]; for(int i = 0; i < trainingMatrix.length; i++){ trainingMatrixDouble[i] = floatToDouble(trainingMatrix[i]); } //do z-scaling of the training set double [] meanTrain = UtilFunctions.getMean(trainingMatrixDouble); //store the mean until column n-1 double [] sdTrain = UtilFunctions.getSD(trainingMatrixDouble); //store the SD until n-1 double [] [] normalMatrix = UtilFunctions.normalizeMatrix(trainingMatrixDouble); for(int i = 0; i < trainingMatrix.length; i++){ trainingMatrix[i] = doubleToFloat(normalMatrix[i]); } training.clear(); for(int i = 0; i < trainingMatrix.length; i++){ List<Float> temp = new ArrayList(); for(int j = 0; j < trainingMatrix[i].length; j++){ temp.add(trainingMatrix[i][j]); } training.add(temp); } System.out.println("Done z-scaling..."); KMeans kmeans = new KMeans(training, K); // create a KMeans object System.out.println("Done making Kmeans object"); kmeans.executeKMeans(); // execute the algorithm System.out.println("Done executing K-means..."); System.out.println("K used is: " + K); List<Centroid> clusters = kmeans.getClusters(); //get the resulting centroid for(int i = 0; i < clusters.size(); i++){ System.out.println("Centoid ID: " + clusters.get(i).getID()); System.out.println(clusters.get(i).getCoordinate().toString()); } double wcss = 0; //calculate the mean and standard deviation of each cluster for(int i = 0; i < clusters.size(); i++){ Centroid cluster = clusters.get(i); double[] mean = UtilFunctions.getMean(cluster.makeDoubleMatrix()); double[] SD = UtilFunctions.getSD(cluster.makeDoubleMatrix()); System.out.println("Centroid ID: " + cluster.getID()); System.out.print("Mean: "); for(int j = 0; j < mean.length; j++){ System.out.print(mean[j] + " "); } System.out.println(""); System.out.print("Standard Deviation: "); for(int j = 0; j < SD.length; j++){ System.out.print(SD[j] + " "); } System.out.println(""); } System.out.println("\nThe WCSS of this run is: " + kmeans.getWCSS()); // run linear regression K times double sum = 0; for (int i = 0; i < K; i++){ // Y = age of abalone = clusters.get(i).getMemberSize() x 1 matrix (last column of data) // X = clusters.get(i).getPointsMember() // solves for beta for each cluster // getCoordinate() returns List <Float> // X_Train Point tempPoint = (Point) clusters.get(i).getPointsMember().get(0); float[][] xFloat = new float [clusters.get(i).getMemberSize()] [tempPoint.getCoordinate().size()]; double[][] xDouble = new double [clusters.get(i).getMemberSize()] [tempPoint.getCoordinate().size()]; for(int j = 0; j < clusters.get(i).getMemberSize(); j++){ Point p = (Point) clusters.get(i).getPointsMember().get(j); for(int k = 0; k < tempPoint.getCoordinate().size() - 1; k++){ xFloat[j][k] = (float) p.getCoordinate().get(k); } } for(int j = 0; j < xFloat.length; j++){ xDouble[j] = floatToDouble(xFloat[j]); } // Y_Train double[][] yDouble = new double [clusters.get(i).getMemberSize()] [1]; for(int j = 0; j < clusters.get(i).getMemberSize(); j++){ yDouble[j][0] = xDouble[j][xDouble[0].length-1]; } SimpleMatrix xTrain = new SimpleMatrix(xDouble); SimpleMatrix yTrain = new SimpleMatrix(yDouble); // xTrain beta = yTrain -> beta = pinv(xTrain) yTrain SimpleMatrix beta = (xTrain.pseudoInverse()).mult(yTrain); //System.out.println(beta); // X_Test & Y_Test // SimpleMatrix xTest = new SimpleMatrix(xtDouble); // SimpleMatrix yTest = new SimpleMatrix(ytDouble); //sum += mean((xTest.dot(beta) - yTest)); } // RMSE // np.sqrt(np.mean(((np.dot(X_test, beta) - Y_test) + ... )** 2)) double rmse = Math.sqrt((1/K)* Math.pow(sum,2)); System.out.println("RMSE: " + (2.171512325471245 - (K*0.013))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public File getDataFile();", "public void readFromFile() {\n\n\t}", "private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t}", "private Data readFromFileData() {//Context context) {\n try {\n FileInputStream fileInputStream = openFileInput(fileNameData);\n ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);\n Data.userData = (Data) objectInputStream.readObject();\n objectInputStream.close();\n fileInputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return Data.userData;\n }", "public void getData() {\n\t\tContext context = getApplicationContext();\n\t\tint ch;\n\t\tStringBuffer fileContent = new StringBuffer(\"\");\n\t\tFileInputStream fis;\n\t\ttry {\n\t\t\tfis = context.openFileInput(filename);\n\t\t\ttry {\n\t\t\t\twhile ((ch = fis.read()) != -1)\n\n\t\t\t\t\tfileContent.append((char) ch);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tdata = new String(fileContent);\n\n\t}", "public UserInfo readData()\n\t{\n\t\t\n\t\tIterator<UserInfo> itr= iterator();\n\t\tUserInfo info;\n\t\tSystem.out.println(\"file has been read!\");\n\t\twhile(itr.hasNext()) {\n\t\t\t\n\t\t\tinfo= itr.next();\n\t\t\tif( info.getUrl().equalsIgnoreCase(file)) {\n\t\t\t\t\n\t\t\t\treturn info;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unused\")\n public AppCMSPageUI getDataFromFile(String fileName) {\n StringBuilder buf = new StringBuilder();\n try {\n InputStream json = currentActivity.getAssets().open(fileName);\n BufferedReader in =\n new BufferedReader(new InputStreamReader(json, \"UTF-8\"));\n String str;\n\n while ((str = in.readLine()) != null) {\n buf.append(str);\n }\n\n in.close();\n } catch (Exception e) {\n //Log.e(TAG, \"Error getting data from file: \" + e.getMessage());\n }\n\n Gson gson = new Gson();\n\n return gson.fromJson(buf.toString().trim(), AppCMSPageUI.class);\n }", "public String getData(String fileName) {\n StringBuffer sb = new StringBuffer();\n try {\n BufferedReader br = new BufferedReader(new FileReader(fileName));\n String line = br.readLine();\n while (line != null) {\n sb.append(line).append(\"\\n\");\n line = br.readLine();\n }\n br.close();\n } catch (IOException e) {\n System.out.println(\"NO SE\");\n }\n return sb.toString();\n }", "public void getData() {\n\t\tfileIO.importRewards();\n\t\tfileIO.getPrefs();\n\t}", "private String getFileContent(){\n\t\tString employeesJsonString=\"\";\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\temployeesJsonString += sc.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t\tSystem.out.println(\"file error\");\n\t\t}\n\t\treturn employeesJsonString;\n\t}", "public String getDataFilePath() {\r\n \t\treturn dataFile;\r\n \t}", "public String FetchDataFromFile(File file) {\r\n\t\tStringBuilder sb=new StringBuilder();\r\n\t\ttry {\r\n\t\t\tScanner sc=new Scanner(file);\r\n\t\t\twhile(sc.hasNextLine()){\r\n\t\t\t\tsb.append(sc.nextLine());\r\n\t\t\t}\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "String getFile() {\n\t\treturn file;\n\t}", "@Override\n\tpublic File getFile() {\n\t\treturn file;\n\t}", "public InputData getData() throws IOException {\n\n ObjectMapper mapper = new ObjectMapper();\n return mapper.readValue(Paths.get(inFile).toFile(), InputData.class);\n }", "public void readFile();", "public String getFile()\n\t{\n\t\treturn file;\n\t}", "public String getFile()\n\t{\n\t\treturn file;\n\t}", "public byte[] getFile() {\n return file;\n }", "@JsonGetter(\"fileContent\")\r\n public String getFileContent ( ) { \r\n return this.fileContent;\r\n }", "public ImageData getImageData(File file){\n return IMAGE_DATA.get(file);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static Vector<MyData> getData(File actualFile){\n\t\tVector<MyData> data = new Vector<MyData>();\n\t\ttry {\n\t\t\tObjectInputStream in = new ObjectInputStream(new BufferedInputStream(new FileInputStream(actualFile)));\n\t\t\tdata = (Vector<MyData>)in.readObject();\n\t\t\tin.close();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\treturn data;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn data;\n\t}", "public void readData() throws FileNotFoundException {\n this.plane = readPlaneDimensions();\n this.groupBookingsList = readBookingsList();\n }", "public File getFile() {\r\n \t\treturn file;\r\n \t}", "public FileChunkReference getFileData() {\n return fileData;\n }", "public Result getFile() {\n File file = new File(\"/home/yongmu/MIDBatch.csv\");\n Scanner scanner = null;\n try {\n scanner = new Scanner(file);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while(scanner.hasNext()) {\n System.out.println(scanner.next());\n }\n return ok(file);\n }", "public File getFile() { return file; }", "public File getFile() {\n return file;\n }", "public Object leggiDati(){\n\t\ttry{\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tdati = ois.readObject();\n\t\t\tois.close();\n\t\t\tfis.close();\n\t\t\tSystem.out.println(\"File \" + file + \" letto\");\n\t\t} catch(Exception e){\n\t\t\t//e.printStackTrace();\n\t\t\tSystem.out.println(\"File \" + file + \" non trovato\");\n\t\t\treturn null;\n\t\t}\n\t\treturn dati;\n\t}", "@Override\n public int getFile() {\n return file;\n }", "public String loadFromFile() {\n StringBuilder sb = new StringBuilder();\n try {\n Log.d(\"DEBUG\", this.context.getPackageName());\n Log.d(\"DEBUG\", this.file);\n FileInputStream fis = context.openFileInput(file);\n BufferedReader br = new BufferedReader(new InputStreamReader(fis, this.encoding));\n String line;\n while(( line = br.readLine()) != null ) {\n sb.append( line );\n sb.append( '\\n' );\n }\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n return sb.toString();\n }", "@Override\n\tpublic void readData() {\n\t\t\n\t}", "public List<Stock> readFile() throws IOException\n {\n \t //System.out.println(\"hhh\");\n \t //List<Stock> listStock = mapper.readValue(file, new TypeReference<List<Stock>>() {});\n \t \n \t List<Stock> listStock = mapper.readValue(file, new TypeReference<List<Stock>>(){});\n \t\n\t\treturn listStock;\n }", "Object getRawData();", "public byte[] getFilecontent() {\n return filecontent;\n }", "@Override\n public void loadDataFromFile(File file) {\n Gson gson = new Gson();\n try {\n Scanner scanner = new Scanner(file);\n while (scanner.hasNextLine()){\n IndividualCustomer customer =\n gson.fromJson(scanner.nextLine(),IndividualCustomer.class);\n customerList.add(customer);\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "public String getFile() {\n \n // return it\n return theFile;\n }", "public File getFile()\n {\n return file;\n }", "public void GetData(String nameFile) throws IOException {\n File file = new File(nameFile);\n BufferedReader finalLoad = new BufferedReader(new FileReader(file));\n int symbol = finalLoad.read();\n int indexText = 0;\n while (symbol != -1) {\n text[indexText++] = (char) symbol;\n if (indexText >= Constants.MAX_TEXT - 1) {\n PrintError(\"to mach size of file\".toCharArray(), \"\".toCharArray());\n break;\n }\n symbol = finalLoad.read();\n }\n text[indexText++] = '\\n';\n text[indexText] = '\\0';\n finalLoad.close();\n //System.exit(1);\n }", "private String getDataFromClassResourceFile(String file) {\n\n StringBuffer sb = new StringBuffer();\n String str = \"\";\n\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(file);\n try {\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n if (is != null) {\n while ((str = reader.readLine()) != null) {\n sb.append(str + \"\\n\");\n }\n }\n } catch (IOException ioe) {\n ioe.printStackTrace();\n } finally {\n try {\n is.close();\n } catch (Throwable ignore) {\n }\n }\n return sb.toString();\n\n }", "File getFile() { return user_file; }", "@Override\n public String getData(File file) throws Exception {\n String data;\n FileInputStream fis = null;\n try {\n if (file == null) {\n // ex. if site root url returns something else than 200 (ex. 403)\n return \"\"; // else cleaner.clean(siteRootFile) throws NullPointerException\n }\n fis = new FileInputStream(file);\n StringBuilder dataBuffer = new StringBuilder();\n int c;\n while ((c = fis.read()) != -1) {\n dataBuffer.append((char) c);\n }\n data = dataBuffer.toString();\n }\n catch (Exception e) {\n data = null;\n }\n finally {\n if (fis != null) {\n fis.close();\n }\n }\n return data;\n }", "public File getFile() {\n return file;\n }", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void readData() {\n try (BufferedReader br = new BufferedReader(new InputStreamReader(getClass().getClassLoader().getResourceAsStream(fileName)))) {\n String line;\n while ((line = br.readLine()) != null) {\n String[] parts = line.split(\",\");\n int zip = Integer.parseInt(parts[0]);\n String name = parts[1];\n\n zipMap.put(zip, name);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public ByteBuffer getFileData() {\n\t\treturn fileData;\n\t}", "public File getFile() {\n return _file;\n }", "private void fileRead(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// create file\n\t\t\tFile file = new File(path);\n\t\t\tFileInputStream fileStream = new FileInputStream(file);\n\t\t\t\n\t\t\t// data read\n\t\t\tthis.dataContent = new byte[(int)file.length()];\n\t\t\tint ret = fileStream.read(this.dataContent, 0, (int)file.length());\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"File Not Found : \" + e.getMessage());\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed File Read : \" + e.getMessage());\n\t\t}\n\t\t\n\t}", "public String getRecordFile();", "@Override\n\t// read registration records from dataFile\n\tpublic synchronized Info readInfoFromFile(){\n\t\tInfo new_StudInfo = null;\n\t\ttry{\n\t\t\t\tString newLine = br.readLine();\t// read a line from file\n\t\t\t\tif(newLine!=null){\n\t\t\t\t\t// split a record into 3 strings and an integer\n\t\t\t\t\tregInfoLine = newLine.split(\" \");\t\n\t\t\t\t\tnew_StudInfo = new StudentInfo(\n\t\t\t\t\t\t\t\t\t\tregInfoLine[0],\n\t\t\t\t\t\t\t\t\t\tregInfoLine[1],\n\t\t\t\t\t\t\t\t\t\tregInfoLine[2],\n\t\t\t\t\t\t\t\t\t\t(Integer.parseInt(regInfoLine[3])));\n\t\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t\tSystem.exit(1);\n\t\t}\n\t\treturn new_StudInfo;\n\t}", "private void get_text() {\n InputStream inputStream = JsonUtil.class.getClassLoader().getResourceAsStream(\"data.txt\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));\n StringBuilder sb = new StringBuilder();\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n sb.append(line);\n }\n } catch (Exception e) {\n e.printStackTrace();\n System.out.println(e.getMessage());\n }\n this.text = sb.toString().trim();\n }", "@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}", "public String file() {\n return this.file;\n }", "public static void demoReadAll(){\n try{\n //Read entire file bytes. Return in byte format. Don't need to close() after use. \n byte[] b = Files.readAllBytes(Paths.get(\"country.txt\"));\n String s = new String(b);\n System.out.println(s);\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "static void read()\n\t\t{\n\n\n\t\t\tString content=new String();\n\t\t\ttry {\n\t\t\t\tFile file=new File(\"Dic.txt\");\n\t\t\t\tScanner scan=new Scanner(file);\n\t\t\t\twhile(scan.hasNextLine()) {\n\t\t\t\t\tcontent=scan.nextLine();\n\t\t\t\t//\tSystem.out.println(content);\n\n\t\t\t\t//\tString [] array=content.split(\" \");\n\t\t\t\t\tlist.add(content.trim());\n\n\t\t\t\t}\n\t\t\t\tscan.close(); \n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\n\n\t\t}", "public FileData(String filePath) {\r\n //path = this.getClass().getResource(filePath).getPath();\r\n path = filePath;\r\n \r\n if (path.contains(\"%20\")) {\r\n path = path.replaceAll(\"%20\", \" \");\r\n }\r\n\r\n if (filePath.substring(filePath.length() - 4, filePath.length()).equals(\".txt\")) { // txt file\r\n try {\r\n BufferedReader br = new BufferedReader(new InputStreamReader(\r\n new FileInputStream(path), \"UTF-8\"));\r\n\r\n String line;\r\n while ((line = br.readLine()) != null) {\r\n data.add(line);\r\n }\r\n\r\n for (int i = 0; i < data.size(); i++) {\r\n dataTag.add(0);\r\n }\r\n br.close();\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"FileData not found - \" + path);\r\n } catch (IOException ex) {\r\n System.out.println(\"IOExeption in Constructor : FileData\");\r\n }\r\n } else { // folder\r\n File folder = new File(path);\r\n for (File fileEntry : folder.listFiles()) {\r\n data.add(fileEntry.getName());\r\n }\r\n }\r\n }", "@PostConstruct\n\tprivate void printDataFromFile() {\n\t}", "DatasetFile getDatasetFile();", "public File getFile() {\n return file;\n }", "public File getFile() {\n return file;\n }", "public File getFile() {\n return file;\n }", "public File getFile() {\n return file;\n }", "public void loadData() {\n Path path= Paths.get(filename);\n Stream<String> lines;\n try {\n lines= Files.lines(path);\n lines.forEach(ln->{\n String[] s=ln.split(\";\");\n if(s.length==3){\n try {\n super.save(new Teme(Integer.parseInt(s[0]),Integer.parseInt(s[1]),s[2]));\n } catch (ValidationException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }else\n System.out.println(\"linie corupta in fisierul teme.txt\");});\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic boolean readData(File file) {\n return file.exists();\n\t}", "public static Vector<FondiSviluppoPuglia> ReadingData(File file){\n\t\tVector<FondiSviluppoPuglia> v = new Vector<FondiSviluppoPuglia>();\n\t\ttry {\n\t\t\tObjectInputStream input = new ObjectInputStream(new BufferedInputStream(new FileInputStream(file)));\n\t\t\tv = (Vector<FondiSviluppoPuglia>)input.readObject();\n\t\t\tinput.close();\n\t\t} catch(ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"List Not Found\");\n\t\t\te.printStackTrace();\n\t\t} catch(IOException e) {\n\t\t\tSystem.out.println(\"Error of I/O\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "public static ArrayList<MonitoredData> readFileData(){\n ArrayList<MonitoredData> data = new ArrayList<>();\n List<String> lines = new ArrayList<>();\n try (Stream<String> stream = Files.lines(Paths.get(\"Activities.txt\"))) {\n lines = stream\n .flatMap((line->Stream.of(line.split(\"\\t\\t\"))))\n .collect(Collectors.toList());\n for(int i=0; i<lines.size()-2; i+=3){\n MonitoredData md = new MonitoredData(lines.get(i), lines.get(i+1), lines.get(i+2));\n data.add(md);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n //data.forEach(System.out::println);\n return data;\n }", "@Column(name = \"FILE_CONTENT\" )\n @Lob\n public Byte[] getFileContent() {\n return fileContent;\n }", "public static Vector<Metadata> ReadingMetadata(File file){\n\t\tVector<Metadata> v = new Vector<Metadata>(); \n\t\ttry {\n\t\t\tObjectInputStream input = new ObjectInputStream(new BufferedInputStream(new FileInputStream(file)));\n\t\t\tv = (Vector<Metadata>)input.readObject();\n\t\t\tinput.close();\n\t\t} catch(ClassNotFoundException e) {\n\t\t\tSystem.out.println(\"List Not Found\");\n\t\t\te.printStackTrace();\n\t\t} catch(IOException e) {\n\t\t\tSystem.out.println(\"Error of I/O\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "public byte[] getCaseDetailFile() {\n\t\treturn caseDetailFile;\n\t}", "public com.google.protobuf.ByteString getFile() {\n return file_;\n }", "@PostConstruct\n private List<String> loadFortunesFile() {\n System.out.println(\">> FileFortuneService: inside method 'loadFortunesFile'.\");\n\n try {\n String fileName = \"src/com/luv2code/springdemo/fortune_data.txt\";\n BufferedReader reader = new BufferedReader(new FileReader(fileName));\n String line = null;\n while ( (line = reader.readLine()) != null) {\n fortunes.add(line);\n }\n } catch (IOException e) {\n System.out.println(\"An error occurred during file-stream: \");\n e.printStackTrace();\n }\n return fortunes;\n\n }", "@Override\n\t\tvoid loadData() throws IOException {\n\t\t\tsuper.loadData();\n\t\t}", "public File getAttributeFile();", "public boolean readDataFile();", "String getData();", "public String readFileContents(String filename) {\n return null;\n\n }", "public static void loadProgramData() {\n\r\n try {\r\n File f = new File(\"DetailsOfVaccination.txt.txt\"); //Accessing the file\r\n Scanner read = new Scanner(f);\r\n while (read.hasNextLine()) { //Print data in the file line by line\r\n String data = read.nextLine();\r\n System.out.println(data);\r\n }\r\n read.close();\r\n }\r\n catch (FileNotFoundException e) { //Runs if there was an error\r\n System.out.println(\"An error occurred while reading data from the file.\");\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n protected File getDataFile(String relFilePath) {\n return new File(getDataDir(), relFilePath);\n }", "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 String getFormattedFileContents ();", "public File getFile() {\n\t\treturn this.file;\n\t}", "java.lang.String getData();", "public com.google.protobuf.ByteString getFile() {\n return file_;\n }", "@Override\n public StockInfo[] getStockInfoFromFile(String filePath) throws UnsupportedEncodingException {\n //TODO: write your code here\n \tFileInputStream file=null;\n\n\t\ttry {\n\t\t\tfile=new FileInputStream(filePath);\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tInputStreamReader files=null;\n\t\ttry{\n\t\t\tfiles=new InputStreamReader(file,\"utf-8\");\n\t\t}catch (UnsupportedEncodingException el){\n\t\t\tel.printStackTrace();\n\t\t}\n\t\tBufferedReader bufferedreader = new BufferedReader(files);\n\t\tArrayList<StockInfo> list = new ArrayList<StockInfo>();\n\t\tString t=null;\n\t\ttry {\n\t\t\twhile((t=bufferedreader.readLine())!=null) {\n\t\t\t\tString []node=t.split(\"\\\\s+\");\n\t\t\t\tStockInfo record=new StockInfo();\n\t\t\t\trecord.setId(node[0]);\n\t\t\t\trecord.setTitle(node[1]);\n\t\t\t\trecord.setAuthor(node[2]);\n\t\t\t\trecord.setDate(node[3]);\n\t\t\t\trecord.setLastUpdate(node[4]);\n\t\t\t\trecord.setContent(node[5]);\n\t\t\t\trecord.setAnswerAuthor(node[6]);\n\t\t\t\trecord.setAnswer(node[7]);\n\t\t\t\tlist.add(record);\n\n\t\t\t}\n\t\t\tbufferedreader.close();\n\t\t\tfiles.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\tStockInfo [] newdate=new StockInfo[list.size()];\n\t\tint i=0;\n\t\twhile(i<list.size()) {\n\t\t\tnewdate[i]=list.get(i);\n\t\t\ti++;\n\t\t}\n\t\treturn newdate;\n }", "public File getDataFile(String filename) {\n throw new UnsupportedOperationException();\n }", "public File getFile() {\n\t\treturn file;\n\t}", "public Long getInfile_()\n{\nreturn getInputDataItemId(\"infile_\");\n}", "public FileObject getFile() {\n return file;\n }", "public FileObject getFile() {\n return file;\n }", "private Account loadTestData(String dataFile) throws ParserConfigurationException, \n SAXException, IOException {\n try {\n // getting parser\n SAXParserFactory factory = SAXParserFactory.newInstance();\n factory.setNamespaceAware(true);\n SAXParser parser = factory.newSAXParser();\n XMLReader reader = parser.getXMLReader();\n \n // getting loader\n InvoiceXMLLoaderCH loader = new InvoiceXMLLoaderCH();\n \n // getting input file\n InputSource input = new InputSource(this.getClass().getResourceAsStream(dataFile));\n \n // setting content handler and parsing file\n reader.setContentHandler(loader);\n reader.parse(input);\n \n return (Account) loader.getAccountList().get(0);\n \n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n throw e;\n } catch (SAXException e) {\n e.printStackTrace();\n throw e;\n } catch (IOException e) {\n e.printStackTrace();\n throw e;\n }\n }", "public ClickerCounterModel[] readObjectFromFile() {\n\t\tStringBuilder sb = new StringBuilder();\n\t\ttry {\n\t\t\tFileInputStream inputStream = openFileInput(filename);\n\t\t\tInputStreamReader isr = new InputStreamReader(inputStream);\n\t\t\tBufferedReader bufferedReader = new BufferedReader(isr);\n\t\t\tString line;\n\t\t\twhile ((line = bufferedReader.readLine()) != null) {\n\t\t\t\tsb.append(line);\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// use Gson to convert it into and object\n\t\tString json = sb.toString();\n\t\tGson gson = new Gson();\n\t\tClickerCounterModel[] object = gson.fromJson(json,\n\t\t\t\tClickerCounterModel[].class);\n\t\treturn object;\n\t}", "public String getDataFileName() {\treturn dataFileName;\t}", "public String getData() {\n\treturn data;\n }", "public void printData() {\n\t\ttry {\n\t\t\tFiles.lines(new File(PAYROLL_FILE_NAME).toPath())\n\t\t\t.forEach(System.out::println); \n\t\t}catch(IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private File getFile() {\n\t\t// retornamos el fichero a enviar\n\t\treturn this.file;\n\t}", "public final File getFile() {\n return file;\n }", "private Object getFile(String path) throws Exception {\t\t\t\n\t\t \n\t\t FileInputStream fileIn = new FileInputStream(path);\n ObjectInputStream objectIn = new ObjectInputStream(fileIn);\n\n Object obj = objectIn.readObject();\n objectIn.close();\n \n return obj;\t\t\n\t}", "private byte[] readSampleData(String filePath) {\n File sampleFile = new File(filePath);\n byte[] buffer = new byte[(int) sampleFile.length()];\n FileInputStream fis = null;\n try {\n fis = new FileInputStream(sampleFile);\n readFill(fis, buffer);\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n try {\n fis.close();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return buffer;\n }", "private byte[] getContent(File f) {\n byte[] content = null;\n\n try {\n FileInputStream fis = new FileInputStream(f);\n byte[] temp = new byte[fis.available()];\n fis.read(temp);\n fis.close();\n content = temp;\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n\n return content;\n }", "public int[][][] getData() throws AreaFileException {\r\n int[][][] mydata = readData(0,0,dir[AD_NUMELEMS],numberLines);\r\n return mydata;\r\n }", "private void readFromFile(){\n\t\t\n\t\ttry {\n\t\t\tFile file=new File(\"controller.txt\");\n\t\t\tFileInputStream fin;\n\t\t\tfin = new FileInputStream(file);\n\t\t\tDataInputStream din=new DataInputStream(fin);\n\t\t\tBufferedReader br=new BufferedReader(new InputStreamReader(din));\n\t\t\t\n\t\t\tfor(int i=0; i<2; i++){\n\t\t\t\tif(i==0)\n\t\t\t\t\tcodedUserName=br.readLine();\n\t\t\t\telse \n\t\t\t\t\tcodedPassword=br.readLine();\n\t\t\t}\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}" ]
[ "0.7083922", "0.69680184", "0.65684336", "0.6538082", "0.6538065", "0.64629513", "0.6352173", "0.63496816", "0.6300063", "0.62613463", "0.62607163", "0.62514013", "0.61430293", "0.61166745", "0.6091699", "0.6079143", "0.60766655", "0.60766655", "0.6057092", "0.6045832", "0.6044896", "0.604437", "0.6040868", "0.60316896", "0.60225916", "0.6016494", "0.6003897", "0.59971654", "0.5989397", "0.598656", "0.59805167", "0.59621143", "0.5948869", "0.59194386", "0.5917821", "0.59175754", "0.59137505", "0.590912", "0.59074867", "0.5900917", "0.58901095", "0.5890079", "0.5876698", "0.5874525", "0.5874333", "0.58691776", "0.58671355", "0.5866655", "0.5862954", "0.5858114", "0.5847147", "0.58435917", "0.5842594", "0.58283204", "0.5827194", "0.582664", "0.5824628", "0.58211386", "0.5817429", "0.5817429", "0.5817429", "0.5817429", "0.581642", "0.58105224", "0.5803766", "0.5799776", "0.5796175", "0.5792462", "0.578821", "0.57861257", "0.57823664", "0.5776002", "0.5773445", "0.5771457", "0.5766423", "0.57595664", "0.5756106", "0.5751227", "0.5740703", "0.57401055", "0.5735148", "0.57347715", "0.57347214", "0.57307553", "0.5724774", "0.5717218", "0.5714396", "0.5704317", "0.5704317", "0.57031965", "0.56960046", "0.5689114", "0.5681808", "0.5679509", "0.56778586", "0.5677258", "0.56765544", "0.56764925", "0.5668737", "0.5662782", "0.5652419" ]
0.0
-1
TODO Autogenerated method stub
public void replace(String text) { logger.info("REPLACE TODO"); }
{ "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
/ Initializes a new supplier.
public void create(AttributeList attributeList) { super.create(attributeList); OADBTransaction transaction = getOADBTransaction(); // DEFAULT: supplier id is obtained from the table's sequence Number supplierId = transaction.getSequenceValue("FWK_TBX_SUPPLIERS_S"); setSupplierId(supplierId); // DEFAULT: start date should be set to sysdate setStartDate(transaction.getCurrentDBDate()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Supplier() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public void setSupplier(Supplier supplier) {\n this.supplier = supplier;\n }", "public void getSupplier(Supplier supplier) {\n\t\r\n}", "void setSupplier(Supplier<Number> supplier);", "@Override\n public Supplier<List<Integer>> supplier() {\n // constructor method reference\n // for an Object array use: Object[]::new\n return ArrayList::new;\n }", "static Defaulable create(Supplier<Defaulable> supplier) {\n return supplier.get();\n }", "@Override\n public Interface_SupplierReadOnly getSupplier() {\n return supplier;\n }", "public void setSupplier(String supplier) {\n this.supplier = supplier == null ? null : supplier.trim();\n }", "private SupplierInfoBuilder() {\n }", "private Call(ThrowingSupplier<T> fSupplier)\n\t{\n\t\tthis.fSupplier = fSupplier;\n\t}", "public void create(SupplierCard supplier) {\n supplier_dao.create(supplier);\n }", "public void setSupplier(\n @Nullable\n final String supplier) {\n rememberChangedField(\"Supplier\", this.supplier);\n this.supplier = supplier;\n }", "public Catalogue()\n {\n SupplierId = 0;\n }", "private SupplierLoaderUtil() {\n\t}", "public ManageSupplier() {\n initComponents();\n }", "public void setSupplier (jkt.hms.masters.business.MasStoreSupplier supplier) {\n\t\tthis.supplier = supplier;\n\t}", "private void addSupplier(Supplier supplier) throws SQLException, TesseractException {\n String ocrResult = OcrHandler.getInstance().ocrSimple(language, image);\n supplier.setFingerprint(new Fingerprint(ocrResult));\n DbHandler.getInstance().addSupplier(supplier);\n }", "public String getSupplier() {\n return supplier;\n }", "public void setSupplierId(Integer supplierId) {\n this.supplierId = supplierId;\n }", "ServiceLocator(Supplier<Iterator<ServiceInstance>> instanceSupplier) {\n\t\tthis(instanceSupplier, (ServiceLocator) null);\n\t}", "public static <T> List<T> initialize(Supplier<T> s) {\n\t\tList<T> result = new ArrayList<>();\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tresult.add(s.get());\n\t\t}\n\t\treturn result;\n\t}", "public static <T> void initialize(T[][] matrix, Supplier<T> supplier){\n indexedForeach(matrix, (x, y) -> matrix[x][y] = supplier.get());\n }", "private void seedSuppliers() throws IOException, JAXBException {\n this.supplierService.seed();\n }", "public SupplyDemand() {\r\n\t\t//begin\r\n\t\tproducerList = new ArrayList<>();\r\n\t\tretailerList = new ArrayList<>();\r\n\t\t//end\r\n\t}", "public PortableSortedSet(Remote.Supplier<SortedSet<E>> supplier)\n {\n m_supplier = supplier;\n }", "public CountingSupplier(Supplier<T> parentSupplier) {\n if (parentSupplier == null) {\n throw new IllegalArgumentException(\"Parent supplier cannot be null.\");\n }\n this.parent = parentSupplier;\n }", "private static void useSupplier(Supplier<Integer> expression){}", "public void setSupplierid(Integer supplierid) {\r\n this.supplierid = supplierid;\r\n }", "public Local(int id, String supplierName, String type, String supplierAddress, String salesPerson, String phoneNumber) {\r\n super(id, supplierName, type, supplierAddress, salesPerson, phoneNumber);\r\n }", "ServiceLocator(Supplier<Iterator<ServiceInstance>> instanceSupplier,\n\t\t\tSupplier<ServiceLocator> fallbackSupplier) {\n\t\tthis.instanceSupplier = instanceSupplier;\n\t\tthis.fallbackSupplier = fallbackSupplier;\n\t}", "public static void main(String[] args) {\n\t\t Supplier<Personne> supplier = Personne::new;\n\t\t System.out.println(supplier.get());\n\t\t \n\t\t //constructeur avec plusieur parametre \n\t\t PersonneSupplier supplierP = Personne::new;\n\t\t Personne personne = supplierP.creerInstance(\"nom1\", \"prenom1\");\n\t\t System.out.println(personne);\n\t\t \n\t\t PersonneSupplier supplierP1 = (nom, prenom) -> new Personne(nom, prenom);\n\t\t Personne personneP1 = supplierP1.creerInstance(\"nom1\", \"prenom1\");\n\t\t System.out.println(personneP1);\n\t\t \n\t\t \n\t\t Supplier<Personne> supplier0 = () -> new Personne();\n\t\t Supplier<Personne> supplier1 = () -> new Personne(\"\",\"\");\n\t\t \n\t\t //Supplier<Integer> I0 = Integer::new;\n\t\t Supplier<Integer> I1 = () -> new Integer(0);\n\t\t //Supplier<String> I2 =(String s) -> new Integer(s);\n\t\t \n\t\t Supplier<ArrayList<Personne>> supplier5 = ArrayList<Personne>::new;\n\t\t Supplier<ArrayList<Personne>> supplier6 = () -> new ArrayList<Personne>(); \n\t\t \n\t\t //Supplier<String[]> supplier7 = String[]::new;\n\t\t //Supplier<> supplier8 = (int size) -> new String[size];\n\t\t \n\t\t \n\t\t //generic\n\t\t //MaFabrique<Integer[]> fabrique = Integer[]::new; \n\t\t //Integer[] entiers = fabrique.creerInstance(10);\n\t\t //System.out.println(\"taille = \"+entiers.length);\n\t\t \n\t\t \n\t\t \n\t\t }", "public SimpleSolverFactory(SupplierValueStore valueStore)\n\t{\n\t\tthis.valueStore = Objects.requireNonNull(valueStore);\n\t}", "private static <T> Supplier<T> memoize(Supplier<T> supplier) {\n return null;\n }", "Supplier<Number> getSupplier();", "public void setSupplierId(int SupplierIdIn)\n {\n this.SupplierId = SupplierIdIn;\n }", "public void addSupplier(ModelElement supplier1)\n // -end- 335C0D7A02E4 add_head327A646F00E6 \"Dependency::addSupplier\"\n ;", "@Nonnull\r\n\tpublic static <T> Observable<T> singleton(\r\n\t\t\tfinal Func0<? extends T> supplier) {\r\n\t\treturn singleton(supplier, scheduler());\r\n\t}", "<R> Streamlet<R> newSource(SerializableSupplier<R> supplier);", "@Nonnull\r\n\tpublic static <T> Observable<T> singleton(\r\n\t\t\tfinal Func0<? extends T> supplier,\r\n\t\t\t@Nonnull final Scheduler pool) {\r\n\t\treturn new Observable<T>() {\r\n\t\t\t@Override\r\n\t\t\t@Nonnull \r\n\t\t\tpublic Closeable register(@Nonnull final Observer<? super T> observer) {\r\n\t\t\t\treturn pool.schedule(new Runnable() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\tobserver.next(supplier.invoke());\r\n\t\t\t\t\t\tobserver.finish();\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}", "public static CostFactory init() {\n\t\ttry {\n\t\t\tCostFactory theCostFactory = (CostFactory)EPackage.Registry.INSTANCE.getEFactory(CostPackage.eNS_URI);\n\t\t\tif (theCostFactory != null) {\n\t\t\t\treturn theCostFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new CostFactoryImpl();\n\t}", "public void addSupplier(Supplier newSupplier) {\n\t\tsupplierList.add(newSupplier);\n\t}", "public void setSupplierNum(String supplierNum) {\n this.supplierNum = supplierNum == null ? null : supplierNum.trim();\n }", "public Item(ResultSet rs, Supplier supp) {\r\n try {\r\n this.toolId = rs.getInt(1);\r\n this.toolName = rs.getString(2);\r\n this.toolQuantity = rs.getInt(3);\r\n this.toolPrice = rs.getDouble(4);\r\n this.toolSupplier = supp;\r\n } catch (SQLException e){\r\n System.out.println(\"Supplier creation error (ResultSet)\");\r\n e.printStackTrace();\r\n }\r\n }", "public void setSupplierId(Long supplierId) {\n\t\tthis.supplierId = supplierId;\n\t}", "public ManageSupplier() {\n \n ctrlSupplier = (SupplierController) ControllerFactory.getInstance().getController(ControllerFactory.ControllerTypes.SUPPLIER);\n initComponents();\n loadKeyListener();\n setTime();\n \n \n }", "public void getName(Supplier supplier) {\n\t\r\n}", "@NotNull\n public static <T> Lazy<T> createSingleThreadedLazy(\n @NotNull Supplier<T> supplier) {\n return new SingleThreadedLazy<>(supplier);\n }", "public static Object wrappedSupplier(Supplier<String> s) {\n return new LazySupplierToString(s);\n }", "public DataFunctionRepositoryResource(final FunctionRepository functionRepo) {\n ArgumentChecker.notNull(functionRepo, \"functionRepo\");\n _underlying = Suppliers.ofInstance(functionRepo);\n }", "public Supplier addSupplier(Supplier supplier) {\n\t\treturn supplierRepository.save(supplier);\n\t}", "private StreamFactory()\n {\n /*\n * nothing to do\n */\n }", "@NotNull\n public static <T> Lazy<T> createMultiThreadedLazy(\n @NotNull Supplier<T> supplier) {\n return new MultiThreadedLazy<>(supplier);\n }", "public static Smart_officeFactory init() {\n\t\ttry {\n\t\t\tSmart_officeFactory theSmart_officeFactory = (Smart_officeFactory)EPackage.Registry.INSTANCE.getEFactory(Smart_officePackage.eNS_URI);\n\t\t\tif (theSmart_officeFactory != null) {\n\t\t\t\treturn theSmart_officeFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new Smart_officeFactoryImpl();\n\t}", "public static <T> ReactiveStateMachine<T> supply(Supplier<T> supplier) {\n\t\treturn supply(new ReactiveValue<>(new ReactiveBlockingException(), true), supplier);\n\t}", "public RecSupplierListBusiness()\n {\n super();\n }", "public void initialize() {\n if (factory == null || poolName == null)\n throw new IllegalStateException(\"Factory and Name must be set before pool initialization!\");\n if (initialized)\n throw new IllegalStateException(\"Cannot initialize more than once!\");\n initialized = true;\n permits = new FIFOSemaphore(maxSize);\n factory.poolStarted(this);\n lastGC = System.currentTimeMillis();\n //fill pool to min size\n fillToMin();\n /*\n int max = maxSize <= 0 ? minSize : Math.min(minSize, maxSize);\n Collection cs = new LinkedList();\n for(int i=0; i<max; i++)\n {\n cs.add(getObject(null));\n }\n while (Iterator i = cs.iterator(); i.hasNext();)\n {\n releaseObject(i.next());\n } // end of while ()\n */\n collector.addPool(this);\n }", "public jkt.hms.masters.business.MasStoreSupplier getSupplier () {\n\t\treturn supplier;\n\t}", "@SafeVarargs\n public final <T> T of(Supplier<T>... suppliers) {\n return suppliers[random.nextInt(0, suppliers.length - 1)].get();\n }", "ServiceLocator(Supplier<Iterator<ServiceInstance>> instanceSupplier, ServiceLocator fallback) {\n\t\tthis(instanceSupplier, () -> fallback);\n\t}", "public static RegistryObject<Block> register(Supplier<Block> supplier, @Nonnull String name, @Nullable Item.Properties properties) {\n RegistryObject<Block> block = BLOCK_DEFERRED.register(name, supplier);\n\n if (properties == null) {\n AquaItems.register(() -> new BlockItem(block.get(), new Item.Properties()), name);\n } else {\n AquaItems.registerWithTab(() -> new BlockItem(block.get(), properties), name);\n }\n\n return block;\n }", "@Autowired\n public SupplierService(final ISupplierDAO dao) {\n super(dao, Supplier.class, SupplierPOJO.class);\n this.dao = dao;\n }", "public List<Supplier> getSuppliers(){ \n\t List<Supplier> list=new ArrayList<Supplier>(); \n\t list=template.loadAll(Supplier.class); \n\t return list; \n\t}", "public Item(int id, String name, int quantity, double price, Supplier supplier){\r\n toolId = id;\r\n toolName = name;\r\n toolQuantity = quantity;\r\n toolPrice = price;\r\n toolSupplier = supplier;\r\n }", "Supplier findSupplierById(Integer id)throws SQLException;", "public ImageCache(Supplier<File> cacheDirSupplier) {\n this.cacheDirSupplier = cacheDirSupplier;\n }", "public Remote.Supplier<SortedSet<E>> getSupplier()\n {\n return m_supplier == null ? DEFAULT_SUPPLIER : m_supplier;\n }", "private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter supplierSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.array_supplier_options, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n supplierSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mSupplierSpinner.setAdapter(supplierSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mSupplierSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.supplier_one))) {\n mSupplier = BookEntry.SUPPLIER_ONE;\n } else if (selection.equals(getString(R.string.supplier_two))) {\n mSupplier = BookEntry.SUPPLIER_TWO;\n } else {\n mSupplier = BookEntry.SUPPLIER_UNKNOWN;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mSupplier = BookEntry.SUPPLIER_UNKNOWN;\n }\n });\n }", "@Override\n\tpublic void insertIntoSupplier(Supplier supplier) {\n\t\tString sql=\"INSERT INTO supplier \"+\" (supplier_id, supplier_name, supplier_type, permanent_address, temporary_address, email ,image) SELECT ?,?,?,?,?,?\";\n getJdbcTemplate().update(sql, new Object[] {supplier.getSupplierId(), supplier.getSupplierName(), supplier.getSupplierType(), supplier.getPermanentAddress(), supplier.getTemporaryAddress(),supplier.getEmail() ,supplier.getImage()});\n\t}", "@Override\n public Supplier<ObjectNode> supplier() {\n return JsonNodeFactory.instance::objectNode;\n }", "public Long getSupplierId() {\n\t\treturn supplierId;\n\t}", "private ResourceFactory() {\r\n\t}", "public Integer getSupplierId() {\n return supplierId;\n }", "private PartitionFunctionFactory() {\n }", "public void setSupplierName(String pSupplierName) {\n mSupplierName = pSupplierName;\n }", "public void setSupplierPartId(String supplierPartId) {\r\n this.supplierPartId = supplierPartId;\r\n }", "public void setSupplierName(String supplierName) {\n this.supplierName = supplierName == null ? null : supplierName.trim();\n }", "private LocatorFactory() {\n }", "public SupplierCard find_Supplier(Integer supplier_id) {\n return supplier_dao.find(supplier_id);\n }", "public static UseCaseDslFactory init()\n {\n try\n {\n UseCaseDslFactory theUseCaseDslFactory = (UseCaseDslFactory)EPackage.Registry.INSTANCE.getEFactory(UseCaseDslPackage.eNS_URI);\n if (theUseCaseDslFactory != null)\n {\n return theUseCaseDslFactory;\n }\n }\n catch (Exception exception)\n {\n EcorePlugin.INSTANCE.log(exception);\n }\n return new UseCaseDslFactoryImpl();\n }", "public static CommonsFactory init() {\n\t\ttry {\n\t\t\tCommonsFactory theCommonsFactory = (CommonsFactory)EPackage.Registry.INSTANCE.getEFactory(CommonsPackage.eNS_URI);\n\t\t\tif (theCommonsFactory != null) {\n\t\t\t\treturn theCommonsFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new CommonsFactoryImpl();\n\t}", "public static void addNewSupplier() {\r\n\t\tSystem.out.println(\"Please enter the following supplier details:\");\r\n\r\n\t\tSystem.out.println(\"Supplier Name:\");\r\n\r\n\t\tString supName = Validation.stringNoIntsValidation();\r\n\r\n\t\tSystem.out.println(\"---Supplier Address details---\");\r\n\r\n\r\n\t\tAddress supAddress = addAddress();\r\n\r\n\t\tint numOfEnums = EnumSet.allOf(SupRegion.class).size();\r\n\r\n\t\tPrintMethods.printEnumList(numOfEnums);\r\n\r\n\t\tSystem.out.println(\"\\nPlease choose the region of your supplier:\");\r\n\r\n\t\tint regionChoice = Validation.listValidation(numOfEnums);\r\n\r\n\t\tSupRegion supRegion = SupRegion.values()[regionChoice-1];\r\n\r\n\r\n\t\tArrayList<Product> supProducts = addProduct();\r\n\t\t\r\n\t\tFeedback tempFeedback = new Feedback(null, null, null);\r\n\t\tArrayList<Feedback> supFeedback = new ArrayList<Feedback>();\r\n\t\tsupFeedback.add(tempFeedback);\r\n\r\n\t\tRandom supCodeRandom = new Random(100);\r\n\t\tint supCode = supCodeRandom.nextInt();\r\n\r\n\t\tSupplier tempSupplier = new Supplier(supCode, supName, supAddress, supRegion, supProducts, supFeedback);\r\n\r\n\t\tPart02Tester.supArray.add(tempSupplier);\r\n\t}", "protected Supplier<Set<Entity>> getSeedSupplier() {\n return defaultSeedSupplier;\n }", "void declare(String name, Supplier<T> propertySupplier);", "private XmlStreamFactory()\n {\n /*\n * nothing to do\n */\n }", "private void seedSupplier() throws JAXBException, FileNotFoundException {\n\n SupplierSeedRootDto supplierSeedRootDto = this.xmlParser\n .unmarshalFromFiles(SUPPLIERS_FILE_PATH, SupplierSeedRootDto.class);\n\n this.supplierService.seedSuppliers(supplierSeedRootDto.getSupplierSeedDtos());\n }", "@BackpressureSupport(BackpressureKind.FULL)\n @SchedulerSupport(SchedulerKind.NONE)\n public static <T> Observable<T> fromCallable(Callable<? extends T> supplier) {\n Objects.requireNonNull(supplier, \"supplier is null\");\n return create(new PublisherScalarAsyncSource<T>(supplier));\n }", "public static CLONDATAFactory init() {\n\t\ttry {\n\t\t\tCLONDATAFactory theCLONDATAFactory = (CLONDATAFactory) EPackage.Registry.INSTANCE.getEFactory(\n\t\t\t\tCLONDATAPackage.eNS_URI);\n\t\t\tif (theCLONDATAFactory != null) {\n\t\t\t\treturn theCLONDATAFactory;\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new CLONDATAFactoryImpl();\n\t}", "public static BuiltinFactory init() {\n\t\ttry {\n\t\t\tBuiltinFactory theBuiltinFactory = (BuiltinFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://www.soluvas.com/schema/story.builtin/1.0\"); \n\t\t\tif (theBuiltinFactory != null) {\n\t\t\t\treturn theBuiltinFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new BuiltinFactoryImpl();\n\t}", "interface SupplierInterfaceDemo<T> {\n public T get();\n }", "public String getSupplierName() {\n return supplierName;\n }", "public Factory() {\n this(getInternalClient());\n }", "public <T> Set<T> setOf(int count, Supplier<T> supplier) {\n Set<T> set = new HashSet<>();\n for (int i = 0; i < count; i++) {\n set.add(supplier.get());\n }\n return set;\n }", "public <T> T sync(Supplier<? extends T> supplier) {\n lock.lock();\n try {\n return supplier.get();\n } finally {\n lock.unlock();\n } \n }", "public static void m1(Supplier<Double> supplier) {\n\t\tSystem.out.println(Math.sqrt(supplier.get()));\n\t}", "private void initialize() {\nproductCatalog.add(new ProductStockPair(new Product(100.0, \"SYSC2004\", 0), 76));\nproductCatalog.add(new ProductStockPair(new Product(55.0, \"SYSC4906\", 1), 0));\nproductCatalog.add(new ProductStockPair(new Product(45.0, \"SYSC2006\", 2), 32));\nproductCatalog.add(new ProductStockPair(new Product(35.0, \"MUSI1001\", 3), 3));\nproductCatalog.add(new ProductStockPair(new Product(0.01, \"CRCJ1000\", 4), 12));\nproductCatalog.add(new ProductStockPair(new Product(25.0, \"ELEC4705\", 5), 132));\nproductCatalog.add(new ProductStockPair(new Product(145.0, \"SYSC4907\", 6), 322));\n}", "public void clearSupplier()\n // -end- 335C0D7A02E4 remove_all_head327A646F00E6 \"Dependency::clearSupplier\"\n ;", "protected Provider() {}", "public InternalFloaterFactory() {\n super();\n }", "public static BasicSafetyCaseFactory init() {\n\t\ttry {\n\t\t\tBasicSafetyCaseFactory theBasicSafetyCaseFactory = (BasicSafetyCaseFactory) EPackage.Registry.INSTANCE\n\t\t\t\t\t.getEFactory(BasicSafetyCasePackage.eNS_URI);\n\t\t\tif (theBasicSafetyCaseFactory != null) {\n\t\t\t\treturn theBasicSafetyCaseFactory;\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new BasicSafetyCaseFactoryImpl();\n\t}", "public static synchronized void init()\n {\n lazyinit();\n }", "public static XCanopusFactory init()\r\n {\r\n try\r\n {\r\n XCanopusFactory theXCanopusFactory = (XCanopusFactory)EPackage.Registry.INSTANCE.getEFactory(XCanopusPackage.eNS_URI);\r\n if (theXCanopusFactory != null)\r\n {\r\n return theXCanopusFactory;\r\n }\r\n }\r\n catch (Exception exception)\r\n {\r\n EcorePlugin.INSTANCE.log(exception);\r\n }\r\n return new XCanopusFactoryImpl();\r\n }" ]
[ "0.79775757", "0.72134775", "0.6946804", "0.6591247", "0.65059483", "0.6341964", "0.6314519", "0.6264483", "0.62278897", "0.6179787", "0.6168518", "0.61391324", "0.6116802", "0.60396886", "0.6034687", "0.6020247", "0.59897935", "0.59759045", "0.5858205", "0.5840372", "0.5796878", "0.5793219", "0.5790589", "0.5747617", "0.57111675", "0.5703536", "0.567901", "0.56505555", "0.5649261", "0.5641336", "0.56308115", "0.561959", "0.55770767", "0.55488634", "0.5493543", "0.5492264", "0.54719204", "0.5470104", "0.5464536", "0.5444595", "0.54267", "0.54074836", "0.5402359", "0.5396206", "0.53887814", "0.5388698", "0.5386657", "0.53755826", "0.535825", "0.535292", "0.5352048", "0.53467774", "0.5310588", "0.5295855", "0.52870435", "0.52689725", "0.5268612", "0.5246383", "0.52420527", "0.52309453", "0.5222115", "0.5219384", "0.52126306", "0.520927", "0.52027375", "0.52014357", "0.5199857", "0.5195224", "0.5185762", "0.51800674", "0.5177324", "0.51739174", "0.5154862", "0.5151212", "0.51481766", "0.51314723", "0.51194644", "0.5118175", "0.5107359", "0.510634", "0.51052576", "0.51008224", "0.51006716", "0.50983614", "0.50870776", "0.5080395", "0.5071424", "0.5069946", "0.50677824", "0.50661355", "0.5062925", "0.50445783", "0.5040973", "0.50333714", "0.50226897", "0.5020737", "0.5007961", "0.50078064", "0.5005784", "0.50010055", "0.49923345" ]
0.0
-1
end create() / Convenience method returns the SupplierEntityExpert.
public static SupplierEntityExpert getSupplierEntityExpert(OADBTransaction txn) { return (SupplierEntityExpert)txn.getExpert(SupplierEOImpl.getDefinitionObject()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SupplierEntity getSupplierEntity(int supplierId) {\n\n SupplierEntity originEntity = new SupplierEntity();\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n originEntity = (SupplierEntity)session.get(SupplierEntity.class, supplierId);\n tx.commit();\n if (originEntity != null) {\n log.warn(\"Retrieved supplier: \" + originEntity + \" with id of: \" + originEntity.getSupplierId());\n }\n } catch (HibernateException e) {\n\n if (tx!=null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n return originEntity;\n\n }", "public void create(SupplierCard supplier) {\n supplier_dao.create(supplier);\n }", "@Override\n\tpublic DataTablesResponseInfo getSupplier() {\n\t\tDataTablesResponseInfo info = new DataTablesResponseInfo();\n\t\tinfo.setData(purchaseDao.getSupplier());\n\t\treturn info;\n\t}", "public static SupplyStock createEntity(EntityManager em) {\n SupplyStock supplyStock = new SupplyStock()\n .name(DEFAULT_NAME)\n .amount(DEFAULT_AMOUNT);\n return supplyStock;\n }", "public SupplierCard find_Supplier(Integer supplier_id) {\n return supplier_dao.find(supplier_id);\n }", "public static GoodsReceiptDetails createEntity(EntityManager em) {\n GoodsReceiptDetails goodsReceiptDetails = new GoodsReceiptDetails()\n .grnQty(DEFAULT_GRN_QTY);\n return goodsReceiptDetails;\n }", "public ClientEntity newEntity() {\r\n if (entityType == null) {\r\n entityType = getEntityType(entitySet);\r\n }\r\n return odataClient.getObjectFactory().newEntity(new FullQualifiedName(NAMESPAVE, entityType));\r\n }", "public void getSupplier(Supplier supplier) {\n\t\r\n}", "void create(Feedback entity);", "public Camp newEntity() { return new Camp(); }", "public Supplier getById(int id){ \n\t Supplier e=(Supplier)template.get(Supplier.class,id); \n\t return e; \n\t}", "T createEntity();", "public jkt.hms.masters.business.MasStoreSupplier getSupplier () {\n\t\treturn supplier;\n\t}", "public Supplier() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public ExpertiseEntity(String expertiseName) {\n this.expertiseName = expertiseName;\n }", "@Override\n public KitchenSupplier getKitchenSupplier(Long selectedSupplierId) {\n KitchenSupplier ks = em.find(KitchenSupplier.class, selectedSupplierId);\n return ks;\n }", "public Supplier addSupplier(Supplier supplier) {\n\t\treturn supplierRepository.save(supplier);\n\t}", "public Integer getSupplierId() {\n return supplierId;\n }", "public String getSupplier() {\n return supplier;\n }", "String getSupplierID();", "public String getSupplierName() {\n return supplierName;\n }", "public Long getSupplierId() {\n\t\treturn supplierId;\n\t}", "Entity createEntity();", "public void addSupplier() {\n String name = getToken(\"Enter supplier company: \");\n String address = getToken(\"Enter address: \");\n String phone = getToken(\"Enter phone: \");\n Supplier result;\n result = warehouse.addSupplier(name, address, phone);\n if (result == null) {\n System.out.println(\"Supplier could not be added.\");\n }\n System.out.println(result);\n }", "void create(E entity);", "public Integer getSupplierid() {\r\n return supplierid;\r\n }", "@Override\n @LogMethod\n public T create(T entity) throws InventoryException {\n \tInventoryHelper.checkNull(entity, \"entity\");\n repository.persist(entity);\n return repository.getByKey(entity.getId());\n }", "public int getSupplierId()\n {\n return(this.SupplierId);\n }", "public static synchronized EntityDefImpl getDefinitionObject() {\n if (mDefinitionObject == null) {\n mDefinitionObject = \n (OAEntityDefImpl)EntityDefImpl.findDefObject(\"oracle.apps.fnd.framework.toolbox.schema.server.SupplierEO\");\n }\n return mDefinitionObject;\n }", "public ExpertiseEntity() {\n }", "E create(E entity);", "E create(E entity);", "@Override\n public void addKitchenSupplier(String supplierName, String supplierAddress, String telephoneNum,\n String contactPersonName, String mobileNum, String faxNum, String supplierEmailAddr) {\n KitchenSupplier ks = new KitchenSupplier();\n ks.setKsupplierName(supplierName);\n ks.setKsupplierAddress(supplierAddress);\n ks.setKtelephone(telephoneNum);\n ks.setKcontactPersonName(contactPersonName);\n ks.setKmobileNum(mobileNum);\n ks.setKfaxNum(faxNum);\n ks.setKsupplierEmailAddress(supplierEmailAddr);\n ks.setKsupplierDeleteStatus(false);\n\n em.persist(ks);\n em.flush();\n }", "public TowerDisplayEntity createNewTower() {\n\t\treturn (TowerDisplayEntity) tabBar.getTowersPanel().getEditor().edit(new TowerDisplayEntity());\n\t}", "public static void addNewSupplier() {\r\n\t\tSystem.out.println(\"Please enter the following supplier details:\");\r\n\r\n\t\tSystem.out.println(\"Supplier Name:\");\r\n\r\n\t\tString supName = Validation.stringNoIntsValidation();\r\n\r\n\t\tSystem.out.println(\"---Supplier Address details---\");\r\n\r\n\r\n\t\tAddress supAddress = addAddress();\r\n\r\n\t\tint numOfEnums = EnumSet.allOf(SupRegion.class).size();\r\n\r\n\t\tPrintMethods.printEnumList(numOfEnums);\r\n\r\n\t\tSystem.out.println(\"\\nPlease choose the region of your supplier:\");\r\n\r\n\t\tint regionChoice = Validation.listValidation(numOfEnums);\r\n\r\n\t\tSupRegion supRegion = SupRegion.values()[regionChoice-1];\r\n\r\n\r\n\t\tArrayList<Product> supProducts = addProduct();\r\n\t\t\r\n\t\tFeedback tempFeedback = new Feedback(null, null, null);\r\n\t\tArrayList<Feedback> supFeedback = new ArrayList<Feedback>();\r\n\t\tsupFeedback.add(tempFeedback);\r\n\r\n\t\tRandom supCodeRandom = new Random(100);\r\n\t\tint supCode = supCodeRandom.nextInt();\r\n\r\n\t\tSupplier tempSupplier = new Supplier(supCode, supName, supAddress, supRegion, supProducts, supFeedback);\r\n\r\n\t\tPart02Tester.supArray.add(tempSupplier);\r\n\t}", "@Override\n public Interface_SupplierReadOnly getSupplier() {\n return supplier;\n }", "public String getSupplierPartId() {\r\n return this.supplierPartId;\r\n }", "@Override\n\t@Transactional\n\tpublic Product createProduct(String name, Float price, Float weight, Supplier supplier, Date sdf) {\n\t\tProduct newProduct = new Product(name, price, supplier, weight, sdf);\n\t\treturn repository.persist(newProduct);\n\n\t}", "public void createExpense(ExpenseBE expenseBE) {\n\n }", "public static InventoryProvider createEntity(EntityManager em) {\n InventoryProvider inventoryProvider = new InventoryProvider()\n .idInventoryProvider(DEFAULT_ID_INVENTORY_PROVIDER)\n .code(DEFAULT_CODE)\n .name(DEFAULT_NAME)\n .price(DEFAULT_PRICE)\n .cuantity(DEFAULT_CUANTITY);\n return inventoryProvider;\n }", "default E create(E entity)\n throws TechnicalException, ConflictException {\n return create(entity, null);\n }", "@Override\n protected Professional generateCreateRequest() {\n return new Professional().withId(FIRST_ID).withFirstName(FIRST_NAME).withLastName(LAST_NAME)\n .withCompanyName(COMPANY_NAME);\n }", "@Override\n\tpublic void insertIntoSupplier(Supplier supplier) {\n\t\tString sql=\"INSERT INTO supplier \"+\" (supplier_id, supplier_name, supplier_type, permanent_address, temporary_address, email ,image) SELECT ?,?,?,?,?,?\";\n getJdbcTemplate().update(sql, new Object[] {supplier.getSupplierId(), supplier.getSupplierName(), supplier.getSupplierType(), supplier.getPermanentAddress(), supplier.getTemporaryAddress(),supplier.getEmail() ,supplier.getImage()});\n\t}", "protected abstract ENTITY createEntity();", "SupplierInfo selectByPrimaryKey(Long id);", "static Defaulable create(Supplier<Defaulable> supplier) {\n return supplier.get();\n }", "@PostMapping(\"/jpa/users/{username}/suppliers\")\n public ResponseEntity<Void> createSupplier(@PathVariable String username,\n @RequestBody Supplier supplier){\n supplier.setUsername(username);\n Supplier createdSupplier = supplierJpaRepo.save(supplier);\n\n URI uri = ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\")\n .buildAndExpand(createdSupplier.getId()).toUri();\n\n\n return ResponseEntity.created(uri).build();\n\n }", "public Product createProduct() {\n\t\tProduct prod = new Product();\n\t\tprod.setProdId(this.getProdId());\n\t\tprod.setProductName(this.getProductName());\n\t\tprod.setPrice(this.getPrice());\n\t\tprod.setStock(this.getStock());\n\t\tprod.setDescription(this.getDescription());\n\t\tprod.setImage(this.getImage());\n\t\tprod.setSellerId(this.getSellerId());\n\t\tprod.setCategory(this.getCategory());\n\t\tprod.setSubcategory(this.getSubcategory());\n\t\tprod.setProductrating(this.getProductrating());\n\t\treturn prod;\n\t}", "@Override\n\tpublic EmploieType creer(EmploieType entity) throws InvalideTogetException {\n\t\treturn emploieTypeRepository.save(entity);\n\t}", "Supplier findSupplierById(Integer id)throws SQLException;", "public Remote.Supplier<SortedSet<E>> getSupplier()\n {\n return m_supplier == null ? DEFAULT_SUPPLIER : m_supplier;\n }", "@Override\n\tprotected Employee factoryMethod() {\n\t\treturn new Developer();\n\t}", "public Entity newEntity() { return newMyEntity(); }", "public Entity newEntity() { return newMyEntity(); }", "@Override\n public List<KitchenSupplier> getKitchenSupplier(String supplierName) {\n Query query = em.createQuery(\"SELECT k FROM KitchenSupplier k WHERE k.ksupplierName = :inSupplierName\");\n query.setParameter(\"inSupplierName\", supplierName);\n List<KitchenSupplier> s = null;\n try {\n s = query.getResultList();\n } catch (NoResultException ex) {\n System.out.println(\"caught no result exception\");\n }\n return s;\n }", "public void newSupplierMode() {\n\n\t\tsupplierList.setEnabled(false);\n\t\taddressTF.setBackground(SystemColor.white);\n\n\t\tnameTF.setEditable(true);\n\t\tidTF.setEditable(false);\n\t\teMailTF.setEditable(true);\n\t\tnameTF.setEditable(true);\n\t\taddressTF.setEditable(true);\n\t\ttelTF.setEditable(true);\n\n\t\teditItemButton.setEnabled(false);\n\t\tremoveItemButton.setEnabled(false);\n\t\tsaveItemButton.setVisible(true);\n\t\tcancelBtn.setVisible(true);\n\n\t\tclearTextFields();\n\t}", "public static Feedback createEntity(EntityManager em) {\n Feedback feedback = new Feedback()\n .like(DEFAULT_LIKE)\n .announcementId(DEFAULT_ANNOUNCEMENT_ID);;\n return feedback;\n }", "public static Points createEntity() {\n Points points = new Points()\n .date(DEFAULT_DATE)\n .exercise(DEFAULT_EXERCISE)\n .meals(DEFAULT_MEALS)\n .alcohol(DEFAULT_ALCOHOL)\n .notes(DEFAULT_NOTES);\n return points;\n }", "public Supplier findSupplierById(int id) throws NameValidationException, AddressValidationException, ZipCodeValidationException, CityValidationException, PhoneValidationException, EmailValidationException {\n\t\tResultSet rs;\n\t\tSupplier res = null;\n\t\ttry {\n\t\t\tfindSupplierById.setInt(1, id);\n\t\t\trs = findSupplierById.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tres = buildSupplierObject(rs);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn res;\n\t}", "void create(Student entity);", "public void saveSupplier(Supplier supplier) throws DataAccessException {\r\n getHibernateTemplate().saveOrUpdate(supplier);\r\n }", "void create(T entity);", "public LdPublisher newMyEntity() {\r\n return new LdPublisher();\r\n }", "private DisplayProviderEntity dbEntityToDisplayEntity(ProviderEntity providerEntity) {\n\t\tDisplayProviderEntity displayProviderEntity = new DisplayProviderEntity();\n\t\tdisplayProviderEntity.setId(providerEntity.getId());\n\t\tdisplayProviderEntity.setUserId(providerEntity.getUserId());\n\t\tdisplayProviderEntity.setProvider(providerEntity.getProvider());\n\t\treturn displayProviderEntity;\n\t}", "@Override\n\tpublic DAOProveedor crearDAOProveedor() {\n\t\treturn new DAOProveedor();\n\t}", "public boolean makeSupplier(int id) {\n\t\t\t/*String query=\"select Role from registration_customer_data where id=?\";\n\t\t\tString role = (String) template.queryForObject(\n\t\t\t\t\tquery, new Object[] { id }, String.class);\n System.out.println(\"name==\"+role);\n \n*/ String role=\"Supplier\";\n\t\t\ttemplate.update(\n \"update registration_customer_data set Role = ? where id = ?\", \n role, id);\n boolean flag=true;\n return flag;\n\t\t}", "public List getEpSupplier() {\n\t\treturn getHibernateTemplate().find(\" from JSupplierNh \");\n\t}", "@Override\n public EntityDealer create(String dealerId) {\n EntityDealer entityDealer = new EntityDealerImpl();\n\n entityDealer.setNew(true);\n entityDealer.setPrimaryKey(dealerId);\n\n return entityDealer;\n }", "@Override\n\tpublic Map<String, Object> create(StoreBase entity) {\n\t\treturn null;\n\t}", "ProductPurchaseItem getSupplierProductPurchaseItemPerCatalogNo(long suppId, String catalogNo);", "public Supplier findSupplier(int suppliernum, boolean retrieveAssociation);", "public static Benefit createEntity(EntityManager em) {\n Benefit benefit = new Benefit()\n .startDate(DEFAULT_START_DATE)\n .endDate(DEFAULT_END_DATE)\n .benefitType(DEFAULT_BENEFIT_TYPE);\n return benefit;\n }", "public static EnergyEntityFactory getInstance() {\r\n if (instance == null) {\r\n instance = new EnergyEntityFactory();\r\n }\r\n return instance;\r\n }", "public static Desert getDesertInstance() {\n if (desertInstance == null) {\n desertInstance = new Desert();\n }\n return desertInstance;\n }", "public void saveSupplier(Supplier e){ \n\t template.save(e); \n\t}", "@Override\n\tpublic int create(Proveedor r) {\n\t\treturn 0;\n\t}", "T createEntity(ResultSet resultSet)\n throws CreatorException;", "int insert(SupplierInfo record);", "public void setSupplier(Supplier supplier) {\n this.supplier = supplier;\n }", "public static ApplicantContactInfo createEntity(EntityManager em) {\n ApplicantContactInfo applicantContactInfo = new ApplicantContactInfo()\n .applicantsHomeAddress(DEFAULT_APPLICANTS_HOME_ADDRESS)\n .telephoneNumber(DEFAULT_TELEPHONE_NUMBER)\n .email(DEFAULT_EMAIL)\n .employer(DEFAULT_EMPLOYER)\n .employersAddress(DEFAULT_EMPLOYERS_ADDRESS);\n return applicantContactInfo;\n }", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "protected abstract EntityBase createEntity() throws Exception;", "public int addSupplierEntity(SupplierEntity originEntity) {\n\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n Integer supplierId = null;\n\n try {\n tx = session.beginTransaction();\n supplierId = (Integer) session.save(originEntity);\n tx.commit();\n log.warn(\"Added supplier: \" + originEntity + \" with id of: \" + supplierId);\n } catch (HibernateException e) {\n if (tx!=null) tx.rollback();\n log.error(e);\n } finally {\n session.close();\n }\n\n return supplierId;\n\n }", "public static GoodsReceiptDetails createUpdatedEntity(EntityManager em) {\n GoodsReceiptDetails goodsReceiptDetails = new GoodsReceiptDetails()\n .grnQty(UPDATED_GRN_QTY);\n return goodsReceiptDetails;\n }", "public Short getSuppliersId() {\n return suppliersId;\n }", "public void updateSupplierDetail(Supplier obj) {\n\t\t\r\n\t}", "@Override\n\tpublic Supplier getSupplierId(long supplierId) {\n\t\tString sql=\"SELECT * FROM supplier WHERE supplier_id=?\";\n\t\tRowMapper<Supplier> rowmapper=new BeanPropertyRowMapper<Supplier> (Supplier.class);\n\t\treturn this.getJdbcTemplate().queryForObject(sql, rowmapper, supplierId);\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\n\t\t\t\"ID: %d. Name: %s. Supplier: [ \"+supplier+\" ]\", id, name\n\t\t);\n\t}", "@Override\n\tpublic SupportEntity createSupportRecord(SupportEntity supportEntity) throws DBException {\n\t\ttry {\n\t\t\tSession session = sessionFactory.getCurrentSession();\n\t\t\tsupportEntity.setId((Long)session.save(supportEntity));\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\tif(logger.isErrorEnabled()){\n\t\t\t\tlogger.error(\"Exception Occred while creating Support Record [\"+supportEntity.getId()+\"] [\"+supportEntity.getEmailId()+\"]\");\n\t\t\t\tlogger.error(e.getMessage());\n\t\t\t}\n\t\t\tthrow new DBException(e.getMessage(),e);\n\t\t\t\n\t\t}\n\t\tif(logger.isDebugEnabled()){\n\t\t\tlogger.debug(\"Support Record is inserted with id [\"+supportEntity.getId()+\"] [\"+supportEntity.getMobileNo()+\"] [\"+supportEntity.getEmailId()+\"]\");\n\t\t}\n\t\treturn supportEntity;\n\t}", "public static Rentee createEntity(EntityManager em) {\n Rentee rentee = new Rentee();\n rentee = new Rentee()\n .firstName(DEFAULT_FIRST_NAME)\n .lastName(DEFAULT_LAST_NAME)\n .email(DEFAULT_EMAIL)\n .phoneNumber(DEFAULT_PHONE_NUMBER)\n .password(DEFAULT_PASSWORD);\n return rentee;\n }", "@Override\n\tpublic SupplierView getSupplierBySupplierIdAndProductId(long supplierId, long productId) {\n\t\tString sql=\"SELECT s.supplier_id, s.supplier_name, s.supplier_type,s.image,s.permanent_address, s.temporary_address,h.quantity,h.cost,i.product_id, i.product_name FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id INNER JOIN product i on h.product_product_id=i.product_id WHERE supplier_id=? and product_id=?\";\n\t\tRowMapper<SupplierView> rowmapper=new BeanPropertyRowMapper<SupplierView> (SupplierView.class);\n\t\treturn this.getJdbcTemplate().queryForObject(sql, rowmapper, supplierId, productId);\n\t}", "public EnergyEntity createEnergyEntity(final EnergyEntityType type,\r\n final EnergyEntityInput input) {\r\n return switch (type) {\r\n case CONSUMER -> new Consumer((ConsumerInput) input);\r\n case DISTRIBUTOR -> new Distributor((DistributorInput) input);\r\n case PRODUCER -> new Producer((ProducerInput) input);\r\n };\r\n }", "public E getEntity();", "@Override\n public Productor getProductor() {\n return new ProductorImp1();\n }", "public Performer create(Performer p) throws EVDBRuntimeException, EVDBAPIException {\n\t\tif (p.getSpid() != null) {\n\t\t\tthrow new EVDBRuntimeException(\"Create called on an performer with an existing SPID\");\n\t\t}\n\t\t\n\t\treturn createOrModify(p);\n\t}", "@Override\n\tpublic Item create() {\n\t\tLOGGER.info(\"Shoe Name\");\n\t\tString item_name = util.getString();\n\t\tLOGGER.info(\"Shoe Size\");\n\t\tdouble size = util.getDouble();\n\t\tLOGGER.info(\"Set Price\");\n\t\tdouble price = util.getDouble();\n\t\tLOGGER.info(\"Number in Stock\");\n\t\tlong stock = util.getLong();\n\t\tItem newItem = itemDAO.create(new Item(item_name, size, price, stock));\n\t\tLOGGER.info(\"\\n\");\n\t\treturn newItem;\n\t}", "public CatalArticle create(CatalArticle entity) {\n\t\tCatalArtFeatMapping features = entity.getFeatures();\n\n\t\tentity = repository.save(attach(entity));\n\n\t\tif (features == null) {\n\t\t\tfeatures = new CatalArtFeatMapping();\n\t\t}\n\t\tif (StringUtils.isBlank(features.getLangIso2())) {\n\t\t\tString lg = securityUtil.getUserLange();\n\t\t\tfeatures.setLangIso2(lg);\n\t\t}\n\t\tfeatures.setArtIdentif(entity.getIdentif());\n\t\tfeatures = featMappingEJB.create(features);\n\n\t\tCatalPicMapping picMapping = new CatalPicMapping();\n\t\tpicMapping.setArtIdentif(entity.getPic());\n\t\tpicMapping.setCode(entity.getPic());\n\t\tpicMapping.setCodeOrigin(cipOrigineEnumContract.getMain());\n\t\tpicMapping.setPriority(0);\n\t\tpicMappingEJB.create(picMapping);\n\n\t\tentity.setFeatures(features);\n\n\t\treturn entity;\n\t}" ]
[ "0.6401998", "0.61136496", "0.59030217", "0.588709", "0.5717994", "0.57083905", "0.5635192", "0.56151426", "0.5609544", "0.55986", "0.55568504", "0.5554517", "0.5530283", "0.5515992", "0.55114716", "0.5491158", "0.5490848", "0.54711735", "0.54625636", "0.5456994", "0.5446516", "0.5437491", "0.5421964", "0.5412406", "0.53932697", "0.5380397", "0.5379708", "0.5372564", "0.536071", "0.53525025", "0.53443563", "0.53443563", "0.5343069", "0.5342503", "0.5332613", "0.53252965", "0.53098196", "0.5307789", "0.5307118", "0.5291826", "0.5282438", "0.5273428", "0.5236873", "0.5226593", "0.52221286", "0.52199197", "0.5219815", "0.5217713", "0.5204026", "0.5195439", "0.51630527", "0.51538277", "0.51494807", "0.51494807", "0.5147871", "0.51430273", "0.5128754", "0.51274246", "0.5119068", "0.5118474", "0.51132613", "0.5099242", "0.5092808", "0.5090186", "0.5058178", "0.50519663", "0.5049547", "0.5049323", "0.5046579", "0.50460416", "0.5044246", "0.50373006", "0.5030387", "0.5025125", "0.5023644", "0.5017034", "0.501491", "0.50023013", "0.4991495", "0.49900806", "0.49897075", "0.49897075", "0.49897075", "0.49897075", "0.49882793", "0.49793273", "0.4965941", "0.49463755", "0.49454847", "0.49419075", "0.49403733", "0.4938181", "0.4937806", "0.4937379", "0.4931668", "0.4929462", "0.49286103", "0.49265617", "0.49234217", "0.49219128" ]
0.73872733
0
end getSupplierEntityExpert() / Suppliers cannot be deleted. To prevent further use, an End Date should be set instead.
public void remove() { throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT, getEntityDef().getFullName(), getPrimaryKey(), "AK", // Message product short name "FWK_TBX_T_SUP_NO_DELETE"); // Message name }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteProduct(Supplier entity) {\n\t\t\r\n\t}", "@Test\n public void getListSupplierByNotEndTime() {\n List<SupplierAnalysis> listSupplier = SupplierAnalysisDAO.supplierByTime(\"2020-10-10\", \"\", 1);\n\n Assert.assertTrue(listSupplier.size() > 0);\n }", "protected void beforeUpdateGoodsSupplier(\n RetailscmUserContext userContext,\n GoodsSupplier existed,\n String retailStoreCountryCenterId,\n String goodsSupplierId,\n int goodsSupplierVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}", "public void deleteSupplierEntity(SupplierEntity originEntity) {\n\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n session.delete(originEntity);\n tx.commit();\n log.warn(\"Deleted supplier: \" + originEntity + \" with id of: \" + originEntity.getSupplierId());\n\n } catch (HibernateException e) {\n\n if (tx!=null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n }", "@Test\n public void getListSupplierByNotStartTime() {\n List<SupplierAnalysis> listSupplier = SupplierAnalysisDAO.supplierByTime(\"\", \"2021-12-01\", 1);\n\n Assert.assertTrue(listSupplier.size() > 0);\n }", "@Override\n\tpublic void deleteIntoSupplierView(long supplierId, long productId) {\n\t\tString sql=\"DELETE FROM supplier_product WHERE supplier_supplier_id=? AND product_product_id=?\";\n\t\tgetJdbcTemplate().update(sql, supplierId, productId);\n\t}", "private void populateEntityToDeletetList()\r\n\t{\r\n\t\tentityNameListDelete = new ArrayList<String>();\r\n\t\tentityNameListDelete.add(\"edu.wustl.catissuecore.domain.Quantity\");\r\n\t\tentityNameListDelete\r\n\t\t\t\t.add(\"edu.wustl.catissuecore.domain.SpecimenCollectionRequirementGroup\");\r\n\t}", "@Override\n\tpublic void deleteIntoSupplier(long supplierId, long productId) {\n\t\tString sql=\"DELETE FROM supplier WHERE supplier_id IN(SELECT B.supplier_supplier_id FROM supplier_product B INNER JOIN product p ON B.product_product_id=p.product_id WHERE supplier_id=? AND B.product_product_id=?)\";\n\t getJdbcTemplate().update(sql, supplierId, productId);\n\t}", "private void cleanUpConsumedEsnRecords() {\n\t\tesnInfoRepository.findAllByIsConsumed(true).removeIf(item -> (Days\n\t\t\t\t.daysBetween(new DateTime(item.getDateImported()), new DateTime()).isGreaterThan(Days.days(30))));\n\t}", "public void deleteSupplierEntityById(int supplierEntityId) {\n\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n SupplierEntity entityToDelete = (SupplierEntity)session.get(SupplierEntity.class, supplierEntityId);\n session.delete(entityToDelete);\n tx.commit();\n log.warn(\"Deleted supplier: \" + entityToDelete + \" with id of: \" + supplierEntityId);\n\n } catch (HibernateException e) {\n\n if (tx!=null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n }", "public void setSupplierId(Long supplierId) {\n\t\tthis.supplierId = supplierId;\n\t}", "public void setSupplierPartId(String supplierPartId) {\r\n this.supplierPartId = supplierPartId;\r\n }", "public void delete(SupplierCard supplier) {\n supplier_dao.delete(supplier);\n }", "public void setSupplierId(Integer supplierId) {\n this.supplierId = supplierId;\n }", "@Override\n\tpublic void deleteEntityObj(StdMilkRate e) {\n\t\t\n\t}", "@Override\n\tpublic List<SupplierView> getSupplierByBuyDate(String supplyStartDate, String supplyLastDate) {\n\t\tString sql=\"SELECT s.supplier_id, s.supplier_name, s.supplier_type, s.image, s.permanent_address, s.temporary_address, h.quantity,h.cost,h.supplier_unique_id,h.buy_date,h.username,i.product_id, i.product_name FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id INNER JOIN product i on h.product_product_id=i.product_id WHERE buy_date>=?::DATE and buy_date<=?::DATE \";\n\t List<Map<String, Object>> row=getJdbcTemplate().queryForList(sql, supplyStartDate, supplyLastDate);\n\t List<SupplierView> supplier_view=new ArrayList<SupplierView>();\n\t for(Map<String, Object> rows:row)\n\t {\n\t \tSupplierView obj=new SupplierView();\n\t \tobj.setSupplierId((int)rows.get(\"supplier_id\"));\n\t \tSystem.out.println(obj.getSupplierId());\n\t \tobj.setSupplierName((String)rows.get(\"supplier_name\"));\n\t \tSystem.out.println(obj.getSupplierName());\n\t \tobj.setSupplierType((String)rows.get(\"supplier_type\"));\n\t obj.setImage((String)rows.get(\"image\"));\n\t obj.setPermanentAddress((String)rows.get(\"permanent_address\"));\n\t obj.setTemporaryAddress((String)rows.get(\"temporary_address\"));\n\t obj.setQuantity((int)rows.get(\"quantity\"));\n\t obj.setCost((double)rows.get(\"cost\"));\n\t obj.setBuyDate((Date)rows.get(\"buy_date\"));\n\t obj.setSupplierUniqueId((Integer) rows.get(\"supplier_unique_id\"));\n\t obj.setProductId((long)rows.get(\"product_id\"));\n\t obj.setProductName((String)rows.get(\"product_name\"));\n\t obj.setUsername((String) rows.get(\"username\"));\n\t supplier_view.add(obj);\n\t }\n\t return supplier_view;\n\t}", "protected void validateEntity()\n {\n super.validateEntity();\n \n Date startDate = getStartDate();\n Date endDate = getEndDate();\n \n validateStartDate(startDate);\n validateEndDate(endDate);\n\n // We validate the following here instead of from within an attribute because\n // we need to make sure that both values are set before we perform the test.\n\n if (endDate != null)\n {\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, whenever comparing jbo\n // Date objects, we have to convert to long values.\n \n long endDateLong = endDate.dateValue().getTime();\n\n // We can assume we have a Start Date or the validation of this \n // value would have thrown an exception.\n \n if (endDateLong < startDate.dateValue().getTime())\n {\n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_END_BAD\"); // Message name\n } \n } \n \n }", "public void setEnddate(Date enddate) {\r\n this.enddate = enddate;\r\n }", "public void setSupEntValid(Date supEntValid) {\n this.supEntValid = supEntValid;\n }", "public static SupplierEntityExpert getSupplierEntityExpert(OADBTransaction txn)\n { \n return (SupplierEntityExpert)txn.getExpert(SupplierEOImpl.getDefinitionObject()); \n \n }", "@Override\n\tpublic Long updateEndDate() {\n\t\treturn null;\n\t}", "public void newSupplierMode() {\n\n\t\tsupplierList.setEnabled(false);\n\t\taddressTF.setBackground(SystemColor.white);\n\n\t\tnameTF.setEditable(true);\n\t\tidTF.setEditable(false);\n\t\teMailTF.setEditable(true);\n\t\tnameTF.setEditable(true);\n\t\taddressTF.setEditable(true);\n\t\ttelTF.setEditable(true);\n\n\t\teditItemButton.setEnabled(false);\n\t\tremoveItemButton.setEnabled(false);\n\t\tsaveItemButton.setVisible(true);\n\t\tcancelBtn.setVisible(true);\n\n\t\tclearTextFields();\n\t}", "public void setSupplierId(Number value)\n {\n\n // BC4J validates that this can be updated only on a new line, and that this\n // mandatory attribute is not null. This code adds the additional check \n // of only allowing an update if the value is null to prevent changes while \n // the object is in memory.\n\n if (getSupplierId() != null)\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"SupplierId\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_ID_NO_UPDATE\"); // Message name\n\n }\n\n if (value != null)\n {\n // Supplier id must be unique. To verify this, you must check both the\n // entity cache and the database. In this case, it's appropriate\n // to use findByPrimaryKey( ) because you're unlikely to get a match, and\n // and are therefore unlikely to pull a bunch of large objects into memory.\n\n // Note that findByPrimaryKey() is guaranteed to check all suppliers. \n // First it checks the entity cache, then it checks the database.\n\n OADBTransaction transaction = getOADBTransaction();\n Object[] supplierKey = {value};\n EntityDefImpl supplierDefinition = SupplierEOImpl.getDefinitionObject();\n SupplierEOImpl supplier = \n (SupplierEOImpl)supplierDefinition.findByPrimaryKey(transaction, new Key(supplierKey));\n\n if (supplier != null)\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"SupplierId\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_ID_UNIQUE\"); // Message name \n }\n } \n \n setAttributeInternal(SUPPLIERID, value);\n \n }", "@Override\r\n\tpublic boolean checkExclusive(MMkEntity makerEntity) {\n\t\treturn false;\r\n\t}", "public void setSupplierId(int SupplierIdIn)\n {\n this.SupplierId = SupplierIdIn;\n }", "public void setSupEntRegdate(Date supEntRegdate) {\n this.supEntRegdate = supEntRegdate;\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-24 16:07:21.635 -0400\", hash_original_method = \"0561F1244FBCC9805D1AE0BB60B97B01\", hash_generated_method = \"0DCFBFD22CC66A3CE57FC05CFE303286\")\n \n public static void closeSupplicantConnection(){\n }", "@Test\n\tpublic void testPersistNewSupplierOrder() throws Exception {\n\t\tLong id = saveEntity();\n\t\tSupplierOrder order = dao.findById(id);\n\t\tassertNull(order.getUpdateDate());\n\t}", "public List<TblPurchaseOrderDetail>getAllDataPurchaseOrderDetail(TblSupplier supplier,TblPurchaseOrder po,RefPurchaseOrderStatus poStatus,TblItem item,Date startDate,Date endDate,TblPurchaseRequest mr);", "public void setSuppliersId(Short suppliersId) {\n this.suppliersId = suppliersId;\n }", "public String getSupplierPartId() {\r\n return this.supplierPartId;\r\n }", "public DamageSpace planToRemoveGoodsShelfListWithSupplierSpace(DamageSpace damageSpace, String supplierSpaceId, Map<String,Object> options)throws Exception{\n\t\t\t\t//SmartList<ThreadLike> toRemoveThreadLikeList = threadLikeList.getToRemoveList();\n\t\t//the list will not be null here, empty, maybe\n\t\t//getThreadLikeDAO().removeThreadLikeList(toRemoveThreadLikeList,options);\n\t\t\n\t\tMultipleAccessKey key = new MultipleAccessKey();\n\t\tkey.put(GoodsShelf.DAMAGE_SPACE_PROPERTY, damageSpace.getId());\n\t\tkey.put(GoodsShelf.SUPPLIER_SPACE_PROPERTY, supplierSpaceId);\n\t\t\n\t\tSmartList<GoodsShelf> externalGoodsShelfList = getGoodsShelfDAO().\n\t\t\t\tfindGoodsShelfWithKey(key, options);\n\t\tif(externalGoodsShelfList == null){\n\t\t\treturn damageSpace;\n\t\t}\n\t\tif(externalGoodsShelfList.isEmpty()){\n\t\t\treturn damageSpace;\n\t\t}\n\t\t\n\t\tfor(GoodsShelf goodsShelfItem: externalGoodsShelfList){\n\t\t\tgoodsShelfItem.clearSupplierSpace();\n\t\t\tgoodsShelfItem.clearDamageSpace();\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tSmartList<GoodsShelf> goodsShelfList = damageSpace.getGoodsShelfList();\t\t\n\t\tgoodsShelfList.addAllToRemoveList(externalGoodsShelfList);\n\t\treturn damageSpace;\n\t}", "private void requestDeleteExpenseLineItem() throws ERTRestApiException {\n final Cursor cursor = getContext().getContentResolver().query(\n ExpenseEntry.CONTENT_URI,\n null,\n ExpenseEntry.COLUMN_IS_DELETED + \"='true'\",\n null, null\n );\n\n if(cursor.getCount() != 0) {\n cursor.moveToFirst();\n\n do {\n\n final int expenseLineItemId = cursor.getInt(cursor\n .getColumnIndex(ExpenseEntry.COLUMN_EXPENSE_ID));\n\n final long expenseLineItemBaseId = cursor.getLong(cursor\n .getColumnIndex(ExpenseEntry._ID));\n\n ERTRestApi.apiDeleteExpenseLineItem(\n expenseLineItemId,\n new ERTRestApi.ERTRestApiListener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n getContext().getContentResolver().delete(\n ExpenseEntry.buildExpenseUri(expenseLineItemBaseId),\n null, null\n );\n }\n },\n new ERTRestApi.ERTRestApiErrorListener() {\n @Override\n public void onErrorResponse(ERTRestApi.ERTRestApiError error) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ExpenseEntry.COLUMN_IS_DELETED, \"false\");\n getContext().getContentResolver().update(\n ExpenseEntry.buildExpenseUri(expenseLineItemBaseId),\n contentValues, null, null\n );\n }\n }\n );\n\n } while (cursor.moveToNext());\n cursor.close();\n }\n }", "protected void beforeUpdateGoodsSupplierProperties(\n RetailscmUserContext userContext,\n GoodsSupplier item,\n String retailStoreCountryCenterId,\n String id,\n String name,\n String supplyProduct,\n String contactNumber,\n String description,\n String[] tokensExpr)\n throws Exception {\n }", "public String getSuppliersInforId() {\n return suppliersInforId;\n }", "public void setEndDate(Date end)\r\n {\r\n this.endDate = end;\r\n }", "public void setSuppliersInforId(String suppliersInforId) {\n this.suppliersInforId = suppliersInforId;\n }", "public void SuppIndispo(String date, int refEnseignant) throws SQLException {\r\n\r\n\t\ttry {\r\n\r\n\t\t\t/** Connection à la base - Étape 2 */\r\n\t\t\tString url = \"jdbc:oracle:thin:@miage03.dmiage.u-paris10.fr:1521:MIAGE\";\r\n\t\t\tConnection cx = DriverManager.getConnection(url, \"maletell\",\r\n\t\t\t\t\t\"matthieu\");\r\n\t\t\tStatement request = cx.createStatement();\r\n\r\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\r\n\t\t\tjava.util.Date dateD = format.parse(date);\r\n\t\t\tGregorianCalendar cal = new java.util.GregorianCalendar();\r\n\t\t\tcal.setTime(dateD);\r\n\r\n\t\t\trequest.executeUpdate(\"DELETE FROM Indisponibilite WHERE NO_ENSEIGNANT = \"\r\n\t\t\t\t\t+ refEnseignant\r\n\t\t\t\t\t+ \" AND DATE_INDISPO = \"\r\n\t\t\t\t\t+ DAO.dateFromJavaToOracle(cal));\r\n\r\n\t\t\tcx.commit();\r\n\t\t\trequest.close();\r\n\t\t\tcx.close();\r\n\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\r\n public void dispenseProduct() {\r\n System.out.println(\"Insufficient funds!\");\r\n\r\n }", "@Override\n public void deleteEntity(String entitySetName, OEntityKey entityKey) {\n super.deleteEntity(entitySetName, entityKey);\n }", "public void editSupplierMode() {\n\n\t\t// disable selection list\n\t\tsupplierList.setEnabled(false);\n\t\taddressTF.setBackground(Color.white);\n\n\t\tnameTF.setEditable(false);\n\t\tidTF.setEditable(false);\n\t\teMailTF.setEditable(true);\n\t\taddressTF.setEditable(true);\n\t\ttelTF.setEditable(true);\n\n\t\t// disable/enable appropriate buttons\n\t\tremoveItemButton.setEnabled(false);\n\t\tnewCustomerButton.setEnabled(false);\n\t\tsaveItemButton.setVisible(true);\n\t\tcancelBtn.setVisible(true);\n\t}", "public List getEpSupplier() {\n\t\treturn getHibernateTemplate().find(\" from JSupplierNh \");\n\t}", "public void setSupplierid(Integer supplierid) {\r\n this.supplierid = supplierid;\r\n }", "public Date getSupEntValid() {\n return supEntValid;\n }", "@Override\n\tpublic void delete(ExperTypeVO expertypeVO) {\n\n\t}", "@Override\n\tpublic void remove(EmpType entity) {\n\t\t\n\t}", "public void entityDeactivating() {}", "public List<TblPurchaseOrder>getAllDataPurchaseOrder(Date startDate,Date endDate,TblPurchaseOrder po,TblSupplier supplier);", "public Short getSuppliersId() {\n return suppliersId;\n }", "@Override\n\tpublic String deleteMatStoreEmpSet(Map<String, Object> entityMap)\n\t\t\tthrows DataAccessException {\n\t\treturn null;\n\t}", "public List<SupplierEntity> getAllSuppliers() {\n\n List<SupplierEntity> suppliers = new ArrayList<SupplierEntity>();\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n suppliers = session.createQuery(\"FROM SupplierEntity ORDER BY supplierId\").list();\n tx.commit();\n\n } catch (HibernateException e) {\n\n if (tx != null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n return suppliers;\n\n }", "@Override\n\tpublic boolean checkUniqueSupplierProduct(Integer productId , Integer supplierId ) {\n\t\tloggerService\n\t\t\t\t.logServiceInfo(\"Start checkUniqueSupplierProduct Method with productId and supplierId\"\n\t\t\t\t\t\t+ productId + supplierId);\n\t\ttry {\n\n\t\t\t// SELECT * from PRODUCT_TYPE where NAME like '%s%' and SERVICE_ID =\n\t\t\t// 1;\n\t\t\tString query = \"select model FROM SupplierProduct model where lower(model.productId.id) = \"\n\t\t\t\t\t+ productId + \"and lower ( model.supplierId.id ) = \" + supplierId ;\n\n\t\t\t\n\t\t\tList<ProductType> list = baseDao.findListByQuery(query);\n\t\t\tloggerService\n\t\t\t\t\t.logServiceInfo(\"End checkUniqueSupplierProduct Method\");\n\t\t\treturn list.size() > 0 ? false : true;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tloggerService.logServiceError(\n\t\t\t\t\t\"can't checkUniqueProductWithService\", e);\n\t\t\treturn false;\n\t\t}\n\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.386 -0400\", hash_original_method = \"F3C876DD74F33E9CECF242C89ED82239\", hash_generated_method = \"3907ACD5B181E10767044019512143D3\")\n \n public static boolean stopSupplicant(){\n \t//Formerly a native method\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }", "public Date getEnddate() {\r\n return enddate;\r\n }", "@Override\n\tpublic List<InempDiscountPlanEntity> queryInempDiscountPlanEntity(\n\t\t\tDate recevieDate) {\n\t\treturn null;\n\t}", "public void updateSupplierEntity(SupplierEntity originEntity) {\n\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n session.update(originEntity);\n tx.commit();\n log.warn(\"Updated supplier: \" + originEntity + \" with id of: \" + originEntity.getSupplierId());\n\n } catch (HibernateException e) {\n\n if (tx!=null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n }", "public SupplierEntity getSupplierEntity(int supplierId) {\n\n SupplierEntity originEntity = new SupplierEntity();\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n originEntity = (SupplierEntity)session.get(SupplierEntity.class, supplierId);\n tx.commit();\n if (originEntity != null) {\n log.warn(\"Retrieved supplier: \" + originEntity + \" with id of: \" + originEntity.getSupplierId());\n }\n } catch (HibernateException e) {\n\n if (tx!=null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n return originEntity;\n\n }", "public Date getFechaExclusion()\r\n/* 160: */ {\r\n/* 161:178 */ return this.fechaExclusion;\r\n/* 162: */ }", "public void clearSupplier()\n // -end- 335C0D7A02E4 remove_all_head327A646F00E6 \"Dependency::clearSupplier\"\n ;", "public Long getSupplierId() {\n\t\treturn supplierId;\n\t}", "public Date getSupEntRegdate() {\n return supEntRegdate;\n }", "public void deleteSupplier(Supplier e){ \n\t template.delete(e); \n\t}", "int insert(EcsSupplierRebate record);", "public void actionPerformed(ActionEvent arg){\n\t\t\t\tif(editSuppIdCombo.getSelectedIndex() != 0){\n\t\t\t\t\tfor(Supplier supplier: suppliers){\n\t\t\t\t\t\tif(supplier.getId() == Integer.parseInt(editSuppIdCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\tlistOfSuppliers.removeElement(editSuppIdCombo.getSelectedItem().toString());\n\t\t\t\t\t\t\tsuppIdCombo.removeItem(editSuppIdCombo.getSelectedItem());\n\t\t\t\t\t\t\tsuppNameCombo.removeItem(editSuppIdCombo.getSelectedItem());\n\t\t\t\t\t\t\teditSuppIdCombo.removeItem(editSuppIdCombo.getSelectedItem());\n\t\t\t\t\t\t\tsuppliers.remove(supplier);\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Supplier Deleted\");\n\t\t\t\t\t\t\teditSuppIdCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\teditSupplierName.setText(\"\");\n\t\t\t\t\t\t\teditSupplierAddress.setText(\"\");\n\t\t\t\t\t\t\teditSupplierEmail.setText(\"\");\n\t\t\t\t\t\t\teditSupplierPhone.setText(\"\");\n\t\t\t\t\t\t\teditSupplierDelivery.setText(\"\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Supplier.\");\n\t\t\t\t}\n\t\t\t}", "public void setExpEndDate(Date expEndDate) {\n\t\tthis.expEndDate = expEndDate;\n\t}", "public void changeSupplier(ModelElement oldSupplier, ModelElement newSupplier)\n // -end- 3E423DCA0134 head327A646F00E6 \"changeSupplier\"\n // declare any checked exceptions\n // please fill in/modify the following section\n // -beg- preserve=no 3E423DCA0134 throws327A646F00E6 \"changeSupplier\"\n\n // -end- 3E423DCA0134 throws327A646F00E6 \"changeSupplier\"\n ;", "@Override\n\tpublic void excluir(Produto entidade) {\n\n\t}", "@Test\n\tpublic void testSuppCompany() {\n\n\t\tSuppCompany suppCompany =new SuppCompany();\n\t\tsuppCompany.setName(\"www\");\n\t\tsuppCompanyService.update(suppCompany,new EntityWrapper<SuppCompany>().eq(false,\"name\",\"yyy\"));\n\t}", "@Override\n\tpublic int getNoofSupplier(String supplyStartDate, String supplyLastDate) {\n\t\tString sql=\"SELECT COUNT(h.supplier_supplier_id) FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id WHERE buy_date>=?::Date and buy_date<=?::Date\";\n\t\tint total=this.getJdbcTemplate().queryForObject(sql, Integer.class, supplyStartDate, supplyLastDate);\n\t\treturn total;\n\t}", "@Override\n\tpublic void dispenseChange(String productCode) {\n\t\t\n\t}", "public void setSupplier(Supplier supplier) {\n this.supplier = supplier;\n }", "@Override\r\n\tpublic void delete(PartyType entity) {\n\t\t\r\n\t}", "public List<SupplierEntity> getSuppliersExclType(String typeName) {\n\n List<SupplierEntity> suppliers = new ArrayList<>();\n\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n\n Criteria criteria = session.createCriteria(SupplierEntity.class);\n criteria.createCriteria(\"supplierType\").add(Restrictions.ne(\"name\", typeName));\n\n // Language lang = (Language)super.findByCriteria(criteria).get(0);\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n suppliers = criteria.list();\n\n } catch (HibernateException e) {\n\n if (tx != null) {\n tx.rollback();\n }\n\n log.error(e.getStackTrace());\n\n } finally {\n session.close();\n }\n\n return suppliers;\n\n }", "public Company getChg() {return chgEntity;}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:24:54.390 -0400\", hash_original_method = \"FDBC430C1B6660E61654ED3753DA4474\", hash_generated_method = \"3E83CEFA60CCC9B6AC847229B4E47BDB\")\n \n public static boolean killSupplicant(){\n \t//Formerly a native method\n \tdouble taintDouble = 0;\n \n \treturn ((taintDouble) == 1);\n }", "public void delete(HrJBorrowcontract entity);", "@Override\n public List<KitchenSupplier> getKitchenSupplier(String supplierName) {\n Query query = em.createQuery(\"SELECT k FROM KitchenSupplier k WHERE k.ksupplierName = :inSupplierName\");\n query.setParameter(\"inSupplierName\", supplierName);\n List<KitchenSupplier> s = null;\n try {\n s = query.getResultList();\n } catch (NoResultException ex) {\n System.out.println(\"caught no result exception\");\n }\n return s;\n }", "public void executeQBEAdvancedCriteria() {\n Session session = getSession();\n Transaction transaction = session.beginTransaction();\n\n // SELECT p.id, p.description, p.name, p.price, p.supplier_id, p.version, p.DTYPE, s.id, s.name\n // FROM Product p\n Criteria productCriteria = session.createCriteria(Product.class);\n\n // INNER JOIN Supplier s\n // ON p.supplier_id = s.id\n Criteria supplierCriteria = productCriteria.createCriteria(\"supplier\");\n\n // WHERE (s.name = 'SuperCorp')\n Supplier supplier = new Supplier();\n supplier.setName(\"SuperCorp\");\n\n supplierCriteria.add(Example.create(supplier));\n\n // AND (p.name LIKE 'M%')\n Product product = new Product();\n product.setName(\"M%\");\n\n Example productExample = Example.create(product);\n\n // TODO: Why must the price column be excluded?\n productExample.excludeProperty(\"price\");\n productExample.enableLike();\n\n productCriteria.add(productExample);\n\n displayProductsList(productCriteria.list());\n transaction.commit();\n }", "@Override\n\tpublic List<Equipment> getEquipmentByDate(String dateStart, String dateEnd) {\n\t\treturn dao.getEquipmentByDate(dateStart, dateEnd);\n\t}", "public void setDtEnd(Date dtEnd) {\r\n this.dtEnd = dtEnd;\r\n }", "String getSupplierID();", "@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}", "public void updateSupplierDetail(Supplier obj) {\n\t\t\r\n\t}", "public String deceasedDate() {\n return getString(FhirPropertyNames.PROPERTY_DECEASED_DATE);\n }", "public Date getFechaAutorizacionGastoExpediente() {\r\n return fechaAutorizacionGastoExpediente;\r\n }", "public void setEndDate(String date){\n\t\tthis.endDate = date;\n\t}", "@Override\n\tpublic void delete(EntityManagerFactory emf, Stop entity) {\n\t\t\n\t}", "public static void removeByGDFTendersByUserId(long supplierId) {\n\t\tgetPersistence().removeByGDFTendersByUserId(supplierId);\n\t}", "public String getSupplierName() {\n return supplierName;\n }", "public void setEndDate(Date endDate) {\r\n this.endDate = endDate;\r\n }", "public void setEndDate(Date endDate) {\r\n this.endDate = endDate;\r\n }", "@Override\n\tpublic String disposeHtcIncomeProjectCostDeptCost(\n\t\t\tMap<String, Object> entityMap) throws DataAccessException {\n\t\ttry{\n\t\t\t\n\t\t\thtcIncomeProjectCostDeptCostMapper.disposeHtcIncomeProjectCostDeptCost(entityMap);\n\t\t\t\n\t\t\treturn \"{\\\"msg\\\":\\\"采集成功.\\\",\\\"state\\\":\\\"true\\\"}\";\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\t\n\t\t\tlogger.error(e.getMessage(), e);\n\t\t\t\n\t\t\tthrow new SysException(\"{\\\"error\\\":\\\"采集失败\\\"}\");\n\n\t\t}\t\n\t}", "public Integer getSupplierId() {\n return supplierId;\n }", "@Override\r\n\tpublic List<Price> queryCheng(Date start,Date end) {\n\t\tList<Price> list = homePageDao.queryCheng(start,end);\r\n\t\treturn list;\r\n\t}", "@Test\n\tvoid grantScholarshipRejected() {\n\t\tScholarship scholarship= iScholarshipService.getById(1000).orElse(null);\n\t\tStudent student= iStudentService.findByStudentId(168);\n\t\tassertEquals(null,iOfficerService.grantApproval(scholarship, student));\n\t\t\n\t}", "@Override\r\n\tpublic GlobalResult deleteEquip(String mspno) {\n\t\treturn null;\r\n\t}", "public void setSupplierName(String supplierName) {\n this.supplierName = supplierName == null ? null : supplierName.trim();\n }", "public void setCertifiedDate(Date deprovisioningCertifiedDate) {\r\n this.setCertifiedMillis(deprovisioningCertifiedDate == null ? null : deprovisioningCertifiedDate.getTime());\r\n }", "public Date getExpEndDate() {\n\t\treturn this.expEndDate;\n\t}", "public void validateEndDate(Date value)\n {\n \n if (value != null)\n {\n OADBTransaction transaction = getOADBTransaction();\n\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, you cannot compare \n // oracle.jbo.domain.Date objects directly. Instead, convert the value to \n // a long as shown.\n \n long sysdate = transaction.getCurrentDBDate().dateValue().getTime();\n long endDate = value.dateValue().getTime();\n\n if (endDate < sysdate)\n { \n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"EndDate\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_END_DATE_PAST\"); // Message name\n } \n }\n\n }" ]
[ "0.59738994", "0.5781778", "0.54923004", "0.5483536", "0.5396945", "0.53787744", "0.5305599", "0.5301475", "0.52334887", "0.51028156", "0.50710595", "0.5063945", "0.504687", "0.50308007", "0.5026462", "0.50044394", "0.4988109", "0.49750075", "0.4960377", "0.49537674", "0.4943898", "0.49299905", "0.49228737", "0.49213615", "0.4910753", "0.4909856", "0.49040166", "0.48811847", "0.48717538", "0.4869542", "0.48668694", "0.48605686", "0.4852413", "0.48320565", "0.4819707", "0.48165804", "0.48032284", "0.48013756", "0.4801338", "0.4792533", "0.47871986", "0.47834823", "0.4773209", "0.47491163", "0.4739731", "0.47369078", "0.4735858", "0.47247258", "0.47202256", "0.47192222", "0.47133145", "0.4703834", "0.47034407", "0.4702276", "0.46962166", "0.4688944", "0.46888202", "0.468711", "0.46809432", "0.46686247", "0.46557826", "0.46552265", "0.46478933", "0.46464866", "0.46444154", "0.4641101", "0.46410707", "0.46396738", "0.46391115", "0.46338877", "0.46304616", "0.46303523", "0.46296602", "0.46243516", "0.46180177", "0.46108454", "0.46070516", "0.4603412", "0.46029648", "0.45943588", "0.4593208", "0.45898706", "0.45879197", "0.4585212", "0.4584369", "0.45779544", "0.45724607", "0.45655093", "0.45653263", "0.45611966", "0.45611966", "0.45564574", "0.45538417", "0.4545923", "0.45451826", "0.454125", "0.45387805", "0.45371827", "0.45249763", "0.45201802" ]
0.4620888
74
end remove() / Performs entitylevel validation. This includes any validation which should be performed after the individual attributes are validated.
protected void validateEntity() { super.validateEntity(); Date startDate = getStartDate(); Date endDate = getEndDate(); validateStartDate(startDate); validateEndDate(endDate); // We validate the following here instead of from within an attribute because // we need to make sure that both values are set before we perform the test. if (endDate != null) { // Note that we want to truncate these values to allow for the possibility // that we're trying to set them to be the same day. Calling // dateValue( ) does not include time. Were we to want the time element, // we would call timestampValue(). Finally, whenever comparing jbo // Date objects, we have to convert to long values. long endDateLong = endDate.dateValue().getTime(); // We can assume we have a Start Date or the validation of this // value would have thrown an exception. if (endDateLong < startDate.dateValue().getTime()) { throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT, getEntityDef().getFullName(), getPrimaryKey(), "AK", // Message product short name "FWK_TBX_T_START_END_BAD"); // Message name } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void validateEntity() {\n super.validateEntity();\n }", "@Override\n\tpublic void removeUpdate(DocumentEvent e) {\n\t\tvalidateNameField();\n\t}", "public boolean validateRemove( CoShapePageItemView pageItemView )\n{\n\t/*\n\tif\n\t\t( ( m_childConstraint != null ) && ! m_childConstraint.validateRemove( pageItemView ) )\n\t{\n\t\treturn false;\n\t}\n*/\n\n\tif\n\t\t( ! pageItemView.validateRemoveFrom( this, true ) )\n\t{\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "public void removeFromIntegrityChecks(entity.LoadIntegrityCheck element);", "@Override\r\n public void removeValidListener(ValidListener l) {\n\r\n }", "abstract protected void removeEntity(Entity entity);", "public void validateForSave() throws NSValidation.ValidationException {\n\t\tvalidateObjectMetier();\n\t\tvalidateBeforeTransactionSave();\n\t\tsuper.validateForSave();\n\n\t}", "public void validateForSave() throws NSValidation.ValidationException {\n\t\tvalidateObjectMetier();\n\t\tvalidateBeforeTransactionSave();\n\t\tsuper.validateForSave();\n\n\t}", "public void validateForSave() throws NSValidation.ValidationException {\n\t\tvalidateObjectMetier();\n\t\tvalidateBeforeTransactionSave();\n\t\tsuper.validateForSave();\n\n\t}", "public void entityRemoved() {}", "void remove(RecordItemValidatorIF itemValidator);", "@Override\r\n\tpublic void validateIntegrityConstraint() {\n\t\tvalidatorEngine.validate(entity);\r\n\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@PreRemove\r\n public void preRemove() {\r\n\r\n }", "public void validate() throws org.apache.thrift.TException {\n if (entity != null) {\r\n entity.validate();\r\n }\r\n }", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "public abstract void validate () throws ModelValidationException;", "@Override\r\n\tpublic void validateDelete() throws Exception {\n\r\n\t}", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "@Override\n public void clear() {\n validations.remove();\n }", "public void validate() {\n\t\tthis.invalidated = false;\n\t}", "public void remove(int offs,int len) throws BadLocationException {\n super.remove(offs, len);\r\r\r\r\r\r\n System.out.println(\"[*********]REMOVE\");\r\r\r\r\r\r\n if(validate==false){ \r\r\r\r\r\r\n String result = m_parent.getGrp_TField_encode().getText(0,getLength()); \r\r\r\r\r\r\n System.out.println(\"je remove \"+result.length());\r\r\r\r\r\r\n if (result.length() >= m_longeur_saisie && m_longeur_saisie!=0 ) {\r\r\r\r\r\r\n System.out.println(\"+grand \"+result);\r\r\r\r\r\r\n if(m_parent.getGrp_PopMenu_popup().isVisible())\r\r\r\r\r\r\n search(result);\r\r\r\r\r\r\n }\r\r\r\r\r\r\n else\r\r\r\r\r\r\n {\r\r\r\r\r\r\n System.out.println(\"+petit \"+result); \r\r\r\r\r\r\n affichePopup(false);\r\r\r\r\r\r\n charger=false; \r\r\r\r\r\r\n m_model.setM_vector(null);\r\r\r\r\r\r\n } \r\r\r\r\r\r\n }\r\r\r\r\r\r\n else{\r\r\r\r\r\r\n affichePopup(false);\r\r\r\r\r\r\n }\r\r\r\r\r\r\n }", "@Override\n\tpublic void validate() {\n\t\tsuper.validate();\n\t}", "@Override\n public void removeAttributes()\n {\n attributes.clear();\n }", "public void validate(){\n ArrayList<User> u1 = new ArrayList<User>();\n u1.addAll(Application.getApplication().getUsers());\n u1.add(this);\n\n ArrayList<User> u2 = new ArrayList<User>();\n \n u2.addAll(Application.getApplication().getNonValidatedUsers());\n u2.remove(this);\n\n Application.getApplication().setUsers(u1);\n Application.getApplication().setNonValidatedUsers(u2);\n }", "public void remove()\n { \n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_NO_DELETE\"); // Message name\n \n }", "@Override\n\tpublic void remove(EmpType entity) {\n\t\t\n\t}", "@Override\n\tpublic void remove(Object entity) {\n\t\t\n\t}", "void validate() throws ValidationException;", "@Override\n\t\tprotected void revalidate() {\n\t\t\tvalid = true;\n\t\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\n public void remove() {\n }", "@Override\n protected void validaRegrasExcluir(ArquivoLoteVO entity) throws AppException {\n\n }", "void unsetRequired();", "@Override\n public void remove() {\n }", "void removeConstraintEntity(IViewEntity entity);", "@Override\r\n\tprotected void validate() {\n\t}", "private final void validateBeforeTransactionSave() throws NSValidation.ValidationException {\n\n\t}", "private final void validateBeforeTransactionSave() throws NSValidation.ValidationException {\n\n\t}", "private final void validateBeforeTransactionSave() throws NSValidation.ValidationException {\n\n\t}", "private final void validateBeforeTransactionSave() throws NSValidation.ValidationException {\n\n\t}", "@Override\r\n public void validate() {\r\n }", "public void preRemove(T entity) {\n }", "@Override\n\tpublic void validate() {\n\t}", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "public void validate() throws ValidationException {\n\t}", "@Override\n public void removeUpdate(DocumentEvent e) {\n verifierSaisie();\n }", "@Override\n public void removeFromDb() {\n }", "@Override\r\n\t\t\t\t\tpublic void removeUpdate(DocumentEvent e) {\n\t\t\t\t\t\tcheckID();\r\n\t\t\t\t\t}", "protected void validate() {\n // no op\n }", "private final void validateBeforeTransactionSave() throws NSValidation.ValidationException {\n \n }", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "public void validateObjectMetier() throws NSValidation.ValidationException {\n\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void remove() {\n\r\n\t\t}", "public void removeFromLinesOfBusiness(entity.AppCritLineOfBusiness element);", "Form clearValidation();", "private void clearValidationError() {\n\n\t\tdataValid = false;\n\n\t\tvalidationErrorPending = false;\n\t\tvalidationErrorParent = null;\n\t\tvalidationErrorTitle = null;\n\t\tvalidationErrorMessage = null;\n\t\tvalidationErrorType = 0;\n\t}", "public void remove() {\n\n }", "@Override\n\tpublic boolean validate() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean validate() {\n\t\treturn false;\n\t}", "@Override\n\tpublic void remove() { }", "@Override\n\tpublic void removeForm(ERForm form) {\n\t\t\n\t}", "private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }", "public void attributDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}", "public void removeAttribute() {\n attributesToRemove = \"\";\r\n for (AttributeRow attribute : listAttributes) {\r\n if (attribute.isSelected()) {\r\n attributesToRemove = attributesToRemove + (attribute.getIdAttribute() + 1) + \",\";\r\n }\r\n }\r\n if (attributesToRemove.length() != 0) {\r\n attributesToRemove = attributesToRemove.substring(0, attributesToRemove.length() - 1);\r\n RequestContext.getCurrentInstance().execute(\"PF('wvDlgConfirmRemoveAttribute').show()\");\r\n } else {\r\n printMessage(\"Error\", \"You must select the attributes to be removed\", FacesMessage.SEVERITY_ERROR);\r\n }\r\n }", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "@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 }", "@Override\r\n\tpublic void Validate() {\n\r\n\t}", "@Override\n public void validate() throws ValidationExceptions {\n ValidationExceptions errors = null;\n if (getState().getState() == EEntityState.Unknown) {\n errors = ValidationExceptions.add(new ValidationException(\n String.format(\"Entity State is Unknown : [id=%s]\",\n getKey().toString())), errors);\n }\n errors = validate(errors);\n\n if (errors != null) {\n getState().setError(errors);\n throw errors;\n }\n }", "public void removeValidationListener(ValidationErrorListener listener);", "@Override\n public void validateModel() {\n }", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "protected abstract void checkRemoved();", "public void remove() {\r\n super.remove();\r\n }", "public void validate () throws ModelValidationException\n\t\t\t{\n\t\t\t\tkeyClassName = validateKeyClassName(className);\n\t\t\t\t// initilialize keyClass field \n\t\t\t\tkeyClass = getModel().getClass(keyClassName, getClassLoader());\n\t\t\t\tvalidateClass();\n\t\t\t\tvalidateConstructor();\n\t\t\t\tvalidateFields();\n\t\t\t\tvalidateMethods();\n\t\t\t}", "protected boolean beforeRemove() {\n return true;\n }", "public void cleanProposition();", "@Override\r\n\tpublic void validateSave() throws Exception {\n\r\n\t}", "@Override\n\tpublic void attributeRemoved(TGAttribute attribute, TGEntity owner) {\n gLogger.log(TGLogger.TGLevel.Debug, \"Attribute is removed\");\n\t}", "Form removeValidator(FormValidator validator);", "@PreRemove\r\n public void preRemove(){\r\n this.isDeleted=true;\r\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }", "public void remove() {\n super.remove();\n }" ]
[ "0.6381371", "0.6246777", "0.61894345", "0.59190404", "0.59075886", "0.58935004", "0.5891023", "0.5891023", "0.5891023", "0.580315", "0.5788285", "0.5764223", "0.57595044", "0.57595044", "0.5756938", "0.5742785", "0.5709008", "0.5693382", "0.56925714", "0.56845266", "0.56718504", "0.56572175", "0.56543905", "0.56418854", "0.56261843", "0.56222427", "0.5620786", "0.56097436", "0.5599469", "0.5598677", "0.5592192", "0.55917084", "0.55917084", "0.55661607", "0.55493236", "0.55368507", "0.5533078", "0.5531963", "0.5521048", "0.55189747", "0.55189747", "0.55189747", "0.55189747", "0.5498681", "0.5490133", "0.5489071", "0.5471837", "0.547015", "0.54642195", "0.5454628", "0.54507035", "0.5436769", "0.5436576", "0.543486", "0.543486", "0.543486", "0.54313624", "0.54313624", "0.54313624", "0.54313624", "0.54313624", "0.54313624", "0.54313624", "0.54313624", "0.5424859", "0.542243", "0.5422371", "0.5420005", "0.5416532", "0.5412257", "0.5412257", "0.54086846", "0.5393901", "0.5382664", "0.5369063", "0.53679657", "0.5361346", "0.5358681", "0.53495115", "0.5340802", "0.5336926", "0.53355694", "0.5322774", "0.5322774", "0.5322774", "0.5299542", "0.5290709", "0.5278319", "0.5277584", "0.5263579", "0.5256835", "0.52525854", "0.52462053", "0.52457505", "0.5237221", "0.5237221", "0.5237221", "0.5237221", "0.5237221", "0.5237221" ]
0.5264522
89
end validateEntity() / Sets value as the attribute value for SupplierId Business Rules: Supplier id is required. Supplier id cannot be updated on a committed row. Supplier id must be unique.
public void setSupplierId(Number value) { // BC4J validates that this can be updated only on a new line, and that this // mandatory attribute is not null. This code adds the additional check // of only allowing an update if the value is null to prevent changes while // the object is in memory. if (getSupplierId() != null) { throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT, getEntityDef().getFullName(), // EO name getPrimaryKey(), // EO PK "SupplierId", // Attribute Name value, // Attribute value "AK", // Message product short name "FWK_TBX_T_SUP_ID_NO_UPDATE"); // Message name } if (value != null) { // Supplier id must be unique. To verify this, you must check both the // entity cache and the database. In this case, it's appropriate // to use findByPrimaryKey( ) because you're unlikely to get a match, and // and are therefore unlikely to pull a bunch of large objects into memory. // Note that findByPrimaryKey() is guaranteed to check all suppliers. // First it checks the entity cache, then it checks the database. OADBTransaction transaction = getOADBTransaction(); Object[] supplierKey = {value}; EntityDefImpl supplierDefinition = SupplierEOImpl.getDefinitionObject(); SupplierEOImpl supplier = (SupplierEOImpl)supplierDefinition.findByPrimaryKey(transaction, new Key(supplierKey)); if (supplier != null) { throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT, getEntityDef().getFullName(), // EO name getPrimaryKey(), // EO PK "SupplierId", // Attribute Name value, // Attribute value "AK", // Message product short name "FWK_TBX_T_SUP_ID_UNIQUE"); // Message name } } setAttributeInternal(SUPPLIERID, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSupplierId(Integer supplierId) {\n this.supplierId = supplierId;\n }", "public void setSupplierId(int SupplierIdIn)\n {\n this.SupplierId = SupplierIdIn;\n }", "@Override\n\tpublic boolean updateSupplier(Supplier_model s) \n\t{\n\t\t\t\tboolean flag=false;\n\t\t\t\ttry{\n\t\t\t\t\tsession=hibernateUtil.openSession();\n\t\t\t\t\ttx=session.beginTransaction();\n\t\t\t\t\tQuery q=session.createQuery(\"update Supplier_model set suppliername='\"+s.getSuppliername()+\"', description='\"+s.getDescription()+\"', emailid='\"+s.getEmailid()+\"', suppcompanyid='\"+s.getSuppcompanyid()+\"', phone='\"+s.getPhone()+\"', mobile1='\"+s.getMobile1()+\"', mobile2='\"+s.getMobile2()+\"', website='\"+s.getWebsite()+\"', address='\"+s.getAddress()+\"', cid='\"+s.getCid()+\"', sid='\"+s.getSid()+\"', cityid='\"+s.getCityid()+\"', jobposition='\"+s.getJobposition()+\"', supptitleid='\"+s.getSupptitleid()+\"', faxno='\"+s.getFaxno()+\"', updated_by='\"+s.getUpdated_by()+\"' where supplierid=\"+s.getSupplierid());\n\t\t\t\t\tint i=q.executeUpdate();\n\t\t\t\t\tif(i>0)\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\ttx.commit();\n\t\t\t\t\t\n\t\t\t\t}catch(Throwable ex){\n\t\t\t\t\tif(tx!=null)\n\t\t\t\t\t\ttx.rollback();\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t\tfinally{\n\t\t\t\t\tsession.close();\n\t\t\t\t}\n\t\t\t\treturn flag;\n\t}", "public void setSupplierid(Integer supplierid) {\r\n this.supplierid = supplierid;\r\n }", "public void setSupplierId(Long supplierId) {\n\t\tthis.supplierId = supplierId;\n\t}", "public void updateSupplierEntity(SupplierEntity originEntity) {\n\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n session.update(originEntity);\n tx.commit();\n log.warn(\"Updated supplier: \" + originEntity + \" with id of: \" + originEntity.getSupplierId());\n\n } catch (HibernateException e) {\n\n if (tx!=null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n }", "@Override\n\tpublic void updateIntoSupplier(Supplier supplier) {\n\t\tString sql=\"UPDATE supplier SET supplier_name=?,supplier_type=?,permanent_address=?, temporary_address=?,email=?,image=? WHERE supplier_id=?\";\n\t getJdbcTemplate().update(sql, new Object[] {supplier.getSupplierName(), supplier.getSupplierType(),supplier.getPermanentAddress(), supplier.getTemporaryAddress(),supplier.getEmail(),supplier.getImage(),supplier.getSupplierId()});\n\t}", "public void update(SupplierCard supplier) {\n supplier_dao.update(supplier);\n }", "public void setName(String value)\n {\n // Since this value is marked as \"mandatory,\" the BC4J Framework will take\n // care of ensuring that it's a non-null value. However, if it is null, we\n // don't want to proceed with any validation that could result in a NPE.\n \n if ((value != null) || (!(\"\".equals(value.trim()))))\n {\n // Verify that the name is unique. To do this, we must check both the entity\n // cache and the database. We begin with the entity cache.\n\n com.sun.java.util.collections.Iterator supplierIterator = \n getEntityDef().getAllEntityInstancesIterator(getDBTransaction());\n \n Number currentId = getSupplierId();\n \n while ( supplierIterator.hasNext() )\n {\n SupplierEOImpl cachedSupplier = (SupplierEOImpl)supplierIterator.next();\n\n String cachedName = cachedSupplier.getName();\n Number cachedId = cachedSupplier.getSupplierId();\n\n // We found a match for the name we're trying to set, so throw an\n // exception. Note that we need to exclude this EO from our test.\n \n if (cachedName != null && value.equalsIgnoreCase(cachedName) && \n cachedId.compareTo(currentId) != 0 )\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name \n }\n } \n\n // Now we want to check the database for any occurences of the supplier\n // name. The most efficient way to check this is with a validation view\n // object to which we add to a special \"Validation\" application module.\n // We then added a \"supplierExists\" method to this entity's expert. This\n // method leverages the VAM and the VVO.\n\n OADBTransaction transaction = getOADBTransaction();\n SupplierEntityExpert expert = getSupplierEntityExpert(transaction);\n\n if (expert.supplierExists(value))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"Name\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_DUP_NAME\"); // Message name\n }\n }\n \n setAttributeInternal(NAME, value);\n \n }", "@PutMapping(\"/jpa/users/{username}/suppliers/{id}\")\n public ResponseEntity<Supplier> updateSupplier(@PathVariable String username,\n @PathVariable Long id,\n @RequestBody Supplier supplier){\n Supplier supplierUpdated = supplierJpaRepo.save(supplier);\n\n return new ResponseEntity<Supplier>(supplier, HttpStatus.OK);\n\n }", "private void ensureEntityValue(IEntity entity) {\n entity.setPrimaryKey(entity.getPrimaryKey());\n }", "protected void beforeUpdateGoodsSupplier(\n RetailscmUserContext userContext,\n GoodsSupplier existed,\n String retailStoreCountryCenterId,\n String goodsSupplierId,\n int goodsSupplierVersion,\n String property,\n String newValueExpr,\n String[] tokensExpr)\n throws Exception {}", "int updateByPrimaryKey(EcsSupplierRebate record);", "@Override\n\tpublic void insertIntoSupplier(Supplier supplier) {\n\t\tString sql=\"INSERT INTO supplier \"+\" (supplier_id, supplier_name, supplier_type, permanent_address, temporary_address, email ,image) SELECT ?,?,?,?,?,?\";\n getJdbcTemplate().update(sql, new Object[] {supplier.getSupplierId(), supplier.getSupplierName(), supplier.getSupplierType(), supplier.getPermanentAddress(), supplier.getTemporaryAddress(),supplier.getEmail() ,supplier.getImage()});\n\t}", "public void updateSupplierDetail(Supplier obj) {\n\t\t\r\n\t}", "public void saveSupplier(Supplier supplier) throws DataAccessException {\r\n getHibernateTemplate().saveOrUpdate(supplier);\r\n }", "public Integer getSupplierid() {\r\n return supplierid;\r\n }", "public void setSupplierPartId(String supplierPartId) {\r\n this.supplierPartId = supplierPartId;\r\n }", "public int addSupplierEntity(SupplierEntity originEntity) {\n\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n Integer supplierId = null;\n\n try {\n tx = session.beginTransaction();\n supplierId = (Integer) session.save(originEntity);\n tx.commit();\n log.warn(\"Added supplier: \" + originEntity + \" with id of: \" + supplierId);\n } catch (HibernateException e) {\n if (tx!=null) tx.rollback();\n log.error(e);\n } finally {\n session.close();\n }\n\n return supplierId;\n\n }", "public Integer getSupplierId() {\n return supplierId;\n }", "int updateByPrimaryKey(SupplierInfo record);", "public boolean makeSupplier(int id) {\n\t\t\t/*String query=\"select Role from registration_customer_data where id=?\";\n\t\t\tString role = (String) template.queryForObject(\n\t\t\t\t\tquery, new Object[] { id }, String.class);\n System.out.println(\"name==\"+role);\n \n*/ String role=\"Supplier\";\n\t\t\ttemplate.update(\n \"update registration_customer_data set Role = ? where id = ?\", \n role, id);\n boolean flag=true;\n return flag;\n\t\t}", "public Long getSupplierId() {\n\t\treturn supplierId;\n\t}", "@RequestMapping(\"supplier/edit/{id}\")\r\n\tpublic String editSupplier(@PathVariable(\"id\")int id,Model model){\n\t\tif(supplierservice.get(id)!=null)\r\n\t\t{\r\n\t\t\tsupplierservice.saveOrUpdate(supplier);\r\n\t\t\tmodel.addAttribute(\"message\",\"Succesfully updated\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tmodel.addAttribute(\"errorMessage\",\"Could not be updated\");\r\n\t\t}\r\n\t\t//log.debug(\"Ending\");\r\n\t\treturn \"supplier\";\r\n\t}", "@Override\n\tpublic void insertIntoSupplierProduct(SupplierProduct supplierproduct) {\n\t String sql=\"INSERT INTO supplier_product \"+\" (supplier_supplier_id, product_product_id, quantity, cost, buy_date,supplier_unique_id ,username) SELECT ?,?,?,?,?,?,?\";\n getJdbcTemplate().update(sql, new Object[] {supplierproduct.getSupplierId(), supplierproduct.getProductId(), supplierproduct.getQuantity(), supplierproduct.getCost(), supplierproduct.getBuyDate(), supplierproduct.getSupplierUniqueId(),supplierproduct.getUsername()});\n\t}", "@Override\n\tpublic boolean checkUniqueSupplierProduct(Integer productId , Integer supplierId ) {\n\t\tloggerService\n\t\t\t\t.logServiceInfo(\"Start checkUniqueSupplierProduct Method with productId and supplierId\"\n\t\t\t\t\t\t+ productId + supplierId);\n\t\ttry {\n\n\t\t\t// SELECT * from PRODUCT_TYPE where NAME like '%s%' and SERVICE_ID =\n\t\t\t// 1;\n\t\t\tString query = \"select model FROM SupplierProduct model where lower(model.productId.id) = \"\n\t\t\t\t\t+ productId + \"and lower ( model.supplierId.id ) = \" + supplierId ;\n\n\t\t\t\n\t\t\tList<ProductType> list = baseDao.findListByQuery(query);\n\t\t\tloggerService\n\t\t\t\t\t.logServiceInfo(\"End checkUniqueSupplierProduct Method\");\n\t\t\treturn list.size() > 0 ? false : true;\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tloggerService.logServiceError(\n\t\t\t\t\t\"can't checkUniqueProductWithService\", e);\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n\tpublic void testSuppCompany() {\n\n\t\tSuppCompany suppCompany =new SuppCompany();\n\t\tsuppCompany.setName(\"www\");\n\t\tsuppCompanyService.update(suppCompany,new EntityWrapper<SuppCompany>().eq(false,\"name\",\"yyy\"));\n\t}", "public int getSupplierId()\n {\n return(this.SupplierId);\n }", "public void updateSupplier(int id, String cvr) throws SQLException {\n\t\tupdateSupplierById.setString(1, cvr);\n\t\tupdateSupplierById.setInt(2, id);\n\t\tupdateSupplierById.executeUpdate();\n\t}", "protected void beforeUpdateGoodsSupplierProperties(\n RetailscmUserContext userContext,\n GoodsSupplier item,\n String retailStoreCountryCenterId,\n String id,\n String name,\n String supplyProduct,\n String contactNumber,\n String description,\n String[] tokensExpr)\n throws Exception {\n }", "@Override\n\t\tpublic boolean update(Carrera entity, int id) {\n\t\t\t\treturn false;\n\t\t}", "public void setSupplierNum(String supplierNum) {\n this.supplierNum = supplierNum == null ? null : supplierNum.trim();\n }", "public void setSupplier(String supplier) {\n this.supplier = supplier == null ? null : supplier.trim();\n }", "int updateByPrimaryKeySelective(SupplierInfo record);", "public void setSupplier(Supplier supplier) {\n this.supplier = supplier;\n }", "E update(E entity) throws ValidationException;", "@Test\n\tpublic void testPersistNewSupplierOrder() throws Exception {\n\t\tLong id = saveEntity();\n\t\tSupplierOrder order = dao.findById(id);\n\t\tassertNull(order.getUpdateDate());\n\t}", "public void setSupplier(\n @Nullable\n final String supplier) {\n rememberChangedField(\"Supplier\", this.supplier);\n this.supplier = supplier;\n }", "public void changeSupplier(ModelElement oldSupplier, ModelElement newSupplier)\n // -end- 3E423DCA0134 head327A646F00E6 \"changeSupplier\"\n // declare any checked exceptions\n // please fill in/modify the following section\n // -beg- preserve=no 3E423DCA0134 throws327A646F00E6 \"changeSupplier\"\n\n // -end- 3E423DCA0134 throws327A646F00E6 \"changeSupplier\"\n ;", "public void setSupplier (jkt.hms.masters.business.MasStoreSupplier supplier) {\n\t\tthis.supplier = supplier;\n\t}", "public void deleteSupplierEntityById(int supplierEntityId) {\n\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n SupplierEntity entityToDelete = (SupplierEntity)session.get(SupplierEntity.class, supplierEntityId);\n session.delete(entityToDelete);\n tx.commit();\n log.warn(\"Deleted supplier: \" + entityToDelete + \" with id of: \" + supplierEntityId);\n\n } catch (HibernateException e) {\n\n if (tx!=null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n }", "String getSupplierID();", "@Override\n public void addKitchenSupplier(String supplierName, String supplierAddress, String telephoneNum,\n String contactPersonName, String mobileNum, String faxNum, String supplierEmailAddr) {\n KitchenSupplier ks = new KitchenSupplier();\n ks.setKsupplierName(supplierName);\n ks.setKsupplierAddress(supplierAddress);\n ks.setKtelephone(telephoneNum);\n ks.setKcontactPersonName(contactPersonName);\n ks.setKmobileNum(mobileNum);\n ks.setKfaxNum(faxNum);\n ks.setKsupplierEmailAddress(supplierEmailAddr);\n ks.setKsupplierDeleteStatus(false);\n\n em.persist(ks);\n em.flush();\n }", "@Override\n public void validateEntity() {\n if ((Strings.isNullOrEmpty(this.getIdentity()) &&\n Strings.isNullOrEmpty(this.getFileSystemPath())) ||\n Strings.isNullOrEmpty(this.getSourceId())) {\n throw new IllegalArgumentException(\n \"Either the Entity Id or file system path used\" +\n \" to generate the id must be present along with the source id\");\n }\n }", "protected void validateEntity() {\n super.validateEntity();\n }", "@Override\n\tpublic void deleteIntoSupplier(long supplierId, long productId) {\n\t\tString sql=\"DELETE FROM supplier WHERE supplier_id IN(SELECT B.supplier_supplier_id FROM supplier_product B INNER JOIN product p ON B.product_product_id=p.product_id WHERE supplier_id=? AND B.product_product_id=?)\";\n\t getJdbcTemplate().update(sql, supplierId, productId);\n\t}", "public void create(SupplierCard supplier) {\n supplier_dao.create(supplier);\n }", "public void setSupplierName(String supplierName) {\n this.supplierName = supplierName == null ? null : supplierName.trim();\n }", "protected void validateEntity()\n {\n super.validateEntity();\n \n Date startDate = getStartDate();\n Date endDate = getEndDate();\n \n validateStartDate(startDate);\n validateEndDate(endDate);\n\n // We validate the following here instead of from within an attribute because\n // we need to make sure that both values are set before we perform the test.\n\n if (endDate != null)\n {\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, whenever comparing jbo\n // Date objects, we have to convert to long values.\n \n long endDateLong = endDate.dateValue().getTime();\n\n // We can assume we have a Start Date or the validation of this \n // value would have thrown an exception.\n \n if (endDateLong < startDate.dateValue().getTime())\n {\n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_END_BAD\"); // Message name\n } \n } \n \n }", "public int ValidateAndGetSupplierFields()\n {\n int error = 0;\n \n if(txtSuplId.getText() == null || txtSuplId.getText().equals(\"\")) \n {\n saveSupl.setSupplId(Integer.valueOf(\"0\"));\n }else\n {\n saveSupl.setSupplId(Integer.valueOf(txtSuplId.getText())); //pk - not expected to be null!\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplCode.getText())) \n {\n error++;\n txtSuplCode.requestFocus();\n txtSuplCode.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_CODE);\n return error;\n }else\n {\n txtSuplCode.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSupplCode(txtSuplCode.getText()); //Save the value to supplier object\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplContact.getText())) \n {\n error++;\n txtSuplContact.requestFocus();\n txtSuplContact.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_CONTACT);\n return error;\n }else\n {\n txtSuplContact.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplContact(txtSuplContact.getText()); //Save the value to supplier object\n }\n \n \n if(!ValidateFields.validatePhoneNumberTextField(txtSuplTel.getText())) \n {\n error++;\n txtSuplTel.requestFocus();\n txtSuplTel.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_TEL);\n return error;\n }else\n {\n txtSuplTel.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplTel(txtSuplTel.getText()); //save the value\n }\n \n if(!ValidateFields.validatePhoneNumberTextField(txtSuplCell.getText())) \n {\n error++;\n txtSuplCell.requestFocus();\n txtSuplCell.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_TEL);\n return error;\n }else\n {\n txtSuplCell.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplCell(txtSuplCell.getText()); //save the value\n }\n \n if(!ValidateFields.validatePhoneNumberTextField(txtSuplFax.getText())) \n {\n error++;\n txtSuplFax.requestFocus();\n txtSuplFax.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_FAX);\n return error;\n }else\n {\n txtSuplFax.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplFax(txtSuplFax.getText()); //save the value\n }\n \n if(!ValidateFields.validateEmailTextField(txtSuplEmail.getText())) \n {\n error++;\n txtSuplEmail.requestFocus();\n txtSuplEmail.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_EMAIL);\n return error;\n }else\n {\n txtSuplEmail.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplEmail(txtSuplEmail.getText()); //save the value\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplBank.getText())) \n {\n error++;\n txtSuplBank.requestFocus();\n txtSuplBank.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_BANK);\n return error;\n }else\n {\n txtSuplBank.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplBank(txtSuplBank.getText()); //save the value\n }\n \n if(!ValidateFields.validateIntegerNumberTextField(txtSuplBranchCode.getText())) \n {\n error++;\n txtSuplBranchCode.requestFocus();\n txtSuplBranchCode.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_BRANCH_CODE);\n return error;\n }else\n {\n txtSuplBranchCode.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplBranchCode(Integer.valueOf(txtSuplBranchCode.getText())); //save the value\n }\n \n if(!ValidateFields.validateIntegerNumberTextField(txtSuplAccNum.getText())) \n {\n error++;\n txtSuplAccNum.requestFocus();\n txtSuplAccNum.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_ACC);\n return error;\n }else\n {\n txtSuplAccNum.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplAccNum(Integer.valueOf(txtSuplAccNum.getText())); //Save the value to supplier object\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplAccType.getText())) \n {\n error++;\n txtSuplAccType.requestFocus();\n txtSuplAccType.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLIER_ACC_TYPE);\n return error;\n }else\n {\n txtSuplAccType.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplAccType(txtSuplAccType.getText()); //save the value\n }\n \n if(!ValidateFields.validateStringCharTextField(txtSuplComments.getText())) \n {\n error++;\n txtSuplComments.requestFocus();\n txtSuplComments.setStyle(\"-fx-border-color: red;\");\n \n txtError.setText(ERR_SUPLEMENT_DESC);\n return error;\n }else\n {\n txtSuplComments.setStyle(\"-fx-border-color: transparent;\");\n txtError.setText(\"\");\n saveSupl.setSuplComments(txtSuplComments.getText()); //save the value\n }\n \n return error;\n }", "public Supplier addSupplier(Supplier supplier) {\n\t\treturn supplierRepository.save(supplier);\n\t}", "@PostMapping(\"/jpa/users/{username}/suppliers\")\n public ResponseEntity<Void> createSupplier(@PathVariable String username,\n @RequestBody Supplier supplier){\n supplier.setUsername(username);\n Supplier createdSupplier = supplierJpaRepo.save(supplier);\n\n URI uri = ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\")\n .buildAndExpand(createdSupplier.getId()).toUri();\n\n\n return ResponseEntity.created(uri).build();\n\n }", "public void setC_Subscription_Delivery_ID (int C_Subscription_Delivery_ID)\n{\nset_ValueNoCheck (\"C_Subscription_Delivery_ID\", new Integer(C_Subscription_Delivery_ID));\n}", "public void setId(long id) throws InvalidIdException {\n// System.out.println(\"Id passed is: \" + id);\n // Check if the ID is within range\n if(id >= MINIMUM_ID_NUMBER && id <= MAXIMUM_ID_NUMBER) {\n \n // Set this value to the attribtue\n this.id = id;\n } else { // If not\n \n // Then throw error and display error message.\n throw new InvalidIdException(\"Employee ID must be between \" + \n MINIMUM_ID_NUMBER + \" and \" + MAXIMUM_ID_NUMBER);\n } \n }", "public SupplierEntity getSupplierEntity(int supplierId) {\n\n SupplierEntity originEntity = new SupplierEntity();\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n originEntity = (SupplierEntity)session.get(SupplierEntity.class, supplierId);\n tx.commit();\n if (originEntity != null) {\n log.warn(\"Retrieved supplier: \" + originEntity + \" with id of: \" + originEntity.getSupplierId());\n }\n } catch (HibernateException e) {\n\n if (tx!=null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n return originEntity;\n\n }", "@Override\n\tpublic void updateIntoSupplierView(SupplierProduct supplierview) {\n\t String sql=\"UPDATE supplier_product SET product_product_id=?, quantity=?, cost=?, buy_date=? WHERE supplier_supplier_id=?\";\n\t getJdbcTemplate().update(sql, new Object[] {supplierview.getProductId(),supplierview.getQuantity(),supplierview.getCost(),supplierview.getBuyDate(),supplierview.getSupplierId()});\n\t}", "@Override\r\n\tpublic void validateIntegrityConstraint() {\n\t\tvalidatorEngine.validate(entity);\r\n\t}", "public void setSuppliersInforId(String suppliersInforId) {\n this.suppliersInforId = suppliersInforId;\n }", "public void setSuppliersId(Short suppliersId) {\n this.suppliersId = suppliersId;\n }", "private static void validateEntity(AdminOffice entity) throws ValidationException {\n\t\t//Validator.validateStringField(\"officeName\", entity.getOfficeName(), 55, true);\n\t\t//Validator.validateStringField(\"phone\", entity.getPhone(), 12, false);\t\t\n\t}", "@Test\n\tpublic void testSaveOrderNumber() throws Exception {\n\t\tLong id = saveEntity();\n\t\tSupplierOrder order = dao.findById(id);\n\t\torder.setUpdateDate(new Date());\n\t\torder.setOrderNumber(\"123\");\n\t\torder.setStatus(StatusType.ORDERED.toString());\n\t\torder = dao.persist(order);\n\t\tassertEquals(order.getSupplierOrderId(), id);\n\t}", "@RequestMapping(value = \"/supplier/add\", method = RequestMethod.POST)\n\t\tpublic String addSupplier(@ModelAttribute(\"suppliers\") Suppliers suppliers) {\n\t\t\tSystem.out.println(\"Hello.. I'm inside /suppliers add\");\n\t\t\tString newID = Util.removeComma(suppliers.getId());\n\t\t\tsuppliers.setId(newID);\n\t\t\tsuppliersDAO.saveOrUpdate(suppliers);\n\n\t\t\treturn \"redirect:/suppliers\";\n\n\t\t}", "public void actionPerformed(ActionEvent e){\n\t\t\t\ttry{\t\n\t\t\t\t\tif(checkSupplierDuplicate(suppliers, Integer.parseInt(supplierIdJTextField.getText())) == true){\n\t\t\t\t\t\tif(supplierNameJTextField.getText().isEmpty() || supplierAddressJTextField.getText().isEmpty()){\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Required Fields: \\n Supplier Id \\n Supplier Name \\n Supplier Address\");\t\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tSupplier supplier = new Supplier(Integer.parseInt(supplierIdJTextField.getText()), supplierNameJTextField.getText(), \n\t\t\t\t\t\t\t\t\tsupplierAddressJTextField.getText(), supplierEmailJTextField.getText(), Integer.parseInt(supplierPhoneJTextField.getText()));\n\t\t\t\t\t\t\tsuppliers.add(supplier);\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"New Supplier Added\");\n\t\t\t\t\t\t\tsuppIdCombo.addItem(supplierIdJTextField.getText());\n\t\t\t\t\t\t\tsuppNameCombo.addItem(supplierNameJTextField.getText());\n\t\t\t\t\t\t\teditSuppIdCombo.addItem(supplierIdJTextField.getText());\n\t\t\t\t\t\t\tsupplierIdJTextField.setText(\"\");\n\t\t\t\t\t\t\tsupplierNameJTextField.setText(\"\");\n\t\t\t\t\t\t\tsupplierAddressJTextField.setText(\"\");\n\t\t\t\t\t\t\tsupplierEmailJTextField.setText(\"\");\n\t\t\t\t\t\t\tsupplierPhoneJTextField.setText(\"\");\n\t\t\t\t\t\t\tlistOfSuppliers.addElement(supplierIdJTextField.getText());\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Supplier Already Exists\");\n\t\t\t\t\t}\n\t\t\t\t}catch(NumberFormatException nfe){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Id should be a number.\");\n\t\t\t\t}\n\t\t\t}", "public void setHC_EmployeeGrade2_ID (int HC_EmployeeGrade2_ID);", "public InwardEntity updateInvoice(InwardEntity entity , String companyId, String customerId) throws EntityException\n\t\t\t{\n\n\t\t\t\tDatastore ds = null;\n\t\t\t\tCompany cmp = null;\n\t\t\t\tBusinessPlayers customer = null;\n\t\t\t\tProducts prod = null;\n\t\t\t\tTax tax = null;\n\t\t\t\tKey<InwardEntity> key = null;\n\t\t\t\tObjectId oid = null;\n\t\t\t\tObjectId customerOid = null;\n\t\t\t\tObjectId prodOid = null;\n\t\t\t\tObjectId taxOid = null;\n\t\t\t\tInwardEntity invoice = null;\n\t\t\t\tboolean customerChange = false;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tds = Morphiacxn.getInstance().getMORPHIADB(\"test\");\n\t\t\t\t\toid = new ObjectId(companyId);\n\t\t\t\t\tQuery<Company> query = ds.createQuery(Company.class).field(\"id\").equal(oid);\n\t\t\t\t\tcmp = query.get();\n\t\t\t\t\tif(cmp == null)\n\t\t\t\t\t\tthrow new EntityException(404, \"cmp not found\", null, null);\n\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t//check if invoice exists with object id for update , fetch invoice, make changes to it\n\t\t\t\t\n\t\t\t\t\tQuery<InwardEntity> iQuery = ds.find(InwardEntity.class).filter(\"company\",cmp).filter(\"isInvoice\", true).\n\t\t\t\t\t\t\tfilter(\"id\",entity.getId());\n\n\t\t\t\t\tinvoice = iQuery.get();\n\t\t\t\t\tif(invoice == null)\n\t\t\t\t\t\tthrow new EntityException(512, \"invoice not found\", null, null); //cant update\n\n\n\t\t\t\t\t/*check if vendor changed in update, if so then check if new vendor exists\n\t\t\t\t\t * if vendor hasnt changed bt was deleted - let it be\n\t\t\t\t\t */\n\n\t\t\t\t\tif(!(customerId.equals(invoice.getCustomer().getId().toString())))\n\t\t\t\t\t{\n\t\t\t\t\t\tcustomerChange = true;\n\t\t\t\t\t\tcustomerOid = new ObjectId(customerId);\n\t\t\t\t\t\tQuery<BusinessPlayers> bpquery = ds.createQuery(BusinessPlayers.class).field(\"company\").equal(cmp).field(\"isCustomer\").equal(true).field(\"id\").equal(customerOid).field(\"isDeleted\").equal(false);\n\t\t\t\t\t\tcustomer = bpquery.get();\n\t\t\t\t\t\tif(customer == null)\n\t\t\t\t\t\t\tthrow new EntityException(512, \"customer not found\", null, null);\n\n\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/*if bill number is editable, do check if there is new /old vendor + new/old bill number combo unique\n\t\t\t\t\t * if vendor hasnt changed and bill number hasnt chngd - no prob\n\t\t\t\t\t * if vendor/bill number has chngd do check\n\t\t\t\t\t */\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t// front end list cant be null\n\t\t\t\t\tList<OrderDetails> invoiceDetails = entity.getInvoiceDetails();\n\n\t\t\t\t\tfor(OrderDetails details : invoiceDetails)\n\t\t\t\t\t{\n\n\t\t\t\t\t\t//check tax exists, if not deleted\n\t\t\t\t\t\tif(details.getTax().getId() != null && details.getTax().isDeleted() == false)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\ttaxOid = new ObjectId(details.getTax().getId().toString());\n\t\t\t\t\t\t\tQuery<Tax> taxquery = ds.createQuery(Tax.class).field(\"company\").equal(cmp).field(\"id\").equal(taxOid).field(\"isDeleted\").equal(false);\n\t\t\t\t\t\t\ttax = taxquery.get();\n\t\t\t\t\t\t\tif(tax == null)\n\t\t\t\t\t\t\t\tthrow new EntityException(513, \"tax not found\", null, null); //has been deleted in due course\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//check tax exists, if deleted\n\t\t\t\t\t\tif(details.getTax().getId() != null && details.getTax().isDeleted() == true)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\ttaxOid = new ObjectId(details.getTax().getId().toString());\n\t\t\t\t\t\t\tQuery<Tax> taxquery = ds.createQuery(Tax.class).field(\"company\").equal(cmp).field(\"id\").equal(taxOid).field(\"isDeleted\").equal(true);\n\t\t\t\t\t\t\ttax = taxquery.get();\n\t\t\t\t\t\t\tif(tax == null)\n\t\t\t\t\t\t\t\tthrow new EntityException(513, \"tax not found\", null, null); //tax doesn't exists / may not be deleted\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(details.getProduct().isDeleted() == false)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\tprodOid = new ObjectId(details.getProduct().getId().toString());\n\t\t\t\t\t\t\tQuery<Products> prodquery = ds.createQuery(Products.class).field(\"company\").equal(cmp).field(\"id\").equal(prodOid).field(\"isDeleted\").equal(false);\n\t\t\t\t\t\t\tprod = prodquery.get();\n\t\t\t\t\t\t\tif(prod == null)\n\t\t\t\t\t\t\t\tthrow new EntityException(514, \"product not found\", null, null); //has been deleted in due course\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(details.getProduct().isDeleted() == true)\n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\tprodOid = new ObjectId(details.getProduct().getId().toString());\n\t\t\t\t\t\t\tQuery<Products> prodquery = ds.createQuery(Products.class).field(\"company\").equal(cmp).field(\"id\").equal(prodOid).field(\"isDeleted\").equal(true);\n\t\t\t\t\t\t\tprod = prodquery.get();\n\t\t\t\t\t\t\tif(prod == null)\n\t\t\t\t\t\t\t\tthrow new EntityException(514, \"product not found\", null, null); //product doesn't exists / may not be deleted\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tdetails.setId(new ObjectId());\n\t\t\t\t\t\tdetails.setTax(tax);\n\t\t\t\t\t\tdetails.setProduct(prod);\n\n\t\t\t\t\t\ttax = null;\n\t\t\t\t\t\ttaxOid = null;\n\t\t\t\t\t\tprod = null;\n\t\t\t\t\t\tprodOid = null;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(\"protax\");\n\t\t\t\t\t\n\t\t\t\t\tinvoice.setInvoiceDetails(invoiceDetails);\n\t\t\t\t\tinvoice.setCompany(cmp);\n\t\t\t\t\tif(customerChange == true)\n\t\t\t\t\t\tinvoice.setCustomer(customer); //set only if vendor has changed\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tinvoice.setInvoiceDate(entity.getInvoiceDate());\n\t\t\t\t\tinvoice.setInvoiceDate(entity.getInvoiceDate());\n\t\t\t\t\tinvoice.setInvoiceDuedate(entity.getInvoiceDuedate());\n\t\t\t\t\t\n\t\t\t\t\tinvoice.setInvoiceGrandtotal(entity.getInvoiceGrandtotal());\n\t\t\t\t\tinvoice.setInvoiceSubtotal(entity.getInvoiceSubtotal());\n\t\t\t\t\tinvoice.setInvoiceTaxtotal(entity.getInvoiceTaxtotal());\n\t\t\t\t\tjava.math.BigDecimal balance = invoice.getInvoiceGrandtotal().subtract(invoice.getInvoiceAdvancetotal()); //grand total is just set, read prev advance\n\t\t\t\t\tinvoice.setInvoiceBalance(balance);\n\n\t\t\t\t\tkey = ds.merge(invoice);\n\t\t\t\t\tif(key == null)\n\t\t\t\t\t\tthrow new EntityException(515, \"could not update\", null, null);\n\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(EntityException e)\n\t\t\t\t{\n\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t\tcatch(Exception e)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tthrow new EntityException(500, null , e.getMessage(), null);\n\t\t\t\t}\n\n\t\t\t\treturn invoice;\n\t\t\t}", "@Override\n\tpublic User updateEntity(long id, User Entity) throws Exception {\n\t\treturn null;\n\t}", "@Override\n\tpublic void update(EmpType entity) {\n\t\t\n\t}", "public void editSupplierMode() {\n\n\t\t// disable selection list\n\t\tsupplierList.setEnabled(false);\n\t\taddressTF.setBackground(Color.white);\n\n\t\tnameTF.setEditable(false);\n\t\tidTF.setEditable(false);\n\t\teMailTF.setEditable(true);\n\t\taddressTF.setEditable(true);\n\t\ttelTF.setEditable(true);\n\n\t\t// disable/enable appropriate buttons\n\t\tremoveItemButton.setEnabled(false);\n\t\tnewCustomerButton.setEnabled(false);\n\t\tsaveItemButton.setVisible(true);\n\t\tcancelBtn.setVisible(true);\n\t}", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "@Override\r\n\tpublic int hashCode() {\r\n\t\tfinal int prime = 31;\r\n\t\tint result = 1;\r\n\t\tresult = prime * result + ((supplierID == null) ? 0 : supplierID.hashCode());\r\n\t\treturn result;\r\n\t}", "public void actionPerformed(ActionEvent e){\n\t\t\t\tif(editSuppIdCombo.getSelectedIndex() != 0){\n\t\t\t\t\tif(editSupplierName.getText().isEmpty() || editSupplierAddress.getText().isEmpty()){\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Required Fields: \\n Supplier Name \\n Supplier Address\");\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\tfor(Supplier supplier: suppliers){\n\t\t\t\t\t\t\tif(supplier.getId() == Integer.parseInt(editSuppIdCombo.getSelectedItem().toString())){\n\t\t\t\t\t\t\t\tsupplier.setName(editSupplierName.getText());\n\t\t\t\t\t\t\t\tsupplier.setAddress(editSupplierAddress.getText());\n\t\t\t\t\t\t\t\tsupplier.setEmail(editSupplierEmail.getText());\n\t\t\t\t\t\t\t\tsupplier.setPhone(Integer.parseInt(editSupplierPhone.getText()));\n\t\t\t\t\t\t\t\tsupplier.setDaysToDeliver(Integer.parseInt(editSupplierDelivery.getText()));\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Supplier Updated\");\n\t\t\t\t\t\t\t\teditSuppIdCombo.setSelectedIndex(0);\n\t\t\t\t\t\t\t\teditSupplierName.setText(\"\");\n\t\t\t\t\t\t\t\teditSupplierAddress.setText(\"\");\n\t\t\t\t\t\t\t\teditSupplierEmail.setText(\"\");\n\t\t\t\t\t\t\t\teditSupplierPhone.setText(\"\");\n\t\t\t\t\t\t\t\teditSupplierDelivery.setText(\"\");\n\t\t\t\t\t\t\t\treturn;\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}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please Select a Valid Supplier.\");\n\t\t\t\t}\n\t\t\t}", "BaseRecord editRecord(String id, String fieldName, String newValue, String clientId) throws Exception;", "public void setValue(Object value) {\n\t\tEntityManager em = Config.getEntityManager();\n\n\t\t// check for unnecessary update\n\t\tif (value == null && this.value == null) return;\n\t\tif (value != null && this.value != null) {\n\t\t\t// check if values are the same\n\t\t\tif (value.equals(this.value)) return;\n\t\t}\n\t\tthis.value = value;\n\t\tEntityTransaction t = em.getTransaction();\n\t\tboolean localTransaction = false;\n\t\ttry {\n\t\t\tif (!t.isActive()) {\n\t\t\t\tlocalTransaction = true;\n\t\t\t\tt.begin();\n\t\t\t}\n\n\t\t\t// update existing row\n\t\t\tif (row != null) {\n\t\t\t\tString updateSql = update1 + fieldName + update2 + fieldName\n\t\t\t\t\t\t+ valueExtension + update3;\n\t\t\t\tQuery updateQuery = em.createNativeQuery(updateSql);\n\t\t\t\tupdateQuery.setParameter(1, value);\n\t\t\t\tupdateQuery.setParameter(2, entityId);\n\t\t\t\tint result = updateQuery.executeUpdate();\n\t\t\t\tif (result != 1) {\n\t\t\t\t\t// no update?\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// create new row\n\t\t\t// check for existing FieldDataConfig\n\t\t\tFieldConfigInstance configInstance = FieldConfigInstance\n\t\t\t\t\t.findByNameBundle(fieldName, bundle);\n\t\t\tif (configInstance == null) {\n\t\t\t\t// must create new config instance\n\t\t\t\tFieldConfig config = FieldConfig.findByName(fieldName);\n\t\t\t\tif (config == null) {\n\t\t\t\t\t// TODO create new config\n\t\t\t\t\tconfig = new FieldConfig(fieldName, type);\n\t\t\t\t\t// can't do it\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconfigInstance = new FieldConfigInstance(config, bundle);\n\t\t\t\tem.persist(configInstance);\n\t\t\t\tem.flush();\n\t\t\t}\n\t\t\t// insert row\n\t\t\tString insertSql = insert1 + fieldName + insert2 + fieldName\n\t\t\t\t\t+ valueExtension + insert3;\n\t\t\tQuery insertQuery = em.createNativeQuery(insertSql);\n\t\t\tinsertQuery.setParameter(1, Config.BUNDLE_PREFIX + bundle);// bundle\n\t\t\tinsertQuery.setParameter(2, entityId);// entity_id\n\t\t\tinsertQuery.setParameter(3, 0);// delta\n\t\t\tinsertQuery.setParameter(4, value);// value\n\t\t\tint result = insertQuery.executeUpdate();\n\t\t\tif (result != 1) {\n\t\t\t\t// no insert?\n\t\t\t}\n\n\t\t\tif (localTransaction) t.commit();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (localTransaction) t.rollback();\n\t\t}\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Supplierdetails)) {\n return false;\n }\n Supplierdetails other = (Supplierdetails) object;\n if ((this.supplierid == null && other.supplierid != null) || (this.supplierid != null && !this.supplierid.equals(other.supplierid))) {\n return false;\n }\n return true;\n }", "public void setC_Subscription_ID (int C_Subscription_ID)\n{\nset_ValueNoCheck (\"C_Subscription_ID\", new Integer(C_Subscription_ID));\n}", "private void validateUpdateIdPInputValues(IdentityProvider currentIdentityProvider, String resourceId,\n IdentityProvider newIdentityProvider, String tenantDomain)\n throws IdentityProviderManagementException {\n\n if (currentIdentityProvider == null) {\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_DOES_NOT_EXIST, resourceId);\n }\n boolean isNewIdPNameExists = false;\n IdentityProvider retrievedIdentityProvider =\n getIdPByName(newIdentityProvider.getIdentityProviderName(), tenantDomain, true);\n if (retrievedIdentityProvider != null) {\n isNewIdPNameExists = !StringUtils.equals(retrievedIdentityProvider.getResourceId(), currentIdentityProvider\n .getResourceId());\n }\n if (isNewIdPNameExists || IdPManagementServiceComponent.getFileBasedIdPs()\n .containsKey(newIdentityProvider.getIdentityProviderName())) {\n throw IdPManagementUtil.handleClientException(IdPManagementConstants.ErrorMessage\n .ERROR_CODE_IDP_ALREADY_EXISTS, newIdentityProvider.getIdentityProviderName());\n }\n\n // Validate whether there are any duplicate properties in the ProvisioningConnectorConfig.\n validateOutboundProvisioningConnectorProperties(newIdentityProvider);\n }", "public String getSupplierPartId() {\r\n return this.supplierPartId;\r\n }", "public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}", "int updateByPrimaryKey(SupplyNeed record);", "public void setM_Inventory_ID (int M_Inventory_ID)\n{\nif (M_Inventory_ID <= 0) set_Value (\"M_Inventory_ID\", null);\n else \nset_Value (\"M_Inventory_ID\", new Integer(M_Inventory_ID));\n}", "public void setEntityId(long entityId);", "public void saveSupplier(Supplier e){ \n\t template.save(e); \n\t}", "public SupplierCard find_Supplier(Integer supplier_id) {\n return supplier_dao.find(supplier_id);\n }", "@Override\r\n\tpublic int updateStoreBalanceCardRecord(SupplierStoreBalanceCardRecordBean bean) {\n\t\treturn supplierStoreDao.updateStoreBalanceCardRecord(bean);\r\n\t}", "@Override\r\n\tpublic void validateEntity(TableEntity entity, EntityEvent event) throws InvalidModelException, NotFoundException,\r\n\t\t\tDatastoreException, UnauthorizedException {\n\t\tif(EventType.CREATE == event.getType() || EventType.UPDATE == event.getType() || EventType.NEW_VERSION == event.getType()){\r\n\t\t\tboolean isNew = false;\r\n\t\t\tif(EventType.CREATE == event.getType()){\r\n\t\t\t\tisNew = true;\r\n\t\t\t}\r\n\t\t\tList<String> columnIds = entity.getColumnIds();\r\n\t\t\t// Bind the entity to these columns\r\n\t\t\tcolumnModelManager.bindColumnToObject(event.getUserInfo(), columnIds, entity.getId(), isNew);\r\n\t\t}\t\r\n\t}", "public void setSalesRep_ID (int SalesRep_ID);", "public void setSalesRep_ID (int SalesRep_ID);", "@Override\n\tpublic void saveOrUpdate(Contract entity) {\n\t\tif(UtilFuns.isEmpty(entity.getId())){ // 判断修改或者新增\n\t\t\t//设置默认值\n\t\t\tentity.setState(0); //0:草稿 1:已上报 2:已报运\n\t\t\tentity.setTotalAmount(0.0); //务必设置默认值否则新增货物,分散计算的时候会出先null + xxxx\n\t\t}else{\n\t\t\t\n\t\t}\n\t\t\n\t\tcontractDao.save(entity);\n\t}", "public void setProductQty (BigDecimal ProductQty)\n{\nif (ProductQty == null) throw new IllegalArgumentException (\"ProductQty is mandatory\");\nset_Value (\"ProductQty\", ProductQty);\n}", "@Override\n public void validate(StudentiEntity entity){\n List<String> errorMessages = new ArrayList<>();\n if(entity.getID() < 0) errorMessages.add(\"Invalid ID\");\n if(entity.getNume().equals(\"\")) errorMessages.add(\"Invalid name\");\n if(entity.getEmail().equals(\"\")) errorMessages.add(\"Invalid email\");\n if(entity.getGrupa() < 0) errorMessages.add(\"Invalid grupa\");\n\n if(errorMessages.size() > 0) throw new ValidationException(errorMessages);\n }", "void setDataIntoSuppBusObj() {\r\n supplierBusObj.setValue(txtSuppId.getText(),txtSuppName.getText(), txtAbbreName.getText(),\r\n txtContactName.getText(),txtContactPhone.getText());\r\n }", "public void setM_Splitting_ID (int M_Splitting_ID)\n{\nset_ValueNoCheck (\"M_Splitting_ID\", new Integer(M_Splitting_ID));\n}", "@Override\n\tpublic Supplier getSupplierId(long supplierId) {\n\t\tString sql=\"SELECT * FROM supplier WHERE supplier_id=?\";\n\t\tRowMapper<Supplier> rowmapper=new BeanPropertyRowMapper<Supplier> (Supplier.class);\n\t\treturn this.getJdbcTemplate().queryForObject(sql, rowmapper, supplierId);\n\t}", "@Test\n public void testSetHospedaje() {\n HospedajeEntity hospedaje = new HospedajeEntity();\n hospedaje.setId(new Long(23));\n HospedajeLugarEntity hospedajeL = new HospedajeLugarEntity();\n hospedajeL.setHospedaje(hospedaje);\n Assert.assertTrue(hospedajeL.getHospedaje().getId().equals(hospedaje.getId()));\n }", "@PrePersist\n private void onSave()\n {\n this.lastUpdateDateTime = new Date();\n if(this.registerDateTime == null)\n {\n this.registerDateTime = new Date();\n }\n \n if(this.personKey == null || this.personKey.isEmpty())\n {\n this.personKey = UUID.randomUUID().toString();\n }\n \n if(this.activationDate == null && (this.activationKey == null || this.activationKey.isEmpty()))\n {\n this.activationKey = UUID.randomUUID().toString();\n this.activationDate = new Date();\n }\n \n // O ID só será 0 (zero) se for a criação do registro no banco\n if(this.id == 0)\n {\n this.isValid = false;\n }\n }", "int updateByPrimaryKey(OpeningRequirement record);", "public void deleteSupplierEntity(SupplierEntity originEntity) {\n\n Session session = SessionFactoryProvider.getSessionFactory().openSession();\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n session.delete(originEntity);\n tx.commit();\n log.warn(\"Deleted supplier: \" + originEntity + \" with id of: \" + originEntity.getSupplierId());\n\n } catch (HibernateException e) {\n\n if (tx!=null) {\n tx.rollback();\n }\n\n e.printStackTrace();\n\n } finally {\n\n session.close();\n\n }\n\n }", "public void setSupplierCommodity(String supplierCommodity) {\n this.supplierCommodity = supplierCommodity == null ? null : supplierCommodity.trim();\n }", "E update(E entity);", "E update(E entity);" ]
[ "0.66217923", "0.66135854", "0.65919703", "0.6547647", "0.6414844", "0.64118224", "0.6372799", "0.6300842", "0.62134504", "0.61947864", "0.61366576", "0.60845095", "0.6029962", "0.60227704", "0.59082794", "0.59006315", "0.58443016", "0.58186036", "0.57663435", "0.57429534", "0.5731127", "0.5669519", "0.5640132", "0.56317925", "0.5617903", "0.5535163", "0.5528638", "0.5498713", "0.5479139", "0.5462966", "0.5427258", "0.54092705", "0.5408547", "0.5406159", "0.5383454", "0.5346645", "0.5341309", "0.53170687", "0.530096", "0.52971256", "0.52947366", "0.5285779", "0.5284444", "0.52763486", "0.5270047", "0.5268863", "0.5259717", "0.5234844", "0.52339685", "0.52321553", "0.52218485", "0.5212604", "0.52096415", "0.520515", "0.52013314", "0.5200201", "0.5197615", "0.5174607", "0.51694363", "0.51560616", "0.5147049", "0.5146075", "0.50852937", "0.5067861", "0.5056674", "0.50376725", "0.5032813", "0.5027878", "0.50278187", "0.50255954", "0.50222373", "0.50123096", "0.50117284", "0.49767813", "0.49576777", "0.49432078", "0.49402076", "0.49257144", "0.49139723", "0.491302", "0.4908616", "0.4896925", "0.48855343", "0.48838222", "0.4878798", "0.48754445", "0.48754445", "0.4873756", "0.48715422", "0.48693305", "0.48664662", "0.48641878", "0.48579252", "0.48578334", "0.48572794", "0.48562285", "0.4850798", "0.4849198", "0.48396137", "0.48396137" ]
0.7612585
0
end setSupplierId() / Sets value as the attribute value for Name. Business rules: Supplier name is required. Supplier name must be unique (ignoring capitalization). Supplier name cannot be changed on committed rows.
public void setName(String value) { // Since this value is marked as "mandatory," the BC4J Framework will take // care of ensuring that it's a non-null value. However, if it is null, we // don't want to proceed with any validation that could result in a NPE. if ((value != null) || (!("".equals(value.trim())))) { // Verify that the name is unique. To do this, we must check both the entity // cache and the database. We begin with the entity cache. com.sun.java.util.collections.Iterator supplierIterator = getEntityDef().getAllEntityInstancesIterator(getDBTransaction()); Number currentId = getSupplierId(); while ( supplierIterator.hasNext() ) { SupplierEOImpl cachedSupplier = (SupplierEOImpl)supplierIterator.next(); String cachedName = cachedSupplier.getName(); Number cachedId = cachedSupplier.getSupplierId(); // We found a match for the name we're trying to set, so throw an // exception. Note that we need to exclude this EO from our test. if (cachedName != null && value.equalsIgnoreCase(cachedName) && cachedId.compareTo(currentId) != 0 ) { throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT, getEntityDef().getFullName(), // EO name getPrimaryKey(), // EO PK "Name", // Attribute Name value, // Attribute value "AK", // Message product short name "FWK_TBX_T_SUP_DUP_NAME"); // Message name } } // Now we want to check the database for any occurences of the supplier // name. The most efficient way to check this is with a validation view // object to which we add to a special "Validation" application module. // We then added a "supplierExists" method to this entity's expert. This // method leverages the VAM and the VVO. OADBTransaction transaction = getOADBTransaction(); SupplierEntityExpert expert = getSupplierEntityExpert(transaction); if (expert.supplierExists(value)) { throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT, getEntityDef().getFullName(), // EO name getPrimaryKey(), // EO PK "Name", // Attribute Name value, // Attribute value "AK", // Message product short name "FWK_TBX_T_SUP_DUP_NAME"); // Message name } } setAttributeInternal(NAME, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSupplierName(String pSupplierName) {\n mSupplierName = pSupplierName;\n }", "public void setSupplierName(String supplierName) {\n this.supplierName = supplierName == null ? null : supplierName.trim();\n }", "public void setSupplierId(Number value)\n {\n\n // BC4J validates that this can be updated only on a new line, and that this\n // mandatory attribute is not null. This code adds the additional check \n // of only allowing an update if the value is null to prevent changes while \n // the object is in memory.\n\n if (getSupplierId() != null)\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"SupplierId\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_ID_NO_UPDATE\"); // Message name\n\n }\n\n if (value != null)\n {\n // Supplier id must be unique. To verify this, you must check both the\n // entity cache and the database. In this case, it's appropriate\n // to use findByPrimaryKey( ) because you're unlikely to get a match, and\n // and are therefore unlikely to pull a bunch of large objects into memory.\n\n // Note that findByPrimaryKey() is guaranteed to check all suppliers. \n // First it checks the entity cache, then it checks the database.\n\n OADBTransaction transaction = getOADBTransaction();\n Object[] supplierKey = {value};\n EntityDefImpl supplierDefinition = SupplierEOImpl.getDefinitionObject();\n SupplierEOImpl supplier = \n (SupplierEOImpl)supplierDefinition.findByPrimaryKey(transaction, new Key(supplierKey));\n\n if (supplier != null)\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"SupplierId\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_ID_UNIQUE\"); // Message name \n }\n } \n \n setAttributeInternal(SUPPLIERID, value);\n \n }", "public void setSupplierId(int SupplierIdIn)\n {\n this.SupplierId = SupplierIdIn;\n }", "public void setSupplierId(Integer supplierId) {\n this.supplierId = supplierId;\n }", "public void setSupplierid(Integer supplierid) {\r\n this.supplierid = supplierid;\r\n }", "public void setSupplierId(Long supplierId) {\n\t\tthis.supplierId = supplierId;\n\t}", "public void setSupplier(\n @Nullable\n final String supplier) {\n rememberChangedField(\"Supplier\", this.supplier);\n this.supplier = supplier;\n }", "public String getSupplierName() {\n return supplierName;\n }", "public void setSupplier(String supplier) {\n this.supplier = supplier == null ? null : supplier.trim();\n }", "String getSupplierID();", "public void setSupplierNum(String supplierNum) {\n this.supplierNum = supplierNum == null ? null : supplierNum.trim();\n }", "public Long getSupplierId() {\n\t\treturn supplierId;\n\t}", "public int getSupplierId()\n {\n return(this.SupplierId);\n }", "public Integer getSupplierId() {\n return supplierId;\n }", "public Integer getSupplierid() {\r\n return supplierid;\r\n }", "@Override\n public void addKitchenSupplier(String supplierName, String supplierAddress, String telephoneNum,\n String contactPersonName, String mobileNum, String faxNum, String supplierEmailAddr) {\n KitchenSupplier ks = new KitchenSupplier();\n ks.setKsupplierName(supplierName);\n ks.setKsupplierAddress(supplierAddress);\n ks.setKtelephone(telephoneNum);\n ks.setKcontactPersonName(contactPersonName);\n ks.setKmobileNum(mobileNum);\n ks.setKfaxNum(faxNum);\n ks.setKsupplierEmailAddress(supplierEmailAddr);\n ks.setKsupplierDeleteStatus(false);\n\n em.persist(ks);\n em.flush();\n }", "@Override\n\tpublic void updateIntoSupplier(Supplier supplier) {\n\t\tString sql=\"UPDATE supplier SET supplier_name=?,supplier_type=?,permanent_address=?, temporary_address=?,email=?,image=? WHERE supplier_id=?\";\n\t getJdbcTemplate().update(sql, new Object[] {supplier.getSupplierName(), supplier.getSupplierType(),supplier.getPermanentAddress(), supplier.getTemporaryAddress(),supplier.getEmail(),supplier.getImage(),supplier.getSupplierId()});\n\t}", "public void setSupplier(Supplier supplier) {\n this.supplier = supplier;\n }", "@PutMapping(\"/jpa/users/{username}/suppliers/{id}\")\n public ResponseEntity<Supplier> updateSupplier(@PathVariable String username,\n @PathVariable Long id,\n @RequestBody Supplier supplier){\n Supplier supplierUpdated = supplierJpaRepo.save(supplier);\n\n return new ResponseEntity<Supplier>(supplier, HttpStatus.OK);\n\n }", "public boolean makeSupplier(int id) {\n\t\t\t/*String query=\"select Role from registration_customer_data where id=?\";\n\t\t\tString role = (String) template.queryForObject(\n\t\t\t\t\tquery, new Object[] { id }, String.class);\n System.out.println(\"name==\"+role);\n \n*/ String role=\"Supplier\";\n\t\t\ttemplate.update(\n \"update registration_customer_data set Role = ? where id = ?\", \n role, id);\n boolean flag=true;\n return flag;\n\t\t}", "public void setSupplierPartId(String supplierPartId) {\r\n this.supplierPartId = supplierPartId;\r\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "public void getName(Supplier supplier) {\n\t\r\n}", "public void saveSupplier(Supplier supplier) throws DataAccessException {\r\n getHibernateTemplate().saveOrUpdate(supplier);\r\n }", "public void setName ( String name ) throws InvalidUserIDException {\r\n if(name == \"\") throw new InvalidUserIDException();\r\n _name= name;\r\n }", "public void setSuppliersId(Short suppliersId) {\n this.suppliersId = suppliersId;\n }", "private void setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n }", "public void setSupplier (jkt.hms.masters.business.MasStoreSupplier supplier) {\n\t\tthis.supplier = supplier;\n\t}", "@Override\n\tpublic void insertIntoSupplier(Supplier supplier) {\n\t\tString sql=\"INSERT INTO supplier \"+\" (supplier_id, supplier_name, supplier_type, permanent_address, temporary_address, email ,image) SELECT ?,?,?,?,?,?\";\n getJdbcTemplate().update(sql, new Object[] {supplier.getSupplierId(), supplier.getSupplierName(), supplier.getSupplierType(), supplier.getPermanentAddress(), supplier.getTemporaryAddress(),supplier.getEmail() ,supplier.getImage()});\n\t}", "public void create_contact(String contactName, SupplierCard supplier) {\n supplier_dao.create_contact(contactName, supplier);\n }", "public String getSupplierNum() {\n return supplierNum;\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\n\t\t\t\"ID: %d. Name: %s. Supplier: [ \"+supplier+\" ]\", id, name\n\t\t);\n\t}", "public void updateSupplierDetail(Supplier obj) {\n\t\t\r\n\t}", "public void setSuperiorIdName(String superiorIdName) {\n this.superiorIdName = superiorIdName;\n }", "public void setSuppliersInforId(String suppliersInforId) {\n this.suppliersInforId = suppliersInforId;\n }", "private void setNewName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n newName_ = value;\n }", "@PostMapping(\"/jpa/users/{username}/suppliers\")\n public ResponseEntity<Void> createSupplier(@PathVariable String username,\n @RequestBody Supplier supplier){\n supplier.setUsername(username);\n Supplier createdSupplier = supplierJpaRepo.save(supplier);\n\n URI uri = ServletUriComponentsBuilder.fromCurrentRequest().path(\"/{id}\")\n .buildAndExpand(createdSupplier.getId()).toUri();\n\n\n return ResponseEntity.created(uri).build();\n\n }", "public void updateSupplier(int id, String cvr) throws SQLException {\n\t\tupdateSupplierById.setString(1, cvr);\n\t\tupdateSupplierById.setInt(2, id);\n\t\tupdateSupplierById.executeUpdate();\n\t}", "public void update(SupplierCard supplier) {\n supplier_dao.update(supplier);\n }", "public void addSupplier(ModelElement supplier1)\n // -end- 335C0D7A02E4 add_head327A646F00E6 \"Dependency::addSupplier\"\n ;", "@Override\n\tpublic boolean updateSupplier(Supplier_model s) \n\t{\n\t\t\t\tboolean flag=false;\n\t\t\t\ttry{\n\t\t\t\t\tsession=hibernateUtil.openSession();\n\t\t\t\t\ttx=session.beginTransaction();\n\t\t\t\t\tQuery q=session.createQuery(\"update Supplier_model set suppliername='\"+s.getSuppliername()+\"', description='\"+s.getDescription()+\"', emailid='\"+s.getEmailid()+\"', suppcompanyid='\"+s.getSuppcompanyid()+\"', phone='\"+s.getPhone()+\"', mobile1='\"+s.getMobile1()+\"', mobile2='\"+s.getMobile2()+\"', website='\"+s.getWebsite()+\"', address='\"+s.getAddress()+\"', cid='\"+s.getCid()+\"', sid='\"+s.getSid()+\"', cityid='\"+s.getCityid()+\"', jobposition='\"+s.getJobposition()+\"', supptitleid='\"+s.getSupptitleid()+\"', faxno='\"+s.getFaxno()+\"', updated_by='\"+s.getUpdated_by()+\"' where supplierid=\"+s.getSupplierid());\n\t\t\t\t\tint i=q.executeUpdate();\n\t\t\t\t\tif(i>0)\n\t\t\t\t\t\tflag=true;\n\t\t\t\t\ttx.commit();\n\t\t\t\t\t\n\t\t\t\t}catch(Throwable ex){\n\t\t\t\t\tif(tx!=null)\n\t\t\t\t\t\ttx.rollback();\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t\tfinally{\n\t\t\t\t\tsession.close();\n\t\t\t\t}\n\t\t\t\treturn flag;\n\t}", "public Short getSuppliersId() {\n return suppliersId;\n }", "@Override\r\n\tpublic int hashCode() {\r\n\t\tfinal int prime = 31;\r\n\t\tint result = 1;\r\n\t\tresult = prime * result + ((supplierID == null) ? 0 : supplierID.hashCode());\r\n\t\treturn result;\r\n\t}", "@RequestMapping(value = \"/supplier/add\", method = RequestMethod.POST)\n\t\tpublic String addSupplier(@ModelAttribute(\"suppliers\") Suppliers suppliers) {\n\t\t\tSystem.out.println(\"Hello.. I'm inside /suppliers add\");\n\t\t\tString newID = Util.removeComma(suppliers.getId());\n\t\t\tsuppliers.setId(newID);\n\t\t\tsuppliersDAO.saveOrUpdate(suppliers);\n\n\t\t\treturn \"redirect:/suppliers\";\n\n\t\t}", "public void setDemoName(long demoId, String demoName) {\n SQLiteDatabase db = this.getWritableDatabase();\n ContentValues cv = new ContentValues();\n cv.put(COL_NAME, demoName);\n db.update(DEMO_TABLE, cv, COL_ID + \"=?\",\n new String[]{String.valueOf(demoId)});\n db.close();\n }", "public void create(SupplierCard supplier) {\n supplier_dao.create(supplier);\n }", "public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$26);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$26);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }", "public String getSuppliersInforId() {\n return suppliersInforId;\n }", "public void setName(java.lang.CharSequence value) {\n this.name = value;\n }", "public void setName(String v){\n\t\ttry{\n\t\tsetProperty(SCHEMA_ELEMENT_NAME + \"/name\",v);\n\t\t_Name=null;\n\t\t} catch (Exception e1) {logger.error(e1);}\n\t}", "public void setName(java.lang.String value);", "public void setName(java.lang.String value);", "public void addSupplier() {\n String name = getToken(\"Enter supplier company: \");\n String address = getToken(\"Enter address: \");\n String phone = getToken(\"Enter phone: \");\n Supplier result;\n result = warehouse.addSupplier(name, address, phone);\n if (result == null) {\n System.out.println(\"Supplier could not be added.\");\n }\n System.out.println(result);\n }", "@Override\n\tpublic Supplier getSupplierId(long supplierId) {\n\t\tString sql=\"SELECT * FROM supplier WHERE supplier_id=?\";\n\t\tRowMapper<Supplier> rowmapper=new BeanPropertyRowMapper<Supplier> (Supplier.class);\n\t\treturn this.getJdbcTemplate().queryForObject(sql, rowmapper, supplierId);\n\t}", "public void setName(String name)\r\n\t{\r\n\t\tthis.name = name.trim();\r\n\t\tif(name.length() > 0)\r\n\t\t{\r\n\t\t this.sponsorFirstChar = Character.toLowerCase(name.charAt(0));\r\n\t\t}\r\n\t\t\r\n\t}", "public void setSupplierCommodity(String supplierCommodity) {\n this.supplierCommodity = supplierCommodity == null ? null : supplierCommodity.trim();\n }", "@Override\n\tpublic void modifyRestaurantName(long id, String restaurantName) {\n\t\t\n\t}", "public void changeSupplier(ModelElement oldSupplier, ModelElement newSupplier)\n // -end- 3E423DCA0134 head327A646F00E6 \"changeSupplier\"\n // declare any checked exceptions\n // please fill in/modify the following section\n // -beg- preserve=no 3E423DCA0134 throws327A646F00E6 \"changeSupplier\"\n\n // -end- 3E423DCA0134 throws327A646F00E6 \"changeSupplier\"\n ;", "public void newSupplierMode() {\n\n\t\tsupplierList.setEnabled(false);\n\t\taddressTF.setBackground(SystemColor.white);\n\n\t\tnameTF.setEditable(true);\n\t\tidTF.setEditable(false);\n\t\teMailTF.setEditable(true);\n\t\tnameTF.setEditable(true);\n\t\taddressTF.setEditable(true);\n\t\ttelTF.setEditable(true);\n\n\t\teditItemButton.setEnabled(false);\n\t\tremoveItemButton.setEnabled(false);\n\t\tsaveItemButton.setVisible(true);\n\t\tcancelBtn.setVisible(true);\n\n\t\tclearTextFields();\n\t}", "public String getSupplierPartId() {\r\n return this.supplierPartId;\r\n }", "public void setName(@Nullable String value) {\n getElement().setName(value);\n }", "public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$2);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$2);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }", "public void setName(java.lang.String name)\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(NAME$4);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$4);\n }\n target.setStringValue(name);\n }\n }", "public void setName(String value) {\n this.name = value;\n }", "public void setName(String Name){\r\n name = Name;\r\n }", "public void setIdentifier(String value) {\n/* 214 */ setValue(\"identifier\", value);\n/* */ }", "public void setDealerName(String dealerName);", "public void setName(final String pName){this.aName = pName;}", "public void setName(String name) {\n fName= name;\n }", "public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$6);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }", "public Builder setIdentifier(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n identifier_ = value;\n onChanged();\n return this;\n }", "public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$8);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$8);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }", "public void setName(java.lang.String name)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\r\n }\r\n target.setStringValue(name);\r\n }\r\n }", "public void setName(String value) {\n\t\tname = value;\n\t}", "public void setName(org.hl7.fhir.String name)\n {\n generatedSetterHelperImpl(name, NAME$0, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "public void setName(java.lang.String name)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\n }\n target.setStringValue(name);\n }\n }", "public void setName(java.lang.String name)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NAME$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NAME$0);\n }\n target.setStringValue(name);\n }\n }", "@RdfProperty(\"http://www.coadunation.net/schema/rdf/1.0/base#IdValue\")\n public abstract void setValue(String value);", "public Builder setName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n name_ = value;\n onChanged();\n return this;\n }", "public Builder setCouponName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n couponName_ = value;\n onChanged();\n return this;\n }", "public Builder setCouponName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n couponName_ = value;\n onChanged();\n return this;\n }", "public Builder setCouponName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n couponName_ = value;\n onChanged();\n return this;\n }", "public void setUniqueName(java.lang.String uniqueName)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNIQUENAME$10, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(UNIQUENAME$10);\r\n }\r\n target.setStringValue(uniqueName);\r\n }\r\n }", "public Builder setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n name_ = value;\n onChanged();\n return this;\n }", "public Builder setName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n name_ = value;\n onChanged();\n return this;\n }" ]
[ "0.7598223", "0.74819064", "0.7413968", "0.71000767", "0.70238006", "0.67664534", "0.6692934", "0.6571155", "0.65225524", "0.6358742", "0.6313818", "0.6310917", "0.6229541", "0.6189567", "0.6177649", "0.6069083", "0.60488504", "0.5957209", "0.5881563", "0.5857063", "0.5836121", "0.5834627", "0.571156", "0.571156", "0.571156", "0.57102746", "0.5664324", "0.56600213", "0.56531507", "0.56382453", "0.5638015", "0.56318504", "0.5584494", "0.5554776", "0.55407554", "0.5530311", "0.5475883", "0.5454803", "0.5447377", "0.5442861", "0.54310805", "0.54151434", "0.5395268", "0.5391012", "0.5364753", "0.53449154", "0.5338032", "0.53301775", "0.53121334", "0.53082806", "0.528545", "0.52790827", "0.5266441", "0.52657306", "0.52657306", "0.5245777", "0.5236357", "0.5223961", "0.5208158", "0.52045023", "0.51858747", "0.5183998", "0.5182924", "0.518277", "0.5168512", "0.5160847", "0.51575893", "0.5149746", "0.51466906", "0.51458097", "0.5139572", "0.5136508", "0.5127597", "0.5114972", "0.50915444", "0.5088055", "0.5085402", "0.5082859", "0.5074898", "0.5074898", "0.5072922", "0.50708896", "0.50708896", "0.50708896", "0.50708896", "0.50708896", "0.50708896", "0.50708896", "0.50708896", "0.50708896", "0.50708896", "0.50708896", "0.5069899", "0.5069899", "0.5069899", "0.5068457", "0.5067419", "0.5067419", "0.5067419", "0.5067419" ]
0.7511737
1
end setName() / Sets value as the attribute value for OnHoldFlag
public void setOnHoldFlag(String value) { // Valid values are null, Y and N if ((value != null) && (!("".equals(value.trim())))) { if (!(("Y".equals(value)) || ("N".equals(value)))) { throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT, getEntityDef().getFullName(), // EO name getPrimaryKey(), // EO PK "OnHoldFlag", // Attribute Name value, // Attribute value "AK", // Message product short name "FWK_TBX_T_SUP_ONHOLD_INVALID"); // Message name } } setAttributeInternal(ONHOLDFLAG, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getOnHoldFlag()\n {\n return (String)getAttributeInternal(ONHOLDFLAG);\n }", "void setHold(boolean b)\n\t\t{\n\t\t\thold = b;\n\t\t}", "public void setOnHold(java.lang.String r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.telecom.ConnectionServiceAdapterServant.2.setOnHold(java.lang.String):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.2.setOnHold(java.lang.String):void\");\n }", "public void setAlive(boolean x){\n \talive = x;\r\n }", "public static void attribute(String name, boolean value) {\n openAttribute(name); Log.write(value); closeAttribute();\n }", "void setInactive(boolean aInactive) {\n/* 4829 */ this.inactive = aInactive;\n/* */ }", "public abstract void setBusy (String description);", "private void setBidded(){\n this.status = \"Bidded\";\n }", "public void\t\t\t\tsetHolding(LocalHolding holding);", "public void setOn(boolean arg) {\n isOn = arg;\n }", "public void setCargoIntakeState() {\n blueLED.set(false);\n greenLED.set(false);\n if (!redLED.get() && timer.get() >= pulseTime) {\n redLED.startPulse();\n timer.stop();\n timer.reset();\n }\n else if (redLED.get() && timer.get() > pulseTime) {\n redLED.set(false);\n }\n else {\n timer.start();\n }\n }", "void setAlive(boolean isAlive);", "@Override\n\tpublic void setIsUsed(boolean arg0) {\n\n\t}", "public void setMusicOnHold() throws FrameException {\n infoElements.put(new Integer(InfoElement.MUSICONHOLD), new byte[0]);\n }", "public void setDefilade(int defiladeState);", "private void setAlive(boolean value) {\n \n alive_ = value;\n }", "public int setInactiveForNoRebill();", "@Override\n public void setAttribute(boolean f)\n {\n checkState();\n attribute = f;\n }", "public void setComplete(boolean param){\n \n // setting primitive attribute tracker to true\n localCompleteTracker =\n true;\n \n this.localComplete=param;\n \n\n }", "protected void setObjectHeld(boolean oHeld) { objHeld = oHeld; }", "@Override\r\n\t\tpublic void setHoldability(int holdability) throws SQLException {\n\t\t\t\r\n\t\t}", "void set(boolean on);", "protected void setFlag() {\n flag = flagVal;\n }", "protected void setFlag() {\n flag = flagVal;\n }", "public Boolean isHeld() { return held; }", "public void setDead(boolean value);", "public void changeAttrName() {\r\n }", "public void setActive(Boolean active)\r\n/* */ {\r\n/* 207 */ this.active = active;\r\n/* */ }", "public void setClaim(boolean a){\n isClaimed= a;\n \n}", "public void setFlagMethodName(String name) {\n m_flagMethodName = name;\n }", "public void setEnabled(boolean aFlag) { _enabled = aFlag; }", "public void setStolenFlag(String stolenFlag)\n\t{\n\t\tthis.stolenFlag = stolenFlag;\n\t}", "public void setAvailableForRentFlag(String value) {\n setAttributeInternal(AVAILABLEFORRENTFLAG, value);\n }", "public boolean isHolding();", "public void setActiveFlag(String value) {\n setAttributeInternal(ACTIVEFLAG, value);\n }", "void setInternal(ATTRIBUTES attribute, Object iValue);", "public void setHoldTextureData(boolean holdTextureData) {\n/* 67 */ this.holdTextureData = holdTextureData;\n/* */ }", "public void setAlive() {\n\t\tif(alive)\n\t\t\talive = false;\n\t\telse\n\t\t\talive = true;\n\t}", "public void setWon(){\n won = true;\n }", "public void setClaim(boolean a,AbstAnt ant){\n isClaimed= a;\n claimer= ant;\n}", "public void setAlive() {\n\t\tif (this.alive == true) {\n\t\t\tthis.alive = false;\n\t\t} else {\n\t\t\tthis.alive = true;\n\t\t}\n\t}", "public void setStolenFlag(Character aStolenFlag) {\n stolenFlag = aStolenFlag;\n }", "public void setAchieved(Boolean newValue);", "public void setCargoOuttakeState() {\n greenLED.set(true);\n redLED.set(false);\n blueLED.set(false);\n }", "void setInvoiced(boolean invoiced);", "public void setActiveflag(String value) {\n setAttributeInternal(ACTIVEFLAG, value);\n }", "public void set(boolean bol);", "public void setProcessed (boolean Processed)\n{\nset_Value (\"Processed\", new Boolean(Processed));\n}", "public void setStock_flag ( String stock_flag ) { this.stock_flag = stock_flag ; }", "@Override\n\t\tpublic void setAttribute(String name, Object value) {\n\t\t\t\n\t\t}", "public void setTallied(java.lang.Boolean value);", "public void setFlag(boolean bol){\n\t\tflag = bol;\n\t}", "public void setAttrib(String name, String value);", "public void setOn(){\n state = true;\n //System.out.println(\"Se detecto un requerimiento!\");\n\n }", "@Override\n public void onRPClassAddAttribute(RPClass rpclass,\n String name, Definition.Type type, byte flags) {\n }", "public void setSoft(boolean soft);", "void setValueLocked(boolean valueLocked);", "public void setName() {\r\n\t\tapplianceName = \"Refrigerator\";\r\n\t}", "public void setFlag(Integer flag) { this.flag = flag; }", "final public void setAttr(final String name, final Object value) {\r\n\t\tmOptmizedKey++;\r\n\t\tfor(final Attr attr : mAttributes) {\r\n\t\t\tif(attr.Name.equals(name))\r\n\t\t\t\tattr.Object = value;\r\n\t\t}\r\n\t}", "public void setRevealed(int revealed) { revealedShips = revealed;}", "@Override\n\tpublic void setName(String name) {\n\t\theldObj.setName(name);\n\t}", "void setDefeatCondition(String conditionIdentifier);", "private void setNameAutomatic(){\n\t}", "void setIsManaged(boolean isManaged);", "public void giveFlag(Flag f)\r\n\t{\r\n\t\thasFlag = true;\r\n\t\tflag = f;\r\n\t}", "void setManualCheck (boolean value);", "public void setOff(){\n state = false;\n //System.out.println(\"El requerimiento esta siendo atendido!\");\n }", "public void noteOff()\n\t{\n\t\ttimeFromOff = 0f;\n\t\tisTurnedOff = true;\n\t}", "protected void onPref(String name, String value){}", "public boolean setPropertyUnityGain(boolean aValue);", "public void setreadFlag(Boolean value) {\r\n setAttributeInternal(READFLAG, value);\r\n }", "public AppliedHoldInfo() {\n }", "public void setCheese(Cheese newHold) {\n this.hold = newHold;\n }", "public abstract boolean setActive(boolean active);", "@Override\r\n\tpublic String name() {\n\t\treturn \"&5Toggle abilities.\";\r\n\t}", "@Override\n\tpublic void attribute(QName qName, String value) {\n\t\t\n\t}", "@Override\r\n\tpublic void addAttr(String name, String value) {\n\t}", "void setCheckedOut(boolean checkedOut);", "@Override\n\t\tpublic void setAttribute(String name, Object o) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void setHungry() {\n\t\t\n\t}", "public void getEaten() {\n\t\tsuper.flag=true;\n\t}", "public void set()\n\t{\n\t\tbitHolder.setValue(1);\n\t}", "@Override\n\t\t\t\t\tprotected void onChangeFlag(Service object, Boolean flag) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "void markInactive();", "public void setAttributeValue(java.lang.String param) {\r\n localAttributeValueTracker = true;\r\n\r\n this.localAttributeValue = param;\r\n\r\n\r\n }", "public void setOccupied(boolean occupied){\n this.occupied = occupied;\n }", "public void setIvaFlag(String value) {\n setAttributeInternal(IVAFLAG, value);\n }", "public String getReadWriteAttribute();", "public abstract void setBlinking(boolean status);", "public void buyFarm(){\n bought = !bought;\n }", "public void turn_off () {\n this.on = false;\n }", "public String getSettleFlag() {\n return settleFlag;\n }", "public void xsetUseTimings(org.apache.xmlbeans.XmlBoolean useTimings)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlBoolean target = null;\n target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(USETIMINGS$22);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(USETIMINGS$22);\n }\n target.set(useTimings);\n }\n }", "public void kinged(){this.king = true;}", "public void setHoldCode(java.lang.String holdCode) {\n this.holdCode = holdCode;\n }", "public boolean setName(String name);", "public boolean setName(String name);", "protected void setIsAlive(boolean newValue) {\n\t\tisAlive = newValue;\n\t}", "public void setActivo(boolean activo)\r\n/* 149: */ {\r\n/* 150:255 */ this.activo = activo;\r\n/* 151: */ }" ]
[ "0.6924965", "0.62873363", "0.6062082", "0.5806959", "0.5806233", "0.58014315", "0.57445174", "0.57417417", "0.5704182", "0.5680188", "0.56510895", "0.5639186", "0.560492", "0.5601903", "0.55838466", "0.5571365", "0.5570058", "0.55697757", "0.5560842", "0.5557125", "0.5541336", "0.5521733", "0.55011773", "0.55011773", "0.54636514", "0.5453595", "0.5452164", "0.5444944", "0.5441593", "0.54376024", "0.54099816", "0.5403745", "0.53994584", "0.53911835", "0.5388027", "0.5382141", "0.53707576", "0.53692245", "0.5362439", "0.535973", "0.535589", "0.53543115", "0.53511167", "0.5348299", "0.53365535", "0.5336399", "0.533201", "0.5330153", "0.53142965", "0.5309674", "0.5297877", "0.5281532", "0.52746254", "0.5271289", "0.5260667", "0.52598554", "0.5257093", "0.5251039", "0.5250675", "0.5245256", "0.5238898", "0.5211524", "0.52009606", "0.5200281", "0.51975256", "0.51966554", "0.5182995", "0.51744705", "0.5174423", "0.5173569", "0.51707304", "0.5166303", "0.5165015", "0.516189", "0.51616204", "0.5158674", "0.51517576", "0.5149441", "0.5148686", "0.5147011", "0.51446354", "0.5142564", "0.5142542", "0.51416934", "0.51348954", "0.5133325", "0.5132766", "0.51305664", "0.5129594", "0.5123849", "0.51234514", "0.51232165", "0.51222914", "0.5121764", "0.51214314", "0.51153064", "0.51127034", "0.51127034", "0.5112676", "0.5109271" ]
0.82294434
0
end setOnHoldFlag() / Sets value as the attribute value for StartDate Business Rules: Start Date is required. Cannot be earlier than sysdate.
public void setStartDate(Date value) { validateStartDate(value); setAttributeInternal(STARTDATE, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOnHoldFlag(String value)\n {\n // Valid values are null, Y and N\n\n if ((value != null) && (!(\"\".equals(value.trim()))))\n { \n if (!((\"Y\".equals(value)) || (\"N\".equals(value))))\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"OnHoldFlag\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_SUP_ONHOLD_INVALID\"); // Message name\n\n }\n }\n\n setAttributeInternal(ONHOLDFLAG, value);\n \n }", "public void setREQ_START_DATE(java.sql.Date value)\n {\n if ((__REQ_START_DATE == null) != (value == null) || (value != null && ! value.equals(__REQ_START_DATE)))\n {\n _isDirty = true;\n }\n __REQ_START_DATE = value;\n }", "public void validateStartDate(Date value)\n {\n \n if (value != null)\n {\n OADBTransaction transaction = getOADBTransaction();\n\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, you cannot compare \n // oracle.jbo.domain.Date objects directly. Instead, convert the value to \n // a long as shown.\n \n long sysdate = transaction.getCurrentDBDate().dateValue().getTime();\n long startDate = value.dateValue().getTime();\n\n if (startDate < sysdate)\n {\n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"StartDate\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_DATE_PAST\"); // Message name\n } \n }\n \n }", "public void setStartDate(java.util.Date value);", "void setStartDate(Date startDate);", "public void setStartDate(Date s);", "public void setStartDate(Date start)\r\n {\r\n this.startDate = start;\r\n }", "public void setREQ_END_DATE(java.sql.Date value)\n {\n if ((__REQ_END_DATE == null) != (value == null) || (value != null && ! value.equals(__REQ_END_DATE)))\n {\n _isDirty = true;\n }\n __REQ_END_DATE = value;\n }", "public void setValidUntil(Date validUntil);", "public void setValidFrom(Date validFrom);", "public void setDtStart(Date dtStart) {\r\n this.dtStart = dtStart;\r\n }", "public void changeStartDate(DateToken startToken) {\r\n\t\tDateTime now = new DateTime();\r\n\t\tif (Interval.nowStub != null) now = Interval.nowStub;\r\n\t\t\r\n\t\tstartDateExplicitlySet = true;\r\n\t\t\r\n\t\tif (this.start == null) {\r\n\t\t\tDateTime start = startToken.mergeInto(now).withTime(0, 0, 0, 0);\r\n\r\n\t\t\t// not leaping forward a year here; date should be taken as is\r\n\t\t\t\r\n\t\t\tthis.start = start;\r\n\t\t\tend = start.withTime(23, 59, 0, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// a time has already been set\r\n\t\t\tDateTime start = startToken.mergeInto(this.start);\r\n\t\t\tthis.start = start;\r\n\t\t\tif (end.isBefore(this.start)) {\r\n\t\t\t\tend = this.start.plusHours(1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tend = startToken.mergeInto(end);\r\n\t\t\t\tif (end.isBefore(start)) {\r\n\t\t\t\t\tend = start.plusHours(1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testSetStartDate() {\n\t\tassertNotEquals(calTest, initialJob.getStartDate());\n\t\tinitialJob.setStartDate(calTest.get(Calendar.YEAR), calTest.get(Calendar.MONTH), \n\t\t\t\tcalTest.get(Calendar.DATE), calTest.get(Calendar.HOUR), \n\t\t\t\tcalTest.get(Calendar.MINUTE));\n\t\tassertEquals(calTest, initialJob.getStartDate());\n\t\t\n\t\t// check different dates are not equivalent\n\t\tinitialJob.setStartDate(calTest.get(Calendar.YEAR) + 1, calTest.get(Calendar.MONTH), \n\t\t\t\tcalTest.get(Calendar.DATE), calTest.get(Calendar.HOUR), \n\t\t\t\tcalTest.get(Calendar.MINUTE));\n\t\tassertNotEquals(calTest, initialJob.getStartDate());\n\t}", "public void setRenewalEffectiveDate(java.util.Date value);", "@Override\r\n\tpublic void onBeforeUpdate(Record record) throws DeadlineExceededException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tint newStatus = (Integer) record.getValue(\"resignationstatusid\");\r\n\t\tint oldStatus = (Integer) record.getOldValue(\"resignationstatusid\");\r\n\t\tif((oldStatus == HRISConstants.RESIGNATION_NEW || oldStatus == HRISConstants.RESIGNATION_ONHOLD || oldStatus == HRISConstants.RESIGNATION_REJECTED)&& newStatus == HRISConstants.RESIGNATION_ACCEPTED){\r\n\t\t\t\r\n\t\t\tString TODAY_DATE = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(SystemParameters.getCurrentDateTime());\r\n\t\t\trecord.addUpdate(\"approveddate\",TODAY_DATE);\r\n\t\t}\r\n\t}", "public void setValidTill(Date validTill) {\n\t\tthis.validTill = validTill;\n\t}", "public void setStartDate(Date sDate) throws IllegalArgumentException {\n\t\tif (sDate == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tstartDate = sDate;\n\t\tupdateAvailability(\"\");\n\t}", "public void setValidatedFrom(Date validatedFrom);", "public void setStartedDate(Date value) {\n this.startedDate = value;\n }", "abstract public void setServiceAppointment(Date serviceAppointment);", "public void setServiceStartDate(Date value) {\n setAttributeInternal(SERVICESTARTDATE, value);\n }", "public void setDateStart (Timestamp DateStart);", "public void setEffectiveDate(java.util.Date value);", "public void setStartServiceDate(Date value) {\n setAttributeInternal(STARTSERVICEDATE, value);\n }", "public Builder setBeginDate(long value) {\n bitField0_ |= 0x00000040;\n beginDate_ = value;\n\n return this;\n }", "public void setStart( Calendar start );", "public void setRequestDate(Date requestDate);", "@Override\n @IcalProperties({\n @IcalProperty(pindex = PropertyInfoIndex.DTSTART,\n presenceField = \"dtval\",\n required = true,\n reschedule = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true,\n freeBusyProperty = true,\n timezoneProperty = true),\n @IcalProperty(pindex = PropertyInfoIndex.INDEX_START,\n jname = \"indexStart\",\n presenceField = \"dtval\",\n required = true,\n reschedule = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true,\n freeBusyProperty = true,\n timezoneProperty = true)}\n )\n @NoProxy\n public void setDtstart(final BwDateTime val) {\n dtstart = val;\n }", "public void setActualStart(Date actualStartDate)\r\n {\r\n m_actualStart = actualStartDate;\r\n }", "public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}", "public void setStartDate(Date startDate) {\r\n this.startDate = startDate;\r\n }", "public void setStartDate(Date startDate) {\r\n this.startDate = startDate;\r\n }", "public void setFechaInclusion(Date fechaInclusion)\r\n/* 155: */ {\r\n/* 156:174 */ this.fechaInclusion = fechaInclusion;\r\n/* 157: */ }", "@Override\n\t\t\tpublic void setValue(Date value) {\n\t\t\t\tsuper.setValue(value);\n\t\t\t\tstart_cal_date = value.getTime();\n\t\t\t\tinfo_loader.load();\n\t\t\t}", "public void setCreateDate(Date createDate)\r\n/* */ {\r\n/* 165 */ this.createDate = createDate;\r\n/* */ }", "private void validateDate() {\n if (dtpSightingDate.isEmpty()) {\n dtpSightingDate.setErrorMessage(\"This field cannot be left empty.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is after research began (range check)\n else if (!validator.checkDateAfterMin(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter from \" + researchDetails.MIN_DATE + \" and afterwards. This is when the research period began.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is not in the future (range check / logic check)\n else if (!validator.checkDateNotInFuture(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter a date from today or before. Sighting date cannot be in the future.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n }", "public void setBeginnDate(Date beginnDate) {\n\t\tthis.beginnDate = beginnDate;\n\t}", "public void setDueDate(Date d){dueDate = d;}", "void setEventStartDate(Date startEventDate);", "public void setFreezeTimestamp(java.util.Date value);", "public void setBeginDate(Date beginDate) {\n this.beginDate = beginDate;\n if(this.beginDate.before(DateUtils.getToday())){\n this.beginDate = DateUtils.getToday();\n }\n //For new event or event with beginDate after endDate, set endDate after 30 minutes when beginDate change\n if(this.endDate == null || (this.endDate != null && !this.endDate.after(beginDate)))\n this.endDate = new Date(beginDate.getTime() + TimeUnit.MINUTES.toMillis(30));\n }", "public CpFldValidDate() { super(10018, 1); }", "public void setStartDate(Date startDate)\r\n {\r\n m_startDate = startDate;\r\n }", "void xsetRequired(org.apache.xmlbeans.XmlBoolean required);", "public void setValidatedTo(Date validatedTo);", "public void setStart(Date newStart) {\n if (!newStart.before(_end)) {\n throw new IllegalArgumentException(ERR_START_AFTER_END);\n }\n _start = (Date) newStart.clone();\n }", "public void setStartDate(Date startDate) {\n this.startDate = startDate;\n }", "public void setStartDate(Date startDate) {\n this.startDate = startDate;\n }", "public void setStartDate(Date startDate) {\n this.startDate = startDate;\n }", "protected void setStartDate(final AbsoluteDate startDate) {\n this.startDate = startDate;\n }", "public void setDeadlineDate(Date deadlineDate) {\r\n this.deadlineDate = deadlineDate;\r\n }", "public void setNotiCreated(Date value) {\r\n setAttributeInternal(NOTICREATED, value);\r\n }", "public abstract void setStartTime(Date startTime);", "public void setReqDate(Date reqDate) {\r\n\t\tthis.reqDate = reqDate;\r\n\t}", "public Builder setStartDate(long value) {\n \n startDate_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic Long updateStartDate() {\n\t\treturn null;\n\t}", "public void setBegDate(java.lang.String value) {\n this.begDate = value;\n }", "public void setRequestDate(Date requestDate) { this.requestDate = requestDate; }", "@Override\n\tpublic void setStartDate(Date startDate) {\n\t\tmodel.setStartDate(startDate);\n\t}", "public void setDeliveryStartDate(Date value) {\n setAttributeInternal(DELIVERYSTARTDATE, value);\n }", "public void xsetJobStartDate(org.apache.xmlbeans.XmlDate jobStartDate)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlDate target = null;\r\n target = (org.apache.xmlbeans.XmlDate)get_store().find_element_user(JOBSTARTDATE$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlDate)get_store().add_element_user(JOBSTARTDATE$0);\r\n }\r\n target.set(jobStartDate);\r\n }\r\n }", "@Test\n public void testSetStartDate() {\n System.out.println(\"setStartDate\");\n Calendar newStart = new GregorianCalendar(2000, 01, 01);\n String startDate = newStart.toString();\n DTO_Ride instance = dtoRide;\n instance.setStartDate(startDate);\n \n String result = instance.getStartDate();\n assertEquals(newStart, newStart);\n }", "public void setDateFilled() {\n\t\tthis.dateFilled = new Date();\n\t\tSystem.out.println(\"DF \" + dateFilled);\n\t}", "public void setBEGIN_DATE(Date BEGIN_DATE) {\n this.BEGIN_DATE = BEGIN_DATE;\n }", "@Override\n\tpublic void setRequestedDate(java.util.Date requestedDate) {\n\t\t_dmGtStatus.setRequestedDate(requestedDate);\n\t}", "public void setPaperMediumStartTime(Date value) {\n setAttributeInternal(PAPERMEDIUMSTARTTIME, value);\n }", "public void setStitchPrepDate(Date value) {\n setAttributeInternal(STITCHPREPDATE, value);\n }", "boolean hasBeginDate();", "public void setStartDate(String date){\n\t\tthis.startDate = date;\n\t}", "public void setServiceDate(java.util.Date value);", "public void setRealEstablish(Date realEstablish) {\r\n this.realEstablish = realEstablish;\r\n }", "public M csmiBirthdayStart(Object start){this.put(\"csmiBirthdayStart\", start);return this;}", "public String notNullActualStart(MaintenanceRequest mrq){\n\t\tString message = \"\";\n\t\tif(MALUtilities.isEmpty(mrq.getActualStartDate())){\n\t\t\tmessage = \"Start Date is required\";\n\t\t}\n\t\treturn message;\n\t}", "@Override\n\tpublic void setCustomCondition(RptParams params) {\n\t\tif (params.getObject(\"startDate\") != null) {\n Date sd = (Date)params.getObject(\"startDate\");\n this.pkStartDate.setValue(sd);\n\t\t}\n\n\t\tif (params.getObject(\"endDate\") != null) {\n\t\t\tDate ed = (Date) params.getObject(\"endDate\");\n\t\t\tthis.pkEndDate.setValue(ed);\n\t\t}\n\t}", "public void setMandatory(boolean mandatory)\n {\n this.mandatory = mandatory;\n performFlags();\n }", "public void setBaselineStart(Date baselineStartDate)\r\n {\r\n m_baselineStart = baselineStartDate;\r\n }", "public boolean isSetStartTime()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(STARTTIME$22) != null;\r\n }\r\n }", "public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }", "void xsetStartTime(org.apache.xmlbeans.XmlDateTime startTime);", "public void validateEndDate(Date value)\n {\n \n if (value != null)\n {\n OADBTransaction transaction = getOADBTransaction();\n\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, you cannot compare \n // oracle.jbo.domain.Date objects directly. Instead, convert the value to \n // a long as shown.\n \n long sysdate = transaction.getCurrentDBDate().dateValue().getTime();\n long endDate = value.dateValue().getTime();\n\n if (endDate < sysdate)\n { \n throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(), // EO name\n getPrimaryKey(), // EO PK\n \"EndDate\", // Attribute Name\n value, // Attribute value\n \"AK\", // Message product short name\n \"FWK_TBX_T_END_DATE_PAST\"); // Message name\n } \n }\n\n }", "public void setStartDate(Date startDate) {\n\t\tthis.startDate = startDate;\n\t}", "public void setStartDate(Date startDate) {\n\t\tthis.startDate = startDate;\n\t}", "public void setStartDate(java.sql.Date newStartDate) {\n\tstartDate = newStartDate;\n}", "public ElementDefinitionDt setMustSupport(BooleanDt theValue) {\n\t\tmyMustSupport = theValue;\n\t\treturn this;\n\t}", "public void setStartDate(String startDate) {\n this.startDate = startDate;\n }", "public boolean isSetRequestDate() {\n return this.RequestDate != null;\n }", "public void setArrivalDate(Date arrivalDate);", "void setInvoicedDate(Date invoicedDate);", "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}", "@And(\"^Select start date$\")\n public void selectStartDate() throws Throwable {\n throw new PendingException();\n }", "public void setHC_WorkStartDate2 (Timestamp HC_WorkStartDate2);", "public void setActivationDate() {\r\n\t\tif(this.removalDate != null) {\r\n\t\t\tthrow new RuntimeException(\"This item has already been activated\");\r\n\t\t}\r\n\t\tthis.activationDate = new Date(); \r\n\t\tGregorianCalendar cal = new GregorianCalendar();\r\n\t\t\r\n\t\t// set date for test\r\n\t\t//cal.set(2010, 10, 29, 02, 55);\r\n\t\t\r\n\t\t\r\n\t\tcal.add(GregorianCalendar.HOUR_OF_DAY, this.itemType.getItemDuration());\r\n\t\tthis.removalDate = cal.getTime();\r\n\t}", "public void setCreationDate(Date value)\n {\n setAttributeInternal(CREATIONDATE, value);\n }", "boolean isSetDate();", "public void xsetStartExecDate(org.apache.xmlbeans.XmlDate startExecDate)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlDate target = null;\n target = (org.apache.xmlbeans.XmlDate)get_store().find_element_user(STARTEXECDATE$8, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlDate)get_store().add_element_user(STARTEXECDATE$8);\n }\n target.set(startExecDate);\n }\n }", "public void setStartTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(STARTTIME_PROP.get(), value);\n }", "public void setStartTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(STARTTIME_PROP.get(), value);\n }", "boolean isSetFoundingDate();", "public boolean hasBegDate() {\n return fieldSetFlags()[1];\n }", "public void setExpiryTime(java.util.Calendar param){\n localExpiryTimeTracker = true;\n \n this.localExpiryTime=param;\n \n\n }" ]
[ "0.68713963", "0.6799006", "0.67297506", "0.62729025", "0.6040986", "0.60338753", "0.602855", "0.6015888", "0.60041374", "0.6003141", "0.59641457", "0.5891909", "0.58767927", "0.58515966", "0.58252645", "0.5812552", "0.58064026", "0.5791356", "0.5781902", "0.5774364", "0.5763259", "0.5758884", "0.5741513", "0.57411855", "0.5727764", "0.5660858", "0.56569964", "0.56503725", "0.5639284", "0.5635182", "0.5634817", "0.5634817", "0.5618907", "0.56157374", "0.56050634", "0.559924", "0.5581571", "0.5580424", "0.55799305", "0.5569889", "0.5564178", "0.55629516", "0.55568695", "0.5554764", "0.55344623", "0.55276245", "0.5524188", "0.5524188", "0.5524188", "0.5507263", "0.5501797", "0.5491858", "0.5490233", "0.54868096", "0.5475374", "0.54578584", "0.54569733", "0.54537165", "0.5453564", "0.5445256", "0.54437983", "0.5440821", "0.54389733", "0.5437205", "0.5435569", "0.5432693", "0.5430549", "0.5429617", "0.542877", "0.5423678", "0.5423542", "0.5417014", "0.54074097", "0.5406635", "0.5402331", "0.5394674", "0.5383188", "0.5375469", "0.5373131", "0.5357194", "0.5353486", "0.5353486", "0.5353403", "0.535083", "0.534317", "0.5341356", "0.5330595", "0.5326251", "0.53253233", "0.53244036", "0.5322689", "0.5322641", "0.53190947", "0.5319046", "0.5314066", "0.5313876", "0.5313876", "0.5309513", "0.53074485", "0.53025055" ]
0.61486363
4
end setStartDate() / Validates the start date (created as a separate method so it can be called in validateEntity and setStartDate).
public void validateStartDate(Date value) { if (value != null) { OADBTransaction transaction = getOADBTransaction(); // Note that we want to truncate these values to allow for the possibility // that we're trying to set them to be the same day. Calling // dateValue( ) does not include time. Were we to want the time element, // we would call timestampValue(). Finally, you cannot compare // oracle.jbo.domain.Date objects directly. Instead, convert the value to // a long as shown. long sysdate = transaction.getCurrentDBDate().dateValue().getTime(); long startDate = value.dateValue().getTime(); if (startDate < sysdate) { throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT, getEntityDef().getFullName(), // EO name getPrimaryKey(), // EO PK "StartDate", // Attribute Name value, // Attribute value "AK", // Message product short name "FWK_TBX_T_START_DATE_PAST"); // Message name } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setStartDate(Date start)\r\n {\r\n this.startDate = start;\r\n }", "void setStartDate(Date startDate);", "public void setStartDate(Date startDate) {\r\n this.startDate = startDate;\r\n }", "public void setStartDate(Date startDate) {\r\n this.startDate = startDate;\r\n }", "public void setStartDate(Date startDate) {\n this.startDate = startDate;\n }", "public void setStartDate(Date startDate) {\n this.startDate = startDate;\n }", "public void setStartDate(Date startDate) {\n this.startDate = startDate;\n }", "public void setStartDate(Date s);", "public void setStartDate(java.util.Date value);", "public void setStartDate(Date startDate)\r\n {\r\n m_startDate = startDate;\r\n }", "@Override\n\tpublic void setStartDate(Date startDate) {\n\t\tmodel.setStartDate(startDate);\n\t}", "public void setStartDate(Date startDate) {\n\t\tthis.startDate = startDate;\n\t}", "public void setStartDate(Date startDate) {\n\t\tthis.startDate = startDate;\n\t}", "@Test\n\tpublic void testSetStartDate() {\n\t\tassertNotEquals(calTest, initialJob.getStartDate());\n\t\tinitialJob.setStartDate(calTest.get(Calendar.YEAR), calTest.get(Calendar.MONTH), \n\t\t\t\tcalTest.get(Calendar.DATE), calTest.get(Calendar.HOUR), \n\t\t\t\tcalTest.get(Calendar.MINUTE));\n\t\tassertEquals(calTest, initialJob.getStartDate());\n\t\t\n\t\t// check different dates are not equivalent\n\t\tinitialJob.setStartDate(calTest.get(Calendar.YEAR) + 1, calTest.get(Calendar.MONTH), \n\t\t\t\tcalTest.get(Calendar.DATE), calTest.get(Calendar.HOUR), \n\t\t\t\tcalTest.get(Calendar.MINUTE));\n\t\tassertNotEquals(calTest, initialJob.getStartDate());\n\t}", "public void setStartDate(String date){\n\t\tthis.startDate = date;\n\t}", "public void setStartDate(String startDate) {\n this.startDate = startDate;\n }", "protected void setStartDate(final AbsoluteDate startDate) {\n this.startDate = startDate;\n }", "@Override\n\tpublic void setStartDate(java.util.Date startDate) {\n\t\t_esfTournament.setStartDate(startDate);\n\t}", "public void setStartDate(Date sDate) throws IllegalArgumentException {\n\t\tif (sDate == null) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\tstartDate = sDate;\n\t\tupdateAvailability(\"\");\n\t}", "public void setStartDate(java.util.Calendar startDate) {\n this.startDate = startDate;\n }", "public void setStartDate(String startDate) throws ParseException {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n this.startDate = dateFormat.parse(startDate);\n }", "void setEventStartDate(Date startEventDate);", "public void setStartDate(Date value)\n {\n validateStartDate(value);\n setAttributeInternal(STARTDATE, value);\n \n }", "public void setValidatedFrom(Date validatedFrom);", "@Test\n\tpublic void testValidateStartDate() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateStartDate(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateStartDate(\"Invalid value.\");\n\t\t\t\tfail(\"The start date was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\n\t\t\tMap<DateTime, String> dateToString = ParameterSets.getDateToString();\n\t\t\tfor(DateTime date : dateToString.keySet()) {\n\t\t\t\tAssert.assertEquals(date, SurveyResponseValidators.validateStartDate(dateToString.get(date)));\n\t\t\t}\n\t\t\t\n\t\t\tMap<DateTime, String> dateTimeToString = ParameterSets.getDateTimeToString();\n\t\t\tfor(DateTime date : dateTimeToString.keySet()) {\n\t\t\t\tAssert.assertEquals(date, SurveyResponseValidators.validateStartDate(dateTimeToString.get(date)));\n\t\t\t}\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}", "public void setStartDate(LocalDateTime startDate) {\n this.startDate = startDate;\n }", "public void setStartDate(java.sql.Date newStartDate) {\n\tstartDate = newStartDate;\n}", "public void setStartDate(@NotNull DateWithOffset startDate) {\r\n if (startDate == null) { // NOSONAR\r\n throw new NullPointerException(\"startDate\");\r\n }\r\n this.startDate = startDate;\r\n }", "public void validateStartDateAndTime(String date){\n setStartDateAndTimeValid(validateDateAndTime(date));\n }", "public Date getStartDate() {\r\n return startDate;\r\n }", "public Date getStartDate() {\r\n return startDate;\r\n }", "protected AbsoluteDate getStartDate() {\n return startDate;\n }", "public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}", "public Date getStartDate() {\n return startDate;\n }", "public Date getStartDate() {\n return startDate;\n }", "public Date getStartDate() {\n return startDate;\n }", "public void setValidFrom(Date validFrom);", "public void setDtStart(Date dtStart) {\r\n this.dtStart = dtStart;\r\n }", "public Date getStartDate()\r\n {\r\n return this.startDate;\r\n }", "public void setStartdate(Date startdate) {\r\n this.startdate = startdate;\r\n }", "public void setStartdate(Date startdate) {\n this.startdate = startdate;\n }", "public Builder setStartDate(long value) {\n \n startDate_ = value;\n onChanged();\n return this;\n }", "protected void validateEntity()\n {\n super.validateEntity();\n \n Date startDate = getStartDate();\n Date endDate = getEndDate();\n \n validateStartDate(startDate);\n validateEndDate(endDate);\n\n // We validate the following here instead of from within an attribute because\n // we need to make sure that both values are set before we perform the test.\n\n if (endDate != null)\n {\n // Note that we want to truncate these values to allow for the possibility\n // that we're trying to set them to be the same day. Calling \n // dateValue( ) does not include time. Were we to want the time element,\n // we would call timestampValue(). Finally, whenever comparing jbo\n // Date objects, we have to convert to long values.\n \n long endDateLong = endDate.dateValue().getTime();\n\n // We can assume we have a Start Date or the validation of this \n // value would have thrown an exception.\n \n if (endDateLong < startDate.dateValue().getTime())\n {\n throw new OARowValException(OARowValException.TYP_ENTITY_OBJECT,\n getEntityDef().getFullName(),\n getPrimaryKey(),\n \"AK\", // Message product short name\n \"FWK_TBX_T_START_END_BAD\"); // Message name\n } \n } \n \n }", "@Test\n public void testSetStartDate() {\n System.out.println(\"setStartDate\");\n Calendar newStart = new GregorianCalendar(2000, 01, 01);\n String startDate = newStart.toString();\n DTO_Ride instance = dtoRide;\n instance.setStartDate(startDate);\n \n String result = instance.getStartDate();\n assertEquals(newStart, newStart);\n }", "private void validateDate() {\n if (dtpSightingDate.isEmpty()) {\n dtpSightingDate.setErrorMessage(\"This field cannot be left empty.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is after research began (range check)\n else if (!validator.checkDateAfterMin(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter from \" + researchDetails.MIN_DATE + \" and afterwards. This is when the research period began.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n // Check that the selected date is not in the future (range check / logic check)\n else if (!validator.checkDateNotInFuture(dtpSightingDate.getValue())) {\n dtpSightingDate.setErrorMessage(\"Please enter a date from today or before. Sighting date cannot be in the future.\");\n dtpSightingDate.setInvalid(true);\n removeValidity();\n }\n }", "public void setREQ_START_DATE(java.sql.Date value)\n {\n if ((__REQ_START_DATE == null) != (value == null) || (value != null && ! value.equals(__REQ_START_DATE)))\n {\n _isDirty = true;\n }\n __REQ_START_DATE = value;\n }", "Date getStartDate();", "Date getStartDate();", "Date getStartDate();", "public Date getStartDate() {\n\t\treturn startDate;\n\t}", "public Date getStartDate() {\n\t\treturn startDate;\n\t}", "public void setActualStart(Date actualStartDate)\r\n {\r\n m_actualStart = actualStartDate;\r\n }", "public void setStart(Date newStart) {\n if (!newStart.before(_end)) {\n throw new IllegalArgumentException(ERR_START_AFTER_END);\n }\n _start = (Date) newStart.clone();\n }", "private boolean validateEventStartDate(){\n //get event start date\n String eventStartDateInput = eventStartDateTV.getText().toString().trim();\n\n //if event start date == null\n if(eventStartDateInput.isEmpty())\n {\n eventStartDateTV.setError(\"Please set the start date for the event\");\n return false;\n }\n else{\n eventStartDateTV.setError(null);\n return true;\n }\n }", "public Date getStartDate();", "public Date getStartDate();", "public long getStartDate() {\n return startDate_;\n }", "public void setStartDateTime(java.util.Date startDateTime) {\n this.startDateTime = startDateTime;\n }", "public long getStartDate() {\n return startDate_;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartDate();", "public LocalDate getStartDate() { return this.startDate; }", "@Override\n\tpublic Date getStartDate() {\n\t\treturn model.getStartDate();\n\t}", "public void setDateStart (Timestamp DateStart);", "public void changeStartDate(DateToken startToken) {\r\n\t\tDateTime now = new DateTime();\r\n\t\tif (Interval.nowStub != null) now = Interval.nowStub;\r\n\t\t\r\n\t\tstartDateExplicitlySet = true;\r\n\t\t\r\n\t\tif (this.start == null) {\r\n\t\t\tDateTime start = startToken.mergeInto(now).withTime(0, 0, 0, 0);\r\n\r\n\t\t\t// not leaping forward a year here; date should be taken as is\r\n\t\t\t\r\n\t\t\tthis.start = start;\r\n\t\t\tend = start.withTime(23, 59, 0, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// a time has already been set\r\n\t\t\tDateTime start = startToken.mergeInto(this.start);\r\n\t\t\tthis.start = start;\r\n\t\t\tif (end.isBefore(this.start)) {\r\n\t\t\t\tend = this.start.plusHours(1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tend = startToken.mergeInto(end);\r\n\t\t\t\tif (end.isBefore(start)) {\r\n\t\t\t\t\tend = start.plusHours(1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public CommonAlert dateStart(Date dateStart) {\n this.dateStart = dateStart;\n return this;\n }", "public Date getStartDate() {\n\t\treturn this.startDate;\n\t}", "@ApiModelProperty(value = \"The date from which the product starts\")\n @JsonProperty(\"startDate\")\n public Date getStartDate() {\n return startDate;\n }", "public String getStartDate() {\n return startDate;\n }", "@ApiModelProperty(value = \"The event start date in the event or site timezone\")\n public String getStartDate() {\n return startDate;\n }", "public String getStartDate() {\n return startDate;\n }", "public void setValidFrom(Date validFrom)\n {\n this.validFrom = validFrom;\n }", "public void setStart( Calendar start );", "public void setBeginnDate(Date beginnDate) {\n\t\tthis.beginnDate = beginnDate;\n\t}", "public void setBaselineStart(Date baselineStartDate)\r\n {\r\n m_baselineStart = baselineStartDate;\r\n }", "public String getStartDate(){\n\t\treturn this.startDate;\n\t}", "public void setValidDate(Date validDate) {\r\n this.validDate = validDate;\r\n }", "@Test\n\tpublic void testGetStartDate() {\n\t\tassertEquals(cal, initialJob.getStartDate());\n\t}", "long getStartDate();", "public Builder setStartDateYYYYMMDD(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n startDateYYYYMMDD_ = value;\n onChanged();\n return this;\n }", "public LocalDateTime getStartDate() {\n return startDate;\n }", "public void setServiceStartDate(Date value) {\n setAttributeInternal(SERVICESTARTDATE, value);\n }", "@Override\n\tpublic java.util.Date getStartDate() {\n\t\treturn _esfTournament.getStartDate();\n\t}", "public void setValidatedTo(Date validatedTo);", "@ApiModelProperty(value = \"Start of the range\")\n public String getDateStart() {\n return dateStart;\n }", "public java.sql.Date getStartDate() {\n\treturn startDate;\n}", "@Override\n\tpublic Long updateStartDate() {\n\t\treturn null;\n\t}", "java.lang.String getStartDate();", "public String getStartDate();", "public void convertStartDate(Date date) {\r\n startTime = new java.sql.Timestamp(date.getTime());\r\n }", "public java.util.Calendar getStartDate() {\n return startDate;\n }", "@Test\n public void testSetDateCreated() throws ParseException {\n System.out.println(\"setDateCreated Test (Passing value)\");\n Date dateCreated = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").parse(\"1955-11-05 06:00:00\");\n user.setDateCreated(dateCreated);\n // Check for and print any violations of validation annotations\n Set<ConstraintViolation<User>> violations = validator.validate(user);\n String message =\n violations.iterator().hasNext() ? violations.iterator().next().getMessage() : \"\";\n if (!violations.isEmpty()) {\n System.out.println(\"Violation caught: \" + message);\n }\n // Test method\n assertTrue(violations.isEmpty());\n }", "public void setBeginDate(Date beginDate) {\n this.beginDate = beginDate;\n if(this.beginDate.before(DateUtils.getToday())){\n this.beginDate = DateUtils.getToday();\n }\n //For new event or event with beginDate after endDate, set endDate after 30 minutes when beginDate change\n if(this.endDate == null || (this.endDate != null && !this.endDate.after(beginDate)))\n this.endDate = new Date(beginDate.getTime() + TimeUnit.MINUTES.toMillis(30));\n }", "public void setStartedDate(Date value) {\n this.startedDate = value;\n }", "@And(\"^Select start date$\")\n public void selectStartDate() throws Throwable {\n throw new PendingException();\n }", "public static String validateJobStartDate(Date startDate, Date endDate) {\n if (startDate.after(endDate)) {\n return \"Start date cannot be after end date\";\n } else if (startDate.before(new Date())) {\n return \"Start date cannot be before current date\";\n } else {\n return null;\n }\n }", "public Date getDtStart() {\r\n return dtStart;\r\n }", "public TestTaskBuilder startDate(String startDate) {\n try {\n startDate_ = timestampFormat.parse(startDate);\n } catch (ParseException ex) {\n throw new RuntimeException(ex);\n }\n return this;\n }", "public LocalDate getStart_date(){\n return this.start_date;\n }", "public void xsetStartExecDate(org.apache.xmlbeans.XmlDate startExecDate)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlDate target = null;\n target = (org.apache.xmlbeans.XmlDate)get_store().find_element_user(STARTEXECDATE$8, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlDate)get_store().add_element_user(STARTEXECDATE$8);\n }\n target.set(startExecDate);\n }\n }", "@NotNull\r\n public DateWithOffset getStartDate() {\r\n checkStartDate();\r\n return startDate;\r\n }" ]
[ "0.8105825", "0.79245013", "0.7905031", "0.7905031", "0.7869681", "0.7869681", "0.7869681", "0.781624", "0.78142774", "0.7772084", "0.7746172", "0.76444507", "0.76444507", "0.7574218", "0.7558579", "0.7553948", "0.75347644", "0.744792", "0.74385124", "0.73880947", "0.7359743", "0.7293632", "0.7175647", "0.71547234", "0.71528745", "0.7150111", "0.7138519", "0.7080682", "0.7047673", "0.7046248", "0.7046248", "0.70251215", "0.699911", "0.6995215", "0.6995215", "0.6995215", "0.6975072", "0.693017", "0.6906224", "0.68502945", "0.68121403", "0.68097454", "0.68086046", "0.6794893", "0.6740297", "0.67280304", "0.67246157", "0.67246157", "0.67246157", "0.6720651", "0.6720651", "0.67159265", "0.6695155", "0.669198", "0.66890055", "0.66890055", "0.6650277", "0.66493344", "0.6641304", "0.66276556", "0.66200507", "0.66044325", "0.66042197", "0.6596203", "0.6565103", "0.65531904", "0.6551507", "0.65077806", "0.6507307", "0.64986885", "0.6450072", "0.64499253", "0.6428437", "0.63941944", "0.63740635", "0.634203", "0.63378525", "0.62984216", "0.6264064", "0.62515813", "0.62464213", "0.6224974", "0.6218047", "0.62179637", "0.6204933", "0.6194926", "0.6176967", "0.61589044", "0.61374193", "0.61317974", "0.6126489", "0.6124386", "0.6110648", "0.6091691", "0.6083091", "0.6059217", "0.60484666", "0.6039691", "0.59861124", "0.598181" ]
0.7739064
11