query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
method that is ran by thread
@Override public void run() { String inMessage; String GET = null; String cookie = null; try { boolean coockieCheck = false; boolean validURL = false; boolean getRequest = false; this.in = new BufferedReader(new InputStreamReader(this.connectionSocket.getInputStream())); this.out = new PrintWriter(connectionSocket.getOutputStream()); protocol = new netProtocol(); //parses incomming header data, pass that to netProtocol to extract information about headers while (true) { inMessage = in.readLine(); //System.out.println(inMessage); if(inMessage == null){ break; } String response = protocol.parseHeaderInfo(inMessage); //System.out.println("READ..." + inMessage + " RESPONSE..." + response); if(response.equals(VALID)){ //check if hostname valid validURL = true; } else if(response.equals(INVALID)){ postErrorPage(); break; } if(response.equals("GET")){ getRequest = true; GET = inMessage; } if(response.equals("CookieFound")){ cookie = inMessage; } if(inMessage.length() == 0){ //when all headers have been parsed, we need to come up with an appropriate response to POST back if(validURL && getRequest){ processRequest(GET, cookie); } else{ postErrorPage(); } out.close(); in.close(); connectionSocket.close(); break; } } } catch (IOException e) { e.printStackTrace(); System.out.println("Client closed."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@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\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "public void run() {\n\t\t\t\t\t\t}", "protected void run() {\r\n\t\t//\r\n\t}", "public void run() {\n\t\t\t\t\n\t\t\t}", "public void run() {\n\t\t\r\n\t}", "public void run() {\n\t\t\r\n\t}", "public void run(){\n //logic to execute in a thread \n }", "@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void run() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t}", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run()\n {\n }", "@Override\n public void run()\n {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void run() {\n\r\n\t\t\t\t}", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n\tpublic void run() {\n\t\t\n\t\t\t\t\t\t\n\t}", "@Override\n public void run(){\n }", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tinvoke();\n\t\t\t\t\t}", "public void run() {\n }", "public void run(){\n\t}", "public void run() {\n }", "public void run() {\n }", "public void run() {\n }", "@Override\n public void run() {\n }", "public void run() {\n }", "public void run() {\n }", "@Override\n public void run() {\n }", "public void run() {\n }", "public void run() {\n\t\t\n\t}", "@Override\npublic void run() {\n perform();\t\n}", "public void run()\r\n\t{\r\n\t\t\r\n\t}", "@Override\r\n public void run() {}", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "@Override\n\t\tpublic void run() {\n\n\t\t}", "public void run() {\r\n }", "public void run() {\n\n }", "@Override\n\tpublic void run()\n\t{\n\n\t}", "public void run() {\n }", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\t\n\t}", "public void run() {\n\n\t}", "public void run() {\n\n\t}", "public void run()\n\t{\n\t}", "public void run()\n\t\t{\n\t\t}", "@Override\r\n public void run() {\n }", "public void run() {\n }", "public void run() {\n\t\t}", "public void run() {\n\t\t}", "public void run() {\n\t\t}", "@Override\n public void run()\n {\n\n }", "@Override\n public void run() {\n }", "@Override\n public void run() {\n }", "public void run();", "public void run();" ]
[ "0.73185647", "0.73185647", "0.7248739", "0.72341675", "0.72341675", "0.720674", "0.71516216", "0.7132436", "0.71213824", "0.71213824", "0.71157086", "0.7077743", "0.7077743", "0.7068314", "0.7068314", "0.7068314", "0.7068314", "0.7068314", "0.7068314", "0.7068314", "0.7068314", "0.7068314", "0.7061993", "0.70571744", "0.70571744", "0.70571744", "0.7047753", "0.7047753", "0.70456284", "0.70456284", "0.70443684", "0.70443684", "0.70430154", "0.70430154", "0.70430154", "0.70430154", "0.70430154", "0.70430154", "0.70430154", "0.7042375", "0.7042375", "0.7040393", "0.7035058", "0.7034051", "0.700925", "0.6978756", "0.6978689", "0.69744265", "0.69744265", "0.69744265", "0.69702375", "0.69683576", "0.69683576", "0.6965443", "0.69611114", "0.69430554", "0.69385874", "0.6935237", "0.6922331", "0.69155556", "0.69155556", "0.69155556", "0.69155556", "0.69155556", "0.69155556", "0.69155556", "0.69144714", "0.690263", "0.6902539", "0.69022095", "0.689653", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68960714", "0.68951297", "0.68951297", "0.68848234", "0.68810534", "0.6878493", "0.68729085", "0.6872186", "0.6872186", "0.6872186", "0.6858555", "0.68521315", "0.68521315", "0.6849113", "0.6849113" ]
0.0
-1
convert image data to bytes and stream it back
private void postImg(File index) { FileInputStream imgIn = null; byte[] imgData = new byte[(int)index.length()]; try { imgIn = new FileInputStream(index); imgIn.read(imgData); BufferedOutputStream imgOut = new BufferedOutputStream(connectionSocket.getOutputStream()); out.println(OK); out.println(htmlType); out.println(closed); out.println("Content-Length: " + index.length()); out.write(ENDLINE); out.flush(); imgOut.write(imgData, 0, (int)index.length()); imgOut.flush(); } catch (IOException e){ e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte[] encode(RenderedImage image) throws java.io.IOException;", "public byte[] getImageBytes()\n {\n byte[] buff = null;\n \n try\n {\n ByteArrayOutputStream bos = new ByteArrayOutputStream() ;\n ImageIO.write(img, \"jpg\", bos);\n buff = bos.toByteArray();\n bos.flush();\n bos.close();\n }\n catch(Exception ex)\n {\n System.out.println(\"Problem Serializeing PicNode\");\n ex.printStackTrace();\n }\n return buff;\n }", "private byte[] imageViewToByte(ImageView image){\n Bitmap bitmap = ((BitmapDrawable)image.getDrawable()).getBitmap();\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);\n byte[] byteArray = stream.toByteArray();\n return byteArray;\n }", "public native byte[] imageToBlob(ImageInfo imageInfo);", "public static Try<BufferedImage> readBytes(byte[] data) {\n return Try.of(() -> Imaging.getBufferedImage(data))\n .logIfFailure(TAG, err -> String.format(\"failed to read image from data (%d bytes)\", data.length));\n }", "private void uploadImage(byte[] imageData) {\n\n }", "private byte[] getImageBytes(File image){\n byte[] imageInByte = null;\n try{\n \n\tBufferedImage originalImage = \n ImageIO.read(image);\n \n\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\tImageIO.write( originalImage, \"png\", baos );\n\tbaos.flush();\n\timageInByte = baos.toByteArray();\n\tbaos.close();\n \n\t}catch(IOException e){\n\t\tSystem.out.println(e.getMessage());\n\t}finally{\n return imageInByte;\n }\n }", "protected byte[] stream2blob(InputStream is) throws IOException, IllegalArgumentException {\n return StreamUtils.stream2blob(is);\n }", "public byte[] convertImage(Image image) {\n BufferedImage bytesImage = SwingFXUtils.fromFXImage(image, null);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n byte[] bytesArray = null;\n try {\n ImageIO.write(bytesImage, \"png\", baos);\n //coloca los bytes de la imagen en un arreglo de bytes\n bytesArray = baos.toByteArray();\n baos.close();\n return bytesArray;\n } catch (IOException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public StreamedContent getPhotoByByte(byte[] p) {\n FacesContext context = FacesContext.getCurrentInstance();\n if (context.getRenderResponse()) {\n return new DefaultStreamedContent();\n } else if (p == null) {\n return new DefaultStreamedContent();\n } else {\n InputStream targetStream = new ByteArrayInputStream(p);\n StreamedContent str = DefaultStreamedContent.builder().contentType(\"image/png\").name(\"photo.png\").stream(() -> targetStream).build();\n return str;\n }\n }", "public static byte[] getImageBinary(File f) {\n BufferedImage bi;\n try {\n bi = ImageIO.read(f);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n ImageIO.write(bi, \"jpg\", baos);\n byte[] bytes = baos.toByteArray();\n return bytes;\n //return encoder.encodeBuffer(bytes).trim();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "private void handleImage(byte[] b) throws IOException {\n Log.i(\"ScrencapHandler\",\"handleImage\");\n long utime = System.currentTimeMillis();\n byte[] unixTime = toByteArray(utime);\n int start = b.length - unixTime.length - 1; //-1 for the seqnum\n for (int i = 0; i < unixTime.length; i++) {\n b[start + i] = unixTime[i];\n }\n\n if (jitterControl.channelIsFree()) {\n int seq = jitterControl.sendt(utime, b.length);\n\n // Add seq number.\n b[b.length - 1] = (byte) seq;\n\n // Send out the data to the network.\n Log.i(\"ScrencapHandler\",\"Send out the data to the network\");\n mWebkeyVisitor.send(b);\n }\n }", "@Override\r\n\tpublic byte[] flush() throws ImageHandlingException {\n\t\treturn null;\r\n\t}", "public byte[] get_byte_data(BufferedImage image) {\n WritableRaster raster = image.getRaster();\n DataBufferByte buffer = (DataBufferByte) raster.getDataBuffer();\n return buffer.getData();\n }", "public static byte[] imageToByteArray(BufferedImage image) {\n if (image != null) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n try {\n ImageIO.write(image, \"png\", baos);\n baos.flush();\n byte[] imageInByte = baos.toByteArray();\n baos.close();\n return imageInByte;\n } catch (IOException ex) {\n log.error(\"error while converting to byte array\", ex);\n }\n WritableRaster raster = image.getRaster();\n DataBufferByte data = (DataBufferByte) raster.getDataBuffer();\n return data.getData();\n }\n return new byte[0];\n }", "public byte[] Img2Bin (String path){\t \n\t\tByteArrayOutputStream bin = new ByteArrayOutputStream();\n\t\t\n\t\ttry {\n\t\t\tBufferedImage image = ImageIO.read(new File(path));\n\t\t\tImageIO.write(image, \"jpg\", bin);\n\t\t} catch (IOException e) {\n\t\t\tLOG.error(\"Img2Bin didn't succeed. Error: {}\",e);\n\t\t\treturn null;\n\t\t}\n\n\t return bin.toByteArray();\n\t}", "public interface ImageOutputStream extends ImageInputStream, DataOutput {\n\n /**\n * Writes a single byte to the stream at the current position.\n * The 24 high-order bits of <code>b</code> are ignored.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write. Implementers can use the\n * {@link ImageOutputStreamImpl#flushBits flushBits}\n * method of {@link ImageOutputStreamImpl ImageOutputStreamImpl}\n * to guarantee this.\n *\n * @param b an <code>int</code> whose lower 8 bits are to be\n * written.\n *\n * @exception IOException if an I/O error occurs.\n */\n void write(int b) throws IOException;\n\n /**\n * Writes a sequence of bytes to the stream at the current\n * position. If <code>b.length</code> is 0, nothing is written.\n * The byte <code>b[0]</code> is written first, then the byte\n * <code>b[1]</code>, and so on.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param b an array of <code>byte</code>s to be written.\n *\n * @exception NullPointerException if <code>b</code> is\n * <code>null</code>.\n * @exception IOException if an I/O error occurs.\n */\n void write(byte b[]) throws IOException;\n\n /**\n * Writes a sequence of bytes to the stream at the current\n * position. If <code>len</code> is 0, nothing is written.\n * The byte <code>b[off]</code> is written first, then the byte\n * <code>b[off + 1]</code>, and so on.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write. Implementers can use the\n * {@link ImageOutputStreamImpl#flushBits flushBits}\n * method of {@link ImageOutputStreamImpl ImageOutputStreamImpl}\n * to guarantee this.\n *\n * @param b an array of <code>byte</code>s to be written.\n * @param off the start offset in the data.\n * @param len the number of <code>byte</code>s to write.\n *\n * @exception IndexOutOfBoundsException if <code>off</code> is\n * negative, <code>len</code> is negative, or <code>off +\n * len</code> is greater than <code>b.length</code>.\n * @exception NullPointerException if <code>b</code> is\n * <code>null</code>.\n * @exception IOException if an I/O error occurs.\n */\n void write(byte b[], int off, int len) throws IOException;\n\n /**\n * Writes a <code>boolean</code> value to the stream. If\n * <code>v</code> is true, the value <code>(byte)1</code> is\n * written; if <code>v</code> is false, the value\n * <code>(byte)0</code> is written.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param v the <code>boolean</code> to be written.\n *\n * @exception IOException if an I/O error occurs.\n */\n void writeBoolean(boolean v) throws IOException;\n\n /**\n * Writes the 8 low-order bits of <code>v</code> to the\n * stream. The 24 high-order bits of <code>v</code> are ignored.\n * (This means that <code>writeByte</code> does exactly the same\n * thing as <code>write</code> for an integer argument.)\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param v an <code>int</code> containing the byte value to be\n * written.\n *\n * @exception IOException if an I/O error occurs.\n */\n void writeByte(int v) throws IOException;\n\n /**\n * Writes the 16 low-order bits of <code>v</code> to the\n * stream. The 16 high-order bits of <code>v</code> are ignored.\n * If the stream uses network byte order, the bytes written, in\n * order, will be:\n *\n * <pre>\n * (byte)((v &gt;&gt; 8) &amp; 0xff)\n * (byte)(v &amp; 0xff)\n * </pre>\n *\n * Otherwise, the bytes written will be:\n *\n * <pre>\n * (byte)(v &amp; 0xff)\n * (byte)((v &gt;&gt; 8) &amp; 0xff)\n * </pre>\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param v an <code>int</code> containing the short value to be\n * written.\n *\n * @exception IOException if an I/O error occurs.\n */\n void writeShort(int v) throws IOException;\n\n /**\n * This method is a synonym for {@link #writeShort writeShort}.\n *\n * @param v an <code>int</code> containing the char (unsigned\n * short) value to be written.\n *\n * @exception IOException if an I/O error occurs.\n *\n * @see #writeShort(int)\n */\n void writeChar(int v) throws IOException;\n\n /**\n * Writes the 32 bits of <code>v</code> to the stream. If the\n * stream uses network byte order, the bytes written, in order,\n * will be:\n *\n * <pre>\n * (byte)((v &gt;&gt; 24) &amp; 0xff)\n * (byte)((v &gt;&gt; 16) &amp; 0xff)\n * (byte)((v &gt;&gt; 8) &amp; 0xff)\n * (byte)(v &amp; 0xff)\n * </pre>\n *\n * Otheriwse, the bytes written will be:\n *\n * <pre>\n * (byte)(v &amp; 0xff)\n * (byte)((v &gt;&gt; 8) &amp; 0xff)\n * (byte)((v &gt;&gt; 16) &amp; 0xff)\n * (byte)((v &gt;&gt; 24) &amp; 0xff)\n * </pre>\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param v an <code>int</code> containing the value to be\n * written.\n *\n * @exception IOException if an I/O error occurs.\n */\n void writeInt(int v) throws IOException;\n\n /**\n * Writes the 64 bits of <code>v</code> to the stream. If the\n * stream uses network byte order, the bytes written, in order,\n * will be:\n *\n * <pre>\n * (byte)((v &gt;&gt; 56) &amp; 0xff)\n * (byte)((v &gt;&gt; 48) &amp; 0xff)\n * (byte)((v &gt;&gt; 40) &amp; 0xff)\n * (byte)((v &gt;&gt; 32) &amp; 0xff)\n * (byte)((v &gt;&gt; 24) &amp; 0xff)\n * (byte)((v &gt;&gt; 16) &amp; 0xff)\n * (byte)((v &gt;&gt; 8) &amp; 0xff)\n * (byte)(v &amp; 0xff)\n * </pre>\n *\n * Otherwise, the bytes written will be:\n *\n * <pre>\n * (byte)(v &amp; 0xff)\n * (byte)((v &gt;&gt; 8) &amp; 0xff)\n * (byte)((v &gt;&gt; 16) &amp; 0xff)\n * (byte)((v &gt;&gt; 24) &amp; 0xff)\n * (byte)((v &gt;&gt; 32) &amp; 0xff)\n * (byte)((v &gt;&gt; 40) &amp; 0xff)\n * (byte)((v &gt;&gt; 48) &amp; 0xff)\n * (byte)((v &gt;&gt; 56) &amp; 0xff)\n * </pre>\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param v a <code>long</code> containing the value to be\n * written.\n *\n * @exception IOException if an I/O error occurs.\n */\n void writeLong(long v) throws IOException;\n\n /**\n * Writes a <code>float</code> value, which is comprised of four\n * bytes, to the output stream. It does this as if it first\n * converts this <code>float</code> value to an <code>int</code>\n * in exactly the manner of the <code>Float.floatToIntBits</code>\n * method and then writes the int value in exactly the manner of\n * the <code>writeInt</code> method.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param v a <code>float</code> containing the value to be\n * written.\n *\n * @exception IOException if an I/O error occurs.\n */\n void writeFloat(float v) throws IOException;\n\n /**\n * Writes a <code>double</code> value, which is comprised of four\n * bytes, to the output stream. It does this as if it first\n * converts this <code>double</code> value to an <code>long</code>\n * in exactly the manner of the\n * <code>Double.doubleToLongBits</code> method and then writes the\n * long value in exactly the manner of the <code>writeLong</code>\n * method.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param v a <code>double</code> containing the value to be\n * written.\n *\n * @exception IOException if an I/O error occurs.\n */\n void writeDouble(double v) throws IOException;\n\n /**\n * Writes a string to the output stream. For every character in\n * the string <code>s</code>, taken in order, one byte is written\n * to the output stream. If <code>s</code> is <code>null</code>, a\n * <code>NullPointerException</code> is thrown.\n *\n * <p> If <code>s.length</code> is zero, then no bytes are\n * written. Otherwise, the character <code>s[0]</code> is written\n * first, then <code>s[1]</code>, and so on; the last character\n * written is <code>s[s.length-1]</code>. For each character, one\n * byte is written, the low-order byte, in exactly the manner of\n * the <code>writeByte</code> method. The high-order eight bits of\n * each character in the string are ignored.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param s a <code>String</code> containing the value to be\n * written.\n *\n * @exception NullPointerException if <code>s</code> is\n * <code>null</code>.\n * @exception IOException if an I/O error occurs.\n */\n void writeBytes(String s) throws IOException;\n\n /**\n * Writes a string to the output stream. For every character in\n * the string <code>s</code>, taken in order, two bytes are\n * written to the output stream, ordered according to the current\n * byte order setting. If network byte order is being used, the\n * high-order byte is written first; the order is reversed\n * otherwise. If <code>s</code> is <code>null</code>, a\n * <code>NullPointerException</code> is thrown.\n *\n * <p> If <code>s.length</code> is zero, then no bytes are\n * written. Otherwise, the character <code>s[0]</code> is written\n * first, then <code>s[1]</code>, and so on; the last character\n * written is <code>s[s.length-1]</code>.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param s a <code>String</code> containing the value to be\n * written.\n *\n * @exception NullPointerException if <code>s</code> is\n * <code>null</code>.\n * @exception IOException if an I/O error occurs.\n */\n void writeChars(String s) throws IOException;\n\n /**\n * Writes two bytes of length information to the output stream in\n * network byte order, followed by the\n * <a href=\"../../../java/io/DataInput.html#modified-utf-8\">modified\n * UTF-8</a>\n * representation of every character in the string <code>s</code>.\n * If <code>s</code> is <code>null</code>, a\n * <code>NullPointerException</code> is thrown. Each character in\n * the string <code>s</code> is converted to a group of one, two,\n * or three bytes, depending on the value of the character.\n *\n * <p> If a character <code>c</code> is in the range\n * <code>&#92;u0001</code> through <code>&#92;u007f</code>, it is\n * represented by one byte:\n *\n * <p><pre>\n * (byte)c\n * </pre>\n *\n * <p> If a character <code>c</code> is <code>&#92;u0000</code> or\n * is in the range <code>&#92;u0080</code> through\n * <code>&#92;u07ff</code>, then it is represented by two bytes,\n * to be written in the order shown:\n *\n * <p> <pre><code>\n * (byte)(0xc0 | (0x1f &amp; (c &gt;&gt; 6)))\n * (byte)(0x80 | (0x3f &amp; c))\n * </code></pre>\n *\n * <p> If a character <code>c</code> is in the range\n * <code>&#92;u0800</code> through <code>uffff</code>, then it is\n * represented by three bytes, to be written in the order shown:\n *\n * <p> <pre><code>\n * (byte)(0xe0 | (0x0f &amp; (c &gt;&gt; 12)))\n * (byte)(0x80 | (0x3f &amp; (c &gt;&gt; 6)))\n * (byte)(0x80 | (0x3f &amp; c))\n * </code></pre>\n *\n * <p> First, the total number of bytes needed to represent all\n * the characters of <code>s</code> is calculated. If this number\n * is larger than <code>65535</code>, then a\n * <code>UTFDataFormatException</code> is thrown. Otherwise, this\n * length is written to the output stream in exactly the manner of\n * the <code>writeShort</code> method; after this, the one-, two-,\n * or three-byte representation of each character in the string\n * <code>s</code> is written.\n *\n * <p> The current byte order setting is ignored.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * <p><strong>Note:</strong> This method should not be used in\n * the implementation of image formats that use standard UTF-8,\n * because the modified UTF-8 used here is incompatible with\n * standard UTF-8.\n *\n * @param s a <code>String</code> containing the value to be\n * written.\n *\n * @exception NullPointerException if <code>s</code> is\n * <code>null</code>.\n * @exception java.io.UTFDataFormatException if the modified UTF-8\n * representation of <code>s</code> requires more than 65536 bytes.\n * @exception IOException if an I/O error occurs.\n */\n void writeUTF(String s) throws IOException;\n\n /**\n * Writes a sequence of shorts to the stream at the current\n * position. If <code>len</code> is 0, nothing is written.\n * The short <code>s[off]</code> is written first, then the short\n * <code>s[off + 1]</code>, and so on. The byte order of the\n * stream is used to determine the order in which the individual\n * bytes are written.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param s an array of <code>short</code>s to be written.\n * @param off the start offset in the data.\n * @param len the number of <code>short</code>s to write.\n *\n * @exception IndexOutOfBoundsException if <code>off</code> is\n * negative, <code>len</code> is negative, or <code>off +\n * len</code> is greater than <code>s.length</code>.\n * @exception NullPointerException if <code>s</code> is\n * <code>null</code>.\n * @exception IOException if an I/O error occurs.\n */\n void writeShorts(short[] s, int off, int len) throws IOException;\n\n /**\n * Writes a sequence of chars to the stream at the current\n * position. If <code>len</code> is 0, nothing is written.\n * The char <code>c[off]</code> is written first, then the char\n * <code>c[off + 1]</code>, and so on. The byte order of the\n * stream is used to determine the order in which the individual\n * bytes are written.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param c an array of <code>char</code>s to be written.\n * @param off the start offset in the data.\n * @param len the number of <code>char</code>s to write.\n *\n * @exception IndexOutOfBoundsException if <code>off</code> is\n * negative, <code>len</code> is negative, or <code>off +\n * len</code> is greater than <code>c.length</code>.\n * @exception NullPointerException if <code>c</code> is\n * <code>null</code>.\n * @exception IOException if an I/O error occurs.\n */\n void writeChars(char[] c, int off, int len) throws IOException;\n\n /**\n * Writes a sequence of ints to the stream at the current\n * position. If <code>len</code> is 0, nothing is written.\n * The int <code>i[off]</code> is written first, then the int\n * <code>i[off + 1]</code>, and so on. The byte order of the\n * stream is used to determine the order in which the individual\n * bytes are written.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param i an array of <code>int</code>s to be written.\n * @param off the start offset in the data.\n * @param len the number of <code>int</code>s to write.\n *\n * @exception IndexOutOfBoundsException if <code>off</code> is\n * negative, <code>len</code> is negative, or <code>off +\n * len</code> is greater than <code>i.length</code>.\n * @exception NullPointerException if <code>i</code> is\n * <code>null</code>.\n * @exception IOException if an I/O error occurs.\n */\n void writeInts(int[] i, int off, int len) throws IOException;\n\n /**\n * Writes a sequence of longs to the stream at the current\n * position. If <code>len</code> is 0, nothing is written.\n * The long <code>l[off]</code> is written first, then the long\n * <code>l[off + 1]</code>, and so on. The byte order of the\n * stream is used to determine the order in which the individual\n * bytes are written.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param l an array of <code>long</code>s to be written.\n * @param off the start offset in the data.\n * @param len the number of <code>long</code>s to write.\n *\n * @exception IndexOutOfBoundsException if <code>off</code> is\n * negative, <code>len</code> is negative, or <code>off +\n * len</code> is greater than <code>l.length</code>.\n * @exception NullPointerException if <code>l</code> is\n * <code>null</code>.\n * @exception IOException if an I/O error occurs.\n */\n void writeLongs(long[] l, int off, int len) throws IOException;\n\n /**\n * Writes a sequence of floats to the stream at the current\n * position. If <code>len</code> is 0, nothing is written.\n * The float <code>f[off]</code> is written first, then the float\n * <code>f[off + 1]</code>, and so on. The byte order of the\n * stream is used to determine the order in which the individual\n * bytes are written.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param f an array of <code>float</code>s to be written.\n * @param off the start offset in the data.\n * @param len the number of <code>float</code>s to write.\n *\n * @exception IndexOutOfBoundsException if <code>off</code> is\n * negative, <code>len</code> is negative, or <code>off +\n * len</code> is greater than <code>f.length</code>.\n * @exception NullPointerException if <code>f</code> is\n * <code>null</code>.\n * @exception IOException if an I/O error occurs.\n */\n void writeFloats(float[] f, int off, int len) throws IOException;\n\n /**\n * Writes a sequence of doubles to the stream at the current\n * position. If <code>len</code> is 0, nothing is written.\n * The double <code>d[off]</code> is written first, then the double\n * <code>d[off + 1]</code>, and so on. The byte order of the\n * stream is used to determine the order in which the individual\n * bytes are written.\n *\n * <p> If the bit offset within the stream is non-zero, the\n * remainder of the current byte is padded with 0s\n * and written out first. The bit offset will be 0 after the\n * write.\n *\n * @param d an array of <code>doubles</code>s to be written.\n * @param off the start offset in the data.\n * @param len the number of <code>double</code>s to write.\n *\n * @exception IndexOutOfBoundsException if <code>off</code> is\n * negative, <code>len</code> is negative, or <code>off +\n * len</code> is greater than <code>d.length</code>.\n * @exception NullPointerException if <code>d</code> is\n * <code>null</code>.\n * @exception IOException if an I/O error occurs.\n */\n void writeDoubles(double[] d, int off, int len) throws IOException;\n\n /**\n * Writes a single bit, given by the least significant bit of the\n * argument, to the stream at the current bit offset within the\n * current byte position. The upper 31 bits of the argument are\n * ignored. The given bit replaces the previous bit at that\n * position. The bit offset is advanced by one and reduced modulo\n * 8.\n *\n * <p> If any bits of a particular byte have never been set\n * at the time the byte is flushed to the destination, those\n * bits will be set to 0 automatically.\n *\n * @param bit an <code>int</code> whose least significant bit\n * is to be written to the stream.\n *\n * @exception IOException if an I/O error occurs.\n */\n void writeBit(int bit) throws IOException;\n\n /**\n * Writes a sequence of bits, given by the <code>numBits</code>\n * least significant bits of the <code>bits</code> argument in\n * left-to-right order, to the stream at the current bit offset\n * within the current byte position. The upper <code>64 -\n * numBits</code> bits of the argument are ignored. The bit\n * offset is advanced by <code>numBits</code> and reduced modulo\n * 8. Note that a bit offset of 0 always indicates the\n * most-significant bit of the byte, and bytes of bits are written\n * out in sequence as they are encountered. Thus bit writes are\n * always effectively in network byte order. The actual stream\n * byte order setting is ignored.\n *\n * <p> Bit data may be accumulated in memory indefinitely, until\n * <code>flushBefore</code> is called. At that time, all bit data\n * prior to the flushed position will be written.\n *\n * <p> If any bits of a particular byte have never been set\n * at the time the byte is flushed to the destination, those\n * bits will be set to 0 automatically.\n *\n * @param bits a <code>long</code> containing the bits to be\n * written, starting with the bit in position <code>numBits -\n * 1</code> down to the least significant bit.\n *\n * @param numBits an <code>int</code> between 0 and 64, inclusive.\n *\n * @exception IllegalArgumentException if <code>numBits</code> is\n * not between 0 and 64, inclusive.\n * @exception IOException if an I/O error occurs.\n */\n void writeBits(long bits, int numBits) throws IOException;\n\n /**\n * Flushes all data prior to the given position to the underlying\n * destination, such as an <code>OutputStream</code> or\n * <code>File</code>. Attempting to seek to the flushed portion\n * of the stream will result in an\n * <code>IndexOutOfBoundsException</code>.\n *\n * @param pos a <code>long</code> containing the length of the\n * stream prefix that may be flushed to the destination.\n *\n * @exception IndexOutOfBoundsException if <code>pos</code> lies\n * in the flushed portion of the stream or past the current stream\n * position.\n * @exception IOException if an I/O error occurs.\n */\n void flushBefore(long pos) throws IOException;\n}", "public TE doInBackground(byte[]... data) {\n return PhotoModule.this.convertN21ToBitmap(data[0]);\n }", "public static BufferedImage decompress_jpeg(byte[] data) throws IOException\n {\n ByteArrayInputStream compressed = new ByteArrayInputStream(data);\n ImageInputStream inputStream = ImageIO.createImageInputStream(compressed);\n\n // NOTE: The rest of the code is just a cleaned up version of your code\n\n // Obtain writer for JPEG format\n ImageIO.setUseCache(false);\n ImageReader jpgReader = ImageIO.getImageReadersByFormatName(\"jpg\").next();\n\n // Configure JPEG compression: 70% quality\n ImageReadParam jpgWriteParam = jpgReader.getDefaultReadParam();\n //jpgWriteParam.setDestination(data);\n \n // Set your in-memory stream as the output\n // Set your in-memory stream as the output\n jpgReader.setInput(inputStream); \n\n // Write image as JPEG w/configured settings to the in-memory stream\n // (the IIOImage is just an aggregator object, allowing you to associate\n // thumbnails and metadata to the image, it \"does\" nothing)\n //jpgWriter.write(null, new IIOImage(image, null, null), jpgWriteParam);\n BufferedImage result = jpgReader.read(0, jpgWriteParam);\n\n // Dispose the writer to free resources\n jpgReader.dispose();\n\n return result;\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 byte[] getImageData() {\r\n return imageData;\r\n }", "public byte[] bufferedImageToByteArray(BufferedImage bufferedImage) {\n byte[] byteImage = null;\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n try {\n ImageIO.write(bufferedImage, \"jpg\", baos);\n baos.flush();\n byteImage = baos.toByteArray();\n baos.close();\n } catch (IOException ex) {\n Logger.getLogger(ProcessImage.class.getName()).log(Level.SEVERE, null, ex);\n }\n return byteImage;\n }", "Object getChannelData() {\r\n return imageData;\r\n }", "@Override\n public void feedRawData(Image data) {\n mARGSession.feedRawData(data);\n }", "public byte[] convertCircleBitmapToByteArray(Bitmap imagem){\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n imagem.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n byte imagemBytes[] = stream.toByteArray();\n return imagemBytes;\n\n }", "BufferedImage toBufferedImageUsingToolkit(byte[] bytes) throws IOException {\n\t\tif (TOOLKIT == null) {\n\t\t\treturn null;\n\t\t}\n\t\tImage image = TOOLKIT.createImage(bytes);\n\t\tMediaTracker mediaTracker = new MediaTracker(new Component() {\n\t\t\tprivate static final long serialVersionUID = 1L;\n\t\t});\n\t\tmediaTracker.addImage(image, 0);\n\t\ttry {\n\t\t\tmediaTracker.waitForID(0, 0);\n\t\t} catch (InterruptedException e) {\n\t\t\treturn null;\n\t\t}\n\t\tif (mediaTracker.isErrorID(0)) { // error -> use ImageIO\n\t\t\tthrow new IOException(\"Failed to load toolkit image\");\n\t\t} else {\n\t\t\tBufferedImage bufferedImage =\n\t\t\t\t\tnew BufferedImage(image.getWidth(null), image.getHeight(null), BufferedImage.TYPE_INT_RGB);\n Graphics2D g2d = bufferedImage.createGraphics();\n g2d.drawImage(image, 0, 0, null);\n g2d.dispose();\n image.flush();\n return bufferedImage;\n\t\t}\n\t}", "public BufferedImgBase(byte[] byteimg) throws IOException{\n // convert byte[] back to a BufferedImage\n InputStream is = new ByteArrayInputStream(byteimg);\n BufferedImage newBi = ImageIO.read(is);\n //this.img --> BufferedImage\n this.img = newBi;\n }", "private byte[] convertImageBitmanToByte(Bitmap bitmap){\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos); //bm is the bitmap object\n byte[] b = baos.toByteArray();\n\n return b;\n }", "public static Try<byte[]> imageToPng(BufferedImage image) {\n return Try.of(() -> Imaging.writeImageToBytes(image, ImageFormats.PNG, null))\n .logIfFailure(TAG, err -> \"failed to convert image to bytes\");\n }", "@Override\n\t\t\tpublic void onPreviewFrame(byte[] data, Camera camera) {\n\n\t\t\t\tCamera.Parameters params = mCamera.getParameters();\n\n\t\t\t\tint w = params.getPreviewSize().width;\n\t\t\t\tint h = params.getPreviewSize().height;\n\t\t\t\tint format = params.getPreviewFormat ();\n\n\t\t\t\t//\tBitmap imageBitap = new Bitmap();\n\n\n\t\t\t\tYuvImage image = new YuvImage(data, format, w, h, null);\n\n\t\t\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\t\t\tRect area = new Rect(0, 0, w, h);\n\t\t\t\timage.compressToJpeg(area, 50, out);\n\t\t\t\tstreamingImage = BitmapFactory.decodeByteArray(out.toByteArray(), 0, out.size());\n\n\n\n\t\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\t\t\t\tstreamingImage = Bitmap.createScaledBitmap(streamingImage, 160, streamingImage.getHeight()/(streamingImage.getWidth()/160), true);\n\t\t\t\tstreamingImage.compress( CompressFormat.JPEG, 30, outputStream) ; \n\t\t\t\tbyte[] imageByte = outputStream.toByteArray() ; \n\n\t\t\t\tint len;\n\n\t\t\t\tbyte[] byteLen = new byte[4];\n\t\t\t\tbyte[] sendByte = new byte[DataConstants.sendingSize];\n\n\t\t\t\tByteArrayInputStream inputStream = new ByteArrayInputStream(imageByte);\n\n\t\t\t\tbyteLen = DataConstants.intToByteArray(imageByte.length);\n\n\t\t\t\tflag_isSendOK = false;\n\n\t\t\t\tif(flag_isChangeOK == true){\n\t\t\t\t\ttry {\n\t\t\t\t\t\twhile((len=inputStream.read(sendByte))!=-1){\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[0] = 8;\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[1] = 28;\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[2] = 16; \n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[3] = (byte) sendingImageIndex;\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[4] = byteLen[0];\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[5] = byteLen[1];\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[6] = byteLen[2];\n\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[7] = byteLen[3];\n\n\t\t\t\t\t\t\tfor(int eof=8; eof<len+8; eof++){\n\t\t\t\t\t\t\t\tsendingArr[sendingImageIndex].arr[eof] = sendByte[eof-8];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException e) { \n\t\t\t\t\t\t//TODO: rano said good jam! \n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\n\t\t\t\t\t// TODO: �ڵ鷯 �θ���\n\t\t\t\t\tsendingImageIndexMax = sendingImageIndex;\n\t\t\t\t\tsendingImageIndex = 1;\n\t\t\t\t\tflag_isSendOK = true;\n\t\t\t\t\t//\t\t\t\tsendHandler.sendEmptyMessage(0);\n\n\t\t\t\t}\n\t\t\t}", "public static byte[] bitmapToByte(Bitmap bitmap) {\n Bitmap bmpCompressed = Bitmap.createScaledBitmap(bitmap, 640, 480, true);\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n\n // CompressFormat set up to JPG, you can change to PNG or whatever you want;\n boolean isCompressSuccess = bmpCompressed.compress(Bitmap.CompressFormat.JPEG, 100, bos);\n Log.d(TAG, \"bitmapToByte() called with: bitmap isCompressSuccess = \" + isCompressSuccess);\n byte[] data = bos.toByteArray();\n\n Log.d(TAG, \"bitmapToByte() called. Returning data= \\n\" + data +\"\\n \\n<END>\\n \\n\");\n\n return data;\n }", "BufferedImage toBufferedImageUsingImageIO(byte[] bytes) throws IOException {\n\t\ttry (InputStream data = new ByteArrayInputStream(bytes)) {\n\t\t\treturn ImageIO.read(data);\n\t\t}\n\t}", "private Image ConvertirImagen(byte[] bytes) throws IOException {\n ByteArrayInputStream bis = new ByteArrayInputStream(bytes);\n Iterator readers = ImageIO.getImageReadersByFormatName(\"jpeg\");\n ImageReader reader = (ImageReader) readers.next();\n Object source = bis;\n ImageInputStream iis = ImageIO.createImageInputStream(source);\n reader.setInput(iis, true);\n ImageReadParam param = reader.getDefaultReadParam();\n return reader.read(0, param);\n }", "byte[] getByteContent() throws IOException;", "public void setImageData(byte[] value) {\r\n this.imageData = ((byte[]) value);\r\n }", "public byte[] getByteArray(Uri image)\n {\n Bitmap pic = null;\n try{\n pic = MediaStore.Images.Media.getBitmap(getContentResolver(),image);\n }\n catch (IOException e){\n e.printStackTrace();\n }\n\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n pic.compress(Bitmap.CompressFormat.PNG,90,byteArrayOutputStream);\n return byteArrayOutputStream.toByteArray();\n\n }", "@Override\n protected void onBinaryData(InputStream is) throws IOException {\n }", "private static ByteString readImageBytes(URL url) throws IOException {\n ByteString imageBytes;\n\n try (InputStream imageInputStream = url.openStream()) {\n imageBytes = ByteString.readFrom(imageInputStream);\n }\n\n return imageBytes;\n }", "static public byte[] bitmapToByte(Bitmap bitmap) {\n ByteArrayOutputStream bos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 0 /*ignored for PNG*/, bos);\n byte[] bitmapdata = bos.toByteArray();\n try {\n bos.close();\n } catch (IOException e) {\n Log.d(\"close\",\"io exception in convert bitmap to byte[] happened\");\n }\n return bitmapdata;\n }", "private WritableImage convertBytesToImage(ByteBuffer pixels, int width, int height) {\n WritableImage img = new WritableImage(width, height);\n PixelWriter pw = img.getPixelWriter();\n pw.setPixels(0, 0, width, height, PixelFormat.getByteBgraInstance(), pixels, width * 4);\n return img;\n }", "private byte[] getImage(){\n byte image[] = null;\n try {\n if(isImageGiven()) {\n image = getImageBytes();\n }\n }catch (IOException e){\n Toast.makeText(this,\"Error in Creating the image \"+e, Toast.LENGTH_SHORT).show();\n }\n return image;\n }", "public BufferedImage convertByteToImage(byte[] imageByteArr) throws IOException {\r\n return ImageIO.read(new ByteArrayInputStream(imageByteArr));\r\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public byte[] getImage() {\n return image;\n }", "public static native int nativeRecoRawdat(byte []imgdata, int width, int height, int imgfmt, int lft, int rgt, int top, int btm, byte []bresult, int maxsize);", "com.google.protobuf.ByteString\n getImageBytes();", "public String emitAsImageBase64() {\n BufferedImage img = emitAsBufferedImage();\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n ImageIO.write(img, \"png\", os);\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n Base64 b64 = new Base64();\n String result = b64.encode(os.toByteArray());\n try {\n os.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return result;\n }", "byte[] getData();", "byte[] getData();", "byte[] getData();", "byte[] getData();", "protected abstract ByteBuffer toMedia(Object object) throws BeanConversionException;", "com.google.protobuf.ByteString getImgData(int index);", "static Image forData(String imageType, byte[] data) {\n\t\treturn () -> String.format(\"data:image/%s;base64,%s\", imageType, Base64.encodeBase64String(data));\n\t}", "private static Bitmap getImage(byte[] image) {\n /**\n * @brief convert from byte array to bitmap\n */\n return BitmapFactory.decodeByteArray(image, 0, image.length);\n }", "@Override\n public void onPictureTaken(byte[] data, Camera camera) {\n Log.e(TAG, \"Saving a bitmap to file\");\n mCamera.startPreview();// The camera preview was automatically stopped. Start it again.\n mCamera.setPreviewCallback(this);\n Bitmap bmpOriginal = BitmapFactory.decodeByteArray(data, 0, data.length);\n Bitmap bmpGrayscale = convertToGrayscale(bmpOriginal);//\n try {\n File file = new File(mPictureFile);\n if (!file.exists()) file.createNewFile();\n FileOutputStream fos = new FileOutputStream(file);\n //is other format ok? ok!!! PNG is much clear than JPEG, but image file is also much larger\n bmpGrayscale.compress(Bitmap.CompressFormat.PNG, 0, fos);\n //fos.write(data);// Write the image in a file (in jpeg format)\n fos.flush();\n fos.close();\n } catch (java.io.IOException e) {\n Log.e(TAG, \"Exception in taking picture\", e);\n }\n// saveImageToGallery();\n }", "public static byte[] compressBytes(byte[] data) {\n\t\t\tDeflater deflater = new Deflater();\n\t\t\tdeflater.setInput(data);\n\t\t\tdeflater.finish();\n\t\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream(data.length);\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\twhile (!deflater.finished()) {\n\t\t\t\tint count = deflater.deflate(buffer);\n\t\t\t\toutputStream.write(buffer, 0, count);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\toutputStream.close();\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t\tSystem.out.println(\"Compressed Image Byte Size - \" + outputStream.toByteArray().length);\n\t\t\treturn outputStream.toByteArray();\n\t\t}", "public static InputStream BIToIS(BufferedImage image) throws IOException {\n\t\tByteArrayOutputStream bas = new ByteArrayOutputStream();\n\t\tImageIO.write(image,\"png\", bas);\n\t\tbyte[] bytes = bas.toByteArray();\n\t\tInputStream is = new ByteArrayInputStream(bytes);\n\t\treturn is;\n\t}", "private Bitmap flipImage(byte[] input, FileOutputStream fos){\n\n\t\t\t\tMatrix rotate_matrix = new Matrix();\n\t\t\t\trotate_matrix.preScale(-1.0f, 1.0f);\n\t\t\t\tBitmapFactory bmf = new BitmapFactory();\n\t\t\t\tBitmap raw_bitmap = bmf.decodeByteArray(input, 0, input.length);\n\t\t\t\tBitmap result = Bitmap.createBitmap(raw_bitmap, 0, 0, raw_bitmap.getWidth(), raw_bitmap.getHeight(), rotate_matrix, true);\n\t\t\t\treturn result;\n\t\t\t\t/*\n\t\t\t\tresult.compress(Bitmap.CompressFormat.JPEG, 90, fos);\n\t\t\t\ttry {\n\t\t\t\t\tfos.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}", "public BufferedImage imageToBuffered(Image img) {\n BufferedImage bfImg = new BufferedImage(\n img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_ARGB);\n\n // Copy image to buffered image.\n Graphics g = bfImg.createGraphics();\n\n // Clear background and paint the image.\n g.drawImage(img, 0, 0, null);\n g.dispose();\n\n return bfImg;\n }", "public byte[] doInBackground(byte[]... data) {\n byte[] originalJpegData = data[null];\n Size size = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n originalJpegData = PhotoModule.this.convertN21ToJpeg(originalJpegData, size.width(), size.height());\n if (camera.getCharacteristics().isFacingFront() && PhotoModule.this.isNeedMirrorSelfie()) {\n originalJpegData = PhotoModule.this.aftMirrorJpeg(originalJpegData);\n }\n try {\n if (!Keys.isAlgorithmsOn(PhotoModule.this.mActivity.getSettingsManager()) || PhotoModule.this.isDepthEnabled() || PhotoModule.this.mBurstResultQueue.isEmpty()) {\n return originalJpegData;\n }\n return PhotoModule.this.addExifTags(originalJpegData, (TotalCaptureResult) PhotoModule.this.mBurstResultQueue.removeFirst(), camera.getCharacteristics().isFacingFront(), PhotoModule.this.mJpegRotation);\n } catch (NoSuchElementException e) {\n e.printStackTrace();\n return originalJpegData;\n }\n }", "public byte[] readImagePNG(BufferedImage bufferedimage) throws IOException{\n byte[] data = ImageUtil.toByteArray(bufferedimage);\r\n /* \r\n for (int i = 0; i < data.length; i++) {\r\n if(i!=0&&i%4==0)\r\n System.out.println();\r\n System.out.format(\"%02X \",data[i]);\r\n }\r\n */ \r\n \r\n \r\n \r\n \r\n byte[] stximage = getStximage();\r\n byte[] etximage = getEtximage();\r\n \r\n byte[] stxdata = new byte[stximage.length];\r\n byte[] etxdata = new byte[etximage.length];\r\n byte[] length = new byte[4];\r\n \r\n boolean stxsw=false;\r\n boolean etxsw=false;\r\n byte[] full_data=null;\r\n byte[] only_data=null;\r\n try{\r\n for (int i = 0; i < data.length; i++) {\r\n System.arraycopy(data, i, stxdata,0, stxdata.length);\r\n stxsw = ByteUtil.equals(stximage, stxdata);\r\n int subindex=i+stxdata.length;\r\n if(stxsw){\r\n System.arraycopy(data, subindex, length,0, length.length);\r\n int length_fulldata = ConversionUtil.toInt(length);\r\n // System.out.format(\"%02X %d subIndex[%d]\",data[subindex],length_fulldata,subindex);\r\n \r\n \r\n subindex+=i+length.length;\r\n int etx_index= subindex+ length_fulldata;\r\n // System.out.println(\"subindex : \"+subindex+\" etx_index : \"+etx_index);\r\n System.arraycopy(data, etx_index, etxdata,0, etxdata.length);\r\n \r\n// for (int j = 0; j < etxdata.length; j++) {\r\n// System.out.format(\"%02X \",etxdata[j]);\r\n// }\r\n \r\n etxsw = ByteUtil.equals(etximage, etxdata);\r\n if(etxsw){\r\n full_data = new byte[etx_index-subindex];\r\n System.arraycopy(data, subindex, full_data,0, full_data.length); //fulldata\r\n break;\r\n }else{\r\n continue;\r\n }\r\n }\r\n \r\n \r\n }\r\n \r\n /////only data search\r\n System.arraycopy(full_data, 0, length,0, length.length);\r\n int length_onlydata = ConversionUtil.toInt(length); \r\n only_data = new byte[length_onlydata];\r\n System.arraycopy(full_data, length.length, only_data,0, only_data.length);\r\n \r\n \r\n \r\n }catch (Exception e) {\r\n return null;\r\n }\r\n \r\n return only_data;\r\n \r\n }", "@Override\n protected Map<String, DataPart> getByteData()\n {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(Keys.message, new DataPart(imagename + \".png\", getFileDataFromDrawable(bitmap)));\n return params;\n }", "public static byte[] convertBitmapToByte(Bitmap bitmap) {\n\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 50, stream);\n// Log.e(\"ImageUtil-Bitmap Size\", String.valueOf(bitmap.getByteCount()));\n byte[] bytes = stream.toByteArray();\n\n return bytes;\n }", "BufferedImage outputImage();", "public byte[] getData();", "@RequiresApi(api = Build.VERSION_CODES.O)\n @Override\n public void onPictureTaken(byte[] data, Camera camera) {\n Log.d(\"Hawk.CameraHandler\",\"onPictureCalled\");\n //\n bmp = BitmapFactory.decodeByteArray(data, 0, data.length); //Convert raw byte array to Bitmap format\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream); //Write the Bitmap to ByteArrayOutputStream\n byte[] byteArray = byteArrayOutputStream .toByteArray(); //Get byte array from ByteArrayOutputStream\n //\n encodedImage=Base64.getEncoder().encodeToString(byteArray); //Convert the byte array to Base64 encoded string\n camera.stopPreview(); //Stop the preview\n Log.d(\"EncodedImage\",\"starthere#\"+encodedImage+\"###ENDED\");\n picReady=true; //Indicates that encoded string is ready\n camera.release();\n }", "private static final byte[] xfsim_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -62, 0, 0, -128,\n\t\t\t\t-128, -128, -64, -64, -64, 0, 0, 0, -1, -1, -1, 0, 0, -1, -1,\n\t\t\t\t-1, -1, -1, -1, -1, -1, -1, -1, 33, -2, 14, 77, 97, 100, 101,\n\t\t\t\t32, 119, 105, 116, 104, 32, 71, 73, 77, 80, 0, 33, -7, 4, 1,\n\t\t\t\t10, 0, 5, 0, 44, 0, 0, 0, 0, 16, 0, 16, 0, 0, 3, 72, 88, -70,\n\t\t\t\t-36, 14, 48, -58, 23, -86, -83, 64, 48, 48, -70, -17, -112,\n\t\t\t\t-74, 112, 66, 105, 14, -31, 54, 8, 68, -37, -94, -103, -54,\n\t\t\t\t-70, 4, 44, 42, 36, 93, -89, -29, -9, 101, -112, -111, 105, 88,\n\t\t\t\t2, 4, 68, 28, -97, -57, 24, 43, -124, -128, 2, 104, -54, 40,\n\t\t\t\t56, 90, -85, 88, 77, 82, -23, 57, 42, -120, -32, -110, 99, -20,\n\t\t\t\t72, 0, 0, 59 };\n\t\treturn data;\n\t}", "public void test(String path){\n File file = new File(path);\n byte[] image = new byte[(int) file.length()];\n try {\n FileInputStream fis = new FileInputStream(file);\n fis.read(image); //read file into bytes[]\n\n fis.close();\n test(image);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public BufferedImage byteArrayToBufferedImage(byte[] byteImage) {\n BufferedImage image = null;\n InputStream in = new ByteArrayInputStream(byteImage);\n try {\n image = ImageIO.read(in);\n\n } catch (IOException ex) {\n Logger.getLogger(ProcessImage.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return image;\n }", "static byte[] getBytes(Bitmap bitmap) {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bitmap.compress(CompressFormat.PNG, 0, stream);\n return stream.toByteArray();\n }", "public BufferedImage getImage() {\n\t\tString base64ImageString = getData();\n\t\tByteArrayInputStream byteStream = new ByteArrayInputStream(Base64\n\t\t\t\t.decodeBase64(base64ImageString.getBytes()));\n\t\ttry {\n\t\t\treturn ImageIO.read(byteStream);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public void execute(InputStream data, ImageReader reader, ImageWriter writer) throws IOException {\n // save the image data in a temporary file so we can reuse the original data as-is if needed without\n // putting all the data into memory\n final File tmpFile = writeToTmpFile(data);\n boolean deleteTmpFile = true;\n log.debug(\"Stored uploaded image in temporary file {}\", tmpFile);\n\n InputStream dataInputStream = null;\n ImageInputStream imageInputStream = null;\n\n try {\n dataInputStream = new FileInputStream(tmpFile);\n imageInputStream = new MemoryCacheImageInputStream(dataInputStream);\n reader.setInput(imageInputStream);\n\n final int originalWidth = reader.getWidth(0);\n final int originalHeight = reader.getHeight(0);\n\n if (isOriginalVariant()) {\n scaledWidth = originalWidth;\n scaledHeight = originalHeight;\n scaledData = new AutoDeletingTmpFileInputStream(tmpFile);\n deleteTmpFile = false;\n } else {\n BufferedImage scaledImage = getScaledImage(reader, originalWidth, originalHeight);\n ByteArrayOutputStream scaledOutputStream = ImageUtils.writeImage(writer, scaledImage, compressionQuality);\n\n scaledWidth = scaledImage.getWidth();\n scaledHeight = scaledImage.getHeight();\n scaledData = new ByteArrayInputStream(scaledOutputStream.toByteArray());\n }\n } finally {\n if (imageInputStream != null) {\n imageInputStream.close();\n }\n IOUtils.closeQuietly(dataInputStream);\n if (deleteTmpFile) {\n log.debug(\"Deleting temporary file {}\", tmpFile);\n tmpFile.delete();\n }\n }\n }", "PointerByReference wkhtmltoimage_create_converter(PointerByReference settings, String data);", "public static Image returnImage (InputStream in){\n InputStream stream = in;\n return new Image(stream);\n }", "protected byte[] getBinaryData(Resource resource, @SuppressWarnings(\"unused\") SlingHttpServletRequest request) throws IOException {\n InputStream is = resource.adaptTo(InputStream.class);\n if (is == null) {\n return null;\n }\n try {\n return IOUtils.toByteArray(is);\n }\n finally {\n is.close();\n }\n }", "private void reanderImage(ImageData data) {\n \n }", "private byte[] getBytesFromBitmap(Bitmap bitmap) {\r\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\r\n bitmap.compress(Bitmap.CompressFormat.JPEG, 70, stream);\r\n return stream.toByteArray();\r\n }", "public Bitmap processCapturedImage(Intent intentData){\n Bitmap processedImage = (Bitmap) intentData.getExtras().get(\"data\");\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n processedImage.compress(Bitmap.CompressFormat.JPEG, 90, bytes);\n File destination = new File(Environment.getExternalStorageDirectory(),\n System.currentTimeMillis() + \".jpg\");\n FileOutputStream fo;\n try {\n destination.createNewFile();\n fo = new FileOutputStream(destination);\n fo.write(bytes.toByteArray());\n fo.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return processedImage;\n }", "public byte[] bitmap();", "InputStream getDataStream();", "@Override\n protected Map<String, DataPart> getByteData() {\n Map<String, DataPart> params = new HashMap<>();\n long imagename = System.currentTimeMillis();\n params.put(\"pic\", new DataPart(imagename + \".jpg\", getFileDataFromDrawable(bitmap)));\n return params;\n }", "public byte[] takePhoto()\n {\n byte[] arr = new byte[4];\n for (int i = 0; i < arr.length; i++)\n {\n arr[i] = (byte) i;\n }\n return arr;\n }", "public native void blobToImage(ImageInfo imageInfo, byte[] blob)\n\t\t\tthrows MagickException;", "public byte[] getAsBytes() {\n return (byte[])data;\n }", "public static FileInputStream returnImageBytes(String path){\n \n try {\n FileInputStream fis = null;\n File file = new File(path);\n fis = new FileInputStream(file);\n return fis;\n } catch (FileNotFoundException ex) {\n logger.appendnewLog(ex.getMessage());\n Logger.getLogger(Illneses.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public byte[] getImageData() {\n return profilePictureBytes;\n }", "public InputStream asByteStream() {\n return new ByteArrayInputStream(rawBytes);\n }", "public InputStream recuperaImagenBBDD(Connection con)\n {\n try\n {\n String consultaGenerada = \"select * from imagenesbbdd limit 1\";\n\n depura(\"Ejecutamos Statment\");\n java.sql.Statement stmt = con.createStatement();\n\n depura(\"Ejecutamos sentencia \" + consultaGenerada);\n ResultSet results = stmt.executeQuery(consultaGenerada);\n\n results.next();\n\n Blob campo = results.getBlob(\"imagen\");\n return campo.getBinaryStream();\n }\n catch(Exception e)\n {\n depura(\"Error al recuperar el Stream\");\n }\n\n return null;\n }", "public byte[] getFileDataFromDrawable(Bitmap bitmap) {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 80, byteArrayOutputStream);\n return byteArrayOutputStream.toByteArray();\n }", "public byte[] doInBackground(byte[]... data) {\n byte[] originalJpegData;\n byte[] originalJpegData2 = data[0];\n if (PhotoModule.this.mActivity.getCameraAppUI().getBeautySeek() > 0.0f && PhotoModule.this.isSupportBeauty() && (PhotoModule.this.mCameraId == 0 || PhotoModule.this.mCameraId == 1)) {\n Size size = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n float seek = PhotoModule.this.mActivity.getCameraAppUI().getBeautySeek() / 20.0f;\n int angle = PhotoModule.this.mCameraId == 1 ? MediaProviderUtils.ROTATION_270 : 90;\n if (originalJpegData2 != null) {\n originalJpegData2 = BeautifyHandler.processImageNV21(PhotoModule.this.mActivity, originalJpegData2, size.width(), size.height(), seek, angle);\n }\n }\n PhotoModule.this.mActivity.getButtonManager().mBeautyEnable = true;\n Size size2 = PhotoModule.this.mCameraSettings.getCurrentPhotoSize();\n PhotoModule.this.mIsAddWaterMark = PhotoModule.this.mCameraSettings.isAddWaterMarkEnabled();\n if (PhotoModule.this.mFinalDrCheckResult.size() <= 1) {\n Log.d(PhotoModule.TAG, \"start to jpeg\");\n originalJpegData = PhotoModule.this.convertN21ToJpeg(originalJpegData2, size2.width(), size2.height());\n Log.d(PhotoModule.TAG, \"end to jpeg\");\n } else {\n int result = PhotoModule.this.mImageRefiner.processImage();\n Tag access$500 = PhotoModule.TAG;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"processImage result = \");\n stringBuilder.append(result);\n Log.d(access$500, stringBuilder.toString());\n byte[] output = new byte[originalJpegData2.length];\n if (result < 0) {\n output = (byte[]) PhotoModule.this.mAddedImages.get(0);\n } else {\n int getOutputResult = PhotoModule.this.mImageRefiner.getOutputImageRaw(output);\n Tag access$5002 = PhotoModule.TAG;\n StringBuilder stringBuilder2 = new StringBuilder();\n stringBuilder2.append(\"getOutputResult = \");\n stringBuilder2.append(getOutputResult);\n Log.d(access$5002, stringBuilder2.toString());\n }\n PhotoModule.this.mImageRefiner.finish();\n PhotoModule.this.mImageRefiner = null;\n Log.d(PhotoModule.TAG, \"mImageRefiner = null\");\n Log.d(PhotoModule.TAG, \"compressToJpeg\");\n originalJpegData = PhotoModule.this.convertN21ToJpeg(output, size2.width(), size2.height());\n }\n if (cameraProxy.getCharacteristics().isFacingFront() && PhotoModule.this.isNeedMirrorSelfie()) {\n originalJpegData = PhotoModule.this.aftMirrorJpeg(originalJpegData);\n }\n if (!Keys.isAlgorithmsOn(PhotoModule.this.mActivity.getSettingsManager()) || PhotoModule.this.isDepthEnabled() || PhotoModule.this.mBurstResultQueue.isEmpty()) {\n return originalJpegData;\n }\n TotalCaptureResult totalCaptureResult = (TotalCaptureResult) PhotoModule.this.mBurstResultQueue.removeFirst();\n if (PhotoModule.this.mInHdrProcess) {\n PhotoModule.this.mBurstResultQueue.clear();\n }\n return PhotoModule.this.addExifTags(originalJpegData, totalCaptureResult, cameraProxy.getCharacteristics().isFacingFront(), PhotoModule.this.mJpegRotation);\n }", "private void setUpImage(byte[] bytes) {\n\n ImageView imageview = (ImageView)findViewById(R.id.imgEmpPhoto);\n Bitmap bitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);\n imageview.setImageBitmap(bitmap);\n }", "private void addBinaryData(Document doc, OutputStream out, String tempDir) throws TransformerException {\n InputStream xsl = Thread.currentThread().getContextClassLoader()\n .getResourceAsStream(\"data/xslt/bytestreams.xsl\");\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n\n Transformer transformer = transformerFactory.newTransformer(new StreamSource(xsl));\n transformer.setParameter(\"tempDir\", tempDir);\n\n Source xmlSource = new DocumentSource(doc);\n\n Result outputTarget = new StreamResult(out); // new\n // FileWriter(outFile));\n\n log.debug(\"starting bytestream transformation ...\");\n transformer.transform(xmlSource, outputTarget);\n log.debug(\"FINISHED bytestream transformation!\");\n }", "@Override\r\n public byte[] getCustomImageInBytes() {\r\n\r\n return imageInByte;\r\n }", "@Override\n public byte[] captureImage(Long hwndPeer) {\n WinDef.HWND hwnd = new WinDef.HWND(new Pointer(hwndPeer));\n\n User32.HDC hdcWindow = User32.INSTANCE.GetDC(hwnd);\n User32.HDC hdcMemDC = GDI32.INSTANCE.CreateCompatibleDC(hdcWindow);\n\n User32.RECT bounds = new User32.RECT();\n User32Extra.INSTANCE.GetClientRect(hwnd, bounds);\n\n int width = bounds.right - bounds.left;\n int height = bounds.bottom - bounds.top;\n\n logger.info(\"captureImage: width={}, height={}\", width, height);\n\n User32.HBITMAP hBitmap = GDI32.INSTANCE.CreateCompatibleBitmap(hdcWindow, width, height);\n\n User32.HANDLE hOld = GDI32.INSTANCE.SelectObject(hdcMemDC, hBitmap);\n GDI32Extra.INSTANCE.BitBlt(hdcMemDC, 0, 0, width, height, hdcWindow, 0, 0, WinGDIExtra.SRCCOPY);\n\n GDI32.INSTANCE.SelectObject(hdcMemDC, hOld);\n GDI32.INSTANCE.DeleteDC(hdcMemDC);\n\n BITMAPINFO bmi = new BITMAPINFO();\n bmi.bmiHeader.biWidth = width;\n bmi.bmiHeader.biHeight = -height;\n bmi.bmiHeader.biPlanes = 1;\n bmi.bmiHeader.biBitCount = 32;\n bmi.bmiHeader.biCompression = WinGDI.BI_RGB;\n\n Memory buffer = new Memory(width * height * 4);\n GDI32.INSTANCE.GetDIBits(hdcWindow, hBitmap, 0, height, buffer, bmi, WinGDI.DIB_RGB_COLORS);\n\n BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);\n image.setRGB(0, 0, width, height, buffer.getIntArray(0, width * height), 0, width);\n\n GDI32.INSTANCE.DeleteObject(hBitmap);\n User32.INSTANCE.ReleaseDC(hwnd, hdcWindow);\n\n // convert it to byte[]\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n try {\n // OPT: gif is faster than png, although introduces banding\n ImageIO.write(image, \"png\", baos);\n } catch (IOException e) {\n throw new IllegalStateException(e);\n }\n\n// alternative\n// byte[] imageBytes = ((DataBufferByte) bufferedImage.getData().getDataBuffer()).getData();\n\n return baos.toByteArray();\n }", "private Image byteArrayToImage(byte[] byteArray) {\n\t\ttry {\n\t\t\tByteArrayInputStream bis = new ByteArrayInputStream(byteArray);\n\t\t\tBufferedImage deserializedImage = ImageIO.read(bis);\n\t\t\treturn SwingFXUtils.toFXImage(deserializedImage, null);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "public byte[] getImageByteArray(Bitmap bitmap) {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);\n return byteArrayOutputStream.toByteArray();\n }", "private Bitmap convertToBitmap(byte[] b){\n\n return BitmapFactory.decodeByteArray(b, 0, b.length);\n\n }", "@Test\n void readImage() throws Exception {\n ResultActions resultActions = mockMvc.perform(get(\"/v1/file/image-byte\")\n .param(\"name\", \"icon.jpg\")\n .contentType(MediaType.TEXT_PLAIN_VALUE))\n .andDo(resultHandler -> {\n String path = writeFile(resultHandler.getResponse().getContentAsByteArray(), \".jpg\");\n logger.debug(\"Image File recorded locally at: \" + path);\n }\n );\n\n resultActions\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.IMAGE_JPEG_VALUE))\n ;\n }", "private boolean setImageData(DataBuffer db) {\r\n AwtImageBackdoorAccessor dbAccess = AwtImageBackdoorAccessor.getInstance();\r\n try {\r\n imageData = dbAccess.getData(db);\r\n } catch (IllegalArgumentException e) {\r\n return false; // Unknown data buffer type\r\n }\r\n\r\n return true;\r\n }" ]
[ "0.6420709", "0.6120296", "0.61124533", "0.60251147", "0.6003433", "0.5961868", "0.5920813", "0.5916354", "0.58286285", "0.5824116", "0.58079356", "0.5785377", "0.5736863", "0.57366276", "0.57179964", "0.5692126", "0.562578", "0.5624382", "0.55589384", "0.5534382", "0.5532147", "0.5523082", "0.55047846", "0.54824173", "0.54793626", "0.5457562", "0.54460657", "0.5431931", "0.5421731", "0.5410839", "0.541061", "0.5394186", "0.53904456", "0.5387787", "0.53651255", "0.53539574", "0.53419733", "0.53410506", "0.5336663", "0.5327504", "0.5316637", "0.53118557", "0.53070265", "0.53070265", "0.53070265", "0.53027", "0.5302201", "0.5292813", "0.527596", "0.527596", "0.527596", "0.527596", "0.5265806", "0.5263343", "0.5254324", "0.52247494", "0.5204462", "0.51962614", "0.51948726", "0.5190075", "0.5172459", "0.5161073", "0.5158637", "0.51439303", "0.5136398", "0.5132563", "0.51314026", "0.5115433", "0.51083285", "0.5107481", "0.5090506", "0.5088955", "0.508842", "0.5068498", "0.50640434", "0.50637734", "0.50527716", "0.5050107", "0.50426596", "0.50399137", "0.50367963", "0.50215864", "0.50122046", "0.50035954", "0.5000752", "0.49997392", "0.49897134", "0.49877855", "0.4985685", "0.4983021", "0.49824876", "0.49761346", "0.49707127", "0.49685904", "0.4962289", "0.4958996", "0.4957128", "0.49570197", "0.4956045", "0.49555588", "0.4954176" ]
0.0
-1
check cookie situation and increase our count accordingly without messing with pre existing cookies
private void postHTML(File index, String cookie, boolean display) throws IOException { String my_cookie = null; if(cookie != null) { if (cookie.indexOf(" ") != -1) { String[] cookies = cookie.split(" "); for (String st : cookies) { if (st.length() > MY_COOKIE_HEADER.length()) { if (st.substring(0, MY_COOKIE_HEADER.length()).equals(MY_COOKIE_HEADER)) { my_cookie = st; break; } } } } } BufferedReader reader = new BufferedReader(new FileReader(index)); out.println(OK); out.println(htmlType); out.println(closed); out.println("Content-Length: " + index.length()); //deal with cookie int cookie_cnt; if(my_cookie == null){ out.println("Set-Cookie: 325_p1_visit_cnt=1"); cookie_cnt = 1; } else{ int indx = my_cookie.indexOf('='); String cnt; if(my_cookie.charAt(my_cookie.length()-1) == ';'){ cnt = my_cookie.substring(indx+1, my_cookie.length()-1); } else{ cnt = my_cookie.substring(indx+1); } cookie_cnt = (Integer.parseInt(cnt) + 1); String incr_cnt = Integer.toString(cookie_cnt); String incr_cookie = "Set-Cookie: 325_p1_visit_cnt=" + incr_cnt; out.println(incr_cookie); } out.println(ENDLINE); if(display){ postHTMLDynamic(reader, cookie_cnt); } else { postHTMLStatic(reader); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int storeCookies(URLConnection con) {\n\t\tString headerName = null;\n\n\t\tint totalNewCookies = 0;\n\n\t\tfor (int i = 1; (headerName = con.getHeaderFieldKey(i)) != null; i++) if (headerName.equals(\"Set-Cookie\")) totalNewCookies += addCookie(con.getHeaderField(i)); //add to the total the number of new cookies found by add cookie for each cookie\n\n\t\treturn totalNewCookies;\n\t}", "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}", "public void testListenersCountWithCookie () throws Exception {\n doTestListenersCount (true);\n }", "@Test\n public void handlingCookies () {\n\n driver.get(\"https://www.amazon.com\");\n// 1. find the total number of cookies\n Set<Cookie> setOfCookies = driver.manage().getCookies();// returns all of the cookies as Set\n int totalNumberOfCookies = setOfCookies.size();\n System.out.println(\"totalNumberOfCookies is \"+totalNumberOfCookies);\n\n// 2. print cookies\n // As the setOfCookies is a set. We have to print them from a loop.\n for (Cookie eachCookie:setOfCookies) {\n System.out.println(\"each name: \"+eachCookie.getName());\n System.out.println(\"each value: \"+eachCookie.getValue());\n }\n\n// 3. get cookies by name : i18n-prefs (I select a cookie name from the console)\n Cookie named1_i18n_prefs = driver.manage().getCookieNamed(\"i18n-prefs\");\n\n System.out.println(\"the cookie named -i18n-prefs: \" + named1_i18n_prefs);\n System.out.println(\"value of the named ... \" + named1_i18n_prefs.getValue());\n\n// 4. add new cookie\n Cookie myCookie = new Cookie(\"my cookie\" , \"How does my cookie look like\");\n driver.manage().addCookie(myCookie);\n totalNumberOfCookies = driver.manage().getCookies().size();\n System.out.println(\"New total number is : \" + totalNumberOfCookies);\n\n Set<Cookie> newSetOfCookies = driver.manage().getCookies();\n for(Cookie eachCookie : newSetOfCookies) {\n System.out.println(\"new cookie in the new set: \" + eachCookie );\n }\n\n// 5. delete some certain cookies by name\n driver.manage().deleteCookieNamed(\"skin\"); // by name of the cookie\n driver.manage().deleteCookie(named1_i18n_prefs); // by the cookie\n totalNumberOfCookies = driver.manage().getCookies().size();\n System.out.println(\"newer total number = \" + totalNumberOfCookies);\n\n// 6. delete all cookies\n driver.manage().deleteAllCookies();\n totalNumberOfCookies = driver.manage().getCookies().size();\n System.out.println(\"newest total number = \" + totalNumberOfCookies);\n\n\n\n }", "public void incrementExcepionalSessions() {\n exceptionalSessions++;\n }", "public static void acceptCookies() {\n WebElement acceptButton = Browser.driver.findElement(ACCEPT_COOKIES_BUTTON);\n if(acceptButton.isDisplayed()){\n click(ACCEPT_COOKIES_BUTTON);\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 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 }", "Cookie(){\n number = 0;\n bakeTemp = 0;\n bakeTime = 0;\n isReady = false;\n\n }", "private void generateConnCookie(ActionRequest req) {\n\t\tSBUserRole role = (SBUserRole) req.getSession().getAttribute(Constants.ROLE_DATA);\n\t\tint count = getMemeberConnectionCount(RezDoxUtils.getMemberId(req), role != null ? role.getRoleId() : \"\");\n\t\tlog.debug(\"found \" +count+ \" connections\");\n\t\t//set the total in a cookie. This may be excessive for repeat calls to the rewards page, but ensures cached data is flushed\n\t\tCookieUtil.add(req, CONNECTION_COOKIE, String.valueOf(count), \"/\", -1);\n\t}", "protected static void initializeCookieStatus(HttpURLConnection urlConnection) {\n CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL));\n cookies = urlConnection.getHeaderFields().get(\"Set-Cookie\");\n }", "public static boolean setCookie(HttpSession session, Cookie cookie) {\n boolean status = false;\n\n // Make sure the list of sent cookies is created if necessary\n Vector cookiesPending = (Vector) getObject(session, COOKIES_PENDING);\n if (cookiesPending == null) {\n cookiesPending = new Vector();\n cookiesPending.add(cookie);\n\n // Make sure the sent vector exists in the session\n setObject(session, COOKIES_PENDING, cookiesPending);\n return true;\n } else {\n // If the cookie is already pending, replace it\n for (int idx = 0; idx < cookiesPending.size(); idx++) {\n Cookie current = (Cookie) cookiesPending.get(idx);\n // Cookies flagged for deletion should remain deleted\n if ((current.getMaxAge() != 0) && (current.getName().equals(cookie.getName()))) {\n cookiesPending.set(idx, cookie);\n return true;\n }\n }\n\n // Else cookies does not exist and should be added\n cookiesPending.add(cookie);\n return true;\n }\n\n }", "public boolean isAutohandleCookies() {\n\t return isAutohandlingCookies.get();\n\t}", "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 }", "private int getCookieMaxAge(Date now, Date exp) {\n if (!browserSessionOnly) {\n return new Long((exp.getTime() - now.getTime()) / 1000L).intValue();\n } else {\n return -1;\n }\n }", "@Override\n public void addCookie(Cookie arg0) {\n\n }", "public void setCookieKeepExpire(int value) {\n this.cookieKeepExpire = value;\n }", "@Override\n\t\tpublic void addCookie(Cookie cookie) {\n\t\t\t\n\t\t}", "public long getSessionCounter();", "public int getCookieKeepExpire() {\n return cookieKeepExpire;\n }", "public void eatCookie(){\n}", "public void addCookie(Cookie cookie) {\n\t\t\n\t}", "@Override\r\n public void getAllCookies()\r\n {\n\r\n }", "@Override\n\tpublic int cartCount(String id) {\n\t\treturn cookie.cartCount(id);\n\t}", "public void addConsecutiveLoginAttempts(){\n\t\tconsecutiveLoginAttempts++;\t\n\t}", "public ServerCookie checkCookie(String cookieText) throws GameException \n\t{\n\t\t//Check to see if the cookie map has this particular cookie text\n\t\tif (!cookies.containsKey(cookieText))\n\t\t\tthrow new GameException(\"No cookie found\");\n\t\tServerCookie sc = cookies.get(cookieText);\n\t\tif (sc.isExpired())\n\t\t{\n\t\t\tcookies.remove(cookieText);\n\t\t\tthrow new GameException(\"Cookie has gone stale!\");\n\t\t}\n\t\treturn sc;\n\t}", "public boolean getHasCookie ()\n\t{\n\t\treturn hasCookie;\n\t}", "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}", "@Override\n\tpublic void addCookie(Cookie cookie) {\n\t}", "private void updateSessionCounter(HttpSessionEvent httpSessionEvent){\n httpSessionEvent.getSession().getServletContext()\r\n .setAttribute(\"activeSession\", counter.get());\r\n LOG.info(\"Total active session are {} \",counter.get());\r\n }", "public void incrementUnexpectedSessions() {\n unexpectedSessions++;\n }", "@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}", "@Test\n\tpublic void testDetailedCookies() {\n\t\tResponse response = get(\"http://jsonplaceholder.typicode.com/photos\");\n\t\t\n\t\tCookie o = response.getDetailedCookie(\"__cfduid\");\n\t\t\n\t\tSystem.out.println(\"Detailed: \"+o.hasExpiryDate());\n\t\tSystem.out.println(\"Detailed: \"+o.getExpiryDate());\n\t\tSystem.out.println(\"Detailed: \"+o.hasValue());\n\t}", "public boolean isSetCookies() {\n return this.cookies != null;\n }", "void incrementAccessCounterForSession();", "void killAllCookies(HttpServletRequest request, HttpServletResponse response);", "private void setCookies(HttpServletRequest request, HttpServletResponse response, int currentPage, int recordsOnPage) {\n CookieManager cookieManager = new CookieManager(request);\n String currentPageString = Integer.toString(currentPage);\n response.addCookie(cookieManager.makeCookie(CookieName.USERS_CURRENT_PAGE, currentPageString));\n\n String recordsOnPageString = Integer.toString(recordsOnPage);\n response.addCookie(cookieManager.makeCookie(CookieName.RECORDS_ON_USERS_PAGE, recordsOnPageString));\n }", "void addCookie(HttpServletResponse response, Cookie cookie);", "boolean hasLoginapisuccessfulhitcount();", "public int check(){\r\n\r\n\treturn count ++;\r\n\t\r\n}", "public void counterAddup(){\n\t\tfor (int i=0; i<window.size(); i++){\n\t\t\tif ( window.get(i).acked == false ){\n\t\t\t\twindow.get(i).counter = window.get(i).counter+1;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn ;\n\t}", "HttpChannel addResponseCookie(Cookie cookie);", "@Override\r\n public void delAllCookies()\r\n {\n\r\n }", "int getSessionCount();", "@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\r\n public void getCookie(String name)\r\n {\n\r\n }", "public void count() {\n APIlib.getInstance().addJSLine(jsBase + \".count();\");\n }", "protected void setHasCookie (boolean aHasCookie)\n\t{\n\t\thasCookie = aHasCookie;\n\t}", "protected static void addCookies(HttpURLConnection urlConnection) {\n for (String cookie : cookies) {\n urlConnection.addRequestProperty(\"Cookie\", cookie.split(\";\", 2)[0]);\n }\n }", "@BeforeTest\n\tpublic void init() {\n\t\tMap<String, String> cokiesinit = given().when().get(COOKIE_URL).then().statusCode(200)\n\t\t\t\t.extract().cookies();\n\t\tcookieMap.putAll(cokiesinit); \n\t}", "private boolean incrementGazingCountAndCheck(int beingId,\n Palantir palantir) {\n // TODO - You fill in here.\n // @@ Something(s) important are missing here! Read the spec above..\n // @@ Fixed by adding the shutdown call in else statement\n if(mGazingThreads.incrementAndGet() <= mBeingCount.get()){\n return true;\n }\n else{\n //Shutdown if there has been an error and there are more\n //gazers than Palantiri\n mPresenter.shutdown();\n return false;\n }\n }", "int getAccessCounterForSession();", "public static int getCount3(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n int c3= prefs.getInt(saveCounter3, SaveCounter3);\n\n return c3;\n }", "public void can_counter()\n {\n candidate_count=0;\n for (HashMap.Entry<String,Candidate> set : allCandidates.entrySet())\n {\n candidate_count++;\n }\n }", "public void createCookie(final String cookie);", "public static synchronized void inccount()\r\n\t{\r\n\t\tcount++;\r\n\t}", "public void increaseNonce() {\n this.index++;\n }", "@Override\r\n public void delCookie(String name)\r\n {\n\r\n }", "private synchronized void incrementCount()\n\t{\n\t\tcount++;\n\t}", "private void updateVPLEXSessionId(ClientResponse response) {\n List<NewCookie> cookies = response.getCookies();\n for (NewCookie cookie : cookies) {\n // Look for the session cookie. It should returned in the\n // response if this is the first request from this client\n // or the session expired since the last request, in which\n // case the VPLEX creates a new session and returns the\n // id in the cookie.\n if (VPlexApiConstants.SESSION_COOKIE.equals(cookie.getName())) {\n String newSessionId = cookie.getValue();\n if ((_vplexSessionId == null) || (!_vplexSessionId.equals(newSessionId))) {\n s_logger.info(\"VPLEX Session ID changing from {} to {}\",\n (_vplexSessionId == null ? \"null\" : _vplexSessionId),\n newSessionId);\n _vplexSessionId = newSessionId;\n }\n break;\n }\n }\n }", "void setAccessCounterForSession(int cnt);", "boolean hasExpires();", "@Test(singleThreaded = true)\n public void cookiesShouldBeIgnored() {\n Mockit.setUpMock(AbstractHttpClient.class, new MockAbstractHttpClient(new MockHooks() {\n @Override\n public void responseHook(BasicHttpResponse response) {\n response.setHeader(\"Set-Cookie\", \"foo=bar; path=/;\");\n }\n }));\n connection.execute(new AddonList(), apiKey);\n\n Mockit.setUpMock(AbstractHttpClient.class, new MockAbstractHttpClient(new MockHooks() {\n @Override\n public void beforeAssertions(HttpUriRequest request, HttpContext context) {\n Assert.assertEquals(request.getHeaders(\"Cookie\").length, 0, \"Cookies should be ignored, but there are cookies present.\");\n }\n }));\n // run this twice to ensure the set-cookie was sent from the first request\n connection.execute(new AddonList(), apiKey);\n Mockit.tearDownMocks(AbstractHttpClient.class);\n }", "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}", "public void storeCookies(URLConnection conn) throws IOException {\n\n\t\t// let's determine the domain from where these cookies are being sent\n\t\tString domain = getDomainFromHost(conn.getURL().getHost());\n\n\t\tMap<String, Map<String, String>> domainStore; // this is where we will\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// store cookies for\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// this domain\n\n\t\t// now let's check the store to see if we have an entry for this domain\n\t\tif (store.containsKey(domain)) {\n\t\t\t// we do, so lets retrieve it from the store\n\t\t\tdomainStore = store.get(domain);\n\t\t} else {\n\t\t\t// we don't, so let's create it and put it in the store\n\t\t\tdomainStore = new HashMap<String, Map<String, String>>();\n\t\t\tstore.put(domain, domainStore);\n\t\t}\n\n\t\t// OK, now we are ready to get the cookies out of the URLConnection\n\n\t\tString headerName = null;\n\t\tfor (int i = 1; (headerName = conn.getHeaderFieldKey(i)) != null; i++) {\n\t\t\tif (headerName.equalsIgnoreCase(SET_COOKIE)) {\n\t\t\t\tMap<String, String> cookie = new HashMap<String, String>();\n\t\t\t\tStringTokenizer st = new StringTokenizer(\n\t\t\t\t\t\tconn.getHeaderField(i), COOKIE_VALUE_DELIMITER);\n\n\t\t\t\t// the specification dictates that the first name/value pair\n\t\t\t\t// in the string is the cookie name and value, so let's handle\n\t\t\t\t// them as a special case:\n\n\t\t\t\tif (st.hasMoreTokens()) {\n\t\t\t\t\tString token = st.nextToken();\n\t\t\t\t\tString name = token.substring(0,\n\t\t\t\t\t\t\ttoken.indexOf(NAME_VALUE_SEPARATOR));\n\t\t\t\t\tString value = token.substring(\n\t\t\t\t\t\t\ttoken.indexOf(NAME_VALUE_SEPARATOR) + 1,\n\t\t\t\t\t\t\ttoken.length());\n\t\t\t\t\tdomainStore.put(name, cookie);\n\t\t\t\t\tcookie.put(name, value);\n\t\t\t\t}\n\n\t\t\t\twhile (st.hasMoreTokens()) {\n\t\t\t\t\tString t1 = \"\";\n\t\t\t\t\tString t2 = \"\";\n\t\t\t\t\tString token = st.nextToken();\n\t\t\t\t\tint seperatorPosition = token.indexOf(NAME_VALUE_SEPARATOR);\n\t\t\t\t\tif (seperatorPosition >= 0) {\n\t\t\t\t\t\tt1 = token.substring(0,\n\t\t\t\t\t\t\t\ttoken.indexOf(NAME_VALUE_SEPARATOR))\n\t\t\t\t\t\t\t\t.toLowerCase();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tt1 = \"\";\n\t\t\t\t\t}\n\t\t\t\t\tt2 = token.substring(\n\t\t\t\t\t\t\ttoken.indexOf(NAME_VALUE_SEPARATOR) + 1,\n\t\t\t\t\t\t\ttoken.length());\n\t\t\t\t\t/*\n\t\t\t\t\t * cookie.put(token.substring(0,\n\t\t\t\t\t * token.indexOf(NAME_VALUE_SEPARATOR)).toLowerCase(),\n\t\t\t\t\t * token.substring(token.indexOf(NAME_VALUE_SEPARATOR) + 1,\n\t\t\t\t\t * token.length()));\n\t\t\t\t\t */\n\t\t\t\t\tcookie.put(t1, t2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "HttpClientRequest addCookie(Cookie cookie);", "void killCookie(HttpServletRequest request, HttpServletResponse response, String name);", "boolean hasCounter();", "int getCachedCount();", "Cookie[] getCookies();", "private String createCookies() {\n\n String bengLoginID = uid + \"\";\n String timeStr = MyApplication.getInstance().authorTime;\n ToastUtil.toast(timeStr + \"\");\n String cookes = MyApplication.getInstance().bengLoginId + \"; \" + MyApplication.getInstance().userHit + \"; \" + MyApplication.getInstance().authorID + \"; \" + timeStr + \"; \" + MyApplication.getInstance().phpSessid;\n ToastUtil.toast(cookes);\n return cookes;\n\n }", "Builder withCookie(long cookie);", "private synchronized static void upCount() {\r\n\t\t++count;\r\n\t}", "public static void main(String[] args){//main method for the program\n \n Scanner myScanner;//initialize scanner object\n myScanner=new Scanner(System.in);//set variable for user input\n \n// Cookies:\n System.out.print(\"Enter the number of cookies: \");//promt user for input\n if (!myScanner.hasNextInt()){//check for no integer\n System.out.print(\"You did not enter a valid positive integer.\");//tell user they did it wrong\n return;//end program\n }//end if for cookies input\n int nCookies=myScanner.nextInt();//assign nCookies to user input\n if (nCookies<1){//check if cookies is greater than 0\n System.out.print(\"You need to enter an integer > 0.\");//tell user they messed up\n return; //end program\n }// end if for cookies being positive\n \n// People:\n System.out.print(\"Enter the number of people: \");//prompt user for input\n if (!myScanner.hasNextInt()){//check for no integer\n System.out.print(\"You need to enter a valid positive integer.\");//tell them they messed up\n return;//end program\n }//end if for people input integer check\n int nPeople=myScanner.nextInt();//assign nPeople to user input\n if (nPeople<1){//check if the number of people is not positive\n System.out.print(\"You need to enter an integer > 0.\");//tell the user to enter a positive integer\n return;//end program\n }//end if for people integer positive check\n \n// Cookies per Person:\n System.out.print(\"Enter the number of cookies you want each person to get: \");//promt user for input\n if(!myScanner.hasNextInt()){//check for no integer\n System.out.print(\"You need to enter a valid positive integer.\");//tell the user to enter an integer\n return;//end program\n }//end if for cookies per person integer check\n int cookiesPerPerson=myScanner.nextInt();//save user input of cookies per person into variable\n if (cookiesPerPerson<0){//if the number entered is negative\n System.out.print(\"You need to enter a positive number or 0.\");//tell user to enter number [0,infinity)\n return;//end program\n }//end if for cookies being positive\n \n// Using Information Gathered:\n double cookiesGiven=nCookies/nPeople;//find out how many cookies each person will get\n if (cookiesGiven>=cookiesPerPerson){//if there are enough cookies to that each person gets enough\n System.out.print(\"You have enough cookies for everyone\");//tell the user there is enough\n double leftOver=nCookies-(cookiesPerPerson*nPeople);//find out if there are left over cookies\n if (leftOver==0){//if there are no left over cookies\n System.out.print(\" and it will divide evenly.\\n\");//inform the user it will divide evenly\n }//end left over if\n else{//otherwise...\n System.out.print(\", but they will not divide evenly.\\n\");//inform the user there will be leftover cookies\n }//end else for left over\n }//end if for \"are there enough cookies\"\n else{//otherwise\n System.out.print(\"You do not have enough cookies for everyone. \");//Tell the user there is not enough cookeis\n int nExtraCookies = (cookiesPerPerson * nPeople) - nCookies;//find out how many more cookies are needed\n System.out.print(\"You will need at least \"+nExtraCookies+\" more cookies!\\n\");//inform the user how many more they'll need\n return;//end program\n }//end else for not having enough cookies\n \n }", "public Cookie Found(HttpServletRequest request) {\n\t\tfor(Cookie c : request.getCookies()) {\n\t\t\tif(c.getName().equals(\"CS5300J17\")) return c;\n\t\t}\n\t\treturn null;\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.972 -0500\", hash_original_method = \"E9376C130584FE2146C1CFB7A84FB471\", hash_generated_method = \"FA6BBF0A4D9665939C38DB115FB61EFF\")\n \nprivate boolean cookiesEnabled() {\n return CookieManager.getInstance().acceptCookie();\n }", "int getAuthenticationCount();", "public void incrMetaCacheNumClearServer() {\n metaCacheNumClearServer.inc();\n }", "private static void incrementFlightTakeOffCounter()\r\n\t{\r\n\t\tflightTakeOffCounter++;\r\n\t}", "@Test\n\t //Extracting a string from the response\n\t public void getBasicAuthTestResultCookies() {\n\t Cookies cookies = given ()\n\t \t.spec(requestSpec)\n\t .when()\n\t .get (\"/maps/api/place/textsearch/json\")\n\t .detailedCookies();\n\t System.out.println(\"Cookies\"+cookies.size());\n\t System.out.println(\"CookiesList\"+cookies.getList(\"cookie1\").size());\n\t //System.out.println(\"Cookies\"+cookies.values().toString());\n\t //Assert.assertEquals(statusCode.toString(), \"200\");\n\t }", "private static void setCounter() {++counter;}", "public void setCookies(URLConnection conn) throws IOException {\n\n\t\t// let's determine the domain and path to retrieve the appropriate\n\t\t// cookies\n\t\tURL url = conn.getURL();\n\t\tString domain = getDomainFromHost(url.getHost());\n\t\tString path = url.getPath();\n\n\t\tMap<String, Map<String, String>> domainStore = store.get(domain);\n\t\tif (domainStore == null)\n\t\t\treturn;\n\t\tStringBuffer cookieStringBuffer = new StringBuffer();\n\n\t\tIterator<String> cookieNames = domainStore.keySet().iterator();\n\t\twhile (cookieNames.hasNext()) {\n\t\t\tString cookieName = cookieNames.next();\n\t\t\tMap<String, String> cookie = (Map<String, String>) domainStore\n\t\t\t\t\t.get(cookieName);\n\t\t\t// check cookie to ensure path matches and cookie is not expired\n\t\t\t// if all is cool, add cookie to header string\n\t\t\tif (comparePaths((String) cookie.get(PATH), path)\n\t\t\t\t\t&& isNotExpired((String) cookie.get(EXPIRES))) {\n\t\t\t\tcookieStringBuffer.append(cookieName);\n\t\t\t\tcookieStringBuffer.append(\"=\");\n\t\t\t\tcookieStringBuffer.append((String) cookie.get(cookieName));\n\t\t\t\tif (cookieNames.hasNext())\n\t\t\t\t\tcookieStringBuffer.append(SET_COOKIE_SEPARATOR);\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tconn.setRequestProperty(COOKIE, cookieStringBuffer.toString());\n\t\t} catch (java.lang.IllegalStateException ise) {\n\t\t\tIOException ioe = new IOException(\n\t\t\t\t\t\"Illegal State! Cookies cannot be set on a URLConnection that is already connected. \"\n\t\t\t\t\t\t\t+ \"Only call setCookies(java.net.URLConnection) AFTER calling java.net.URLConnection.connect().\");\n\t\t\tthrow ioe;\n\t\t}\n\t}", "private static Cookie getCookie() {\n if (cookie == null) {\n synchronized (DefaultEntityManagerImpl.class) {\n if (cookie == null) {\n cookie = new Cookie(cookieName, getAppTokenId());\n }\n }\n }\n return cookie;\n }", "public void incrementCount() {\n count++;\n }", "public void incrementCount() {\n\t\tcount++;\n\t}", "public void addCount() {\n \t\tdupCount++;\n \t}", "public void addCount()\n {\n \tcount++;\n }", "boolean hasLoginapihitcount();", "private void getReferralCount() {\n try {\n FIRDatabaseReference refCanRef = FIRDatabase.database()\n .reference(USERS)\n .child(mAuth.getCurrentUser().getUid())\n .child(FIREBASE_PATHS.REFERRED_CANDIDATES);\n\n refCanRef.observeEvent(FIRDataEventType.Value,\n new VoidBlock1<FIRDataSnapshot>() {\n @Override\n public void invoke(FIRDataSnapshot firDataSnapshot) {\n FIRDatabaseReference userRef = FIRDatabase.database().reference()\n .child(USERS);\n //Initially clear referral count\n NSUserDefaults.getStandardUserDefaults().put(KEY_REFERRAL_COUNT, 0);\n\n int array = (int) firDataSnapshot.getChildrenCount();\n int num = (int) firDataSnapshot.getChildrenCount();\n\n System.out.println(\"Referral count ------------------>\" + num);\n\n for (FIRDataSnapshot referredCandidates : firDataSnapshot.getChildren().getAllObjects()) {\n String userID = referredCandidates.getValue().toString();\n FIRDatabaseReference hasCompetedRef = userRef\n .child(userID)\n .child(FIREBASE_PATHS.HAS_COMPLETED_CHAP_0);\n hasCompetedRef.observeSingleEvent(FIRDataEventType.Value,\n new VoidBlock1<FIRDataSnapshot>() {\n @Override\n public void invoke(FIRDataSnapshot firDataSnapshot) {\n try {\n NSNumber nsNumber = (NSNumber) firDataSnapshot.getValue();\n int isChap0Completed = nsNumber.intValue();\n int currentCount = NSUserDefaults.getStandardUserDefaults().getInt(KEY_REFERRAL_COUNT);\n System.out.println(\"CurrentCount------------------------>\" + currentCount);\n if (isChap0Completed == CHAPTER0_COMPLETED) {\n NSUserDefaults.getStandardUserDefaults().put(KEY_REFERRAL_COUNT, currentCount + 1);\n }\n } catch (Exception e) {\n System.out.println(\"Get Chap0 completed Error ----------------->\" + e);\n }\n }\n });\n }\n\n }\n });\n\n } catch (Exception e) {\n System.out.println(\"getReferalCount Error ------------------>\" + e);\n }\n }", "void updateFrequencyCount() {\n //Always increments by 1 so there is no need for a parameter to specify a number\n this.count++;\n }", "void recount();", "public static void addSaveCounter3(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n SaveCounter3 = prefs.getInt(saveCounter3, 0);\n SaveCounter3 = SaveCounter3 + SaveInc;\n prefs.edit().putInt(saveCounter3, SaveCounter3).commit();\n\n }", "@Override\n public void validate(Cookie cookie, CookieOrigin origin) throws MalformedCookieException {\n }", "public abstract int getNumSessions();", "@Override\n\t\tpublic boolean isRequestedSessionIdFromCookie() {\n\t\t\treturn false;\n\t\t}", "public boolean deleteSession() {\r\n\r\n if (Driver.getCurrentDriver().getClass().getSimpleName().contains(\"InternetExplorer\")) {\r\n\r\n Driver.refreshDriver();\r\n driver = Driver.getCurrentDriver();\r\n driver.get(baseUrl);\r\n } else if (Driver.getCurrentDriver().getClass().getSimpleName().contains(\"Remote\")) {\r\n Driver.getCurrentDriver().executeScript(\r\n \"var cookies = document.cookie.split(\\\";\\\");for (var i = 0; i < cookies.length; i++) document.cookie = cookies[i].split(\\\"=\\\")[0]+\\\"=;expires=Thu, 01 Jan 1970 00:00:00 GMT\\\";\",\r\n (new Button()).getElement());\r\n\r\n } else {\r\n // System.out.println(Driver.getCurrentDriver().executeScript(\"return\r\n // document.cookie.split(\\\";\\\");\", (new Button()).getElement()));\r\n Driver.getCurrentDriver().manage().deleteAllCookies();\r\n if (!driver.getClass().getSimpleName().contains(\"SelendroidDriver\")) {\r\n Driver.getCurrentDriver().executeScript(\r\n \"var cookies = document.cookie.split(\\\";\\\");for (var i = 0; i < cookies.length; i++) document.cookie = cookies[i].split(\\\"=\\\")[0]+\\\"=;expires=Thu, 01 Jan 1970 00:00:00 GMT\\\";\",\r\n (new Button()).getElement());\r\n }\r\n // System.out.println(Driver.getCurrentDriver().executeScript(\"return\r\n // document.cookie.split(\\\";\\\");\", (new Button()).getElement()));\r\n\r\n }\r\n Logger.logDebug(\"All cookies were deleted\");\r\n //\r\n return true;\r\n }", "public void setAutoHandleCookies(boolean isAutohandlingCookies) {\n\t if (this.isAutohandlingCookies.get() == isAutohandlingCookies) {\n return;\n }\n this.isAutohandlingCookies.set(isAutohandlingCookies);\n resetChain();\n\t}", "public void setSessionId(String cookie) {\n\t\t\r\n\t}" ]
[ "0.7031306", "0.681713", "0.6494959", "0.6149703", "0.6091734", "0.60190475", "0.6003541", "0.59561527", "0.58728635", "0.5774621", "0.57182366", "0.5712543", "0.5690107", "0.56022686", "0.5541222", "0.54971457", "0.5491048", "0.5444065", "0.54315466", "0.5413241", "0.5409765", "0.5406552", "0.5400598", "0.5375866", "0.53667974", "0.5317414", "0.530603", "0.53042036", "0.52922195", "0.5263676", "0.5208303", "0.5207504", "0.51923996", "0.5181652", "0.5180751", "0.51613474", "0.5142665", "0.51362437", "0.5104563", "0.50849295", "0.5084756", "0.5082263", "0.507502", "0.5069326", "0.50609773", "0.5055243", "0.5051561", "0.50489515", "0.5030443", "0.5017815", "0.49953964", "0.49902958", "0.49868888", "0.49861515", "0.49841303", "0.4967888", "0.49620372", "0.49602026", "0.49550343", "0.4951257", "0.49475515", "0.4945606", "0.49366656", "0.4936452", "0.4936452", "0.4936452", "0.4936452", "0.49327192", "0.49285308", "0.49257153", "0.49128756", "0.49000064", "0.48989633", "0.48957714", "0.48837903", "0.48787823", "0.48784548", "0.48580256", "0.48549247", "0.48537308", "0.48532826", "0.4850913", "0.4829603", "0.4803955", "0.4779909", "0.47701284", "0.47685304", "0.47598648", "0.47569805", "0.475619", "0.47413915", "0.47360957", "0.47344667", "0.47338971", "0.4730361", "0.472544", "0.4720199", "0.47155836", "0.47060123", "0.4697414", "0.4696354" ]
0.0
-1
loads error.html for 404 error
private void postErrorPage() throws IOException { out.println(OK); System.out.println(NO); out.println(htmlType); out.println(closed); out.println("Content-Length: " + ERROR_FILE.length()); out.println(ENDLINE); String htmlLine = ERROR_READER.readLine(); while (htmlLine != null) { out.println(htmlLine); htmlLine = ERROR_READER.readLine(); } ERROR_READER.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void action_error(HttpServletRequest request, HttpServletResponse response) throws IOException {\n //assumiamo che l'eccezione sia passata tramite gli attributi della request\n //we assume that the exception has been passed using the request attributes \n Map data=new HashMap();\n \n Exception exception = (Exception) request.getAttribute(\"exception\");\n String message;\n if (exception != null && exception.getMessage() != null) {\n message = exception.getMessage();\n } else {\n message = \"Unknown error\";\n }\n data.put(\"errore\",message);\n FreeMarker.process(\"404error.html\",data, response, getServletContext()); \n }", "@ResponseStatus(value = HttpStatus.NOT_FOUND)\n public String generalError(HttpServletRequest request, HttpServletResponse response, Model model) {\n // retrieve some useful information from the request\n\n String message = \"404 Not found\";\n\n model.addAttribute(\"errorMessage\", message);\n return \"error/general\";\n }", "@RequestMapping(\"/error\")\n\tpublic String handleError() {\n\t\treturn \"error-404\";\n\t}", "private void showErrorPage() {\n setContentView(R.layout.main);\n\n // The specified network connection is not available. Displays error message.\n WebView myWebView = (WebView) findViewById(R.id.webview);\n myWebView.loadData(getResources().getString(R.string.connection_error),\n \"text/html\", null);\n }", "@GetMapping(\"/error\")\n public String handleError() {\n return \"ErrorPage\";\n }", "private String httpNotOk() {\n return \"HTTP/1.1 404 not Found\\r\\n\"\n + \"Content-Type: text/html\\r\\n\"\n + \"\\r\\n\"\n + \"<!DOCTYPE html>\\n\"\n + \"<html>\\n\"\n + \"<head>\\n\"\n + \"<meta charset=\\\"UTF-8\\\">\\n\"\n + \"<title>Error</title>\\n\"\n + \"</head>\\n\"\n + \"<body>\\n\"\n + \"<h1>There is an error</h1>\\n\"\n + \"</body>\\n\"\n + \"</html>\\n\";\n }", "@Override\n public void fileNotFound(String path, Throwable cause) {\n headers.put(CONTENT_TYPE, MediaType.getType(\".html\"));\n send404NotFound(ctx, headers, \"404 NOT FOUND\".getBytes(), true);\n }", "@ExceptionHandler(NoHandlerFoundException.class)\n public ModelAndView handleError404(Exception e) {\n ModelAndView model = new ModelAndView(\"genericError\");\n model.addObject(\"errCode\", \"404\");\n model.addObject(\"errMsg\", \"Zadana stranka nebyla na serveru bikeo.cz nalezena\");\n return model;\n }", "public void errorPage(int code, String message, Throwable exception) {\n\n\t\tString errPage = Configuration.valueFor(\"xr.load.error-pages\") + \"/error-\" + code + \".xhtml\";\n\n\t\tAssetInfo info = ToolKit.get().getApplication().getAssetManager().locateAsset(new AssetKey<String>(errPage));\n\t\tif (info == null) {\n\t\t\terrPage = Configuration.valueFor(\"xr.load.error-pages\") + \"/error.xhtml\";\n\t\t\tinfo = ToolKit.get().getApplication().getAssetManager().locateAsset(new AssetKey<String>(errPage));\n\t\t\tif (info == null) {\n\t\t\t\tthrow new RuntimeException(\"No resource \" + Configuration.valueFor(\"xr.load.error-pages\")\n\t\t\t\t\t\t+ \"/error.xhtml could \" + \"be found. This is needed a template to use for the error page.\"\n\t\t\t\t\t\t+ \"Create one, and use ${errorMessage}, ${errorTrace} and ${errorCode} as \"\n\t\t\t\t\t\t+ \"place holders in the content. These will get replaced at runtime.\");\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(info.openStream()));\n\t\t\tStringBuilder bui = new StringBuilder();\n\t\t\ttry {\n\t\t\t\tString line;\n\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\tbui.append(line);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\treader.close();\n\t\t\t}\n\n\t\t\t// Replace the content\n\t\t\tString content = bui.toString().replace(\"${errorCode}\", code == 0 ? \"\" : String.valueOf(code));\n\t\t\tcontent = content.replace(\"${errorMessage}\", message == null ? \"\" : message);\n\t\t\tif (exception != null) {\n\t\t\t\tStringWriter traceWriter = new StringWriter();\n\t\t\t\texception.printStackTrace(new PrintWriter(traceWriter));\n\t\t\t\tcontent = content.replace(\"${errorTrace}\", traceWriter.toString());\n\t\t\t}\n\n\t\t\tByteArrayInputStream bain = new ByteArrayInputStream(content.getBytes(\"UTF-8\"));\n\t\t\tsetDocument(bain, errPage);\n\t\t} catch (IOException ioe) {\n\t\t\tthrow new RuntimeException(\"Could not read error page.\");\n\t\t}\n\t}", "@Override\r\n\t\tpublic void customize(ConfigurableEmbeddedServletContainer factory) {\r\n\t\t\tfactory.addErrorPages(new ErrorPage(HttpStatus.NOT_FOUND, \"/404\"));\r\n\t\t}", "@Override\n\tpublic void onRequestError(String reqID, Exception error) {\n\t\temptyView.showException((ZcdhException)error, this);\n\t}", "void errorResponse( String error );", "@Override\n\tpublic ModelAndView resolveException(HttpServletRequest request,\n\t\t\tHttpServletResponse response, Object handler, Exception ex) {\n\t\tSystem.out.println(\"错误页面被拦截\");\n\t\treturn new ModelAndView(\"myError\"); \n\t}", "@Override\n\t\tpublic void loadError() {\n\t\t}", "@Error(status = HttpStatus.NOT_FOUND, global = true)\n public HttpResponse<?> notFound(HttpRequest<?> request) {\n if (request.getHeaders()\n .accept()\n .stream()\n .anyMatch(mediaType -> mediaType.getName().contains(MediaType.TEXT_HTML))) {\n return HttpResponse.ok(\"<h1>not found</h1>\")\n .contentType(MediaType.TEXT_HTML);\n }\n\n JsonError error = new JsonError(\"Page Not Found\")\n .link(Link.SELF, Link.of(request.getUri()));\n\n return HttpResponse.<JsonError>notFound()\n .body(error);\n }", "@ExceptionHandler(NoHandlerFoundException.class)\r\n\tpublic ModelAndView handlerNoHandlerFoundException() {\r\n\t\t\r\n\t\tModelAndView mv = new ModelAndView(\"/clientViews/page\");\r\n\t\t\r\n\t\tmv.addObject(\"title\",\"404 Error Page\");\r\n\t\tmv.addObject(\"error404\", true);\r\n\t\treturn mv;\r\n\t\t\r\n\t}", "private void doSearchError(Map<String, Object> map, Configuration config, HttpServletRequest request, HttpServletResponse response) {\n writeTemplate(TEMPLATE_DEFAULT, map, config, request, response);\n }", "@RequestMapping(value=\"/errors\", method=RequestMethod.GET)\n\tpublic String renderErrorPage(final Model model, final HttpServletRequest request){\n\t\t// get the HttpStatusCode of the request\n\t\tfinal int error_code = getHttpStatusCode(request);\n\t\t//error_message is generated using the error_code\n\t\tfinal String error_message=errorService.generateErrorMessage(error_code);\n\t\t//get the logged in user\n\t\tString loggedInUser = request.getRemoteUser();\n\t\tmodel.addAttribute(\"loggedInUser\", loggedInUser);\n\t\t//error message is added to model\t\n\t\tmodel.addAttribute(\"errorMsg\", error_message);\n\t\t//errorPage jsp\n\t\treturn \"errors/errorPage\";\n\t}", "public void showError(String error);", "@RequestMapping(value = \"/404\", method = RequestMethod.GET)\n public String notFoundPage(){\n return \"_404\";\n }", "@RequestMapping(\"generalError\")\n\tpublic String error(HttpServletRequest request, HttpServletResponse response, Model model) {\n\t\tString classpath = \"javax.servlet.error\";\n\t\tInteger statusCode = (Integer) request.getAttribute(classpath + \".status_code\");\n\t\tThrowable throwable= (Throwable) request.getAttribute(classpath + \".exception\");\n\t\tString exceptionMessage= getExceptionMessage(throwable, statusCode);\n\t\tString requestUri = (String) request.getAttribute(classpath + \".request_uri\");\n\t\tif (requestUri == null) requestUri = \"Unknown\";\n\t\t\n\t\tString message = MessageFormat.format(\"{0} returned for {1} with message {2}\", statusCode, requestUri, exceptionMessage);\n\t\tmodel.addAttribute(\"errorMessage\", message);\n\t\treturn \"error/general\";\n\t}", "public String formNotFound()\r\n {\r\n return formError(\"404 Not_found\",\"Requested object was not found\");\r\n }", "@ResponseStatus(HttpStatus.NOT_FOUND)\n @ExceptionHandler(NotFoundException.class)\n public ModelAndView handleNotFound(Exception exception){\n\n System.err.println(\"Handling Not Found Exception\");\n System.err.println(exception.getMessage());\n\n\n ModelAndView modelAndView = new ModelAndView();\n\n modelAndView.setViewName(\"404Error\");\n //adding model attr to 404 error.html\n modelAndView.addObject(\"exception\", exception);\n\n return modelAndView;\n }", "public void onFailure(int statusCode, Throwable error,\n\t\t\t\t\t\t\t\tString content) {\n\t\t\t\t\t\t\tprgDialog.hide();\n\t\t\t\t\t\t\tif (statusCode == 404) {\n\t\t\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\t\t\t\"Requested resource not found\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t} else if (statusCode == 500) {\n\t\t\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\t\t\t\"Something went wrong at server end \",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\t\t\"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public void onFailure(int statusCode, Throwable error,\n\t\t\t\t\t\t\t\tString content) {\n\t\t\t\t\t\t\tprgDialog.hide();\n\t\t\t\t\t\t\tif (statusCode == 404) {\n\t\t\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\t\t\t\"Requested resource not found\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t} else if (statusCode == 500) {\n\t\t\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\t\t\t\"Something went wrong at server end\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\t\t\"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public void onFailure(int statusCode, Throwable error,\n\t\t\t\t\t\t\t\tString content) {\n\t\t\t\t\t\t\tprgDialog.hide();\n\t\t\t\t\t\t\tif (statusCode == 404) {\n\t\t\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\t\t\t\"Requested resource not found\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t} else if (statusCode == 500) {\n\t\t\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\t\t\t\"Something went wrong at server end\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\t\t\"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public void onFailure(int statusCode, Throwable error,\n\t\t\t\t\t\t\t\tString content) {\n\t\t\t\t\t\t\tprgDialog.hide();\n\t\t\t\t\t\t\tif (statusCode == 404) {\n\t\t\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\t\t\t\"Requested resource not found\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t} else if (statusCode == 500) {\n\t\t\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\t\t\t\"Something went wrong at server end\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\t\t\"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public void onFailure(int statusCode, Throwable error,\n\t\t\t\t\t\t\t\tString content) {\n\t\t\t\t\t\t\tprgDialog.hide();\n\t\t\t\t\t\t\tif (statusCode == 404) {\n\t\t\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\t\t\t\"Requested resource not found\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t} else if (statusCode == 500) {\n\t\t\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\t\t\t\"Something went wrong at server end\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\t\t\"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public void onFailure(int statusCode, Throwable error,\n\t\t\t\t\t\t\t\tString content) {\n\t\t\t\t\t\t\tprgDialog.hide();\n\t\t\t\t\t\t\tif (statusCode == 404) {\n\t\t\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\t\t\t\"Requested resource not found\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t} else if (statusCode == 500) {\n\t\t\t\t\t\t\t\tToast.makeText(context,\n\t\t\t\t\t\t\t\t\t\t\"Something went wrong at server end\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\t\t\t\t\"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\",\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "@PostMapping(\"/error\")\n public String handleErrorPost() {\n return \"ErrorPage\";\n }", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "public SimpleResponse ERROR_NOT_FOUND() {\n this.state = HttpStatus.NOT_FOUND.value();\n return ERROR_CUSTOM();\n }", "public static String getErrorPageURL(HttpServletRequest request) {\n\t\treturn request.getContextPath() + \"/GeneralException.jsp\";\n\t}", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "public void showLoadingError() {\n showError(MESSAGE_LOADING_ERROR);\n }", "private void handleError(HttpServletResponse resp, Throwable ex) {\r\n try {\r\n if (resp.isCommitted()) {\r\n PrintWriter out = resp.getWriter();\r\n ex.printStackTrace(out);\r\n return;\r\n }\r\n resp.setStatus(500);\r\n resp.setContentType(\"text/html\");\r\n PrintWriter out = resp.getWriter();\r\n out.println(\"<html>\");\r\n out.println(\" <head><title>Execution Error: 500</title></head>\");\r\n out.println(\" <body>\");\r\n out.println(\" <h2>Execution Error: \"+ex.getClass().getSimpleName()+\"</h2>\");\r\n out.println(\" <p>Stack trace:</p>\");\r\n out.print(\" <blockquote><pre>\");\r\n if (ex instanceof RhinoException) {\r\n RhinoException rex = (RhinoException)ex;\r\n rex.printStackTrace(out);\r\n } else {\r\n ex.printStackTrace(out);\r\n }\r\n out.println(\"</pre></blockquote>\");\r\n out.println(\" <p><address>Powered by Alt Framework</address></p>\");\r\n out.println(\" </body>\");\r\n out.println(\"</html>\");\r\n } catch (IOException ex2) {\r\n ex2.printStackTrace(System.err);\r\n }\r\n }", "protected void initErrorTemplate(ServletConfig config) throws ServletException {\n if (errorTemplateFile == null) {\n errorTemplateFile = config.getInitParameter(\"wings.error.template\");\n }\n }", "@TargetApi(android.os.Build.VERSION_CODES.M)\n @Override\n public void onReceivedError(WebView view, WebResourceRequest req, WebResourceError rerr) {\n Log.d(\"Error\",\"error recieved\");\n onReceivedError(view, rerr.getErrorCode(), rerr.getDescription().toString(), req.getUrl().toString());\n }", "@Override\r\n\t\tpublic void error(ResponseError error) {\n\t\t\tTools.toastShow(error.getMessage());\r\n\t\t}", "@Override\r\n\t\tpublic void error(ResponseError error) {\n\t\t\tTools.toastShow(error.getMessage());\r\n\t\t}", "@Override\n\t\tpublic void onReceivedError(WebView view, int errorCode,\n\t\t\t\tString description, String failingUrl) {\n\t\t\tLog.d(TAG, \"on received error\");\n\t\t\tloadingFailed = true;\n\t\t\tsuper.onReceivedError(view, errorCode, description, failingUrl);\n\t\t}", "public void onReceivedError(WebView view, int errorCode,\n String description, String failingUrl) {\n dialog.dismiss();\n // You can redirect to your own page instead getting the default\n // error page\n Toast.makeText(EpubReaderActivity.this,\n \"The Requested Page Does Not Exist\", Toast.LENGTH_LONG).show();\n web.loadUrl(\"http://arunimmanuel.blogspot.in\");\n super.onReceivedError(view, errorCode, description, failingUrl);\n }", "@Override\n public void onFailure(int statusCode, Throwable error,\n String content) {\n\n if(statusCode == 404){\n Toast.makeText(context, \"Requested resource not found\", Toast.LENGTH_LONG).show();\n }else if(statusCode == 500){\n Toast.makeText(context, \"Something went wrong at server end\", Toast.LENGTH_LONG).show();\n }else{\n // Toast.makeText(context, \"Unexpected Error occcured! [Most common Error: Device might not be connected to Internet]\", Toast.LENGTH_LONG).show();\n }\n }", "public void errorResponse(int code, String msg){\n msg = errorMessage(code, msg);\n StringReader inputStream = new StringReader( msg );\n\n Content ct = new crc.content.text.html( inputStream, this );\n Transaction response = new HTTPResponse( Pia.instance().thisMachine,\n\t\t\t\t\t toMachine(), ct, false);\n response.setStatus( code );\n response.setContentType( \"text/html\" );\n response.setContentLength( msg.length() );\n Pia.debug(this, \"The header : \\n\" + response.headersAsString() );\n response.startThread();\n }", "@RequestMapping(value = \"/loginfailed\", method = RequestMethod.GET)\n\tpublic String loginerror(Model model) {\n\t\tmodel.addAttribute(\"error\", \"true\");\n\t\treturn \"login\";\n\t}", "@Override\r\n\tpublic String getErrorPath() {\n\t\treturn \"/error\";\r\n\t}", "private void action_error(HttpServletRequest request, HttpServletResponse response, String message) {\n\n FailureResult fail = new FailureResult(getServletContext());\n fail.activate(message, request, response);\n }", "@Override\n public void showError() {\n }", "@Override\n public void onReceivedError(final WebView view, int errorCode, String description, String failingUrl) {\n Log.w(TAG, String.format(\"%d: Could not load %s: %s\", errorCode, failingUrl, description));\n view.loadData(getString(R.string.blank_page), \"text/html\", null);\n Toast.makeText(activity, \"Network error\", Toast.LENGTH_SHORT).show();\n final String retryUrl = failingUrl;\n new Handler().postDelayed(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(activity, \"Retrying...\", Toast.LENGTH_SHORT).show();\n view.loadUrl(retryUrl);\n }\n }, 5000);\n //super.onReceivedError(view, errorCode, description, failingUrl);\n }", "@GetMapping(\"notfound\")\n public void notFound()\n {\n throw new NotFoundException(\"404\", \"404 Not Found - NotFoundException\");\n }", "@Override\n\tpublic String getErrorPath() {\n\t\treturn \"/error\";\n\t}", "protected void checkError(Response res) {\n if (res.getStatus() < 300) {\n return;\n }\n\n if (res.getStatus() == 404) {\n throw new NotFoundException(\"No results found.\");\n }\n\n // TODO custom exceptions here\n // final String responseBody = res.readEntity(String.class);\n }", "@Override\r\n\t\t\t\t\tpublic void error(ResponseError error) {\n\t\t\t\t\t\tTools.toastShow(error.getMessage());\r\n\t\t\t\t\t}", "@Override protected void failed(Throwable e) {\n logger.log(Level.WARNING, \"couldn't load \" + getFile(), e);\n String msg = getResourceMap().getString(\"loadFailedMessage\", getFile());\n String title = getResourceMap().getString(\"loadFailedTitle\");\n int type = JOptionPane.ERROR_MESSAGE;\n JOptionPane.showMessageDialog(app.getFrame().getFrame(), msg, title, type);\n }", "public void errorPage(Throwable exception) {\n\t\terrorPage(0, exception.getMessage(), exception);\n\t}", "public void showError(String errorMessage);", "private XMLResource getNotFoundDocument(String uri) {\n XMLResource xr;\n String notFound = \"<html><h1>Document not found</h1><p>Could not access URI <pre>\" + uri + \"</pre></p></html>\";\n xr = XMLResource.load(new StringReader(notFound));\n return xr;\n }", "private void sendToErrorPage(String errorMessage, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"/error.jsp\");\n ErrorBean errorBean = new ErrorBean();\n errorBean.setErrorText(errorMessage);\n request.setAttribute(ERROR_ATTRIBUTE_NAME, errorBean);\n dispatcher.forward(request, response);\n }", "@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tview.showErrorMessage(caught.getMessage());\n\t\t\t\tview.setLoading(false);\n\t\t\t}", "void pushScriptLoadError(String resourceUrl);", "public void sendErrorMessage( int statusCode ) {\r\n\r\n\t\tString httpVersion = HttpdConf.DEFAULT_HTTP_VERSION;\r\n\t\tif ( request != null && request.getHttpVersion() != null )\r\n\t\t\thttpVersion = request.getHttpVersion();\r\n\r\n\t\ttry {\r\n\r\n\t\t\tFile errorFile = new File( ERROR_FILE_PATH + Integer.toString( statusCode ) + \".html\" );\r\n\t\t\tHeaderBuilder builder = new HeaderBuilder();\r\n\t\t\tString headerMessage = builder.buildHeaderBegin( statusCode, httpVersion )\r\n\t\t\t\t\t.buildContentTypeAndLength( errorFile ).toString();\r\n\t\t\twriteHeaderMessage( headerMessage );\r\n\t\t\tserveFile( errorFile );\r\n\r\n\t\t} catch ( ServerException se ) {\r\n\t\t\tse.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "@ExceptionHandler(value = Throwable.class)\n\t public ModelAndView defaultErrorHandler(HttpServletRequest req, Throwable e) {\n\t ModelAndView mav = new ModelAndView();\n\t mav.getModelMap().put(\"exception\", e);\n\t mav.getModelMap().put(\"url\", req.getRequestURL());\n\t mav.setViewName(\"error_page\");\n\t return mav;\n\t }", "@Override\r\n public void onFailureRedirection(String errorMessage) {\r\n try {\r\n mUtility.stopLoader();\r\n mUtility.showSnackBarAlert(findViewById(R.id.container), errorMessage, false);\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void doError (int statuscode, Exception e) {\n\tStringWriter sw = new StringWriter ();\n\tPrintWriter ps = new PrintWriter (sw);\n\te.printStackTrace (ps);\n\tString message = sw.toString ();\n\tthis.statusCode = Integer.toString (statuscode);\n\textraInfo = (extraInfo != null ? \n\t\t extraInfo + e.toString () : \n\t\t e.toString ());\n\tHttpHeader header = null;\n\tif (statuscode == 504) \n\t header = getHttpGenerator ().get504 (e, requestLine);\n\telse \n\t header = getHttpGenerator ().getHeader (\"HTTP/1.0 400 Bad Request\");\n\t\n\tStringBuilder sb = new StringBuilder ();\n\tsb.append (HtmlPage.getPageHeader (this, statuscode + \" \" + \n\t\t\t\t\t header.getReasonPhrase ()) +\n\t\t \"Unable to handle request:<br><b>\" + \n\t\t e.getMessage () +\n\t\t (header.getContent () != null ? \n\t\t \"<br>\" + header.getContent () : \n\t\t \"\") + \n\t\t \"</b><br><xmp>\" + message + \"</xmp></body></html>\\n\");\n\theader.setContent (sb.toString ());\n\tsendAndClose (header);\n }", "@Override\r\n\t\t\tpublic void onErrorResponse(String errorMessage) {\n\r\n\t\t\t}", "public void doError (int status, String message) {\n\tthis.statusCode = Integer.toString (status);\n\tHttpHeader header = responseHandler.getHeader (\"HTTP/1.0 400 Bad Request\");\n\tStringBuilder error = \n\t new StringBuilder (HtmlPage.getPageHeader (this, \"400 Bad Request\") +\n\t\t\t \"Unable to handle request:<br><b>\" + \n\t\t\t message +\n\t\t\t \"</b></body></html>\\n\");\n\theader.setContent (error.toString ());\n\tsendAndClose (header);\n }", "@Override\n\t\t\tpublic Class<? extends Page> getErrorPage()\n\t\t\t{\n\t\t\t\treturn super.getErrorPage();\n\t\t\t}", "public static void RomLoadErr(){\n\t\tloadError = true;\t\t\n\t}", "public ResourceNotFoundException(String msg) {\r\n\t\tsuper(msg);\r\n\t}", "protected void handleNotFound(final String target, final HttpServletRequest request,\n final HttpServletResponse response) throws IOException {\n response.sendError(SC_NOT_FOUND, \"target \" + target + \" not supported\");\n }", "@Override\n\t\tpublic void onFailure(HttpException error, String msg) {\n\t\t\t\n\t\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n //This code is executed if there is an error.\n System.out.println(error.toString());\n ProgressBar pb = (ProgressBar) findViewById(R.id.loading);\n pb.setVisibility(View.INVISIBLE);\n TextView rp = (TextView) findViewById(R.id.rply);\n rp.setText(\"network error\");\n }", "public void errorPage(String message) {\n\t\terrorPage(0, message, null);\n\t}", "public void error(String error)\n\t\t\t{\n\t\t\t\tsend(\"<error>\", false);\n\t\t\t\tsend(error, true);\n\t\t\t\tsend(\"</error>\", false);\n\t\t\t}", "void showError(String errorMessage);", "public void showLoadingError() {\n System.out.println(\"Duke has failed to load properly.\");\n }", "private void sendProcessingError(Throwable t, ServletResponse response) {\n String stackTrace = getStackTrace(t); \n \n if (stackTrace != null && !stackTrace.equals(\"\")) {\n try {\n response.setContentType(\"text/html\");\n PrintStream ps = new PrintStream(response.getOutputStream());\n PrintWriter pw = new PrintWriter(ps); \n pw.print(\"<html>\\n<head>\\n<title>Error</title>\\n</head>\\n<body>\\n\"); //NOI18N\n\n // PENDING! Localize this for next official release\n pw.print(\"<h1>We had an error converting the URL to HTTPS</h1>\\n<pre>\\n\"); \n pw.print(stackTrace); \n pw.print(\"</pre></body>\\n</html>\"); //NOI18N\n pw.close();\n ps.close();\n response.getOutputStream().close();\n } catch (Exception ex) {\n }\n } else {\n try {\n PrintStream ps = new PrintStream(response.getOutputStream());\n t.printStackTrace(ps);\n ps.close();\n response.getOutputStream().close();\n } catch (Exception ex) {\n }\n }\n }", "public NotFoundException() {\r\n super(Responses.notFound().build());\r\n }", "public void showError() {\n mapView.setVisibility(View.GONE);\n loadingLayout.setVisibility(View.GONE);\n errorLayout.setVisibility(View.VISIBLE);\n\n }", "abstract void setResponseErrorMsg(HttpServletResponse response, String msg) throws IOException;", "@Override\n public void onErrorResponse(VolleyError error) {\n Log.d(\"Error on Volley response\", error.toString());\n foodIDView.setText(\"Error on url, try again\");\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tresponse.getWriter().append(\"你找的资源不存在\");\n\t}", "public String getErrorPath() {\n\t\treturn \"/error\";\n\t}", "public static void invalidURL() {\r\n\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\talert.setTitle(\"Error!\");\r\n\t\talert.setHeaderText(\"\");\r\n\t\talert.setContentText(\"URL oder Datei konnte nicht geladen werden!\");\r\n\t\talert.showAndWait();\r\n\t}", "@RequestMapping(\"/uploadError\")\n public ModelAndView handleUploadError(Locale locale){\n ModelAndView modelAndView = new ModelAndView(\"/profile\");\n modelAndView.addObject(\"error\",messageSource.getMessage(\"image.file.too.big\",null,locale));\n return modelAndView;\n }", "@ExceptionHandler(IllegalArgumentException.class) //Tratando os paths/status que nao forem os que selecioanmos no porStauts.\n public String onError(){\n return \"redirect:/disciplina\";\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n request.setAttribute(\"error\", \"Se está intentando acceder sin pasar por el formulario de entrada\");\n request.getRequestDispatcher(\"JSP/error.jsp\").forward(request, response);\n }", "public static void m5846r() {\n if (f4669a != null) {\n f4669a.m12578a(\"webview_load_error\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"webview_load_error\"));\n }", "public void error();", "void displayLoadingErrorMessage();" ]
[ "0.6985027", "0.6687341", "0.6650605", "0.6575353", "0.6529488", "0.6468098", "0.6406094", "0.6367558", "0.6364432", "0.62872744", "0.6256946", "0.6193747", "0.61549836", "0.61088187", "0.61039394", "0.60887325", "0.6015626", "0.5975364", "0.5970233", "0.59558797", "0.5953315", "0.5926766", "0.58617806", "0.5845905", "0.5830148", "0.5830148", "0.5830148", "0.5830148", "0.5830148", "0.58234024", "0.5817081", "0.5800671", "0.57868165", "0.57631683", "0.57631683", "0.57631683", "0.57631683", "0.57631683", "0.57631683", "0.57631683", "0.57631683", "0.57631683", "0.57631683", "0.57631683", "0.5753764", "0.5730338", "0.5729293", "0.57194173", "0.5706633", "0.5706633", "0.5700516", "0.56970066", "0.5680425", "0.5677012", "0.56751174", "0.56546897", "0.5652392", "0.5633701", "0.56248647", "0.5615824", "0.56150377", "0.56085736", "0.56024754", "0.5589582", "0.55801445", "0.5576354", "0.5567361", "0.55582464", "0.55569947", "0.5541231", "0.55363786", "0.55280644", "0.55253583", "0.55252844", "0.5514262", "0.550559", "0.54902446", "0.54827726", "0.5478814", "0.547441", "0.5444388", "0.5434417", "0.5428972", "0.54222", "0.5412629", "0.5404508", "0.5389909", "0.53801125", "0.53769445", "0.5374827", "0.5372995", "0.53712994", "0.53712654", "0.5367897", "0.5364331", "0.5359354", "0.5356664", "0.53554165", "0.53523105", "0.5349401" ]
0.61453605
13
hard coded for displaying visted cookie count on visited.html
private void postHTMLDynamic(BufferedReader reader, int cnt) throws IOException { String htmlLine = reader.readLine(); while (htmlLine != null) { if(htmlLine.equals(VISITED_TEMPLATE)){ int indx = htmlLine.indexOf('X'); String tmp = htmlLine.substring(0, indx) + cnt + htmlLine.substring(indx+1); htmlLine = tmp; } out.println(htmlLine); htmlLine = reader.readLine(); } reader.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void printNumVisited()\r\n\t{\r\n\t\tSystem.out.println(\"\");\r\n\t\tfor (int i = 0; i < siteVisited; i++)\r\n\t\t\tSystem.out.println(webVisited[0][i] + \" visited \" + webVisited[1][i] + \" time(s)\");\r\n\t}", "public int getVisits() {\n return visits;\n }", "public String getCuredCount() {\n return curedCount;\n }", "public long getSessionCounter();", "public Integer getVisitCount() {\n return visitCount;\n }", "public Integer getVisitCount() {\n return visitCount;\n }", "public int getNumVisits() {\n return this.numVisits;\n }", "public int getTotalVisited(){\n return this.getSea().countVisited();\n }", "public void count() {\n APIlib.getInstance().addJSLine(jsBase + \".count();\");\n }", "public void setVisits(int visits) {\n this.visits = visits;\n }", "public void testListenersCountWithCookie () throws Exception {\n doTestListenersCount (true);\n }", "private void updateNumVisits(String url)\r\n\t{\r\n\t\tfor(int i = 0; i < siteVisited; i++)\r\n\t\t{\r\n\t\t\tif (webVisited[0][i].equals(url))\t\t\t\t\t\t\t\t\t//if the url is found in the array\r\n\t\t\t{\r\n\t\t\t\twebVisited[1][i] = (int)webVisited[1][i] + 1;\t\t\t\t\t//increment the number of times user visited the site\r\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//break out of the loop\r\n\t\t\t}\r\n\t\t}\r\n\t}", "int getSessionCount();", "public Integer getDayVisitCount() {\n return dayVisitCount;\n }", "int getAccessCounterForSession();", "public PageVisits() {\n LOG.info(\"=========================================\");\n LOG.info(\"Page Visit Counter is being created\");\n LOG.info(\"=========================================\");\n }", "private void generateConnCookie(ActionRequest req) {\n\t\tSBUserRole role = (SBUserRole) req.getSession().getAttribute(Constants.ROLE_DATA);\n\t\tint count = getMemeberConnectionCount(RezDoxUtils.getMemberId(req), role != null ? role.getRoleId() : \"\");\n\t\tlog.debug(\"found \" +count+ \" connections\");\n\t\t//set the total in a cookie. This may be excessive for repeat calls to the rewards page, but ensures cached data is flushed\n\t\tCookieUtil.add(req, CONNECTION_COOKIE, String.valueOf(count), \"/\", -1);\n\t}", "public static void displayMsg() {\n\t\tSystem.out.println(\"Welcome Visit Count \"+count++);\n\t}", "int getSeenInfoCount();", "private void displaySitesCount() {\n TextView titleText = findViewById(R.id.bathing_title);\n CharSequence bathText = sitesCount + \" \" + getResources().getString(R.string.bathing_sites);\n titleText.setText(bathText);\n }", "public int count() {\n return this.visitors.size();\n }", "public void setVisitCount(Integer visitCount) {\n this.visitCount = visitCount;\n }", "public void eatCookie(View view) {\n // TODO: Find a reference to the ImageView in the layout. Change the image.\n ImageView imageView = findViewById(R.id.android_cookie_image_view);\n imageView.setImageResource(R.drawable.after_cookie);\n // TODO: Find a reference to the TextView in the layout. Change the text.\n TextView textView = findViewById(R.id.status_text_view);\n textView.setText(R.string.cookie_im_so_full);\n }", "public int getVitesse(){\n\t \treturn vitesse;\n\t }", "private int storeCookies(URLConnection con) {\n\t\tString headerName = null;\n\n\t\tint totalNewCookies = 0;\n\n\t\tfor (int i = 1; (headerName = con.getHeaderFieldKey(i)) != null; i++) if (headerName.equals(\"Set-Cookie\")) totalNewCookies += addCookie(con.getHeaderField(i)); //add to the total the number of new cookies found by add cookie for each cookie\n\n\t\treturn totalNewCookies;\n\t}", "@Override\n\tpublic int cartCount(String id) {\n\t\treturn cookie.cartCount(id);\n\t}", "int getCachedCount();", "public abstract int getNumSessions();", "long getTotalAcceptCount();", "public int numberOfOpenSites(){ return openSites; }", "void countTagStatistics(){\t\n\t\thtmlParsed.traverse(new NodeVisitor() {\n\t\t\tdouble count = 0.;\n\t\t\tString tagName = \"\";\n\t\t public void head(Node node, int depth) {\n\t\t \tif (node instanceof Element) {\n\t\t \t\ttagName = ((Element) node).tagName();\n\t\t \t\tif(countTags.containsKey(tagName)){\n\t\t \t\t\tcount = countTags.get(tagName) + 1.;\n\t\t \t\t\tcountTags.put(tagName, count);\n\t\t \t\t}\n\t\t \t\telse if(tagName.matches(\"^[a-zA-Z:]+\"))\n\t\t \t\t\t\tcountTags.put(tagName, 1.);\n\t\t \t}\n\t\t }\n\t\t public void tail(Node node, int depth) {\n\t\t }\n\t\t});\t\n\t\t\t\n\t}", "private void updateSessionCounter(HttpSessionEvent httpSessionEvent){\n httpSessionEvent.getSession().getServletContext()\r\n .setAttribute(\"activeSession\", counter.get());\r\n LOG.info(\"Total active session are {} \",counter.get());\r\n }", "public int numberOfOpenSites() {\n \treturn num;\r\n }", "@Override\r\n\tpublic Integer getActivity_logins_cnt() {\n\t\treturn super.getActivity_logins_cnt();\r\n\t}", "void setAccessCounterForSession(int cnt);", "int getUserCount();", "int getUserCount();", "int getCazuriCount();", "public StatusPage countHistoryEntries ( ) throws InterruptedException {\n wait.until ( ExpectedConditions.elementToBeClickable ( uiHistory ) );\n wait.until ( ExpectedConditions.visibilityOf ( uiHistory ) );\n Thread.sleep ( 7000 );\n uiHistory.click ();\n count2 = getSizeHistoryEntries ();\n System.out.println ( count2 );\n return new StatusPage ( this.driver );\n\n }", "public String getCount() {\n if(count != null)\n return \"浏览: \" + count + \"次\";\n else\n return \"\";\n }", "String getLoginapihitcount();", "@Override\r\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n HttpSession session = req.getSession(true);\r\n //get session creation time\r\n Date createTime = new Date(session.getCreationTime());\r\n //get last access time of this web page \r\n Date lastAccessTime = new Date(session.getLastAccessedTime());\r\n\r\n String title = \"Welcome back to my website\";\r\n Integer visitCount = new Integer(0);\r\n String VistCountKey = new String(\"visitCount\");\r\n String userIDKey = new String(\"userID\");\r\n String userID = new String(\"ABCD\");\r\n //check if this is new comer on your web page \r\n if (session.isNew()) {\r\n title = \"welcoem to my website\";\r\n \r\n //set key and value like Cookie(key, value)\r\n session.setAttribute(userIDKey, userID);\r\n } else {\r\n visitCount = (Integer) session.getAttribute(VistCountKey);\r\n visitCount = visitCount + 1;\r\n userID = (String) session.getAttribute(userIDKey);\r\n }\r\n session.setAttribute(VistCountKey, visitCount);\r\n\r\n resp.setContentType(\"text/html\");\r\n PrintWriter out = resp.getWriter();\r\n out.println(\"<!DOCTYPE html>\");\r\n out.println(\"<html>\");\r\n out.println(\"<head>\"\r\n + \"<link href=\\\"resource/css/bootstrap.css\\\" rel=\\\"stylesheet\\\">\");\r\n out.println(\"<title>\" + title + \"</title>\");\r\n out.println(\"</head>\");\r\n out.println(\"<body>\");\r\n out.println(\"<h1 align = \\\"center\\\" >\" + title + \"</h1>\\n\");\r\n out.println(\"<h2 align = \\\"center\\\" > Session Information </h2>\\n\");\r\n out.println(\"<table align =\\\"center\\\" class=\\\"table table-bordered table-hover\\\">\\n\"\r\n + \"<tr>\"\r\n + \"<th>Session Info</th><th>value</th></tr>\\n\"\r\n + \"</tr>\\n\"\r\n + \"<tr>\\n\"\r\n + \"<td>id</td>\"\r\n + \"<td>\" + session.getId() + \"</td>\"\r\n + \"</tr>\\n\"\r\n + \"<tr>\\n\"\r\n + \"<td>Creation time</td>\"\r\n + \"<td>\" + createTime + \"</td>\"\r\n + \"</tr>\\n\"\r\n + \"<tr>\\n\"\r\n + \"<td>Time of last access</td>\"\r\n + \"<td>\" + lastAccessTime + \"</td>\"\r\n + \"</tr>\\n\"\r\n + \"<tr>\\n\"\r\n + \"<td>ID</td>\"\r\n + \"<td>\" + userID + \"</td>\"\r\n + \"</tr>\\n\"\r\n + \"<tr>\\n\"\r\n + \"<td>Number of visits</td>\"\r\n + \"<td>\" + visitCount + \"</td>\"\r\n + \"</tr>\\n\"\r\n + \"</tbale>\");\r\n out.println(\"<body>\");\r\n out.println(\"</body>\");\r\n out.println(\"</html>\");\r\n }", "public static void viewRemainingVaccinations() {\n\r\n System.out.println(\"Number of remaining vaccinations - \" + vaccines);\r\n }", "private int visitedNetworksCount() {\n final HashSet<String> visitedNetworksSet = new HashSet<>(mVisitedNetworks);\n return visitedNetworksSet.size();\n }", "void incrementAccessCounterForSession();", "public int numberOfOpenSites() {\n return count;\n }", "public void updateCount(){\n TextView newCoupons = (TextView) findViewById(R.id.counter);\n //couponsCount.setText(\"Pocet pouzitych kuponov je: \" + SharedPreferencesManager.getUsedCoupons());\n if(SharedPreferencesManager.getNew()>0) {\n newCoupons.setVisibility(View.VISIBLE);\n newCoupons.setText(String.valueOf(SharedPreferencesManager.getNew()));\n }\n else {\n newCoupons.setVisibility(View.GONE);\n }\n }", "int getNoticeListCount();", "StaticVariable(){\n count++;//incrementing the value of static variable\n System.out.println(count);\n }", "public int numberOfOpenSites(){\n return numOpenSites;\n }", "private void postHTML(File index, String cookie, boolean display) throws IOException {\n String my_cookie = null;\n if(cookie != null) {\n if (cookie.indexOf(\" \") != -1) {\n String[] cookies = cookie.split(\" \");\n for (String st : cookies) {\n if (st.length() > MY_COOKIE_HEADER.length()) {\n if (st.substring(0, MY_COOKIE_HEADER.length()).equals(MY_COOKIE_HEADER)) {\n my_cookie = st;\n break;\n }\n }\n }\n }\n }\n BufferedReader reader = new BufferedReader(new FileReader(index));\n out.println(OK);\n out.println(htmlType);\n out.println(closed);\n out.println(\"Content-Length: \" + index.length());\n\n //deal with cookie\n int cookie_cnt;\n if(my_cookie == null){\n out.println(\"Set-Cookie: 325_p1_visit_cnt=1\");\n cookie_cnt = 1;\n } else{\n int indx = my_cookie.indexOf('=');\n\n String cnt;\n if(my_cookie.charAt(my_cookie.length()-1) == ';'){\n cnt = my_cookie.substring(indx+1, my_cookie.length()-1);\n } else{\n cnt = my_cookie.substring(indx+1);\n }\n cookie_cnt = (Integer.parseInt(cnt) + 1);\n String incr_cnt = Integer.toString(cookie_cnt);\n String incr_cookie = \"Set-Cookie: 325_p1_visit_cnt=\" + incr_cnt;\n out.println(incr_cookie);\n }\n\n out.println(ENDLINE);\n if(display){\n postHTMLDynamic(reader, cookie_cnt);\n } else {\n postHTMLStatic(reader);\n }\n }", "public void setCuredCount(String curedCount) {\n this.curedCount = curedCount;\n }", "String getLoginapifailhitcount();", "public void setCounter(int value) { \n\t\tthis.count = value;\n\t}", "public static int getCount6(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n int c6= prefs.getInt(saveCounter6, SaveCounter6);\n\n return c6;\n }", "public int numberOfOpenSites()\r\n { return openSites; }", "public void UpNumberOfVisitedNodes() {\n NumberOfVisitedNodes++;\n }", "public static int getCount3(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n int c3= prefs.getInt(saveCounter3, SaveCounter3);\n\n return c3;\n }", "String getLoginapisuccessfulhitcount();", "public void countAcc()\n {\n \tint count=0;\n response=RestAssured.get(\"http://18.222.188.206:3333/accounts\");\n ID=response.jsonPath().getList(\"id\");\n for(int i=0;i<=ID.size();i++)\n {\n count++;\n }\n System.out.println(\"The total number of accounts present in this page=\"+count);\n }", "public int getVisit() {\n\t\treturn visit;\n\t}", "public static int getCounter() {return counter;}", "void updateFrequencyCount() {\n //Always increments by 1 so there is no need for a parameter to specify a number\n this.count++;\n }", "public void addCount()\n {\n \tcount++;\n }", "@Test\n\tpublic void testDetailedCookies() {\n\t\tResponse response = get(\"http://jsonplaceholder.typicode.com/photos\");\n\t\t\n\t\tCookie o = response.getDetailedCookie(\"__cfduid\");\n\t\t\n\t\tSystem.out.println(\"Detailed: \"+o.hasExpiryDate());\n\t\tSystem.out.println(\"Detailed: \"+o.getExpiryDate());\n\t\tSystem.out.println(\"Detailed: \"+o.hasValue());\n\t}", "public int getLiveCount() {\n return liveCount;\n }", "public int showCounts() {\n return showCount;\n }", "public int numberOfOpenSites(){\n\t\treturn numOpen;\n\t}", "Cookie(){\n number = 0;\n bakeTemp = 0;\n bakeTime = 0;\n isReady = false;\n\n }", "private void getNodesCount(HttpServletRequest request, HttpServletResponse response) throws IOException {\n int countNodes = SimApi.getNodesCount();\n response.getWriter().write(Integer.toString(countNodes));\n }", "public int numberOfOpenSites() {\n return 0;\n }", "public int numberOfOpenSites() {\n return (openCount);\n }", "public static int totalClicks() {\n return counterClicks;\n }", "@Override\n\tpublic void addURLVisitCount(String shortUrl){\t\t\n\t\t \t\t\t\t \t\t\n\t\t \t\tint visitCount = getVisitCountList(shortUrl).getVisitCount();\t\t\n\t\t \t\tvisitCount++;\t\t\n\t\t \t\tString SQL = \"UPDATE GlobalUrlDB SET visitCount = (?) WHERE shortUrl = (?)\";\t\t\n\t\t \t\tObject[] params = new Object[] { visitCount, shortUrl };\t\t\n\t\t \t\ttry{\t\t\n\t\t \t\t\tjdbcTemplateObject.update( SQL, params);\t\t\n\t\t \t\t}\t\t\n\t\t \t\tcatch(Exception e){\t\t\n\t\t \t\t\te.printStackTrace();\t\t\n\t\t \t\t}\t\t\n\t\t \t\t\n\t\t \t}", "public void incPagesCrawled() {\n pagesCrawled++;\n }", "public int getCountAtSessionStart() {\r\n return countAtSessionStart;\r\n }", "@Override\n public String toString() {\n if (filterConfig == null) {\n return (\"SiteHitCounter()\");\n }\n StringBuffer sb = new StringBuffer(\"SiteHitCounter(\");\n sb.append(filterConfig);\n sb.append(\")\");\n return (sb.toString());\n }", "public void incrMetaCacheNumClearServer() {\n metaCacheNumClearServer.inc();\n }", "public static void main(String[] args) \r\n\t{\r\n\t\tMap<String, String> voting=new HashMap<String, String>();\r\n\t\tvoting.put(\"101\", \"BJP\");\r\n\t\tvoting.put(\"102\", \"ShivSena\");\r\n\t\tvoting.put(\"103\", \"NCP\");\r\n\t\tvoting.put(\"104\", \"Congress\");\r\n\t\tvoting.put(\"105\", \"Other\");\r\n\t\tvoting.put(\"106\", \"BJP\");\r\n\t\tvoting.put(\"107\", \"ShivSena\");\r\n\t\tvoting.put(\"108\", \"NCP\");\r\n\t\tvoting.put(\"109\", \"Congress\");\r\n\t\tvoting.put(\"110\", \"Other\");\r\n\t\tvoting.put(\"111\", \"BJP\");\r\n\t\tvoting.put(\"112\", \"ShivSena\");\r\n\t\tvoting.put(\"113\", \"NCP\");\r\n\t\tvoting.put(\"114\", \"Congress\");\r\n\t\tvoting.put(\"115\", \"Other\");\r\n\t\tvoting.put(\"116\", \"Other\");\r\n\t\tvoting.put(\"117\", \"Other\");\r\n\t\tvoting.put(\"118\", \"BJP\");\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(voting);\r\n\t\t\r\n\t\tMap<String, Integer> countVoting=new HashMap();\r\n\t\t\r\n\t\tfor(Map.Entry<String, String> mapitr:voting.entrySet())\r\n\t\t{\r\n\t\t\t//System.out.println(mapitr.getValue());\r\n\t\t\t\r\n\t\t\tint count=1;\r\n\t\t\t\r\n\t\t\tif(countVoting.containsKey(mapitr.getValue()))\r\n\t\t\t{\r\n\t\t\t\tcount=countVoting.get(mapitr.getValue());\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tcountVoting.put(mapitr.getValue(),count);\r\n\t\t\t//System.out.println(countVoting);\r\n\t\t}\r\n\t\tSystem.out.println(countVoting);\r\n\t\t\r\n\t}", "manExp15(){ \r\n\r\n\tcount++; \r\n\r\n\tSystem.out.println(count); \r\n\r\n\t}", "public void can_counter()\n {\n candidate_count=0;\n for (HashMap.Entry<String,Candidate> set : allCandidates.entrySet())\n {\n candidate_count++;\n }\n }", "public int numberOfOpenSites() {\n return numOpen;\n }", "Counter getDeskMembersCounts(String userID) throws GAException;", "public int getSeenInfoCount() {\n return instance.getSeenInfoCount();\n }", "public String getSureNzdCnt() {\n return sureNzdCnt;\n }", "public int numberOfOpenSites() {\n return NOpen;\r\n }", "int getInfoCount();", "int getInfoCount();", "int getInfoCount();", "public int getCHVNumber()\r\n {\r\n return number_of_CHV;\r\n }", "int getAccessCounter();", "public static int getCount5(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n int c5= prefs.getInt(saveCounter5, SaveCounter5);\n\n return c5;\n }", "@Override\n public int getVisasCountForTheClient(int clientId) throws SQLException {\n return dao.getVisasCountForTheClient(clientId);\n }", "public int getSeenInfoCount() {\n return seenInfo_.size();\n }", "private String createCookies() {\n\n String bengLoginID = uid + \"\";\n String timeStr = MyApplication.getInstance().authorTime;\n ToastUtil.toast(timeStr + \"\");\n String cookes = MyApplication.getInstance().bengLoginId + \"; \" + MyApplication.getInstance().userHit + \"; \" + MyApplication.getInstance().authorID + \"; \" + timeStr + \"; \" + MyApplication.getInstance().phpSessid;\n ToastUtil.toast(cookes);\n return cookes;\n\n }", "private void displayCount() {\n\t\tlabel.setText(String.format(\"%2d\", game.getCount()));\n\t}", "static void doCount(){\n\t\tStaticDemo st=new StaticDemo();\n\t\t st.count++;\n\t\t System.out.println(\"Count is:\"+st.count);\n\t }", "public int getNumberOfCredits() {\n return numberOfCredits;\n }", "static IterV<String, Integer> counter() {\n return cont(count.f(0));\n }", "public static void updateCount(String url) {\n if(sites.isEmpty()) {\n sites.add(new SiteStats(url, 1));\n } else {\n //access via new for-loop\n for(Object object : sites) {\n SiteStats element = (SiteStats) object;\n if ((element.getUrl().equalsIgnoreCase(url))) {\n element.setNumVisits(element.getNumVisits() + 1);\n return;\n }\n }\n sites.add(new SiteStats(url, 1));\n }\n }", "public int numberOfOpenSites() {\n return numOpen;\n }" ]
[ "0.6388506", "0.61576617", "0.6043217", "0.594862", "0.59199053", "0.59199053", "0.5896673", "0.58843464", "0.5808541", "0.5799504", "0.57392746", "0.5704308", "0.56452006", "0.56254804", "0.5618472", "0.55993533", "0.5581108", "0.5552131", "0.55418646", "0.5518676", "0.54926074", "0.546964", "0.54313123", "0.5427282", "0.5413267", "0.5399404", "0.53902406", "0.5384584", "0.53759706", "0.5344948", "0.53336746", "0.53184867", "0.5318311", "0.5293162", "0.5278739", "0.5267098", "0.5267098", "0.5259368", "0.5248913", "0.52249247", "0.52186966", "0.5209058", "0.52080864", "0.5207089", "0.5171601", "0.5171253", "0.5160706", "0.514493", "0.5141536", "0.5132645", "0.5124632", "0.51103574", "0.5104647", "0.5103855", "0.5094298", "0.5087563", "0.5081447", "0.5074208", "0.5069036", "0.5060438", "0.50510865", "0.50407255", "0.5034921", "0.50325495", "0.5027885", "0.5017601", "0.5017004", "0.50127196", "0.50126344", "0.501192", "0.5010132", "0.5007259", "0.5004379", "0.500108", "0.50003225", "0.4998364", "0.4996798", "0.49967217", "0.49962467", "0.4995014", "0.4985561", "0.4977765", "0.4977604", "0.49764577", "0.49669245", "0.4960167", "0.4959814", "0.4959814", "0.4959814", "0.49556062", "0.49538147", "0.49462864", "0.49367112", "0.49349383", "0.49290085", "0.49275476", "0.49205565", "0.49181095", "0.49176908", "0.49158427", "0.48976213" ]
0.0
-1
parse get request header
private String processGetRequestHeader(String rq){ String ret = ""; int i = 4; if(rq.length() < i){ return null; } while(rq.charAt(i) != ' '){ ret += rq.charAt(i); i++; } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getHeader();", "public void parseHeader()\n {\n\n Hashtable table = new Hashtable();\n String[] lines = Utilities.splitString(header, \"\\r\\n\"); //Break everything into lines\n String[] line1 = Utilities.splitString(header, \" \"); //Break the 1st header line Ex: GET / HTTP/1.1\n method = line1[0].trim();\n file = line1[1].trim();\n Utilities.debugLine(\"WebServer.parseHeader(): \" + lines[0], DEBUG);\n\n //For the remainder of the headers, parse the requestFields.\n for (int i = 1; i < lines.length - 1; i++)\n {\n String[] tempLine = Utilities.splitStringOnce(lines[i], \":\");\n table.put(tempLine[0].trim(), tempLine[1].trim());\n }\n headerFields = table;\n }", "com.didiyun.base.v1.Header getHeader();", "Headers getHeaders();", "Map<String, String> getRequestHeaders();", "public Header[] getRequestHeaders();", "public String getRequestHeader(String key)\n\t{\n\t\treturn this.requestHeader.getOrDefault(key, \"\");\n\t}", "private String readHeader(RoutingContext ctx) {\n String tok = ctx.request().getHeader(XOkapiHeaders.TOKEN);\n if (tok != null && ! tok.isEmpty()) {\n return tok;\n }\n return null;\n }", "String getResponseHeader();", "public String getHeader();", "String[] getHeader(String key);", "private String getAuthorizationHeaderValue(HttpRequest request){\n\t\t String authorizationValue = \"\";\n\t\t List<String> authorizationList = new ArrayList<>(0);\t\t\n\t\t \n\t\t HttpHeaders headers = request.getHttpHeaders();\n\t\t for(String headerName : headers.getRequestHeaders().keySet()){\n\t\t\t if(TokenConstants.AUTHORIZATION_HEADER_NAME.equalsIgnoreCase(headerName)){\n\t\t\t\t authorizationList = headers.getRequestHeader(headerName);\n\t\t\t\t break;\n\t\t\t }\n\t\t }\n\n\t\t if(CollectionUtils.isNotEmpty(authorizationList)) {\n\t\t\t authorizationValue = authorizationList.get(0);\n\t\t }\n\t\t return authorizationValue;\n\t}", "String getHeader(HttpServletRequest request, String name) throws ValidationException;", "com.didiyun.base.v1.HeaderOrBuilder getHeaderOrBuilder();", "Map<String, String> getHeaders();", "RequestHeaders headers();", "String getHeader(String headerName);", "Map<String, List<String>> getHeaders();", "private static String getHTTPHeader(PortletRequest request, String name) {\n String value = null;\n String portalInfo = request.getPortalContext().getPortalInfo()\n .toLowerCase();\n if (portalInfo.contains(\"liferay\")) {\n value = getLiferayHTTPHeader(request, name);\n } else if (portalInfo.contains(\"gatein\")) {\n value = getGateInHTTPHeader(request, name);\n }\n return value;\n }", "public static String parseRequest(String request) {\r\n String parsedSoFar = \"\";\r\n String file = \"\";\r\n int fileSize = 0;\r\n String s = null;\r\n \r\n if (request.length() < 14) {\r\n return s;\r\n }\r\n \t\r\n if (!request.substring(0, 4).equals(\"GET \")) {\r\n return s;\r\n }\r\n \r\n parsedSoFar = request.substring(4, request.length());\r\n \t\r\n int counter = 0;\r\n \r\n while (parsedSoFar.charAt(counter) != ' ') {\r\n counter++;\r\n }\r\n \r\n file = parsedSoFar.substring(0, counter);\r\n \r\n parsedSoFar = parsedSoFar.substring(file.length() + 1, parsedSoFar.length()).trim();\r\n \r\n if (!parsedSoFar.equals(\"HTTP/1.0\")) {\r\n return s;\r\n }\r\n \r\n return file;\r\n }", "public Header parseHeader(CharArrayBuffer buffer) throws ParseException {\n/* 445 */ return (Header)new BufferedHeader(buffer);\n/* */ }", "static Headers readHeaders(InputStream in) throws IOException {\n\t\tHeaders headers = new Headers();\n\t\tString line;\n\t\twhile (!(line = readLine(in, false)).isEmpty()) {\n\t\t\tString[] parts = line.split(\":\", 2);\n\t\t\tif (parts.length != 2) {\n\t\t\t\tthrow new WebException(StatusCode.BAD_REQUEST, \"invalid request header: \" + line);\n\t\t\t}\n\t\t\theaders.add(parts[0], parts[1].trim());\n\t\t}\n\t\treturn headers;\n\t}", "String getRequest();", "public static ChallengeRequest parseRequest(String header) {\r\n ChallengeRequest result = null;\r\n \r\n if (header != null) {\r\n int space = header.indexOf(' ');\r\n \r\n if (space != -1) {\r\n String scheme = header.substring(0, space);\r\n String realm = header.substring(space + 1);\r\n int equals = realm.indexOf('=');\r\n String realmValue = realm.substring(equals + 2,\r\n realm.length() - 1);\r\n result = new ChallengeRequest(new ChallengeScheme(\"HTTP_\"\r\n + scheme, scheme), realmValue);\r\n }\r\n }\r\n \r\n return result;\r\n }", "@Override\n public String getHeaderField(String name) {\n return jarUrlConnection.getHeaderField(name);\n }", "private String findRequestHeaderValue( String name, IHTTPSession session ) {\n if ( StringUtil.isNotBlank( name ) && session != null && session.getRequestHeaders() != null ) {\n final Set<Map.Entry<String, String>> entries = session.getRequestHeaders().entrySet();\n for ( Map.Entry<String, String> header : entries ) {\n if ( name.equalsIgnoreCase( header.getKey() ) )\n return header.getValue();\n }\n }\n return null;\n }", "public abstract HttpHeaders headers();", "private void getRequest() throws IOException{\n\n\t\ttry {\n\n String input = socketFunctions.receiveText(connection);\n\n this.request = new MDFSProtocolHeader(input);\n\n\n\t\t\tVerbose.print(\"Parsing request\", this, Config.getInt(\"verbose\")-6);\n\t\t\t\n\t\t\tsession.setRequest(this.request);\n\t\t\tsession.parseRequest();\n\t\t\t\n\t\t\tVerbose.print(\"Parsing done.\", this, Config.getInt(\"verbose\")-6);\n\t\t\t\n\t\t} catch (JSONException e) {\n\n session.setResponse(MDFSProtocolHeader.createErrorHeader(Stage.RESPONSE, null, null, \"Header received was not in JSON format.\"));\n\n\t\t} \t\t\n\t}", "public static BaseReq extractHeader(BaseReq req) {\r\n if (req == null) {\r\n return null;\r\n }\r\n BaseReq header = new BaseReq();\r\n header.setClientId(req.getClientId());\r\n header.setRequestDateTime(req.getRequestDateTime());\r\n header.setRequestId(req.getRequestId());\r\n header.setToken(req.getToken());\r\n return header;\r\n }", "private HTTPHeaderEntry extractHeader(String headerStr) {\n \n \t\tHTTPHeaderEntry headerEntry = null;\n \t\tString[] each = headerStr.split( \": \" );\n \t\tif ( each[0].equals( HeaderEntry.CONTENT_TYPE.toString() ) ) {\n \t\t\theaderEntry = new HTTPHeaderEntry( HeaderEntry.CONTENT_TYPE, each[1] );\n \t\t}\n \t\telse if ( each[0].equals( HeaderEntry.DATE.toString() ) ) {\n \t\t\theaderEntry = new HTTPHeaderEntry( HeaderEntry.DATE, each[1] );\n \t\t}\n \t\telse if ( each[0].equals( ResponseHeaderEntry.CONTENT_LENGTH.toString() ) ) {\n \t\t\theaderEntry = new HTTPHeaderEntry( ResponseHeaderEntry.CONTENT_LENGTH, Integer.parseInt( each[1] ) );\n \t\t}\n \n \t\theader.add( headerEntry );\n \t\treturn headerEntry;\n \t}", "public HashMap<String, String> getHeader() {\n HashMap<String, String> header = new HashMap<String, String>();\n//\t\theader.put(\"Content-Type\", pref.getString(\"application/json\", \"application/json\"));\n /*header.put(\"authId\", pref.getString(KEY_USER_ID, KEY_USER_ID));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, KEY_AUTH_TOKEN));*/\n\n\n header.put(\"authId\", pref.getString(KEY_USER_ID, \"1\"));\n header.put(\"authToken\", pref.getString(KEY_AUTH_TOKEN, \"s4nbp5FibJpfEY9q\"));\n\n return header;\n }", "@Override\n\tpublic Map<String, String> getHeader() {\n\t\treturn this.header;\n\t}", "private void decodeHeader(BufferedReader in, Map<String, String> pre,\n\t\t\t\tMap<String, String> parms, Map<String, String> headers) throws ResponseException {\n\t\t\ttry {\n\t\t\t\t// Read the request line\n\t\t\t\tString inLine = in.readLine();\n\t\t\t\tif (inLine == null) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tStringTokenizer st = new StringTokenizer(inLine);\n\t\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\t\tthrow new ResponseException(Response.Status.BAD_REQUEST,\n\t\t\t\t\t\t\t\"BAD REQUEST: Syntax error. Usage: GET /example/file.html\");\n\t\t\t\t}\n\n\t\t\t\tpre.put(\"method\", st.nextToken());\n\n\t\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\t\tthrow new ResponseException(Response.Status.BAD_REQUEST,\n\t\t\t\t\t\t\t\"BAD REQUEST: Missing URI. Usage: GET /example/file.html\");\n\t\t\t\t}\n\n\t\t\t\tString uri = st.nextToken();\n\n\t\t\t\t// Decode parameters from the URI\n\t\t\t\tint qmi = uri.indexOf('?');\n\t\t\t\tif (qmi >= 0) {\n\t\t\t\t\tdecodeParms(uri.substring(qmi + 1), parms);\n\t\t\t\t\turi = decodePercent(uri.substring(0, qmi));\n\t\t\t\t} else {\n\t\t\t\t\turi = decodePercent(uri);\n\t\t\t\t}\n\n\t\t\t\t// If there's another token, its protocol version,\n\t\t\t\t// followed by HTTP headers.\n\t\t\t\t// NOTE: this now forces header names lower case since they are\n\t\t\t\t// case insensitive and vary by client.\n\t\t\t\tif (st.hasMoreTokens()) {\n\t\t\t\t\tprotocolVersion = st.nextToken();\n\t\t\t\t} else {\n\t\t\t\t\tprotocolVersion = \"HTTP/1.1\";\n\t\t\t\t\tNanoHTTPDSingleFile.LOG.log(Level.FINE,\n\t\t\t\t\t\t\t\"no protocol version specified, strange. Assuming HTTP/1.1.\");\n\t\t\t\t}\n\t\t\t\tString line = in.readLine();\n\t\t\t\twhile (line != null && !line.trim().isEmpty()) {\n\t\t\t\t\tint p = line.indexOf(':');\n\t\t\t\t\tif (p >= 0) {\n\t\t\t\t\t\theaders.put(line.substring(0, p).trim().toLowerCase(Locale.US), line\n\t\t\t\t\t\t\t\t.substring(p + 1).trim());\n\t\t\t\t\t}\n\t\t\t\t\tline = in.readLine();\n\t\t\t\t}\n\n\t\t\t\tpre.put(\"uri\", uri);\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tthrow new ResponseException(Response.Status.INTERNAL_ERROR,\n\t\t\t\t\t\t\"SERVER INTERNAL ERROR: IOException: \" + ioe.getMessage(), ioe);\n\t\t\t}\n\t\t}", "private Header[] requestHeadMaker() {\n\t\tHeader[] header = {\n\t\t\t\tnew BasicHeader(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36\")\n\t\t\t\t//new BasicHeader(HttpHeaders.USER_AGENT, \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36\")\n\t\t\t, new BasicHeader(\"Accpet-Language\", \"ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7,ja;q=0.6\")\n\t\t\t, new BasicHeader(\"Accept-Charset\", \"application/x-www-form-urlencoded; charset=UTF-8\")\n\t\t\t, new BasicHeader(\"Origin\", \"https://developer.riotgames.com\")\n\t\t\t, //new BasicHeader(\"X-Riot-Token\", riotApiKey)\n\t\t};\n\t\treturn header;\n\t}", "@Test\n\tprivate void get_all_headers() {\n\t\tRestAssured.baseURI = \"https://reqres.in\";\n\t\tRequestSpecification httpRequest = RestAssured.given();\n\t\tResponse response = httpRequest.request(Method.GET, \"/api/users?page=2\");\n\t\tHeaders headers = response.getHeaders();\n\t\tfor (Header header : headers) {\n\t\t\tSystem.out.println(header.getName() + \" \\t : \" + header.getValue());\n\t\t}\n\t}", "@Override\n\tpublic FetchResult fetch(Request request) {\n\t\tString header = request.getHeader(HEADER_AUTHORIZATION);\n\t\tMatcher matcher = REGEXP_AUTHORIZATION.matcher(header);\n\t\tif (!matcher.find()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\"parse() method was called when match() result was false.\");\n\t\t}\n\t\tString token = matcher.group(2);\n\t\tMap<String, String> params = new HashMap<String, String>();\n\t\tint end = matcher.end();\n\t\tif (header.length() != end) {\n\t\t\theader = header.substring(end);\n\t\t\theader = REGEXP_TRIM.matcher(header).replaceFirst(\"\");\n\t\t\tString[] expList = REGEXP_DIV_COMMA.split(header);\n\t\t\tfor (String exp : expList) {\n\t\t\t\tString[] keyValue = exp.split(\"=\", 2);\n\t\t\t\tString value = keyValue[1].replaceFirst(\"^\\\"\", \"\");\n\t\t\t\tvalue = value.replaceFirst(\"\\\"$\", \"\");\n\t\t\t\tparams.put(keyValue[0], Util.decodeParam(value));\n\t\t\t}\n\t\t}\n\t\treturn new FetchResult(token, params);\n\t}", "public void parseHeader() {\n\t\tthis.release = (Integer) this.headerData.get(0);\n\t\tthis.endian = (ByteOrder) this.headerData.get(1);\n\t\tthis.K = (Short) this.headerData.get(2);\n\t\tthis.datasetLabel = (String) this.headerData.get(4);\n\t\tthis.datasetTimeStamp = (String) this.headerData.get(5);\n\t\tthis.mapOffset = (Integer) this.headerData.get(6);\n\t}", "public List<String> getHeader(String key) {\n if (this.mResponseHeaders == null){\n this.mResponseHeaders = mConnection.getHeaderFields();\n }\n return this.mResponseHeaders.get(key);\n }", "public VCFHeader getHeader();", "public String[] getHeader(String name) throws MessagingException {\n/* 363 */ if (this.headers == null)\n/* 364 */ loadHeaders(); \n/* 365 */ return this.headers.getHeader(name);\n/* */ }", "public Map<String, String> getRequestHeaders(HttpServletRequest request) {\n Map<String, String> headers = new HashMap<String, String>();\n\n if (request == null)\n return headers;\n\n Enumeration headerNames = request.getHeaderNames();\n while (headerNames.hasMoreElements()) {\n String headerName = (String) headerNames.nextElement();\n String headerVal = request.getHeader(headerName);\n\n headers.put(headerName, headerVal);\n }\n\n\n return headers;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return httpClientRequest.getHeaders();\n }", "public String getHeaderField(String paramString) {\n/* 270 */ return this.delegate.getHeaderField(paramString);\n/* */ }", "@Test\n public void getRequest1() {\n str = METHOD_GET + \"/JavaPower.gif \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": www.devresource.org\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n \"Range-Unit: 3388 | 1024\";\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/JavaPower.gif\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(\"Range-Unit\"), \"3388 | 1024\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "public Header getHeaderByKey(String key);", "@Override\n public String getHeader(String name) {\n if (name.equalsIgnoreCase(\"Authorization\")) {\n return getAuthorizationHeader();\n } else {\n return super.getHeader(name);\n }\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n //params.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n params.put(\"Authorization\", appUtil.getPrefrence(\"token_type\")+\" \"+appUtil.getPrefrence(\"access_token\"));\n return params;\n }", "public String getResponseHeader(String key)\n\t{\n\t\treturn this.responseHeader.getOrDefault(key, \"\");\n\t}", "@Override\n public Enumeration<String> getHeaders(String name) {\n if (name.equalsIgnoreCase(\"Authorization\")) {\n return Collections.enumeration(Arrays.asList(getHeader(name)));\n } else {\n return super.getHeaders(name);\n }\n }", "public void getRequest_withHeader_QueryParms() {\n apiUtil = new APIUtil();\n // As this is an API call , we are not setting up any base url but defining the individual calls\n apiUtil.setBaseURI(configurationReader.get(\"BaseURL\"));\n //This is used to validate the get call protected with basic authentication mechanism\n basicAuthValidation();\n scenario.write(\"Request query parameters are :-\");\n String[] queryParameters = {\"grant_type\"};\n setQueryParameters(queryParameters);\n String[] headerParameters = {\"content-type\"};\n setHeaderParameters(headerParameters);\n }", "public String getHeader()\r\n\t{\r\n\t\treturn header;\r\n\t}", "public String getHeaderValue(URL paramURL, String paramString) {\n/* 244 */ return getHeaderValueImpl(paramURL.getFile(), paramString);\n/* */ }", "public String getHeader(String name, String delimiter) throws MessagingException {\n/* 382 */ if (this.headers == null)\n/* 383 */ loadHeaders(); \n/* 384 */ return this.headers.getHeader(name, delimiter);\n/* */ }", "String getHeaderValue(String paramString1, String paramString2) {\n/* 262 */ return getHeaderValueImpl(paramString1, paramString2);\n/* */ }", "public String getJwtFromRequest(HttpServletRequest request) {\n String authHeader = request.getHeader(jwtConfig.getAuthorizationHeader());\n System.out.println(\"auth header is :\" + authHeader);\n System.out.println(\"jwt token is being prepared\");\n if (authHeader != null && authHeader.startsWith(\"Bearer \")) {\n System.out.println(\"jwt token is valid\");\n return authHeader.replace(\"Bearer \", \"\");\n }else{\n System.out.println(\"jwt token is not valid and is null\");\n return null;\n }\n }", "protected ResponseHeader getHeader() {\n return this.header;\n }", "public String getHeader() {\n return header;\n }", "public String getHeader() {\n return header;\n }", "public String extractAuthTokenFromRequest(HttpServletRequest httpRequest) {\n\t\t/* Get token from header */\n\t\tString authToken = httpRequest.getHeader(\"X-Auth-Token\");\n\n\t\t/* If token not found get it from request parameter */\n\t\tif (authToken == null) {\n\t\t\tauthToken = httpRequest.getParameter(\"token\");\n\t\t}\n\n\t\treturn authToken;\n\t}", "public Map<String, String> readHeader() {\r\n\t\tMap<String, String> headers = null;\r\n\t\tif (advanceToTag(\"Document\")) {\r\n\t\t\tif (advanceToTag(\"Header\")) {\r\n\t\t\t\theaders = this.in.readPropertyBlock();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn headers;\r\n\t}", "@Override\n\t\tpublic String getHeader(String name) {\n\t\t\treturn null;\n\t\t}", "private static String get_request(String uri, boolean isChecking, String token) throws IOException {\r\n URL url = new URL(uri);\r\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\r\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\r\n connection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36 Edg/88.0.705.74\");\r\n if (isChecking) {\r\n connection.setRequestProperty(\"Authorization\", token);\r\n }\r\n connection.setRequestMethod(\"GET\");\r\n InputStream responseStream = connection.getInputStream();\r\n if (debug) {\r\n System.out.println(\"GET - \"+connection.getResponseCode());\r\n }\r\n try (Scanner scanner = new Scanner(responseStream)) {\r\n String responseBody = scanner.useDelimiter(\"\\\\A\").next();\r\n if (debug) {\r\n System.out.println(responseBody);\r\n }\r\n return responseBody;\r\n } catch (Exception e) {\r\n return \"ERROR\";\r\n }\r\n }", "public Map<String, List<String>> getHeaderFields() {\n/* 262 */ return this.delegate.getHeaderFields();\n/* */ }", "List<? extends Header> getHeaders(String name);", "public static String extractAuthTokenFromRequest(HttpServletRequest httpRequest) {\n\t\tString authToken = httpRequest.getHeader(\"X-Auth-Token\");\n\n\t\t/* If token not found get it from request parameter */\n\t\tif (authToken == null) {\n\t\t\tauthToken = httpRequest.getParameter(\"token\");\n\t\t}\n\n\t\treturn authToken;\n\t}", "public boolean isHeaderParsed();", "public Header[] getRequestHeaders() {\n return getRequestHeaderGroup().getAllHeaders();\n }", "public String getHeader(final String name) {\n final Collection<String> strings = headers.get(name);\n return strings == null ? null : strings.iterator().next();\n }", "public List<String> get(Object key)\r\n/* 396: */ {\r\n/* 397:564 */ return (List)this.headers.get(key);\r\n/* 398: */ }", "HttpClientRequest header(CharSequence name, CharSequence value);", "@Test\n public void getRequest2() {\n str = METHOD_GET + \"/wiki/page.html \" + HTTP_VERSION + ENDL +\n HOST_HEADER + \": ru.wikipedia.org\" + ENDL +\n USER_AGENT + \": Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5\" + ENDL +\n ACCEPT + \": text/html\" + ENDL +\n CONNECTION_CLOSE;\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n\n assertEquals(request.getMethod(), HttpMethod.GET);\n assertEquals(request.getUrn(), \"/wiki/page.html\");\n assertEquals(request.getHeader(HOST_HEADER), \"ru.wikipedia.org\");\n assertEquals(request.getHeader(USER_AGENT),\n \"Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9b5) Gecko/2008050509 Firefox/3.0b5\");\n assertEquals(request.getHeader(ACCEPT), \"text/html\");\n assertEquals(request.getHeader(CONNECTION), CLOSE_STR);\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n }", "private void mergeGetTokenReq(GetToken.Req value) {\n if (reqCase_ == 4 &&\n req_ != GetToken.Req.getDefaultInstance()) {\n req_ = GetToken.Req.newBuilder((GetToken.Req) req_)\n .mergeFrom(value).buildPartial();\n } else {\n req_ = value;\n }\n reqCase_ = 4;\n }", "private void parseProtocol(String protocol) {\n try (Scanner sc = new Scanner(protocol)) {\n //parse first line\n this.method = Method.valueOf(sc.next());\n this.url = sc.next();\n String httpVersion = sc.next();\n this.version = Double.parseDouble(httpVersion.substring(5));\n\n while (sc.hasNext(\".+:\")) {\n String header = sc.next();\n header = header.substring(0, header.indexOf(':'));\n String value = sc.next() + sc.nextLine();\n this.headings.put(header, value);\n }\n }\n\n }", "protected HeaderGroup getRequestHeaderGroup() {\n return requestHeaders;\n }", "@Test\n\tpublic void verifyHeader() {\n\t\t\tHeaders head = response.getHeaders();\n\t\t\tAssert.assertEquals(head.getValues(\"Content-Type\").toString(), \"[application/json; charset=utf-8]\");\n\t\t}", "private String getToken(HttpServletRequest request){\n String header = request.getHeader(\"Authorization\");\n if(header != null && header.startsWith(\"Bearer\"))\n \t// Sacamos al bearer del token\n return header.replace(\"Bearer \", \"\");\n return null;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return (mHeaders != null && mHeaders.size() > 3) ? mHeaders : NetworkUtils.this.getHeaders();\n }", "@Override\n public Map<String, String> getHeaders() {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\", \"application/x-www-form-urlencoded\");\n params.put(\"Authorization\", appUtil.getPrefrence(\"token_type\") + \" \" + appUtil.getPrefrence(\"access_token\"));\n return params;\n }", "ComponentHeaderType getHeader();", "public String getHeader(final String name) {\n return headers.get(name);\n }", "protected Optional<RSAPublicKey> extractKeyFromRequest(Request request) throws Http4xx {\n Optional<RSAPublicKey> keyFromAccept = this.extractKeyFromAcceptHeader(request);\n if (keyFromAccept.isPresent()) {\n return keyFromAccept;\n }\n Optional<RSAPublicKey> keyFromAuth = this.extractKeyFromAuthorizationHeader(request);\n if (keyFromAuth.isPresent()) {\n return keyFromAuth;\n }\n return Optional.empty();\n }", "@GET(\"banner/query\")\n Call<List<HeaderBean>> getHeaderData(@Query(\"type\") String type);", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n return authenticator.getVolleyHttpHeaders();\n }", "private void readHeader() {\n version = \"\";\n XmlNode node = _document.SelectSingleNode(\"//ovf:Envelope\", _xmlNS);\n if (node != null) {\n version = node.attributes.get(\"ovf:version\").getValue();\n }\n }", "String getRequest(String url);", "public Object getHeader() {\n return header;\n }", "public static HashMap<String, String> makehead(ArrayList<String> head){\n\t\n\t\tHashMap<String, String> header = new HashMap<String, String>();\n\t\t\t\n\t\tString[] headerKeyValue;\n\t \tString mostrecentKey = \"\";\n\t \t\n\t \tfor(String request : head){ \n\t \t\t//while((request = reader.readLine()) != null ){ \t \t\t \n\t \t\theaderKeyValue = request.split(\":\",2);\n\t \t\tif(headerKeyValue.length > 2){ \t\t\t \n\t \t\t\treturn null;\n\t \t\t}\n\t \t\telse if (headerKeyValue.length == 2){\n\t \t\t\tString key = headerKeyValue[0].trim().toUpperCase(); \n\t\t\t \n\t \t\t\tString value = headerKeyValue[1].trim(); \t\t\t\n\t\t\t \n\t \t\t\t//CASE handling when multiple headers have same keys, we append all the values by comma separation\n\t \t\t\tif((header.containsKey(key))){\n\t \t\t\t\tString initialvalue = header.get(key);\n\t \t\t\t\theader.put(key, initialvalue +\", \" + value); \n\t\t\t\t \n\t \t\t\t}\n\t\t\t \n\t \t\t\telse if(!key.equals(\"\")){ \t\t\t\t\t \n\t \t\t\t\tmostrecentKey = key;\n\t \t\t\t\theader.put(key, value); //check if we want to handle upper case or not // check multiple same keys\n\t \t\t\t}\n\t\t\t\t \t\t\t \n\t \t\t} \t\t \n\t\t \n\t \t\telse if(headerKeyValue.length == 1){ \n\t\t\t \n\t \t\t\tif(header.containsKey(mostrecentKey)&& Character.isWhitespace(headerKeyValue[0].charAt(0))){ \t\t\t\t \n\t \t\t\t\tString mostrecentValue = header.get(mostrecentKey); \n\t \t\t\t\t//System.out.println(headerKeyValue[0] + \" rmp3\");\n\t \t\t\t\theader.put(mostrecentKey,mostrecentValue + \" \" + headerKeyValue[0].trim()); // i think i missed the space here in MS1 \t\t\t\t \n\t\t\t\t \n\t \t\t\t} \t\t \t\t\t \t\t\t \n\t \t\t}\t \n\t \t} \n\t\n\t \treturn header;\n\t}", "public void testResponseHeaders() {\n\t\tResponse response = get(\"http://jsonplaceholder.typicode.com/photos\");\n\t\t\n\t\t//to get a single header\n\t\tString headerCFRAY = response.getHeader(\"CF-Ray\");\n\t\tSystem.out.println(\">>>>>>Header: \"+headerCFRAY);\n\t\t\n\t\tSystem.out.println(\"\");\n\t\t\n\t\t//to get all header\n\t\tHeaders headers = response.getHeaders();\n\t\tfor(Header h: headers) {\n\t\t\tSystem.out.println(h.getName()+\":\"+h.getValue());\n\t\t}\n\t}", "@Test\n public void getWitheaders(){\n with().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/countries/US\")\n .then().statusCode(200);\n }", "FS2ObjectHeaders getHeaders();", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }", "@Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }" ]
[ "0.7175737", "0.704043", "0.696123", "0.6959469", "0.6898553", "0.67831075", "0.6705447", "0.66362315", "0.6624292", "0.6590356", "0.65134233", "0.6499118", "0.6475855", "0.6475216", "0.6409993", "0.6328901", "0.6325601", "0.63077885", "0.6217565", "0.6176923", "0.61739695", "0.6126315", "0.6115674", "0.60663486", "0.60506046", "0.6031865", "0.601571", "0.60157067", "0.60004497", "0.599835", "0.59898776", "0.59801215", "0.5977699", "0.59272325", "0.59025073", "0.58963865", "0.5843274", "0.5842547", "0.5842508", "0.5842151", "0.581905", "0.5811335", "0.58089024", "0.57959354", "0.5763471", "0.5704521", "0.5702375", "0.56986517", "0.5692959", "0.5692783", "0.5691362", "0.566967", "0.5668783", "0.56668204", "0.56516224", "0.5650816", "0.56441575", "0.56441575", "0.5642503", "0.56424415", "0.56372446", "0.56285447", "0.5625751", "0.5624266", "0.56165975", "0.56160367", "0.5615436", "0.56101817", "0.56076276", "0.5603123", "0.5599396", "0.55983156", "0.5594097", "0.5587491", "0.5577993", "0.5574919", "0.556391", "0.5562691", "0.55619764", "0.555639", "0.5556388", "0.55551463", "0.5554201", "0.5552348", "0.55279034", "0.5504548", "0.5497924", "0.54937375", "0.5491546", "0.5489315", "0.54738307", "0.54738307", "0.54738307", "0.54738307", "0.54738307", "0.54738307", "0.54738307", "0.54738307", "0.54738307", "0.54738307" ]
0.7091551
1
This domain object represents a translated value for a given property on an entity for a specific locale.
public interface Translation extends MultiTenantCloneable<Translation>, Serializable { public Long getId(); public void setId(Long id); public TranslatedEntity getEntityType(); public void setEntityType(TranslatedEntity entityType); public String getEntityId(); public void setEntityId(String entityId); public String getFieldName(); public void setFieldName(String fieldName); public String getLocaleCode(); public void setLocaleCode(String localeCode); public String getTranslatedValue(); public void setTranslatedValue(String translatedValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GWTJahiaNodeProperty translate(GWTJahiaNodeProperty property, GWTJahiaItemDefinition definition, String srcLanguage, String destLanguage, String siteUUID) throws GWTJahiaServiceException;", "@ApiModelProperty(value = \"The locale of the contained data\")\n public String getLocale() {\n return locale;\n }", "public String translate() {\n\n\t\tString asp = \"\";\t\t\n\t\tif (propAssc.isModal()) {\n\t\t\tfor (int i=0; i<modes.size(); i++) {\n\t\t\t\tPropertyExpression propExpr = propAssc.valueInMode(modes.get(i));\n\t\t\t\t\n\t\t\t\tif (propExpr != null) \n\t\t\t\t\tasp += ifModeSpecificValue(propExpr, modes.get(i));\n\t\t\t}\n\t\t} else {\n\n\t\t\t// retrieve the values\n\t\t\t// TODO: consider adding inherited property values ??\n\t\t\tEList<ModalPropertyValue> values = propAssc.getOwnedValues();\n\t\t\t\n\t\t\t// TODO: check if there are properties that return multiple values (maybe records?)\n\t\t\tPropertyExpression propExpr = values.get(0).getOwnedValue();\n\t\t\t\n\t\t\tasp += ifNonModeSpecificValue(propExpr);\n\t\t}\n\t\t\n\t\t\n\t\treturn asp;\n\t}", "TranslatedExpression getTranslatedExpressionObject();", "@RequestMapping(value = \"/messageresource/localize\", method = RequestMethod.GET)\n\tpublic String localizeMessageResource(Model model, Locale locale) {\n\n\t\tlogger.debug(\"localizeMessageResource()\");\n\n\t\tMessageResourceTranslationBackingBean messageResourceTranslationBackingBean = new MessageResourceTranslationBackingBeanImpl();\n\t\tmessageResourceTranslationBackingBean.setCurrentMode(MessageResource.CurrentMode.LOCALIZE);\n\t\tmodel.addAttribute(\"messageResourceTranslationFormModel\", messageResourceTranslationBackingBean);\n\t\tLong defaultLocale = Long.valueOf(Constants.REFERENCE_LOCALE__EN);\n\t\tsetTranslationDropDownContents(model, locale);\n\t\tsetDropDownContents(model, null, locale);\t\t\n\t\tmodel.addAttribute(\"defaultLocale\", defaultLocale);\n\t\t\n\t\treturn \"messages/messageresource_localize\";\n\n\t}", "@Override\n @Transactional(readOnly = true)\n public MultilingualJsonType getDomainValue(String value,String domainCode) {\n\n Optional<DomainDTO> domain = domainService.findOne(domainCode);\n\n if(!domain.isPresent()) {\n return null;\n }\n Optional<DomainValueDTO> domainValue = domainValueRepository.findByValueAndDomain_Id(value,domain.get().getId())\n .map(domainValueMapper::toDto);\n\n if(!domainValue.isPresent()) {\n return null;\n }\n\n return domainValue.get().getDescription();\n }", "Language findByTenantIdAndMessageKeyAndLocale(Long tenantId, String key, String locale);", "public interface ElPropertyValue extends ElPropertyDeploy {\r\n\r\n /**\r\n * Return the Id values for the given bean value.\r\n */\r\n public Object[] getAssocOneIdValues(Object bean);\r\n\r\n /**\r\n * Return the Id expression string.\r\n * <p>\r\n * Typically used to produce id = ? expression strings.\r\n * </p>\r\n */\r\n public String getAssocOneIdExpr(String prefix, String operator);\r\n\r\n /**\r\n * Return the logical id value expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInValueExpr(int size);\r\n \r\n /**\r\n * Return the logical id in expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInExpr(String prefix);\r\n \r\n /**\r\n * Return true if this is an ManyToOne or OneToOne associated bean property.\r\n */\r\n public boolean isAssocId();\r\n\r\n /**\r\n * Return true if any path of this path contains a Associated One or Many.\r\n */\r\n public boolean isAssocProperty();\r\n\r\n /**\r\n * Return true if the property is encrypted via Java.\r\n */\r\n public boolean isLocalEncrypted();\r\n \r\n /**\r\n * Return true if the property is encrypted in the DB.\r\n */\r\n public boolean isDbEncrypted();\r\n\r\n /**\r\n * Return the deploy order for the property.\r\n */\r\n public int getDeployOrder();\r\n \r\n /**\r\n * Return the default StringParser for the scalar property.\r\n */\r\n public StringParser getStringParser();\r\n\r\n /**\r\n * Return the default StringFormatter for the scalar property.\r\n */\r\n public StringFormatter getStringFormatter();\r\n\r\n /**\r\n * Return true if the last type is \"DateTime capable\" - can support\r\n * {@link #parseDateTime(long)}.\r\n */\r\n public boolean isDateTimeCapable();\r\n\r\n /**\r\n * Return the underlying JDBC type or 0 if this is not a scalar type.\r\n */\r\n public int getJdbcType();\r\n \r\n /**\r\n * For DateTime capable scalar types convert the long systemTimeMillis into\r\n * an appropriate java time (Date,Timestamp,Time,Calendar, JODA type etc).\r\n */\r\n public Object parseDateTime(long systemTimeMillis);\r\n\r\n /**\r\n * Return the value from a given entity bean.\r\n */\r\n public Object elGetValue(Object bean);\r\n\r\n /**\r\n * Return the value ensuring objects prior to the top scalar property are\r\n * automatically populated.\r\n */\r\n public Object elGetReference(Object bean);\r\n\r\n /**\r\n * Set a value given a root level bean.\r\n * <p>\r\n * If populate then\r\n * </p>\r\n */\r\n public void elSetValue(Object bean, Object value, boolean populate, boolean reference);\r\n\r\n /**\r\n * Make the owning bean of this property a reference (as in not new/dirty).\r\n */\r\n public void elSetReference(Object bean);\r\n\r\n /**\r\n * Convert the value to the expected type.\r\n * <p>\r\n * Typically useful for converting strings to the appropriate number type\r\n * etc.\r\n * </p>\r\n */\r\n public Object elConvertType(Object value);\r\n}", "public Locale getLocale() { return this.locale; }", "@Override\n\tpublic Object getValue() {\n\t\tif (user != null)\n\t\t\tuser.setDefaultLocale(defaultLocaleField.getValue().toString());\n\t\t\n\t\treturn user;\n\t\t\n\t}", "Language findByMessageKeyAndLocale(String key, String locale);", "String getPropertyValue(String filename, String lang, String key);", "@JSProperty\n String getValue();", "<T> T getValue(Property<T> property);", "@Override\r\n protected String determineLocale(final Map<String, Object> descGetterMap, final JPAPath localeAttribute,\r\n final int index) throws ODataJPAProcessorException {\n return null;\r\n }", "private static Object getValue(Property property, Object value) {\n\n\t\tif (property instanceof DataTypeProperty) {\n\t\t\tXSDDatatype xsdDataType = ((DataTypeProperty) property).getDataType();\n\t\t\tvalue = \"\\\"\" + value.toString() + \"\\\"\" + xsdDataType.getXsdType();\n\t\t\treturn value;\n\t\t} else {\n\t\t\treturn Prefix.IOT_PLATFORM.getPrefix() + value.toString().toLowerCase().replaceAll(\" \", \"\");\n\t\t}\n\t}", "public String locale() {\n return this.locale;\n }", "private String getPropertyValue() {\n return EmfPropertyHelper.getValue(itemPropertyDescriptor, eObject);\n }", "public Locale getLocale() {\n return locale;\n }", "ULocale getLocale() {\n\t\treturn locale;\n\t}", "int getTranslationField();", "public interface WebDavProperty<T> extends PropEntry, ExtendedDavConstants {\n\n /**\n * <p>\n * Returns the text content of the property value as a string. The string\n * is calculated by concatening the text and character data content of\n * every element in the value.\n * </p>\n */\n String getValueText();\n\n /**\n * Returns the name of this property\n *\n * @return the name of this property\n */\n DavPropertyName getName();\n\n /**\n * Returns the value of this property\n *\n * @return the value of this property\n */\n T getValue();\n\n /**\n * Return <code>true</code> if this property should be suppressed\n * in a PROPFIND/{@link DavConstants#PROPFIND_ALL_PROP DAV:allprop}\n * response. See RFC 4918, Section 9.1.\n *\n * @return true, if this property should be suppressed in a PROPFIND/allprop response\n */\n boolean isInvisibleInAllprop();\n}", "public abstract Object getValue(Context context) throws PropertyException;", "Property getProperty();", "Property getProperty();", "public com.mozu.api.contracts.productadmin.AttributeVocabularyValueLocalizedContent getAttributeVocabularyValueLocalizedContent(String attributeFQN, String value, String localeCode) throws Exception\r\n\t{\r\n\t\treturn getAttributeVocabularyValueLocalizedContent( attributeFQN, value, localeCode, null);\r\n\t}", "@Transient\n\tpublic String getComplexTransactionId(Locale locale) throws EcommerceException\t{\n\t\t// Format : C001/123456Z\n\t\tString rv = null;\n\t\tCountryCode countryCode = null;\n\t\ttry {countryCode = CountryCode.getCountryCode(locale);}\n\t\tcatch (Exception e) {sLog.error(\"Transaction:getComplexTransactionId failed: \"+e);}\n\n\t\tif (locale !=null && countryCode!=null && this.mType!=null){\n\t\t\tsLog.debug (\"Type of transaction : \"+this.mType.toString()+\"\\nCountry Code : \"+countryCode.getCode());\n\t\t\tif (this.mType.isPaymentContent() )\n\t\t\t\trv=\"C\";\n\t\t\telse\n\t\t\t\trv=\"P\";\n\t\t\tif (countryCode.getCode()<9) rv=rv+\"00\";\n\t\t\telse if (countryCode.getCode()<99) rv=rv+\"0\";\n\t\t\t//else; //nothing\n\n\t\t\t//MQC 6016 - move retrieval of property to local method of where it is used\n\t\t\tString transactionIdPrefix = \"007\"; // default value\n\n\t\t\tif(this.getType()!= null && this.getType().isRefundCash() || this.getType().isRefundDiscount() || this.getType().isRefundEnlargement() || this.getType().isRefundNonCash()){\n\n\t\t\t\t//UK Customization\n\t\t\t\tif(countryCode.getCode() == 5)\n\t\t\t\t{\n\t\t\t\t\t//MQC 6016 - move retrieval of property to local method of where it is used \t\n\t\t\t\t\ttransactionIdPrefix = ConfigProvider.getProperty(\"TRANSACTION_ID_PREFIX\", \"007\");\n\t\t\t\t\trv = rv + transactionIdPrefix +\"/\"+this.mRefundPaymentTransactionId+\"Z\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\trv = rv + (countryCode.getCode()+1)+\"/\"+this.mRefundPaymentTransactionId+\"Z\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//UK Customization\n\t\t\t\tif(countryCode.getCode() == 5)\n\t\t\t\t{\n\t\t\t\t\t//MQC 6016 - move retrieval of property to local method of where it is used \t\n\t\t\t\t\ttransactionIdPrefix = ConfigProvider.getProperty(\"TRANSACTION_ID_PREFIX\", \"007\");\n\t\t\t\t\trv = rv + transactionIdPrefix +\"/\"+this.mTransactionIdLong+\"Z\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\trv = rv + (countryCode.getCode()+1)+\"/\"+this.mTransactionIdLong+\"Z\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new EcommerceException (\"ERTransaction:getComplexTransactionId: failed to create complex Transaction Id\");\n\t\t}\n\n\t\treturn rv;\n\n\t}", "public ULocale getLocale() {\r\n return this.locale;\r\n }", "protected Object valueTranslator(Object value){\n\t\treturn value;\n\t}", "@SuppressWarnings({ \"static-method\", \"nls\" })\n @Test\n public final void testRetrieveKeyI18NPropertyOtherLocale()\n {\n Locale.setDefault(Locale.ITALIAN);\n\n // Property value is injected at object construction time! So it's important to change the locale before the\n // object is created.\n TestEasyPropertiesObject object = new TestEasyPropertiesObject();\n Assert.assertEquals(getExpectedYellowColorName(), object.getColorName());\n }", "@Accessor(qualifier = \"message\", type = Accessor.Type.GETTER)\n\tpublic String getMessage(final Locale loc)\n\t{\n\t\treturn getPersistenceContext().getLocalizedValue(MESSAGE, loc);\n\t}", "java.lang.String getProperty();", "public FlatProperty transform(Property property, List<String> standardLocaleList) {\n\t\tFlatProperty flatProperty = new FlatProperty();\n\t\tfor(PropertyField field : property.getFieldList()){\n\t\t\tif(field.getId().equals(TITLE_PROP_FIELD_ID)){\n\t\t\t\tflatProperty.setTitle(processByLocaleAlternates(field.getFieldValueList(), standardLocaleList));\n\t\t\t}\n\t\t\tif(field.getId().equals(BASIC_DESCRIPTION_PROP_FIELD_ID)){\n\t\t\t\tflatProperty.setBasicDescription(processByLocaleAlternates(field.getFieldValueList(), standardLocaleList));\n\t\t\t}\n\t\t\tif(field.getId().equals(LOC_DESCRIPTION_PROP_FIELD_ID)){\n\t\t\t\tflatProperty.setLocationDescription(processByLocaleAlternates(field.getFieldValueList(), standardLocaleList));\n\t\t\t}\n\t\t\tif(field.getId().equals(MARKET_PRICE_PROP_FIELD_ID)){\n\t\t\t\tflatProperty.setMarketPrice(processMarketPrice(field.getFieldValueList()));\n\t\t\t}\n\t\t\tif(field.getId().equals(IMAGE_PROP_FIELD_ID)){\n\t\t\t\tflatProperty.setUrlImage(processImage(field.getFieldValueList()));\n\t\t\t}\n\t\t\tif(field.getId().equals(ROOMS_PROP_FIELD_ID)){\n\t\t\t\tflatProperty.setRoomNumber(processRooms(field.getFieldValueList()));\n\t\t\t}\n\t\t\tif(field.getId().equals(BATHROOMS_PROP_FIELD_ID)){\n\t\t\t\tflatProperty.setBathNumber(processBathRooms(field.getFieldValueList()));\n\t\t\t}\n\t\t}\n\t\treturn flatProperty;\n\t}", "@NotNull\n @Generated\n @Selector(\"localizedModel\")\n public native String localizedModel();", "T getTranslation(DO obj, @NotNull Language language);", "protected abstract Object getEntryValue(T nativeEntry, String property);", "@Override\n @Transactional(readOnly = true, propagation = Propagation.REQUIRES_NEW)\n public MultilingualJsonType getDomainValueDescription(String value,String domainCode) {\n log.debug(\"Request to get DomainValue : {} / domainCode : {}\", value,domainCode);\n Optional<DomainDTO> domain = domainService.findOne(domainCode);\n\n if(!domain.isPresent()) {\n return null;\n }\n Optional<DomainValueDTO> domainValue = domainValueRepository.findByValueAndDomain_Id(value,domain.get().getId())\n .map(domainValueMapper::toDto);\n\n if(!domainValue.isPresent()) {\n return null;\n }\n return domainValue.get().getDescription();\n }", "public List getLocaleValues() {\n\n return (localeValues);\n\n }", "public Locale getLocale()\n {\n return locale;\n }", "public abstract Object getPropertyValue(String propertyName)\n throws ModelException;", "public interface Locale {\n public String getStringById(int stringId);\n}", "Language(Locale locale) {\n this.locale = locale;\n }", "public interface LocaleContext {\n Locale getLocale();\n}", "public Locale getLocale() {\r\n return locale;\r\n }", "private String translate(Translatable str, Locale locale) {\n\t\t\n\t\tif (\"\".equals(str.getMsgid())) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tString baseName = this.cfg.getString(\"formatter.locale.basename\", \"Messages\");\n\n\t\tI18n i18n = I18nFactory.getI18n(this.getClass(), baseName, locale);\n\n\t\tif (!\"\".equals(str.getMsgctx()) && str.getMsgctx() != null) {\n\t\t\treturn i18n.trc(str.getMsgid(), str.getMsgctx());\n\t\t} else {\t\t\t\n\t\t\treturn i18n.tr(str.getMsgid());\n\t\t}\n\n\t}", "@RdfProperty(\"http://www.coadunation.net/schema/rdf/1.0/base#IdValue\")\n public abstract String getValue();", "public interface Property {\n\n\t/**\n\t * <p>\n\t * Retrieves the name of the property.\n\t * </p>\n\t * \n\t * @return The property's name\n\t */\n\tPropertyName getName();\n\n\t/**\n\t * <p>\n\t * Adds the specified values to the statements of this property.\n\t * </p>\n\t * \n\t * @param value\n\t * The value to be added\n\t * @return A reference to the updated property\n\t */\n\tProperty addValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Adds the specified values to the statements of this property, after\n\t * removing all current values.\n\t * </p>\n\t * \n\t * @param value\n\t * The value to be added\n\t * @return A reference to the updated property\n\t */\n\tProperty clearAndAddValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Removes the specified value from the statements of this property.\n\t * <p>\n\t * \n\t * @param value\n\t * The value to be removed\n\t * @return A reference to the updated property\n\t */\n\tProperty removeValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Modifies a property statement changing its value.\n\t * </p>\n\t * \n\t * @param oldValue\n\t * The value that the property currently has\n\t * @param newValue\n\t * The new value that will replace the actual one\n\t * @return A reference to the updated property\n\t */\n\tProperty changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);\n\n\t/**\n\t * <p>\n\t * Lists all the values associated to this property.\n\t * </p>\n\t * \n\t * @return All values that this property has\n\t */\n\tPropertyValue<?, ?>[] values();\n\n\t/**\n\t * <p>\n\t * Check if the provided value is associated to this property.\n\t * </p>\n\t * \n\t * @param value\n\t * The value to be checked\n\t * @return True if associated, false otherwise\n\t */\n\tboolean hasValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Clones this entity.\n\t * </p>\n\t * \n\t * @return The clone entity\n\t */\n\tProperty clone();\n\n\t/**\n\t * <p>\n\t * Checks if this property extends the provided one.\n\t * </p>\n\t * \n\t * @param other\n\t * Another property to be checked against\n\t * @return True if extends, false otherwise\n\t */\n\tboolean isExtensionOf(Property other);\n\n\t/**\n\t * <p>\n\t * Pattern VISITOR.\n\t * </p>\n\t * \n\t * @param visitor\n\t * The visitor\n\t */\n\tvoid accept(LSAVisitor visitor);\n\n\t/**\n\t * <p>\n\t * Checks if the property is synthetic.\n\t * </p>\n\t * <p>\n\t * Synthetic Properties cannot be modified by a user agent.\n\t * </p>\n\t * \n\t * @return True if synthetic, false otherwise\n\t */\n\tboolean isSynthetic();\n}", "public String locale() throws DynamicCallException, ExecutionException {\n return (String)call(\"locale\").get();\n }", "void handle(final MetaProperty<T> property, final T entityPropertyValue);", "@SuppressWarnings(\"unchecked\")\n public <PROPERTY> PROPERTY read(Entity localEntity) {\n return (PROPERTY) _propertyGateway.read(localEntity);\n }", "public Future<String> locale() throws DynamicCallException, ExecutionException {\n return call(\"locale\");\n }", "public Locale getLocale() {\n return locale;\n }", "public Locale getLocale() {\n return locale;\n }", "public Locale getLocale() {\n return locale;\n }", "PropertyRealization createPropertyRealization();", "public String getLocale() {\n return this.locale;\n }", "public String getLanguage() {\n return languageProperty.get();\n }", "public String getLanguageValue(Locale locale) {\n\n\t\tString language = locale.getDisplayLanguage(this.locale);\n\t\t\n\t\tif(language.length() > 0) {\n\t\t\tlanguage = language.substring(0, 1).toUpperCase(this.locale) + language.substring(1);\n\t\t}\n\t\t\n\t\tString country = locale.getDisplayCountry(); \n\t\t\n\t\tif(country.length() > 0) {\n\t\t\tlanguage = language + \" - \" + locale.getDisplayCountry(this.locale); \n\t\t}\n\t\t\n\t\tString variant = locale.getDisplayVariant(); \n\n\t\tif(variant.length() > 0) {\n\t\t\tlanguage = language + \" - \" + locale.getDisplayVariant(this.locale); \n\t\t}\n\t\t\n\t\tif(locale == fallbackLocale) {\n\t\t\tlanguage = language + \" (fallback)\";\n\t\t}\n\t\t\n\t\treturn language;\n\t}", "@Override\n public HangarMessages addConstraintsTypeLocalDateTimeMessage(String property) {\n assertPropertyNotNull(property);\n add(property, new UserMessage(CONSTRAINTS_TypeLocalDateTime_MESSAGE));\n return this;\n }", "public Node readTranslation(Locale locale);", "public int getLocaleId() {\r\n\t\treturn localeId;\r\n\t}", "public interface LocaleProvider {\n\tLocale getLocale();\n}", "@JsProperty String getValue();", "@Override\n\t\t\tpublic Object getPropertyValue() {\n\t\t\t\treturn null;\n\t\t\t}", "public DatatypeProp getProperty() {\n return property;\n }", "public abstract Object getValue(ELContext context,\n Object base,\n Object property);", "public String getValueProperty() {\r\n return getAttributeAsString(\"valueProperty\");\r\n }", "default String getTranslatedExpression() {\n if ( getTranslatedExpressionObject() == null ) return \"\";\n else return getTranslatedExpressionObject().getTranslatedExpression();\n }", "private static void ajouterPropertiesInitialesEnDur(\r\n\t\t\tfinal Locale pLocale) {\r\n\t\t\r\n\t\tif (pLocale.equals(Locale.FRANCE)) {\r\n\t\t\t\r\n\t\t\tmapPropertiesInitiales.put(KEY_LABEL_PRENOM, \"Prénom\");\r\n\t\t\tmapPropertiesInitiales.put(KEY_LABEL_NOM, \"Nom\");\r\n\t\t\t\r\n\t\t} else if (pLocale.equals(Locale.US)){\r\n\t\t\t\r\n\t\t\tmapPropertiesInitiales.put(KEY_LABEL_PRENOM, \"FirstName\");\r\n\t\t\tmapPropertiesInitiales.put(KEY_LABEL_NOM, \"LastName\");\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tmapPropertiesInitiales.put(KEY_LABEL_PRENOM, \"Prénom\");\r\n\t\t\tmapPropertiesInitiales.put(KEY_LABEL_NOM, \"Nom\");\r\n\t\t}\r\n\t\t\r\n\t}", "public X locale(Locale locale) {\n component.setLocale(locale);\n return (X) this;\n }", "private StringProperty mostrarEmaitza(Partido value) {\n\t\t\n\t\tStringProperty emaitza = new SimpleStringProperty();\n\t\temaitza.set(value.getGolesLocal()+\" - \"+value.getGolesVisitante());\n\t\treturn emaitza;\n\t}", "@Property(name = \"value\", propertyType = PropertyType.STRUCTURAL, conformance = ConformanceType.MANDATORY)\n\tpublic BigDecimal getValue() { return this.m_value; }", "public Locale getLocale () {\n return _locale;\n }", "private String getLocalizedString(String key) {\n\t\treturn new StringResourceModel(key, null).getObject();\n\t}", "protected abstract Property createProperty(String key, Object value);", "@DISPID(-2147413103)\n @PropGet\n java.lang.String lang();", "public FlatMapDTO handleTranslation() {\n return translations;\n }", "@Bean\n\tpublic LocaleResolver localeResolver() {\n\t\tFixedLocaleResolver resolver = new FixedLocaleResolver(new Locale(\"es\", \"MX\"));\n\t\treturn resolver;\n\t}", "public String get() {\n Validate.notNull(this.translatedMessage, \"Translations are not initialised\");\n return this.translatedMessage;\n }", "public interface OrderResolver {\n String resolve(String lang, String alias, String property, Criteria.OrderMode mode);\n}", "public abstract String getLocalizationKey();", "@JSProperty(\"to\")\n double getTo();", "public native final Value property(final String name)/*-{\n\t\treturn {\n\t\t\tdatum : this.property(name)\n\t\t};\n\t}-*/;", "@ZAttr(id=345)\n public String getLocaleAsString() {\n return getAttr(Provisioning.A_zimbraLocale, null);\n }", "protected Object getObjectValue(IRI propertyIRI, Literal object) {\n IRI datatype = object.getDatatype();\n if (datatype.equals(XMLSchema.STRING) || datatype.equals(RDF.LANGSTRING)) {\n final Optional<String> language = object.getLanguage();\n if (parserConfig.getLanguageFilter() == null || !language.isPresent() || parserConfig\n .getLanguageFilter().equals(language.get())) {\n return object.stringValue() + (\n parserConfig.getGraphConf().isKeepLangTag() && language.isPresent() ? \"@\"\n + language.get()\n : \"\");\n } else {\n //filtered by lang\n return null;\n }\n } else if (typeMapsToLongType(datatype)) {\n return object.longValue();\n } else if (typeMapsToDouble(datatype)) {\n return object.doubleValue();\n } else if (datatype.equals(XMLSchema.BOOLEAN)) {\n return object.booleanValue();\n } else if (datatype.equals(XMLSchema.DATETIME)) {\n try {\n return ZonedDateTime.parse(object.stringValue());\n }catch(DateTimeParseException dtpe){\n try{\n //formatter to support the format shown int the cypher refcard (timezone but no offset)\n DateTimeFormatter neo4jZonedDateFormat = new DateTimeFormatterBuilder()\n .appendPattern(\"yyyy-MM-dd'T'HH:mm:ss\")\n .appendFraction(ChronoField.MILLI_OF_SECOND, 0, 9, true)\n .appendPattern(\"'['\").appendZoneId().appendPattern(\"']'\").toFormatter();\n return ZonedDateTime.parse(object.stringValue(), neo4jZonedDateFormat);\n }catch(DateTimeParseException dtpe2){\n try {\n return DateUtils.parseDateTime(object.stringValue());\n } catch (IllegalArgumentException e) {\n //if date cannot be parsed we return string value\n return object.stringValue();\n }\n }\n }\n }else if (datatype.equals(vf.createIRI(GEOSPARQL_NS, WKTLITERAL))) {\n try {\n return PointValue.parse(wktToCartesian(object.stringValue()));\n } catch (InvalidArgumentException e) {\n //if pointvalue cannot be parsed we return string value\n return object.stringValue();\n }\n } else if (datatype.equals(XMLSchema.DATE)) {\n try {\n return DateUtils.parseDate(object.stringValue());\n } catch (IllegalArgumentException e) {\n //if date cannot be parsed we return string value\n return object.stringValue();\n }\n } else {\n //it's a custom data type\n if (parserConfig.getGraphConf().isKeepCustomDataTypes() && !(\n parserConfig.getGraphConf().getHandleVocabUris() == GRAPHCONF_VOC_URI_IGNORE\n || parserConfig.getGraphConf().getHandleVocabUris() == GRAPHCONF_VOC_URI_MAP)) {\n //keep custom type as long as property is not absent from customDT list\n if (parserConfig.getGraphConf().getCustomDataTypePropList() == null || parserConfig\n .getGraphConf().getCustomDataTypePropList()\n .contains(propertyIRI.stringValue())) {\n return getValueWithDatatype(datatype, object.stringValue());\n } else {\n return object.stringValue();\n }\n }\n }\n // default\n return object.stringValue();\n }", "public interface MessageResolver {\n\t\n\tstatic final Logger LOG = LoggerFactory.getLogger( Validator.class );\n\t\n\tvoid setConfiguration( ContextConfigurion configuration );\n\tContextConfigurion getConfiguration();\n\t\n\tvoid setDefaultLocale( Locale defaultLocale );\n\tLocale getDefaultLocale();\n\n\tvoid addResourceBundle( String resourceName, String ... preloadings );\n\tvoid addResourceBundles( List<MessageResource> resources );\n\tSet<ResourceBundle> getResourceBundles();\n\n\tString getMessageKey( String key );\n\n\tString resolve( String key );\n\tString resolve( String key, String defaultValue );\n\t\n\tString resolve( String key, Locale locale );\n\tString resolve( String key, Locale locale, String defaultValue );\n\t\n}", "String getLocalizedString(Locale locale);", "public java.lang.String getLanguageLocaleKey() {\n return languageLocaleKey;\n }", "@Valid\n @JsonProperty(\"metaTitle\")\n public LocalizedString getMetaTitle();", "public List<PtJJdwcy> findByProperty(String propertyName, Object value);", "io.dstore.values.IntegerValue getValueLanguageId();", "@Override\n\tpublic Object getProperty(int arg0) {\n\t\tObject res = null;\n\t\tswitch (arg0) {\n\t\tcase 0:\n\t\t\tres = this.EntityKey;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tres = this.Id;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tres = this.Description;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tres = this.StartDate;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tres = this.EndDate;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn res;\n\t}", "public interface Translator\n{\n Locale SWEDISH = Locale.forLanguageTag(\"sv\");\n\n List<Locale> supportedLanguages();\n Map<Locale, List<Locale>> supportedDirections();\n Translation translate(Translation message);\n String pageTranslationURL(String sourceURL, Translation message);\n}", "@Override\n public String toDefaultValue(Property p) {\n if (p instanceof StringProperty) {\n StringProperty dp = (StringProperty) p;\n if (dp.getDefault() != null) {\n return \"\\\"\" + dp.getDefault().toString() + \"\\\"\";\n }\n } else if (p instanceof BooleanProperty) {\n BooleanProperty dp = (BooleanProperty) p;\n if (dp.getDefault() != null) {\n return dp.getDefault().toString();\n }\n } else if (p instanceof DateProperty) {\n // TODO\n } else if (p instanceof DateTimeProperty) {\n // TODO\n } else if (p instanceof DoubleProperty) {\n DoubleProperty dp = (DoubleProperty) p;\n if (dp.getDefault() != null) {\n return dp.getDefault().toString();\n }\n } else if (p instanceof FloatProperty) {\n FloatProperty dp = (FloatProperty) p;\n if (dp.getDefault() != null) {\n return dp.getDefault().toString();\n }\n } else if (p instanceof IntegerProperty) {\n IntegerProperty dp = (IntegerProperty) p;\n if (dp.getDefault() != null) {\n return dp.getDefault().toString();\n }\n } else if (p instanceof LongProperty) {\n LongProperty dp = (LongProperty) p;\n if (dp.getDefault() != null) {\n return dp.getDefault().toString();\n }\n }\n\n return null;\n }", "@DISPID(-2147413012)\n @PropGet\n java.lang.String language();", "@JSProperty(\"from\")\n double getFrom();", "public interface Property {\n /**\n * @return Type of the property.\n */\n PropertyType getPropertyType();\n\n /**\n * Gets propertyInfo of this property.\n *\n * @return PropertyInfo or null, if the property is not part of any model; and thus it has no info associated\n */\n PropertyInfo getPropertyInfo();\n\n /**\n * Casts the property value safely, possibly to more specific type.\n *\n * @param <T> expected type of a value (must be same type or supertype of the type defined in the propertyInfo of this property)\n * @param clazz clazz which represents type of a property value\n * @return property value\n * @throws UnsupportedPropertyException if this property represents another than requested, thus it is not possible to cast property\n * to the requested type.\n */\n <T extends Property> T cast(Class<T> clazz) throws UnsupportedPropertyException;\n\n void setPropertyInfo(PropertyInfo propertyInfo);\n\n /**\n * Gets Model which owns this property.\n *\n * @return Model which owns this property or null, if the preperty is not part of any model; and thus it has no model associated.\n */\n Model getModel();\n\n /**\n * Sets a model which owns this property.\n *\n * @param model model which owns this property.\n */\n void setModel(Model model);\n\n /**\n * This method performs validation of this property and determines if property is valid.\n *\n * @return true if and only if the content of a property is valid.\n */\n boolean isValid();\n\n /**\n * This method performs validation of this property and in case that property is invalid it returns error\n * description.\n *\n * @return validation error object or null if this property is valid.\n */\n ValidationError getValidationError();\n\n /**\n * Adds a listener for this property.\n *\n * @param listener listener of the property.\n */\n void addPropertyListener(PropertyListener listener);\n\n /**\n * Removes a listener for this property.\n *\n * @param listener listener to be removed\n */\n void removePropertyListener(PropertyListener listener);\n}", "private String getCriterionValueValue()\n {\n return getConvertedValue(myCriterionValue.get());\n }", "public DoubleProperty valueProperty() {\n return value;\n }", "private Map<String,String> processByLocale(List<PropertyFieldValue> fieldValueList, String locale) {\n\t\tInteger selectedIndex = 0;\n\t\tInteger currentIndex = 0;\n\t\tboolean foundLanguageEntry = false;\n\t\tInteger localeEquivalent = FlatParserConstants.localeEquivalent(locale);\n\t\tfor(PropertyFieldValue fieldValue : fieldValueList){\n\t\t\tInteger data1Entry = fieldValue.getData1().getIntVal();\n\t\t\tif(data1Entry == localeEquivalent){\n\t\t\t\tselectedIndex = currentIndex;\n\t\t\t\tfoundLanguageEntry = true;\n\t\t\t}\n\t\t\tcurrentIndex++;\n\t\t}\n\t\tPropertyFieldValue fieldValue = fieldValueList.get(selectedIndex);\n\t\tMap<String, String> result = new HashMap<>();\n\t\tresult.put(TEXT_KEY, fieldValue.getData2().getStrVal());\n\t\tresult.put(FOUND_KEY, String.valueOf(foundLanguageEntry));\n\t\treturn result;\n\t}" ]
[ "0.57367307", "0.5511194", "0.5258048", "0.5197999", "0.5126511", "0.5102394", "0.5064854", "0.5056423", "0.503836", "0.5035531", "0.5027978", "0.50225526", "0.4945667", "0.48733047", "0.48728496", "0.48445025", "0.4837523", "0.47903663", "0.47825035", "0.47742635", "0.47707126", "0.47607216", "0.47594938", "0.47428906", "0.47428906", "0.47425437", "0.47395825", "0.47236487", "0.47179323", "0.47112963", "0.46988156", "0.46903887", "0.46885386", "0.46834284", "0.4680167", "0.46761748", "0.46725667", "0.46619728", "0.46586207", "0.46578822", "0.4655363", "0.46508554", "0.4643173", "0.46416855", "0.4637781", "0.4635401", "0.46190345", "0.4615845", "0.4612799", "0.45888683", "0.458124", "0.45799607", "0.45799607", "0.45799607", "0.45788115", "0.45769432", "0.45741528", "0.45682257", "0.4566882", "0.4562352", "0.45601308", "0.45552245", "0.45511365", "0.45469925", "0.4543411", "0.45433185", "0.45428735", "0.45425352", "0.45361108", "0.45198336", "0.45168328", "0.45128506", "0.45053315", "0.4499353", "0.44966713", "0.44870788", "0.44857275", "0.44788358", "0.44742826", "0.44612172", "0.4460296", "0.44586062", "0.4456789", "0.4448834", "0.444771", "0.44435638", "0.4441355", "0.44367605", "0.4434352", "0.4433967", "0.44331393", "0.44272494", "0.44190738", "0.44175097", "0.44157887", "0.4411199", "0.4401684", "0.43975726", "0.43962696", "0.43900785" ]
0.4702241
30
Created by Min on 2017/5/5.
public interface IMorePersonalInfoView { void getMorePersonalInfoData(String userId); void setMorePersoalInfoData(MorePersonalInfo info); void showError(String errorString); void setHobby(String hobbys); void saveSucceed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\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}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo4359a() {\n }", "private void m50366E() {\n }", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n public void init() {\n\n }", "private void kk12() {\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}", "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 int describeContents() { return 0; }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void init() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void init() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "private void strin() {\n\n\t}", "@Override\n\tpublic void one() {\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}", "public void mo6081a() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "public void mo55254a() {\n }", "@Override\n public void init() {}", "@Override\n protected void initialize() \n {\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 Rekenhulp()\n\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 }", "@Override\r\n\tpublic void init() {}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo12628c() {\n }", "@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 protected void init() {\n }", "public void mo21877s() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo12930a() {\n }", "@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 nefesAl() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n public int getSize() {\n return 1;\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void m23075a() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }" ]
[ "0.58857864", "0.5737228", "0.5651466", "0.56168145", "0.55968475", "0.5591622", "0.5586494", "0.5586494", "0.55698216", "0.55674607", "0.5542803", "0.5516095", "0.5501331", "0.545104", "0.5432239", "0.54198533", "0.5410276", "0.5402595", "0.5398907", "0.5390864", "0.53907406", "0.53797334", "0.53680056", "0.5359509", "0.53591734", "0.5352456", "0.5349205", "0.5349205", "0.5349205", "0.5349205", "0.5349205", "0.5345823", "0.5345823", "0.5345823", "0.5345823", "0.5345823", "0.5345823", "0.5345823", "0.5337589", "0.53253585", "0.53251994", "0.5322837", "0.5309984", "0.52811176", "0.52752686", "0.52726865", "0.5271705", "0.52657026", "0.52654034", "0.5265308", "0.52651876", "0.52530056", "0.5246187", "0.524559", "0.5236742", "0.5236742", "0.5236742", "0.52344", "0.52278364", "0.52274835", "0.521634", "0.521634", "0.5209079", "0.5207292", "0.5204299", "0.52019733", "0.52019733", "0.52019733", "0.52004427", "0.5197872", "0.5197872", "0.5197872", "0.5197872", "0.5197872", "0.5197872", "0.5197217", "0.5197068", "0.5196286", "0.5196286", "0.519362", "0.5189908", "0.51863086", "0.51863086", "0.51863086", "0.51803046", "0.5173102", "0.51721275", "0.5170485", "0.5165444", "0.5165444", "0.515388", "0.514512", "0.51434404", "0.5140225", "0.5139244", "0.5136528", "0.51315784", "0.51306844", "0.5108295", "0.5105937", "0.51043177" ]
0.0
-1
make a new Node with the same node val but new children
Node<X> make(Node<X> left, Node<X> right);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node constructInternal(List<Node> children){\r\n\r\n // Base case: root found\r\n if(children.size() == 1){\r\n return children.get(0);\r\n }\r\n\r\n // Generate parents\r\n boolean odd = children.size() % 2 != 0;\r\n for(int i = 1; i < children.size(); i += 2){\r\n Node left = children.get(i-1);\r\n Node right = children.get(i);\r\n Node parent = new Node(Utility.SHA512(left.hash + right.hash), left, right);\r\n children.add(parent);\r\n }\r\n\r\n // If the number of nodes is odd, \"inherit\" the remaining child node (no hash needed)\r\n if(odd){\r\n children.add(children.get(children.size() - 1));\r\n }\r\n return constructInternal(children);\r\n }", "Node replaceChild(Node newChild, Node oldChild);", "public Node makeNode(Document xmlDoc) {\r\n Element out = xmlDoc.createElement(this.parent.getHeader());\r\n this.parent.updateSave();\r\n if (this.nodeText != null) {\r\n out.setTextContent(nodeText);\r\n }\r\n this.makeAtributes(out);\r\n for (int i = 0; i < this.children.size(); i++) {\r\n out.appendChild(this.children.get(i).makeNode(xmlDoc));\r\n }\r\n return out;\r\n}", "@SuppressWarnings(\"unchecked\")\n protected synchronized T newChild() {\n try {\n T t = ((Class<T>)getClass()).newInstance();\n t.isRootNode = false;\n \n if( ! isRootNode ) {\n if( children == null ) children = new ArrayList<T>();\n children.add( t );\n }\n \n return t;\n } catch( Exception ex ) {\n throw new RuntimeException(ex);\n }\n }", "public Node newChild(String name) {\n assert name != null;\n Node n = new Node(name);\n this.e.appendChild(n.e);\n return n;\n }", "Node(E value) {\n this.value = value;\n this.childen = new ArrayList<>();\n }", "public static Node buildNextNode(Node Parent, Point newSpace){\r\n //start with a blank node\r\n Node child = new Node();\r\n \r\n //point its parent to the root node\r\n child.parent = Parent;\r\n \r\n //copy the parent's state\r\n for (int i = 0; i<puzzleSize; i++){\r\n for (int j = 0; j<puzzleSize; j++)\r\n child.state[i][j] = Parent.state[i][j];\r\n }\r\n \r\n //add 1 to the depth\r\n child.depth = Parent.depth + 1;\r\n \r\n //set the space to the argument provided\r\n child.setSpace(newSpace);\r\n \r\n //find value in position of newSpace, replace with zero\r\n int x = (int)newSpace.getX();\r\n int y = (int)newSpace.getY();\r\n int val = child.getState()[x][y];\r\n child.setState(x, y ,0);\r\n \r\n // find previous space, replace with value\r\n Point oldSpace = Parent.getSpace();\r\n int i = (int)oldSpace.getX();\r\n int j = (int)oldSpace.getY();\r\n child.setState(i, j, val);\r\n \r\n return child;\r\n }", "private void addNode(Node<E> node, E value) {\n if (node.children == null) {\n node.children = new ArrayList<>();\n }\n node.children.add(new Node<>(value));\n }", "void create(Node node) {\n if (node.table.negatives() == 0) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n if (node.table.positives() == 0) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n\r\n //If no test split the data, make it a leaf with the majoriti of the target atribute\r\n int atr;\r\n //Choose the best atribute\r\n atr = this.chooseBestAtrib(node);\r\n node.atribute = atr;\r\n\r\n //No atribute split the data, so make the node a leaf with the majoriti of the class (either positive or negative)\r\n if (node.atribute == -1) {\r\n //System.out.println(\"Atribute is -1 in TeeBuidler.create\");\r\n if (node.table.negatives() > node.table.positives()) {\r\n node.atribute = 0;\r\n return;\r\n }\r\n if (node.table.positives() >= node.table.negatives()) {\r\n node.atribute = 1;\r\n return;\r\n }\r\n }\r\n\r\n Table table_left = new Table(), table_right = new Table();\r\n node.table.splitByAtrib(node.atribute, table_left, table_right);\r\n\r\n //Create two children for the current node //parameters: identifier,parent_result,atribute of split,id_child1, id_child2, table\r\n node.child_left = new Node(node.id + node.id, \"1\", -1, -1, -1, table_left);\r\n node.child_right = new Node(node.id + node.id+1, \"0\", -1, -1, -1, table_right);\r\n node.id_child_left = node.id + node.id;\r\n node.id_child_right = node.id + node.id+1;\r\n\r\n\r\n TreeBuilder builder = new TreeBuilder();\r\n builder.create(node.child_left);\r\n builder.create(node.child_right);\r\n\r\n }", "public Node appendNode(Node node);", "public Node(Board board){\n children = new ArrayList<>();\n counter = 0;\n this.board = board;\n parent = null;\n }", "public void createTree() {\n\t\taddNodeToParent(nodeMap);\n\t}", "public Node newChild(String name, String content) {\n Node n = new Node(name);\n n.e.appendChild(d.createTextNode(content));\n this.e.appendChild(n.e);\n return n;\n }", "public Node()\n {\n this.name=\"/\";\n this.type=0;\n this.stage=0;\n children=new ArrayList<Node>();\n }", "private ArrayList<String> makeChildren(Node current) {\n\n ArrayList<String> current_children = new ArrayList<>();\n\n if (current != null && current.getDigit().last_changed != 0) {\n //-1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n String child_node = current.getDigit().decreaseFirstDigit();\n current_children.add(child_node);\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n String child_node = current.getDigit().increaseFirstDigit();\n current_children.add(child_node);\n }\n }\n\n if (current != null && current.getDigit().last_changed != 1) {\n //-1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n String child_node = current.getDigit().decreaseSecondDigit();\n current_children.add(child_node);\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n String child_node = current.getDigit().increaseSecondDigit();\n current_children.add(child_node);\n }\n }\n\n if (current != null && current.getDigit().last_changed != 2) {\n //-1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n String child_node = current.getDigit().decreaseThirdDigit();\n current_children.add(child_node);\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n String child_node = current.getDigit().increaseThirdDigit();\n current_children.add(child_node);\n }\n }\n return current_children;\n }", "private void copy(Node node){\n parent_ = node.parent_;\n size_ = node.size_;\n for(int i = 0; i < size_; i++)\n children_[i] = node.children_[i];\n }", "TreeNode addChild(TreeNode node);", "private Node(int c) {\n this.childNo = c; // Construct a node with c children.\n }", "private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}", "public abstract void addChild(Node node);", "public void setChildren(List<BTreeNode<E>> newChildren) {\n\t\t//not adding in order, but does not matter because list is empty, and you will only call this method when the children are in order\n\t\tchildren.addAll(newChildren);\n\t\tfor (BTreeNode<E> child: newChildren) {\n\t\t\tchild.parent = this;\n\t\t}\n\t}", "private static <K, V> void recursiveCloner(Position<Entry<K, V>> v, AVLTree<K, V> original, Position<Entry<K, V>> v2, AVLTree<K, V> NewTree) {\n\n if (original.hasLeft(v)) {\n NewTree.insertLeft(v2, original.left(v).element());\n recursiveCloner(original.left(v), original, NewTree.left(v2), NewTree);\n }\n if (original.hasRight(v)) {\n NewTree.insertRight(v2, original.right(v).element());\n recursiveCloner(original.right(v), original, NewTree.right(v2), NewTree);\n }\n if(v2.element()!=null) {\n \t//assign the height to current parent node\n\t\t\tNewTree.setHeight(v2);\n\t\t}\n }", "private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = new Node(7);\r\n\t\tb.left.right = new Node(4);\r\n\r\n\t\t//sample nodes which are identical\r\n\t\ta1 = new Node(1);\r\n\t\ta1.left = new Node(3);\r\n\t\ta1.left.left = new Node(5);\r\n\t\ta1.right = new Node(2);\r\n\r\n\r\n\t\tb1 = new Node(1);\r\n\t\tb1.left = new Node(3);\r\n\t\tb1.right = new Node(2);\r\n\t\tb1.left.left = new Node(5); \r\n\t}", "private Node constructParsedTree(Node[] nodes) {\n int rootIndex = 0;\n for (int i = 0; i < nodes.length; i++) {\n if (nodes[i].getFather() > 0)\n nodes[nodes[i].getFather() - 1].addChild(nodes[i]);\n else\n rootIndex = i;\n }\n return nodes[rootIndex];\n }", "@Test\n public void insertNew_getChildren_ChangeParent_TestHeight()\n throws Exception {\n insertNewTree(\"tree/normal_1.json\");\n List<Map> children =getChildren(1L);\n Assert.assertEquals(children.get(0).get(\"id\"), 2);\n Assert.assertEquals(children.get(0).get(\"height\"), 1);\n\n Assert.assertEquals(children.get(1).get(\"id\"), 3);\n Assert.assertEquals(children.get(2).get(\"id\"), 4);\n\n changeParent(2L,4L);\n\n children = getChildren(4L);\n Assert.assertEquals(children.get(0).get(\"id\"), 2);\n Assert.assertEquals(children.get(0).get(\"height\"), 2);\n }", "public void insertNewNode(int newElement ) \n { \n current = parent = grand = header; //set header value to current, parent, and grand node \n nullNode.element = newElement; //set newElement to the element of the null node \n \n //repeat statements until the element of the current node will not equal to the value of the newElement \n while (current.element != newElement) \n { \n great = grand; \n grand = parent; \n parent = current; \n \n //if the value of the newElement is lesser than the current node element, the current node will point to the current left child else point to the current right child. \n current = newElement < current.element ? current.leftChild : current.rightChild; \n \n // Check whether both the children are RED or NOT. If both the children are RED change them by using handleColors() method \n if (current.leftChild.color == RED && current.rightChild.color == RED) \n handleColors( newElement ); \n } \n \n // insertion of the new node will be fail if will already present in the tree \n if (current != nullNode) \n return; \n \n //create a node having no left and right child and pass it to the current node \n current = new RedBlackNode(newElement, nullNode, nullNode); \n \n //connect the current node with the parent \n if (newElement < parent.element) \n parent.leftChild = current; \n else \n parent.rightChild = current; \n handleColors( newElement ); \n }", "public Node newSibling(String name) {\n Node n = new Node(name);\n this.e.getParentNode().appendChild(n.e);\n return n;\n }", "public abstract Node copy();", "public Node(String value)\n\t{\n\t\tthis.children = new ArrayList<Node>();\n\t\tthis.value = value;\n\t}", "public Node(final E knew, final Object vnew, final Node<E,V> l) {\r\n this.kcount = l.kcount;\r\n \r\n // determine which elements of l.k should precede knew (will be 0...i-1)\r\n int i = 0;\r\n for (;i<kcount;i++) {\r\n if (less(knew, (E)l.k[i])) break;\r\n }\r\n this.c = new AtomicReferenceArray<Node>(kcount+1);\r\n // add children with keys preceding knew\r\n for (int j=0;j<i;j++) {\r\n this.c.set(j, new Node<E,V>(l.k[j], l.v[j]));\r\n }\r\n // add <knew, vnew>\r\n this.c.set(i, new Node<E,V>(knew, vnew));\r\n // add children with keys following knew\r\n for (int j=i;j<kcount;j++) {\r\n this.c.set(j+1, new Node<E,V>(l.k[j], l.v[j]));\r\n }\r\n\r\n this.k = new Object[kcount];\r\n for (int j=0;j<kcount;j++) {\r\n this.k[j] = this.c.get(j+1).k[0];\r\n }\r\n this.v = null; // internal node, so no values are stored here.\r\n }", "public void createNode()\r\n\t{\r\n\t\tTreeNode first=new TreeNode(1);\r\n\t\tTreeNode second=new TreeNode(2);\r\n\t\tTreeNode third=new TreeNode(3);\r\n\t\tTreeNode fourth=new TreeNode(4);\r\n\t\tTreeNode fifth=new TreeNode(5);\r\n\t\tTreeNode sixth=new TreeNode(6);\r\n\t\tTreeNode seventh=new TreeNode(7);\r\n\t\tTreeNode eight=new TreeNode(8);\r\n\t\tTreeNode nine=new TreeNode(9);\r\n\t\troot=first;\r\n\t\tfirst.left=second;\r\n\t\tfirst.right=third;\r\n\t\tsecond.left=fourth;\r\n\t\tthird.left=fifth;\r\n\t\tthird.right=sixth;\r\n\t\tfifth.left=seventh;\r\n\t\tseventh.right=eight;\r\n\t\teight.left=nine;\r\n\t\t\r\n\t}", "public Node newSibling(String name, String content) {\n Node n = new Node(name);\n n.e.appendChild(d.createTextNode(content));\n this.e.getParentNode().appendChild(n.e);\n return n;\n }", "public Node(T value) {\n this.value = value;\n this.height = 0;\n this.leftChild = null;\n this.rightChild = null;\n this.parent = null;\n }", "private void createChildrenNodes(ChessGameNode rootNode) {\r\n\t\tBoardState nextState;\r\n\t\tChessGameNode newNode;\r\n\t\tchar currentPlayer = rootNode.getPlayer();\r\n\r\n\t\tgenerateLegalMovesPlayer(currentPlayer);\r\n\t\trootNode.allocateSpaceForChildren(this.moveList.length);\r\n\r\n\t\tfor (int i = 0; i < this.moveList.length; i++) {\r\n\t\t\tif (this.moveList[i] != null) {\r\n\t\t\t\tnextState = makeMove(rootNode, this.moveList[i]);\r\n\t\t\t\tif (currentPlayer == 'w') {\r\n\t\t\t\t\tnewNode = new ChessGameNode(nextState, 'b', this.moveList[i]);\r\n\t\t\t\t\tnewNode.setValue();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tnewNode = new ChessGameNode(nextState, 'w', this.moveList[i]);\t\r\n\t\t\t\t\tnewNode.setValue();\r\n\t\t\t\t}\r\n\t\t\t\trootNode.setChildrenNode(i, newNode);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void buildDoublesNode(Document document, NodeList childList, Node newHead) {\n Element doublNode = document.createElement(\"item\");\n Element doublID = document.createElement(\"id\");\n Element doublParent = document.createElement(\"parent\");\n doublNode.appendChild(doublID);\n doublNode.appendChild(doublParent);\n for (int i = 0; i < childList.getLength(); i++) {\n if (childList.item(i).getNodeName().equals(\"id\"))\n doublID.setTextContent(childList.item(i).getTextContent());\n if (childList.item(i).getNodeName().equals(\"parent\")) {\n NodeList parentItemList = childList.item(i).getChildNodes();\n for (int j = 0; j < parentItemList.getLength(); j++) {\n if (parentItemList.item(j).getNodeName().equals(\"item\")) {\n Element innerParentItem = document.createElement(\"item\");\n innerParentItem.setTextContent(parentItemList.item(j).getTextContent());\n doublParent.appendChild(innerParentItem);\n }\n }\n }\n }\n newHead.appendChild(doublNode);\n }", "@Test\n public void whenAddNodesOnDifferentLevelsThenResultThreeNodeFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 2, 1]\"));\n }", "private Node putHelper(Node n, K key, V value) {\n if (n == null) {\n n = new Node(key, value);\n } else if (key.compareTo(n.key) < 0) {\n n.leftChild = putHelper(n.leftChild, key, value);\n } else if (key.compareTo(n.key) > 0) {\n n.rightChild = putHelper(n.rightChild, key, value);\n }\n\n return n;\n }", "public Node(Node parent, Board board){\n children = new ArrayList<>();\n counter = 0;\n this.parent = parent;\n this.board = board;\n }", "private Node createNode(EventPair ep, Color c, Node parent) {\n Node node = new Node();\n node.ID = ep.ID;\n node.count = ep.count;\n node.color = c;\n node.left = createNullLeaf(node);\n node.right = createNullLeaf(node);\n node.parent = parent;\n return node;\n }", "Node(Object newItem){\n item = newItem; //--points to a different\n next = null;\n }", "protected void makeTheTree(){\n\n structure.getRootNode().branchList.add(structure.getNode11());\n structure.getRootNode().branchList.add(structure.getNode12());\n structure.getRootNode().branchList.add(structure.getNode13());\n\n structure.getNode11().branchList.add(structure.getNode111());\n structure.getNode11().branchList.add(structure.getNode112());\n structure.getNode11().branchList.add(structure.getNode113());\n\n structure.getNode13().branchList.add(structure.getNode131());\n\n structure.getNode112().branchList.add(structure.getNode1121());\n\n }", "public void addChild(Node n) {\n\t\taddChild(n, (rand.nextDouble()*0.02 - 0.01));\n\t}", "public void add(int value, String name){\n \n Node newNode = new Node(value, name); //Intialize new node \n \n if(root == null){ //If the root is null \n root = newNode; //Set newNode to the root \n }\n else{ \n Node myNode = root; //Create a second new node\n Node parent; //Crete a parent Node \n\n while (true) { //While true....\n \n parent = myNode;//Set parent node to myNode\n \n if (value < myNode.value) { //If the value is less than my node \n \n myNode = myNode.left; //Set myNode to left \n \n if (myNode == null) { //If the value of myNode is null \n \n parent.left = newNode; //Set the left parent node to newNode\n return; \n \n }\n }else {\n \n myNode = myNode.right; //Set myNode to the right Node\n \n if (myNode == null) {\n \n parent.right = newNode; //Set the right node to the newNode\n return;\n \n }\n\n }\n\n }\n \n }\n \n \n }", "private ITree.Node createNode(int i) {\n if (i < currentSize) {\n ITree.Node node = new ITree.Node(this.elements[i]);\n node.setLeftNode(createNode(this.leftChild(i)));\n node.setRightNode(createNode(this.rightChild(i)));\n\n return node;\n }\n return null;\n }", "void makeTree()\n \t{\n \t\t\t \n \t\tobj.insert(5,\"spandu\");\n \tobj.insert(4,\"anshu\");\n \tobj.insert(3,\"anu\");\n \tobj.insert(6,\"himani\");\n \t\t\n \t}", "public Node()\n\t{\n\t\toriginalValue = sumValue = 0;\n\t\tparent = -1;\n\t}", "private TypeNode addNode (String parentName, TypeDescription childTypeMetadata) \n {\t\n // Find \"parent\" node\n if (parentName != null && parentName.trim().length() == 0) {\n parentName = null;\n }\n TypeNode nodeParent = null;\n if (parentName != null) {\n nodeParent = (TypeNode) _nodesHashtable.get(parentName);\n }\n \n // Find \"child\" node\n String childName = childTypeMetadata.getName();\n \tTypeNode node = (TypeNode) _nodesHashtable.get(childName);\n\n \t// System.err.println(\" parentName: \" + parentName + \" ; childName: \" + childName);\n \n // NEW type definition ?\n \tif ( node == null ) {\t\t\n \t\t// Not found \"child\". NEW type definition.\n \t\tif ( nodeParent == null ) {\n // Parent is NEW\n // TOP has null parent\n if (parentName != null) {\n TypeDescription typeParent = getBuiltInType(parentName);\n if (typeParent != null) {\n // Built-in Type as Parent\n nodeParent = addNode (typeParent.getSupertypeName(), typeParent);\n // Trace.trace(\" -- addNode: \" + childName + \" has New Built-in Parent: \" + parentName);\n } else { \n \t\t\t// NEW parent also.\n // \"parentName\" is FORWARD Reference Node\n \t\t\tnodeParent = insertForwardedReferenceNode(_rootSuper, parentName); \n // Trace.trace(\" -- addNode: \" + childName + \" has New FORWARD Parent: \" + parentName);\n }\n }\n \t\t}\n \t\t// System.out.println(\" -- addNode: New child\");\t\t\n \t\treturn insertNewNode (nodeParent, childTypeMetadata);\n \t}\n \t\n //\n // childTypeMetadata is ALREADY in Hierarchy\n //\n \n \t// This node can be a Forwarded Reference type\n \tif (node.getObject() == null) {\n \t\t// Set Object for type definition\n \t\t// Reset label.\n \t\t// Trace.trace(\"Update and define previously forwarded reference type: \"\n \t\t//\t\t+ node.getLabel() + \" -> \" + parentName);\n // Need to \"remove\" and \"put\" back for TreeMap (no modification is allowed ?)\n node.getParent().removeChild(node);\n \t\tnode.setObject(childTypeMetadata);\n node.setLabel(childTypeMetadata.getName());\n node.getParent().addChild(node);\n \n // Remove from undefined types\n // Trace.trace(\"Remove forward ref: \" + childTypeMetadata.getName());\n _undefinedTypesHashtable.remove(childTypeMetadata.getName());\n \t}\n \t\n \tif (parentName == null) {\n \t\t// NO Parent\n if (childTypeMetadata.getName().compareTo(UIMA_CAS_TOP) != 0) {\n Trace.err(\"??? Possible BUG ? parentName==null for type: \"\n + childTypeMetadata.getName());\n }\n \t\treturn node;\n \t}\n \t\n \t// Found \"child\".\n \t// This node can be the \"parent\" of some nodes \n \t// and it own parent is \"root\" OR node of \"parentName\".\n \tif ( node.getParent() == _rootSuper ) {\n \t\t// Current parent is SUPER which may not be the right parent\n \t\t// if \"node\" has a previously forward referenced parent of some type.\n \t\t// Find the real \"parent\".\n \t\tif ( nodeParent != null ) {\n \t\t // Parent node exists. \n \t\t\tif ( nodeParent != _rootSuper ) {\n \t\t\t // Move \"node\" from \"root\" and put it as child of \"nodeParent\"\n \t\t\t\t// Also, remove \"node\" from \"root\"\n \t\t\t // _rootSuper.getChildren().remove(node.getLabel());\n // System.out.println(\"B remove\");\n \t\t\t if (_rootSuper.removeChild(node) == null) {\n System.out.println(\"??? [.addNode] Possible BUG 1 ? cannot remove \"\n + node.getLabel() + \" from SUPER\");\n System.out.println(\" node: \" + ((Object)node).toString()); \n Object[] objects = _rootSuper.getChildrenArray();\n for (int i=0; i<objects.length; ++i) {\n System.out.println(\" \" + objects[i].toString()); \n } \n }\n // System.out.println(\"E remove\");\n \t\t\t} else {\n \t\t\t\t// \"nodeParent\" is \"SUPER\".\n \t\t\t\treturn node;\n \t\t\t}\n \t\t} else {\n \t\t\t// NEW parent\n\t\t\t\t// Remove \"node\" from \"SUPER\" and insert it as child of \"nodeParent\"\n\t\t\t // _rootSuper.getChildren().remove(node);\n if (_rootSuper.removeChild(node) == null) {\n System.err.println(\"??? [.addNode] Possible BUG 2 ? cannot remove \"\n + node.getLabel() + \" from SUPER\");\n }\t\t\t \n TypeDescription typeParent = getBuiltInType(parentName);\n if (typeParent != null) {\n // Built-in Type as Parent\n nodeParent = addNode (typeParent.getSupertypeName(), typeParent);\n // Trace.trace(\" -- addNode 2: \" + childName + \" has New Built-in Parent: \" + parentName);\n } else { \n \t\t\t // It is a NEW parent and this parent is forwarded reference (not defined yet). \n \t\t\t // Insert this parent as child of \"SUPER\"\n \t\t\t\tnodeParent = insertForwardedReferenceNode(_rootSuper, parentName);\n // Trace.trace(\" -- addNode 2: \" + childName + \" has New FORWARD Parent: \" + parentName);\n }\n \t\t}\t\t\t\t\n \t\tTypeNode tempNode;\n \t\tif ( (tempNode = nodeParent.insertChild(node)) != null && tempNode != node) {\n \t\t\t// Duplicate Label\n Trace.err(\"Duplicate Label 1\");\n// \t\t\tnode.setShowFullName(true);\n \t\t\tif (node.getObject() != null) {\n \t\t\t\tnode.setLabel(((TypeDescription)node.getObject()).getName());\n \t\t\t}\t\t\t\t\n \t\t\tnodeParent.insertChild(node);\n \t\t}\n \t} else if ( node.getParent() != null ) {\n \t //\n \t //\tERROR !!!\n \t\t// \"duplicate definition\" or \"have different parents\"\n \t //\n \t \n \t // \"nodeParent\" should be non-null and be the same as \"node.getParent\"\n \t // In this case, it is duplicate definition\n \t if ( nodeParent != null ) {\n \t if (nodeParent == node.getParent()) {\n \t\t\t\t// Error in descriptor\n \t\t // Duplicate definition\n \t\t\t\t// System.err.println(\"[TypeSystemHierarchy - addNode] Duplicate type: child=\" + childName + \" ; parent =\" + parentName);\n \t } else {\n \t // Error: \"node\" has different parents\n \t // Both parents are registered\n \t\t\t\tSystem.err.println(\"[TypeSystemHierarchy - addNode] Different registered parents: child=\" + childName \n \t\t\t\t + \" ; old node.getParent() =\" + node.getParent().getLabel()\n \t\t\t\t + \" ; new parent =\" + parentName);\n \t }\n \t } else {\n \t // Error \n // Error: \"node\" has different parents\n // Old parent is registered\n \t // New parent is NOT registered\n \t\t\tSystem.err.println(\"[TypeSystemHierarchy - addNode] Different parents: child=\" + childName \n \t\t\t + \" ; old registered node.getParent() =\" + node.getParent().getLabel()\n \t\t\t + \" ; new NON-registered parent =\" + parentName);\n \t }\n \t return null; // ERROR\n \n \t} else {\n \t\t//\n \t // Program BUG !!!\n \t\t// since Parent of \"registered\" node cannot be null.\n // if (childTypeMetadata.getName().compareTo(UIMA_CAS_TOP) != 0) {\n System.err.println(\"[TypeSystemHierarchy - addNode] Program BUG !!! (node.getParent() == null): child=\" + childName + \" ; parent =\" + parentName);\n return null;\n // }\n \t}\n \t\t\n \treturn node;\n }", "public Node(Node cloneNode) {\n\t\tthis.name = cloneNode.getName();\n\t\tthis.type = cloneNode.getType();\n\t\tthis.setX(cloneNode.getX());\n\t\tthis.setY(cloneNode.getY());\n\t\tthis.position = new Vector2(cloneNode.getPosition());\n\t}", "private static Node createNode(int value) {\n\t\treturn new Node(value);\n\t}", "static BTNode newNode(int k)\r\n{\r\n\tBTNode temp = new BTNode();\r\n temp.key = k;\r\n temp.left = temp.right = null;\r\n return temp;\r\n}", "private MockTopologyNode createMockNode(MockTopologyNode parent, String nodeName, String typeHint, long freq,\n long timestamp, Boolean isId, Boolean isReplace){\n final MockTopologyNode result = (MockTopologyNode) parent.createNode(nodeName);\n result.setTypeHint(typeHint);\n result.setReplace(isReplace);\n result.setIsIdentity(isId);\n result.setNodeFrequency(freq);\n result.setNodeTimestamp(timestamp);\n\n return result;\n}", "public void createTree() {\n Node<String> nodeB = new Node<String>(\"B\", null, null);\n Node<String> nodeC = new Node<String>(\"C\", null, null);\n Node<String> nodeD = new Node<String>(\"D\", null, null);\n Node<String> nodeE = new Node<String>(\"E\", null, null);\n Node<String> nodeF = new Node<String>(\"F\", null, null);\n Node<String> nodeG = new Node<String>(\"G\", null, null);\n root.leftChild = nodeB;\n root.rightChild = nodeC;\n nodeB.leftChild = nodeD;\n nodeB.rightChild = nodeE;\n nodeC.leftChild = nodeF;\n nodeC.rightChild = nodeG;\n\n }", "public Node<E> createNode(E e) {\n Node<E> nodeFromCache = getNodeFromCache();\n if (nodeFromCache == null) {\n return super.createNode(e);\n }\n nodeFromCache.setValue(e);\n return nodeFromCache;\n }", "public void addToList(Node newChildren) {\n \tthis.children.add(newChildren);\n }", "public Node (Object newItem) {\n next = null; // set intially to null\n item = newItem;\n }", "private BTNode createNode() {\n BTNode btNode;\n btNode = new <DataPair>BTNode ();\n btNode.mIsLeaf = true;\n btNode.mCurrentKeyNum = 0;\n return btNode;\n }", "TNode createTNode();", "public TreeImpl(T dato) {\r\n\t\traiz = new NodeImpl<T>(dato, null);// El null dice que es raiz\r\n\t}", "private static Node buildSmallerTree() {\n\t\tNode root = createNode(10);\n\t\troot.leftChild = createNode(25);\n\t\troot.rightChild = createNode(25);\n\t\troot.leftChild.leftChild = createNode(13);\n\t\troot.rightChild.rightChild = createNode(7);\n\t\troot.leftChild.rightChild = createNode(27);\n\t\t\n\t\treturn root;\n\t}", "private static TreeNode getNode() {\n TreeNode treeNode = new TreeNode(1);\n TreeNode left = new TreeNode(2);\n TreeNode right = new TreeNode(3);\n treeNode.left = left;\n treeNode.right = right;\n\n left.left = new TreeNode(4);\n right.left = new TreeNode(5);\n right.right = new TreeNode(6);\n return treeNode;\n }", "public Node getNewNode(){\n for (Node n:nodes) {\n if(n.isNewTag()){\n return n;\n }\n }\n return null;\n }", "protected void setChildren(Node n1, Node n2) {\r\n children[0] = n1;\r\n children[1] = n2;\r\n }", "public void addChild(TreeItem t) {\n\t\tleaves = null;\n\t\ttreeLeaves = null;\n\t\tdecideNorm = false;\n\t\tItem newKids[] = new Item[numChildren+1];\n\t\tfor (int i = 0; i < numChildren; i++)\n\t\t\tnewKids[i] = children[i];\n\t\tnewKids[numChildren] = t;\n\t\tchildren = newKids;\n\t\tnumChildren++;\n\t\tsetHashCode();\n\t\tsetNumNodes();\n\t}", "public void replaceNodes() {\n for (ConstantPropagationInformation information : constantPropagations) {\n information.parent.getChildren().set(information.childIndex, information.replacement);\n }\n }", "public void addNode(Node node){subNodes.add(node);}", "public abstract TreeNode copy();", "private void initSubNodes()\n {\n children = createSubNodes(false);\n attributes = createSubNodes(true);\n }", "private AbstractJSObject createNodeWrapper(Node node) {\n return new XmlNodeWrapper(node);\n }", "void nodeCreate( long id );", "void createNode(NodeKey key);", "public BinaryNode copy() {\n\t\tBinaryNode newRoot = new BinaryNode(data);\n\t\tif(leftChild != null)\n\t\t\tnewRoot.setLeftChild(leftChild.copy());\n\t\tif(rightChild != null)\n\t\t\tnewRoot.setRightChild(rightChild.copy());\n\t\treturn newRoot;\n\t}", "public Node( Item root ) {\r\n\t\t\tsuper( null, 0, INTERACTIVE, null );\r\n\t\t\tthis.root = root;\r\n\t\t\tthis.root.parent = this;\r\n\t\t\tthis.children = new Container( false );\r\n\t\t\tthis.children.parent = this;\r\n\t\t}", "public void refresh()\n\t{\n\t\tNode master = new Node(\"Tyler\");\n\t\t//master.add(new Node(\"Test\"));\n\t\tmaster.addParent(new Node(\"Clinton\"));\n\t\tmaster.addParent(new Node(\"Terry\"));\n\t\t\n\t\tmaster.add(\"Justin\", \"Terry\"); \n\t\tmaster.add(\"Justin\", \"Clinton\"); \n\t\t//this adds directly under Terry\n\t\t//maybe do this differently...\n\t\t\n\t\t\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"Diana\"));\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"George\"));\n\t\t\n\t\tmaster.add(new Node(\"Tyler 2.0\"));\n\t\tmaster.add(new Node(\"Tyler 3.0\"));\n\t\tmaster.add(new Node(\"Tyler Jr\"));\n\t\t\n\n\t\tmaster.add(\"Tyler Jr Jr\", \"Tyler 2.0\");\n\t\t\n\t\tmaster.add(\"Tyler 3.0\", \"Tyler Jr 2.0\");\n\t\t\n\t\tmaster.findNode(\"Clinton\").addParent(new Node(\"Eric\"));\n\t\tmaster.findNode(\"Eric\").addParent(new Node(\"Eric's Dad\"));\n\t\t\n\t\t\n\t\tmaster.findNode(\"Tyler Jr Jr\", 6).add(new Node(\"Mini Tyler\"));\n\t\t//master.findNode(\"Clinton\", 2).add(new Node(\"Justin\"));\n\t\t\n\t\t\n\t\tmaster.getParent().get(0).findNode(\"Justin\", 3).add(new Node(\"Mini Justin\"));\n\t\t\n\t\tmaster.add(new Node(\"Laptop\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Keyboard\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Mouse\"));\n\t\t\n\t\tmaster.add(\"Touchpad\", \"Laptop\");\n\t\t//master.add(\"Justin\", \"Eric\");\n\t\t\n\t\tmaster.add(\"Hunger\", \"Tyler\");\n\t\t\n\t\tselectedNode = master;\n\t\tselect(selectedNode);\n\t}", "public Node(int numberChildren){\n board = new Board();\n children = new Node[numberChildren];\n }", "Node<K, V> wrapNode(Node<K, V> node) throws IOException;", "Node(Team v){\r\n value = v;\r\n }", "private void updateLruWithNewNode(PageId pid, Page retrievedPage) {\n Node node = new Node(pid, retrievedPage);\n changeHead(node);\n bufferedPages.put(pid, node);\n }", "private DefaultMutableTreeNode buildSortedTree(DefaultMutableTreeNode oldNode, \n DefaultMutableTreeNode newNode) {\n \n List<DefaultMutableTreeNode> children = new ArrayList();\n Enumeration e = oldNode.children();\n while(e.hasMoreElements()) {\n DefaultMutableTreeNode child = (DefaultMutableTreeNode)e.nextElement();\n children.add(child);\n }\n \n // sort everything except the first level\n if (!(oldNode.getUserObject() instanceof RootNode)) {\n Collections.sort(children, new Comparator<DefaultMutableTreeNode>() {\n public int compare(DefaultMutableTreeNode node1, DefaultMutableTreeNode node2) {\n return node1.getUserObject().toString().compareTo(\n node2.getUserObject().toString());\n }\n });\n }\n \n for(DefaultMutableTreeNode oldChild : children) {\n DefaultMutableTreeNode newChild = new DefaultMutableTreeNode(oldChild.getUserObject());\n newNode.add(newChild);\n buildSortedTree(oldChild, newChild);\n }\n \n return newNode;\n }", "public BTNode(int value){ \r\n node = value; \r\n leftleaf = null;\r\n rightleaf = null;\r\n }", "public void insertNode(int val)\r\n {\r\n temp=new TriLinkNode();\r\n temp.v1=val;\r\n temp.d1=false;\r\n temp.i1=true;\r\n if(root==null)\r\n {\r\n root=temp;\r\n }else\r\n {\r\n recInsertNode(root);\r\n }\r\n \r\n }", "static Node newNode(int item) {\n Node temp = new Node();\n temp.key = item;\n temp.left = temp.right = null;\n return temp;\n }", "static Node newNode(int key) \n{ \n\tNode node = new Node(); \n\tnode.left = node.right = null; \n\tnode.data = key; \n\treturn node; \n}", "public Node<E> createNode(E e, Position<E> parent){\n Node<E> p = (Node<E>) parent;\n return new Node<>(e, p);\n }", "private void makeInvalidNode(final Document doc) {\n Element element;\n\n // create INVALID-textnode in DOM tree\n element = doc.createElement(\"mi\");\n element.setAttribute(\"mathcolor\", \"#F00\");\n element.appendChild(doc.createTextNode(\"#\"));\n\n if (this.getNode().getParentNode() == null) {\n doc.replaceChild(element, this.getNode());\n } else {\n this.getNode().getParentNode()\n .replaceChild(element, this.getNode());\n }\n\n // remove bi-subtree\n this.setNode(element);\n this.child = null;\n this.invalid = true;\n }", "private final void createAndAddNode(String name) {\n\t}", "@Test\n public void whenAddNineNodesOnDifferentLevelsThenResultNineNodesFromBottomToTop() {\n tree.addChild(nodeOne, \"1\");\n tree.addChild(new TreeNode(), \"1\");\n tree.addChild(new TreeNode(), \"1\");\n nodeOne.addChild(nodeTwo, \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeOne.addChild(new TreeNode(), \"2\");\n nodeTwo.addChild(nodeThree, \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n nodeTwo.addChild(new TreeNode(), \"3\");\n assertThat(tree.getChildren().toString(), is(\"[3, 3, 3, 2, 2, 2, 1, 1, 1]\"));\n }", "public void createChild (GenericTreeNode<String> daddy)\r\n\t{\r\n\t\t\tList < GenericTreeNode<String> > child= daddy.getChildren();\r\n\t\t\r\n\t\tif (daddy.getData().equalsIgnoreCase(\"next.CommonProfile.Dashboard_SI\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.Admin.Admin_Principal\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.Client.Client_Principal\"));\t\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.Member.Member_Principal\"));\t\r\n\t\t}\r\n\t\telse if (daddy.getData().equalsIgnoreCase(\"next.CommonProfile.Dashboard_SU\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t\t//child.add(new GenericTreeNode<String>(\"next.CommonProfile.DashboardPrincipal\"));\t\r\n\t\t}\r\n\t\telse if (daddy.getData().equalsIgnoreCase(\"next.Admin.Admin_Principal\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.CommonProfile.PersonalInfo\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.CommonProfile.Products\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.Admin.Business_Rules\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.view.support.CustomList\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t}\r\n\t\telse if (daddy.getData().equalsIgnoreCase(\"next.view.support.CustomList\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.MapsFunctionality\"));\r\n\t\t\t\r\n\t\t}else if (daddy.getData().equalsIgnoreCase(\"next.SupportFunctionality.MapsFunctionality\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tdaddy.setChildren(child);\r\n\t\t for (GenericTreeNode<String> node : daddy.getChildren()) {\r\n\t\t\t createChild (node);\r\n\t }\r\n\t}", "public interface Node {\n @Override\n String toString();\n\n void setValue(String value);\n\n void addAttribiute(String key1, String value);\n\n void addChild(Node child1);\n}", "static TreeNode newNode(int item) \n\t{ \n\t\tTreeNode temp = new TreeNode(); \n\t temp.key = item; \n\t temp.left = null; \n\t temp.right = null; \n\t return temp; \n\t}", "public Tree(T value, Tree<T> parent)\n {\n this.value = value;\n this.parent = parent;\n // initialize the empty arraylist of children\n children = new ArrayList<Tree<T>>();\n }", "public TreeNode(TreeNode parent, Object value)\r\n\t{\r\n\t\tm_parent = parent;\r\n\t\tm_value = value;\r\n\t}", "private void populateNewChildDirectory(DirectoryEntry newEntry) {\n try (ClusterStream stream = new ClusterStream(fileSystem,\n FileAccess.Write,\n newEntry.getFirstCluster(),\n 0xffffffff)) {\n // First is the self-referencing entry...\n DirectoryEntry selfEntry = new DirectoryEntry(newEntry);\n selfEntry.setName(FileName.SelfEntryName);\n selfEntry.writeTo(stream);\n // Second is a clone of our self entry (i.e. parent) - though dates\n // are odd...\n DirectoryEntry parentEntry = new DirectoryEntry(getSelfEntry());\n parentEntry.setName(FileName.ParentEntryName);\n parentEntry.setCreationTime(newEntry.getCreationTime());\n parentEntry.setLastWriteTime(newEntry.getLastWriteTime());\n parentEntry.writeTo(stream);\n } catch (IOException e) {\n throw new dotnet4j.io.IOException(e);\n }\n }", "private void fxml2Node(ViewsEnum fxml, Node node) {\n navBanner.getChildren().get(selectedMenuOption).getStyleClass().remove(\"selected_option\");\n int newIndex = navBanner.getChildren().indexOf(node);\n selectedMenuOption = (newIndex != -1) ? newIndex : selectedMenuOption;\n navBanner.getChildren().get(selectedMenuOption).getStyleClass().add(\"selected_option\");\n // Clean body\n Node tmp[] = new Node[2];\n tmp[0] = body.getChildren().get(0);\n tmp[1] = body.getChildren().get(1);\n body.getChildren().setAll(tmp[0], tmp[1]);\n // Load new content\n FXMLLoader fxmlLoader = new FXMLLoader();\n Node root = null;\n try {\n root = fxmlLoader.load(sample.Main.class.getResource(\"views/\" +fxmlList.get(fxml)+\".fxml\"));\n } catch (IOException e) {\n e.printStackTrace();\n }\n // Add new node\n body.getChildren().add(root);\n }", "TreeNode(TreeNode<T> parent, T value) {\n this.parent = parent;\n this.value = value;\n }", "private Node( T data_ )\n {\n data = data_;\n parent = this;\n }", "public TreeImpl(Node<T> padreDeTodo) {\r\n\t\traiz = padreDeTodo;\r\n\t}", "BaleElementEvent fixup()\n{\n if (line_elements.size() > 0) addLine();\n\n BaleElementEvent ee = new BaleElementEvent(root_element,new_children);\n root_element.clear();\n for (BaleElement be : new_children) root_element.add(be);\n BoardLog.logD(\"BALE\",\"ELEMENT FIXUP ROOT \" + new_children.size());\n\n return ee;\n}", "public abstract List<Node> expand();", "public abstract Type treeCopy();", "public BinaryNode(String dataPortion, BinaryNode newLeftChild, BinaryNode newRightChild) {\n\t\tdata = dataPortion;\n\t\tleftChild = newLeftChild;\n\t\trightChild = newRightChild;\n\t}" ]
[ "0.63614905", "0.63189465", "0.62084794", "0.6191411", "0.6152936", "0.60860986", "0.60662043", "0.60203534", "0.59918886", "0.5989672", "0.59616226", "0.59344035", "0.59337115", "0.5929879", "0.59280616", "0.5889462", "0.58838165", "0.5872015", "0.5870922", "0.58523524", "0.5848482", "0.5847357", "0.58297175", "0.5807231", "0.580234", "0.57955825", "0.5793946", "0.5781424", "0.57799125", "0.57733536", "0.5772138", "0.5762381", "0.5746852", "0.5740394", "0.5739344", "0.5727206", "0.57250863", "0.57173955", "0.5716644", "0.5711749", "0.5701366", "0.5681657", "0.56783026", "0.56743896", "0.56733483", "0.5667454", "0.5662607", "0.5662527", "0.5623436", "0.5623017", "0.5615947", "0.56028706", "0.5597094", "0.5596988", "0.5587658", "0.55872685", "0.5576279", "0.55730414", "0.55716366", "0.5569904", "0.5557227", "0.555218", "0.5551092", "0.55499244", "0.5545615", "0.5542463", "0.553553", "0.55342746", "0.5532334", "0.55302227", "0.5529037", "0.5524295", "0.55202043", "0.5517993", "0.54908484", "0.5490064", "0.54879797", "0.54831505", "0.54795843", "0.5479145", "0.5478301", "0.54755944", "0.54702467", "0.54686224", "0.54623777", "0.54605556", "0.5460375", "0.5457429", "0.5449529", "0.5447459", "0.54417545", "0.5440074", "0.5438133", "0.54368085", "0.5429946", "0.5429874", "0.54170036", "0.5416611", "0.54161805", "0.5415463" ]
0.5412764
100
if the element is already in the set, it is guaranteed that this function returns the same Node reference.
default Node<X> insert(X x, Comparator<X> ord) { int comp = ord.compare(x, val()); if (comp == 0) return this; if (comp < 0) { Node<X> l = left().insert(x, ord); if (l == left()) return this; else return make(l, right()); } else { Node<X> r = right().insert(x, ord); if (r == right()) return this; else return make(left(), r); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Node<E> findSet(Node<E> x) {\n if (x != x.parent) {\n Node<E> p = findSet(x.parent);\n x.parent.children.remove(x);\n p.children.add(x);\n x.parent = p;\n }\n return x.parent;\n }", "public void putIfAbsent(T item) {\n synchronized(this) {\n _treeSet.add(item);\n }\n }", "@Override\n public boolean contains(T item) {\n Node n = first;\n //walk through the linked list untill you reach the end\n while(n != null) {\n //see if the item exists in the set, if it does return true\n if(n.value.equals(item))\n return true;\n //move to the next node\n n = n.next;\n }\n //if not found return false\n return false;\n }", "public Node searchElement(Object el) {\n\t\n\t\tfor (Node elemento : this.set) {\n\t\t\tif(elemento.getElemento().equals(el)) {\n\t\t\t\treturn elemento;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public boolean addItem(T item) {\n //Make sure the item is not already in the set\n if(!this.contains(item)){\n //create a new node with the item, and the current first node\n Node n = new Node(item, first);\n //update first node reference\n first = n;\n //increment numItems\n numItems++;\n return true;\n }\n //if item is already in the set return false\n return false;\n }", "private static boolean putInHashMap(Node head) {\r\n\t\tboolean hasloop = false;\r\n\t\tHashSet<Node> nodeSet = new HashSet();\r\n\t\twhile (head != null) {\r\n\t\t\tif (nodeSet.contains(head)) {\r\n\t\t\t\thasloop = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tnodeSet.add(head);\r\n\t\t\thead = head.next;\r\n\t\t}\r\n\r\n\t\treturn hasloop;\r\n\t}", "protected /*@ non_null @*/ JMLObjectSet<E> fast_insert(E elem) {\n return new JMLObjectSet<E>( // cons() clones if necessary\n JMLListObjectNode.cons(elem, the_list),\n size+1);\n }", "private static boolean isUnivalNode(Node x, Set<Node> set) {\n if (x == null) { return true; }\n boolean left = isUnivalNode(x.left, set);\n boolean right = isUnivalNode(x.right, set);\n\n if (left && right) {\n boolean leftSubTree = x.left == null || x.left.val == x.val;\n boolean rightSubTree = x.right == null || x.right.val == x.val;\n if (leftSubTree && rightSubTree) {\n set.add(x);\n return true;\n }\n }\n return false;\n }", "@Override\n public boolean add(X x) {\n if (!allowElementsWithoutIdentification)\n throw new IllegalArgumentException(\"It is not allowed to put Elements without Identification in this Set\");\n\n return map.put(x, placeholder) == null;\n }", "public boolean add(E element){\n Object result = map.put(element, \"\");\n return (result == null);\n }", "public boolean add(Object x)\n {\n if (loadFactor() > 1)\n {\n resize(nearestPrime(2 * buckets.length - 1));\n }\n\n int h = x.hashCode();\n h = h % buckets.length;\n if (h < 0) { h = -h; }\n\n Node current = buckets[h];\n while (current != null)\n {\n if (current.data.equals(x))\n {\n return false; // Already in the set\n }\n current = current.next;\n }\n Node newNode = new Node();\n newNode.data = x;\n newNode.next = buckets[h];\n buckets[h] = newNode;\n currentSize++;\n return true;\n }", "private Node getRefTo(T item){\n Node n = first;\n while(n != null && !n.value.equals(item))\n n = n.next;\n return n;\n }", "private Node<E> findDuplicate(E value) {\n Queue<Node<E>> queue = new LinkedList<>();\n queue.add(root);\n\n while (!queue.isEmpty()) {\n Node<E> element = queue.remove();\n\n if (element.value.compareTo(value) == 0) {\n return element;\n }\n if (element.children != null) {\n queue.addAll(element.children);\n }\n }\n return null;\n }", "private SearchNode findFirstNode(HashSet<SearchNode> set){\n\t\t\tSearchNode min = null;\n\t\t\tfor (SearchNode cur : set){\n\t\t\t\tif (min == null || cur.fScore < min.fScore)\n\t\t\t\t\tmin = cur;\n\t\t\t}\n\t\t\treturn min;\n\t\t}", "public /*@ non_null @*/ JMLObjectSet<E> insert(E elem)\n throws IllegalStateException\n {\n if (has(elem)) {\n return this;\n } else if (size < Integer.MAX_VALUE) {\n return fast_insert(elem); \n } else {\n throw new IllegalStateException(\"Cannot insert into a set \"\n +\"with Integer.MAX_VALUE elements\");\n }\n }", "@Test\n public void whenAddSeveralIdenticalElementsThenSetHasOnlyOneSuchElement() {\n SimpleSet<Integer> set = new SimpleSet<>();\n set.add(1);\n set.add(2);\n set.add(3);\n set.add(3);\n set.add(2);\n set.add(1);\n\n Iterator<Integer> iterator = set.iterator();\n\n assertThat(iterator.next(), is(1));\n assertThat(iterator.next(), is(2));\n assertThat(iterator.next(), is(3));\n assertThat(iterator.hasNext(), is(false));\n }", "@Override\n public boolean remove(T item) {\n //find the node with the value\n Node n = getRefTo(item);\n //make sure it actually is in the set\n if(n == null)\n return false;\n //reassign the value from the first node to the removed node\n n.value = first.value;\n //take out the first node\n remove();\n return true;\n }", "@Override\n public T remove() {\n //make sure there is something in the set\n if (first == null)\n return null;\n //make a reference to the data in the first node, then\n //update the reference to the second node\n T val = first.value;\n first = first.next;\n //return the data\n numItems--;\n return val;\n }", "public Node findSet(Node node ){\n Node parent = node.parent;\n //it means no one is parent\n if( parent == node ){\n return parent;\n }\n //do compression\n node.parent = findSet( parent );\n return node.parent;\n }", "public V addElement(T t) {\n\t\tif(multiSet.containsKey(t)){\n\t\t\tNumber newValue = ((Integer)multiSet.get(t)) + 1;\n\t\t\tmultiSet.replace(t,(V)newValue);\n\t\t\treturn (V)newValue;\n\t\t}\n\t\tNumber firstValue = 1;\n\t\tmultiSet.put(t,(V)firstValue);\n\t\treturn (V)firstValue;\n\t}", "@Override\n public boolean hasDuplicates() {\n ArrayList<String> itemList = new ArrayList(Arrays.asList(\"\"));\n Node currNode = this.head;\n while(true){\n if(itemList.contains(currNode.getItem())){ // need to edit\n return true;\n }else{\n itemList.add(currNode.getItem());\n }\n if(currNode.getNextNode() == null){\n break;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }", "@Override\r\n\tpublic V getElement(K key) {\n\t\tif (hashMap.containsKey(key)){\r\n\t\t\tque.remove(key);\r\n\t\t\tque.add(key);\r\n\t\t\treturn hashMap.get(key);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "private Node removeDuplicate() {\n ArrayList<Integer> values = new ArrayList<Integer>();\n int len = this.getlength();\n Node result = this;\n\n if (len == 1) {\n System.out.println(\"only one element can't duplicate\");\n return result;\n } else {\n Node current = result;\n\n for (int i = 0; i < len; i++) {\n if (values.contains(current.value)) {\n result = result.remove(i);\n len = result.getlength();\n i--; // reset the loop back\n current = current.nextNode;\n } else {\n values.add(current.value);\n current = current.nextNode;\n }\n }\n return result;\n }\n }", "public T getSet( T obj )\n {\n \tNode temp = nodes.get(obj);\n \tif(temp!=null){\n \t\treturn getRoot(temp).data;\n \t}\n // If here, no such data object; throw exception.\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj );\n }", "@Override\r\n\tpublic boolean contains(Object o) {\n\t\treturn set.contains(o);\r\n\t}", "public Node removeDups(Node head) {\n if (head != null) {\n Node current = head;\n Set<Integer> set = new HashSet<>();\n set.add(current.data);//IMP step\n\n while (current.next != null) {\n if (set.contains(current.next.data)) {\n //found the dup, leave it out\n current.next = current.next.next;\n } else {\n set.add(current.data);\n current = current.next;\n }\n }\n }\n return head;\n }", "@Override\n public Set<T> asSet() {\n return new AbstractSet<T>() {\n @Override\n public Iterator<T> iterator() {\n return new Iterator<T>() {\n boolean foundNext;\n boolean hasNext;\n T next;\n \n private void findNext() {\n if (!foundNext) {\n hasNext = isPresent();\n if (hasNext) {\n try {\n next = get();\n } catch (NoSuchElementException e) {\n // in case there was a race and the value became absent\n hasNext = false;\n next = null;\n }\n } else {\n next = null;\n }\n foundNext = true;\n }\n }\n \n @Override\n public boolean hasNext() {\n findNext();\n return hasNext;\n }\n\n @Override\n public T next() {\n findNext();\n if (hasNext) {\n // no next after consuming the single present value \n hasNext = false;\n T ret = next;\n next = null;\n return ret;\n }\n throw new NoSuchElementException();\n }\n\n @Override\n public void remove() {\n throw new UnsupportedOperationException();\n }\n };\n }\n\n @Override\n public int size() {\n return isPresent() ? 1 : 0;\n }\n };\n }", "TMNodeModel nodeContaining(TMNode node) {\n if (this.node == node) {\n return this;\n } else {\n return null;\n }\n }", "protected Expression duplicateNodesUnderOps(Expression root, Fragment op) {\n Set<Expression> visited = new HashSet<>();\n if (duplicateNodesUnderOps(root, op, visited)) {\n return visited.iterator().next();\n }\n return null;\n }", "E add(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\tE obj = nodes[index].add(this, element.hashCode(), element, (byte) 1);\n\t\t\tif (obj == null) {\n\t\t\t\tsize++;\n\t\t\t}\n\t\t\treturn obj;\n\t\t}", "public boolean contains(T item) {\n synchronized(this) {\n return _treeSet.contains(item);\n }\n }", "public boolean isDupe(T element);", "public static <T> Set<T> toSingleElementSet(T element) {\n return Collections.singleton(element);\n\n }", "@Override\n public boolean contains(String element) {\n Node currNode = this.head;\n if(currNode == null){\n }\n while(currNode.getNextNode() != null){\n if(currNode.getItem().equals(element)){\n return true;\n }\n currNode = currNode.getNextNode();\n }\n return false;\n }", "public Node findSet(Node dataNode) {\n // something go wrong here?\n if (dataNode == dataNode.parent) {\n return dataNode;\n }\n dataNode.parent = findSet(dataNode.parent);\n // what is returned is the root, if dataNode is returned then it is the leaf not root\n return dataNode.parent;\n }", "@Override\n\tpublic boolean add(T elem) {\n\t\tif (this.contains(elem)) { // no duplicates\n\t\t\treturn false;\n\t\t} else if (valCount < 3) { // if has space for more\n\t\t\tif (childCount == 0) { // add elem as direct descendant\n\t\t\t\tfor (int i = 0; i < valCount; ++i) {\n\t\t\t\t\tif (comp.compare(elem,values[i]) < 0) {\n\t\t\t\t\t\tfor (int j = 2; j > i; --j) { // shifts all other elements by 1\n\t\t\t\t\t\t\tvalues[j] = values[j - 1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tvalues[i] = elem;\n\t\t\t\t\t++valCount;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else { // add elem as indirect descendant\n\t\t\t\tfor (int i = 0; i < childCount; ++i) { // searching with which child elem belongs\n\t\t\t\t\tif (comp.compare(elem,values[i]) < 0) {\n\t\t\t\t\t\treturn children[i].add(elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn children[childCount].add(elem); // elem is greater than all other children and should be put rightmost\n\t\t\t}\n\t\t} else { // node is 4-tree and should be reduced\n\t\t\tTwoThreeFourTreeSet<T> tempLeft = new TwoThreeFourTreeSet<T>(); // generating new left and right children of reduced node\n\t\t\tTwoThreeFourTreeSet<T> tempRight = new TwoThreeFourTreeSet<T>();\n\t\t\t\n\t\t\ttempLeft.values[0] = values[0];\n\t\t\ttempLeft.valCount = 1;\n\t\t\ttempLeft.children[0] = this.children[0];\n\t\t\ttempLeft.children[1] = this.children[1];\n\t\t\ttempLeft.childCount = 2;\n\t\t\t\n\t\t\ttempRight.values[0] = values[2];\n\t\t\ttempRight.valCount = 1;\n\t\t\ttempRight.children[0] = this.children[2];\n\t\t\ttempRight.children[1] = this.children[3];\n\t\t\ttempRight.childCount = 2;\n\t\t\t\n\t\t\tif (parent == null) { // if no parent, create new node with middle value\n\t\t\t\tTwoThreeFourTreeSet<T> tempParent = new TwoThreeFourTreeSet<T>();\n\t\t\t\ttempParent.values[0] = values[1];\n\t\t\t\t\t\n\t\t\t\ttempParent.children[0] = tempLeft;\n\t\t\t\ttempParent.children[1] = tempRight;\n\t\t\t\ttempParent.childCount = 2;\n\t\t\t\tthis.parent = tempParent;\n\t\t\t} else { // else parent exists, and current node should be added\n\t\t\t\tif (comp.compare(parent.values[0],values[1]) < 0) { // if node belongs leftmost\n\t\t\t\t\tif (parent.valCount > 1) {\n\t\t\t\t\t\t// shift right element by 1\n\t\t\t\t\t\tparent.values[2] = parent.values[1];\n\t\t\t\t\t\tparent.children[3] = parent.children[2];\n\t\t\t\t\t}\n\t\t\t\t\t// shift left element by 1\n\t\t\t\t\tparent.values[1] = parent.values[0];\n\t\t\t\t\tparent.children[2] = parent.children[1];\n\t\t\t\t\t\n\t\t\t\t\t// push left;\n\t\t\t\t\tparent.values[0] = values[1];\n\t\t\t\t\tparent.children[0] = tempLeft;\n\t\t\t\t\tparent.children[1] = tempRight;\n\t\t\t\t} else if (parent.valCount < 2 || comp.compare(parent.values[1],values[1]) < 0) { // if node belongs in center\n\t\t\t\t\tif (parent.valCount > 1) { // should we shift?\n\t\t\t\t\t\tparent.values[2] = parent.values[1];\n\t\t\t\t\t\tparent.children[3] = parent.children[2];\n\t\t\t\t\t}\n\t\t\t\t\t// push center\n\t\t\t\t\tparent.values[1] = values[1];\n\t\t\t\t\tparent.children[1] = tempLeft;\n\t\t\t\t\tparent.children[2] = tempRight;\n\t\t\t\t} else { // if node belongs rightmost\n\t\t\t\t\t// push right\n\t\t\t\t\tparent.values[2] = values[1];\n\t\t\t\t\tparent.children[2] = tempLeft;\n\t\t\t\t\tparent.children[3] = tempRight;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tTwoThreeFourTreeSet<T> newTree = this;\n\t\t\tnewTree = newTree.parent; // changing this indirectly\n\t\t\t++newTree.valCount;\n\t\t\treturn newTree.add(elem);\n\t\t}\n\t\treturn false;\n\t}", "public Node removeDuplicates(Node head) \n {\n // Your code here\n HashSet<Integer>hs = new HashSet<>();\n Node curr=head;\n Node prev=null;\n while(curr!=null){\n if(hs.contains(curr.data)){\n prev.next = curr.next;\n }else{\n hs.add(curr.data);\n prev = curr;\n }\n curr = curr.next;\n }\n return head;\n }", "Set<Node<K, V>> entrySet();", "boolean insert(long x){\n int i=hash(x);\n //if x already present then dont add\n for (Node j = ht[i]; j != null; j=j.next) {\n if(j.data == x){\n return false;\n }\n }\n Node node = new Node(x);\n node.next = ht[i];\n ht[i] = node;\n return true;\n }", "private SearchNode findNodeWithCoords(HashSet<SearchNode> set, int x, int y){\n\t\t\tfor (SearchNode cur : set){\n\t\t\t\tif (cur.posX == x && cur.posY == y)\n\t\t\t\t\treturn cur;\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "@Override\n public boolean containsNodeFor(E item) {\n if(item == null){\n throw new NullPointerException(\"Received null as value.\");\n }\n return graphNodes.containsKey(item);\n }", "public boolean contains(N node)\r\n/* 56: */ {\r\n/* 57:105 */ assert (checkRep());\r\n/* 58:106 */ return this.map.containsKey(node);\r\n/* 59: */ }", "boolean contains(E element) {\n\t\t\tshort index = (short)((element.hashCode() >> 24) & 0x000000FF);\n\t\t\treturn nodes[index].contains(element.hashCode(), (byte) 1);\n\t\t}", "@Override\r\n public boolean add(E o) {\r\n\r\n // Check if dupliate\r\n if (!(contains(o))) {\r\n\r\n Node<E> newNode = new Node<E>(o);\r\n Node<E> currentNode = firstNode;\r\n\r\n if (firstNode == null || o.compareTo(firstNode.element) < 0) {\r\n newNode.next = firstNode;\r\n firstNode = newNode;\r\n numElements++;\r\n return true;\r\n } else {\r\n while(currentNode.next != null && o.compareTo(currentNode.next.element) >= 0) {\r\n currentNode = currentNode.next;\r\n }\r\n newNode.next = currentNode.next;\r\n currentNode.next = newNode;\r\n numElements++;\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public Node duplicate() {\r\n Variable alterEgo = new Variable(index);\r\n return alterEgo;\r\n }", "public void removeDuplicates(){\n HashSet<Object> elements = new HashSet<>();\n Node n = head;\n int i=0;\n while(n!=null){\n if(elements.contains(n.getData())){\n if (size == 1) {\n this.head.setData(null);\n } else {\n if (n == this.head) {\n this.head = n.next;\n this.head.prev = this.head;\n } else if (n == this.tail) {\n this.tail = n.prev;\n this.tail.next = this.tail;\n } else {\n n.prev.next = n.next;\n n.next.prev = n.prev;\n }\n }\n size--;\n }else{\n elements.add(n.getData());\n }\n n=n.next;\n }\n }", "@Test\n\tpublic void addSameValueTwice() {\n\t\tXSet xset = new XSet(3);\n\t\txset.add(1);\n\t\txset.add(1);\n\t\tassertTrue(xset.getSize() == 1);\n\t}", "public E tryAdd(E o) {\r\n E found = this.map.get(o.hashCode());\r\n if (found != null) {\r\n return found;\r\n }\r\n this.map.put(o.hashCode(), o);\r\n return o;\r\n }", "@Override\n public IntSet add(int x) {\n //System.out.println(\"EmptySet: Creating new singleton \" + x);\n return Singleton.newSingleton(x);\n }", "protected SearchNode<T> getOrAddSearchNode( Node<T> node ) {\n\t\tif ( node == null ) {\n\t\t\tthrow new IllegalArgumentException( \"Null node\" );\n\t\t}\n\t\tif ( ! searchNodes.containsKey( node.getNodeId() ) ) {\n\t\t\tsearchNodes.put( node.getNodeId(), node instanceof SearchNode ? (SearchNode)node : new SearchNode<>( node ) );\n\t\t}\n\t\treturn searchNodes.get( node.getNodeId() );\n\t}", "Node dequeue() {\n Node n = queue.removeFirst();\n queueSet.remove(n);\n return n;\n }", "public Node<E> addNode(E value){\n Node<E> newNode = new Node<>(value);\n if(value != null){\n nodes.putIfAbsent(newNode, new HashSet<>());\n }\n return newNode;\n }", "public boolean contains(E element) {\n // TODO: YOUR CODE HERE\n return backwards.containsKey(element);\n }", "public T add(T element) {\n if(maxElements <= 0)\n return element;\n else if(reservoir.size() < maxElements) {\n reservoir.add(element);\n return null;\n }\n else {\n // Get a uniformly distributed int. If the chosen slot lives within the partition, replace the entry in that slot with the newest entry.\n int slot = GenomeAnalysisEngine.getRandomGenerator().nextInt(maxElements);\n if(slot >= 0 && slot < maxElements) {\n T displaced = reservoir.get(slot);\n reservoir.set(slot,element);\n return displaced;\n }\n else\n return element;\n }\n }", "public boolean has(Object item) {\n JMLListEqualsNode<E> ptr = this;\n //@ maintaining (* no earlier element is elem_equals to item *);\n while (ptr != null) {\n if (elem_equals(ptr.val, item)) {\n return true;\n }\n ptr = ptr.next;\n }\n return false;\n }", "public void add(T x) // O(n/M) nel caso medio e peggiore\n {\n // precondizioni\n if (x == null || contains(x)) \n return;\n \n // calcolo della chiave ridotta\n int kr = hash(x);\n \n // inserimento nel bucket di chiave ridotta calcolata\n ListNode n = (ListNode)v[kr]; // nodo header del bucket\n n.setElement(x); // inserimento nel nodo header\n v[kr] = new ListNode(null, n); // nuovo nodo header\n \n // incremento del numero di elementi\n size++; \n }", "public ListNode getIntersectionNode(ListNode headA, ListNode headB) {\r\n\t\tHashSet<ListNode> hashSet = new HashSet<ListNode>();\r\n\t\tListNode head = headA;\r\n\t\twhile (head != null) {\r\n\t\t\thashSet.add(head);\r\n\t\t\thead = head.next;\r\n\t\t}\r\n\t\thead = headB;\r\n\t\twhile (head != null) {\r\n\t\t\tif (hashSet.contains(head)) {\r\n\t\t\t\treturn head;\r\n\t\t\t}\r\n\t\t\thashSet.add(head);\r\n\t\t\thead = head.next;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public Node returnNodeById(Id id){\n\t\tif(id.indice >= listOfNodes.size()) return null;\n\t\tNode n = listOfNodes.elementAt(id.indice);\n\t\tif(n == null) return null;\n\t\tId nid = n.getId();\n\t\tif(nid.indice != id.indice || nid.unique != id.unique) return null; \n\t\treturn n;\n\t}", "private AccessPath findNode(Node n, HashSet s) {\n for (Iterator i = this.succ.iterator(); i.hasNext(); ) {\n IdentityHashCodeWrapper ap = (IdentityHashCodeWrapper)i.next();\n if (!s.contains(ap)) {\n AccessPath p = (AccessPath)ap.getObject();\n if (n == p._n) return p;\n s.add(ap);\n AccessPath q = p.findNode(n, s);\n if (q != null) return q;\n }\n }\n return null;\n }", "public KDNode CompNode() {\n\t\t\n\t\tKDNode ptr = this;\n\t\twhile(ptr.parent_ptr != null) {\n\t\t\t\n\t\t\tif(ptr.is_node_set == true) {\n\t\t\t\treturn ptr;\n\t\t\t}\n\t\t\t\n\t\t\tptr = ptr.parent_ptr;\n\t\t}\n\t\t\n\t\treturn ptr;\n\t}", "int find(int element){\n if(parent[element]!=element)\n parent[element]=find(parent[element]);\n return parent[element];\n }", "public HashSet<N> getNodes()\r\n/* 99: */ {\r\n/* 100:182 */ assert (checkRep());\r\n/* 101: */ \r\n/* 102:184 */ return new HashSet(this.map.keySet());\r\n/* 103: */ }", "@Override\n\tpublic T get(T elem) {\n\t\tfor (int i = 0; i < valCount; ++i) {\n\t\t\tif (values[i].equals(elem)) {\n\t\t\t\treturn values[i];\n\t\t\t} else if (comp.compare(values[i],elem) < 0) { // finds the set of children that can possibly contain elem\n\t\t\t\treturn children[i].get(elem);\n\t\t\t}\n\t\t}\n\t\tif (childCount > 1) { // check final set of children\n\t\t\treturn children[valCount - 1].get(elem);\n\t\t}\n\t\treturn null;\n\t}", "public Set<T> noFollow(T elem) {\n\t\t Set<T> s = rule.get(elem.hashCode());\n\t\t return s == null ? new HashSet<T>() :s; // TODO YOUR CODE HERE\n\t}", "public E choose() throws JMLNoSuchElementException {\n if (the_list != null) {\n E entry = the_list.val;\n if (entry == null) {\n //@ assume containsNull;\n return null;\n } else {\n E o = entry ;\n //@ assume o instanceof Object;\n //@ assume \\typeof(o) <: elementType;\n return o;\n }\n } else {\n throw new JMLNoSuchElementException(\"Tried to .choose() \"\n + \"with JMLObjectSet empty\");\n }\n }", "public Node<E> get(E e){\n Node<E> current = head.getNext();\n while (current != tail) {\n if (current.getValue() == e) {\n return current;\n }\n current = current.getNext();\n }\n return null;\n }", "public Node getNode(Object element) {\n return nodes.get(element);\n }", "public HashSet<T> removeDups(Node root, HashSet set) {\n if(root == null) {\n return set;\n }\n if(root.getLeftChildNode() != null) {\n removeDups(root.getLeftChildNode(), set);\n }\n if(set.contains(root.getData())){\n set.add(root.getData());\n }\n if(root.getRightChildNode() != null) {\n removeDups(root.getRightChildNode(), set);\n }\n return set;\n }", "public /*@ non_null @*/ JMLObjectSet<E> remove(E elem) {\n if (!has(elem)) {\n return this;\n } else {\n //@ assume the_list != null;\n JMLListObjectNode<E> new_list = the_list.remove(elem);\n //@ assume (new_list == null) == (size == 1);\n return new JMLObjectSet<E>(new_list, size - 1);\n }\n }", "@Override\n\tpublic T find(T targetElement) {\n\t\tif(contains(targetElement))\n\t\t return targetElement;\n\t\telse \n\t\t\treturn null;\n\t\t\n\t}", "public void testFindDuplicates() {\r\n System.out.println(\"findDuplicates\");\r\n \r\n List<String> elements = new ArrayList<>();\r\n elements.add(\"foo\");\r\n elements.add(\"bar\");\r\n elements.add(\"abc\");\r\n elements.add(\"foo\");\r\n elements.add(\"cde\");\r\n elements.add(\"cde\");\r\n elements.add(\"efg\");\r\n elements.add(\"cde\");\r\n \r\n Set<String> expResult = new LinkedHashSet<>();\r\n expResult.add(\"foo\");\r\n \r\n LexicalChecker instance = new LexicalChecker();\r\n Set<String> result = instance.findDuplicates(elements);\r\n \r\n assertNotSame(expResult, result);\r\n \r\n expResult.add(\"cde\");\r\n assertEquals(expResult, result);\r\n }", "public static java.util.Set singleton(java.lang.Object arg0)\n { return null; }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic boolean equals(Object H) {\n\t\tboolean retVal = false;\n\t\tif (this.element.equals(((HashObject<E>) H).getKey())) {\n\t\t\tthis.duplicateCount++;\n\t\t\tretVal = true;\n\t\t}\n\t\treturn retVal;\n\t}", "@Override\r\n\tpublic boolean contains(T element) {\n\t\treturn false;\r\n\t}", "public Node<T> add(T element) {\n // Get a free node.\n Node<T> freeNode = getFree();\n if (freeNode != null) {\n // Attach the element.\n return freeNode.attach(element);\n } else {\n // Failed!\n throw new IllegalStateException(\"Capacity exhausted.\");\n }\n }", "public boolean insert(int val) {\r\n return set.add(val);\r\n }", "private E element() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n return (E) queue[startPos];\n }", "public Node getSuccessor(Node element) {\r\n\t\tNode successor = null;\r\n\t\tif (element.getRightChild() != null) {\r\n\t\t\tsuccessor = element.getRightChild();\r\n\t\t\tif (successor.getLeftChild() == null) {\r\n\t\t\t\tsuccessor = element.getRightChild();\r\n\t\t\t} else {\r\n\t\t\t\twhile (successor.getLeftChild() != null) {\r\n\t\t\t\t\tsuccessor = successor.getLeftChild();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"No right tree\");\r\n\t\t\tif (element.isRoot()) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tsuccessor = element;\r\n\t\t\tSystem.out.println(\"-- \" + element.getKey());\r\n\t\t\tNode leftChild = successor.getParent().getLeftChild();\r\n\t\t\tif (leftChild == null) {\r\n\t\t\t\tleftChild = successor.getParent();\r\n\t\t\t}\r\n\t\t\twhile (!successor.getParent().equals(root) && !leftChild.equals(successor)) {\r\n\t\t\t\tSystem.out.println(\"In loop\");\r\n\t\t\t\tsuccessor = successor.getParent();\r\n\t\t\t\tleftChild = successor.getParent().getLeftChild();\r\n\t\t\t\tif (leftChild == null) {\r\n\t\t\t\t\tleftChild = successor.getParent();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (successor.getKey() > element.getKey()) {\r\n\t\t\t\tsuccessor = successor.getParent();\r\n\t\t\t} else {\r\n\t\t\t\tsuccessor = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn successor;\r\n\t}", "public boolean contains(BSTMapNode element) \n\t{\n\t\tthis.compare(element);\n\t\tif(element.getKey() == this.key)\n\t\t{\n\t\t\treturn true;\n\t\t\t\n\t\t}\n\t\telse if(element.getKey() < this.key)\n\t\t{\n\t\t\tif(this.left == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.left.contains(element);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(this.right == null)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn this.right.contains(element);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void add( T obj )\n {\n // Any distinct object causes creation of a new tree-set.\n // We count any such sets as we go.\n if (!contains( obj ))\n {\n nodes.put(obj, new Node(obj));\n numSets++;\n }\n }", "private T get() {\n Queue<T> h = head;\n Queue<T> first = h.next;\n h.next = h; // help GC\n\n head = first;\n T x = first.item;\n first.item = null;\n return x;\n }", "public void createSet(String element) {\n\t\t\n\t\tSet<String> set = new HashSet<String>();\n\t\tset.add(element);\n\t\t\n\t\tMap<String, Set<String>> map = new HashMap<String, Set<String>>();\t\t\n\t\tmap.put(element, set);\n\t\t\n\t\tdisjointSet.add(map);\n\t\n\t}", "@Override\n\tpublic boolean contains(T targetElement) {\n\t\t\n\t\treturn findAgain(targetElement, root);\n\t}", "public boolean add(T x) {\t// taken from AVLTree\n\t\tEntry<T> newElement = new Entry<T>(x, null, null);\n\n\t\tif (root == null) {\n\t\t\troot = newElement;\n\t\t\tnewElement.parent = null;\n\t\t\t//size++;\n\t\t}\n\n\t\tEntry<T> t = getSplay(find(x));\n\t\tif (t.element.compareTo(x) == 0) {\n\t\t\tt.element = x;\n\t\t\treturn false;\n\t\t} else if (x.compareTo(t.element) < 0) {\n\t\t\tt.left = newElement;\n\t\t\tnewElement.parent = t;\n\n\t\t} else {\n\t\t\tt.right = newElement;\n\t\t\tnewElement.parent = t;\n\t\t}\n\n\t\t//size++;\n\t\tsplay(newElement);\n\t\treturn true;\n\t}", "@Override\n public Node remove() {\n Node temp;\n int x = 0;\n while (isEmpty(x)) {\n x++;\n }\n temp = hashTable[x];\n hashTable[x] = temp.getNext(); \n\n return temp;\n }", "protected T nextUnvisited() {\r\n\t\tfor (T node: getNodes()) {\r\n\t\t\tif (!visited.contains(node)) {\r\n\t\t\t\treturn node;\r\n\t\t\t}\r\n\t\t} \r\n\t\t\treturn null;\r\n\t}", "public boolean inSameSet( T obj1, T obj2 )\n {\n // Find the root of each object; if either is not contained, the root\n // value will be null, and we throw an exception.\n Node root1 = getRoot(nodes.get(obj1));\n Node root2 = getRoot(nodes.get(obj2));\n if ( root1 == null && root2 == null )\n throw new NoSuchElementException( \"Sets do not contain either object: \" + obj1 + \", \" + obj2 );\n if ( root1 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj1 );\n if ( root2 == null )\n throw new NoSuchElementException( \"Sets do not contain object: \" + obj2 );\n // If here, then have non-null root for each input; check if same Node.\n return root1 == root2;\n }", "public interface Set {\n\n /**\n * Create an empty set.\n *\n * @return the empty set\n */\n static Set createEmpty() {\n return new EmptySet();\n }\n\n /**\n * Checks if the ASet is empty.\n *\n * @return true if the set is empty, false otherwise\n */\n boolean isEmpty();\n\n /**\n * Given an {@code Integer} {@code element} add the element to the set. If {@code element} is\n * already a member of the set, we perform no operation and return back the set intact.\n *\n * @param element the new element to add to the set\n *\n * @return a newly created set that contains {@code element} and the original elements of the set.\n */\n Set add(Integer element);\n\n /**\n * Given an {@code Integer} {@code element} returns {@code true} if the element is already in the\n * set and {@code false} otherwise.\n *\n * @param element the element to check\n *\n * @return true if {@code element} is in the set, false otherwise\n */\n Boolean contains(Integer element);\n\n /**\n * Return the size of the set.\n *\n * @return return the size of the set\n */\n Integer size();\n\n /**\n * Given an element {@code element} remove it from the this list if it exists.\n *\n * @param element the element to remove\n *\n * @return set without {@code element}\n */\n Set remove(Integer element);\n\n\n /**\n * Given a set {@code other} return a new set which is the set union between {@code this} set and\n * {@code other} set.\n *\n * @param other set to perform union\n *\n * @return set union of this and other\n */\n Set union(Set other);\n\n\n /**\n * Returns the set intersection between {@code this} and {@code otherSet}.\n *\n * @param otherSet set to perform intersection with\n *\n * @return set intersection between {@code this} and {@code otherSet}\n */\n Set intersect(Set otherSet);\n\n\n /**\n * Returns the set difference between {@code this} and {@code otherSet}.\n *\n * @param otherSet set to perform set difference with\n *\n * @return set difference between {@code this} and {@code otherSet}\n */\n Set difference(Set otherSet);\n\n\n /**\n * Returns true if {@code this} set is a subset of {@code otherSet}.\n *\n * @param otherSet the set to check against\n *\n * @return true if this is a subset of otherSet, false otherwise\n */\n Boolean subset(Set otherSet);\n\n\n}", "public static <T> Set<T> addToSet(Set<T> set, T element) {\n if (set == null) set = set();\n if (element == null) return set;\n set.add(element);\n return set;\n }", "public Set<E> getNextSet()\r\n/* */ {\r\n/* 155 */ List<E> result = getNextArray();\r\n/* 156 */ if (result == null) {\r\n/* 157 */ return null;\r\n/* */ }\r\n/* */ \r\n/* 160 */ Set<E> resultSet = new LinkedHashSet(result);\r\n/* 161 */ return resultSet;\r\n/* */ }", "private Node append(E element) {\n \treturn new Node(sentinel.pred, element);\n }", "private void addExistingElement(Node node, Node<K, V>[] newData) {\r\n\r\n int currentHash = node.hash % newData.length;\r\n if (currentHash < 0){\r\n currentHash *= -1;\r\n }\r\n if (newData[currentHash] == null) {\r\n newData[currentHash] = node;\r\n } else {\r\n Node currentElement = newData[currentHash];\r\n while (currentElement.next != null) {\r\n currentElement = currentElement.next;\r\n }\r\n currentElement.next = node;\r\n }\r\n }", "public void makeSet(T e){\n\t\tnodes.put(e, new Node<T>(e));\r\n\t}", "public boolean insert(int val) {\n if (!set.contains(val)) {\n set.add(val);\n return true;\n } else return false;\n }", "public E next() {\n if (nextIndex >= set.count)\n throw new NoSuchElementException();\n\n canRemove = true;\n\n return set.data[nextIndex++];\n }", "public Node addNode(Coordinate coordIn){//adds a node to the list\n\t\t//linear search to make sure the node already isnt there\n\t\tint i;\n\t\tfloat inx = coordIn.getX();\n\t\tfloat iny = coordIn.getY();\n\t\tfloat inz = coordIn.getZ();\n\t\tNode n = null;\n\t\tfor(i = 0; i < listOfNodes.size(); i++){\n\t\t\tn = listOfNodes.get(i);\n\t\t\tif(n==null) continue;\n\t\t\tfloat ox = n.getCoordinate().getX();\n\t\t\tfloat oy = n.getCoordinate().getY();\n\t\t\tfloat oz = n.getCoordinate().getZ();\n\t\t\tif(inx <= ox + 0.01f && inx >= ox - 0.01f && iny <= oy + 0.01f && iny >= oy - 0.01f && inz <= oz + 0.01f && inz >= oz - 0.01f)break;\n\t\t}\n\t\tif(i < listOfNodes.size()){ // found duplicate\n\t\t\treturn n;\n\t\t}\n\n\t\tnode_count++;\n\t\tfor(; node_arrayfirstopen < node_arraysize && listOfNodes.get(node_arrayfirstopen) != null; node_arrayfirstopen++);\n\t\tif(node_arrayfirstopen >= node_arraysize){\t//resize\n\t\t\tnode_arraysize = node_arrayfirstopen+1;\n\t\t\tlistOfNodes.ensureCapacity(node_arraysize);\n\t\t\tlistOfNodes.setSize(node_arraysize);\n\t\t}\n\t\tId nid = new Id(node_arrayfirstopen, node_count);\n\t\tn = new Node(coordIn, nid);\n\t\tlistOfNodes.set(node_arrayfirstopen, n);\n\t\tupdateAABBGrow(n.getCoordinate());\n\t\t\n\t\tif(node_arraylasttaken < node_arrayfirstopen) node_arraylasttaken = node_arrayfirstopen; //todo redo\n\t\treturn n;\n\t}", "@Override\n\tpublic boolean contains(K key) {\n\t\tNode currentNode = firstNode;\n\t\t\n\t\tif(!isEmpty()){\n\t\t\twhile(currentNode.key != key){\n\t\t\t\tif(currentNode.getNextNode() == null){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean containsNode(Object node)\n\t{\n\t\t// This is presumably faster than searching through nodeList\n\t\treturn nodeEdgeMap.containsKey(node);\n\t}", "static void findDuplicate()\n\t{\n\n\t\tList<String> oList = null;\n\t\tSet<String> oSet = null;\n\t\ttry {\n\t\t\toList = new ArrayList<String>();\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Dog\");\n\t\t\toList.add(\"Eagle\");\n\t\t\toList.add(\"Frog\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\toList.add(\"Apple\");\n\t\t\toList.add(\"Boy\");\n\t\t\tSystem.out.println(oList);\n\t\t\t\n\t\t\toSet = new TreeSet<>();\n\t\t\t\n\t\t\tString s = \"\";\n\t\t\tfor(int i=0;i<oList.size();i++)\n\t\t\t{\n\t\t\t\tif((oSet.add(oList.get(i))==false) && (!s.contains(oList.get(i))))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Duplicate: \"+oList.get(i));\n\t\t\t\t\ts+=oList.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toList = null;\n\t\t\toSet = null;\n\t\t}\n\t}", "Boolean same(MultiSet<X> s);", "MultiSet<X> add(X x);" ]
[ "0.62163883", "0.6202888", "0.61144847", "0.60363215", "0.60164666", "0.59640676", "0.5956849", "0.58422947", "0.58079576", "0.58016074", "0.5794431", "0.5791727", "0.57827914", "0.57545954", "0.5750779", "0.57445455", "0.57366014", "0.57347447", "0.569069", "0.56551576", "0.56291956", "0.5610182", "0.56096447", "0.5605135", "0.5600812", "0.55284667", "0.5528364", "0.55278665", "0.54994684", "0.5492462", "0.54900515", "0.5474879", "0.5471909", "0.5461322", "0.5448774", "0.5434584", "0.54320854", "0.54283166", "0.5423646", "0.54063904", "0.54042786", "0.5384621", "0.5376731", "0.5355934", "0.53542256", "0.53516287", "0.5347734", "0.534335", "0.5337638", "0.5314494", "0.5308117", "0.53062433", "0.5278141", "0.52770466", "0.5276638", "0.5270249", "0.5264823", "0.52525324", "0.52388984", "0.52306426", "0.52249026", "0.5215868", "0.52030545", "0.5201338", "0.51899844", "0.5189007", "0.5180893", "0.5179614", "0.51790583", "0.51745486", "0.5170191", "0.51685345", "0.51662934", "0.5162651", "0.514471", "0.51426274", "0.51346743", "0.51290065", "0.5127403", "0.5121705", "0.51197636", "0.5118728", "0.5110323", "0.5106433", "0.51061845", "0.5099754", "0.50993466", "0.5099154", "0.5093077", "0.5086935", "0.5082019", "0.5081124", "0.50680846", "0.5066513", "0.50656533", "0.5064518", "0.5059341", "0.5057898", "0.505635", "0.50419706", "0.50345075" ]
0.0
-1
Only reauthenticate if username doesn't match SecurityContextHolder and user isn't authenticated (see SEC53)
private boolean authenticationIsRequired(String username) { Authentication existingAuth = SecurityContextHolder.getContext().getAuthentication(); if (existingAuth == null || !existingAuth.isAuthenticated()) { return true; } // Limit username comparison to providers which use usernames (ie // UsernamePasswordAuthenticationToken) // (see SEC-348) if (existingAuth instanceof UsernamePasswordAuthenticationToken && !existingAuth.getName().equals(username)) { return true; } // Handle unusual condition where an AnonymousAuthenticationToken is // already // present // This shouldn't happen very often, as BasicProcessingFitler is meant // to be // earlier in the filter // chain than AnonymousAuthenticationFilter. Nevertheless, presence of // both an // AnonymousAuthenticationToken // together with a BASIC authentication request header should indicate // reauthentication using the // BASIC protocol is desirable. This behaviour is also consistent with // that // provided by form and digest, // both of which force re-authentication if the respective header is // detected (and // in doing so replace // any existing AnonymousAuthenticationToken). See SEC-610. return existingAuth instanceof AnonymousAuthenticationToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void authenticateAction() {\n if (requestModel.getUsername().equals(\"superuser\")\n && requestModel.getPassword().equals(\"\")) {\n Collection<Webres> webres = getAllWebres();\n proceedWhenAuthenticated(new User(null, null, null, \"superuser\", \"\", null) {\n @Override\n public Collection<Webres> getAllowedResources() {\n return webres;\n }\n @Override\n public ActionController getDefaultController() {\n return ActionController.EMPLOYEES_SERVLET;\n }\n });\n return;\n }\n \n // try to authenticate against other credentials from the database\n Optional<User> u = getUserByCredentials(requestModel.getUsername(), requestModel.getPassword()); \n if (u.isPresent()) {\n proceedWhenAuthenticated(u.get());\n return;\n }\n \n // report authentication failed\n LOG.log(Level.INFO, \"{0} Authentication failed. Login: {1}, Password: {2}\", new Object[]{httpSession.getId(), requestModel.getUsername(), requestModel.getPassword()});\n SignInViewModel viewModel = new SignInViewModel(true);\n renderSignInView(viewModel);\n }", "private UserSession handleBasicAuthentication(String credentials, HttpServletRequest request) {\n\t\tString userPass = Base64Decoder.decode(credentials);\n\n\t\t// The decoded string is in the form\n\t\t// \"userID:password\".\n\t\tint p = userPass.indexOf(\":\");\n\t\tif (p != -1) {\n\t\t\tString userID = userPass.substring(0, p);\n\t\t\tString password = userPass.substring(p + 1);\n\t\t\t\n\t\t\t// Validate user ID and password\n\t\t\t// and set valid true if valid.\n\t\t\t// In this example, we simply check\n\t\t\t// that neither field is blank\n\t\t\tIdentity identity = WebDAVAuthManager.authenticate(userID, password);\n\t\t\tif (identity != null) {\n\t\t\t\tUserSession usess = UserSession.getUserSession(request);\n\t\t\t\tsynchronized(usess) {\n\t\t\t\t\t//double check to prevent severals concurrent login\n\t\t\t\t\tif(usess.isAuthenticated()) {\n\t\t\t\t\t\treturn usess;\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tusess.signOffAndClear();\n\t\t\t\t\tusess.setIdentity(identity);\n\t\t\t\t\tUserDeletionManager.getInstance().setIdentityAsActiv(identity);\n\t\t\t\t\t// set the roles (admin, author, guest)\n\t\t\t\t\tRoles roles = BaseSecurityManager.getInstance().getRoles(identity);\n\t\t\t\t\tusess.setRoles(roles);\n\t\t\t\t\t// set authprovider\n\t\t\t\t\t//usess.getIdentityEnvironment().setAuthProvider(OLATAuthenticationController.PROVIDER_OLAT);\n\t\t\t\t\n\t\t\t\t\t// set session info\n\t\t\t\t\tSessionInfo sinfo = new SessionInfo(identity.getName(), request.getSession());\n\t\t\t\t\tUser usr = identity.getUser();\n\t\t\t\t\tsinfo.setFirstname(usr.getProperty(UserConstants.FIRSTNAME, null));\n\t\t\t\t\tsinfo.setLastname(usr.getProperty(UserConstants.LASTNAME, null));\n\t\t\t\t\tsinfo.setFromIP(request.getRemoteAddr());\n\t\t\t\t\tsinfo.setFromFQN(request.getRemoteAddr());\n\t\t\t\t\ttry {\n\t\t\t\t\t\tInetAddress[] iaddr = InetAddress.getAllByName(request.getRemoteAddr());\n\t\t\t\t\t\tif (iaddr.length > 0) sinfo.setFromFQN(iaddr[0].getHostName());\n\t\t\t\t\t} catch (UnknownHostException e) {\n\t\t\t\t\t\t // ok, already set IP as FQDN\n\t\t\t\t\t}\n\t\t\t\t\tsinfo.setAuthProvider(BaseSecurityModule.getDefaultAuthProviderIdentifier());\n\t\t\t\t\tsinfo.setUserAgent(request.getHeader(\"User-Agent\"));\n\t\t\t\t\tsinfo.setSecure(request.isSecure());\n\t\t\t\t\tsinfo.setWebDAV(true);\n\t\t\t\t\tsinfo.setWebModeFromUreq(null);\n\t\t\t\t\t// set session info for this session\n\t\t\t\t\tusess.setSessionInfo(sinfo);\n\t\t\t\t\t//\n\t\t\t\t\tusess.signOn();\n\t\t\t\t\treturn usess;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private Authentication tryToAuthenticateWithUsernameAndPassword(String username, String password) {\n\t\tUsernamePasswordAuthenticationToken requestAuthentication = new UsernamePasswordAuthenticationToken(username, password);\n\t\treturn tryToAuthenticate(requestAuthentication);\n \n\t}", "@Override\n public Authentication attemptAuthentication(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)\n throws AuthenticationException, IOException, ServletException {\n AccountCredentials credentials = new ObjectMapper().readValue(httpServletRequest.getInputStream(), AccountCredentials.class);\n UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(credentials.getUsername(), credentials.getPassword());\n return getAuthenticationManager().authenticate(token);\n }", "@Override\r\n protected void additionalAuthenticationChecks(UserDetails userDetails, UsernamePasswordAuthenticationToken authentication) {\n }", "@Override\n protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {\n UsernamePasswordAuthenticationToken authRequest = getAuthtication(request);\n //If the authentication exists, give it to spring context.\n if (authRequest != null){\n SecurityContextHolder.getContext().setAuthentication(authRequest);\n chain.doFilter(request,response);\n }else {\n response.setStatus(401);\n response.getWriter().write(\"Access denied\");\n }\n }", "@Override\n\tpublic Authentication authenticate(Authentication auth) throws AuthenticationException {\n\t\t username = auth.getName();\n\t\tString pass = auth.getCredentials().toString();\n\t\t\n\t\tif(AppController.users.containsKey(username))\n\t\t{\n\t\tString password = AppController.users.get(username); \n\t\t\t\n\t\tif(password.equals(pass))\n\t\t\treturn new UsernamePasswordAuthenticationToken(username,pass,Collections.EMPTY_LIST);\n\t\telse\n\t\t\tthrow new BadCredentialsException(\"authentication failed\");\n\t\t\n\t\t}\n\t\telse\n\t\t\tthrow new BadCredentialsException(\"authentication failed\");\n\t}", "@Override\r\n protected void unsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException failed) \r\n\t throws IOException, ServletException {\r\n SecurityContextHolder.clearContext();\r\n failureHandler.onAuthenticationFailure(request, response, failed);\r\n }", "protected void switchToUser( ApplicationContext ctx, String username ) {\n\n UserDetails user = userManager.loadUserByUsername( username );\n\n List<GrantedAuthority> authrs = new ArrayList<GrantedAuthority>( user.getAuthorities() );\n\n ProviderManager providerManager = ( ProviderManager ) ctx.getBean( \"authenticationManager\" );\n providerManager.getProviders().add( new TestingAuthenticationProvider() );\n\n TestingAuthenticationToken token = new TestingAuthenticationToken( username, \"testing\", authrs );\n token.setAuthenticated( true );\n\n putTokenInContext( token );\n }", "@Override\n\tprotected void service(HttpServletRequest request, HttpServletResponse response)\n\t\tthrows ServletException, IOException {\n\t\tif ((new AuthenticatedUser(request,response)).unauthenticated())\n\t\t\treturn;\n\t\tsuper.service(request, response);\n\t}", "@Override\r\n\tpublic Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows AuthenticationException {\r\n\tAppUser appUser = null;\r\n\r\n\ttry {\r\n\t\tappUser = new ObjectMapper().readValue(request.getInputStream(), AppUser.class);\r\n\t} catch (IOException e) {\r\n\t\tthrow new RuntimeException(e);\r\n\t}\r\n\r\n\t\tSystem.out.println(\"user one : \"+appUser.getUsername());\r\n\t\treturn authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(appUser.getUsername(), appUser.getPassword()));\r\n\t}", "private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}", "public AuthenticationResult authenticateByName(String username) {\n\t\tthis.username = username;\n\t\tpassword = passwordDefault;\n\t\treturn authenticateByName(username, password);\n\t}", "public void reAuthenticateUser(User regUser){\n System.out.println(\"Authenticating Google User from DB\");\n UserWithRoles authUser = new UserWithRoles(regUser);\n Authentication authentication = new UsernamePasswordAuthenticationToken(\n authUser, authUser.getPassword(), authUser.getAuthorities()\n );\n SecurityContextHolder.getContext().setAuthentication(authentication);\n }", "@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}", "@Override\n public Authentication attemptAuthentication(\n HttpServletRequest request,\n HttpServletResponse response) throws AuthenticationException {\n\n try {\n // 1. pobieramy dane uzytkownika ktory chce sie zalogowac\n AuthenticationUser user = new ObjectMapper().readValue(request.getInputStream(), AuthenticationUser.class);\n\n // 2. dokonujemy proby logowania\n return authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(\n user.getUsername(),\n user.getPassword(),\n Collections.emptyList()\n ));\n } catch ( Exception e ) {\n throw new AppException(e.getMessage());\n }\n\n }", "@Override\r\n public Authentication authenticate(final Authentication authentication) {\r\n final String credentials = (String) authentication.getCredentials();\r\n if (credentials == null || credentials.isEmpty()) {\r\n final GrantedAuthority grantedAuthority = new GrantedAuthorityImpl(\"\");\r\n final GrantedAuthority[] grantedAuthorities = { grantedAuthority };\r\n return new AnonymousAuthenticationToken(\"key\", \"Anonymous\", grantedAuthorities);\r\n }\r\n final UserDetails userDetails = escidocUserDetailsService.loadUserByUsername(credentials);\r\n return new UsernamePasswordAuthenticationToken(userDetails, credentials);\r\n }", "@Deprecated\n @Override\n public UserAuthenticationResponse authenticateUsingUsernamePassword(UsernamePasswordUserAuthenticationRequest usernamePasswordUserAuthenticationRequest) {\n try {\n authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(usernamePasswordUserAuthenticationRequest.getUsername(), usernamePasswordUserAuthenticationRequest.getPassword()));\n } catch (BadCredentialsException e) {\n throw new BadCredentialsException(\"Incorrect username or password\", e);\n }\n\n return allowAuthentication(usernamePasswordUserAuthenticationRequest.getUsername());\n }", "@Override\r\n\tpublic Authentication authenticate(Authentication arg0)\r\n\t\t\tthrows AuthenticationException {\n\t\treturn null;\r\n\t}", "@Override\n\tprotected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)\n\t\t\tthrows IOException, ServletException {\n\t\tString jwtInCookie = null;\n\t\tString username = null;\n\n\t\t// try to get authentication from cookie\n\t\tOptional<Cookie> cookieO = CookieUtils.getCookie(request, appProperties.getAuth().getTokenCookieName());\n\t\tif (cookieO.isPresent()) {\n\t\t\tjwtInCookie = cookieO.get().getValue();\n\t\t}\n\n\t\t// if cookie authentication is missing try to get JWT token from HTTP header\n\t\tjwtInCookie = StringUtils.defaultIfBlank(jwtInCookie, jwtTokenProvider.resolveToken(request));\n\n\t\tif (jwtInCookie != null) {\n\t\t\ttry {\n\t\t\t\tusername = jwtTokenProvider.getUsernameFromToken(jwtInCookie);\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tlog.error(\"IN doFilterInternal - an error occured during getting username from token\", e);\n\t\t\t} catch (ExpiredJwtException e) {\n\t\t\t\tlog.warn(\"IN doFilterInternal - the token is expired and not valid anymore\", e);\n\t\t\t} catch (SignatureException e) {\n\t\t\t\tlog.error(\"IN doFilterInternal - Authentication Failed. Username or Password not valid.\");\n\t\t\t}\n\t\t} else {\n\t\t\tlog.warn(\"IN doFilterInternal - couldn't find bearer string, will ignore the header\");\n\t\t}\n\t\tif (username != null && SecurityContextHolder.getContext().getAuthentication() == null) {\n\n\t\t\ttry {\n\t\t\t\tUserDetails userDetails = userService.loadUserByUsername(username);\n\n\t\t\t\tif (!userDetails.isEnabled())\n\t\t\t\t\tthrow new DisabledException(\"Authentication for user '\" + username + \"' is disabled\");\n\n\t\t\t\tif (jwtTokenProvider.validateToken(jwtInCookie, userDetails)) {\n\t\t\t\t\tUsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(\n\t\t\t\t\t\t\tuserDetails, null, userDetails.getAuthorities());\n\t\t\t\t\tauthentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));\n\t\t\t\t\tlog.info(\"IN doFilterInternal - authenticated user \" + username + \", setting security context\");\n\t\t\t\t\tSecurityContextHolder.getContext().setAuthentication(authentication);\n\t\t\t\t}\n\t\t\t} catch (UsernameNotFoundException e) {\n\t\t\t\tlog.warn(\"IN doFilterInternal - catched UsernameNotFoundException: \" + e.getMessage());\n\t\t\t} catch (DisabledException e) {\n\t\t\t\tlog.warn(\"IN doFilterInternal - catched DisabledException: \" + e.getMessage());\n\t\t\t}\n\n\t\t}\n\n\t\tchain.doFilter(request, response);\n\t}", "@Override\n public Authentication attemptAuthentication(HttpServletRequest req,\n HttpServletResponse res) throws AuthenticationException {\n log.info(\"Attempting authentication\");\n try {\n LoginRequest creds = new ObjectMapper()\n .readValue(req.getInputStream(), LoginRequest.class);\n\n return getAuthenticationManager().authenticate(\n new UsernamePasswordAuthenticationToken(\n creds.getUsername(),\n creds.getPassword(),\n new ArrayList<>())\n );\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)\n \t\tthrows AuthenticationException {\n \treturn super.attemptAuthentication(request, response);\n }", "@Override\n\tpublic boolean isUserAuthenticate(String username, String password) {\n\t\t// validate username and pwd with predefined credentials\n\t\tif (username.equals(Utility.USERNAME) && password.equals(Utility.PASSWORD)) {\n\t\t\treturn true;\n\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "private boolean validateUser(HttpServletResponse resp, HttpServletRequest req, String username) throws IOException {\n\n SessionHandler session = (SessionHandler) req.getSession().getAttribute(\"authorized\");\n\n String sessionUsername = session.getUsername();\n\n if((!sessionUsername.equalsIgnoreCase(\"admin\")\n && !username.equalsIgnoreCase(sessionUsername))\n || !session.isAuthorized()\n ){\n page.redirectTo(\"/account\", resp, req,\n \"errorMessage\", \"Action not permitted!\");\n return false;\n }\n return true;\n }", "private boolean isAuthenticationRequired(String token) {\n Authentication existingAuth = SecurityContextHolder.getContext().getAuthentication();\n\n //authenticate if no auth\n if (existingAuth == null || !existingAuth.isAuthenticated()) {\n return true;\n }\n\n //revalidate if token was changed\n if (existingAuth instanceof JwtAuthentication && !StringUtils.equals(token, (String) existingAuth.getCredentials())) {\n return true;\n }\n\n //always try to authenticate in case of anonymous user\n if (existingAuth instanceof AnonymousAuthenticationToken) {\n return true;\n }\n\n return false;\n }", "private boolean authenticatedUser(String uName, String pass) {\n\t\treturn true;\n\t}", "public boolean isAuthRequired() {\n return !AfUtil.anyEmpty(_username);\n }", "@Override\n protected void doFilterInternal(HttpServletRequest httpServletRequest,\n HttpServletResponse httpServletResponse, FilterChain filterChain) throws ServletException, IOException {\n try {\n String jwt = getJwt(httpServletRequest);\n String phone = jwtProvider.getUserNameFormJwtToken(jwt);\n if (jwt != null && jwtProvider.validateJwtToken(jwt)) {\n MyUser user = (MyUser) customUserDetailService.loadUserByUsername(phone);\n UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(\n user, null, user.getAuthorities());\n usernamePasswordAuthenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(httpServletRequest));\n SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);\n }\n\n } catch (Exception e) {\n logger.error(\"can not set authentication error ->\", e.getMessage());\n }\n filterChain.doFilter(httpServletRequest, httpServletResponse);\n }", "public final Session tryToAuthenticate(final String user, final String password)\r\n {\n return null;\r\n }", "public boolean authenticate(String username, String password, HttpServletRequest request){\n try {\n MySQLService sql = new MySQLService();\n String digest = DigestUtils.md5Hex(password);\n boolean isMatched = sql.checkMatch(username, digest);\n System.out.println(isMatched);\n if (isMatched) {\n request.getSession().setAttribute(\"username\", username);\n return true;\n } else {\n return false;\n }\n }catch (Exception e){\n System.out.println(e);\n\n }\n return false;\n }", "@Override\r\n\tpublic User Authenticate(String username) {\n\t\t\tSession currentSession = this.sessionFactory.getCurrentSession();\r\n\t\t\tSystem.out.println(username);\r\n\t\t\tList<User> userList = currentSession.createCriteria(User.class)\r\n\t\t\t\t\t.add(Restrictions.eq(\"email\", username))\r\n\t\t\t\t\t.list();\r\n\t\treturn userList.get(0);\r\n\t}", "LoggedUser authenticate(@Valid AccountCredentials credentials) throws IOException;", "@Override\n public boolean login(String userName, String password) throws WrongCredentialsException, UserDatabaseNotFoundException, WrongUserDatabase {\n actualUser = userRepository.authenticate(userName, password);\n lastUserName = userName;\n return true;\n }", "User authenticate(String username, String password);", "@And(\"^user is not authenticated$\")\n public void userIsNotAuthenticated() throws Throwable {\n }", "@Override\n\tpublic Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows AuthenticationException, IOException, ServletException {\n\t\tString url = request.getServletPath();\n\t\tString header = request.getHeader(AUTHORIZATION);\n\t\tlogger.debug(\"[authorized] request header : \" + header + \",request url :\" + url);\n\t\tif (header != null) {\n\t\t\tfinal int space = header.indexOf(' ');\n\t\t\tif (space > 0) {\n\t\t\t\tfinal String method = header.substring(0, space);\n\t\t\t\tif (PREFIX.equalsIgnoreCase(method)) {\n\t\t\t\t\tfinal String credentials = header.substring(space + 1);\n\t\t\t\t\tAbstractAuthenticationToken userAuthenticationToken = authUserByToken(credentials);\n\t\t\t\t\tif (userAuthenticationToken == null) {\n\t\t\t\t\t\tlogger.error(\"[unauthorized] access token is empty in header ,request header : \"\n\t\t\t\t\t\t\t\t+ header + \",request url :\" + url);\n\t\t\t\t\t\tthrow new AuthTokenException(\"2.404\",\n\t\t\t\t\t\t\t\tMessageFormat.format(\"Error | {0}\", \"Bad Token\"));\n\t\t\t\t\t}\n\t\t\t\t\treturn this.getAuthenticationManager().authenticate(userAuthenticationToken);\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new AnonymousAuthenticationToken(UUID.randomUUID().toString(), \"anonymousUser\",\n\t\t\t\tAuthorityUtils.createAuthorityList(\"ROLE_ANONYMOUS\"));\n\t}", "private void allowForRefreshToken(ApplicationUser user, HttpServletRequest request) {\n UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(\n null, null, null);\n SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);\n request.setAttribute(\"user\", user);\n }", "public void setSecurityContext() {\n ctx = SecurityContextHolder.getContext();\n SecurityContextHolder.getContext();\n final Authentication authentication = ctx.getAuthentication();\n setName(authentication.getName()); //NOPMD\n }", "@Override\n\tprotected void checkLoginRequired() {\n\t\treturn;\n\t}", "protected void doLogin(Authentication authentication) throws AuthenticationException {\n \n }", "@Override\n protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {\n PreAuthenticatedAuthenticationToken x509PreAuth = Optional.ofNullable(SecurityContextHolder.getContext())\n .map(SecurityContext::getAuthentication)\n .map(PreAuthenticatedAuthenticationToken.class::cast)\n .orElse(null);\n\n SecurityContextHolder.clearContext();\n\n if (x509PreAuth == null) {\n AuthenticationException failed = new PreAuthenticatedCredentialsNotFoundException(\"Missing required X509 Client Authentication\");\n\n if (this.logger.isDebugEnabled()) {\n this.logger.debug(\"Authentication request for failed: \" + failed);\n }\n\n this.rememberMeServices.loginFail(request, response);\n\n onUnsuccessfulAuthentication(request, response, failed);\n\n if (this.isIgnoreFailure()) {\n chain.doFilter(request, response);\n } else {\n getAuthenticationEntryPoint().commence(request, response, failed);\n }\n\n return;\n }\n\n try {\n currentX509Auth.set(x509PreAuth);\n super.doFilterInternal(request, response, chain);\n } finally {\n currentX509Auth.remove();\n }\n }", "@Override\r\n public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response)\r\n\t throws AuthenticationException, IOException, ServletException {\r\n\t\r\n\t// ~~~ Token aus dem Header extrahieren\r\n\tString token;\r\n\ttry {\r\n\t token = request.getHeader(WebSecurityConfig.JWT_TOKEN_HEADER);\r\n\t token = token.substring(WebSecurityConfig.JWT_TOKEN_PREFIX.length());\r\n\t} catch (Exception e) {\r\n\t throw new FailedJWTAuthenticationException();\r\n\t}\r\n\t\r\n\t// ~~~ Token als Authentication verpackt weiterleiten\r\n\treturn getAuthenticationManager().authenticate(new JWTAuthenticationToken(JWT.decode(token)));\r\n }", "public void checkForTempUsername() {\r\n\t\t// get my profile, and check for a default username\r\n\t\tUserProfile userProfile = authenticationController.getCurrentUserProfile();\r\n\t\tif (userProfile != null && DisplayUtils.isTemporaryUsername(userProfile.getUserName())) {\r\n\t\t\tgotoChangeUsernamePlace();\r\n\t\t} else {\r\n\t\t\tgoToLastPlace();\r\n\t\t}\r\n\t}", "@Override\n public void onAuthenticationFailed() {\n }", "public void loginUser(String username, String password)\n throws UserDetailsDoNotExistException, UserDetailsIncorrectException {\n currentUser = login.loginUser(username, password);\n }", "@Override\n\tpublic Authentication Login(String username, String password) {\n\t\t try {\n\t\t\t\n \tAuthentication request = new UsernamePasswordAuthenticationToken(username, password);\n \tAuthentication result =authenticationManager.authenticate(request);\n \tSecurityContextHolder.getContext().setAuthentication(result);\n \treturn result;\n\t\t }\n\t\t catch(AccessDeniedException e) {\n\t \t System.out.println(\"Authentication failed: \" + e.getMessage()) ;\n\t }\n\t\t catch(BadCredentialsException e) {\n\t\t\t System.out.println(\"Authentication failed: \" + e.getMessage()) ;\n\t } catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t \t System.out.println(\"Authentication failed: \" + e.getMessage()) ;\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\n\t\t return null;\n\t}", "@Override\n\tpublic String intercept(ActionInvocation ai) throws Exception {\n\t\t\n\t\tMap session=ai.getInvocationContext().getSession();\n\n\t\tString userName=(String)session.get(\"userName\");\n\t\tif(userName!=null){\n\t\t\t//System.out.println(\"session有效,用户不为空\");\n\t\t\treturn ai.invoke();\n\t\t}else{ \n\t\t\tActionContext ac=ai.getInvocationContext();\n\t\t\tac.put(\"errorMessage\",\"用户未登录,请先登录。\");\n\t\t\tSystem.out.println(\"用户session过期,被转发到登录界面\");\n\t\t\treturn \"login\"; \n\t\t}\t\n\t}", "@Override\n public void onAuthenticationFailed() {\n }", "private void verifyActiveUser(){\r\n\t\tif(request.getUserPrincipal() == null)\r\n\t\t{\t\t\r\n\t\t\trequest.getSession().removeAttribute(\"isActive\");\r\n\t\t\trequest.getSession().invalidate();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tresponse.sendRedirect(\"login.jsp\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void attemptUsernamePasswordLogin()\n {\n if (mAuthTask != null)\n {\n return;\n }\n\n if(mLogInButton.getText().equals(getResources().getString(R.string.logout)))\n {\n mAuthTask = new RestCallerPostLoginTask(this,mStoredToken,MagazzinoService.getAuthenticationHeader(this),true);\n mAuthTask.execute(MagazzinoService.getLogoutService(this));\n return;\n }\n // Reset errors.\n mUsernameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mUsernameView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password))\n {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email))\n {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n else if (!isUsernameOrEmailValid(email))\n {\n mUsernameView.setError(getString(R.string.error_invalid_email));\n focusView = mUsernameView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n return;\n }\n\n mAuthTask = new RestCallerPostLoginTask(this,email, password);\n mAuthTask.execute(MagazzinoService.getLoginService(this));\n\n }", "boolean isAuthenticate(String username, String password) throws UserDaoException;", "private void checkIfUserIsAuthenticated() {\n splashViewModel.checkIfUserIsAuthenticated();\n splashViewModel.getIsUserAuthenticated().observe(this, user -> {\n if (!user.isAuthenticated()) {\n startAuthActivity();\n finish();\n } else {\n getUserFromDatabase(user.getUid());\n }\n });\n }", "private UserAuthenticationResponse allowAuthentication(String username) {\n final UserDetails userDetails = myUserDetailsService.loadUserByUsername(username);\n\n final String jwt = jwtUtil.generateToken(userDetails);\n\n final Date otpExpirationTime = jwtUtil.extractExpiration(jwt);\n\n return UserAuthenticationResponse.builder()\n .jwt(jwt)\n .username(username) // Mobile number user's username will be mobile number with country code\n .otpExpirationTime(otpExpirationTime.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime())\n .build();\n }", "public void authenticateUser() {\n\n String username = viewUsername.getText().toString();\n String password = viewPassword.getText().toString();\n\n Timber.v(\"authenticateUser called username: \" + username);\n activity.getOnboardingViewModel().authenticateUser(username, password);\n }", "private static void logedIn(Request req, Response res, CloudService cloud) {\r\n\t\t\tif (cloud.getKorisnici().get(req.cookie(\"userID\")) == null) {\r\n\t\t\t\tString[] params = req.splat();\r\n\t\t\t\tString path;\r\n\t\t\t\tif(params.length == 0)\r\n\t\t\t\t\tpath = \"\";\r\n\t\t\t\telse\r\n\t\t\t\t\tpath = params[0];\r\n\t\t\t\tif(path.equals(\"checkLogin\") || path.equals(\"favicon.ico\"))\r\n\t\t\t\t\treturn;\r\n\t\t\t\tres.redirect(\"/login.html\");\r\n\t\t\t\thalt(302);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(req.session().attribute(\"user\") == null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tKorisnik k = cloud.getKorisnici().get(req.cookie(\"userID\"));\r\n\t\t\t\t\treq.session().attribute(\"user\", k); // postavi mu korisnika za sesiju\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "@Override\n\tpublic boolean authenticate(final String name, final String password) {\n\t\treturn StringUtils.isNotBlank(name) && StringUtils.isNotBlank(password) && findByIdNoCache(name) != null;\n\t}", "@Override\n\tpublic boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)\n\t\t\tthrows Exception {\n\t\t System.err.println(\"URI -- \"+request.getRequestURL());\n\t\t if(request.getRequestURI()!=null &&\n\t\t (request.getRequestURI().contains(\"/self/login\"))) return true;\n\t\t \n\t\t \n\t\t String authHeader = request.getHeader(AUTH_HEADER);\n\t\t \n\t\t if (authHeader == null) { \n\t\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(TOKEN_EXPIRE_MSG.getBytes()); return false;\n\t\t }\n\t\t \n\t\t if (authHeader.contains(\"Basic \")) {\n\t\t \n\t\t String encodedUserNamePassword = authHeader.split(\"Basic \")[1]; String\n\t\t strValue = \"\";\n\t\t try\n\t\t { \n\t\t\t strValue = new String(java.util.Base64.getDecoder().decode(encodedUserNamePassword.getBytes(\n\t\t\t\t\t \t\t)), \"UTF-8\"); \n\t\t }\n\t\t catch (Exception e)\n\t\t { \n\t\t\t e.printStackTrace(); \n\t\t\t // TODO: handle exception return false; \n\t\t }\n\t\t \n\t\t String[] arrayOfString = strValue.split(\"\\\\:\");\n\t\t \n\t\t if (arrayOfString.length > 1) \n\t\t { \n\t\t\t \tString userName = arrayOfString[0]; String\n\t\t\t \tpassword = arrayOfString[1]; System.err.println(userName);\n\t\t\t \tSystem.err.println(password);\n\t\t \n\t\t\t \tpassword = Base64.getEncoder().encodeToString((password + \"\").getBytes(\"utf-8\")); \n\t\t\t \tUsernamePasswordAuthenticationToken\n\t\t\t \tusernamePasswordAuthenticationToken = new\n\t\t\t \tUsernamePasswordAuthenticationToken( userName, password);\n\t\t \n\t\t\t \tAuthentication authentication = null; \n\t\t\t \ttry { authentication =\n\t\t\t \t\t\tautheticationManager.authenticate(usernamePasswordAuthenticationToken);\n\t\t \n\t\t } catch (Exception ex) { \n\t\t\t ex.printStackTrace();\n\t\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes());\n\t\t \n\t\t\t return false; \n\t\t } \n\t\t if (authentication.isAuthenticated()) {\n\t\t\t SecurityContextHolder.getContext().setAuthentication(authentication);\n\t\t\t return true; \n\t\t } else { \n\t\t\t\n\t\t\tresponse.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes()); \n\t\t\t return false; \n\t\t\t } \n\t\t } else { \n\t\t\t String encodedValue = authHeader.split(\"Basic \")[1];\n\t\t \n\t\t\t if (isValidToken(encodedValue)) return true;\n\t\t \n\t\t \tresponse.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t \tresponse.getOutputStream().write(TOKEN_EXPIRE_MSG.getBytes()); return false;\n\t\t }\n\t\t \n\t\t } \n\t\t response.setContentType(JSON_HAL_CONTENT_TYPE);\n\t\t response.getOutputStream().write(UNAUTHORISED_ACCESS_MSG.getBytes()); return\n\t\t false;\n\t\t \n\t\t\n\t}", "@Override\n public CustomUserDetails loadUserByUsername(final String username) throws UsernameNotFoundException {\n\n var user = userRepository\n .findUserByUsername(username)\n .orElseThrow(\n () -> new UsernameNotFoundException(\"Problem during authentication!\")\n );\n\n return new CustomUserDetails(user);\n }", "@Override\n protected void initiateAuthenticationRequest(HttpServletRequest request, HttpServletResponse response,\n AuthenticationContext context) throws AuthenticationFailedException {\n String loginPage = ConfigurationFacade.getInstance().getAuthenticationEndpointURL()\n .replace(\"authenticationendpoint/login.do\", Token2Constants.LOGIN_PAGE);\n String queryParams = FrameworkUtils.getQueryStringWithFrameworkContextId(context.getQueryParams(),\n context.getCallerSessionKey(), context.getContextIdentifier());\n String retryParam = \"\";\n if (context.isRetrying()) {\n retryParam = Token2Constants.RETRY_PARAMS;\n }\n try {\n response.sendRedirect(loginPage + (\"?\" + queryParams) + \"&authenticators=\"\n + getName() + retryParam);\n } catch (IOException e) {\n throw new AuthenticationFailedException(\"Authentication failed!\", e);\n }\n }", "public void autoLogin(String username, String password) {\n UserDetails userDetails = loadUserByUsername(username);\n UsernamePasswordAuthenticationToken usernamePasswordAuthenticationToken = new UsernamePasswordAuthenticationToken(\n userDetails, password, userDetails.getAuthorities());\n\n authenticationManager.authenticate(usernamePasswordAuthenticationToken);\n\n if (usernamePasswordAuthenticationToken.isAuthenticated()) {\n SecurityContextHolder.getContext().setAuthentication(usernamePasswordAuthenticationToken);\n LOGGER.debug(\"Auto login was successfull for user: \" + username);\n }\n }", "public Boolean authenticate(String username, String password) {\n try {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(\n username,\n password\n )\n );\n\n SecurityContextHolder.getContext().setAuthentication(authentication);\n return true;\n } catch (BadCredentialsException e) {\n return false;\n }\n }", "@Override\r\n protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) \r\n\t throws IOException, ServletException {\r\n SecurityContext context = SecurityContextHolder.createEmptyContext();\r\n context.setAuthentication(authResult);\r\n SecurityContextHolder.setContext(context);\r\n chain.doFilter(request, response);\r\n }", "private int checkAuthentication( SecureDirectory secureDirectory ) throws ServerException {\r\n\r\n\t\tif ( secureDirectory == null )\r\n\t\t\treturn NOT_SECURE_DIR;\r\n\r\n\t\tif ( !request.getHeaderFields().containsKey( HeaderFields.AUTHORIZATION ) )\r\n\t\t\treturn NEED_AUTHENTICATE;\r\n\r\n\t\tString auth = request.getHeaderFields().get( HeaderFields.AUTHORIZATION );\r\n\t\tString[] tokens = auth.split( \" \", 2 );\r\n\t\tif ( authenticate( secureDirectory, tokens[0], tokens[1] ) )\r\n\t\t\treturn AUTHENTICATED;\r\n\r\n\t\t// Password or username not correct\r\n\t\tthrow new ServerException( ResponseTable.FORBIDDEN );\r\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}", "@Override\n public void filter(final ContainerRequestContext requestContext) throws IOException {\n final String authToken = requestContext.getHeaders().getFirst(\"authToken\");\n\n if (StringUtils.isBlank(authToken)) {\n throw unauthorizedWebException();\n }\n\n try {\n // authenticate using token to get principle\n final Optional<P> principal = authenticator.authenticate(authToken);\n\n // set security context on request\n if (principal.isPresent()) {\n setSecurityContextOnRequest(requestContext, principal);\n return;\n }\n } catch (AuthenticationException e) {\n LOGGER.warn(\"Error authenticating credentials\", e);\n throw unauthorizedWebException();\n }\n\n throw unauthorizedWebException();\n }", "@Override\n\tpublic User login(String username) {\n\t\treturn userDao.login(username);\n\t}", "@Override\r\n\tpublic String getCurrentUserName() {\r\n\t\tString currentUserName = SecurityContextHolder.getContext().getAuthentication().getName();\r\n\t\treturn currentUserName;\r\n\t}", "@Override\n\t@Transactional(readOnly=true)\n\tpublic UserType authenticate(String username, String password) {\n\t\treturn null;\n\t}", "@Override\n protected boolean tryAlreadyLoginOrRememberMe(LoginHandlingResource resource) {\n if (super.tryAlreadyLoginOrRememberMe(resource)) { // if hybrid with session\n return true;\n }\n return requestManager.getHeader(\"x-authorization\").flatMap(token -> {\n return findByAuthToken(token).map(member -> {\n syncCheckLoginSessionIfNeeds(createUserBean(member)); // sometimes synchronize with database\n saveLoginInfoToSession(member); // if hybrid with session\n return true;\n });\n }).orElse(false);\n }", "@Override\n public JsonResponse duringAuthentication(String... params) {\n try {\n final String username = params[0];\n final String password = params[1];\n return RequestHandler.authenticate(this.getApplicationContext(), username, password);\n } catch (IOException e) {\n return null;\n }\n }", "public CheckUserCredentials(HttpServletRequest request, HttpServletResponse response) {\n super(request, response);\n this.mail = \"\";\n this.password = null;\n }", "protected void onUnsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException {\n }", "@Override\n protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {\n logger.info(\"authentication filter enabled\");\n if (JwtUtils.isBasicAuth(request)){\n chain.doFilter(request, response);\n } else {\n UsernamePasswordAuthenticationToken authenticationToken = getAuthentication(request);\n SecurityContextHolder.getContext().setAuthentication(authenticationToken);\n chain.doFilter(request, response);\n }\n }", "@Override\n public boolean authenticated(final String username, final String password) {\n\n Claim claim;\n try {\n claim = credService.authenticate(new PasswordCredentialsWrapper(username, password));\n } catch (AuthenticationException e) {\n LOG.debug(\"Authentication failed for user '{}' : {}\", username, e);\n return false;\n }\n\n LOG.debug(\"Authentication result for user '{}' : {}\", username, claim.domain());\n return true;\n }", "@Override\n public boolean isLoggedin(HttpServletRequest request) {\n boolean result = false;\n HttpSession session = request.getSession();\n String userName = (String) session.getAttribute(\"userName\");\n String token = (String) session.getAttribute(\"token\");\n if (userName != null && token != null) {\n CrUser user = userRepo.findByUserName(userName);\n if (user != null && isTokenValid(user, token)) {\n result = true;\n }\n }\n return result;\n }", "public String doLogin() throws ServletException, IOException {\r\n\r\n\t\tExternalContext context = FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext();\r\n\t\tcontext.getSessionMap().put(\"messageSpring\", null);\r\n\t\tcontext.getSessionMap().put(\"SPRING_SECURITY_LAST_EXCEPTION\", null);\r\n\r\n\t\tRequestDispatcher dispatcher = ((ServletRequest) context.getRequest())\r\n\t\t\t\t.getRequestDispatcher(\"/j_spring_security_check\");\r\n\r\n\t\tdispatcher.forward((ServletRequest) context.getRequest(),\r\n\t\t\t\t(ServletResponse) context.getResponse());\r\n\r\n\t\tFacesContext.getCurrentInstance().responseComplete();\r\n\t\tutilisateur = loginBusiness.findUser(username);\r\n\r\n\t\treturn null;\r\n\t}", "private void handleUser(String username) {\n if (username.toLowerCase().equals(validUser)) {\n sendMsgToClient(\"331 User name okay, need password\");\n currentUserStatus = userStatus.ENTEREDUSERNAME;\n } else if (currentUserStatus == userStatus.LOGGEDIN) {\n sendMsgToClient(\"530 User already logged in\");\n } else {\n sendMsgToClient(\"530 Not logged in\");\n }\n }", "@Override\n public Authentication authenticate(Authentication authentication) throws AuthenticationException {\n JwtToken jwtToken = (JwtToken) authentication.getPrincipal();\n Claims claims = null;\n try{\n claims = jwtTokenUtil.parseToken(jwtToken);\n jwtToken.setUsername((String)claims.get(\"username\"));\n jwtToken.setPassword((String)claims.get(\"password\"));\n }catch(ExpiredJwtException e){\n throw new ExpiredTokenException(e.getMessage());\n }catch(Exception e){\n throw new InvalidTokenException(e.getMessage());\n }\n\n SecurityContextHolder.getContext().setAuthentication(authentication);\n //exp date check\n return authentication;\n }", "private boolean isAuthenticated(final ContainerRequestContext requestContext) {\n // Return true if the user is authenticated or false otherwise\n return requestContext.getSecurityContext().getUserPrincipal() != null;\n }", "public void authenticate() {\n LOGGER.info(\"Authenticating user: {}\", this.name);\n WebSession result = null;\n try {\n result =\n getContext()\n .getAuthenticationMethod()\n .authenticate(\n getContext().getSessionManagementMethod(),\n this.authenticationCredentials,\n this);\n } catch (UnsupportedAuthenticationCredentialsException e) {\n LOGGER.error(\"User does not have the expected type of credentials:\", e);\n } catch (Exception e) {\n LOGGER.error(\"An error occurred while authenticating:\", e);\n return;\n }\n // no issues appear if a simultaneous call to #queueAuthentication() is made\n synchronized (this) {\n this.getAuthenticationState().setLastSuccessfulAuthTime(System.currentTimeMillis());\n this.authenticatedSession = result;\n }\n }", "@Override\n public void onAuthenticationSuccess(HttpServletRequest httpServletRequest,\n HttpServletResponse httpServletResponse,\n Authentication authentication)\n throws IOException, ServletException {\n HttpSession httpSession = httpServletRequest.getSession();\n httpSession.setMaxInactiveInterval(50000);\n\n\n\n\n System.out.println(\"Jab Ban: \" + httpServletRequest.getSession().getAttribute(\"EHAN_REDIRECT_URI\"));\n\n\n String redirectURI = (String) httpServletRequest.getSession().getAttribute(\"EHAN_REDIRECT_URI\");\n\n if (redirectURI == null)\n redirectURI = \"/\";\n\n\n for (GrantedAuthority grantedAuthority:\n authentication.getAuthorities()) {\n\n System.out.println(grantedAuthority.getAuthority());\n\n System.out.println(\"==============getDetails================\");\n System.out.println(authentication.getDetails());\n System.out.println(\"==============getPrincipal================\");\n System.out.println(authentication.getPrincipal());\n System.out.println(\"==============getCredentials================\");\n System.out.println(authentication.getCredentials());\n System.out.println(\"===============getAuthorities===============\");\n System.out.println(authentication.getAuthorities());\n System.out.println(\"===============getName===============\");\n System.out.println(authentication.getName());\n\n\n if (grantedAuthority.getAuthority().equals(\"ROLE_ADMIN\")) {\n redirectURI = \"/admin\";\n break;\n }\n else if (grantedAuthority.getAuthority().equals(\"ROLE_DBA\")) {\n redirectURI = \"/dba\";\n break;\n }\n else if (grantedAuthority.getAuthority().equals(\"ROLE_USER\")) {\n redirectURI = \"/user\";\n break;\n }\n \n }\n\n httpServletResponse.sendRedirect(redirectURI);\n\n }", "public boolean isAuthenticationRequired() {\n\t\treturn true;\n\t}", "void resetLoginAttempts(String username);", "public boolean isAuthenticated() {\r\n return SecurityContextHolder.getContext().getAuthentication() != null;\r\n }", "public void authenticate(LoginCredentials credentials) throws LoginException;", "@PreAuthorize(\"permitAll()\")\n @RequestMapping(\n value = \"/users/auth\",\n method = RequestMethod.POST\n )\n public ResponseEntity<AuthResponse> authenticate(@RequestParam(value = \"username\") String username, @RequestParam(value = \"password\") String password) {\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(username, password)\n );\n\n SecurityContextHolder.getContext().setAuthentication(authentication);\n final UserDetails userDetails = userDetailsService.loadUserByUsername(username);\n final String token = tokenUtils.generateToken(userDetails);\n\n return ResponseEntity.ok(new AuthResponse(token));\n }", "void onRetryAuthentication();", "EmployeeMaster authenticateUser(int employeeId, String password);", "@Override\n\tpublic boolean login(String username, String password) {\n\t\treturn userProviderService.login(username, password);\n\t}", "@Override\n\tprotected void doFilterInternal(HttpServletRequest request, \n\t\t\tHttpServletResponse response, \n\t\t\tFilterChain chain) throws IOException, ServletException {\n\t\t\n\t\tString header = request.getHeader(\"Authorization\");\n\t\tif (header != null && header.startsWith(\"Bearer \"))\t{\n\t\t\tUsernamePasswordAuthenticationToken auth = this.getAuthentication(header.substring(7));\n\n\t\t\tif (auth != null) {\n\t\t\t\tSecurityContextHolder.getContext().setAuthentication(auth);\n\t\t\t} else if (!SecurityConfig.verifyPermissionURI(request.getRequestURI())){\n\t\t\t\tonUnsuccessfulAuthentication(request, response, new SessionAuthenticationException(\"Unauthorized - invalid session\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!SecurityConfig.verifyPermissionURI(request.getRequestURI())) {\n\t\t\tonUnsuccessfulAuthentication(request, response, new SessionAuthenticationException(\"Unauthorized\"));\n\t\t\treturn;\n\t\t}\n\n\t\tchain.doFilter(request, response);\n\t}", "@Override\n\tpublic boolean employeeLogin(Context ctx) {\n\t\tString username = ctx.formParam(\"username\");\n\t\tString password = ctx.formParam(\"password\");\n\t\tboolean result = authService.employeeLogIn(username, password);\n\t\treturn result;\n\t}", "@Override\n\tpublic UserDetailsBean login(UserDetailsBean userDetailsBean) {\n\t\treturn userDao.login(userDetailsBean);\n\t}", "@Override\n protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authentication)\n throws IOException, ServletException {\n String name = authentication.getName();\n tokenAuthenticationService.addAuthentication(response, name);\n }", "@Override\n protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {\n String token = provider.getTokenFromHttpHeader(request);\n\n try {\n if (token != null && provider.validateToken(token)) {\n Authentication authentication = provider.getAuthentication(token);\n SecurityContextHolder.getContext().setAuthentication(authentication);\n }\n } catch (Exception ex) {\n System.out.println(ex);\n SecurityContextHolder.clearContext();\n }\n\n chain.doFilter(request, response);\n }", "AuthenticationToken authenticate(String username, CharSequence password) throws Exception;", "private void authenticate(String user, String pass) {\n }", "public void reauthenticateBackendServer() {\n\t\tString token = userLogin();\n\n\t\t// Update the retrieved token in the database.\n\t\tUser user = userRepository.findByEmailIgnoreCase(SecurityUtils.getCurrentUser().getEmail());\n\t\tuser.setBackendToken(token);\n\t\tuserRepository.save(user);\n\n\t\t// Update the user token on the Security context\n\t\tupdateUserToSecurityContext(user, request);\n\t}", "@Override\n\tpublic String intercept(ActionInvocation invocation) throws Exception {\n\t\t\n\t\tActionContext context = invocation.getInvocationContext();\n\t\tMap<String, Object> session = context.getSession();\n\t\t\n\t\tif(session.get(\"user\")!=null){\n\t\t\t\n\t\t\treturn invocation.invoke();\n\t\t\t\n\t\t}\n\t\treturn \"userLogin\";\n\t}", "public String login(){\n UsernamePasswordToken token = new UsernamePasswordToken(user.getAccount(),\n user.getPassword());\n\n// \"Remember Me\" built-in:\n token.setRememberMe(user.isRememberMe());\n\n Subject currentUser = SecurityUtils.getSubject();\n\n\n try {\n currentUser.login(token);\n } catch (AuthenticationException e) {\n // Could catch a subclass of AuthenticationException if you like\n FacesContext.getCurrentInstance().addMessage(\n null,\n new FacesMessage(\"Login Failed: \" + e.getMessage(), e\n .toString()));\n return \"/login\";\n }\n return \"index\";\n }", "@Override\n public AuthenticatedUser authenticateUser(Credentials credentials)\n throws GuacamoleException {\n SSOAuthenticationProviderService authProviderService =\n injector.getInstance(SSOAuthenticationProviderService.class);\n\n return authProviderService.authenticateUser(credentials);\n\n }" ]
[ "0.6368408", "0.62293935", "0.6145738", "0.6097308", "0.60881466", "0.60708755", "0.6062199", "0.6017228", "0.5995228", "0.596356", "0.5960458", "0.5943242", "0.5941141", "0.59325176", "0.5901533", "0.5897362", "0.58831626", "0.5875035", "0.58223206", "0.5817763", "0.5801872", "0.57919556", "0.57795703", "0.5776235", "0.57380956", "0.5735618", "0.5732851", "0.57224905", "0.5719891", "0.5715628", "0.5703454", "0.56927854", "0.56925017", "0.56725186", "0.56706256", "0.56574684", "0.5654715", "0.56510496", "0.5642042", "0.5638955", "0.56313103", "0.5626446", "0.56227845", "0.5622618", "0.5620911", "0.56149477", "0.5606265", "0.55990696", "0.5582341", "0.55680233", "0.55589503", "0.5554614", "0.55451363", "0.5538478", "0.5534748", "0.5531473", "0.5528136", "0.55219555", "0.5517194", "0.551699", "0.5514072", "0.55131924", "0.5511346", "0.5488613", "0.54883564", "0.54858375", "0.54837483", "0.5478932", "0.5478683", "0.5472068", "0.54706395", "0.54659563", "0.54635525", "0.54627126", "0.546126", "0.54592794", "0.5456707", "0.5453174", "0.5452549", "0.5445041", "0.5440531", "0.54403675", "0.544014", "0.543981", "0.5439605", "0.5435403", "0.54262376", "0.5422999", "0.54216737", "0.5414736", "0.5411873", "0.5406993", "0.54067975", "0.54056406", "0.54037005", "0.54033166", "0.54027545", "0.5399026", "0.53988266", "0.5393032" ]
0.6836177
0
This is basis of polymorphism And it is supposed to work like that. Any method is dispatched (selected/invoked) dynamically according to the actual type of the object instead of the type by which it is being referred to. When you cast the object to another type, you just refer it using another type. The actual type of the object is not changed. (And it can never change). So the behavior that you are observing is as expected and it is designed to be that way. It's definitely not a limitation. Hope this helps.
public static void main(String[] args) { Charlie c1 = new Foxtrot(); Charlie c2 = new Tango(); Charlie c3 = (Charlie) new Tango(); System.out.println(c3 instanceof Foxtrot); System.out.println(c1.getType() + " " + c2.getType() + " " + c3.getType()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\r\n\t}", "public static void main(String[] args) {\n\t\tFirst ob1=new First();\n\t\tSecond obj2=new Second();\n\t\t\n\t\tFirst f1=(First)obj2;\n\t\tf1.show();\n\t\t\n\t\tFirst f2=(Second)obj2;//derived object can be casted to base class\n\t\tf2.show();\n\t\t\n// \tSecond f3=(Second)ob1;//base object cannot be casted to derived object\n// \t\tf3.show();\n\t}", "public static void main(String[] args) {\n\n// ChildPrint childPrint = new ChildPrint();\n// childPrint.printName();\n\n// ChildOverridingPrivate child = new ChildOverridingPrivate();\n// child.printName();\n\n ParentCasting parent = new ParentCasting();\n ChildCasting child = new ChildCasting();\n\n ParentCasting obj1 = new ChildCasting();\n ChildCasting obj2 = (ChildCasting) new ParentCasting();\n\n\n }", "public static void main(String[] args) {\n Vehicle vehicle = new Vehicle(4,\"Black\",12343443,true);\n Object vehicle2 = new Vehicle(4,\"White\",32343443,false);\n //Create RegisteredVehicle Object\n RegisteredVehicle registeredVehicle =\n new RegisteredVehicle(4,\"Red\",134345454,true,\n \"AN123\", LocalDate.of(2020,5,2), LocalDate.of(2021, 5, 2));\n Vehicle registredVihicle2 = new RegisteredVehicle(4,\"Blue\",23322434,true,\n \"ABC222\", LocalDate.of(2020,4,22), LocalDate.of(2021, 4, 22));\n //Create Bike Object\n Bike bike =\n new Bike(2,\"black\",1213223,\n \"AC2323\",LocalDate.of(2020,4,22),\n LocalDate.of(2021, 4, 22),\n \"Sport\", \"Yamaha\",1000);\n RegisteredVehicle bike2 = new Bike(2,\"blue\",1213223,\n \"Abb2323\",LocalDate.of(2020,4,22),\n LocalDate.of(2021, 4, 22),\n \"Sport\", \"BMW\",1000);\n Vehicle bike3 = new Bike(2,\"Yellow\",33434,\n \"jjj222\",LocalDate.of(2020,4,22),\n LocalDate.of(2021, 4, 22),\n \"Sport\", \"Honda\",1000);\n\n System.out.println(\"price for vehicle object \" + VehicleShop.estimatePrice(vehicle));\n //vehicle2 is stored in Object class, which is larger than Vehicle class, so it Vehicle param cannot take it.\n //we can use casting in order to narrow down the variable data type\n System.out.println(vehicle2);//doesnt have access to any Vehicle members\n System.out.println(\"price for vehicle object \" + VehicleShop.estimatePrice((Vehicle)vehicle2));//we are changing\n //the data type of vehicle2 to Vehicle from Object\n System.out.println(((Vehicle) vehicle2).getNumOfWheels());\n System.out.println(VehicleShop.estimatePrice(registeredVehicle));\n //polymorphism\n Vehicle vehicle1 = VehicleShop.createAnObject(\"vehicle\");\n Bike bike1 = (Bike)VehicleShop.createAnObject(\"bike\");//cast\n bike1.setBrand(\"Yamaha\");\n System.out.println(bike1.getBrand());\n// Bike bike4 = (Bike)VehicleShop.createAnObject(\"registeredvehicle\");//ClassCast Exception.\n// //which we get when the actual object that's stored in the Parent Class data type is not\n// //covariant to the object we try casting to.\n// bike4.setBrand(\"Honda\");\n// System.out.println(bike4.getBrand());\n Vehicle vehicle3 = new Vehicle();//has info only about vehicle\n Vehicle v = new RegisteredVehicle();//has info about vehicle\n //by casting we can also get info about RegisteredVehicle.\n //RegisteredVehicle rg = (RegisteredVehicle)vehicle3;//class cast exception\n RegisteredVehicle rg = (RegisteredVehicle)v; //which object v is pointing to?\n //the object v is pointing to should be same or narrower than what we are trying to cast to.\n RegisteredVehicle rv = new Bike();\n Bike b1 = (Bike)rv;\n System.out.println(vehicle3.sum(4,2));\n //if the method is overridden in subclass\n //and the variable is stored in the parent class DataType\n //but actual value(object is subclass) we call a method in subclass\n System.out.println(v.sum(4,2));\n //Casting\n int y = 100;\n short x = (short)y;//compile time error.\n sum((byte)y);\n // sum(\"Hello\");cannot even be casted because they are not covariant.\n }", "public static void main(String[] args) {\n\n Dog dog = new Dog();\n Cat cat = new Cat();\n System.out.println(\"The dog's age is \"+ dog.getAge());\n System.out.println(\"The cat's age is \"+ cat.getAge());\n cat.meow();\n dog.ruff();\n dog.eat();\n cat.eat();\n dog.run();\n cat.prance();\n\n System.out.println();\n System.out.println();\n dog.eat();\n cat.eat();\n\n System.out.println();\n System.out.println();\n cat.sleep();\n dog.sleep();\n\n //Converting from a super to a sub\n //Animal billy = new Dog();\n\n // Casting\n Object doggie = new Dog();\n Dog realDog = (Dog) doggie;\n realDog.ruff();\n\n Object str = \"est\";\n String realS = (String) str;\n realS.getBytes();\n\n // What happens when...\n\n Dog doggy = new Dog();\n if (dog instanceof Animal){\n Animal animal = (Animal) doggy;\n animal.sleep();\n }\n doggy.sleep();\n\n }", "private static void doSomething(Operable operable)\r\n {\n operable.run(1000);\r\n\r\n //Here we are casting, or \"relabeling\" the Operable as a laptop.\r\n //this does not affect what is stored in the actual object\r\n //this works because we actually passed a laptop.\r\n Laptop laptop = (Laptop) operable;\r\n System.out.println(laptop.getProcessorSpeed());\r\n\r\n //This, however, is violating the compiler's trust!\r\n //The compiler will think that we know what we are doing, and allow us to compile this code.\r\n //However, the operable we passed in is NOT a Car, and this will crash during runtime\r\n Car car = (Car) operable; //ClassCastException thrown here\r\n }", "public static void main(String[] args) {Car c = new Car();\n//\t\t\n//\t\tSystem.out.println(c.doors);\n//\t\tSystem.out.println(c.model);\n//\t\t\n\t\tSystem.out.println(\"=============================================\");\n\t\t\n\t\t\n\t\tCar c2 = new Car(5, 7, \"model x\", \"black\");\n\t\t\n\t\tSystem.out.println(c2.doors);\n\t\tSystem.out.println(c2.color);\n\t\t\n\t\tSystem.out.println(\"=============================================\");\n\t\t\n\t\tSportsCar s = new SportsCar(); \n\t\t\n\t\ts.drive();\n\t\tSystem.out.println(s.color);\n\t\t\n\t\tSportsCar s2 = new SportsCar(6, 9, \"RX-8\", \"Hot Pink\");\n\t\t\n\t\t\n\t\tSystem.out.println(s2.color);\n\t\t\n\t\tSystem.out.println(\"=============================================\");\n\t\t\n\t\tMustang m = new Mustang(2, \"gt\", \"yellow\");\n\t\t\n\t\t//this shows overriding.\n\t\ts.drive();\n\t\tm.drive();\n\t\t\n\t\t//Static methods can be called directly from the class. \n\t\tSportsCar.honk();\n\t\tMustang.honk();\n\t\t\n\t\tSystem.out.println(\"=============================================\");\n\t\t\n\t\t//Example of upcasting. \n\t\tSportsCar sc = new Mustang(4, \"gt\", \"Green\"); \n\t\t\n\t\tsc.drive();\n\t\t\n\t\tm.showOff();\n\t\t\n\t\tSystem.out.println(\"=============================================\");\n\t\t//I can not do this because the method does not exist in the declared type: SportsCar\n\t\t//sc.showOff();\n\t\t\n\n\t\t//This is downcasting\n\t\t\n\t\tMustang mu = (Mustang) sc;\n\t\t\n\t\tmu.showOff();\n\t\t\n\t\t// this downcast does the same thing it just does not assign it to a variable for later use. \n\t\t((Mustang) sc).showOff();\n\n\t\t\n\t\tSystem.out.println(\"=============================================\");\n\t\t\n\t\t//This will not work at runtime because sc is not actually a Mustang. It will however compile. \n//\t\tsc = new SportsCar(4, 5, \"test\", \"test\");\n//\t\t\t\t\n//\t\tmu = (Mustang) sc;\n\t\t\n\t\t\n\t}", "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 }", "@Override\r\n\tpublic void visit(CastExpression castExpression) {\n\r\n\t}", "public static void main(String[] args){\n\n int a = (int) 3.14;\n System.out.println(a);\n //Outputs 3\n\n // The code above is casting the value 3.14 to an integer, with 3 as the resulting value.\n\n double b = 42.571;\n int c = (int) b;\n System.out.println(c);\n//Outputs 42\n\n /*\n Java supports automatic type casting of integers to floating points, since there is no loss of precision.\nOn the other hand, type casting is mandatory when assigning floating point values to integer variables.\n */\n\n // downcasting\n\n /*\n Why is upcasting automatic, downcasting manual?\n Well, upcasting can never fail.\n But if you have a group of different Animals and want to downcast them all to a Cat,\n then there's a chance that some of these Animals are actually Dogs, so the process fails.\n */\n\n /*Upcasting*/\n\n// You can cast an instance of a subclass to its superclass.\n\n// Consider the following example, assuming that Cat is a subclass of Animal.\n// Animal a = new Cat();\n//\n// Java automatically upcasted the Cat type variable to the Animal type.\n//\n /*Downcasting */\n\n// Casting an object of a superclass to its subclass is called downcasting.\n// Example:\n\n// Animal a = new Animal();\n// ((Cat)a).makeSound();\n//\n// This will try to cast the variable a to the Cat type and call its makeSound() method.\n\n\n }", "@Override\n\tpublic void visit(CastExpression arg0) {\n\t\t\n\t}", "protected abstract void action(Object obj);", "protected abstract Object transform(Object o);", "public <T> T cast();", "public static void main(String[] args) {\n\n A ab = new B();\n A ac = new C();\n C c = new C();\n C2 c2 = new C2();\n// ab = (C) ab;\n// ac = (B) ac;\n\n }", "public abstract void mo1184a(Object obj);", "public abstract Object getUnderlyingObject();", "public T caseRealCast(RealCast object) {\n\t\treturn null;\n\t}", "public V cast(Object object) {\n return valueClass.cast(object);\n }", "@Override\r\n\tpublic boolean visit(CastExpression node) {\r\n\t\toperator(node,node.getClass().toString());\r\n\t\treturn true;\r\n\t}", "public static void main(String[] args) {\n\t \tAnimal an = new Animal();\r\n\t \tSystem.out.println(\"1: \"+(an instanceof Dog));//true \r\n\t \tDog d= new Dog();\r\n\t \tSystem.out.println(\"2: \"+(d instanceof Dog));\r\n\t \tAnimal b = new Dog();\r\n\t \tSystem.out.println(\"3: \"+(b instanceof Animal));\r\n\t \tSystem.out.println(\"4: \"+(b instanceof Dog));\r\n\t b.show();\r\n\t \t//Animal a = new Animal();\r\n\t \t\r\n\t \t\r\n\t \t//d.derivedfun();\r\n\t \tb.derivedfun();\r\n\t d.show();\r\n\t d.derivedfun();\r\n\t }", "private static void LessonBoxUnboxCast() {\n int x = 10;\n Object o = x;\n //System.out.println(o + o); //since o is an object you can't uses the + operator\n //LessonReflectionAndGenerics(o.getClass());\n\n // Example Unboxing (this is casting, explicit casting)\n int y = (int) o;\n System.out.println(y);\n\n // Example Implicit casting you can go from smaller data type to a bigger data type\n //But not the other way around unless you use explicit casting\n int i = 100;\n double d = i;\n System.out.println(d);\n\n // Example of tryin to cast a bigger data type into a smaller data type\n double a = 1.92;\n //int b = a; //gets and error\n //need to be explicit\n int b = (int) a;\n System.out.println(b);\n }", "@Override\npublic void mating(Animal a) {\nSystem.out.println(a.getType()+ \" is mating.\");\n}", "public void perform(Object object) throws E {\n\t\tif(type().isInstance(object)) {\n\t\t\taccept((T) object);\n\t\t}\n\t}", "public static void main(String[] args) {\n List<Rodent> all = new ArrayList<>();\n all.add(new Mouse());\n all.add(new Gerbil());\n all.add(new Mouse());\n all.add(new Hamster());\n all.add(new Gerbil());\n for (Rodent rodent : all) {\n System.out.println(rodent.eat());\n }\n\n //Exercise 10: (3) Create a base class with two methods. In the first method,\n // call the second method. Inherit a class and override the second method.\n // Create an object of the derived class, upcast it to the base type,\n // and call the first method. Explain what happens.\n Rodent r = new Mouse();\n r.sleep();\n\n //Exercise 17: (2) Using the Cycle hierarchy from Exercise 1, add a balance( ) method\n // to Unicycle and Bicycle, but not to Tricycle.\n // Create instances of all three types and upcast them to an array of Cycle.\n // Try to call balance( ) on each element of the array and observe the results.\n // Downcast and call balance( ) and observe what happens.\n Unicycle unicycle = new Unicycle();\n Bicycle bicycle = new Bicycle();\n Tricycle tricycle = new Tricycle();\n Cycle[] cycles = new Cycle[3];\n cycles[0] = unicycle;\n cycles[1] = bicycle;\n cycles[2] = tricycle;\n// for(int i = 0; i < cycles.length; i++){\n// //cycles[i].balance(0); cannot find the method\n// }\n ((Unicycle) cycles[0]).balance();\n ((Bicycle) cycles[1]).balance();\n// ((Tricycle)cycles[2]).balance(); cannot find the method\n\n\n }", "public static void main(String[] args) {\n\t\tA3 obj1 = new B3(); //This is called as upcasting means reference variable of parent class refers to object of child class.\n\t\tobj1.show();\n\t\t//obj1.config(); This cannot be done because A3 doesnt have config method only B3 has. so we cannot call this method.\n\t\tobj1 = new C3();\n\t\t//And we are changing method here everytime we assign different object hence it is called dynamic method dispatching.\n\t\tobj1.show(); //here this will call method in c3 because we assigned object of c3\n\t}", "public static void main(String[] args) {\n\t\tAnimal a = new Animal(); \n\t\ta.sleep();\n\t\ta.eat();\n\t\t\n\t\t//creating object of child class\n\t\tCat cat = new Cat(); \n\t\tcat.eat(); //from parent\n\t\tcat.meow(); //from child\n\t\tcat.sleep();//from child\n\t\t\n\t\t\n\t\t// Widening/implicit\n\t\tdouble d = 90; \n\t\t\n\t\t// Narrowing/Explicit\n\t\tint i = (int)1.99; \n\t\tSystem.out.println(\"*********************************\");\n\t\t// Non Primitive Type Casting, down casting & up casting\n\t\t// widening --> Creating an object of the child class \n\t\t// and giving reference to the Parent class.\n\t\t/* When you create an object of the Cat class with reference to Animal Class,\n\t\t * you will only be able to access the methods in the parent class (Animal)\n\t\t * if you have the same methods in the child class (Cat) they will override \n\t\t * the methods in the parent class as seen in the below code\n\t\t */\n\t\tAnimal obj = new Cat(); \n\t\tobj.eat(); //method from parent class\n\t\tobj.sleep(); // this method will come from child class --> runtime polymorphism\n\t\t//obj.meow(); --> method won't be available\n\t\t\n\t\t// narrowing\n\t\t// Cat obj2 = new Animal(); --> JVM Error: Cannot convert from animal to cat\n\t\n\t}", "public abstract Object getObservedObject();", "private static void handlePolymorphism() {\n\n for(String subClass : superDict.keySet()) {\n addPlace(subClass);\n for (String superClass : superDict.get(subClass)) {\n addPlace(superClass);\n String methodName = subClass + \"IsPolymorphicTo\" + superClass;\n petrinet.createTransition(methodName);\n petrinet.createFlow(subClass, methodName, 1);\n petrinet.createFlow(methodName, superClass, 1);\n }\n }\n }", "void m21805a(Object obj);", "void m21809e(Object obj);", "@Override\n\tpublic O evaluate(I rTarget, Class<O> rClass)\n\t{\n\t\treturn rClass.cast(rTarget);\n\t}", "@Override\n\tpublic void type() {\n\t\t\n\t}", "public static void main(String[] args) {\n Employee employee = new GovernmentEmployee();\n\n GovernmentEmployee employee2 = (GovernmentEmployee) employee;\n employee.commonMethod();\n \n GovernmentEmployee governmentEmployee = new GovernmentEmployee();\n Employee governmentEmployee1 = governmentEmployee;\n\n\n }", "void m21807c(Object obj);", "void m21806b(Object obj);", "default ObjectHandler<? extends T> handleObject() {\n throw new UnsupportedOperationException();\n }", "@Override\npublic void resting(Animal a) {\nSystem.out.println(a.getType()+ \" is resting.\");\n}", "private void tryCallWithPrimitives() {\n int primitiveType = 10;\n // the method call will take a copy of primitiveType variable value, the original value will not changed\n callMethod(primitiveType);\n // the value is just 100\n System.out.println(primitiveType);\n }", "public abstract View a(Object obj);", "void m21808d(Object obj);", "public static void main(String[] args) {\n// iron.setAge(38);\n// System.out.println(iron.getAge());\n\n\n SuperHero ironMan = new IronMan(100, 1000, 10);\n System.out.println(ironMan.getName());\n // DownCasting (SuperHero superclass -> IronMan subclass)\n System.out.println(((IronMan) ironMan).getNumOfSuits());\n ironMan.fight();\n\n SuperHero sp1 = new SpiderMan();\n SuperHero sp2 = new SpiderMan(70);\n SpiderMan sp3 = new SpiderMan(100,1000, 50);\n\n sp1.fight();\n sp2.fight();\n sp3.fight();\n\n SuperHero[] heros = new SuperHero[10];\n heros[0] = ironMan;\n heros[1] = sp1;\n heros[2] = sp2;\n\n // * inheritance (\"extends\" super class)\n // - subclass must call super class' constructor\n // (except when super class has a default constructor, Java automatically adds\n // a default constructor with super(); in it)\n // - everything (except for private fields) can be accessed from subclasses\n // - you can even override methods from super class - (\"method overriding\")\n // - you can create many methods with the same name unless they have different set of\n // parameters(arguments) - (\"method overloading\")\n // - method overloading example: many different constructors!\n // - inheritance creates \"is-a\" relationship.\n // * IronMan \"is-a\" SuperHero\n\n\n }", "public static void method(Object obj){\n\t System.out.println(\"method with param type - Object\");\n\t }", "@Override\n\tpublic void VisitCastNode(BunCastNode Node) {\n\n\t}", "public static void main(String[] args) {\n\t\tD a1=new E();\n\t\ta1.run();\n\t\t//downcasting\n\t\tE e1=(E)a1;\n\t\te1.run();\n\t\te1.wish();\n\n}", "@Override \n\tpublic void caseAMethodCallExpr(AMethodCallExpr node){\n\t\t inAMethodCallExpr(node);\n\t if(node.getTarget() != null)\n\t {\n\t node.getTarget().apply(this);\n\t }\n\t if(node.getId() != null)\n\t {\n\t node.getId().apply(this);\n\t }\n\t {\n\t List<PExpr> copy = new ArrayList<PExpr>(node.getExpr());\n\t for(PExpr e : copy)\n\t {\n\t e.apply(this);\n\t \n\t boxIt(nodeTypes.get(e));\n\t }\n\t }\n\t outAMethodCallExpr(node);\n\t\t\n\t}", "StackManipulation virtual(TypeDescription invocationTarget);", "public abstract void setType();", "public interface DerivedType extends EObject {\r\n}", "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 }", "@Override\n default <T> T as(Class<T> type) {\n try { return type.cast(asObject()); }\n catch (ClassCastException ex) {\n LinkedList<Object> ascendingKeyChain = using(this).getAscendingKeyChainWithRoot();\n Object thisKey = ascendingKeyChain.pollLast();\n ascendingKeyChain.add(format(\"*%s*\", thisKey));\n throw new ClassCastException(format(\"'%s' miscast in path %s: %s. Avoid by checking \" +\n \"`if (aDynamic.is(%s.class)) ...` or using `aDynamic.maybe().as(%<s.class)`\",\n thisKey, LiteJoiner.on(ARROW).join(ascendingKeyChain), ex.getMessage(), type.getSimpleName()));\n }\n }", "protected abstract Object read ();", "void mo67921a(Object obj);", "public static void main(String[] args) {\n Object obj1 = obterString();\n String s1 = (String) obj1; //downcasting Object para String\n\n Object obj2 = \"Minha String\";//upcasting String para Object\n String s2 = (String) obj2; //downcasting obj2 referencia uma string diretamente\n\n Object obj3 = new Object();\n String s3 = (String) obj3; //ex de downcasting vai falhar em execucao\n // nao faz referencia a uma string\n\n Object obj4 = obterInteiro();\n String s4 = (String) obj4;//nao funciona em tempo de execucao\n }", "@Test\n public void testCheckCast() throws Exception {\n Class<?> mainClass = MainCheckCastSubClass.class;\n runTest(\n mainClass,\n ImmutableList.of(mainClass, SuperClass.class, SubClass.class),\n keepMainProguardConfiguration(mainClass),\n (ignoreMainClass, ignoreProgramClasses, inspector) -> {\n assertTrue(inspector.clazz(mainClass).isPresent());\n assertTrue(inspector.clazz(SubClass.class).isPresent());\n // SuperClass may have been merged with SubClass.\n inspector.forAllClasses(this::checkPresentWithDefaultConstructor);\n });\n }", "InstCast createInstCast();", "private void doSomething(Object object) {\n\n }", "public static void main(String[] args) {\n\t\tPerson p = new Student();\r\n\t\tPerson p2 = new Student(10);\r\n\t\t\r\n//\t\tStudent s = new Student();\r\n//\t\tPerson p3 = s; 두개가 아래와 같다.\r\n\t\tPerson p3 = new Student();\r\n\t\t\r\n\t\tStudent s = (Student)p3; //down casting 명시적(explicit) 캐스팅을 해야 한다.\r\n\t\t//같은 객체일때만 가능하다.\r\n\t\t\r\n\t\tPerson p4 = s; //up casting 암시적(implicit) 캐스팅을 안해줘도 된다.\r\n\t\t\r\n\t\t\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T cast(Object object) {\n\n\t\treturn (T) object;\n\t}", "public static void main(String[] args) {\n\n Pet pet = new Pet(\"Larry\",5) {\n @Override\n public void say() {\n System.out.println(\"wow, wow, wow\");\n }\n };\n System.out.println(pet);\n\n pet.say();\n // ((Cat) pet).getPredator();---> преобразовал тип pet в cat ---> можно, но нельзя\n\n }", "public abstract void update(Object obj) ;", "@Override // m.h\n public String a(Object obj) {\n return obj.toString();\n }", "@Override\n public void getPerception(RPObject object, byte type, Perception p) {\n }", "private Expr boxingUpcastIfNeeded(Expr a, Type fType) {\n if (a instanceof NullLit_c) {\n return makeCast(a.position(), a, fType);\n }\n \n if (Types.baseType(fType) instanceof FunctionType) {\n return upcastToFunctionType(a, (FunctionType)Types.baseType(fType), true);\n }\n \n if (ts.isObjectType(a.type(), context) && ts.isObjectType(fType, context)) {\n // implicit C++ level upcast is good enough (C++ and X10 have same class hierarchy structure)\n return a;\n }\n \n if (!ts.typeDeepBaseEquals(fType, a.type(), context)) {\n Position pos = a.position();\n return makeCast(a.position(), a, fType);\n } else {\n return a;\n }\n }", "public Object convertToType(ELContext context, Object obj, Class<?> targetType) {\n/* 522 */ context.setPropertyResolved(false);\n/* */ \n/* 524 */ Object value = null;\n/* 525 */ for (int i = 0; i < this.size; i++) {\n/* 526 */ value = this.elResolvers[i].convertToType(context, obj, targetType);\n/* 527 */ if (context.isPropertyResolved()) {\n/* 528 */ return value;\n/* */ }\n/* */ } \n/* 531 */ return null;\n/* */ }", "public void sendAnycast(String msg) {\n\t}", "public T caseEvent_Based(Event_Based object) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void visit(Instanceof n) {\n\t\t\n\t}", "@Override\n\tpublic Object convert(Class<?> desiredType, Object in) throws Exception {\n\t\treturn null;\n\t}", "public void callMoveFromObject() {\r\n try { \r\n if (internalObject instanceof BObject) { \r\n Class [] params = {};\r\n BMethod move = ((BObject) internalObject).getBClass().getDeclaredMethod(\"move\",params);\r\n if (move != null)\r\n move.invoke((BObject)internalObject, params);\r\n }\r\n } catch (Exception e) {\r\n // nothing\r\n //e.printStackTrace();\r\n }\r\n\r\n }", "private void testInheritance() {\n AbstractVehicle myCar = new Car();\n\n myCar.drive();\n\n //So a super class can be instantiated using instance of its subclass\n //But reverse is not true, so although VolvoCar extends Car,\n //we cannot create instance of VolvoCar from Car instance.\n //VolvoCar volvoCar = new Car();\n VolvoCar volvoCar = new VolvoCar();\n volvoCar.drive();\n\n //However, in such a scenario the super class can only invoke its own methods,\n // and not methods of the sub-class.....\n //So myCar can invoke methods defined in Vehicle class where actual\n //implementation comes from Car instance.\n //so getNoOfDoors will return 4.\n System.out.println(\"Car doors - \" + myCar.getNoOfDoors());\n\n //But myCar cannot invoke isInsured() which is defined only in subclass Car.\n //Below line gives error cannot resolve isInsured() in Vehicle.\n //myCar.isInsured();\n \n Car testCar = new Car();\n testCar.isInsured();\n\n }", "@Override\n\tpublic ISpecies cast(final IScope scope, final Object obj, final Object param, final boolean copy)\n\t\tthrows GamaRuntimeException {\n\t\tISpecies species =\n\t\t\tobj == null ? getDefault() : obj instanceof ISpecies ? (ISpecies) obj : obj instanceof IAgent\n\t\t\t\t? ((IAgent) obj).getSpecies() : obj instanceof String ? scope.getModel().getSpecies((String) obj)\n\t\t\t\t\t: getDefault();\n\t\tif ( obj instanceof IPopulationSet ) {\n\t\t\tspecies = ((IPopulationSet) obj).getSpecies();\n\t\t}\n\t\treturn species;\n\t}", "Object visitSubtype(SubtypeNode node, Object state);", "public abstract String mo83558a(Object obj);", "abstract public boolean isTyped();", "@Override\n\tpublic void test(Object t) {\n\t\t\n\t}", "@Override\n\tpublic void test(Object t) {\n\t\t\n\t}", "<T extends Property> T cast(Class<T> clazz) throws UnsupportedPropertyException;", "private static void handlePolymorphism() {\n for(String subClass : superDict.keySet()) {\n try {\n petrinet.getPlace(subClass.toString());\n } catch (NoSuchNodeException e ) {\n petrinet.createPlace(subClass.toString());\n }\n assert (petrinet.containsNode(subClass));\n for (String superClass : superDict.get(subClass)) {\n // If the class is not in the petrinet, create the class\n try {\n petrinet.getPlace(superClass.toString());\n } catch (NoSuchNodeException e) {\n petrinet.createPlace(superClass.toString());\n }\n assert (petrinet.containsNode(superClass));\n\n String methodName = subClass + \"IsPolymorphicTo\" + superClass;\n petrinet.createTransition(methodName);\n petrinet.createFlow(subClass, methodName);\n petrinet.createFlow(methodName, superClass);\n }\n }\n }", "public abstract String getObjectType();", "public void visitCheckCast(Quad obj) {\n if (TRACE_INTRA) out.println(\"Visiting: \"+obj);\n Register dest_r = CheckCast.getDest(obj).getRegister();\n Operand src = CheckCast.getSrc(obj);\n if (src instanceof RegisterOperand) {\n Register src_r = ((RegisterOperand)src).getRegister();\n Object s = getRegister(src_r);\n if (!include_cast_ops) {\n setRegister(dest_r, s);\n return;\n }\n CheckCastNode n = (CheckCastNode)nodeCache.get(obj);\n if (n == null) {\n n = CheckCastNode.get(CheckCast.getType(obj).getType(), \n new QuadProgramLocation(method, obj));\n nodeCache.put(obj, n);\n }\n Collection from = (s instanceof Collection) ? (Collection)s : Collections.singleton(s);\n Iterator i = from.iterator();\n while (i.hasNext()) {\n Node fn = (Node)i.next();\n Pair key = new Pair(fn, obj);\n if (castMap.put(key, n) == null)\n castPredecessors.add(fn);\n }\n setRegister(dest_r, n);\n } else {\n Node n = handleConst((ConstOperand) src, new QuadProgramLocation(method, obj));\n setRegister(dest_r, n);\n }\n }", "@Override\n\tpublic void testPringt() {\n\t\tSystem.out.println(\"我是一个被代理的类\");\n\t}", "protected abstract void switchOnCustom();", "@Test\n public void test_cast() {\n \n\n }", "public void a(Object obj) {\n }", "public abstract void processComponent(T o);", "public abstract void execute(Serializable obj);", "StackManipulation special(TypeDescription invocationTarget);", "protected abstract void perform(ActiveActor a);", "@Override\n public T getObjRaiz() {\n return (super.getObjRaiz());\n }", "public void mo1774a(Object obj) {\n }", "public void dispatch();", "@Test\n public void dispatchToBaseTypes() {\n BaseEventBus eventBus = new SynchronousEventBus(LOG);\n\n final List<Object> objectHandlerReceived = new ArrayList<>();\n Object objectHandler = new Object() {\n @Subscriber\n public void onEvent(Object event) {\n objectHandlerReceived.add(event);\n }\n };\n\n final List<Comparable<?>> comparableHandlerReceived = new ArrayList<>();\n Object comparableHandler = new Object() {\n @Subscriber\n public void onEvent(Comparable<?> event) {\n comparableHandlerReceived.add(event);\n }\n };\n\n final List<CharSequence> charSequenceHandlerReceived = new ArrayList<>();\n Object charSequenceHandler = new Object() {\n @Subscriber\n public void onEvent(CharSequence event) {\n charSequenceHandlerReceived.add(event);\n }\n };\n\n final List<CharSequence> stringHandlerReceived = new ArrayList<>();\n Object stringHandler = new Object() {\n @Subscriber\n public void onEvent(String event) {\n stringHandlerReceived.add(event);\n }\n };\n eventBus.register(objectHandler);\n eventBus.register(charSequenceHandler);\n eventBus.register(stringHandler);\n eventBus.register(comparableHandler);\n\n eventBus.post(\"event 1\");\n assertThat(objectHandlerReceived, is(asList(\"event 1\")));\n assertThat(comparableHandlerReceived, is(asList(\"event 1\")));\n assertThat(charSequenceHandlerReceived, is(asList(\"event 1\")));\n assertThat(stringHandlerReceived, is(asList(\"event 1\")));\n\n eventBus.post(Integer.MAX_VALUE);\n assertThat(objectHandlerReceived, is(asList(\"event 1\", Integer.MAX_VALUE)));\n assertThat(comparableHandlerReceived, is(asList(\"event 1\", Integer.MAX_VALUE)));\n assertThat(charSequenceHandlerReceived, is(asList(\"event 1\")));\n assertThat(stringHandlerReceived, is(asList(\"event 1\")));\n }", "public static void main(String[] args) {\n\t\tBMW b= new BMW();\r\n\t\tb.start();\r\n\t\tb.stop();\r\n\t b.refuel();\r\n\t\tb.thfesafty();\r\n\t\tb.engine();\r\n\t\t\r\n\t\tSystem.out.println(\"--------\");\r\n\t\t\r\n\t\tcar c= new car();\r\n\t\tc.start();\r\n\t\tc.stop();\r\n\t\tc.refuel();\r\n\t\tc.engine();\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"---------\");\r\n\t\t\r\n\t\t\r\n\t\t//top casting \r\n\t\tcar c1= new BMW(); \r\n// child class obj can be refs byparent class ref..(or) var.. is called dynamic polymorphism \r\n\t\tc1.start();\r\n\t\tc1.stop();\r\n\t\tc1.refuel();\r\n\t\t\r\n\t\t\r\n\t\t//dowm casting\r\n\t\t\r\n\t\t//BMW B =(BMW) new car();\t\r\n\t\t}", "public abstract B zzt(Object obj);", "private void loadReceiver(String typePath, Method method, SkinnyMethodAdapter mv) {\n if (Modifier.isStatic(method.getModifiers())) {\n // load self object as IRubyObject, for recv param\n mv.aload(RECEIVER_INDEX);\n } else {\n // load receiver as original type for virtual invocation\n mv.aload(RECEIVER_INDEX);\n mv.checkcast(typePath);\n }\n }", "abstract void onReadable();", "public static void main(String[] args) {\n\t\tBankAccount account = new BankAccount(112299,\"sudesh teli\",10000);\r\n\t\tBankAccount newaccount = new BankAccount(112300,\"Ashitosh Dessai\",10000);\r\n\t\tSavingBankAccount sb=new SavingBankAccount(111111,\"Rahul Rane\",10000);\r\n\t\t\r\n\t\tSystem.out.println(\"The customer account no. is \"+account.getAccountnumber());\r\n\t\tSystem.out.println(\"The customer name is \"+account.getCustomername());\r\n\t\tSystem.out.println(\"The customer account balance is \"+account.getBalance());\r\n\t\t\r\n\t\taccount.setDeposit(1000,account);\r\n\t\tSystem.out.println(\"The customer \"+ account.getCustomername()+\" has balance \"+account.getBalance()+\" after depositing rs.\"+1000);\r\n\t\t\r\n\t\taccount.setWithdraw(1000,account);\r\n\t\tSystem.out.println(\"The customer \"+ account.getCustomername()+\" has balance \"+account.getBalance());\r\n\t\r\n\t\taccount.Transfer(account,newaccount,2000);\r\n\t\t\r\n\t\tSystem.out.println(\"The senders balance is \"+account.getBalance());\r\n\t\tSystem.out.println(\"The receivers balance is \"+newaccount.getBalance());\r\n\t\t\r\n\t\tBankAccount b= new BankAccount(112666,\"Diptesh teli\",100000);\r\n\r\n\t\tSavingBankAccount s = new SavingBankAccount(111222,\"Rahul Mane\",110000);\r\n\r\n\t\tCurrentAccount a = new CurrentAccount(191919,\"Karan Dhawaskar\",100000);\r\n\t\tb.Deposit(1000); \r\n\r\n\t\tb.Withdraw(2000);\r\n\r\n\t\ts.Deposit(2000);\r\n\r\n\t\ts.Withdraw(2000);\r\n\r\n\t\ts.calculateinterest();\r\n\t\tsb.calculateinterest();\r\n\t\t\r\n\t\ta.overdraft(100000);\r\n\t\ta.overdraft(5000);\r\n\t\ta.Withdraw(5000);\r\n\t\t\r\n\t\t//Here we are actually using polymorphism from bank account to saving or current account\r\n\t\tb=a;\r\n\t\tb=s;\r\n\t\t//type mismatch cannot convert from BankAccount to Current Account \r\n\t\t//a=b;\r\n\t\t//type mismatch cannot convert from BankAccount to Saving Account \r\n\t\t//s=b;\r\n\t\t////type mismatch cannot convert from SavingBankAccount to Current Account \r\n\t\t//a=s;\r\n\t\t////type mismatch cannot convert from Current Account to SavingBankAccount \r\n\t\t//s=a;\r\n\t}" ]
[ "0.7077212", "0.7077212", "0.7077212", "0.6905448", "0.6172176", "0.60033196", "0.60025734", "0.5985755", "0.59740466", "0.59196913", "0.5903916", "0.59030384", "0.5889821", "0.5820745", "0.5802711", "0.5721378", "0.56199574", "0.5559312", "0.55124116", "0.5505463", "0.54944175", "0.54721594", "0.5444731", "0.54391706", "0.54295814", "0.53486353", "0.5334458", "0.53303206", "0.5307969", "0.5295761", "0.52888894", "0.5281882", "0.5273632", "0.52695155", "0.5211671", "0.52007765", "0.51805717", "0.5164097", "0.5155732", "0.51226974", "0.51150715", "0.51052976", "0.5104751", "0.5104367", "0.51041377", "0.5098149", "0.50943816", "0.5075886", "0.507049", "0.5055095", "0.5053885", "0.5025659", "0.5019469", "0.50189066", "0.50168407", "0.5011349", "0.50066936", "0.5004896", "0.50021076", "0.4994706", "0.49907556", "0.4977801", "0.49776992", "0.49775237", "0.49739838", "0.4970025", "0.49534547", "0.49505487", "0.49437073", "0.49428466", "0.49411678", "0.49353945", "0.4934944", "0.49316224", "0.49254018", "0.49239567", "0.49219882", "0.49196792", "0.4914864", "0.4914864", "0.4885255", "0.48800853", "0.4871262", "0.4868044", "0.4865764", "0.48587534", "0.4856643", "0.4851697", "0.48470187", "0.48460433", "0.48428047", "0.48376563", "0.48368537", "0.4830371", "0.4828506", "0.48129895", "0.4810102", "0.48090786", "0.4806147", "0.47990656", "0.4794886" ]
0.0
-1
/ check that a card is available to be given to somebody
public boolean isAvailable() { return available; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasAlreadCheckCard();", "boolean CanBuyDevCard();", "boolean hasPlayCardRequest();", "boolean hasAlreadShowCard();", "private boolean canAcceptCard(Card card) {\n return cardSet.canAcceptCard(card);\n }", "boolean hasPassCardsResponse();", "public boolean canUseCard() {\n \t\tif (usedCard)\n \t\t\treturn false;\n \n \t\tfor (int i = 0; i < cards.length; i++) {\n \t\t\tif (cards[i] > 0)\n \t\t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}", "boolean isCreditCardIsSingleAvailablePayment();", "protected abstract boolean isCardActivatable(Card card);", "boolean canBeAdded(ICard toBeAddedCard);", "private boolean offerCard(Player p) {\n\n //Offer card (take or pass)\n p.sendMessage(\"TAKE OR PASS\");\n\n //Wait until they take the card\n waitForPlayerAction(p, \"TAKE\", \"PASS\");\n\n if(actionChosen.equals(\"TAKE\")) {\n\n giveCard(p);\n return true;\n\n } else if(actionChosen.equals(\"PASS\")) {\n //Don't give card\n\n cList.sendToAll(\"Player \" + p.getUsername() + \" passes\");\n return false;\n }\n\n return false;\n }", "boolean hasCardType();", "boolean hasAlreadFoldCard();", "boolean hasPlaySingleCardResponse();", "private void checkBuyCard(PropertyCard card) {\n\t\tboolean almostComplete = checkCollection(this, card);\n\t\tif(almostComplete) {\n\t\t\tboolean boughtCard = buyCard(card);\n\t\t\tif(!boughtCard) {\n\t\t\t\tboolean madeChanges = checkPayment(card.getPrice());\n\t\t\t\tif(madeChanges) {\n\t\t\t\t\tbuyCard(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tboolean opponentAlmostComplete = false;\n\t\t\tfor(Player p: getPlayers()) {\n\t\t\t\tif(checkCollection(p,card)) {\n\t\t\t\t\topponentAlmostComplete = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(opponentAlmostComplete) {\n\t\t\t\tbuyCard(card);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(getMoney()-card.getPrice()>=100) {\n\t\t\t\t\tbuyCard(card);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void askBuyDevCards();", "public boolean isCard() {\n\t\treturn id > 0 && id < 53;\n\t}", "abstract boolean allowedToAdd(Card card);", "public boolean affordCard() {\n \t\treturn (FREE_BUILD || getResources(Type.WOOL) >= 1\n \t\t\t\t&& getResources(Type.GRAIN) >= 1 && getResources(Type.ORE) >= 1);\n \t}", "public boolean hasBlackjack()\n {\n return getSumOfCards(false) == 21;\n }", "boolean CanDiscardCards(Resources resources);", "boolean hasAllowedCredit();", "boolean isAccepting();", "boolean canCharge(ItemStack stack);", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "boolean isAvailable();", "public boolean canTakeCharge();", "boolean canCharge(ItemStack me);", "void askLeaderCardActivation();", "public boolean hasBlackjack() {\n\t\treturn this.hand.countValue().lower(22) == 21;\n\t}", "public boolean canOfferInsurance() {\n\t\treturn this.hand.getCards().get(0) == Card.ACE;\n\t}", "Boolean isAvailable();", "public List<Integer> askPlayerCardsToUse();", "@Test\n public void CardRequirement1() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.YELLOW, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l2.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(2, c.messages.size());\n\n }", "@Override\n public boolean isLegal(List<Integer> selectedCards)\n {\n //checks if the two cards selected added together equal 13\n if(selectedCards.size() == 2)\n {\n if(containsSum13(selectedCards))\n {\n \treturn true;\n }\n }\n \n //checks if the selected card is a K\n if(selectedCards.size() == 1)\n {\n \treturn containsK(selectedCards);\n }\n return false;\n \n }", "private boolean canPut(Player player) {\n boolean haveValidCart = false;\n boolean can = false;\n for (Card temp: player.getCards()) {\n if(temp.isValidCard(currentCard) || temp instanceof WildCard) {\n haveValidCart = true;\n can = true;\n break;\n }\n }\n if (!haveValidCart) {\n player.addCard(cards.get(0));\n cards.remove(0);\n if (player.getCards().get(player.getCards().size()-1).isValidCard(currentCard)) {\n show();\n System.out.println(player.getName() + \"! You were given a card because you didn't have any valid choice.\");\n can = true;\n }\n else {\n show();\n System.out.println(player.getName() + \"! You were given a card but you don't have any valid choice yet.\");\n }\n }\n return can;\n }", "boolean contains(Card c);", "public static boolean validateCard(String[] args) {\n return true;\n }", "public boolean isApplicable(DevelopmentCard card) {\n\t\treturn (this.familyMember.getActionValue()\n\t\t\t\t+ this.getPlayer().getBonuses().getActivationVariation(card.getCardType())\n\t\t\t\t+ paidServants >= card.getActivationCost());\n\t}", "void askDevCardProduction();", "public abstract boolean isAvailable();", "public abstract boolean isAvailable();", "public int askWhatPermitCards(List<PermitCard> cards);", "boolean checkAvailable(String userName);", "public boolean hasMoreCards() {\n if (cardHold == 0)\n return false;\n else\n return true;\n }", "void askLeaderCardThrowing();", "public boolean hit()\n\t{\n\t\taddCardToHand(new BlackJackCard());\n\t\treturn getHandValue() <= 21;\n\t}", "public boolean checkBlackJack() {\r\n if(cards.size() == 2 && score() == 21){\r\n blackJack = true;\r\n over = true;\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "@Override\n\tpublic boolean ifCard(int cid, String passed) {\n\t\treturn cb.ifCard(cid, passed);\n\t}", "public boolean checkRequirements(PlayerBoard playerBoard);", "@Override\n public boolean canUseCard(){\n return false;\n }", "@Test\n public void testCardSelectionIsValid_TRUE() throws Exception {\n System.out.println(\"cardSelectionIsValid not valid\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.BLUE, UnoCardValue.TWO);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.ONE);\n UnoCardColour wildColour = UnoCardColour.BLUE;\n utils.cardSelectionIsValid(cardSelection, drawCard, wildColour);\n }", "public boolean isBuyable();", "@Test\n public void CardRequirementError() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(0);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.GREEN, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n c.emptyQueue();\n assertFalse(am.activateLeaderCard(p, message));\n assertEquals(MessageType.MSG_ERROR, c.messages.get(0).getMessageType());\n assertEquals(1, c.messages.size());\n }", "boolean canBuy( final Item item )\n {\n return !ship.contains( item ) && item.getPrice() <= credits;\n }", "private boolean isCardValid(Card data) {\n // Check card if it valid to save isValid == true\n boolean isValid = (StringUtils.isEmpty(data.getName()) == false &&\n StringUtils.isEmpty(data.getAddress()) == false &&\n StringUtils.isEmpty(data.getPosition()) == false &&\n StringUtils.isEmpty(data.getGender()) == false);\n\n return isValid;\n }", "void buyDevCard();", "public boolean canGrabWeapon(CardWeapon cw){\n List<Color> priceTmp;\n if(cw.getPrice().size()>1) {\n priceTmp = new ArrayList<>(cw.getPrice().subList(1, cw.getPrice().size()));\n return controlPayment(priceTmp);\n }\n else\n return true;\n }", "@Override\n public boolean isValid() {\n return (27 - Inventory.getAll().length <= Inventory.find(\"Soft clay\").length)\n || (Inventory.find(\"Soft clay\").length < 1 || Inventory\n .find(\"Astral rune\").length < 1)\n && !Banking.isBankScreenOpen()\n && GlassBlower.antiban.canInteractObject();\n }", "private boolean validateCard() {\n Card card = new Card(\n editTextCreditCardNumber.getText().toString(),\n selectedMonth,\n selectedYear,\n editTextCCV.getText().toString()\n );\n boolean validation = card.validateCard();\n if (validation) {\n return true;\n } else if (!card.validateNumber()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardErrorNumber), Toast.LENGTH_SHORT).show();\n return false;\n } else if (!card.validateExpiryDate()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardErrorExpiryDate), Toast.LENGTH_SHORT).show();\n return false;\n } else if (!card.validateCVC()) {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardErrorCCV), Toast.LENGTH_SHORT).show();\n return false;\n } else {\n Toast.makeText(getActivity(), getResources().getString(R.string.creditCardError), Toast.LENGTH_SHORT).show();\n return false;\n }\n }", "public boolean isATMReadyTOUse() throws java.lang.InterruptedException;", "@Test\n public void CardRequirement2() {\n MSG_ACTION_ACTIVATE_LEADERCARD message = new MSG_ACTION_ACTIVATE_LEADERCARD(1);\n\n LeaderCard l3 = new LeaderCard(4,\n new CardRequirements(Map.of(Color.YELLOW, new ReqValue(1, 2))),\n new Production(Resource.SHIELD));\n ArrayList<LeaderCard> cards = new ArrayList<>();\n cards.add(l1);\n cards.add(l3);\n p.associateLeaderCards(cards);\n DevelopmentCard card1 = new DevelopmentCard(1, Color.GREEN, 0, null, null);\n DevelopmentCard card2 = new DevelopmentCard(2, Color.YELLOW, 0, null, null);\n p.getDevelopmentSlot().addCard(card1, 1);\n p.getDevelopmentSlot().addCard(card2, 1);\n c.emptyQueue();\n\n assertTrue(am.activateLeaderCard(p, message));\n\n assertTrue(l3.isEnabled());\n\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_NOTIFICATION).count());\n assertEquals(1, c.messages.stream().filter(x -> x.getMessageType() == MessageType.MSG_UPD_Player).count());\n assertEquals(2, c.messages.size());\n }", "boolean canCarry(Item specifiedItem);", "public boolean CheckForUnwinnableCondition(){\n int humanSize = GetSizeOfHumanHand();\n int computerSize = GetSizeOfComputerHand();\n\n for(int i = 0; i < humanSize; i++) {\n //Human can play a card\n String card = handHuman.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n for(int i = 0; i < computerSize; i++){\n //Human can play a card\n String card = handComputer.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n //Human and computer can't play a card\n return false;\n }", "private boolean hasAce(ArrayList<Card> cards) {\r\n\t\tfor(Card card: cards) {\r\n\t\t\tif(card.getValue() == 1) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isAvailable(){\r\n // return statement\r\n return (veh == null);\r\n }", "public boolean isWin_CommanderVimes(){\r\n // player got LordSelachii card\r\n Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 7) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }\r\n \r\n if(playerHoldCard != null){\r\n if(discWorld.getShuffled_PlayerCard().size() == 0){\r\n return true;\r\n }\r\n } \r\n \r\n return false;\r\n }", "boolean hasBidrequest();", "private boolean isAvailable() {\n\t\tfor (int i = 0; i < lawsuitsAsClaimant.size(); i++) {\n\t\t\tif (lawsuitsAsClaimant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check lawsuits as Defendant\n\t\tfor (int i = 0; i < lawsuitsAsDefendant.size(); i++) {\n\t\t\tif (lawsuitsAsDefendant.get(i).isActive()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "boolean hasCandidate();", "private static boolean isCardPresent(final UsbResponse slotStatus){\n\t\treturn slotStatus != null && slotStatus.getIccStatus() != UsbResponse.ICC_STATUS_NOT_PRESENT ? true : false;\n\t}", "@Override\n public boolean anotherPlayIsPossible()\n {\n \t\n List<Integer> test = cardIndexes();\n return containsSum13(test) || containsK(test);\n \n }", "public boolean canUseCard(Card card) {\r\n\t\tif (card.cardColor.contains(CardColor.GREEN)\r\n\t\t\t\t|| card.cardColor.contains(CardColor.GREY)) {\r\n\t\t\treturn false;\r\n\t\t} else if (this.blackTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.PURPLE)\r\n\t\t\t\t&& this.purpleTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.RED) && this.redTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BLUE)\r\n\t\t\t\t&& this.blueTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else if (card.cardColor.contains(CardColor.BROWN)\r\n\t\t\t\t&& this.brownTurns > 0) {\r\n\t\t\treturn true;\r\n\t\t} else\r\n\t\t\treturn false;\r\n\t}", "@Test\n public void buyCardWithNoResources() throws Exception {\n when(devCardFacade.canBuyDevCard(noDevCardsPlayer)).thenReturn(false);\n dcc.buyCard();\n verify(devCardFacade, never()).buyDevCard(noDevCardsPlayer);\n }", "public boolean takeCard(Card card)\r\n {\r\n if (card != null && numCards < MAX_CARDS)\r\n {\r\n myCards[numCards++] = new Card(card.getValue(), card.getSuit());\r\n return true;\r\n }\r\n return false;\r\n }", "@Override\n public boolean isBlackjack() {\n return ( (countCards()==2) && (higherScore()==21) );\n }", "@Override\n public boolean checkRequirement(PlayerContext playerContext) {\n int sumOfRightColourAndLevelCard = 0;\n for (DevelopmentCard developmentCard : playerContext.getAllDevelopmentCards()){\n if (developmentCard.getColour() == cardColour && developmentCard.getLevel() == cardLevel)\n sumOfRightColourAndLevelCard ++;\n }\n return sumOfRightColourAndLevelCard >= numberOfCards;\n }", "public boolean isWin_DragonKingOfArms(){\r\n // player got LordSelachii card\r\n /*Player playerHoldCard = null;\r\n for (Player player : discWorld.getPlayer_HASH().values()) {\r\n if (player.getPersonalityCardID() == 5) {\r\n playerHoldCard = player;\r\n break;\r\n }\r\n }*/\r\n int count = 0;\r\n for(TroubleMarker troubleMarker : discWorld.getTroubleMarker_HASH().values()){\r\n if(troubleMarker.getAreaNumber() != ConstantField.DEFAULT_PIECE_AREA_NUMBER){\r\n count++;\r\n }\r\n }\r\n \r\n if(count >= 8){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n \r\n }", "boolean isAvailable( long millis );", "public boolean checkSellCardToPlayer(Player player, PropertyCard card, boolean almostComplete, int timesTried) {\n\t\tint priceToSell = 0;\n\t\tif(almostComplete) {\n\t\t\tif(timesTried==0) {\n\t\t\t\tpriceToSell = card.getPrice()*2;\n\t\t\t}\n\t\t\telse if(timesTried==1){\n\t\t\t\tpriceToSell = (int) Math.floor(card.getPrice()*1.5);\n\t\t\t}\n\t\t\telse if(timesTried==2) {\n\t\t\t\tpriceToSell = (int) Math.floor(card.getPrice()*1.25);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpriceToSell = card.getPrice();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif(timesTried==0) {\n\t\t\t\tpriceToSell = (int) Math.floor(card.getPrice()*1.25);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpriceToSell = (int) Math.floor(card.getPrice());\n\t\t\t}\n\t\t}\n\t\t\n\t\tint choice =-1;\n\t\tboolean soldCard = false;\n\t\tif(player.getType().equals(\"HumanPlayer\")) {\n\t\t\tchoice = JOptionPane.showConfirmDialog(null, player.getName() + \" do you want to buy \" + card.getName() + \" for \" +priceToSell);\n\t\t}\n\t\telse {\n\t\t\tchoice = checkBuyCardFromPlayer(player, card, priceToSell);\n\t\t}\n\t\tif(choice == JOptionPane.YES_OPTION) {\n\t\t\tsellCard(card, player, priceToSell);\n\t\t\tsoldCard = true;\n\t\t}\n\t\t//the player will ask only twice per player and only if they do not have toο much money so that they do not \n\t\t//take advantage of the AI\n\t\telse if((choice == JOptionPane.NO_OPTION) && (player.getMoney() <= (priceToSell*1.5)) && (timesTried<1) ) {\n\t\t\tsoldCard = checkSellCardToPlayer(player, card, almostComplete, timesTried+=1);\n\t\t\t \n\t\t}\n\n\t\treturn soldCard;\n\t}", "boolean containsCard(String cardNumber) {\n return fleet.containsValue(cardNumber);\n }", "boolean hasExternalAttributionCredit();", "if (charge == adhocTicket.getCharge()) {\n System.out.println(\"Charge is passed\");\n }", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "public boolean CheckForBlackjack(Player player) {\n\n if (CalcHandSum(player, player.getHand()) == 21 && player.hasAnAce(player.getHand())) {\n return true;\n }\n else{\n return false;\n }\n }", "protected boolean isAvailable() {\r\n\t\treturn true;\r\n\t}", "boolean canAcceptTrade();", "boolean hasPayment();", "boolean hasPayment();", "public static boolean validateItemCardUsage(Model model, ItemCard card) {\n\n if (model.getCurrentPlayerReference().getCharacter() instanceof Alien) {\n return false;\n }\n\n Human player = (Human) model.getCurrentPlayerReference().getCharacter();\n if (card instanceof AdrenalineCard\n && player.getMaxAllowedMovement() == 2) {\n return false;\n }\n if (card instanceof AttackCard && player.isAttackAllowed()) {\n return false;\n }\n if (card instanceof SedativesCard && !player.hasToDrawSectorCard()) {\n return false;\n }\n Sector playerPosition = model.getMap().getSectors()\n .get(model.getCurrentPlayerReference().getLastPosition());\n if (card instanceof TeleportCard\n && playerPosition instanceof SpawnSector) {\n return false;\n }\n\n List<ItemCard> heldCards = model.getCurrentPlayerReference().getHand()\n .getHeldCards();\n for (ItemCard i : heldCards) {\n if ((card.getClass()).equals(i.getClass())) {\n heldCards.remove(i);\n return true;\n }\n }\n return false;\n\n }", "boolean CanOfferTrade(Resources offer);", "public boolean computerCardCheck(Card card)\n {\n int diff = Card.valueOfCard(computerCard) - Card.valueOfCard(card);\n // If player wins\n if( diff == 1 || diff == -1)\n {\n return true;\n }\n return false;\n }", "public void isPurchased(Player player) {\n\t}", "@Test\n public void receiveCard() throws Exception {\n SmartPlayer x = new SmartPlayer(0, 0);\n x.receiveCard(4, 4);\n assertTrue(x.getCards().get(4) == 4);\n }", "public Boolean hasCardExpired(Date currentDate);", "public boolean hasBust()\n {\n return getSumOfCards(false) > 21;\n }", "boolean isBillingAvailable(String packageName);", "@Test\n public void testCardCanPlay_TRUE_VALUE() {\n System.out.println(\"cardCanPlay TRUE VALUE\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.RED, UnoCardValue.TWO);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.TWO);\n UnoCardColour wildColour = UnoCardColour.BLUE;\n boolean result = utils.cardCanPlay(cardSelection, drawCard, wildColour);\n assertEquals(true, result);\n }" ]
[ "0.7512415", "0.719432", "0.71512085", "0.7150853", "0.70713234", "0.7034815", "0.7018913", "0.68658686", "0.68348", "0.6766778", "0.674535", "0.67217535", "0.6710583", "0.67041963", "0.6628485", "0.65809745", "0.6567631", "0.655124", "0.65363395", "0.6506535", "0.64682865", "0.6451954", "0.6428856", "0.63846874", "0.6371025", "0.6371025", "0.6371025", "0.6371025", "0.63694495", "0.6318555", "0.63132745", "0.6310234", "0.6305279", "0.62989134", "0.62935245", "0.6281856", "0.6281064", "0.6260844", "0.62563473", "0.6232942", "0.6212517", "0.62040997", "0.61870044", "0.61870044", "0.61848307", "0.6183177", "0.61670345", "0.6166859", "0.61665744", "0.61656344", "0.61528164", "0.6151201", "0.6131871", "0.6125965", "0.61243206", "0.6117942", "0.6102349", "0.60906523", "0.6073203", "0.6071778", "0.6069703", "0.6067725", "0.60644937", "0.6046233", "0.6033851", "0.6030011", "0.6026309", "0.6022434", "0.60218084", "0.60167634", "0.60164565", "0.60113186", "0.5994587", "0.59666294", "0.594373", "0.59371674", "0.5928704", "0.59271127", "0.5922886", "0.5922539", "0.5912825", "0.5911204", "0.5909189", "0.59060234", "0.58979136", "0.5896861", "0.5896861", "0.5895786", "0.5892342", "0.58920103", "0.5888126", "0.5888126", "0.588241", "0.5881745", "0.5878738", "0.58767855", "0.58761483", "0.5875638", "0.58751523", "0.58582336", "0.5843313" ]
0.0
-1
/ return index of the searched number if found, or 1 if not found
public static void bubbleSortNumberList(long[] list) { /*make N passes through the list (N is length of the list) */ for(int i=0;i<list.length-1;i++) { /* for index from 0 to N-1, compare item[index] to next item, swap if needed */ for(int j=0; j<list.length-1-i;j++) { if(list[j]>list[j+1]){ long tmp = list[j]; list[j] = list[j+1]; list[j+1] = tmp; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int findPosition(int num) {\n\t\t\n\t\tString s = new Integer(num).toString();\n\t\tSystem.out.println(\"After converting input number to string: \" + s);\n\t\t\n\t\tint i = 0, j = 0;\n\t\tint m = s.length(), n = input.length();\n\t\t\n\t\tfor(i = 0; i <= n - m; i++) {\n\t\t\tj = 0;\n\t\t\twhile(j < m && input.charAt(i + j) == s.charAt(j)) {\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tif(j == m) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\treturn -1;\n\t}", "int indexOf(int val);", "public int sequentialSearch(int[] array, int number){\n for(int i = 0; i < array.length; i++){\r\n // did I find it?\r\n if(array[i] == number){\r\n // tell them where\r\n return i;\r\n }\r\n }\r\n // didn't find it\r\n return -1;\r\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 int find(int value) {\n \t\tfor (int i=0; i<data.length; i++) {\n \t\t\tif (data[i]==value) return i;\n \t\t}\n \t\t\t\n \t\treturn -1;\n \t}", "@Override\n\tpublic int find(int pValueToFind) {\n\t\tfor (int n = 0; n < pointer; ++n) {\n\t\t\tif (values[n] == pValueToFind) {\n\t\t\t\t// this returns the index position\n\t\t\t\treturn n;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int indexOf(int number)\n\t{\n\t\tfor (int index = 0; index < arraySize; index++) \n\t\t{\n\t\t\tif (array[index] == number)\n\t\t\t{\n\t\t\t\treturn index;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int find(int element) {\r\n\t\tint i = 1;\r\n\t\tfor (; i < list.length && list[i]!= -1; i++) {\r\n\t\t\tif (element==list[i]) {\r\n\t\t\t\tcurrentPosition = i;\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\tcurrentPosition = i;\r\n\t\treturn 101;\r\n\t}", "private int linearSearch(final Integer element) {\n for (int i = 0; i < size; i++) {\n if (arrayList[i] == element) {\n return i;\n }\n }\n return -1;\n }", "private int findNumber(String find) {\n String val = \"\";\n // Checks if each for numbers in string and concatenates them to string val\n for (int i = 0; i < find.length(); i++) {\n if (Character.isDigit(find.charAt(i))) {\n val += find.charAt(i);\n }\n // When a non number is found break the loop\n else {\n break;\n }\n }\n // Returns interger value of string val since it represents and index\n return Integer.parseInt(val);\n }", "@Override\n\tpublic int indexOf(int n) {\n\t\tint returnInt = -1;\n\t\tfor (int i=0; i<size; i++) {\n\t\t\tif(values[i] == n)\n\t\t\t\treturnInt = i;\n\t\t}\n\t\treturn returnInt;\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 Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public int Search(int num){\n\tint j ;\n\tboolean ls01 ;\n\tint ifound ;\n\tint aux01 ;\n\tint aux02 ;\n\tint nt ;\n\n\tj = 1 ;\n\tls01 = false ;\n\tifound = 0 ;\n\t\n\t//System.out.println(num);\n\twhile (j < (size)) {\n\t aux01 = number[j] ;\n\t aux02 = num + 1 ;\n\t if (aux01 < num) nt = 0 ;\n\t else if (!(aux01 < aux02)) nt = 0 ;\n\t else {\n\t\tls01 = true ;\n\t\tifound = 1 ;\n\t\tj = size ;\n\t }\n\t j = j + 1 ;\n\t}\n\n\treturn ifound ;\n }", "public static int linSearch(int[] a, int key)\n\t{\n\t\tfor(int i = 0; i < a.length; i++)\n\t\t{\n\t\t\tif (a[i] == key)\n\t\t\t{\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n \t\treturn -1;\t\t\n\t}", "private int locateIndex(K key)\n { \n // // Search until you either find an entry containing key or \n // // pass the point where it should be\n // int index = 0;\n // while ((index < numberOfEntries) && (key.compareTo(dictionary[index].getKey()) > 0))\n // index++;\n // // end while \n // return index;\n \n return binarySearchQ7(0, numberOfEntries - 1, key);\n }", "private int findIndex(T item){\n for(int i = 0; i < numItems; i++){\n if(arr[i].equals(item))\n return i;\n }\n return -1;\n }", "private int searchPosition(int num, int index){\n\n\t\tif(getBoxs().get(index).getNumBoxInt() == num){\n return getBoxs().indexOf(getBoxs().get(index));\n\n }else{\n return searchPosition(num, index + 1);\n\n }\n\t\t\t\n\t\t\n\t}", "private int find(Account account) { \n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif(account.equals(accounts[i])) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "public int indexOf(E toFind) {\n\t\tfor(int x = 0; x < numElements; x++) {\n\t\t\tif(elements[x].equals(toFind)) {\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int search(char value)\n {\n for(int i = 0; i < this.raw_value.length; i++)\n {\n if(this.raw_value[i] == value) return i;\n }\n return -1;\n }", "public int searchIndex(int v) {\n int counter = 1;\n Lista iter = new Lista(this);\n if (iter.x == v) {\n return 0;\n }\n while (iter.next != null) {\n if (iter.next.x == v) {\n return counter;\n }\n iter = iter.next;\n counter += 1;\n }\n if (counter == iter.size() - 1) {\n return -1;\n }\n return counter;\n }", "private int findItemIndex(StudentClass searchItem)\n {\n int searchedHash = generateHash(searchItem) % tableSize;\n int workingIndex = searchedHash;\n int probe = 0; \n int QUAD_VAL = 2;\n StudentClass accessedItem;\n\n while(workingIndex < tableSize)\n {\n accessedItem = tableArray[workingIndex];\n\n if(searchItem.compareTo(accessedItem) == 0)\n {\n return workingIndex;\n }\n probe++;\n\n if(probeFlag == QUADRATIC_PROBING)\n {\n workingIndex = searchedHash + toPower(probe, QUAD_VAL);\n }\n else\n {\n workingIndex += 1;\n }\n workingIndex %= tableSize;\n }\n return ITEM_NOT_FOUND;\n }", "public int indexOf()\n {\n\treturn indexOfValue(mValue);\n }", "public static int linearSearch(int[] list, int key) {\r\n for (int i = 0; i < list.length; i++) {\r\n if (list[i] == key) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "@Override\r\n public int locate(Copiable value) {\r\n for (int i = 0; i < count; i++) {\r\n if (list[i].equals(value)) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "public int search(String searchElem) {\n int hi = next-1;\n int lo = 0;\n int mid = 0;\n while (lo <= hi) {\n mid = (lo + hi) / 2;\n if (data[mid].field.equals(searchElem)) break;\n if (data[mid].field.compareTo(searchElem) < 0)\n lo = mid + 1;\n else\n hi = mid - 1;\n }\n if (mid == 0) return -1;\n else if (data[mid].field.equals(searchElem)) return mid;\n else return -1;\n }" ]
[ "0.73777604", "0.73187584", "0.73048943", "0.73030126", "0.7296709", "0.7064577", "0.7058566", "0.7048943", "0.7035916", "0.70326376", "0.6975763", "0.6956965", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904827", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6904013", "0.6895996", "0.687201", "0.68659616", "0.68450195", "0.680221", "0.67961746", "0.67649776", "0.6747265", "0.67358744", "0.66983956", "0.6691401", "0.6689266", "0.6678315" ]
0.0
-1
Get CPU time in nanoseconds since the program(thread) started. from:
public static long getCpuTime(){ ThreadMXBean bean = ManagementFactory.getThreadMXBean(); return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() : 0L; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private long getCpuTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() : 0L;\n }", "int getCPU_time();", "public static long getCpuTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n bean.getCurrentThreadCpuTime(): 0L;\n }", "public long getCpuTime() {\n\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\treturn bean.isCurrentThreadCpuTimeSupported() ?\n\t\t\tbean.getCurrentThreadCpuTime() : 0L;\n\t\n}", "public static long getCpuTime( ) {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n\n bean.getCurrentThreadCpuTime( ) : 0L;\n\n }", "public static long getCpuTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadCpuTime( ) : 0L;\n }", "public double getCpuTimeSec() {\n\treturn getCpuTime() / Math.pow(10, 9);\t\t\n}", "public long getCurrentThreadCpuTime() {\t\t\t\t\t\t//Total CPU time usage\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\treturn bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() : -1L;\n\t}", "public long getStartCpuTime() {\r\n return startCpuTime;\r\n }", "private long getSystemTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()) : 0L;\n }", "public static long getSystemTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n (bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime()): 0L;\n }", "public long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n}", "public long getCpuTimeNanos() {\n return cpuTimeToNanos(cpu.getTime());\n }", "public double CPUServiceTime()\r\n\t{\r\n\t\treturn Math.random()* (30.0 - 10.0) + 10.0;\r\n\t}", "public long getJVMCpuTime( ) {\n OperatingSystemMXBean bean =\n ManagementFactory.getOperatingSystemMXBean( );\n if ( ! (bean instanceof\n com.sun.management.OperatingSystemMXBean) )\n return 0L;\n return ((com.sun.management.OperatingSystemMXBean)bean)\n .getProcessCpuTime( );\n}", "public static long getSystemTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n (bean.getCurrentThreadCpuTime( ) - bean.getCurrentThreadUserTime( )) : 0L;\n\n }", "public static long getUserTime () {\n\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported()?\n bean.getCurrentThreadUserTime(): 0L;\n }", "public long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n}", "private long getUserTime() {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean();\n return bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : 0L;\n }", "@DISPID(55)\r\n\t// = 0x37. The runtime will prefer the VTID if present\r\n\t@VTID(53)\r\n\tint actualCPUTime_Seconds();", "public long getThreadCpuTime(long tid) {\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\tif(!bean.isCurrentThreadCpuTimeSupported())\n\t\t\tSystem.out.println(\"current thread doesn't support cpu time\");\n\t\treturn bean.isThreadCpuTimeSupported() ? bean.getThreadCpuTime(tid) : -1L;\n\t}", "private long CurrentTime(){\n return (TotalRunTime + System.nanoTime() - StartTime)/1000000;\n }", "public static long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n }", "public long startTimeNanos();", "Optional<Duration> totalCpuTime();", "public long getStartTime () {\n if (isPerformance) {\n return System.currentTimeMillis();\n }\n else\n {\n return 0;\n }\n }", "public long getCurrentThreadKernelTime() {\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\treturn bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadCpuTime() - bean.getCurrentThreadUserTime() : -1L;\n\t}", "public long startTime();", "@DISPID(56)\r\n\t// = 0x38. The runtime will prefer the VTID if present\r\n\t@VTID(54)\r\n\tint actualCPUTime_Milliseconds();", "public long getCurrentThreadUserTime() {\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\treturn bean.isCurrentThreadCpuTimeSupported() ? bean.getCurrentThreadUserTime() : -1L;\n\t}", "@DISPID(21)\r\n\t// = 0x15. The runtime will prefer the VTID if present\r\n\t@VTID(23)\r\n\tjava.lang.String actualCPUTime();", "@Override\n\tpublic String getUsedCpuTime() {\n\t\treturn model.getUsedCpuTime();\n\t}", "public long elapsedTime(){\n\n // calculate elapsed time by getting current CPU time and substracting the CPU time from when we started the stopwatch\n\n // this does not stop the stopwatch\n\n return (magicBean.getCurrentThreadCpuTime() - stopWatchStartTimeNanoSecs);\n\n }", "public static long getRunningTime(long startTime) {\n return System.currentTimeMillis()-startTime;\n }", "public long cpuMicros() {\n return this.cpuNanos / 1000;\n }", "@DISPID(70)\r\n\t// = 0x46. The runtime will prefer the VTID if present\r\n\t@VTID(68)\r\n\tint averageCPUTime_Seconds();", "public static double doCPU_usage() {\n double totalProgramRunTime = endProgramTime - startProgramTime;\n return (processingTimeTotal / totalProgramRunTime) * 100;\n }", "public static void startTimeMeasure() {\n \tstartTime = System.nanoTime();\n }", "public String getCurrentThreadTimeInfo() {\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\tif(!bean.isCurrentThreadCpuTimeSupported())\n\t\t\treturn timeInfo;\n\t\tlong userTime = bean.getCurrentThreadUserTime();\n\t\tlong cpuTime = bean.getCurrentThreadCpuTime();\n\n\t\tsb.append(userTime).append(\"#\").append(cpuTime);\n\t\ttimeInfo = sb.toString();\n//\t\tSystem.out.println(\"lib: \" + timeInfo);\n\t\treturn timeInfo;\n\t}", "public static long getElapsedTime() {\n long time = System.currentTimeMillis() - START_TIME;\n // long time = System.nanoTime() / 1000000;\n return time;\n }", "public void setStartCpuTime(long startCpuTime) {\r\n this.startCpuTime = startCpuTime;\r\n }", "static final long getStartTimeMillis()\n {\n long startTime;\n if ((startTime = ExitMain.vmStartTime) == 0L) /* hack */\n {\n startTime = VMSystem.currentTimeMillis();\n ExitMain.vmStartTime = startTime;\n }\n return startTime;\n }", "long getCurrentClockNs() {\n return System.nanoTime();\n }", "public static long getTime() \r\n {\r\n return System.nanoTime(); \r\n }", "public int getTime(){\n return (timerStarted > 0) ? (int) ((System.currentTimeMillis() - timerStarted) / 1000L) : 0;\n }", "long getExecutionTime();", "@Override\n\tpublic long getTime() {\n\t\treturn System.nanoTime() - startTime;\n\t}", "@DISPID(71)\r\n\t// = 0x47. The runtime will prefer the VTID if present\r\n\t@VTID(69)\r\n\tint averageCPUTime_Milliseconds();", "public static long CLOCK() {\n return java.lang.System.currentTimeMillis();\n }", "public static long now() {\n return System.nanoTime();\n }", "public double time() {\n long diff = System.nanoTime() - start;\n double seconds = diff * 0.000000001;\n return seconds;\n }", "private float getCpuUsage() {\n\t\tString processName = ManagementFactory.getRuntimeMXBean().getName();\n\t\tString processId = processName.split(\"@\")[0];\n\n\t\tlong utimeBefore, utimeAfter, totalBefore, totalAfter;\n\t\tfloat usage = 0;\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"/proc/\" + processId + \"/stat\"));\n\t\t\tString line = br.readLine();\n\t\t\tutimeBefore = Long.parseLong(line.split(\" \")[13]);\n\t\t\tbr.close();\n\n\t\t\ttotalBefore = 0;\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/stat\"));\n\t\t\tline = br.readLine();\n\t\t\twhile (line != null) {\n\t\t\t\tString[] items = line.split(\" \");\n\t\t\t\tif (items[0].equals(\"cpu\")) {\n\t\t\t\t\tfor (int i = 1; i < items.length; i++)\n\t\t\t\t\t\tif (!items[i].trim().equals(\"\") && items[i].matches(\"[0-9]*\"))\n\t\t\t\t\t\t\ttotalBefore += Long.parseLong(items[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t\tThread.sleep(1000);\n\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/\" + processId + \"/stat\"));\n\t\t\tline = br.readLine();\n\t\t\tutimeAfter = Long.parseLong(line.split(\" \")[13]);\n\t\t\tbr.close();\n\n\t\t\ttotalAfter = 0;\n\t\t\tbr = new BufferedReader(new FileReader(\"/proc/stat\"));\n\t\t\tline = br.readLine();\n\t\t\twhile (line != null) {\n\t\t\t\tString[] items = line.split(\" \");\n\t\t\t\tif (items[0].equals(\"cpu\")) {\n\t\t\t\t\tfor (int i = 1; i < items.length; i++)\n\t\t\t\t\t\tif (!items[i].trim().equals(\"\") && items[i].matches(\"[0-9]*\"))\n\t\t\t\t\t\t\ttotalAfter += Long.parseLong(items[i]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t\tusage = 100f * (utimeAfter - utimeBefore) / (totalAfter - totalBefore);\n\t\t} catch (Exception e) {}\n\t\treturn usage;\n\t}", "public long cpuTimeToNanos(long cpuTime) {\n return cpuTime * NANOSECS_IN_MSEC / clockFrequency;\n }", "public static float getCurrentTime(){\n return (float)(System.currentTimeMillis()-t0)/1000.0f;\r\n }", "public long getCurrentSystemTime() {\n return getSystemTime() - startSystemTimeNano;\n }", "public float getSecondsElapsed() { return _startTime==0? 0 : (System.currentTimeMillis() - _startTime)/1000f; }", "public String userProcessorTime() {\n return this.userProcessorTime;\n }", "int time()\n\t{\n\t\treturn totalTick;\n\t}", "public double readClock()\n {\n return (System.currentTimeMillis() - startingTime) / 1000.0;\n }", "public float getTime()\r\n\t{\r\n\t\treturn runningTime;\r\n\t}", "public String totalProcessorTime() {\n return this.totalProcessorTime;\n }", "public double getSystemTimeSec() {\n\treturn getSystemTime() / Math.pow(10, 9);\n}", "public static double toc() {\n\t\treturn System.currentTimeMillis() / 1000d - t;\n\t}", "public static long GetElapsedTime() {\n\t\treturn System.currentTimeMillis() - _lTime;\n\t}", "public long getStartSystemTime() {\r\n return startSystemTime;\r\n }", "protected double getElapsedTime() {\n\t\treturn Utilities.getTime() - startTime;\n\t}", "public Long getCpu() {\n return this.Cpu;\n }", "long time() {\r\n\t\treturn System.currentTimeMillis();\r\n\t}", "public long nanosToCpuTime(long nanosecs) {\n return nanosecs * clockFrequency / NANOSECS_IN_MSEC;\n }", "public long timeElapsed()\n {\n return (System.currentTimeMillis() - this.startTime) / 1000;\n }", "long getElapsedTime();", "int getIO_time();", "private long timeNow()\n {\n // The value of 3506716800000000L is the BAT as at midnight on\n // 1-Jan-1970, which is the base of the time that the system\n // gives us. It has to be adjusted for leap seconds though.\n return (System.currentTimeMillis() * 1000L) + DUTC.get() * 1000000L + 3506716800000000L;\n }", "public long getSystemStartTime() {\n return (this.systemStartTime);\n }", "long getCurrentTimeMs();", "private void getCpuInfo() {\n\t\ttry {\n\t\t\tRandomAccessFile reader = new RandomAccessFile(\"/proc/stat\", \"r\");\n\t\t\tString load = reader.readLine();\n\n\t\t\tString[] toks = load.split(\" \");\n\n\t\t\tlong idle1 = Long.parseLong(toks[5]);\n\t\t\tlong cpu1 = Long.parseLong(toks[2]) + Long.parseLong(toks[3])\n\t\t\t\t\t+ Long.parseLong(toks[4]) + Long.parseLong(toks[6])\n\t\t\t\t\t+ Long.parseLong(toks[7]) + Long.parseLong(toks[8]);\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\t//get process name list in this time\n\t\t\tgetTopCpu();\n\n\t\t\treader.seek(0);\n\t\t\tload = reader.readLine();\n\t\t\treader.close();\n\n\t\t\ttoks = load.split(\" \");\n\n\t\t\t// find right data is the key\n\t\t\t// System.out.println(toks[0]+\" 1 \"+toks[1]+\" 2 \"+toks[2]+\" \"+toks[3]+\" \"+toks[4]+\" \"+toks[5]+\" \"+toks[6]+\" \"+toks[7]+\" 8 \"+toks[8]);\n\t\t\tlong idle2 = Long.parseLong(toks[5]);\n\t\t\tlong cpu2 = Long.parseLong(toks[2]) + Long.parseLong(toks[3])\n\t\t\t\t\t+ Long.parseLong(toks[4]) + Long.parseLong(toks[6])\n\t\t\t\t\t+ Long.parseLong(toks[7]) + Long.parseLong(toks[8]);\n\n\t\t\t// System.out.println(idle2+\" \"+cpu2);\n\t\t\trate = (float) (cpu2 - cpu1)\n\t\t\t\t\t/ (float) ((cpu2 + idle2) - (cpu1 + idle1));\n\t\t\t// System.out.println(rate);\n\t\t\tint temprate = (int) ((rate + 0.05) * 100);\n\t\t\tif (temprate < 0 || temprate > 100) {\n\t\t\t\t// System.out.println(toks[0]+\" 1 \"+toks[1]+\" 2 \"+toks[2]+\" \"+toks[3]+\" \"+toks[4]+\" \"+toks[5]+\" \"+toks[6]+\" \"+toks[7]+\" 8 \"+toks[8]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcpuChart.addData(temprate);\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public int getTotalTime();", "public long getTotalThreadCpuTime(long[] tids) {\t\t\t\t//get multiple threads cpu time usage to prevent overhead for multiple \n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\t\t//method invocations of getThreadCpuTime(long tid)\n\t\tif(!bean.isThreadCpuTimeSupported()) \t\t\t\t\t\t\t//If JVM supports for CPU time measurement for any thread, it returns true\n\t\t\treturn -1L;\n\t\tfor(long i : tids) {\n\t\t\tlong currentTime = bean.getThreadCpuTime(i);\n\t\t\tif(currentTime != -1) {\t\t\t\t\t\t\t\t\t\t//Check if the thread CPU measurement is enableed.\n\t\t\t\ttotalTime += currentTime;\n\t\t\t}\n\t\t}\n\t\treturn totalTime;\n\t}", "@DISPID(54)\r\n\t// = 0x36. The runtime will prefer the VTID if present\r\n\t@VTID(52)\r\n\tint actualCPUTime_Minutes();", "private static double pythonTime() {\n return System.currentTimeMillis() / 1000;\n }", "@ApiModelProperty(required = true, value = \"The number (across all cores) of micro-seconds per second.\")\n public BigDecimal getCpu() {\n return cpu;\n }", "public int getSystemTime() {\n\t\treturn this.systemTime;\n\t}", "public static long getStartTime() {\n return startTime;\n }", "public double getElapsedTime(){\n double CurrentTime = System.currentTimeMillis();\n double ElapseTime = (CurrentTime - startTime)/1000;\n return ElapseTime;\n }", "public int getCpuLoad() { return cpuLoad; }", "public long getCurrentWallClockTime() {\n return System.currentTimeMillis() - startWallClockTime;\n }", "public static long getStartupTime() {\n return startupTime;\n }", "public void setCPUTime() {\r\n\t\t\tthis.CPUTime = 0;\r\n\t\t}", "public static long getElapsedTime() {\n\t\tlong elapsed;\n\t\tif (running) {\n\t\t\telapsed = (System.nanoTime() - startTime);\n\t\t} else {\n\t\t\telapsed = (stopTime - startTime);\n\t\t}\n\t\treturn elapsed;\n\t}", "public static long startTimer() {\n return System.currentTimeMillis();\n }", "public long getLoopTime();", "public static double getExecutionTimeInSeconds(){\n\t\treturn (executionTime * (1.0e-9));\n\t}", "public long getTimeStarted() {\n\t\treturn _timeStarted;\n\t}", "public CPU getCPU() {\r\n\t\treturn cpu;\r\n\t}", "long elapsedTime();", "public float getRunTime() {\r\n return runTime;\r\n }", "public static long currentTimeInSecond() {\n return Instant.now().getEpochSecond();\n }", "public native int getCpuUsage();", "@DISPID(53)\r\n\t// = 0x35. The runtime will prefer the VTID if present\r\n\t@VTID(51)\r\n\tint actualCPUTime_Hours();", "public float getStartTime()\r\n\t{\r\n\t\tif (starttime != null)\r\n\t\t\treturn starttime.getTimeInMillis();\r\n\t\t\r\n\t\treturn 0;\r\n\t}" ]
[ "0.8176747", "0.81601113", "0.80441415", "0.8008931", "0.7942945", "0.7931388", "0.7753877", "0.77089554", "0.7703248", "0.76123166", "0.75874054", "0.7577006", "0.75767624", "0.7570709", "0.74597114", "0.7455361", "0.7365115", "0.73627293", "0.7350398", "0.73068464", "0.7275838", "0.72489345", "0.7186055", "0.7151514", "0.7084993", "0.7084934", "0.70602953", "0.70347035", "0.7004657", "0.6998305", "0.69735956", "0.6893755", "0.6862384", "0.68479776", "0.68205756", "0.680823", "0.67985517", "0.67661166", "0.6753971", "0.67307794", "0.6728576", "0.6727289", "0.66894734", "0.666141", "0.66496235", "0.6646369", "0.66315293", "0.6609756", "0.6604538", "0.6594309", "0.6581041", "0.6544986", "0.6541559", "0.6529898", "0.6519668", "0.6515268", "0.65140605", "0.64913243", "0.6482905", "0.6465136", "0.64618295", "0.6449365", "0.6429343", "0.63428885", "0.63315344", "0.6330909", "0.63282835", "0.63108504", "0.6309686", "0.62982273", "0.6289713", "0.62824005", "0.62684804", "0.6266407", "0.6264056", "0.6259669", "0.6254447", "0.62517416", "0.6251572", "0.62417716", "0.6240962", "0.622928", "0.62175727", "0.6217206", "0.6198583", "0.6173869", "0.6167577", "0.61638457", "0.61559194", "0.6154966", "0.6152173", "0.614672", "0.6138705", "0.61326087", "0.61312443", "0.61118805", "0.61067057", "0.61031765", "0.60970366", "0.6093212" ]
0.80357605
3
setea transparente el background. setea transparentes los puntos iguales al (0,0) de la imagen
private Image takeBG(Image img) throws SlickException{ //NO SE PUEDE CAMBIAR UN COLOR QUE YA ESTÁ A TRANSPARENTE //SOLO ME QUEDA HACER UNA NUEVA Y DIBUJAR SIN EL FONDO Image result = new Image(img.getWidth(),img.getHeight()); Graphics g = result.getGraphics(); g.setColor(Color.transparent); g.fillRect(0,0,img.getWidth(),img.getHeight()); Color backGround = img.getColor(0, 0); for (int y=0 ; y<img.getHeight() ; y++){ for (int x=0 ; x<img.getWidth() ; x++){ if ( img.getColor(x, y).r != backGround.r || img.getColor(x, y).g != backGround.g || img.getColor(x, y).b != backGround.b ){ g.setColor( img.getColor(x, y) ); g.fillRect(x, y, 1, 1); } } } g.flush();//IMPORTANT!!! return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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\n\tpublic void setTransparency(float transparency) {\n\t\t\n\t}", "public void setAlpha(float alpha);", "public void draw() {\n background(0);\n}", "private void setAreaTransparent(int p_78434_1_, int p_78434_2_, int p_78434_3_, int p_78434_4_)\n {\n if (!this.hasTransparency(p_78434_1_, p_78434_2_, p_78434_3_, p_78434_4_))\n {\n for (int var5 = p_78434_1_; var5 < p_78434_3_; ++var5)\n {\n for (int var6 = p_78434_2_; var6 < p_78434_4_; ++var6)\n {\n this.imageData[var5 + var6 * this.imageWidth] &= 16777215;\n }\n }\n }\n }", "private void setAreaTransparent(int p_78434_1_, int p_78434_2_, int p_78434_3_, int p_78434_4_)\r\n {\r\n if (!this.hasTransparency(p_78434_1_, p_78434_2_, p_78434_3_, p_78434_4_))\r\n {\r\n for (int var5 = p_78434_1_; var5 < p_78434_3_; ++var5)\r\n {\r\n for (int var6 = p_78434_2_; var6 < p_78434_4_; ++var6)\r\n {\r\n this.imageData[var5 + var6 * this.imageWidth] &= 16777215;\r\n }\r\n }\r\n }\r\n }", "public void setTransparent(boolean a) {\n\t\tthis.transparent = a;\n\t}", "public void setBg(){\n this.setBackground(color);\n }", "public int getTransparency() {\n return Color.TRANSLUCENT;\n }", "public void activarEscudo() {\n\t\tif(escudo) {\n\t\t\twidth = 40;\n\t\t\theight = 40;\n\t\t\tescudo = false;\n\t\t\tsetGrafico(0);\n\t\t}\n\t\telse {\n\t\t\tescudo = true;\n\t\t\twidth = 50;\n\t\t\theight = 50;\n\t\t\tsetGrafico(1);\n\t\t}\n\t}", "private ImageView m25219a(Context context, boolean z) {\n ImageView backgroundImageView = new BackgroundImageView(context, z);\n backgroundImageView.setScaleType(ScaleType.CENTER_CROP);\n int i = !z ? SizeUtil.dp20 : null;\n backgroundImageView.setImageBitmap(this.options.getBackgroundImage());\n z = new ShapeDrawable();\n z.setShape(m25217a(i));\n z.getPaint().setColor(this.options.getBackgroundColor());\n if (VERSION.SDK_INT >= 16) {\n backgroundImageView.setBackground(z);\n } else {\n backgroundImageView.setBackgroundDrawable(z);\n }\n backgroundImageView.setLayoutParams(new LayoutParams(-1, -1));\n return backgroundImageView;\n }", "private void drawsegment_plain_alpha(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) {\n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n \n int pr = m_fill & 0xFF0000;\n int pg = m_fill & 0xFF00;\n int pb = m_fill & 0xFF;\n \n // int p = m_index;\n float iaf = iaadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n \n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n float iz = izadd * xdiff + zleft;\n int ia = (int) (iaf * xdiff + aleft);\n xstart += ytop;\n xend += ytop;\n \n //int ma0 = 0xFF000000;\n \n for ( ; xstart < xend; xstart++ ) {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n // don't set zbuffer when not fully opaque\n //m_zbuffer[xstart] = iz;\n \n int alpha = ia >> 16;\n int mr0 = m_pixels[xstart];\n /*\n if (argbSurface) {\n ma0 = (((mr0 >>> 24) * alpha) << 16) & 0xFF000000;\n if (ma0 == 0) ma0 = alpha << 24;\n }\n */\n int mg0 = mr0 & 0xFF00;\n int mb0 = mr0 & 0xFF;\n mr0 &= 0xFF0000;\n \n mr0 = mr0 + (((pr - mr0) * alpha) >> 8);\n mg0 = mg0 + (((pg - mg0) * alpha) >> 8);\n mb0 = mb0 + (((pb - mb0) * alpha) >> 8);\n \n m_pixels[xstart] = 0xFF000000 | \n (mr0 & 0xFF0000) | (mg0 & 0xFF00) | (mb0 & 0xFF);\n \n // m_stencil[xstart] = p;\n }\n iz += izadd;\n ia += iaadd;\n }\n ytop += SCREEN_WIDTH;\n xleft += leftadd;\n xrght += rghtadd;\n zleft += zleftadd;\n }\n }", "public abstract void setBackgroundPressed(final int rgba);", "private void setAreaOpaque(int p_78433_1_, int p_78433_2_, int p_78433_3_, int p_78433_4_)\n {\n for (int var5 = p_78433_1_; var5 < p_78433_3_; ++var5)\n {\n for (int var6 = p_78433_2_; var6 < p_78433_4_; ++var6)\n {\n this.imageData[var5 + var6 * this.imageWidth] |= -16777216;\n }\n }\n }", "private void makeTransparentBackground(View v)\n {\n v.setBackgroundColor(0x00000000); //set the transparent background\n }", "private void setAreaOpaque(int p_78433_1_, int p_78433_2_, int p_78433_3_, int p_78433_4_)\r\n {\r\n for (int var5 = p_78433_1_; var5 < p_78433_3_; ++var5)\r\n {\r\n for (int var6 = p_78433_2_; var6 < p_78433_4_; ++var6)\r\n {\r\n this.imageData[var5 + var6 * this.imageWidth] |= -16777216;\r\n }\r\n }\r\n }", "private void createBackground()\n {\n GreenfootImage background = getBackground();\n background.setColor(Color.BLACK);\n background.fill();\n }", "private PImage createBG() {\n\t\tPImage image = new PImage(64, 64);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tl\"), 0, 0, 16, 16, 0, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tm\"), 0, 0, 16, 16, 16, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tm\"), 0, 0, 16, 16, 32, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_tr\"), 0, 0, 16, 16, 48, 0, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_ml\"), 0, 0, 16, 16, 0, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 16, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 32, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mr\"), 0, 0, 16, 16, 48, 16, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_ml\"), 0, 0, 16, 16, 0, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 16, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mm\"), 0, 0, 16, 16, 32, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_mr\"), 0, 0, 16, 16, 48, 32, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bl\"), 0, 0, 16, 16, 0, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bm\"), 0, 0, 16, 16, 16, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_bm\"), 0, 0, 16, 16, 32, 48, 16, 16);\n\t\timage.copy(Textures.get(\"gui.box_black_red_br\"), 0, 0, 16, 16, 48, 48, 16, 16);\n\t\treturn image;\t\t\n\t}", "private void asignarColor(JPanel pane) {\n pane.setBackground(new Color(236, 37, 32));\n }", "public void setBackground(float[] rvba_01){\n\t\tswingComponent.setBackground(new Color(rvba_01[R_INDEX], rvba_01[G_INDEX], rvba_01[B_INDEX], rvba_01[A_INDEX]));\n\t}", "private void drawsegment_texture8_alpha(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) { \n // Accurate texture mode added - comments stripped from dupe code, \n // see drawsegment_texture24() for details\n \n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode) {\n // see if the precomputation goes well, if so finish the setup\n if (precomputeAccurateTexturing()) { \n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else {\n // if the matrix inversion screwed up, \n // revert to normal rendering (something is degenerate)\n accurateMode = false; \n }\n }\n ytop*=SCREEN_WIDTH;\n ybottom*=SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n float iaf = iaadd;\n \n int red = m_fill & 0xFF0000;\n int grn = m_fill & 0xFF00;\n int blu = m_fill & 0xFF;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n \n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n int ia = (int) (iaf * xdiff + aleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode&&goingIn){\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU; iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else{\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n \n for ( ; xstart < xend; xstart++ ) {\n if(accurateMode){\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else{\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n // try-catch just in case pixel offset it out of range\n try\n {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n //m_zbuffer[xstart] = iz;\n \n int al0;\n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = iu & 0xFFFF;\n al0 = m_texture[ofs] & 0xFF;\n int al1 = m_texture[ofs + 1] & 0xFF;\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int al2 = m_texture[ofs] & 0xFF;\n int al3 = m_texture[ofs + 1] & 0xFF;\n al0 = al0 + (((al1-al0) * iui) >> 16);\n al2 = al2 + (((al3-al2) * iui) >> 16);\n al0 = al0 + (((al2-al0) * (iv & 0xFFFF)) >> 16);\n } else {\n al0 = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)] & 0xFF;\n }\n al0 = (al0 * (ia >> 16)) >> 8;\n \n int br = m_pixels[xstart];\n int bg = (br & 0xFF00);\n int bb = (br & 0xFF);\n br = (br & 0xFF0000);\n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al0) >> 8)) & 0xFF0000) | \n ((bg + (((grn - bg) * al0) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al0) >> 8)) & 0xFF);\n // m_stencil[xstart] = p;\n }\n }\n catch (Exception e) {\n }\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n iz+=izadd;\n ia+=iaadd;\n }\n ypixel++;//accurate mode\n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n zleft+=zleftadd;\n aleft+=aleftadd;\n }\n }", "public void aapneOgByttFarge() {\n aapne();\n if (!bombe) {\n Color lysegroenn = Color.rgb(86, 130, 3, 0.3);\n setBackground(new Background(new BackgroundFill(lysegroenn, CornerRadii.EMPTY, Insets.EMPTY)));\n }\n }", "@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}", "private Texture createBackground() {\n Pixmap backgroundPixmap = new Pixmap(1, 1, Pixmap.Format.RGBA8888);\n backgroundPixmap.setColor(0, 0, 0, 0.3f);\n backgroundPixmap.fill();\n Texture texture = new Texture(backgroundPixmap);\n backgroundPixmap.dispose();\n return texture;\n }", "public final void mo39711K() {\n setBackgroundColor(0);\n }", "public Bitmap espejo() {\n Bitmap bmp = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), bitmap.getConfig());\n int pixel, red, green, blue, alpha;\n //Recorremos todos los pixeles de la imagen\n for (int i = 0; i < bitmap.getWidth(); i++) {\n for (int j = 0; j < bitmap.getHeight(); j++) {\n pixel = bitmap.getPixel(i, j);\n red = Color.red(pixel);\n green = Color.green(pixel);\n blue = Color.blue(pixel);\n alpha = Color.alpha(pixel);\n //Pixel a pixel invertimos sus posiciones y recreamos la imagen ya invertida\n bmp.setPixel(bitmap.getWidth() - i - 1, j, Color.argb(alpha, red, green, blue));\n }\n }\n return bmp;\n }", "public void setBackground(){\r\n Image background = new Image(\"Cards/table.jpg\", 192, 80, false, true);\r\n BackgroundImage backgroundImg = new BackgroundImage(background, BackgroundRepeat.REPEAT, BackgroundRepeat.REPEAT,BackgroundPosition.DEFAULT, null);\r\n mainPane.setBackground(new Background(backgroundImg));\r\n }", "private static void drawUniverse(String background) {\n StdDraw.picture(0.0, 0.0, background);\n }", "protected void setScrimAlpha(float alpha) {\n mShowScrim = alpha > 0f;\n mRenderer.getPaint().setAlpha((int) (alpha * 255));\n invalidate();\n }", "@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 }", "@IcalProperty(pindex = PropertyInfoIndex.TRANSP,\n jname = \"transp\",\n eventProperty = true)\n public void setTransparency(final String val) {\n transparency = val;\n }", "double getTransparency();", "public void adjTrans(int adjust){\n GreenfootImage tempImage = getImage();\n tempImage.setTransparency(adjust);\n setImage(tempImage);\n }", "public int getPaintAlpha(){\n return Math.round((float)paintAlpha/255*100);\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 }", "private void clearBackground() {\r\n\t\tg.setColor(Color.WHITE);\r\n\t\tg.fillRect(0,0, TetrisGame.PANEL_WIDTH * TetrisGame.SQUARE_LENGTH,\r\n\t\t\t\t TetrisGame.PANEL_HEIGHT * TetrisGame.SQUARE_LENGTH);\r\n\t}", "private static Picture negateColor(Picture pic){\r\n int red = 0, green = 0, blue = 0;\r\n\r\n for( Pixel p : pic.getPixels()){\r\n // get colors of pixel and negate\r\n red = 255 - p.getRed();\r\n green = 255 - p.getGreen();\r\n blue = 255 - p.getBlue();\r\n p.setColor(new Color(red, green, blue));\r\n // pic.setBasicPixel(p.getX(), p.getY(), color.hashCode());\r\n }\r\n return pic;\r\n }", "public void setAlpha(int a)\n { \n alpha = (float) a / 100.0F;\n repaint();\n }", "private AlphaComposite makeTransparent(float alpha){\n return(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,alpha));\n }", "void effacer() {\r\n Graphics g = this.zoneDessin.getGraphics();\r\n g.setColor(Color.gray);\r\n g.fillRect(0, 0, this.getWidth(), this.getHeight());\r\n }", "public void resetAlphaValues();", "public static void ocultar_lineas()\n {\n for (int i = 0; i < array_lineas.size(); i++)\n array_lineas.get(i).setAlpha(Constantes.IMAGE_ALPHA);\n }", "private void makeTransparent(JButton component)\n {\n component.setOpaque(false);\n component.setContentAreaFilled(false);\n component.setBorderPainted(false);\n }", "public void renderAlphaBG(int n, int n2, ResourceLocation resourceLocation) {\n void y;\n void x;\n void texture;\n mc.getTextureManager().bindTexture((ResourceLocation)texture);\n GL11.glPushMatrix();\n GL11.glColor4f((float)Float.intBitsToFloat(Float.floatToIntBits(84.80346f) ^ 0x7D299B5F), (float)Float.intBitsToFloat(Float.floatToIntBits(356.26364f) ^ 0x7C3221BF), (float)Float.intBitsToFloat(Float.floatToIntBits(4.4841223f) ^ 0x7F0F7DEE), (float)Float.intBitsToFloat(Float.floatToIntBits(6.9323945f) ^ 0x7F5DD62D));\n Gui.drawScaledCustomSizeModalRect((int)x, (int)y, (float)Float.intBitsToFloat(Float.floatToIntBits(1.9387513E38f) ^ 0x7F11DAFE), (float)Float.intBitsToFloat(Float.floatToIntBits(1.7625584E38f) ^ 0x7F0499A4), (int)104, (int)16, (int)(this.getWidth() - 4), (int)11, (float)Float.intBitsToFloat(Float.floatToIntBits(0.112598404f) ^ 0x7F3699FE), (float)Float.intBitsToFloat(Float.floatToIntBits(0.60222334f) ^ 0x7E9A2B4F));\n GL11.glPopMatrix();\n GlStateManager.clear((int)256);\n }", "public abstract void setBackgroundHover(final int rgba);", "public static void makeBackgroundGray(){\r\n\t\tStdDraw.clear(StdDraw.LIGHT_GRAY);\r\n\t}", "@Override\r\n public void paintComponent(Graphics g) {\r\n\r\n //Paint background\r\n g.drawImage (background, 0, 0, null);\r\n }", "public CommonPopWindow setBackgroundAlpha(@FloatRange(from = 0.0D, to = 1.0D) float dackAlpha) {\n/* 174 */ this.mDarkAlpha = dackAlpha;\n/* 175 */ return this;\n/* */ }", "public void setConstantOpacity(float ca) {\n/* 195 */ getCOSObject().setFloat(COSName.CA, ca);\n/* */ }", "private void sepiaTone(){\n int len= currentIm.getRows() * currentIm.getCols();\n \n for (int p= 0; p < len; p= p+1) {\n int rgb= currentIm.getPixel(p);\n int red= DM.getRed(rgb);\n int blue= DM.getBlue(rgb);\n int green= DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n \n double brightness = 0.3 * red + 0.6 * green + 0.1 * blue;\n \n currentIm.setPixel(p,\n (alpha << 24) | ((int)brightness << 16) | ((int)(brightness*0.6) << 8) | \n (int)(brightness*0.4));\n \n }\n }", "public void setTransparent(final boolean transparent) {\n\t\t_transparent = transparent;\n\t}", "public void setBackground(int x)\r\n { \t\r\n \tbg.setColor(ptools.color2Color3f(x));\r\n }", "public void setFondoLeyenda() {\n URL url = getClass().getResource(\"/Imagenes/Leyenda.png\");\n\tthis.setOpaque(false);\n\tthis.image = new ImageIcon(url).getImage();\n\trepaint();\n }", "public void invert() {\n int len= currentIm.getRows() * currentIm.getCols();\n \n // invert all pixels (leave alpha/transparency value alone)\n \n // invariant: pixels 0..p-1 have been complemented.\n for (int p= 0; p < len; p= p+1) {\n int rgb= currentIm.getPixel(p);\n int red= 255 - DM.getRed(rgb);\n int blue= 255 - DM.getBlue(rgb);\n int green= 255 - DM.getGreen(rgb);\n int alpha= DM.getAlpha(rgb);\n currentIm.setPixel(p,\n (alpha << 24) | (red << 16) | (green << 8) | blue);\n }\n }", "private void decorate() {\n setBorderPainted(false);\n setOpaque(true);\n \n setContentAreaFilled(false);\n setMargin(new Insets(1, 1, 1, 1));\n }", "protected void addopqueueonBackground() {\n\t\tlv.setClickable(false);\n\t\tlvx.setClickable(false);\n\t\trefresh.setClickable(false);\n\t\tsearch.setClickable(false);\n\t\tsearch.setEnabled(false);\n\t\tlv.setEnabled(false);\n\t\tlvx.setEnabled(false);\n\t\trefresh.setEnabled(false);\n\t\tcancelButton.setClickable(false);\n\t\tcancelButton.setEnabled(false);\n\t\tlistbackground.setAlpha(0.5f);\n\t\tbackground.setAlpha(0.5f);\n\t}", "@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 }", "private void drawBackground() {\r\n\r\n\t\tGL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\r\n\t\tthis.mc.renderEngine.bindTexture(BACKGROUND_RESOURCE);\r\n\t\tString text = \"Nitro Teleport Waypoints\";\r\n\t\tint posX = (width - SIZE_X) / 2;\r\n\t\tint posY = (height - SIZE_Y) / 2;\r\n\t\tint strWidth = this.fontRendererObj.getStringWidth(text);\r\n\r\n\t\tthis.drawTexturedModalRect(posX, posY, 0, 0, SIZE_X, SIZE_Y);\r\n\t\tthis.drawCenteredString(this.fontRendererObj, text, width / 2, posY - 17, 0xFFFFFF);\r\n\t}", "public TransparencyDemo() {\r\n super();\r\n view3DButton.addItemListener(this);\r\n drawBehindButton.addItemListener(this);\r\n transparencySlider.addChangeListener(this);\r\n }", "public int getTransparency() {\n/* 148 */ return this.bufImg.getColorModel().getTransparency();\n/* */ }", "private void setBgColor(Color c)\n\t{\n\t\teToPower.setBackground (c);\n\t\ttwoPower.setBackground (c);\n\t\tln.setBackground (c);\n\t\txCube.setBackground (c);\n\t\txSquare.setBackground (c);\n\t\tdel.setBackground (c);\n\t\tcubeRoot.setBackground (c);\n\t\tC.setBackground (c);\n\t\tnegate.setBackground (c);\n\t\tsquareRoot.setBackground (c);\n\t\tnine.setBackground (c);\n\t\teight.setBackground (c);\n\t\tseven.setBackground (c);\n\t\tsix.setBackground (c);\n\t\tfive.setBackground (c);\n\t\tfour.setBackground (c);\n\t\tthree.setBackground (c);\n\t\ttwo.setBackground (c);\n\t\tone.setBackground (c);\n\t\tzero.setBackground (c);\n\t\tdivide.setBackground (c);\n\t\tpercent.setBackground (c);\n\t\tmultiply.setBackground (c);\n\t\treciprocal.setBackground (c);\n\t\tadd.setBackground (c);\n\t\tsubtract.setBackground (c);\n\t\tdecimalPoint.setBackground (c);\n\t\tequals.setBackground (c);\n\t\te.setBackground (c);\n\t\tPI.setBackground (c);\n\t\tentry.setBackground (c);\n\t\t\n\t\tmenuBar.setBackground (c);\n\t\tfileMenu.setBackground (c);\n\t\ttoolsMenu.setBackground (c);\n\t\thelpMenu.setBackground (c);\n\t\t\n\t\texit.setBackground (c);\n\t\tsettings.setBackground (c);\n\t\tabout.setBackground (c);\n\t\treadme.setBackground (c);\n\t}", "public abstract void setCurBackground(Color colr);", "@Override\n public void mousePressed(MouseEvent arg0) {\n yourBoardPanel[xx][yy].setBackground(new Color(175, 175, 0));\n }", "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 }", "private void drawBackground(Graphics2D g2d, int wid, int hei) {\n g2d.setColor(Light_Gray);\n Triangle triangle1 = new Triangle(new Point(0, 0), new Point(0, hei), new Point(wid, 0));\n triangle1.fill(g2d);\n g2d.setColor(Dark_Gray);\n Triangle triangle2 = new Triangle(new Point(wid, hei), new Point(0, hei), new Point(wid, 0));\n triangle2.fill(g2d);\n Triangle triangle3 = new Triangle(new Point(wid, 0), new Point(wid, 15), new Point(wid - 15, 15));\n triangle3.fill(g2d);\n g2d.setColor(Light_Gray);\n Triangle triangle4 = new Triangle(new Point(0, hei), new Point(0, hei - 15), new Point(15, hei - 15));\n triangle4.fill(g2d);\n g2d.setColor(Gray);\n g2d.fillRect(6, 6, wid - 12, hei - 12);\n }", "protected void removealphaOpeque() {\n\t\tlistbackground.setAlpha(1f);\n\t\tbackground.setAlpha(1f);\n\t\tlv.setClickable(true);\n\t\tlvx.setClickable(true);\n\t\trefresh.setClickable(true);\n\t\tsearch.setClickable(true);\n\t\tsearch.setEnabled(true);\n\t\tlv.setEnabled(true);\n\t\tlvx.setEnabled(true);\n\t\tcancelButton.setClickable(true);\n\t\tcancelButton.setEnabled(true);\n\t\trefresh.setEnabled(true);\n\t}", "protected void drawForegroundToBackground() {\n if (backgroundColor == null) { return; }\n\n final BufferedImage backgroundBufferedImage = new BufferedImage(dimension.width, dimension.height, this.bufferedImage.getType());\n final Graphics graphics = backgroundBufferedImage.getGraphics();\n\n // draw current color\n graphics.setColor(backgroundColor);\n graphics.fillRect(0, 0, dimension.width, dimension.height);\n graphics.drawImage(bufferedImage, 0, 0, null);\n\n // draw back to original\n final Graphics graphics2 = bufferedImage.getGraphics();\n graphics2.drawImage(backgroundBufferedImage, 0, 0, null);\n }", "public static void drawBackground(MatrixStack matrices, ContainerScreen<?> screen, ResourceLocation background) {\n RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);\n screen.getMinecraft().getTextureManager().bindTexture(background);\n screen.blit(matrices, screen.guiLeft, screen.guiTop, 0, 0, screen.xSize, screen.ySize);\n }", "public void anuncio() {\n\n\t\tapp.image(pantallaEncontrado, 197, 115, 300, 150);\n\n\t\tapp.image(botonContinuar, 253, 285);\n\n\t}", "public CssBackgroundClip() {\r\n\tbgclip = border;\r\n }", "public QuadradoVerdeLosango(Posicao umaPosicao) {\n super(\"quadradoVerdeLosango.png\");\n this.setPosicao(umaPosicao);\n bTransponivel = false;\n bQuebravel = true;\n bMovivel = true;\n }", "public void xtestWindowTransparency() throws Exception {\n if (GraphicsEnvironment.isHeadless())\n return;\n System.setProperty(\"sun.java2d.noddraw\", \"true\");\n GraphicsConfiguration gconfig = WindowUtils.getAlphaCompatibleGraphicsConfiguration();\n Frame root = JOptionPane.getRootFrame();\n final Window background = new Window(root);\n background.setBackground(Color.white);\n background.setLocation(X, Y);\n final JWindow transparent = new JWindow(root, gconfig);\n transparent.setLocation(X, Y);\n ((JComponent)transparent.getContentPane()).setOpaque(false);\n transparent.getContentPane().add(new JComponent() {\n\t\t\tprivate static final long serialVersionUID = 1L;\n\t\t\tpublic Dimension getPreferredSize() {\n return new Dimension(W, H);\n }\n protected void paintComponent(Graphics g) {\n g = g.create();\n g.setColor(Color.red);\n g.fillRect(getWidth()/4, getHeight()/4, getWidth()/2, getHeight()/2);\n g.drawRect(0, 0, getWidth()-1, getHeight()-1);\n g.dispose();\n }\n });\n transparent.addMouseListener(handler);\n transparent.addMouseMotionListener(handler);\n \n SwingUtilities.invokeAndWait(new Runnable() { public void run() {\n background.pack();\n background.setSize(new Dimension(W, H));\n background.setVisible(true);\n transparent.pack();\n transparent.setSize(new Dimension(W, H));\n transparent.setVisible(true);\n transparent.toFront();\n }});\n \n WindowUtils.setWindowTransparent(transparent, true);\n \n //robot.delay(60000);\n\n Color sample = robot.getPixelColor(X + W/2, Y + H/2);\n assertEquals(\"Painted pixel should be opaque\", Color.red, sample);\n \n sample = robot.getPixelColor(X + 10, Y + 10);\n assertEquals(\"Unpainted pixel should be transparent\", Color.white, sample);\n }", "public void mo8780a(boolean z) {\n try {\n this.f1291g = z;\n if (z) {\n this.f1290f.setColor(-1);\n } else {\n this.f1290f.setColor(ViewCompat.MEASURED_STATE_MASK);\n }\n invalidate();\n } catch (Throwable th) {\n SDKLogHandler.m2563a(th, \"WaterMarkerView\", \"changeBitmap\");\n th.printStackTrace();\n }\n }", "public void setPaintAlpha(int newAlpha){\n paintAlpha=Math.round((float)newAlpha/100*255);\n drawPaint.setColor(paintColor);\n drawPaint.setAlpha(paintAlpha);\n }", "public void printBackground() {\n\t\tthis.gc.setFill(Color.BLACK);\n\t\tthis.gc.fillRect(0, 0, canvas.getWidth(), canvas.getHeight());\n\t}", "private void setIncognito()\n\t{\n\t\t\teToPower.setBackground (black);\n\t\t\ttwoPower.setBackground (black);\n\t\t\tln.setBackground (black);\n\t\t\txCube.setBackground (black);\n\t\t\txSquare.setBackground (black);\n\t\t\tdel.setBackground (black);\n\t\t\tcubeRoot.setBackground (black);\n\t\t\tC.setBackground (black);\n\t\t\tnegate.setBackground (black);\n\t\t\tsquareRoot.setBackground (black);\n\t\t\tnine.setBackground (black);\n\t\t\teight.setBackground (black);\n\t\t\tseven.setBackground (black);\n\t\t\tsix.setBackground (black);\n\t\t\tfive.setBackground (black);\n\t\t\tfour.setBackground (black);\n\t\t\tthree.setBackground (black);\n\t\t\ttwo.setBackground (black);\n\t\t\tone.setBackground (black);\n\t\t\tzero.setBackground (black);\n\t\t\tdivide.setBackground (black);\n\t\t\tpercent.setBackground (black);\n\t\t\tmultiply.setBackground (black);\n\t\t\treciprocal.setBackground (black);\n\t\t\tadd.setBackground (black);\n\t\t\tsubtract.setBackground (black);\n\t\t\tdecimalPoint.setBackground (black);\n\t\t\tequals.setBackground (black);\n\t\t\te.setBackground (black);\n\t\t\tPI.setBackground (black);\n\t\t\t\n\t\t\teToPower.setForeground (white);\n\t\t\ttwoPower.setForeground (white);\n\t\t\tln.setForeground (white);\n\t\t\txCube.setForeground (white);\n\t\t\txSquare.setForeground (white);\n\t\t\tdel.setForeground (white);\n\t\t\tcubeRoot.setForeground (white);\n\t\t\tC.setForeground (white);\n\t\t\tnegate.setForeground (white);\n\t\t\tsquareRoot.setForeground (white);\n\t\t\tnine.setForeground (white);\n\t\t\teight.setForeground (white);\n\t\t\tseven.setForeground (white);\n\t\t\tsix.setForeground (white);\n\t\t\tfive.setForeground (white);\n\t\t\tfour.setForeground (white);\n\t\t\tthree.setForeground (white);\n\t\t\ttwo.setForeground (white);\n\t\t\tone.setForeground (white);\n\t\t\tzero.setForeground (white);\n\t\t\tdivide.setForeground (white);\n\t\t\tpercent.setForeground (white);\n\t\t\tmultiply.setForeground (white);\n\t\t\treciprocal.setForeground (white);\n\t\t\tadd.setForeground (white);\n\t\t\tsubtract.setForeground (white);\n\t\t\tdecimalPoint.setForeground (white);\n\t\t\tequals.setForeground (white);\n\t\t\te.setForeground (white);\n\t\t\tPI.setForeground (white);\n\t\t\t\t\t\n\t\t\tentry.setBackground (black);\n\t\t\tentry.setForeground(white);\n\n\t\t\tmenuBar.setBackground(black);\n\t\t\tmenuBar.setForeground(white);\n\t\t\tfileMenu.setForeground(white);\n\t\t\thelpMenu.setForeground (white);\n\t\t\ttoolsMenu.setForeground(white);\n\t\t\t\n\t\t\texit.setBackground(black);\n\t\t\tsettings.setBackground(black);\n\t\t\treadme.setBackground(black);\n\t\t\tabout.setBackground(black);\n\t\t\t\t\t\t\n\t\t\texit.setForeground(white);\n\t\t\tsettings.setForeground(white);\n\t\t\treadme.setForeground(white);\n\t\t\tabout.setForeground(white);\n\t}", "@Override\n protected void paintBackground(Graphics2D g) {\n g.drawImage(image, 0, 0, this);\n }", "Rey(){\r\n \r\n color_rey=Color.BLANCO;\r\n posicion_rey.fila=1;\r\n posicion_rey.columna='e';\r\n \r\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 }", "public void setIntensities(float r0, float g0, float b0, float a0,\n float r1, float g1, float b1, float a1,\n float r2, float g2, float b2, float a2) {\n // Check if we need alpha or not?\n if ((a0 != 1.0f) || (a1 != 1.0f) || (a2 != 1.0f)) {\n INTERPOLATE_ALPHA = true;\n a_array[0] = (a0 * 253f + 1.0f) * 65536f;\n a_array[1] = (a1 * 253f + 1.0f) * 65536f;\n a_array[2] = (a2 * 253f + 1.0f) * 65536f;\n m_drawFlags|=R_ALPHA;\n } else {\n INTERPOLATE_ALPHA = false;\n m_drawFlags&=~R_ALPHA;\n }\n \n // Check if we need to interpolate the intensity values\n if ((r0 != r1) || (r1 != r2)) {\n INTERPOLATE_RGB = true;\n m_drawFlags |= R_GOURAUD;\n } else if ((g0 != g1) || (g1 != g2)) {\n INTERPOLATE_RGB = true;\n m_drawFlags |= R_GOURAUD;\n } else if ((b0 != b1) || (b1 != b2)) {\n INTERPOLATE_RGB = true;\n m_drawFlags |= R_GOURAUD;\n } else {\n //m_fill = parent.filli;\n m_drawFlags &=~ R_GOURAUD;\n }\n \n // push values to arrays.. some extra scaling is added\n // to prevent possible color \"overflood\" due to rounding errors\n r_array[0] = (r0 * 253f + 1.0f) * 65536f;\n r_array[1] = (r1 * 253f + 1.0f) * 65536f;\n r_array[2] = (r2 * 253f + 1.0f) * 65536f;\n \n g_array[0] = (g0 * 253f + 1.0f) * 65536f;\n g_array[1] = (g1 * 253f + 1.0f) * 65536f;\n g_array[2] = (g2 * 253f + 1.0f) * 65536f;\n \n b_array[0] = (b0 * 253f + 1.0f) * 65536f;\n b_array[1] = (b1 * 253f + 1.0f) * 65536f;\n b_array[2] = (b2 * 253f + 1.0f) * 65536f;\n \n // for plain triangles\n m_fill = 0xFF000000 | \n ((int)(255*r0) << 16) | ((int)(255*g0) << 8) | (int)(255*b0);\n }", "public MatteIcon(Paint background) {\r\n this(32, 32, background);\r\n }", "private void m4818n() {\n this.f6598f.setAlpha(this.f6600h);\n this.f6597e.setAlpha(this.f6600h);\n }", "protected void setPlayerBackground() { Console.setBackground(Console.YELLOW); }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsetBackground(color);\t\r\n\t\t\t\tvazioSouth.setBackground(color);\r\n\t\t\t\tvazioEast.setBackground(color);\r\n\t\t\t\tbtsPaintJPanel.setBackground(color);\r\n\t\t\t\tbotaoJPanel.setBackground(color);\r\n\t\t\t}", "Sprite getBackground();", "@Override\r\n public void setOpaque(boolean bln) {\r\n super.setOpaque(false); \r\n }", "@Override\r\n public void setOpaque(boolean bln) {\r\n super.setOpaque(false); \r\n }", "@Override\n\tpublic int getOpacity() {\n\t\treturn PixelFormat.OPAQUE;\n\t}", "private void drawsegment_gouraud_texture8_alpha(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) {\n // Accurate texture mode added - comments stripped from dupe code, \n // see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode) {\n // see if the precomputation goes well, if so finish the setup\n if (precomputeAccurateTexturing()) { \n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n // if the matrix inversion screwed up, \n // revert to normal rendering (something is degenerate)\n accurateMode = false; \n }\n }\n \n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n float irf = iradd;\n float igf = igadd;\n float ibf = ibadd;\n float iaf = iaadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n \n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n int ir = (int) (irf * xdiff + rleft);\n int ig = (int) (igf * xdiff + gleft);\n int ib = (int) (ibf * xdiff + bleft);\n int ia = (int) (iaf * xdiff + aleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode&&goingIn){\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU; iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else{\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n \n for ( ; xstart < xend; xstart++ ) {\n if(accurateMode){\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else{\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n \n try {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n //m_zbuffer[xstart] = iz;\n \n int al0;\n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = iu & 0xFFFF;\n al0 = m_texture[ofs] & 0xFF;\n int al1 = m_texture[ofs + 1] & 0xFF;\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int al2 = m_texture[ofs] & 0xFF;\n int al3 = m_texture[ofs + 1] & 0xFF;\n al0 = al0 + (((al1-al0) * iui) >> 16);\n al2 = al2 + (((al3-al2) * iui) >> 16);\n al0 = al0 + (((al2-al0) * (iv & 0xFFFF)) >> 16);\n } else {\n al0 = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)] & 0xFF;\n }\n al0 = (al0 * (ia >> 16)) >> 8;\n \n // get RGB colors\n int red = ir & 0xFF0000;\n int grn = (ig >> 8) & 0xFF00;\n int blu = (ib >> 16);\n \n // get buffer pixels\n int bb = m_pixels[xstart];\n int br = (bb & 0xFF0000); // 0x00FF0000\n int bg = (bb & 0xFF00); // 0x0000FF00\n bb = (bb & 0xFF); // 0x000000FF\n \n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al0) >> 8)) & 0xFF0000) |\n ((bg + (((grn - bg) * al0) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al0) >> 8)) & 0xFF);\n \n // write stencil\n // m_stencil[xstart] = p;\n }\n } catch (Exception e) { }\n \n //\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n ir+=iradd;\n ig+=igadd;\n ib+=ibadd;\n ia+=iaadd;\n iz+=izadd;\n }\n ypixel++;//accurate mode\n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n rleft+=rleftadd;\n gleft+=gleftadd;\n bleft+=bleftadd;\n aleft+=aleftadd;\n zleft+=zleftadd;\n }\n }", "public void supprimerJoueur() {\n cercle.setStroke(Color.TRANSPARENT);\n isVisible = false;\n }", "private void m76755g() {\n this.f61635e = new Paint();\n this.f61635e.setAntiAlias(true);\n this.f61635e.setColor(this.f61636f);\n this.f61635e.setStyle(Style.FILL);\n this.f61635e.setStrokeWidth(2.0f);\n }", "public void modCasella(Tauler t){\n if(valor != -1){\n this.setBackground(Color.RED);\n valor = -1;\n t.subMov();\n }\n else{\n valor = 0;\n this.setBackground(color);\n t.addMov();\n }\n }", "protected void drawGuiContainerBackgroundLayer(float f, int x, int y)\n {\n GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);\n super.mc.getTextureManager().bindTexture(background);\n int j = (super.width - super.xSize) / 2;\n int k = (super.height - super.ySize) / 2;\n this.drawTexturedModalRect(j, k, 0, 0, super.xSize, super.ySize);\n int i1;\n\n if (this.container.tileEntity.energy > 0)\n {\n i1 = this.container.tileEntity.energy * 14 / 200;\n\n if (i1 > 14)\n {\n i1 = 14;\n }\n\n this.drawTexturedModalRect(j + 62, k + 36 + 14 - i1, 176, 14 - i1, 14, i1);\n }\n\n i1 = this.container.tileEntity.pumpCharge * 41 / 200;\n\n if (i1 > 41)\n {\n i1 = 41;\n }\n\n this.drawTexturedModalRect(j + 99, k + 61 - i1, 176, 55, 12, 5);\n\n if (i1 > 0)\n {\n this.drawTexturedModalRect(j + 99, k + 25 + 41 - i1, 176, 14, 12, i1);\n }\n\n this.drawTexturedModalRect(j + 98, k + 19, 188, 14, 13, 47);\n }", "@Override\n\t\t\tpublic void setAlpha(int alpha) {\n\t\t\t\t\n\t\t\t}", "public void setAlpha(double alpha);", "@Override\r\n\tpublic void renderBackground() {\n\r\n\t}", "public void setBackgroundTranslucence(float alpha) {\n\t\tthis.bgAC = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, alpha);\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 }", "@Override\n public void setAlpha(int alpha) {\n patternDrawable.setAlpha(alpha);\n }", "protected void fading(float alpha) { }" ]
[ "0.6498154", "0.61975455", "0.605604", "0.5986696", "0.59636015", "0.5945888", "0.5940706", "0.59012717", "0.5901026", "0.5876571", "0.5862823", "0.58595955", "0.5823675", "0.5822707", "0.58138514", "0.58091044", "0.57683134", "0.5752206", "0.5734125", "0.5724955", "0.57201415", "0.57153755", "0.5704464", "0.56973845", "0.5681563", "0.56625634", "0.5653093", "0.56398165", "0.55823576", "0.5573371", "0.55620784", "0.5551668", "0.5538092", "0.5524025", "0.5519083", "0.5510609", "0.550821", "0.5499316", "0.5491839", "0.5489679", "0.54697984", "0.5468805", "0.54649425", "0.54620683", "0.5455751", "0.5450252", "0.5443088", "0.5440622", "0.5430663", "0.54257065", "0.5420584", "0.5410842", "0.5407634", "0.5405054", "0.54048866", "0.5394943", "0.5388715", "0.53833103", "0.5382127", "0.537885", "0.5366803", "0.53656965", "0.5356391", "0.53404725", "0.5320947", "0.5309857", "0.5307093", "0.5303621", "0.5300493", "0.52977985", "0.5296894", "0.5292308", "0.52921474", "0.5289024", "0.5286283", "0.5286158", "0.52800316", "0.5276732", "0.5275256", "0.52744853", "0.5268231", "0.5252623", "0.52489203", "0.52430606", "0.52423036", "0.5240589", "0.5240589", "0.5232109", "0.5230469", "0.5227584", "0.52261406", "0.5224793", "0.52230483", "0.5215843", "0.5209214", "0.52048934", "0.52003354", "0.51979476", "0.5188938", "0.51867294" ]
0.5361886
62
This interface is called when an error was detected. It might, for example, add an error annotation, throw an exception, or ignore the error.
public interface ErrorHandler { /** * This method is called by the helper object when an error was detected. */ void onError(@NotNull PsiElement errorSource, @NotNull String message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onErrorImpl(Throwable e) {\n }", "abstract void onError(Exception e);", "public abstract void OnError(int code);", "public void error(Exception e);", "@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public void onError(Exception e);", "@Override\r\n public void onError(Exception e) {\n }", "@Override\n public void onError(Exception e) {\n }", "@Override\n public void onError(Exception e) {\n\n }", "@Override\n public void onError(Throwable error) {\n }", "public void onReceivedError();", "@Override\n public void onError() {\n\n }", "public void Error(){\n }", "@Override\r\n\t\t\tpublic void onError(Object error) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void onError(Object error) {\n\n\t\t\t}", "@Override\n\tpublic void error(Marker marker, String message) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, MessageSupplier msgSupplier) {\n\n\t}", "void onError(Exception e);", "@Override\n public void onError(Throwable e) {\n }", "@Override\n\tpublic void error(Marker marker, Object message) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, Object message, Throwable t) {\n\n\t}", "public void errorOccured(String errorMessage, Exception e);", "@Override\n public void onError(Throwable e) {\n }", "@Override\n\tpublic void onError(Exception ex) {\n\n\t}", "@Override\n public void onError(Throwable e) {\n\n }", "@Override\n public void onError(String error) {\n }", "public void annotationsCouldNotBeAdded(String errorMessage) {}", "@Override\n\tpublic void error(Marker marker, String message, Object... params) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, String message, Throwable t) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, Message msg, Throwable t) {\n\n\t}", "public void error(Throwable e);", "@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8, Object p9) {\n\n\t}", "public interface ErrorListener {\r\n /**\r\n * Responds to the error event in any way that the listener chooses\r\n * @param source The object that raised the error event\r\n * @param msg An optional message created by the source object\r\n */\r\n public void respondToError(Object source, String msg);\r\n}", "@Override\n\tpublic void error(Marker marker, String message, Object p0) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1) {\n\n\t}", "public void handleErrors() {\n // hook method\n }", "public abstract void onException(Exception e);", "abstract void error(String error);", "@Override\n public void onError(Error error) {\n }", "@Override\n public void onError(Throwable t) {\n\n }", "@Override\n public void onError(Throwable t) {\n\n }", "void handleError(Exception ex);", "@Override\n public void errorReceived(Exception ex) {\n }", "@Override\n public void errorReceived(Exception ex) {\n }", "public void error(Throwable error) {\n\n }", "public void error(Throwable error) {\n\n }", "@Override\n\tpublic void error(Marker marker, MessageSupplier msgSupplier, Throwable t) {\n\n\t}", "void onError(Throwable error);", "void onError(Throwable error);", "@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3) {\n\n\t}", "public void error();", "@Override\r\n\tpublic void onError(String error) {\n\t\t\r\n\t}", "@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7, Object p8) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, Message msg) {\n\n\t}", "public abstract void onError(Call call, Exception e);", "@Override\n\t\t\t\t\tpublic void onError(Throwable p1) {\n\t\t\t\t\t}", "@Override\n\tpublic void error(Marker marker, CharSequence message, Throwable t) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5, Object p6, Object p7) {\n\n\t}", "public void onError( Throwable ex );", "public void error() {\n throw new RuntimeException(getClass().getName() + \" error\");\n }", "public interface IError {\n void onError(int code, String msg);\n}", "public interface IError {\n\n void onError(int code, String msg);\n\n}", "@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, CharSequence message) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4) {\n\n\t}", "@Override\n\tpublic void calculateError() {\n\t\t\n\t}", "public interface ErrorLogger {\n\n public void onError(JudoException e, RequestInterface request);\n\n}", "@Override\r\n\t\t\tpublic void onError(Throwable e) {\n\r\n\t\t\t}", "@Override\r\n\tpublic void onError(String err) {\n\t\t\r\n\t}", "@Override\n\tpublic void error(Object message) {\n\n\t}", "public void onError(String errorMessage);", "protected abstract void error(String err);", "@Override\n public void OnFailed(String error)\n {\n\n }", "void errorOccurred(@Nonnull String errorMessage);", "void cameraError(Exception error);", "@Override\r\n\t\t\tpublic void onError(int error) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onError(int error) {\n\r\n\t\t\t}", "@Override\n public void onError(int code, String msg) {\n }", "@Override\n public void onException(Exception arg0) {\n }", "protected abstract void onException(final Exception exception);", "@Override\n\tpublic void error(Marker marker, Supplier<?> msgSupplier) {\n\n\t}", "public void onError(Throwable arg0) {\n\t\t\n\t\t }", "@Override\n\tpublic void onError(ErrorResponse errorResponse) {\n\t\t\n\t}", "public interface OnGraphErrorListener {\n public void onError(String strErrorMessage);\n }", "void onError(Throwable e);", "public interface OnError{void onReqError();}", "@Override\n\tpublic void onError(String arg0, Integer arg1, Integer arg2, String arg3, Exception arg4) {\n\t\t\n\t}", "@Override\n public void visitErrorNode(ErrorNode node) {\n\n }", "protected interface ProvideError {\n Exception getError();\n }", "void onError(ModelNotification notification);", "@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void onError(Throwable e) {\n\t\t\tSystem.out.println(\"onError\");\n\t\t}", "@Override\n\tpublic void error(Marker marker, String message, Object p0, Object p1, Object p2, Object p3,\n\t\t\tObject p4, Object p5) {\n\n\t}", "public interface View {\n void onError(Throwable e);\n}", "@Override\n\tpublic void onError(int error, String msg) {\n\t\t\n\t}", "void onError(Throwable throwable);", "public void inquiryError() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void onException(Exception arg0) {\n\n\t\t\t}", "void onError(String error);", "public interface OnError {\n /**\n * 网络原因造成的失败\n *\n * @param data 返回的数据\n * @param resultstyle 错误类型\n */\n public abstract void onError(String data, Web.RESULTSTYLE resultstyle);\n}" ]
[ "0.67235017", "0.6693192", "0.66630733", "0.65825486", "0.6566034", "0.65462965", "0.6531448", "0.6510876", "0.6503512", "0.64728683", "0.64515364", "0.64459866", "0.64424473", "0.6424346", "0.64066935", "0.6396703", "0.6388187", "0.63774407", "0.6373635", "0.6356359", "0.63409674", "0.6337735", "0.63308305", "0.63291216", "0.6312504", "0.63091063", "0.62885284", "0.62874746", "0.62846345", "0.62826544", "0.62805647", "0.62764454", "0.6276104", "0.6255756", "0.6252727", "0.6251033", "0.6244986", "0.62438977", "0.62429076", "0.6237255", "0.6237255", "0.62338525", "0.6226285", "0.6226285", "0.6221745", "0.6221745", "0.6217842", "0.62065554", "0.62065554", "0.6206126", "0.6203432", "0.6202939", "0.6198449", "0.61957896", "0.61904246", "0.6187041", "0.618377", "0.6177883", "0.61650777", "0.6160999", "0.6159601", "0.61454546", "0.61447585", "0.61429524", "0.6139897", "0.613206", "0.61278236", "0.61231375", "0.611432", "0.61125064", "0.6097048", "0.6091507", "0.60837644", "0.60805285", "0.6077874", "0.6076624", "0.6074713", "0.6070295", "0.6062727", "0.605499", "0.6047391", "0.6046148", "0.6044057", "0.60418975", "0.6033624", "0.60328037", "0.60312384", "0.6029986", "0.60293233", "0.6027626", "0.6022807", "0.60111135", "0.5998586", "0.5993042", "0.5988319", "0.59869456", "0.59816873", "0.5979852", "0.59782207", "0.59726506", "0.5962158" ]
0.0
-1
This method is called by the helper object when an error was detected.
void onError(@NotNull PsiElement errorSource, @NotNull String message);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public void inquiryError() {\n\t\t\n\t}", "@Override\n public void onError() {\n\n }", "private void correctError()\r\n\t{\r\n\t\t\r\n\t}", "@Override\n public void errorReceived(Exception ex) {\n }", "@Override\n public void errorReceived(Exception ex) {\n }", "@Override\r\n\t\t\tpublic void onError(Object error) {\n\t\t\t\t\r\n\t\t\t}", "public void handleErrors() {\n // hook method\n }", "@Override\n\t\t\tpublic void onError(Object error) {\n\n\t\t\t}", "@Override\n public void onError(Exception e) {\n }", "@Override\r\n public void onError(Exception e) {\n }", "@Override\n public void onError(Exception e) {\n\n }", "@Override\n\t\tpublic void loadError() {\n\t\t}", "protected void onConnectionError() {\n\t}", "@Override\n\tpublic String doError() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void adjustToError() {\n\t\t\n\t}", "@Override\n\tpublic void setWrongError() {\n\t\t\n\t}", "public void estiloError() {\r\n /**Bea y Jose**/\r\n\t}", "void handleError(Exception ex);", "@Override\n public void onError(Throwable e) {\n }", "@Override\r\n\tprotected void processError() {\n\t\tsuper.processError();\r\n\t\tshowToast(error_generico_process);\r\n\t}", "@Override\n public void onError(Throwable e) {\n\n }", "public void onReceivedError();", "@Override\r\n\tpublic void onError(String err) {\n\t\t\r\n\t}", "public void error();", "@Override\n\tpublic void onError(Exception ex) {\n\n\t}", "public void onConnectionError()\n\t\t{\n\t\t}", "void onErrorOccurred() {\n mUserAwarenessListener.onErrorOccurred(Errors.UNDEFINED);\n\n //start light sensor because eye tracking is not running we don't need light sensor now\n mLightIntensityManager.stopLightMonitoring();\n }", "@Override\n\tpublic void calculateError() {\n\t\t\n\t}", "@Override\n public void onError(Throwable error) {\n }", "@Override\r\n\t\t\tpublic void onError(int error) {\n\t\t\t\t\r\n\t\t\t}", "public void error() {\n throw new RuntimeException(getClass().getName() + \" error\");\n }", "void setError();", "public void Error(){\n }", "@Override\n\tpublic void error(Marker marker, MessageSupplier msgSupplier) {\n\n\t}", "@Override\n public void showError() {\n }", "@Override\n public void errorOnUpdate(String buxError) {\n }", "protected void handleError(String error, boolean fromSysErr) {}", "@Override\n public void onError(Error error) {\n }", "@Override\r\n\tpublic void onError(String error) {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void onError(Throwable e) {\n\r\n\t\t\t}", "@Override\n public void onError(Throwable t) {\n\n }", "@Override\n public void onError(Throwable t) {\n\n }", "@Override\n\tpublic void error(Marker marker, Message msg) {\n\n\t}", "@Override\n\t\tpublic void onError(Throwable e) {\n\t\t\tSystem.out.println(\"onError\");\n\t\t}", "@Override\n public void onError(Status status) {\n }", "@Override\n\t\t\tpublic void handlerError(String error) {\n\t\t\t\tLog.e(TAG, error); \n\t\t\t\tisStart = false;\n\t\t\t}", "@Override\n\tpublic void error(Object message) {\n\n\t}", "protected abstract void error(String err);", "public void error(Exception e);", "@Override\n public void onError(Status status) {\n }", "@Override\n\t\t\tpublic void onNetworkError() {\n\n\t\t\t}", "@Override\n\t\t\t\tpublic void onException(Exception e) {\n\t\t\t\t\tLog.d(\"SD_TRACE\", \"load api exception\" + e.toString());\n\t\t\t\t\tmLoadSuccess = false;\n\t\t\t\t}", "@Override\n\tpublic void error(Marker marker, Object message) {\n\n\t}", "@Override\n public void onResponceError(final ErrorCode errorCode) {\n }", "@Override\r\n\t\t\tpublic void onError(int error) {\n\r\n\t\t\t}", "@Override\n public void OnFailed(String error)\n {\n\n }", "@Override\n public void onError(int code, String msg) {\n }", "protected void userErrorOccurred()\n {\n traceOK = false;\n }", "@Override\n\tpublic void onAdError(String arg0) {\n\t\t\n\t}", "public void checkError() {\n if (this.threadError != null) {\n throw new EncogError(this.threadError);\n }\n }", "@Override\n public void onError(String error) {\n }", "@Override\n public void onError(Status status) {\n }", "@Override\n public void onError(Status status) {\n }", "@Override\n public void onError(Throwable t) {\n t.printStackTrace();\n }", "@Override\n public void onError(Throwable e) {\n }", "@Override\n\t\t\t\t\tpublic void onMyError(VolleyError error) {\n\n\t\t\t\t\t}", "@Override\n public void uploadFailed() {\n }", "@Override\n\t\t\t\t\tpublic void onError(Request request, Throwable exception) {\n\n\t\t\t\t\t}", "public void errorOccured(String errorMessage, Exception e);", "@Override\n\t\t\tpublic void onError(Request request, Throwable exception) {\n\t\t\t\t\n\t\t\t}", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "@Override\n\tpublic void error(Marker marker, String message) {\n\n\t}", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "private void handleError(Throwable error){\n // Re-enable button\n createBtn.setEnabled(true);\n // Hide Progress Bar\n progressIndicator.setVisibility(View.GONE);\n // Unlock screen orientation\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_USER);\n\n // Handle Errors using util class and save the error code\n int errorCode = errorHandler.handle(error, this, view);\n\n // If error is Code 11, show dialog\n if(errorCode == Errors.CUSTOMER_ALREADY_HAS_ACTIVE_BOOKING_ERROR.getErrorCode()){\n showErrorDialog();\n }\n }", "@Override\n\t\t\t\t\t\tpublic void onErrorResponse(String errorResponse) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onErrorResponse(String errorMessage) {\n\r\n\t\t\t}", "@Override\n public void onError(Throwable error) {\n Log.e(\"REALM\", \" ERROR .\" + error.toString());\n }", "public void mo55177a() {\n this.f1453a.onError(this.f1454b);\n }", "private void error() {\n this.error = true;\n this.clients[0].error();\n this.clients[1].error();\n }", "@Override\n\tpublic void error(Marker marker, Message msg, Throwable t) {\n\n\t}", "@Override\n\tpublic void error(Marker marker, String message, Object p0) {\n\n\t}", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "@Override\n\t\t\tpublic void onException(Exception arg0) {\n\n\t\t\t}", "public abstract void OnError(int code);", "@Override\n public void onError(Throwable ex) {\n com.microblink.util.Log.e(this, ex, \"Error\");\n handleError();\n }", "public static void logGenericUserError() {\n\n }", "@Override\n\tpublic void error(Message msg) {\n\n\t}", "@Override\r\n\t\t\tpublic void onNetworkError(NetworkError networkError) {\n\r\n\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void onCheckUpdateFail(ErrorInfoBean errorInfo) {\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"errInfo:\" + errorInfo.toString());\r\n\t\t\t\t\t\t\tTypeSDKLogger.e(\"init_fail\");\r\n\t\t\t\t\t\t}", "@Override\n\tpublic void onError(ErrorResponse errorResponse) {\n\t\t\n\t}", "@Override\n public void onProcessError(Object item, Exception e) {\n logger.error(\"onProcessError\");\n }", "@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}", "private void sendOldError(Exception e) {\n }", "@Override\n public void onError() {\n Toast.makeText(getApplicationContext(), \"아이디랑 비밀번호를 확인해 주세요.\", Toast.LENGTH_LONG).show();\n }", "@Override\n\t\t\tpublic void onError(DialogError e) {\n\n\t\t\t}", "@Override\n\tpublic void error(Marker marker, CharSequence message) {\n\n\t}", "@Override\n\t\tprotected boolean onError(final Exception e) {\n\t\t\treturn false;\n\t\t}", "@Override\n\tpublic void error(Marker marker, Object message, Throwable t) {\n\n\t}", "@Override\n public void onFailure(Exception error) {\n }" ]
[ "0.7402682", "0.7323598", "0.7112806", "0.70631367", "0.69188875", "0.69188875", "0.68919945", "0.6860858", "0.68150896", "0.6807608", "0.6753464", "0.6750571", "0.67282486", "0.6711552", "0.668389", "0.66790783", "0.66728264", "0.6661756", "0.6656171", "0.66162264", "0.66075873", "0.66033643", "0.66025734", "0.65805304", "0.6561135", "0.65499973", "0.65394515", "0.65358365", "0.6531835", "0.65269274", "0.65141946", "0.6511303", "0.65009874", "0.64897496", "0.6475259", "0.64745384", "0.64597243", "0.6453426", "0.64523846", "0.6442947", "0.6436486", "0.64339244", "0.64339244", "0.6428437", "0.6425116", "0.64179975", "0.64159286", "0.6410687", "0.6410315", "0.63833696", "0.6366814", "0.63659436", "0.636027", "0.63567775", "0.6354323", "0.63502866", "0.6342703", "0.6337625", "0.6331834", "0.63317317", "0.63302517", "0.6325031", "0.63240206", "0.63240206", "0.63229895", "0.6322532", "0.6321044", "0.6312759", "0.6308488", "0.630637", "0.6305338", "0.6304996", "0.6292656", "0.62920207", "0.62920207", "0.62912655", "0.6282288", "0.62805784", "0.6275424", "0.62738144", "0.6257063", "0.62570226", "0.62534887", "0.62527037", "0.6251433", "0.6250658", "0.6245489", "0.62347645", "0.62312734", "0.6228586", "0.6224827", "0.6224446", "0.62148947", "0.6207176", "0.6202924", "0.61981636", "0.619531", "0.61895484", "0.6187631", "0.61836296", "0.61834115" ]
0.0
-1
Tao moi de binding sang view
@ModelAttribute("user") public UserRegistration userRegistration() { return new UserRegistration(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void bindingView();", "@Override\n\tpublic void InitView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView()\n\t{\n\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n\n TextView name = (TextView) view.findViewById(R.id.label3nazwa);\n TextView date = (TextView) view.findViewById(R.id.label1data);\n TextView type = (TextView) view.findViewById(R.id.label2typ);\n TextView value = (TextView) view.findViewById(R.id.label4wartosc);\n // Extract properties from cursor\n String nazwa = cursor.getString(cursor.getColumnIndexOrThrow(\"nazwa\"));\n String typ_id = cursor.getString(cursor.getColumnIndexOrThrow(\"typ_id\"));\n String data = cursor.getString(cursor.getColumnIndexOrThrow(\"data\"));\n String wartosc = cursor.getString(cursor.getColumnIndexOrThrow(\"wartosc\"));\n // Populate fields with extracted properties\n name.setText(nazwa);\n date.setText(data);\n type.setText(typ_id);\n value.setText(wartosc);\n }", "@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}", "public void initView(){}", "@Override\n protected void initView() {\n }", "@Override\n protected void initView() {\n }", "@Override\n public void prepareView() {\n }", "@Override\n\tpublic void view() {\n\t\t\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\n public void initView() {\n\n }", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n TextView tanggal = (TextView) view.findViewById(R.id.tanggal);\n TextView Pemasukan = (TextView) view.findViewById(R.id.Dana);\n TextView keterangan = (TextView) view.findViewById(R.id.keterangan);\n // Read the pet attributes from the Cursor for the current pet\n String editTanggal = cursor.getString(cursor.getColumnIndex(tabeldb.listtabeldb.COL_1_Pemasukan));\n double editPemasukan = cursor.getInt(cursor.getColumnIndex(tabeldb.listtabeldb.COL_2_Pemasukan));\n String editKeterangan= cursor.getString(cursor.getColumnIndex(tabeldb.listtabeldb.COL_3_Pemasukan));\n\n // Update the TextViews with the attributes for the current pet\n DecimalFormat decim = new DecimalFormat(\"#,###.##\");\n tanggal.setText(editTanggal);\n Pemasukan.setText(decim.format(editPemasukan));\n keterangan.setText(editKeterangan);\n }", "@Override\n public void initView() {\n }", "private void viewInit() {\n }", "public ViewSinFaltante() {\n initComponents();\n }", "public viewOpe() {\n initComponents();\n }", "private void initView() {\n\n }", "public ViewDetallesPagos () {\r\n\r\n }", "public ViewKorisnik() {\n initComponents();\n obrada = new ObradaKorisnik();\n }", "private void bindView() {\n mToolbar = (Toolbar) findViewById(R.id.tb_main);\n mMainLayout = (CoordinatorLayout) findViewById(R.id.crdl_main);\n mProgressDialog = (AVLoadingIndicatorView) findViewById(R.id.avi_progress_dialog);\n mPersonsView = (RecyclerView) findViewById(R.id.rv_persons);\n mPersonsView.setLayoutManager(new LinearLayoutManager(context));\n }", "public ViewUsluga() {\n initComponents();\n obrada = new ObradaUsluga();\n postInitComponents(); \n }", "private void bindViewsById(View view) {\n mViewPager = (ViewPager) view.findViewById(R.id.pager);\n mViewPager.setOffscreenPageLimit(1);\n mTabLayout = (TabLayout) view.findViewById(R.id.tab_layout);\n\n // mTvNoFavAvail = (TextView) view.findViewById(R.id.tv_no_fav_available);\n // mTvNoInternet = (TextView) view.findViewById(R.id.tv_no_internet_available);\n }", "public ViewDetalleVentas() {\n initComponents();\n }", "public PhanQuyen_View() {\n initComponents();\n }", "public void initView() {\n\t\t view.initView(model);\t \n\t }", "private void initViews() {\n\n\t}", "public void initViews(){\n }", "@Override\n\tpublic View bindView() {\n\t\treturn null;\n\t}", "public void verHistorialCitas(View view){\n\n }", "@Override\n public void onViewCreate() {\n }", "public ViewGadai() {\n initComponents();\n gc = new GadaiController();\n datas= gc.bindingAll(TBLGadai, header);\n gc.loadCustomer(cmbCust);\n gc.loadBarang(cmbBrg);\n// gc.loadHistory(cmbStatus);\n reset();\n }", "private void initViews() {\n\n }", "private void bindViews() {\n\n xlv_postlist = (com.mrz.searchenginefortieba.view.XListView) findViewById(R.id.xlv_postlist);\n }", "@Override\n\tprotected void RefreshView() {\n\t\t\n\t}", "public abstract View mo2155b();", "public interface MagestoreView<TController extends Controller> {\n /**\n * Chỉ định controller\n * @param controller\n */\n void setController(TController controller);\n TController getController();\n\n void showErrMsgDialog(String strMsg);\n\n void showErrMsgDialog(Exception exp);\n\n void showErrorMsgWithReload(String strMsg);\n\n void showErrorMsgWithReload(Exception exp);\n\n /**\n * Hiện thông báo lỗi\n * @param msg\n */\n void showErrorMsg(String msg);\n void showErrorMsg(Exception exp);\n\n void hideErrorMsg(Exception exp);\n\n /**\n * Hiển thị tiến trình\n * @param blnShow\n */\n void showProgress(boolean blnShow);\n\n void showProgressLoadRefresh(boolean show);\n\n void showProgressLoadingMore(boolean show);\n\n void hideAllProgressBar();\n\n void initModel();\n\n void initValue();\n\n // hiện thông báo lỗi\n void showWarning(String strMsg);\n void hideWarning();\n\n ModelView createModelView(Model model);\n}", "private void setViews() {\n\n }", "@Override\n\tprotected void refreshView() {\n\t\t\n\t}", "private void bindViews(View view) {\n progress = view.findViewById(R.id.progress_bar);\n msn = (EditText) view.findViewById(R.id.msn);\n }", "public InscricaoView() {\n initComponents();\n\n controller.carregarInscricoes();\n controller.carregarOficinas();\n controller.carregarPessoas();\n\n doBindings();\n firstButton.doClick();\n }", "public NapakalakiView() {\n initComponents();\n }", "@Override\n\tprotected int initView() {\n\t\treturn R.layout.activity_zhusu_detail;\n\t}", "public ViewRentas() {\n initComponents();\n }", "@Override\n public void bindView(View view, Context context, Cursor cursor) {\n // Find fields to populate in inflated template\n TextView Ename = (TextView) view.findViewById(R.id.Ename);\n TextView Designation = (TextView) view.findViewById(R.id.Designation);\n TextView Salary = (TextView) view.findViewById(R.id.Salary);\n // Extract properties from cursor\n String ename = cursor.getString(cursor.getColumnIndexOrThrow(\"ename\"));\n String designation = cursor.getString(cursor.getColumnIndexOrThrow(\"designation\"));\n int salary = cursor.getInt(cursor.getColumnIndexOrThrow(\"salary\"));\n\n ImageView imgView =(ImageView)view.findViewById(R.id.ImageView01);\n\n\n imgView.setImageResource(R.drawable.ic_launcher);\n\n\n\n\n\n // Populate fields with extracted properties\n Ename.setText(ename);\n Designation.setText(designation);\n Salary.setText(String.valueOf(salary));\n }", "public ViewDataIn() {\n initComponents();\n }", "@Override\n\tprotected void initViews(View view) {\n\t\tsuper.initViews(view);\n//\t\tsendRequestData();\n\t}", "@Override\n protected void bindViews(View view) {\n viewModel = new ViewModelProvider(this).get(ShareViewModel.class);\n observeViewModel();\n\n atvToUsers.setHint(getString(R.string.select_users));\n atvCcUser.setVisibility(View.GONE);\n llSharedUsers.setVisibility(View.GONE);\n btnShare.setText(getString(R.string.issue_doc));\n\n if (getArguments() != null) {\n item = getArguments().getParcelable(\"data\");\n }\n }", "void updateViewFromModel();", "public interface StockTransferByAllocationView extends MvpView {\n\n void initViewPage(List<StockTransferWithAllocationSnBo> stockTransferWithAllocationSnBoList,int originDataSize, boolean isRefresh,int position);\n\n void dealPosition(List<StockTransferWithAllocationSnBo> stockTransferWithAllocationSnBo, int position,int size);\n\n}", "void view();", "interface RedeemView extends BaseView {\n\n void LoadingReddemData (List<RedeemResponse> redeemResponses );\n void hide_refreshView();\n void show_errorView(boolean Isshow , String error);\n}", "protected void bindViews(){\n ButterKnife.bind(this);\n }", "public interface RelationActivityView extends BaseIView {\n void setFrientData(FrientBaen frientBaen);\n// void setPingBiData(PingbiBean pingBiBaen);\n}", "@Override\n\tpublic void setView(Resultado resultado, HttpServletRequest request, HttpServletResponse response) {\n\n\t}", "public View(String frmWel) {\n super(\"View Data\");\n initComponents();\n con=javaconnect.ConnecrDb();\n nameField.setText(frmWel);\n updateTable();\n \n }", "public void bind(SitesModel model){\n if(model.getState().equals(\"1\")){\n tv_state.setText(R.string.state_alert);\n tv_state.setTextColor(Color.RED);\n }else if (model.getState().equals(\"0\")){\n tv_state.setText(R.string.state_ok);\n tv_state.setTextColor(Color.GREEN);\n }\n\n tv_name.setText(model.getName());\n tv_direccion.setText(model.getDireccion());\n //tv_state.setText(model.getState());\n }", "@Override\n\tpublic void refreshView() {\n\n\t}", "public AlunoView() {\n initComponents();\n bus = new AlunoBus();\n }", "@Override\n\tpublic void viewItem() {\n\t\t\n\t}", "private void registerViews() {\n\t}", "public abstract void initView();", "private void loadViews(){\n\t}", "protected abstract void initView();", "void initView();", "public interface ViewChiTietBenh {\n void LayChiTietBenhThanhCong(BenhModel benh, Uri uri);\n void LayChiTietBenhThatBai();\n\n}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_data_diri, container, false);\n ButterKnife.bind(this, view);\n\n grosirMobilPreference = new GrosirMobilPreference(getActivity());\n grosirMobilFunction = new GrosirMobilFunction(getActivity());\n\n etFullName.setFilters(new InputFilter[] {new InputFilter.AllCaps()});\n\n etFullName.setText(grosirMobilPreference.getFullName());\n etPhoneNumber.setText(grosirMobilPreference.getPhoneNumber());\n\n stepView.go(0, true);\n\n Nson nson = Nson.readJson(UtilityAndroid.getSetting(\"daftar\") ) ;\n etNik.setText(nson.get(\"datadiri-nik\").asString());\n etFullName.setText(nson.get(\"datadiri-fullname\").asString());\n\n\n return view;\n }", "public interface CountryView extends MvpView {\n /**\n * show loading status\n * @param loading loading status should be visible or not\n */\n void showLoading(boolean loading);\n\n /**\n * if there is an error,show the related message about the error\n * @param errorMessage\n */\n void showError(String errorMessage);\n\n /**\n * show the facts of country\n * @param facts\n */\n void showFacts(List<Fact> facts);\n\n /**\n * show the title of the country\n * @param title\n */\n void showTitle(String title);\n\n}", "StableView view();", "@FXML\n\tpublic void abrirSobre(){\n\t}", "public void tampilNama(View view) {\n Intent ganti = new Intent(this, ListNamaMahasiswa.class);\n //memulai activity ke list nama mahasiswa\n startActivity(ganti);\n }", "public PromedioView() {\n initComponents();\n }", "void updateView();", "void updateView();", "public interface NewBookView extends BaseView{\n void initData(List<NewBookBean> data);\n void showLoading();\n void showLoaded();\n}", "public RegistraEntradaSaidaView() {\n initComponents();\n }", "@Override\n\t public void bindView(View view, Context context, Cursor cursor) {\n\t //final String text = convertToString(cursor);\n\t //((TextView) view).setText(text);\n\t final int itemColumnIndex = cursor.getColumnIndexOrThrow(ItemsDbAdapter.COL_WORD);\n\t TextView text1 = (TextView) view.findViewById(R.id.text1);\n\t text1.setText(cursor.getString(itemColumnIndex));\n\t }", "@Override\r\n\t\tpublic void bindView(View view, Context context, Cursor c) {\n\t\t\tSystem.out.println(\"View ForecastAdapter\");\r\n\t\t\tImageView icon = (ImageView) view.findViewById(R.id.dDetailImage);\r\n\t\t\tTextView day = (TextView) view.findViewById(R.id.ddDayText);\r\n\t\t\tTextView condition = (TextView) view.findViewById(R.id.ddConditionText);\r\n\t\t\tTextView temp = (TextView) view.findViewById(R.id.ddTempCText);\r\n\r\n\t\t\ticon.setImageResource(WeatherUtil.getDetailForecastIcon(c.getString(4)));\r\n\t\t\tday.setText(c.getString(1));\r\n\t\t\tcondition.setText(c.getString(5));\r\n\t\t\ttemp.setText(c.getInt(2) + \"íŠ/\" + c.getInt(3) + \"íŠ\");\r\n\t\t}", "@Override\r\n\tpublic void bindView(View view, Context context, Cursor cursor) {\n\t\t\r\n\t}", "public abstract void initViews();", "@Override\n protected void iniView()\n {\n txtHead = (TextView) findViewById(R.id.txtHead);\n imgBack = (ImageView) findViewById(R.id.img_left);\n\n txtHead.setText(\"回复列表\");\n\n TopicID = this.getIntent().getExtras().getString(\"TopicID\").toString();\n LeftID = this.getIntent().getExtras().getString(\"LeftID\").toString();\n listview = (ListView) findViewById(R.id.listview_postlist);\n TopicType = this.getIntent().getExtras().getString(\"TopicType\").toString();\n }", "@Override\n\tpublic void initView() {\n\t\tmylis_show.setTitleText(\"我的物流\");\n\t\tlistView = mylis_listview.getRefreshableView();\n\t\t\n\t}", "@Override\n protected void initViewModel() {\n }", "public ListBahanKosong_View() {\n initComponents();\n controller = new ListBahanKosong_Controller(this);\n controller.isiTabel();\n controller.Item();\n controller.ItemLow();\n controller.ItemOut();\n model = (DefaultTableModel)tbl_data.getModel();\n setExtendedState(JFrame.MAXIMIZED_BOTH);\n }", "@Override\r\n\tpublic void updateView(List<Pays> models) {\n\t}", "@Override\n protected void initView() {\n ButterKnife.bind(this);\n }", "public void displayData(View view) {\n\n }", "void mo12147a(View view);", "private void bindViews() {\n txt_home = (TextView) findViewById(R.id.txt_home);\n txt_progress = (TextView) findViewById(R.id.txt_progress);\n txt_community = (TextView) findViewById(R.id.txt_community);\n txt_profile = (TextView) findViewById(R.id.txt_profile);\n\n txt_home.setOnClickListener(this);\n txt_progress.setOnClickListener(this);\n txt_community.setOnClickListener(this);\n txt_profile.setOnClickListener(this);\n }", "private void bindView() {\n\n\t\tfindViewById(R.id.issue_feedback_container).addOnLayoutChangeListener(\n\t\t\t\tnew OnLayoutChangeListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onLayoutChange(View v, int left, int top,\n\t\t\t\t\t\t\tint right, int bottom, int oldLeft, int oldTop,\n\t\t\t\t\t\t\tint oldRight, int oldBottom) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tint addItem = bottom - oldBottom;\n\t\t\t\t\t\tif (addItem > 0 && oldBottom > 0) {\n\t\t\t\t\t\t\tScrollView scrollView = (ScrollView) findViewById(R.id.container);\n\t\t\t\t\t\t\tLog.i(TAG, \"deltaHeight=\" + addItem + \";bottom=\"\n\t\t\t\t\t\t\t\t\t+ bottom + \";oldBottom=\" + oldBottom);\n\t\t\t\t\t\t\tscrollView.scrollBy(0, addItem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tissueDescView = (UserInputItemView) findViewById(R.id.issue_desc);\n\t\tissueTopic = (EditItemView) findViewById(R.id.issue_topic);\n\t\taddFile = (AddItemView) findViewById(R.id.issue_add_file);\n\t\tsolverMan = (ChooseItemView) findViewById(R.id.issue_choose_deliver);\n\t\tsolverMan.setContent(\"选择解决人\");\n\t\taddPerson = (AddItemView) findViewById(R.id.issue_add_person);\n\t\taddPerson.setVisibility(View.GONE);\n\t\tsolverMan.setChooseItemClickListener(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\tgetDeliveryList(true, solverMan);\n\t\t\t}\n\t\t});\n\n\t\taddFile.setOnCreateItemViewListener(addfileListenr);\n\t\taddPerson.setOnCreateItemViewListener(addfoucsPersonCreateListenr);\n\n\t}", "private void addViews() {\n\t}", "public String getView();", "public String getView();" ]
[ "0.7084827", "0.681301", "0.6768624", "0.6768624", "0.67242175", "0.6695092", "0.6695092", "0.6544469", "0.65393794", "0.65393794", "0.65348893", "0.65177876", "0.65079045", "0.6492496", "0.6492496", "0.6451732", "0.6425546", "0.6419384", "0.6419384", "0.64064854", "0.64010555", "0.6400305", "0.6382426", "0.6374428", "0.6371848", "0.6308964", "0.6291604", "0.6287373", "0.62533534", "0.62505144", "0.62385786", "0.6232456", "0.62210906", "0.6217888", "0.6196393", "0.6175929", "0.61567646", "0.61559784", "0.61398596", "0.6126132", "0.6123054", "0.60894173", "0.60874784", "0.6080867", "0.6078179", "0.6064395", "0.60553", "0.60450363", "0.6042281", "0.60350454", "0.60295165", "0.6024224", "0.6017112", "0.6015158", "0.6004486", "0.5987287", "0.5983236", "0.5981653", "0.59783906", "0.59653294", "0.59649676", "0.5954735", "0.59370476", "0.5936338", "0.59317577", "0.5928083", "0.5927218", "0.5918025", "0.59099627", "0.59094363", "0.5892944", "0.5891812", "0.5889412", "0.5884838", "0.58847576", "0.5883339", "0.5882432", "0.58796334", "0.58779234", "0.5875107", "0.58693236", "0.58693236", "0.58669233", "0.5865901", "0.585052", "0.5845838", "0.5844582", "0.5843152", "0.5835175", "0.5835138", "0.58334285", "0.58331907", "0.5831339", "0.58299327", "0.5829533", "0.5828947", "0.58256996", "0.5824594", "0.58059466", "0.5802278", "0.5802278" ]
0.0
-1
Joe Schmoe plugged an xbox controller into port 1
public void autonomous() { robot.drive(0.5); //Drives in a square Timer.delay(0.5); robot.tankDrive(0.5, -0.5); Timer.delay(0.25); robot.drive(0.5); Timer.delay(0.5); robot.tankDrive(0.5, -0.5); Timer.delay(0.25); robot.drive(0.5); Timer.delay(0.5); robot.tankDrive(0.5, -0.5); Timer.delay(0.25); robot.drive(0.5); Timer.delay(0.5); robot.tankDrive(0.5, -0.5); Timer.delay(0.25); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public XboxController(int port) {\n \tthis(port, 0, 0);\n }", "public XboxController(int port) {\n\t\tthis(10,port);\n\t}", "public void notifyControllerStart(int port);", "int getS1Port();", "public XboxJoystick1038(int port) {\n\t\tsuper(port);\n\t}", "public XboxController(int port,double leftDeadZone, double rightDeadZone){\n \tdeadZoneLeft = leftDeadZone * leftDeadZone;\n \tdeadZoneRight = rightDeadZone * rightDeadZone;\n \tdStation = DriverStation.getInstance();\n \tthis.port=port;\n for(int ii=0;ii<10;ii++){\n \tbuttons[ii]=new Button();\n }\n refresh();\n Buttons=new ButtonRemap();\n buttonCount=dStation.getStickButtonCount(port);\n }", "@FXML\r\n void connectSerialPort() {\r\n try {\r\n String comPort;//numer portu com\r\n comPort = comPortTextField.getText();//pobranie wpisanej nazwy port z poal tekstowego\r\n if(correctnessGuard.isComportCorrect(comPort)) {//sprawdzenie poprawnosci\r\n serialConnection.openSerialConnection(comPort);//proba nawiazania polaczenia\r\n if(isConnectionReady) {//sprawdzenie czy polaczenie zostalo pomyslnie utworzone\r\n serialConnection.sendMessage(\"AT\");//wysłanie komendy sprawdzającej poprawnośc nawiązanego połączenia z modułem\r\n Thread.sleep(commandDelay);//uspanie aplikacji na x milisekund\r\n showAnswer(serialConnection.getAnswerBufor());//wyswietlenie otrzymanych wiadomosci\r\n if(correctnessGuard.checkAnswer(serialConnection.getAnswerBufor(), \"\\r\\nOK\\r\\n\")) {//sprawdzenie, czy poprawnie nawiazano polaczenie\r\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"/Resources/aplication.fxml\"));//zaladowanie parametrow okna z pliku fxml\r\n //Parent root = fxmlLoader.load();//zaladowanie danych do roota\r\n Parent root = FXMLLoader.load(getClass().getResource(\"/Resources/aplication.fxml\"));\r\n root.setId(\"myroot\");//ustwaienie id w celu identyfikacji w roota w pliku css\r\n Stage stage = new Stage();//nowy stejdż\r\n stage.setTitle(\"BEE - Simple aplication for sending phone messages\");//przypisanie nazwy okna\r\n Scene scene = new Scene(root);//stworzenie sceny\r\n stage.setScene(scene);//ustawienie zaladowanego okna\r\n stage.setResizable(false);//wylaczenie mozliwosci zmian rozmiarow\r\n stage.getIcons().add(new Image(\"file:\"+getClass().getResource(\"/Resources/connection.png\").getPath()));//ustawienie icony okna\r\n stage.show();//wyswietlenie okna\r\n stage.setOnCloseRequest((WindowEvent event_2) ->{//ustawienie zdarzenia na zamkniecie okna\r\n closeMainStage();//wywoloanie nizej zdefiniowanej metody\r\n });\r\n primaryStage.close();//zamkniecie poprzedniego stejdżu - okna nawiązywania połaczenia\r\n serialConnection.clearAnswerBufor();//wyczyszczenie bufora wiadomosci\r\n mainStage = stage;//przypisanie stowrzonego stage do stalej\r\n }else{\r\n JOptionPane.showMessageDialog(new JFrame(), \"Komenda AT zgłosiła błąd - niepoprawna odpowiedź modułu!\", \"Controller Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n }\r\n }catch(IOException er){\r\n System.out.println(er);\r\n JOptionPane.showMessageDialog(new JFrame(), \"Błąd wejścia/wyjścia w kontrolerze okna połączeniowego!\", \"Controller Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }catch(Exception e){\r\n JOptionPane.showMessageDialog(new JFrame(), \"Niespodziewany błąd w kontrolerze okna połączeniowego!\", \"Controller Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n System.out.println(e);\r\n }\r\n }", "public XboxController(int numberOfButtons, int port) {\n\t\tjoystick = new Joystick(port);\n\t\t\n\t\tfor(int i = 0; i < numberOfButtons; i++) {\n\t\t\tbutton = Arrays.copyOf(button, button.length+1);\n\t\t\tbutton[button.length-1] = new JoystickButton(joystick,i);\n\t\t}\n\t}", "public void start(){\r\n \t\ttry{\r\n \t\t\t_auditorium = new VoteBoxAuditoriumConnector(_mySerial,\r\n \t\t\t\t\tAuditoriumParams.Singleton,\r\n \t\t\t\t\tCommitBallotEvent.getMatcher(),\r\n \t\t\t\t\tCastCommittedBallotEvent.getMatcher(),\r\n \t\t\t\t\tChallengeEvent.getMatcher(),\r\n \t\t\t\t\tAuthorizedToCastWithNIZKsEvent.getMatcher(),\r\n \t\t\t\t\tAdderChallengeEvent.getMatcher()\r\n \t\t\t\t\t);\r\n \t\t}catch(NetworkException e){\r\n \t\t\tthrow new RuntimeException(\"Unable to connect to Auditorium: \"+e.getMessage(), e);\r\n \t\t}//catch\r\n \t\t\r\n \t\t_auditorium.addListener(new VoteBoxEventListener(){\r\n \t\t\tpublic void ballotCounted(BallotCountedEvent e){\r\n \t\t//NO-OP\r\n \t}\r\n \t\t\t\r\n \t\t\tpublic void castBallot(CastBallotEvent e) {\r\n \t\t\t\tforward(e);\r\n \t\t\t}\r\n \t\t\tpublic void challenge(ChallengeEvent e) {\r\n \t\t\t\tforward(e);\r\n \t\t\t}\r\n \t\t\tpublic void commitBallot(CommitBallotEvent e) {\r\n \t\t\t\tforward(e);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\t//Ignored events\r\n \t\t\tpublic void activated(ActivatedEvent e) {}\r\n \t\t\tpublic void assignLabel(AssignLabelEvent e) {}\r\n \t\t\tpublic void authorizedToCast(AuthorizedToCastEvent e) {}\r\n \t\t\tpublic void ballotReceived(BallotReceivedEvent e) {}\r\n \t\t\tpublic void challengeResponse(ChallengeResponseEvent e) {}\r\n \t\t\tpublic void joined(JoinEvent e) {}\r\n \t\t\tpublic void lastPollsOpen(LastPollsOpenEvent e) {}\r\n \t\t\tpublic void left(LeaveEvent e) {}\r\n \t\t\tpublic void overrideCancel(OverrideCancelEvent e) {}\r\n \t\t\tpublic void overrideCancelConfirm(OverrideCancelConfirmEvent e) {}\r\n \t\t\tpublic void overrideCancelDeny(OverrideCancelDenyEvent e) {}\r\n \t\t\tpublic void overrideCast(OverrideCastEvent e) {}\r\n \t\t\tpublic void overrideCastConfirm(OverrideCastConfirmEvent e) {}\r\n \t\t\tpublic void overrideCastDeny(OverrideCastDenyEvent e) {}\r\n \t\t\tpublic void pollsClosed(PollsClosedEvent e) {}\r\n \t\t\tpublic void pollsOpen(PollsOpenEvent e) {}\r\n \t\t\tpublic void pollsOpenQ(PollsOpenQEvent e) {}\r\n \t\t\tpublic void supervisor(SupervisorEvent e) {}\r\n \t\t\tpublic void votebox(VoteBoxEvent e) {}\r\n public void ballotscanner(BallotScannerEvent e) {}\r\n public void ballotScanned(BallotScannedEvent e) {}\r\n\t\t});\r\n \t\t\r\n \t\ttry{\r\n \t\t\tSystem.out.println(\"Connecting to auditorium...\");\r\n \t\t\t_auditorium.connect();\r\n \t\t}catch(NetworkException e){\r\n \t\t\tthrow new RuntimeException(\"Unable to connect to Auditorium network: \"+e.getMessage(), e);\r\n \t\t}//catch\r\n \t}", "public static void main(String[] args) {\n\t\tfinal Device lamp = new Device(\"Lamp\", \"Lamp\",\"Lamp\" ,\"img/lamp.png\");\r\n\t\t\r\n\t\t//2. Register the 2 functions\r\n\t\tlamp.registerFunction(\"SwitchOn\", \"Function exposed to server\");\r\n\t\tlamp.registerFunction(\"SwitchOff\", \"Function exposed to server for switching off the device\");\r\n\t\t\r\n\t\t//3. Set the type of communication layer. In this case it is a java implementation of websocket.\r\n\t\t//Depending the environment the driver is running, other implementation of the websocket layer can be injected\r\n\t\tlamp.setWebsocketLayer(new JavaWebsocketLayer(lamp));\r\n\t\t\r\n\t\t//a simple text label to display if lamp is on or off.\r\n\t\t//in a real lamp, instead displaying a label, the microcontroller will send an electric signal to a switch\r\n\t\tfinal JLabel state = new JLabel();\r\n\t\t\r\n\t\t//4. Add function handlers to execute the captured events\r\n\t\t//this implementation of the handler simply diplays Switched on or Switched off\r\n\t\tlamp.addFunctionHandler(new FunctionHandler() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void execute(String name, Map<String, String> input) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\t\tif(name.equals(\"SwitchOn\")){\r\n\t\t\t\t\t\tstate.setIcon(new ImageIcon(new URL(\"http://72.13.93.222:8080/hatzouf/img/light-on.png\")));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tstate.setIcon(new ImageIcon(new URL(\"http://72.13.93.222:8080/hatzouf/img/light-off.png\")));\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//5. This handler is executed when the device is connected and ready for use.\r\n\t\tlamp.onReady(new OnReady() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void ready() {\r\n\t\t\t\tJFrame frame = new JFrame(\"Lamp\");\r\n\t\t\t\tframe.getContentPane().add(state, BorderLayout.NORTH);\r\n\t\t\t\tframe.setSize(300, 275);\r\n\t\t\t\tframe.setVisible(true);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\t//6. connect the device to the hatzouf server\r\n\t\tlamp.connect(\"ws://72.13.93.222:8080/hatzouf/websockets/iot\");\r\n\t\t\r\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 // camera stuff\n robotCamera = CameraServer.getInstance();\n robotCamera.setQuality(50);\n robotCamera.startAutomaticCapture(\"cam0\");\n\n //our robot stuff\n // myChassis\t= new RobotDrive(0,1);\n leftSide\t= new VictorSP(1);\n rightSide\t= new VictorSP(0);\n spinWheels\t= new TalonSRX(2);\n armLifty\t= new TalonSRX(3);\n drivePad\t= new Joystick(0);\n statesPad\t= new Joystick(1);\n LiveWindow.addActuator(\"stud\", \"talonsrx\", armLifty);\n \n //arm position stuff\n armPosition\t\t= new AnalogInput(0);\n armPortSwitch\t= new DigitalInput(0);\n \n //solenoid stuff\n //solenoidThing = new Solenoid(1);\n \n //init button states\n lBPX\t\t\t= false;\n bIPX\t\t\t= false;\n \n //driver buttons\n ballSpitButton\t= 4;\n ballSuckButton\t= 2;\n \n //state machine variables\n defaultState\t\t= 0;\n portState\t\t\t= 1;\n chevellState\t\t= 2;\n ballGrabState\t\t= 10;\n driveState\t\t\t= 11;\n lowBarState\t\t\t= 8;\n rockState\t\t\t= driveState;\n roughState\t\t\t= driveState;\n moatState\t\t\t= driveState;\n rampartState\t\t= driveState;\n drawState\t\t\t= driveState;\n sallyState\t\t\t= driveState;\n liftOverride\t\t= 0.09;\n terrainStates\t\t= 0;\n autoLiftSpeed\t\t= 1.0;\n armLiftBuffer\t\t= 0.01;\n //port state variables\n portPosition1\t\t= 1.7;\n portPosition2\t\t= 0.9;\n portSwitch\t\t\t= 0;\n //chevell state variables\n chevellPosition1\t= 1.135;\n chevellPosition2\t= 2.0;\n chevellSwitch \t\t= 0;\n chevellWheelSpeed\t= 0.3;\n //ball grab state variables\n ballGrabPosition1\t= 1.35;\n ballGrabSwitch\t\t= 0;\n ballGrabWheelSpeed\t= -0.635;\n ballSpitWheelSpeed\t= 1.0;\n //lowbar state variables\n lowBarPosition\t\t= 1.6;\n lowBarSwitch\t\t= 0;\n //drive state variables\n driveSwitch\t\t\t= 1;\n \n }", "@Override\n\tpublic void installEngine() {\n\t\tSystem.out.println(\"2200CCBus\");\n\t}", "private void connect() {\n\t\tString portName = deviceLocation.getText();\n\n\t\t// Check the Bandwidth SelectionBox and convert them:\n\t\tint bandWidthIndex = bandWidthList.getSelectedIndex();\n\t\tswitch (bandWidthIndex) {\n\t\tcase 0:\n\t\t\tbandRate = 9600;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tbandRate = 19200;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tbandRate = 38400;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tbandRate = 57600;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tbandRate = 115200;\n\t\t\tbreak;\n\t\t}\n\n\t\t// System Print Line: Connection information:\n\t\tlog.write(\"##############################\");\n\t\tlog.write(\"System Message: Trying to connect to:\" + portName\n\t\t\t\t+ \" with \" + bandRate + \" Bandwidth\");\n\n\t\t// Try to connect gameUi Class with specific device location and\n\t\t// bandwidth:\n\t\tif (!gameUi.connectSerial(portName, bandRate, this.log)) {\n\n\t\t\t// If Connection fails, shows an Error Message\n\t\t\tlog.write(\"System Message: Fails to connect to:\"\n\t\t\t\t\t+ portName + \" with \" + bandRate + \" Bandwidth\");\n\t\t\tlog.write(\"##############################\");\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Can't connect to this device, please check again.\",\n\t\t\t\t\t\"Connection Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t} else {\n\n\t\t\t// If Connection Success, then hide this connection Ui and\n\t\t\t// Change into GameUi:\n\t\t\tlog.write(\"System Message: Connect to:\" + portName\n\t\t\t\t\t+ \" with \" + bandRate + \" Bandwidth Seccessesfully\");\n\t\t\tlog.write(\"##############################\");\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Device Connected, have fun! :)\",\n\t\t\t\t\t\"Connection Success\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\tthis.setVisible(false);\n\t\t\tgameUi.setVisible(true);\n\t\t}\n\n\t}", "public void transmit()\n { \n try\n {\n JSch jsch=new JSch(); //object that allows for making ssh connections\n //Log into the pi\n Session session=jsch.getSession(USERNAME, HOSTNAME, 22); //pi defaults to using port 22 \n session.setPassword(PASSWORD);\n session.setConfig(\"StrictHostKeyChecking\", \"no\"); //necessary to access the command line easily\n \n session.connect(1000);//connect to the pi\n \n Channel channel = session.openChannel(\"exec\");//set session to be a command line \n ((ChannelExec)channel).setCommand(this.command); //send command to the pi\n \n channel.setInputStream(System.in); \n channel.setOutputStream(System.out);\n //connect to the pi so the command can go through\n channel.connect(1000);\n }\n catch(Exception e)\n {\n JOptionPane.showMessageDialog(frame, \"Error connecting to infrared light\", \"Error Message\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@FXML\r\n public void checkComPorts(ActionEvent event) {\r\n SerialConnection.availablePorts();\r\n }", "public void updateController() {\n\t\tjoystickLXAxis = controller.getRawAxis(portJoystickLXAxis);\t\t//returns a value [-1,1]\n\t\tjoystickLYAxis = controller.getRawAxis(portJoystickLYAxis);\t\t//returns a value [-1,1]\n\t\tjoystickLPress = controller.getRawButton(portJoystickLPress);\t//returns a value {0,1}\n\t\t\n\t\t//right joystick update\n\t\tjoystickRXAxis = controller.getRawAxis(portJoystickRXAxis);\t\t//returns a value [-1,1]\n\t\tjoystickRYAxis = controller.getRawAxis(portJoystickRYAxis);\t\t//returns a value [-1,1]\n\t\tjoystickRPress = controller.getRawButton(portJoystickRPress);\t//returns a value {0,1}\n\t\t\n\t\t//trigger updates\n\t\ttriggerL = controller.getRawAxis(portTriggerL);\t\t//returns a value [0,1]\n\t\ttriggerR = controller.getRawAxis(portTriggerR);\t\t//returns a value [0,1]\n\t\t\n\t\t//bumper updates\n\t\tbumperL = controller.getRawButton(portBumperL);\t\t//returns a value {0,1}\n\t\tbumperR = controller.getRawButton(portBumperR);\t\t//returns a value {0,1}\n\t\t\n\t\t//button updates\n\t\tbuttonX = controller.getRawButton(portButtonX);\t\t//returns a value {0,1}\n\t\tbuttonY = controller.getRawButton(portButtonY);\t\t//returns a value {0,1}\n\t\tbuttonA = controller.getRawButton(portButtonA);\t\t//returns a value {0,1}\n\t\tbuttonB = controller.getRawButton(portButtonB);\t\t//returns a value {0,1}\n\t\t\n\t\tbuttonBack = controller.getRawButton(portButtonBack);\t//returns a value {0,1}\n\t\tbuttonStart = controller.getRawButton(portButtonStart);\t//returns a value {0,1}\n\t\t\n\t\t//toggle checks\n\t\ttankDriveBool = checkButton(buttonX, tankDriveBool, portButtonX);\t\t//toggles boolean if button is pressed\n\t\tfastBool = checkButton(buttonB, fastBool, portButtonB);\t\t\t\t\t//toggles boolean if button is pressed\n\t\t\n\t\t\n\t\t//d-pad/POV updates\n\t\tdPad = controller.getPOV(portDPad);\t\t//returns a value {-1,0,45,90,135,180,225,270,315}\n\n\t\t//d-pad/POV turns\n\t\tif (dPad != -1) {\n\t\t\tdPad = 360 - dPad; //Converts the clockwise dPad rotation into a Gyro-readable counterclockwise rotation.\n\t\t\trotateTo(dPad);\n\t\t}\n\t\t\n\t\tjoystickDeadZone();\n\t}", "@Override\n protected void execute() {\n Robot.jack.setJackMotor(Robot.oi.gamePad.getLeftJoystickY()/3);\n Robot.jack.setJackDriveMotor(Robot.oi.gamePad.getRightJoystickY()/3);\n \n SmartDashboard.putString(\"Currently Running Diagnostic\", \"Jack\");\n }", "int getSnPort();", "int getSnPort();", "protected void startRoboboApplication() {\n\n\n\n t.schedule(new startInterface(),(long)1000);\n\n try {\n robobo.getModuleInstance(IRemoteControlModule.class).suscribe(this);\n } catch (ModuleNotFoundException e) {\n e.printStackTrace();\n }\n\n\n// try {\n// interfaceModule.getRobInterface().resetPanTiltOffset();\n// } catch (InternalErrorException e) {\n// e.printStackTrace();\n// }\n\n\n }", "@Override\n\tpublic void run(){\n\t\t//int port = Integer.parseInt(Config.getKey(\"frontPort\"));\n\t\tlog.info(\"启动蓝斯出租车设备数据采集\");\n\t\t//int port=20011;\n\t\tint port=39990;\n\t\tCCSocketServer frontLZss=new CCSocketServer(port,new LZTAXI_Front_IChannelPipeline());\n\t\ttry {\n\t\t\tfrontLZss.run();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Action\n public void showSerialBox()\n {\n int answer;\n\n // Get current gateway settings\n String portName = swapDmt.getPortName();\n int portSpeed = swapDmt.getPortSpeed();\n\n SerialPanel serialPanel = new SerialPanel(portName, portSpeed);\n answer = JOptionPane.showConfirmDialog(null, serialPanel, \"Serial port\",\n JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);\n\n if (answer == JOptionPane.OK_OPTION)\n {\n portName = serialPanel.getPortName();\n if ((portSpeed = serialPanel.getPortSpeed()) < 0)\n {\n JOptionPane.showMessageDialog(null, \"Please enter a valid baud rate\");\n return;\n }\n swapDmt.setSerialParams(portName, portSpeed);\n }\n }", "public TestableJoystick(int port) {\n super(port);\n }", "public void drive(XboxController xb){\n this.left.drive(xb.getY(Hand.kLeft));\n this.right.drive(xb.getY(Hand.kRight));\n }", "abstract protected int PortToRunOn();", "public void connect(View view) {\n if (phoneNum.getText().toString().equals(\"\")) {\n Toast.makeText(getApplication(), \"Please enter a phone number\", Toast.LENGTH_SHORT).show();\n } else {\n phoneNum.setEnabled(false);\n HashMap<String, UsbDevice> usbDevices = usbManager.getDeviceList();\n if (!usbDevices.isEmpty()) {\n boolean keep = true;\n for (Map.Entry<String, UsbDevice> entry : usbDevices.entrySet()) {\n device = entry.getValue();\n int deviceVID = device.getVendorId();\n if (deviceVID == 0x2341)//Arduino Vendor ID\n {\n PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n usbManager.requestPermission(device, pi);\n keep = false;\n } else {\n connection = null;\n device = null;\n }\n\n if (!keep)\n break;\n }\n }\n }\n }", "ActorRef startHCD() {\n Component.HcdInfo testInfo = JComponent.hcdInfo(\n TromboneHCD.componentName,\n TromboneHCD.trombonePrefix,\n TromboneHCD.componentClassName,\n DoNotRegister, Collections.singleton(AkkaType), FiniteDuration.apply(1, TimeUnit.SECONDS)\n );\n\n return Supervisor.apply(testInfo);\n }", "void jbRegister_actionPerformed(ActionEvent e) {\n carrierPort = registerCarrierWithMasterServer(jtfCarCode.getText(),\n jtfCarName.getText(), carrierIP);\n logWriter = new LogWriter(\"c\" + carrierPort + \".log\");\n logWriter.writeLog(\"Registered with Master Server: \" + carrierIP + \":\" +\n carrierPort);\n messageListener = new CarrierMessageListener(carrierPort, zAdapt, this);\n\n this.setTitle(\"Carrier Agent at \" +\n new Integer(carrierPort).toString()); //changing title of frame\n jtfCarPort.setFont(new java.awt.Font(\"SansSerif\", 1, 14)); //setting fonts for port number to be bold\n jtfCarPort.setText(new Integer(carrierPort).toString()); //setting port number\n\n jmiExit.setEnabled(true); //now unregister & exit button is active. Default exit is now ainactive\n this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); //only unregister & exit menu item can close carrier\n jbRegister.setEnabled(false);\n jtfCarName.setEditable(false);\n jtfCarCode.setEditable(false);\n jtfMasterIP.setEditable(false);\n jtfMasterPort.setEditable(false);\n }", "public void robotInit() {\n ;\n System.out.println(\"robot_init\");\n liftJoystick = new Joystick(2);\n armJoystick = new Joystick(4);\n setEncoder(new Encoder(2, 3));\n getEncoder().setDistancePerPulse(8.0 * 3.14 / 360.0 / 2);\n compressor = new Compressor(1, 1);\n compressor.start();\n // cameraMount = new CameraMount(10,9);\n //File file = new File (\"WALT_output.txt\");\n displayIndex = 1;\n driverScreen = DriverStationLCD.getInstance();\n\n //sensor wiring was switche so I fixed it programming wise\n setLeft(new DigitalInput(12));\n if (getLeft() == null) {\n printToScreen(\"LEFT SENSOR [DigitalInput(12)] IS NULL!!\");\n } else {\n printToScreen(\"LEFT SENSOR [DigitalInput(12)] is initialized\");\n }\n\n middle = new DigitalInput(13);\n if (getMiddle() == null) {\n printToScreen(\"MIDDLE SENSOR [DigitalInput(13)] IS NULL!!\");\n } else {\n printToScreen(\"MIDDLE SENSOR [DigitalInput(13)] is initialized\");\n }\n\n right = new DigitalInput(14);\n if (getRight() == null) {\n printToScreen(\"RIGHT SENSOR [DigitalInput(14)] IS NULL!!\");\n } else {\n printToScreen(\"RIGHT SENSOR [DigitalInput(14)] INITIALIZED\");\n }\n\n demoMode = false;\n myDog = Watchdog.getInstance();\n myDog.setEnabled(true);\n myDog.setExpiration(1);\n joysticks = new TankControls(1, 3);//All channel values arbitrary at this point and may need to be changed.\n // xboxController = new XboxControls(3);//channel value\n //initializes pneumatics\n //int[] solenoidChannels=(4,5);\n int spikeChannel = 1;\n int pressureSwitch = 2;\n //pneumatics=new pneumaticSystem(solenoidChannels,spikeChannel,pressureSwitch, 120);\n\n //Arm constructor\n //currently the arm is controlling the drive motors- arm channels are 3,4\n int liftChannel = 3;\n int armChannel = 4;\n int solenoidChannelWrist = 1;\n int clawSolenoid = 2;\n int armGyroChannel = 2;\n arm = new Arm(liftChannel, armChannel, solenoidChannelWrist,\n clawSolenoid, armGyroChannel);\n //channel for gyro\n int gyroChannel = 1;\n\n //channels for camera initiation\n boolean usingCamera = true;\n int panMotorCamChannel = 9;\n int tiltCamChannel = 8;\n\n //channels for accelerators- may want multiple for multiple directions\n int accSlot = -1;\n\n setSensors(new SensorSet(gyroChannel, accSlot, usingCamera,\n tiltCamChannel, panMotorCamChannel));\n\n setRobotDrive(new TwoMotorDrive(1, 2, demoMode));\n getRobotDrive().setInvertedSide(true);//boolean is true to invert right, false for left\n\n //so that it doesn't return nulls- should not be started before re-creating Why do we initialize it here then?\n driveTask = new WaltLineTrack(false, false, this);\n armTask = arm.getNewGoToHeightInstance(2);\n armTask2 = arm.getNewGoToAngleInstance(135);\n }", "public OI(){\n driveStick = new Joystick(RobotMap.DRIVE_STICK);\n armStick = new Joystick(RobotMap.ARM_STICK);\n assoc(); \n }", "public void mo38896j() {\n Intent intent = new Intent(this.f30720S, ConnectService.class);\n this.f30720S.startService(intent);\n m50412n().bindService(intent, this.f30714J0, 1);\n C5665a aVar = this.f30723V;\n if (aVar != null && !aVar.isShowing()) {\n this.f30723V.show();\n }\n }", "public RobotContainer() {\n \n camServer = CameraServer.getInstance();\n driveCam = camServer.startAutomaticCapture(\"Driver View\", 0);\n driveCam.setResolution(160, 120);\n driveCam.setFPS(15);\n driveCam.setBrightness(50);\n // cameraThreader.start();\n\n leftJoy = new Joystick(LEFT_JOY_PORT);\n rightJoy = new Joystick(RIGHT_JOY_PORT);\n xbox = new XboxController(XBOX_PORT);\n\n //Set default drivetrain command to DriveWithJoysticks or xbox\n drivetrain.setDefaultCommand(xboxCommand);\n \n //For testing purposes, this will control simple one- or two-motor subsystems.\n genericSubsystem.setDefaultCommand(genericJoysticksCommand);\n \n //shooter.setDefaultCommand(shootCommand);\n //shooter.setDefaultCommand(turretCommand);\n\n\n // Configure the button bindings\n configureButtonBindings();\n }", "private void run()throws IOException{\r\n Port = portNumb(); \r\n}", "public void setTextPort(int port);", "public void xboxHatchControl()\n {\n if (RobotMap.assistantDriverController.getStartButtonPressed())\n {\n RobotMap.hatchHolderTalon.set(0);\n }\n if (RobotMap.assistantDriverController.getBumperPressed(Hand.kLeft))\n {\n if (RobotMap.hatchHolderHasHatch)\n new ReleaseHatchCommand().start();\n else\n new GrabHatchCommand().start();\n RobotMap.hatchHolderHasHatch = !RobotMap.hatchHolderHasHatch;\n }\n }", "public static void main(String[] args) {\n\t\trouter = new CommandRouter();\n\t\ttry {\n\t\t\t// setup our socket connection to the tv, but don't connect yet\n\t\t\tconn = new Connection(HOST, PORT, router);\n\n\t\t\t// Tell out router which network connection to use\n\t\t\trouter.setConnection(conn);\n\n\t\t\t// setup a handler for incoming GrantedSessionCommand message\n\t\t\t// objects\n\t\t\ttry {\n\t\t\t\trouter.registerCommandSubscriber(new ICommandSubscriber() {\n\t\t\t\t\tpublic void onCommandReceived(AbstractCommand command) {\n\t\t\t\t\t\t// Filter out the messages we care about\n\t\t\t\t\t\tif (command instanceof GrantedSessionCommand) {\n\t\t\t\t\t\t\t// Print our our unique key, this will be used for\n\t\t\t\t\t\t\t// subsequent connections\n\t\t\t\t\t\t\tUtilities.log(\"Your instanceId is \" + ((GrantedSessionCommand) command).getInstanceId());\n\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t//let's make the dock show up on the TV\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_yahoo\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(2000); //sleep for 2 seconds so the animation to dock finishes\n\n\t\t\t\t\t\t\t\t// Lets do something cool, like tell the TV to navigate to the right. Then do a little dance\n\t\t\t\t\t\t\t\t// This is the same as pressing \"right\" on your remote\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t// slide to the left\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//slide to the right\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_right\"));\n\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\n\t\t\t\t\t\t\t\t//take it back now, y'all\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_left\"));\n\n\t\t\t\t\t\t\t\t//cha cha cha\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_up\"));\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\trouter.publishCommand(new NavigationInputCommand(\"press_down\"));\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\tUtilities.log(\"Problem writing to the network connection\");\n\t\t\t\t\t\t\t\tconn.close();\n\t\t\t\t\t\t\t\tSystem.exit(-1);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Notify the main thread that everything we wanted to\n\t\t\t\t\t\t\t// do is done.\n\t\t\t\t\t\t\tsynchronized (conn) {\n\t\t\t\t\t\t\t\tconn.notifyAll();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else { // print out the others for educational purposes\n\t\t\t\t\t\t\tUtilities.log(\"Received: \" + command.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tpublic void onConnectionLost(Connection conn) {\n\t\t\t\t\t\tUtilities.log(\"Connection Lost!\");\n\t\t\t\t\t}\n\t\t\t\t}, GrantedSessionCommand.class);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t// Establish a connection\n\t\t\t\tconn.establish();\n\t\t\t\t// Since this is the first time we are connecting, we must\n\t\t\t\t// create a new session\n\t\t\t\trouter.publishCommand(new CreateSessionCommand(APP_ID, CONSUMER_KEY, SECRET, APP_NAME));\n\n\t\t\t\tString message = getUserInput(\"Code: \");\n\t\t\t\trouter.publishCommand(new AuthSessionCommand(message, conn.getPeerCertificate()));\n\n\t\t\t\t// Let's wait until everything is done. This thread will get\n\t\t\t\t// notified once we are ready to clean up\n\t\t\t\ttry {\n\t\t\t\t\tsynchronized (conn) {\n\t\t\t\t\t\tconn.wait();\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t} catch (IOException ioe) {\n\t\t\t\tUtilities.log(\"Error establishing connection to \" + HOST + \":\" + PORT);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tUtilities.log(\"Error establishing connection to \" + HOST + \":\" + PORT);\n\t\t\t}\n\n\t\t\t// It is always good practice to clean up after yourself\n\t\t\tconn.close();\n\n\t\t} catch (UnknownHostException e) {\n\t\t\tUtilities.log(\"Error resolving \" + HOST);\n\t\t\tSystem.exit(-1);\n\t\t} catch (IOException e) {\n\t\t\tUtilities.log(\"Problem writing to the network connection\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n\t\t}\n\n\t\tSystem.exit(1);\n\t}", "private void startShowingControllerData() {\n try {\n port = iniciarSerial();\n } catch (IOException ex) {\n Logger.getLogger(JoystickTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n while (true) {\n // Currently selected controller.\n int selectedControllerIndex = window.getSelectedControllerName();\n Controller controller = foundControllers.get(selectedControllerIndex);\n\n // Pull controller for current data, and break while loop if controller is disconnected.\n if (!controller.poll()) {\n window.showControllerDisconnected();\n break;\n }\n\n // X axis and Y axis\n int xAxisPercentage = 0;\n int yAxisPercentage = 0;\n // JPanel for other axes.\n JPanel axesPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 25, 2));\n axesPanel.setBounds(0, 0, 200, 190);\n\n // JPanel for controller buttons\n JPanel buttonsPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 1, 1));\n buttonsPanel.setBounds(6, 19, 246, 110);\n\n // Go trough all components of the controller.\n Component[] components = controller.getComponents();\n for (int i = 0; i < components.length; i++) {\n Component component = components[i];\n Identifier componentIdentifier = component.getIdentifier();\n\n // Buttons\n //if(component.getName().contains(\"Button\")){ // If the language is not english, this won't work.\n if (componentIdentifier.getName().matches(\"^[0-9]*$\")) { // If the component identifier name contains only numbers, then this is a button.\n // Is button pressed?\n boolean isItPressed = true;\n if (component.getPollData() == 0.0f) {\n isItPressed = false;\n }\n\n // Button index\n String buttonIndex;\n buttonIndex = component.getIdentifier().toString();\n // Create and add new button to panel.\n JToggleButton aToggleButton = new JToggleButton(buttonIndex, isItPressed);\n aToggleButton.setPreferredSize(new Dimension(48, 25));\n aToggleButton.setEnabled(false);\n buttonsPanel.add(aToggleButton);\n\n // We know that this component was button so we can skip to next component.\n continue;\n }\n\n // Hat switch\n if (componentIdentifier == Component.Identifier.Axis.POV) {\n float hatSwitchPosition = component.getPollData();\n window.setHatSwitch(hatSwitchPosition);\n\n // We know that this component was hat switch so we can skip to next component.\n continue;\n }\n\n // Axes\n if (component.isAnalog()) {\n float axisValue = component.getPollData();\n int axisValueInPercentage = getAxisValueInPercentage(axisValue);\n\n // X axis\n if (componentIdentifier == Component.Identifier.Axis.X) {\n xAxisPercentage = axisValueInPercentage;\n continue; // Go to next component.\n }\n // Y axis\n if (componentIdentifier == Component.Identifier.Axis.Y) {\n yAxisPercentage = axisValueInPercentage;\n continue; // Go to next component.\n }\n\n // Other axis\n JLabel progressBarLabel = new JLabel(component.getName());\n JProgressBar progressBar = new JProgressBar(0, 100);\n progressBar.setValue(axisValueInPercentage);\n axesPanel.add(progressBarLabel);\n axesPanel.add(progressBar);\n }\n }\n\n // Now that we go trough all controller components,\n // we add butons panel to window,\n window.setControllerButtons(buttonsPanel);\n // set x and y axes,\n window.setXYAxis(xAxisPercentage, yAxisPercentage);\n // add other axes panel to window.\n window.addAxisPanel(axesPanel);\n\n float b1 = components[2].getPollData();\n float b2 = components[3].getPollData();\n float bHOME = components[8].getPollData();\n \n try {\n comprobarBotones(xAxisPercentage, yAxisPercentage, b1, b2, bHOME);\n } catch (IOException | InterruptedException ex) {\n Logger.getLogger(JoystickTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n // We have to give processor some rest.\n try {\n Thread.sleep(25);\n } catch (InterruptedException ex) {\n Logger.getLogger(JoystickTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "int getIntegPort();", "private SWDrive() {\n super();\n leftMaster = new TalonSRX(Constants.LEFT_MASTER_PORT);\n leftMaster.setNeutralMode(NeutralMode.Brake);\n leftMaster.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n leftMaster.setSelectedSensorPosition(0, 0, 0);\n leftMaster.config_kP(0, Constants.LINEAR_GAINS[0], 0);\n leftMaster.config_kI(0, Constants.LINEAR_GAINS[1], 0);\n leftMaster.config_kD(0, Constants.LINEAR_GAINS[2], 0);\n leftMaster.configMotionAcceleration(1000, 0);\n\t\tleftMaster.configMotionCruiseVelocity(5000, 0);\n\t\tleftMaster.config_IntegralZone(0, 200, 0);\n\t\tleftMaster.configClosedloopRamp(0, 256);\n\t\tleftMaster.configOpenloopRamp(0, 256);\n\t\tleftMaster.configAllowableClosedloopError(0, Constants.LINEAR_EPSILON, 0);\n\n rightMaster = new TalonSRX(Constants.RIGHT_MASTER_PORT);\n rightMaster.setNeutralMode(NeutralMode.Brake);\n rightMaster.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, 0, 0);\n rightMaster.setSelectedSensorPosition(0, 0, 0);\n rightMaster.setInverted(true);\n rightMaster.config_kP(0, Constants.LINEAR_GAINS[0], 0);\n rightMaster.config_kI(0, Constants.LINEAR_GAINS[1], 0);\n rightMaster.config_kD(0, Constants.LINEAR_GAINS[2], 0);\n rightMaster.configMotionAcceleration(1000, 0);\n\t\trightMaster.configMotionCruiseVelocity(5000, 0);\n\t\trightMaster.config_IntegralZone(0, 200, 0);\n\t\trightMaster.configClosedloopRamp(0, 256);\n\t\trightMaster.configOpenloopRamp(0, 256);\n rightMaster.configAllowableClosedloopError(0, Constants.LINEAR_EPSILON, 0); \n\n leftSlave = new VictorSPX(Constants.LEFT_SLAVE_PORT);\n leftSlave.setNeutralMode(NeutralMode.Brake);\n leftSlave.follow(leftMaster);\n\n rightSlave = new VictorSPX(Constants.RIGHT_SLAVE_PORT);\n rightSlave.setNeutralMode(NeutralMode.Brake);\n //rightSlave.setInverted(true);\n rightSlave.follow(rightMaster);\n\n gearSolenoid = new DoubleSolenoid(Constants.DRIVE_SOLENOID_FORWARD, Constants.DRIVE_SOLENOID_REVERSE);\n\n navx = new AHRS(Port.kMXP);\n controller = new XboxController(Constants.PRIMARY_DRIVER_PORT);\n pid = new PIDController();\n\n try {\n //piComm = new DatagramSocket();\n //host = InetAddress.getByName(\"10.2.63.25\");\n } catch(Exception e) {\n System.out.println(\"Exception caught when initializing socket: \" + e.getMessage());\n }\n \n //tXBuffer = new CircularBuffer(10);\n\n tankEnabled = false;\n setpointReached = true;\n rotateSet = false;\n antiTiltEnabled = true;\n cargoSearch = false;\n piCamera = false;\n leftTarget = 0;\n rightTarget = 0;\n lacc = 0;\n racc = 0;\n }", "public OI() {\n // Xbox Controller 0 Buttons\n \tButtonMap.xbox0_Y.whileHeld(new TransmissionAscend());\n \tButtonMap.xbox0_A.whileHeld(new TransmissionDescend());\n \tButtonMap.xbox0_R1.whenPressed(new ClawClose());\n \tButtonMap.xbox0_L1.whenPressed(new ClawOpen());\n \t\n \t// Drive Commands\n \tButtonMap.xbox0_B.whileHeld(new DriveFullSpeedWithJoystick());\n ButtonMap.xbox0_B.whenReleased(new ArcadeTriggerDriveWithJoystick());\n \t\n \t// Xbox Controller 1 Buttons\n \tButtonMap.xbox1_R1.whenPressed(new ClawClose());\n \tButtonMap.xbox1_L1.whenPressed(new ClawOpen()); \n \tButtonMap.xbox1_Y.whileHeld(new TransmissionAscend()); \n \tButtonMap.xbox1_A.whileHeld(new TransmissionDescend()); \n }", "public void ipcallButtonPressed() {\n\t\tdialButtonPressed(true) ;\n\t}", "public int getPort(){\r\n return localPort;\r\n }", "public int getPort(){\r\n return localPort;\r\n }", "private void setS1Port(int value) {\n \n s1Port_ = value;\n }", "public void Open() { // in {FF} Arduino\r\n boolean prio = GoodOpen;\r\n int nx, bitz = 0;\r\n if (SpeakEasy) System.out.println(\"F%%F/Open, (pre: GoodOpen = \"\r\n + GoodOpen + \")\");\r\n if (prio) {\r\n if (SpeakEasy) System.out.println(\"... \" + CommPortNo + \" is already open\");\r\n return;\r\n } else try {\r\n GoodOpen = surrealPort.openPort();\r\n surrealPort.setParams(57600, 8, 1, 0);\r\n } catch (Exception ex) {\r\n System.out.println(ex);\r\n }\r\n if (SpeakEasy) {\r\n if (GoodOpen) System.out.println(\"... \" + CommPortNo + \" is now open\");\r\n else System.out.println(\"... \" + CommPortNo + \" failed to open\");\r\n }\r\n if (GoodOpen) try {\r\n bitz = 8; // (for log)\r\n // surrealPort.addEventListener(theInLisner); // didn't work, so do my own\r\n FrootLoop = new EatCereal(); // (does not start it..)\r\n if (FrootLoop != null) {\r\n bitz = 12;\r\n EatOften = new Timer(0, FrootLoop);\r\n if (EatOften == null) bitz = 28;\r\n }\r\n if (digitalInputData == null) {\r\n digitalInputData = new int[MAX_DATA_BYTES];\r\n analogInputData = new int[MAX_DATA_BYTES];\r\n }\r\n if (ArduPiModes == null) {\r\n bitz = bitz + 2;\r\n ArduPiModes = new int[16];\r\n }\r\n for (nx = 0; nx <= 15; nx++) ArduPiModes[nx] = 0;\r\n if (AutoStartInputs) {\r\n bitz++;\r\n Thread.sleep(1000); // delay 8 seconds for Arduino reboot\r\n for (nx = 0; nx <= 2; nx++)\r\n OpenPinInput(nx, Arduino.REPORT_ANALOG); // = 0xC0 (192)\r\n for (nx = 0; nx <= 1; nx++)\r\n OpenPinInput(nx, Arduino.REPORT_DIGITAL);\r\n } // = 0xD0 (208)\r\n } catch (Exception ex) {\r\n System.out.println(ex);\r\n System.exit(-1);\r\n }\r\n if (SpeakEasy) System.out.println(\" (Ardu/Op) => GoodOpen = \" + GoodOpen\r\n + \" (\" + bitz + \")\");\r\n }", "public void initXlet(XletContext ctx) throws XletStateChangeException\n {\n System.out.println(\"[\" + m_appName + \"] : initXlet() - begin\");\n\n // initialize AutoXlet\n m_axc = new AutoXletClient(this, ctx);\n m_test = m_axc.getTest();\n if (m_axc.isConnected())\n m_log = m_axc.getLogger();\n else\n m_log = new XletLogger();\n\n // store off our xlet context\n m_ctx = ctx;\n\n // get instance of HostSettings\n hostRef = (HostSettings) Host.getInstance();\n\n hscreenDef = HScreen.getDefaultHScreen();\n if (hscreenDef == null)\n {\n debugLog(\"No default hscreen assigned\");\n }\n\n // Setup the application graphical user interface.\n m_scene = HSceneFactory.getInstance().getBestScene(new HSceneTemplate());\n m_vbox = new VidTextBox(40, 50, 530, 370, 14, 5000);\n m_scene.add(m_vbox);\n m_scene.addKeyListener(this);\n m_scene.addKeyListener(m_vbox);\n\n final String DS_PROPERTY_NAME = \"ocap.api.option.ds\";\n final String DS_SPECIFICATION_VERSION = \"1.0\";\n\n // Test if the Device Settings Extension is System defined for stack.\n String ds_property = System.getProperty(DS_PROPERTY_NAME);\n if (ds_property == null)\n {\n debugLog(DS_PROPERTY_NAME + \" Not defined.\");\n }\n else if (!ds_property.equals(DS_SPECIFICATION_VERSION))\n {\n debugLog(\"Expected version \" + DS_SPECIFICATION_VERSION + \" Not system version \" + ds_property);\n }\n\n debugLog(\" initXlet() - end\");\n\n }", "MiniBotXboxInputEventHandler(String _botName) {\n botName = _botName;\n }", "void port(int port);", "void port(int port);", "public SiLabsC8051F320_USBIO_ServoController() {\r\n interfaceNumber=0;\r\n if(UsbIoUtilities.usbIoIsAvailable){\r\n pnp=new PnPNotify(this);\r\n pnp.enablePnPNotification(GUID);\r\n }\r\n Runtime.getRuntime().addShutdownHook(new Thread(){\r\n @Override\r\n public void run(){\r\n if(isOpen()){\r\n close();\r\n }\r\n }\r\n });\r\n servoQueue=new ArrayBlockingQueue<ServoCommand>(SERVO_QUEUE_LENGTH);\r\n }", "public SimpleGUI(String p_host, String p_name) {\r\n super();\r\n initialize();\r\n int porti=1099;\r\n String adresa=\"192.165.43.195\"; \r\n try\r\n {\r\n this.rem = (ServerInterface)Naming.lookup(\"rmi://\"+adresa+\":\"+porti+\"/RMD\");\r\n \t\r\n this.id = rem.EnterGame(p_name);\r\n System.out.println(\"Your id is : \"+ id);\r\n \t\r\n if(id == 0)\r\n {\r\n System.out.println(\"Max Connection reached\");\r\n \t\r\n }\r\n else\r\n {\r\n this.name = rem.getName(id);\r\n this.setTitle(\"Welcome \" + name);\r\n \t\r\n GiveCards();\r\n \t\r\n }\r\n \r\n }\r\n catch (MalformedURLException e)\r\n {\r\n System.err.println(\"MalformedURLException: \"+e.getMessage());\r\n }\r\n catch (RemoteException e)\r\n {\r\n System.err.println(\"RemoteException: \" + e.getMessage());\r\n }\r\n catch (NotBoundException e)\r\n {\r\n System.err.println(\"NotBoundException: \"+e.getMessage());\r\n }\r\n }", "public void c2pStart();", "public RobotContainer() {\n\nleftJoystick = new Joystick(0);\nrightJoystick = new Joystick(1);\n\ndriveBase = new DriveBase();\ndriveWithJoystick = new DriveWithJoystick();\nCommandScheduler.getInstance().setDefaultCommand(driveBase, driveWithJoystick);\n\n\n // Configure the button bindings\n configureButtonBindings();\n }", "@Override\r\n\tpublic void setup(){\n\t\tmidiIO = CCMidiIO.getInstance();\r\n\t\tmidiIO.printDevices();\r\n\r\n\t\t// print a list with all available devices\r\n\t\tmidiIO.printDevices();\r\n\r\n\t\t// open an midiout using the first device and the first channel\r\n\t\tmidiOut = midiIO.midiOut(0, 1);\r\n\r\n\t\tbowl = new Bowl[10];\r\n\t\tfor (int i = 0; i < bowl.length; i++){\r\n\t\t\tbowl[i] = new Bowl(i);\r\n\t\t}\r\n\t}", "void jtfMasterPort_actionPerformed(ActionEvent e) {\n HermesGlobals.masterServerPortNo = Integer.parseInt(jtfMasterPort.getText());\n }", "public void mo1611c() {\r\n Message.obtain(this.f4603a.f4598n, 6, null).sendToTarget();\r\n }", "public void onSensorPlug(String idSensor) // evento que se genera al conectar el lector de huella\n {\n objpantprincipal.writeLog(\"Lector \"+idSensor+\": Conectado.\");\n try {\n //Start capturing from plugged sensor.\n GrFingerJava.startCapture(idSensor, this, this);\n } catch (GrFingerJavaException e) {\n //write error to log\n objpantprincipal.writeLog(e.getMessage());\n }\n }", "@Override\n public void teleopPeriodic() {\n\t\t/* xbox processing */\n\t\tdouble leftYstick = xbox.getY(Hand.kLeft);\n\t\tboolean buttonA = xbox.getAButton();\n boolean buttonB = xbox.getBButton();\n boolean buttonX = xbox.getXButton();\n boolean buttonY = xbox.getYButton();\n\n\t\t/* Get Talon/Victor's current output percentage */\n\t\tdouble motorOutput = elevator.getMotorOutputPercent();\n\n\t\t/* Deadband gamepad */\n\t\tif (Math.abs(leftYstick) < 0.10) {\n\t\t\t/* Within 10% of zero */\n\t\t\tleftYstick = 0;\n }\n\n\t\t/* Prepare line to print */\n\t\t_sb.append(\"\\tout:\"); _sb.append((int) (motorOutput * 100)); _sb.append(\"%\"); // Percent\n\t\t_sb.append(\"\\tpos:\"); _sb.append(elevator.getSelectedSensorPosition(0)); _sb.append(\"u\"); // Native units\n\n\t\t/**\n\t\t * When button 1 is pressed, perform Position Closed Loop to selected position,\n\t\t * indicated by Joystick position x10, [-10, 10] rotations\n\t\t */\n\t\t//if (!_lastButton1 && buttonA) {\n if (buttonB) {\n\t\t\t/* Position Closed Loop */\n\t\t\t/* 10 Rotations * 4096 u/rev in either direction */\n\t\t\ttargetPositionRotations = 5000; // 2* 4096; //leftYstick * 10.0 * 4096;\n\t\t\televator.set(ControlMode.Position, targetPositionRotations);\n\t\t}\n if (buttonX) {\n\t\t\t/* Position Closed Loop */\n\t\t\t/* 10 Rotations * 4096 u/rev in either direction */\n\t\t\ttargetPositionRotations = 3000; //2* 4096; //leftYstick * 10.0 * 4096;\n\t\t\televator.set(ControlMode.Position, -targetPositionRotations);\n\t\t}\n\n\t\t/* When button 2 is held, just straight drive */\n\t\tif (buttonA) {\n /* Percent Output */\n\t\t elevator.set(ControlMode.PercentOutput, leftYstick);\n }\n \n if (buttonY) {\n elevator.setSelectedSensorPosition(0); // reset to zero\n elevator.getSensorCollection().setQuadraturePosition(0, 10);\n elevator.set(ControlMode.PercentOutput, 0);\n }\n// else{\n //}\n\n\t\t/* If Talon is in position closed-loop, print some more info */\n\t\tif (elevator.getControlMode() == ControlMode.Position) {\n /* Append more signals to print when in speed mode. */\n\t\t\t_sb.append(\"\\terr:\"); _sb.append(elevator.getClosedLoopError(0)); _sb.append(\"u\");\t// Native Units\n\t\t\t_sb.append(\"\\ttrg:\"); _sb.append(targetPositionRotations); _sb.append(\"u\");\t// Native Units\n\t\t}\n\n\t\t/**\n\t\t * Print every ten loops, printing too much too fast is generally bad\n\t\t * for performance.\n\t\t */\n\t\tif (++_loops >= 10) {\n\t\t\t_loops = 0;\n\t\t\tSystem.out.println(_sb.toString());\n\t\t}\n\n\t\t/* Reset built string for next loop */\n\t\t_sb.setLength(0);\n\t\t\n\t\t/* Save button state for on press detect */\n\t\t//_lastButton1 = buttonA;\n }", "public void onClickStart(View view) {\n\n HashMap<String, UsbDevice> usbDevices = usbManager.getDeviceList();\n if (!usbDevices.isEmpty()) {\n boolean keep = true;\n for (Map.Entry<String, UsbDevice> entry : usbDevices.entrySet()) {\n device = entry.getValue();\n int deviceVID = device.getVendorId();\n if (deviceVID == 0x2341)//Arduino Vendor ID\n {\n PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), 0);\n usbManager.requestPermission(device, pi);\n keep = false;\n } else {\n connection = null;\n device = null;\n }\n\n if (!keep)\n break;\n }\n }\n\n\n }", "public void buzzer(boolean status){\r\n byte newSetting = 0;\r\n if (status){\r\n newSetting = 0x44;// bit 6=led, bit 2=buzzer\r\n }\r\n else { \r\n newSetting = 0; // all Off\r\n }\r\n cardReader.writeUserPort(handle,newSetting); \r\n }", "private static void go_play()throws AWTException {\n\t\ttry{\r\n\t\t\t//Robot robot = new Robot();\r\n\r\n\t\t\trobot.keyPress(KeyEvent.VK_SPACE);\r\n\t\t\trobot.keyRelease(KeyEvent.VK_SPACE);\r\n\t\t}\r\n\t\tcatch(IllegalArgumentException e1) {\r\n\t\t\tSystem.err.println(\"Use: java Renderer <Local IPAddress> <Localport> <Remote IPAddress> <Remote Port>\");\r\n\t\t}\r\n\r\n\t}", "public InternalInformationPortController() {\r\n\t\t\r\n\t}", "public interface USBPort {\n void workWithUSB();\n}", "public void start(int port);", "protected int getDefaultPort() {\n/* 320 */ return -1;\n/* */ }", "public Joystick getxBoxOne() {\n return xBoxOne;\n }", "public void requestBoard(){\r\n try {\r\n clientThreads.get(0).getOOS().writeObject(\r\n new DataWrapper(DataWrapper.CTCODE, new ControlToken(ControlToken.BOARDREQUEST)));\r\n } catch(IOException ioe){\r\n ioe.printStackTrace();\r\n }\r\n }", "private OI() {\n\t\t\n\t\tJoystickButton intakeIn = new JoystickButton(//gunner, \n\t\t\t\tdriver, JOYSTICK_INTAKE);\n\t\tJoystickButton intakeOut = new JoystickButton(//gunner, \n\t\t\t\tdriver, JOYSTICK_REVERSE_INTAKE);\n\t\tJoystickButton pivotOut = new JoystickButton(//gunner,\t\t\t\tThese create officially each button on the driver remote\n\t\t\t\tdriver, JOYSTICK_PIVOT_OUT);\n\t\tJoystickButton pivotIn = new JoystickButton(//gunner,\t\t\t\tusing the button numbers created above\n\t\t\t\tdriver, JOYSTICK_PIVOT_IN);\n\t\tJoystickButton climbRelease = new JoystickButton(//gunner,\n\t\t\t\tdriver, JOYSTICK_ClIMB_RELEASE);\n\t\tJoystickButton climbUp = new JoystickButton(//gunner,\n\t\t\t\tdriver, JOYSTICK_CLIMB_UP);\n\t\tJoystickButton climbBrake = new JoystickButton(\n\t\t\t\tdriver, JOYSTICK_BRAKE);\n\t\tJoystickButton climbUndoBrake = new JoystickButton(\n\t\t\t\tdriver, JOYSTICK_UNDO_BRAKE);\n\t\t\n\t\t/*\n\t\t * JoystickButton intakeIn = new JoystickButton(//left, \n\t\t\t\tright, JOYSTICK_INTAKE);\n\t\t * JoystickButton intakeOut = new JoystickButton(//left, \n\t\t\t\tright, JOYSTICK_REVERSE_INTAKE);\n\t\t * JoystickButton pivotOut = new JoystickButton(//left,\t\t\t\tThese create officially each button on the driver remote\n\t\t\t\tright, JOYSTICK_PIVOT_OUT);\n\t\t * JoystickButton pivotIn = new JoystickButton(//left,\t\t\t\tusing the button numbers created above\n\t\t\t\tright, JOYSTICK_PIVOT_IN);\n\t\t * JoystickButton climbRelease = new JoystickButton(//left,\n\t\t\t\tright, JOYSTICK_ClIMB_RELEASE);\n\t\t * JoystickButton climbUp = new JoystickButton(//left,\n\t\t\t\tright, JOYSTICK_CLIMB_UP);\n\t\t * JoystickButton climbBrake = new JoystickButton(//left,\n\t\t\t\tright, JOYSTICK_BRAKE);\n\t\t * JoystickButton climbUndoBrake = new JoystickButton(//left,\n\t\t\t\tright, JOYSTICK_UNDO_BRAKE);\n\t\t */\n\t\t\n\t\t\n\t\tintakeIn.whileHeld(new IntakeIn());\t\t\t//Executes intakeIn WHILE the button is pressed\n\t\tintakeIn.whenReleased(new IntakeStop());\t//executes intakestop WHEN the button is let go\n\t\t\n\t\tintakeOut.whileHeld(new IntakeOut());\t\n\t\tintakeOut.whenReleased(new IntakeStop());\n\t\t\n\t\tpivotIn.whileHeld(new PivotIn());\n\t\tpivotIn.whenReleased(new PivotStop());\t\t\t\t\t\t\t//These bind the buttons to a specific command\n\t\t\n\t\tpivotOut.whileHeld(new PivotOut());\n\t\tpivotOut.whenReleased(new PivotStop());\n\t\t\n\t\tclimbRelease.whileHeld(new ClimbRelease());\n\t\tclimbRelease.whenReleased(new ClimbStop());\n\t\t\n\t\tclimbUp.whileHeld(new ClimbUp());\n\t\tclimbUp.whenReleased(new ClimbStop());\n\t\t\n\t\tclimbBrake.whileHeld(new ClimbBrake());\n\t\tclimbBrake.whenReleased(new BrakeStop());\n\t\t\n\t\tclimbUndoBrake.whileHeld(new ClimbBrakeUndo());\n\t\tclimbUndoBrake.whenReleased(new BrakeStop());\n\t}", "@Override\r\n public void onStart(ConnectedNode connectedNode) {\n Subscriber<diagnostic_msgs.DiagnosticStatus> inputSubscriber =\r\n connectedNode.newSubscriber(\"ftl_hardware_inputs\", diagnostic_msgs.DiagnosticStatus._TYPE);\r\n\r\n inputSubscriber.addMessageListener(new MessageListener<diagnostic_msgs.DiagnosticStatus>(){\r\n\r\n @Override\r\n public void onNewMessage(diagnostic_msgs.DiagnosticStatus msg) {\r\n // digitalIn, analogIn\r\n if (msg.getName() == \"digitalIn\") {\r\n // Handle Digital messages\r\n Map<Integer, Boolean> dInMap = new HashMap<>();\r\n for (diagnostic_msgs.KeyValue kvPair : msg.getValues()) {\r\n int port = Integer.parseInt(kvPair.getKey());\r\n boolean val = (kvPair.getValue() == \"true\" || kvPair.getValue() == \"1\");\r\n dInMap.put(port, val);\r\n }\r\n\r\n for (IHardwareListener listener: mListeners) {\r\n listener.onDigitalInputChanged(dInMap);\r\n }\r\n }\r\n else if (msg.getName() == \"analogIn\") {\r\n // Handle Analog messages\r\n Map<Integer, Double> aInMap = new HashMap<>();\r\n for (diagnostic_msgs.KeyValue kvPair : msg.getValues()) {\r\n int port = Integer.parseInt(kvPair.getKey());\r\n double val = Double.parseDouble(kvPair.getValue());\r\n aInMap.put(port, val);\r\n }\r\n\r\n for (IHardwareListener listener: mListeners) {\r\n listener.onAnalogInputChanged(aInMap);\r\n }\r\n }\r\n }\r\n });\r\n\r\n // Also set up the publisher\r\n Publisher<diagnostic_msgs.DiagnosticStatus> outputPublisher =\r\n connectedNode.newPublisher(\"ftl_hardware_outputs\", diagnostic_msgs.DiagnosticStatus._TYPE);\r\n\r\n // Set up the loop\r\n connectedNode.executeCancellableLoop(new CancellableLoop(){\r\n\r\n @Override\r\n protected void loop() throws InterruptedException {\r\n // Check to see if we have any new updates to send out\r\n if (mNewDigitalOutData) {\r\n // Make a local copy\r\n Map<Integer, Boolean> digitalOutCopy;\r\n\r\n synchronized(mDigitalOutLock) {\r\n digitalOutCopy = new HashMap<>();\r\n digitalOutCopy.putAll(mDigitalOutValues);\r\n mDigitalOutValues.clear();\r\n mNewDigitalOutData = false;\r\n }\r\n\r\n // Send it out\r\n if (digitalOutCopy != null) {\r\n diagnostic_msgs.DiagnosticStatus digitalMsg = outputPublisher.newMessage();\r\n digitalMsg.setName(\"digitalOut\");\r\n List<diagnostic_msgs.KeyValue> digitalOutKVs = new ArrayList<>();\r\n for (Entry<Integer, Boolean> valueEntry : digitalOutCopy.entrySet()) {\r\n String k = valueEntry.getKey().toString();\r\n String v = valueEntry.getValue() ? \"1\" : \"0\";\r\n diagnostic_msgs.KeyValue newKV =\r\n connectedNode.getTopicMessageFactory()\r\n .newFromType(diagnostic_msgs.KeyValue._TYPE);\r\n newKV.setKey(k);\r\n newKV.setValue(v);\r\n digitalOutKVs.add(newKV);\r\n }\r\n digitalMsg.setValues(digitalOutKVs);\r\n\r\n outputPublisher.publish(digitalMsg);\r\n }\r\n }\r\n\r\n if (mNewPWMOutData) {\r\n // Make a local copy\r\n Map<Integer, Double> pwmOutCopy;\r\n\r\n synchronized(mPWMOutLock) {\r\n pwmOutCopy = new HashMap<>();\r\n pwmOutCopy.putAll(mPWMOutValues);\r\n mPWMOutValues.clear();\r\n mNewPWMOutData = false;\r\n }\r\n\r\n // Send it out\r\n if (pwmOutCopy != null) {\r\n diagnostic_msgs.DiagnosticStatus pwmMsg = outputPublisher.newMessage();\r\n pwmMsg.setName(\"pwmOut\");\r\n List<diagnostic_msgs.KeyValue> pwmOutKVs = new ArrayList<>();\r\n for (Entry<Integer, Double> valueEntry : pwmOutCopy.entrySet()) {\r\n String k = valueEntry.getKey().toString();\r\n String v = valueEntry.getValue().toString();\r\n diagnostic_msgs.KeyValue newKV =\r\n connectedNode.getTopicMessageFactory()\r\n .newFromType(diagnostic_msgs.KeyValue._TYPE);\r\n newKV.setKey(k);\r\n newKV.setValue(v);\r\n pwmOutKVs.add(newKV);\r\n }\r\n pwmMsg.setValues(pwmOutKVs);\r\n\r\n outputPublisher.publish(pwmMsg);\r\n }\r\n }\r\n\r\n Thread.sleep(10);\r\n }\r\n });\r\n }", "@Override\n public void robotInit() {\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 \n left_motor_1= new CANSparkMax(2,MotorType.kBrushless);\n left_motor_2=new CANSparkMax(3,MotorType.kBrushless);\n right_motor_1=new CANSparkMax(5,MotorType.kBrushless);\n right_motor_2=new CANSparkMax(6,MotorType.kBrushless);\n ball_collection_motor=new CANSparkMax(4,MotorType.kBrushless);\n left_high_eject=new CANSparkMax(1, MotorType.kBrushless);\n right_high_eject=new CANSparkMax(7,MotorType.kBrushless);\n left_belt=new TalonSRX(9);\n right_belt=new TalonSRX(11);\n left_low_eject=new TalonSRX(8);\n right_low_eject=new TalonSRX(12);\n double_solenoid_1=new DoubleSolenoid(0,1);\n joystick=new Joystick(1);\n servo=new Servo(0);\n if_correted=false;\n xbox_controller=new XboxController(0);\n servo_angle=1;\n eject_speed=0;\n go_speed=0;\n turn_speed=0;\n high_eject_run=false;\n clockwise=false;\n left_motor_1.restoreFactoryDefaults();\n left_motor_2.restoreFactoryDefaults();\n right_motor_1.restoreFactoryDefaults();\n right_motor_2.restoreFactoryDefaults();\n \n left_motor_2.follow(left_motor_1);\n right_motor_1.follow(right_motor_2);\n servo.set(0);\n currentServoAngle = 0;\n factor = 0.01;\n pushed = false;\n //right_high_eject.follow(left_high_eject);\n //right_low_eject.follow(left_low_eject);\n\n }", "public void ArduinoConnection() \n {\n //variables para la identificacion del puerto y poder hacer la conexion\n CommPortIdentifier portId = null;\n Enumeration portEnum = CommPortIdentifier.getPortIdentifiers();\n\n //Ciclo para mandar todos los elementos, es decir, aqui se mandara por el puerto los caracteres del mensaje\n while (portEnum.hasMoreElements()) \n {\n CommPortIdentifier currPortId = (CommPortIdentifier) portEnum.nextElement();\n \n //comprobamos si hay algo\n if (PORT_NAME.equals(currPortId.getName())) \n {\n portId = currPortId;\n break;\n }\n }\n\n if (portId == null) \n {\n\n System.exit(ERROR);\n return;\n }\n\n try \n {\n \n serialPort = (SerialPort) portId.open(this.getClass().getName(), TIME_OUT);\n\n serialPort.setSerialPortParams(DATA_RATE,\n SerialPort.DATABITS_8,\n SerialPort.STOPBITS_1,\n SerialPort.PARITY_NONE);\n\n Output = serialPort.getOutputStream();\n\n } catch (Exception e) {\n\n System.exit(ERROR);\n }\n\n }", "default public int getControlToDevicePort()\t\t\t\t{ return 2226; }", "public void controllerChange(int channel, int number, int value) {\n // Here we print the controller number.\n println(number);\n // If we turn knob with id 104, draw a line\n // The vertical position of the line depends on how much we turn the knob\n if(number == 104) {\n float y = map(value, 0, 127, 0, height);\n line(0, y, width, y);\n }\n // If we turn knob with id 103, draw a circle\n // The size of the circle depends on how much we turn the knob\n if(number == 103) {\n ellipse(width/2, height/2, value*2, value*2);\n }\n}", "private void initHardware(){\n }", "void onConnectToNetByIPSucces();", "@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) \r\n\t\t\t\t\t{\n\t\t\t\t\t\tString [] parameters = new String[]{\"MACAddress\"};\r\n\t\t\t\t\t\tObject [] values = new Object[]{MACAddress.getText()};\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tClientApplet.getController().modifyObject(sensor, parameters, values);\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tframe.dispose();\r\n\t\t\t\t\t}", "private native static int shout_set_port(long shoutInstancePtr, int port);", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tappInstall(DeviceNum1);\r\n\r\n\t\t\t}", "@Option int getPortSendCam();", "private void execHandlerDevice( Message msg ) {\n\t\t // get the connected device's name\n\t\tString name = msg.getData().getString( BUNDLE_DEVICE_NAME );\n\t\tlog_d( \"EventDevice \" + name );\n\t\thideButtonConnect();\t\n\t\tString str = getTitleConnected( name );\n\t\tshowTitle( str );\n\t\ttoast_short( str );\n\t}", "private static void setPort(Integer portNumber){\r\n RS232.portNumber=portNumber;\r\n }", "void run() {\n System.out.println(\"PC Visual application run\");\n data = new Data(this);\n window = new Window(this);\n window.setup();\n mote = new MoteIF(PrintStreamMessenger.err);\n mote.registerListener(new OscilloscopeMsg(), this);\n }", "public static void init() {\n driveLeft = new VictorSP(1);\r\n LiveWindow.addActuator(\"Drive\", \"Left\", (VictorSP) driveLeft);\r\n \r\n driveRight = new VictorSP(0);\r\n LiveWindow.addActuator(\"Drive\", \"Right\", (VictorSP) driveRight);\r\n \r\n driveMotors = new RobotDrive(driveLeft, driveRight);\r\n \r\n driveMotors.setSafetyEnabled(false);\r\n driveMotors.setExpiration(0.1);\r\n driveMotors.setSensitivity(0.5);\r\n driveMotors.setMaxOutput(1.0);\r\n\r\n driveEncoderLeft = new Encoder(0, 1, true, EncodingType.k1X);\r\n LiveWindow.addSensor(\"Drive\", \"EncoderLeft\", driveEncoderLeft);\r\n driveEncoderLeft.setDistancePerPulse(0.053855829);\r\n driveEncoderLeft.setPIDSourceType(PIDSourceType.kRate);\r\n driveEncoderRight = new Encoder(2, 3, false, EncodingType.k1X);\r\n LiveWindow.addSensor(\"Drive\", \"EncoderRight\", driveEncoderRight);\r\n driveEncoderRight.setDistancePerPulse(0.053855829);\r\n driveEncoderRight.setPIDSourceType(PIDSourceType.kRate);\r\n driveFrontSonar = new Ultrasonic(4, 5);\r\n LiveWindow.addSensor(\"Drive\", \"FrontSonar\", driveFrontSonar);\r\n \r\n shooterMotor = new VictorSP(3);\r\n LiveWindow.addActuator(\"Shooter\", \"Motor\", (VictorSP) shooterMotor);\r\n \r\n climberMotor = new Spark(2);\r\n LiveWindow.addActuator(\"Climber\", \"Motor\", (Spark) climberMotor);\r\n \r\n gearGrabReleaseSolonoid = new DoubleSolenoid(0, 0, 1);\r\n LiveWindow.addActuator(\"Gear\", \"GrabReleaseSolonoid\", gearGrabReleaseSolonoid);\r\n \r\n powerPanel = new PowerDistributionPanel(0);\r\n LiveWindow.addSensor(\"Power\", \"Panel\", powerPanel);\r\n \r\n cameraMountpan = new Servo(4);\r\n LiveWindow.addActuator(\"CameraMount\", \"pan\", cameraMountpan);\r\n \r\n cameraMounttilt = new Servo(5);\r\n LiveWindow.addActuator(\"CameraMount\", \"tilt\", cameraMounttilt);\r\n \r\n\r\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\r\n\t\tdriveSonarFront = new SonarMB1010(0);\r\n\t\tLiveWindow.addSensor(\"Drive\", \"SonarFront\", driveSonarFront);\r\n\r\n\t\t//driveGyro = new GyroADXRS453();\r\n\t\tdriveGyro = new ADXRS450_Gyro();\r\n\t\tLiveWindow.addSensor(\"Drive\", \"Gyro\", driveGyro);\r\n\t\tdriveGyro.calibrate();\r\n\t}", "public OI() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n\n xBoxOne = new Joystick(0);\n \n autoRight = new JoystickButton(xBoxOne, 10);\n autoRight.whenPressed(new AutoRight());\n autoLeft = new JoystickButton(xBoxOne, 9);\n autoLeft.whenPressed(new AutoLeft());\n vision = new JoystickButton(xBoxOne, 7);\n vision.whenPressed(new SeekAndDriveTo());\n cameraSwitch = new JoystickButton(xBoxOne, 2);\n cameraSwitch.whenPressed(new CameraSwitch());\n latchCloseManual = new JoystickButton(xBoxOne, 6);\n latchCloseManual.whileHeld(new latchCloseManual());\n latchOpenManual = new JoystickButton(xBoxOne, 5);\n latchOpenManual.whileHeld(new latchOpenManual());\n toggleDirection = new JoystickButton(xBoxOne, 3);\n toggleDirection.whenPressed(new SwitchDirection());\n follow = new JoystickButton(xBoxOne, 8);\n follow.whenPressed(new follow());\n driveBackToDistance = new JoystickButton(xBoxOne, 1);\n driveBackToDistance.whenPressed(new AutoReverse());\n driveToDistance = new JoystickButton(xBoxOne, 4);\n driveToDistance.whenPressed(new AutoDrop());\n\n\n // SmartDashboard Buttons\n SmartDashboard.putData(\"Autonomous Command\", new AutonomousCommand());\n SmartDashboard.putData(\"DriveWithJoystick\", new DriveWithJoystick());\n SmartDashboard.putData(\"driveToDistance\", new driveToDistance());\n SmartDashboard.putData(\"HDriveJoystick\", new HDriveJoystick());\n SmartDashboard.putData(\"driveBackToDistance\", new driveBackToDistance());\n SmartDashboard.putData(\"follow\", new follow());\n SmartDashboard.putData(\"Climb\", new Climb());\n SmartDashboard.putData(\"SwitchDirection\", new SwitchDirection());\n SmartDashboard.putData(\"latchClose\", new latchClose());\n SmartDashboard.putData(\"latchOpen\", new latchOpen());\n SmartDashboard.putData(\"AutoDrop\", new AutoDrop());\n SmartDashboard.putData(\"AutoReverse\", new AutoReverse());\n SmartDashboard.putData(\"latchOpenManual\", new latchOpenManual());\n SmartDashboard.putData(\"latchCloseManual\", new latchCloseManual());\n SmartDashboard.putData(\"autoForwardBack\", new autoForwardBack());\n SmartDashboard.putData(\"kickForward\", new kickForward());\n SmartDashboard.putData(\"CameraSwitch\", new CameraSwitch());\n SmartDashboard.putData(\"Vision\", new Vision());\n SmartDashboard.putData(\"SeekAndDriveTo\", new SeekAndDriveTo());\n SmartDashboard.putData(\"turnRightTimed\", new turnRightTimed());\n SmartDashboard.putData(\"turnLeftTimed\", new turnLeftTimed());\n SmartDashboard.putData(\"driveForwardTimed\", new driveForwardTimed());\n SmartDashboard.putData(\"AutoRight\", new AutoRight());\n SmartDashboard.putData(\"AutoLeft\", new AutoLeft());\n SmartDashboard.putData(\"AutoMiddle\", new AutoMiddle());\n SmartDashboard.putData(\"SeekAndDriveSim\", new SeekAndDriveSim());\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }", "void userPressConnectButton();", "private void dispatchPortAddressedPdus(byte[][] pdus, int port) {\n Uri uri = Uri.parse(\"sms://localhost:\" + port);\n Intent intent = new Intent(Intents.DATA_SMS_RECEIVED_ACTION, uri);\n intent.putExtra(\"pdus\", pdus);\n mPhone.getContext().sendBroadcast(\n intent, \"android.permission.RECEIVE_SMS\");\n }", "public GetInRangeAndAimCommand() {\n xController = new PIDController(0.1, 1e-4, 1);\n yController = new PIDController(-0.1, 1e-4, 1);\n xController.setSetpoint(0);\n yController.setSetpoint(0);\n // xController.\n drive = DrivetrainSubsystem.getInstance();\n limelight = Limelight.getInstance();\n // Use addRequirements() here to declare subsystem dependencies.\n addRequirements(drive);\n\n }", "int getInPort();", "int getInPort();", "@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}", "public static void switchPort(){\n\t\ttry{\n\t\t\t//send kill signal via kill file\n\t\t\t// if current port is set\n\t\t\tif(currentPort!=0){\n\t\t\t\tLog.stdout(\"Sending kill signal for current tor thread...\");\n\t\t\t\t(new File(\".tor_tmp/kill\"+currentPort)).createNewFile();\n\t\t\t}\n\t\t\t\n\t\t\t//waiting for lock to read new available port\n\t\t\tboolean locked = true;int t=0;\n\t\t\twhile(locked){\n\t\t\t\tLog.stdout(\"Waiting for lock on .tor_tmp/lock\");\n\t\t\t\tThread.sleep(200);\n\t\t\t\tlocked = (new File(\".tor_tmp/lock\")).exists();t++;\n\t\t\t}\n\t\t\t\n\t\t\t// make the next step concurrent\n\t\t\t// -> also lock ports file\n\t\t\t// create the lock\n\t\t\tFile lock = new File(\".tor_tmp/lock\");lock.createNewFile();\n\t\t\t\n\t\t\t// read new port - delete taken port from communication file\n\t\t\tBufferedReader r = new BufferedReader(new FileReader(new File(\".tor_tmp/ports\")));\n\t\t\t\n\t\t\tchangePortFromFile(r);\n\t\t\t\n\t\t\tLinkedList<String> queue = new LinkedList<String>();\n\t\t\tString currentLine = r.readLine();\n\t\t\twhile(currentLine!=null){\n\t\t\t\tqueue.add(currentLine);currentLine = r.readLine();\n\t\t\t}\n\t\t\t//now rewrite the port file\n\t\t\t(new File(\".tor_tmp/ports\")).delete();\n\t\t\tBufferedWriter w = new BufferedWriter(new FileWriter(new File(\".tor_tmp/ports\")));\n\t\t\tfor(String p:queue){w.write(p);w.newLine();}\n\t\t\tw.close();\n\t\t\t\n\t\t\t// release the lock\n\t\t\tlock.delete();\n\t\t\t\n\t\t\t// show ip to check\n\t\t\tshowIP();\n\t\t\t\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}", "public void switchSmart(){\n\r\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseBrightnessCmd(seekBarBrightness.getProgress()), 3, seekBarBrightness.getProgress(), item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n\r\n //String CMD_HSV = \"{\\\"id\\\":1,\\\"method\\\":\\\"set_hsv\\\",\\\"params\\\":[0, 0, \\\"smooth\\\", 30]}\\r\\n\";\r\n //write(CMD_HSV, 0, 0);\r\n\r\n for (int i = 0; i < item.getDevices().size(); i++) {\r\n write(parseRGBCmd(msAccessColor(Color.WHITE)), 0, 0, item.getDevices().get(i).getSocket(), item.getDevices().get(i).getBos());\r\n }\r\n\r\n }", "void EnableRemote (int boardID, short[] addrlist);", "StartPort createStartPort();", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tif(cmd.getDevices().indexOf(\"E\") > -1) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, cmd.getDevices().substring(2), \"提示\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t\tif(cmd.getDevices().indexOf(\"T\") > -1) {\n\t\t\t\t\tif (!deviceId.equals(cmd.getDevices().substring(2))) {\n\t\t\t\t\t\tdeviceId = cmd.getDevices().substring(2);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tnew Thread(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tcmd.killProcess(deviceId, \"monkey\");\n\t\t\t\t\t}\n\t\t\t\t}).start();\n\t\t\t\tnew Thread(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tcmd.killProcess(deviceId, \"logcat\");\n\t\t\t\t\t}\n\t\t\t\t}).start();\n\t\t\t}", "public void on() {\n\t\tSystem.out.println(\"Tuner is on\");\n\n\t}", "private void connectToCS(int port, String host)throws Exception{\n socket = new Socket(host, port);\n inStream = new PDUInputStream(socket.getInputStream());\n outStream = new PDUOutputStream(socket.getOutputStream());\n\n PduJoin join = new PduJoin(nickName);\n outStream.writeToServer(join.getByteArray());\n\n chatCS();\n }", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "int getHealSnPort();", "private void registToWX() {\n }", "private void ClearDevice()\n throws IOException {\n\n //////////////////////////////\n // Become Controller-In-Charge\n\n // The board needs to be the Controller-In-Charge in order to find all\n // listeners on the GPIB.\n m_gpib32.SendIFC(BOARD_NR);\n\n // clean up if there was an error and throw an exception\n String str = \"The GPIB_NI driver could not become Controller-In-Charge.\\n\";\n checkErrorGPIB(str, true);\n \n\n //////////////////////////////////////\n // Find if an Instrument is listening\n\n // create a list of all primary addresses to search\n short LookUp[] = new short[2];\n\n // initialize the list; NOADDR signifies the end of the array\n LookUp[0] = (short) m_GPIB_Adr;\n LookUp[1] = (short) NOADDR;\n\n // log starting to look for listener\n m_Logger.log(Level.FINE, \"Looking for Listener at GPIB address {0}.\\n\", Integer.toString(m_GPIB_Adr));\n\n\n // find the Listener\n // Results will contain the addresses of all listening devices found by FindLstn\n short[] Results = new short[1];\n m_gpib32.FindLstn(BOARD_NR, LookUp, Results, 1);\n\n // clean up if there was an error and throw an exception\n str = \"The GPIB_NI driver could not issue FindLstn call.\\n\";\n checkErrorGPIB(str, true);\n \n\n // get the number of Listeners found\n int NrListeners = (int)m_ibcntl.getValue();\n\n // log # of Listeners found\n m_Logger.log(Level.FINE, \"Found {0} Listeners.\\n\", Integer.toString(NrListeners));\n\n\n // Exit if no Listener was found\n if (NrListeners != 1) {\n str = \"No Instrument is listening on GPIB address \" +\n Integer.toString(m_GPIB_Adr) + \".\\n\";\n str += getGPIBStatus();\n\n // close connection to the Instrument\n CloseInstrument();\n\n m_Logger.severe(str);\n throw new IOException(str);\n }\n\n ///////////////\n // Clear Device\n\n // send the GPIB Selected Device Clear (SDC) command message\n m_gpib32.DevClear(BOARD_NR, (short)m_UnitDescriptor);\n\n // clean up if there was an error and throw an exception\n str = \"Unable to clear the Listener at GPIB addresss \" +\n Integer.toString(m_GPIB_Adr) + \".\\n\";\n checkErrorGPIB(str, true);\n \n\n // log all devices cleared\n m_Logger.log(Level.FINE, \"Instrument at address {0} cleared (SDC).\\n\", Integer.toString(m_GPIB_Adr));\n }" ]
[ "0.63165915", "0.624727", "0.616915", "0.5959613", "0.5914296", "0.58644366", "0.5861324", "0.56386137", "0.5632426", "0.56248325", "0.55663997", "0.55532974", "0.5538782", "0.5519919", "0.55195504", "0.5500657", "0.5483897", "0.54660875", "0.54660875", "0.543709", "0.54298025", "0.5419852", "0.5409802", "0.5401539", "0.53791404", "0.53706115", "0.5370263", "0.53588074", "0.5354028", "0.5333898", "0.5332081", "0.53279155", "0.5316284", "0.5293011", "0.52845246", "0.5277747", "0.52741045", "0.5271278", "0.5269051", "0.52594125", "0.52527326", "0.5241791", "0.5241791", "0.5236728", "0.52329993", "0.52296025", "0.5228345", "0.5226389", "0.5226389", "0.52248776", "0.5214046", "0.5214031", "0.5209275", "0.5207413", "0.5203479", "0.5199981", "0.5196178", "0.51945996", "0.51904696", "0.51859975", "0.5177591", "0.5176219", "0.51661044", "0.5152585", "0.5147558", "0.513595", "0.5134626", "0.51317054", "0.51287305", "0.51242405", "0.5116071", "0.51155776", "0.5115264", "0.5114436", "0.5111422", "0.51096416", "0.51046455", "0.51035696", "0.5100203", "0.5098947", "0.5098147", "0.50979406", "0.5096467", "0.5094197", "0.5090841", "0.50877655", "0.50856036", "0.5083872", "0.5083872", "0.50836825", "0.50767994", "0.5067814", "0.506537", "0.5057704", "0.50557226", "0.5054094", "0.5051171", "0.50469226", "0.50463456", "0.5046175", "0.5041755" ]
0.0
-1
Converti un boolean a en int (true = 1 / False = 0)
int boolToInt(boolean a) { return Boolean.compare(a, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int toInt(boolean b) {\n return b ? 1 : 0;\n }", "private void IntToBool()throws TokenException{\n\t\tif (getTkn()==TipeToken.Bilangan)\n\t\t\tif (getTipeBilangan()==Tipe._int)\n\t\t\t\tif (getBilanganInt()==0){\n\t\t\t\t\tSetBilangan(false);\n\t\t\t\t\treturn;\n\t\t\t\t}else if (getBilanganInt()==1){\n\t\t\t\t\tSetBilangan(true);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\tthrow new TokenException(\"THIS TOKEN CANNOT BE CONVERTED TO BOOL\");\n\t\t}", "private String boolToIntString(boolean bool) {\n return bool ? \"1\" : \"0\";\n }", "public Boolean int_to_boolean(int arg){\r\n\t\tif (arg == 1)\r\n\t\t\treturn true;\r\n\t\telse return false;\r\n\t}", "private boolean intToBoolean(int arg) {\n\t\tif (arg == 0) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "static public int convertBoolToInt(boolean cat){\n\t\tif(cat){\n\t\t\treturn CAT_DANGER;\n\t\t}else{\n\t\t\treturn CAT_SAFE;\n\t\t}\n\t}", "private static Integer m19493a(boolean z) {\n return Integer.valueOf(z);\n }", "public static Boolean softToBooleanObject(Integer value) {\n return BooleanUtils.toBooleanObject(value == null ? new Integer(0) : value);\n }", "public static boolean softToBoolean(Integer value) {\n return BooleanUtils.toBoolean(value == null ? new Integer(0) : value);\n }", "boolean getBoolValue();", "boolean getBoolValue();", "public static int getBit(boolean value) {\n return value ? Constants.BIT_TRUE : Constants.BIT_FALSE;\n }", "private int bitToInt(char bit) {\n return bit == '0' ? 0 : 1;\n }", "public String toBooleanValueString(boolean bool) {\n \t\treturn bool ? \"1\" : \"0\";\n \t}", "public int getTrueValue()\n {\n\t// Local constants\n\n\t// Local variables\n\n\t/************ Start getTrueValue Method ***************/\n\n // Return true value\n return trueValue;\n\n }", "public boolean isInteger();", "public static Value makeBool(boolean b) {\n if (b)\n return theBoolTrue;\n else\n return theBoolFalse;\n }", "public Boolean asBoolean();", "public long toInt(boolean isSigned) {\r\n\t\treturn LLVMGenericValueToInt(ref, isSigned ? 1 : 0);\r\n\t}", "boolean booleanOf();", "boolean hasIntValue();", "public LlvmValue visit(BooleanType n){\n\t\treturn LlvmPrimitiveType.I1;\n\t}", "public static int sign(boolean b) {\n if (b)\n return 1;\n return -1;\n }", "public static boolean toPrimitiveBoolean(Boolean value) {\n if (value == null) {\n return false;\n }\n return value;\n }", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default boolean asBool() {\n \n return notSupportedCast(BasicTypeID.BOOL);\n }", "abstract public boolean getAsBoolean();", "boolean hasInt();", "int getBitAsInt(int index);", "public void testPositiveScalar() {\n Object value;\n\n /*\n * fixme Boolean converters not implemented value = LocaleConvertUtils.convert(\"true\", Boolean.TYPE); assertTrue(value instanceof Boolean);\n * assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"true\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(),\n * true);\n *\n * value = LocaleConvertUtils.convert(\"yes\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"yes\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"y\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"y\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"on\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"on\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), true);\n *\n * value = LocaleConvertUtils.convert(\"false\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(),\n * false);\n *\n * value = LocaleConvertUtils.convert(\"false\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(),\n * false);\n *\n * value = LocaleConvertUtils.convert(\"no\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"no\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"n\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"n\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"off\", Boolean.TYPE); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(), false);\n *\n * value = LocaleConvertUtils.convert(\"off\", Boolean.class); assertTrue(value instanceof Boolean); assertEquals(((Boolean) value).booleanValue(),\n * false);\n */\n\n value = LocaleConvertUtils.convert(\"123\", Byte.TYPE);\n assertTrue(value instanceof Byte);\n assertEquals(((Byte) value).byteValue(), (byte) 123);\n\n value = LocaleConvertUtils.convert(\"123\", Byte.class);\n assertTrue(value instanceof Byte);\n assertEquals(((Byte) value).byteValue(), (byte) 123);\n\n /*\n * fixme Character conversion not implemented yet value = LocaleConvertUtils.convert(\"a\", Character.TYPE); assertTrue(value instanceof Character);\n * assertEquals(((Character) value).charValue(), 'a');\n *\n * value = LocaleConvertUtils.convert(\"a\", Character.class); assertTrue(value instanceof Character); assertEquals(((Character) value).charValue(), 'a');\n */\n /*\n * fixme - this is a discrepancy with standard converters ( probably not major issue ) value = LocaleConvertUtils.convert(\"java.lang.String\",\n * Class.class); assertTrue(value instanceof Class); assertEquals(String.class, (Class) value);\n */\n\n value = LocaleConvertUtils.convert(\"123\" + decimalSeparator + \"456\", Double.TYPE);\n assertTrue(value instanceof Double);\n assertEquals(((Double) value).doubleValue(), 123.456, 0.005);\n\n value = LocaleConvertUtils.convert(\"123\" + decimalSeparator + \"456\", Double.class);\n assertTrue(value instanceof Double);\n assertEquals(((Double) value).doubleValue(), 123.456, 0.005);\n\n value = LocaleConvertUtils.convert(\"123\" + decimalSeparator + \"456\", Float.TYPE);\n assertTrue(value instanceof Float);\n assertEquals(((Float) value).floatValue(), (float) 123.456, (float) 0.005);\n\n value = LocaleConvertUtils.convert(\"123\" + decimalSeparator + \"456\", Float.class);\n assertTrue(value instanceof Float);\n assertEquals(((Float) value).floatValue(), (float) 123.456, (float) 0.005);\n\n value = LocaleConvertUtils.convert(\"123\", Integer.TYPE);\n assertTrue(value instanceof Integer);\n assertEquals(((Integer) value).intValue(), 123);\n\n value = LocaleConvertUtils.convert(\"123\", Integer.class);\n assertTrue(value instanceof Integer);\n assertEquals(((Integer) value).intValue(), 123);\n\n value = LocaleConvertUtils.convert(\"123\", Long.TYPE);\n assertTrue(value instanceof Long);\n assertEquals(((Long) value).longValue(), 123);\n\n value = LocaleConvertUtils.convert(\"123456\", Long.class);\n assertTrue(value instanceof Long);\n assertEquals(((Long) value).longValue(), 123456);\n\n /*\n * fixme - Short conversion not implemented at this point value = LocaleConvertUtils.convert(\"123\", Short.TYPE); assertTrue(value instanceof Short);\n * assertEquals(((Short) value).shortValue(), (short) 123);\n *\n * value = LocaleConvertUtils.convert(\"123\", Short.class); assertTrue(value instanceof Short); assertEquals(((Short) value).shortValue(), (short) 123);\n */\n\n String input;\n\n input = \"2002-03-17\";\n value = LocaleConvertUtils.convert(input, Date.class);\n assertTrue(value instanceof Date);\n assertEquals(input, value.toString());\n\n input = \"20:30:40\";\n value = LocaleConvertUtils.convert(input, Time.class);\n assertTrue(value instanceof Time);\n assertEquals(input, value.toString());\n\n input = \"2002-03-17 20:30:40.0\";\n value = LocaleConvertUtils.convert(input, Timestamp.class);\n assertTrue(value instanceof Timestamp);\n assertEquals(input, value.toString());\n\n }", "public static byte toByte(Boolean bool)\r\n {\r\n return bool == null ? (byte)0 : Boolean.FALSE.equals(bool) ? (byte)1 : (byte)2;\r\n }", "public int addValue(boolean b) {\n return foldIn(b ? 0 : 1);\n }", "public Boolean toBool(){\n\t\tString s = txt().trim();\n\t\tBoolean i;\n\t\ttry{\n\t\t\ti = Boolean.parseBoolean(s);\n\t\t}catch(NumberFormatException exp){\n\t\t\texp.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\treturn i;\t\n\t}", "public static String booleanToString(boolean val){\n return val ? \"1\" : \"0\";\n }", "private int toInt(String binary){\n if (bitToInt(binary.charAt(0)) == 0){\n return positiveBinToInt(binary);\n }\n else{\n return negativeBinaryToInt(binary);\n }\n }", "public abstract boolean read_boolean();", "public void setIsAutoNumbered(java.lang.Boolean value);", "boolean readBoolean();", "@Override\n\t\tpublic Boolean convert(String s) {\n\t\t\tString value = s.toLowerCase();\n\t\t\tif (\"true\".equals(value) || \"1\".equals(value) /* || \"yes\".equals(value) || \"on\".equals(value) */) {\n\t\t\t\treturn Boolean.TRUE;\n\t\t\t}\n\t\t\telse if (\"false\".equals(value) || \"0\".equals(value) /* || \"no\".equals(value) || \"off\".equals(value) */) {\n\t\t\t\treturn Boolean.FALSE;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new RuntimeException(\"Can not parse to boolean type of value: \" + s);\n\t\t\t}\n\t\t}", "public int getInteger(int index)\r\n\t{\r\n\t\tint i = 0;\r\n\r\n\t\t// Calculate the needed size and offset of the int within the binary string.\r\n\t\tint size = intSize - (signedInt ? 1 : 0);\r\n\t\tint offset = intSize * index;\r\n\r\n\t\t// This loop uses simple bit operations to turn the boolean array into an int.\r\n\t\tfor (int a = 0; a < size; a++)\r\n\t\t\ti |= (binary[a + offset] ? 1 : 0) << a;\r\n\r\n\t\t// If the int is signed, flip the value based on the state of the last binary\r\n\t\t// bit.\r\n\t\tif (signedInt)\r\n\t\t\tif (binary[intSize - 1 + offset])\r\n\t\t\t\ti = -i;\r\n\r\n\t\treturn i;\r\n\t}", "private VectorArit VectorToInt(VectorArit v) {\r\n LinkedList<Object> l = new LinkedList<>();\r\n for (int i = 0; i < v.getTamanio(); i++) {\r\n Object o = v.Acceder(i);\r\n if (o instanceof Integer) {\r\n l.add(o);\r\n } else {\r\n l.add((Boolean) o ? 1 : 0);\r\n }\r\n }\r\n return new VectorArit(TipoPrimitivo.INTEGER, l);\r\n }", "public static boolean datoBoolean(){\n try {\n return(Boolean.parseBoolean(dato()));\n } catch (NumberFormatException error) {\n return(false);\n }\n }", "public Value restrictToStrBoolNum() {\n checkNotPolymorphicOrUnknown();\n Value r = new Value(this);\n r.object_labels = r.getters = r.setters = null;\n r.flags &= STR | BOOL | NUM;\n return canonicalize(r);\n }", "public BooleanValue(boolean bool) {\r\n this.val = bool;\r\n }", "public VfeLkBooleanAdp(Byte booleanId) { this.booleanId = booleanId; }", "public IntType asInt(){\n return TypeFactory.getIntType(this.toInt(this.getValue()));\n }", "public void setBooleanId(Byte booleanId) { this.booleanId = booleanId; }", "boolean getBoolean();", "boolean getBoolean();", "public Object bool(String value) {\r\n if (value == null) return null;\r\n return isOracle() ? Integer.valueOf((isTrue(value) ? 1 : 0)) :\r\n Boolean.valueOf(isTrue(value));\r\n }", "@Id\n/* */ @Column(name = \"BOOLEAN_ID\", unique = true, precision = 1, scale = 0)\n/* 26 */ public Byte getBooleanId() { return this.booleanId; }", "static boolean boolFrBit(int input){\n return input!=0;\n }", "boolean getValue();", "boolean getBit(int index);", "public boolean nextBoolean(){\r\n\t\treturn (nextInt() & 0x10) == 0;\r\n\t}", "public boolean booleanValue() {\n if (originalValue instanceof Boolean) {\n return (Boolean) originalValue;\n } else if (originalValue instanceof Number) {\n return ((Number) originalValue).intValue() != 0;\n } else {\n throw new CellValueCastException();\n }\n }", "public boolean getBoolValue() {\n return boolValue_;\n }", "@SuppressFBWarnings(\"NP_BOOLEAN_RETURN_NULL\")\r\n public static Boolean fromByte(byte b)\r\n {\r\n return b == 0 ? null : b == 1 ? Boolean.FALSE : Boolean.TRUE;\r\n }", "public static int m22558b(boolean z) {\n return 1;\n }", "BoolOperation createBoolOperation();", "void writeBool(boolean value);", "public static boolean tokenToBool(Token i) {\n return Boolean.valueOf(i.image);\n }", "public static void main(String[] args){\n int num= 120;\n boolean positive = num>0;\n boolean negative = num <0;\n boolean zero = num ==0;\n\n\n System.out.println(num + \" is positive? \"+positive);\n System.out.println(num + \" is negative? \"+negative);\n System.out.println(num + \" is zero? \"+zero);\n\n\n\n }", "private static int convertByteToPositiveInt(byte value) {\n return value >= 0 ? value : value + INTEGER_COMPLEMENT;\n }", "@Override // kotlin.p2243e.p2244a.AbstractC32522b\n public /* synthetic */ Boolean invoke(Boolean bool) {\n return Boolean.valueOf(mo78020a(bool));\n }", "int intValue();", "public boolean getBoolValue() {\n return boolValue_;\n }", "public int evaluateAsInt();", "public static boolean esBooleano (int tipoSQL) {\n\t \n\t switch (tipoSQL) {\n\t \tcase Types.BIT :\n\t \tcase Types.BOOLEAN :\n\t \t return true;\n\t }\n\t return false;\n\t}", "public boolean readBoolean() {\n return (((readLong() & 1) == 1) ? true : false);\n }", "void mo64153a(boolean z);", "public Boolean getValue() {\n/* 60 */ return Boolean.valueOf(this.val);\n/* */ }", "public int read(boolean[] b) throws IOException {\n\t\treturn read(b, 0, b.length);\n\t}", "public int toInt()\n\t{\n\t\treturn (int) toLong();\n\t}", "static SibillaValue of(boolean v) {\n if (v) {\n return SibillaBoolean.TRUE;\n } else {\n return SibillaBoolean.FALSE;\n }\n }", "void boolean1(boolean a);", "public boolean getAIntegerChanged() {\r\n return !OpbComparisonHelper.isEqual(\r\n aInteger, aIntegerDataSourceValue);\r\n }", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default int asInt() {\n \n return notSupportedCast(BasicTypeID.INT);\n }", "void mo28309a(boolean z, int i);", "void setBit(int index, boolean value);", "public int countByTodoBooleanStat(boolean todoBooleanStat);", "public int intValue();", "public boolean isInt() {\n return this.data instanceof Integer;\n }", "void mo6661a(boolean z);", "@Override\n\t\tpublic BooleanType toBooleanType() {\n\t\t\treturn new BooleanType(false);\n\t\t}", "@Override\n\t\tpublic BooleanType toBooleanType() {\n\t\t\treturn new BooleanType(false);\n\t\t}", "public static Value makeBool(Bool b) {\n if (b.isMaybeAnyBool())\n return theBoolAny;\n else if (b.isMaybeTrueButNotFalse())\n return theBoolTrue;\n else if (b.isMaybeFalseButNotTrue())\n return theBoolFalse;\n else\n return theNone;\n }", "@java.lang.Override\n public boolean getBoolValue() {\n if (typeCase_ == 2) {\n return (java.lang.Boolean) type_;\n }\n return false;\n }", "void mo12636a(boolean z);", "void mo21069a(boolean z);", "void mo22049es(boolean z);", "@Test\n\tpublic void testStringToBoolean() {\n\n\t\t// forwards for yes and no\n\t\tAssert.assertEquals(converter.convertForward(\"Yes\"), new Boolean(true));\n\t\tAssert.assertEquals(converter.convertForward(\"No\"), new Boolean(false));\n\n\t}", "private boolean convertToBoolean (String s) {\n return (\"1\".equalsIgnoreCase(s)\n || \"yes\".equalsIgnoreCase(s)\n || \"true\".equalsIgnoreCase(s)\n || \"on\".equalsIgnoreCase(s)\n || \"y\".equalsIgnoreCase(s)\n || \"t\".equalsIgnoreCase(s));\n }", "private String convertBoolean(boolean booToConv) {\n\t\tString convText = \"\";\n\t\tif (booToConv) {\n\t\t\tconvText = \"Yes\";\n\t\t} else {\n\t\t\tconvText = \"No\";\n\t\t}\n\t\treturn convText;\n\t}", "public boolean getBoolean();", "void mo197b(boolean z);", "void mo28742b(boolean z, int i);", "protected Boolean geBoolValue() {\n return boolValue;\n }", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();" ]
[ "0.8276888", "0.73951024", "0.7218838", "0.7120767", "0.7060739", "0.6583078", "0.62661904", "0.62055707", "0.6160846", "0.61543864", "0.61543864", "0.6074493", "0.6015292", "0.6012994", "0.59834886", "0.596119", "0.59220815", "0.59207004", "0.5844289", "0.5817784", "0.5809797", "0.5780495", "0.57757187", "0.57165986", "0.5711158", "0.5674068", "0.5654064", "0.5643389", "0.5571756", "0.5556426", "0.55515194", "0.55434203", "0.5543287", "0.5532919", "0.5521152", "0.55022466", "0.5482534", "0.5459131", "0.5437787", "0.54177284", "0.53988534", "0.53967535", "0.5385091", "0.5384681", "0.53783804", "0.53752714", "0.53538615", "0.53538615", "0.53519416", "0.5349855", "0.53383523", "0.5321711", "0.5320363", "0.5318903", "0.5317238", "0.53168803", "0.53080136", "0.530551", "0.53035474", "0.5294784", "0.52869195", "0.52817583", "0.52680975", "0.5260981", "0.5260803", "0.5252487", "0.5240902", "0.5234933", "0.5233751", "0.52334017", "0.5227464", "0.52224773", "0.5221337", "0.5215598", "0.52015173", "0.52003926", "0.5199677", "0.5199668", "0.51920015", "0.5191379", "0.5191102", "0.5184202", "0.5183595", "0.5180977", "0.5180977", "0.51780677", "0.51764756", "0.5175846", "0.5172352", "0.5168101", "0.51677054", "0.51659036", "0.5145466", "0.51451343", "0.5141956", "0.5138876", "0.5132472", "0.5125375", "0.5125375", "0.5125375" ]
0.8001292
1
Fonction qui affiche une machine
public void afficher() { System.out.println(this.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\r\n\t\tMachine mac = new Machine();\r\n\t\t\r\n\t\tmac.start();\r\n\t\tmac.stop();\r\n\t\tSystem.out.println(\"----------------------\");\r\n\t\t\r\n\t\tCar bmw = new Car();\r\n\t\tbmw.start();\r\n\t\tbmw.stop();\r\n\t\tbmw.re_strat();\r\n\t\tSystem.out.println(\"-------------------\");\r\n\t\t\r\n\t\tMachine alto = new Car();\r\n\t\t\t\talto.start();\r\n\t\talto.stop();\r\n\t\tSystem.out.println(alto.engsize);\r\n\t\tSystem.out.println(\"---------------------------\");\t\r\n\t}", "public void start() {\n System.out.println(\"Machine started.\");\n }", "public void printMachine(){\n\t\tfor(State s:theStates){\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}", "public Machine machine() {\n return machine;\n }", "private static void sample1() {\n\t\tIComputer computer = new Computer();\n\t\tcomputer.setProgram(\n\t\t\t(byte) 0x70,\n\t\t\t(byte) 0x71,\n\t\t\t(byte) 0xc0,\n\t\t\t(byte) 0xc1,\n\t\t\t(byte) 0x70,\n\t\t\t(byte) 0xc0,\n\t\t\t(byte) 0xff);\n\t\tTestContext context = new TestContext(\n\t\t (byte) 0xa1, (byte) 0x9b, (byte) 0x3c);\n\t\tcomputer.run(context);\n\t\tSystem.out.println(context.outputToString());\n\t}", "private static void sample2() {\n\t\tIComputer computer = new Computer();\n\t\tcomputer.setProgram(\n\t\t\t(byte) 0x70,\n\t\t\t(byte) 0xff,\n\t\t\t(byte) 0xc0,\n\t\t\t(byte) 0xc1,\n\t\t\t(byte) 0x70,\n\t\t\t(byte) 0xc0,\n\t\t\t(byte) 0xff);\n\t\tTestContext context = new TestContext(\n\t\t (byte) 0xa1, (byte) 0x9b, (byte) 0x3c);\n\t\tcomputer.run(context);\n\t\tSystem.out.println(context.outputToString());\n\t}", "@Override\r\n\tpublic void onMachine() {\n System.out.println(\"Please On the machine to cook \");\r\n grillmachine.setState(grillmachine.getOnState());\r\n\t}", "@Override\n\tpublic void stopMachine() {\n\t\t\n\t}", "void powerOn();", "public void cpu() {\n\n\t\tint bytecode;\n\t\tint v1, v2;\n\t\tint address;\n\t\twhile (true) {\n\t\t\tbytecode = code[ip++]; // fetch\n\t\t\t\n\t\t\t//Decode\n\t\t\tswitch (bytecode) {\n\t\t\t\n\t\t\tcase VMParser.PUSH:\n\t\t\t\t//System.out.println(\"PUSH\");\n\t\t\t\tpush(code[ip++]);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.POP:\n\t\t\t\t//System.out.println(\"POP\");\n\t\t\t\tpop();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.ADD:\n\t\t\t\t//System.out.println(\"ADD\");\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tpush(v1 + v2);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.SUB:\n\t\t\t\t//System.out.println(\"SUB\");\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tpush(v1 - v2);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.MULT:\n\t\t\t\t//System.out.println(\"MULT\");\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tpush(v1 * v2);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.DIV:\n\t\t\t\t//System.out.println(\"DIV\");\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tpush(v1 / v2);\n\t\t\t\tbreak;\n\n\t\t\tcase VMParser.SW:\n\t\t\t\t//System.out.println(\"SW\");\n\t\t\t\taddress = pop();\n\t\t\t\tv2 = pop();\n\t\t\t\tmemory[address] = v2;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.LW:\n\t\t\t\t//System.out.println(\"LW\");\n\t\t\t\taddress = pop();\n\t\t\t\tpush(memory[address]);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.BRANCHEQUAL:\n\t\t\t\t//System.out.println(\"BRANCHEQUAL\");\n\t\t\t\taddress = code[ip++];\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tif (v1 == v2)\n\t\t\t\t\tip = address;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.JS:\n\t\t\t\t//System.out.println(\"JS\");\n\t\t\t\tra = ip;\n\t\t\t\taddress = pop();\n\t\t\t\tip = address;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.LRA:\n\t\t\t\t//System.out.println(\"LRA\");\n\t\t\t\tpush(ra);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.SRA:\n\t\t\t\t//System.out.println(\"SRA\");\n\t\t\t\tra = pop();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.LRV:\n\t\t\t\t//System.out.println(\"LRV\");\n\t\t\t\tpush(rv);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.SRV:\n\t\t\t\t//System.out.println(\"SRV\");\n\t\t\t\trv = pop();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.LHP:\n\t\t\t\t//System.out.println(\"LHP\");\n\t\t\t\tpush(hp);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.SHP:\n\t\t\t\t//System.out.println(\"SHP\");\n\t\t\t\thp = pop();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.LFP:\n\t\t\t\t//System.out.println(\"LFP\");\n\t\t\t\tpush(fp);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.SFP:\n\t\t\t\t//System.out.println(\"SFP\");\n\t\t\t\tfp = pop();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.CFP:\n\t\t\t\t//System.out.println(\"CFP\");\n\t\t\t\tfp = sp;\n\t\t\t\tbreak;\n\n\n\t\t\tcase VMParser.BRANCH:\n\t\t\t\t//System.out.println(\"BRANCH\");\n\t\t\t\taddress = code[ip++];\n\t\t\t\tip = address;\n\t\t\t\tbreak;\n\n\t\t\tcase VMParser.BRANCHLESS:\n\t\t\t\t//System.out.println(\"BRANCHLESS\");\n\t\t\t\taddress = code[ip++];\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tif (v1 <= v2)\n\t\t\t\t\tip = address;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.BRANCHGREAT:\n\t\t\t\t//System.out.println(\"BRANCHGREAT\");\n\t\t\t\taddress = code[ip++];\n\t\t\t\tv2 = pop();\n\t\t\t\tv1 = pop();\n\t\t\t\tif (v1 >= v2)\n\t\t\t\t\tip = address;\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase VMParser.PRINT:\n\t\t\t\t//System.out.println(\"PRINT\");\n\t\t\t\tSystem.out.println(memory[sp]);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\tcase VMParser.HALT:\n\t\t\t\t//System.out.println(\"HALT\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public String getClientMachine();", "public void mo21867i() {\n mo21877s();\n }", "public OperatingSystem(Machine machine) throws MemoryFault, Exception {\n //List<Program> program = new LinkedList<>();\n this.machine = machine;\n\n for (int i = 0; i < waitQ.length; i++) {\n waitQ[i] = new LinkedList<>();\n }\n\n //Process_Table = new PCB[10]; \n ProgramBuilder wait = new ProgramBuilder();\n wait.size(2);\n wait.jmp(0);\n Program waiter = wait.build();\n program.add(waiter);\n\n freespace.add(new freeSpace(0, this.machine.MEMORY_SIZE));\n System.out.println(\"[Debug] Initial freeSpace size: \" + freespace.get(0).size);\n schedule(program);\n }", "public void cpu(int PC,int trace) throws IOException {\r\n\t\t//Initializing the required variables\r\n\t\tclock=0;\r\n\t\tNatureTermination=\"\";\r\n\t\r\n\t\t//writing job details to output file\r\n\t\tSYSTEM sys= new SYSTEM();\r\n\t\t//creating registers array\r\n\t\tString[] registers= new String[] {\"0000000000000000\",\r\n\t\t\t\t\"0000000000000000\",\r\n\t\t\t\t\"0000000000000000\",\r\n\t\t\t\t\"0000000000000000\",\r\n\t\t\t\t\"0000000000000000\",\r\n\t\t\t\t\"0000000000000000\",\r\n\t\t\t\t\"0000000000000000\",\r\n\t\t\t\t\"0000000000000000\"};\r\n\t\t\r\n\t\t//output trace file \r\n\t\tFile outputfile = new File(\"trace-file.txt\");\r\n Writer output1 = new BufferedWriter(new FileWriter(outputfile));\r\n if(trace==1) {\r\n output1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", \"PC\", \"instruction\", \"R\", \"EA\",\"(R)\", \"(EA)\",\"(R)\",\"(EA)\"));\r\n }\r\n \r\n \r\n \r\n //invoking memory class\r\n MEMORY memory = new MEMORY();\r\n //looping through instructions\r\n while(true) {\r\n \t//segmenting the instructions\r\n \tString Z= MEMORY.Memory(\"READ\",PC, \"\");\r\n\t\t\tint source= Integer.parseInt(Z.substring(7)+MEMORY.Memory(\"READ\",PC+1, \"\").substring(0,2), 2);\r\n\t\t\tint dest=Integer.parseInt(Z.substring(4,7), 2);\r\n\t\t\tint target=Integer.parseInt(MEMORY.Memory(\"READ\",PC+1, \"\").substring(2,5), 2);\r\n\t\t\tint immed6,immed12;\t\r\n\t\t\tif(MEMORY.Memory(\"READ\",PC+1, \"\").substring(2).charAt(0)=='1') {\r\n\t\t\t\timmed6=(int)Long.parseLong((\"11111111111111111111111111\"+MEMORY.Memory(\"READ\",PC+1, \"\").substring(2)),2);\r\n\t\t\t}else {\r\n\t\t\t\timmed6=Integer.parseInt(MEMORY.Memory(\"READ\",PC+1, \"\").substring(2),2);\r\n\t\t\t}\r\n\t\t\tif((Z.substring(4)+MEMORY.Memory(\"READ\",PC+1, \"\")).charAt(0)=='1') {\r\n\t\t\t\timmed12=(int)Long.parseLong((\"11111111111111111111\"+Z.substring(4)+MEMORY.Memory(\"READ\",PC+1, \"\")),2);\r\n\t\t\t}else {\r\n\t\t\t\timmed12=Integer.parseInt(Z.substring(4)+MEMORY.Memory(\"READ\",PC+1, \"\"),2);\r\n\t\t\t}\r\n\t\t\tString instruction;\r\n\t\t\tString R1,R2,R3;\r\n\t\t\tString EA1,EA2,EA3;\r\n\t\t\tString before1,before2,before3,after1,after2,after3;\r\n\t\t\t//checking for the infinite loop\r\n\t\t\tif(clock>ClockMax) {\r\n\t\t\t\toutput1.close();\r\n\t\t\t\tERROR_HANDLER.errorHandler(5);\r\n\t\t\t}\r\n\t\t\t//reading the opcode and perrforming actions accordingly\r\n\t\t\tswitch(MEMORY.Read(PC).substring(0,4)) {\r\n\t\t\tcase \"0000\":\r\n\t\t\t\t//addition operation\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tbefore2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[target].charAt(0)=='1') {\r\n\t\t\t\t\tbefore3=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[target]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore3=\"\"+Integer.parseInt((registers[target]),2);\r\n\t\t\t\t}\r\n\t\t\t\tString s3=Integer.toBinaryString(Integer.parseInt((registers[source]),2)+Integer.parseInt((registers[target]),2));\r\n\t\t\t\tint l3=s3.length();\r\n\t\t\t\tif(l3>16) {\r\n\t\t\t\t\ts3=s3.substring(l3-16,l3);\r\n\t\t\t\t\tl3=16;\r\n\t\t\t\t}\r\n\t\t\t\tregisters[dest]=l3==16?s3:\"0000000000000000\".substring(0,16-l3) + s3;\r\n\t\t\t\tinstruction = \"add \"+\"r\"+dest+\",\"+\"r\"+source+\",\"+\"r\"+target;\r\n\t\t\t\tR1=\"r\"+dest;\r\n\t\t\t\tR2=\"r\"+source;\r\n\t\t\t\tR3=\"r\"+target;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tafter2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[target].charAt(0)=='1') {\r\n\t\t\t\t\tafter3=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[target]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter3=\"\"+Integer.parseInt((registers[target]),2);\r\n\t\t\t\t}\r\n\t\t\t\t//writing to trace file\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", \"\",\"\",R2,\"\",before2,\"\",after2,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", \"\",\"\",R3,\"\",before3,\"\",after3,\"\"));\r\n\t\t\t \r\n\t\t\t\t}\r\n\t\t\t\tclock++;\r\n\t\t\t\tPC = PC + 2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t//Addition immediate operation\r\n\t\t\tcase \"0001\":\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tbefore2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tbefore3=\"\"+immed6;\r\n\t\t\t\tString s8=Integer.toBinaryString(Integer.parseInt((registers[source]),2)+immed6);\r\n\t\t\t\tint l8 = s8.length();\r\n\t\t\t\t\r\n\t\t\t\tregisters[dest]= l8==16?s8:\"0000000000000000\".substring(0,16-l8) + s8;\r\n\t\t\t\tinstruction = \"addi \"+\"r\"+dest+\",\"+\"r\"+source+\",\"+immed6;\r\n\t\t\t\tR1=\"r\"+dest;\r\n\t\t\t\tR2=\"r\"+source;\r\n\t\t\t\tR3=\"r\"+immed6;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tafter2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tafter3=\"\"+immed6;\r\n\t\t\t\t//writing to trace file\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", \"\",\"\",R2,\"\",before2,\"\",after2,\"\"));}\r\n\t\t\t\tclock++;\r\n\t\t\t\tPC = PC + 2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t//subtraction operation\r\n\t\t\tcase \"0010\":\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tbefore2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[target].charAt(0)=='1') {\r\n\t\t\t\t\tbefore3=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[target]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore3=\"\"+Integer.parseInt((registers[target]),2);\r\n\t\t\t\t}\r\n\t\t\t\tString s4=Integer.toBinaryString(Integer.parseInt((registers[source]),2)-Integer.parseInt((registers[target]),2));\r\n\t\r\n\t\t\t\tint l4=s4.length();\r\n\t\t\t\tif(l4>16) {\r\n\t\t\t\t\ts4=s4.substring(l4-16,l4);\r\n\t\t\t\t\tl4=16;\r\n\t\t\t\t}\r\n\t\t\t\tregisters[dest]=l4==16?s4:\"0000000000000000\".substring(0,16-l4) + s4;\r\n\t\t\t\tinstruction = \"sub \"+\"r\"+dest+\",\"+\"r\"+source+\",\"+\"r\"+target;\r\n\t\t\t\tR1=\"r\"+dest;\r\n\t\t\t\tR2=\"r\"+source;\r\n\t\t\t\tR3=\"r\"+target;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tafter2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[target].charAt(0)=='1') {\r\n\t\t\t\t\tafter3=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[target]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter3=\"\"+Integer.parseInt((registers[target]),2);\r\n\t\t\t\t}\r\n\t\t\t\t//writing to trace file\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", \"\",\"\",R2,\"\",before2,\"\",after2,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", \"\",\"\",R3,\"\",before3,\"\",after3,\"\"));}\r\n\t\t\t\tclock++;\r\n\t\t\t\tPC = PC + 2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t//subtraction immediate operation\r\n\t\t\tcase \"0011\":\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tbefore2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tbefore3=\"\"+immed6;\r\n\t\t\t\tString s7 = Integer.toBinaryString(Integer.parseInt((registers[source]),2)-immed6);\r\n\t\t\t\tint l7 = s7.length();\r\n\t\t\t\t\r\n\t\t\t\tif(l7>16) {\r\n\t\t\t\t\ts4=s7.substring(l7-16,l7);\r\n\t\t\t\t\tl7=16;\r\n\t\t\t\t}\r\n\t\t\t\tregisters[dest]= l7==16?s7:\"0000000000000000\".substring(0,16-l7) + s7;\r\n\t\t\t\t\r\n\t\t\t\tinstruction = \"subi \"+\"r\"+dest+\",\"+\"r\"+source+\",\"+immed6;\r\n\t\t\t\tR1=\"r\"+dest;\r\n\t\t\t\tR2=\"r\"+source;\r\n\t\t\t\tR3=\"r\"+immed6;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tafter2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tafter3=\"\"+immed6;\r\n\t\t\t\t//writing to trace file\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", \"\",\"\",R2,\"\",before2,\"\",after2,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", \"\",\"\",\"\",R3,\"\",before3,\"\",after3));\r\n\t\t\t\t}\r\n\t\t\t\tclock++;\r\n\t\t\t\t\r\n\t\t\t\tPC = PC + 2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t//trap operation\r\n\t\t\tcase \"0100\":\r\n\t\t\t\tif(registers[1].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[1]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[1]),2);\r\n\t\t\t\t}\r\n\t\t\t\tinstruction = \"trap \"+ immed12;\r\n\t\t\t\tR1=\"r1\";\r\n\t\t\t\tclock++;\r\n\t\t\t\t//HALT condition with trap =0\r\n\t\t\t\tif(immed12==0) {\r\n\t\t\t\t\toutput1.close();\r\n\t\t\t\t\t\r\n\t\t\t\t\tNatureTermination=NatureTermination+\"NORMAL\\n AND THE CLOCK VALUE is\"+Integer.toHexString(CPU.clock);\r\n\t\t\t\t\t\r\n\t\t\t\t\twriteOutput(NatureTermination, System.currentTimeMillis());\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}else if(immed12==1){\r\n\t\t\t\t\t//output on console when trap equals 1\r\n\t\t\t\t\tclock = clock +10;\r\n\t\t\t\t\tSystem.out.println(Integer.toHexString(Integer.parseInt(registers[1], 2)));\r\n\t\t\t\t\tif(registers[1].charAt(0)=='1') {\r\n\t\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[1]),2);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[1]),2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));}\r\n\t\t\t\t\t\r\n\t\t\t\t\toutput1.close();\r\n\t\t\t\t\tNatureTermination=NatureTermination+\"NORMAL\\n AND THE CLOCK VALUE is\"+Integer.toHexString(CPU.clock);\r\n\t\t\t\t\twriteOutput(NatureTermination, System.currentTimeMillis());\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t\t\r\n\t\t\t\t}else if(immed12==2) {\r\n\t\t\t\t\t//input when trap equals 2\r\n\t\t\t\t\tclock = clock +10;\r\n\t\t\t\t\tSystem.out.println(\"Enter value\");\r\n\t\t\t\t\tScanner sc1 = new Scanner(System.in);\r\n\t\t\t\t\tString s2=(Integer.toBinaryString(Integer.parseInt(sc1.next())));\r\n\t\t\t\t\tint l2=s2.length();\r\n\t\t\t\t\tif(l2>16) {\r\n\t\t\t\t\t\ts2=s2.substring(l2-16,l2);\r\n\t\t\t\t\t\tl2=16;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tregisters[1]=l2==16?s2:\"0000000000000000\".substring(0,16-l2) + s2;\r\n\t\t\t\t\tif(registers[1].charAt(0)=='1') {\r\n\t\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[1]),2);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[1]),2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\t\t\t//writing to trace file\r\n\t\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// checking for invalid trace bit\r\n\t\t\t\t\toutput1.close();\r\n\t\t\t\t\tERROR_HANDLER.errorHandler(1);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tafter1=\"\"+immed12;\r\n\t\t\t\tPC = PC + 2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t//locking memory through lockArray \r\n\t\t\tcase \"0101\":\r\n\t\t\t\tclock++;\r\n\t\t\t\tbefore1=\"\"+immed12;\r\n\t\t\t\tMEMORY.lock[immed12]=true;\r\n\t\t\t\tMEMORY.lock[immed12+1]=true;\r\n\t\t\t\tinstruction = \"lock \"+ immed12;\r\n\t\t\t\tR1=\"\"+immed12;\r\n\t\t\t\tafter1=\"\"+immed12;\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", PC,instruction,\"\",\"\",\"\",\"\",\"\",\"\"));\r\n\t\t\t\t}PC= PC+2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t//unlocking memory bytes through lockArray\r\n\t\t\tcase \"0110\":\r\n\t\t\t\tclock++;\r\n\t\t\t\tbefore1=\"\"+immed12;\r\n\t\t\t\tMEMORY.lock[immed12]= false;\r\n\t\t\t\tMEMORY.lock[immed12+1]= false;\r\n\t\t\t\tinstruction = \"unlock \"+ immed12;\r\n\t\t\t\tR1=\"\"+immed12;\r\n\t\t\t\tafter1=\"\"+immed12;\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", PC,instruction,\"\",\"\",\"\",\"\",\"\",\"\"));\r\n\t\t\t\t\r\n\t\t\t\t}PC= PC+2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t//Branching if equal to zero condition\r\n\t\t\tcase \"0111\":\r\n\t\t\t\tclock++;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tbefore2=\"\"+immed6;\r\n\t\t\t\t//incrementing PC by immed6 if equal to 0\r\n\t\t\t\tif(registers[source].equals(\"0000000000000000\")) {\r\n\t\t\t\t\tinstruction = \"beqz \"+\"(\"+\"r\"+source+\")\"+\",\"+immed6;\r\n\t\t\t\t\tR1=\"(\"+\"r\"+source+\")\";\r\n\t\t\t\t\tR2=\"\"+immed6;\r\n\t\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//after1=\"\"+Integer.parseInt(findTwoscomplement(registers[source]),2);\r\n\t\t\t\t\tafter2=\"\"+immed6;\r\n\t\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tPC = PC + immed6;\r\n\t\t\t\t}\r\n\t\t\t\t//incrementing PC by 2 if not equal to 0\r\n\t\t\t\telse if(!registers[source].equals(\"0000000000000000\")) {\r\n\t\t\t\t\tinstruction = \"beqz \"+\"(\"+\"r\"+source+\")\"+\",\"+immed6;\r\n\t\t\t\t\tR1=\"(\"+\"r\"+source+\")\";\r\n\t\t\t\t\tR2=\"\"+immed6;\r\n\t\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//after1=\"\"+Integer.parseInt(findTwoscomplement(registers[source]),2);\r\n\t\t\t\t\tafter2=\"\"+immed6;\r\n\t\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tPC = PC + 2;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\t//loading from Memory\r\n\t\t\tcase \"1000\":\r\n\t\t\t\tclock++;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tbefore2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tString s24;\r\n\t\t\t\ts24=MEMORY.Memory(\"READ\", Integer.parseInt(registers[source],2) + immed6,\"\")+\r\n\t\t\t\t\t\tMEMORY.Memory(\"READ\", Integer.parseInt(registers[source],2) + immed6+1,\"\");\r\n\t\t\t\tif(s24.charAt(0)=='1') {\r\n\t\t\t\t\tEA2=\"\"+(int)Long.parseLong((\"111111111111111111111111\"+s24),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tEA2=\"\"+Integer.parseInt((s24),2);\r\n\t\t\t\t}\r\n\t\t\t\t//EA2=\"\"+Integer.parseInt(Memory[Integer.parseInt(registers[source],2) + immed6]+Memory[Integer.parseInt(registers[source],2) + immed6+1],2);\r\n\t\t\t\t\r\n\t\t\t\tif(MEMORY.lock[Integer.parseInt(registers[source],2) + immed6]==false) {\r\n\t\t\t\t\t\tString st=s24;\r\n\t\t\t\t\t\t//System.out.println(st);\r\n\t\t\t\t\t\tint l1=st.length();\r\n\t\t\t\t\t\tregisters[dest]=l1==16?st:\"0000000000000000\".substring(0,16-l1) + st;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tERROR_HANDLER.errorHandler(8);\r\n\t\t\t\t}\r\n\t\t\t\tinstruction = \"load \"+\"r\"+dest+\",\"+immed6+\"(\"+\"r\"+source+\")\";\r\n\t\t\t\tR1 = \"r\"+dest;\r\n\t\t\t\tR2=\"r\"+source;\r\n\t\t\t\tEA1=\"\"+immed6;\r\n\t\t\t\tString s23;\r\n\t\t\t\tif((Integer.parseInt(registers[source],2) + immed6)>=LOADER.memStart&(Integer.parseInt(registers[source],2) + immed6)<2*LOADER.instr) {\r\n\t\t\t\t\toutput1.close();\r\n\t\t\t\t\tERROR_HANDLER.errorHandler(2);\r\n\t\t\t\t}else {\r\n\t\t\t\ts23=MEMORY.Memory(\"READ\", Integer.parseInt(registers[source],2) + immed6,\"\")+\r\n\t\t\t\t\t\tMEMORY.Memory(\"READ\", Integer.parseInt(registers[source],2) + immed6+1,\"\");\r\n\t\t\t\tif(s23.charAt(0)=='1') {\r\n\t\t\t\t\tEA3=\"\"+(int)Long.parseLong((\"111111111111111111111111\"+s23),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tEA3=\"\"+Integer.parseInt((s23),2);\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tafter2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", \"\",\"\",R2,\"\",before2,\"\",after2,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", \"\",\"\",\"\",EA1,\"\",EA2,\"\",EA3));\r\n\t\t\t\t}\r\n\t\t\t\tPC = PC + 2;}\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t//storing into memory\r\n\t\t\tcase \"1001\":\r\n\t\t\t\tclock++;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tbefore2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tEA1= \"\"+immed6;\r\n\t\t\t\tString s22;\r\n\t\t\t\ts22=MEMORY.Read(Integer.parseInt(registers[dest],2) + immed6)+MEMORY.Read(Integer.parseInt(registers[dest],2) + immed6+1);\r\n\t\t\t\tif(s22.charAt(0)=='1') {\r\n\t\t\t\t\tEA2=\"\"+(int)Long.parseLong((\"1111111111111111\"+s22),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tEA2=\"\"+Integer.parseInt((s22),2);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(MEMORY.lock[Integer.parseInt(registers[dest],2) + immed6]==false) {\r\n\t\t\t\t\tif((Integer.parseInt(registers[dest],2) + immed6)<2*LOADER.instr&(Integer.parseInt(registers[dest],2) + immed6)>=2*LOADER.memStart) {\r\n\t\t\t\t\t\toutput1.close();\r\n\t\t\t\t\t\tERROR_HANDLER.errorHandler(2);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tif(registers[source].length()>16) {\r\n\t\t\t\t\t\t\toutput1.close();\r\n\t\t\t\t\t\t\tERROR_HANDLER.errorHandler(4);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tMEMORY.write(Integer.parseInt(registers[dest],2) + immed6, registers[source].substring(0,8));\r\n\t\t\t\t\t\t//[Integer.parseInt(registers[dest],2) + immed6]) = registers[source].substring(0,8);\r\n\t\t\t\t\t\tMEMORY.write(Integer.parseInt(registers[dest],2) + immed6+1, registers[source].substring(8,16)); \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\telse {\r\n\t\t\t\t\t//throwing error if memory is locked\t\r\n\t\t\t\t\tERROR_HANDLER.errorHandler(8);\r\n\t\t\t\t}\r\n\t\t\t\tinstruction = \"store \"+immed6+\"(\"+\"r\"+dest+\")\"+\",\"+\"r\"+source;\r\n\t\t\t\tR1=\"r\"+dest;\r\n\t\t\t\tR2=\"r\"+source;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tafter2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tString s21;\r\n\t\t\t\ts21=MEMORY.Read(Integer.parseInt(registers[dest],2) + immed6)+MEMORY.Read(Integer.parseInt(registers[dest],2) + immed6+1);\r\n\t\t\t\tif(s21.charAt(0)=='1') {\r\n\t\t\t\t\tEA3=\"\"+(int)Long.parseLong((\"111111111111111111111111\"+s21),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tEA3=\"\"+Integer.parseInt((s21),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\t\t//writing to trace file\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", \"\",\"\",R2,\"\",before2,\"\",after2,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", \"\",\"\",\"\",EA1,\"\",EA2,\"\",EA3));\r\n\t\t\t\t}PC = PC + 2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t//Move values from one register to anotherr\r\n\t\t\tcase \"1010\":\r\n\t\t\t\tclock++;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tbefore2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tString s6=registers[source];\r\n\t\t\t\tint l6=s6.length();\r\n\t\t\t\tregisters[dest]= l6==16?s6:\"0000000000000000\".substring(0,16-l6) + s6;\r\n\t\t\t\tinstruction = \"move \"+\"r\"+dest+\",\"+\"r\"+source;\r\n\t\t\t\tR1=\"r\"+dest;\r\n\t\t\t\tR2=\"r\"+source;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tafter2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\t\t//writing to trace file\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", \"\",\"\",R2,\"\",before2,\"\",after2,\"\"));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tPC = PC + 2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t//Move immediate value to register\r\n\t\t\tcase \"1011\":\r\n\t\t\t\tclock++;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tbefore2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tint l=Integer.toBinaryString(immed6).length();\r\n\t\t\t\tregisters[dest] = l==16?Integer.toBinaryString(immed6):\"0000000000000000\".substring(0,16-l) + Integer.toBinaryString(immed6);\r\n\t\t\t\t\r\n\t\t\t\tregisters[source] = \"0000000000000000\";\r\n\t\t\t\tinstruction = \"movei \"+\"r\"+dest+\",\"+immed6;\r\n\t\t\t\tR1=\"r\"+dest;\r\n\t\t\t\tR2=\"r\"+source;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tafter2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\t\t//writing to trace file\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", \"\",\"\",R2,\"\",before2,\"\",after2,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", \"\",\"\",\"\",immed6,\"\",immed6,\"\",immed6));\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tPC = PC + 2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t//Branching if not equal to zero\r\n\t\t\tcase \"1100\":\r\n\t\t\t\tclock++;\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\t//incrementing PC by immed6 if not equal to zero\r\n\t\t\t\tif(!registers[source].equals(\"0000000000000000\") ) {\r\n\t\t\t\t\tinstruction = \"bnez \"+\"r\"+source+\",\"+immed6;\r\n\t\t\t\t\tR1=\"r\"+source;\r\n\t\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tPC = PC + immed6;\r\n\t\t\t\t}\r\n\t\t\t\t//incrementing PC by 2 if equal to zero\r\n\t\t\t\telse if(registers[source].equals(\"0000000000000000\")) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tinstruction = \"bnez \"+\"r\"+source+\",\"+immed6;\r\n\t\t\t\t\tR1=\"r\"+source;\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tPC=PC+2;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t//Shifting if equal to zero\r\n\t\t\tcase \"1101\":\r\n\t\t\t\tclock++;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tbefore2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[target].charAt(0)=='1') {\r\n\t\t\t\t\tbefore3=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[target]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore3=\"\"+Integer.parseInt((registers[target]),2);\r\n\t\t\t\t}\r\n\t\t\t\tregisters[dest]= Integer.parseInt(registers[source])==Integer.parseInt(registers[target])? \"0000000000000001\":\"0000000000000000\";\r\n\t\t\t\tinstruction = \"seq \"+\"r\"+dest+\",\"+\"r\"+source+\",\"+\"r\"+target;\r\n\t\t\t\tR1=\"r\"+dest;\r\n\t\t\t\tR2=\"r\"+source;\r\n\t\t\t\tR3=\"r\"+target;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tafter2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[target].charAt(0)=='1') {\r\n\t\t\t\t\tafter3=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[target]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter3=\"\"+Integer.parseInt((registers[target]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\t\t//writing to trace file\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", \"\",\"\",R2,\"\",before2,\"\",after2,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", \"\",\"\",R3,\"\",before3,\"\",after3,\"\"));\r\n\t\t\t\t}\r\n\t\t\t\tPC = PC + 2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t//\r\n\t\t\t\t//shifting if greater than zero\r\n\t\t\tcase \"1110\":\r\n\t\t\t\tclock++;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tbefore2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[target].charAt(0)=='1') {\r\n\t\t\t\t\tbefore3=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[target]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore3=\"\"+Integer.parseInt((registers[target]),2);\r\n\t\t\t\t}\r\n\t\t\t\tregisters[dest]= Integer.parseInt(registers[source])>Integer.parseInt(registers[target])? \"0000000000000001\":\"0000000000000000\";\r\n\t\t\t\tinstruction = \"sgt \"+\"r\"+dest+\",\"+\"r\"+source+\",\"+\"r\"+target;\r\n\t\t\t\tR1=\"r\"+dest;\r\n\t\t\t\tR2=\"r\"+source;\r\n\t\t\t\tR3=\"r\"+target;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tafter2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[target].charAt(0)=='1') {\r\n\t\t\t\t\tafter3=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[target]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter3=\"\"+Integer.parseInt((registers[target]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\t\t//writing to trace file\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", \"\",\"\",R2,\"\",before2,\"\",after2,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", \"\",\"\",R3,\"\",before3,\"\",after3,\"\"));\r\n\t\t\t\t}\r\n\t\t\t\tPC = PC + 2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t//\r\n\t\t\t\t//shift if not equal to zero\r\n\t\t\tcase \"1111\":\r\n\t\t\t\tclock++;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tbefore2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tbefore1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[target].charAt(0)=='1') {\r\n\t\t\t\t\tbefore3=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[target]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tbefore3=\"\"+Integer.parseInt((registers[target]),2);\r\n\t\t\t\t}\r\n\t\t\t\tregisters[dest]= Integer.parseInt(registers[source])!=Integer.parseInt(registers[target])? \"0000000000000001\":\"0000000000000000\";\r\n\t\t\t\tinstruction = \"sne \"+\"r\"+dest+\",\"+\"r\"+source+\",\"+\"r\"+target;\r\n\t\t\t\tR1=\"r\"+dest;\r\n\t\t\t\tR2=\"r\"+source;\r\n\t\t\t\tR3=\"r\"+target;\r\n\t\t\t\tif(registers[source].charAt(0)=='1') {\r\n\t\t\t\t\tafter2=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[source]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter2=\"\"+Integer.parseInt((registers[source]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[dest].charAt(0)=='1') {\r\n\t\t\t\t\tafter1=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[dest]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter1=\"\"+Integer.parseInt((registers[dest]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(registers[target].charAt(0)=='1') {\r\n\t\t\t\t\tafter3=\"\"+(int)Long.parseLong((\"1111111111111111\"+registers[target]),2);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tafter3=\"\"+Integer.parseInt((registers[target]),2);\r\n\t\t\t\t}\r\n\t\t\t\tif(trace == 1 ) {\r\n\t\t\t\t\t//writing to trace file\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", PC,instruction,R1,\"\",before1,\"\",after1,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\", \"\",\"\",R2,\"\",before2,\"\",after2,\"\"));\r\n\t\t\t\toutput1.write(String.format(\"%20s %20s %20s %20s %20s %20s %20s %20s \\r\\n\\n\\n\", \"\",\"\",R3,\"\",before3,\"\",after3,\"\"));\r\n\t\t\t\t}\r\n\t\t\t\tPC = PC + 2;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n }\r\n\t}", "@Override\n public void onMachineAssembled()\n {\n \n }", "public int actions()\n {\n switch (mState) \n {\n case cProcessInit:\n out();\n if (cSimTimeMicro < cClientCount/cClientTransPerMicro) {\n cSimTimeMicro = cClientCount/cClientTransPerMicro;\n System.out.println(\"\\nSimulation time is too short! It has been reset to \" + cSimTimeMicro + \" micro\\n\");\n }\n cMaxRequestsToSend = (int) (cClientTransPerMicro * cSimTimeMicro);\n System.out.println(\"cMaxRequestsToSend = \" + cMaxRequestsToSend);\n \n if (cTransLogMon)\n {\n System.out.println(cTransMonHeader);\n System.out.println(\"----------------------------------------------------------------------------------------\");\n }\n\n// if (cTick)\n// {\n// activate(new Tick());\n// }\n activate(mTaxJvm);\n return cMeJvm;\n \n case cMeJvm:\n activate(mMeJvm);\n return cMeStandbyJvm;\n\n case cMeStandbyJvm:\n activate(mMeStandbyJvm);\n return cJvmActivated;\n\n case cJvmActivated:\n mClientList = headToArray(mClient.mProcess, new Process[0]);\n \n //double tInterval = 500/tClientList.length; //500 is the minimum response time\n //double tInterval = 1.0/(cClientCount*cClientTransPerMicro); \n \n double tInterval = 1.0D*1000*1000/(cClientCount); //evenly distributed client over 1 second interval\n \n //hold until connect next client to the system \n mHoldTimeBetweenClients = cRandom.normal(tInterval, tInterval*0.3);\n mFor_i = -1;\n // Flow into loop\n\n case cForNext:\n ++mFor_i;\n //for (int i = 0; i < tClientList.length; ++i) //For every client\n if (mFor_i >= mClientList.length)\n {\n return cForEnd;\n }\n\n tClientStartTime = time();\n activate((Process) mClientList[mFor_i]); \n return cNewClient;\n \n case cNewClient:\n hold(mHoldTimeBetweenClients);\n return cForNext;\n\n case cForEnd:\n //hold(cRunTimeMicro);\n //return cHoldRunTimeMicro;\n\n case cHoldRunTimeMicro:\n cActualRunTimeMicro = cSimTimeMicro * 2;\n hold(cActualRunTimeMicro);\n return cHoldRunTime;\n \n case cHoldRunTime:\n if (cTick)\n {\n System.out.println(\"\\nSimulation time = \" + time()/(1000.0*1000.0) + \" sec.\");\n System.out.println(\"Requests = \" + cRequests);\n System.out.println(\"cRequestsToSend = \" + cMaxRequestsToSend);\n System.out.println(\"Av.tax time = \" + cTaxSum/cRequests);\n System.out.println(\"Av.client time = \" + cClientSum/cRequests);\n System.out.println(\"\\nExecution time: \" + ((System.currentTimeMillis() - cStartTime)/1000.0) + \" secs.\"); \n }\n return cProcessDone;\n }\n return cProcessError;\n }", "abstract protected int PortToRunOn();", "C0058i mo68a();", "@Override\r\n\tpublic void offMachine() {\n\t\t System.out.println(\"Off the machine when the cook is done \");\r\n\t}", "private static void showClock(MicroBlazeProcessor mb) {\r\n Clock clock = mb.getClock();\r\n //System.out.println(\"Number o clock cycles:\"+clock.getLatency());\r\n console.print(\"Number o clock cycles:\"+clock.getLatency());\r\n }", "@GetMapping(value = \"/cpu\")\n public ResponseEntity<String> mem(){\n try {\n String s = CommandExecutor.execute(Commands.cpu);\n return ResponseEntity.ok(s);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n return ResponseEntity.status(500).build();\n }", "public void testCycleHaltAddM() \r\n\t{\n\t\tMemory testProgram1 = new Memory(3);\r\n\t\ttestProgram1.store(0, \"00000000\");\r\n\t\ttestProgram1.store(1, \"00100111\");\r\n\t\ttestProgram1.store(2, \"11100111\");\r\n\t\t\r\n\t\tCPU testCPU = new CPU(testProgram1);\r\n\t\t\r\n\t\t//check haltCalledbefore the action is executed\r\n\t\tassertEquals(false, testCPU.getHaltCalled());\t\t\r\n\t\ttestCPU.cycle();\r\n\t\t//check haltCalled after the action is performed\r\n\t\tassertEquals(true, testCPU.getHaltCalled());\t\r\n\t\t\r\n\t\t//Check the accumulator before the rest is program is executed\r\n\t\tassertEquals(\"00000000\", testCPU.getAccumulator());\r\n\t\tassertEquals(0, testCPU.getAccumulatorDecimal());\r\n\t\ttestCPU.executeProgramInMemory();\r\n\t\t//Check the accumulator after the program has been executed\r\n\t\tassertEquals(\"00000000\", testCPU.getAccumulator());\r\n\t\tassertEquals(0, testCPU.getAccumulatorDecimal());\r\n\t\t\r\n\t\t//This program modifies the aaccumulator and then call halt\r\n\t\tMemory testProgram2 = new Memory(3);\r\n\t\ttestProgram2.store(0, \"10100111\");\r\n\t\ttestProgram2.store(1, \"00000000\");\r\n\t\ttestProgram2.store(2, \"11100111\");\r\n\t\t\r\n\t\ttestCPU.setMemory(testProgram2);\r\n\t\t\r\n\t\t//Check the accumulator before execution\r\n\t\tassertEquals(\"00000000\", testCPU.getAccumulator());\r\n\t\tassertEquals(0, testCPU.getAccumulatorDecimal());\r\n\t\t//check accumulator after the rest of the program has been executed\r\n\t\ttestCPU.executeProgramInMemory();\r\n\t\tassertEquals(\"00000111\", testCPU.getAccumulator());\r\n\t\tassertEquals(7, testCPU.getAccumulatorDecimal());\r\n\t\t\r\n\t\t\r\n\t\t//This program call halt at the beginning then call it again\r\n\t\t//it check that even the halt it call again nothing is execute\r\n\t\t//after the first call\r\n\t\tMemory testProgram3 = new Memory(4);\r\n\t\ttestProgram3.store(0, \"00000000\");\r\n\t\ttestProgram3.store(1, \"10100111\");\r\n\t\ttestProgram3.store(2, \"00000000\");\r\n\t\ttestProgram3.store(3, \"10100111\");\r\n\t\t\r\n\t\ttestCPU.setMemory(testProgram3);\r\n\t\r\n\t\t//Check the accumulator before execution\r\n\t\tassertEquals(\"00000000\", testCPU.getAccumulator());\r\n\t\tassertEquals(0, testCPU.getAccumulatorDecimal());\r\n\t\ttestCPU.executeProgramInMemory();\r\n\t\t//check accumulator after the rest of the program has been executed\r\n\t\tassertEquals(\"00000000\", testCPU.getAccumulator());\r\n\t\tassertEquals(0, testCPU.getAccumulatorDecimal());\r\n\t}", "public abstract int simulate();", "public static void main(String[] args) {\n PetriNet inst = new CoffeeMachinePetri();\r\n Scanner scanner = new Scanner(System.in);\r\n int input ;\r\n input = scanner.nextInt();\r\n while(input!=0)\r\n {\r\n System.out.println(\"Introduceti optiunea: \");\r\n input = scanner.nextInt();\r\n inst.exec(input);\r\n \r\n System.out.println(inst.getStareCurenta());\r\n\t\t}\r\n inst.exec(0);\r\n }", "public static void main(String[] args) {\n Computer computer = new Computer();\n computer.description();\n for (int i = 0; i != computer.resource; i++) {\n computer.on();\n computer.off();\n }\n }", "public static void main(String[] param) {\t\t\r\n //(new virtualModem()).nechopackets(5);\r\n //(new virtualModem()).imagepackets(\"error\");\r\n//(new virtualModem()).chronoechopackets(480000);\r\n//(new virtualModem()).gpspackets();\r\n //(new virtualModem()).acknackpackets(480000);\r\n }", "public abstract String getMachineID();", "public static Turing_Machine initialiseMachine() {\n\t\tnew FenetreCreation();\n\t\ttry {\n\t\t\tbarrier.await();\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\te.getMessage(), \"Erreur\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn null;\n\t\t}\n\t\tTuring_Machine tmp = machine;\n\t\tmachine = null;\n\t\treturn tmp;\n\t}", "C7716a mo24085b();", "public void powerOn() \n {\n try \n {\n // your code here\n \tSystem.out.println(\"Powering on virtual machine '\"+vm.getName() +\"'. Please wait...\"); \n \tTask t=vm.powerOnVM_Task(null);\n \tif(t.waitForTask()== Task.SUCCESS)\n \t{\n\t \tSystem.out.println(\"Virtual machine powered on.\");\n\t \tSystem.out.println(\"====================================\");\n \t}\n \telse\n \t\tSystem.out.println(\"Power on failed / VM already powered on...\");\n } \n catch ( Exception e ) \n { \n \tSystem.out.println( e.toString() ) ;\n }\n }", "@Override\n\tpublic void showInfo() {\n\t\tSystem.out.println(\"Machine Interface \" + id);\n\t}", "public static void main(String [] args) {\n\n\t\t\tTrafficSystem system = new TrafficSystem();\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\tint choice = -1;\n\t\t\twhile(choice != 0) {\n\t\t\t\tSystem.out.println(\"Hello! WHAT DO YOU WANT!?!?!:\");\n\t\t\t\tSystem.out.println(\"1. to step the system once\");\n\t\t\t\tSystem.out.println(\"2. to step through the whole system once\");\n\t\t\t\tSystem.out.println(\"3. to step through the system a number of times by your choice\");\n\t\t\t\tSystem.out.println(\"4. to print the system\");\n\t\t\t\tSystem.out.println(\"5. to print the statistics collected so far\");\n\t\t\t\tSystem.out.println(\"0. to exit the program!\");\n\t\t\t\tSystem.out.print(\"> \");\n\t\t\t\tchoice = sc.nextInt();\n\t\t\t\tswitch(choice){\n\t\t\t\t\tcase 1:\n\t\t\t\t\t\tsystem.step();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\tfor (int i = 0; system.sysLen() > i; i++) system.step();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\tfor (int i = (sc.nextInt()); i > 0; i--) system.step();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\tsystem.print();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 5:\n\t\t\t\t\t\tsystem.printStatistics();\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t\tcase 0:\n\t\t\t\t\t\tSystem.out.println(\"Goodbye!\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tSystem.out.println(\"Could not parse choice, please try again\");\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tsc.close();\n\t\n\n\n\t \t}", "@Test\r\n\tpublic void testExecuteMachine() throws MalformedURLException {\n//\t\tassertEquals(true, MockBackLMBets.executed);\r\n//\t\tassertEquals(6000000, MockBackLMBets.marketSuspendTime);\r\n//\r\n//\t\tmachine.fireEvent(\"runner\", ctx);\r\n//\t\tassertEquals(\"backPlaced\", machine.getCurrentStateId());\r\n\r\n\t}", "T mo16685a();", "C1458cs mo7613iS();", "private static void showSpr(MicroBlazeProcessor mb) {\r\n SpecialPurposeRegisters spr = mb.getSpecialRegisters();\r\n //System.out.println(\"Special Register Values:\");\r\n console.print(\"Special Register Values:\");\r\n for (SpecialRegister reg : SpecialRegister.values()) {\r\n int value = spr.read(reg);\r\n String stringValue;\r\n switch(reg) {\r\n case rmsr:\r\n stringValue = Integer.toBinaryString(value);\r\n stringValue = BitOperations.padBinaryString(stringValue, 32);\r\n //System.out.println(reg.name() + \":\" + stringValue);\r\n console.print(reg.name() + \":\" + stringValue);\r\n break;\r\n case resr:\r\n stringValue = Integer.toBinaryString(value);\r\n stringValue = BitOperations.padBinaryString(stringValue, 32);\r\n //System.out.println(reg.name() + \":\" + stringValue);\r\n console.print(reg.name() + \":\" + stringValue);\r\n break;\r\n case rpc:\r\n stringValue = Integer.toHexString(value);\r\n stringValue = BitOperations.padHexString(stringValue, 8);\r\n //System.out.println(reg.name() + \":\" + stringValue);\r\n console.print(reg.name() + \":\" + stringValue);\r\n break;\r\n default:\r\n //System.out.println(reg.name() + \":\" + value);\r\n console.print(reg.name() + \":\" + value);\r\n break;\r\n\r\n }\r\n \r\n }\r\n }", "public void clientRun() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\ttry {\r\n\t\t\t\t InetAddress address = InetAddress.getLocalHost();\r\n\t\t\t\tSocket clientSocket = new Socket(address, this.localport);\r\n\t\t\t\tPrintStream output = new PrintStream(clientSocket.getOutputStream());\r\n\t\t\t\tString text = Integer.toString(this.compteur);\r\n\t\t\t\tScanner sc = new Scanner(clientSocket.getInputStream());\r\n\t\t\t\tPrintWriter printWrite= new PrintWriter(output);\r\n\t\t\t\tprintWrite.println(text);\r\n\t\t\t\tprintWrite.flush();// Nécessaire pour le bon fonctionnement.\r\n\t\t\t\tif (sc.hasNext()) {\r\n\t\t\t\t\tString texte2 = sc.nextLine();\r\n\t\t\t\t\tthis.result = Integer.parseInt(texte2);\r\n\t\t\t\t}\r\n\t\t\t\tclientSocket.close();\r\n\t\t\t\tsc.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t}", "@Override\n public void onMachineActivated()\n {\n \n }", "public void listen() {\n DeviceManager cpuUsage = new CPUUsageManager();\n cpuUsage.printStatus();\n \n }", "public String sendToCPU(String st) {\n return st;\n }", "private void vCarg()\n {\n /*Contiene la MAC del equipo*/\n String sMAC;\n\n /*Obtiene la MAC del equipo*/\n InetAddress ip;\n try \n {\n /*Obtiene la ip local del equipo*/\n ip = InetAddress.getLocalHost(); \n\n /*Obtiene otros parámetros de conexión*/\n NetworkInterface network = NetworkInterface.getByInetAddress(ip);\n\n /*Obtiene en bytes la MAC*/\n byte[] mac = network.getHardwareAddress();\n\n /*Dale formato a la MAC*/\n StringBuilder sb = new StringBuilder();\n for(int i = 0; i < mac.length; i++) \n sb.append(String.format(\"%02X%s\", mac[i], (i < mac.length - 1) ? \"-\" : \"\")); \n\n /*Inicia la MAC*/\n sMAC = sb.toString();\n }\n catch(UnknownHostException expnUnknowHos) \n {\n //Procesa el error y regresa\n Star.iErrProc(this.getClass().getName() + \" \" + expnUnknowHos.getMessage(), Star.sErrUnknowHos, expnUnknowHos.getStackTrace()); \n return; \n }\n catch(SocketException expnSock)\n {\n //Procesa el error y regresa\n Star.iErrProc(this.getClass().getName() + \" \" + expnSock.getMessage(), Star.sErrSock, expnSock.getStackTrace()); \n return; \n }\n \n /*Obtiene del web service los mensajes de esta MAC ya desencriptados*/\n String sResp;\n try\n {\n sResp = Star.sDecryp(msjmac(Star.sEncrip(sMAC)));\n }\n catch(Exception expnExcep)\n { \n //Procesa el error y regresa\n Star.iErrProc(this.getClass().getName() + \" \" + expnExcep.getMessage(), Star.sErrExcep, expnExcep.getStackTrace()); \n return; \n } \n\n /*Agrega en el control la respuesta del servidor*/\n jED1.setText(sResp); \n \n }", "@Override\r\n\tpublic void showSpeed() {\n\t\tSystem.out.println(\"i can run at 100km/h\");\r\n\t}", "public abstract int mo12584RX(int i);", "public void sensorSystem() {\n\t}", "public void computerFirst() {\n game(0);\n }", "@Override\n\tpublic void run(IntcodeComputer ic, int[] modes, int[] input)\n\t{\n\t\tSystem.out.println(\"Halt\");\n\t}", "void printMST();", "public Demo()\n {\n machine = new Machine();\n }", "void systemBoot();", "public void machineFlash() {\n\t\tmachineFlash = !machineFlash;\n\t}", "public abstract String simulate(double inputFlow);", "java.lang.String getMachineType();", "public void runProgram() {\n\n\t\tSystem.out.println(\"\\n Time to start the machine... \\n\");\n\n\t\tpress.pressOlive(myOlives);\n\n\t\tSystem.out.println(\"Total amount of oil \" + press.getTotalOil());\n\t}", "public Machine() {\n\t\tsuper();\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpc.product();\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpc.product();\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "void mo5018b();", "public void printCompHand(){\n for(int i = 0; i < GetSizeOfComputerHand(); i++){\n System.out.println(handComputer.get(i));\n }\n }", "@Override\r\n\tpublic void powerOn() {\n\t\tSystem.out.println(\"ig tv power on\");\r\n\t}", "public abstract C1489f mo1187e();", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpc.cusumoer();\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tpc.cusumoer();\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public void mo21880v() {\n }", "public void process() {\n\t\tSystem.out.println(\"snapdragonm 888\");\n\n\t}", "private void displayRent(){\r\n\r\n System.out.println(\"To rent:\");\r\n for(HardwareDevice devices: hardwares){\r\n\r\n devices.displayDescription();\r\n }\r\n }", "@Override\n\tpublic void setCpu() {\n\t\tcom.setCpu(\"i7\");\n\t}", "@Override\n\tpublic void powerOn() {\n\t\tSystem.out.println(\"samsongTV powerOn\");\n\n\t}", "private void visualizarm(){\r\n switch(this.opc){\r\n case 1:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t\\t\\t\\t\"+min+\":\"+seg+\"\\n\");\r\n System.out.printf(\"-----------------------------------------------------\\n\");\r\n for(int i=0;i<2;i++){\r\n for(int j=0;j<5;j++){\r\n System.out.printf(\"%s\\t\",mfacil[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n case 2:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t5\\n\");\r\n System.out.printf(\"-----------------------------------------------------\\n\");\r\n for(int i=0;i<3;i++){\r\n for(int j=0;j<6;j++){\r\n System.out.printf(\"%s\\t\",mmedio[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n case 3:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t5\\t6\\n\");\r\n System.out.printf(\"------------------------------------------------------------------------\\n\");\r\n for(int i=0;i<4;i++){\r\n for(int j=0;j<7;j++){\r\n System.out.printf(\"%s\\t\",mdificil[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n }\r\n }", "public void machineTrace() throws Exception{\n System.out.println(\".-----------------------------------------------------.\");\n System.out.println(\"|------------------ NEXT ITERATION -------------------|\");\n System.out.println(\".-----------------------------------------------------.\");\n\n System.out.println(programMemory);\n System.out.println(dataMemory);\n\n if(instrPointer != -1 && instrPointer != programMemory.getSize())\n System.out.println(\"CURRENT INSTRUCTION: \" + programMemory.getInstruction(instrPointer) + \"\\n\");\n else\n System.out.println(\"FINAL RESULT: \\n\");\n\n System.out.println(\"EXECUTED INSTRUCTIONS : \" + executedIntructions);\n System.out.print(\"INPUT TAPE \");\n System.out.println(inputTapeContent);\n\n System.out.print(\"OUTPUT TAPE \");\n System.out.println(outputTapeContent);\n System.out.println(\" \");\n\n // System.out.print(\"OUTPUT TAPE [ \");\n // tape = new File(outputTape);\n // reader = new BufferedReader(new FileReader(tape));\n // str = \" \";\n // while ((str = reader.readLine()) != null){\n // System.out.print(str + \" \");\n // }\n // System.out.print(\"]\\n\");\n }", "public void sendMicroServer(String message, Long num) throws Exception {\n InetAddress ip = InetAddress.getByName(\"localhost\");\n \tDatagramPacket dp = new DatagramPacket(message.getBytes(), message.length(), ip, (int) (7000+num));\n \ttoMicroServer.send(dp);\n System.out.printf(\"Sending message '%s' to micro-service %s\\n\", message, num);\n\t\n }", "void mo1501h();", "@Override\r\n public void start() {\r\n runtime.reset();\r\n FL.setPower(1);\r\n FR.setPower(1);\r\n BR.setPower(1);\r\n BL.setPower(1);\r\n try{\r\n Thread.sleep(850);\r\n }\r\n catch (Exception e) {\r\n \r\n }\r\n FL.setPower(0);\r\n FR.setPower(0);\r\n BL.setPower(0);\r\n BR.setPower(0); \r\n }", "public static void sendInfo(int cpuUsg, int mmUsg) {\n try {\n disObj.performanceInfo(1, cpuUsg, mmUsg); //cluster ID HC\n } catch (RemoteException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }", "public static String getCpuInfo() {\n String result = \"\";\n ProcessBuilder cmd;\n try {\n String[] args = {COMMAND_LINE, PATH_CPU};\n cmd = new ProcessBuilder(args);\n Process process = cmd.start();\n InputStream in = process.getInputStream();\n byte[] re = new byte[24];\n while (in.read(re) != -1) {\n result = result + new String(re);\n }\n in.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n result = \"N/A\";\n }\n return result.trim();\n }", "public void affchageReseau() {\n System.out.print(\"\\nComputers Network Infected/Uninfected\\n\");\n Computer Computer = start;\n if (taille == 0) {\n System.out.print(\"Empty\\n\");\n return;\n }\n if (start.getLinkNext() == start) {\n System.out.print(start + \" <-> \" + Computer + \"\\n\");\n return;\n }\n\n System.out.print(start + \" <-> \");\n Computer = start.getLinkNext();\n while (Computer.getLinkNext() != start) {\n System.out.print(Computer + \" <-> \");\n Computer = Computer.getLinkNext();\n }\n System.out.print(Computer + \" <-> \");\n Computer = Computer.getLinkNext();\n System.out.print(Computer + \"\\n\");\n }", "int getSimspeed();", "private static java.lang.String m586k() {\r\n /*\r\n r6 = 1;\r\n r0 = 0;\r\n r1 = \"/proc/cpuinfo\";\r\n r2 = new java.io.FileReader;\t Catch:{ IOException -> 0x0040, all -> 0x0050 }\r\n r2.<init>(r1);\t Catch:{ IOException -> 0x0040, all -> 0x0050 }\r\n r1 = new java.io.BufferedReader;\t Catch:{ IOException -> 0x0071, all -> 0x006a }\r\n r3 = 8192; // 0x2000 float:1.14794E-41 double:4.0474E-320;\r\n r1.<init>(r2, r3);\t Catch:{ IOException -> 0x0071, all -> 0x006a }\r\n L_0x0010:\r\n r3 = r1.readLine();\t Catch:{ IOException -> 0x0074, all -> 0x006f }\r\n if (r3 == 0) goto L_0x0039;\r\n L_0x0016:\r\n r4 = com.alipay.security.mobile.module.p010a.C0159a.m556a(r3);\t Catch:{ IOException -> 0x0074, all -> 0x006f }\r\n if (r4 != 0) goto L_0x0010;\r\n L_0x001c:\r\n r4 = \":\";\r\n r3 = r3.split(r4);\t Catch:{ IOException -> 0x0074, all -> 0x006f }\r\n if (r3 == 0) goto L_0x0010;\r\n L_0x0024:\r\n r4 = r3.length;\t Catch:{ IOException -> 0x0074, all -> 0x006f }\r\n if (r4 <= r6) goto L_0x0010;\r\n L_0x0027:\r\n r4 = 0;\r\n r4 = r3[r4];\t Catch:{ IOException -> 0x0074, all -> 0x006f }\r\n r5 = \"BogoMIPS\";\r\n r4 = r4.contains(r5);\t Catch:{ IOException -> 0x0074, all -> 0x006f }\r\n if (r4 == 0) goto L_0x0010;\r\n L_0x0032:\r\n r4 = 1;\r\n r3 = r3[r4];\t Catch:{ IOException -> 0x0074, all -> 0x006f }\r\n r0 = r3.trim();\t Catch:{ IOException -> 0x0074, all -> 0x006f }\r\n L_0x0039:\r\n r2.close();\t Catch:{ IOException -> 0x0060 }\r\n L_0x003c:\r\n r1.close();\t Catch:{ IOException -> 0x0062 }\r\n L_0x003f:\r\n return r0;\r\n L_0x0040:\r\n r1 = move-exception;\r\n r1 = r0;\r\n r2 = r0;\r\n L_0x0043:\r\n if (r2 == 0) goto L_0x0048;\r\n L_0x0045:\r\n r2.close();\t Catch:{ IOException -> 0x0064 }\r\n L_0x0048:\r\n if (r1 == 0) goto L_0x003f;\r\n L_0x004a:\r\n r1.close();\t Catch:{ IOException -> 0x004e }\r\n goto L_0x003f;\r\n L_0x004e:\r\n r1 = move-exception;\r\n goto L_0x003f;\r\n L_0x0050:\r\n r1 = move-exception;\r\n r2 = r0;\r\n r7 = r0;\r\n r0 = r1;\r\n r1 = r7;\r\n L_0x0055:\r\n if (r2 == 0) goto L_0x005a;\r\n L_0x0057:\r\n r2.close();\t Catch:{ IOException -> 0x0066 }\r\n L_0x005a:\r\n if (r1 == 0) goto L_0x005f;\r\n L_0x005c:\r\n r1.close();\t Catch:{ IOException -> 0x0068 }\r\n L_0x005f:\r\n throw r0;\r\n L_0x0060:\r\n r2 = move-exception;\r\n goto L_0x003c;\r\n L_0x0062:\r\n r1 = move-exception;\r\n goto L_0x003f;\r\n L_0x0064:\r\n r2 = move-exception;\r\n goto L_0x0048;\r\n L_0x0066:\r\n r2 = move-exception;\r\n goto L_0x005a;\r\n L_0x0068:\r\n r1 = move-exception;\r\n goto L_0x005f;\r\n L_0x006a:\r\n r1 = move-exception;\r\n r7 = r1;\r\n r1 = r0;\r\n r0 = r7;\r\n goto L_0x0055;\r\n L_0x006f:\r\n r0 = move-exception;\r\n goto L_0x0055;\r\n L_0x0071:\r\n r1 = move-exception;\r\n r1 = r0;\r\n goto L_0x0043;\r\n L_0x0074:\r\n r3 = move-exception;\r\n goto L_0x0043;\r\n */\r\n throw new UnsupportedOperationException(\"Method not decompiled: com.alipay.security.mobile.module.b.a.k():java.lang.String\");\r\n }", "private void initHardware(){\n }", "void mo71b();", "void playCurrentStationCard();", "private String result(int i) {\r\n\t\tswitch(sim40.memory[i]){\r\n\r\n\t\tcase 1: /* print */\r\n\t\t\treturn (\"\"+sim40.memory[Simulator.ACCUMULATOR_ADDRESS]);\r\n\r\n\t\tcase 2: /* printch */\r\n\t\t\treturn (\"\"+(char)sim40.memory[Simulator.ACCUMULATOR_ADDRESS]);\r\n\r\n\t\tcase 3: /* printb */\r\n\t\t\treturn (Integer.toBinaryString(sim40.memory[Simulator.ACCUMULATOR_ADDRESS]));\r\n\t\t}\r\n\r\n\t\treturn \"\";\r\n\t}", "public int step() {\n // Step CPU\n int cycleInc = cpu.step();\n cycles += cycleInc;\n\n timer.update(cycleInc, ram);\n\n // Update LCD\n // hack so that LCD never will have to care about speedSwitch (ugly or beautiful?).\n lcd.updateLCD(cycleInc);\n if ( videoReciever != null && lcd.newScreenAvailable() ) {\n \tvideoReciever.transmitVideo(lcd.getPixels());\n }\n return cycleInc;\n }", "void mo88524c();", "public static void main(String []args)\r\n\t{\r\n\t\t\r\n\t\tAddingMachine myCalculator = new AddingMachine();\r\n\t\tmyCalculator.add (4); \r\n\t\tmyCalculator.subtract (2); \r\n\t\tmyCalculator.add(5);\r\n\t\tSystem.out.println(myCalculator.toString());\r\n\t\t\r\n\t\t\r\n\t}", "private void CPUWork()\n\t\t\t{\n\t\t\t\tif (completionflag == false && bugflag == false)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (m != 10)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tswitch (m)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t\tfor (k = 0; k <= 8; k += 4)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t\tfor (k = 0; k <= 2; k += 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t\tfor (k = 3; k <= 5; k += 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\t\tfor (k = 6; k <= 8; k += 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\t\tfor (k = 0; k <= 6; k += 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\t\t\t\tfor (k = 1; k <= 7; k += 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\t\t\tfor (k = 2; k <= 8; k += 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\t\t\tfor (k = 2; k <= 6; k += 2)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (j != 10)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tswitch (j)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t\t\tfor (k = 0; k <= 8; k += 4)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t\t\tfor (k = 0; k <= 2; k += 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t\t\tfor (k = 3; k <= 5; k += 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t\t\tfor (k = 6; k <= 8; k += 1)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t\t\tfor (k = 0; k <= 6; k += 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\t\t\t\tfor (k = 1; k <= 7; k += 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\t\t\tfor (k = 2; k <= 8; k += 3)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\t\t\tfor (k = 2; k <= 6; k += 2)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif (cpuflag[k] == false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& flag[k] == false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcpuchoice = k;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile (true)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcpuchoice = random.nextInt(8);\n\n\t\t\t\t\t\t\t\t\t\tif (cpuflag[cpuchoice] == false\n\t\t\t\t\t\t\t\t\t\t\t\t&& flag[cpuchoice] == false)\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tcpuflag[cpuchoice] = true;\n\t\t\t\t\t\tswitch (cpuchoice)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\t\t++lose[1];\n\t\t\t\t\t\t\t\t++lose[4];\n\t\t\t\t\t\t\t\t++lose[0];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t\t++lose[5];\n\t\t\t\t\t\t\t\t++lose[1];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\t++lose[1];\n\t\t\t\t\t\t\t\t++lose[6];\n\t\t\t\t\t\t\t\t++lose[7];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\t++lose[2];\n\t\t\t\t\t\t\t\t++lose[4];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\t++lose[2];\n\t\t\t\t\t\t\t\t++lose[5];\n\t\t\t\t\t\t\t\t++lose[0];\n\t\t\t\t\t\t\t\t++lose[7];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 5:\n\t\t\t\t\t\t\t\t++lose[2];\n\t\t\t\t\t\t\t\t++lose[6];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 6:\n\t\t\t\t\t\t\t\t++lose[3];\n\t\t\t\t\t\t\t\t++lose[4];\n\t\t\t\t\t\t\t\t++lose[7];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 7:\n\t\t\t\t\t\t\t\t++lose[3];\n\t\t\t\t\t\t\t\t++lose[5];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 8:\n\t\t\t\t\t\t\t\t++lose[3];\n\t\t\t\t\t\t\t\t++lose[6];\n\t\t\t\t\t\t\t\t++lose[0];\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (j = 0; j < 8; ++j)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (lose[j] == 3)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tresult=j;\n\t\t\t\t\t\t\t\t\t\tIntent it2 = new Intent(Main.this,\n\t\t\t\t\t\t\t\t\t\t\t\tResult.class);\n\t\t\t\t\t\t\t\t\t\tBundle b1 = new Bundle();\n\t\t\t\t\t\t\t\t\t\tb1.putString(\"result\", name\n\t\t\t\t\t\t\t\t\t\t\t\t+ \" is a LOSER!!\");\n\t\t\t\t\t\t\t\t\t\tit2.putExtras(b1);\n\t\t\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\t\t\tstartActivity(it2);\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t}", "public abstract void mo20900UP();", "public static void main(String[] args) throws Exception\n {\n Machine machine = new Machine();\n OperatingSystem os = new OperatingSystem(machine);\n machine.powerUp(os);\n // create a program\n\n //grab a program from collection, add to list, schedule list of programs\n List<Program> programs = new LinkedList<>();\n\n////////Testing virtua/physical\n// programs.add(ProgramCollection.A2P1(0));\n// programs.add(ProgramCollection.A2P1(1));\n// programs.add(ProgramCollection.A2P1(2));\n// programs.add(ProgramCollection.A2P1(3));\n// programs.add(ProgramCollection.A2P1(4));\n///////////Testing expand\n// programs.add(ProgramCollection.miniProg(2));\n// programs.add(ProgramCollection.miniProg(3));\n// programs.add(ProgramCollection.moreMem2());\n/////////Testing Shift\n// programs.add(ProgramCollection.moreMem2());\n// programs.add(ProgramCollection.longProg());\n /*\tTesting Compaction\n this test will have two mini programs that finish before our more memory program\n asks for more memory. It will also have two additional wait processes that never finish\n (one that needs to shift left and one too shift right). Our moreMem3 prog will ask for \n more memory and then try storing into these memory locations.\n */\n// programs.add(ProgramCollection.mini(6));\n// programs.add(ProgramCollection.mini(6));\n// programs.add(ProgramCollection.waitProcess(6));\n// programs.add(ProgramCollection.moreMem3(240));\n// programs.add(ProgramCollection.waitProcess(6));\n// programs.add(ProgramCollection.testIt(1));\n// programs.add(ProgramCollection.testIt(2));\n// programs.add(ProgramCollection.testIt(3));\n// programs.add(ProgramCollection.writeConsole(1));\n// programs.add(ProgramCollection.writeConsole(2));\n// programs.add(ProgramCollection.writeConsole(3));\n// programs.add(ProgramCollection.pWriteDisk2(340));\n//TEST READ AND WRITE DISK\n //programs.add(ProgramCollection.WriteReadDisk());\n//TEST SSTF\n// programs.add(ProgramCollection.testSSTF(10, 46, 5));\n// programs.add(ProgramCollection.testSSTF(20, 71, 5));\n// programs.add(ProgramCollection.testSSTF(30, 51, 10));\n// programs.add(ProgramCollection.testSSTF(40, 26, 5));\n\n//TEST STARVATION\n programs.add(ProgramCollection.testSSTF(10, 31, 3));\n programs.add(ProgramCollection.testSSTF(340, 90, 3));\n programs.add(ProgramCollection.testSSTF(20, 51, 3));\n programs.add(ProgramCollection.testSSTF(30, 41, 3));\n programs.add(ProgramCollection.testSSTF(40, 51, 3));\n programs.add(ProgramCollection.testSSTF(50, 41, 3));\n programs.add(ProgramCollection.testSSTF(60, 51, 3));\n programs.add(ProgramCollection.testSSTF(70, 41, 3));\n programs.add(ProgramCollection.testSSTF(80, 51, 3));\n programs.add(ProgramCollection.testSSTF(90, 41, 3));\n\n os.schedule(programs);\n\n }", "long start();", "void mo21074e();", "MachineType getType();", "public abstract void simulate();", "int localPort();", "@Override\n\tpublic void execute(Machine m) {\n\t\tint value1 = m.getRegisters().getRegister(op1);\n\t\tint value2 = m.getRegisters().getRegister(op2);\n\t\tm.getRegisters().setRegister(result, value1 + value2);\n\t}", "public Computer() {\n\t\tmPC = new BitString();\n\t\tmPC.setValue(0);\n\t\tmIR = new BitString();\n\t\tmIR.setValue(0);\n\t\tmCC = new BitString();\n\t\tmCC.setBits(new char[] { '0', '0', '0' });\n\t\tmRegisters = new BitString[MAX_REGISTERS];\n\t\tfor (int i = 0; i < MAX_REGISTERS; i++) {\n\t\t\tmRegisters[i] = new BitString();\n\t\t\tmRegisters[i].setValue(i);\n\t\t}\n\n\t\tmMemory = new BitString[MAX_MEMORY];\n\t\tfor (int i = 0; i < MAX_MEMORY; i++) {\n\t\t\tmMemory[i] = new BitString();\n\t\t\tmMemory[i].setValue(0);\n\t\t}\n\t}", "java.lang.String getMachineId();", "public String GetComputerCard(int value){\n return handComputer.get(value);\n }", "public static void main(String[] args) {\n PC pc = new PC();\n pc.setCPU(\"AMD R9\");\n pc.setDisk(\"sanxing\");\n pc.setMemory(1024);\n pc.setBrand(\"macbook\");\n pc.printInfo();\n }", "public static void main(String args[]) throws IOException{\n\t\tscan = new BufferedReader(new InputStreamReader(System.in));\n\t\tregisters = new HashMap<Character,String>();\n\t\tmemory = new HashMap<Integer , String>();//Memory location 0 will remain unused\n\t\tlabels = new HashMap<String , Integer>();\n\t\thexa = \"0123456789ABCDEF\".toCharArray();\n\t\tpossible_codes = \"HLT RST MOV MVI LXI LDA STA LHLD SHLD LDAX STAX XCHG ADD ADC ADI ACI DAD SUB SBB SUI INR DCR INX DCX ANA ANI ORA ORI XRA XRI CMA CMC STC CMP CPI RLC RRC RAL RAR JMP JZ JNZ JC JNC JP JM JPE JPO CALL CZ CNZ CC CNC CP CM CPE CPO RET RZ RNZ RC RNC RP RM RPE RPO PCHL IN OUT PUSH POP XTHL SPHL\".split(\" \");\n\t\tgeneral_registers = new HashSet<Character>();\n\t\tAC=CS=Z=P=S=false;\n\t\tSP = 65536;\n\t\tPC = 0;\n\t\tmodified = false;\n\t\tadd_the_general_registers();\n\n\t\tSystem.out.println(\"SIMULATOR FOR 8085 MICROPROCESSOR\\n\");\n\t\t//Take the input of code\n\t\tSystem.out.println(\"ENTER THE CODE :-\\n\");\n\t\ttake_the_input();\n\t\t//Take the input of memory values\n\t\tSystem.out.println(\"ENTER THE MEMORY VALUES :-\");\n\t\tSystem.out.println(\"IF NO VALUE HAS TO BE ENTERED PRESS N ELSE WRITE THE ADDRESS.\\n\");\n\t\ttake_memory_values();\n\t\t//Execution starts\n\t\tSystem.out.println(\"\\nNOW EXECUTION WILL BEGIN...\");\n\t\texecute();\n\t\t//Providing the output to the user\n\t\tSystem.out.println(\"\\nENTER THE MEMORY LOCATIONS AND REGISTER VALUES YOU WANT TO CHECK : \");\n\t\tSystem.out.println(\"(WHEN YOU ARE DONE CHECKING TYPE N)\\n\");\n\t\toutput_process();\n\t}", "public static void main(String[ ] args) {\r\n Machine m1 = new Machine() {\r\n @Override public void start() {\r\n System.out.println(\"Wooooo\");\r\n }\r\n };\r\n Machine m2 = new Machine();\r\n m2.start();\r\n m2.end();\r\n }", "public static void main(String[] args) {\n\n\t\t\n\t\tTv smartTv = new SmartTv();\n\t\t\n\t\tsmartTv.channelUp();\n\t\tsmartTv.channelUp();\n\t\tsmartTv.channelUp();\n\t\tsmartTv.channelDown();\n\t\tsmartTv.power();\n\t\tsmartTv.power();\n//\t\tsmartTv.internetSwitch(); //오류 :이전의 Tv 설계도로 만든 변수 smartTv로는, 새로운 SmartTv()의 인터넷스위치를 조작할 버튼이없다 조작할수 없다\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t, 새로운 SmartTv() 안에 있는 기능들중 Tv설계도에도 있는 기능들만 조작할수 있다\t\n\t\t\n\t\tSystem.out.println(smartTv.channel);\n\t\tSystem.out.println(smartTv.power);\n\t\t\n\t\t\n\t}", "public Cpu getCpu(){\n return maquina;\n }" ]
[ "0.61706644", "0.5935584", "0.5914962", "0.59132755", "0.58988065", "0.57631505", "0.5750546", "0.5649992", "0.56317526", "0.5611252", "0.5590388", "0.5544834", "0.5541184", "0.5527549", "0.5525571", "0.5513306", "0.5490668", "0.54904485", "0.5486316", "0.54775584", "0.5457006", "0.5441505", "0.54168487", "0.5394788", "0.53420174", "0.5335842", "0.53181875", "0.5316885", "0.5250892", "0.5249633", "0.5245979", "0.52432233", "0.5234234", "0.5234227", "0.52149886", "0.52045363", "0.5202317", "0.5201462", "0.5200135", "0.5194701", "0.5188576", "0.5186092", "0.51835084", "0.51833534", "0.5181342", "0.5179674", "0.5172521", "0.5170484", "0.5170201", "0.5168633", "0.51657313", "0.5161184", "0.51473707", "0.51450914", "0.5138184", "0.5138184", "0.51346415", "0.51330376", "0.5132919", "0.5131966", "0.5129754", "0.5129754", "0.511493", "0.5114179", "0.51102096", "0.51068985", "0.51008785", "0.50933725", "0.5086812", "0.5084947", "0.50821537", "0.50778896", "0.5072242", "0.5069114", "0.5066492", "0.50488204", "0.5047589", "0.504689", "0.50439173", "0.50396496", "0.50396", "0.5036207", "0.5033077", "0.50259453", "0.5019457", "0.5017102", "0.50142455", "0.50105983", "0.50100654", "0.5007914", "0.50069857", "0.50028473", "0.500063", "0.5000609", "0.49886733", "0.4988544", "0.49866363", "0.49857035", "0.49838805", "0.4978615", "0.49750623" ]
0.0
-1
A rajouter Fonction Data EnvoyerData(Noeud destinataire, String donnee)
Data EnvoyerData(Noeud destinataire, String donnee, Machine[] listeVerificateur) { Data data = new Data(this, destinataire, donnee, listeVerificateur); return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void EnvoyerRequete(Requete req) {\n\t\tmediateur.transmettreRequeteDeEtudiant(req);\n\t\tEtudiant etudiant = etudiantRepo.findOne(req.getExpediteur().getId());\n\t\tetudiant.getDemandes().add(req);\n\t\tthis.update(etudiant);\n\t}", "Aluno(String dataNascimento) {\n this.dataNascimento = dataNascimento;\n }", "public VisualizarEncontroDTO(String desigTorneio, Calendar dataInicio,\r\n\t\t\tJogadorDTO jogador, JogadorDTO advers, int qtdEncontros) {\r\n\t\t\r\n\t\tthis.designacaoTorneio = desigTorneio;\r\n\t\tthis.dataInicio = convertCalendarToString(dataInicio);\t\t\r\n\t\tthis.jogadorCorrente = jogador;\r\n\t\tthis.jogadorAdversario = advers;\r\n\t\tthis.qtdEncontros = qtdEncontros;\r\n\t}", "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 boolean getData(Expediente expediente, BaseVista vista) {\n if(id_expediente >=0){\n expediente.setId(id_expediente);\n }\n Programa programa = new Programa();\n programa.setName(String.valueOf(boxPrograma.getSelectedItem()));\n ProgramaDAO.read(programa);\n expediente.setId_Programa(programa.getId());\n if(_Con.getInstance().getOperation() == OperationType.CREATE){\n ArrayList<Expediente> expedientes = new ArrayList<>();\n ExpedienteDAO.findAllByProgram(expedientes, programa.getName());\n if(chkAuto.isSelected()){\n int number = 1;\n for(Expediente e : expedientes){\n if (e.getNumber() != number){\n break;\n }\n number++;\n }\n expediente.setNumber(number);\n }else{\n if (txtNumero.getText().isEmpty()) {\n vista.setError(\"El campo # no puede estar vacio\");\n return false;\n }\n try {\n expediente.setNumber(Integer.parseInt(txtNumero.getText()));\n } catch (NumberFormatException e) {\n vista.setError(\"El campo # debe ser numerico\");\n return false;\n }\n if (expediente.getNumber() <= 0) {\n vista.setError(\"El campo # debe ser un número mayor que 0\");\n return false;\n }\n for(Expediente e : expedientes){\n if (e.getNumber() == expediente.getNumber()) {\n vista.setError(\"El número ingresado ya se encuentra en uso\\npara un expediente de ese programa\");\n return false;\n }\n }\n }\n }else{\n try {\n expediente.setNumber(Integer.parseInt(txtNumero.getText()));\n } catch (NumberFormatException e) {\n vista.setError(\"El campo # debe ser numerico\");\n return false;\n }\n }\n expediente.setPicturesChecked(chkFotos.isSelected());\n expediente.setCvChecked(chkCV.isSelected());\n expediente.setNegativePhotocopyChecked(chkNegativo.isSelected());\n expediente.setGradesChecked(chkNotas.isSelected());\n expediente.setBirthCertificateChecked(chkPartida.isSelected());\n expediente.setIdPhotocopyChecked(chkCedula.isSelected());\n return true;\n }", "public void listar_saldoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaCorte(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "public void enviarConviteExame(LocalDate dataExame) {\n }", "private static void registrarAuditoriaDetallesDatoGeneralEmpleado(Connexion connexion,DatoGeneralEmpleado datogeneralempleado)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_numero_patronal().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_numero_patronal()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_numero_patronal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_numero_patronal().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_numero_patronal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_numero_patronal().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDNUMEROPATRONAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_afiliacion().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_afiliacion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_afiliacion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_afiliacion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_afiliacion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_afiliacion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOAFILIACION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcarnet_iess().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcarnet_iess()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcarnet_iess()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcarnet_iess();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcarnet_iess()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcarnet_iess() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CARNETIESS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getsectorial_iess().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsectorial_iess()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsectorial_iess()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsectorial_iess();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getsectorial_iess()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getsectorial_iess() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.SECTORIALIESS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_pais().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_pais()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_pais()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_pais().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_pais()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_pais().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDPAIS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_provincia().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_provincia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_provincia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_provincia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_provincia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_provincia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDPROVINCIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_canton().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_canton()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_canton()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_canton().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_canton()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_canton().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDCANTON,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_parroquia().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_parroquia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_parroquia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_parroquia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_parroquia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_parroquia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDPARROQUIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getfecha_nacimiento().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_nacimiento()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_nacimiento()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_nacimiento().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getfecha_nacimiento()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getfecha_nacimiento().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.FECHANACIMIENTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getfecha_fallece().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_fallece()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_fallece()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getfecha_fallece().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getfecha_fallece()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getfecha_fallece().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.FECHAFALLECE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor_evaluacion().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_evaluacion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_evaluacion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_evaluacion().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor_evaluacion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor_evaluacion().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOREVALUACION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getnumero_horas().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_horas()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_horas()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_horas().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getnumero_horas()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getnumero_horas().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.NUMEROHORAS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor_hora().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_hora()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_hora()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor_hora().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor_hora()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor_hora().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALORHORA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getsalario().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsalario()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsalario()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getsalario().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getsalario()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getsalario().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.SALARIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_moneda().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_moneda()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_moneda()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_moneda().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_moneda()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_moneda().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDMONEDA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getnumero_contrato().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_contrato()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_contrato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_contrato();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getnumero_contrato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getnumero_contrato() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.NUMEROCONTRATO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_contrato().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_contrato()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_contrato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_contrato().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_contrato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_contrato().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOCONTRATO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor1().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor1()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor1()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor1().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor1()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor1().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR1,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor2().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor2()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor2()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor2().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor2()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor2().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR2,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor3().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor3()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor3()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor3().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor3()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor3().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR3,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor4().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor4()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor4()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor4().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor4()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor4().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR4,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor5().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor5()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor5()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor5().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor5()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor5().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR5,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getvalor6().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor6()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor6()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getvalor6().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getvalor6()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getvalor6().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.VALOR6,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_aporta_seguro_social().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_aporta_seguro_social()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_aporta_seguro_social()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_aporta_seguro_social().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_aporta_seguro_social()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_aporta_seguro_social().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONAPORTASEGUROSOCIAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_recibe_horas_extras().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_recibe_horas_extras()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_recibe_horas_extras()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_recibe_horas_extras().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_recibe_horas_extras()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_recibe_horas_extras().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONRECIBEHORASEXTRAS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_descuento_impuestos().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_descuento_impuestos()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_descuento_impuestos()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_descuento_impuestos().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_descuento_impuestos()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_descuento_impuestos().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONDESCUENTOIMPUESTOS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getpension_alimenticia().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getpension_alimenticia()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getpension_alimenticia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getpension_alimenticia().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getpension_alimenticia()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getpension_alimenticia().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.PENSIONALIMENTICIA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_pago_por_horas().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_pago_por_horas()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_pago_por_horas()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_pago_por_horas().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_pago_por_horas()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_pago_por_horas().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONPAGOPORHORAS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getcon_anticipo().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_anticipo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_anticipo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getcon_anticipo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getcon_anticipo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getcon_anticipo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.CONANTICIPO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_libreta_mili().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_libreta_mili()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_libreta_mili()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_libreta_mili().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_libreta_mili()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_libreta_mili().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOLIBRETAMILI,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getlibreta_militar().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getlibreta_militar()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getlibreta_militar()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getlibreta_militar();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getlibreta_militar()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getlibreta_militar() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.LIBRETAMILITAR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_grupo_forma_pago().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_grupo_forma_pago()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_grupo_forma_pago()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_grupo_forma_pago().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_grupo_forma_pago()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_grupo_forma_pago().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOGRUPOFORMAPAGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_banco().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_banco()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_banco().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_banco()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_banco().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDBANCO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_cuenta_banco_global().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_cuenta_banco_global()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_cuenta_banco_global()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_cuenta_banco_global().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_cuenta_banco_global()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_cuenta_banco_global().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOCUENTABANCOGLOBAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getnumero_cuenta().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_cuenta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_cuenta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getnumero_cuenta();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getnumero_cuenta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getnumero_cuenta() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.NUMEROCUENTA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(datogeneralempleado.getIsNew()||!datogeneralempleado.getid_tipo_sangre().equals(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_sangre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_sangre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=datogeneralempleado.getDatoGeneralEmpleadoOriginal().getid_tipo_sangre().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(datogeneralempleado.getid_tipo_sangre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=datogeneralempleado.getid_tipo_sangre().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),DatoGeneralEmpleadoConstantesFunciones.IDTIPOSANGRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}", "@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 }", "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 listar_saldoMontadoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo_Montado.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaMontadoPorData(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }", "<TEntite> void envoiReponseAvecDonnees(TEntite entite, HttpServletResponse reponse, int codeDeStatutHttp, String message) throws IOException;", "@Override\n\tpublic void transmetDonnee() {\n\n\t}", "public Esportistes (String nom, String cognom1, String cognom2, char sexe, LocalDate dataNaixement, String dni, String club, String codiFederat) {\n\t\tthis.setNom(nom);\n\t\tthis.setCognom1(cognom1);\n\t\tthis.setCognom2(cognom2);\n\t\tthis.setSexe(sexe);\n\t\tthis.setDataNaixement(dataNaixement);\n\t\tthis.setDni(dni);\n\t\tthis.setClub(club);\n\t\tthis.setCodiFederat(codiFederat);\n\t\t\n\t}", "String getDataNascimento();", "public Incidencia(Estat estat, String assumpte, Date data, String tipus) {\r\n\t\tsuper();\r\n\t\tthis.estat = estat;\r\n\t\tthis.assumpte = assumpte;\r\n\t\tthis.data = data;\r\n\t\tthis.tipus = tipus;\r\n\t}", "public void recevoirDossier() {\n try {\n fileInfo = (FileInfo) ois.readObject(); //lire les informations du fichier\n //chemin du fichier en sortie\n String outputFile = fileInfo.getDestinationDirectory() + fileInfo.getFilename();\n dstFile = new File(outputFile);\n if (!new File(fileInfo.getDestinationDirectory()).exists()) { //si le fichier n'existe pas\n new File(fileInfo.getDestinationDirectory()).mkdirs(); //creation du fichier\n fos = new FileOutputStream(dstFile);\n fos.write(fileInfo.getFileData()); //ecrire les données dans le fichier\n fos.flush();\n fileInfo.setFileData(null);\n System.gc();\n fos.close();\n dstFile.setLastModified(fileInfo.getModifier());\n\n } else if (dstFile.lastModified() < fileInfo.getModifier()) { //si le fichier existe et que c'est une nouvelle version alors\n fos = new FileOutputStream(dstFile);\n fos.write(fileInfo.getFileData());\n fos.flush();\n fileInfo.setFileData(null);\n fos.close();\n dstFile.setLastModified(fileInfo.getModifier());\n }\n } catch (IOException | ClassNotFoundException ex) {\n Logger.getLogger(RecevoirFichier.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\r\n\tpublic void dibujar(Entorno unEntorno, Casilla casilla) {\n\t\t\r\n\t}", "public void recebeEstadia(Estadia estadia) throws QuartoOcupadoException{\n\t\tif(this.getEstadia() == null ){\n\t\t\tthis.estadia = estadia;\n\t\t\treturn;\n\t\t}\n\t\tthrow new QuartoOcupadoException(String.format(\"Quarto %s ja esta ocupado.\", this.getNumero()));\n\t}", "private void salvarVenda(String nomeCliente, double precoFinal, double desconto ,String mesAnoAt,String dataCompra,String formaDePagamento) {\n\n\t\tFirebaseAuth autenticacion = configFireBase.getFireBaseAutenticacao();\n\n\t\tString idUsuario = Base64Custom.codificarBase64(autenticacion.getCurrentUser().getEmail());\n\t\tDatabaseReference VendaRef=mDatabase.child(\"vendas\");\n\n\n\t\tvenda.setIdVenda(VendaRef.push().getKey());\n\t\tvenda.setNomeCliente(nomeCliente);\n\t\tvenda.setValorTotal(precoFinal);\n\t\tvenda.setMesAno(mesAnoAt);\n\t\tvenda.setDesconto(desconto);\n\t\tvenda.setDataCompra(dataCompra);\n\t\tvenda.setLista(ListagemDeProdutosParaCompras.produtosSelecionados);\n\t\tvenda.setFormaDePagamento(formaDePagamento);\n\n\t\tmDatabase.child(\"armazenamento\").child(idUsuario).child(\"vendas\").child(venda.getIdVenda()).setValue(venda).addOnCompleteListener(new OnCompleteListener<Void>() {\n\n\t\t\t@Override\n\t\t\tpublic void onComplete(@NonNull Task<Void> task) {\n\n\t\t\t}\n\n\t\t});\n\n\t\tToast.makeText(CadastrarVendaActivity.this, \"Venda Realizada\", Toast.LENGTH_SHORT).show();\n\t\tstartActivity(new Intent(getApplicationContext(), ListagemDeVendasRealizadas.class));\n\t\tvenda.subtrairVendas();\n\n\t\tthis.finish();\n\t}", "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 }", "@Override\r\n\tpublic void entregarDinero() {\n\t\tSystem.out.println(\"Total de dinero entrgado\");\r\n\t}", "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 }", "public void enregistrement (double Ox1, double Oy1, double Px1, double Px2, double perim, double aire, String dessin){\n\t}", "@Override\n\tpublic Propisi dodajDeo(String requestData) throws JAXBException {\n\n\t\tJSONObject json = new JSONObject(requestData);\n\n\t\tString tekstClana = \"\";\n\t\tString redniBroj = \"\";\n\t\tString tekstStava = \"\";\n\t\tString nazivGlave = \"\";\n\t\tString refPropisNaziv = \"\";\n\n\t\tString nazivDela = json.getString(\"nazivDeo\");\n\n\t\tString nazivClana = json.getString(\"nazivClana\");\n\t\tString opisClana = json.getString(\"opisClana\");\n\t\ttry {\n\t\t\ttekstClana = json.getString(\"tekstClana\");\n\n\t\t} catch (org.json.JSONException e) {\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tredniBroj = json.getString(\"redniBrojStava\");\n\t\t\ttekstStava = json.getString(\"stavTekst\");\n\t\t} catch (org.json.JSONException e) {\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tnazivGlave = json.getString(\"nazivGlave\");\n\t\t} catch (org.json.JSONException e) {\n\n\t\t}\n\t\t\n\t\t\n\n\t\tDeo deo = new Deo();\n\t\tGlava glava = new Glava();\n\t\tClan clan = new Clan();\n\t\tSadrzaj sadrzaj = new Sadrzaj();\n\t\tStav stav = new Stav();\n\t\tTekst tekst = new Tekst();\n\t\t\n\t\ttry {\n\t\t\trefPropisNaziv = json.getString(\"refernciranPropis\");\n\t\t} catch (JSONException e) {\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\t//ako je true, znaci da refernciramo\n\t\tif(!refPropisNaziv.equals(\"\"))\n\t\t{\n\t\t\tJSONArray jsonArray2 = json.getJSONArray(\"splitovanTekstClan\");\n\t\t\tList<String> list2 = new ArrayList<String>();\n\t\t\tfor (int i=0; i<jsonArray2.length(); i++) {\n\t\t\t\ttekst.getText().add( jsonArray2.getString(i) );\n\t\t\t}\n\t\n\t\t\ttekst.setNazivPropisa(refPropisNaziv.replaceAll(\"\\\\s\", \"\")); \n\t\t\ttekst.setNazivClana(json.getString(\"nazivClanaRef\").replaceAll(\"\\\\s\", \"\"));\n\t\t\ttekst.setIDClana(BigInteger.valueOf(json.getLong(\"referenciraniClanovi\")));\n\t\t\ttekst.setIDPropisa(BigInteger.valueOf(json.getLong(\"propisId\")));\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttekst.getText().add(tekstClana);\n\t\t}\n\n\t\tif (!redniBroj.equals(\"\")) {\n\t\t\tstav.setRedniBroj(Long.parseLong(redniBroj));\n\t\t\tif(!refPropisNaziv.equals(\"\")){\n\t\t\t\tstav.setTekst(tekst.getText());\n\t\t\t\tstav.setNazivPropisa(refPropisNaziv.replaceAll(\"\\\\s\", \"\")); \n\t\t\t\tstav.setNazivClana(json.getString(\"nazivClanaRef\").replaceAll(\"\\\\s\", \"\"));\n\t\t\t\tstav.setIDClana(BigInteger.valueOf(json.getLong(\"referenciraniClanovi\")));\n\t\t\t\tstav.setIDPropisa(BigInteger.valueOf(json.getLong(\"propisId\")));\n\t\t\t}else{\n\t\t\t\tstav.getTekst().add(tekstStava);\n\t\t\t}\n\t\t\tsadrzaj.getStav().add(stav);\t\n\t\t}\n\t\tif (!tekstClana.equals(\"\")) {\n\t\t\tsadrzaj.getTekst().add(tekst);\n\t\t}\n\t\tif (!nazivGlave.equals(\"\")) {\n\t\t\tglava.getClan().add(clan);\n\t\t\tglava.setID(BigInteger.valueOf(getID()));\n\t\t\tglava.setNaziv(nazivGlave);\n\t\t\tdeo.getGlava().add(glava);\n\t\t}\n\n\t\tclan.setID(BigInteger.valueOf(getID()));\n\t\tclan.setNaziv(nazivClana);\n\t\tclan.setOpis(opisClana);\n\t\tclan.setSadrzaj(sadrzaj);\n\n\t\tif (nazivGlave.equals(\"\")) {\n\t\t\tdeo.getClan().add(clan);\n\t\t}\n\n\t\t// Unmarshalling generi�e objektni model na osnovu XML fajla\n\t\tPropisi propisi = (Propisi) unmarshall(new File(\"./data/xml/propisi.xml\"));\n\n\t\tdeo.setID(BigInteger.valueOf(getID()));\n\t\tdeo.setNaziv(nazivDela);\n\t\tpropisi.getPropisi().get(propisi.getPropisi().size() - 1).getDeo().add(deo);\n\n\t\treturn propisi;\n\t}", "public void nouveau(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }", "@Dado(\"que a entrega é dia (.*)$\")\n\tpublic void queAEntregaÉDia(Date data) throws Throwable {\n\t\tentrega = data;\n\t\tSystem.out.println(entrega);\n\t throw new cucumber.api.PendingException();\n\t}", "public EncabezadoRespuesta entradaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\t\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t\t\t//Mandamos a log el objeto de entrada\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Entrada: \" + asistencia);\n\t\t\t\t//Variable de resultado\n\t\t\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\t try {\n\t\t \tif (asistencia.getIdEmpleado() == null) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n\t\t \t}\n\t\t \tif (asistencia.getUsuarioAlta() == null || asistencia.getUsuarioAlta().trim().isEmpty()) {\n\t\t \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario.\");\n\t\t \t}\n\t\t \tAsistenciaDAO dao = new AsistenciaDAO();\n\t\t \trespuesta = dao.entradaAsistencia(uid, asistencia);\n\n\t\t } catch (ExcepcionesCuadrillas ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex) {\n\t\t\t\t\tLogHandler.error(uid, this.getClass(), \"entradaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\t\t\trespuesta.setUid(uid);\n\t\t\t\t\trespuesta.setEstatus(false);\n\t\t\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tLogHandler.debug(uid, this.getClass(), \"entradaAsistencia - Datos Salida: \" + respuesta);\n\t\t\t\treturn respuesta;\n\t}", "public String verDatos(){\n return \"Ataque: \"+ataque+\"\\nDefensa: \"+defensa+\"\\nPunteria: \"+punteria;\n }", "private void EnviarDatos(String data) \n {\n\n try \n {\n Output.write(data.getBytes());\n\n } catch (IOException e) {\n\n System.exit(ERROR);\n }\n }", "@Override\n public void onReceivedData(byte[] arg0) {\n try {\n ultimoDadoRecebido = ultimoDadoRecebido + new String(arg0, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void RecevoireRequete(Requete requete) {\n\t\tSystem.out.println(\"from \" + requete.getExpediteur().getNom() + \" to \" + requete.getDestinataire());\n\t}", "@Override\n\tpublic DatosEnc obtenerDatos(DatosEnc datos) {\n\t\tConnection con = null;\n\t\tCallableStatement stmt = null;\n//\t\tPreparedStatement ps = null;\n\t\tResultSet rs = null;\n\t\ttry{\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tString query = \"select * from pv_cotizaciones_det where no_cotizacion = ?\";\n//\t\t\tps = con.prepareStatement(query);\n//\t\t\tps.setString(1, datos.getNoDocumento());\n//\t\t\trs = ps.executeQuery();\n//\t\t\texiste=0;\n//\t\t\twhile(rs.next()){\n//\t\t\t\tif(rs.getString(\"no_cotizacion\") == null){\n//\t\t\t\t\texiste=0;\n//\t\t\t\t}else if(rs.getString(\"no_cotizacion\").equals(datos.getNoDocumento())){\n//\t\t\t\t\texiste=1;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tps.close();\n//\t\t\trs.close();\n//\t\t\tif(existe==0){\n\t\t\t\tcon = new ConectarDB().getConnection();\n\t\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_InUp_Mov_Enc(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}\");\n\t\t\t\tstmt.setString(1, datos.getCodigoCliente());\n\t\t\t\tstmt.setString(2, datos.getNit());\n\t\t\t\tstmt.setString(3, datos.getNombreCliente());\n\t\t\t\tstmt.setString(4, datos.getDirecFactura());\n\t\t\t\tstmt.setString(5, datos.getTel());\n\t\t\t\tstmt.setString(6, datos.getTarjeta());\n\t\t\t\tstmt.setString(7, datos.getDirecEnvio());\n\t\t\t\tstmt.setString(8, datos.getCodigoVendedor());\n\t\t\t\tstmt.setString(9, datos.getUsername());\n\t\t\t\tstmt.setString(10, datos.getTipoDocumento());\n\t\t\t\tstmt.setString(11, datos.getNoDocumento());\n\t\t\t\tstmt.setString(12, datos.getFechaVence());\n\t\t\t\tstmt.setString(13, datos.getTipoPago());\n\t\t\t\tstmt.setString(14, datos.getTipoCredito());\n\t\t\t\tstmt.setString(15, datos.getAutoriza());\n\t\t\t\tstmt.setString(16, datos.getFechaDocumento());\n\t\t\t\tstmt.setString(17, datos.getCargosEnvio());\n\t\t\t\tstmt.setString(18, datos.getOtrosCargos());\n\t\t\t\tstmt.setString(19, datos.getMontoVenta());\n\t\t\t\tstmt.setString(20, datos.getMontoTotal());\n\t\t\t\tstmt.setString(21, datos.getSerieDev());\n\t\t\t\tstmt.setString(22, datos.getNoDocDev());\n\t\t\t\tstmt.setString(23, datos.getObservaciones());\n\t\t\t\tstmt.setString(24, datos.getTipoNota());\n\t\t\t\tstmt.setString(25, datos.getCaja());\n\t\t\t\tstmt.setString(26, datos.getFechaEntrega());\n\t\t\t\tstmt.setString(27, datos.getCodigoDept());\n\t\t\t\tstmt.setString(28, datos.getCodGen());\n\t\t\t\tstmt.setString(29, datos.getNoConsigna());\n\t\t\t\tstmt.setString(30, datos.getCodMovDev());\n\t\t\t\tstmt.setString(31, datos.getGeneraSolicitud());\n\t\t\t\tstmt.setString(32, datos.getTipoPagoNC());\n\t\t\t\tstmt.setString(33, datos.getTipoCliente());\n\t\t\t\tstmt.setString(34, datos.getCodigoNegocio());\n\t\t\t\tstmt.setString(35, datos.getCantidadDevolver());\n\t\t\t\tstmt.setString(36, datos.getAutorizoDespacho());\n\t\t\t\tstmt.setString(37, datos.getSaldo());\n\t\t\t\trs = stmt.executeQuery();\n\t\t\t\t\n\t\t\t\twhile(rs.next()){\n\t\t\t\t\tif(rs.getString(1)!=null){\n\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n\t\t\t\t\t}\n\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tif(rs.getString(1)!=null){\n//\t\t\t\t\t\tdatos.setSerieEnc(rs.getString(1));\n//\t\t\t\t\t}else{\n//\t\t\t\t\t\tdatos.setSerieEnc(\"NA\");\n//\t\t\t\t\t}\n//\t\t\t\t\tdatos.setNoEnc(rs.getString(2));\n//\t\t\t\t\tdocumento = rs.getInt(2);\n\t\t\t\t}\n\t\t\t\tcon.close();\n\t\t\t\tstmt.close();\n\t\t\t\trs.close();\n//\t\t\t}\n\t\t\t\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_UDPV_Del_Mov_Det(?,?,?)}\");\n//\t\t\tstmt.setInt(1, Integer.parseInt(datos.getTipoDocumento()));\n//\t\t\tstmt.setString(2, \"\");\n//\t\t\tstmt.setInt(3, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"limpiado\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n//\t\t\tcon = new ConectarDB().getConnection();\n//\t\t\tstmt = con.prepareCall(\"{call stp_udpv_VerificaCotiza(?,?)}\");\n//\t\t\tstmt.setString(1, \"\");\n//\t\t\tstmt.setInt(2, documento);\n//\t\t\trs = stmt.executeQuery();\n//\t\t\t\n//\t\t\twhile(rs.next()){\n//\t\t\t\tSystem.out.println(rs.getString(\"error\"));\n//\t\t\t}\n//\t\t\tcon.close();\n//\t\t\tstmt.close();\n//\t\t\trs.close();\n\t\t\t\n\t\t}catch(SQLException e ){\n\t\t\tSystem.out.println(\"Error Enc: \" + e.getMessage());\n\t\t}\n\t\treturn datos;\n\t}", "public void annuler(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }", "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 getDataCandidatura(){\n return dataCandidatura;\n }", "private void remplirUtiliseData() {\n\t}", "@Override\n\tpublic DatosNit obtenerDatos(DatosNit datos) {\n\t\tnit = datos.getNit();\n\t\treturn null;\n\t}", "@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 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}", "@Override\n public Cours creerCours(String nomCours, Integer niveauCible, Date dateDebut, Integer duree, Integer enseignant, String idPiscine) {\n Creneau creneau = new Creneau(dateDebut, duree);\n creneau=creneauRepo.save(creneau);\n Piscine p = piscineRepo.findOne(idPiscine);\n Cours c = new Cours (nomCours, niveauCible,creneau, enseignant, new Participant[4],p );\n Cours insert = coursRepo.save(c);\n return insert;\n }", "void entrerAuGarage();", "@Override\n\tpublic void exportarData() {\n\t\tDate date=new Date();\n\t\tString nameFile=\"recaudado-\"+date.getTime()+\".xls\";\n\t\tTableToExcel.save(grid,nameFile);\n\t}", "public void recargarDatos( ) {\n\t\tPAC_SHWEB_PROVEEDORES llamadaProv = null;\n\t\ttry {\n\t\t\tllamadaProv = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaCom = null;\n\n\t\ttry {\n\t\t\trespuestaCom = llamadaProv.ejecutaPAC_SHWEB_PROVEEDORES__F_COMUNICADOS_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t// Mostramos el estado del expediente\n\t\tPAC_SHWEB_PROVEEDORES llamada = null;\n\t\ttry {\n\t\t\tllamada = new PAC_SHWEB_PROVEEDORES(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuesta = null;\n\t\ttry {\n\t\t\trespuesta = llamada.ejecutaPAC_SHWEB_PROVEEDORES__F_ESTADO_EXPEDIENTE(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tnew BigDecimal(UI.getCurrent().getSession().getAttribute(\"expediente\").toString())\n\t\t\t\t\t);\n\t\t\t\n\t\t\tMap<String, Object> retorno = new HashMap<String, Object>(respuesta);\n\n\t\t\tUI.getCurrent().getSession().setAttribute(\"estadoExpediente\",retorno.get(\"ESTADO\").toString());\n\t\t\t\n\t\t\tprovPantallaConsultaExpedienteInicial.setCaption(\"GESTIÓN DEL EXPEDIENTE Nº \" + UI.getCurrent().getSession().getAttribute(\"expediente\")\n\t\t\t\t\t+ \" ( \" + \n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\") + \" ) \");\n\t\t\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\n\t\t}\t\n\t\t\n\t\t// Maestro comunicados\n\n\t\tWS_AMA llamadaAMA = null;\n\t\ttry {\n\t\t\tllamadaAMA = new WS_AMA(service.plsqlDataSource.getConnection());\n\t\t} catch (SQLException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tHashMap respuestaMaestro = null;\n\t\t\n\t\t//System.out.println(\"Llamammos maestro comunicados: \" + UI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1));;\n\t\ttry {\n\t\t\t// pPUSUARIO, pORIGEN, pTPCOMUNI, pTPUSUARIO, pESTADO)\n\t\t\t\n\t\t\trespuestaMaestro = llamadaAMA.ejecutaWS_AMA__MAESTRO_COMUNICADOS(\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"user\").toString(),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"origen\").toString(),\n\t\t\t\t\tnull,\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"tipousuario\").toString().substring(1,1),\n\t\t\t\t\tUI.getCurrent().getSession().getAttribute(\"estadoExpediente\").toString()\n\t\t\t\t\t);\t\t\t\n\n\t\t\t\n\t\t\tMap<String, Object> retornoMaestro = new HashMap<String, Object>(respuestaMaestro);\n\t\t\tList<Map> valorMaestro = (List<Map>) retornoMaestro.get(\"COMUNICADOS\");\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",valorMaestro);\n\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tUI.getCurrent().getSession().setAttribute(\"comunicadosExpediente\",null);\n\t\t}\n\t\t\n\t\t// \t\n\t\t\n\t\t\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\t\t/*if ( !ValidarComunicado.EsValido(\"CA\") && !ValidarComunicado.EsValido(\"FT\") ) {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(false);\n\t\t}\n\t\telse {\n\t\t\tprovPantallaConsultaExpedienteInicial.provDatosDetalleExpediente.btCerrarExpediente.setVisible(true);\n\n\t\t\t\n\t\t\t\n\t\t}*/\n\t\t// Mostramos botonera de cerrar expediente\n\t\t// Validamos si tenemos que mostrar el bot�n de cerrar expediente\n\t\t\n\n\t}", "public Double deuda(Cliente c);", "public RendezVous() {\r\n this.no_rdv = 0;\r\n this.date_arr = \"\";\r\n this.date_dep = \"\";\r\n this.motif = \"\";\r\n\r\n }", "public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }", "public NodoDoble(Object valor) {\n this.valor = valor;\n }", "public static Estudiante buscarEstudiante(String Nro_de_ID) {\r\n //meter este método a la base de datos\r\n Estudiante est = new Estudiante();\r\n try {\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conexion = DriverManager.getConnection(\"jdbc:mysql://localhost/registrolaboratorios\", \"root\", \"admin\");\r\n System.out.print(\"Conexion establecida!\");\r\n Statement sentencia = conexion.createStatement();\r\n ResultSet necesario = sentencia.executeQuery(\"select * from estudiante where Nro_de_ID ='\" + Nro_de_ID + \"'\");\r\n\r\n while (necesario.next()) {\r\n\r\n String ced = necesario.getString(\"Nro_de_ID\");\r\n String nomb = necesario.getString(\"Nombres\");\r\n String ape = necesario.getString(\"Apellidos\");\r\n String lab = necesario.getString(\"Laboratorio\");\r\n String carr = necesario.getString(\"Carrera\");\r\n String mod = necesario.getString(\"Modulo\");\r\n String mta = necesario.getString(\"Materia\");\r\n String fecha = necesario.getString(\"Fecha\");\r\n String HI = necesario.getString(\"Hora_Ingreso\");\r\n String HS = necesario.getString(\"Hora_Salida\");\r\n\r\n est.setNro_de_ID(ced);\r\n est.setNombres(nomb);\r\n est.setApellidos(ape);\r\n est.setLaboratorio(lab);\r\n est.setCarrera(carr);\r\n est.setModulo(mod);\r\n est.setMateria(mta);\r\n est.setFecha(fecha);\r\n est.setHora_Ingreso(HI);\r\n est.setHora_Salida(HS);\r\n\r\n }\r\n sentencia.close();\r\n conexion.close();\r\n\r\n } catch (Exception ex) {\r\n System.out.print(\"Error en la conexion\" + ex);\r\n }\r\n return est;\r\n }", "public Noeud(Noeud pere) {\n\t\tthis.poidsActuelle = pere.poidsActuelle;\n\t\tthis.profondeur = pere.profondeur + 1;\n\t\tthis.borneInf = pere.borneInf;\n\t\tthis.borneSup = pere.borneSup;\n\t\tthis.ListObjet = pere.ListObjet; \n\t\tthis.poids_maximal = pere.poids_maximal;\n\t\tnouvelleListeObjetParNoeud(pere.ListObjetParNoeud);\n\t}", "public InstrumentoDeCuerda(String nombre, int cuerdas, String duenio){\n\tthis.nombre = nombre;\n\tthis.cuerdas = cuerdas;\n\tthis.duenio = duenio;\n }", "private void remplirPrestaraireData() {\n\t}", "public File salvarStringEnUnidadExterna(String DIRECTORIOEXTERNO, String contenido, String carpetadestino, String nombreficherodestino) {\n boolean res = true;\n File fileDestino = null;\n try {\n File carpetaDestino = JYOCUtilsv4.obtenerDirectorioEnUnidadExterna(DIRECTORIOEXTERNO, carpetadestino);\n if (carpetaDestino != null) {\n fileDestino = new File(carpetaDestino, nombreficherodestino);\n if (!fileDestino.exists())\n fileDestino.createNewFile(); // por si acaso android en el futuro ..... hace algo raro\n PrintWriter pw = new PrintWriter(fileDestino);\n pw.println(contenido);\n pw.close();\n return fileDestino;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return fileDestino;\n }", "private void teletransportar(Personaje p, Celda destino) {\n // TODO implement here\n }", "public void setDataConsegna(Date dataConsegna) {\n\t\t\tthis.dataConsegna = dataConsegna;\n\t\t}", "public void insertarOrden(Object dato) {\n Nodo nuevo = new Nodo(dato);\n int res = 0;\n // System.out.println(\"esxa\"+res);\n if (primero == null) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n // System.out.println(\"Es nulo\");\n// System.out.println(\"sss\"+primero.getDato());\n } else {\n res = comp.evaluar(dato, primero.getDato());\n // System.out.println(\"\"+res);\n if (res == -1) {\n nuevo.setReferencia(primero);\n primero = nuevo;\n } else {\n int auxres = 0;\n Nodo anterior, actual;\n anterior = actual = primero;\n auxres = comp.evaluar(dato, actual.getDato());\n while ((actual.getReferencia() != null) && (auxres == 1)) {\n anterior = actual;\n actual = actual.getReferencia();\n auxres = comp.evaluar(dato, actual.getDato());\n }\n if (auxres == 1) {\n anterior = actual;\n }\n nuevo.setReferencia(anterior.getReferencia());\n anterior.setReferencia(nuevo);\n\n }\n }\n\n }", "public void datos(Nadador n1){\n Pizarra x = new Pizarra();\n Dialog d = new Dialog();\n String v;\n int numero;\n \n x.setVisible(true);\n v = d.readString(\"Ingresa el nombre del nadador\");\n n1.setNombre(v);\n \n do\n v = d.readString(\"Ingresa la cantidad de medallas ganadas en Sidney\");\n while(!isNum(v));\n numero=Integer.parseInt(v);\n n1.setSidney(numero);\n \n do\n v=d.readString(\"Ingresa la cantidad de medallas ganadas en Atenas\");\n while(!isNum(v));\n numero=Integer.parseInt(v);\n n1.setAtenas(numero);\n \n do\n v = d.readString(\"Ingresa la cantidad de medallas ganadas en Beijing\");\n while(!isNum(v));\n numero=Integer.parseInt(v);\n n1.setBeijing(numero);\n \n do\n v = d.readString(\"Ingresa la catindad de medallas ganadas en Londres\");\n while(!isNum(v));\n numero=Integer.parseInt(v);\n n1.setLondres(numero);\n \n do\n v=d.readString(\"Ingresa la cantidad de medallas ganadas en Rio\");\n while(!isNum(v));\n numero=Integer.parseInt(v);\n n1.setRio(numero); \n }", "public String eliminarDetalle()\r\n/* 340: */ {\r\n/* 341:400 */ this.cuentaContableDimensionContable = ((CuentaContableDimensionContable)this.dtCuentaContable.getRowData());\r\n/* 342:401 */ this.cuentaContableDimensionContable.setEliminado(true);\r\n/* 343:402 */ return \"\";\r\n/* 344: */ }", "public void Mendaftar(Pasien pasien) {\r\n // mengisi data variabel daftarPasien dengan variabel lokal daftarPasien \r\n daftarPasien.add(pasien);\r\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}", "public void buscarEstudiante(String codEstudiante){\n estudianteModificar=new Estudiante();\n estudianteGradoModificar=new EstudianteGrado();\n StringBuilder query=new StringBuilder();\n query.append(\"select e.idestudiante,e.nombre,e.apellido,e.ci,e.cod_est,e.idgrado,e.idcurso,g.grado,c.nombre_curso \" );\n query.append(\" from estudiante e \");\n query.append(\" inner join grado g on e.idgrado=g.idgrado \");\n query.append(\" inner join cursos c on e.idcurso=c.idcurso \");\n query.append(\" where idestudiante=? \");\n try {\n PreparedStatement pst=connection.prepareStatement(query.toString());\n pst.setInt(1, Integer.parseInt(codEstudiante));\n ResultSet resultado=pst.executeQuery();\n //utilizamos una condicion porque la busqueda nos devuelve 1 registro\n if(resultado.next()){\n //cargando la informacion a nuestro objeto categoriaModificarde tipo categoria\n estudianteModificar.setCodEstudiante(resultado.getInt(1));\n estudianteModificar.setNomEstudiante(resultado.getString(2));\n estudianteModificar.setApEstudiante(resultado.getString(3));\n estudianteModificar.setCiEstudiante(resultado.getInt(4));\n estudianteModificar.setCodigoEstudiante(resultado.getString(5));\n estudianteModificar.setIdgradoEstudiante(resultado.getInt(6));\n estudianteModificar.setIdCursoEstudiante(resultado.getInt(7));\n estudianteGradoModificar.setNomGrado(resultado.getString(8));\n estudianteGradoModificar.setNomCurso(resultado.getString(9));\n }\n } catch (SQLException e) {\n System.out.println(\"Error de conexion\");\n e.printStackTrace();\n }\n }", "private Noder(E data) {\n this.data = data;\n }", "public IRecepteur quiEstEnDessous();", "private void datos() {\n int row;\n row = vista.tblClientes.getSelectedRow();\n cvo.setId_cliente(Integer.parseInt(vista.tblClientes.getValueAt(row, 0).toString()));\n vista.txtNombre.setText(String.valueOf(vista.tblClientes.getValueAt(row, 1)));\n vista.txtApellido.setText(String.valueOf(vista.tblClientes.getValueAt(row, 2)));\n vista.txtDireccion.setText(String.valueOf(vista.tblClientes.getValueAt(row, 3)));\n vista.txtCorreo.setText(String.valueOf(vista.tblClientes.getValueAt(row, 4)));\n vista.txtClave.setText(String.valueOf(vista.tblClientes.getValueAt(row, 5)));\n }", "public DatosInvitado() {\n\t\tsuper(MensajesVentanas.ventanaActiva);\n\t\tinitialize();\n\n\t\tjButtonAceptar.addActionListener(this);\n\t\tjButtonAceptar.addKeyListener(this);\n\t\tjButtonCancelar.addActionListener(this);\n\t\tjButtonCancelar.addKeyListener(this);\n\t\tjTextField.addKeyListener(this);\n\t\tjTextPane.addKeyListener(this);\n\t\t\n\t\tif(CR.meVenta.getVenta() != null && CR.meVenta.getVenta().getCliente().getNombreCompleto() != null){\n\t\t\tgetJTextField().setText(CR.meVenta.getVenta().getCliente().getNombreCompleto());\n\t\t\tjTextPane.requestFocus();\n\t\t}else if(CR.meServ.getListaRegalos()!=null && CR.meServ.getListaRegalos().getCliente()!=null){\n\t\t\tgetJTextField().setText(CR.meServ.getListaRegalos().getCliente().getNombreCompleto());\n\t\t\tjTextPane.requestFocus();\n\t\t}\n\t\t\n\t\tif(CR.meServ.getListaRegalos()!=null && CR.meServ.getListaRegalos().getDedicatoria()!=null)\n\t\t\tjTextPane.setText(CR.meServ.getListaRegalos().getDedicatoria());\n\t}", "public static String retornaDataPorExtenso(Date data) {\r\n\t\tint dia = getDiaMes(data);\r\n\t\tint mes = getMes(data);\r\n\t\tint ano = getAno(data);\r\n\r\n\t\tString dataExtenso = dia + \" de \" + retornaDescricaoMes(mes) + \" de \" + ano;\r\n\r\n\t\treturn dataExtenso;\r\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 Data(int giorno, String mese, int anno) {\n\t\tsetGiorno(giorno);\n\t\tsetAnno(anno);\n\t\tsetMese(mese);\n\t}", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\tpublic String detalheEleicao(Eleicao eleicao) throws RemoteException {\n\t\tString resultado = \"\";\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy:MM:dd hh:mm\");\n\t\tdataEleicao data_atual = textEditor.dataStringToData(dateFormat.format(new Date()));\n\t\tif (!data_atual.maior_data(textEditor.dataStringToData(eleicao.getDataInicio()))) {\n\t\t\tresultado += \"\\nTítulo eleição: \"+eleicao.getTitulo()+\" - Data início: \"+eleicao.getDataInicio()+\" - Data fim: \"+ eleicao.getDataFim();\n\t\t\tresultado += \"\\nEleição ainda não iniciada.\";\n\t\t\tfor(Candidatos candTemp: eleicao.getCandidatos()) {\n\t\t\t\tif(candTemp.getTipo().equalsIgnoreCase(\"lista\")) {\n\t\t\t\t\tLista lista = (Lista) candTemp;\n\t\t\t\t\tresultado += \"\\nNúmero candidato: \"+lista.getId()+\" - Nome lista: \"+lista.getNome()+\" Membros: \"+lista.getLista_pessoas();\n\t\t\t\t\tfor(PessoaLista pessoalista : lista.getLista_pessoas()) {\n\t\t\t\t\t\tresultado += \"\\n\\tCC: \"+pessoalista.getPessoa().getNcc()+\" - Cargo: \"+pessoalista.getCargo()+ \" - Nome: \"+pessoalista.getPessoa().getNome();\n\t\t\t\t\t}\n\t\t\t\t\tresultado += \"\\n\";\n\t\t\t\t}else {\n\t\t\t\t\tCandidatoIndividual cand = (CandidatoIndividual) candTemp;\n\t\t\t\t\tresultado += \"\\nNúmero candidato: \"+cand.getId()+\" - Nome: \"+cand.getPessoa().getNome()+\" - CC: \"+cand.getPessoa().getNcc();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (data_atual.maior_data(textEditor.dataStringToData(eleicao.getDataFim()))) {\n\t\t\t\tresultado += \"\\nTítulo eleição: \"+eleicao.getTitulo()+\" - Data início: \"+eleicao.getDataInicio()+\" - Data fim: \"+ eleicao.getDataFim();\n\t\t\t\tresultado += \"\\nEleição terminada.\";\n\t\t\t\tresultado += \"\\nVotos em branco/nulos: \"+eleicao.getnVotoBNA();\n\t\t\t\tfor(Candidatos candTemp: eleicao.getCandidatos()) {\n\t\t\t\t\tif(candTemp.getTipo().equalsIgnoreCase(\"lista\")) {\n\t\t\t\t\t\tLista lista = (Lista) candTemp;\n\t\t\t\t\t\tresultado += \"\\nNúmero candidato: \"+lista.getId()+\" - Nome lista: \"+lista.getNome()+\" Membros: \"+lista.getLista_pessoas()+\"Votos: \"+lista.getnVotos();\n\t\t\t\t\t\tresultado += \"\\n\";\n\t\t\t\t\t}else {\n\t\t\t\t\t\tCandidatoIndividual cand = (CandidatoIndividual) candTemp;\n\t\t\t\t\t\tresultado += \"\\nNúmero candidato: \"+cand.getId()+\" - Nome: \"+cand.getPessoa().getNome()+\" - CC: \"+cand.getPessoa().getNcc()+\" - Votos: \"+cand.getnVotos();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(eleicao.getDataInicio()+\"-\"+eleicao.getDataFim()+\": A decorrer\");\n\t\t\t}\n\t\t}\n\t\treturn resultado;\n\t\n\t}", "public void SolicitarDatos() {\n\t\t\r\n\t\tSystem.out.println(\"nombre:\");\r\n\t\tSystem.out.println(\"apellido\");\r\n\t\tSystem.out.println(\"numCedula\");\r\n\t\t\r\n\t}", "public void carregar(DadosGrafico dados){\r\n \r\n }", "public fDetalhePedido(java.awt.Frame parent, boolean modal, int id, String nome, String data, int num, int nf) {\n super(parent, modal);\n initComponents();\n\n DefaultTableModel modelo2 = (DefaultTableModel) jTable2.getModel();\n jTable2.setRowSorter(new TableRowSorter(modelo2));\n\n jLabel4.setText(id + \" - \" + nome);\n jLabel7.setText(\"NF: \" + nf);\n jLabel8.setText(\"Pedido: \" + num);\n jLabel9.setText(data);\n\n itensPedidoDAO idao = new itensPedidoDAO();\n\n Double total = 0.0;\n\n for (itensPedido i : idao.carrinho(num)) {\n\n modelo2.addRow(new Object[]{\n i.getQuantidade(),\n i.getDescricao(),\n i.getPreco(),\n i.getPreco() * i.getQuantidade()\n\n });\n\n total += i.getPreco() * i.getQuantidade();\n\n String tot = Double.toString(total);\n jLabel5.setText(tot);\n\n }\n }", "public List<ViewEtudiantInscriptionEcheance> rechercheEtudiantInscripEcheanceParNomEtPrenom(){ \r\n try{ \r\n setListRechercheEtudiantInscripEcheance(viewEtudiantInscripEcheanceFacadeL.findEtudInscripByNonEtPrenomWithJocker(getViewEtudiantInscripEcheance().getNomEtPrenom())); \r\n }catch (Exception ex) {\r\n System.err.println(\"Erreur capturée : \"+ex);\r\n }\r\n return listRechercheEtudiantInscripEcheance;\r\n }", "public void initData(UnitatFormativa unitat, Examen exam) throws Excepcio {\n\n\t\tif (unitat == null && exam == null) throw new Excepcio(\"EdicioExamenController\", \"Cal indicar una Unitat Formativa o bé un Examen per poder editar-los\");\n\n\t\tif (exam == null) this.examen = Model.getInstance().addExamen(unitat);\n\t\telse this.examen = exam;\n\n\t\tthis.unitat = this.examen.getUnitat();\n\n\n\t\tif (this.btnPDF != null) {\n\t\t\tImage imagePDF = new Image(getClass().getResourceAsStream(\"resources/pdf-logo.png\"));\n\t\t\tImageView logo = new ImageView(imagePDF);\n\t\t\tlogo.setFitWidth(20);\n\t\t\tlogo.setFitHeight(20);\n\t\t\tthis.btnPDF.setGraphic(logo);\n\t\t}\n\n\t\tif (this.tipusPregunta != null) {\n\t\t\tthis.tipusPregunta.selectedToggleProperty().addListener(new ChangeListener<Toggle>() {\n\t\t\t\t@Override\n\t\t\t\tpublic void changed(ObservableValue<? extends Toggle> ov, Toggle t, Toggle t1) {\n\n\t\t\t\t\tRadioButton chk = (RadioButton)t1.getToggleGroup().getSelectedToggle(); // Cast object to radio button\n\n\t\t\t\t\tString radio = \"\";\n\t\t\t\t\tif (chk != null && chk.getText() != null) radio = chk.getText();\n\n\t\t\t\t\tbtnOpcions.setDisable(!radio.equals(radioOpcions.getText()));\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif (this.txtUF != null) {\n\t\t\tthis.txtUF.setText( this.unitat.toString() );\n\t\t}\n\n\t\tif (this.examen != null) {\n\t\t\tthis.initFormExamen(this.examen);\n\n\t\t\tthis.preguntes.addAll(this.examen.getPreguntes());\n\n\t\t\tif (this.colNum != null) {\n\t\t\t\tthis.colNum.setMinWidth(30);\n\t\t\t\tthis.colNum.setMaxWidth(40);\n\t\t\t\tthis.colNum.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Pregunta, Number>, ObservableValue<Number>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ObservableValue<Number> call(TableColumn.CellDataFeatures<Pregunta, Number> cell) {\n\n\t\t\t\t\t\treturn new SimpleIntegerProperty(preguntes.indexOf(cell.getValue()) + 1);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (this.colPuntuacio != null) {\n\t\t\t\tthis.colPuntuacio.setMinWidth(60);\n\t\t\t\tthis.colPuntuacio.setMaxWidth(80);\n\t\t\t\tthis.colPuntuacio.setCellValueFactory(new PropertyValueFactory<Pregunta,Double>(\"getPuntuacio\"));\n\t\t\t\tthis.colPuntuacio.setCellFactory(new ColumnFormatter<Pregunta, Double>(new DecimalFormat( \"#0.0\" )));\n\n\n\t\t\t\tthis.colPuntuacio.setOnEditCommit(\n\t\t\t\t\t\tnew EventHandler<CellEditEvent<Pregunta, Double>>() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void handle(CellEditEvent<Pregunta, Double> t) {\n\t\t\t\t\t\t\t\tPregunta modificat = t.getTableView().getItems().get(t.getTablePosition().getRow() );\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tmodificat.setPuntuacio(t.getNewValue());\n\t\t\t\t\t\t\t\t} catch (Excepcio e) {\n\t\t\t\t\t\t\t\t\tMenuController.mostrarError(\"No s'ha pogut modificar la puntuació de la pregunta\", e.getMessage());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (this.colPregunta != null) {\n\t\t\t\tthis.colPregunta.setMinWidth(200);\n\t\t\t\tthis.colPregunta.setMaxWidth(250);\n\t\t\t\tthis.colPregunta.setCellValueFactory(new PropertyValueFactory<Pregunta,String>(\"getText\"));\n\t\t\t\tthis.colPregunta.setCellFactory(TextFieldTableCell.forTableColumn());\t// Edició\n\n\t\t\t\tthis.colPregunta.setOnEditCommit(\n\t\t\t\t\t\tnew EventHandler<CellEditEvent<Pregunta, String>>() {\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void handle(CellEditEvent<Pregunta, String> t) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tPregunta modificat = t.getTableView().getItems().get(t.getTablePosition().getRow() );\n\t\t\t\t\t\t\t\t\tmodificat.setText(t.getNewValue());\n\t\t\t\t\t\t\t\t} catch (Excepcio e) {\n\t\t\t\t\t\t\t\t\tMenuController.mostrarError(\"No s'ha pogut modificar el text de la pregunta\", e.getMessage());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\n\t\t\t}\n\n\t\t\tif (this.colVerdaderFals != null) {\n\t\t\t\tthis.colVerdaderFals.setMinWidth(50);\n\t\t\t\tthis.colVerdaderFals.setMaxWidth(70);\n\t\t\t\t// define a simple boolean cell value for the action column so that the column will only be shown for non-empty rows.\n\t\t\t\tthis.colVerdaderFals.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Pregunta, Boolean>, ObservableValue<Boolean>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ObservableValue<Boolean> call(TableColumn.CellDataFeatures<Pregunta, Boolean> cell) {\n\t\t\t\t\t\treturn new SimpleBooleanProperty(cell.getValue().esVerdaderFals());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthis.colVerdaderFals.setCellFactory(new ColumnCheckBox<Pregunta, Boolean>(){\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void checkAction(Pregunta element, boolean value) {\n\t\t\t\t\t\t// No cal fer res, no és editable\n\t\t\t\t\t}\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean checkValue(Pregunta element) {\n\t\t\t\t\t\treturn element.esVerdaderFals();\n\t\t\t\t\t}\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean checkEditable(Pregunta element) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (this.colOpcions != null) {\n\t\t\t\tthis.colOpcions.setMinWidth(50);\n\t\t\t\tthis.colOpcions.setMaxWidth(70);\n\t\t\t\tthis.colOpcions.setCellValueFactory(new PropertyValueFactory<Pregunta,Integer>(\"getTotalOpcions\"));\n\t\t\t}\n\n\n\t\t\tif (this.colEsborrar != null) {\n\t\t\t\tthis.colEsborrar.setMinWidth(100);\n\t\t\t\tthis.colEsborrar.setMaxWidth(100);\n\t\t\t\t// define a simple boolean cell value for the action column so that the column will only be shown for non-empty rows.\n\t\t\t\tthis.colEsborrar.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Pregunta, Boolean>, ObservableValue<Boolean>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic ObservableValue<Boolean> call(TableColumn.CellDataFeatures<Pregunta, Boolean> button) {\n\t\t\t\t\t\treturn new SimpleBooleanProperty(true);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tthis.colEsborrar.setCellFactory(new ColumnButton<Pregunta, Boolean>( \"Esborrar\" ) {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void buttonAction(Pregunta pregunta) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\texamen.esborrarPregunta(preguntes.indexOf(pregunta) + 1);\n\t\t\t\t\t\t\tpreguntes.remove(pregunta);\n\n\t\t\t\t\t\t\tinitFormExamen(examen);\n\t\t\t\t\t\t} catch (Excepcio e) {\n\t\t\t\t\t\t\tMenuController.mostrarError(\"No s'ha esborrat la pregunta\", e.getMessage());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (this.preguntesTable != null) {\n\t\t\t\tthis.preguntesTable.setEditable(true);\n\t\t\t\tthis.preguntesTable.getSelectionModel().setCellSelectionEnabled(true);\n\t\t\t\tthis.preguntesTable.setItems( this.preguntes );\n\t\t\t\tthis.preguntesTable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);\n\t\t\t}\n\t\t}\n\t}", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Campo campoDataInizio;\n Campo campoDataFine;\n Campo campoConto;\n Date dataIniziale;\n Date dataFinale;\n int numPersone;\n ContoModulo modConto;\n\n\n String titolo = \"Esecuzione addebiti fissi\";\n AddebitoFissoPannello pannello;\n Date dataInizio;\n Pannello panDate;\n Campo campoStato;\n Filtro filtro;\n int codConto;\n int codCamera;\n\n\n try { // prova ad eseguire il codice\n\n /* recupera dati generali */\n modConto = Albergo.Moduli.Conto();\n codConto = this.getCodConto();\n codCamera = modConto.query().valoreInt(Conto.Cam.camera.get(), codConto);\n numPersone = CameraModulo.getNumLetti(codCamera);\n\n /* crea il pannello servizi e vi registra la camera\n * per avere l'anteprima dei prezzi*/\n pannello = new AddebitoFissoPannello();\n this.setPanServizi(pannello);\n pannello.setNumPersone(numPersone);\n this.setTitolo(titolo);\n\n// /* regola date suggerite */\n// dataFinale = Progetto.getDataCorrente();\n// dataInizio = Lib.Data.add(dataFinale, -1);\n\n /* pannello date */\n campoDataInizio = CampoFactory.data(nomeDataIni);\n campoDataInizio.decora().obbligatorio();\n// campoDataInizio.setValore(dataInizio);\n\n campoDataFine = CampoFactory.data(nomeDataFine);\n campoDataFine.decora().obbligatorio();\n// campoDataFine.setValore(dataFinale);\n\n /* conto */\n campoConto = CampoFactory.comboLinkSel(nomeConto);\n campoConto.setNomeModuloLinkato(Conto.NOME_MODULO);\n campoConto.setLarScheda(180);\n campoConto.decora().obbligatorio();\n campoConto.decora().etichetta(\"conto da addebitare\");\n campoConto.setUsaNuovo(false);\n campoConto.setUsaModifica(false);\n\n /* inizializza e assegna il valore (se non inizializzo\n * il combo mi cambia il campo dati e il valore si perde)*/\n campoConto.inizializza();\n campoConto.setValore(this.getCodConto());\n\n /* filtro per vedere solo i conti aperti dell'azienda corrente */\n campoStato = modConto.getCampo(Conto.Cam.chiuso.get());\n filtro = FiltroFactory.crea(campoStato, false);\n filtro.add(modConto.getFiltroAzienda());\n campoConto.getCampoDB().setFiltroCorrente(filtro);\n\n panDate = PannelloFactory.orizzontale(this.getModulo());\n panDate.creaBordo(\"Periodo da addebitare\");\n panDate.add(campoDataInizio);\n panDate.add(campoDataFine);\n panDate.add(campoConto);\n\n this.addPannello(panDate);\n this.addPannello(this.getPanServizi());\n\n this.regolaCamera();\n\n /* recupera la data iniziale (oggi) */\n dataIniziale = AlbergoLib.getDataProgramma();\n\n /* recupera la data di partenza prevista dal conto */\n modConto = ContoModulo.get();\n dataFinale = modConto.query().valoreData(Conto.Cam.validoAl.get(),\n this.getCodConto());\n\n /* recupera il numero di persone dal conto */\n numPersone = modConto.query().valoreInt(Conto.Cam.numPersone.get(),\n this.getCodConto());\n\n /* regola date suggerite */\n campoDataInizio = this.getCampo(nomeDataIni);\n campoDataInizio.setValore(dataIniziale);\n\n campoDataFine = this.getCampo(nomeDataFine);\n campoDataFine.setValore(dataFinale);\n\n /* conto */\n campoConto = this.getCampo(nomeConto);\n campoConto.setAbilitato(false);\n\n /* regola la data iniziale di riferimento per l'anteprima dei prezzi */\n Date data = (Date)campoDataInizio.getValore();\n this.getPanServizi().setDataPrezzi(data);\n\n /* regola il numero di persone dal conto */\n this.getPanServizi().setNumPersone(numPersone);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "@Override\n public synchronized void demarrer(){\n if(modele.getQuiterJeu()){return;}\n modele.getMoteurJeu().setEtapeJeu(this);\n // apercu dans le termial pour debuger\n System.out.println(\"-----------------nom joueur: \"+modele.getJoueurCourant().getNom());\n System.out.print(\" humain: \"+modele.getJoueurCourant().estHumain());\n System.out.print(\" stand: \"+modele.getJoueurCourant().getMainCourant().getStand());\n System.out.print(\" perdu: \"+modele.getJoueurCourant().getMainCourant().estPerdu());\n System.out.print(\" blackjack: \"+modele.getJoueurCourant().getMainCourant().estBlackJack());\n System.out.println(\" jeu: \"+modele.getJoueurCourant().getMainCourant().getJeu().toString());\n //-------------------------------------------------\n // On ne fait pas une boucle ici pour que l'observer\n // puisse acceder a son observé et se mettre a jour\n //-------------------------------------------------\n new Thread(){\n @Override\n public void run() {\n try {\n // si plus de carte\n if(modele.getPioche().getCartes().size() < 1){\n for(Carte carte:modele.getDefausse().getCartes()){\n carte.setFaceCarte(Face.VERSO);\n modele.getPioche().ajouterDessous(carte);\n }\n modele.getDefausse().vider();\n modele.getPioche().melanger();\n }\n \n \n // si il peut plus jouer\n if(modele.getJoueurCourant().getMainCourant().estBlackJack() || modele.getJoueurCourant().getMainCourant().estPerdu() \n || modele.getJoueurCourant().getMainCourant().getStand() || modele.getJoueurCourant().getMainCourant().est21()\n || modele.getJoueurCourant().getMainCourant().getAAbandonner() || modele.getJoueurCourant().getAPerduJeu()){\n \n // si le joueur a une autre main\n if(modele.getJoueurCourant().mainSuivant()){\n Thread.sleep(2000);\n demarrer();\n \n }\n // sinon si il y a un joueur suivant on fait joueur suivant\n else if(modele.joueurSuivant()){\n Thread.sleep(2000);\n demarrer();\n }else{\n modele.getMoteurJeu().setEtapeJeu(etapeSuivant);\n Thread.sleep(2000);\n modele.setMessage(modele.getCroupier().getNom()+\" plays\");\n // on affiche les carte du croupier\n for(Carte carte: modele.getCroupier().getMainCourant().getJeu().getCartes()){\n carte.setFaceCarte(Face.RECTO);\n }\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++\");\n Thread.sleep(3000);\n demarrerEtapeSuivant();\n\n }\n\n }\n // sinon\n else{\n modele.setMessage(modele.getJoueurCourant().getNom()+\" plays\");\n if(!modele.getJoueurCourant().estHumain()){\n modele.getJoueurCourant().jouer(modele.getPioche(),modele.getDefausse());\n Thread.sleep(3000);\n demarrer();\n }\n \n\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }.start();\n \n }", "public int[] jouer(int[] dernierJeu, boolean ordiCommence)\r\n {\r\n System.out.println(\"dJ : \"+dernierJeu[0]+\" \"+dernierJeu[1]);\r\n\r\n //System.out.println(\"Ordinateur va jouer\");\r\n int[] res = new int[3]; //tableau a rendre\r\n if (!ordiCommence)\r\n {\r\n actualiser(dernierJeu);\r\n }\r\n\r\n res = chercher(dernierJeu[0], dernierJeu[1], 3);\r\n if (res == tabVide)\r\n {\r\n res = chercher(dernierJeu[0], dernierJeu[1], 1);\r\n if (res == tabVide)\r\n {\r\n res = chercher(dernierJeu[0], dernierJeu[1], 0);\r\n if (res == tabVide)\r\n {\r\n res = chercher(dernierJeu[0], dernierJeu[1], 2);\r\n }\r\n }\r\n }\r\n return res;\r\n }", "public void setDato(int dato) {\r\n this.dato = dato;\r\n }", "public EncabezadoRespuesta salidaAsistencia(AsistenciaDTO asistencia) {\n\t\t//Primero generamos el identificador unico de la transaccion\n\t\tString uid = GUIDGenerator.generateGUID(asistencia);\n\t\t//Mandamos a log el objeto de entrada\n\t\tLogHandler.debug(uid, this.getClass(), \"salidaAsistencia - Datos Entrada: \" + asistencia);\n\t\t//Variable de resultado\n\t\tEncabezadoRespuesta respuesta = new EncabezadoRespuesta();\n\t\ttry {\n\t\t\tif (asistencia.getIdEmpleado() == null) {\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el id del empleado.\");\n \t}\n \tif (asistencia.getUsuarioUltMod() == null || asistencia.getUsuarioUltMod().trim().isEmpty())\n \t{\n \t\tthrow new ExcepcionesCuadrillas(\"Es necesario el usuario.\");\n \t}\n \tAsistenciaDAO dao = new AsistenciaDAO();\n \trespuesta = dao.salidaAsistencia(uid, asistencia);\n\t\t} catch (ExcepcionesCuadrillas ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"salidaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tLogHandler.error(uid, this.getClass(), \"salidaAsistencia - Error: \" + ex.getMessage(), ex);\n\t\t\trespuesta.setUid(uid);\n\t\t\trespuesta.setEstatus(false);\n\t\t\trespuesta.setMensajeFuncional(ex.getMessage());\n\t\t\trespuesta.setMensajeTecnico(ex.getMessage());\n\t\t}\n\t\tLogHandler.debug(uid, this.getClass(), \"salidaAsistencia - Datos Salida: \" + respuesta);\n\t\treturn respuesta;\n\t}", "@Override\n\t\t\t\tpublic void onEntrada(Object entrada, View view) {\n\t\t\t\t\tif (entrada != null) \n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tTextView TxtDNI1 = (TextView) view.findViewById(R.id.textViewDNI);\n\t\t\t\t\t\tTxtDNI1.setText(((Lista_entrada_ControlAcceso) entrada).get_IdFuncionario()); \n\n\t\t\t\t\t\tTextView TxtPlaca1 = (TextView) view.findViewById(R.id.textView_Placa);\n\t\t\t\t\t\tTxtPlaca1.setText(((Lista_entrada_ControlAcceso) entrada).get_Patente()); \n\t\t\t\t\t\t\n\t\t\t\t\t\tTextView TxtCod1 = (TextView) view.findViewById(R.id.textView_Cod); \n\t\t\t\t\t\tTxtCod1.setText(((Lista_entrada_ControlAcceso) entrada).get_CodError());\n\t\t\t\t\t\t\n\t\t\t\t\t\tTextView TxtFecha1= (TextView) view.findViewById(R.id.textView_Fecha); \n\t\t\t\t\t\tTxtFecha1.setText(((Lista_entrada_ControlAcceso) entrada).get_Fecha());\n\t\t\t\t\t\t\n\t\t\t\t\t\tTextView TxtHora1 = (TextView) view.findViewById(R.id.textView_Nivel); \n\t\t\t\t\t\tTxtHora1.setText(((Lista_entrada_ControlAcceso) entrada).get_Hora());\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Toast.makeText(mContext,cadenaNueva, Toast.LENGTH_LONG).show();\n\n\t\t\t\t\t}\n\t\t\t\t}", "public CompteEpargne(int numeroDeCompte, String dateOuvertureCompte, double taux) {\n\t\tsuper();\n\t\tsuper.numeroDeCompte = numeroDeCompte;\n\t\tsuper.dateOuvertureCompte = dateOuvertureCompte;\n\t\tthis.taux = taux;\n\t\tsuper.typeDeCompte = true;\n\t}", "private static void registrarAuditoriaDetallesValorPorUnidad(Connexion connexion,ValorPorUnidad valorporunidad)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getid_empresa().equals(valorporunidad.getValorPorUnidadOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getid_unidad().equals(valorporunidad.getValorPorUnidadOriginal().getid_unidad()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getid_unidad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getid_unidad().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getid_unidad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getid_unidad().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.IDUNIDAD,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(valorporunidad.getIsNew()||!valorporunidad.getvalor().equals(valorporunidad.getValorPorUnidadOriginal().getvalor()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(valorporunidad.getValorPorUnidadOriginal().getvalor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=valorporunidad.getValorPorUnidadOriginal().getvalor().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(valorporunidad.getvalor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=valorporunidad.getvalor().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),ValorPorUnidadConstantesFunciones.VALOR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}", "public EstructuraContratosDatDTO nuevoDatos() {\n\t\treturn consultaProsperaService.nuevosDatos();\n\t}", "public void getData( ){\n model.getDataVector( ).removeAllElements( );\n model.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement stat = (Statement)koneksi_db.config( ).createStatement( );\n String sql = \"Select * from daftar_log\";\n ResultSet res = stat.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(res.next ()){\n Object[ ] obj = new Object[6];\n obj[0] = res.getString(\"id_log\"); \n obj[1] = res.getString(\"nama_kejadian\");\n model.addRow(obj);\n }\n }\n catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }", "@Override\n public void onClick(View v) {\n String nom =\"\";\n String prenom = \"\";\n String mail = \"\";\n String tel = \"\";\n String mdp = \"\";\n String confMdp = \"\";\n\n // Recuperation des données saisies\n try {\n nom = nomInscription.getText().toString();\n prenom = prenomInscription.getText().toString();\n mail = mailInscription.getText().toString();\n tel = telInscription.getText().toString();\n mdp = mdpInscription.getText().toString();\n confMdp = mdpConfirmation.getText().toString();\n\n Utilisateur connexionUtilisateurs = new Utilisateur(nom,prenom,mail,tel,mdp);\n controle.setConnexionUtilisateurs(connexionUtilisateurs);\n }catch (Exception e){\n Log.d(\"Recup\", \"****************** Erreur reuperation donnees inscription\\n****\" + e);\n }\n\n // Controle des données saisie\n if((nom.equals(\"\"))||(prenom.equals(\"\"))||(mail.equals(\"\"))||(tel.equals(\"\"))||(mdp.equals(\"\"))||(confMdp.equals(\"\"))){\n Toast.makeText(InscriptionActivity.this,\"Saisie incorrect\",Toast.LENGTH_SHORT).show();\n }else if (!(mdp.equals(confMdp))){\n Toast.makeText(InscriptionActivity.this,\"mots de passe incorrect\",Toast.LENGTH_SHORT).show();\n }else if (tel.length() != 10){\n Toast.makeText(InscriptionActivity.this,\"Numéro de téléphone incorrect\",Toast.LENGTH_SHORT).show();\n }else if (!isValiEmail(mail)){\n Toast.makeText(InscriptionActivity.this,\"Format de l'adresse mail incorrect\",Toast.LENGTH_SHORT).show();\n }else {\n // si la saisie est correcte, envoie les informations à la base de données pour l'inscription\n afficheResult(nom,prenom,mail,tel,mdp);\n Utilisateur user = new Utilisateur(nom,prenom,mail,tel,mdp);\n AccesDistant accesDistant = new AccesDistant();\n Log.d(\"envoi inscript\",\"*************\" + user.inscriptionConvertToJSONArray());\n accesDistant.envoi(\"inscription\", user.inscriptionConvertToJSONArray());\n\n // Bouton pour aller vers la page home\n Intent intent = new Intent(InscriptionActivity.this,HomeActivity.class);\n startActivity(intent);\n }\n\n }", "public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\n }", "private Date getDataFine() {\n return (Date)this.getCampo(DialogoStatistiche.nomeDataFine).getValore();\n }", "private static void registrarAuditoriaDetallesPresuTipoProyecto(Connexion connexion,PresuTipoProyecto presutipoproyecto)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getid_empresa().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getcodigo().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(presutipoproyecto.getIsNew()||!presutipoproyecto.getnombre().equals(presutipoproyecto.getPresuTipoProyectoOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(presutipoproyecto.getPresuTipoProyectoOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=presutipoproyecto.getPresuTipoProyectoOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(presutipoproyecto.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=presutipoproyecto.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PresuTipoProyectoConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}", "public ProduttoreDato(Semaforo pieno, Semaforo vuoto) {\n this.pieno = pieno;\n this.vuoto = vuoto;\n }", "@Override\n\tpublic void entradaestoque(EntidadeDominio entidade) throws SQLException {\n\t\topenConnection();\n\t\tPreparedStatement pst=null;\n\t\tLivro livro = (Livro)entidade;\t\t\n\t\t\n\t\ttry {\n\t\t\tconnection.setAutoCommit(false);\t\t\t\n\t\t\t\t\t\n\t\t\tStringBuilder sql = new StringBuilder();\t\t\t\n\t\t\tsql.append(\"INSERT INTO estoque (id_livro, quantidade,id_precificacao, custo) VALUES (?,?,?,?)\");\n\t\t\t\t\t\n\t\t\tpst = connection.prepareStatement(sql.toString());\n\t\t\tpst.setInt(1, livro.getId());\n\t\t\tpst.setInt(2, livro.getEstoque().getQuantidade());\n\t\t\tpst.setInt(3, livro.getPrecificacao().getTipo());\n\t\t\tpst.setDouble(4, livro.getEstoque().getCusto());\n\t\t\tpst.executeUpdate();\t\t\t\n\t\t\tconnection.commit();\t\t\n\t\t} catch (SQLException e) {\n\t\t\ttry {\n\t\t\t\tconnection.rollback();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\te.printStackTrace();\t\t\t\n\t\t}finally{\n\t\t\ttry {\n\t\t\t\tpst.close();\n\t\t\t\tconnection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}", "public Mensaje(String cabecera, Datos data){\r\n \r\n this.header = cabecera;\r\n this.data = data;\r\n }", "public TransmitirResponse transmitirNroExpediente(TransmitirNroExpedienteRequest tramiteSuceRequest) {\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"======================\");\r\n\t\t\tSystem.out.println(\"Inicio: transmitirNroExpediente\");\r\n\r\n\t\t\tMensajeType mensajeType = tramiteSuceRequest.getMensaje();\r\n\r\n\t\t\t//1: Se recupera la SUCE\r\n\t\t\tBeanSuce suce = new BeanSuce();\r\n\t\t\tsuce.setSuce(mensajeType.getSuce());\r\n\t\t\tsuce.setNroExpediente(mensajeType.getNumeroExpediente());\r\n\r\n\t\t\t//2: Se actualiza la SUCE\r\n\t\t\tServicioSuce servicioSuce = new ServicioSuce();\r\n\t\t\tservicioSuce.modificarSuce(suce);\r\n\r\n\t\t\t// 2.1: Registrar estado traza 6: Suce generada\r\n\t\t\tBeanTraza traza = new BeanTraza();\r\n\t\t\ttraza.setEstadoTraza(6);\r\n\t\t\ttraza.setDe(2);\r\n\t\t\ttraza.setPara(3);\r\n\r\n\t\t\tBeanFormato formato = new BeanFormato();\r\n\t\t\tformato.setFormato(mensajeType.getFormato());\r\n\r\n\t\t\tServicioOrden servicioOrden = new ServicioOrden();\r\n\t\t\tBeanOrden orden = servicioOrden.buscarOrdenPorSuce(suce.getSuce());\r\n\t\t\torden = servicioOrden.buscarOrdenPorOrdenId(orden.getOrdenId(), formato);\r\n\t\t\tBeanTce tce = servicioOrden.buscarTcePorOrdenId(orden.getOrdenId());\r\n\t\t\tBeanMto mto = servicioOrden.buscarMtoVigentePorOrdenId(orden.getOrdenId());\r\n\t\t\tservicioOrden.registrarTraza(tce, mto, null, null, traza);\r\n\r\n\t\t\t//3: Transmitir Nro de Expediente a Usuario\r\n\t\t\t//TODO Transmitir Nro de Expediente a Usuario\r\n\r\n\t\t\tSystem.out.println(\"Fin\");\r\n\t\t\tSystem.out.println(\"======================\");\r\n\r\n\t\t\tTransmitirResponse res = new TransmitirResponse();\r\n\t\t\tres.setCodigo(\"OK\");\r\n\t\t\tres.setTexto(\"Exito\");\r\n\t\t\treturn res;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t\tTransmitirResponse res = new TransmitirResponse();\r\n\t\t\tres.setCodigo(\"ERR\");\r\n\t\t\tres.setTexto(\"Error\");\r\n\t\t\treturn res;\r\n\t\t}\r\n\t}", "private static void registrarAuditoriaDetallesPlantillaFactura(Connexion connexion,PlantillaFactura plantillafactura)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_empresa().equals(plantillafactura.getPlantillaFacturaOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getcodigo().equals(plantillafactura.getPlantillaFacturaOriginal().getcodigo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getcodigo();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getcodigo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getcodigo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.CODIGO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getnombre().equals(plantillafactura.getPlantillaFacturaOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getdescripcion().equals(plantillafactura.getPlantillaFacturaOriginal().getdescripcion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getdescripcion();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getdescripcion() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.DESCRIPCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getes_proveedor().equals(plantillafactura.getPlantillaFacturaOriginal().getes_proveedor()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getes_proveedor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getes_proveedor().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getes_proveedor()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getes_proveedor().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.ESPROVEEDOR,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_aplicada().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_aplicada().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_aplicada()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_aplicada().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEAPLICADA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_credito_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_credito_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_credito_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOBIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_credito_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_credito_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_credito_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_credito_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLECREDITOSERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_fuente_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_fuente_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_fuente_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTEBIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_fuente_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_fuente_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_fuente_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_fuente_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONFUENTESERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_iva_bien().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_bien().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_iva_bien()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_iva_bien().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVABIEN,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_tipo_retencion_iva_servicio().equals(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_tipo_retencion_iva_servicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_tipo_retencion_iva_servicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_tipo_retencion_iva_servicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDTIPORETENCIONIVASERVICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(plantillafactura.getIsNew()||!plantillafactura.getid_cuenta_contable_gasto().equals(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=plantillafactura.getPlantillaFacturaOriginal().getid_cuenta_contable_gasto().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(plantillafactura.getid_cuenta_contable_gasto()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=plantillafactura.getid_cuenta_contable_gasto().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),PlantillaFacturaConstantesFunciones.IDCUENTACONTABLEGASTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}", "private static void registrarAuditoriaDetallesCaja(Connexion connexion,Caja caja)throws Exception {\n\t\t\r\n\t\tString strValorActual=null;\r\n\t\tString strValorNuevo=null;\r\n\t\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getid_empresa().equals(caja.getCajaOriginal().getid_empresa()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getid_empresa().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getid_empresa()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getid_empresa().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.IDEMPRESA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getid_sucursal().equals(caja.getCajaOriginal().getid_sucursal()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getid_sucursal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getid_sucursal().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getid_sucursal()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getid_sucursal().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.IDSUCURSAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getnombre().equals(caja.getCajaOriginal().getnombre()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getnombre();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getnombre()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getnombre() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.NOMBRE,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getnombre_equipo().equals(caja.getCajaOriginal().getnombre_equipo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getnombre_equipo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getnombre_equipo();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getnombre_equipo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getnombre_equipo() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.NOMBREEQUIPO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getnombre_impresora().equals(caja.getCajaOriginal().getnombre_impresora()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getnombre_impresora()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getnombre_impresora();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getnombre_impresora()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getnombre_impresora() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.NOMBREIMPRESORA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsecuencial_pedido().equals(caja.getCajaOriginal().getsecuencial_pedido()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsecuencial_pedido()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsecuencial_pedido().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsecuencial_pedido()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsecuencial_pedido().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECUENCIALPEDIDO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsecuencial_pedido_formato().equals(caja.getCajaOriginal().getsecuencial_pedido_formato()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsecuencial_pedido_formato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsecuencial_pedido_formato();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsecuencial_pedido_formato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsecuencial_pedido_formato() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECUENCIALPEDIDOFORMATO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getpunto_emision().equals(caja.getCajaOriginal().getpunto_emision()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getpunto_emision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getpunto_emision();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getpunto_emision()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getpunto_emision() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.PUNTOEMISION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getestablecimiento().equals(caja.getCajaOriginal().getestablecimiento()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getestablecimiento()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getestablecimiento();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getestablecimiento()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getestablecimiento() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.ESTABLECIMIENTO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getfecha_inicio().equals(caja.getCajaOriginal().getfecha_inicio()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getfecha_inicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getfecha_inicio().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getfecha_inicio()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getfecha_inicio().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.FECHAINICIO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getfecha_final().equals(caja.getCajaOriginal().getfecha_final()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getfecha_final()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getfecha_final().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getfecha_final()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getfecha_final().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.FECHAFINAL,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getesta_activo().equals(caja.getCajaOriginal().getesta_activo()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getesta_activo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getesta_activo().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getesta_activo()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getesta_activo().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.ESTAACTIVO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getdescripcion().equals(caja.getCajaOriginal().getdescripcion()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getdescripcion();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getdescripcion()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getdescripcion() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.DESCRIPCION,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsecuencial_factura().equals(caja.getCajaOriginal().getsecuencial_factura()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsecuencial_factura()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsecuencial_factura().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsecuencial_factura()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsecuencial_factura().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECUENCIALFACTURA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsecuencial_factura_formato().equals(caja.getCajaOriginal().getsecuencial_factura_formato()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsecuencial_factura_formato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsecuencial_factura_formato();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsecuencial_factura_formato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsecuencial_factura_formato() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECUENCIALFACTURAFORMATO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsecuencial_nota_venta().equals(caja.getCajaOriginal().getsecuencial_nota_venta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsecuencial_nota_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsecuencial_nota_venta().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsecuencial_nota_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsecuencial_nota_venta().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECUENCIALNOTAVENTA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsecuencial_nota_venta_formato().equals(caja.getCajaOriginal().getsecuencial_nota_venta_formato()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsecuencial_nota_venta_formato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsecuencial_nota_venta_formato();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsecuencial_nota_venta_formato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsecuencial_nota_venta_formato() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECUENCIALNOTAVENTAFORMATO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsecuencia_nota_credito().equals(caja.getCajaOriginal().getsecuencia_nota_credito()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsecuencia_nota_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsecuencia_nota_credito().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsecuencia_nota_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsecuencia_nota_credito().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECUENCIANOTACREDITO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsecuencia_nota_credito_formato().equals(caja.getCajaOriginal().getsecuencia_nota_credito_formato()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsecuencia_nota_credito_formato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsecuencia_nota_credito_formato();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsecuencia_nota_credito_formato()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsecuencia_nota_credito_formato() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECUENCIANOTACREDITOFORMATO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getautorizacion_factura().equals(caja.getCajaOriginal().getautorizacion_factura()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getautorizacion_factura()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getautorizacion_factura();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getautorizacion_factura()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getautorizacion_factura() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.AUTORIZACIONFACTURA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getautorizacion_nota_venta().equals(caja.getCajaOriginal().getautorizacion_nota_venta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getautorizacion_nota_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getautorizacion_nota_venta();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getautorizacion_nota_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getautorizacion_nota_venta() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.AUTORIZACIONNOTAVENTA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getautorizacion_nota_credito().equals(caja.getCajaOriginal().getautorizacion_nota_credito()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getautorizacion_nota_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getautorizacion_nota_credito();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getautorizacion_nota_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getautorizacion_nota_credito() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.AUTORIZACIONNOTACREDITO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getfecha_caduca_factura().equals(caja.getCajaOriginal().getfecha_caduca_factura()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getfecha_caduca_factura()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getfecha_caduca_factura().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getfecha_caduca_factura()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getfecha_caduca_factura().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.FECHACADUCAFACTURA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getfecha_caduca_nota_venta().equals(caja.getCajaOriginal().getfecha_caduca_nota_venta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getfecha_caduca_nota_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getfecha_caduca_nota_venta().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getfecha_caduca_nota_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getfecha_caduca_nota_venta().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.FECHACADUCANOTAVENTA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getfecha_caduca_nota_credito().equals(caja.getCajaOriginal().getfecha_caduca_nota_credito()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getfecha_caduca_nota_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getfecha_caduca_nota_credito().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getfecha_caduca_nota_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getfecha_caduca_nota_credito().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.FECHACADUCANOTACREDITO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getserie_factura().equals(caja.getCajaOriginal().getserie_factura()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getserie_factura()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getserie_factura();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getserie_factura()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getserie_factura() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SERIEFACTURA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getserie_nota_venta().equals(caja.getCajaOriginal().getserie_nota_venta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getserie_nota_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getserie_nota_venta();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getserie_nota_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getserie_nota_venta() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SERIENOTAVENTA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getserie_nota_credito().equals(caja.getCajaOriginal().getserie_nota_credito()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getserie_nota_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getserie_nota_credito();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getserie_nota_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getserie_nota_credito() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SERIENOTACREDITO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsec_inicial_factura().equals(caja.getCajaOriginal().getsec_inicial_factura()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsec_inicial_factura()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsec_inicial_factura();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsec_inicial_factura()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsec_inicial_factura() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECINICIALFACTURA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsec_inicial_nota_venta().equals(caja.getCajaOriginal().getsec_inicial_nota_venta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsec_inicial_nota_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsec_inicial_nota_venta();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsec_inicial_nota_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsec_inicial_nota_venta() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECINICIALNOTAVENTA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsec_inicial_nota_credito().equals(caja.getCajaOriginal().getsec_inicial_nota_credito()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsec_inicial_nota_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsec_inicial_nota_credito();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsec_inicial_nota_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsec_inicial_nota_credito() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECINICIALNOTACREDITO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsec_final_factura().equals(caja.getCajaOriginal().getsec_final_factura()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsec_final_factura()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsec_final_factura();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsec_final_factura()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsec_final_factura() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECFINALFACTURA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsec_final_nota_venta().equals(caja.getCajaOriginal().getsec_final_nota_venta()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsec_final_nota_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsec_final_nota_venta();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsec_final_nota_venta()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsec_final_nota_venta() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECFINALNOTAVENTA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getsec_final_nota_credito().equals(caja.getCajaOriginal().getsec_final_nota_credito()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getsec_final_nota_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getsec_final_nota_credito();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getsec_final_nota_credito()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getsec_final_nota_credito() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.SECFINALNOTACREDITO,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getid_pais().equals(caja.getCajaOriginal().getid_pais()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getid_pais()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getid_pais().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getid_pais()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getid_pais().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.IDPAIS,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getid_ciudad().equals(caja.getCajaOriginal().getid_ciudad()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getid_ciudad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getid_ciudad().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getid_ciudad()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getid_ciudad().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.IDCIUDAD,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tif(caja.getIsNew()||!caja.getid_zona().equals(caja.getCajaOriginal().getid_zona()))\r\n\t\t\t{\r\n\t\t\t\tstrValorActual=null;\r\n\t\t\t\tstrValorNuevo=null;\r\n\r\n\t\t\t\tif(caja.getCajaOriginal().getid_zona()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorActual=caja.getCajaOriginal().getid_zona().toString();\r\n\t\t\t\t}\r\n\t\t\t\tif(caja.getid_zona()!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValorNuevo=caja.getid_zona().toString() ;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t////auditoriaDetalleLogicAdditional.registrarNuevaAuditoriaDetalle(auditoriaObj.getId(),CajaConstantesFunciones.IDZONA,strValorActual,strValorNuevo);\r\n\t\t\t}\t\r\n\t}", "public void getData( ){\n model2.getDataVector( ).removeAllElements( );\n model2.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement s = koneksi.createStatement();\n String sql = \"Select * from tb_customer\";\n ResultSet r = s.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(r.next ()){\n Object[ ] o = new Object[4];\n o[0] = r.getString(\"id\");\n o[1] = r.getString(\"nama\");\n o[2] = r.getString(\"alamat\");\n o[3] = r.getString(\"telepon\");\n\n model2.addRow(o);\n }\n }catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }", "@Override\n public void mostrarDetalleNecesidad(Necesidad necesidad) {\n tvArticulo.setText(necesidad.getArticulo());\n }", "public Etudiant(int ce, String n, String p, Date d, String s, Filiere f) {\n idEtud = ce;\n nom = n;\n prenom = p;\n dn = d;\n sexe = s;\n filiere = f;\n }", "public Encuesta(Persona persona, Distrito distrito){\n ID = IDautogenerado++;\n this.persona = persona;\n this.distrito = distrito;\n }", "@Override\n\tpublic void aumentar(int cantidad) {\n\t\t\n\t}" ]
[ "0.6137841", "0.60937303", "0.6006471", "0.59721386", "0.58862597", "0.5884376", "0.58649635", "0.58028334", "0.5783843", "0.5756785", "0.5733549", "0.57324624", "0.57048196", "0.5698061", "0.5663364", "0.56508964", "0.56495464", "0.563176", "0.56130475", "0.5595593", "0.55821574", "0.557424", "0.5564101", "0.556111", "0.5532444", "0.5530705", "0.5512584", "0.5500804", "0.5489632", "0.54840434", "0.5480704", "0.5477897", "0.5476786", "0.546573", "0.54615414", "0.5455761", "0.5452988", "0.545295", "0.54338384", "0.54221076", "0.5421179", "0.5417335", "0.54107535", "0.5403782", "0.5397841", "0.53911805", "0.53809494", "0.5379063", "0.5368225", "0.5361861", "0.5360185", "0.5352502", "0.53512925", "0.5349194", "0.5349128", "0.53446275", "0.5342765", "0.5336332", "0.5336254", "0.53325903", "0.53307843", "0.5329622", "0.53268427", "0.5326539", "0.5317316", "0.53067213", "0.530214", "0.53013796", "0.5296708", "0.5296068", "0.5294465", "0.5286052", "0.5285253", "0.5283366", "0.5283041", "0.52744925", "0.5266651", "0.5265175", "0.52622575", "0.5260464", "0.52602786", "0.52596515", "0.52589464", "0.5257951", "0.52560073", "0.52551323", "0.5250369", "0.5249773", "0.5245997", "0.524432", "0.52439344", "0.5243609", "0.524242", "0.524138", "0.5241277", "0.5232622", "0.5230226", "0.522645", "0.52245575", "0.52240735" ]
0.7781543
0
final int row = ( (int) ((raf.getFilePointer() getLengthOfHeader()) / getLengthOfRecord()) ); return (row > 1) ? row : 1;
@Override public int rowNumber() throws IOException { return recordNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int readFdocaOneByte() {\n checkForSplitRowAndComplete(1);\n //return dataBuffer_[position_++] & 0xff;\n return dataBuffer_.readUnsignedByte();\n }", "private int readFdocaTwoByteLength() {\n\n checkForSplitRowAndComplete(2);\n return dataBuffer_.readShort();\n// return\n// ((dataBuffer_[position_++] & 0xff) << 8) +\n// ((dataBuffer_[position_++] & 0xff) << 0);\n }", "protected int readNumRecordsHeader() throws IOException {\n file.seek(NUM_RECORDS_HEADER_LOCATION);\n return file.readInt();\n }", "public int headerLength();", "int readerIndex();", "int getReadPosition(int index) {\n/* 170 */ return index - this.origPos + this.readerIndex;\n/* */ }", "long indexPositionToRecordHeaderFp(int pos) {\n return indexPositionToKeyFp(pos) + MAX_KEY_LENGTH;\n }", "private int readFdocaOneByte(int index) {\n\n checkForSplitRowAndComplete(1, index);\n //return dataBuffer_[position_++] & 0xff;\n return dataBuffer_.readByte();\n }", "public int offendingHeaderOffset()\n {\n return offset() + OFFENDING_HDR_OFFSET;\n }", "public int getRecordSize(){\n return columns.get(0).size();\n }", "int atRow();", "public int getRecordLength()\n {\n return recordLength;\n }", "public int row();", "public int getRecordSize()\n {\n return 4 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 4;\n }", "protected abstract int getNumRecords();", "public final int getRecordSize()\n\t{\n\t\treturn tarBuffer.getRecordSize();\n\t}", "public int getStartRow();", "public int getReadedRecordNumber();", "private int skipFdocaBytes(int length) {\n\n checkForSplitRowAndComplete(length);\n dataBuffer_.skipBytes(length);\n// position_ += length;\n return length;\n }", "public abstract int getNumOfRows();", "public long rows() { return _rows; }", "int getNumberOfLines(int offset, int length) throws BadLocationException;", "public int getRecordSize() {\n return rows.size();\n }", "public int getRecordLength(int RecNo) { \n if (RecNo >= 0) {\n return indexArray[RecNo].length;\n }\n return -1;\n }", "public abstract int getNumRows();", "public abstract int rows();", "R getFirstRowOrThrow();", "private int loadData() {\n if (position >= numRecords * 2)\n return -1;\n int bufferPos = 0;\n int capacity = byteBuffer.capacity();\n while (bufferPos < capacity && position < numRecords * 2) {\n long curRecordAddress = sortedArray.get(position);\n int recordLen = Platform.getInt(null, curRecordAddress);\n // length + keyprefix + record length\n int length = Integer.BYTES + Long.BYTES + recordLen;\n if (length > capacity) {\n logger.error(\"single record size exceeds PMem read buffer. Please increase buffer size.\");\n }\n if (bufferPos + length <= capacity) {\n long curKeyPrefix = sortedArray.get(position + 1);\n if (length > bytes.length) {\n bytes = new byte[length];\n }\n Platform.putLong(bytes, Platform.BYTE_ARRAY_OFFSET, curKeyPrefix);\n Platform.copyMemory(null, curRecordAddress, bytes, Platform.BYTE_ARRAY_OFFSET + Long.BYTES, length - Long.BYTES);\n byteBuffer.put(bytes, 0, length);\n bufferPos += length;\n position += 2;\n } else {\n break;\n }\n }\n return bufferPos;\n }", "public int getNrow(){\r\n \treturn this.nrow;\r\n \t}", "int getRow();", "int size() {\n return this.header.size();\n }", "public int getRowNum(){ return this.rowNum; }", "public abstract boolean isFirstLineHeader();", "public int getRecordSize() {\n\t\treturn this.buffer.getRecordSize();\n\t\t}", "public int getRecord_length() {\n\t\treturn record_length;\n\t}", "private int getPosition(){\n for (int i = 0; i < Integer.MAX_VALUE; i++){\n if (!new File(Environment.getExternalStorageDirectory().getPath() + \"/csv_\" + String.valueOf(i) + \".csv\").exists()){\n return i;\n }\n }\n return 0;\n }", "@Override\n public IRecord procHeader(IRecord r)\n {\n return r;\n }", "public int getRecordLineNumber();", "public int getRowNo() {\n return rowIndex+1;\n }", "public int rows() {\n\treturn rows;\n}", "@Override\n\t\t\tpublic int getRow() {\n\t\t\t\treturn count;\n\t\t\t}", "public int recordLength() {\n return recordLength;\n }", "public int getFileRecordCount() {\n\t\treturn fileRecordCount;\n\t}", "public int getFieldCount()\r\n/* 58: */ {\r\n/* 59:78 */ return this.fields.size();\r\n/* 60: */ }", "public int numberOfFields() { return fld_count; }", "public int getRows();", "public int getRows();", "int getBytesPerLine() {\n\t\treturn bytesInLine.intValue();\n\t}", "@Override\n public IRecord procHeader(IRecord r) {\n return r;\n }", "public int getRowspan() \n {\n return 1;\n }", "public long getFilePointer() {\n/* 141 */ return this.pointer;\n/* */ }", "UnalignedRecords read(long position, int size) throws IOException;", "private int getNIdx() {\n return this.colStartOffset + 7;\n }", "int totalRows(){\n return row;\n }", "public abstract long getStartOffset();", "public int row() {\r\n\t\treturn row;\r\n\t}", "int getRows();", "int getRows();", "public int getNumLines ();", "public long getRecordSize ( ) {\r\n\t\treturn 113;\r\n\t}", "public int GetRow(){\n return row;\n }", "public static byte getRowSize() {\n return ROW_SIZE;\n }", "private int getRow() {\n return binaryPartition(row);\n }", "public int getRecordSize()\r\n\t{\r\n\t\treturn recordSize;\r\n\t}", "public int getSizeLeft() {\n return datasPointer - headerPointer;\n }", "public int numRows() {\n\t /*return the number of rows in the field*/\n return row; \n }", "@Override\n public int getRowCount() {\n return data.length-1; \n }", "public abstract int getNumberOfColumnsInCurrentRow();", "int getRowCount();", "int getRowCount();", "int getRowCount();", "int getRowCount();", "int getRowCount();", "int getRowCount();", "int getRowCount();", "private int readBlock() throws IOException {\n\t\t\tif (getSource().offset() == getSource().length()) return -1;\n\t\t\tgetMetadata().setBlockSize(getSource().read() & 0xff);\n\t\t\tint n = 0;\n\t\t\tint count;\n\n\t\t\tif (getMetadata().getBlockSize() > 0) {\n\t\t\t\ttry {\n\t\t\t\t\twhile (n < getMetadata().getBlockSize()) {\n\t\t\t\t\t\tcount = getSource().read(getMetadata().getdBlock(), n, getMetadata()\n\t\t\t\t\t\t\t.getBlockSize() - n);\n\t\t\t\t\t\tif (count == -1) break;\n\t\t\t\t\t\tn += count;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (final IOException e) {\n\t\t\t\t\tlog().trace(\"Truncated block\", e);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn n;\n\t\t}", "int getRecordCount();", "int getLineLength(int line) throws BadLocationException;", "public int getSize() throws Exception {\n return header.getSize()+super.getSize();\n }", "public int getRowCount();", "public int getRowCount() \n\t{ return rowcounter; }", "public int findRowCount () throws DataAccessException;", "public int nHeaderFields() {\n return nHeaderFields;\n }", "public int getRow() { return _row; }", "int getRowsCount();", "public int getLine() { \n\t// * JFlex starts in zero\n\treturn yyline+1;\n}", "public byte getN_OF_FILE() throws CardException {\n\n if (!this.IC_ALREADY_SUBMIT) {\n this.SubmitIC();\n }\n\n //byte[] id = {(byte)0xFF, (byte)0x02};\n this.SelectFF02();\n\n byte n_of_file = this.__ReadRecord((byte)0, (byte)4)[2];\n System.out.println(\"Card contains \" + n_of_file + \" file.\");\n this.N_OF_FILE = n_of_file;\n return n_of_file;\n }", "public int getCurrentRowNumber() throws SQLException {\n/* 174 */ return this.currentPositionInEntireResult + 1;\n/* */ }", "public int getRecordCount(){\n return numShapes;\n }", "public long length() {\r\n return 1 + 4 + buffer.length;\r\n }", "public int getReadFormatCount();", "@Override\n public long getFilePosition(int tileIndex) {\n int row = tileIndex / nColsOfTiles;\n int col = tileIndex - row * nColsOfTiles;\n if (nCols == 0 || row < row0 || col < col0 || row > row1 || col > col1) {\n return 0;\n }\n\n // for files larger than 16 GB, the offset value may be negative.\n // so a mask is applied to convert it to a positive value.\n return offsets[row - row0][col - col0];\n }", "public int read_XL_RowCount(String path,String sheet) throws EncryptedDocumentException, FileNotFoundException, IOException \r\n{\r\n\tint rc=0;\r\n\t\r\n\tWorkbook wb = WorkbookFactory.create(new FileInputStream(path));\r\n\trc=wb.getSheet(sheet).getLastRowNum();\r\n\t\r\n\t\r\n\treturn rc;\r\n}", "public IMAGE_FILE_HEADER getFileHeader() { return peHeader; }", "public int getRowSpan() {\n/* 3003 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "protected RecordHeader getRecordAt(long targetFp) throws IOException {\n for (RecordHeader next : getMemIndex().values()) {\n if (targetFp >= next.dataPointer &&\n targetFp < next.dataPointer + (long)next.dataCapacity) {\n return next;\n }\n }\n return null;\n }", "@Override\n public long position() throws IOException {\n return _backing.getFilePointer() - _head.offset;\n }", "int readFrom(byte[] iStream, int pos, ORecordVersion version);", "protected long readDataStartHeader() throws IOException {\n file.seek(DATA_START_HEADER_LOCATION);\n return file.readLong();\n }", "private int getEntBlock(FileTableEntry ftEnt)\n\t{\n\t\tint block = ftEnt.seekPtr / Disk.blockSize;\n\t\t//get actual block number\n\t\tif (block < Inode.directSize)\n\t\t{\n\t\t\treturn (int)ftEnt.inode.direct[block];\n\t\t}\n\n\t\tbyte[] temp = new byte[Disk.blockSize];\n\t\tSysLib.rawread((int)ftEnt.inode.indirect, temp);\n\t\treturn (int)SysLib.bytes2short(temp, (block - Inode.directSize) * 2);\n\t}" ]
[ "0.681897", "0.66562194", "0.6616827", "0.64277923", "0.63418233", "0.6175169", "0.6137117", "0.6125138", "0.60945135", "0.609352", "0.60822767", "0.6056864", "0.60401165", "0.60398966", "0.60159004", "0.6010181", "0.5968945", "0.59629357", "0.5951572", "0.5932683", "0.59316325", "0.5915723", "0.5911356", "0.59067166", "0.5905401", "0.5884426", "0.5879931", "0.5879753", "0.5874035", "0.58717906", "0.5871168", "0.5867013", "0.5866225", "0.5857573", "0.5841133", "0.5812814", "0.58125156", "0.5809406", "0.5805389", "0.58052826", "0.57988036", "0.5796191", "0.578653", "0.5784691", "0.5750771", "0.5737758", "0.5737758", "0.5731348", "0.57299876", "0.5724605", "0.57197654", "0.571579", "0.5710757", "0.57092106", "0.5703903", "0.569893", "0.56938434", "0.56938434", "0.5686802", "0.5683877", "0.5674206", "0.56581867", "0.56571925", "0.56562483", "0.5651639", "0.5651474", "0.56391066", "0.5630262", "0.5628902", "0.5628902", "0.5628902", "0.5628902", "0.5628902", "0.5628902", "0.5628902", "0.5625756", "0.56255424", "0.5617562", "0.5615375", "0.5597489", "0.559425", "0.55845827", "0.5583149", "0.55801153", "0.5577068", "0.5576054", "0.55731314", "0.55704993", "0.5569516", "0.556532", "0.55636525", "0.5563548", "0.5563301", "0.55621594", "0.5558995", "0.55550516", "0.5553708", "0.5548195", "0.55465823", "0.55381435" ]
0.68997693
0
Initializes the controller class.
@Override public void initialize(URL url, ResourceBundle rb) { primary.showingProperty().addListener((obs, oldValue, newValue) -> { if (newValue) { AppBar appBar = MobileApplication.getInstance().getAppBar(); appBar.setVisible(true); appBar.setNavIcon(MaterialDesignIcon.MENU.button(e -> MobileApplication.getInstance().showLayer(App.MENU_LAYER))); appBar.setTitleText("Perfil"); userManager = LogicFactory.getUserManager(); //Puts a prompt text on password fields tfPassword.setPromptText("Contraseña"); tfRepeatPassword.setPromptText("Repetir contraseña"); //Load the textField with the current user information. tfUserName.setText((String )userManager.getSession().get("username")); tfName.setText((String )userManager.getSession().get("name")); String[] surnames = ((String )userManager.getSession().get("surnames")).split("%"); tfFirstSurName.setText(surnames[0]); tfSecondSurName.setText(surnames[1]); tfDirection.setText((String )userManager.getSession().get("address")); tfEmail.setText((String )userManager.getSession().get("email")); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialize() {\n\t\tcontroller = Controller.getInstance();\n\t}", "public MainController() {\n\t\tcontroller = new Controller(this);\n\t}", "public abstract void initController();", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public Controller()\n\t{\n\n\t}", "private static CompanyController initializeController() {\n\n controller = new CompanyController();\n return controller;\n }", "public MainController() {\n initializeControllers();\n initializeGui();\n runGameLoop();\n }", "public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }", "public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}", "public Controller() {\n\t\tthis(null);\n\t}", "public void init(){\n\t\t//Makes the view\n\t\tsetUpView();\n\n\t\t//Make the controller. Links the action listeners to the view\n\t\tnew Controller(this);\n\t\t\n\t\t//Initilize the array list\n\t\tgameInput = new ArrayList<Integer>();\n\t\tuserInput = new ArrayList<Integer>();\n\t\thighScore = new HighScoreArrayList();\n\t}", "private void initialize() {\n\t\tinitializeModel();\n\t\tinitializeBoundary();\n\t\tinitializeController();\n\t}", "public void init() {\n\t\tkontrolleri1 = new KolikkoController(this);\n\t}", "protected void initialize() {\n super.initialize(); // Enables \"drive straight\" controller\n }", "public Controller() {\n model = new Model();\n comboBox = new ChannelComboBox();\n initView();\n new ChannelWorker().execute();\n timer = new Timer();\n }", "protected CityController() {\r\n\t}", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }", "public ClientController() {\n }", "public Controller() {\n\t\tthis.nextID = 0;\n\t\tthis.data = new HashMap<Integer, T>();\n\t}", "public ListaSEController() {\n }", "boolean InitController();", "public MenuController() {\r\n\t \r\n\t }", "@Override\n\tprotected void initController() throws Exception {\n\t\tmgr = orderPickListManager;\n\t}", "public CustomerController() {\n\t\tsuper();\n\n\t}", "public End_User_0_Controller() {\r\n\t\t// primaryStage = Users_Page_Controller.primaryStage;\r\n\t\t// this.Storeinfo = primaryStage.getTitle();\r\n\t}", "public Controller(){\r\n\t\tthis.fabricaJogos = new JogoFactory();\r\n\t\tthis.loja = new Loja();\r\n\t\tthis.preco = 0;\r\n\t\tthis.desconto = 0;\r\n\t}", "private Controller() {\n\t\tthis.gui = GUI.getInstance();\n\t\tthis.gui.setController(this);\n\t}", "public GameController() {\r\n\t\tsuper();\r\n\t\tthis.model = Main.getModel();\r\n\t\tthis.player = this.model.getPlayer();\r\n\t\tthis.timeline = this.model.getIndefiniteTimeline();\r\n\t}", "public PlantillaController() {\n }", "public Controller() {\n\t\tplaylist = new ArrayList<>();\n\t\tshowingMore = false;\n\t\tstage = Main.getStage();\n\t}", "public IfController()\n\t{\n\n\t}", "public TournamentController()\n\t{\n\t\tinitMap();\n\t}", "public GeneralListVueController() {\n\n\t}", "private ClientController() {\n }", "public Controller()\n\t{\n\t\ttheParser = new Parser();\n\t\tstarList = theParser.getStars();\n\t\tmessierList = theParser.getMessierObjects();\n\t\tmoon = new Moon(\"moon\");\n\t\tsun = new Sun(\"sun\");\n\t\tconstellationList = theParser.getConstellations();\n\t\tplanetList = new ArrayList<Planet>();\n\t\ttheCalculator = new Calculator();\n\t\tepoch2000JD = 2451545.0;\n\t}", "private void initialiseController() \r\n {\r\n defaultVectors();\r\n if(grantsByPIForm == null) \r\n {\r\n grantsByPIForm = new GrantsByPIForm(); //(Component) parent,modal);\r\n }\r\n grantsByPIForm.descriptionLabel.setText(UnitName);\r\n grantsByPIForm.descriptionLabel.setFont(new Font(\"SansSerif\",Font.BOLD,14));\r\n queryEngine = QueryEngine.getInstance();\r\n coeusMessageResources = CoeusMessageResources.getInstance();\r\n registerComponents();\r\n try {\r\n setFormData(null);\r\n }\r\n catch(Exception e) {\r\n e.printStackTrace(System.out);\r\n }\r\n }", "public LogMessageController() {\n\t}", "public LoginPageController() {\n\t}", "public ControllerEnfermaria() {\n }", "public ProvisioningEngineerController() {\n super();\n }", "private StoreController(){}", "public GenericController() {\n }", "@Override\n\tpublic void initialize() {\n\t\tinitializeModel(getSeed());\n\t\tinitializeView();\n\t\tinitializeControllers();\n\t\t\n\t\tupdateScore(8);\n\t\tupdateNumberCardsLeft(86);\n\n\t}", "public Controller() {\n\t\tenabled = false;\n\t\tloop = new Notifier(new ControllerTask(this));\n\t\tloop.startPeriodic(DEFAULT_PERIOD);\n\t}", "public MapController() {\r\n\t}", "@Override\r\n\tpublic void initControllerBean() throws Exception {\n\t}", "private void setupController() {\n setupWriter();\n Controller controller1 = new Controller(writer);\n controller = controller1;\n }", "public WfController()\n {\n }", "public Controller() {\n\n lastSearches = new SearchHistory();\n\n }", "private ClientController(){\n\n }", "public LoginController() {\r\n }", "public PersonasController() {\r\n }", "private void initBefore() {\n // Crear Modelo\n model = new Model();\n\n // Crear Controlador\n control = new Controller(model, this);\n\n // Cargar Propiedades Vista\n prpView = UtilesApp.cargarPropiedades(FICHERO);\n\n // Restaurar Estado\n control.restaurarEstadoVista(this, prpView);\n\n // Otras inicializaciones\n }", "public StoreController() {\n }", "public ConsoleController() {\n\t\tcommandDispatch = new CommandDispatch();\n\t}", "public LoginController() {\r\n\r\n }", "public final void init(final MainController mainController) {\n this.mainController = mainController;\n }", "public SMPFXController() {\n\n }", "public Controller()\r\n {\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard = new ScoreBoard();\r\n }", "public GUIController() {\n\n }", "public void init(){\n this.controller = new StudentController();\n SetSection.displayLevelList(grade_comp);\n new DesignSection().designForm(this, editStudentMainPanel, \"mini\");\n }", "public void init(final Controller controller){\n Gdx.app.debug(\"View\", \"Initializing\");\n \n this.controller = controller;\n \n //clear old stuff\n cameras.clear();\n \n //set up renderer\n hudCamera = new OrthographicCamera();\n hudCamera.setToOrtho(false, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\n \n batch = new SpriteBatch();\n igShRenderer = new ShapeRenderer();\n shapeRenderer = new ShapeRenderer();\n \n //set up stage\n stage = new Stage();\n \n //laod cursor\n cursor = new Pixmap(Gdx.files.internal(\"com/BombingGames/WurfelEngine/Core/images/cursor.png\"));\n\n controller.getLoadMenu().viewInit(this);\n \n initalized = true;\n }", "@PostConstruct\n public void init() {\n WebsocketController.getInstance().setTemplate(this.template);\n try {\n\t\t\tthis.chatController = ChatController.getInstance();\n } catch (final Exception e){\n LOG.error(e.getMessage(), e);\n }\n }", "public ControllerTest()\r\n {\r\n }", "public SearchedRecipeController() {\n }", "public FilmOverviewController() {\n }", "public CreditPayuiController() {\n\t\tuserbl = new UserController();\n\t}", "private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}", "public RootLayoutController() {\n }", "public MehController() {\n updateView(null);\n }", "public Controller(int host) {\r\n\t\tsuper(host);\r\n\t}", "public WorkerController(){\r\n\t}", "public TipoInformazioniController() {\n\n\t}", "private void initializeMealsControllers() {\n trNewPetMeal = MealsControllersFactory.createTrNewPetMeal();\n trObtainAllPetMeals = MealsControllersFactory.createTrObtainAllPetMeals();\n trDeleteMeal = MealsControllersFactory.createTrDeleteMeal();\n trUpdateMeal = MealsControllersFactory.createTrUpdateMeal();\n }", "public ProductOverviewController() {\n }", "public ProduktController() {\r\n }", "public Controller(ViewIF view) {\n\t\tthis.view = view;\n\t\tthis.dao = new DAO();\n\t\tthis.stats = new Statistics(this.dao);\n\t\tthis.gameStarted = false;\n\t}", "private void initializeMedicationControllers() {\n trNewPetMedication = MedicationControllersFactory.createTrNewPetMedication();\n trObtainAllPetMedications = MedicationControllersFactory.createTrObtainAllPetMedications();\n trDeleteMedication = MedicationControllersFactory.createTrDeleteMedication();\n trUpdateMedication = MedicationControllersFactory.createTrUpdateMedication();\n }", "public PersonLoginController() {\n }", "public PremiseController() {\n\t\tSystem.out.println(\"Class PremiseController()\");\n\t}", "public TaxiInformationController() {\n }", "public LoginController() {\n\t\treadFromFile();\n\t\t// TODO Auto-generated constructor stub\n\t}", "public Controller(){\n initControl();\n this.getStylesheets().addAll(\"/resource/style.css\");\n }", "public CreateDocumentController() {\n }", "public ControllerRol() {\n }", "Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}", "public Controller () {\r\n puzzle = null;\r\n words = new ArrayList <String> ();\r\n fileManager = new FileIO ();\r\n }", "public void init() {\n \n }", "public Controller() {\n\t\tdoResidu = false;\n\t\tdoTime = false;\n\t\tdoReference = false;\n\t\tdoConstraint = false;\n\t\ttimeStarting = System.nanoTime();\n\t\t\n\t\tsetPath(Files.getWorkingDirectory());\n\t\tsetSystem(true);\n\t\tsetMultithreading(true);\n\t\tsetDisplayFinal(true);\n\t\tsetFFT(FFT.getFastestFFT().getDefaultFFT());\n\t\tsetNormalizationPSF(1);\n\t\tsetEpsilon(1e-6);\n\t\tsetPadding(new Padding());\n\t\tsetApodization(new Apodization());\n\n\t\tmonitors = new Monitors();\n\t\tmonitors.add(new ConsoleMonitor());\n\t\tmonitors.add(new TableMonitor(Constants.widthGUI, 240));\n\n\t\tsetVerbose(Verbose.Log);\n\t\tsetStats(new Stats(Stats.Mode.NO));\n\t\tsetConstraint(Constraint.Mode.NO);\n\t\tsetResiduMin(-1);\n\t\tsetTimeLimit(-1);\n\t\tsetReference(null);\n\t\tsetOuts(new ArrayList<Output>());\n\t}", "public OrderInfoViewuiController() {\n\t\tuserbl = new UserController();\n\t}", "public SessionController() {\n }", "@Override\n\tprotected void setController() {\n\t\t\n\t}", "public MainFrameController() {\n }", "public LicenciaController() {\n }", "public NearestParksController() {\n this.bn = new BicycleNetwork();\n this.pf = new LocationFacade();\n // this.bn.loadData();\n }", "public MotorController() {\n\t\tresetTachometers();\n\t}", "public AwTracingController() {\n mNativeAwTracingController = nativeInit();\n }", "public Controller(IView view) {\n\t\tengine = new Engine(this);\n\t\tclock = new Clock();\n\t\tsoundEmettor = new SoundEmettor();\n\t\tthis.view = view;\n\t}", "public HomeController() {\n }", "public HomeController() {\n }" ]
[ "0.8125658", "0.78537387", "0.78320265", "0.776199", "0.776199", "0.76010174", "0.74497247", "0.7437837", "0.7430714", "0.742303", "0.74057597", "0.7341963", "0.7327749", "0.72634363", "0.72230434", "0.7102504", "0.70575505", "0.69873077", "0.69721675", "0.6944077", "0.6912564", "0.688884", "0.6881247", "0.68776786", "0.68723065", "0.6868163", "0.68672407", "0.6851157", "0.6846883", "0.6840198", "0.68382674", "0.68338853", "0.6795918", "0.67823315", "0.6766882", "0.67650586", "0.6750353", "0.6749068", "0.6745654", "0.6743223", "0.67401046", "0.6727867", "0.6723379", "0.6695514", "0.6689967", "0.66892517", "0.66791916", "0.6677345", "0.66644365", "0.6664202", "0.66616154", "0.66532296", "0.66481894", "0.6644939", "0.6639398", "0.6633576", "0.66312426", "0.662608", "0.66258574", "0.66105217", "0.6606984", "0.66024727", "0.6597095", "0.6580141", "0.65786153", "0.65752715", "0.6574144", "0.6551536", "0.655142", "0.6547574", "0.6545647", "0.6541474", "0.6529243", "0.65284246", "0.6525593", "0.6523344", "0.6519832", "0.65134746", "0.65079254", "0.6497635", "0.64952356", "0.6493943", "0.6492926", "0.6483847", "0.6483173", "0.648183", "0.6479119", "0.64789915", "0.6476928", "0.64734083", "0.6465272", "0.64616114", "0.6444024", "0.64379543", "0.6431962", "0.64292705", "0.6425357", "0.6417148", "0.6416786", "0.64161026", "0.64161026" ]
0.0
-1
Method that handles Button (btnSave) onAction. His work is to update the user information and credentials. Controlling the exceptions than can happen during this process
@FXML void handlerModifyProfile(){ //Checks if any field is empty so it can show an alert to the user. if(tfName.getText().equals("")||tfFirstSurName.getText().equals("")|| tfSecondSurName.getText().equals("")||tfDirection.getText().equals("")|| tfEmail.getText().equals("")){ //Alert that notice the user that at least oen field is empty Alert alert = new Alert(javafx.scene.control.Alert.AlertType.INFORMATION, "Please write your email before"); alert.showAndWait(); }else{ try { //Checks if the email is correct if(new EmailValidator().validate(tfEmail.getText())){ Alert alert; //load a UserDTO class with the current information in the fields UserDTO user= new UserDTO(tfUserName.getText(),tfName.getText(), tfFirstSurName.getText()+"%"+tfSecondSurName.getText(), tfEmail.getText(), tfDirection.getText()); //Call to the DB to change the user information userManager.updateUser(user); logger.info(tfUserName.getText() + " user updated"); //load password pattern String pattern = "((?=.*[a-z])(?=.*\\d)(?=.*[A-Z])(?=.*[@#$%!*.,+-;&]).{8,40})"; //Checks that the fields are not empty, have same value and matches with pattern, if((!(tfPassword.getText().equals("")||tfRepeatPassword.getText().equals(""))) && tfPassword.getText().equals(tfRepeatPassword.getText()) && tfPassword.getText().matches(pattern)){ //Update user password userManager.changePassword(tfUserName.getText(),EncrypterUtil.encrypt(tfPassword.getText())); System.out.println(tfPassword.getText()); System.out.println(EncrypterUtil.encrypt(tfPassword.getText())); alert = new Alert(javafx.scene.control.Alert.AlertType.INFORMATION, "Credentials updated"); alert.showAndWait(); logger.info(tfUserName.getText() + " password changed"); //Send an email to the user saying that the password has been changed MailUtil.sendEmail(tfEmail.getText(), "Password changed", "Your password have changed, if you didn´t do it" + " put in contact with our customer service."); //Check that passwords got same value }else if(!tfPassword.getText().equals(tfRepeatPassword.getText())){ alert = new Alert(javafx.scene.control.Alert.AlertType.INFORMATION, "Please write same password"); alert.showAndWait(); //Password are the same but dont match with pattern }else if (!tfPassword.getText().matches(pattern) && !(tfPassword.getText().equals("") && tfRepeatPassword.getText().equals(""))){ alert = new Alert(AlertType.WARNING, "Pasword has to be valid. A valid pasword contains at least :\n-8 characters\n-one capital letter" + "\n-one small letter\n-one number and one symbol"); alert.showAndWait(); }else if(tfPassword.getText().equals("")&&tfRepeatPassword.getText().equals("")){ //In case the user just changed his/her information. MobileApplication.getInstance().showMessage("Data saved"); } } } catch (UserUpdateException ex) { //Put in the logger the information of the error logger.severe(ex.getMessage()); //Alert with the current error Alert alert = new Alert(javafx.scene.control.Alert.AlertType.ERROR, ex.getMessage()); alert.showAndWait(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void savebutton(ActionEvent event) throws Exception{\n\t\t\n\t\tdaocustomerview update = new daocustomerview();\n\t\tint res=update.modifyuser(loginController.getUsername(),loginController.getPassword(),txtfield2.getText(), txtfield3.getText(), (Integer.parseInt(txtfield4.getText())), txtfield5.getText(), txtfield6.getText());\n\t \n\t\tif (res==1){\n\t\t\t\n\t\t\tStage subStage = new Stage();\n\t\t\tsubStage.setTitle(\"Alert\");\n\t\t\t FlowPane root = new FlowPane();\n\t\t root.setAlignment(Pos.CENTER);\n\t\t Scene scene = new Scene(root, 300, 200);\n\t\t Label conf = new Label(\"Customer information modified\");\n\t\t conf.setTranslateX(40);\n\t\t conf.setTranslateY(-10);\n\t\t Button buton = new Button(\"OK\");\n\t\t buton.setTranslateX(-50);\n\t\t buton.setTranslateY(50);\n\t\t customermainpage main = new customermainpage();\n\t\t buton.setOnAction(e -> {\n\t\t \tmain.setgui();\n\t\t subStage.close();\n\t\t });\n\t\t root.getChildren().addAll(conf,buton);\n\t\t subStage.setScene(scene);\n\t\t subStage.show();\n\t\t}\n\t}", "public void saveAndClose(ActionEvent ae) {\n\n\t\tif (fieldEmail.getText().isEmpty() || fieldPassword.getText().isEmpty() || fieldName.getText().isEmpty()\n\t\t\t\t|| fieldSurname.getText().isEmpty() || fieldAddress.getText().isEmpty() || fieldCAP.getText().isEmpty()\n\t\t\t\t|| fieldCity.getText().isEmpty() || fieldNumber.getText().isEmpty()) {\n\t\t\tlblError.setText(\"ATTENZIONE: è necessario compilare tutti i campi!\");\n\t\t\tlblError.setVisible(true);\n\n\t\t}\n\n\t\t/*\n\t\t * Controllo errori TODO, eventualmente display errore TODO, salvataggio TODO\n\t\t */\n\t\telse {\n\n\t\t\t//Salvataggio dati\n\t\t\tGlobals.currentUser.setEmail(fieldEmail.getText());\n\t\t\tGlobals.currentUser.setPassword(fieldPassword.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setName(fieldName.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setFamilyName(fieldSurname.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setAddress(fieldAddress.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setAddress(fieldAddress.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setCity(fieldCity.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setCAP(fieldCAP.getText());\n\t\t\tGlobals.currentUser.getAnagrafica().setMobileNumber(fieldNumber.getText());\n\t\t\t\n\t\t\tSystem.out.println(\"[✓] Nuovo nome salvato in memoria (ram)\");\n\n\t\t\tJsonSaver.saveUser();\n\t\t\tJsonSaver.saveWorker();\n\t\t\tcloseUI(ae);\n\n\t\t}\n\n\t}", "@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tUser u = user;\r\n\t\t\t\t\t\tuser.setUser_password(NewPassword.getText());\r\n\t\t\t\t\t\tif (NewPassword.getText().equals(surePassword.getText())) {\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tDAOFactory.getIUserDAOInstance().update(u);\r\n\t\t\t\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(UserFrame.this, \"更改成功\", \"提示\", \r\n\t\t\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(UserFrame.this, \"两次输入不同\", \"提示\", \r\n\t\t\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}", "public void editAccount(ActionEvent actionEvent) throws SQLException, IOException {\n if (editAccountButton.getText().equals(\"Edit\")) {\n userNameField.setEditable(true);\n emailField.setEditable(true);\n datePicker.setEditable(true);\n changePhotoButton.setVisible(true);\n changePhotoButton.setDisable(false);\n userNameField.getStylesheets().add(\"/stylesheets/Active.css\");\n emailField.getStylesheets().add(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().add(\"/stylesheets/Active.css\");\n editAccountButton.setText(\"Save\");\n }\n else if (validInput()) {\n userNameField.setEditable(false);\n emailField.setEditable(false);\n datePicker.setEditable(false);\n changePhotoButton.setVisible(false);\n changePhotoButton.setDisable(true);\n userNameField.getStylesheets().remove(\"/stylesheets/Active.css\");\n emailField.getStylesheets().remove(\"/stylesheets/Active.css\");\n datePicker.getStylesheets().remove(\"/stylesheets/Active.css\");\n editAccountButton.getStylesheets().remove(\"/stylesheets/Active.css\");\n user.getUser().setName(userNameField.getText());\n user.getUser().setEmail(emailField.getText());\n user.getUser().setBirthday(datePicker.getValue());\n\n editAccountButton.setText(\"Edit\");\n userNameLabel.setText(user.getUser().getFirstName());\n if (userPhotoFile != null) {\n user.getUser().setProfilePhoto(accountPhoto);\n profileIcon.setImage(new Image(userPhotoFile.toURI().toString()));\n }\n DatabaseManager.updateUser(user, userPhotoFile);\n }\n }", "protected void submitEdit(ActionEvent e) {\n\t\tString oldPassword = oldPasswordTextField.getText().toString();\r\n\t\tString newPassword = newPasswordTextField.getText().toString();\r\n\t\tString confirmPassword = confirmPasswordTextField.getText().toString();\r\n\t\tif(com.car.util.StringUtil.isEmpty(oldPassword)){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"请填写旧密码!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(com.car.util.StringUtil.isEmpty(newPassword)){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"请填写新密码!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(com.car.util.StringUtil.isEmpty(confirmPassword)){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"请确认新密码!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(!newPassword.equals(confirmPassword)){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"两次密码输入不一致!\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(\"系统管理员\".equals(MaimFrame.userType.getName())) {\r\n\t\t\tAdminDao adminDao = new AdminDao();\r\n\t\t\tAdmin adminTmp = new Admin();\r\n\t\t\tAdmin admin = (Admin)MaimFrame.userObject;\r\n\t\t\tadminTmp.setName(admin.getName());\r\n\t\t\tadminTmp.setId(admin.getId());\r\n\t\t\tadminTmp.setPassword(oldPassword);\r\n\t\t\tJOptionPane.showMessageDialog(this, adminDao.editPassword(adminTmp, newPassword));\r\n\t\t\tadminDao.closeDao();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(\"客户\".equals(MaimFrame.userType.getName())){\r\n\t\t\tCustomerDao customerDao = new CustomerDao();\r\n\t\t\tCustomer customerTmp = new Customer();\r\n\t\t\tCustomer customer = (Customer)MaimFrame.userObject;\r\n\t\t\tcustomerTmp.setName(customer.getName());\r\n\t\t\tcustomerTmp.setPassword(oldPassword);\r\n\t\t\tcustomerTmp.setId(customer.getId());\r\n\t\t\tJOptionPane.showMessageDialog(this, customerDao.editPassword(customerTmp, newPassword));\r\n\t\t\tcustomerDao.closeDao();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(\"员工\".equals(MaimFrame.userType.getName())){\r\n\t\t\tEmployeeDao employeeDao = new EmployeeDao();\r\n\t\t\tEmployee employeeTmp = new Employee();\r\n\t\t\tEmployee employee = (Employee)MaimFrame.userObject;\r\n\t\t\temployeeTmp.setName(employee.getName());\r\n\t\t\temployeeTmp.setPassword(oldPassword);\r\n\t\t\temployeeTmp.setId(employee.getId());\r\n\t\t\tJOptionPane.showMessageDialog(this, employeeDao.editPassword(employeeTmp, newPassword));\r\n\t\t\temployeeDao.closeDao();\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "public void onSaveButton(ActionEvent actionEvent) {\n if (nameField.getText() == null || addressField.getText() == null || postalField.getText() == null || phoneField.getText() == null || divisionCombo.getValue() == null) {\n Alert error = new Alert(Alert.AlertType.ERROR);\n error.setTitle(\"Error\");\n error.setHeaderText(\"Error: Invalid input.\");\n error.setContentText(\"Check values and try again.\");\n error.showAndWait();\n }\n else {\n try {\n int divisionID = getDivisionIdFromDivisionName(divisionCombo.getValue().toString());\n Customer newCustomer = new Customer(\n 0,\n nameField.getText(),\n addressField.getText(),\n postalField.getText(),\n phoneField.getText(),\n divisionID);\n Customer.addNewCustomer(newCustomer);\n onBackButton(actionEvent);\n } catch (RuntimeException | IOException e) {\n Alert error = new Alert(Alert.AlertType.ERROR);\n error.setTitle(\"Error\");\n error.setHeaderText(\"Error: Server issue.\");\n error.setContentText(\"Unable to complete this action, please try again.\");\n error.showAndWait();\n }\n }\n }", "private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed\n // TODO add your handling code here:\n\n //SAVE CODE\n if (tools.checkNumberFormat(new String(txtCurrentPass.getPassword()))) {\n checkRole();\n } else if (BCrypt.checkpw(new String(txtCurrentPass.getPassword()), employee.getPassword())) {\n checkRole();\n } else {\n tampilPesan(\"Current Password is Wrong!!!\");\n }\n\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == updateB) //sign-up button\n\t\t{\n\t\t\t//get all answers\n\t\t\tString lastnameS = lastnameTF.getText();\n\t\t\tString firstnameS = firstnameTF.getText();\n\t\t\tString usernameS = usernameTF.getText();\n\t\t\tString password1S = new String(password1PF.getPassword());\n\t\t\tString password2S = new String(password2PF.getPassword());\n\t\t\tint admin = 0;\n\t\t\tif (adminCB.isSelected() == true)\n\t\t\t{\n\t\t\t\tadmin = 1;\n\t\t\t}\n\t\t\t\n\t\t\tif (lastnameS != null && !(lastnameS.isEmpty())) //lastname cannot be null\n\t\t\t{\n\t\t\t\tif (firstnameS != null && !(firstnameS.isEmpty())) //first name cannot be null\n\t\t\t\t{\n\t\t\t\t\tif (usernameS != null && !(usernameS.isEmpty())) //email cannot be null\n\t\t\t\t\t{\n\t\t\t\t\t\tif (password1S != null && !(password1S.isEmpty())) //password1 cannot be null\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (password2S != null && !(password2S.isEmpty())) //password 2 cannot be null\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (ValidEmail(usernameS) == true) //check if email is valid\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (password1S.compareTo(password2S) == 0) //check if the 2 passwords are the same\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif (ValidString(password1S) == true) //check if password is valid\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tUser newuser = new User(usernameS, password1S, admin, firstnameS, lastnameS);\n\t\t\t\t\t\t\t\t\t\t\t//continue insert into udb\n\t\t\t\t\t\t\t\t\t\t\tif (udb.modifyUser(uid,newuser) == true) //check if addUser is successful\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t//messageBox: successful!\n\t\t\t\t\t\t\t\t\t\t\t\t//close this dialog afterwards\n\t\t\t\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Account update successful!\");\n\t\t\t\t\t\t\t\t\t\t\t\tdispose();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tJOptionPane.showConfirmDialog(null, \"Something went wrong. Please try again\", \"OK\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tJOptionPane.showConfirmDialog(null, \"Password is not valid\", \"OK\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tJOptionPane.showConfirmDialog(null, \"The 2 passwords does not match!\", \"OK\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tJOptionPane.showConfirmDialog(null, \"Email is invalid\", \"OK\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Password 2 name cannot be null.\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Password 1 name cannot be null.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Email name cannot be null.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"First name cannot be null.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Last name cannot be null.\");\n\t\t\t}\n\t\t}\n\t\telse if (e.getSource() == cancelB) //cancel button\n\t\t{\n\t\t\t//close this and go back\n\t\t\tint n = JOptionPane.showConfirmDialog(null, \"Discard all changes?\",\n\t\t\t\t\t\"Confirm\", JOptionPane.YES_NO_OPTION);\n\t\t\tif (n == JOptionPane.YES_OPTION)\n\t\t\t\tdispose();\n\t\t}\n\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == createButton) {\n cardLayout.show(functions, \"Create\");\n } else if (e.getSource() == editButton) {\n cardLayout.show(functions, \"Edit\");\n } else if (e.getSource() == changeButton) {\n cardLayout.show(functions, \"Change\");\n }\n // If the User pressed new user button - send form\n if (e.getSource() == submitNewUser) {\n try {\n addNewUser();\n } catch (UnitException unitException) {\n String msg = \"New User Error: The inputted unit ID doesn't exist currently.\";\n JOptionPane.showMessageDialog(null, msg);\n } catch (Exception exception) {\n }\n }\n // If the user changes combobox accounttype, change the value of account Type\n if (e.getSource() == accountType) {\n accountTypeValue = (String) accountType.getSelectedItem();\n }\n if (e.getSource() == accountTypeEdit) {\n accountTypeValueEdit = (String) accountTypeEdit.getSelectedItem();\n }\n // If user presses edit account button - send form\n if (e.getSource() == editAccTypeBtn) {\n try {\n editAccountType();\n } catch (SQLException exception) {\n String msg = \"Change Account Type: Unable to change user account in database\";\n JOptionPane.showMessageDialog(null, msg);\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }\n if (e.getSource() == changePassBtn) {\n try {\n changePassword();\n } catch (Exception userException) {\n String msg = \"Password Change Error: Unable to change user password in database\";\n JOptionPane.showMessageDialog(null, msg);\n }\n }\n }", "private void save(ActionEvent e){\r\n // Make sure all required fields are filled out before saving\r\n if (formIsValid()){\r\n // Check if client currently exists. If so, modify. Otherwise create new entry.\r\n if (existingClient){\r\n // Modify the existing currentClient holder -- Change the variable to global currentClient cache holder\r\n currClient.setName(NAME_FIELD.getText());\r\n currClient.setAddress1(ADDRESS_1_FIELD.getText());\r\n currClient.setAddress2(ADDRESS_2_FIELD.getText());\r\n currClient.setCity(CITY_FIELD.getText());\r\n currClient.setZip(ZIP_FIELD.getText());\r\n currClient.setCountry(COUNTRY_FIELD.getText());\r\n currClient.setPhone(PHONE_FIELD.getText());\r\n // Update client in database\r\n Client.modifyClient(currClient, currClient.getClientID());\r\n }\r\n // Create new client entry\r\n else { \r\n Client c = new Client (NAME_FIELD.getText(),ADDRESS_1_FIELD.getText(),\r\n ADDRESS_2_FIELD.getText(),CITY_FIELD.getText(),\r\n ZIP_FIELD.getText(),COUNTRY_FIELD.getText(),PHONE_FIELD.getText());\r\n Client.addNewClient(c);\r\n }\r\n\r\n existingClient = false; // reset existing client flag\r\n clearFields(); // remove data from fields\r\n // Return to Appt Mgmt Screen if we came from there\r\n if (fromAppt){\r\n goToManageApptScreen();\r\n }\r\n }\r\n // If forms are not complete throw an alert\r\n else {\r\n AlertBox.display(\"Invalid Submission\", \"Form is missing required information or has invalid input.\"\r\n + \" The following information is required:\\n\"\r\n + \"Name\\nAddress 1\\nCity, State, Country, Zipcode\\nPhoneNumber\"\r\n + \"\\nPlease complete form with valid input and submit again.\");\r\n }\r\n }", "public void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\tUser add = new User(user.getText(), String.valueOf(pass.getPassword()), addr.getText(), phone.getText());\n\n\t\t\t\t\t\t\tConnection connection = Conn.getConnection();\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tStatement stmt = connection.createStatement();\n\t\t\t\t\t\t\t\t//Update the user details by the value that the user has entered\n\t\t\t\t\t\t\t\tstmt.executeUpdate(\"UPDATE USERS SET USERNAME ='\"+add.getUsername()+\"',PASSWORD = '\"+add.getPassword()+\"',ADDRESS='\"+add.getAddress()+\"',PHONE = '\"+add.getPhoneNo()+\"' WHERE UID = \"+update.getUID());\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"User updated!\"); //Update success message\n\t\t\t\t\t\t\t\tf.dispose();\n\t\t\t\t\t\t\t\tf2.dispose();\n\t\t\t\t\t\t\t\tview.initComponents();//Open the viewUserTab back\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcatch (SQLException e1) {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, e1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (!txtUserName.getText().isEmpty() && txtPassword.getPassword().length != 0) {\r\n\t\t\t\t\tString givenPassword = new String(txtPassword.getPassword());\r\n\t\t\t\t\tif (txtUserName.getText().indexOf(\"_\") == -1 && givenPassword.indexOf(\"_\") == -1\r\n\t\t\t\t\t\t\t&& txtUserName.getText().indexOf(\"/\") == -1 && givenPassword.indexOf(\"/\") == -1) {\r\n\t\t\t\t\t\tSignUp.printRecord(txtUserName.getText().toString(), givenPassword.toString());\r\n\t\t\t\t\t\tif (signedUpSuccessfully) {\r\n\t\t\t\t\t\t\tProfileLast.userName = txtUserName.getText();\r\n\t\t\t\t\t\t\tif (profileAddress.equals(\"Contact2.png\")) {\r\n\t\t\t\t\t\t\t\tProfileLast.main(txtUserName.getText() , \"Contact2.png\");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tProfileLast.main(txtUserName.getText() , txtUserName.getText() + \".jpg\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tdispose();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Wrong Inputs given !\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Enter The Fields Correctly !\");\r\n\t\t\t\t}\r\n\t\t\t}", "@FXML\n public void StudentSaveButtonPressed(ActionEvent e) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {\n AlertHandler ah = new AlertHandler();\n if (editMode){\n System.out.println(\"edit mode on: choosing student update\");\n if(txfFirstName.isDisabled()){\n ah.getError(\"Please edit student information\", \"Enable Student editing fields for saving\", \"Please edit before saving\");\n System.out.println(\"please edit data before saving to database\");\n } else {\n System.out.println(\"requesting confirmation for editing data to database\");\n confirmStudentUpdate();\n }\n }\n else {\n System.out.println(\"Edit mode off: choosing student insert\");\n confirmStudentInsert();\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tuser.first_name = textFirstName.getText();\n\t\t\t\tuser.last_name = textLastName.getText();\n\t\t\t\tuser.email = textEmail.getText();\n\t\t\t\tuser.password = textPassword.getText();\n\t\t\t\tuser.dept_name = textDepartment.getText();\n\t\t\t\tuser.dept_desc = textDepartmentDescription.getText();\n\t\t\t\t\n\t\t\t\t//use controller to update it in db\n\t\t\t\tUserController uc = new UserController();\n\t\t\t\tuc.updateUser(user);\n\t\t\t\t\n\t\t\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\t public void run() \n\t\t\t {\n\t\t\t \tUserInfoScreen userInfoScreen = new UserInfoScreen(user);\n\t\t\t \tuserInfoScreen.setVisible(true);\n\t\t\t \tframe.dispose();\n\t\t\t }\n\t\t\t\t});\n\t\t\t}", "@FXML protected void handleSignUpButtonAction() {\n \tboolean bexit = false;\n \tif(passwordField.getText().equals(passwordField2.getText()))\n \t{\n \t\t\n \t\tString signUpUsername = username.getText();\n \t\tString signUpPassword = passwordField.getText();\n \t\t\n if(username.getText().toString().length() >= 6 && passwordField.getText().toString().length() >= 6)\n {\n\t \t\tUser user = new User(signUpUsername, \"Unknown\", null, \"Unknown\", signUpPassword);\n\t \t\t\n\t \t\ttry {\n\t\t\t\t\tuser = client.createUser(user);\n\t \t\t\n\t \t\t} catch (WebApplicationException e) {\n\t \t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t \t\t\tif (e.getResponse().getStatus() == 409) {\n\t \t\t\t\tactiontarget.setText(\"Sign up error: Username already exists\");\n\t \t\t\t} else {\n\t \t\t\t\t\n\t \t\t\t}\n\t \t\t\t\n\t \t\t} catch (JsonProcessingException e) {\n\t \t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tLOGGER.log(Level.SEVERE, e.toString(), e);\n\t\t\t\t}\n\t \t\t\n\t \t\t// Go back to Login view\n\t \t\t\n\t \t\tLoginVistaNavigator.loadVista(LoginVistaNavigator.LOGIN);\n }\n else\n {\n \tactiontarget.setText(\"username/password \\nlength must be 6 number\");\n }\n \t}\n \telse\n \t{\n \t\tactiontarget.setText(\"password not consistent.\");\n \t}\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t String username = t4.getText().toString();\n\t\t\t String Fullname = t.getText().toString();\n\t\t\t String Address = t1.getText().toString();\n\t\t\t String ContactNo = t3.getText().toString();\n\t\t\t String EmailId = t2.getText().toString();\n \t char pass[]= p.getPassword();\n \t String password = new String(pass);\n \t \n \t try\n \t {\n \t \t Class.forName(\"com.mysql.jdbc.Driver\");\n \t \t con = DriverManager.getConnection( \"jdbc:mysql://localhost:3306/RIT\", \"root\", \"\");\n \t stmt = con.createStatement();\n \t stmt.executeUpdate(\"insert into user values('\"+Fullname+\"','\"+Address+\"','\"+EmailId+\"','\"+ContactNo+\"','\"+username+\"','\"+password+\"')\");\n \t JOptionPane.showMessageDialog(f, \"Registered Successfully\");\n \t \n \t }\n \t catch(ClassNotFoundException e1)\n \t {\n \t \t e1.printStackTrace();\n \t } \n \t catch (SQLException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n \t finally\n \t {\n \t \t try {\n\t\t\t\t\t\t\tcon.close();\n\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n \t }\n\t\t\t\t\n \t\t \n\t\t\t\t}", "@Override\n public void onClick(View view) {\n Editable userEditable = userName.getText();\n if (userEditable == null || userEditable.toString().equals(\"\")) {\n toastMessage(getString(R.string.inputYourUserName));\n return;\n }\n userNameStr = userEditable.toString();\n if (!Checker.isUserName(userNameStr)) {\n toastMessage(getString(R.string.inputSuitableUserName));\n return;\n }\n Log.i(TAG, \"get the user name: \" + userNameStr);\n\n\n //************************************************************************//\n //************************************************************************//\n // Get the passwd.\n Editable passwdEditable = passwd.getText();\n if (passwdEditable == null || passwdEditable.toString().equals(\"\")) {\n toastMessage(getString(R.string.inputYourUserPasswd));\n return;\n }\n passwdStr = passwdEditable.toString();\n if (!Checker.isPasswd(passwdStr)) {\n toastMessage(getString(R.string.inputSuitableUserPasswd));\n return;\n }\n\n\n //************************************************************************//\n //************************************************************************//\n // confirm the passwd.\n Editable passwdConfirmEditable = confirm.getText();\n if (passwdConfirmEditable == null\n || passwdConfirmEditable.toString().equals(\"\")) {\n toastMessage(getString(R.string.inputYourUserPasswdAgain));\n return;\n }\n String passwdConfirm = passwdConfirmEditable.toString();\n if (!passwdConfirm.equals(passwdStr)) {\n toastMessage(getString(R.string.inputSamePasswd));\n return;\n }\n Log.i(\"Register\", \"get the userPasswd: \" + passwdStr);\n\n AsyncInetClient.getInstance().addUser(userNameStr, passwdStr, signUpResponseHandler);\n\n }", "@FXML\r\n\tvoid Save(ActionEvent event) \r\n\t{\r\n\t\ttry {\r\n\t\t\tMessage myMessage;\r\n\t\t\tString userName = MainGUI.currClient.getUserName();\r\n\t\t\tString password = MainGUI.currClient.getPassword();\r\n\t\t\tlong telephone = MainGUI.currClient.getTelephone();\r\n\t\t\tbyte[] salt = MainGUI.currClient.getSalt();\r\n\t\t\tString\tpermission = MainGUI.currClient.getPermission().toString();\r\n\t\t\tlong cardNumber = MainGUI.currClient.getCardNumber();\r\n\t\t\tlong id = MainGUI.currClient.getID();\r\n\t\t\tLocalDate expiryDate = MainGUI.currClient.getExpiryDate() ;\r\n\t\t\tLocalDate newExpiryDate = dpCreditCardExpiryDate.getValue();\r\n\t\t\tString firstName = tfFirstName.getText();\r\n\t\t\tString lastName = tfLastName.getText();\r\n\r\n\t\t\t//Verify that characters entered for telephone are digits only\r\n\t\t\tlistenerForOnlyDigitsInput(tfphone);\r\n\t\t\ttelephone = (tfphone.getText().length() <= 10) ? Long.parseLong(tfphone.getText()) : telephone;\r\n\r\n\t\t\tif(newExpiryDate != null) expiryDate = newExpiryDate;\r\n\r\n\t\t\t//Check whether entered email is according to an email format\r\n\t\t\tString email = tfEmail.getText();\r\n\t\t\tif (!isValid(email)) \r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"The email address is invalid\", \"Error\",\r\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t}\r\n\r\n\t\t\t//Update credit card number and id if radio button was chosen\r\n\t\t\tif(rbChangeCreditNumber.isSelected())\r\n\t\t\t{\r\n\t\t\t\tid = (tfIDNumber.getText().length() <= 9) ? Long.parseLong(tfIDNumber.getText()) : id;\r\n\t\t\t\tString fullCardString = tfCreditCard1.getText() + tfCreditCard2.getText() +\r\n\t\t\t\t\t\t\t\t tfCreditCard3.getText() + tfCreditCard4.getText();\r\n\t\t\t\tcardNumber = (fullCardString.length() >= 17) ? 0L : Long.parseLong(fullCardString);\r\n\t\t\t}\r\n\t\t\tmyMessage = new Message(Action.EDIT_USER_DETAILS, firstName,lastName,userName,password,salt,email,permission,\r\n\t\t\t\t\ttelephone,cardNumber,id,expiryDate,userName);\r\n\t\t\tMainGUI.GUIclient.sendToServer(myMessage);\r\n\t\t} catch (IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\te.toString() + \" Could not send message to server. Terminating client.\", \"Error\",\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\tMainGUI.GUIclient.quit();\r\n\t\t}\r\n\t}", "public void actionPerformed(ActionEvent e) \n {\n\t\t\t\tWrapper conn = null;\n\t\t\t\ttry //try block\n {\n //declare variables\n\t\t\t\tString username = \"\";\n\t\t\t\tString password = \"\";\n\t\t\t\t\n\t\t\t\t//get values using getText() method\n\t\t\t\tusername = txtUser.getText().trim();\n\t\t\t\tpassword = txtPassword.getText().trim();\n\t\t\t\t\n // check condition it field equals to blank throw error message\n\t\t\t\tif (username.equals(\"\")|| password.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\" name or password or Role is wrong\",\"Error\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t\telse //else insert query is run properly\n {\n\t\t\t\t\tString IQuery = \"INSERT INTO `demo`.`loginaccount`(`username`,`password`,`ts`) VALUES('\"+username+\"', '\"+password+\"',current_timestamp)\";\n\t\t\t\t\tSystem.out.println(IQuery);//print on console\n\t\t\t\t\tSystem.out.println(\"Connecting to a selected database...\");\n\t\t\t\t\n\t\t\t\t//STEP 3: Open a connection\n\t\t\t\tconn = DriverManager.getConnection(DB_URL, USER, PASS);\n\t\t\t\t\tSystem.out.println(\"Connected database successfully...\");\n\t\t\t\t\t \n\t\t\t\t((Connection)conn).createStatement().execute(IQuery);//select the rows\n\t\t\t\t\t// define SMessage variable\n\t\t\t\t\tString SMessage = \"Record added for \"+username;\n\t\t\t\t\t\n // create dialog ox which is print message\n\t JOptionPane.showMessageDialog(null,SMessage,\"Message\",JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t//close connection\n\t\t\t\t\t((java.sql.Connection)conn).close();\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tcatch (SQLException se) \n\t\t\t{\n\t\t\t\t//handle errors for JDBC\n\t\t\t\tse.printStackTrace();\n\t\t\t}\n\t\t\tcatch (Exception a) //catch block\n\t\t\t{\n\t\t\t\ta.printStackTrace();\n\t\t\t}\n\t\t }", "@Override\n public void onClick(View view) {\n String pwNew = mUserPasswordNew.getText().toString().trim();\n String pwNewWdh = mUserPasswordNewWdh.getText().toString().trim();\n\n //TODO logs entfernen\n if(mUserPasswordNew.getText().toString().equals(mUserPasswordNewWdh.getText().toString())){\n ParseUser currentUser = ParseUser.getCurrentUser();\n currentUser.setPassword(pwNew);\n currentUser.saveInBackground();\n Toast.makeText(ProfilActivity.this,\"Guter Code! Passwort geändert\", Toast.LENGTH_LONG).show();\n Log.d(\"TAG\", pwNew);\n Log.d(\"TAG\", pwNewWdh);\n } else {\n Toast.makeText(ProfilActivity.this, \"Noob! Bitte 2 gleiche passwörter eingeben\", Toast.LENGTH_LONG).show();\n Log.d(\"TAG\", pwNew);\n Log.d(\"TAG\", pwNewWdh);\n }\n\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tUsuarioPojo user = null;\r\n\t\t\t\tUsuarioPersistencia up = new UsuarioPersistencia();\r\n\r\n\t\t\t\t//int id = up.obtenerIdEmple();\r\n\t\t\t\tString usuarioMail = txtUsuario.getText();\r\n\t\t\t\tString password = new String(pwdPass.getPassword()); // DNI de momento\r\n\t\t\t\tString passwordC = new String(pwdConfPass.getPassword());\r\n\t\t\t\tString apenom = txtApenom.getText();\r\n\t\t\t\tString dni = txtDni.getText();\r\n\t\t\t\tint numSS = Integer.parseInt(txtSegSoc.getText());\r\n\t\t\t\tString cuenta = txtCuenta.getText();\r\n\r\n\t\t\t\tif (password.equals(passwordC)) {\r\n\t\t\t\t\t// creamos un objeto usuario si coinciden las contraseñas\r\n\t\t\t\t\tuser = new UsuarioPojo(apenom, numSS, cuenta, dni, usuarioMail, password);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (user != null) {\r\n\t\t\t\t\t// insertaremos el usuario si coinciden las contraseñas\r\n\t\t\t\t\tup = new UsuarioPersistencia();\r\n\t\t\t\t\tint res = up.insertarUser(user);\r\n\r\n\t\t\t\t\tif (res == 1) { // se habrá registrado al usuario\r\n\t\t\t\t\t\tSystem.out.println(\"Insertado correctamente\");\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Registro insertado correctamente\",\r\n\t\t\t\t\t\t\t\t\"Resultado del Registro\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t\t\tdispose(); // dispose cierra ventana actual, System.exit(0) sale del programa\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// mostramos msg si no coinciden las contraseñas, manteniendo el control en dreg\r\n\t\t\t\t\tSystem.out.println(\"No insertado\");\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Contraseñas introducidas no coinciden\", \"Error de contraseña\",\r\n\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\t// limpiamos campos de contraseña\r\n\t\t\t\t}\r\n\t\t\t}", "public boolean onOkClicked() {\n try {\n if (form.isValid()) {\n String userName = form.getFieldValue(SysUser.USER_NAME_PROPERTY);\n String userAccount = form.getFieldValue(SysUser.USER_ACCOUNT_PROPERTY);\n String passWord = form.getFieldValue(SysUser.USER_PASSWORD_PROPERTY);\n String cPassWord = form.getFieldValue(\"cPassWord\");\n if (!passWord.equals(cPassWord)) {\n form.getField(SysUser.USER_PASSWORD_PROPERTY).setValue(\"\");\n form.getField(\"cPassWord\").setValue(\"\");\n form.getField(SysUser.USER_PASSWORD_PROPERTY).setFocus(true);\n addModel(\"msg\", \"密码不一致\");\n } else if (SysUserDao.getInstance().canCreate(getSysUser().getObjectContext(), userAccount)) {\n if (SysUserDao.getInstance().createSysUser(getSysUser().getObjectContext(), userName, userAccount, passWord)) {\n setRedirect(UserListPage.class);\n } else {\n addModel(\"msg\", \"失败\");\n }\n } else {\n form.getField(SysUser.USER_ACCOUNT_PROPERTY).setFocus(true);\n addModel(\"msg\", \"账号已存在\");\n }\n }\n } catch (Exception e) {\n logger.error(e.getLocalizedMessage(), e);\n }\n return true;\n }", "public void editButtonClicked(){\n String first = this.firstNameInputField.getText();\n String last = this.lastNameInputField.getText();\n String email = this.emailInputField.getText();\n String dep = \"\";\n String role=\"\";\n if(this.departmentDropdown.getSelectionModel().getSelectedItem() == null){\n dep= this.departmentDropdown.promptTextProperty().get();\n //this means that the user did not change the dropdown\n \n }else{\n dep = this.departmentDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.roleDropdown.getSelectionModel().getSelectedItem()== null){\n role = this.roleDropdown.promptTextProperty().get();\n }else{\n role = this.roleDropdown.getSelectionModel().getSelectedItem();\n }\n \n if(this.isDefaultValue(first) && \n this.isDefaultValue(last) && \n this.isDefaultValue(email) && \n this.isDefaultValue(role) && \n this.isDefaultValue(dep)){\n //this is where we alert the user that no need for update is needed\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setContentText(\"User information has not changed...no update performed\");\n alert.showAndWait();\n \n }else{\n \n if(this.userNameLabel.getText().equals(\"User\")){\n System.out.println(\"This is empty\");\n }else{\n //create a new instance of the connection class\n this.dbConnection = new Connectivity();\n //this is where we do database operations\n if(this.dbConnection.ConnectDB()){\n //we connected to the database \n \n boolean update= this.dbConnection.updateUser(first, last, email, dep,role , this.userNameLabel.getText());\n \n \n }else{\n System.out.println(\"Could not connect to the database\");\n }\n \n }\n }\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\r\n\tprotected void btnUpdateactionPerformed() {\n\t\tjava.sql.Connection conObj = JdbcConnect.createConnection();\r\n\t\tjava.util.Vector update_pass = new java.util.Vector();\r\n\t\t\r\n\t\tupdate_pass.add(newpassUpdatejTextField.getText());\r\n\t\tupdate_pass.add(unameUpdatejTextField.getText());\r\n\t\t\r\n\t\tif(\"Administrer\".equals(unameUpdatejTextField.getText()))\r\n\t\t{\r\n\t\t\tif(\"Administrer\".equals(usrname))\r\n\t\t\t{\r\n\t\t\t\tint i = 0;\r\n\t\t\t\ttry {\r\n\t\t\t\t\ti = JdbcUpdateUSERACCOUNTS.updateRecordFromTable(conObj,update_pass);\r\n\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null,e.getMessage(), \"\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t}\t\r\n\t\t\t\tif (i==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Database Internal Error\", \"User@\"+unameUpdatejTextField.getText()+\" access error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse {\t\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"You have successful generated new password for User@\"+unameUpdatejTextField.getText(), \"User@\"+unameUpdatejTextField.getText()+\" success message\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t\t}\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"User@\"+usrname+\" Not permitted to interfere with the parent Administrator\", \"Security message\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t}\t\r\n\t\telse {\r\n\t\t\tint i = 0;\r\n\t\t\ttry {\r\n\t\t\t\ti = JdbcUpdateUSERACCOUNTS.updateRecordFromTable(conObj,update_pass);\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\tJOptionPane.showMessageDialog(null,e.getMessage(), \"\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\t\r\n\t\t\tif (i==0)\r\n\t\t\t{\r\n\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"Internal Error\", \"User@\"+unameUpdatejTextField.getText()+\" access error\", javax.swing.JOptionPane.ERROR_MESSAGE);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\telse {\t\r\n\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"You have successful generated new password for User@\"+unameUpdatejTextField.getText(), \"User@\"+unameUpdatejTextField.getText()+\" success message\", javax.swing.JOptionPane.PLAIN_MESSAGE);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void savePasswordChange(ActionEvent actionEvent) throws SQLException {\n if (validPasswordInput()) {\n DatabaseManager.passwordChange(user.getDatabaseConnection(), user.getUser(), firstPasswordField.getText());\n displayMessage(messagePane,\"Password is changed\", false);\n closeChangePasswordPane(actionEvent);\n }\n }", "private void tocashAction() {\n\t\tString bankname = bankName.getText().toString();\n\t\tString personname = personName.getText().toString();\n\t\tString accountstr = account.getText().toString();\n\t\tString phonestr = phone.getText().toString();\n\t\tif (TextUtils.isEmpty(bankname)) {\n\t\t\tshowToast(getResources().getString(R.string.nobankname));\n\t\t\treturn;\n\t\t} else if (TextUtils.isEmpty(personname)) {\n\t\t\tshowToast(getResources().getString(R.string.noopenname));\n\t\t\treturn;\n\t\t} else if (TextUtils.isEmpty(accountstr)) {\n\t\t\tshowToast(getResources().getString(R.string.noaccount));\n\t\t\treturn;\n\t\t} else if (TextUtils.isEmpty(phonestr)) {\n\t\t\tshowToast(getResources().getString(R.string.nophone));\n\t\t\treturn;\n\t\t} else if (!validatePhone(phonestr)) {\n\t\t\tshowToast(getResources().getString(R.string.phoneworng));\n\t\t\treturn;\n\t\t} else {\n\t\t\tAccountVo accountVo = new AccountVo(bankname, personname, accountstr, phonestr);\n\t\t\tuserInfoApi.account(getUserInfoVo().getUid(), accountVo, new ClientAjaxCallback() {\n\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\tgetWaitDialog().setMessage(\"提交\");\n\t\t\t\t\tgetWaitDialog().show();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(String t) {\n\t\t\t\t\tsuper.onSuccess(t);\n\t\t\t\t\tgetWaitDialog().cancel();\n\t\t\t\t\tLog.v(\"申请:\", t);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tString data = ErrorCode.getData(getBaseContext(), t);\n\t\t\t\t\t\tif(!TextUtils.isEmpty(data)){\n\t\t\t\t\t\t\tif(\"1\".equals(data)){\n\t\t\t\t\t\t\t\tshow(\"申请成功!\");\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tshow(\"申请失败!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tshow(\"申请错误!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tshow(\"申请错误!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable t, String strMsg) {\n\t\t\t\t\tsuper.onFailure(t, strMsg);\n\t\t\t\t\tgetWaitDialog().cancel();\n\t\t\t\t\tshow(\"申请错误!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tprivate void show(String str){\n\t\t\t\t\tgetPromptDialog().setMessage(str);\n\t\t\t\t\tgetPromptDialog().addCannel();\n\t\t\t\t\tgetPromptDialog().setCannelText(\"确定\");\n\t\t\t\t\tgetPromptDialog().removeConfirm();\n\t\t\t\t\tgetPromptDialog().show();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t});\n\t\t}\n\t}", "private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n String message = \"Failed to save data...\";\n if (flag){\n message = \"Success to save data...\";\n }\n JOptionPane.showMessageDialog(this, message, \"Allert / Notification\", \n JOptionPane.INFORMATION_MESSAGE);\n \n bindingTable();\n reset();\n }", "public void saveChanges(View v){\n Boolean saveSucceeded = null;\n\n int userId = users.get(userSpinner.getSelectedItemPosition() - 1).getId();\n String newUsername = editUsername.getText().toString();\n String newPassword = editPassword.getText().toString();\n int newUserType = 1; // Type = normal user by default\n\n // Checks for empty entries and sets them to null so they won't be updated\n if(newUsername.equals(\"\")){\n newUsername = null;\n }\n if(newPassword.equals(\"\")){\n newPassword = null;\n }\n // Hashes new password with selected users salt\n else{\n byte[] userSalt = users.get(userSpinner.getSelectedItemPosition() - 1).getSalt();\n newPassword = passwordHasher.hash(newPassword, userSalt);\n }\n\n if(isAdmin.isChecked()){\n newUserType = 2; // Admin\n }\n\n // Edit user in database\n saveSucceeded = udbHelper.editUser(userId, newUsername, newPassword, newUserType);\n\n String message = \"\";\n if(saveSucceeded){\n message = \"Successfully saved changes to user {\" + newUsername + \"} to database!\";\n }\n else {\n message = \"Failed to save changes!\";\n }\n Toast.makeText(ManageAccountsActivity.this, message, Toast.LENGTH_LONG).show();\n\n reloadUserLists();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (save()) {\r\n\t\t\t\t\tfirst_name_text = first_name.getText().toString();\r\n\t\t\t\t\tlast_name_text=last_name.getText().toString();\r\n\t\t\t\t\tpassword_text = password.getText().toString();\r\n\t\t\t\t\temail_text = email.getText().toString();\r\n\t\t\t\t\tusername_text = username.getText().toString();\r\n\t\t\t\t\t//Remove - between Numbers\r\n\t\t\t\t\tphonenumber_text=phonenumber.getText().toString().replaceAll(\"[^0-9]\", \"\");\r\n\t\t\t\t\t// Remove All spaces between Strings\r\n\t\t\t\t\tcollege_name_text = college_name.getSelectedItem()\r\n\t\t\t\t\t\t\t.toString().replaceAll(\"\\\\s+\", \"\");\r\n\t\t\t\t\t// Execute the AsyncTask to Register User\r\n\t\t\t\t\tnew ValidateRegister().execute();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tif (uName.getText().equals(AdminPage.NAME) && password.getText().equals(AdminPage.PASSWORD)) {\n\n\t\t\t\t\tnew AdminPage();\n\t\t\t\t\tMainGUI.sf.close();\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tMainGUI.rs = MainGUI.statement.executeQuery(\n\t\t\t\t\t\t\t\t\"SELECT password\\r\\n\" + \"FROM USERS\\r\\n\" + \"WHERE name='\" + uName.getText() + \"'\");\n\t\t\t\t\t} catch (SQLException e2) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tint b = 0;\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (!MainGUI.rs.next() || !MainGUI.rs.getString(\"PASSWORD\").equals(password.getText())) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Username or Password\", \"Error\",\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\t\tb++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif (b != 0)\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tif (password.getText().equals(MainGUI.rs.getString(\"PASSWORD\"))) {\n\t\t\t\t\t\t\t\tString name, mail = null, password = null, gender = null, dob = null;\n\t\t\t\t\t\t\t\tint wallet = 0, id = -1;\n\t\t\t\t\t\t\t\tname = uName.getText();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tMainGUI.rs = MainGUI.statement.executeQuery(\n\t\t\t\t\t\t\t\t\t\t\t\"SELECT *\\r\\n\" + \"FROM USERS\\r\\n\" + \"WHERE name='\" + uName.getText() + \"'\");\n\t\t\t\t\t\t\t\t\twhile (MainGUI.rs.next()) {\n\t\t\t\t\t\t\t\t\t\tmail = MainGUI.rs.getString(\"EMAIL\");\n\t\t\t\t\t\t\t\t\t\tpassword = MainGUI.rs.getString(\"PASSWORD\");\n\t\t\t\t\t\t\t\t\t\tgender = MainGUI.rs.getString(\"GENDER\");\n\t\t\t\t\t\t\t\t\t\tdob = MainGUI.rs.getString(\"DOB\");\n\t\t\t\t\t\t\t\t\t\tdob = dob.substring(0, 10);\n\t\t\t\t\t\t\t\t\t\twallet = MainGUI.rs.getInt(\"WALLET\");\n\t\t\t\t\t\t\t\t\t\tid = MainGUI.rs.getInt(\"ID\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tUser user = new User(name, mail, password, gender, wallet, dob, id);\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tnew LibraryGUI(user);\n\t\t\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tMainGUI.sf.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (MainGUI.rs.next());\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// ----------------------------------------------------------\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttextFieldtUserName.setText(\"201610010213\");\n\t\t\t\ttextFieldPasswd.setText(\"gj123231\");\n\t\t\t\tCodeFieldPasswd.setText(\"\");\n\t\t\t}", "@Override\r\n\t\t\tpublic void onSuccess() {\n\t\t\t\tfinal User c = userManager.getCurrentUser(User.class);\r\n\t\t\t\tShowToast(\"修改成功:\"+c.getNick());\r\n\t\t\t\tfinish();\r\n\t\t\t}", "public void saveOnClick(View view) {\n final EditText nameET = (EditText) findViewById(R.id.name_et);\n final EditText titleET = (EditText) findViewById(R.id.title_et);\n final EditText emailET = (EditText) findViewById(R.id.email_et);\n final EditText addressET = (EditText) findViewById(R.id.address_et);\n user.setName(nameET.getText().toString());\n user.setTitle(titleET.getText().toString());\n user.setEmailAddress(emailET.getText().toString());\n user.setHomeAddress(addressET.getText().toString());\n\n RegistrationData.editUserData(db, user);\n finish();\n }", "void SubmitButton() {\r\n\t\tint checker = Accounts.checkUser(username.getText(), password.getText());\r\n\t\tif(checker == -1) {\r\n\t\t\tsetVisible(false);\r\n\t\t\tdispose();\r\n\t\t\tAdminScreen adminScreen = new AdminScreen();\r\n\t\t}\r\n\t\telse if(checker >= 0) {\r\n\t\t\tsetVisible(false);\r\n\t\t\tdispose();\r\n\t\t\tStudentScreen studentScreen = new StudentScreen(checker);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Error: username \"\r\n\t\t\t\t\t+ \"and/or password is incorrect.\");\r\n\t\t\tpassword.setText(\"\");\r\n\t\t\tusername.setText(\"\");\r\n\t\t}\r\n\t\t\r\n\t}", "public void saveButtonPushed(ActionEvent event)\r\n {\r\n try{\r\n user.logHours(datePicker.getValue(), (int) hoursWorkedSpinner.getValue());\r\n errMsgLabel .setText(\"Sales Logged\");\r\n updateLineChart();\r\n }\r\n catch(SQLException e)\r\n {\r\n System.err.println(e.getMessage());\r\n }\r\n catch(IllegalArgumentException e)\r\n {\r\n errMsgLabel.setText(e.getMessage());\r\n }\r\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\n\t\tif (arg0.getSource() == jbSave) {\n\t\t\tPreferencePoint pp = new PreferencePoint();\n\t\t\tAccountSettings mySettings = new AccountSettings();\n\t\t\t\n\t\t\tmySettings.setID(accountID);\n\t\t\tmySettings.setAlias(jlName.getText());\n\t\t\tmySettings.setAccountType((String) jcbType.getModel().getElementAt(jcbType.getSelectedIndex()));\n\t\t\tmySettings.setEnabled(jcbEnabled.isSelected());\n\t\t\tmySettings.setUsername(jtUsername.getText());\n\t\t\tmySettings.setPassword(String.valueOf(jtPassword.getPassword()));\n\t\t\t\n\t\t\tpp.saveAccount(mySettings);\n\t\t\t\n\t\t\ttheE.accountChanged();\n\t\t} else if (arg0.getSource() != jbCancel) {\n\t\t\treturn;\n\t\t}\n\t\t// close this window\n\t\t// TODO someone should look this up... is this even right?\n\t\tthis.setVisible(false);\n\t}", "public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\n }", "public void modifybutton(ActionEvent event) throws Exception{\n\t\t\n\t\tSystem.out.println(\"Editable\");\n\t\ttxtfield2.setEditable(true);\n\t\ttxtfield3.setEditable(true);\n\t\ttxtfield4.setEditable(true);\n\t\ttxtfield5.setEditable(true);\n\t\ttxtfield6.setEditable(true);\n\t\tsave.setVisible(true);\n\t\t\n\t\tStage subStage = new Stage();\n\t\tsubStage.setTitle(\"Alert\");\n\t\t FlowPane root = new FlowPane();\n\t root.setAlignment(Pos.CENTER);\n\t Scene scene = new Scene(root, 300, 200);\n\t Label conf = new Label(\"You can modify your information now\");\n\t conf.setTranslateX(40);\n\t conf.setTranslateY(-10);\n\t Button buton = new Button(\"OK\");\n\t buton.setTranslateX(-50);\n\t buton.setTranslateY(50);\n\t buton.setOnAction(e -> subStage.close());\n\t root.getChildren().addAll(conf,buton);\n\t subStage.setScene(scene);\n\t subStage.show();\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tuserIdfield.setText(\"\");\n\t\tactTypeField.setText(\"\");\n\t\tloginNamField.setText(\"\");\n\t\tloginpwdField.setText(\"\");\n\t\tnamefield.setText(\"\");\n\t\tsexIdfield.setText(\"\");\n\t\thomephonefield.setText(\"\");\n\t\tcallphonefield.setText(\"\");\n\t\tofcphonefield.setText(\"\");\n\t\tshortphonefield.setText(\"\");\n\t\totherphonefield.setText(\"\");\n\t\tfaxfield.setText(\"\");\n\t\temailfield.setText(\"\");\n\t\taddrfield.setText(\"\");\n\t\ttitlefield.setText(\"\");\n\t\tdeptIdfield.setText(\"\");\n\t\tuserLevelfield.setText(\"\");\n\t\troleIdfield.setText(\"\");\n\t\tactIdfield.setText(\"\");\n\t\toldPwdField.setText(\"\");\n\t\tnewPwdField.setText(\"\");\t\t\n\t\totherphone2field.setText(\"\");\n\t\tzipfield.setText(\"\");\n\t\tstaffNumfield.setText(\"\");\n\t\tforeignfield.setText(\"\");\n\t\tuserstatefield.setText(\"\");\n\t\tnotesmailfield.setText(\"\");\n\t\tbirthdayfield.setText(\"\");\n\t\tdesfield.setText(\"\");\n\t\twebsitefield.setText(\"\");\n\t\tqPinyinfield.setText(\"\");\n\t\tjPinyinfield.setText(\"\");\n\n\t}", "@FXML\n private void doneBtn(ActionEvent event) throws IOException, SQLException, ClassNotFoundException {\n \n passCheck(); //password chk\n \n if(!pass.equals(\"\")){\n UGStudent.insertStudentLogin(username.getText(), email.getText(), pass);\n \n //return to the login page;\n Parent root = FXMLLoader.load(getClass().getResource(\"/studentenrollment/FXMLDocument.fxml\"));\n Scene scene = new Scene(root);\n Stage appStage = (Stage) ((Node) event.getSource()).getScene().getWindow();\n appStage.setScene(scene);\n appStage.show();\n } \n else{\n \n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setHeaderText(\"\");\n alert.setContentText(\"Passwords not correct\");\n alert.showAndWait();\n }\n }", "@Override\n public void onClick(View v) {\n biensoxe = etBienSoXe.getText().toString().toLowerCase().trim();\n passwordtx = etPasswordtx.getText().toString().trim();\n confirmPassword = etConfirmPassword.getText().toString().trim();\n tenchuxe = etTenChuXe.getText().toString().trim();\n sdt = etSDT.getText().toString().trim();\n mota = edMoTa.getText().toString().trim();\n loaixe = tenloaixe;\n trongtaixe = trongtai;\n if (validateInputs()) {\n registerUser();\n }\n\n }", "@FXML void saveUser(ActionEvent e) {\n\t\tString userName = userNameTxt.getText().trim();\n\t\t\n\t\tif(userName.isEmpty()) {\n\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setContentText(\"User name cannot be blank.\");\n alert.showAndWait();\n\t\t}else {\n\t\t\t/*if(userList.contains(user)) {\n\t\t\t\t//give error\n\t\t\t\tuserNameTxt.clear();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tuserList.add(user);\n\t\t\t\tSystem.out.println(userList.toString());\n\t\t\t\tuserNameTxt.clear();\n\t\t\t\t\n\t\t\t}*/\n\t\t\t\n\t\t\t//userList.add(user);\n\t\t\t\n\t\t\t//checks if user is in list\n\t\t\tif(userInList(userName)) {\n\t\t\t\t\n\t\t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\n\t alert.setTitle(\"Error\");\n\t alert.setContentText(\"User name already exists.\");\n\t alert.showAndWait();\n\t\t\t\tuserNameTxt.clear();\n\t\t\t}else {\n\t\t\t\tUser user = new User(userName);\n\t\t\t\tuserList.add(user);\n\t\t\t\tuserNameTxt.clear();\n\t\t\t\t//userListView.refresh();\n\t\t\t\tuserListView.setItems(userList);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\thideAdditionElements();\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n try {\n Account account = new Account(APPKEY, APPSECRET);\n accounts.add(account);\n int mc = JOptionPane.WARNING_MESSAGE;\n if (!accountDispName.getText().contains(account.screenName)) {\n accountDispName.setText(accountDispName.getText() + account.screenName + \"\\n\");\n accountDispName.setOpaque(true);\n statusDisplay.setText(statusDisplay.getText() + \"active\\n\");\n if (!accountDisplayNameHeader.isVisible())\n accountDisplayNameHeader.setVisible(true);\n if (!accountStatusHeader.isVisible())\n accountStatusHeader.setVisible(true);\n if (!accountDispName.isVisible())\n accountDispName.setVisible(true);\n if (!statusDisplay.isVisible())\n statusDisplay.setVisible(true);\n //f1.validate();\n account.persistAccount();\n JOptionPane.showMessageDialog(null, \"Account Added Successfully!!\", \"Success!!\", mc);\n nAccounts++;\n } else {\n JOptionPane.showMessageDialog(null, \"Account Already Exists\", \"Duplicate!!\", mc);\n }\n } catch (Exception e1) {\n int mc = JOptionPane.WARNING_MESSAGE;\n JOptionPane.showMessageDialog(null, \"Unable To Add Account!\", \"Error\", mc);\n e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == reset) {\n\t\t\tString def = \"\";\n\t\t\ttname.setText(def);\n\t\t\ttsurname.setText(def);\n\t\t\ttemail.setText(def);\n\t\t\tttlf.setText(def);\n\t\t\ttpass.setText(def);\n\t\t} else if (e.getSource() == sub) {\n\t\t\ttname.setText(tname.getText());\n\t\t\ttsurname.setText(tsurname.getText());\n\t\t\ttemail.setText(temail.getText());\n\t\t\tttlf.setText(ttlf.getText());\n\t\t\ttpass.setText(tpass.getText());\n\t\t\ttpassc.setText(tpassc.getText());\n\n\t\t\tif (rastreator.isSelected()) {\n\t\t\t\trolselected = \"rastreator\";\n\n\t\t\t} else {\n\t\t\t\trolselected = \"admin\";\n\n\t\t\t}\n\t\t}\n\n\t\t// We report for data to keep them\n\t\tString sname = tname.getText();\n\t\tString ssurname = tsurname.getText();\n\t\tString semail = temail.getText();\n\t\tint stlf = Integer.parseInt(ttlf.getText());\n\t\tString srolegp = rolegp.toString();\n\t\tString spass = tpass.getText();\n\t\tString spassc = tpassc.getText();\n\n\t\tPreferences prefs = Preferences.userNodeForPackage(LoginForm.class);\n\t\tString token = prefs.get(\"token\", \"token\");\n\t\tUserPost up = new UserPost();\n\t\tup.setName(sname);\n\t\tup.setSurname(ssurname);\n\t\tup.setEmail(semail);\n\t\tup.setPhone(stlf);\n\t\tup.setType(rolselected);\n\t\tup.setPassword(spass);\n\t\tup.setPasswordConfirm(spassc);\n\n\t\tId id = ApiConnector.createUser(token, up);\n\n\t\tif (id != null) {\n\t\t\tJOptionPane.showMessageDialog(null, \"L'usuari s'ha creat amb exit\");\n\t\t\tframe.dispose();\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"Ooops something went wrong\");\n\t\t}\n\n\t}", "protected void Save() {\n\t\tString WareName = txtWareName.getText().trim();\n\t\tint WareCap = Integer.parseInt(txtWareCap.getText().trim());\n\t\tString WareAddress = txtWareAddress.getText().trim();\n\t\tint WareUser = Integer.parseInt(txtWareUser.getText().trim());\n\t\tWareUserDto wud = new WareUserDto();\n\t\t\n\t\twud.setWareID(this.wud.getWareID());\n\t\twud.setWareName(WareName);\n\t\twud.setWareCap(WareCap);\n\t\twud.setWareAddress(WareAddress);\n\t\twud.setWareUser(WareUser);\n\t\t\n\t\tif(service.updateWareUserService(wud)){\n\t\t\tList<WareUserDto> list = service.getWareHouseAllInfo();\n\t\t\t//bwj.setTabDate(list);\n\t\t\tbtnWareJDialog.setTabDate(list);\n\t\t\tthis.dispose();\n\t\t}else{\n\t\t\tJOptionPane.showMessageDialog(this, \"修改失败\", \"错误\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t\n\t}", "private void button1ActionPerformed(ActionEvent e) throws InterruptedException, SQLException, ClassNotFoundException {\n // TODO add your code here\n try {\n controllerConnection.isConnected(textField1.getText(), passwordField1.getText());\n\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n if (controllerConnection.getIsConnect()) {\n try {\n controllerConnection.updateUser(getEmailActualUser());\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n int permission = controllerConnection.testPermission();\n switch (permission) {\n case 0 -> System.out.println(\"Erreur - Permission non reconnu\");\n case 1 -> {\n root.setVisible(false);\n AdminView adminView = new AdminView(controllerConnection, true);\n }\n case 2 -> {\n root.setVisible(false);\n\n AdminView adminView = new AdminView(controllerConnection, false);\n }\n case 3 -> {\n root.setVisible(false);\n\n TeacherView teacherView = new TeacherView(controllerConnection);}\n case 4 ->{\n root.setVisible(false);\n StudentView studentView = new StudentView(controllerConnection);}\n }\n }\n\n if(controllerConnection.getIsIdFaild()){\n IdFail.setVisible(true);\n controllerConnection.idFailed =false;\n }\n }", "@FXML\n\tpublic void updateMyUser(ActionEvent event) {\n\t\tSystemUser userToUpdate = restaurant.returnUser(LabelSystemUserName.getText());\n\t\tString name = txtSystemUserNewname.getText();\n\t\tString lastName = txtSystemUserNewLastname.getText();\n\t\tString id = txtSystemUserNewId.getText();\n\t\tString username = txtSystemUserNewUsername.getText();\n\n\t\tif (!name.equals(\"\") && !lastName.equals(\"\") && !id.equals(\"\") && !username.equals(\"\")) {\n\n\t\t\ttry {\n\t\t\t\tuserToUpdate.setNames(name);\n\t\t\t\tuserToUpdate.setSurNames(lastName);\n\t\t\t\tuserToUpdate.setIdNumber(id);\n\t\t\t\tuserToUpdate.setUsername(username);\n\t\t\t\tuserToUpdate.setPassword(passwordSystemUserNewPassword.getText());\n\t\t\t\trestaurant.saveUsersData();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"Usuario actualizado satisfactoriamente\");\n\t\t\t\tdialog.setTitle(\"Proceso Satisfactorio\");\n\t\t\t\tdialog.show();\n\n\t\t\t\ttxtSystemUserNewname.setText(\"\");\n\t\t\t\ttxtSystemUserNewLastname.setText(\"\");\n\t\t\t\ttxtSystemUserNewId.setText(\"\");\n\t\t\t\ttxtSystemUserNewUsername.setText(\"\");\n\t\t\t\tpasswordSystemUserNewPassword.setText(\"\");\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tDialog<String> dialog = createDialog();\n\t\t\t\tdialog.setContentText(\"No se pudo guardar la actualización del usuario\");\n\t\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\t\tdialog.show();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tFXMLLoader opWindow = new FXMLLoader(getClass().getResource(\"Options-window.fxml\"));\n\t\t\t\topWindow.setController(this);\n\t\t\t\tParent opPane = opWindow.load();\n\t\t\t\tmainPaneLogin.getChildren().setAll(opPane);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t} else {\n\t\t\tDialog<String> dialog = createDialog();\n\t\t\tdialog.setContentText(\"Todos los campos deben ser llenados\");\n\t\t\tdialog.setTitle(\"Error al guardar datos\");\n\t\t\tdialog.show();\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n String strUsername = txtUsername.getText().toString();\n String strPassword = txtPassword.getText().toString();\n if (strPassword.length() < 4) {\n Toast.makeText(getApplicationContext(), \"Password requires at least 4 characters.\", Toast.LENGTH_LONG).show();\n return;\n }\n String strHashedPassword = hash(strPassword);\n\n //Build sql prepared statement\n String strStatement = \"insert into account (username, password) values (?, ?)\";\n try {\n PreparedStatement psInsert = Settings.getInstance().getConnection().prepareStatement(strStatement);\n psInsert.setString(1, strUsername);\n psInsert.setString(2, strHashedPassword);\n int result = psInsert.executeUpdate();\n if (result != 0) {\n Log.d(\"\", \"onClick: Error inserting account.\");\n }\n\n psInsert.close();\n\n //TODO: check result code to make sure it went through\n\n Toast.makeText(getApplicationContext(), \"Account successfully created.\", Toast.LENGTH_LONG).show();\n //Toast.makeText(getApplicationContext(), \"Username already exists.\", Toast.LENGTH_LONG).show();\n //Toast.makeText(getApplicationContext(), \"Password does not meet requirements.\", Toast.LENGTH_LONG).show();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n Log.v(this.getClass().toString(), \"Register complete.\");\n }", "@FXML\n private void saveSettings()\n {\n boolean changes = false;\n String newUsername = changeUsernameField.getText();\n\n if (checkChangeUsernameValidity(newUsername) && checkUsername(newUsername, changeUsernameErrorLabel)) {\n changeUsername(newUsername);\n changeUsernameField.setPromptText(newUsername);\n updateProfileLabels();\n changes = true;\n }\n if (bufferImage != null)\n {\n controllerComponents.getAccount().setProfilePicture(bufferImage);\n updateProfilePictures();\n changes = true;\n }\n bufferImage = null;\n if (changes)\n {\n saveFeedbackLabel.setText(\"Changes saved.\");\n } else\n {\n saveFeedbackLabel.setText(\"You have not made any changes.\");\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tif(fn.getText().equals(\"\")||use.getText().equals(\"\")||use.getText().equals(\"\")||pas.getText().equals(\"\")||cpas.getText().equals(\"\"))\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"all fields are required\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(!pas.getText().equals(cpas.getText()))\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"password and confirm password field should be same\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tString fna= fn.getText();\r\n\t\t\t\t\tString sna=sn.getText();\r\n\t\t\t\t\tString user=use.getText();\r\n\t\t\t\t\t\tString pass=cpas.getText();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\tClass.forName(Constant.DRIVER);\r\n\t\t\t\t\tcon= DriverManager.getConnection(Constant.CONNECTION_STRING, Constant.USRENAME, Constant.PASSWORD);\r\n\t\t\t\t\tString querry=\"insert into login values('\"+fn.getText()+\"','\"+sn.getText()+\"','\"+use.getText()+\"','\"+pass+\"')\";\r\n\t\t\t\t\t\r\n\t\t\t\t\tst=con.createStatement();\r\n\t\t\t\t\tst.executeUpdate(querry);\r\n\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"upated\");\r\n\t\t\t\t\tf.dispose();\r\n\t\t\t\t\tnew Dashboard();\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\tcatch(Exception ea) {\r\n\t\t\t\t\t\tea.printStackTrace();\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Error please Check your information and try again\");\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t}", "@Override\n public void onClick(View view) {\n \t \tString displayName = view_displayName.getEditableText().toString();\n \t \tString address = view_address.getEditableText().toString();\n \t \t\n// \t \tview_currentPw.setError(null);\n// \tview_newPw.setError(null);\n// \tview_confirmNewPw.setError(null);\n \tview_displayName.setError(null);\n \tview_address.setError(null);\n \t\n \t// Input validation\n \tboolean invalid = false;\n\n \tif (TextUtils.isEmpty(displayName)) {\n invalid = true;\n view_displayName.setError(getString(R.string.editprofile_compulsory));\n } /*else if (TextUtils.isEmpty(currentPw)) {\n invalid = true;\n view_currentPw.setError(getString(R.string.editprofile_compulsory));\n } else if ((!TextUtils.isEmpty(newPw) || !TextUtils.isEmpty(confirmNewPw))\n \t\t&& !TextUtils.equals(newPw, confirmNewPw)) {\n invalid = true;\n view_newPw.setError(getString(R.string.editprofile_passwords_different));\n }*/ else if (role.equals(AppData.ROLE_SELLER) && TextUtils.isEmpty(address)){\n \tinvalid = true;\n \tview_address.setError(getString(R.string.editprofile_address_empty));\n }\n \n\n if (invalid == false) {\n\n // Set the parameters to update the user details\n final ParameterMap params = new ParameterMap();\n params.put(\"update\", \"true\"); // REST API looks for this\n\n if (role.equals(AppData.ROLE_KG)) {\n params.put(AppData.KarungGunis.COLUMN_NAME_DISPLAY_NAME, displayName);\n } else {\n params.put(AppData.Sellers.COLUMN_NAME_DISPLAY_NAME, displayName);\n params.put(AppData.Sellers.COLUMN_NAME_ADDRESS, address);\n// params.put(AppData.Sellers.COLUMN_NAME_ADDRESS_LAT, \"1\");\n// params.put(AppData.Sellers.COLUMN_NAME_ADDRESS_LONG, \"1\");\n }\n \t\n \tHandler.Callback setUserDetailsCallback = new Handler.Callback() {\n Bundle result;\n JSONObject user;\n\n @Override\n public boolean handleMessage(Message message) {\n result = message.getData();\n\n // Return if an error occurs\n if (result.getInt(\"success\") != 1 || result.getInt(\"status\") != 200) {\n Log.w(\"ACCOUNT_MANAGER\", getString(R.string.editprofile_connerror));\n\n progressDialog.dismiss();\n Toast.makeText(getApplicationContext(), getString(R.string.editprofile_connerror), Toast.LENGTH_LONG).show();\n return false;\n }\n\n try {\n user = RestClient.parseJsonObject(new ByteArrayInputStream(result.getString(\"response\").getBytes(\"UTF-8\")));\n\n // If no user was found\n if (user == null) {\n Log.w(\"ACCOUNT_MANAGER\", \"ERROR: No user found.\");\n\n progressDialog.dismiss();\n Toast.makeText(getApplicationContext(), getString(R.string.editprofile_usernotfound), Toast.LENGTH_LONG).show();\n return false;\n }\n\n// // If the password hash doesn't match, ask the user to enter the password again\n// if (!AccountManager.hashPassword(currentPw).equals(user.getString(AppData.Users.COLUMN_NAME_PASSWORD))) {\n// Log.w(\"ACCOUNT_MANAGER\", \"ERROR: Password mismatch.\");\n//\n// progressDialog.dismiss();\n// Toast.makeText(getApplicationContext(), R.string.login_incorrect, Toast.LENGTH_LONG).show();\n// return false;\n// }\n\n// // Update the user details\n// Uri uri;\n// if (role.equals(AppData.ROLE_KG)) {\n// uri = Uri.parse(AppData.KarungGunis.CONTENT_ID_URI_BASE + email);\n// } else {\n// uri = Uri.parse(AppData.Sellers.CONTENT_ID_URI_BASE + email);\n// }\n\n// Bundle result = RestClient.update(uri, params, null);\n \n // Display success\n Toast.makeText(getApplicationContext(), getString(R.string.editprofile_success), Toast.LENGTH_LONG).show();\n \n // Dismiss the progress dialog\n progressDialog.dismiss();\n return true;\n \n } catch (JSONException e) {\n e.printStackTrace();\n return false;\n } catch (IOException e) {\n e.printStackTrace();\n return false;\n }\n }\n };\n \n\t // Show a progress dialog to the user while updating profile asynchronously\n\t progressDialog = ProgressDialog.show(self, getString(R.string.editprofile_updating_title), getString(R.string.editprofile_updating_message), true);\n AccountManager.setUserDetails(email, role, params, setUserDetailsCallback);\n }\n }", "void handleSaveClicked(ActionEvent event);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t if(e.getActionCommand().equals(\"提交UID\")){\n\t\t\t\t\tif(!UserID.useruidtext.getText().equals(\"\")) {\n\t\t\t\t\t\tBILIBILIAPI.Userid=UserID.useruidtext.getText();\n\t\t\t\t\t\tsetVisible(false);\n\t\t\t\t\t}else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"不能为空\");\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(BILIBILIAPI.Userid);\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic String save() throws Exception{\n\t\ttry {\n\t\t\tDate date = new Date();\n\t\t\tMap<String, Object> resultMap = new HashMap<String, Object>();\n\t\t\tString msg;\n\t\t\tif(username.isEmpty() || username.contains(\" \")){\n\t\t\t\tmsg = \"Invalid username, check your username and try again!\";\n\t\t\t\tthrow new Exception(msg);\n\t\t\t}\n\t\t\tif(password.isEmpty() || password.contains(\" \") || password.length() < 6 || password.length() > 16){\n\t\t\t\tmsg = \"Password must be 6-16 characters with no whitespaces!\";\n\t\t\t\tthrow new Exception(msg);\n\t\t\t}\n\t\t\tif(loginService.verifyUsername(username)){\n\t\t\t\tmsg = \"Username already exists!\";\n\t\t\t\tthrow new Exception(msg);\n\t\t\t}\n\t\t\tif(!password.equals(password2)){\n\t\t\t\tmsg = \"Passwords do not match, please check your passwords then submit again!\";\n\t\t\t\tthrow new Exception(msg);\n\t\t\t}\n\t\t\tif(!profileService.isValidEmailAddress(email)){\n\t\t\t\tmsg = \"Invalid email, please check that your email is written correctly, and try again.\";\n\t\t\t\tthrow new Exception(msg);\n\t\t\t}\n\t\t\tif(signupService.usedEmail(email)){\n\t\t\t\tmsg = \"Email has already been used!\";\n\t\t\t\tthrow new Exception(msg);\n\t\t\t}\n\t\t\tuserEntity.setIsDisabled(\"N\");\n\t\t\tuserEntity.setIsTutor(\"N\");\n\t\t\tuserEntity.setIsAdmin(\"N\");\n\t\t\tuserEntity.setIsVerified(\"N\");\n\t\t\tuserEntity.setCreateBy(\"System\");\n\t\t\tuserEntity.setCreateDate(date);\n\t\t\tuserEntity.setPassword(EncryptUtil.encrypt(password));\n\t\t\tsignupService.registerAccount(userEntity);\n\t\t\tStruts2Utils.getSession().setAttribute(SessionData.KEY_LOGIN_USER, userEntity);\n\t\t\tif(OnlineUtils.isUseRedis()){\n\t\t\t\tif(OnlineUtils.isOnline(username)){\n\t\t\t\t\tOnlineUtils.logout(username);\n\t\t\t\t}\n\t\t\t\tOnlineUtils.login(Struts2Utils.getSession().getId(), userEntity);\n\t\t\t}\n\t\t\tresultMap.put(\"username\", userEntity.getUsername());\n\t\t\tthis.writeSuccessResult(resultMap);\n\t\t} catch (Exception e){\n\t\t\te.printStackTrace();\n\t\t\tthis.writeErrorResult(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tuser = txt_usr.getText();\n\t\t\t\tpass = txt_pass.getText();\n\t\t\t\t//check password or id is correct or not\n\t\t\t\tif(user.equals(\"test\") && pass.equals(\"12345\")) {\n\t\t\t\t\t//if both are correct user will be loged in\n\t\t\t\t\tAccountHome reg = new AccountHome();\n\t\t\t\t\treg.setVisible(true);\n\t\t\t\t\tdispose();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//if user input incorrect details he will get alert message to input correct details\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Wrong Password / Username\");\n\t\t\t\t\ttxt_usr.setText(\"\");\n\t\t\t\t\ttxt_pass.setText(\"\");\n\t\t\t\t\ttxt_usr.requestFocus();\n\t\t\t\t}\n\t\t\t}", "public void onCreateButtonClick(View view){\n boolean isInserted;\n\n EditText editFirst = (EditText) findViewById(R.id.First_Name);\n EditText editLast = (EditText) findViewById(R.id.Last_Name);\n EditText editEmail = (EditText) findViewById(R.id.email);\n EditText PWD1 = (EditText) findViewById(R.id.password1ET);\n EditText PWD2 = (EditText) findViewById(R.id.password2ET);\n EditText usernameET = (EditText) findViewById(R.id.UserNameIDET);\n\n if (view.getId() == R.id.btn_CAA){\n\n String password1 = PWD1.getText().toString();\n String password2 = PWD2.getText().toString();\n\n // check password match\n if (!password1.equals(password2) || (password1.equals(\"\")) || (password2.equals(\"\"))){\n\n Toast.makeText(CreateAnAccount.this, \"Passwords do not match!\", Toast.LENGTH_LONG).show();\n }\n else {\n isInserted = mydb.insertData(editFirst.getText().toString(),\n editLast.getText().toString(), editEmail.getText().toString(),\n usernameET.getText().toString(), PWD1.getText().toString());\n if(isInserted){\n Toast.makeText(CreateAnAccount.this, \"Data inserted\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(CreateAnAccount.this, MainMenu.class));\n\n } else {\n Toast.makeText(CreateAnAccount.this, \"Data not inserted\", Toast.LENGTH_LONG).show();\n }\n }\n }\n\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t//Set the UID that has been entered into a parameterised constructor\n\t\t\t\tUpdateUser update = new UpdateUser(uid.getText());\n\t\t\t\tConnection connection = Conn.getConnection();\n\t\t\t\t//Getting the UID,USERNAME,PASSWORD,ADDRESS,PHONE from table users where UID match the UID that has been entered\n\t\t\t\tString sql=\"SELECT UID,USERNAME,PASSWORD,ADDRESS,PHONE FROM users where UID =\" + update.getUID(); \n\t\t\t\ttry {\n\t\t\t\t\tStatement stmt = connection.createStatement();\n\t\t\t\t\tResultSet rs= stmt.executeQuery(sql);\n\t\t\t\t\trs.next();\n\t\t\t\t\t//Create a frame to enter the new user details\n\t\t\t\t\tJFrame f2 = new JFrame(\"Update User Details\");\n\t\t\t\t\tJLabel l1,l2,l3,l4; \n\t\t\t\t\tJTextField user,addr,phone;\n\t\t\t\t\tJPasswordField pass;\n\n\t\t\t\t\tl1=new JLabel(\"Username\");\n\t\t\t\t\tl1.setBounds(30,15, 100,30); \n\t\t\t\t\tl2=new JLabel(\"Password\"); \n\t\t\t\t\tl2.setBounds(30,50, 100,30); \n\t\t\t\t\tl3 = new JLabel(\"Address\");\n\t\t\t\t\tl3.setBounds(30, 85, 100, 30);\n\t\t\t\t\tl4 = new JLabel(\"Phone No\");\n\t\t\t\t\tl4.setBounds(30, 120, 100, 30);\n\n\t\t\t\t\tuser = new JTextField();\n\t\t\t\t\tuser.setBounds(110, 15, 200, 30);\n\t\t\t\t\tuser.setText(rs.getString(2));\n\n\t\t\t\t\tpass=new JPasswordField();\n\t\t\t\t\tpass.setBounds(110, 50, 200, 30);\n\t\t\t\t\tpass.setText(rs.getString(3));\n\n\t\t\t\t\taddr =new JTextField();\n\t\t\t\t\taddr.setBounds(110, 85, 200, 30);\n\t\t\t\t\taddr.setText(rs.getString(4));\n\n\t\t\t\t\tphone=new JTextField();\n\t\t\t\t\tphone.setBounds(110, 120, 200, 30);\n\t\t\t\t\tphone.setText(rs.getString(5));\n\n\t\t\t\t\tJButton updateBtn=new JButton(\"Update\");\n\t\t\t\t\tupdateBtn.setBounds(130,180,80,25);\n\t\t\t\t\tupdateBtn.addActionListener(new ActionListener() { //Add action listener to \"Update\" button\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\t\t\tUser add = new User(user.getText(), String.valueOf(pass.getPassword()), addr.getText(), phone.getText());\n\n\t\t\t\t\t\t\tConnection connection = Conn.getConnection();\n\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tStatement stmt = connection.createStatement();\n\t\t\t\t\t\t\t\t//Update the user details by the value that the user has entered\n\t\t\t\t\t\t\t\tstmt.executeUpdate(\"UPDATE USERS SET USERNAME ='\"+add.getUsername()+\"',PASSWORD = '\"+add.getPassword()+\"',ADDRESS='\"+add.getAddress()+\"',PHONE = '\"+add.getPhoneNo()+\"' WHERE UID = \"+update.getUID());\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"User updated!\"); //Update success message\n\t\t\t\t\t\t\t\tf.dispose();\n\t\t\t\t\t\t\t\tf2.dispose();\n\t\t\t\t\t\t\t\tview.initComponents();//Open the viewUserTab back\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcatch (SQLException e1) {\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, e1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tf2.add(updateBtn);\n\t\t\t\t\tf2.add(l1);\n\t\t\t\t\tf2.add(l2);\n\t\t\t\t\tf2.add(l3);\n\t\t\t\t\tf2.add(l4);\n\t\t\t\t\tf2.add(user);\n\t\t\t\t\tf2.add(pass);\n\t\t\t\t\tf2.add(addr);\n\t\t\t\t\tf2.add(phone);\n\t\t\t\t\tf2.setSize(350,300);\n\t\t\t\t\tf2.setLayout(null);\n\t\t\t\t\tf2.setVisible(true);\n\t\t\t\t\tf2.setLocationRelativeTo(null);\n\t\t\t\t}\n\n\t\t\t\tcatch (SQLException e1) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, e1);\n\t\t\t\t} \n\t\t\t}", "public void submitAction(ActionEvent actionEvent) {\r\n try {\r\n connecting();\r\n userName = usernameSignIn.getText();\r\n password = passwordSignIn.getText();\r\n userMain.setUsername(userName);\r\n userLoginChecking=new UserLoginChecking(userName,password);\r\n new WriteThreadClient(clientNetworkUtil,userLoginChecking);\r\n // clientNetworkUtil.write(userLoginChecking);\r\n new ReadThreadClient(clientNetworkUtil,userMain);\r\n\r\n }catch (Exception e)\r\n {\r\n System.out.println(\"Error loading Home page\");\r\n }\r\n }", "public void actionPerformed(ActionEvent e) {\r\n//\t\t\t\tSqlCheck();\r\n\t\t\t\tchangepassword();\r\n\t\t\t\tbutton2.addActionListener(new ActionListener() {\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent ex) {\r\n\t\t\t\t\t\tBoolean successrate=false;\r\n\t\t\t\t\t\tString newpass=newpas.getText();\r\n\t\t\t\t\t\tString verifynewpass=verify.getText();\r\n\t\t\t\t\t\tString currentpassword=currentp.getText();\r\n\t\t\t\t\t\tif(newpass.equals(verifynewpass)) {\r\n\t\t\t\t\t\t\tSql changepass=new Sql(newpass,usernameformainpage,currentpassword);\r\n\t\t\t\t\t\t\tsuccessrate= changepass.changepasswordofdoctor();\r\n\t\t\t\t\t\t\tif(successrate==true) {\r\n\t\t\t\t\t\t\t\twinPassword.dispose();\r\n\t\t\t\t\t\t\t\tmainWin.dispose();\r\n\t\t\t\t\t\t\t\tMainLoginPage mm=new MainLoginPage();\r\n\t\t\t\t\t\t\t\tmm.display();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(winPassword, \"Invalid current password\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(winPassword, \"New password and verify password doesn't match\");\r\n\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}", "public void saveButtonClicked() {\n clearInputFieldStyle();\n boolean minOneError = false;\n HashMap<JFXTextField, Boolean> errors = validateFields();\n\n for(Map.Entry<JFXTextField, Boolean> entry : errors.entrySet()) {\n JFXTextField textField = entry.getKey();\n Boolean value = entry.getValue();\n\n if(value){\n textField.styleProperty().setValue(\"-fx-text-fill: #e15f50;\");\n minOneError = true;\n }\n }\n\n if(!minOneError){\n saveRaceCar();\n updateRaceCarList();\n selectRaceCarInListView();\n setButtonsDisabled(true, false, false);\n setAllFieldsAndSliderDisabled(true);\n ViewHelper.updateCarData();\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(oldText.getPassword().length == 0 || newPassText1.getPassword().length == 0 || newPassText2.getPassword().length ==0) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入密码!\", \"警告\", JOptionPane.WARNING_MESSAGE, new ImageIcon(new Images().getWarring2()));\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tString oldPass = new String( oldText.getPassword() );\r\n\t\t\t\tString newPass = new String( newPassText1.getPassword() );\r\n\t\t\t\tif(!newPass.equals(new String(newPassText2.getPassword()))) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"两次输入的密码不同,请重新输入\", \"警告\", JOptionPane.WARNING_MESSAGE, new ImageIcon(new Images().getWarring2()));\r\n\t\t\t\t\treturn ;\r\n\t\t\t\t}\r\n\t\t\t\tLoginDao loginDao = new LoginDao();\r\n\t\t\t\tif(loginDao.changePass(Login.getUser().getId(), oldPass, newPass)) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"密码修改成功,请重新登陆!\", \"提示消息\",JOptionPane.INFORMATION_MESSAGE , new ImageIcon(new Images().getYes2()));\r\n\t\t\t\t\tdispose();\r\n\t\t\t\t\tLogin.reLogin();\r\n\t\t\t\t}else {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"密码修改失败!\", \"提示消息\",JOptionPane.ERROR_MESSAGE , new ImageIcon(new Images().getError2()));\r\n\t\t\t\t}\r\n\t\t\t}", "public void onSaveClicked(View view) {\n if (isAllInputValid()) {\n saveValues();\n showToast(R.string.toast_changes_applied);\n finish();\n }\n else {\n new AlertDialog.Builder(this).\n setTitle(R.string.dialog_error_title).\n setMessage(R.string.dialog_error_msg).\n setPositiveButton(R.string.dialog_error_pos, (dialog, which) -> {}).\n create().show();\n }\n }", "@FXML\r\n\tprivate void saveEmployee(ActionEvent event) {\r\n\t\tif (validateFields()) {\r\n\t\t\tEmployee e;\r\n\t\t\tif (newEmployee) {\r\n\t\t\t\te = new Employee();\r\n\t\t\t\tlistaStaff.getItems().add(e);\r\n\t\t\t} else {\r\n\t\t\t\te = listaStaff.getSelectionModel().getSelectedItem();\r\n\t\t\t}\r\n\t\t\te.setUsername(txUsuario.getText());\r\n\t\t\te.setPassword(txPassword.getText());\r\n\t\t\tif (checkAdmin.isSelected())\r\n\t\t\t\te.setIsAdmin(1);\r\n\t\t\telse\r\n\t\t\t\te.setIsAdmin(0);\r\n\t\t\tif (checkTPV.isSelected())\r\n\t\t\t\te.setTpvPrivilege(1);\r\n\t\t\telse\r\n\t\t\t\te.setTpvPrivilege(0);\r\n\t\t\tif (newEmployee) {\r\n\t\t\t\tservice.saveEmployee(e);\r\n\t\t\t\tnewEmployee = false;\r\n\t\t\t} else\r\n\t\t\t\tservice.updateEmployee(e);\r\n\t\t\tbtGuardar.setDisable(true);\r\n\t\t\tbtEditar.setDisable(false);\r\n\t\t\tconmuteFields();\r\n\t\t\tupdateList();\r\n\t\t}\r\n\t}", "public void onClick(View v) {\n switch (v.getId()) {\n case R.id.button_updateUser:\n //update the user values then update it in the database\n currentUser.updateUserValues(textViewName.getText().toString(), textViewEmail.getText().toString(), textViewPhone.getText().toString(), textViewRent.getText().toString(), textViewChores.getText().toString());\n databaseHelper.updateUser(currentUser);\n String message = \"\" + textViewChores.getText().toString();\n Log.d(\"test: \", message);\n Intent userListIntent = new Intent(EditChosenUserActivity.this, UsersListActivity.class);\n userListIntent.putExtra(\"EMAIL\", masterEmail);\n //editUserIntent.putExtra(\"UserName\", listUsers.get(passingInt).getName());\n finish();\n startActivity(userListIntent);\n\n //Log.d(\"test: \", \"saved changes clicked\");\n\n //case R.id.button_redirectUsersList:\n\n }\n }", "private void onClickSaveButton() {\n // Validate and save form\n if (mDynamicForm.validate()) {\n triggerSubmitForm(mDynamicForm.getForm().getAction(), mDynamicForm.save());\n }\n }", "private void saveUserDetails() {\n UserModel userModel = new UserModel();\n userModel.setUserName(editUserName.getText().toString());\n userModel.setPassword(editPassword.getText().toString());\n\n /* if (db.insertUserDetils(userModel)) {\n //Toast.makeText(LoginActivity.this, \"Successfully save\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(this, \"Data not Saved\", Toast.LENGTH_SHORT).show();\n }*/\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString id = UserID.getText();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tint check = db.idcheck(id);\r\n\r\n\t\t\t\t\tif (check == 1) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(j, \"삭제되었습니다.\");\r\n\t\t\t\t\t\tdb.delete(id);\r\n\t\t\t\t\t\t로그인창 login = new 로그인창();\r\n\t\t\t\t\t\tlogin.loginpage();\r\n\t\t\t\t\t\tj.dispose();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(j, \"해당 아이디가 존재하지않습니다.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (!(API.isInternetOn(Register.this))) {\r\n\t\t\t\t\tshowAlert(\"Internet not avialble.\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tprogressdialog.setMessage(\"Please wait...\");\r\n\t\t\t\t\tprogressdialog.show();\r\n\t\t\t\t\t// Force user to fill up the form\r\n\t\t\t\t\tif (username.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| email.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| password.getText().toString().equals(\"\")\r\n\t\t\t\t\t\t\t|| verifyPassword.getText().toString().equals(\"\")) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Please complete the sign up form.\");\r\n\t\t\t\t\t} else if (!(isValidEmail(email.getText().toString()))) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Please enter valid email id.\");\r\n\t\t\t\t\t} else if (!(password.getText().toString()\r\n\t\t\t\t\t\t\t.equals(verifyPassword.getText().toString()))) {\r\n\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\tshowAlert(\"Password did not matched\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Save new user data into Parse.com Data Storage\r\n\t\t\t\t\t\tParseUser user = new ParseUser();\r\n\t\t\t\t\t\tuser.setUsername(username.getText().toString());\r\n\t\t\t\t\t\tuser.setPassword(password.getText().toString());\r\n\t\t\t\t\t\tuser.setEmail(email.getText().toString());\r\n\t\t\t\t\t\tuser.signUpInBackground(new SignUpCallback() {\r\n\t\t\t\t\t\t\tpublic void done(ParseException e) {\r\n\t\t\t\t\t\t\t\tif (e == null) {\r\n\t\t\t\t\t\t\t\t\tAllowUserToLogin(username.getText()\r\n\t\t\t\t\t\t\t\t\t\t\t.toString(), password.getText()\r\n\t\t\t\t\t\t\t\t\t\t\t.toString());\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tprogressdialog.dismiss();\r\n\t\t\t\t\t\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\t\t\t\t\t\"Sign up Error\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t\t\t\t\t\t\t.show();\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}", "@Override\n public void onClick(View v) {\n firstNameText = capitalizeFirstLetter(firstNameET.getText().toString());\n lastNameText = capitalizeFirstLetter(lastNameET.getText().toString());\n emailText = (emailET.getText().toString()).toLowerCase();\n passwordText = passwordET.getText().toString();\n reEnterPasswordText = reEnterPasswordET.getText().toString();\n\n // Using the user-inputted information to register the user via this method\n registerUser(firstNameText, lastNameText, emailText, passwordText, reEnterPasswordText);\n }", "@Override\r\n\tprotected void onBoSave() throws Exception {\n\t\t\r\n\t\t\r\n\t\tsuper.onBoSave();\r\n\t\t// 修改按钮属性\r\n\t\tif(myaddbuttun){\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(true);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t\t.setEnabled(true);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t\t.setEnabled(false);\r\n\t\t\tmyaddbuttun=true;\r\n\t\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\t\tgetBillUI().setCardUIState();\r\n\t\t\tsuper.onBoReturn();\r\n\t\t}else{\r\n\t\t\tgetButtonManager().getButton(IBillButton.Add).setEnabled(false);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Con)\r\n\t\t\t\t\t.setEnabled(false);\r\n\t\t\tgetButtonManager().getButton(\r\n\t\t\t\t\tnc.ui.wds.w8006080202.tcButtun.ITcButtun.Pp)\r\n\t\t\t\t\t.setEnabled(true);\r\n\t\t\tmyaddbuttun=false;\r\n\t\t\t// 转到卡片面,实现按钮的属性转换\r\n\t\t\tgetBillUI().setCardUIState();\r\n\t\t\tsuper.onBoReturn();\r\n\t\t}\r\n\t}", "@FXML\n public void save(ActionEvent event) throws SQLException {\n current.parseRole(roleTextBox.getText());\n \n current.setName(comboFkp.getValue());\n current.setTitle(comboFkm.getValue());\n \n if(inserting) {\n System.out.println(\"Inserting \" + current.getTitle() + \" \" + current.getName());\n // Precisa inserir dois booleanos no final, um para ator e um para diretor\n dh.insertPersonMidia(current.getTitle(), current.getName(), current.getActor(), current.getDirector());\n }\n\n closeWindow();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tupdatePwd_click(e);\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n trasferisci_utente();\n\n // controlla se tutti i dati sono inseriti\n if (checkInput())\n {\n creaUser();\n NOME = username.getText().toString();\n CHIAVE = password.getText().toString();\n\n // controlla se l'utente USER con i dati inseriti negli edit_text è gia presente\n if (checkUser(persone, NOME, CHIAVE)) {\n\n errore_utente.setVisibility(View.GONE);\n\n // impedisce a due utenti di avere lo stesso username\n if(checkUsername(persone, NOME)) {\n\n errore_duplicato_username.setVisibility(View.GONE);\n\n persone.add(user);\n\n Intent showResult = new Intent(Registration.this, MainActivity.class);\n showResult.putExtra(PERSONA_PATH, persone);\n //showResult.putExtra(UTENTE_PATH, user);\n startActivity(showResult);\n } else {\n errore_duplicato_username.setVisibility(View.VISIBLE);\n }\n } else {\n errore_utente.setVisibility(View.VISIBLE);\n }\n }\n }", "@Override\n public void onClick(ClickEvent event) {\n String mobileNr = content.getLoginView().getMobilenrTxtBox().getText();\n String password = content.getLoginView().getPasswordTxtBox().getText();\n\n // RPC authenticating user method\n motionCBSTestService.authorizeUser(mobileNr, password, new AsyncCallback<User>() {\n\n @Override\n public void onFailure(Throwable caught) {\n Window.alert(\"Der skete en fejl\");\n }\n\n @Override\n public void onSuccess(User user) {\n\n // Failed to match input with User in database\n if (user == null) {\n Window.alert(\"Wrong password or mobile number!\");\n } else if (user.getIsApproved() != true) {\n Window.alert(\"User not approved!\");\n } else\n\n\n\n // Here we check the type and if they are type 1 we go to admin view and the other way around\n if (user.getType() == 1) {\n adminController.loadUser(user);\n content.changeView(content.getMainAdminView());\n } else if (user.getType() == 2) {\n userController.loadUser(user);\n content.changeView(content.getMainUserView());\n }\n\n // Clearing the text fields (mobileNr & password) from the login screen\n content.getLoginView().clearTextBoxFields();\n }\n });\n }", "public synchronized void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==loginButton){\n\t\t\tString username = userText.getText().trim().replaceAll(\"\\r\",\"\").replaceAll(\"\\n\",\"\").replaceAll(\"\\t\", \"\");\n\t\t\tString secret = new String(passwordText.getPassword());\n\t\t\tSettings.setUsername(username);\n\t\t\tSettings.setSecret(secret);\n\n\t\t\tclientCon.writeMsg(Command.createLogin(username, secret).toJSONString());\n\n\t\t} else if(e.getSource()==registerButton){\n String username = userText.getText().trim().replaceAll(\"\\r\",\"\").replaceAll(\"\\n\",\"\").replaceAll(\"\\t\", \"\");\n String secret = new String(passwordText.getPassword());\n Settings.setUsername(username);\n Settings.setSecret(secret);\n\n clientCon.writeMsg(Command.createRegister(username,secret).toJSONString());\n\n\t\t} else if(e.getSource()==refreshButton){\n\t\t String username = Settings.getUsername();\n\t\t clientCon.writeMsg(Command.createRefreshRequest(username));\n\n } else if(e.getSource()==logoutButton){\n\t\t JSONObject logout = Command.createLogout(Settings.getUsername(), Settings.getSecret());\n\t ClientSkeleton.getInstance().writeMsg(logout.toJSONString());\n\t log.info(\"User is going to log out....\");\n\t\t\tClientSkeleton.getInstance().disconnect();\n\n } else if(e.getSource()==purchaseButton[0]){\n String username = Settings.getUsername();\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n String strDate = dateFormat.format(date);\n clientCon.writeMsg(Command.createBuyTicket(100, username, strDate));\n\n } else if(e.getSource()==refundButton[0]){\n String username = Settings.getUsername();\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n String strDate = dateFormat.format(date);\n clientCon.writeMsg(Command.createRefundTicket(100, username, strDate));\n\n } else if(e.getSource()==purchaseButton[1]){\n String username = Settings.getUsername();\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n String strDate = dateFormat.format(date);\n clientCon.writeMsg(Command.createBuyTicket(200, username, strDate));\n\n } else if(e.getSource()==refundButton[1]){\n String username = Settings.getUsername();\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n String strDate = dateFormat.format(date);\n clientCon.writeMsg(Command.createRefundTicket(200, username, strDate));\n\n } else if(e.getSource()==purchaseButton[2]){\n String username = Settings.getUsername();\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n String strDate = dateFormat.format(date);\n clientCon.writeMsg(Command.createBuyTicket(300, username, strDate));\n\n } else if(e.getSource()==refundButton[2]){\n String username = Settings.getUsername();\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n String strDate = dateFormat.format(date);\n clientCon.writeMsg(Command.createRefundTicket(300, username, strDate));\n\n } else if(e.getSource()==purchaseButton[3]){\n String username = Settings.getUsername();\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n String strDate = dateFormat.format(date);\n clientCon.writeMsg(Command.createBuyTicket(400, username, strDate));\n\n } else if(e.getSource()==refundButton[3]){\n String username = Settings.getUsername();\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n String strDate = dateFormat.format(date);\n clientCon.writeMsg(Command.createRefundTicket(400, username, strDate));\n\n } else if(e.getSource()==returnButton){\n String username = Settings.getUsername();\n clientCon.writeMsg(Command.createRefreshRequest(username));\n }\n\n\n }", "public void onClick(View v) {\n String email = newEmail.getText().toString();\n String number = newNumber.getText().toString();\n String password = newPassword.getText().toString();\n String confirmPass = newConfirmPass.getText().toString();\n //String location = newLocation.getText().toString();\n ArrayList<String> newServices = new ArrayList<String>();\n\n for (String key : dynamicCheckBoxes.keySet()) {\n if((dynamicCheckBoxes.get(key)).isChecked()){\n newServices.add(getIDbyName.get(key));\n }\n }\n\n try {\n if(submitChanges(email,number,password,confirmPass,newServices)){\n msgBox_okbuttononly_goto_loggedin(\"Sucesso\", \"Alterações efetuadas com sucesso\");\n }\n else{\n msgBox_okbuttononly_stay(\"Erro\", \"Não foi possível efectuar as alterações. Por favor verifique os campos inseridos\");\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n } catch (TimeoutException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }", "@FXML\n private void changeButton(ActionEvent event) {\n if(changeBtn.getText().equals(\"Change\")){\n comboJK.setDisable(false);\n beratBadan.setDisable(false);\n tinggiBadan.setDisable(false);\n usia.setDisable(false);\n comboAktivitas.setDisable(false);\n changeBtn.setText(\"SAVE\");\n }else{\n String usiaUser = usia.getText();\n String beratBadanUser = beratBadan.getText();\n String tinggiBadanUser = tinggiBadan.getText();\n String jenisKelaminUser = comboJK.getValue();\n String tingkatAktivitasUser = comboAktivitas.getValue();\n try{\n String query = \"UPDATE Akun SET JenisKelamin = '\"+jenisKelaminUser+\"', Usia= '\"+usiaUser+\"', BeratBadan= '\"+beratBadanUser+\"', TinggiBadan= '\"+tinggiBadanUser+\"', TingkatAktivitas= '\"+tingkatAktivitasUser+\"' WHERE Username='\"+sessionUsername+\"'\";\n db.dbExecuteUpdate(query);\n JOptionPane.showMessageDialog(null, \"Berhasil Update\");\n this.GetKaloriUser();\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, \"FAILED log\");\n }\n changeBtn.setText(\"Change\");\n getDisableChanger();\n }\n }", "public void save() throws Exception {\n\t\tgetControl(\"saveButton\").click();\n\t\tVoodooUtils.pause(3000);\n\t}", "public void saveChanges(ActionEvent actionEvent) throws SQLException, IOException {\n if (validEditInput()) {\n teamCombobox.getValue().setTeamName(teamNameEditField.getText());\n teamCombobox.getValue().setCity(chooseCityBox.getValue().toString());\n teamCombobox.getValue().setAbbrevation(abbrevationEditField.getText());\n teamCombobox.getValue().setLeagueName(chooseLeagueBox.getValue().toString());\n if (logoChangeImage != null) {\n teamCombobox.getValue().setTeamLogo(logoChangeImage);\n teamPhoto.setImage(teamCombobox.getValue().getTeamLogo().getImage());\n }\n DatabaseManager.updateTeam(teamCombobox.getValue(), user.getDatabaseConnection(), editTeamLogoFile);\n displayMessage(messagePane,\"Changes are saved\", false);\n\n teamCombobox.getItems().clear();\n teamCombobox.getItems().addAll(user.getUserTeams());\n teamCombobox.getSelectionModel().selectFirst();\n\n closeButtonPushed(actionEvent);\n }\n }", "@Override\r\n public void handle(ActionEvent event) {\n String user = userTextField.getText();\r\n String password = passwordField.getText();\r\n\r\n // if user and password is stored in the databse\r\n if (isLoginValid(user, password)) {\r\n // close the current window\r\n primaryStage.close();\r\n // update properties file for case 2\r\n if (rememberMeCheckBox.isSelected()) {\r\n updateRememberUserDatabase(user, password);\r\n }\r\n // update properties file for case 2\r\n // show login screen\r\n showLoginScreen();\r\n } else if (user.equals(\"admin\") && (password.equals(\"admin\"))) {\r\n // else if handles a spefical case for administrator\r\n primaryStage.close();\r\n if (rememberMeCheckBox.isSelected()) {\r\n updateRememberUserDatabase(user, password);\r\n }\r\n showDatabaseScreen();\r\n audio.stop();\r\n } else {\r\n // Show alert for incorrect username/password\r\n JavaFXUtils.showAlert(Alert.AlertType.ERROR, grid.getScene().getWindow(), \"Form ERROR!\", \"Incorrect username/password\");\r\n }\r\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==this.btnNewButton)\n\t\t{\n\t\t\tString user = this.textField.getText();\n\t\t\tString oldPwd = new String(this.passwordField.getPassword());\n\t\t\tString newPwd = new String(this.passwordField_1.getPassword());\n\t\t\tString newPwd2 = new String(this.passwordField_2.getPassword());\n\t\t\ttry {\n\t\t\t\tBeanyonghuxinxi.currentLoginUser=yonghuUttil.yonghuManager.changePwd(user, oldPwd, newPwd, newPwd2);\n\t\t\t}catch (BaseException e1) {\n\t\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage(), \"´يخَ\",JOptionPane.ERROR_MESSAGE);\n\t\t\t\treturn;\n\t\t\t\t}\n\t\t\tthis.setVisible(false);\n\t\t}\n\t\telse if(e.getSource() == this.button)\n\t\t{\n\t\t\tFrmyonghujiemian wewe = new Frmyonghujiemian();\n\t\t\twewe.setVisible(true);\n\t\t\tthis.setVisible(false);\n\t\t}\n\t}", "@FXML\r\n private void handleSaveBtn(ActionEvent event) {\r\n\r\n LocalDate date_of_birth = dob.getValue(); //get date of birth value from calender and convert it to local date\r\n LocalDate reg_date = registrationDate.getValue(); //get registration date from calendar and convert it to local date\r\n Connection connection = DBConnection.Connect();//creates and instance of the DBConnection class and invokes the Connect Method\r\n String sql;\r\n PreparedStatement pst;\r\n //Beginning of if-else block\r\n if (userTypeComboBox.getValue().equals(\"Admin\")) {\r\n sql = \"INSERT INTO admin (admin_name, admin_gender, admin_DOB, admin_reg_date, admin_phn, profile_pic, admin_login, admin_password)\"\r\n + \" VALUES (?, ?, ?, ?, ?, ?, ?, ?)\";\r\n try {\r\n fis = new FileInputStream(f);\r\n pst = connection.prepareStatement(sql);\r\n pst.setString(1, userNameTextField.getText().toUpperCase());\r\n pst.setString(2, radioLabel.getText().toUpperCase());\r\n pst.setString(3, date_of_birth.toString());\r\n pst.setString(4, reg_date.toString());\r\n pst.setString(5, phoneNumberTextField.getText());\r\n pst.setBinaryStream(6, (InputStream) fis, (int) f.length());\r\n pst.setString(7, loginNameTextField.getText());\r\n pst.setString(8, password1Field.getText());\r\n\r\n int i = pst.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW ADMIN RECORD ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n\r\n } catch (FileNotFoundException ex) {\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setContentText(\"FILE UPLOAD ERROR\");\r\n alert.showAndWait();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else if (userTypeComboBox.getValue().equals(\"Doctor\")) {\r\n\r\n sql = \"INSERT INTO doctor(\"\r\n + \"doctor_name,\"\r\n + \" doctor_address,\"\r\n + \"doctor_phone_number,\"\r\n + \"doctor_gender,\"\r\n + \"doctor_pic,\"\r\n + \"doctor_DOB, \"\r\n + \"specialty, \"\r\n + \"doctor_reg_date, \"\r\n + \"doctor_login, \"\r\n + \"doctor_password)\"\r\n + \"VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n try {\r\n fis = new FileInputStream(f);\r\n PreparedStatement statement = connection.prepareStatement(sql);\r\n statement.setString(1, userNameTextField.getText().toUpperCase());\r\n statement.setString(2, addressTextField.getText());\r\n statement.setString(3, phoneNumberTextField.getText());\r\n statement.setString(4, radioLabel.getText().toUpperCase());\r\n statement.setBinaryStream(5, (InputStream) fis, (int) f.length());\r\n statement.setString(6, date_of_birth.toString());\r\n statement.setString(7, specialtyCmbBox.getValue());\r\n statement.setString(8, reg_date.toString());\r\n statement.setString(9, loginNameTextField.getText());\r\n statement.setString(10, password1Field.getText());\r\n int i = statement.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW DOCTOR RECORDED SUCCESSFULLY ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"COULDN'T PASS FILE TO INPUT STREAM\");\r\n }\r\n\r\n } else if (userTypeComboBox.getValue().equals(\"Receptionist\")) {\r\n sql = \"INSERT INTO receptionist (receptionist_name, receptionist_gender, receptionist_address, receptionist_phn, receptionist_reg_date, receptionist_DOB, profile_pic, receptionist_login, receptionist_password)\"\r\n + \" VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n try {\r\n fis = new FileInputStream(f);\r\n pst = connection.prepareStatement(sql);\r\n pst.setString(1, userNameTextField.getText().toUpperCase());\r\n pst.setString(2, radioLabel.getText().toUpperCase());\r\n pst.setString(3, addressTextField.getText());\r\n pst.setString(4, phoneNumberTextField.getText());\r\n pst.setString(5, reg_date.toString());\r\n pst.setString(6, date_of_birth.toString());\r\n pst.setBinaryStream(7, (InputStream) fis, (int) f.length());\r\n pst.setString(8, loginNameTextField.getText());\r\n pst.setString(9, password1Field.getText());\r\n\r\n int i = pst.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW RECEPTIONIST RECORD SUCCESSFULLY ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else if (userTypeComboBox.getValue().equals(\"Pharmacist\")) {\r\n sql = \"INSERT INTO pharmacist(pharmacist_name, pharnacist_gender, pharmacist_address, pharnacist_phn, \"\r\n + \"pharnacist_DOB, pharmacist_reg_date, profile_pic, pharnacist_login, pharmacist_password)\"\r\n + \"VALUES (?,?,?,?,?,?,?,?,?)\";\r\n\r\n try {\r\n fis = new FileInputStream(f);\r\n pst = connection.prepareStatement(sql);\r\n\r\n pst = connection.prepareStatement(sql);\r\n pst.setString(1, userNameTextField.getText().toUpperCase());\r\n pst.setString(2, radioLabel.getText().toUpperCase());\r\n pst.setString(3, addressTextField.getText());\r\n pst.setString(4, phoneNumberTextField.getText());\r\n pst.setString(5, date_of_birth.toString());\r\n pst.setString(6, reg_date.toString());\r\n pst.setBinaryStream(7, (InputStream) fis, (int) f.length());\r\n pst.setString(8, loginNameTextField.getText());\r\n pst.setString(9, password1Field.getText());\r\n\r\n int i = pst.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW PHARMACIST RECORD SUCCESSFULLY ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else if (userTypeComboBox.getValue().equals(\"Biologist\")) { //insert into biologist table depending on the value of the userType comboBox\r\n sql = \"INSERT INTO biologist (biologist_name, biologist_gender, biologist_address, \"\r\n + \"biologist_DOB, biologist_reg_date, biologist_phn, profile_pic, biologist_login, biologist_password) \"\r\n + \"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)\";\r\n try {\r\n fis = new FileInputStream(f);\r\n pst = connection.prepareStatement(sql);\r\n\r\n pst = connection.prepareStatement(sql);\r\n pst.setString(1, userNameTextField.getText().toUpperCase());\r\n pst.setString(2, radioLabel.getText().toUpperCase());\r\n pst.setString(3, addressTextField.getText());\r\n pst.setString(4, date_of_birth.toString());\r\n pst.setString(5, reg_date.toString());\r\n pst.setString(6, phoneNumberTextField.getText());\r\n pst.setBinaryStream(7, (InputStream) fis, (int) f.length());\r\n pst.setString(8, loginNameTextField.getText());\r\n pst.setString(9, password1Field.getText());\r\n\r\n int i = pst.executeUpdate();\r\n if (i != 0) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setContentText(\"NEW BIOLOGIST RECORD SUCCESSFULLY ADDED TO DATABASE\");\r\n alert.showAndWait();\r\n }\r\n } catch (FileNotFoundException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ManageUsersController.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n } else {\r\n Alert alert = new Alert(Alert.AlertType.WARNING);\r\n alert.setContentText(\"INVALID USER TYPE\\nCONSULT SYSTEM MANNUAL\");\r\n alert.showAndWait();\r\n }\r\n\r\n }", "public void onRegisterPressed(View v) {\n String username = ((EditText) findViewById(R.id.usernameNew)).getText().toString();\n String password = ((EditText) findViewById(R.id.passwordNew)).getText().toString();\n String checkPassword = ((EditText) findViewById(R.id.passwordNew2)).getText().toString();\n Register register = new Register(username, password, checkPassword);\n TextView passwordCheck = findViewById(R.id.passwordCheck);\n TextView errorUsername = findViewById(R.id.errorUsername);\n\n if(!register.assertPassword()) {\n passwordCheck.setVisibility(View.VISIBLE);\n } else {\n passwordCheck.setVisibility(View.GONE);\n }\n if (!register.assertUsername()) {\n errorUsername.setVisibility(View.VISIBLE);\n } else {\n errorUsername.setVisibility(View.GONE);\n }\n if(register.assertUsername() && register.assertPassword()) {\n User user = new User(username, password, (UserTypes)userTypeSpinner.getSelectedItem());\n\n Toast.makeText(this, \"Account Added\", Toast.LENGTH_SHORT).show();\n\n Persistence.getInstance().write(User.SAVE_FILE, getApplicationContext(), user);\n\n Intent mainIntent = new Intent(this, MainActivity.class);\n mainIntent.putExtra(\"EXTRA_USER_TYPE\", user.getAccountType());\n startActivity(mainIntent);\n\n finish();\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint a;\r\n\t\t\t\t s1= idJt.getText();\r\n\t\t\t\t s2= new String(idPasswordJp.getPassword());\r\n\t\t\t\t s3= userNameJt.getText();\r\n\t\t\t\t s4= nickNameJt.getText();\r\n\t\t\t\t a=checkRegister.checkString(s1,s2,s3,s4,s5);\r\n\t\t\t\tif(a==0) {\r\n\t\t\t\t\tcheckNews_dao cn = new checkNews_dao();\r\n\t\t\t\t\tif(cn.checkId(s1)) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(registerJf, \"账号已存在\");\r\n\t\t\t\t\t\tidJt.setText(\"\");\r\n\t\t\t\t\t\tcn.closeAll();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(cn.checkNickName(s4)) {\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(registerJf, \"昵称已存在\");\r\n\t\t\t\t\t\tnickNameJt.setText(\"\");\r\n\t\t\t\t\t\tcn.closeAll();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tuserNews_dao un=new userNews_dao();\r\n\t\t\t\t\t\tun.insertNews(s1, s2, s3, s4, s5);\r\n\t\t\t\t\t\tun.closeAll();\r\n\t\t\t\t\t\tempty();\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(registerJf, \"注册成功\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(registerJf, \"请把信息输入完整!\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void handleUpdate(ActionEvent event) throws InterruptedException, FileNotFoundException{\r\n \t String result=tempUser.validate(newUser_Manage.getText());\r\n \t if(result.equalsIgnoreCase(\"true\")){\r\n \t\t feedback_Manage.setText(\"Username Already Exist!\");\r\n \t\t Thread.sleep(50);\r\n \t\t feedback_Manage.setText(\"\");\r\n \t\t } else {\r\n \t\t\t feedback_Manage.setText(\"Update Successful!\");\r\n \t\t\t if(newUser_Manage.getText().isEmpty()!=true)\r\n \t\t\t\t currentUser.setUserName(newUser_Manage.getText());\r\n \t\t\t if(newGoal_Manage.getText().isEmpty()!=true)\r\n \t\t\t\t currentUser.setGoal(newGoal_Manage.getText());\r\n \t\t\t Thread.sleep(100);\r\n \t\t\t this.changeView(\"../view/Main.fxml\");\r\n \t\t\t }\r\n \t }", "public void launchUpdate() {\n\n\t\tif (checkRegister() == true && psw.getText() != newpsw.getText()) {\n\t\t\tDatabase.getInstance().updateUser(newpsw.getText(), username.getText());\n\t\t\tstatus.setText(\"Account updated\");\n\t\t} else {\n\t\t\tstatus.setText(\"Password already exist or this account doesn't exist\");\n\t\t}\n\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\tif(e.getActionCommand().equals(\"Update Info\")){\r\n\t\t\tmodel.setEmail(view.getEmailText());\r\n\t\t\tmodel.setPhoneNum(view.getPhoneNumText());\r\n\t\t\tmodel.setAddress(view.getAddressText());\r\n\t\t} else if(e.getActionCommand().equals(\"Change Password\")){\r\n\t\t\t// TODO\r\n\t\t} else if(e.getActionCommand().equals(\"Send/Check Message\")){\r\n\t\t\tview.showMessageArea();\t\t\t\r\n\t\t} else if(e.getActionCommand().equals(\"Back\")){\r\n\t\t\tview.showInfoArea();\r\n\t\t} else if(e.getActionCommand().equals(\"Send Message\")){\r\n\t\t\tfor(int i = 0; i < users.size(); i++){\r\n\t\t\t\tif(users.get(i).getUserType() == 3){\r\n\t\t\t\t\tusers.get(i).setMessage(view.getMessageText());\r\n\t\t\t\t\tusers.get(i).fromUser(view.getUserName());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if(e.getActionCommand().equals(\"Schedule Appointment\")){\r\n\t\t\tString userName = view.getUserName();\r\n\t\t\tint index = -1;\r\n\t\t\tfor(int i = 0; i < users.size(); i++){\r\n\t\t\t\tif(userName.equals(users.get(i).getUserName())){\r\n\t\t\t\t\tindex = i;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(index != -1){\r\n\t\t\t\tusers.get(index).setAppt(view.getDate());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "@FXML\r\n public void registerAction(ActionEvent e) throws IOException {\n String username = registerUsername.getText();\r\n String password = registerPassword.getText();\r\n String email = registerEmail.getText();\r\n try{\r\n //GET CONNECTION\r\n Class.forName(\"com.mysql.jdbc.Driver\");\r\n Connection conn= DBConnect.getConnection();\r\n Statement stmt=conn.createStatement();\r\n //saving data onto database \r\n stmt.executeUpdate(\"INSERT INTO admin VALUES (adminID,'\"+username+\"','\"+password+\"','\"+email+\"')\");\r\n MessagePopup.display(\"Registration Status\", \"Registration Complete!\");\r\n\r\n registerButton.getScene().getWindow().hide();\r\n\r\n Stage register = new Stage();\r\n Parent root = FXMLLoader.load(getClass().getResource(\"Login.fxml\"));\r\n Scene scene = new Scene(root);\r\n register.setTitle(\"Hospital Management System\");\r\n register.setScene(scene);\r\n register.show();\r\n register.setResizable(false);\r\n conn.close();\r\n\r\n }catch(Exception ex){ \r\n System.out.println(ex);\r\n }\r\n\r\n \r\n }", "@Override\n public void onClick(View v) {\n String newPass=et_newPassword.getText().toString().trim();\n String oldPass=et_oldPassword.getText().toString().trim();\n String prefpass=SharedPrefManager.getInstance(getApplicationContext()).getPass();\n if(newPass.equals(\"\")||oldPass.equals(\"\"))\n {\n Toast.makeText(AdminHomeActivity.this, \"Enter All Fields\", Toast.LENGTH_SHORT).show();\n }\n else if(!prefpass.equals(oldPass))\n {\n Toast.makeText(AdminHomeActivity.this, \"Incorrect Old Password\", Toast.LENGTH_SHORT).show();\n }\n else\n {\n repo.updatePass(oldPass,newPass,\"Admin\");\n Toast.makeText(AdminHomeActivity.this, \"Password Successfully Changed\", Toast.LENGTH_SHORT).show();\n logout();\n dialog.dismiss();\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent paramActionEvent) {\n\t\t\t\tString username = new String(textFieldtUserName.getText());\n\t\t\t\tString passwd = new String(textFieldPasswd.getPassword());\n\t\t\t\tString vcode = new String(CodeFieldPasswd.getText());\n\t\t\t\tUserAction userAction = new UserAction();\n\n\t\t\t\tif (users == 0) {\n\t\t\t\t\tUser.table = \"teacher\";\n\t\t\t\t} else {\n\t\t\t\t\tUser.table = \"student\";\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tif (username.equals(\"\") || passwd.equals(\"\")/* || vcode.equals(\"\") */) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"用户名、密码、验证码不能为空\", \"错误\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// 验证用户名\n\t\t\t\t\t\tif (!userAction.isExist(User.table, username)) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"用户名错误\", \"错误\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tUser.Username = username;\n\t\t\t\t\t\t\tList<User> userList = userAction.query(User.table, username);\n\t\t\t\t\t\t\t// 验证密码和验证码\n\t\t\t\t\t\t\tfor (User user : userList) {\n\t\t\t\t\t\t\t\tif (user.getPasswd().equals(passwd)/* &&isValidCodeRight() */) {\n\t\t\t\t\t\t\t\t\tframe.setVisible(false);\n\t\t\t\t\t\t\t\t\tif(users==0) {\n\t\t\t\t\t\t\t\t\t\tnew AdminMenuBar(frame);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if(users==1) {\n\t\t\t\t\t\t\t\t\t\tnew StudentMenuBar(frame);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tnew AdminInformation();\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"密码或验证码错误\", \"错误\", JOptionPane.PLAIN_MESSAGE);\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} catch (Exception ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSave();\n\t\t\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnew UserData(Username,true,\"Verification\");\n\t\t\t}", "@Override\n public void onClick(View view) {\n String password = contraseña_antigua.getText().toString();\n String newPassword = contraseña_nueva.getText().toString();\n String repeatPassword=repetir_contraseña_nueva.getText().toString();\n\n // Check if username, password is filled\n\n if(password.trim().length() <= 0) {\n contraseña_antigua.setError(\"Escriba Antigua Contraseña\");\n }else if (newPassword.trim().length() <= 0){\n contraseña_nueva.setError(\"Escriba Nueva Contraseña\");\n\n }else if (repeatPassword.trim().length() <= 0){\n repetir_contraseña_nueva.setError(\"Repita La Nueva Contraseña\");\n }else if (!newPassword.equals(repeatPassword)){\n repetir_contraseña_nueva.setError(\"No Coincide La Nueva Contraseña\");\n }\n else {\n Cursor cursor;\n\n database.open();\n cursor=database.getUserByName(sessionManager.getUserDetails().get(\"name\"));\n if(!password.equals(cursor.getString(3))){\n contraseña_antigua.setError(\"Contraseña Incorrecta\");\n }\n else{\n database.updateUser(cursor.getLong(0),cursor.getString(1),cursor.getString(2),newPassword,cursor.getString(4));\n Toast.makeText(getApplicationContext(),\"Se ha actualizado la contraseña correctamente\",Toast.LENGTH_LONG).show();\n finish();\n }\n database.close();\n\n }\n\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif(arg0.getActionCommand().equals(\"Login\")){\r\n\t\t\tif(UserNamePane.isEnabled()){\r\n\t\t\tUserNamePane.setEnabled(false);\r\n\t\t\tUserNamePane.setVisible(false);\r\n\t\t\tlblTips.setText(\"TIPS:Login\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t if(tryLogin())\r\n\t\t\t dlg.dispose();\r\n\t\t\t else{\r\n\t\t\t\t lblTips.setText(\"Login Error\");\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(arg0.getActionCommand().equals(\"Cancel\")){\r\n\t\t\t//serverinfo.port=-1;\r\n\t\t\t//serverinfo.OK=true;\r\n\t\t\tdlg.dispose();\r\n\t\t}\r\n\t\telse if(arg0.getActionCommand().equals(\"Register\")){\r\n\t\t\tif(UserNamePane.isEnabled()==false){\r\n\t\t\tUserNamePane.setEnabled(true);\r\n\t\t\tUserNamePane.setVisible(true);\r\n\t\t\tlblTips.setText(\"TIPS:Register\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(tryRegister()==false){\r\n\t\t\t\t\tUserNameText.setText(\"\");\r\n\t\t\t\t\tUserCodeText.setText(\"\");\r\n\t\t\t\t\tUserIDText.setText(\"\");\r\n\t\t\t\t\tlblTips.setText(\"Register error\");\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tlblTips.setText(\"Register successful->please try login\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void saveUserInformation() {\n name.setText(nameInput.getText().toString());\n\n if (name.getText().toString().isEmpty()) {\n name.setError(\"Name required\");\n name.requestFocus();\n return;\n }\n\n FirebaseUser user = mAuth.getCurrentUser();\n if (user != null) {\n if (isBname()) {\n updateName(user);\n }\n if (isBtitle()) {\n updateTitle(user);\n }\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tvista.FormInsertarUsuario formInsertarUser = new FormInsertarUsuario();\r\n\t\t\t\tformInsertarUser.main();\r\n\t\t\t}", "@Override\n\tpublic void execute() throws Exception {\n\t\tSystem.out.println(\" The generated values here===\"+getView().getValues());\n\t\tSystem.out.println(\" The User value here===\"+getView().getValue(\"user\"));\n\t\tString userName = getView().getValueString(\"user\");\n\t\tif(Is.emptyString(userName)){\n\t\t\taddWarning(\"Enter Your Username \", null);\n\t\t\treturn;\n\t\t}\n\t\tUser user = User.find(userName);\n\t\tif(user==null){\n\t\t\taddError(\"Username not found\", null);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString password = RandomStringUtils.randomAlphanumeric(15);\n\t\tuser.setPassword(password);\n\t\tuser.setFirstLogin(false);\n\t\t\n\t\tSystem.out.println(\" The New password ==\"+ password);\n\t\tXPersistence.getManager().merge(user);\n\t\tSystemWideSetup.sendMail( user.getEmail(), \"User Credentials\", \" Your New Password Generated is: \" + password);\t\n\t\taddMessage(\"Your New Password Has been forwarded to your Mail \", null);\n\t}", "@Override\n\tpublic String userInfoSave(Map<String, Object> reqs,\n\t\t\tMap<String, Object> conds) {\n\t\t String result = \"success\";\n\t try {\n\t \tjoaSimpleDao.update(\"tp_users\", reqs, conds);\n\t } catch(Exception exception) {\n\t \texception.printStackTrace();\n\t \tresult = \"failed\";\n\t }\n\t return result;\n\t}", "private void saveData() {\n try {\n Student student = new Student(firstName.getText(), lastName.getText(),\n form.getText(), stream.getText(), birth.getText(),\n gender.getText(), Integer.parseInt(admission.getText()),\n Integer.parseInt(age.getText()));\n\n\n if (action.equalsIgnoreCase(\"new\") && !assist.checkIfNull(student)) {\n\n dao.insertNew(student);\n JOptionPane.showMessageDialog(null, \"Student saved !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n\n } else if (action.equalsIgnoreCase(\"update\") && !assist.checkIfNull(student)) {\n dao.updateStudent(student, getSelected());\n JOptionPane.showMessageDialog(null, \"Student Updated !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n }\n\n prepareTable();\n prepareHistory();\n buttonSave.setVisible(false);\n admission.setEditable(true);\n }catch (Exception e)\n {}\n }", "public void actionPerformed(ActionEvent e)\r\n\t\t\t{\n\t\t\t\temailTextBox.setText(emailTextBox.getText().trim());\r\n\t\t\t\tpasswordTextBox.setText(new String(passwordTextBox.getPassword()).trim());\r\n\t\t\t\t\r\n\t\t\t\tloginButton.setEnabled(false);\r\n\t\t\t\temailTextBox.setEnabled(false);\r\n\t\t\t\tpasswordTextBox.setEnabled(false);\r\n\t\t\t\t\r\n\t\t\t\t// check the login credentials\r\n\t\t\t\tif(loginModule.login(emailTextBox.getText(), new String(passwordTextBox.getPassword())))\r\n\t\t\t\t{\r\n\t\t\t\t\t// correct credentials and authentication\r\n\t\t\t\t\terrorLabel.setVisible(false);\r\n\t\t\t\t\t\r\n\t\t\t\t\t// load up the Room Viewer window\r\n\t\t\t\t\tif(!loginModule.getUsername().trim().equals(\"\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// set basic properties based upon the login result\r\n\t\t\t\t\t\troomViewerUI.setAvatarBasicData(new AStarCharacterBasicData(loginModule.getUsername(), emailTextBox.getText(), loginModule.getGender(), loginModule.getContentRating(), loginModule.getCredits()));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// close the login window\r\n\t\t\t\t\tloginLoadRoomViewerUI();\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// incorrect credentials\r\n\t\t\t\t\terrorLabel.setText(loginModule.getErrorMessage());\r\n\t\t\t\t\terrorLabel.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t\tloginButton.setEnabled(true);\r\n\t\t\t\t\temailTextBox.setEnabled(true);\r\n\t\t\t\t\tpasswordTextBox.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t}" ]
[ "0.7389384", "0.70748127", "0.6852386", "0.6837295", "0.67081517", "0.6685014", "0.6639619", "0.66011304", "0.6581822", "0.65281004", "0.65261406", "0.6524666", "0.64754915", "0.64425397", "0.6434861", "0.6431064", "0.64259315", "0.64243907", "0.6354025", "0.6351195", "0.6330991", "0.63262266", "0.63121986", "0.6310027", "0.6300661", "0.62491244", "0.62469524", "0.6244295", "0.62334424", "0.62166595", "0.62007976", "0.61923087", "0.6187947", "0.61848855", "0.61837685", "0.61828625", "0.6170227", "0.6163952", "0.6156273", "0.61253494", "0.6118684", "0.6117349", "0.61050946", "0.6099062", "0.60880816", "0.6082985", "0.60811204", "0.6075758", "0.606888", "0.606682", "0.6066404", "0.60492325", "0.6046394", "0.6043295", "0.6034031", "0.6020961", "0.60163194", "0.6015565", "0.601222", "0.6011845", "0.6007988", "0.6006787", "0.5995274", "0.5981219", "0.5979936", "0.59776527", "0.5976523", "0.5975298", "0.5974065", "0.5962132", "0.59606737", "0.59509623", "0.59486777", "0.59485555", "0.5947239", "0.59468895", "0.5939444", "0.59385747", "0.59380263", "0.5937009", "0.5936038", "0.59344596", "0.5931317", "0.5930757", "0.59279484", "0.592184", "0.5919442", "0.59189934", "0.5914707", "0.5913375", "0.59121126", "0.58991396", "0.58953196", "0.58887917", "0.5888722", "0.5886571", "0.58855665", "0.58828205", "0.58756036", "0.58696985" ]
0.60873455
45
Method to make sure that the solveMaze method of PathFinder has an appropriate runtime (no more than 10 seconds for any maze an 100X100 maze will be the largest size that needs to fit this time constraint).
public static void main(String[] args) { long startTime, stopTime; startTime = System.nanoTime(); PathFinder.solveMaze("tinyMaze.txt", "tinyMazeOutput.txt"); stopTime = System.nanoTime(); System.out.println("Run-time for tinyMaze.txt: " + (stopTime - startTime)/(Math.pow(10.0, 9)) + " seconds"); startTime = System.nanoTime(); // test on 100X100 maze -- largest size that needs to fit within the time constraint PathFinder.solveMaze("randomMaze.txt", "randomMazeOutput.txt"); stopTime = System.nanoTime(); System.out.println("Run-time for randomMaze.txt: " + (stopTime - startTime)/(Math.pow(10.0, 9)) + " seconds"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void solveMaze() throws MazeException {\n\n long startTime = System.currentTimeMillis();\n List<Maze.Room> solution = path();\n long endTime = System.currentTimeMillis();\n\n double timeToSolve = (endTime - startTime) / 1000.0;\n\n setSolution(Optional.<List<Maze.Room>>of(solution));\n setTimeToSolve(Optional.<Double>of(timeToSolve));\n setSolved(true);\n }", "@Test(expected = Exception.class)\n public void testMazeSizeMismatch() throws Exception {\n shortestPath = MazeSolver.pStar(smallMaze, 20);\n }", "@Override\r\n\tpublic void solveMaze(String[] args, Maze3d maze) {\r\n\t\tthreadpool.execute(new Runnable() {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tSearchable<Position> s = new Maze3dDomain(maze);\r\n\t\t\t\tif(args.length>=3 && args.length<5)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(args[2].equals(\"BFS\")==true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tBFS<Position> solve = new BFS<Position>(new StateCostComparator<Position>());\r\n\t\t\t\t\t\tcontroller.setSolution(solve.search(s).getSol(),args[1]);\r\n\t\t\t\t\t\tcontroller.printStr(\"solution for \" +args[1]+ \" is ready\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tcontroller.printStr(\"Algorithm is not exist\");\r\n\t\t\t\t}\r\n\t\t\t\telse if(args.length>=5)\r\n\t\t\t\t{\r\n\t\t\t\t\tif((args[2]+\" \"+args[3]+\" \"+args[4]).equals(\"Astar Air Distance\")==true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tBFS<Position> solve = new Astar<Position>(new StateCostComparator<Position>(),new MazeAirDistance(s));\r\n\t\t\t\t\t\tcontroller.setSolution(solve.search(s).getSol(),args[1]);\r\n\t\t\t\t\t\tcontroller.printStr(\"solution for \" +args[1]+ \" is ready\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if((args[2]+\" \"+args[3]+\" \"+args[4]).equals(\"Astar Manhattan Distance\")==true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tBFS<Position> solve = new Astar<Position>(new StateCostComparator<Position>(),new MazeManhattanDistance(s));\r\n\t\t\t\t\t\tcontroller.setSolution(solve.search(s).getSol(),args[1]);\r\n\t\t\t\t\t\tcontroller.printStr(\"solution for \" +args[1]+ \" is ready\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tcontroller.printStr(\"Algorithm is not exist\");\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tcontroller.printStr(\"Algorithm is not exist\");\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private static void testAlgorithmOptimality() {\n AlgoFunction testAlgo = SG16Algorithm::new;\n\n //printSeed = false; // keep this commented out.\n Random seedRand = new Random(1241);\n int initial = seedRand.nextInt();\n for (int i=0; i<50000000; i++) {\n int sizeX = seedRand.nextInt(150) + 5;\n int sizeY = seedRand.nextInt(150) + 5;\n int seed = i+initial;\n int ratio = seedRand.nextInt(50) + 5;\n \n int max = (sizeX+1)*(sizeY+1);\n int p1 = seedRand.nextInt(max);\n int p2 = seedRand.nextInt(max-1);\n if (p2 == p1) {\n p2 = max-1;\n }\n \n int sx = p1%(sizeX+1);\n int sy = p1/(sizeX+1);\n int ex = p2%(sizeX+1);\n int ey = p2/(sizeX+1);\n\n double restPathLength = 0, normalPathLength = 0;\n try {\n GridGraph gridGraph = DefaultGenerator.generateSeededGraphOnly(seed, sizeX, sizeY, ratio);\n for (int iii=0;iii<300;++iii) Utility.generatePath(testAlgo, gridGraph, seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1),seedRand.nextInt(sizeX+1),seedRand.nextInt(sizeY+1));\n int[][] path = Utility.generatePath(testAlgo, gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n restPathLength = Utility.computePathLength(gridGraph, path);\n \n path = Utility.computeOptimalPathOnline(gridGraph, sx, sy, ex, ey);\n path = Utility.removeDuplicatesInPath(path);\n normalPathLength = Utility.computePathLength(gridGraph, path);\n }catch (Exception e) {\n e.printStackTrace();\n System.out.println(\"EXCEPTION OCCURRED!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n }\n \n if (Math.abs(restPathLength - normalPathLength) > 0.000001f) {\n //if ((restPathLength == 0.f) != (normalPathLength == 0.f)) {\n System.out.println(\"============\");\n System.out.println(\"Discrepancy Discovered!\");\n System.out.println(\"Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Start = \" + sx + \",\" + sy + \" End = \" + ex + \",\" + ey);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n System.out.println(restPathLength / normalPathLength);\n System.out.println(\"============\");\n throw new UnsupportedOperationException(\"DISCREPANCY!!\");\n } else {\n if (i%1000 == 999) {\n System.out.println(\"Count: \" + (i+1));\n System.out.println(\"OK: Seed = \" + seed +\" , Ratio = \" + ratio + \" , Size: x=\" + sizeX + \" y=\" + sizeY);\n System.out.println(\"Actual: \" + restPathLength + \" , Expected: \" + normalPathLength);\n }\n }\n }\n }", "@Override\n\t\t\tpublic void run() \n\t\t\t{\n\t\t\t\tif(!(mazeCollection.containsKey(paramArray[0])))\n\t\t\t\t{\n\t\t\t\t\tc.passError(\"Maze doesn't exist\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\t//if solution for this maze exists\n\t\t\t\tif(mazeSolutions.containsKey(mazeCollection.get(paramArray[0])))\n\t\t\t\t{\n\t\t\t\t\tc.passSolve(\"Solution for \"+paramArray[0]+ \" is ready\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\tif(paramArray[1].toString().equals(\"bfs\"))\n\t\t\t\t{\n\t\t\t\t\tMazeAdapter ms=new MazeAdapter(mazeCollection.get(paramArray[0]));\n\t\t\t\t\t\n\t\t\t\t\tSearcher<Position> bfs=new BFS<Position>();\n\t\t\t\t\tSolution<Position> sol=bfs.search(ms);\n\t\t\t\t\t\n\t\t\t\t\t//check if solution for the maze already exists, if so, replace it with the new one\n\t\t\t\t\tif(mazeSolutions.containsKey(mazeCollection.get(paramArray[0]))) {\n\t\t\t\t\t\tmazeSolutions.remove(mazeCollection.get(paramArray[0]));\n\t\t\t\t\t\tmazeSolutions.put(mazeCollection.get(paramArray[0]), sol);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmazeSolutions.put(mazeCollection.get(paramArray[0]), sol);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tc.passSolve(\"Solution for \"+paramArray[0]+ \" is ready\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if(paramArray[1].toString().equals(\"dfs\"))\n\t\t\t\t{\n\t\t\t\t\tMazeAdapter ms=new MazeAdapter(mazeCollection.get(paramArray[0]));\n\t\t\t\t\t\n\t\t\t\t\tSearcher<Position> dfs=new DFS<Position>();\n\t\t\t\t\tSolution<Position> sol=dfs.search(ms);\n\t\t\t\t\t\n\t\t\t\t\t//check if solution for the maze already exists, if so, replace it with the new one\n\t\t\t\t\tif(mazeSolutions.containsKey(mazeCollection.get(paramArray[0]))) {\n\t\t\t\t\t\tmazeSolutions.remove(mazeCollection.get(paramArray[0]));\n\t\t\t\t\t\tmazeSolutions.put(mazeCollection.get(paramArray[0]), sol);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmazeSolutions.put(mazeCollection.get(paramArray[0]), sol);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tc.passSolve(\"Solution for \"+paramArray[0]+ \" is ready\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tc.passError(\"Invalid algorithm\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "@Test\n public void testSolveIrregularBeginAndEndMaze(){\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(1, 0));\n largeMaze.setEnd(Maze.position(3, 4));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(\"<1, 0>\", shortestPath.get(0).getCoordinateString());\n assertEquals(\"<1, 1>\", shortestPath.get(1).getCoordinateString());\n assertEquals(\"<1, 2>\", shortestPath.get(2).getCoordinateString());\n assertEquals(\"<1, 3>\", shortestPath.get(3).getCoordinateString());\n assertEquals(\"<2, 3>\", shortestPath.get(4).getCoordinateString());\n assertEquals(\"<2, 4>\", shortestPath.get(5).getCoordinateString());\n assertEquals(\"<3, 4>\", shortestPath.get(6).getCoordinateString());\n\n assertEquals(7, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "@Test\n public void testLargeSize(){\n assertEquals(25, largeMaze.size());\n }", "private void solve(int x, int y, boolean draw) {\n \t\t// these are the walls of the maze, maze solver should not go beyond\n \t\t// walls\n \t\t// if (x == 0 || y == 0 || x == N + 1 || y == N + 1) {\n \t\t// return;\n \t\t// }\n \n \t\t// if we have already visited this position\n \t\t// or if deep levels of the recursion have found the target\n \t\tif (foundTarget || visited[x][y])\n \t\t\treturn;\n \n \t\t// this position is new, mark it as visited\n \t\tvisited[x][y] = true;\n \n \t\tif (draw) {\n \t\t\t// Draw a blue dot to show we have been here\n \t\t\tStdDraw.setPenColor(StdDraw.BLUE);\n \t\t\tStdDraw.filledCircle(x + 0.5, y + 0.5, 0.25);\n \t\t\tStdDraw.show(SOLVER_SPEED);\n \t\t}\n \n \t\t// if we have reached the maze solve target\n \t\tif (x == target.x && y == target.y) {\n \t\t\tfoundTarget = true;\n \t\t}\n \n \t\t// Try go another place\n \t\tif (!north[x][y])\n \t\t\tsolve(x, y + 1, draw);\n \t\tif (!east[x][y])\n \t\t\tsolve(x + 1, y, draw);\n \t\tif (!south[x][y])\n \t\t\tsolve(x, y - 1, draw);\n \t\tif (!west[x][y])\n \t\t\tsolve(x - 1, y, draw);\n \n \t\tif (foundTarget)\n \t\t\treturn;\n \n \t\tif (draw) {\n \t\t\t// Draw a grey dot to show we have backtracked\n \t\t\tStdDraw.setPenColor(StdDraw.GRAY);\n \t\t\tStdDraw.filledCircle(x + 0.5, y + 0.5, 0.25);\n \t\t\tStdDraw.show(SOLVER_SPEED);\n \t\t}\n \t}", "public long getBestSolutionTime();", "private void createMaze(Tile currentTile) {\n\n while (numberOfCellsVisited < CAST_WIDTH * CAST_HEIGHT) {\n\n // Get coordinates of current tile and set as visited\n int currentX = currentTile.getPosition().getX();\n int currentY = currentTile.getPosition().getY();\n tempMap[currentY][currentX].setVisited(true);\n\n // Begin neighbourhood scan\n ArrayList<Integer> neighbours = new ArrayList<>();\n\n // If a neighbour is not visited and its projected position is within bounds, add it to the list of valid neighbours\n // North neighbour\n if (currentY - 1 >= 0) {\n if (!tempMap[currentY - 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(0);\n }\n //Southern neighbour\n if (currentY + 1 < CAST_HEIGHT) { //y index if increased is not greater than height of the chamber\n if (!tempMap[currentY + 1][currentX].isVisited()) //Northern neighbour unvisited\n neighbours.add(1);\n }\n //Eastern neighbour\n if (currentX + 1 < CAST_WIDTH) { //check edge case\n if (!tempMap[currentY][currentX + 1].isVisited()) { //check if visited\n neighbours.add(2);\n }\n }\n //Western neighbour\n if (currentX - 1 >= 0) {\n if (!tempMap[currentY][currentX - 1].isVisited()) {\n neighbours.add(3);\n }\n }\n if (!neighbours.isEmpty()) {\n\n //generate random number between 0 and 3 for direction\n Random rand = new Random();\n boolean randomizer;\n int myDirection;\n do {\n myDirection = rand.nextInt(4);\n randomizer = neighbours.contains(myDirection);\n } while (!randomizer);\n\n //knock down wall\n switch (myDirection) {\n case 0 -> { // North\n tempMap[currentY][currentX].getPathDirection()[0] = true;\n currentTile = tempMap[currentY - 1][currentX];\n }\n case 1 -> { // South\n tempMap[currentY][currentX].getPathDirection()[1] = true;\n currentTile = tempMap[currentY + 1][currentX];\n }\n case 2 -> { // East\n tempMap[currentY][currentX].getPathDirection()[2] = true;\n currentTile = tempMap[currentY][currentX + 1];\n }\n case 3 -> { // West\n tempMap[currentY][currentX].getPathDirection()[3] = true;\n currentTile = tempMap[currentY][currentX - 1];\n }\n }\n\n mapStack.push(currentTile);\n numberOfCellsVisited++;\n } else {\n currentTile = mapStack.pop(); //backtrack\n }\n }\n\n castMaze(tempMap[0][0], -1);\n }", "@Override\r\n public void solveMaze() {\r\n threadPool.execute(() -> {\r\n maze.setStartPotision(new Position(PlayerPositionRow,PlayerPositionCol));\r\n try {\r\n Client client = new Client(InetAddress.getLocalHost(), 5401, new IClientStrategy() {\r\n public void clientStrategy(InputStream inFromServer, OutputStream outToServer) {\r\n try {\r\n ObjectOutputStream toServer = new ObjectOutputStream(outToServer);\r\n ObjectInputStream fromServer = new ObjectInputStream(inFromServer);\r\n toServer.flush();\r\n toServer.writeObject(maze);\r\n toServer.flush();\r\n s = (Solution) fromServer.readObject();\r\n } catch (Exception var10) {\r\n var10.printStackTrace();\r\n }\r\n\r\n }\r\n });\r\n client.communicateWithServer();\r\n try {\r\n Thread.sleep(5000);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n setChanged();\r\n notifyObservers(\"solve\");\r\n });\r\n }", "public static void main(String[] args)\n {\t\t\n\t\t\tFastTimer timer = new FastTimer();\n\t\t\n\t\t\n\t\t\tGameGrid loaded_grid = new GameGrid(7,7);\n\t\t\t\tboolean isSuccess = loaded_grid.LoadFromFile(\"test.puzzle\");\n\t\t\tif(isSuccess == true){\n\t\t\t\tSystem.out.print(\"Solution initiale\\n\");\n\t\t\t\tloaded_grid.PrintToCmd();\t\t\t\n\t\t\t}\n\t\t\tList<GameMove> found_moves = loaded_grid.GetAvailableMove(); \n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(\"\\n\\nInitial possible moves\\n\");\n\t\t\tfor(GameMove current_move :found_moves){\n\t\t\t\tcurrent_move.PrintOutCmd();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tList<GameMove> solution_move = new LinkedList();\n\t\t\tloaded_grid.ResetMonitoring();\n\t\t\t\n\t\t\ttimer.StartTime();\n\t\t\t\tboolean result = loaded_grid.FindSolution(solution_move);\n\t\t\ttimer.StopTime();\n\t\t\t\n\t\t\tSystem.out.println(\"\\n**************************\");\n\t\t\tSystem.out.println(\"File name : \" + loaded_grid.loaded_file_name+\"\\n\");\n\t\t\tif(result == false){\n\t\t\t\tSystem.out.println(\"Pas de solution\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(\"Solution in \" +solution_move.size() +\" moves\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\tTime : \"+timer.LastDelta + \" millsec\");\n\t\t\tSystem.out.println(\"\tNode visited :\"+loaded_grid.node_visited_cpt);\n\t\t\tSystem.out.println(\"\tDept require :\"+loaded_grid.max_dept);\n\t\t\tSystem.out.println(\"\tDept limitation :\"+loaded_grid.dept_limit);\n\t\t\t\n\t\t\tif(solution_move.size() > 0){\n\t\t\t\tSystem.out.println(\"\\nMove from last to first\\n\");\n\t\t\t\tfor(GameMove current_move :solution_move){\n\t\t\t\t\tcurrent_move.PrintOutCmd();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\\n**************************\\n\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.print(\"Final grid\\n\");\n\t\t\tloaded_grid.PrintToCmd();\n }", "@Test\n public void testSolveGivenMazeTwice() {\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(0, 0));\n largeMaze.setEnd(Maze.position(4, 4));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n shortestPath2 = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(9, shortestPath.size());\n\n assertEquals(shortestPath.size(), shortestPath2.size());\n\n assertEquals(\"<0, 0>\", shortestPath.get(0).getCoordinateString());\n assertEquals(\"<1, 0>\", shortestPath.get(1).getCoordinateString());\n assertEquals(\"<1, 1>\", shortestPath.get(2).getCoordinateString());\n assertEquals(\"<1, 2>\", shortestPath.get(3).getCoordinateString());\n assertEquals(\"<1, 3>\", shortestPath.get(4).getCoordinateString());\n assertEquals(\"<1, 4>\", shortestPath.get(5).getCoordinateString());\n assertEquals(\"<2, 4>\", shortestPath.get(6).getCoordinateString());\n assertEquals(\"<3, 4>\", shortestPath.get(7).getCoordinateString());\n assertEquals(\"<4, 4>\", shortestPath.get(8).getCoordinateString());\n\n assertEquals(\"<0, 0>\", shortestPath2.get(0).getCoordinateString());\n assertEquals(\"<0, 1>\", shortestPath2.get(1).getCoordinateString());\n assertEquals(\"<0, 2>\", shortestPath2.get(2).getCoordinateString());\n assertEquals(\"<0, 3>\", shortestPath2.get(3).getCoordinateString());\n assertEquals(\"<0, 4>\", shortestPath2.get(4).getCoordinateString());\n assertEquals(\"<1, 4>\", shortestPath2.get(5).getCoordinateString());\n assertEquals(\"<2, 4>\", shortestPath2.get(6).getCoordinateString());\n assertEquals(\"<3, 4>\", shortestPath2.get(7).getCoordinateString());\n assertEquals(\"<4, 4>\", shortestPath2.get(8).getCoordinateString());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public boolean solve(final int startRow, final int startCol) {\r\n\r\n // TODO\r\n // validate arguments: ensure position is within maze area\r\n\r\n if(mazeData [startRow][startCol] == WALL) {\r\n throw new IllegalArgumentException(\" we're in a wall buddy\");\r\n }\r\n else if (startRow > mazeData.length-1 || startCol > mazeData.length-1 ){\r\n throw new IllegalArgumentException(\" we're out of bounds \");\r\n }\r\n\r\n\r\n\r\n\r\n\r\n // TODO create local class for row/col positions\r\n class Position {\r\n private int row;\r\n private int col;\r\n\r\n // TODO add instance variables\r\n public Position(final int row, final int col) {\r\n this.row = row;\r\n this.col= col;\r\n }\r\n\r\n\r\n\r\n // TODO toString if desired\r\n public String toString() {\r\n return \"Row: \" + this.row + \"Column: \"+ this.col;\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n // define the stack (work queue)\r\n final var queue = Collections.asLifoQueue(new LinkedList<Position>());\r\n //Queue<Position> queue = new LinkedList<Position>(); // EXTRA CREDIT PART 2\r\n\r\n // put starting position in queue\r\n queue.add(new Position(startRow, startCol));\r\n\r\n\r\n\r\n\r\n\r\n // look for a way out of the maze from the current position\r\n while (!queue.isEmpty()) {\r\n\r\n\r\n final Position pos = queue.remove();\r\n\r\n // if this is a wall, then ignore this position (and skip the remaining steps of the loop body)\r\n if (mazeData [pos.row][pos.col]== WALL){\r\n continue; // jumps to next spot in que , by skipping to next iteration of loops by saying continue\r\n }\r\n\r\n\r\n // otherwise mark this place as visited (drop a breadcrumb)\r\n if (mazeData [pos.row][pos.col]== VISITED){\r\n continue; // jumps to next spot in que , by skipping to next iteration of loops by saying continue\r\n }\r\n else if(mazeData [pos.row][pos.col]== EMPTY){\r\n mazeData [pos.row][pos.col]= VISITED;\r\n }\r\n\r\n // if we're already on the perimeter, then this is a way out and we should return success (true) right away\r\n if (pos.row == 0|| pos.col ==0 || pos.row == mazeData.length-1 || pos.col == mazeData[0].length-1){\r\n mazeData[startRow][startCol] = START;\r\n return true;\r\n }\r\n\r\n queue.add(new Position(pos.row+1,pos.col ));//down\r\n queue.add(new Position(pos.row-1,pos.col ));//up\r\n queue.add(new Position(pos.row,pos.col-1 )); //left\r\n queue.add(new Position(pos.row, pos.col + 1)); //right\r\n\r\n\r\n }//end of while\r\n\r\n\r\n\r\n // mark starting position\r\n mazeData[startRow][startCol] = START;\r\n\r\n // if we've looked everywhere but haven't gotten out, then return failure (false)\r\n return false;\r\n }", "public void solve() {\n// BruteForceSolver bfs = new BruteForceSolver(pointList);\n// bfs.solve(); // prints the best polygon, its area, and time needed\n// System.out.println(\"-------------\");\n\n// StarshapedSolver ss = new StarshapedSolver(pointList);\n// foundPolygons = ss.solve();\n// System.out.println(\"-------------\");\n\n// RandomAddPointHeuristic ra = new RandomAddPointHeuristic(pointList);\n// foundPolygons = ra.solve(750);\n// System.out.println(\"-------------\");\n\n// GreedyAddPointHeuristic ga = new GreedyAddPointHeuristic(pointList,false);\n// foundPolygons = ga.solve(750);\n// System.out.println(\"-------------\");\n\n// long time = 4000;\n// GreedyAddPointHeuristic gaInit = new GreedyAddPointHeuristic(pointList,false);\n// Polygon2D initSolution = gaInit.solve(time*1/4).get(0);\n// System.out.println(initSolution.area);\n// System.out.println(initSolution);\n//\n// SimulatedAnnealing sa = new SimulatedAnnealing(pointList,initSolution,3);\n// foundPolygons.addAll(sa.solve(time-gaInit.timeInit,2,0.005,0.95));\n// System.out.println(sa.maxPolygon);\n// System.out.println(\"-------------\");\n\n// foundPolygons.addAll(findMultiplePolygonsStarshaped(8,0.6));\n\n }", "private static List<Move> pathSolve(Level level){\n\t\tOptimisticMap optMap = new OptimisticMap(level);\n\t\t\n\t\tPoint dst = level.getExitPos();\n\t\t\n\t\t// Open nodes\n\t\tSortedMap<Integer, List<SolveNode>> nodes = new TreeMap<Integer, List<SolveNode>>();\n\t\t\n\t\t// Current costs to arrive to solve nodes\n\t\tint[][][] arrived = new int[level.getMapSize().x][level.getMapSize().y][Move.values().length];\n\t\tfor ( int x = 0 ; x < level.getMapSize().x ; x++ ){\n\t\t\tfor ( int y = 0 ; y < level.getMapSize().y ; y++ ){\n\t\t\t\tfor ( int d = 0 ; d < Move.values().length ; d++ ){\n\t\t\t\t\tarrived[x][y][d] = Integer.MAX_VALUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Create initial nodes\n\t\t{\n\t\t\tPoint box = level.getBoxPos();\n\t\t\tPoint player = level.getPlayerPos();\n\t\t\tfor ( Move dir : Move.values()){\n\t\t\t\tPoint playerDst = dir.nextPosition(box);\n\t\t\t\tif ( level.isClearSafe(playerDst.x, playerDst.y)){\n\t\t\t\t\tList<Move> pathNoDesiredPlayerPosition = pathTo(level, player, box, playerDst);\n\t\t\t\t\tif ( pathNoDesiredPlayerPosition != null ){\n\t\t\t\t\t\tSolveNode node = new SolveNode();\n\t\t\t\t\t\tnode.moves = pathNoDesiredPlayerPosition;\n\t\t\t\t\t\tnode.box = (Point)box.clone();\n\t\t\t\t\t\tnode.playerDir = dir;\n\t\t\t\t\t\taddSolveNode(nodes, node, node.moves.size() + optMap.getValue(node.box.x, node.box.y));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\twhile ( nodes.isEmpty() == false ){\n\t\t\t// Get node to process\n\t\t\tSolveNode node = removeSolveNode(nodes);\n\t\t\tif ( node.box.equals(dst) ){\n\t\t\t\t// This is the best solution\n\t\t\t\treturn node.moves;\n\t\t\t}\n\t\t\t\n\t\t\t// Create new nodes trying to move the box in each direction\n\t\t\tfor ( Move dir : Move.values() ){\n\t\t\t\tSolveNode newNode = new SolveNode();\n\t\t\t\tnewNode.box = dir.nextPosition(node.box);\n\t\t\t\tnewNode.playerDir = dir.opposite();\n\t\t\t\t\n\t\t\t\t// First check if the box can be moved to that position (is clear)\n\t\t\t\tif ( level.isClearSafe(newNode.box.x, newNode.box.y) == false ){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Check if the player can move to the pushing position\n\t\t\t\tPoint player = node.playerDir.nextPosition(node.box);\n\t\t\t\tPoint playerDst = dir.opposite().nextPosition(node.box);\n\t\t\t\tList<Move> playerMoves = pathTo(level, player, node.box, playerDst);\n\t\t\t\tif ( playerMoves == null ){\n\t\t\t\t\t// The player can't move itself to the pushing position\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Check if the cost to arrive to the new node is less that the previous known\n\t\t\t\tif ( node.moves.size() + playerMoves.size() + 1 >= arrived[newNode.box.x][newNode.box.y][dir.index()] ){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\" + newNode.box.x + \" \" + newNode.box.y);\n\t\t\t\t\n\t\t\t\t// Add the new node to the open nodes\n\t\t\t\tnewNode.moves.addAll(node.moves);\n\t\t\t\tnewNode.moves.addAll(playerMoves);\n\t\t\t\tnewNode.moves.add(dir);\n\t\t\t\taddSolveNode(nodes, newNode, newNode.moves.size() + optMap.getValue(newNode.box.x, newNode.box.y));\n\t\t\t\tarrived[newNode.box.x][newNode.box.y][dir.index()] = newNode.moves.size();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// There is no solution\n\t\treturn null;\n\t}", "@Override\n\tpublic void solve() {\n\t\tlong startTime = System.nanoTime();\n\n\t\twhile(!unvisitedPM.isEmpty()){\n\t\t\tProblemModel current = findCheapestNode();\n\t\n\t\t\tfor(ProblemModel pm : current.getSubNodes()){\n\t\t\n\t\t\t\tif(!visited.contains(pm) && !unvisitedPM.contains(pm)){\n\t\t\t\t\t\n\t\t\t\t\tunvisitedPM.add(pm);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(current.getSideStart().isEmpty()){\n\t\t\t\tSystem.out.print( \"\\n\"+ \"StartSide Runners: \");\n\t\t\t\tfor(Integer r: current.getSideStart()){\n\t\t\t\t\tSystem.out.print( \" \" +r) ;\n\t\t\t\t}\n\t\t\t\tSystem.out.print( \"\\n\" + \"EndSide Runners: \");\n\t\t\t\tfor(Integer r: current.getSideEnd()){\n\t\t\t\t\tSystem.out.print( \" \" + r);\n\t\t\t\t}\n\n\t\t\t\tprintPathTaken(current);\n\t\t\t\tSystem.out.print( \"\\n\" + \"------------done--------------\");\n\t\t\t\tlong endTime = System.nanoTime();\n\t\t\t\tlong duration = ((endTime - startTime)/1000000);\n\t\t\t\tSystem.out.print( \"\\n\" + \"-AS1 Time taken: \" + duration + \"ms\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tvisited.add(current);\n\t\t\n\t\t}\n\t\t\n\n\t}", "@Test\n public void testSize(){\n assertEquals(25, largeMaze.size());\n }", "@SuppressWarnings(\"unused\")\n private void notSoLazyPathfinder(final Coords dest, final MoveStepType type,\n final int timeLimit) {\n final long endTime = System.currentTimeMillis() + timeLimit;\n\n MoveStepType step = type;\n if (step != MoveStepType.BACKWARDS) {\n step = MoveStepType.FORWARDS;\n }\n\n final MovePathComparator mpc =\n new MovePathComparator(dest, step == MoveStepType.BACKWARDS);\n\n MovePath bestPath = clone();\n\n // A collection of paths we have already explored\n final HashMap<MovePath.Key, MovePath> discovered =\n new HashMap<MovePath.Key, MovePath>();\n discovered.put(bestPath.getKey(), bestPath);\n\n // A collection of hte possible next-moves\n final PriorityQueue<MovePath> candidates =\n new PriorityQueue<MovePath>(110, mpc);\n candidates.add(bestPath);\n\n boolean keepLooping = getFinalCoords().distance(dest) > 1;\n int loopcount = 0;\n\n // Keep looping while we have candidates to explore, and certain stop\n // conditions aren't met (time-limit, destination found, etc)\n while ((candidates.size() > 0) && keepLooping) {\n final MovePath candidatePath = candidates.poll();\n final Coords startingPos = candidatePath.getFinalCoords();\n final int startingElev = candidatePath.getFinalElevation();\n\n // Check to see if we have found the destination\n if (candidatePath.getFinalCoords().distance(dest) == 0) {\n bestPath = candidatePath;\n keepLooping = false;\n break;\n }\n\n // Get next possible steps\n final Iterator<MovePath> adjacent =\n candidatePath.getNextMoves(step == MoveStepType.BACKWARDS,\n step == MoveStepType.FORWARDS).iterator();\n // Evaluate possible next steps\n while (adjacent.hasNext()) {\n final MovePath expandedPath = adjacent.next();\n\n if (expandedPath.getLastStep().isMovementPossible(getGame(),\n startingPos, startingElev)) {\n\n if (discovered.containsKey(expandedPath.getKey())) {\n continue;\n }\n candidates.add(expandedPath);\n discovered.put(expandedPath.getKey(), expandedPath);\n // Make sure the candidate list doesn't get too big\n if (candidates.size() > 100) {\n candidates.remove(candidates.size() - 1);\n }\n }\n }\n // If we're doing a special movement, like charging or DFA, we will\n // have to take extra steps to see if we can finish off the move\n // this is because getNextMoves only considers turning and\n // forward/backward movement\n if (type == MoveStepType.CHARGE ||\n type == MoveStepType.DFA){\n MovePath expandedPath = candidatePath.clone();\n expandedPath.addStep(type);\n if (expandedPath.getLastStep().isMovementPossible(getGame(),\n startingPos, startingElev)) {\n\n if (discovered.containsKey(expandedPath.getKey())) {\n continue;\n }\n candidates.add(expandedPath);\n discovered.put(expandedPath.getKey(), expandedPath);\n // Make sure the candidate list doesn't get too big\n if (candidates.size() > 100) {\n candidates.remove(candidates.size() - 1);\n }\n }\n }\n\n\n loopcount++;\n if (((loopcount % 256) == 0) && keepLooping\n && (candidates.size() > 0)) {\n final MovePath front = candidates.peek();\n if (front.getFinalCoords().distance(dest) < bestPath\n .getFinalCoords().distance(dest)) {\n bestPath = front;\n }\n if (System.currentTimeMillis() > endTime) {\n keepLooping = false;\n System.out.println(\"Time limit reached searching \" +\n \"for path!\");\n }\n }\n } // end while\n //System.out.println(\"iteration count: \" + loopcount);\n if (getFinalCoords().distance(dest) > bestPath.getFinalCoords().distance(dest)) {\n // Make the path we found, this path.\n steps = bestPath.steps;\n }\n if (!getFinalCoords().equals(dest)) {\n lazyPathfinder(dest, type);\n }\n }", "public boolean solveMaze(int x, int y, String direction){\n\n if (maze[x][y] == \"E\"){\n solved = true;\n return solved;\n\n }\n\n if(!(maze[x][y].equals(\"S\") || maze[x][y].equals(\"E\"))){\n maze[x][y] = \"X\";\n }\n\n if(direction != \"up\" && isReachable(x+1, y)){\n solveMaze(x + 1, y, \"down\");\n if(solved) return true;\n }\n if(direction != \"left\" && isReachable(x, y+ 1)){\n solveMaze(x, y + 1, \"right\");\n if(solved) return true;\n }\n if(direction != \"down\" && isReachable(x-1, y)){\n solveMaze(x - 1 , y, \"up\");\n if(solved) return true;\n }\n if(direction != \"right\" && isReachable(x, y -1)){\n solveMaze(x, y - 1, \"left\");\n if(solved) return true;\n }\n\n //If cannot move, do backtracking\n if(!solved) {\n maze[x][y] = \" \";\n return false;\n }\n\n return false;\n }", "@Override\r\n public void solve(String[] arr) {\r\n\tString nameAlg = arr[arr.length - 1];\r\n\tsb = new StringBuilder();\r\n\tfor (int i = 1; i < arr.length - 1; i++) {\r\n\t sb.append(arr[i]);\r\n\t}\r\n\tString name = sb.toString();\r\n\tMaze3d tempMaze = hMaze.get(name);\r\n\tif ((hSol.get(tempMaze)) != null) {\r\n\t setChanged();\r\n\t notifyObservers((\"solution:\" + name).split(\":\"));\r\n\t}\r\n\tFuture<Solution<Position>> fCallSolution = threadpool.submit(new Callable<Solution<Position>>() {\r\n\r\n\t @Override\r\n\t public Solution<Position> call() throws Exception {\r\n\r\n\t\tMaze3d m = hMaze.get(name);\r\n\t\tSearchableMaze sMaze = new SearchableMaze(m);\r\n\t\tCommonSearcher<Position> cs;\r\n\t\tSolution<Position> s = new Solution<Position>();\r\n\t\tswitch (nameAlg) {\r\n\t\tcase \"Astar\":\r\n\t\t cs = new AStar<Position>(new MazeManhattenDistance());\r\n\t\t s = cs.search(sMaze);\r\n\t\t break;\r\n\t\tcase \"A*\":\r\n\t\t cs = new AStar<Position>(new MazeManhattenDistance());\r\n\t\t s = cs.search(sMaze);\r\n\t\t break;\r\n\t\tcase \"BFS\":\r\n\t\t cs = new BFS<Position>();\r\n\t\t s = cs.search(sMaze);\r\n\t\t break;\r\n\t\t}\r\n\t\treturn s;\r\n\t }\r\n\t});\r\n\ttry {\r\n\t hSol.put(tempMaze, fCallSolution.get());\r\n\t} catch (InterruptedException | ExecutionException e) {\r\n\t // TODO Auto-generated catch block\r\n\t e.printStackTrace();\r\n\t}\r\n\tsetChanged();\r\n\tnotifyObservers((\"solution:\" + name).split(\":\"));\r\n }", "public void solve() {\n\t\tArrayList<Piece> pieceListBySize = new ArrayList<Piece>(pieceList);\n\t\tCollections.sort(pieceListBySize);\t// This is done since the order\n\t\t\t\t\t\t\t\t\t\t\t// of piece placements does not matter.\n\t\t\t\t\t\t\t\t\t\t\t// Placing larger pieces down first lets\n\t\t\t\t\t\t\t\t\t\t\t// pruning occur sooner.\n\t\t\n\t\t/**\n\t\t * Calculates number of resets needed for a game board.\n\t\t * A \"reset\" refers to a tile that goes from the solved state to\n\t\t * an unsolved state and back to the solved state.\n\t\t * \n\t\t * This is the calculation used for pruning.\n\t\t */\n\t\t\n\t\tArrayList<Integer> areaLeft = new ArrayList<Integer>();\n\t\tareaLeft.add(0);\n\t\tint totalArea = 0;\n\t\tfor (int i = pieceListBySize.size() - 1; i >= 0; i--) {\n\t\t\ttotalArea += pieceListBySize.get(i).numberOfFlips;\n\t\t\tareaLeft.add(0, totalArea);\n\t\t}\n\t\tint totalResets = (totalArea - gameBoard.flipsNeeded) / (gameBoard.goal + 1);\n\t\tSystem.out.println(\"Total Resets: \" + totalResets);\n\t\t\n\t\t/* \n\t\tint highRow = 0;\n\t\tint highCol = 0;\n\t\tint[][] maxDim = new int[2][pieceListBySize.size()];\n\t\tfor (int i = pieceListBySize.size() - 1; i >= 0; i--) {\n\t\t\tif (highRow < pieceListBySize.get(i).rows)\n\t\t\t\thighRow = pieceListBySize.get(i).rows;\n\t\t\t\n\t\t\tif (highCol < pieceListBySize.get(i).cols)\n\t\t\t\thighCol = pieceListBySize.get(i).cols;\n\t\t\t\n\t\t\tmaxDim[0][i] = highRow;\n\t\t\tmaxDim[1][i] = highCol;\n\t\t}\n\t\t*/\n\t\t\n\t\tlong startTime = System.currentTimeMillis();\n\t\t\n\t\tNode<GameBoard> currentNode = new Node<GameBoard>(gameBoard);\n\t\tStack<Node<GameBoard>> stack = new Stack<Node<GameBoard>>();\n\t\tstack.push(currentNode);\n\t\t\n\t\twhile (!stack.isEmpty()) {\n\t\t\tnodeCount++;\n\t\t\t\n\t\t\tNode<GameBoard> node = stack.pop();\n\t\t\tGameBoard current = node.getElement();\n\t\t\tint depth = node.getDepth();\n\t\t\t\n\t\t\t// Checks to see if we reach a solved state.\n\t\t\t// If so, re-order the pieces then print out the solution.\n\t\t\tif (depth == pieceListBySize.size() && current.isSolved()) {\n\t\t\t\tArrayList<Point> moves = new ArrayList<Point>();\n\t\t\t\t\n\t\t\t\twhile (node.parent != null) {\n\t\t\t\t\tint index = node.level - 1;\n\t\t\t\t\tint sequence = pieceList.indexOf(pieceListBySize.get(index));\n\t\t\t\t\tPoint p = new Point(current.moveRow, current.moveCol, sequence);\n\t\t\t\t\tmoves.add(p);\n\t\t\t\t\t\n\t\t\t\t\tnode = node.parent;\n\t\t\t\t\tcurrent = node.getElement();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tCollections.sort(moves);\n\t\t\t\tfor (Point p : moves) {\n\t\t\t\t\tSystem.out.println(p);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Nodes opened: \" + nodeCount);\n\t\t\t\tlong endTime = System.currentTimeMillis();\n\t\t\t\tSystem.out.println(\"Elapsed Time: \" + ((endTime - startTime) / 1000) + \" secs.\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tPiece currentPiece = pieceListBySize.get(depth);\n\t\t\tint pieceRows = currentPiece.rows;\n\t\t\tint pieceCols = currentPiece.cols;\n\t\t\t\n\t\t\tPriorityQueue<Node<GameBoard>> pQueue = new PriorityQueue<Node<GameBoard>>();\n\t\t\t\n\t\t\t// Place piece in every possible position in the board\n\t\t\tfor (int i = 0; i <= current.rows - pieceRows; i++) {\n\t\t\t\tfor (int j = 0; j <= current.cols - pieceCols; j++) {\n\t\t\t\t\tGameBoard g = current.place(currentPiece, i, j);\n\t\t\t\t\t\n\t\t\t\t\tif (totalResets - g.resets < 0)\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t\t// Put in the temporary priority queue\n\t\t\t\t\tpQueue.add(new Node<GameBoard>(g, node));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Remove from priority queue 1 at a time and put into stack.\n\t\t\t// The reason this is done is so that boards with the highest reset\n\t\t\t// count can be chosen over ones with fewer resets.\n\t\t\twhile (!pQueue.isEmpty()) {\n\t\t\t\tNode<GameBoard> n = pQueue.remove();\n\t\t\t\tstack.push(n);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "private void checkIsBetterSolution() {\n if (solution == null) {\n solution = generateSolution();\n //Si la solucion que propone esta iteracion es mejor que las anteriores la guardamos como mejor solucion\n } else if (getHealthFromAvailableWorkers(availableWorkersHours, errorPoints.size()) < solution.getHealth()) {\n solution = generateSolution();\n }\n }", "protected void calculatePathfindingGrid(Tile[] tiles) {\n \n if(tiles == null) {\n return;\n }\n \n /**\n * Problem:\n * Because the tile size used by the path finding engine will most likely be\n * different from that of the visual effect size, we have to\n * look at all the visual tiles and judge whether they are blocking of\n * particular kinds of unit.\n * \n * Algorithm:\n * For land, air and sea take a look at the number of blocking/non-blocking\n * tiles there are and if there is over 50% either way then that will be the\n * PathTiles result.\n */\n \n // First get the size of the map in PathTile(s)\n int rows = getActualHeightInTiles();\n int cols = getActualWidthInTiles();\n \n // Calculate the number of tiles to a PathTile\n int tilesPerActualTilesX = getActualTileWidth() / getTileWidth();\n int tilesPerActualTilesY = getActualTileHeight() / getTileHeight();\n int tileCount = tilesPerActualTilesX * tilesPerActualTilesY;\n \n int tileCols = getWidthInTiles();\n \n // Create an array\n mPathTiles = new PathTile[ rows * cols ];\n \n // Iterate through these tiles\n for(int x = 0; x < cols ; x++) {\n for(int y = 0; y < rows; y++) {\n \n // Setup some variables\n int blockSea, blockAir, blockLand;\n blockAir = blockLand = blockSea = 0;\n \n // Figure out the percentage of each block\n for(int tx = 0; tx < tilesPerActualTilesX; tx++) {\n for(int ty = 0; ty < tilesPerActualTilesY; ty++) {\n \n int tileX = (x * tilesPerActualTilesX) + tx;\n int tileY = (y * tilesPerActualTilesY) + ty;\n \n Tile thisTile = tiles[ (tileY * tileCols) + tileX ];\n \n if(thisTile.blockAir()) {\n blockAir++;\n }\n \n if(thisTile.blockLand()) {\n blockLand++;\n }\n \n if(thisTile.blockSea()) {\n blockSea++;\n }\n \n }\n }\n \n // Calculate percentage\n float a,b,c;\n a = (float)blockAir / (float)tileCount;\n b = (float)blockLand / (float)tileCount;\n c = (float)blockSea / (float)tileCount;\n \n // Set the new tile\n mPathTiles[ (y * cols) + x ] = new PathTile( (a >= .5f), (b >= .5f), (c >= .5f) );\n \n // System.out.println(\"Grid \" + ((y * cols) + x) + \" (\" + x + \", \" + y + \") Air: \" + a + \" Land: \" + b + \" Sea: \" + c);\n \n }\n }\n \n }", "@Override\n public void runMovingTest() {\n long now;\n int count, search;\n elapsedTime.clear();\n expandedCells.clear();\n GraphPath<Integer,DefaultWeightedEdge> agentPath=null;\n GraphPath<Integer,DefaultWeightedEdge> targetPath=null;\n //Integer agentNode, targetNode;\n List<Integer> pathToFollow = null;\n for(Point[] p : points){\n pathfinder = new LazyMovingTargetAdaptiveAStarShortestPath<Integer, DefaultWeightedEdge>(map);\n count=0;\n search=0;\n agentNode = p[0].toNode();\n targetNode = p[1].toNode();\n LinkedList<Integer> movingExpCell = new LinkedList<>();\n LinkedList<Long> movingElapsTime = new LinkedList<>();\n targetThread r = new targetThread();\n evadeThread = new Thread(r);\n evadeThread.start();\n while(!agentNode.equals(targetNode)){\n if(pathToFollow==null || !agentPath.getEndVertex().equals(targetNode)) {\n agentPath = pathfinder.getShortestPath(agentNode, targetNode, new OctileDistance());\n if(pathfinder.getElapsedTime() > Long.valueOf(1900))\n continue;\n movingElapsTime.add(pathfinder.getElapsedTime());\n movingExpCell.add(pathfinder.getNumberOfExpandedNodes());\n search++;\n }\n Integer targetNext = null;\n Integer agentNext = null;\n if(count%2==0) {\n /*targetPath = new Trailmax<Integer,DefaultWeightedEdge>(map).getShortestPath(agentNode,targetNode,null);\n pathToFollow = Graphs.getPathVertexList(targetPath);\n if (!pathToFollow.isEmpty()) targetNext = pathToFollow.remove(0);\n if (targetNext.equals(targetNode) && !pathToFollow.isEmpty()) targetNext = pathToFollow.remove(0);\n targetNode = targetNext;*/\n synchronized(moveTarget) {\n moveTarget = new Boolean(true);\n }\n\n try {\n Thread.sleep(12);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n pathToFollow=Graphs.getPathVertexList(agentPath);\n if(!pathToFollow.isEmpty()){\n int i = pathToFollow.lastIndexOf(agentNode);\n agentNext=pathToFollow.remove(i+1);\n }\n agentNode = agentNext;\n count++;\n //System.out.println(agentNode+\",\"+targetNode);\n\n }\n\n r.terminate();\n try {\n evadeThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n pathToFollow=null;\n movingElapsedTime.put(p, movingElapsTime);\n movingExpandedCells.put(p, movingExpCell);\n movesMap.put(p, count);\n searchesMap.put(p, search);\n if(verbose) {\n Long totElaps = Long.valueOf(0);\n Integer totExp = 0;\n for (Long l : movingElapsTime) totElaps += l;\n for (Integer i : movingExpCell) totExp += i;\n System.out.println(\"total elapsed: \" + totElaps + \" total expanded \" + totExp);\n }\n }\n }", "protected boolean solve(int currentRow, int currentColumn) {\n \tint currentBlock = m.maze[currentRow][currentColumn];\t\t\t\t\t\t\t// get the current block that we are on\r\n \t\r\n if (m.isBlockEmpty(currentBlock)) {\t\t\t\t\t\t\t\t\t\t\t\t// make sure current block is empty\r\n \tm.maze[currentRow][currentColumn] = 2; \t\t\t\t\t\t\t\t// add this block to the path as a potential solution\r\n repaint();\r\n \r\n m.blocksTraversed++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// keep track of how many blocks were traversed over\r\n \r\n if (currentRow == m.rows-2 && currentColumn == m.columns-2) {\t\t\t\t// current block is bottom right, path has been found\r\n \tGUI.ta.append(m.blocksTraversed + \" blocks were traversed while solving the maze.\\n\");\r\n \tdouble percentage = (((double) m.blocksTraversed / (m.rows * m.columns))*100) * 2;\r\n DecimalFormat f = new DecimalFormat(\"##.00\");\r\n \tGUI.ta.append(\"This results in \" + f.format(percentage) + \"% of the maze being traveled.\\n\");\r\n \treturn true;\r\n }\r\n \r\n try { Thread.sleep(1); }\r\n catch (InterruptedException e) { }\r\n \r\n int topBlock = currentRow - 1;\t\t\t\t\t\t\t\t\t\t\t\t// block directly above the current block\r\n int leftBlock = currentColumn - 1;\t\t\t\t\t\t\t\t\t\t\t// block directly left of the current block\r\n int bottomBlock = currentRow + 1;\t\t\t\t\t\t\t\t\t\t\t// block directly below the current block\r\n int rightBlock = currentColumn + 1;\t\t\t\t\t\t\t\t\t\t\t// block directly right of the current block\r\n \r\n if (solve(topBlock, currentColumn) || solve(currentRow, leftBlock) ||\t\t// a solution was found\r\n \tsolve(bottomBlock, currentColumn) || solve(currentRow, rightBlock))\r\n \treturn true;\r\n \r\n m.maze[currentRow][currentColumn] = 4; \t\t\t\t\t\t\t\t\t// no solution from current block so make the block visited instead\r\n repaint();\r\n \r\n synchronized(this) {\r\n try { wait(1); }\r\n catch (InterruptedException e) { }\r\n }\r\n }\r\n return false;\r\n }", "private void init() {\n mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n mPaint.setStyle(Style.STROKE);\n mPaint.setColor(ContextCompat.getColor(getContext(), R.color.colorPrimary));\n mPaint.setStrokeCap(Paint.Cap.ROUND);\n mPaint.setStrokeJoin(Paint.Join.ROUND);\n mPaint.setStrokeWidth(10f);\n mPath = new Path();\n\n solutionCellsVisited = 0;\n\n solvedMaze = false;\n\n solved = new ArrayList<Boolean>();\n\n for (int i = 0; i < solutionPath.length; i++) {\n solved.add(false);\n }\n // Log.d(\"SOLVED_LENGTH\", Integer.toString(solved.size()));\n }", "public long calculateExecutionTime(int[][] solutiongrid){ \n long startTime = System.currentTimeMillis();\n //Run the program\n validateSudoku(solutiongrid); \n long endTime = System.currentTimeMillis();\n long totalTime = endTime - startTime; \n \n return totalTime;\n }", "public static void mazeSize(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze four = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct = null;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\tif(randomDirection == 1)\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = four.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\t//System.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.find(randomNumber) != S.find(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+n);\n\t\t\t\t\t\tfour.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.find(randomNumber) != S.find(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfour.remove_wall(col, row, 'r');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(four, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\tfour.draw();\n\t\tfour.printCellNumbers();\t\n\t}", "public void verifySpeeds() {\n double maxStartSpeed = 0.0;\n double[] startSpeeds = new double[segments.size() + 1];\n startSpeeds[segments.size()] = 0.0;\n for (int i = segments.size() - 1; i >= 0; i--) {\n PathSegment segment = segments.get(i);\n maxStartSpeed += Math\n .sqrt(maxStartSpeed * maxStartSpeed + 2 * maxAccel * segment.getLength());\n startSpeeds[i] = segment.getStartState().vel();\n if (startSpeeds[i] > maxStartSpeed) {\n startSpeeds[i] = maxStartSpeed;\n }\n maxStartSpeed = startSpeeds[i];\n }\n for (int i = 0; i < segments.size(); i++) {\n PathSegment segment = segments.get(i);\n double endSpeed = startSpeeds[i + 1];\n MotionState startState = (i > 0) ? segments.get(i - 1).getEndState() : new MotionState(0, 0, 0, 0);\n startState = new MotionState(0, 0, startState.vel(), startState.vel());\n segment.createMotionProfiler(startState, endSpeed);\n }\n }", "boolean hasSolverTimeLimitSeconds();", "public void MakeMaze() {\n\n\t\t// ints for random x , y and direction\n\t\tint rx = 0;\n\t\tint ry = 0;\n\t\tint rd = 0;\n\t\tgenMaze = true;\n\n\t\t// c used to count tries, if there are too many the main loop jumps to\n\t\t// the end of the function\n\t\tint c = 0;\n\n\t\t// fill the map with walls\n\t\tfor (int ix = 0; ix < max_x; ix++) {\n\t\t\tfor (int iy = 0; iy < max_y; iy++) {\n\t\t\t\tmap[ix][iy] = 1;\n\t\t\t}\n\t\t}\n\n\t\t// fill the cell array with unvisited cells\n\t\tfor (int ix = 0; ix < maxCells_x; ix++) {\n\t\t\tfor (int iy = 0; iy < maxCells_y; iy++) {\n\t\t\t\tcell[ix][iy] = 0;\n\t\t\t}\n\t\t}\n\n\t\t// choose a \"random\" x,y pair. centre of screen used here instead\n\t\trx = maxCells_x / 2;\n\t\try = maxCells_y / 2;\n\n\t\t// mark cell visited\n\t\tcell[rx][ry] = 1;\n\n\t\t// count cells\n\t\tcountCells();\n\n\t\t// start main generator loop\n\t\twhile (visitedCells < totalCells) {\n\n\t\t\tc++;\n\n\t\t\tif (c > magicNumber) {\n\t\t\t\tgenMaze = false;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\trd = rand.nextInt(4);\n\n\t\t\t// dig tunnels\n\n\t\t\t// up\n\n\t\t\tif (genMaze) {\n\t\t\t\tif (rd == 0) { // up\n\t\t\t\t\tif (inRange(rx * CELL_RAD, ry * CELL_RAD - 1) == 1\n\t\t\t\t\t\t\t&& (cell[rx][ry - 1]) == 0 || rand.nextInt(7) == 7) {\n\t\t\t\t\t\tclink(rx * CELL_RAD, ry * CELL_RAD, rx * CELL_RAD,\n\t\t\t\t\t\t\t\t(ry - 1) * CELL_RAD);\n\t\t\t\t\t\try--;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\trx = rand.nextInt(maxCells_x);\n\t\t\t\t\t\t\try = rand.nextInt(maxCells_y);\n\t\t\t\t\t\t\tif (cell[rx][ry] == 1) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (rd == 1) { // down\n\t\t\t\t\tif (inRange(rx + CELL_RAD, ry * CELL_RAD + 1) == 1\n\t\t\t\t\t\t\t&& (cell[rx][ry + 1] == 0 || rand.nextInt(7) == 7)) {\n\t\t\t\t\t\tclink(rx * CELL_RAD, (ry) * CELL_RAD, rx * CELL_RAD,\n\t\t\t\t\t\t\t\t(ry + 1) * CELL_RAD);\n\t\t\t\t\t\try++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\trx = rand.nextInt(maxCells_x);\n\t\t\t\t\t\t\try = rand.nextInt(maxCells_y);\n\t\t\t\t\t\t\tif (cell[rx][ry] == 1) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (rd == 2) { // left\n\t\t\t\t\tif (inRange((rx * CELL_RAD) - 1, ry * CELL_RAD) == 1\n\t\t\t\t\t\t\t&& (cell[rx - 1][ry] == 0 || rand.nextInt(7) == 7)) {\n\t\t\t\t\t\tclink(rx * CELL_RAD, ry * CELL_RAD,\n\t\t\t\t\t\t\t\t(rx - 1) * CELL_RAD, ry * CELL_RAD);\n\t\t\t\t\t\trx--;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\trx = rand.nextInt(maxCells_x);\n\t\t\t\t\t\t\try = rand.nextInt(maxCells_y);\n\t\t\t\t\t\t\tif (cell[rx][ry] == 1) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else if (rd == 3) { // right\n\t\t\t\t\tif (inRange(rx * CELL_RAD + 1, ry * CELL_RAD) == 1\n\t\t\t\t\t\t\t&& (cell[rx + 1][ry]) == 0 || rand.nextInt(7) == 7) {\n\t\t\t\t\t\tclink((rx) * CELL_RAD, ry * CELL_RAD, (rx + 1)\n\t\t\t\t\t\t\t\t* CELL_RAD, ry * CELL_RAD);\n\t\t\t\t\t\trx++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\trx = rand.nextInt(maxCells_x);\n\t\t\t\t\t\t\try = rand.nextInt(maxCells_y);\n\t\t\t\t\t\t\tif (cell[rx][ry] == 1) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// mark the cell as visited\n\n\t\t\t\tcell[rx][ry] = 1;\n\n\t\t\t\t// place a \"floor\" tile on the map where the maze cell should be\n\t\t\t\tmap[rx * CELL_RAD][ry * CELL_RAD] = 0;\n\n\t\t\t\t// count the cells to establish how many have been visited\n\t\t\t\tcountCells();\n\t\t\t}\n\t\t}\n\n\t\tfor (int ix = 0; ix < maxCells_x; ix++) {\n\t\t\tfor (int iy = 0; iy < maxCells_y; iy++) {\n\t\t\t\tif (cell[ix][iy] == 1) {\n\t\t\t\t\tmap[ix * CELL_RAD][iy * CELL_RAD] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void generateSolution() {\n if (this.stateOfTheMaze != 1)\n throw new IllegalArgumentException(\"To generate the maze the state of it must be \\\"generated maze\\\".\");\n Queue<Box> queue = new LinkedList<>();\n queue.add(this.startBox);\n boolean notFinished = true;\n while (notFinished) {\n Box aux = queue.peek();\n LinkedList<Box> movements = movementWithWalls(aux);\n movements.remove(aux.getPrevious());\n for (Box box : movements) {\n box.setPrevious(aux);\n queue.add(box);\n if (box.equals(this.endBox))\n notFinished = false;\n }\n queue.remove();\n }\n Box anotherAux = this.endBox;\n while (!anotherAux.equals(this.startBox)) {\n anotherAux.setAsSolution();\n anotherAux = anotherAux.getPrevious();\n }\n this.stateOfTheMaze++;\n }", "private static void test(int xy, int si, int sj, int ei, int ej, int[][] blocked){\n System.out.println(\"\\n\\nTest Case #\"+tCase);tCase++;\n //Reset\n long start_time = System.nanoTime();\n grid = new Cell[xy][xy];\n closed = new boolean[xy][xy];\n open = new PriorityQueue<>((Object o1, Object o2) -> {\n Cell c1 = (Cell)o1;\n Cell c2 = (Cell)o2;\n\n return Integer.compare(c1.finalCost, c2.finalCost);\n });\n //Set start position\n setStartCell(si, sj); //Setting to 0,0 by default\n\n //Set End Location\n setEndCell(ei, ej);\n\n for(int i=0;i<xy;++i){\n for(int j=0;j<xy;++j){\n grid[i][j] = new Cell(i, j);\n grid[i][j].heuristicCost = Math.abs(i-endI)+Math.abs(j-endJ);\n //System.out.print(grid[i][j].heuristicCost+\" \");\n }\n //System.out.println();\n }\n grid[si][sj].finalCost = 0;\n\n //Set blocked cells to null\n for (int bX = 0; bX < blocked.length; bX++) {\n for (int bY = 0; bY < blocked.length; bY++)\n if (blocked[bX][bY] == 1)\n setBlocked(bX, bY);\n }\n\n String[][] maze = new String[xy][xy];\n //Display initial map\n System.out.println(\"Grid: \");\n char block = '▋';\n String open = \"[]\";\n for(int i=0;i<xy;++i){\n for(int j=0;j<xy;++j){\n if(i==si&&j==sj){ System.out.print(\"SO \"); //Source\n maze[i][j] = \"SO \"; }\n else if(i==ei && j==ej){ System.out.print(\"DE \"); //Destination\n maze[i][j] = \"DE \"; }\n else if(grid[i][j]!=null){ System.out.print(open + \" \");\n maze[i][j] = open + \" \"; }\n else{ System.out.print(block + \" \");\n maze[i][j] = block + \" \"; }\n }\n System.out.println();\n }\n System.out.println();\n\n AStar();\n System.out.println(\"\\nScores for cells: \");\n for(int i=0;i<xy;++i){\n for(int j=0;j<xy;++j){\n if(grid[i][j]!=null)System.out.printf(\"%-4d \", grid[i][j].finalCost);\n else System.out.print(block + \" \");\n }\n System.out.println();\n }\n System.out.println();\n\n if(closed[endI][endJ]){\n //Trace back the path\n System.out.println(\"Path: \");\n Cell current = grid[endI][endJ];\n System.out.print(current);\n ArrayList<Cell> path = new ArrayList<>();\n path.add(current);\n while(current.parent!=null){\n System.out.print(\" -> \"+current.parent);\n current = current.parent;\n path.add(current);\n }\n System.out.println(\"\\n\");\n\n Collections.reverse(path);\n\n for (Cell index : path) {\n if (path.contains(index))\n maze[index.i][index.j] = \"- \";\n }\n\n //Display final path\n System.out.println(\"Final Path: \");\n System.out.println(path.toString() + \"\\n\");\n\n for(int i=0;i<xy;++i) {\n for (int j = 0; j < xy; ++j) {\n if(i==si&&j==sj)System.out.print(\"SO \"); //Source\n else if(i==ei && j==ej)System.out.print(\"DE \"); //Destination\n else System.out.print(maze[i][j]);\n }\n System.out.println();\n }\n\n System.out.println();\n }else System.out.println(\"No possible path\");\n\n long end_time = System.nanoTime();\n double difference = (end_time - start_time) / 1e6;\n\n System.out.println(difference + \"ms\\n\");\n\n }", "@Test(expected = Exception.class)\n public void testInvalidSizeInitializeSearch() throws Exception {\n zeroPillarMaze.setBegin(Maze.position(0, 0));\n initSearch.invoke(solver.getClass(), zeroPillarMaze, testESet, testNQueue);\n }", "public boolean solve(boolean verbose, Window window) throws InterruptedException {\n long time = System.currentTimeMillis();\n HashMap<TileColor, Piece> pieceMap = new HashMap<>();\n pieceMap.put(TileColor.RED, new RedPiece(new int[]{2, 1}, 0));\n pieceMap.put(TileColor.PURPLE, new PurplePiece(new int[]{0, 0}, 0));\n pieceMap.put(TileColor.BLUE, new BluePiece(new int[]{3, 5}, 0));\n pieceMap.put(TileColor.YELLOW, new YellowPiece(new int[]{2, 6}, 0));\n pieceMap.put(TileColor.ORANGE, new OrangePiece(new int[]{2, 3}, 0));\n pieceMap.put(TileColor.GREEN, new GreenPiece(new int[]{1, 2}, 0));\n pieceMap.put(TileColor.PINK, new PinkPiece(new int[]{3, 0}, 0));\n\n HashMap<TileColor, ArrayList<int[]>> moveMap = new HashMap<>();\n for (TileColor t: TileColor.values()) {\n if (t == TileColor.BLACK) { continue; }\n ArrayList<int[]> moves = new ArrayList<>();\n Piece p = pieceMap.get(t);\n for (int rot = 0; rot < 6; rot++) {\n p.updateRotation(rot);\n for (int row = 0; row < 4; row++) {\n for (int col = 0; col < 7; col++) {\n p.location = new int[]{row, col};\n p.generateTiles();\n boolean fits = true;\n for (Tile tile : p.tiles) {\n if (tile.loc[0] + row - p.location[0] > 3 || tile.loc[0] + row - p.location[0] < 0) {\n fits = false;\n }\n if (tile.loc[1] + col - p.location[1] > 6 || tile.loc[1] + col - p.location[1] < 0) {\n fits = false;\n }\n if ((tile.loc[0] + row - p.location[0]) % 2 == 1 && tile.loc[1] + col - p.location[1] == 6) {\n fits = false;\n }\n if (!fits) {\n break;\n }\n }\n if (fits) {\n // Add this move if it satisfies all constraints\n boolean isSatisfied = true;\n for (TileColor constraintType: TileColor.values()) {\n if (constraintType != TileColor.BLACK) {\n for (Constraint c : constraints.get(constraintType)) {\n if (!c.isSatisfiedBy(p)) {\n isSatisfied = false;\n break;\n }\n }\n }\n }\n if (isSatisfied) {\n // Does it block off a piece of the board corner? If not, it is a legal move\n moves.add(new int[]{row, col, rot});\n }\n }\n }\n }\n }\n moveMap.put(t, moves);\n }\n if (verbose) {\n System.out.println(\"Moves computed in \" + (System.currentTimeMillis() - time)+ \" ms.\");\n }\n\n // Now we have moveMap which contains possible moves for each piece that satisfy all of its constraints\n\n // The next step is to remove any duplicates. We can disregard any rotation 3 from the red or the purple\n ArrayList<int[]> redMoves = new ArrayList<>();\n for (int[] move: moveMap.get(TileColor.RED)) {\n if (move[2] != 3) {\n redMoves.add(move);\n }\n }\n moveMap.put(TileColor.RED, redMoves);\n\n ArrayList<int[]> purpleMoves = new ArrayList<>();\n for (int[] move: moveMap.get(TileColor.PURPLE)) {\n if (move[2] != 3) {\n purpleMoves.add(move);\n }\n }\n moveMap.put(TileColor.PURPLE, purpleMoves);\n\n // Now we only have states that are actually unique\n if (verbose) {\n System.out.println(\"Moves Per Color:\");\n }\n long total = 1;\n ArrayList<TileColor> colors = new ArrayList<>();\n for (TileColor t: TileColor.values()) {\n if (t != TileColor.BLACK) {\n colors.add(t);\n if (verbose) {\n System.out.println(\" \" + t + \": \" + moveMap.get(t).size());\n }\n total *= moveMap.get(t).size();\n }\n }\n if (verbose) {\n System.out.println();\n System.out.println(\"Total combinations: \" + total);\n }\n\n // We want to order our tile colors by who has the least options first\n class SortByCombinations implements Comparator<TileColor> {\n public int compare(TileColor a, TileColor b) {\n return moveMap.get(a).size() - moveMap.get(b).size();\n }\n }\n colors.sort(new SortByCombinations());\n\n // At this point, colors is ordered from least to most options\n // Now we can actually start solving\n\n iterations = 0;\n boolean success = DFS(0, colors, moveMap, pieceMap, verbose, window);\n if (!success && verbose) {\n System.out.println(\"Failed.\");\n }\n if (verbose) {\n System.out.println(\"Took \" + (System.currentTimeMillis() - time) + \" ms.\");\n }\n return success;\n\n }", "private void checkTargetsReachable(){\n\t\tPathfinder pathfinder = new Pathfinder(collisionMatrix);\n\t\tLinkedList<Node> removeList = new LinkedList<Node>();\n\t\tboolean pathWasFound = false;\n\t\tLinkedList<Node> currentPath;\n\t\tLinkedList<Node> reversePath;\n\t\t\n\t\t//Go through all starting positions\n\t\tfor(LinkedList<Node> startList : targets){\n\t\t\tprogress += 8;\n\t\t\tsetProgress(progress);\n\t\t\tfor(Node startNode : startList){\n\t\t\t\t\n\t\t\t\tboolean outsideMap = (startNode.getCollisionXPos(scaleCollision) < 0 || startNode.getCollisionXPos(scaleCollision) >= (collisionMatrix.length-1) || startNode.getCollisionYPos(scaleCollision) < 0 || startNode.getCollisionYPos(scaleCollision) >= (collisionMatrix.length-1));\n\t\t\t\t\n\t\t\t\tpathWasFound = false;\n\t\t\t\t//Make sure that target is inside of map\n\t\t\t\tif(!outsideMap){\n\t\t\t\t\t//Check against all target positions\n\t\t\t\t\tfor(LinkedList<Node> targetList : targets){\n\t\t\t\t\t\tfor(Node targetNode : targetList){\n\t\t\t\t\t\t\t//Only check against targets that have not already been marked as unreachable\n\t\t\t\t\t\t\tboolean selfCheck = (targetNode.getXPos() != startNode.getXPos() || targetNode.getYPos() != startNode.getYPos());\n\t\t\t\t\t\t\tif(!removeList.contains(targetNode) && selfCheck){\n\t\t\t\t\t\t\t\t//Check if this path has already been checked\n\t\t\t\t\t\t\t\tif(!preCalculatedPaths.containsKey(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision))){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcurrentPath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t//Check if a path can be found for this start and target node\n\t\t\t\t\t\t\t\t\tif(pathfinder.findPath(startNode.getCollisionXPos(scaleCollision), startNode.getCollisionYPos(scaleCollision), targetNode.getCollisionXPos(scaleCollision), targetNode.getCollisionYPos(scaleCollision), currentPath)){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(Frame.USE_PRECALCULATED_PATHS)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision), currentPath);\n\t\t\t\t\t\t\t\t\t\t\treversePath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t\t\treversePath.addAll(currentPath);\n\t\t\t\t\t\t\t\t\t\t\tCollections.reverse(reversePath);\n\t\t\t\t\t\t\t\t\t\t\treversePath.removeFirst();\n\t\t\t\t\t\t\t\t\t\t\treversePath.add(startNode);\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(targetNode.toStringCollision(scaleCollision) + \"-\" + startNode.toStringCollision(scaleCollision) ,reversePath);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Remove nodes which we cannot find a path from\n\t\t\t\tif(!pathWasFound){\n\t\t\t\t\tremoveList.add(startNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Go through the remove list and remove unreachable nodes\n\t\tfor(Node node : removeList){\n\t\t\tfor(LinkedList<Node> startList : targets){\n\t\t\t\tstartList.remove(node);\n\t\t\t}\n\t\t}\n\t}", "public static void pathMethod (int x, int y, int rows, int columns, int startPointX, int startPointY, int endPointX, int endPointY, String [][]copyArray, String [][]realArray, int decider) throws Exception{ \r\n \r\n String up = copyArray[y-1][x];\r\n String down = copyArray[y+1][x];\r\n String right = copyArray[y][x+1]; //moves the coordinate up one, down one, right one, left one and stores it into up down left right; \r\n String left = copyArray[y][x-1];\r\n \r\n if(up.equals(\"X\")||down.equals(\"X\")||right.equals(\"X\")||left.equals(\"X\")){ //if up right left or down is equal to the endpoint, the maze is solvable, and we can now print the final array\r\n System.out.println(\"\\nThe maze is solvable!\");\r\n// printFinalArray(realArray, counter, xvalues, yvalues); //solution is found already - sends back to another method to print final solution\r\n regenerate(decider); //then sends to regenerate method where it asks if user would like to create another maze\r\n }\r\n \r\n else if(copyArray[startPointY+1][startPointX].equals(\"B\")&&copyArray[startPointY-1][startPointX].equals(\"B\")&&copyArray[startPointY][startPointX+1].equals(\"B\")&&copyArray[startPointY][startPointX-1].equals(\"B\")){\r\n \r\n System.out.println(\"\\nSorry, your maze is unsolvable.\\n\\n\"); //if at the start point we cannot go up down left or right - no possible moves - not solvable - end of maze \r\n regenerate(decider); //call the method that gives users the option to recreate the maze if it was unsolvable \r\n } \r\n \r\n else if(up.equals(\"O\")){ //if the coordinate in the up direction is O\r\n counter=counter+1; //incrementing counter so we can input it the coordinate arrays\r\n copyArray[y][x] = \"V\"; //changing the values to 'V' so we can know that we already visited it\r\n y=y-1; //moving coordinate up one \r\n xvalues[counter]=x; //storing this coordinate into the arrays with the counter\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider); //recalling method\r\n }\r\n \r\n else if(down.equals(\"O\")){ //if down = O\r\n copyArray[y][x] = \"V\";\r\n counter=counter+1;\r\n y=y+1; \r\n xvalues[counter]=x;\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider);\r\n }\r\n \r\n else if(right.equals(\"O\")){ //if right equals O\r\n copyArray[y][x] = \"V\";\r\n counter=counter+1;\r\n x=x+1;\r\n xvalues[counter]=x;\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider);\r\n }\r\n \r\n else if(left.equals(\"O\")){ //if left equals O\r\n copyArray[y][x] = \"V\";\r\n counter=counter+1;\r\n x=x-1;\r\n xvalues[counter]=x;\r\n yvalues[counter]=y;\r\n pathMethod(x, y, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider);\r\n }\r\n \r\n else { //if neither up down left or right work\r\n for(int i = 0; i<rows; i++){ //makes all the 'V's go back to O\r\n for(int j = 0; j<columns; j++){\r\n if(copyArray[i][j].equals(\"V\")){\r\n copyArray[i][j] = \"O\";\r\n }\r\n }\r\n }\r\n copyArray[y][x] = \"B\"; //make the coordinate that you cant make a move with B, so it shortens the possible path options\r\n for(int i = 0 ; i<counter; i++){\r\n xvalues[i] = 0; //resets the coordinate arrays back to 0\r\n yvalues[i] = 0;\r\n }\r\n counter=0; //resets counter back to 0;\r\n pathMethod(startPointX, startPointY, rows, columns, startPointX, startPointY, endPointX, endPointY, copyArray, realArray, decider); //resends the startpoints instead of x and y; only thing different is that one coordinate is now marked \"B\"\r\n } \r\n }", "public boolean solve()\n\t{\n Position[] pos=path.getLastStep().neighbors();\n if (grid.isOnBoundary(path.getLastStep())&&grid.isOpen(path.getLastStep()))\n\t\treturn true;\n if (path.getLastStep()==start)\n return false;\n for (int i=0;i<4;i++)\n {\n if (pos[i]!=path.getLastStep() && grid.isOpen(pos[i]))\n path.extend(pos[i]);\n }\n if (grid.isBlocked(path.getLastStep())||grid.isRejected(path.getLastStep()))\n {\n path.backUp();\n solve();\n }\n return false;\n \n\t}", "public synchronized void startSolving()\n/* */ {\n/* 373 */ setKeepSolving(true);\n/* */ \n/* */ \n/* 376 */ if ((!this.solving) && (this.iterationsToGo > 0))\n/* */ {\n/* */ \n/* 379 */ setSolving(true);\n/* 380 */ setKeepSolving(true);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 387 */ fireTabuSearchStarted();\n/* */ \n/* */ \n/* */ \n/* 391 */ TabuSearch This = this;\n/* */ \n/* 393 */ Thread t = new Thread(new Runnable() {\n/* */ private final TabuSearch val$This;\n/* */ \n/* */ public void run() {\n/* 397 */ while ((MultiThreadedTabuSearch.this.keepSolving) && (MultiThreadedTabuSearch.this.iterationsToGo > 0))\n/* */ {\n/* */ \n/* 400 */ synchronized (this.val$This)\n/* */ {\n/* 402 */ MultiThreadedTabuSearch.this.iterationsToGo -= 1;\n/* */ try\n/* */ {\n/* 405 */ MultiThreadedTabuSearch.this.performOneIteration();\n/* */ }\n/* */ catch (NoMovesGeneratedException e)\n/* */ {\n/* 409 */ if (SingleThreadedTabuSearch.err != null)\n/* 410 */ SingleThreadedTabuSearch.err.println(e);\n/* 411 */ MultiThreadedTabuSearch.this.stopSolving();\n/* */ }\n/* */ catch (NoCurrentSolutionException e)\n/* */ {\n/* 415 */ if (SingleThreadedTabuSearch.err != null)\n/* 416 */ SingleThreadedTabuSearch.err.println(e);\n/* 417 */ MultiThreadedTabuSearch.this.stopSolving();\n/* */ }\n/* 419 */ MultiThreadedTabuSearch.this.incrementIterationsCompleted();\n/* 420 */ this.val$This.notifyAll();\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* 425 */ synchronized (this.val$This)\n/* */ {\n/* */ \n/* */ \n/* 429 */ MultiThreadedTabuSearch.this.setSolving(false);\n/* 430 */ MultiThreadedTabuSearch.this.setKeepSolving(false);\n/* */ \n/* */ \n/* 433 */ if (MultiThreadedTabuSearch.this.helpers != null)\n/* 434 */ for (int i = 0; i < MultiThreadedTabuSearch.this.helpers.length; i++)\n/* 435 */ MultiThreadedTabuSearch.this.helpers[i].dispose();\n/* 436 */ MultiThreadedTabuSearch.this.helpers = null;\n/* */ \n/* */ \n/* 439 */ MultiThreadedTabuSearch.this.fireTabuSearchStopped();\n/* 440 */ this.val$This.notifyAll(); } } }, \"MultiThreadedTabuSearch-Master\");\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 448 */ t.setPriority(this.threadPriority);\n/* 449 */ t.start();\n/* */ }\n/* 451 */ notifyAll();\n/* */ }", "public void run() {\n // solve();\n faster();\n }", "@Test(expected = Exception.class)\n public void testOnePillarMaze() throws Exception {\n shortestPath = MazeSolver.pStar(onePillarMaze, 1);\n }", "private void findPath()\n\t{\n\t\tpathfinding = true;\n\n\t\tmoves = Pathfinder.calcOneWayMove(city.getDrivingMap(), x, y, destX, destY);\n\t\tpathfinding = false;\n\t}", "@Test\n public void testSolveBackwardMaze(){\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n largeMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n largeMaze.linkPillars(Maze.position(3, 1), Maze.position(4, 1));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(1, 3));\n largeMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(0, 3));\n largeMaze.linkPillars(Maze.position(1, 3), Maze.position(2, 3));\n largeMaze.linkPillars(Maze.position(3, 3), Maze.position(4, 3));\n largeMaze.linkPillars(Maze.position(0, 3), Maze.position(0, 4));\n\n //link row 5\n largeMaze.linkPillars(Maze.position(0, 4), Maze.position(1, 4));\n largeMaze.linkPillars(Maze.position(1, 4), Maze.position(2, 4));\n largeMaze.linkPillars(Maze.position(2, 4), Maze.position(3, 4));\n largeMaze.linkPillars(Maze.position(3, 4), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(3, 4));\n largeMaze.setEnd(Maze.position(1, 0));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(null, shortestPath);\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public Solution(){\r\n\r\n this.path_solution =new ArrayList<AState>();\r\n this.sol_for_debbage =new ArrayList<MazeState>();\r\n }", "private void makeMaze() {\n\t\ttry {\n\t\t\tthis.end = ImageIO.read(new File(\"images/tiles/end_locked.png\"));\n\t\t\tint w = getWidth()/gui.getModel().getDifficulty();\n\t\t\tint h = getHeight()/gui.getModel().getDifficulty();\n\t\t\tint difficulty = gui.getModel().getDifficulty();\n\t\t\tmazeImage = new BufferedImage(difficulty*(getWidth()/difficulty), difficulty*(getHeight()/difficulty), BufferedImage.TYPE_INT_RGB);\n\t\t\tGraphics2D g = mazeImage.createGraphics();\n\t\t\tString tile = \"\";\n\t\t\tfor (BaseState s: gui.getModel().getMaze()) {\n\t\t\t\tint x = s.getX(); int y = s.getY();\n\t\t\t\t\n\t\t\t\t// check walls\n\t\t\t\tint numSides = 0;\n\t\t\t\tboolean rightWall = false;\n\t\t\t\tboolean leftWall = false;\n\t\t\t\tboolean topWall = false;\n\t\t\t\tboolean bottomWall = false;\n\t\t\t\tif (s.getRight() == null) rightWall = true;\n\t\t\t\tif (s.getLeft() == null) leftWall = true;\n\t\t\t\tif (s.getUp() == null) topWall = true;\n\t\t\t\tif (s.getDown() == null) bottomWall = true;\n\t\t\t\tif (topWall) numSides++;\n\t\t\t\tif (leftWall) numSides++;\n\t\t\t\tif (bottomWall) numSides++;\n\t\t\t\tif (rightWall) numSides++;\n\t\t\t\t\n\t\t\t\t// find tile type\n\t\t\t\tif (numSides == 3) { // dead end\n\t\t\t\t\tif (!rightWall) tile = \"images/tiles/deadend_left.bmp\";\n\t\t\t\t\telse if (!leftWall) tile = \"images/tiles/deadend_right.bmp\";\n\t\t\t\t\telse if (!topWall) tile = \"images/tiles/deadend_bottom.bmp\";\n\t\t\t\t\telse if (!bottomWall) tile = \"images/tiles/deadend_top.bmp\";\n\t\t\t\t} else if (numSides == 2) { // corner or hall\n\t\t\t\t\t//hall\n\t\t\t\t\tif (rightWall && leftWall) tile = \"images/tiles/hall_vertical.bmp\";\n\t\t\t\t\telse if (topWall && bottomWall) tile = \"images/tiles/hall_horizontal.bmp\";\n\t\t\t\t\t//corner\n\t\t\t\t\telse if (topWall && leftWall) tile = \"images/tiles/corner_top_left.bmp\";\n\t\t\t\t\telse if (topWall && rightWall) tile = \"images/tiles/corner_top_right.bmp\";\n\t\t\t\t\telse if (bottomWall && leftWall) tile = \"images/tiles/corner_bottom_left.bmp\";\n\t\t\t\t\telse if (bottomWall && rightWall) tile = \"images/tiles/corner_bottom_right.bmp\";\n\t\t\t\t} else if (numSides == 1) { // single side\n\t\t\t\t\tif (leftWall) tile = \"images/tiles/wall_left.bmp\";\n\t\t\t\t\telse if (rightWall) tile = \"images/tiles/wall_right.bmp\";\n\t\t\t\t\telse if (topWall) tile = \"images/tiles/wall_top.bmp\";\n\t\t\t\t\telse if (bottomWall) tile = \"images/tiles/wall_bottom.bmp\";\n\t\t\t\t} else { // open\n\t\t\t\t\ttile = \"images/tiles/open.bmp\";\n\t\t\t\t}\n\t\t\t\t// draw tile\n\t\t\t\tg.drawImage(ImageIO.read(new File(tile)), x*w, y*h, w, h, null);\n\t\t\t\t\n\t\t\t\t// check for ending and draw if need be\n\t\t\t\tif (s.getX() == gui.getModel().getDifficulty() - 1 && s.getY() == gui.getModel().getDifficulty() - 1) {\n\t\t\t\t\tg.drawImage(ImageIO.read(new File(\"images/tiles/end_unlocked.png\")), x*w, y*h, w, h, null);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(IOException e) {System.err.println(\"Images not found.\");}\n\t}", "@Test\n public void testSmallSize(){\n assertEquals(9, smallMaze.size());\n }", "@Test\n public void testInitializeSearch() {\n try {\n smallMaze.setBegin(Maze.position(1, 1));\n initSearch.invoke(solver.getClass(), smallMaze, testESet, testNQueue);\n } catch (Exception e) {\n fail(\"Unexpectedly could not invoke initializeSearch().\");\n }\n\n assertEquals(1, testESet.size());\n assertEquals(1, testNQueue.size());\n }", "public void performMove() {\n\t\tfor (int x = 0; x <= size-1; x++)\n\t\t\tfor (int y = 0; y <= size-1; y++)\n\t\t\t\tlocalBoard[y][x] = 0;\n\t\t\n\t\t//reset the flag that indicates if a move has been found that decreases the heuristic\n\t\tfoundBetterMove = false;\n\t\t\n\t\t//fill in the appropriate heuristic values\n\t\tpopulateHillValues();\n\t\tArrayList<PotentialMove> myBestList = new ArrayList<PotentialMove>();\n\n\t\t//Find the square with the lowest heuristic value. this should really write the values to an array. \n\t\tint squareDifferential = -1;\n\t\t//String outValue = \"\";\n\t\tfor (int y = 0; y <= size-1; y++) {\n\t\t\tfor (int x = 0; x <= size-1; x++){\n\t\t\t\t//outValue = outValue + localBoard[y][x];\n\t\t\t\tif (squareDifferential < 0) //lowestSquareFound not found yet \n\t\t\t\t{\n\t\t\t\t\tif ((NQueens.queens[x] != y) && //set if the current square isn't already occupied by a queen\n\t\t\t\t\t\t\t(localBoard[NQueens.queens[x]][x] >= localBoard[y][x])) {\n\t\t\t\t\t\tif (localBoard[y][x] == localBoard[NQueens.queens[x]][x])\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) > squareDifferential) { // find the square with the largest differential in value from the queen in the column\n\t\t\t\t\tmyBestList.clear();\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t}\n\t\t\t\telse if (((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) == squareDifferential) && // the differential is equal to the current best differential\n\t\t\t\t\t\t(NQueens.queens[x] != y)) { // and isn't already occupied by a queen\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t}\n\t\t\t\t//else the square is higher, has a queen or isn't marginally better than the current queen's position in the row\n\t\t\t}\n\t\t\t//outValue = outValue + \"\\n\";\n\t\t}\n\t\t//JOptionPane.showMessageDialog(null, outValue);\n\t\t\n\t\tif (myBestList.isEmpty())\n\t\t\treturn;\n\t\t\n\t\tint listSize = myBestList.size();\n\t\tPotentialMove bestMove;\n\t\t\n\t\t//grab the non-Sideways moves first\n\t\tfor (int i = 0; i < listSize; i++) {\n\t\t\tif (!(myBestList.get(i).isSideways)) {\n\t\t\t\tbestMove = myBestList.get(i);\n\t\t\t\tfoundBetterMove = true;\n\t\t\t\tsidewaysMoves = 0;\n\t\t\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (sidewaysMoves > MAXSIDEWAYSMOVES) { // hit MAXSIDEWAYSMOVES consecutive sideways moves, mark as unsolvable\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//all available moves sideways moves, let's select one randomly\n\t\tRandom generator = new Random();\n\t\tint randomElement = generator.nextInt(listSize);\n\t\t\n\t\tbestMove = myBestList.get(randomElement);\n\t\tfoundBetterMove = true;\n\t\tsidewaysMoves++;\n\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t}", "public int CalcDistance ( )\r\n\t{\r\n\t\tfor ( int i = 0; i<size; i++ )\r\n\t\t{\r\n\t\t\tfor ( int offR = 0; offR <= size/2; offR++ )\r\n\t\t\t{\r\n\t\t\t\tfor ( int c = 0; c <= size/2; c++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == 0 && maze [offR] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenUp() && maze [offR-1] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR-1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == 0 && maze [offR] [c].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenLeft() && maze [offR] [c-1].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c-1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor ( int c = size-1; c >= size/2; c-- )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == 0 && maze [offR] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenUp() && maze [offR-1] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR-1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == size-1 && maze [offR] [c].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenRight() && maze [offR] [c+1].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c+1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor ( int offR = size-1; offR >= size/2; offR-- )\r\n\t\t\t{\r\n\t\t\t\tfor ( int c = 0; c <= size/2; c++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == size-1 && maze [offR] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenDown() && maze [offR+1] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR+1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == 0 && maze [offR] [c].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenLeft() && maze [offR] [c-1].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c-1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfor ( int c = size-1; c >= size/2; c-- )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( offR == size-1 && maze [offR] [c].isOpenDown() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenDown() && maze [offR+1] [c].isOpenUp() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR+1] [c].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( c == size-1 && maze [offR] [c].isOpenRight() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( 1 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( maze [offR] [c].isOpenRight() && maze [offR] [c+1].isOpenLeft() )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmaze [offR] [c].setDistanceToExit( \r\n\t\t\t\t\t\t\t\tMath.min( maze [offR] [c+1].getDistanceToExit()+1,\r\n\t\t\t\t\t\t\t\t\t\t maze [offR] [c].getDistanceToExit() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn maze [currentRow] [currentCol].getDistanceToExit();\r\n\t}", "@Test\n public void testTraverseOnlyWithPlankMaze() {\n try {\n //link row 1\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n smallMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n\n //link row 3\n smallMaze.linkPillars(Maze.position(0, 2), Maze.position(1, 2));\n smallMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //set beginning and end\n smallMaze.setBegin(Maze.position(0, 0));\n smallMaze.setEnd(Maze.position(2, 2));\n shortestPath = MazeSolver.pStar(smallMaze, 9);\n\n assertEquals(5, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public void showMazeSize(int size);", "public static List<MapTile> findPath(MovableObject mO, GameObject destination) {\n List<MapTile> openList = new LinkedList<>();\n List<MapTile> closedList = new LinkedList<>();\n List<MapTile> neighbours = new ArrayList<>();\n Point objectTileCoord = mO.getGridCoordinates();\n Point destinationTileCoord = destination.getGridCoordinates();\n MapTile currentTile;\n try {\n currentTile = mapGrid.mapGrid[objectTileCoord.x][objectTileCoord.y];\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.print(\"Error while getting current tile for pathfinding. Trying to adapt coords.\");\n if (mO.getX() >= MapManager.getWorldWidth()) {\n objectTileCoord.x -= 1;\n }\n if (mO.getY() >= MapManager.getWorldHeight()) {\n objectTileCoord.y -= 1;\n }\n if (mO.getY() >= MapManager.getWorldHeight() && mO.getX() >= MapManager.getWorldWidth()) {\n objectTileCoord.x -= 1;\n objectTileCoord.y -= 1;\n }\n currentTile = mapGrid.mapGrid[objectTileCoord.x][objectTileCoord.y];\n }\n\n currentTile.setParentMapTile(null);\n currentTile.totalMovementCost = 0;\n openList.add(currentTile);\n\n boolean notDone = true;\n\n while (notDone) {\n neighbours.clear();\n currentTile = getLowestCostTileFromOpenList(openList, currentTile);\n closedList.add(currentTile);\n openList.remove(currentTile);\n\n //ReachedGoal?\n if ((currentTile.xTileCoord == destinationTileCoord.x) && (currentTile.yTileCoord == destinationTileCoord.y)) {\n try {\n return getResultListOfMapTiles(currentTile);\n } catch (Exception e) {\n System.out.println(\"closed list size: \" + closedList.size());\n throw e;\n }\n }\n\n neighbours.addAll(currentTile.getNeighbourTiles());\n neighbours.removeAll(closedList);\n\n for (MapTile mapTile : neighbours) {\n if (openList.contains(mapTile)) {\n // compare total movement costs.\n if (mapTile.totalMovementCost > currentTile.getMovementCostToTile(mapTile) + currentTile.totalMovementCost) {\n mapTile.setParentMapTile(currentTile);\n mapTile.totalMovementCost = currentTile.getMovementCostToTile(mapTile) + currentTile.totalMovementCost;\n }\n } else {\n mapTile.setParentMapTile(currentTile);\n mapTile.totalMovementCost = currentTile.totalMovementCost + currentTile.getMovementCostToTile(mapTile);\n openList.add(mapTile);\n }\n }\n }\n return null;\n }", "public void generate_maze()\n\t{\n\t\tint i, j, r, c;\n\n\t\t// choose a cell at random and make it the current cell\n\t\tRandom rand = new Random(666);\n\t\tr = (int)(rand.nextFloat() * (ROWS - 1));\n\t\tc = (int)(rand.nextFloat() * (COLS - 1));\n\t\tint[] curr = {r,c}; // current search location\n\t\tint visited = 1;\n\t\tint total = ROWS*COLS;\n\t\tint tos = 0; // index for top of cell stack \n\n\t\t// arrays of single step movements between cells\n\t\t// north east south west\n\t\tint[][] move = {{-1, 0}, {0, 1}, {1, 0}, {0,-1}};\n\t\tint[][] next = {{0, 0}, {0, 0}, {0, 0}, {0, 0}};\n\n\t\twhile (visited < total)\n\t\t{\n\t\t\t// find all neighbors of current cell with all walls intact\n\t\t\tj = 0;\n\t\t\tfor (i = 0; i < 4; i++)\n\t\t\t{\n\t\t\t\tr = curr[0] + move[i][0];\n\t\t\t\tc = curr[1] + move[i][1];\n\n\t\t\t\t// check for valid next cell\n\t\t\t\tif ((0 <= r) && (r < ROWS) && (0 <= c) && (c < COLS))\n\t\t\t\t{\n\t\t\t\t\t// check if previously visited\n\t\t\t\t\tif ((Maze[r][c] == 15))//N) && (Maze[r][c] == E) && (Maze[r][c] == S) && (Maze[r][c] == W))\n\t\t\t\t\t{\n\t\t\t\t\t\t// not visited, so add to possible next cells\n\t\t\t\t\t\tnext[j][0] = r;\n\t\t\t\t\t\tnext[j][1] = c;\n\t\t\t\t\t\tj++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (j > 0)\n\t\t\t{\n\t\t\t\t// current cell has one or more unvisited neighbors, so choose one at random \n\t\t\t\t// and knock down the wall between it and the current cell\n\t\t\t\ti = (int)(rand.nextFloat() * (j-1));\n\n\t\t\t\tif ((next[i][0] - curr[0]) == 0) // next on same row\n\t\t\t\t{\n\t\t\t\t\tr = next[i][0];\n\t\t\t\t\tif (next[i][1] > curr[1]) // move east\n\t\t\t\t\t{\n\t\t\t\t\t\tc = curr[1];\n\t\t\t\t\t\tMaze[r][c] &= ~E; // clear E wall\n\t\t\t\t\t\tc = next[i][1];\n\t\t\t\t\t\tMaze[r][c] &= ~W; // clear W wall\n\t\t\t\t\t}\n\t\t\t\t\telse // move west\n\t\t\t\t\t{\n\t\t\t\t\t\tc = curr[1];\n\t\t\t\t\t\tMaze[r][c] &= ~W; // clear W wall\n\t\t\t\t\t\tc = next[i][1];\n\t\t\t\t\t\tMaze[r][c] &= ~E; // clear E wall\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse // next on same column\n\t\t\t\t{\n\t\t\t\t\tc = next[i][1];\n\t\t\t\t\t if (next[i][0] > curr[0]) // move south \n\t\t\t\t\t {\n\t\t\t\t\t \tr = curr[0];\n\t\t\t\t\t \tMaze[r][c] &= ~S; // clear S wall\n\t\t\t\t\t \tr = next[i][0];\n\t\t\t\t\t \tMaze[r][c] &= ~N; // clear N wall\n\t\t\t\t\t }\n\t\t\t\t\t else // move north\n\t\t\t\t\t {\n\t\t\t\t\t \tr = curr[0];\n\t\t\t\t\t \tMaze[r][c] &= ~N; // clear N wall\n\t\t\t\t\t \tr = next[i][0];\n\t\t\t\t\t \tMaze[r][c] &= ~S; // clear S wall\n\t\t\t\t\t }\n\t\t\t\t}\n\n\t\t\t\ttos++; // push current cell location\n\t\t\t\tstack.elementAt(tos)[0] = curr[0];\n\t\t\t\tstack.elementAt(tos)[1] = curr[1];\n\n\t\t\t\tcurr[0] = next[i][0]; // make next cell the current cell\n\t\t\t\tcurr[1] = next[i][1];\n\n\t\t\t\tvisited++; // increment count of visited cells\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// reached dead end, backtrack\n\t\t\t\t// pop the most recent cell from the cell stack \n\t\t\t\t// and make it the current cell\n\t\t\t\tcurr[0] = stack.elementAt(tos)[0];\n\t\t\t\tcurr[1] = stack.elementAt(tos)[1];\n\t\t\t\ttos--;\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void testLength(){\n assertEquals(5, largeMaze.length());\n }", "@Test\n public void testMultiplePlankPositionsMaze() {\n try {\n //link row 1\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n\n //link row 2\n smallMaze.linkPillars(Maze.position(0, 1), Maze.position(0, 2));\n smallMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n smallMaze.linkPillars(Maze.position(1, 1), Maze.position(1, 2));\n\n //link row 3\n smallMaze.linkPillars(Maze.position(0, 2), Maze.position(1, 2));\n smallMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //set beginning and end\n smallMaze.setBegin(Maze.position(0, 0));\n smallMaze.setEnd(Maze.position(2, 2));\n shortestPath = MazeSolver.pStar(smallMaze, 9);\n\n assertEquals(5, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public static String findPath(Maze maze) {\n \tint m = maze.getNumRows();\n \tint n = maze.getNumCols();\n\n \t//define a visited matrix\n \tboolean[][] visited = new boolean[m][n];\n \tsetvisited(false, visited);\n\n \t//define a direction matrix\n \tint[][] dir_mtr = new int[m][n];\n \tinit_dir(-1,dir_mtr);\n\n\n\n \t//define a stack\n \tStack<MazeLocation> s;\n \ts = new StackRefBased<MazeLocation>();\n\n \tMazeLocation entry = maze.getEntry();\n \tMazeLocation exit = maze.getExit();\n \t// System.out.println(entry.toString());\n \ts.push(entry);\n\n\t\tMazeLocation temp; \n\t\tString result = \"\"; \t\n\n\t\ttry{\n\t\t\tint x,y;\n\n\n\t\t\twhile(!s.isEmpty()){\n\n \t\ttemp = s.peek();\n \t\tx = temp.getRow();\n \t\ty = temp.getCol();\n \t\tdir_mtr[x][y]+=1;\n\n \t\tif(temp.toString().equals(exit.toString())){\n \t\t\tSystem.out.println(\"find the path\");\n \t\t\tbreak;\n\n \t\t}\n\n \t\tif(dir_mtr[x][y]==0){ \n \t\t\t//checking the up direction\n \t\t\tif(x-1>=0 && !maze.isWall(x-1,y) && !visited[x-1][y]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x-1,y,maze.isWall(x-1,y));\n \t\t\t\tvisited[x-1][y] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n\n \t\t}else if(dir_mtr[x][y]==1){\n \t\t\t//checking the left direction\n \t\t\tif(y-1>=0 && !maze.isWall(x,y-1) && !visited[x][y-1]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x,y-1,maze.isWall(x,y-1));\n \t\t\t\tvisited[x][y-1] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n\n \t\t}else if(dir_mtr[x][y]==2){\n \t\t\t//checking the down direction\n \t\t\tif(x+1<m && !maze.isWall(x+1,y) && !visited[x+1][y]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x+1,y,maze.isWall(x+1,y));\n \t\t\t\tvisited[x+1][y] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n \t\t\t\n \t\t}else if(dir_mtr[x][y]==3){\n \t\t\t//checking the right direction\n \t\t\tif(y+1<n && !maze.isWall(x,y+1) && !visited[x][y+1]){\n \t\t\t\tMazeLocation testnode = new MazeLocation(x,y+1,maze.isWall(x,y+1));\n \t\t\t\tvisited[x][y+1] = true;\n \t\t\t\ts.push(testnode);\n\n \t\t\t}\n \t\t\t\n \t\t}else{\n \t\t\tvisited[x][y] = false;\n \t\t\ts.pop();\n \t\t}\n\n\n\n \t\t\n \t}\n\n \t//reverse the stack\n \tStack<MazeLocation> reverse;\n \treverse = new StackRefBased<MazeLocation>();\n \twhile(!s.isEmpty()){\n\t\t\t reverse.push(s.pop()); \t//push the node to the reverse stack\n\t\t\t }\n\n\n \t//if the stack is not empty, then we find the path\n\t\tif(!reverse.isEmpty()){\n\t\t\tresult = reverse.toString();\n\n\t\t}\n\n \t\n \n\n\t\t}\n\t\tcatch (StackEmptyException see) {\n \n }\n\n\n \treturn result;\n\n\n }", "Long[] searchSolution(int timeLimit, Graph g);", "@Override\n public void postRound() {\n super.postRound();\n Integer res = 0;\n if(this.algorithm_choosed!=-1){\n switch(this.algorithm_choosed) {\n case 1:\n if((res=this.checkingIfAllNodesHasFinished())!=-1 && !this.first_Algorithm){\n this.first_Algorithm = true;\n Tools.appendToOutput(\"Algorithm1 converge in '\" + Tools.getGlobalTime() + \"'Steps'\\n\");\n Tools.appendToOutput(\"Algorithm1 find this size of max matching \"+res+\"\\n\");\n }\n break;\n case 2:\n if ((res=this.checkingIfAllNodesHasFinished())!=-1 && !this.second_Algorithm) {\n this.second_Algorithm = true;\n Tools.appendToOutput(\"Algorithm2 converge in '\" + Tools.getGlobalTime() + \"'Steps'\\n\");\n Tools.appendToOutput(\"Algorithm2 find this size of max matching \"+res+\"\\n\");\n }\n break;\n case 3:\n if ((res=this.checkingIfAllNodesHasFinished())!=-1 && !this.third_Algorithm) {\n this.third_Algorithm = true;\n Tools.appendToOutput(\"Algorithm3 converge in '\" + Tools.getGlobalTime() + \"'Steps'\\n\");\n Tools.appendToOutput(\"Algorithm3 find this size of max matching \"+res+\"\\n\");\n this.tempFourth = res;\n }\n break;\n case 4:\n if(!this.fourth_algorithm && (res=this.checkingIfAllNodesHasFinished())!=-1) {\n Integer c = 0;\n this.fourth_algorithm = true;\n Tools.appendToOutput(\"Maximal converge in '\" + Tools.getGlobalTime() + \"'Steps'\\n\");\n Tools.appendToOutput(\"Maximal matching size is = \"+res+\"\\n\");\n //log.logln(\"Try to find the optimum!!!\");\n for (Iterator<Node> it = Tools.getNodeList().iterator(); it.hasNext();) {\n MS4Node node = (MS4Node) it.next();\n if(node.isMarried()){\n c+=1;\n }\n node.setFindTheOptimum();\n node.end_flag = false;\n }\n this.printTheMarriages();\n //log.logln(\"Total number of nodes married = \"+c);\n this.tempFourth = res;\n }\n if(this.fourth_algorithm && (res=this.checkingIfAllNodesHasFinished())!=-1 && !this.approximazion_alg){\n Tools.appendToOutput(\"RES ---->\"+res+\"\\n\");\n for(Iterator<Node> it = Tools.getNodeList().iterator();it.hasNext();){\n MS4Node node = (MS4Node)it.next();\n if(node.isSecondMatchDone()){\n //Tools.appendToOutput(\"**NODE with a success in MATCH SECOND ==\"+node.ID+\" \\n\");\n node.setColorToEdgeAndNodes(Color.BLACK, Tools.getNodeByID(node.pointingNode));\n Tools.getNodeByID(node.pointingNode).setColor(node.defaultColor);\n node.setColorToEdgeAndNodes(Color.MAGENTA, Tools.getNodeByID(node.getP_v()));\n ((MS4Node)Tools.getNodeByID(node.getP_v())).isMarried = true;\n MS4Node married = (MS4Node)Tools.getNodeByID(node.getPointingNode());\n married.setColorToEdgeAndNodes(Color.MAGENTA,Tools.getNodeByID(married.getP_v()));\n ((MS4Node)Tools.getNodeByID(married.getP_v())).isMarried = true;\n }\n }\n Integer newRes = checkingIfAllNodesHasFinished();\n Tools.appendToOutput(\"Approx algorithm converge in '\" + Tools.getGlobalTime() + \"'Steps'\\n\");\n Tools.appendToOutput(\"New Maximal matching size is = \"+newRes+\" so improved by \"+(newRes-tempFourth)+\"\\n\");\n //log.logln(\"--------------------APPROX RESULT-----------------------------\");\n Integer count = 0;\n for(Iterator<Node> it = Tools.getNodeList().iterator();it.hasNext();){\n MS4Node node = (MS4Node)it.next();\n if(node.isMarried()) {\n count++;\n }\n }\n this.printTheMarriages();\n //log.logln(\"----------------NUMBER OF MARRIED : \"+count+\"-----------------------------\");\n this.approximazion_alg = true;\n break;\n }\n case 5:\n if ((res=this.checkingIfAllNodesHasFinished())!=-1 && !this.fifth_algorithm) {\n this.fifth_algorithm = true;\n Tools.appendToOutput(\"Algorithm3_probabilistic converge in '\" + Tools.getGlobalTime() + \"'Steps'\\n\");\n Tools.appendToOutput(\"Algorithm3_probabilistic find this size of max matching \" + res + \"\\n\");\n }\n\n }\n }\n }", "@Test\n public void testImpossibleTraversalMaze() {\n try {\n //link row 1\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 3\n smallMaze.linkPillars(Maze.position(0, 2), Maze.position(1, 2));\n\n //set beginning and end\n smallMaze.setBegin(Maze.position(0, 0));\n smallMaze.setEnd(Maze.position(2, 2));\n shortestPath = MazeSolver.pStar(smallMaze, 9);\n\n assertEquals(null, shortestPath);\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static void main(String[] args) {\n\t\tString grid = Mission_Impossible.gen_grid();\n\t\tlong start = System.currentTimeMillis();\n\t\tMission_Impossible.solve(grid, \"BF\", false);\n\t\tSystem.out.println(\"Total Time\");\n\t\tSystem.out.println(System.currentTimeMillis() - start);\n\n\t}", "public static void main(String[] args) {\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 3, 4, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 3, 5, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 3, 4, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 3, 5, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, \"cartellainesistente\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, \"strategies\")));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(2, 2, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(3, 3, 3, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 5, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(5, 5, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(6, 6, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(6, 6, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 3, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 3, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(7, 7, 2, true, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(7, 7, 2, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 4, false, null)));\n tryOrPrintStackTrace(() -> measureTime(() -> testOptimalMNK(4, 4, 4, true, null)));\n measureTime(()->checkInterruptSequential(4, 4, 3, false));\n measureTime(()->checkInterruptSequential(4, 4, 3, true));\n }", "double getSolverTimeLimitSeconds();", "public void solve() {\n System.out.println(\"Solving...\");\n solving = true;\n Solver s = new Solver(b.getBoard());\n ArrayList<Integer> solution = s.solve();\n\n System.out.println(\"Printing solution...\");\n try{\n Thread.sleep(300);\n }catch (Exception e){}\n\n solution.trimToSize();\n\n solveMoves = solution;\n\n Board bRef = new Board(b.getBoard());\n\n System.out.println(\"Step 0\");\n System.out.println(bRef.toString());\n\n for (int i = 0; i < solution.size(); i++) {\n bRef.move(solution.get(i));\n System.out.println(\"Step \" + (i + 1));\n System.out.println(bRef.toString());\n }\n\n System.out.println(\"Solved by Computer in \" + solution.size()+ \" move(s).\\n\");\n System.out.println(\"Left-click screen to follow steps.\");\n System.out.println(\"Right-click the screen to play again.\");\n\n solveStep = 0; //Reset for user\n }", "@Test\n public void testPathAlongBorder() {\n try {\n //link row 1\n largeMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n largeMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n largeMaze.linkPillars(Maze.position(2, 0), Maze.position(3, 0));\n largeMaze.linkPillars(Maze.position(3, 0), Maze.position(4, 0));\n largeMaze.linkPillars(Maze.position(4, 0), Maze.position(4, 1));\n\n //link row 2\n largeMaze.linkPillars(Maze.position(4, 1), Maze.position(4, 2));\n\n //link row 3\n largeMaze.linkPillars(Maze.position(4, 2), Maze.position(4, 3));\n\n //link row 4\n largeMaze.linkPillars(Maze.position(4, 3), Maze.position(4, 4));\n\n //set beginning and end\n largeMaze.setBegin(Maze.position(0, 0));\n largeMaze.setEnd(Maze.position(4, 4));\n shortestPath = MazeSolver.pStar(largeMaze, 25);\n\n assertEquals(\"<0, 0>\", shortestPath.get(0).getCoordinateString());\n assertEquals(\"<1, 0>\", shortestPath.get(1).getCoordinateString());\n assertEquals(\"<2, 0>\", shortestPath.get(2).getCoordinateString());\n assertEquals(\"<3, 0>\", shortestPath.get(3).getCoordinateString());\n assertEquals(\"<4, 0>\", shortestPath.get(4).getCoordinateString());\n assertEquals(\"<4, 1>\", shortestPath.get(5).getCoordinateString());\n assertEquals(\"<4, 2>\", shortestPath.get(6).getCoordinateString());\n assertEquals(\"<4, 3>\", shortestPath.get(7).getCoordinateString());\n assertEquals(\"<4, 4>\", shortestPath.get(8).getCoordinateString());\n\n assertEquals(9, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public static void main(String[] args) throws FileNotFoundException, IOException {\r\n\r\n //Creating an instance object of the class PathBetweenNodes\r\n PathBetweenNodes x = new PathBetweenNodes();\r\n x.graph = new PathBetweenNodes();\r\n x.readMaze(); // reading the maze from the file\r\n LinkedList<String> visited = new LinkedList<String>(); // creating an array called visited to store visited nodes\r\n System.out.println(\"Enter the source node:\");//asking user to enter the start node\r\n Scanner sc = new Scanner(System.in); // Scanner to input the start node into the system\r\n START = sc.next();\r\n System.out.println(\"Enter the destination node:\");// asking user to input the destination node\r\n END = sc.next(); //scan the destination node into the system\r\n mode(option);\r\n startTimer = System.nanoTime();\r\n visited.add(START);// adding the start node to array visited\r\n new PathBetweenNodes().breadthFirst(x.graph, visited); // implementing the breath first search for graph x and array visited\r\n sc.close(); // scanner must be closed\r\n if (x.graph.flag) {\r\n System.out.println(\"There is existing path between \" + START + \" and \" + END + \" as above.\");\r\n }\r\n if (!x.graph.flag) {\r\n System.out.println(\"No path was found between \" + START + \" and \" + END + \".\");\r\n }\r\n endTimer = System.nanoTime();\r\n long TimeElapsed = endTimer - startTimer;\r\n System.out.println(\"Time taken to solve the maze = \" + TimeElapsed + \" Nano seconds.\");\r\n }", "public static void main(String[] args) {\n\n long preTime = System.currentTimeMillis();\n System.out.println(\"Possible moves to traverse Grid -> \" + gridMemo(15, 15));\n long postTime = System.currentTimeMillis();\n System.out.println(\"Time taken to compute in milliseconds-> \" + (postTime - preTime));\n\n// long preTime = System.currentTimeMillis();\n// System.out.println(\"Possible moves to traverse Grid -> \" + gridBottomUp(15, 15));\n// long postTime = System.currentTimeMillis();\n// System.out.println(\"Time taken to compute in milliseconds-> \" + (postTime - preTime));\n\n }", "private void constructMaze() {\r\n\t\t\r\n\t\t// manual code to construct a sample maze going cell by cell\r\n\t\tgridSheet[0][0].breakSouthWall();\r\n\t\tgridSheet[1][0].breakEastWall();\r\n\t\tgridSheet[1][1].breakSouthWall();\r\n\t\tgridSheet[2][1].breakWestWall();\r\n\t\tgridSheet[2][0].breakSouthWall();\r\n\t\tgridSheet[2][1].breakEastWall();\r\n\t\tgridSheet[2][2].breakSouthWall();\r\n\t\tgridSheet[3][2].breakSouthWall();\r\n\t\tgridSheet[4][2].breakWestWall();\r\n\t\tgridSheet[4][1].breakNorthWall();\r\n\t\tgridSheet[4][1].breakWestWall();\r\n\t\tgridSheet[2][2].breakEastWall();\r\n\t\tgridSheet[2][3].breakNorthWall();\r\n\t\tgridSheet[1][3].breakWestWall();\r\n\t\tgridSheet[1][3].breakNorthWall();\r\n\t\tgridSheet[0][3].breakWestWall();\r\n\t\tgridSheet[0][2].breakWestWall();\r\n\t\tgridSheet[0][3].breakEastWall();\r\n\t\tgridSheet[0][4].breakSouthWall();\r\n\t\tgridSheet[1][4].breakSouthWall();\r\n\t\tgridSheet[2][4].breakSouthWall();\r\n\t\tgridSheet[3][4].breakWestWall();\r\n\t\tgridSheet[3][4].breakSouthWall();\r\n\t\tgridSheet[4][4].breakWestWall();\r\n\t\t\r\n\t}", "@Override\n\tpublic boolean drive2Exit() throws Exception {\n\t\tint[][] timesVisited = new int[width][height];\n\t\tfor (int i = 0; i < timesVisited.length; i++) {\n\t\t\tfor (int j = 0; j < timesVisited[0].length; j++) {\n\t\t\t\ttimesVisited[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\twhile (robot.isAtExit() == false) {\n\t\t\t/* start a list of potential positions to move to. */\n\t\t\tLinkedList<CardinalDirectionNumVisitsPair> possibleDirections = new LinkedList<CardinalDirectionNumVisitsPair>();\n\t\t\t\n\t\t\t/* get the directions and number of visits to all accessible adjacent spaces. */\n\t\t\tint robotX = robot.getCurrentPosition()[0];\n\t\t\tint robotY = robot.getCurrentPosition()[1];\n\t\t\taddCardinalDirectionNumVisitsPairIfValid(robotX + 1, robotY, CardinalDirection.East, possibleDirections, timesVisited);\n\t\t\taddCardinalDirectionNumVisitsPairIfValid(robotX - 1, robotY, CardinalDirection.West, possibleDirections, timesVisited);\n\t\t\taddCardinalDirectionNumVisitsPairIfValid(robotX, robotY + 1, CardinalDirection.North, possibleDirections, timesVisited);\n\t\t\taddCardinalDirectionNumVisitsPairIfValid(robotX, robotY - 1, CardinalDirection.South, possibleDirections, timesVisited);\n\t\t\t\n\t\t\t/* find the minimum number of visits. */\n\t\t\tint minVisits = Integer.MAX_VALUE;\n\t\t\tfor (CardinalDirectionNumVisitsPair pair : possibleDirections) {\n\t\t\t\tif (pair.numVisits < minVisits) {\n\t\t\t\t\tminVisits = pair.numVisits;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* remove all pairs that do NOT have minVisits visits from the list. */\n\t\t\tfor (Iterator<CardinalDirectionNumVisitsPair> iterator = possibleDirections.listIterator(); iterator.hasNext(); ) {\n\t\t\t CardinalDirectionNumVisitsPair pair = iterator.next();\n\t\t\t if (pair.numVisits != minVisits) {\n\t\t\t iterator.remove();\n\t\t\t }\n\t\t\t}\n\t\t\t\n\t\t\t/* the list now contains only spaces that have the minimum number of visits. */\n\t\t\t/* pick randomly from the list. */\n\t\t\tint randomIndex = (int) Math.floor(Math.random() * possibleDirections.size());\n\t\t\tCardinalDirectionNumVisitsPair randomPair = possibleDirections.get(randomIndex);\n\t\t\t\n\t\t\t/* turn to face that direction. */\n\t\t\trobot.turnToDirection(randomPair.cardinalDirection);\n\t\t\t\n\t\t\t/* move. */\n\t\t\trobot.move(1, false);\n\t\t\t\n\t\t\t/* update the numVisits array. */\n\t\t\ttimesVisited[robot.getCurrentPosition()[0]][robot.getCurrentPosition()[1]]++;\n\t\t}\n\t\t\n\t\treturn robot.stepOutOfExit();\n\t}", "public boolean solveMaze(char[][] maze, int row, int col) {\n if (row < 0 || row >= maze.length) {\r\n return false;\r\n }\r\n // Not even in the maze\r\n if (col < 0 || col >= maze.length) {\r\n return false;\r\n }\r\n // Can't move to this spot(Hit a wall and hit a spot that it has already been to)\r\n if (maze[row][col] == 'X' || maze[row][col] == '+') {\r\n return false;\r\n }\r\n // Winning condition: Found the exit\r\n if (maze[row][col] == 'E') {\r\n // Found the exit\r\n return true;\r\n }\r\n\r\n // Mark spot as visited\r\n maze[row][col] = '+';\r\n // Try north\r\n // Try path with new row, if successful, then it is done\r\n if (solveMaze(maze, row - 1, col)) {\r\n return true;\r\n }\r\n\r\n // Try east\r\n if (solveMaze(maze, row, col + 1)) {\r\n return true;\r\n }\r\n\r\n // Try south\r\n if (solveMaze(maze, row + 1, col)) {\r\n return true;\r\n }\r\n\r\n // Try west\r\n if (solveMaze(maze, row, col - 1)) {\r\n return true;\r\n }\r\n\r\n // Tried every direction = NO GOOD!\r\n // \"Unvisit\" the spot\r\n maze[row][col] = '.';\r\n return false;\r\n\r\n }", "public void findShortestPath() {\r\n\t\t\r\n\t\t//Create a circular array that will store the possible next tiles in the different paths.\r\n\t\tOrderedCircularArray<MapCell> path = new OrderedCircularArray<MapCell>();\r\n\t\t\r\n\t\t//Acquire the starting cell.\r\n\t\tMapCell starting = cityMap.getStart();\r\n\t\t\r\n\t\t//This variable is to be updated continuously with the cell with the shortest distance value in the circular array.\r\n\t\tMapCell current=null;\r\n\t\t\r\n\t\t//This variable is to check if the destination has been reached, which is initially false.\r\n\t\tboolean destination = false;\r\n\t\t\r\n\t\t//Add the starting cell into the circular array, and mark it in the list.\r\n\t\tpath.insert(starting, 0);\r\n\t\t\r\n\t\tstarting.markInList(); \r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//As long as the circular array isn't empty, and the destination hasn't been reached, run this loop.\r\n\t\t\twhile(!path.isEmpty()&&!destination) {\r\n\t\t\t\t\r\n\t\t\t\t//Take the cell with the shortest distance out of the circular array, and mark it accordingly.\r\n\t\t\t\tcurrent = path.getSmallest();\r\n\t\t\t\tcurrent.markOutList();\r\n\t\t\t\t\r\n\t\t\t\tMapCell next;\r\n\t\t\t\tint distance;\r\n\t\t\t\t\r\n\t\t\t\tif(current.isDestination()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdestination = true; //If the current cell is the destination, end the loop.\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnext = nextCell(current); //Acquire the next possible neighbour of the current cell.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Don't run if next is null, meaning there is no other possible neighbour in the path for the current cell.\r\n\t\t\t\t\twhile(next!=null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = current.getDistanceToStart() + 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If the distance of the selected neighbouring cell is currently more than 1 more than the current cell's \r\n\t\t\t\t\t\t//distance, update the distance of the neighbouring cell. Then, set the current cell as its predecessor.\r\n\t\t\t\t\t\tif(next.getDistanceToStart()>distance) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tnext.setDistanceToStart(distance);\r\n\t\t\t\t\t\t\tnext.setPredecessor(current);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = next.getDistanceToStart(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(next.isMarkedInList() && distance<path.getValue(next)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.changeValue(next, distance); //If the neighbouring cell is in the circular array, but with a \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //larger distance value than the new updated distance, change its value.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if(!next.isMarkedInList()){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.insert(next, distance); //If the neighbouring cell isn't in the circular array, add it in.\r\n\t\t\t\t\t\t\tnext.markInList();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnext = nextCell(current); //Look for the next possible neighbour, if any.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Catch all the possible exceptions that might be thrown by the method calls. Print the appropriate messages.\r\n\t\t} catch (EmptyListException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidNeighbourIndexException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The program tried to access an invalid neighbour of a tile.\");\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidDataItemException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage()+\" Path finding execution has stopped.\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//If a path was found, print the number of tiles in the path.\r\n\t\tif(destination) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Number of tiles in path: \" + (current.getDistanceToStart()+1));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"No path found.\"); //Otherwise, indicate that a path wasn't found.\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public void run(){\n\t\tlong start_time, end_time, time_elapsed;\n System.out.println(\"Starting Problem \"+problem_number);\n start_time = System.currentTimeMillis();\n\t\t\n\t\tint matrixRows = 20;\n\t\tint matrixColumns = 20;\n\t\tint counter = 0;\n\t\tint num_of_adj = 4;\n\t\tString source = \"08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80 24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 24 55 58 05 66 73 99 26 97 17 78 78 96 83 14 88 34 89 63 72 21 36 23 09 75 00 76 44 20 45 35 14 00 61 33 97 34 31 33 95 78 17 53 28 22 75 31 67 15 94 03 80 04 62 16 14 09 53 56 92 16 39 05 42 96 35 31 47 55 58 88 24 00 17 54 24 36 29 85 57 86 56 00 48 35 71 89 07 05 44 44 37 44 60 21 58 51 54 17 58 19 80 81 68 05 94 47 69 28 73 92 13 86 52 17 77 04 89 55 40 04 52 08 83 97 35 99 16 07 97 57 32 16 26 26 79 33 27 98 66 88 36 68 87 57 62 20 72 03 46 33 67 46 55 12 32 63 93 53 69 04 42 16 73 38 25 39 11 24 94 72 18 08 46 29 32 40 62 76 36 20 69 36 41 72 30 23 88 34 62 99 69 82 67 59 85 74 04 36 16 20 73 35 29 78 31 90 01 74 31 49 71 48 86 81 16 23 57 05 54 01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48\";\n\t\t\n\t\tString[] individualNums = source.split(\" \");\n\t\tmyMatrix m = new myMatrix(matrixRows, matrixColumns);\n\t\tArrayList<Integer> highest_factors = new ArrayList<Integer>();\n\t\tint highest_factor_product = 0;\n\t\tint temp_highest_factor_product = 1;\n\t\t\n\t\tfor(int i=0; i<m.getNumOfRows(); i++){\n\t\t\tfor(int j=0; j<m.getNumOfColumns(); j++){\t\t\t\t\n\t\t\t\tm.setMatrixEntry(i, j, Integer.valueOf(individualNums[counter]));\n\t\t\t\tcounter++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(m);\n\t\t\n\t\t//up and down products\n\t\tfor(int i=0; i<m.getNumOfRows()-num_of_adj; i++){\t\t\t\n\t\t\tfor(int j=0; j<m.getNumOfColumns(); j++){\n\t\t\t\t\n\t\t\t\ttemp_highest_factor_product = 1;\n\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\ttemp_highest_factor_product = temp_highest_factor_product * m.getMatrixEntry(i+k, j);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(temp_highest_factor_product > highest_factor_product){\n\t\t\t\t\thighest_factor_product = temp_highest_factor_product;\n\t\t\t\t\thighest_factors.clear();\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\t\thighest_factors.add(m.getMatrixEntry(i+k, j));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//left and right products\n\t\tfor(int i=0; i<m.getNumOfRows(); i++){\t\t\t\n\t\t\tfor(int j=0; j<m.getNumOfColumns()-num_of_adj; j++){\n\t\t\t\t\n\t\t\t\ttemp_highest_factor_product = 1;\n\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\ttemp_highest_factor_product = temp_highest_factor_product * m.getMatrixEntry(i, j+k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(temp_highest_factor_product > highest_factor_product){\n\t\t\t\t\thighest_factor_product = temp_highest_factor_product;\n\t\t\t\t\thighest_factors.clear();\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\t\thighest_factors.add(m.getMatrixEntry(i, j+k));\n\t\t\t\t\t}\t\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t//NW to SE diagonals\n\t\tfor(int i=0; i<m.getNumOfRows()-num_of_adj; i++){\t\t\t\n\t\t\tfor(int j=0; j<m.getNumOfColumns()-num_of_adj; j++){\n\t\t\t\t\n\t\t\t\ttemp_highest_factor_product = 1;\n\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\ttemp_highest_factor_product = temp_highest_factor_product * m.getMatrixEntry(i+k, j+k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(temp_highest_factor_product > highest_factor_product){\n\t\t\t\t\thighest_factor_product = temp_highest_factor_product;\n\t\t\t\t\thighest_factors.clear();\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\t\thighest_factors.add(m.getMatrixEntry(i, j+k));\n\t\t\t\t\t}\t\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t//SW to NE diagonals\n\t\tfor(int i=0+num_of_adj-1; i<m.getNumOfRows(); i++){\t\t\t\n\t\t\tfor(int j=0+num_of_adj-1; j<m.getNumOfColumns(); j++){\n\t\t\t\t\n\t\t\t\ttemp_highest_factor_product = 1;\n\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\ttemp_highest_factor_product = temp_highest_factor_product * m.getMatrixEntry(i-k, j+k);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(temp_highest_factor_product > highest_factor_product){\n\t\t\t\t\thighest_factor_product = temp_highest_factor_product;\n\t\t\t\t\thighest_factors.clear();\n\t\t\t\t\t\n\t\t\t\t\tfor(int k=0;k<num_of_adj; k++){\n\t\t\t\t\t\thighest_factors.add(m.getMatrixEntry(i-k, j+k));\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(highest_factor_product + \"\\n\\n\" + highest_factors);\n\t\t\n\t\tend_time = System.currentTimeMillis();\n System.out.println(\"Finished Problem\");\n time_elapsed = end_time - start_time;\n System.out.println(\"Time taken to finish problem: \"+time_elapsed);\n\t\t\n\t}", "public static void main(String[] args) {\n Sea sea;\n Explorer dory, marlin;\n int doryBetter=0, marlinBetter=0;\n for (int j=0; j<10; j++) {\n for (int i = 5; i < 105; i += 5) {\n sea = new Sea(i, i);\n dory = new Explorer(sea, new StackExploreList());\n dory.solve();\n int d, m;\n d = dory.getTotalVisited();\n sea.clearMaze();\n marlin = new Explorer(sea, new QueueExploreList());\n marlin.solve();\n m = marlin.getTotalVisited();\n if (d>m) doryBetter++;\n else marlinBetter ++;\n }\n }\n System.out.println(\"Number of times Dory found Nemo faster: \"+doryBetter+\"\\nNumber of times Marlin found Nemo Faster: \"+marlinBetter);\n }", "public void compute()\n\t{\n//\t\tROWS = parseInt(calc.rows.value, 10); // size of maze\n//\t\tCOLS = parseInt(calc.cols.value, 10);\n\n//\t\tif (isNaN(ROWS)||(ROWS < 0)||\n//\t\t\t\tisNaN(COLS)||(COLS < 0)) // check input\n//\t\t{\n//\t\t\twindow.alert(\"Invalid input!\");\n//\t\t\treturn;\n//\t\t}\n\n\t\tinit_cells(); // create and display a maze\n\t\tgenerate_maze();\n//\t\topen_window();\n\t\twriteout_maze();\n//\t\tclose_window();\n\t}", "public boolean solve(){\n // Go through the grid\n for(int row = 0; row < 5; row++){\n for(int col = 0; col < 5; col++){\n // If there is a free space, try and fill it\n if(numberGrid[row][col] == 0){\n for(int num = 1; num <=5; num++){\n if(isValid(num, row, col)) { // if number is valid fill it in\n numberGrid[row][col] = num;\n if(solve()){\n return true;\n }\n else{\n numberGrid[row][col] = 0; // reset number if no solution from this point\n }\n }\n }\n return false;\n }\n }\n }\n return true;\n }", "public void computeOptimalDir(CameraPlacementProblem problem)\n {\n \tint i, maxX = problem.getMaxX();\n \tint j, maxY = problem.getMaxY();\n \tint pos, maxTiles, angle, angleBest, goodCov;\n\n \tArrayList<Camera> cameraTestList = new ArrayList<Camera>();\n\n \t//Clear previous list\n \toptimalDir.clear();\n\n \tCameraPlacementResult result = null;\n \tCameraPlacementResult testResult = null;\n\n \t//Result of all previous cameras together in cameraList\n\t\tresult = CameraPlacement.evaluatePlacement(problem, cameraList);\n\n \t// iteratively walk along bottom wall (Must do all ext/int walls respectively)\n\t\tfor (pos = 1; pos < maxX; pos += posIncre)\n\t\t{\n\t\t\t//Quick check if current location is valid (saves time)\n\t\t\tif (!isValid(pos, 1))\n\t\t\t\tbreak;\n\n\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\tmaxTiles = 0;\n\t\t\tangleBest = 0;\n\n\t\t\t// Now iteratively through each possible angle \n\t\t\t//Increments of: 10 degrees\n\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t{\n\t\t\t\t//Create new testCamera\n\t\t\t\tCamera testCamera = new Camera(new Pointd(pos, 1), angle);\n\t\t\t\t\n\t\t\t\t//Initialize goodCov\n\t\t\t\tgoodCov = 0;\n\t\t\t\t\n\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\t//Result of newly created camera, alone\n\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\t//Compute total good Coverage by camera (# tiles covered that were prev uncovered)\n\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\n\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t{\n\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\tangleBest = angle;\n\t\t\t\t}\n\n\t\t\t\t//And clear single camera from testList\n\t\t\t\tcameraTestList.clear();\n\t\t\t}\n\n\t\t\tif (maxTiles > 0)\n\t\t\t{\n\t\t\t\t//Concatentate bestInfo into double array\n\t\t\t\tint[] info = new int[4];\n\t\t\t\tinfo[0] = angleBest;\n\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\tinfo[2] = pos;\n\t\t\t\tinfo[3] = 1;\n\n\t\t\t\t//Add tp optimalDir\n\t\t\t\toptimalDir.add(info);\n\t\t\t}\n\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t}\n\n\t\t// iteratively walk along top wall (Must do all ext/int walls respectively)\n\t\tfor (pos = 1; pos < maxX; pos += posIncre)\n\t\t{\n\t\t\tif (!isValid(pos, maxY - 1))\n\t\t\t\tbreak;\n\n\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\tmaxTiles = 0;\n\t\t\tangleBest = 0;\n\n\t\t\t// Now iteratively through each possible angle \n\t\t\t//Increments of: 10 degrees\n\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t{\n\t\t\t\tCamera testCamera = new Camera(new Pointd(pos, maxY - 1), angle);\n\t\t\t\t\n\t\t\t\t//Initialize goodCov\n\t\t\t\tgoodCov = 0;\n\n\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t{\n\n\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\tangleBest = angle;\n\t\t\t\t}\n\n\t\t\t\t//And clear single camera from testList\n\t\t\t\tcameraTestList.clear();\n\t\t\t}\n\n\t\t\tif (maxTiles > 0)\n\t\t\t{\n\t\t\t\tint[] info = new int[4];\n\t\t\t\tinfo[0] = angleBest;\n\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\tinfo[2] = pos;\n\t\t\t\tinfo[3] = maxY - 1;\n\n\t\t\t\t//Add tp optimalDir\n\t\t\t\toptimalDir.add(info);\n\t\t\t}\n\n\n\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t}\n\t\t\n\t\t// iteratively walk along left wall (Must do all ext/int walls respectively)\n\t\tfor (pos = 1; pos < maxY; pos += posIncre)\n\t\t{\n\n\t\t\tif (!isValid(1, pos))\n\t\t\t\tbreak;\n\n\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\tmaxTiles = 0;\n\t\t\tangleBest = 0;\n\t\t\t// Now iteratively through each possible angle \n\t\t\t//Increments of: 10 degrees\n\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t{\n\t\t\t\t//Create new testCamera\n\t\t\t\tCamera testCamera = new Camera(new Pointd(1, pos), angle);\n\t\t\t\t\n\t\t\t\t//Initialize goodCov\n\t\t\t\tgoodCov = 0;\n\n\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t{\n\n\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\tangleBest = angle;\t\n\n\t\t\t\t}\n\n\t\t\t\t//And clear single camera from testList\n\t\t\t\tcameraTestList.clear();\n\t\t\t}\n\n\t\t\t//coverageDir.add(coverageMatrix);\n\n\t\t\tif (maxTiles > 0)\n\t\t\t{\n\t\t\t\tint[] info = new int[4];\n\t\t\t\tinfo[0] = angleBest;\n\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\tinfo[2] = 1;\n\t\t\t\tinfo[3] = pos;\n\n\t\t\t\t//Add tp optimalDir\n\t\t\t\toptimalDir.add(info);\n\t\t\t}\n\n\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t}\n\n\t\t// iteratively walk along right wall (Must do all ext/int walls respectively)\n\t\tfor (pos = 1; pos < maxY; pos += posIncre)\n\t\t{\n\n\t\t\tif (!isValid(maxX - 1, pos))\n\t\t\t\tbreak;\n\n\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\tmaxTiles = 0;\n\t\t\tangleBest = 0;\n\t\t\t// Now iteratively through each possible angle \n\t\t\t//Increments of: 10 degrees\n\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t{\n\t\t\t\t//Create new testCamera\n\t\t\t\tCamera testCamera = new Camera(new Pointd(maxX - 1, pos), angle);\n\t\t\t\t\n\t\t\t\t//Initialize goodCov\n\t\t\t\tgoodCov = 0;\n\n\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t{\n\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\tangleBest = angle;\n\t\t\t\t}\n\n\t\t\t\t//And clear single camera from testList\n\t\t\t\tcameraTestList.clear();\n\t\t\t}\n\n\t\t\t//coverageDir.add(coverageMatrix);\n\n\t\t\tif (maxTiles > 0)\n\t\t\t{\n\t\t\t\tint[] info = new int[4];\n\t\t\t\tinfo[0] = angleBest;\n\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\tinfo[2] = maxX - 1;\n\t\t\t\tinfo[3] = pos;\n\n\t\t\t\t//Add tp optimalDir\n\t\t\t\toptimalDir.add(info);\n\t\t\t}\n\n\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t}\n\n\t\t//================================================\n\t\t// Now need to do interior walls:/\n\t\t//================================================\n\t\t\n\t\tArrayList<Wall> interiorWalls = problem.getInteriorWalls();\n\t\tIterator intWallItr = interiorWalls.iterator();\n\n\t\twhile (intWallItr.hasNext())\n\t\t{\n\n\t\t\tWall wall = (Wall) intWallItr.next();\n\n\t\t\t//If vertical int wall\n\t\t\tif (wall.start.x == wall.end.x) \n\t\t\t{\n\t\t\t\t//For left side of wall\n\t\t\t\tfor (pos = (int) wall.start.y; pos <= wall.end.y; pos += posIncre)\n\t\t\t\t{\n\n\t\t\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\t\t\tmaxTiles = 0;\n\t\t\t\t\tangleBest = 0;\n\t\t\t\t\t// Now iteratively through each possible angle \n\t\t\t\t\t//Increments of: 10 degrees\n\t\t\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Create new testCamera\n\t\t\t\t\t\tCamera testCamera = new Camera(new Pointd(wall.start.x, pos), angle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Initialize goodCov\n\t\t\t\t\t\tgoodCov = 0;\n\n\t\t\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\t\t\tangleBest = angle;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//And clear single camera from testList\n\t\t\t\t\t\tcameraTestList.clear();\n\t\t\t\t\t}\n\n\t\t\t\t\t//coverageDir.add(coverageMatrix);\n\n\t\t\t\t\tif (maxTiles > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tint[] info = new int[4];\n\t\t\t\t\t\tinfo[0] = angleBest;\n\t\t\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\t\t\tinfo[2] = (int) wall.start.x;\n\t\t\t\t\t\tinfo[3] = pos;\n\n\t\t\t\t\t\toptimalDir.add(info);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t//Add tp optimalDir\n\t\t\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t\t\t}\n\n\t\t\t\t//Now for right side of wall\n\t\t\t\tfor (pos = (int) wall.start.y; pos <= wall.end.y; pos += posIncre)\n\t\t\t\t{\n\n\t\t\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\t\t\tmaxTiles = 0;\n\t\t\t\t\tangleBest = 0;\n\t\t\t\t\t// Now iteratively through each possible angle \n\t\t\t\t\t//Increments of: 10 degrees\n\t\t\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Create new testCamera\n\t\t\t\t\t\tCamera testCamera = new Camera(new Pointd(wall.start.x + 1, pos), angle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Initialize goodCov\n\t\t\t\t\t\tgoodCov = 0;\n\n\t\t\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\t\t\tangleBest = angle;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//And clear single camera from testList\n\t\t\t\t\t\tcameraTestList.clear();\n\t\t\t\t\t}\n\n\t\t\t\t\t//coverageDir.add(coverageMatrix);\n\n\t\t\t\t\tif (maxTiles > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tint[] info = new int[4];\n\t\t\t\t\t\tinfo[0] = angleBest;\n\t\t\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\t\t\tinfo[2] = (int) wall.start.x + 1;\n\t\t\t\t\t\tinfo[3] = pos;\n\n\t\t\t\t\t\t//Add tp optimalDir\n\t\t\t\t\t\toptimalDir.add(info);\n\t\t\t\t\t}\n\n\n\t\t\t\n\t\t\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Else horizontal wall\n\t\t\telse\n\t\t\t{\n\t\t\t\t//For bottom side of wall\n\t\t\t\tfor (pos = (int) wall.start.x; pos <= wall.end.x; pos += posIncre)\n\t\t\t\t{\n\n\t\t\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\t\t\tmaxTiles = 0;\n\t\t\t\t\tangleBest = 0;\n\t\t\t\t\t// Now iteratively through each possible angle \n\t\t\t\t\t//Increments of: 10 degrees\n\t\t\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Create new testCamera\n\t\t\t\t\t\tCamera testCamera = new Camera(new Pointd(pos, wall.start.y), angle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Initialize goodCov\n\t\t\t\t\t\tgoodCov = 0;\n\n\t\t\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\t\t\tangleBest = angle;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//And clear single camera from testList\n\t\t\t\t\t\tcameraTestList.clear();\n\t\t\t\t\t}\n\n\t\t\t\t\t//coverageDir.add(coverageMatrix);\n\n\t\t\t\t\tif (maxTiles > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tint[] info = new int[4];\n\t\t\t\t\t\tinfo[0] = angleBest;\n\t\t\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\t\t\tinfo[2] = pos;\n\t\t\t\t\t\tinfo[3] = (int) wall.start.y;\n\n\t\t\t\t\t\t//Add tp optimalDir\n\t\t\t\t\t\toptimalDir.add(info);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t\t\t}\n\n\t\t\t\t//Now for top side of wall\n\t\t\t\tfor (pos = (int) wall.start.x; pos <= wall.end.x; pos += posIncre)\n\t\t\t\t{\n\n\t\t\t\t\t//int[][] coverageMatrix = preCompute(problem);\n\t\t\t\t\tmaxTiles = 0;\n\t\t\t\t\tangleBest = 0;\n\t\t\t\t\t// Now iteratively through each possible angle \n\t\t\t\t\t//Increments of: 10 degrees\n\t\t\t\t\tfor (angle = 0; angle < 360; angle += angleIncre)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Create new testCamera\n\t\t\t\t\t\tCamera testCamera = new Camera(new Pointd(pos, wall.start.y + 1), angle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Initialize goodCov\n\t\t\t\t\t\tgoodCov = 0;\n\n\t\t\t\t\t\tcameraTestList.add(testCamera);\n\n\t\t\t\t\t\ttestResult = CameraPlacement.evaluatePlacement(problem, cameraTestList);\n\n\t\t\t\t\t\tgoodCov = computeGoodCoverage(result, testResult, problem);\n\n\t\t\t\t\t\t// If current cam angles covers ANY tiles add to dummy matrix\n\t\t\t\t\t\tif (goodCov > 0 && testResult.numIllegalPlacements == 0 && goodCov > maxTiles) \n\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t//update maxTiles (minus any overlap present), and angleBest\n\t\t\t\t\t\t\tmaxTiles = goodCov;\n\t\t\t\t\t\t\tangleBest = angle;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//And clear single camera from testList\n\t\t\t\t\t\tcameraTestList.clear();\n\t\t\t\t\t}\n\n\t\t\t\t\t//coverageDir.add(coverageMatrix);\n\n\t\t\t\tif (maxTiles > 0)\n\t\t\t\t{\n\t\t\t\t\tint[] info = new int[4];\n\t\t\t\t\tinfo[0] = angleBest;\n\t\t\t\t\tinfo[1] = maxTiles;\n\t\t\t\t\tinfo[2] = pos;\n\t\t\t\t\tinfo[3] = (int) wall.start.y + 1;\n\n\t\t\t\t\t//Add tp optimalDir\n\t\t\t\t\toptimalDir.add(info);\n\t\t\t\t}\n\n\t\t\t\t\t//System.out.println(\"fin. with pos: \" + pos);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\t\n\n\t\t//for (j = 0; j < optimalDir.size(); j++)\n\t\t//\tSystem.out.println(\"[ \" + optimalDir.get(j)[0] + \" \" + optimalDir.get(j)[1] + \" \" + optimalDir.get(j)[2] + \" \" + optimalDir.get(j)[3] + \" ]\");\n }", "private void initializeGrid(Boolean makeMaze) {\r\n\t\t\tint oldRows = rows;\r\n\t\t\tint oldColumns = columns;\r\n\t\t\ttry {\r\n\t\t\t\tif (!rowsField.getText().isEmpty()) {\r\n\t\t\t\t\trows = Integer.parseInt(rowsField.getText());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(this, \"O Número de Linhas tem que ser respeitado! (5~50)\", \"Erro\",\r\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\trows = oldRows;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t} catch (NumberFormatException ex) {\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"O Número de Linhas tem que ser respeitado! (5~50)\", \"Erro\",\r\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\trows = oldRows;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (rows < 5 || rows > 50) {\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"O Número de Linhas tem que ser respeitado! (5~50)\", \"Erro\",\r\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\trows = oldRows;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tif (!columnsField.getText().isEmpty()) {\r\n\t\t\t\t\tcolumns = Integer.parseInt(columnsField.getText());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(this, \"O Número de Colunas tem que ser respeitado! (5~50)\", \"Erro\",\r\n\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\tcolumns = oldColumns;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t} catch (NumberFormatException ex) {\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"O Número de Colunas tem que ser respeitado! (5~50)\", \"Erro\",\r\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tcolumns = oldColumns;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif (columns < 5 || columns > 50) {\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"O Número de Colunas tem que ser respeitado! (5~50)\", \"Erro\",\r\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\r\n\t\t\t\tcolumns = oldColumns;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tsquareSize = 500 / (rows > columns ? rows : columns);\r\n\t\t\tarrowSize = squareSize / 2;\r\n\t\t\t// the maze must have an odd number of rows and columns\r\n\t\t\tif (makeMaze && rows % 2 == 0) {\r\n\t\t\t\trows -= 1;\r\n\t\t\t}\r\n\t\t\tif (makeMaze && columns % 2 == 0) {\r\n\t\t\t\tcolumns -= 1;\r\n\t\t\t}\r\n\t\t\tgrid = new int[rows][columns];\r\n\t\t\trobotStart = new Cell(rows - 2, 1);\r\n\t\t\ttargetPos = new Cell(1, columns - 2);\r\n\t\t\tdfs.setEnabled(true);\r\n\t\t\tdfs.setSelected(true);\r\n\t\t\tbfs.setEnabled(true);\r\n\t\t\taStar.setEnabled(true);\r\n\t\t\tguloso.setEnabled(true);\r\n\t\t\tdijkstra.setEnabled(true);\r\n\t\t\tdiagonal.setSelected(false);\r\n\t\t\tdiagonal.setEnabled(true);\r\n\t\t\tdrawArrows.setSelected(false);\r\n\t\t\tdrawArrows.setEnabled(true);\r\n\t\t\tslider.setValue(500);\r\n\t\t\tif (makeMaze) {\r\n\t\t\t\tMyMaze maze = new MyMaze(rows / 2, columns / 2);\r\n\t\t\t} else {\r\n\t\t\t\tfillGrid();\r\n\t\t\t}\r\n\t\t}", "public void resetMaze() {\r\n\t\tgrid.resetGrid();\r\n\t\tgridSheet = grid.getGrid();\r\n\t\tconstructMaze();\r\n\t\tgraph.resetGraph(gridSheet);\r\n\t\tmazeComplexity = graph.mazeComplexity();\r\n\t\ttravelLength = graph.traversalLength();\r\n\t\tdeadEndCount = graph.numberOfDeadEnds();\r\n\t\tiCount = graph.numberOfIntersections();\r\n\t}", "static void solveKTUtil(int x, int y, int movei,\n int sol[][], int xMove[],\n int yMove[], List<int[][]> result) {\n int k, next_x, next_y;\n if (movei == N * N){\n \tresult.add(copy(sol));\n return ;\n }\n\n /* Try all next moves from the current coordinate\n x, y */\n for (k = 0; k < 8; k++) {\n next_x = x + xMove[k];\n next_y = y + yMove[k];\n if (isSafe(next_x, next_y, sol)) {\n sol[next_x][next_y] = movei;\n solveKTUtil(next_x, next_y, movei + 1,\n sol, xMove, yMove, result);\n \n sol[next_x][next_y] = -1;// backtracking\n }\n }\n\n \n }", "public void trySolve() {\n\t\tboolean change = true;\n\t\twhile (change) {\n\t\t\tchange = boardSolve();\n\t\t}\n\t}", "public void findTour( int x, int y, int moves )\n {\n delay(50); //slow it down enough to be followable\n if (solved) System.exit(0);\n\n //primary base case: tour completed\n if (moves == (sideLength * sideLength)) {\n solved = true;\n }\n //other base case: stepped off board or onto visited cell\n if ( board[x][y] != 0 ) {\n return;\n }\n //otherwise, mark current location\n //and recursively generate tour possibilities from current pos\n else {\n board[x][y] = moves;\n System.out.println(this);\n delay(10); //uncomment to slow down enough to view\n\n /*======================================\n Recursively try to solve (find tour) from\n each of knight's available moves.\n . e . d .\n f . . . c\n . . @ . .\n g . . . b\n . h . a .\n ======================================*/\n // right and down\n findTour(x + 1, y + 2, moves + 1);\n // left and down\n findTour(x - 1, y + 2, moves + 1);\n // down and right\n findTour(x + 2, y + 1, moves + 1);\n // up and left\n findTour(x - 2, y - 1, moves + 1);\n // right and up\n findTour(x + 1, y - 2, moves + 1);\n // left and up\n findTour(x - 1, y - 2, moves + 1);\n // up and right\n findTour(x + 2, y - 1, moves + 1);\n // down and left\n findTour(x - 2, y + 1, moves + 1);\n\n //If made it this far, path did not lead to tour, so back up.\n board[x][y] = 0;\n System.out.println(this);\n }\n }", "public void generateMaze() {\n if (this.stateOfTheMaze != 0)\n throw new IllegalArgumentException(\"To generate the maze the state of it must be \\\"untouched grid\\\".\");\n Stack<Box> stack = new Stack<>();\n Random random = new Random();\n int randomRow = random.nextInt(this.grid.length);\n int randomColumn = random.nextInt(this.grid[randomRow].length);\n Box startBox = this.grid[randomRow][randomColumn];\n startBox.use();\n stack.push(startBox);\n while (!stack.isEmpty()) {\n Box aux = stack.peek();\n if (allAdjacentUsed(aux))\n stack.pop();\n else\n stack.push(movement(aux));\n }\n this.stateOfTheMaze++;\n }", "public static void main(String[] args) {\r\n System.out.println(\"Digite el numero de abejas\");\r\n Scanner scan = new Scanner(System.in);\r\n int numberOfBees = scan.nextInt();\r\n long mb = 1024 * 1024;\r\n Runtime runtime = Runtime.getRuntime();\r\n if (numberOfBees > 5000) {\r\n CollisionPrevention3D test = new CollisionPrevention3D(numberOfBees);\r\n test.readFile();\r\n long startMemory = (runtime.totalMemory() - runtime.freeMemory()) / mb;\r\n long startTime = System.currentTimeMillis();\r\n test.addBeesToMatrix();\r\n test.detectCollisions();\r\n long estimatedTime = System.currentTimeMillis() - startTime;\r\n long finalMemory = (runtime.totalMemory() - runtime.freeMemory()) / mb;\r\n long estimatedMemory = (finalMemory - startMemory);\r\n test.saveFile();\r\n System.out.println(\"El algoritmo tomo un tiempo de: \" + estimatedTime + \" ms\");\r\n System.out.println(\"El algoritmo El algoritmo usó : \" + estimatedMemory + \" mb\");\r\n } else {\r\n CollisionPrevention test2 = new CollisionPrevention(numberOfBees);\r\n test2.leerArchivo();\r\n long startMemory2 = (runtime.totalMemory() - runtime.freeMemory()) / mb;\r\n long startTime2 = System.currentTimeMillis();\r\n test2.detectarColisiones();\r\n long estimatedTime2 = System.currentTimeMillis() - startTime2;\r\n test2.guardarArchivo();\r\n long finalMemory2 = (runtime.totalMemory() - runtime.freeMemory()) / mb;\r\n long estimatedMemory2 = (finalMemory2 - startMemory2);\r\n System.out.println(\"El algoritmo tomo un tiempo de: \" + estimatedTime2 + \" ms\");\r\n System.out.println(\"El algoritmo usó : \" + estimatedMemory2 + \" mb\");\r\n }\r\n }", "public static void sizePathCompression(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze five = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = five.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber + n)){\n\t\t\t\t\t\tS.unionBySize(randomNumber+n, randomNumber);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'u');\n\t\t\t\t\t\t//S.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.findAndCompress(randomNumber) != S.findAndCompress(randomNumber+1)){\n\t\t\t\t\t\tS.unionBySize(randomNumber, randomNumber+1);\n\t\t\t\t\t\tfive.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tbuildAdjacencyList(five, n);\n\t\tuserSelection_SolveMaze(n);\n\n\t\tStdDraw.show(0);\n\t\tfive.draw();\n\t\tfive.printCellNumbers();\t\n\t}", "public void tryProcessNewVehicles(int time, Simulator sim)\r\n\t\t\tthrows VehicleException, SimulationException {\r\n\t\tint intendedDuration = sim.setDuration();\r\n\r\n\t\tif ((smallCarsParked.size() + carsParked.size() + motorCyclesParked\r\n\t\t\t\t.size()) >= totalSpaces) {\r\n\t\t\tthrow new SimulationException(\"The car park is full.\");\r\n\t\t}\r\n\t\tif (intendedDuration < Constants.MINIMUM_STAY || time < 0) {\r\n\t\t\tthrow new VehicleException(\"Invalid timing constraints.\");\r\n\t\t}\r\n\r\n\t\tSystem.out.println(totalVehicleCount);\r\n\t\tif (sim.newCarTrial()) {\r\n\t\t\tif (sim.newCarTrial())\r\n\t\t\t\tif (sim.smallCarTrial()) {\r\n\t\t\t\t\tidString = \"SC\" + numVehicleIDs;\r\n\t\t\t\t\tVehicle newSmallCar = new Car(idString, time, true);\r\n\r\n\t\t\t\t\tnumVehicleIDs++;\r\n\t\t\t\t\ttotalVehicleCount++;\r\n\r\n\t\t\t\t\tif (spacesAvailable(newSmallCar)) {\r\n\t\t\t\t\t\tparkVehicle(newSmallCar, time, intendedDuration);\r\n\t\t\t\t\t\tnumSmallCars++;\r\n\t\t\t\t\t\tcarParkStatus += \"|S:N>P|\";\r\n\t\t\t\t\t} else if (!spacesAvailable(newSmallCar) && !queueFull()) {\r\n\t\t\t\t\t\tenterQueue(newSmallCar);\r\n\t\t\t\t\t\tcarParkStatus += \"|S:N>Q|\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarchiveNewVehicle(newSmallCar);\r\n\t\t\t\t\t\tcarParkStatus += \"|S:N>A|\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tidString = \"C\" + numVehicleIDs;\r\n\r\n\t\t\t\t\tVehicle newCar = new Car(idString, time, false);\r\n\t\t\t\t\tnumVehicleIDs++;\r\n\t\t\t\t\ttotalVehicleCount++;\r\n\r\n\t\t\t\t\tif (spacesAvailable(newCar)) {\r\n\t\t\t\t\t\tparkVehicle(newCar, time, intendedDuration);\r\n\t\t\t\t\t\tcarParkStatus += \"|S:N>P|\";\r\n\r\n\t\t\t\t\t} else if (!spacesAvailable(newCar) && !queueFull()) {\r\n\t\t\t\t\t\tenterQueue(newCar);\r\n\t\t\t\t\t\tcarParkStatus += \"|S:N>Q|\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarchiveNewVehicle(newCar);\r\n\t\t\t\t\t\tcarParkStatus += \"|S:N>A|\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t} else if (sim.motorCycleTrial()) {\r\n\t\t\tidString = \"MC\" + numVehicleIDs;\r\n\t\t\tVehicle newMotorCycle = new MotorCycle(idString, time);\r\n\r\n\t\t\tnumVehicleIDs++;\r\n\t\t\ttotalVehicleCount++;\r\n\r\n\t\t\tif (spacesAvailable(newMotorCycle)) {\r\n\t\t\t\tnumVehicleIDs++;\r\n\r\n\t\t\t\tparkVehicle(newMotorCycle, time, intendedDuration);\r\n\t\t\t\tnumMotorCycles++;\r\n\t\t\t} else if (!queueFull()) {\r\n\t\t\t\tenterQueue(newMotorCycle);\r\n\t\t\t\tcarParkStatus += \"|M:N>Q|\";\r\n\t\t\t} else {\r\n\t\t\t\tarchiveNewVehicle(newMotorCycle);\r\n\t\t\t\tcarParkStatus += \"|M:N>A|\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void solve() {\n for (int i = 0; i < rowsCount; i++) {\n for (int j = 0; j < colsCount; j++) {\n\n // if the current Cell contains a mine, let's skip this iteration.\n if (this.cells[i][j].hasMine()) continue;\n\n // for all non-mine cells, set the default value to 0\n cells[i][j].setValue('0');\n\n // let's get all Cells surrounding the current Cell,\n // checking if the other Cells have a mine.\n // if there is a mine Cell touching the current Cell,\n // proceed to update the value of the current Cell.\n Cell topCell = get_top_cell(i, j);\n if (topCell != null && topCell.hasMine() == true) update_cell(i, j);\n\n Cell trdCell = get_top_right_diagnoal_cell(i, j);\n if (trdCell != null && trdCell.hasMine() == true) update_cell(i, j);\n\n Cell rightCell = get_right_cell(i, j);\n if (rightCell != null && rightCell.hasMine() == true) update_cell(i, j);\n\n Cell brdCell = get_bottom_right_diagnoal_cell(i, j);\n if (brdCell != null && brdCell.hasMine() == true) update_cell(i, j);\n\n Cell bottomCell = get_bottom_cell(i, j);\n if (bottomCell != null && bottomCell.hasMine() == true) update_cell(i, j);\n\n Cell bldCell = get_bottom_left_diagnoal_cell(i, j);\n if (bldCell != null && bldCell.hasMine() == true) update_cell(i, j);\n\n Cell leftCell = get_left_cell(i, j);\n if (leftCell != null && leftCell.hasMine() == true) update_cell(i, j);\n\n\n Cell tldCell = get_top_left_diagnoal_cell(i, j);\n if (tldCell != null && tldCell.hasMine() == true) update_cell(i, j);\n }\n }\n\n // print the solution to System out\n print_solution();\n }", "public void testSolve1() {\n test = new Location(0, 1);\n maze2.setCell(test, MazeCell.WALL);\n test = new Location(1, 1);\n maze2.setStartLocation(test);\n test = new Location(0, 0);\n maze2.setGoalLocation(test);\n assertEquals(\"(0, 0) (1, 0) (1, 1) \", maze2.solve());\n }", "public static void mazeHeight(){\n\t\tint n = 10;\t\n\n\t\tdsf S = new dsf(n*n);\n\t\tMaze three = new Maze(n);\n\n\t\tRandom random;\n\t\tint sets = n*n;\t//number of sets in the DSF\n\t\tint randomNumber;\n\t\tint randomDirection;\n\t\tint row;\n\t\tint col;\n\n\t\tchar upperRight; \t//bottom or right\n\n\t\tS.print();\n\n\t\twhile(sets > 1){\n\t\t\trandom = new Random();\n\t\t\trandomNumber = random.nextInt((n*n) - 1);\n\t\t\t//System.out.println(\"RANDOM NUMBER: \"+randomNumber);\n\t\t\trow = randomNumber /n;\t//SWITCHED\n\t\t\tcol = randomNumber %n;\t//SWITCHED\n\t\t\trandomDirection = random.nextInt(2);\n\t\t\tString direct;\n\t\t\tif(randomDirection == 0)\n\t\t\t\tdirect = \"upper\";\n\t\t\telse\n\t\t\t\tdirect = \"right\";\n\t\t\t//System.out.println(\"RANDOM DIRECTI0N: \"+direct);\n\t\t\tupperRight = three.direction(randomDirection);\n\n\t\t\tif(upperRight == 'u'){\n\t\t\t\tif((randomNumber) < ((n*n)-n)){\n\t\t\t\t\tSystem.out.println(\"Sets: \"+sets);\n\t\t\t\t\tif(S.find(randomNumber) != S.find(randomNumber + n)){\n\t\t\t\t\t\tS.unionByHeight(randomNumber, randomNumber+n);\n\t\t\t\t\t\tthree.remove_wall(col, row, 'u');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(upperRight == 'r'){\n\t\t\t\tif(((randomNumber)%(n*n)) != n-1){\n\t\t\t\t\tif(S.find(randomNumber) != S.find(randomNumber+1)){\n\t\t\t\t\t\tS.unionByHeight(randomNumber, randomNumber+1);\n\t\t\t\t\t\tthree.remove_wall(col, row, 'r');\n\t\t\t\t\t\tS.print();\n\t\t\t\t\t\tsets--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbuildAdjacencyList(three, n);\n\t\tuserSelection_SolveMaze(n);\n\n\n\t\tStdDraw.show(0);\n\t\tthree.draw();\n\t\tthree.printCellNumbers();\t\n\t}", "private static TaskResult task4(int iterations) {\n\n System.out.println(\"\\n\\nTASK 4:\");\n System.out.printf(\"Generating a graph using HillClimbing algorithm \" +\n \"with %s iterations...\\n\", iterations);\n int[] puzzleSizes = new int[]{5, 7, 9, 11};\n int ITERATIONS = iterations;\n Solution solutions[][] = new Solution[puzzleSizes.length][ITERATIONS];\n double times_ms[][] = new double[puzzleSizes.length][ITERATIONS];\n int maxK = 0;\n Graph maxGraph = null;\n for (int i = 0; i < puzzleSizes.length; i++) { // for each puzzle size\n maxK = 0;\n maxGraph = null;\n for (int j = 0; j < ITERATIONS; j++) {\n Graph graph = new Graph(puzzleSizes[i]);\n graph.populateGraph();\n graph.populateNeighbors();\n graph.setDistances();\n Solution solution = Algorithms.BFS(graph);\n Result hillResult = Algorithms.HillClimbing(graph, solution, j);\n solution = hillResult.getSolution();\n double time_ms = hillResult.getComputationTime_ms();\n if (solution.getK() > maxK){\n maxK = solution.getK();\n maxGraph = new Graph(graph);\n }\n solutions[i][j] = solution;\n times_ms[i][j] = time_ms;\n }\n }\n System.out.printf(\"Hill Climbing Algorithm Complete!\\n\\n\");\n TaskResult result = new TaskResult(solutions, times_ms, maxK, maxGraph);\n return result;\n }", "@Test\n public void testNoBenefitFromPlankMaze() {\n try {\n //link row 1\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(1, 0));\n smallMaze.linkPillars(Maze.position(0, 0), Maze.position(0, 1));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(2, 0));\n smallMaze.linkPillars(Maze.position(1, 0), Maze.position(1, 1));\n\n //link row 2\n smallMaze.linkPillars(Maze.position(0, 1), Maze.position(0, 2));\n smallMaze.linkPillars(Maze.position(1, 1), Maze.position(2, 1));\n\n //link row 3\n smallMaze.linkPillars(Maze.position(0, 2), Maze.position(1, 2));\n smallMaze.linkPillars(Maze.position(1, 2), Maze.position(2, 2));\n\n //set beginning and end\n smallMaze.setBegin(Maze.position(0, 0));\n smallMaze.setEnd(Maze.position(2, 2));\n shortestPath = MazeSolver.pStar(smallMaze, 9);\n\n assertEquals(5, shortestPath.size());\n\n } catch (Exception e) {\n fail(\"Unexpected exception was thrown while linking pillars.\");\n }\n }", "public void GenerateMaze(int x, int y){\r\n visited[x][y] = true;\r\n\r\n while(!visited[x][y+1]|| !visited[x+1][y] || !visited[x][y-1] || !visited[x-1][y]) {\r\n\r\n while(true){\r\n Random rand = new Random();\r\n int n = rand.nextInt(4);\r\n if ( n == 0 && !visited[x][y+1]){\r\n this.board[x][y].southwall = false;\r\n this.board[x][y+1].northwall = false;\r\n GenerateMaze(x, y+1);\r\n break;\r\n }\r\n else if ( n == 1 && !visited[x+1][y]){\r\n this.board[x][y].eastwall = false;\r\n this.board[x+1][y].westwall = false;\r\n GenerateMaze(x+1, y);\r\n break;\r\n }\r\n else if ( n == 2 && !visited[x][y-1]){\r\n this.board[x][y].northwall = false;\r\n this.board[x][y-1].southwall = false;\r\n GenerateMaze(x, y-1);\r\n break;\r\n }\r\n else if( n == 3 && !visited[x-1][y]){\r\n this.board[x][y].westwall = false;\r\n this.board[x-1][y].eastwall = false;\r\n GenerateMaze(x-1, y);\r\n break;\r\n }\r\n }\r\n }\r\n }", "@Test(expected = Exception.class)\n public void testZeroPillarMaze() throws Exception {\n shortestPath = MazeSolver.pStar(zeroPillarMaze, 0);\n }", "private static void solve() throws IOException {\n\n OptimizationGame.solve();\n SumOfSumOfDigits.solve();\n CrossTheStreet.solve();\n }", "@Test\n public void runTest()\n { // Pueblo start to finish 34.97s\n\n\n this.myMap = myReader.readMapFile(\"data/AlamosaNetwork.xml\");\n myMap.setupMapAsServer();\n this.testAgent001 = getTestAgent();\n\n //System.out.println(\"Intersections2: \"+myMap.getIntersections());\n\n testLW.log(Level.INFO, \"this is another nother test\");\n\n System.out.println(\"\\nStarting test. . .\");\n // Pueblo start to finish 34.97s\n // from.setId(\"1040921516\"); // from.setId(\"01\"); // 1040921516 // 2\n // to.setId(\"864162469\"); // to.setId(\"10\"); // 864162469 // 50\n Long startTime = System.nanoTime();\n\n //GRIDheapAlg greedy = new GRIDheapAlg();\n GRIDpathfinder theALG = new GRIDpathfinder(myMap, \"BPR\");\n //GRIDheapDynamicAlg dyna = new GRIDheapDynamicAlg(myMap); //\n //myPathGreedy = greedy.shortestPath(networkMap,\"1040921516\",\"864162469\");\n\n //GRIDselfishAlg test001 = new GRIDselfishAlg(testAgent001, networkMap, 0L); // GRIDpathrecalc GRIDselfishAlg\n //GRIDpathrecalc test001 = new GRIDpathrecalc(testAgent001, networkMap, 0L); // GRIDpathrecalc GRIDselfishAlg\n //GRIDroute outRoute = new GRIDroute();\n /*GRIDpathrecalc test001 = new GRIDpathrecalc(testAgent001, networkMap, 0L); // GRIDpathrecalc GRIDselfishAlg\n outRoute = test001.findPath();*/\n GRIDroute outRoute = theALG.findPath(testAgent001, 0L);\n\n //ListIterator<String> pathIterator = outRoute.Intersections.listIterator();\n\n /*assertNotNull(myMap);\n assertNotNull(outRoute);\n assertTrue(outRoute.Intersections.size() > 0);*/\n\n //System.out.println(\"\\nShortest path: \"+myPathGreedy);\n //System.out.println(\"\\nShortest path: \"+myPathDynamic);\n\n //System.out.print(\"\\nPath:\\n\");\n //for (String intrx : outRoute.getIntersections())\n //{\n // System.out.print(intrx);\n // if(!intrx.equals(testAgent001.getDestination()))\n // System.out.print(\",\");\n //}\n\n //ArrayList<String> tempPathList = myMap.getPathByRoad(outRoute.getIntersections());\n\n //System.out.print(\"\\n\\nPath by Link:\\n\");\n //for (String path : tempPathList)\n //{\n // System.out.print(path);\n // if(!tempPathList.isEmpty()\n // && !path.equals(tempPathList.get(tempPathList.size() - 1)))\n // System.out.print(\",\");\n // }\n\n if(outRoute.getAgent_ID() != \"Destination unreachable\"){\n logWriter.log(Level.INFO, \"Route is: \" + outRoute.toString());\n\n System.out.println(\"Route is: \" + testAgent001.getOrigin() + outRoute.toString()\n +\" \"+testAgent001.getDestination());\n\n System.out.println(\"\\n\\nCalculated Travel Time: \"+outRoute.getcalculatedTravelTime());\n }\n else{\n System.out.println(\"Destination Unreachable\");\n }\n\n long stopTime = System.nanoTime();\n long timeToRun = ((stopTime - startTime)/1000000);\n\n System.out.print(\"\\nTook \" + timeToRun/1000.0 + \" Seconds\");\n System.out.print(\"\\n\\nAnd we're done.\\n\");\n }", "@Test\n public void test1() {\n System.out.println(\"A* Test i1\"); \n \n Solver solver = new Solver(new TileWorld(\"i1.png\"), SearchStrategy.A_STAR);\n AlgorithmResults expResult = new AlgorithmResults(580, 967);\n AlgorithmResults result = solver.solve();\n \n print(result, expResult);\n \n assertEquals(\"BestPathCost does not match!\", expResult.getBestPathCost(), result.getBestPathCost());\n }", "public void testSize() {\n assertEquals(10, maze1.size());\n }", "private static LinkedList<Integer> localSearchSimulatedAnnealing(File fileNameWithPath, int kNeighborHood ) throws Exception{\n\t\t\n\t\tString traceString = \"\";\n\t\tdouble bestCost = Double.POSITIVE_INFINITY;\n\t\tLinkedList<Integer> bestTspList = null;\n\t\tdouble bestCycleTime = Double.POSITIVE_INFINITY;\n\n\t\tif (Project.runId == -1 )\n\t\t\tProject.runId = 1;\n\n\t\t/* \n\t\t * read the file and build the cost table\n\t\t */\n parseEdges(fileNameWithPath);\n\n /*\n\t\t * time starts once you read the data\n */\n\t\tdouble baseTime = System.nanoTime();\n\n\t\t/*\n\t\t * invoking furthest insertion algorithm to get the tsp\n\t\t */\n\t\tlong startNodeSeed = (long)(1000.0*generator.nextDouble());\n\t\tLinkedList<Integer> currentTspList = FurthestInsertion.generateTSP(Project.sourceGTree,startNodeSeed);\n\t\t\n\t\tdouble currentTspCost = tspCost(currentTspList);\n\n\t\tbestTspList = currentTspList;\n\t\tbestCost = currentTspCost;\n\t\tbestCycleTime = System.nanoTime() - baseTime;\n\n\t\t/* print the trace file */\n\t\ttraceString = String.format(\"%.2f, %d\",Math.round(((System.nanoTime()-baseTime)/nanosecs)*100.0)/100.0,Math.round(bestCost));\n\t\tprintTrace(runId,traceString);\n\n\t\t/*\n\t\t * time starts now - start annealing\n\t\t */\n\t\tdouble annealingProbabilityThreshold = .2*generator.nextDouble(); // acceptance prob threshold for bad results\n\t\tdouble T = 100; // annealing temp\n\t\tdouble coolingRate = .00000001; // rate of cooling in each step\n\n\t\t/*\n\t\t * remove the last node as it matches the first\n\t\t */\n\t\tcurrentTspList.removeLast();\n\n\t\twhile ( T > 1 )\n\t\t{\n\t\t\t/*\n\t\t\t * reached cutoff time\n\t\t\t */\n\t\t\tif ( System.nanoTime()-baseTime >= Project.cutoffTimeSeconds*nanosecs ) {\n\t\t\t\ttimedOut=true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tdouble cycleStartTime = System.nanoTime();\n\n\t\t\tLinkedList<Integer> newTspList = currentTspList;\n\n\t\t\t/* do a 2 opt search in current k=5 neighborhood to get a newtsp */\n\t\t\t/* 1. Pick the first random element in the current tsp */\n\t\t\tint element2 = (int)((double)(newTspList.size()-1) * generator.nextDouble());\n\t\t\tint element1 = element2 - 1;\n\t\t\tif ( element1 == -1 ){\n\t\t\t\telement1 = newTspList.size()-1;\n\t\t\t}\n\t\t\t\n int delta;\n\n\t\t\t/*\n\t\t\t * search in the neighborhood specified\n * if not specified search all\n\t\t\t */\n if ( kNeighborHood != -1 ) {\n\t\t\t /* We want to search in the specified k=n neighborhoods of element1 */\n\t\t\t delta= (int)(2*kNeighborHood*generator.nextDouble()) - kNeighborHood;\n } else {\n\t\t\t delta= (int)((newTspList.size()-1)*generator.nextDouble()) - (int)(newTspList.size()/2);\n\t\t\t}\n\n\t\t\tif ( delta == 0 ) {\n\t\t\t\tdelta = 2;\n\t\t\t} else if ( delta == 1 ) {\n\t\t\t\tdelta = 2;\n\t\t\t} else if ( delta == -1) {\n\t\t\t\tdelta = -2; }\n\n\t\t\tint element4 = element2 + delta;\n\n\t\t\tif ( element4 < 0 ) {\n\t\t\t\telement4 = newTspList.size()+element4;\n\t\t\t}else if ( element4 >= newTspList.size() ) {\n\t\t\t\telement4 = element4-(newTspList.size()-1);\n\t\t\t}\n\n\t\t\tint element3 = element4 -1;\n\t\t\tif ( element3 == -1 ){\n\t\t\t\telement3 = newTspList.size()-1;\n\t\t\t}\n\n\n\t\t\t/* \n\t\t\t * the new tsp will have element2->element4.......element1->element3....\n\t\t\t */\n\t\t\tInteger vertex_3 = newTspList.get(element3);\n\t\t\tnewTspList.set(element3,newTspList.get(element2));\n\t\t\tnewTspList.set(element2,vertex_3);\n\n\t\t\t/*\n\t\t\t * from element2+1 to element3-1 swap to reverse their order\n\t\t\t */\n\t\t\twhile ( element2 < element3 ){\n\t\t\t\telement3 = element3-1;\n\t\t\t\tif ( element3 == -1 ) {\n\t\t\t\t\telement3 = newTspList.size()-1;\n\t\t\t\t}\n\n\t\t\t\telement2 = element2 + 1;\n\t\t\t\tif ( element2 == newTspList.size() ) {\n\t\t\t\t\telement3 = 0;\n\t\t\t\t}\n\n\t\t\t\tInteger tempVertex = newTspList.get(element2);\n\t\t\t\tnewTspList.set(element2,newTspList.get(element3));\n\t\t\t\tnewTspList.set(element3,tempVertex);\n\n\t\t\t}\n\n\t\t\tdouble newTspCost = tspCost(newTspList);\n\n\t\t\t/* if new local search solution is better than eariler take the search and continue search\n\t\t\t */\n\t\t\tif ( newTspCost <= currentTspCost ){\n\t\t\t\tcurrentTspList = newTspList;\n\t\t\t\tcurrentTspCost = newTspCost;\n\t\t\t} else {\n\t\t\t/* if new local search solution is not better than eariler \n\t\t\t * then check the difference and the probability at this stage of annealing\n\t\t\t * if probability is higher than threshold set, then keep new search ad continue, else discard \n\t\t\t */\n\t\t\t\tif ( Math.exp((currentTspCost - newTspCost) / T) > generator.nextDouble() ){\n\t\t\t\t\tcurrentTspList = newTspList;\n\t\t\t\t\tcurrentTspCost = newTspCost;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t//Subtract the start time from the finish time to get the actual algorithm running time; divide by 10e6 to convert to milliseconds\n\t\t\tdouble cycleTime = (System.nanoTime()-cycleStartTime);\n\n\t\t\t/* first improvement , take the best each time */\n\t\t\tif ( newTspCost < bestCost ) {\n\t\t\t\tbestCost = newTspCost;\n\t\t\t\tbestTspList = newTspList;\n\t\t\t\tbestCycleTime = cycleTime;\n\t\t\t\t/* print the trace file */\n\t\t\t\ttraceString = String.format(\"%.2f, %d\",Math.round(((System.nanoTime()-baseTime)/nanosecs)*100.0)/100.0,Math.round(bestCost));\n\t\t\t\tappendToTraceFile(runId,traceString);\n\n\t\t\t\tif ( bestCost <= optimalCost )\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t/* the cooling */\n\t\t\tT = T - T * coolingRate;\n\n\t\t}\n\n\t\t/* print the sol file */\n\t\tprintSol(runId,bestTspList,bestCost);\n\n\t\t/* print the tab results file */\n\t\tappendTabResults(runId,bestCycleTime,bestCost,bestTspList);\n\n\t\treturn bestTspList;\n\n\t}", "@Test\n\tpublic void testGetPathLength() {\n\t\tController control = new Controller();\n\t\tBasicRobot robot = new BasicRobot();\n\t\tExplorer explorer = new Explorer();\n\t\tcontrol.setBuilder(Order.Builder.DFS);\n\t\tcontrol.setRobotAndDriver(robot, explorer);\n\t\trobot.setMaze(control);\n\t\tcontrol.turnOffGraphics();\n\t\tcontrol.setSkillLevel(0);\n\t\tcontrol.switchFromTitleToGenerating(0);\n\t\tcontrol.waitForPlayingState();\n\t\texplorer.setRobot(robot);\n\t\tassertTrue(explorer.getPathLength() == 0);\n\t\t// moving the robot one unit and checking the odometer\n\t\tif(robot.distanceToObstacle(Direction.FORWARD) > 0) {\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 1);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.RIGHT) > 0) {\n\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 1);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.LEFT) > 0) {\n\t\t\trobot.rotate(Turn.LEFT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 1);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.BACKWARD) > 0) {\n\t\t\trobot.rotate(Turn.AROUND);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 1);\n\t\t}\n\t\tassertTrue(explorer.getPathLength() > 0);\n\t\t\n\t\t// moving the robot again to get a reading of 2\n\t\tif(robot.distanceToObstacle(Direction.FORWARD) > 0) {\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 2);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.RIGHT) > 0) {\n\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 2);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.LEFT) > 0) {\n\t\t\trobot.rotate(Turn.LEFT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 2);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.BACKWARD) > 0) {\n\t\t\trobot.rotate(Turn.AROUND);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 2);\n\t\t}\n\t\t\n\t\t\n\t\t// moving the robot a third time to make sure that the odometer is updating correctly\n\t\tif(robot.distanceToObstacle(Direction.FORWARD) > 0) {\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 3);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.RIGHT) > 0) {\n\t\t\trobot.rotate(Turn.RIGHT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 3);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.LEFT) > 0) {\n\t\t\trobot.rotate(Turn.LEFT);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 3);\n\t\t}\n\t\telse if(robot.distanceToObstacle(Direction.BACKWARD) > 0) {\n\t\t\trobot.rotate(Turn.AROUND);\n\t\t\trobot.move(1, false);\n\t\t\tassertTrue(explorer.getPathLength() == 3);\n\t\t}\n\t}", "public void solve(int startX, int startY, int endX, int endY) {\r\n // re-inicializar células para encontrar o caminho\r\n for (Cell[] cellrow : this.cells) {\r\n for (Cell cell : cellrow) {\r\n cell.parent = null;\r\n cell.visited = false;\r\n cell.inPath = false;\r\n cell.travelled = 0;\r\n cell.projectedDist = -1;\r\n }\r\n }\r\n // células ainda estão sendo consideradas\r\n ArrayList<Cell> openCells = new ArrayList<>();\r\n // célula sendo considerada\r\n Cell endCell = getCell(endX, endY);\r\n if (endCell == null) return; // saia se terminar fora dos limites\r\n { // bloco anônimo para excluir o início, porque não usado posteriormente\r\n Cell start = getCell(startX, startY);\r\n if (start == null) return; // saia se começar fora dos limites\r\n start.projectedDist = getProjectedDistance(start, 0, endCell);\r\n start.visited = true;\r\n openCells.add(start);\r\n }\r\n boolean solving = true;\r\n while (solving) {\r\n if (openCells.isEmpty()) return; // sair, nenhum caminho\r\n // classifique openCells de acordo com a menor distância projetada\r\n Collections.sort(openCells, new Comparator<Cell>() {\r\n @Override\r\n public int compare(Cell cell1, Cell cell2) {\r\n double diff = cell1.projectedDist - cell2.projectedDist;\r\n if (diff > 0) return 1;\r\n else if (diff < 0) return -1;\r\n else return 0;\r\n }\r\n });\r\n Cell current = openCells.remove(0); // célula pop menos projetada\r\n if (current == endCell) break; // no final\r\n for (Cell neighbor : current.neighbors) {\r\n double projDist = getProjectedDistance(neighbor,\r\n current.travelled + 1, endCell);\r\n if (!neighbor.visited || // ainda não visitado\r\n projDist < neighbor.projectedDist) { // melhor caminho\r\n neighbor.parent = current;\r\n neighbor.visited = true;\r\n neighbor.projectedDist = projDist;\r\n neighbor.travelled = current.travelled + 1;\r\n if (!openCells.contains(neighbor))\r\n openCells.add(neighbor);\r\n }\r\n }\r\n }\r\n // criar caminho do fim ao começo\r\n Cell backtracking = endCell;\r\n backtracking.inPath = true;\r\n while (backtracking.parent != null) {\r\n backtracking = backtracking.parent;\r\n backtracking.inPath = true;\r\n }\r\n }", "public void multiSolver() {\n\t\tmsSize = 0;\n\t\tmsMin = Integer.MAX_VALUE;\n\t\tmsMax = Integer.MIN_VALUE;\n\t\tmsHeight = 0;\n\t\tmultiSolver(root, 0);\n\t\tSystem.out.println(\"Size = \" + msSize);\n\t\tSystem.out.println(\"Min = \" + msMin);\n\t\tSystem.out.println(\"Max = \" + msMax);\n\t\tSystem.out.println(\"Height = \" + msHeight);\n\t}" ]
[ "0.6572447", "0.598049", "0.5906574", "0.5866768", "0.58172107", "0.5673287", "0.56574905", "0.563643", "0.5623688", "0.5599059", "0.5591286", "0.55660844", "0.5558504", "0.5555241", "0.55384904", "0.55332106", "0.5511136", "0.55003285", "0.54345447", "0.5427358", "0.5394949", "0.5385834", "0.53413427", "0.5319058", "0.5314156", "0.5307642", "0.5294904", "0.5274598", "0.5267105", "0.52576876", "0.524726", "0.52457196", "0.5214849", "0.51958865", "0.5186491", "0.5184814", "0.51797247", "0.5169946", "0.5161863", "0.5147222", "0.51419944", "0.51245075", "0.5120836", "0.510409", "0.5103235", "0.5067992", "0.50674963", "0.50645363", "0.50537884", "0.5037842", "0.5035866", "0.5021761", "0.5014837", "0.5008034", "0.5007845", "0.49916372", "0.4989565", "0.4989076", "0.49886054", "0.4985648", "0.49850187", "0.49824506", "0.49787217", "0.49780858", "0.4977721", "0.49768043", "0.49678433", "0.4964755", "0.4954649", "0.49514827", "0.49474376", "0.4937508", "0.49314323", "0.4927016", "0.49108106", "0.49057844", "0.49038255", "0.49012178", "0.48976958", "0.48772186", "0.48751462", "0.48723134", "0.4867863", "0.4862656", "0.48389947", "0.48372456", "0.48324832", "0.48308736", "0.4830609", "0.4827005", "0.48262686", "0.48188925", "0.48180637", "0.48166293", "0.481646", "0.48157257", "0.481332", "0.48120224", "0.47975862", "0.47812647" ]
0.6550514
1
TODO Autogenerated method stub
public static void main(String[] args) { IfElseProgramForCaluculate obj = new IfElseProgramForCaluculate(); Scanner scanobj =new Scanner(System.in); int say; do{ System.out.println("enter ur choice"); System.out.println("press 1 for add"); System.out.println("press 2 for sub"); System.out.println("press 3 for mul"); System.out.println("press 4 for div"); int choice =scanobj.nextInt(); System.out.println("enter a value"); int a = scanobj.nextInt(); System.out.println("enter b value"); int b = scanobj.nextInt(); if(choice==1){ int add =a+b; System.out.println("add value is:"+add); } else if(choice==2) { int sub =a-b; System.out.println("sub value is:"+sub); } else if(choice==3) { int mul = a*b; System.out.println("mul value is:"+mul); } else if(choice==4){ int div = a/b; System.out.println("div value :"+div); } System.out.println("u want to continue"); System.out.println("say yes for 1 or no for 2"); say = scanobj.nextInt(); }while(say==1); }
{ "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
Used if no constant is provided: limits on amount of notices are set using class constants.
public NoticeContainer() { this( MAX_TOTAL_VALIDATION_NOTICES, MAX_VALIDATION_NOTICES_TYPE_AND_SEVERITY, MAX_EXPORTS_PER_NOTICE_TYPE_AND_SEVERITY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LimitConfiguration() {\n try {\n yellowLimit = new AlertLimit((float) 0.75);\n redLimit = new AlertLimit((float)0.9);\n } catch(Exception e){\n //This exception should not happen\n System.out.println(e.getMessage());\n }\n }", "public interface Constants {\r\n\r\n /**\r\n * The maximum number of Prizes allowed\r\n */\r\n int NUMBER_OF_PRIZES = 10;\r\n /**\r\n * The maximum number of students\r\n */\r\n int NUMBER_OF_STUDENTS = 1000;\r\n /**\r\n * The maximum number of topics a student can undertake\r\n */\r\n int NUMBER_OF_TOPICS = 40;\r\n}", "public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n \t\t\t}", "@Override\r\n public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n }", "@Override\r\n public void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n }", "private int numberOfConstants() {\n return (int) Stream.of(this.template.split(\"\\\\.\"))\n .filter(s -> !s.equals(\"*\")).count();\n }", "@Override\n\t\tpublic void onTrackLimitationNotice(int numberOfLimitedStatuses) {\n\t\t}", "private LoggerConstants() {\n\t\tsuper();\n\t}", "private void checkForNewAppliancesAndUpdateConstants()\n\t{\n\t\t// This could be more sophisticated, but for now all this needs to do is\n\t\t// make sure that\n\t\t// the wattbox assigns load only according to the rated heat pump and\n\t\t// immersion capacity\n\t\t// of its owner\n\t\tthis.maxHeatPumpElecDemandPerTick = (this.owner.ratedPowerHeatPump * 24 / this.ticksPerDay);\n\t\tthis.maxImmersionHeatPerTick = Consts.MAX_DOMESTIC_IMMERSION_POWER * 24 / this.ticksPerDay;\n\t}", "public static void intialize_notice() {\r\n mNotice_info = new ArrayList<>();\r\n }", "public int getConstantCount() {\r\n return EnthalpyVapour.CONSTANT_COUNT;\r\n }", "public interface TriggerUtilConstants {\n\n public static final int DEFAULT_MAX_BUFFERS = 1000;\n public static final int DEFAULT_BUFFER_BLEN = 32000;\n}", "private LevelConstants() {\n\t\t\n\t}", "@Override\n\t\tpublic void onTrackLimitationNotice(int arg0) {\n\t\t\t\n\t\t}", "@Override\n\t\t\tpublic void onTrackLimitationNotice(int arg0) {\n\n\t\t\t}", "@Override\n public void onTrackLimitationNotice(int arg0) {\n }", "@Override\n public boolean isConstant() {\n return false;\n }", "public interface Constants {\n public static final short NET_MASK_MAX_LENGTH = 32;\n}", "public void onTrackLimitationNotice(int arg0) { }", "private Constantes() {\r\n\t\t// No way\r\n\t}", "void setLimit(int limit);", "public interface VerificationConst {\n\t/**\n\t * Минимальные габариты зала\n\t */\n\tpublic static final int MIN_SECTOR_DIMENSIONS = 1000;\n\t/**\n\t * минимальные габариты стеллажа\n\t */\n\tpublic static final int MIN_RACK_DIMENSIONS = 10;\n\t/**\n\t * минимальные габариты полки стеллажа\n\t */\n\tpublic static final int MIN_RACK_SHELF_DIMENSIONS = 5;\n}", "protected int retryLimit() {\n return DEFAULT_RETRIES;\n }", "public void warnSpeedLimit(){\n\t\ttry {\r\n\t\t\t//If the speed is over the limit then we throw an exception\r\n\t\t\tif(this.speed > this.limit)\r\n\t\t\t\t\tthrow new Exception(\"Speed Limit \" + this.limit + \"kmph exceeded!\");\r\n\t\t\t//Otherwise the system will print out a message that the user is under the limit.\r\n\t\t\tSystem.out.println(\"You are a law abiding citizen!\");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\t//e.getMessage passes the message that we set earlier and we print it out.\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"You are getting fined!\");\r\n\t\t}\t\r\n\t\t//Print out the user's speed\r\n\t\tSystem.out.println(\"Your current speed: \" + this.speed);\r\n\t}", "int getNoticeListCount();", "public void setLimit(int limit) {\n\tLimit = limit;\n }", "public void setRestrictionNotice(StringWithCustomFacts restrictionNotice) {\n this.restrictionNotice = restrictionNotice;\n }", "protected NConstants() {\n }", "protected short maxRetries() { return 15; }", "public static void logErrorIfTooManyWarnings(int warningsPerHundred) {\n }", "void setOverdraftLimit(double overdraftLimit) {\n\t\tSystem.out.println(\"Your account is not current account.\");\n\t}", "public interface CustomerConstants {\r\n\r\n int CUST_ID_SIZE = 5;\r\n int EMAIL_SIZE = 30;\r\n int FIRST_NAME_SIZE = 15;\r\n int LAST_NAME_SIZE = 15;\r\n}", "public static Spring constant(int paramInt) {\n/* 526 */ return constant(paramInt, paramInt, paramInt);\n/* */ }", "public void setLimit_Base (String Limit_Base);", "@Override\r\n public void onTrackLimitationNotice(int arg0) {\n\r\n }", "public void setConstant(){\n \tisConstant = true;\n }", "private void raiseLimitException() {\n\t\t\tthrow new DataBufferLimitException(\"Exceeded limit on max bytes to buffer : \" + getMaxInMemorySize());\n\t\t}", "@Override\r\n\tint check_sweetness() {\n\t\treturn 30;\r\n\t}", "public void setLimit(Integer limit) {\n this.limit = limit;\n }", "public Constant (int value){\r\n this.value = value;\r\n\r\n }", "private ReportPluginConstant() {\n\t\t// NO_PMD DUMMY CONSTRUCTOR\n\t}", "@SuppressWarnings(\"unused\")\r\n\tpublic static void checkNumberOfCoffeeDispensers() {\r\n\t\tif (NUMBEROFCOFFEEDISPENSER > 5) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Danger! A person who probably likes 42 has manipulated the interface above its limits.\\n\\nYou can get more rooms for money. ;-)\\n\\nprogram will terminate...\", \"Warning Number Of CoffeeDispensers\",\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE, ICONWARNING);\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "private USBConstant() {\r\n\r\n\t}", "public double getLimit() {return limit;}", "private void setSilicateMaxError (float silicateMax, Exception e, int error) {\n this.silicateMax = silicateMax;\n silicateMaxErrorMessage = e.toString();\n silicateMaxError = error;\n }", "@Override\n\tpublic void setConstant(InterpreteConstants c) {\n\t\t\n\t}", "public int getThreshold() {\n/* 340 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void setRestrictionNotice(String restrictionNotice) {\n this.restrictionNotice = restrictionNotice == null ? null : new StringWithCustomFacts(restrictionNotice);\n }", "public LimitExceededException(String message) {\n super(message, true);\n }", "public interface Constants {\r\n public static final String APPLE_PRODUCT_CODE = \"APP1456\";\r\n public static final String ORANGE_PRODUCT_CODE = \"ORG3456\";\r\n public static final Double APPLE_PRODUCT_PRICE = 0.60;\r\n public static final Double ORANGE_PRODUCT_PRICE = 0.25;\r\n public static final int MAGIC_NUMBER_ZERO = 0;\r\n public static final int MAGIC_NUMBER_TWO = 2;\r\n public static final int MAGIC_NUMBER_THREE = 3;\r\n public static final int MAGIC_NUMBER_FIVE = 5;\r\n public static final int MAGIC_NUMBER_SEVEN = 7;\r\n public static final int MAGIC_NUMBER_NINE = 9;\r\n}", "@AnyLogicInternalCodegenAPI\n public int _EncounterRate_DefaultValue_xjal() {\n final Main self = this;\n return \n10 \n;\n }", "public abstract int getMessageSize();", "private ApplicationConstants(){\n\t\t//not do anything \n\t}", "public static double calculateLimit() {\n return 500;\n }", "public interface Constants {\n int BYTES_PER_FLOAT = 4;\n}", "public interface DublinCoreConstants {\n \n /** Creates a new instance of Class */\n public static int DC_TITLE = 0;\n public static int DC_CREATOR = 1;\n public static int DC_SUBJECT = 2;\n public static int DC_DATE = 3;\n public static int DC_TYPE= 4;\n public static int DC_FORMAT= 5;\n public static int DC_IDENTIFIER = 6;\n public static int DC_COLLECTION = 7;\n public static int DC_COVERAGE = 8;\n \n public static int SUPPORTED_NUMBER = 9;\n \n public static final String[] DC_FIELDS = {\"title\",\"creator\",\"subject\",\"date\",\"type\",\"format\",\"identifier\",\"collection\",\"coverage\"};\n public static final String DC_NAMESPACE = \"dc:\";\n \n}", "private Constants() {\n }", "private Constants() {\n }", "public String toString() {\n return super.toString() + \" (\" + constants.size() + \" constants)\";\n }", "@Deprecated\n public static int getLimit() {\n return LIMIT;\n }", "public interface IInfusable {\n\n int getInfused();\n\n void setInfused(int i);\n\n default float getInfusedFactor() {\n return ((float) getInfused()) / GeneralConfig.maxInfuse.get();\n }\n}", "public void setThreshold(int threshold) {\n/* 357 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public AssumptionsFailureCounter(int assumptionLimit) {\n this.assumptionLimit = assumptionLimit;\n }", "public int getLimit(){\r\n return limit;\r\n\r\n }", "public int getVoiceMaxResults() {\n/* 223 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean isConstant() {\n return false;\n }", "public void setLimit(int limit) {\n this.limit = limit;\n }", "protected String queueWarning(Queue checkQueue, String name, int size) throws Exception\r\n\t{\r\n\t\tif (size > warningSize)\r\n\t\t{\r\n\t\t\tString queueWarning = \"\";\r\n\r\n\t\t\tif (size >= maxSize)\r\n\t\t\t{\r\n\t\t\t\tqueueWarning = \"FATAL: queue \" + name + \" is reach to limitation (\" + size + \"/\" + maxSize + \")\\r\\n\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tqueueWarning = \"WARNING: queue \" + name + \" may be reach to limitation (\" + size + \"/\" + maxSize + \")\\r\\n\";\r\n\t\t\t}\r\n\r\n\t\t\tlogMonitor(queueWarning);\r\n\t\t\t// alarmMessage += warningMessage;\r\n\r\n\t\t\treturn queueWarning;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "public void setWarn_count(Long warn_count) {\n this.warn_count = warn_count;\n }", "public void setBorderWarningDistance(int amountOfBlocks)\n {\n borderWarningDistance = amountOfBlocks;\n }", "@Override\n\tpublic void setDefaultParameters() {\n\t\tprobCatch = (probCatchBounds.get(0) + probCatchBounds.get(2)) / 2;\n\t}", "public default int getNumberOfFins(){\n return 4;\n }", "public void setLimit(int limit) {\n this.limit = limit;\n }", "public void setLimit(int limit) {\n this.limit=limit;\n }", "public LoggerRateLimiter() {\n this.map = new HashMap<>();\n }", "public int getLimit() {\n\treturn Limit;\n }", "int getLimit();", "int getLimit();", "protected final void setMessageHelper(int number, Object... args) {\r\n if (number < 1) {\r\n SLLogger.getLogger().warning(I18N.err(257, number));\r\n return;\r\n }\r\n // f_message = args.length == 0 ? I18N.res(number) : I18N.res(number, args);\r\n // f_messageCanonical = args.length == 0 ? I18N.resc(number) :\r\n // I18N.resc(number, args);\r\n f_message = args.length == 0 ? resolveMessage(number) : resolveMessage(number, args);\r\n f_messageCanonical = args.length == 0 ? resolveMessageCanonical(number) : resolveMessageCanonical(number, args);\r\n }", "public void warningPermit();", "public int getSuggestThreshold() {\n/* 152 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private Constants() {\n\t\tthrow new AssertionError();\n\t}", "public void testPreferencesGeneralNotificationConstant() {\n assertEquals(\"PREFS_GENERAL_NOTIFICATION is incorrect\",\n UserConstants.PREFS_GENERAL_NOTIFICATION, \"prefs-general-notification\");\n }", "private void assertLimitedUnit(final Unit unit) {\n if (null != unit.getMsgLimit() && unit.getMsgLimit().longValue() <= 0) {\n throw new IllegalStateException(SmsUtils.MSG_LIMIT_EXCEEDE);\n }\n }", "public interface Constants {\n public static final int CASE_ZERO = 0;\n public static final int CASE_ONE = 1;\n\n}", "public static void main(String[] args) {\n WarningCounterTest wcounter = new WarningCounterTest();\n wcounter.allgemeineTest();\n //wcounter.maximumException();\n wcounter.minimumException();\n }", "static C2395k m11990i() {\n return new C2395k(\"Protocol message was too large. May be malicious. Use CodedInputStream.setSizeLimit() to increase the size limit.\");\n }", "public ValueOutOfBoundsException(String message){\n super(message);\n //do nothing else\n }", "private LabelUtilsConstants() {}", "@Override\r\n\tint check_sweetness() {\n\t\treturn 10;\r\n\t}", "protected Warning() {\n\n }", "@Override\n public int getMessageSize()\n {\n return 0;\n }", "@Override\n public void messageOverrun(int value) {\n }", "public Integer maxMessages();", "private PuzzleConstants() {\n // not called\n }", "void setMaxValue();", "private Constants() {\n\n }", "public int getLimit() {\r\n return limit;\r\n }", "private Constants() {\n throw new AssertionError();\n }", "public int getLimit() {\n return limit;\n }" ]
[ "0.6040618", "0.58708256", "0.5751147", "0.56755626", "0.56755626", "0.56394154", "0.5616516", "0.5549224", "0.5546411", "0.5484726", "0.5461922", "0.5453935", "0.5443453", "0.5434789", "0.5420709", "0.5327389", "0.53057057", "0.52879053", "0.5285506", "0.5226689", "0.5186885", "0.516503", "0.5152654", "0.51154387", "0.5110933", "0.50800145", "0.5077663", "0.5052529", "0.50377214", "0.5033811", "0.50239116", "0.50222254", "0.50172955", "0.49893364", "0.49788424", "0.49756983", "0.49673468", "0.49613237", "0.49561262", "0.49529445", "0.49529216", "0.49490198", "0.4934523", "0.49267453", "0.4916756", "0.49097785", "0.49079454", "0.49054664", "0.4900661", "0.48928842", "0.48925894", "0.4890156", "0.48869774", "0.4881086", "0.48792294", "0.4874062", "0.48666176", "0.48666176", "0.48622674", "0.4859225", "0.4857746", "0.48548406", "0.48540184", "0.48493457", "0.4848132", "0.48436555", "0.4843298", "0.4843101", "0.48397806", "0.48358983", "0.48319", "0.48299694", "0.48289263", "0.48282844", "0.48281983", "0.48223484", "0.48216704", "0.48216704", "0.482073", "0.4817442", "0.48118055", "0.48085526", "0.48071283", "0.48025817", "0.47910374", "0.47908536", "0.47905236", "0.47895762", "0.47885254", "0.47857338", "0.47834808", "0.47820157", "0.4776892", "0.4771568", "0.47628197", "0.47623134", "0.4758474", "0.47553584", "0.47529367", "0.47464243" ]
0.59789157
1
Adds a new validation notice to the container (if there is capacity).
public void addValidationNotice(ValidationNotice notice) { // TODO: This would be the spot to add customization of notice severity levels in the future. SeverityLevel severity = ValidationNotice.getDefaultSeverityLevel(notice.getClass()); addValidationNoticeWithSeverity(notice, severity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addValidRecord() {\r\n recordCount++;\r\n }", "public NoticeContainer() {\n this(\n MAX_TOTAL_VALIDATION_NOTICES,\n MAX_VALIDATION_NOTICES_TYPE_AND_SEVERITY,\n MAX_EXPORTS_PER_NOTICE_TYPE_AND_SEVERITY);\n }", "public final void AddError()\n\t{\n\t\terrorCount_++;\n\t\tentryValid_ = false;\n\t}", "final void addError( ParsedElement parsedElement, ResourceKey errorMsg )\n {\n verify( parsedElement, false, errorMsg, EMPTY_ARRAY );\n }", "public void addErrorMessage(ConstraintViolation<?> constraintViolation, Widget widget) {\n\t\tSpanElement msg = DOM.createSpan().cast();\n\t\tmsg.setInnerText(constraintViolation.getMessage());\n\t\tmsg.addClassName(\"help-block\");\n\t\twidget.getElement().getParentElement().appendChild(msg );\n\t}", "public void warning(ValidationType type, String validationName, String content);", "protected void updateValidity(){}", "public void validationErr()\r\n\t{\n\t\tSystem.out.println(\"validation err\");\r\n\t}", "public void tryAdd() {\r\n\t\tif (isDataModified()) {\r\n\t\t\tscrollToMe();\r\n if (getValidator().getUseAlertsForErrors()) {\r\n addConfirmScript(_okToAddQuestion, _okToAddValue);\r\n }\r\n else {\r\n _validator.setErrorMessage(_okToAddQuestion, null, -1, _okToAdd);\r\n }\r\n\t\t}\r\n else {\r\n \t\tdoAdd();\r\n }\r\n\t}", "@Override\n\tpublic void validate() {\n\t}", "private void addValidItem(Item item){\r\n\t\titems.put(item.getItemIdentifier(), item);\r\n\t\ttotal.updateTotal(item);\r\n\t}", "public void annotationsCouldNotBeAdded(String errorMessage) {}", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "@Override\r\n public void validate() {\r\n }", "public void validate() {\n\t\tthis.invalidated = false;\n\t}", "@Override\n\tpublic void validate() {\n\t\tsuper.validate();\n\t}", "@Override\r\n public boolean validate() {\n return true;\r\n }", "@Override\r\n\tpublic boolean validate() {\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean validate() {\n\t\treturn true;\r\n\t}", "public static void startValidation() {\n errList = new ArrayList<>();\n }", "@Override\r\n\tprotected void validate() {\n\t}", "org.hl7.fhir.ObservationReliability addNewReliability();", "void add(RecordItemValidatorIF itemValidator);", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "private void validateQuantity() {\n if (numQuantity.isEmpty()) {\n numQuantity.setErrorMessage(\"This field cannot be left blank.\");\n numQuantity.setInvalid(true);\n removeValidity();\n }\n // Check that quantity is in acceptable range (range check)\n else if (!validator.checkValidQuantity(numQuantity.getValue().intValue())) {\n numQuantity.setErrorMessage(\"Please enter a number between 1 and \" + researchDetails.MAX_QUANTITY + \" (inclusively)\");\n numQuantity.setInvalid(true);\n removeValidity();\n }\n\n }", "public void addError(String message);", "private void displayValidationError() {\n\n\t\tif (null != validationErrorTitle) {\n\t\t\tvalidationErrorParent.toFront();\n\t\t\tAppController.showMessage(validationErrorParent, validationErrorMessage, validationErrorTitle,\n\t\t\t\tvalidationErrorType);\n\t\t}\n\n\t\tclearValidationError();\n\t}", "@Override\n public void customValidation() {\n }", "@Override\n public void customValidation() {\n }", "@Override\n public void customValidation() {\n }", "public void validate() throws ValidationException {\n\t}", "@Override\r\n\tpublic boolean checkValidity() {\n\t\treturn false;\r\n\t}", "private void checkCapacity(int capacity) \n {\n if (capacity > MAX_CAPACITY)\n throw new IllegalStateException(\"Attempt to create a bag whose \" +\n \"capacity exeeds allowed \" +\n \"maximum of \" + MAX_CAPACITY);\n }", "public noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors addNewErrors()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors target = null;\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors)get_store().add_element_user(ERRORS$4);\r\n return target;\r\n }\r\n }", "public void addWarning(String warning);", "public void validate() {}", "private void markValidity() {\n if (!interactive) {\n return;\n }\n\n boolean validMeld = true;\n if (checkForValidity) {\n validMeld = cardSet.isAValidMeld(3);\n }\n\n for (CardView cardView : cardViews) {\n cardView.setValid(validMeld);\n }\n }", "@Override\r\n\tpublic void addNotice(Notice notice) {\n\t\tnoticemapper.insert(notice);\r\n\t}", "public void addValidationError(ExcelImportException error) {\n\t\tthis.validationErrors.add(error);\n\t}", "@Then(\"^validation error message should be displayed$\")\n public void verifyThatValidationErrorMessageIsDiplayed() {\n assertion.assertTrue(StoryBoard.validationError());\n }", "private void displayValidity() {\n if (allValid) spnValid.setText(\"All fields are valid!\");\n else spnValid.setText(\"There are invalid fields. Please go back and check these.\");\n }", "public void note(ValidationType type, String validationName, String content);", "protected void validate() {\n // no op\n }", "private void validation() {\n this.validate();\n this.repaint();\n }", "public boolean startValidation(IPSComponent component, String message);", "public final void setRequired() {_occ.setRequired();}", "@Override\n\tpublic boolean validate() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean validate() {\n\t\treturn false;\n\t}", "void setCustomValidity(String error);", "public final void addValidationState(ValidationState vs) {\n fVSs.add(vs);\n }", "private void addErrorMessage(ErrorMessage error) {\n if (error != null && !errors.contains(error)) {\n errors.add(error);\n final int l = error.getErrorLevel();\n if (l > level) {\n level = l;\n }\n }\n }", "void validate(Inspector inspector) throws ValidationException;", "private void updateValidationMessages()\r\n {\r\n String errorMessage = myModel.getErrorMessage();\r\n String warningMessage = myModel.getWarningMessage();\r\n\r\n if (StringUtils.isNotEmpty(errorMessage))\r\n {\r\n myValidator.setValidationResult(ValidationStatus.ERROR, errorMessage);\r\n }\r\n else if (StringUtils.isNotEmpty(warningMessage))\r\n {\r\n myValidator.setValidationResult(ValidationStatus.WARNING, warningMessage);\r\n }\r\n else\r\n {\r\n myValidator.setValidationResult(ValidationStatus.VALID, null);\r\n }\r\n }", "public void addError(String name, String message)\n\t{\n\t\tvalidationErrors.put(name, message);\n\t}", "@Override\r\n public void addValidListener(ValidListener l) {\n\r\n }", "@Override\r\n\tpublic void Validate() {\n\r\n\t}", "public interface Validateable {\n\n Validator validator = Validation.buildDefaultValidatorFactory().getValidator();\n\n default void validate(Validateable v) throws BeanValidationException {\n Set<ConstraintViolation<Validateable>> constraintViolations = validator.validate(v);\n if (constraintViolations.size() != 0) {\n StringBuilder sb = new StringBuilder();\n constraintViolations.forEach(cons -> sb.append(cons.getPropertyPath()).append(cons.getMessage()).append(','));\n throw new BeanValidationException(sb.toString());\n }\n }\n\n void validate();\n}", "public void addInvalidRecord(List<String> errors) {\r\n recordCount++;\r\n invalidRecords++;\r\n for (String error : new HashSet<String>(errors)) {\r\n Integer msgCount = errorMessagesCounts.get(error);\r\n if (msgCount == null)\r\n errorMessagesCounts.put(error, 1);\r\n else\r\n errorMessagesCounts.put(error, msgCount + 1);\r\n }\r\n }", "private static String addAdditionalInformationIfPossible(String msg)\n {\n long unallocatedSpace = freeDiskSpace();\n int segmentSize = DatabaseDescriptor.getCommitLogSegmentSize();\n\n if (unallocatedSpace < segmentSize)\n {\n return String.format(\"%s. %d bytes required for next commitlog segment but only %d bytes available. Check %s to see if not enough free space is the reason for this error.\",\n msg, segmentSize, unallocatedSpace, DatabaseDescriptor.getCommitLogLocation());\n }\n return msg;\n }", "void validate() throws ValidationException;", "public boolean validate() {\n return true;\n }", "public boolean validate() {\n return true;\n }", "@Override\n\t\tprotected void revalidate() {\n\t\t\tvalid = true;\n\t\t}", "public void validate () { throw new RuntimeException(); }", "void addError(String message) {\n\t\tif (currentErrors == null) {\r\n\t\t\tcurrentErrors = new ArrayList<String>();\r\n\t\t}\r\n\r\n\t\tcurrentErrors.add(message);\r\n\t}", "ch.crif_online.www.webservices.crifsoapservice.v1_00.ComplianceCheckResult addNewComplianceCheckResult();", "@Override\r\n public void validate() {\n\r\n }", "@Override\n\tpublic TestDeValidation addTestValidation(TestDeValidation test) {\n\t\tthrow new RuntimeException(\"Méthode nom implémentée\");\n\t}", "@Override\n\tpublic void selfValidate() {\n\t\t\n\t}", "@Override\n\tpublic void validation() throws EditorException\n\t{\n\t}", "public void validate() throws SpringBootBaseAppException,MessageValidationException;", "@Override protected void succeeded(Description description) {\n try {\n assertThat(spans.poll(100, TimeUnit.MILLISECONDS))\n .withFailMessage(\"Span remaining in queue. Check for redundant reporting\")\n .isNull();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "void addHas_certainty(Object newHas_certainty);", "@Override\r\n\tpublic void add(Score s) throws IllegalArgumentException {\r\n\t\tif (s == null)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\tscoreList[numItems] = s;\r\n\t\tnumItems++;\r\n\t}", "public void showAddSuccessful() {\n getMainApplication().showMessage(uiMessageSource.getMessage(\"aggregationRelationship.added\"));\n }", "void addHappiness(int Happiness);", "public void insertNotice(BbsNotice notice);", "protected /*override*/ void InsertItem(int index, Condition item)\r\n { \r\n CheckSealed();\r\n ConditionValidation(item); \r\n super.InsertItem(index, item); \r\n }", "public void validAdd(String element){\n\t\tlist.addLast(element);\n\t}", "@Override\n public HangarMessages addConstraintsRequiredMessage(String property) {\n assertPropertyNotNull(property);\n add(property, new UserMessage(CONSTRAINTS_Required_MESSAGE));\n return this;\n }", "@Override\n\t\tpublic void addMessage() {\n\t\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t //Setting visible to false in order to show only the JPtioinPane, not the Frame\n\t this.setVisible(false);\n\t this.setSize(300,300);\n\t \n\t JOptionPane.showMessageDialog(this, \"Operation made successfully!\");\n\t \n\t this.validate();\n\t this.repaint();\n\t\t}", "public void validate(){\n if (validated){\n validated = false;\n } else {\n validated = true;\n }\n }", "public void showErrorMessage() {\n\t\tthis.vm = null;\n\t\tplayButton.setText(\"►\");\n\n\t\tthis.remove(visualizerPanel);\n\t\tvisualizerPanel = new ErrorCard();\n\t\tvisualizerPanel.setPreferredSize(new Dimension(FRAME_WIDTH, FRAME_HEIGHT));\n\t\tthis.add(visualizerPanel);\n\t}", "@Override\n\tpublic void addConstraint(String constraint) {\n\n\t}", "private void showNoticeSearchResultSize() {\n if (searchList.size() == 0) {\n addActionMessage(getText(\"noItemMsg.label\"));\n }\n logger.debug(\"Marriage notice search list loaded with size : {}\", searchList.size());\n }", "@Override\n public HangarMessages addConstraintsAssertTrueMessage(String property) {\n assertPropertyNotNull(property);\n add(property, new UserMessage(CONSTRAINTS_AssertTrue_MESSAGE));\n return this;\n }", "@Override\n public HangarMessages addConstraintsNotEmptyMessage(String property) {\n assertPropertyNotNull(property);\n add(property, new UserMessage(CONSTRAINTS_NotEmpty_MESSAGE));\n return this;\n }", "private void validate(String s, int length, String msg) {\n Logger.getLogger(getClass()).info(\"valore della stringa inserita\"+s);\n \tif (s != null && s.length()>length)\n throw new IllegalArgumentException(msg);\n }", "public void validate() {\n if (valid) return;\n \n layer = getAttValue(\"layer\").getString();\n hasFrame = getAttValue(\"hasframe\").getBoolean();\n\n valid = true;\n }", "public void displayInvalid() {\n invalidLabel.setVisible(true);\n }", "public void publishTiancheWarn(String errorMsg) {\n }", "void addValidator(IValidator validator);", "protected Constraint add(Constraint c) throws IllegalArgumentException {\r\n\t\tif (!constraints.contains(c)) {\r\n\t\t\tif (c.getIndex() >= 0) {\r\n\t\t\t\tthrow new IllegalArgumentException();\r\n\t\t\t}\r\n\t\t\tc.setIndex(constraints.size());\r\n\t\t\tconstraints.add(c);\r\n\t\t}\r\n\t\treturn c;\r\n\t}", "private void addError(final SAMValidationError error) {\n if (this.errorsToIgnore.contains(error.getType())) return;\n \n if (this.ignoreWarnings && error.getType().severity == SAMValidationError.Severity.WARNING) return;\n \n this.errorsByType.increment(error.getType());\n if (verbose) {\n out.println(error);\n out.flush();\n if (this.errorsByType.getCount() >= maxVerboseOutput) {\n throw new MaxOutputExceededException();\n }\n }\n }", "@Override\n public void addListener(InvalidationListener listener) {\n }", "protected void validate() {\n // no implementation.\n }", "@Override\n public void showLabel(Message message){\n\n clear(container);\n container.setLayout(new FlowLayout());\n errorLabel = new JLabel(message.toString());\n container.add(errorLabel);\n errorLabel.setLocation(475,108);\n errorLabel.setSize(100,100);\n applyChangesTo(container);\n\n\n }", "@Before(stages=LifecycleStage.CustomValidation)\r\n public void addCustomValidationAttribute() {\r\n context.getRequest().setAttribute(\"CustomValidation\", \"CustomValidationAttribute\");\r\n context.getRequest().getSession().setAttribute(\"CustomValidation\", \"CustomValidationAttribute\");\r\n }", "private void ensureCapacity(int capacity) {\n\t\t\tif(capacity > elementData.length) {\n\t\t\t\tint newCap = elementData.length * 2 + 1;\n\t\t\t\tif(capacity > newCap) {\n\t\t\t\t\tnewCap = capacity;\n\t\t\t\t}\n\t\t\t\telementData = Arrays.copyOf(elementData, newCap);\n\t\t\t}\n\t\t}", "@Override\n public HangarMessages addConstraintsPastMessage(String property) {\n assertPropertyNotNull(property);\n add(property, new UserMessage(CONSTRAINTS_Past_MESSAGE));\n return this;\n }" ]
[ "0.55691516", "0.5565084", "0.55479133", "0.532586", "0.5316695", "0.5254019", "0.5248544", "0.5240781", "0.52081263", "0.5151872", "0.51400375", "0.51360935", "0.5133869", "0.51175743", "0.51104885", "0.5090596", "0.5047884", "0.50346285", "0.50346285", "0.50339353", "0.50092375", "0.5006105", "0.49943134", "0.49897477", "0.49767914", "0.4971864", "0.492355", "0.49218348", "0.49218348", "0.49218348", "0.49169597", "0.4916266", "0.4913257", "0.48971575", "0.48858967", "0.4880933", "0.48805305", "0.48662463", "0.48600966", "0.4851403", "0.484978", "0.4833185", "0.4830069", "0.48250377", "0.48038182", "0.47997594", "0.47984618", "0.47984618", "0.4793013", "0.47644627", "0.47590914", "0.47529364", "0.4748613", "0.47439125", "0.47381765", "0.47349855", "0.47278717", "0.47214577", "0.471879", "0.47141019", "0.47134566", "0.47134566", "0.46992585", "0.46873882", "0.46861237", "0.46796367", "0.46793044", "0.46465495", "0.464364", "0.46415117", "0.46321002", "0.46150723", "0.46144372", "0.45944458", "0.45917445", "0.45910326", "0.4589841", "0.45888862", "0.45871085", "0.45856798", "0.4584036", "0.45772028", "0.45745975", "0.45724934", "0.45683855", "0.45601368", "0.45569217", "0.45485342", "0.4545576", "0.45433006", "0.4539639", "0.45389497", "0.45342618", "0.45264545", "0.4523446", "0.45233116", "0.4519785", "0.45146623", "0.45076436", "0.4499842" ]
0.63634706
0
Adds a new system error to the container.
public void addSystemError(SystemError error) { ResolvedNotice<SystemError> resolved = new ResolvedNotice<>(error, SeverityLevel.ERROR); updateNoticeCount(resolved); systemErrors.add(resolved); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addError(Throwable t);", "public void addError(String message);", "public static void addError(Exception e) {\n errors.push(e);\n }", "public void addError(ShadowException exception) {\n if (exception != null) errorList.add(exception);\n }", "void addError(String message) {\n\t\tif (currentErrors == null) {\r\n\t\t\tcurrentErrors = new ArrayList<String>();\r\n\t\t}\r\n\r\n\t\tcurrentErrors.add(message);\r\n\t}", "public void addError(\n Context ctx, ShadowExceptionErrorKind error, String message, Type... errorTypes) {\n if (containsUnknown(errorTypes)) return; // Don't add error if it has an unknown type in it.\n\n if (ctx != null) errorList.add(error.getException(message, ctx));\n }", "private void createSysErr(int i, String name) {\n if(profile.allowClass(name)) {\n if (errnos.get(i) == null) {\n RubyClass errno = getErrno().defineClassUnder(name, systemCallError, systemCallError.getAllocator());\n errnos.put(i, errno);\n errno.defineConstant(\"Errno\", newFixnum(i));\n } else {\n // already defined a class for this errno, reuse it (JRUBY-4747)\n getErrno().setConstant(name, errnos.get(i));\n }\n }\n }", "public final void AddError()\n\t{\n\t\terrorCount_++;\n\t\tentryValid_ = false;\n\t}", "public noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors addNewErrors()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors target = null;\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors)get_store().add_element_user(ERRORS$4);\r\n return target;\r\n }\r\n }", "public final void addError(final String nodeName, final Exception error) {\n\n\t\tthis.errors.put(nodeName, error);\n\t}", "public noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error addNewError()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error target = null;\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error)get_store().add_element_user(ERROR$0);\r\n return target;\r\n }\r\n }", "public void addException(Exception exception);", "void setContainerStatusError(RuleContextContainer rccContext, String sStatusInfo)\r\n throws StorageProviderException;", "public void addError(String response) {\n VBox error = new VBox();\n Text errorText = new Text(response);\n error.getChildren().add(errorText);\n root.setRight(error);\n }", "public static void addError(\n List<ShadowException> errors,\n ShadowExceptionErrorKind error,\n String reason,\n Type... errorTypes) {\n // Don't add an error if it has an Unknown Type in it.\n if (containsUnknown(errorTypes)) return;\n if (errors != null) errors.add(error.getException(reason, null));\n }", "@Override\n\tpublic void addError(String hdr, String msg) {\n\t\terrors.put(hdr, msg);\n\t}", "public static void registerError() {\r\n errorCount++;\r\n }", "protected void addErrorDiagnostic(String message) {\n addDiagnostic(Diagnostic.error(message));\n }", "private void addError(final SAMValidationError error) {\n if (this.errorsToIgnore.contains(error.getType())) return;\n \n if (this.ignoreWarnings && error.getType().severity == SAMValidationError.Severity.WARNING) return;\n \n this.errorsByType.increment(error.getType());\n if (verbose) {\n out.println(error);\n out.flush();\n if (this.errorsByType.getCount() >= maxVerboseOutput) {\n throw new MaxOutputExceededException();\n }\n }\n }", "public void addError(String name, String message)\n\t{\n\t\tvalidationErrors.put(name, message);\n\t}", "private void register(Error error) {\n // insert a new error into the error list\n // but keep at most 100 errors.\n if (errorList.size() < 100) {\n insert(error);\n }\n }", "void setContainerStatusActionError(RuleContextContainer rccContext, String sStatusInfo)\r\n throws StorageProviderException;", "private void addError(String field, String error, Object value) {\n if (errors == null) {\n errors = new LinkedHashMap<String, FieldError>();\n }\n LOG.debug(\"Add field: '{}' error: '{}' value: '{}'\", field, error, value);\n errors.put(field, new FieldError(field, error, value));\n }", "final void addError( ParsedElement parsedElement, ResourceKey errorMsg )\n {\n verify( parsedElement, false, errorMsg, EMPTY_ARRAY );\n }", "public void addGlobalError(String errorMessage) {\n\t\tNode globalErrorsNode = validationDoc.getDocumentElement()\n\t\t\t\t.getElementsByTagName(\"v:global-errors\").item(0);\n\t\tElement errorNode = validationDoc.createElement(\"v:global-error\");\n\t\tNamedNodeMap attributes = errorNode.getAttributes();\n\t\tAttr alertAttr = validationDoc.createAttribute(\"v:alert\");\n\t\talertAttr.setValue(errorMessage);\n\t\tattributes.setNamedItem(alertAttr);\n\t\tglobalErrorsNode.appendChild(errorNode);\n\t\tvalid = false;\n\t}", "public void addError(String errorMessage, AbstractPersistedAnalysisJob job) {\r\n getDwrUtil(job.getUserWorkspace().getUsername()).setValue(\"errors\", errorMessage);\r\n }", "public Builder addError(WorldUps.UErr value) {\n if (errorBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureErrorIsMutable();\n error_.add(value);\n onChanged();\n } else {\n errorBuilder_.addMessage(value);\n }\n return this;\n }", "public void putError(String message) {\n errorData.postValue(message);\n }", "private void addGlobalExceptionToPage(Exception exception, BindingResult bindingResult) {\n ObjectError error = new ObjectError(\"globalError\", exception.getMessage());\n bindingResult.addError(error);\n }", "protected void finalizeSystemErr() {}", "public void addValidationError(ExcelImportException error) {\n\t\tthis.validationErrors.add(error);\n\t}", "private void addErrorMessage(ErrorMessage error) {\n if (error != null && !errors.contains(error)) {\n errors.add(error);\n final int l = error.getErrorLevel();\n if (l > level) {\n level = l;\n }\n }\n }", "@Override\n protected void addError(Type errorType, int line, int column, String key)\n {\n super.addError(errorType, line, column, this.messages.getString(key));\n }", "public noNamespace.ErrorDocument.Error addNewError()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrorDocument.Error target = null;\r\n target = (noNamespace.ErrorDocument.Error)get_store().add_element_user(ERROR$0);\r\n return target;\r\n }\r\n }", "public JsonObject exportSystemErrors() {\n return exportJson(systemErrors);\n }", "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 void Error(String error) throws RemoteException;", "public final void error(String error){\n lastKnownError = error;\n }", "public CrashReport withError(String error);", "protected void handleError(String error, boolean fromSysErr) {}", "public void error(Throwable error) {\n\n }", "public void error(Throwable error) {\n\n }", "public noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error insertNewError(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error target = null;\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error)get_store().insert_element_user(ERROR$0, i);\r\n return target;\r\n }\r\n }", "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 synchronized void addError(int stepId, Exception ex) {\n\t\terrors.add(stepId + \"\\n\" + getStacktraceFromException(ex));\n\t}", "public void add() {\n //TODO: Fill in this method, then remove the RuntimeException\n throw new RuntimeException(\"RatPolyStack->add() unimplemented!\\n\");\n }", "void onStartContainerError(ContainerId containerId, Throwable t);", "public OperationStatusResultInner withError(ManagementError error) {\n this.error = error;\n return this;\n }", "public void errorFromKernel (String error) {\n clientCommunicationManager.sendErrorToAll(\"NETWORK\", \"[ERROR JUPYTER] \" + error);\n }", "public static void addErrorEntry(Context context, Exception exception) {\n ContentValues contentValues = new ContentValues();\n String exceptionName = (exception != null ? exception.toString() : \"No Exception Details\");\n String exceptionDetails = Log.getStackTraceString(exception);\n contentValues.put(ErrorProvider.ERROR_DETAILS , (exceptionDetails != null && exceptionDetails.length() > 0) ? exceptionDetails : exceptionName);\n contentValues.put(ErrorProvider.LAST_DATE , String.valueOf(new Date().getTime()));\n Uri uri = context.getContentResolver().insert(ErrorProvider.CONTENT_URI, contentValues);\n Log.d(MainActivity.APP_TAG, \"Utility: Added error uri: \" + uri.toString() + \" ;exception: \" + contentValues.get(ErrorProvider.ERROR_DETAILS));\n }", "void onGetContainerStatusError(ContainerId containerId, Throwable t);", "void setError(@Nullable Exception error) {\n this.error = error;\n }", "public void registerError(final Throwable t) {\n synchronized (this) {\n this.threadError = t;\n }\n\n }", "public void addDiagnostic(Diagnostic diagnostic) {\n if (diagnostic.getKind() == DiagnosticKind.ERROR) {\n hasErrors = true;\n }\n this.diagnostics.add(diagnostic);\n }", "public final void addErrors(Context ctx, List<ShadowException> errors) {\n if (errors != null)\n for (ShadowException error : errors) addError(ctx, error.getError(), error.getMessageText());\n }", "@Override\n\t\tpublic void onServiceError(String error) {\n\n\t\t}", "@Override\n\t\tpublic void onServiceError(String error) {\n\n\t\t}", "public void addParsingError(ExcelImportException error) {\n\t\tthis.parsingErrors.add(error);\n\t}", "ResponseErrorAssembler addErrorMesage(Message errorMessage);", "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 addException(Exception e ) {\n logger.info(Thread.currentThread().getStackTrace()[1].getMethodName());\n logger.debug(\"Adding new Exception -> \"+ e);\n exception = e;\n }", "public SysException(String message) {\r\n super(message);\r\n\r\n }", "public void error(Exception e);", "private void addErrors(List<ErrorBean> errorList, AzureChatException e) {\n\t\tErrorBean errorBean = new ErrorBean();\n\t\terrorBean.setExcpMsg(e.getExcpMsg());\n\t\terrorBean.setExcpType(e.getExcpType());\n\t\terrorList.add(errorBean);\n\t}", "public abstract void onGetContainerStatusError(\n ContainerId containerId, Throwable t);", "@Deprecated\n public abstract void onIncreaseContainerResourceError(\n ContainerId containerId, Throwable t);", "public abstract void onStartContainerError(\n ContainerId containerId, Throwable t);", "public ContainerAlreadyExistsInFacilityException() {\r\n\t\tsuper();\r\n\t}", "public abstract void showErrorBox(Throwable error);", "private static void put(String errMsg) {\n if (errMsg != null) {\n errList.add(errMsg);\n }\n }", "public abstract void onUpdateContainerResourceError(\n ContainerId containerId, Throwable t);", "protected void addError(AeExpressionValidationResult aResult, String aMessage, Object[] aArgs) {\r\n String msg = MessageFormat.format(aMessage, aArgs);\r\n aResult.addError(msg);\r\n }", "public ResultProxy addStandardException(Exception e){\n\t\taddRecordToDataset(\"exceptions\", new RecordProxy()\n\t\t\t.addParam(\"opstatus\", 10500)\n\t\t\t.addParam(\"httpStatusCode\", 500)\n\t\t\t.addParam(\"message\", e.getMessage())\n\t\t\t.addParam(\"class\", e.getClass().getCanonicalName())\n\t\t\t.addParam(\"stack\", ExceptionUtils.getStackTrace(e))\n\t\t);\n\t\t//\t)\n\t\t//);\n\n\t\treturn this;\n\t}", "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 EngineErrorEvent(CoreASMError error) {\n\t\tthis.error = error;\n\t\tthis.time = new Date();\n\t}", "public void append(String error) {\n errorMessage.append(error);\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 }", "public Builder addError(\n int index, WorldUps.UErr value) {\n if (errorBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureErrorIsMutable();\n error_.add(index, value);\n onChanged();\n } else {\n errorBuilder_.addMessage(index, value);\n }\n return this;\n }", "public BucketErrorCode addObjectErrCode(LocalAbstractObject object) {\n try {\n addObject(object);\n return BucketErrorCode.OBJECT_INSERTED;\n } catch (BucketStorageException e) {\n return e.getErrorCode();\n }\n }", "public ProductGroup addContainer(String name) throws IllegalArgumentException;", "public synchronized void add(String text, BoundingBox box, boolean errored) {\n labels.add(new LabelToWrite(text, box, errored));\n sumSizes.add(box.extent().x(), box.extent().y());\n }", "public static void exposeError(String errorMessage) {\r\n CmdUx.printHBars(errorMessage);\r\n }", "public void addExceptionStyle();", "public void addExtractionError(ExcelImportException error) {\n\t\tthis.extractionErrors.add(error);\n\t}", "public abstract void setError(String message);", "public void error(String message, String sysid, int line, int column)\n\t\t\t\tthrows Exception {\n\t\t\tif (sysid != null) {\n\t\t\t\tlogError(\"[\" + sysid + \"] \" + message);\n\t\t\t} else {\n\t\t\t\tlogError(message);\n\t\t\t}\n\t\t}", "void setError();", "@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public void error(Throwable e);", "public noNamespace.ErrorDocument.Error insertNewError(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrorDocument.Error target = null;\r\n target = (noNamespace.ErrorDocument.Error)get_store().insert_element_user(ERROR$0, i);\r\n return target;\r\n }\r\n }", "public void error(String message);", "public void setError(String error) {\n this.error = error;\n }", "public void setError(String error) {\n this.error = error;\n }", "public void setError(String error) {\n this.error = error;\n }", "private void addErrors() {\n this.errors = new ArrayList<>();\n var resources = ResourceBundle.getBundle(ERRORS);\n for (var key : Collections.list(resources.getKeys())) {\n var value = resources.getString(key);\n errors.add(new AbstractMap.SimpleEntry<>(key, value));\n }\n }", "@Test(timeout = 4000)\n public void test176() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Component component0 = errorPage0.hr();\n // Undeclared exception!\n try { \n component0.address();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Can't add components to a component that is not an instance of IContainer.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public void setError(File error) {\r\n this.error = error;\r\n incompatibleWithSpawn = true;\r\n }", "public ContainerAlreadyExistsInFacilityException(String message) {\r\n\t\tsuper(message);\r\n\t}", "ResponseErrorAssembler addErrorMesages(Collection<Message> errorMessages);", "public List<SystemError> getSystemErrors() {\n return Lists.transform(systemErrors, ResolvedNotice::getContext);\n }" ]
[ "0.6654558", "0.6486399", "0.6364722", "0.59760046", "0.59589994", "0.5939204", "0.58459795", "0.58186305", "0.5735222", "0.5731058", "0.5663948", "0.5639014", "0.56316847", "0.56050855", "0.5571197", "0.55456144", "0.55260044", "0.5485627", "0.54829603", "0.54247236", "0.54055476", "0.5376706", "0.53644365", "0.5320543", "0.531378", "0.5302469", "0.5281449", "0.52689654", "0.52516943", "0.52187145", "0.5214998", "0.5210074", "0.52084005", "0.5183065", "0.5141035", "0.50956225", "0.5092413", "0.50921214", "0.5089778", "0.50891995", "0.5065288", "0.5065288", "0.50636214", "0.5056865", "0.505191", "0.50511014", "0.5050304", "0.5040324", "0.50324404", "0.5030532", "0.50184035", "0.50004524", "0.49880582", "0.4982461", "0.49661416", "0.49642152", "0.49642152", "0.49564958", "0.4952129", "0.49469543", "0.49465796", "0.49406487", "0.49241135", "0.4910019", "0.490905", "0.49023488", "0.48961228", "0.48865265", "0.48773298", "0.4869408", "0.48637286", "0.48632297", "0.48529446", "0.48436353", "0.48374605", "0.48144308", "0.48095027", "0.47957295", "0.47957078", "0.47916454", "0.4787753", "0.47710192", "0.47626328", "0.476175", "0.47603604", "0.47530866", "0.4750081", "0.47387263", "0.4738535", "0.47321463", "0.47292802", "0.47242883", "0.47242883", "0.47242883", "0.47233716", "0.47019503", "0.4701009", "0.4700926", "0.46964785", "0.46961954" ]
0.7419843
0
Returns a list of all validation notices in the container.
public List<ValidationNotice> getValidationNotices() { return Lists.transform(validationNotices, ResolvedNotice::getContext); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Collection fullValidationCheck ()\n\t{\n\t\tArrayList list = new ArrayList();\n\t\tIterator iterator = getFullValidationList().iterator();\n\n\t\twhile (iterator.hasNext())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t((ValidationComponent)iterator.next()).validate();\n\t\t\t}\n\t\t\tcatch (ModelValidationException e)\n\t\t\t{\n\t\t\t\tlist.add(e);\n\t\t\t}\n\t\t}\n\n\t\treturn Collections.unmodifiableCollection(list);\n\t}", "public List<String> validate() {\n\t\t\n\t\tList<String> validationMessages = new ArrayList<String>();\n\t\tvalidate(validationMessages);\n\t\treturn validationMessages;\n\t}", "public List<String> getErrorMessages();", "public java.util.List<WorldUps.UErr> getErrorList() {\n if (errorBuilder_ == null) {\n return java.util.Collections.unmodifiableList(error_);\n } else {\n return errorBuilder_.getMessageList();\n }\n }", "public List<Throwable> list() {\n return messages;\n }", "public List<DrillPBError> getErrorList() {\n synchronized(errorList) {\n return Collections.unmodifiableList(errorList);\n }\n }", "public ImmutableList<String> getErrorMessages() {\n return Lists.immutable.ofAll(errorMessages);\n }", "public List<NaaccrValidationError> getAllValidationErrors() {\n List<NaaccrValidationError> results = new ArrayList<>(getValidationErrors());\n results.addAll(getItems().stream().filter(item -> item.getValidationError() != null).map(Item::getValidationError).collect(Collectors.toList()));\n for (Tumor tumor : getTumors())\n results.addAll(tumor.getAllValidationErrors());\n return results;\n }", "public ArrayList<Exception> getValidateExceptions();", "List<String> getErrorMessages(Exception exception);", "public List<String> takeErrors() {\n final List<String> result = new ArrayList<String>(errors);\n errors.clear();\n return result;\n }", "public List<SystemError> getSystemErrors() {\n return Lists.transform(systemErrors, ResolvedNotice::getContext);\n }", "public List<ExcelImportException> getValidationErrors() {\n\t\treturn this.validationErrors;\n\t}", "Set<ConstraintViolation<T>> getViolations();", "public List<RemoteRenderingServiceError> listRootErrors() {\n return this.rootErrors;\n }", "public Collection getBasicValidationList ()\n\t{\n\t\tArrayList list = new ArrayList();\n\t\tString className = getClassName();\n\n\t\tlist.add(createClassExistenceComponent(className));\n\t\tlist.add(createClassPersistenceComponent(className));\n\n\t\tlist.addAll(getDatabaseValidationList());\n\t\tlist.addAll(getFieldsValidationList());\n\n\t\treturn Collections.unmodifiableCollection(list);\n\t}", "public JsonObject exportValidationNotices() {\n return exportJson(validationNotices);\n }", "public List<String> getErrorMessages() {\n logger.info(Thread.currentThread().getStackTrace()[1].getMethodName());\n logger.debug(\"Getting All Error Messages -> \"+errMessages);\n return errMessages;\n }", "public List<Notice> getAllOriginalNotice(){\n\t\tList<Notice> notices = null;\n\t\ttry {\n\t\t\tnotices = noticeRepository.findByIsDeleted(false); \n\t\t} catch (Exception e) {\t\t\t\n\t\t\tthrow new ServerErrorException(\"Exception occured at Service in getAllOriginalNotice(). \"+e);\t\n\t\t}\n\t\t\n\t\treturn notices;\n\t}", "public List<ResolvedMessage> getAll() { // e.g. th:each=\"error : ${errors.all}\"\n List<ResolvedMessage> list = new ArrayList<ResolvedMessage>();\n messages.accessByFlatIterator().forEachRemaining(message -> {\n list.add(createResolvedMessage(message));\n });\n return list;\n }", "public NoticeContainer() {\n this(\n MAX_TOTAL_VALIDATION_NOTICES,\n MAX_VALIDATION_NOTICES_TYPE_AND_SEVERITY,\n MAX_EXPORTS_PER_NOTICE_TYPE_AND_SEVERITY);\n }", "public List<String> getListOfErrors() {\n return listOfErrors;\n }", "public Collection getFullValidationList ()\n\t{\n\t\tArrayList list = new ArrayList(getBasicValidationList());\n\t\tString className = getClassName();\n\t\tPersistenceClassElement persistenceClass = \n\t\t\tgetPersistenceClass(className);\n\n\t\tif (persistenceClass != null)\n\t\t{\n\t\t\tPersistenceFieldElement[] fields = persistenceClass.getFields();\n\t\t\tint i, count = ((fields != null) ? fields.length : 0);\n\n\t\t\tlist.add(createSerializableClassComponent(className));\n\t\t\tlist.add(createKeyClassComponent(persistenceClass.getKeyClass()));\n\t\t\tlist.add(createClassMappingComponent(persistenceClass));\n\t\t\tlist.add(createKeyColumnMappingComponent(persistenceClass));\n\n\t\t\tfor (i = 0; i < count; i++)\n\t\t\t{\n\t\t\t\tPersistenceFieldElement field = fields[i];\n\n\t\t\t\tlist.add(createFieldCardinalityComponent(field));\n\t\t\t\tlist.add(createFieldMappingComponent(field));\n\t\t\t\tlist.add(createFieldBlobMappingComponent(field));\n\t\t\t\tlist.addAll(getRelatedClassValidationList(field));\n\t\t\t}\n\t\t}\n\n\t\treturn Collections.unmodifiableCollection(list);\n\t}", "public Collection<GmlExceptionReport> getErrors()\r\n {\r\n return myErrorHandler.getExceptionReports();\r\n }", "java.util.List<? extends com.google.rpc.BadRequest.FieldViolationOrBuilder> \n getFieldViolationsOrBuilderList();", "public List<FacesMessage> getMessages() {\n return FxJsfUtils.getMessages(null);\n }", "public List<Exception> getErrors() {\n\t\treturn null;\n\t}", "java.util.List<com.google.rpc.BadRequest.FieldViolation> \n getFieldViolationsList();", "public List<String> getErrors ()\n\t{\n\t\treturn errors;\n\t}", "java.util.List<java.lang.String>\n getExceptionsList();", "public List<String> getErrors()\n {\n return _errors;\n }", "public List<ValidationProblem> getProblems() {\n return problems;\n }", "Set<ISOAError> getErrors();", "public Iterator<String> validate() {\r\n\t\tValidityReport vr = ONT_MODEL.validate();\r\n\t\t\r\n\t\tCollection<String> reports = new ArrayList<String>();\r\n\t\t\r\n\t\tfor(Iterator riter = vr.getReports(); riter.hasNext();)\r\n\t\t{\r\n\t\t\tValidityReport.Report r = (ValidityReport.Report)riter.next();\r\n\t\t\tString msg =\"\";\r\n\t\t\tif(r.isError())\r\n\t\t\t\tmsg += \"[ERROR]\";\r\n\t\t\telse\r\n\t\t\t\tmsg += \"[WARNING]\";\r\n\t\t\tmsg+=\"[\"+r.getType()+\"]\";\r\n\t\t\tmsg+=r.getDescription();\r\n\t\t\treports.add(msg);\r\n\t\t}\r\n\t\t\r\n\t\treturn reports.iterator();\r\n\t}", "public List<Throwable> getErrors() {\n\t\tfinal List<Throwable> retval = new ArrayList<Throwable>();\n\t\tfor (final TestInfo testInfo : contractTestMap.listTestInfo()) {\n\t\t\tretval.addAll(testInfo.getErrors());\n\t\t}\n\t\treturn retval;\n\t}", "public List<String> getErrors() {\n\t\treturn errors;\n\t}", "public List<ReportType> getErrors() {\n\t\treturn errorList;\n\t}", "public List<FxFacesMessage> getFxMessages() {\n return FxJsfUtils.getFxMessages();\n }", "public List<FxFacesMessages> getGroupedFxMessages() {\n return FxJsfUtils.getGroupedFxMessages();\n }", "public static Map getNotices() throws Exception {\n Map noticeMap = new HashMap();\n for (Notice notice : list()) {\n noticeMap.put(notice.getName(), notice);\n }\n return noticeMap;\n }", "java.util.List<WorldUps.UErr> \n getErrorList();", "public List<IEntranceValidation> validations(){\n\t\tList<IEntranceValidation> validations = new ArrayList<>();\n\t\tvalidations.add(new ValidationDayMonday(new DateToday()));\n\t\tvalidations.add(new ValidationDisplacement());\n\t\tvalidations.add(new ValidationTires());\n\t\treturn validations;\n\t}", "public List fieldErrors() {\n\t\treturn errors;\n\t}", "public List<RepositoryValidationFailure> getFailures() {\n return failures;\n }", "public static ArrayList<Notice> list() throws Exception {\n Session session = HibernateUtil.getCurrentSession();\n return (ArrayList<Notice>)session.getNamedQuery(\"notice.noticeList\")\n .list();\n }", "public List<String> getNotificationList() throws Exception {\r\n ArrayList<String> cache = new ArrayList<String>();\r\n for (DOMFace nr : getChildren(\"notification\", DOMFace.class)) {\r\n cache.add(nr.getAttribute(\"pagekey\"));\r\n }\r\n return cache;\r\n }", "public List<Notice> getAllNotice() {\n\t\tList<Notice> list = (List<Notice>) noticeRepository.findAll();\n\t\treturn list;\n\t}", "public List<String> getValidationErrors() {\n\n List<String> messages = ObjectUtils.getValidationErrors(PartitionConfig.class, this);\n \n if(PartitionType.FUNCTION.equals(this.type)) { \n if(StringUtils.isBlank(this.output)) {\n\n messages.add(\"output is required for Function type partition\");\n }\n\n if(!BooleanUtils.xor(new boolean [] {StringUtils.isBlank(this.className), \n StringUtils.isBlank(this.functionName)})) {\n\n messages.add(\"either functionName or className is required\");\n }\n \n } else if(PartitionType.COUNT.equals(this.type) \n && !BooleanUtils.xor(new boolean [] {this.count == null, StringUtils.isBlank(this.countRef)})) {\n \n messages.add(\"either count or countRef is required for Function type count\");\n }\n \n if(!PartitionType.COUNT.equals(this.type)) {\n \n if(this.input == null) {\n messages.add(\"input may not be null\");\n \n } else if(this.input.get(PartitionFunction.ITEMS_KEY) == null) {\n messages.add(\"expecting an input with key items\");\n }\n }\n \n return messages;\n }", "public List<ReportType> getEntries(){\n\t\tList<ReportType> reportTypes = new ArrayList<>(warningList);\n\t\treportTypes.addAll(errorList);\n\t\treturn reportTypes;\n\t}", "public java.util.List<? extends WorldUps.UErrOrBuilder> \n getErrorOrBuilderList() {\n if (errorBuilder_ != null) {\n return errorBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(error_);\n }\n }", "java.util.List<? extends WorldUps.UErrOrBuilder> \n getErrorOrBuilderList();", "@Override\n public String toString() {\n String retval = \"[\";\n int pos = 0;\n for (final Iterator<ErrorMessage> i = errors.iterator(); i.hasNext();) {\n if (pos > 0) {\n retval += \",\";\n }\n pos++;\n retval += i.next().toString();\n }\n retval += \"]\";\n \n return retval;\n }", "List<CSSParseException> getExceptions();", "public String getErrorsMessages()\n \t{\n \t\treturn errorsMessages;\n \t}", "public static void startValidation() {\n errList = new ArrayList<>();\n }", "public ImmutableList<String> getInfoMessages() {\n return Lists.immutable.ofAll(infoMessages);\n }", "public List<String> getWarnings() {\n return warnings;\n }", "public List<String[]> getListOfAllAttempts() throws IOException, ClassNotFoundException {\r\n return ctrlDomain.getAllAttempts();\r\n }", "java.util.List<com.vine.vinemars.net.pb.SocialMessage.NoticeObj> \n getNoticeListList();", "public abstract List<Requirement> getFailedChecks();", "public List<SysNoticeWarning> queryNoticeWarning() {\n\t\treturn dao.queryNoticeWarning();\r\n\t}", "@Override\r\n\tpublic List<NoticeVO> listWithIsNotice() {\n\t\treturn sqlSession.selectList(namespace + \".listWithIsNotice\");\r\n\t}", "@Override\n public List<String> catchFaults(){\n List<String> errors = new ArrayList<>();\n severityLevels.forEach(level -> {\n if(level.equals(\"ERROR\")){\n errors.add(level);\n }\n });\n return errors;\n }", "public String printInvalidSaveCollectionSheetReasons() {\n if (invalidSaveCollectionSheetReasonsExtended != null) {\n final StringBuilder builder = new StringBuilder();\n final String newline = System.getProperty(\"line.separator\");\n\n builder.append(\"Input Errors Found:\");\n builder.append(newline);\n for (String ire : invalidSaveCollectionSheetReasonsExtended) {\n builder.append(ire);\n builder.append(newline);\n }\n\n return builder.toString();\n }\n\n if (invalidSaveCollectionSheetReasons != null) {\n final StringBuilder builder = new StringBuilder();\n final String newline = System.getProperty(\"line.separator\");\n\n builder.append(\"Input Errors Found:\");\n builder.append(newline);\n for (InvalidSaveCollectionSheetReason ir : invalidSaveCollectionSheetReasons) {\n builder.append(ir);\n builder.append(newline);\n }\n\n return builder.toString();\n }\n\n return null;\n }", "public Set<String> getFilmErrorMessage() {\n Set<String> errors = new HashSet<>();\n errors.addAll(errorMessage);\n return errors;\n }", "public List<String> getMessages() {\n logger.info(Thread.currentThread().getStackTrace()[1].getMethodName());\n logger.debug(\"Getting All Messages -> \"+messages);\n return messages;\n }", "private void addErrors() {\n this.errors = new ArrayList<>();\n var resources = ResourceBundle.getBundle(ERRORS);\n for (var key : Collections.list(resources.getKeys())) {\n var value = resources.getString(key);\n errors.add(new AbstractMap.SimpleEntry<>(key, value));\n }\n }", "public List<BbsNotice> getNoticeList();", "public List<Diagnostic<? extends JavaFileObject>> getErrors() {\n List<Diagnostic<? extends JavaFileObject>> err;\n err = new ArrayList<Diagnostic<? extends JavaFileObject>>();\n for (Diagnostic<? extends JavaFileObject> diagnostic : errors) {\n if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {\n err.add(diagnostic);\n }\n }\n return err;\n }", "public java.util.List<org.jetbrains.r.rinterop.Figure> getFigureList() {\n if (figureBuilder_ == null) {\n return java.util.Collections.unmodifiableList(figure_);\n } else {\n return figureBuilder_.getMessageList();\n }\n }", "public java.util.List<WorldUps.UErr> getErrorList() {\n return error_;\n }", "public com.google.protobuf.ProtocolStringList\n getExceptionsList() {\n return exceptions_.getUnmodifiableView();\n }", "public List<ReportType> getWarnings() {\n\t\treturn warningList;\n\t}", "public noNamespace.ErrorDocument.Error[] getErrorArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(ERROR$0, targetList);\r\n noNamespace.ErrorDocument.Error[] result = new noNamespace.ErrorDocument.Error[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public java.util.List<String> getInvalidLabels() {\n if (invalidLabels == null) {\n invalidLabels = new com.amazonaws.internal.SdkInternalList<String>();\n }\n return invalidLabels;\n }", "@Override\n public List<EmailNotification> list() {\n DetachedCriteria criteria = DetachedCriteria.forClass(EmailNotification.class);\n List<EmailNotification> notifications = hibernateTemplate.findByCriteria(criteria);\n return notifications;\n }", "public List<String> validate();", "public static ArrayList<String> getErrorMap() {\n if (errList.isEmpty()) {\n return null;\n } else {\n return errList;\n }\n }", "public ArrayList<String> getViolationNatureList() {\n return violationNatureList;\n }", "public Iterator getMessages() {\r\n\t\treturn messages == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(messages.values());\r\n\t}", "@Override\n\tpublic List<OpGmtNoticeLeft> getNoticList() {\n\t\treturn mapper.selectByExample(new OpGmtNoticeLeftExample());\n\t}", "List<Subscription> validated() {\n return expressions;\n }", "public List<String> getExceptionsCaught() {\n\t\treturn exceptionsCaught;\n\t}", "@MetadataValueMatcher(metadataValue=21)\n\tpublic List<String> getIssns() {\n\t\treturn issns;\n\t}", "public List<ApiError> getErrors() {\n return errors;\n }", "public Set<YValidationAspekt> validateComponent() {\r\n\t\tthis.foundErrors = EnumSet.noneOf(YValidationAspekt.class);\r\n\t\tthis.foundWarnings = EnumSet.noneOf(YValidationAspekt.class);\r\n\r\n\t\tassertModelSpecification();\r\n\t\tassertModelImplementation();\r\n\r\n\t\tassertIdAndVarName();\r\n\t\tassertProperties();\r\n\r\n\t\treturn this.foundErrors;\r\n\t}", "@Override\r\n\tpublic List<NoticeVO> noticeListAll() {\n\t\treturn sqlSession.selectList(namespace + \".noticeListAll\"); \r\n\t}", "public abstract List<String> getValidDescriptors();", "public List<String> getMessages() {\n return messages;\n }", "@Override\n\tpublic List<Map<String, Object>> findAllnotice() {\n\t\tStringBuffer querySQL = new StringBuffer(\"select * from notice order by status,crdate\");\n\t\treturn jdbcTemplate.queryForList(querySQL.toString());\n\t}", "public List<String[]> getListOfAllProblems() {\r\n return ctrlDomain.getListOfAllProblems();\r\n }", "public java.util.List<WorldUps.UErr.Builder> \n getErrorBuilderList() {\n return getErrorFieldBuilder().getBuilderList();\n }", "public String getErrorStrings() {\n return this.errorStrings;\n }", "public Set<String> getErrorMessages() {\n HashSet<String> result = new HashSet<String>();\n switch (argumentPresence) {\n case MANDATORY:\n if (!argument.hasValue()) {\n result.add(messageArgMissing);\n } else {\n result.addAll(argument.getErrorMessages());\n }\n break;\n case OPTIONAL:\n if (argument.hasValue()) {\n result.addAll(argument.getErrorMessages());\n }\n break;\n }\n return result;\n }", "public List<Throwable> getExceptions() {\n return exceptions;\n }", "private Collection getDatabaseValidationList ()\n\t{\n\t\tArrayList list = new ArrayList();\n\t\tString className = getClassName();\n\t\tMappingClassElement mappingClass = getMappingClass(className);\n\n\t\tif (mappingClass != null)\n\t\t{\n\t\t\tArrayList tables = mappingClass.getTables();\n\t\t\tint i, count = ((tables != null) ? tables.size() : 0);\n\t\t\tMappingTableElement primaryTable = null;\n\t\t\tIterator iterator = null;\n\n\t\t\tlist.add(createSchemaExistenceComponent(className));\n\n\t\t\tfor (i = 0; i < count; i++)\n\t\t\t{\n\t\t\t\tMappingTableElement nextTable = \n\t\t\t\t\t(MappingTableElement)tables.get(i);\n\n\t\t\t\tlist.add(createTableExistenceComponent(nextTable.getTable()));\n\n\t\t\t\tif (i == 0)\n\t\t\t\t{\n\t\t\t\t\tprimaryTable = nextTable;\n\t\t\t\t\tlist.add(createPrimaryTableComponent(primaryTable));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tMappingReferenceKeyElement referenceKey = \n\t\t\t\t\t\tfindReferenceKey(primaryTable, nextTable);\n\n\t\t\t\t\tif (referenceKey != null)\n\t\t\t\t\t{\n\t\t\t\t\t\titerator = referenceKey.getColumnPairNames().iterator();\n\t\t\t\t\t\twhile (iterator.hasNext())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlist.add(createColumnExistenceComponent(\n\t\t\t\t\t\t\t\t(String)iterator.next()));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlist.add(createVersionConsistencyComponent(mappingClass));\n\n\t\t\titerator = mappingClass.getFields().iterator();\n\t\t\twhile (iterator.hasNext())\n\t\t\t{\n\t\t\t\tMappingFieldElement nextField = \n\t\t\t\t\t(MappingFieldElement)iterator.next();\n\t\t\t\tArrayList allColumns = new ArrayList();\n\t\t\t\tIterator columnIterator = null;\n\n\t\t\t\tif (isRelationship(nextField))\n\t\t\t\t{\n\t\t\t\t\tallColumns.addAll(((MappingRelationshipElement)nextField).\n\t\t\t\t\t\tgetAssociatedColumns());\n\t\t\t\t}\n\n\t\t\t\tallColumns.addAll(nextField.getColumns());\n\n\t\t\t\tcolumnIterator = allColumns.iterator();\n\t\t\t\twhile (columnIterator.hasNext())\n\t\t\t\t{\n\t\t\t\t\tlist.add(createColumnExistenceComponent(\n\t\t\t\t\t\t(String)columnIterator.next(), nextField));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn list;\n\t}", "public Object[][] getContents() {\n/* 223 */ return m_errorMessages;\n/* */ }", "public Long getIntegrityErrors() {\n\t\treturn integrityErrors;\n\t}", "public java.util.List<? extends org.jetbrains.r.rinterop.FigureOrBuilder> \n getFigureOrBuilderList() {\n if (figureBuilder_ != null) {\n return figureBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(figure_);\n }\n }", "public List<CommunicationError> getInvalidParticipants() {\n return this.invalidParticipants;\n }" ]
[ "0.6442778", "0.6359435", "0.6079754", "0.6053193", "0.5988309", "0.59173876", "0.5874383", "0.58579314", "0.5824323", "0.58204883", "0.5765122", "0.56829894", "0.5681154", "0.56685776", "0.5654386", "0.56374323", "0.5626792", "0.5618393", "0.5606111", "0.5592516", "0.55736035", "0.5572136", "0.5559743", "0.5545371", "0.5530237", "0.5529648", "0.55033255", "0.5455493", "0.5450189", "0.54423356", "0.5431752", "0.54262465", "0.5409956", "0.5396135", "0.5395886", "0.53924173", "0.5359241", "0.5354374", "0.5340389", "0.5333509", "0.53287345", "0.531616", "0.5308939", "0.5308643", "0.5286844", "0.5275465", "0.526321", "0.5252768", "0.52344733", "0.5220144", "0.52188414", "0.5218208", "0.51777554", "0.5168568", "0.5142922", "0.5134419", "0.5129066", "0.5126343", "0.51025665", "0.51007813", "0.5099138", "0.5096665", "0.509584", "0.5071958", "0.5048278", "0.50458956", "0.5040668", "0.50385404", "0.5037535", "0.5037466", "0.5035279", "0.5024433", "0.5020085", "0.5002884", "0.50020987", "0.49939278", "0.49920154", "0.4981855", "0.49782574", "0.49781138", "0.49745953", "0.49669728", "0.4960745", "0.49396563", "0.49245557", "0.49228865", "0.49223766", "0.49127284", "0.49071822", "0.49066892", "0.49062237", "0.4897907", "0.48964715", "0.48933616", "0.48880175", "0.48878676", "0.48849878", "0.48737532", "0.48544893", "0.48518378" ]
0.7569657
0
Returns a list of all system errors in the container.
public List<SystemError> getSystemErrors() { return Lists.transform(systemErrors, ResolvedNotice::getContext); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<RemoteRenderingServiceError> listRootErrors() {\n return this.rootErrors;\n }", "public List<Exception> getErrors() {\n\t\treturn null;\n\t}", "public List<Throwable> getErrors() {\n\t\tfinal List<Throwable> retval = new ArrayList<Throwable>();\n\t\tfor (final TestInfo testInfo : contractTestMap.listTestInfo()) {\n\t\t\tretval.addAll(testInfo.getErrors());\n\t\t}\n\t\treturn retval;\n\t}", "public List<String> takeErrors() {\n final List<String> result = new ArrayList<String>(errors);\n errors.clear();\n return result;\n }", "public Collection<GmlExceptionReport> getErrors()\r\n {\r\n return myErrorHandler.getExceptionReports();\r\n }", "public List<Diagnostic<? extends JavaFileObject>> getErrors() {\n List<Diagnostic<? extends JavaFileObject>> err;\n err = new ArrayList<Diagnostic<? extends JavaFileObject>>();\n for (Diagnostic<? extends JavaFileObject> diagnostic : errors) {\n if (diagnostic.getKind() == Diagnostic.Kind.ERROR) {\n err.add(diagnostic);\n }\n }\n return err;\n }", "public java.util.List<WorldUps.UErr> getErrorList() {\n if (errorBuilder_ == null) {\n return java.util.Collections.unmodifiableList(error_);\n } else {\n return errorBuilder_.getMessageList();\n }\n }", "public List<String> getErrors()\n {\n return _errors;\n }", "public List<String> getErrors ()\n\t{\n\t\treturn errors;\n\t}", "public List<String> getErrors() {\n\t\treturn errors;\n\t}", "public JsonObject exportSystemErrors() {\n return exportJson(systemErrors);\n }", "public List<ReportType> getErrors() {\n\t\treturn errorList;\n\t}", "@Override\n public List<String> catchFaults(){\n List<String> errors = new ArrayList<>();\n severityLevels.forEach(level -> {\n if(level.equals(\"ERROR\")){\n errors.add(level);\n }\n });\n return errors;\n }", "public List<String> getListOfErrors() {\n return listOfErrors;\n }", "public List<Throwable> list() {\n return messages;\n }", "public noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[] getErrorArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(ERROR$0, targetList);\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[] result = new noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public final Map<String, Exception> getErrors() {\n\n\t\treturn this.errors;\n\t}", "public List<ApiError> getErrors() {\n return errors;\n }", "public noNamespace.ErrorDocument.Error[] getErrorArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(ERROR$0, targetList);\r\n noNamespace.ErrorDocument.Error[] result = new noNamespace.ErrorDocument.Error[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public List<DrillPBError> getErrorList() {\n synchronized(errorList) {\n return Collections.unmodifiableList(errorList);\n }\n }", "public List<String> getErrorMessages() {\n logger.info(Thread.currentThread().getStackTrace()[1].getMethodName());\n logger.debug(\"Getting All Error Messages -> \"+errMessages);\n return errMessages;\n }", "public java.util.List<WorldUps.UErr> getErrorList() {\n return error_;\n }", "public JUnitError[] getErrors() {\n return _errors;\n }", "public Vector getErrors() {\n \t\tif (parser.hasErrors()) {\n \t\t\tsetError(parser.getErrors());\n \t\t}\n \t\tVector tmp = errors;\n \t\terrors = new Vector();\n \t\treturn tmp;\n \t}", "Set<ISOAError> getErrors();", "java.util.List<WorldUps.UErr> \n getErrorList();", "public String getErrorStrings() {\n return this.errorStrings;\n }", "public List<String> getErrorMessages();", "public List<QueryError> getErrors() {\n return errors;\n }", "public static ArrayList<String> getErrorMap() {\n if (errList.isEmpty()) {\n return null;\n } else {\n return errList;\n }\n }", "public java.util.List<? extends WorldUps.UErrOrBuilder> \n getErrorOrBuilderList() {\n if (errorBuilder_ != null) {\n return errorBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(error_);\n }\n }", "public ArrayList<ArmazenaErroOuAvisoAntigo> getErrados() {\r\n\r\n\t\treturn this.errados;\r\n\r\n\t}", "public List<ErrorResult> getErrorResults()\n {\n \tif(this.errorResults == null) {\n \t\tthis.errorResults = new ArrayList<ErrorResult>();\n \t}\n return errorResults;\n }", "public ImmutableList<String> getErrorMessages() {\n return Lists.immutable.ofAll(errorMessages);\n }", "public Collection<ErrorClass> getErrorCol() {\r\n\t\treturn values();\r\n\t}", "public static List<String> readError(Process process) throws IOException{\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(process.getErrorStream()));\n\t\tString line;\n\t\tList<String> lines = new ArrayList<>();\n\t\twhile ((line = reader.readLine()) != null) {\n\t\t\tlines.add(line);\n\t\t}\n\t\treturn lines;\n\t}", "public ImmutableList<ErrorCase> getAllErrors() {\n // Relevant error cases are precisely the concrete subclasses of EppException.\n return getConcreteSubclassesStream(FlowDocumentation.EXCEPTION_CLASS_NAME)\n .map(\n typeElement ->\n new ErrorCase(\n typeElement,\n sourceRoot.getDocTrees().getDocCommentTree(typeElement),\n sourceRoot.getTypeUtils()))\n .collect(toImmutableList());\n }", "public List<Throwable> getExceptions() {\n return exceptions;\n }", "List<String> getErrorMessages(Exception exception);", "public List fieldErrors() {\n\t\treturn errors;\n\t}", "java.util.List<java.lang.String>\n getExceptionsList();", "public final void printErrors() {\n for (ShadowException exception : errorList) LOGGER.error(exception.getMessage());\n }", "public java.util.List<? extends WorldUps.UErrOrBuilder> \n getErrorOrBuilderList() {\n return error_;\n }", "public List<NaaccrValidationError> getAllValidationErrors() {\n List<NaaccrValidationError> results = new ArrayList<>(getValidationErrors());\n results.addAll(getItems().stream().filter(item -> item.getValidationError() != null).map(Item::getValidationError).collect(Collectors.toList()));\n for (Tumor tumor : getTumors())\n results.addAll(tumor.getAllValidationErrors());\n return results;\n }", "public List<JobErrorItem> errorDetails() {\n return this.errorDetails;\n }", "public List<CQLError> getCqlErrors() {\r\n return cqlErrors;\r\n }", "public CErrors getErrors() {\n\t\treturn this.mErrors;\n\t}", "public CErrors getErrors() {\n\t\treturn mErrors;\n\t}", "public noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors getErrors()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors target = null;\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors)get_store().find_element_user(ERRORS$4, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }", "public List<ExcelImportException> getValidationErrors() {\n\t\treturn this.validationErrors;\n\t}", "public List<ExcelImportException> getExtractionErrors() {\n\t\treturn this.extractionErrors;\n\t}", "public List<ActivityLog> getJobErrors(Job job) throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn getJobErrors(job.getId());\n\t}", "@Override\n\tpublic HashMap<String, String> getErrors() {\n\t\treturn errors;\n\t}", "public List<ResolvedMessage> getAll() { // e.g. th:each=\"error : ${errors.all}\"\n List<ResolvedMessage> list = new ArrayList<ResolvedMessage>();\n messages.accessByFlatIterator().forEachRemaining(message -> {\n list.add(createResolvedMessage(message));\n });\n return list;\n }", "public ArrayList<Exception> getEndUserExceptions();", "public String muestraListaErrores(){\r\n \tString salida;\r\n \tsalida= \"\\n\";\r\n \tif (errors.size()==0){\r\n\t \tsalida=salida+\"No hubo errores\\n\";\r\n\t \treturn salida;\r\n \t}\r\n \telse {\r\n \t\tfor(TError error: errors) {\r\n \t\t\tsalida += error + \"\\n\";\r\n \t\t}\r\n \t\treturn salida;\r\n \t}\r\n }", "private void showErrors() {\n \t\tfor (Iterator it = this.errors.iterator(); it.hasNext();) {\n \t\t\ttry {\n \t\t\t\tObject err = it.next();\n \t\t\t\t\n \t\t\t\t/* errors can be represented by PositionedError, UnpositionedError or String */\n \t\t\t\tif (err instanceof PositionedError) {\n \t\t\t\t\tPositionedError error = (PositionedError)err;\n \t\t\t\t\tTokenReference token = error.getTokenReference();\n \t\n \t\t\t\t log.debug(\"file: \" + token.getFile() + \", \" + \"line: \" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n \t\t\t\t\t\t\t+ token.getLine() + \", \" + \"path: \" //$NON-NLS-1$//$NON-NLS-2$\n \t\t\t\t\t\t\t+ token.getPath());\n \n \t\t\t\t\tIResource resource = ProjectProperties.findResource(token\n \t\t\t\t\t\t\t.getPath().getAbsolutePath(), currentProject);\n \t\t\t\t\t\n \t\t\t\t\tIMarker marker = null;\n \t\t\t\t\tif (resource != null) {\n \t\t\t\t\t\tmarker = resource.createMarker(IMarker.PROBLEM);\n \t\t\t\t\t\tif (token.getLine() > 0) {\n \t\t\t\t\t\t\tmarker.setAttribute(IMarker.LINE_NUMBER, token.getLine());\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\t// for the cases, when error refers to a generated piece of code\n \t\t\t\t\t\tmarker = currentProject.createMarker(IMarker.PROBLEM);\n \t\t\t\t\t}\n \t\t\t\t\tmarker.setAttribute(IMarker.MESSAGE, error\n \t\t\t\t\t\t\t.getFormattedMessage().getMessage());\n \t\t\t\t\tmarker.setAttribute(IMarker.SEVERITY, new Integer(\n \t\t\t\t\t\t\tIMarker.SEVERITY_ERROR));\n \t\t\t\t}\n \t\t\t\telse { /* create unpositioned error at the scope of the project */\t\t\t\t\t\n \t\t\t\t\tString msg;\n \t\t\t\t\tif (err instanceof UnpositionedError) {\n \t\t\t\t\t\tmsg = ((UnpositionedError)err).getFormattedMessage().getMessage();\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tmsg = (String)err; // for internal errors\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tIMarker marker = currentProject.createMarker(IMarker.PROBLEM);\n \t\t\t\t\tmarker.setAttribute(IMarker.MESSAGE, msg);\n \t\t\t\t\tmarker.setAttribute(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));\n \t\t\t\t}\n \t\t\t} \n \t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t}\n \t}", "@Override\n\tpublic List<String> getEventLog() {\n\t\tif(network != null)\n\t\t\treturn Arrays.asList(\n\t\t\t\t\tnetwork.getErrorLog()\n\t\t\t\t\t.toArray(new String[0]));\n\t\telse\n\t\t\treturn new ArrayList<>();\n\t}", "public ImmutableList<SourceCompilerError> getSyntaxErrors() {\n return ImmutableList.copyOf(errors);\n }", "public WorkflowError[] getProcessInstanceErrors(String processId)\r\n throws ProcessManagerException {\r\n try {\r\n return Workflow.getErrorManager().getErrorsOfInstance(processId);\r\n } catch (WorkflowException we) {\r\n throw new ProcessManagerException(\"ProcessManagerSessionController\",\r\n \"processManager.ERR_GET_PROCESS_ERRORS\", we);\r\n }\r\n }", "List<CSSParseException> getExceptions();", "java.util.List<? extends WorldUps.UErrOrBuilder> \n getErrorOrBuilderList();", "public String getErrorsMessages()\n \t{\n \t\treturn errorsMessages;\n \t}", "public List<ActivityLog> getJobErrors(String jobID) throws IOException,\n\t\t\tClassNotFoundException {\n\t\tList<ActivityLog> result = new LinkedList<ActivityLog>();\n\t\tList<ActivityLog> activityLogs = Core.getJobLogs(jobID,\n\t\t\t\tgetHttpMethodExecutor());\n\t\tfor (ActivityLog al : activityLogs) {\n\t\t\tString severity = al.getSeverity().toLowerCase();\n\t\t\tif (severity.equals(\"critical\") || severity.equals(\"warning\")\n\t\t\t\t\t|| severity.equals(\"error\")) {\n\t\t\t\tresult.add(al);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public List<ExcelImportException> getParsingErrors() {\n\t\treturn this.parsingErrors;\n\t}", "public List<String> getExceptionsCaught() {\n\t\treturn exceptionsCaught;\n\t}", "private void addErrors() {\n this.errors = new ArrayList<>();\n var resources = ResourceBundle.getBundle(ERRORS);\n for (var key : Collections.list(resources.getKeys())) {\n var value = resources.getString(key);\n errors.add(new AbstractMap.SimpleEntry<>(key, value));\n }\n }", "public String[] getErrorParserList();", "String[] getError() {\n return error;\n }", "public ArrayList<Exception> getValidateExceptions();", "public java.util.List<WorldUps.UErr.Builder> \n getErrorBuilderList() {\n return getErrorFieldBuilder().getBuilderList();\n }", "public noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error getErrorArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error target = null;\r\n target = (noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error)get_store().find_element_user(ERROR$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "public void printErrors() {\n final int size = _errors.size();\n if (size > 0) {\n System.err.println(new ErrorMsg(ErrorMsg.COMPILER_ERROR_KEY));\n for (int i = 0; i < size; i++) {\n System.err.println(\" \" + _errors.get(i));\n }\n }\n }", "public static PrintStream sysErr() {\n return system_err;\n }", "public List<String> getValidationErrors() {\n\n List<String> messages = ObjectUtils.getValidationErrors(PartitionConfig.class, this);\n \n if(PartitionType.FUNCTION.equals(this.type)) { \n if(StringUtils.isBlank(this.output)) {\n\n messages.add(\"output is required for Function type partition\");\n }\n\n if(!BooleanUtils.xor(new boolean [] {StringUtils.isBlank(this.className), \n StringUtils.isBlank(this.functionName)})) {\n\n messages.add(\"either functionName or className is required\");\n }\n \n } else if(PartitionType.COUNT.equals(this.type) \n && !BooleanUtils.xor(new boolean [] {this.count == null, StringUtils.isBlank(this.countRef)})) {\n \n messages.add(\"either count or countRef is required for Function type count\");\n }\n \n if(!PartitionType.COUNT.equals(this.type)) {\n \n if(this.input == null) {\n messages.add(\"input may not be null\");\n \n } else if(this.input.get(PartitionFunction.ITEMS_KEY) == null) {\n messages.add(\"expecting an input with key items\");\n }\n }\n \n return messages;\n }", "Set<ExpectedErrorConfig> getExpectedErrors();", "public int getErrors() {\n return errors;\n }", "public static long getServerErrors() {\n return serverErrors;\n }", "public int getErrors() {\n return errors;\n }", "public int getErrorCount() {\n\t\treturn errors.size();\n\t}", "public List<VCal> findAll() throws SystemException {\n\t\treturn findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "public com.google.protobuf.ProtocolStringList\n getExceptionsList() {\n return exceptions_.getUnmodifiableView();\n }", "public CErrors getErrors() {\n\treturn this.mErrors;\n}", "public int getErrorCount() {\n return error_.size();\n }", "public void clearErrors() {\n mErrors = new ArrayList();\n }", "public noNamespace.ErrorDocument.Error getErrorArray(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n noNamespace.ErrorDocument.Error target = null;\r\n target = (noNamespace.ErrorDocument.Error)get_store().find_element_user(ERROR$0, i);\r\n if (target == null)\r\n {\r\n throw new IndexOutOfBoundsException();\r\n }\r\n return target;\r\n }\r\n }", "public Set<String> getErrorMessages() {\n HashSet<String> result = new HashSet<String>();\n switch (argumentPresence) {\n case MANDATORY:\n if (!argument.hasValue()) {\n result.add(messageArgMissing);\n } else {\n result.addAll(argument.getErrorMessages());\n }\n break;\n case OPTIONAL:\n if (argument.hasValue()) {\n result.addAll(argument.getErrorMessages());\n }\n break;\n }\n return result;\n }", "@Override\n\tpublic List<FactNonPrintedMaterial> findAll() throws SystemException {\n\t\treturn findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "public int getERRReps() { \r\n \treturn getReps(\"ERR\");\r\n }", "List<R> errors(int start, int end);", "public static java.util.List<org.oep.cmon.dao.qlhc.model.ChucVu2VaiTro> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence().findAll();\n\t}", "public ValidationErrors getErrors() {\n if (errors == null) errors = new ValidationErrors();\n return errors;\n }", "public Collection fullValidationCheck ()\n\t{\n\t\tArrayList list = new ArrayList();\n\t\tIterator iterator = getFullValidationList().iterator();\n\n\t\twhile (iterator.hasNext())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t((ValidationComponent)iterator.next()).validate();\n\t\t\t}\n\t\t\tcatch (ModelValidationException e)\n\t\t\t{\n\t\t\t\tlist.add(e);\n\t\t\t}\n\t\t}\n\n\t\treturn Collections.unmodifiableCollection(list);\n\t}", "public List<Throwable> getThrowables() {\n return throwables;\n }", "void onGetContainerStatusError(ContainerId containerId, Throwable t);", "public Set<String> getFilmErrorMessage() {\n Set<String> errors = new HashSet<>();\n errors.addAll(errorMessage);\n return errors;\n }", "public static long getClientErrors() {\n return clientErrors;\n }", "public int getErrorCount() {\r\n\t\treturn errorHandler.getErrorCount();\r\n\t}", "public Collection<Diagnostic> diagnostics() {\n return this.diagnostics;\n }", "public static java.util.List<es.davinciti.liferay.model.SapEmployee> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence().findAll();\n\t}" ]
[ "0.7143291", "0.69841534", "0.6967426", "0.6791921", "0.6780918", "0.66690385", "0.659387", "0.65657216", "0.6545468", "0.65433306", "0.645125", "0.64500415", "0.63896483", "0.6351565", "0.6340006", "0.6336692", "0.6332648", "0.6327902", "0.6297093", "0.62966084", "0.62831116", "0.62751156", "0.6267926", "0.62464714", "0.6244244", "0.62118286", "0.61859256", "0.6149667", "0.6142036", "0.6139685", "0.61392766", "0.6108806", "0.604775", "0.6002144", "0.59973973", "0.5996424", "0.5992286", "0.59685487", "0.59431094", "0.58729064", "0.58542484", "0.58476615", "0.5843321", "0.5836004", "0.5803725", "0.57830423", "0.5765334", "0.57334536", "0.57307297", "0.5687041", "0.5670112", "0.56074816", "0.5592338", "0.55817366", "0.55782545", "0.5568064", "0.5567062", "0.5566083", "0.5564875", "0.5547122", "0.5545718", "0.55395555", "0.5522143", "0.55168366", "0.5512254", "0.547681", "0.54716915", "0.5467167", "0.5464328", "0.54540163", "0.54528236", "0.5441324", "0.5432818", "0.54167646", "0.5412894", "0.5411181", "0.5408004", "0.53916603", "0.53901535", "0.5388245", "0.5377296", "0.53713286", "0.5362817", "0.5360684", "0.53209317", "0.52957183", "0.52906287", "0.5256495", "0.5250501", "0.5245608", "0.52422667", "0.5235525", "0.52319115", "0.5199866", "0.5189219", "0.51769257", "0.5168381", "0.51663053", "0.5152696", "0.5132592" ]
0.7998969
0
Exports all validation notices as JSON.
public JsonObject exportValidationNotices() { return exportJson(validationNotices); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JsonObject exportSystemErrors() {\n return exportJson(systemErrors);\n }", "public void exportJSON()\n {\n Gson JSONConverter = new Gson();\n FileWriter writer;\n\n try\n {\n // wipe the file\n PrintWriter write = new PrintWriter(new File(fp));\n write.print(\"\");\n write.close();\n\n // Initialize FileWriter to write Strings into JSON file.\n writer = new FileWriter(fp + \"/queue.json\");\n\n Iterator<ComparableCalendar> iter = this.queue.iterator();\n // Loop through the PQ.\n while(iter.hasNext())\n {\n ComparableCalendar nextObject = iter.next();\n // Convert an issue object into a JSON-formatted representation of it, as a String.\n String representationJSON = JSONConverter.toJson(nextObject);\n\n // Write that String to the file.\n writer.write(representationJSON + \"\\n\");\n }\n // Close the FileWriter to conserve system resources.\n writer.close();\n\n }\n catch (Exception e)\n {\n // Print any error messages that results to the console.\n e.printStackTrace();\n }\n\n }", "@SuppressWarnings(\"unused\")\n public void SaveJsonCollectionsToFiles(){\n try {\n String formattedDate = FileNameUtils.DATE_FORMAT.format(new Date());\n ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());\n writer.writeValue(new File(FileNameUtils.GetValuesFileName(formattedDate)), jsonObjects);\n }\n catch(IOException exp){\n System.err.println(\"Error while creating JSON file. Reason: \" + exp.getMessage());\n }\n }", "@After\n public static void renderValidationErrors() {\n if (validation.hasErrors()) {\n response.status = 400;\n Map<String, String> errorsMap = new HashMap();\n for (Error error : validation.errors()) {\n errorsMap.put(error.getKey(), Messages.get(error.message()));\n }\n renderJSON(errorsMap);\n }\n }", "@Override\n public String toString() {\n String retval = \"[\";\n int pos = 0;\n for (final Iterator<ErrorMessage> i = errors.iterator(); i.hasNext();) {\n if (pos > 0) {\n retval += \",\";\n }\n pos++;\n retval += i.next().toString();\n }\n retval += \"]\";\n \n return retval;\n }", "public String toJSON(){\n Map<String, Object> foo = new HashMap<String, Object>();\n foo.put(\"message\", \"Audit message generated\");\n foo.put(\"eventIndex\", index);\n foo.put(\"eventTimestamp\", Instant.now().toEpochMilli());\n try {\n // Convert the Map to JSON and send the raw JSON as the message.\n // The Audit appender formatter picks that json up and pubishes just the JSON to the topic\n return new ObjectMapper().writeValueAsString(foo);\n } catch (JsonProcessingException e) {\n // should never happen in this example\n throw new RuntimeException(\"impossible error \", e);\n }\n\n }", "public void guardarEnJSON () {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String s = gson.toJson(this);\n try {\n FileWriter fw = new FileWriter(\"files/graph.json\");\n fw.write(s);\n fw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public NoticeContainer() {\n this(\n MAX_TOTAL_VALIDATION_NOTICES,\n MAX_VALIDATION_NOTICES_TYPE_AND_SEVERITY,\n MAX_EXPORTS_PER_NOTICE_TYPE_AND_SEVERITY);\n }", "public List<ValidationNotice> getValidationNotices() {\n return Lists.transform(validationNotices, ResolvedNotice::getContext);\n }", "private String createOutputJson(List<AccountPortfolio> nonSecured) {\n return gson.toJson(nonSecured);\n }", "String toJSON();", "@Override\n\tprotected Object[][] getContents() {\n\t\t\n\t\tMap<String, IMessageObject> errorMap =getI8nErrors();\n\t\tcontents=formatData(errorMap);\n\t\treturn contents;\n\t}", "@RequestMapping(value = \"/module/htmlformentry/encounter.json\", method = RequestMethod.GET)\n\t@ResponseBody\n\tpublic JsonNode encounterSchemaAsJson(@RequestParam(value = \"encounter\") Encounter encounter, HttpSession httpSession)\n\t throws Exception {\n\t\t\n\t\t// TODO error handling-- no form?\n\t\tObjectMapper jackson = new ObjectMapper();\n\t\tHtmlForm form = Context.getService(HtmlFormEntryService.class).getHtmlFormByForm(encounter.getForm());\n\t\tHtmlFormSchema schema = generateSchema(form.getXmlData(), httpSession, encounter);\n\t\treturn buildSchemaAsJsonNode(schema, jackson);\n\t}", "public static void serialiser() {\n\t\texemplaires.serialiser();\n\t}", "public void writeActionsJson() {\n JsonManager.writeActions(this.getActions());\n }", "@Override\r\n\tpublic String toString() {\r\n\t\tJsonObject jo = new JsonObject();\r\n\t\t\r\n\t\tjo.addProperty(\"IssuerInfo\", issuerInfo.toString());\r\n\t\tjo.addProperty(\"SubjectInfo\", subjectInfo.toString());\r\n\t\tjo.addProperty(\"AccessRights\", accessRights.toString());\r\n\t\tjo.addProperty(\"ResourceID\", resourceId);\r\n\t\tjo.addProperty(\"ValidityCondition\", validityCondition.toString());\r\n\t\tjo.addProperty(\"RevocationURL\", revocationUrl);\r\n\t\tString sig = \"\";\r\n\t\tfor(byte b : digitalSignature){\r\n\t\t\tsig = sig + Integer.toHexString(0xFF & b);\r\n\t\t}\r\n\t\tjo.addProperty(\"DigitalSignature\", sig);\r\n\t\t\r\n\t\treturn jo.toString();\r\n\t}", "@Test\n public void testReportProducesValidJson() throws Exception {\n testReportProducesCorrectOutput(\"json\");\n }", "@Override\n public String toString() {\n if (valid())\n return \"valid\";\n return print(errors + \":\" + validator);\n }", "void toJson(JsonStaxPrinter printer) throws PrintingException, IOException;", "@Test\n public void test14() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message14 = new File(classLoader.getResource(message14FileName).getFile());\n String messageString = FileUtils.readFileToString(message14);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "public String printInvalidSaveCollectionSheetReasons() {\n if (invalidSaveCollectionSheetReasonsExtended != null) {\n final StringBuilder builder = new StringBuilder();\n final String newline = System.getProperty(\"line.separator\");\n\n builder.append(\"Input Errors Found:\");\n builder.append(newline);\n for (String ire : invalidSaveCollectionSheetReasonsExtended) {\n builder.append(ire);\n builder.append(newline);\n }\n\n return builder.toString();\n }\n\n if (invalidSaveCollectionSheetReasons != null) {\n final StringBuilder builder = new StringBuilder();\n final String newline = System.getProperty(\"line.separator\");\n\n builder.append(\"Input Errors Found:\");\n builder.append(newline);\n for (InvalidSaveCollectionSheetReason ir : invalidSaveCollectionSheetReasons) {\n builder.append(ir);\n builder.append(newline);\n }\n\n return builder.toString();\n }\n\n return null;\n }", "public String toString() {\n StringBuffer sb = new StringBuffer(\"ValidationException: \");\n String message = getMessage();\n if (message != null) {\n sb.append(message);\n }\n return sb.toString();\n }", "@Override\n\tpublic String toJSON() {\n\t\t// TODO Auto-generated method stub\n\t\treturn null;\n\t}", "protected String settingsAsJSON() {\n String json = null;\n if (indexSettings != null) {\n try {\n json = getObjectMapper().writeValueAsString(indexSettings);\n } catch (JsonProcessingException e) {\n String msg = String.format(\"Error processing index settings %s\",\n this.indexSettings.toString());\n logger.log(Level.SEVERE, msg, e);\n }\n }\n return json;\n }", "private final void exportAll() {\n\t\tfinal JFileChooser chooser = new JFileChooser(System.getProperty(\"user.home\"));\n\t\tint returnVal = chooser.showSaveDialog(null);\n\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = chooser.getSelectedFile();\n\t\t\tserializeToFile(file);\n\t }\t\n\t}", "@Get(\"json\")\n public Representation toJSON() {\n \tString status = getRequestFlag(\"status\", \"valid\");\n \tString access = getRequestFlag(\"location\", \"all\");\n\n \tList<Map<String, String>> metadata = null;\n\n \tString msg = \"no metadata matching query found\";\n\n \ttry {\n \t\tmetadata = getMetadata(status, access,\n \t\t\t\tgetRequestQueryValues());\n \t} catch(ResourceException r){\n \t\tmetadata = new ArrayList<Map<String, String>>();\n \tif(r.getCause() != null){\n \t\tmsg = \"ERROR: \" + r.getCause().getMessage();\n \t}\n \t}\n\n\t\tString iTotalDisplayRecords = \"0\";\n\t\tString iTotalRecords = \"0\";\n\t\tif (metadata.size() > 0) {\n\t\t\tMap<String, String> recordCounts = (Map<String, String>) metadata\n\t\t\t\t\t.remove(0);\n\t\t\tiTotalDisplayRecords = recordCounts.get(\"iTotalDisplayRecords\");\n\t\t\tiTotalRecords = recordCounts.get(\"iTotalRecords\");\n\t\t}\n\n\t\tMap<String, Object> json = buildJsonHeader(iTotalRecords,\n\t\t\t\tiTotalDisplayRecords, msg);\n\t\tList<ArrayList<String>> jsonResults = buildJsonResults(metadata);\n\n\t\tjson.put(\"aaData\", jsonResults);\n\n\t\t// Returns the XML representation of this document.\n\t\treturn new StringRepresentation(JSONValue.toJSONString(json),\n\t\t\t\tMediaType.APPLICATION_JSON);\n }", "void saveToFile() {\n\t\ttry {\n\t\t\tFile directory = GameApplication.getInstance().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS);\n\t\t\tFile target = new File(directory, FILE_NAME);\n\t\t\tif (!target.exists()) {\n\t\t\t\ttarget.createNewFile();\n\t\t\t}\n\t\t\tJsonWriter writer = new JsonWriter(new FileWriter(target));\n\t\t\twriter.setIndent(\" \");\n\t\t\twriter.beginArray();\n\t\t\tfor (Scoreboard scoreboard : scoreboards.values()) {\n\t\t\t\twriteScoreboard(writer, scoreboard);\n\t\t\t}\n\t\t\twriter.endArray();\n\t\t\twriter.flush();\n\t\t\twriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void writeOutput() {\n // Create json object to be written\n Map<String, Object> jsonOutput = new LinkedHashMap<>();\n // Get array of json output objects for consumers\n List<Map<String, Object>> jsonConsumers = writeConsumers();\n // Add array for consumers to output object\n jsonOutput.put(Constants.CONSUMERS, jsonConsumers);\n // Get array of json output objects for distributors\n List<Map<String, Object>> jsonDistributors = writeDistributors();\n // Add array for distributors to output objects\n jsonOutput.put(Constants.DISTRIBUTORS, jsonDistributors);\n // Get array of json output objects for producers\n List<Map<String, Object>> jsonProducers = writeProducers();\n // Add array for producers to output objects\n jsonOutput.put(Constants.ENERGYPRODUCERS, jsonProducers);\n // Write to output file and close\n try {\n ObjectMapper mapper = new ObjectMapper();\n ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());\n writer.writeValue(Paths.get(outFile).toFile(), jsonOutput);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public String toString() {\n final StringBuffer sb = new StringBuffer(\"<Errors>[ \");\n \n for(Iterator fieldNames = this.errors.keySet().iterator(); fieldNames.hasNext(); ) {\n final String fieldName = (String) fieldNames.next();\n final Iterator errorMessages = getErrors(fieldName).iterator();\n\n sb.append(fieldName + \"=> { \");\n sb.append(toString(errorMessages)); \n sb.append(\"}\" + (fieldNames.hasNext() ? \", \" : \" \"));\n }\n sb.append(\"]\");\n return sb.toString();\n }", "@Test\n public void test12() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message12 = new File(classLoader.getResource(message12FileName).getFile());\n String messageString = FileUtils.readFileToString(message12);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public String toJson() {\n return this.toJson(SerializationFormattingPolicy.None);\n }", "public void exportAsJsonFile(String path) throws IOException {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String json = gson.toJson(this);\n\n FileWriter writer = new FileWriter(path);\n writer.write(json);\n writer.close();\n }", "private void save() {\n if (mCacheFile.exists()) {\n mCacheFile.delete();\n }\n\n try (JsonWriter writer = new JsonWriter(new BufferedWriter(new FileWriter(mCacheFile)))) {\n writer.beginObject();\n writer.name(PRINTER_LIST_NAMES.get(0));\n writer.beginArray();\n for (DiscoveredPrinter printer : mSavedPrinters) {\n printer.write(writer);\n }\n writer.endArray();\n writer.endObject();\n } catch (NullPointerException | IOException e) {\n Log.w(TAG, \"Error while storing to \" + mCacheFile, e);\n }\n }", "public Iterator<String> validate() {\r\n\t\tValidityReport vr = ONT_MODEL.validate();\r\n\t\t\r\n\t\tCollection<String> reports = new ArrayList<String>();\r\n\t\t\r\n\t\tfor(Iterator riter = vr.getReports(); riter.hasNext();)\r\n\t\t{\r\n\t\t\tValidityReport.Report r = (ValidityReport.Report)riter.next();\r\n\t\t\tString msg =\"\";\r\n\t\t\tif(r.isError())\r\n\t\t\t\tmsg += \"[ERROR]\";\r\n\t\t\telse\r\n\t\t\t\tmsg += \"[WARNING]\";\r\n\t\t\tmsg+=\"[\"+r.getType()+\"]\";\r\n\t\t\tmsg+=r.getDescription();\r\n\t\t\treports.add(msg);\r\n\t\t}\r\n\t\t\r\n\t\treturn reports.iterator();\r\n\t}", "@Test\n public void test4() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message4 = new File(classLoader.getResource(message4FileName).getFile());\n String messageString = FileUtils.readFileToString(message4);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test2() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message2 = new File(classLoader.getResource(message2FileName).getFile());\n String messageString = FileUtils.readFileToString(message2);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Override\n public Object toJson() {\n JSONObject json = (JSONObject)super.toJson();\n json.put(\"name\", name);\n json.put(\"reason\", reason);\n return json;\n }", "private void addJsMessages() {\r\n MessageManager.getInstance().addJsMessage(\"pm.processErp.deleteBatch.noBatchNo.error\");\r\n MessageManager.getInstance().addJsMessage(\"pm.processErp.deleteBatch.confirmation\");\r\n MessageManager.getInstance().addJsMessage(\"pm.processErp.saveErp.comments.too.long.error\"); \r\n MessageManager.getInstance().addJsMessage(\"pm.processErp.noErpDataFound.information\");\r\n }", "public EntryToJson(){\n AccountEntry entry;\n Account acc;\n String fileName;\n ArrayList<AccountEntry> entryList;\n ArrayList<String> accList = Bank.getInstance().getAllAccounts();\n for (int i = 0; i<accList.size();i++) {\n acc = Bank.getInstance().findAccount(accList.get(i));\n entryList = acc.getEntryObjects();\n fileName = acc.getNum()+\".json\";\n\n\n Gson gson = new GsonBuilder().create();\n System.out.println(gson.toJson(entryList));\n\n\n }\n\n }", "public JSONObject validateCollections(Collections collection){\n\n\t\tInvalidValue[] invalidValues = collectionsValidator.getInvalidValues(collection);\n\t\tHashMap<String, String> errs=new HashMap<String, String>();\n\n\t\tfor (InvalidValue value : invalidValues) { \n\t\t\terrs.put(\"Collection \" + value.getPropertyName(), value.getMessage());\t\t\t \n\t\t}\n\t\treturn createJson(errs);\n\n\t}", "public List<String> validate() {\n\t\t\n\t\tList<String> validationMessages = new ArrayList<String>();\n\t\tvalidate(validationMessages);\n\t\treturn validationMessages;\n\t}", "Map<String, Object> exportConfiguration();", "public abstract String toJson();", "@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}", "private void writeObject(ObjectOutputStream out) throws IOException {\n Set<PackageIdentifier> successfulPkgs = transitiveSuccessfulPkgs.toSet();\n out.writeInt(successfulPkgs.size());\n for (PackageIdentifier pkg : successfulPkgs) {\n out.writeObject(pkg);\n }\n\n out.writeObject(transitiveUnsuccessfulPkgs);\n // Deliberately do not write out transitiveTargets. There is a lot of those and they drive\n // serialization costs through the roof, both in terms of space and of time.\n // TODO(bazel-team): Deal with this properly once we have efficient serialization of NestedSets.\n out.writeObject(transitiveRootCauses);\n out.writeObject(errorLoadingTarget);\n }", "@Test\n public void test1() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message1 = new File(classLoader.getResource(message1FileName).getFile());\n String messageString = FileUtils.readFileToString(message1);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "private static void exportRules(GraknClient.Session session, Path schemaRoot) throws IOException {\n File outputFile = schemaRoot.resolve(\"rule\").toFile();\n Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), StandardCharsets.UTF_8));\n GraknClient.Transaction tx = session.transaction().write();\n\n tx.getRule(\"rule\").subs()\n .filter(rule -> !rule.label().toString().equals(\"rule\"))\n .forEach(rule -> {\n String when = rule.when().toString();\n String then = rule.then().toString();\n String label = rule.label().toString();\n try {\n writer.write(label);\n writer.write(\"\\n\");\n writer.write(when);\n writer.write(\"\\n\");\n writer.write(then);\n writer.write(\"\\n\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n writer.flush();\n writer.close();\n tx.close();\n }", "@Test\n public void test3() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message3 = new File(classLoader.getResource(message3FileName).getFile());\n String messageString = FileUtils.readFileToString(message3);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@Override\n public Map<String, String> serialize() {\n Map<String, String> map = new HashMap<>();\n map.put(\"name\", name);\n map.put(\"reason\", reason);\n return map;\n }", "private void saveInFile() {\n\t\tthis.deleteFile();\n\t\tfor (CounterModel obj : counterListModel.getCounterList()) {\n\t\t\ttry {\n\t\t\t\tGson gson = new Gson();\n\t\t\t\tif (obj.getCounterName().equals(counterModel.getCounterName())) {\n\t\t\t\t\tobj = counterModel;\n\t\t\t\t}\n\t\t\t\tString json = gson.toJson(obj) +'\\n';\n\t\t\t\tFileOutputStream fos = openFileOutput(FILENAME,\n\t\t\t\t\t\tContext.MODE_APPEND);\n\t\t\t\tfos.write(json.getBytes());\n\t\t\t\tfos.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void test8() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message8 = new File(classLoader.getResource(message8FileName).getFile());\n String messageString = FileUtils.readFileToString(message8);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "@Test\n\tpublic void testOutputJsonSimpleRuleTest() {\n\t\tSkRuleBase rule = buildThings(ONE_RULE_FILE_NAME, SkRuleBase.class, \"rule\");\n\t\tString json = JsonMapperHelper.beanToJsonPretty(rule);\n\n\t\tSystem.out.println(\"-------------------- JSON ---------------------\");\n\t\tSystem.out.println(json);\n\t\tSystem.out.println(\"-------------------- JSON ---------------------\");\n\t\tSkRuleRunner runner = new SkRuleRunner();\n\t\trule.run(runner);\n\t}", "private JSON() {\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public String toJSONString() {\n JSONObject entry = new JSONObject();\n\n Map<String, Object> configuration = new LinkedHashMap<String, Object>();\n configuration.put(\"smtpHostname\", smtpHostname);\n configuration.put(\"smtpPort\", new Integer(smtpPort));\n configuration.put(\"tls\", tls);\n configuration.put(\"ssl\", ssl);\n configuration.put(\"username\", username);\n configuration.put(\"password\", password);\n configuration.put(\"fromEMail\", fromEMail);\n configuration.put(\"fromSenderName\", fromSenderName);\n\n entry.put(configurationName, configuration);\n\n /*\n * The JSONWriter will pretty-print the output\n */\n Writer jsonWriter = new JSONWriter();\n try {\n entry.writeJSONString(jsonWriter);\n } catch (IOException ioe) {\n throw new RuntimeException(ioe);\n }\n\n return jsonWriter.toString();\n }", "public void validarExportXLS() throws IOException {\n exportXLS_NF();\n }", "@Override\n public String toString() {\n try {\n return new ObjectMapper().writeValueAsString(this);\n } catch (final JsonProcessingException ioe) {\n return ioe.getLocalizedMessage();\n }\n }", "@Test\n public void test15() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message15 = new File(classLoader.getResource(message15FileName).getFile());\n String messageString = FileUtils.readFileToString(message15);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(0, errors);\n assertEquals(0, alerts);\n }", "@JsonProperty(\"messages\")\n\t@DsonOutput(Output.API)\n\tMap<String, Object> getJsonMessages() {\n\t\tMap<String, Object> outbound = mapOf(\n\t\t\t\t\"sent\", SystemMetaData.getInstance().get(\"messages.outbound.sent\", 0),\n\t\t\t\t\"processed\", SystemMetaData.getInstance().get(\"messages.outbound.processed\", 0),\n\t\t\t\t\"pending\", SystemMetaData.getInstance().get(\"messages.outbound.pending\", 0),\n\t\t\t\t\"aborted\", SystemMetaData.getInstance().get(\"messages.outbound.aborted\", 0));\n\t\tMap<String, Object> inbound = mapOf(\n\t\t\t\t\"processed\", SystemMetaData.getInstance().get(\"messages.inbound.processed\", 0),\n\t\t\t\t\"received\", SystemMetaData.getInstance().get(\"messages.inbound.received\", 0),\n\t\t\t\t\"pending\", SystemMetaData.getInstance().get(\"messages.inbound.pending\", 0),\n\t\t\t\t\"discarded\", SystemMetaData.getInstance().get(\"messages.inbound.discarded\", 0));\n\t\treturn mapOf(\n\t\t\t\t\"inbound\", inbound,\n\t\t\t\t\"outbound\", outbound);\n\t}", "public String toJson() throws JsonProcessingException{\r\n\t\tObjectWriter ow = new ObjectMapper().writer().withDefaultPrettyPrinter();\r\n\t\treturn ow.writeValueAsString(this.loginStatus); \r\n\t}", "ValidationResponse validate();", "public String toJson() throws Exception {\n\t\treturn WebAccess.mapper.writeValueAsString(this);\n\t}", "private void saveInFile() {\n try {\n FileOutputStream fOut = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);\n\n OutputStreamWriter writer = new OutputStreamWriter(fOut);\n Gson gson = new Gson();\n gson.toJson(counters, writer);\n writer.flush();\n\n fOut.close();\n\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "@Override\r\n\tpublic Map<String, String> getAlertMeses() {\n\t\treturn null;\r\n\t}", "protected static String saveMeetingJSON(ArrayList<Meeting> meetings) {\n JSONArray jsonArray = new JSONArray();\n\n for (int i = 0; i < meetings.size(); i++) {\n JSONObject meetingDetails = new JSONObject();\n meetingDetails.put(\"meeting_start\", meetings.get(i).getStartTime());\n meetingDetails.put(\"meeting_stop\", meetings.get(i).getStopTime());\n meetingDetails.put(\"meeting_subject\", meetings.get(i).getSubject());\n\n jsonArray.put(meetingDetails);\n\n }\n // this will save as CSV file if your given path\n // check this file exists or not\n File file = new File(\"D://fromJSON.csv\");\n String csv = CDL.toString(jsonArray);\n try {\n FileUtils.writeStringToFile(file, csv);\n } catch (IOException e) {\n logger.error(\"Can't export meeting details to json file\");\n\n e.printStackTrace();\n }\n return \"exported data successfully\";\n }", "public final File getValidationOutputFolder() {\n\t\treturn validationOutputFolder;\n\t}", "@Override\n @SuppressWarnings(\"unchecked\")\n public JSONObject toJSON() {\n JSONObject main = new JSONObject();\n JSONObject pocJSON = new JSONObject();\n pocJSON.put(JSON_NAME, this.getName());\n pocJSON.put(JSON_DESCRIPTION, this.getDescription());\n pocJSON.put(JSON_COLOR,this.colorConstraint.getColor().name());\n main.put(SharedConstants.TYPE, SharedConstants.PRIVATE_OBJECTIVE_CARD);\n main.put(SharedConstants.BODY,pocJSON);\n return main;\n }", "public List<ExcelImportException> getValidationErrors() {\n\t\treturn this.validationErrors;\n\t}", "@Test\n public void test10() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message10 = new File(classLoader.getResource(message10FileName).getFile());\n String messageString = FileUtils.readFileToString(message10);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "@Test\n public void test6() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message6 = new File(classLoader.getResource(message6FileName).getFile());\n String messageString = FileUtils.readFileToString(message6);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "private String notificacionesSRToJson(List<DaNotificacion> notificacions){\n String jsonResponse=\"\";\n Map<Integer, Object> mapResponse = new HashMap<Integer, Object>();\n Integer indice=0;\n for(DaNotificacion notificacion : notificacions){\n Map<String, String> map = new HashMap<String, String>();\n map.put(\"idNotificacion\",notificacion.getIdNotificacion());\n if (notificacion.getFechaInicioSintomas()!=null)\n map.put(\"fechaInicioSintomas\",DateUtil.DateToString(notificacion.getFechaInicioSintomas(), \"dd/MM/yyyy\"));\n else\n map.put(\"fechaInicioSintomas\",\" \");\n map.put(\"codtipoNoti\",notificacion.getCodTipoNotificacion().getCodigo());\n map.put(\"tipoNoti\",notificacion.getCodTipoNotificacion().getValor());\n map.put(\"fechaRegistro\",DateUtil.DateToString(notificacion.getFechaRegistro(), \"dd/MM/yyyy\"));\n map.put(\"SILAIS\",notificacion.getCodSilaisAtencion()!=null?notificacion.getCodSilaisAtencion().getNombre():\"\");\n map.put(\"unidad\",notificacion.getCodUnidadAtencion()!=null?notificacion.getCodUnidadAtencion().getNombre():\"\");\n //Si hay persona\n if (notificacion.getPersona()!=null){\n /// se obtiene el nombre de la persona asociada a la ficha\n String nombreCompleto = \"\";\n nombreCompleto = notificacion.getPersona().getPrimerNombre();\n if (notificacion.getPersona().getSegundoNombre()!=null)\n nombreCompleto = nombreCompleto +\" \"+ notificacion.getPersona().getSegundoNombre();\n nombreCompleto = nombreCompleto+\" \"+notificacion.getPersona().getPrimerApellido();\n if (notificacion.getPersona().getSegundoApellido()!=null)\n nombreCompleto = nombreCompleto +\" \"+ notificacion.getPersona().getSegundoApellido();\n map.put(\"persona\",nombreCompleto);\n //Se calcula la edad\n int edad = DateUtil.calcularEdadAnios(notificacion.getPersona().getFechaNacimiento());\n map.put(\"edad\",String.valueOf(edad));\n //se obtiene el sexo\n map.put(\"sexo\",notificacion.getPersona().getSexo().getValor());\n if(edad > 12 && notificacion.getPersona().isSexoFemenino()){\n map.put(\"embarazada\", envioMxService.estaEmbarazada(notificacion.getIdNotificacion()));\n }else\n map.put(\"embarazada\",\"--\");\n if (notificacion.getMunicipioResidencia()!=null){\n map.put(\"municipio\",notificacion.getMunicipioResidencia().getNombre());\n }else{\n map.put(\"municipio\",\"--\");\n }\n }else{\n map.put(\"persona\",\" \");\n map.put(\"edad\",\" \");\n map.put(\"sexo\",\" \");\n map.put(\"embarazada\",\"--\");\n map.put(\"municipio\",\"\");\n }\n\n mapResponse.put(indice, map);\n indice ++;\n }\n jsonResponse = new Gson().toJson(mapResponse);\n UnicodeEscaper escaper = UnicodeEscaper.above(127);\n return escaper.translate(jsonResponse);\n }", "String toJson() throws IOException;", "@Test\n public void test13() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message13 = new File(classLoader.getResource(message13FileName).getFile());\n String messageString = FileUtils.readFileToString(message13);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "public abstract Object toJson();", "@Test\n public void test11() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message11 = new File(classLoader.getResource(message11FileName).getFile());\n String messageString = FileUtils.readFileToString(message11);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(3, errors);\n assertEquals(0, alerts);\n }", "@Override\n\tpublic String toString() {\n\t\treturn toJSON().toString();\n\t}", "public ValidationInfo createCsv() {\n LocaleModule lm = LocaleManager.getInstance().getModule(LocaleModuleResource.Main);\n\n ValidationInfo vi = new ValidationInfo();\n if (_rows == null || _rows.size() == 0) {\n vi.setMessageWarning(lm.getString(\"general_export_nothing\"));\n return vi;\n }\n\n String fullFilePath = getFileName();\n\n StringBuilder sb = new StringBuilder();\n\n //create header\n String headerRow = _rows.get(0).createCsvRow(true);\n\n sb.append(headerRow + System.lineSeparator());\n\n try {\n //create rows\n for (Exportable e : _rows) {\n String rowString = e.createCsvRow(false);\n sb.append(rowString + System.lineSeparator());\n }\n\n //Output\n String strContent = sb.toString();\n Utils.writeFile(strContent, fullFilePath);\n\n vi.setMessageSuccess(String.format(lm.getString(\"general_export_success\"),\n _rows.size(), fullFilePath));\n } catch (Exception ex) {\n vi.setMessageError(lm.getString(\"general_export_error\"));\n }\n\n //open\n Utils.openFolder(fullFilePath);\n\n return vi;\n }", "void validateJson();", "public String toJson() {\n try{\n return new JsonSerializer().getObjectMapper().writeValueAsString(this);\n } catch (IOException e){\n throw new RuntimeException(e);\n }\n }", "public String toJSON() throws JSONException;", "Map<String, Object> exportDefaultConfiguration();", "private String prettyMessage() {\n Map<String, Object> map = new LinkedHashMap<>(4);\n map.put(\"type\", getType());\n map.put(\"message\", this.message);\n map.put(\"code\", getCode());\n // TODO(\"need to optimize\")\n map.put(\"data\", getData().toString());\n return JsonUtils.getGson().toJson(map);\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 }", "@Override\r\n\tpublic void writeAudit(AuditWriter w) throws JSONException {\n\r\n\t}", "@Override\n protected String bodyAsJsonString() {\n return gson.toJson(draft);\n }", "public static Map getNotices() throws Exception {\n Map noticeMap = new HashMap();\n for (Notice notice : list()) {\n noticeMap.put(notice.getName(), notice);\n }\n return noticeMap;\n }", "@ResponseStatus(HttpStatus.BAD_REQUEST)\n\t@ExceptionHandler(MethodArgumentNotValidException.class)\n\tpublic List<String> handleValidationExceptions(MethodArgumentNotValidException ex) {\n\t\treturn ex.getBindingResult().getAllErrors().stream().map(ObjectError::getDefaultMessage)\n\t\t\t\t.collect(Collectors.toList());\n\t}", "@Test\n public void test7() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message7 = new File(classLoader.getResource(message7FileName).getFile());\n String messageString = FileUtils.readFileToString(message7);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(1, errors);\n assertEquals(0, alerts);\n }", "private void marshall() {\n\t\t\n\t\ttry {\n\t\t\tFile file = new File(IKATS_IMPORT_SESSIONS_FILE);\n\t\t\t\n\t\t\tClass<?>[] classes = new Class[]{IngestionModel.class, ImportStatus.class};\n\t\t\t\n\t\t\tJAXBContext jaxbContext = JAXBContext.newInstance(classes);\n\t\t\tMarshaller jaxbMarshaller = jaxbContext.createMarshaller();\n\n\t\t\t// output pretty printed then save.\n\t\t\tjaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);\n\t\t\tjaxbMarshaller.marshal(model, file);\n\t\t\t\n\t\t\tlogger.info(\"Saved session file: {}\", file.getAbsolutePath());\n\n\t\t} catch (JAXBException e) {\n\t\t // Review#147170 logger.error(e)\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic JSONObject toJSON() {\n\t\treturn null;\r\n\t}", "java.util.List<WorldUps.UErr> \n getErrorList();", "private void fingerprintDataConvertedtoJSON() {\n String msgStr = \"\";\n JSONObject jsonObject = new JSONObject();\n\n try {\n /* jsonObject.put(\"errcode\", \"errcode1\");\n jsonObject.put(\"errInfo\", \"errInfo1\");\n jsonObject.put(\"fCount\", \"fCount1\");\n jsonObject.put(\"fType\", \"fType1\");\n jsonObject.put(\"iCount\", \"iCount1\");\n jsonObject.put(\"iType\", \"iType1\");\n jsonObject.put(\"pCount\", \"pCount1\");\n jsonObject.put(\"pType\", \"pType1\");\n jsonObject.put(\"nmPoints\", \"nmPoints1\");\n jsonObject.put(\"qScore\", \"qScor1e\");\n jsonObject.put(\"dpID\", \"dpI1d\");\n jsonObject.put(\"rdsID\", \"rds1ID\");\n jsonObject.put(\"rdsVer\", \"rdsVer\");\n jsonObject.put(\"dc\", \"dc1\");\n jsonObject.put(\"mi\", \"mi1\");\n jsonObject.put(\"mc\", \"mc\");\n jsonObject.put(\"ci\", \"c1i\");\n jsonObject.put(\"sessionKey\", \"SessionK1ey\");\n jsonObject.put(\"hmac\", \"hma1c\");\n jsonObject.put(\"PidDatatype\", \"PidDatat1ype\");\n jsonObject.put(\"Piddata\", \"Pidda1ta\");*/\n jsonObject.put(\"errcode\",errcode);\n jsonObject.put(\"errInfo\",errInfo);\n jsonObject.put(\"fCount\",fCount);\n jsonObject.put(\"fType\",fType);\n jsonObject.put(\"iCount\",iCount);\n jsonObject.put(\"iType\",iType);\n jsonObject.put(\"pCount\",pCount);\n jsonObject.put(\"pType\",pType);\n jsonObject.put(\"nmPoints\",nmPoints);\n jsonObject.put(\"qScore\",qScore);\n jsonObject.put(\"dpID\",dpId);\n jsonObject.put(\"rdsID\",rdsID);\n jsonObject.put(\"rdsVer\",rdsVer);\n jsonObject.put(\"dc\",dc);\n jsonObject.put(\"mi\",mi);\n jsonObject.put(\"mc\",mc);\n jsonObject.put(\"ci\",ci);\n jsonObject.put(\"sessionKey\",SessionKey);\n jsonObject.put(\"hmac\",hmac);\n jsonObject.put(\"PidDatatype\",PidDatatype);\n jsonObject.put(\"Piddata\",Piddata);\n\n pidData_json = jsonObject.toString();\n new apiCall_BalanceEnquiry().execute();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "@Test\n public void test9() throws Exception {\n SyncHL7Validator validator = Util.createValidator(profiles, constraints, null, valueSets);\n ClassLoader classLoader = getClass().getClassLoader();\n File message9 = new File(classLoader.getResource(message9FileName).getFile());\n String messageString = FileUtils.readFileToString(message9);\n Report report = validator.check(messageString, \"ORU_R01\");\n\n Set<String> keys = report.getEntries().keySet();\n int errors = 0;\n int alerts = 0;\n for (String key : keys) {\n List<Entry> entries = report.getEntries().get(key);\n if (entries != null && entries.size() > 0) {\n System.out.println(\"*** \" + key + \" ***\");\n for (Entry entry : entries) {\n switch (entry.getClassification()) {\n case \"Error\":\n Util.printEntry(entry);\n errors++;\n break;\n case \"Alert\":\n Util.printEntry(entry);\n alerts++;\n break;\n }\n }\n }\n }\n assertEquals(2, errors);\n assertEquals(0, alerts);\n }", "public String getMessageInJsonFormat(){\n return messageInJsonFormat;\n }", "public String toJson() throws Exception {\r\n\t\treturn SimpleJson.HashMapToText(getJsonToken());\r\n\t}", "private String toJson(PredictionsList plist) {\n\tString json = \"If you see this, there's a problem.\";\n\ttry {\n\t json = new ObjectMapper().writeValueAsString(plist);\n\t}\n\tcatch(Exception e) { }\n\treturn json;\n }", "public void mostrarNotificaciones(){\n System.out.println(notificaciones.toString());\n }", "@Test\n public void testWithoutNewWarnings() {\n String request = \"{\\\"canRunOnFailed\\\":false,\\\"defaultEncoding\\\":\\\"\\\",\\\"failedTotalAll\\\":\\\"\\\",\\\"failedTotalHigh\\\":\\\"\\\",\\\"failedTotalLow\\\":\\\"\\\",\\\"failedTotalNormal\\\":\\\"\\\",\\\"healthy\\\":\\\"0\\\",\\\"pattern\\\":\\\"\\\",\\\"shouldDetectModules\\\":false,\\\"thresholdLimit\\\":\\\"low\\\",\\\"unHealthy\\\":\\\"50\\\",\\\"unstableTotalAll\\\":\\\"\\\",\\\"unstableTotalHigh\\\":\\\"\\\",\\\"unstableTotalLow\\\":\\\"\\\",\\\"unstableTotalNormal\\\":\\\"\\\"}\";\n\n JSONObject input = JSONObject.fromObject(request);\n JSONObject output = PluginDescriptor.convertHierarchicalFormData(input);\n\n assertEquals(\"Wrong JSON \", input, output);\n }", "public Collection fullValidationCheck ()\n\t{\n\t\tArrayList list = new ArrayList();\n\t\tIterator iterator = getFullValidationList().iterator();\n\n\t\twhile (iterator.hasNext())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t((ValidationComponent)iterator.next()).validate();\n\t\t\t}\n\t\t\tcatch (ModelValidationException e)\n\t\t\t{\n\t\t\t\tlist.add(e);\n\t\t\t}\n\t\t}\n\n\t\treturn Collections.unmodifiableCollection(list);\n\t}", "String getErrorsString();", "private void addErrors() {\n this.errors = new ArrayList<>();\n var resources = ResourceBundle.getBundle(ERRORS);\n for (var key : Collections.list(resources.getKeys())) {\n var value = resources.getString(key);\n errors.add(new AbstractMap.SimpleEntry<>(key, value));\n }\n }" ]
[ "0.60760945", "0.52536106", "0.5249284", "0.511909", "0.5053304", "0.5043744", "0.49909213", "0.4928945", "0.48981243", "0.48957792", "0.48831764", "0.4872103", "0.48651838", "0.47838902", "0.47487396", "0.47384867", "0.46993586", "0.46987003", "0.46903658", "0.4686124", "0.46566913", "0.46289518", "0.46276", "0.4621282", "0.46108094", "0.4609925", "0.45956147", "0.45909077", "0.45818177", "0.45758563", "0.45730895", "0.45706958", "0.45611128", "0.45571503", "0.45369062", "0.4534763", "0.45288974", "0.45280987", "0.4527361", "0.45212042", "0.45192423", "0.45065457", "0.44997352", "0.44913018", "0.4484636", "0.4484465", "0.44682485", "0.4466868", "0.44578144", "0.44567698", "0.44532037", "0.44453377", "0.4442532", "0.44390592", "0.44266906", "0.4425924", "0.44236013", "0.44182652", "0.44175515", "0.44146556", "0.44105476", "0.43970233", "0.43935832", "0.43915123", "0.43769735", "0.4373611", "0.43734738", "0.4373236", "0.4365768", "0.43611285", "0.4358689", "0.43549886", "0.4353098", "0.4348147", "0.43460727", "0.43392798", "0.43389004", "0.43359548", "0.4335364", "0.43235618", "0.43176162", "0.43163678", "0.43114513", "0.4309267", "0.43073568", "0.43067232", "0.42940882", "0.4293952", "0.42925408", "0.42846715", "0.42844424", "0.42840073", "0.4279614", "0.42669362", "0.4259229", "0.42562175", "0.42558372", "0.4253029", "0.4252653", "0.42442015" ]
0.7504963
0
Exports all system errors as JSON.
public JsonObject exportSystemErrors() { return exportJson(systemErrors); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n @ExceptionHandler(Exception.class)\n public String handleAllException() {\n\n return \"server_error\";\n }", "void reloadStandardErrorMessages();", "protected void finalizeSystemErr() {}", "private void _debugSystemOutAndErr() {\n try {\n File outF = new File(System.getProperty(\"user.home\") +\n System.getProperty(\"file.separator\") + \"out.txt\");\n FileWriter wo = new FileWriter(outF);\n final PrintWriter outWriter = new PrintWriter(wo);\n File errF = new File(System.getProperty(\"user.home\") +\n System.getProperty(\"file.separator\") + \"err.txt\");\n FileWriter we = new FileWriter(errF);\n final PrintWriter errWriter = new PrintWriter(we);\n System.setOut(new PrintStream(new edu.rice.cs.util.OutputStreamRedirector() {\n public void print(String s) {\n outWriter.print(s);\n outWriter.flush();\n }\n }));\n System.setErr(new PrintStream(new edu.rice.cs.util.OutputStreamRedirector() {\n public void print(String s) {\n errWriter.print(s);\n errWriter.flush();\n }\n }));\n }\n catch (IOException ioe) {}\n }", "public void writeErrorTable(String errorMessage) throws IOException;", "@ExceptionHandler({RegionNotFoundException.class, ResourceNotFoundException.class})\n @ResponseBody\n @ResponseStatus(HttpStatus.NOT_FOUND)\n public String handle(final RuntimeException e) {\n return convertErrorAsJson(e.getMessage());\n }", "@ExceptionHandler({MalformedJsonException.class})\n @ResponseBody\n @ResponseStatus(HttpStatus.BAD_REQUEST)\n public String handleException(final RuntimeException e) {\n return convertErrorAsJson(e.getMessage());\n }", "public List<SystemError> getSystemErrors() {\n return Lists.transform(systemErrors, ResolvedNotice::getContext);\n }", "@ExceptionHandler(GemfireRestException.class)\n @ResponseBody\n @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n public String handleException(final GemfireRestException ge) {\n return convertErrorAsJson(ge);\n }", "public Collection<GmlExceptionReport> getErrors()\r\n {\r\n return myErrorHandler.getExceptionReports();\r\n }", "public final void printErrors() {\n for (ShadowException exception : errorList) LOGGER.error(exception.getMessage());\n }", "@Override\n public List<String> catchFaults(){\n List<String> errors = new ArrayList<>();\n severityLevels.forEach(level -> {\n if(level.equals(\"ERROR\")){\n errors.add(level);\n }\n });\n return errors;\n }", "public static PrintStream sysErr() {\n return system_err;\n }", "public void printPageErrors() throws Exception {\n List<JavaScriptError> Errors = JavaScriptError.readErrors(driver);\n System.out.println(\"Total No Of JavaScript Errors : \" + Errors.size());\n //Print Javascript Errors one by one from array.\n for (int i = 0; i < Errors.size(); i++) {\n System.out.println(\"Error Message : \"\n + Errors.get(i).getErrorMessage());\n System.out.println(\"Error Line No : \"\n + Errors.get(i).getLineNumber());\n System.out.println(Errors.get(i).getSourceName());\n System.out.println();\n }\n }", "@Override\n @Produces(MediaType.APPLICATION_JSON)\n public Response toResponse(UserInputException e) {\n return Response.status(Response.Status.BAD_REQUEST).entity(e.getProblems()).build();\n }", "private void writeExceptions(Method m) {\n Class<?>[] exceptions = m.getExceptionTypes();\n int size = exceptions.length;\n if (exceptions.length == 0)\n return;\n writer.print(\"throws \");\n for (int i = 0; i < size; i++) {\n writer.print(exceptions[i].getCanonicalName());\n if (i != size - 1)\n writer.print(\", \");\n }\n writer.print(\" \");\n }", "public SimpleResponse ERROR_EDS() {\n this.state = HttpStatus.METHOD_NOT_ALLOWED.value();\n\n return ERROR_CUSTOM();\n }", "java.util.List<WorldUps.UErr> \n getErrorList();", "@SuppressWarnings(\"ThrowableNotThrown\") \n public static Response getSCIMInternalErrorResponse() {\n JSONEncoder encoder = new JSONEncoder();\n CharonException exception = new CharonException(\"Internal Error\");\n String responseStr = encoder.encodeSCIMException(exception);\n return Response.status(exception.getStatus()).entity(responseStr).build();\n }", "@ExceptionHandler(Exception.class)\n public String handleAllException(Exception ex) {\n logger.info(\"Error in dashboard.\");\n return \"error\";\n }", "public void sendError()\n {\n \tString resultText = Integer.toString(stdID);\n \tresultText += \": \";\n\t\tfor(int i = 0; i<registeredCourses.size();i++)\n\t\t{\n\t\t\tresultText += registeredCourses.get(i);\n\t\t\tresultText += \" \";\n\t\t}\n\t\tresultText += \"--\";\n\t\tresultText += \" \";\n\t\tresultText += Integer.toString(semesterNum);\n\t\tresultText += \" \";\n\t\tresultText += Integer.toString(0); \n\t\tresultText += \" \";\n\t\tprintResults.writeResult(resultText);\n \tSystem.exit(1);\n }", "void writeFormattedException(final String message,\n final Level level,\n final Writer out)\n throws IOException {\n JsonGenerator generator = new JsonFactory().createJsonGenerator(out);\n\n String backtrace = ExceptionUtils.getFullStackTrace(new Exception());\n String[] lines = backtrace.split(\"\\n\");\n StringBuilder builder = new StringBuilder();\n for (String line : lines) {\n if (!line.contains(\"com.greplin.gec.GecAppender.\")) {\n builder.append(line);\n builder.append(\"\\n\");\n }\n }\n backtrace = builder.toString();\n\n generator.writeStartObject();\n generator.writeStringField(\"project\", this.project);\n generator.writeStringField(\"environment\", this.environment);\n generator.writeStringField(\"serverName\", this.serverName);\n generator.writeStringField(\"backtrace\", backtrace);\n generator.writeStringField(\"message\", message);\n generator.writeStringField(\"logMessage\", message);\n generator.writeStringField(\"type\", \"N/A\");\n if (level != Level.ERROR) {\n generator.writeStringField(\"errorLevel\", level.toString());\n }\n writeContext(generator);\n generator.writeEndObject();\n generator.close();\n }", "public List<RemoteRenderingServiceError> listRootErrors() {\n return this.rootErrors;\n }", "private void showErrors() {\n \t\tfor (Iterator it = this.errors.iterator(); it.hasNext();) {\n \t\t\ttry {\n \t\t\t\tObject err = it.next();\n \t\t\t\t\n \t\t\t\t/* errors can be represented by PositionedError, UnpositionedError or String */\n \t\t\t\tif (err instanceof PositionedError) {\n \t\t\t\t\tPositionedError error = (PositionedError)err;\n \t\t\t\t\tTokenReference token = error.getTokenReference();\n \t\n \t\t\t\t log.debug(\"file: \" + token.getFile() + \", \" + \"line: \" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n \t\t\t\t\t\t\t+ token.getLine() + \", \" + \"path: \" //$NON-NLS-1$//$NON-NLS-2$\n \t\t\t\t\t\t\t+ token.getPath());\n \n \t\t\t\t\tIResource resource = ProjectProperties.findResource(token\n \t\t\t\t\t\t\t.getPath().getAbsolutePath(), currentProject);\n \t\t\t\t\t\n \t\t\t\t\tIMarker marker = null;\n \t\t\t\t\tif (resource != null) {\n \t\t\t\t\t\tmarker = resource.createMarker(IMarker.PROBLEM);\n \t\t\t\t\t\tif (token.getLine() > 0) {\n \t\t\t\t\t\t\tmarker.setAttribute(IMarker.LINE_NUMBER, token.getLine());\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\t// for the cases, when error refers to a generated piece of code\n \t\t\t\t\t\tmarker = currentProject.createMarker(IMarker.PROBLEM);\n \t\t\t\t\t}\n \t\t\t\t\tmarker.setAttribute(IMarker.MESSAGE, error\n \t\t\t\t\t\t\t.getFormattedMessage().getMessage());\n \t\t\t\t\tmarker.setAttribute(IMarker.SEVERITY, new Integer(\n \t\t\t\t\t\t\tIMarker.SEVERITY_ERROR));\n \t\t\t\t}\n \t\t\t\telse { /* create unpositioned error at the scope of the project */\t\t\t\t\t\n \t\t\t\t\tString msg;\n \t\t\t\t\tif (err instanceof UnpositionedError) {\n \t\t\t\t\t\tmsg = ((UnpositionedError)err).getFormattedMessage().getMessage();\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tmsg = (String)err; // for internal errors\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\tIMarker marker = currentProject.createMarker(IMarker.PROBLEM);\n \t\t\t\t\tmarker.setAttribute(IMarker.MESSAGE, msg);\n \t\t\t\t\tmarker.setAttribute(IMarker.SEVERITY, new Integer(IMarker.SEVERITY_ERROR));\n \t\t\t\t}\n \t\t\t} \n \t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n \t\t\t}\n \t\t}\n \t}", "public void printErrors() {\n final int size = _errors.size();\n if (size > 0) {\n System.err.println(new ErrorMsg(ErrorMsg.COMPILER_ERROR_KEY));\n for (int i = 0; i < size; i++) {\n System.err.println(\" \" + _errors.get(i));\n }\n }\n }", "public void dumpErrorMessage(PrintWriter writer, String cmd,\n String errorCode, HttpServletResponse response) {\n \t\tif (cmd.equals(IRubricService.CMD_GET_GRADES_BY_GDB)\n \t\t\t\t|| cmd.equals(IRubricService.CMD_GET_GRADES_BY_ROS)) {\n \t\t\tresponse.setContentType(\"application/json\");\n \t\t\twriter.print(\"{\\\"message\\\": \\\"\"+ rl.getFormattedMessage(\"irubric.errorCode\", new Object[] {errorCode}) + \"\\\"}\");\n \t\t\t\n \t\t} else if (cmd.equals(CMD_GET_GRADE)) {\n \t\t\tresponse.setContentType(\"application/json\");\n \t\t\twriter.print(\"{\\\"message\\\": \\\"\"+ rl.getFormattedMessage(\"irubric.errorCode\", new Object[] {errorCode}) + \"\\\"}\");\n \t\t\t\n \t\t} else {\n \t\t\twriter.print(\"<br/><br/><div align=center>\" + rl.getString(\"irubric.displayErrorCode\").replace(\"{errorcode}\", errorCode) + \"</div>\");\n \t\t}\n \t}", "public final Map<String, Exception> getErrors() {\n\n\t\treturn this.errors;\n\t}", "@Override\r\n\tpublic String getErrorPath() {\n\t\treturn \"/error\";\r\n\t}", "void setResponseFormatError(){\n responseFormatError = true;\n }", "public String getErrorStrings() {\n return this.errorStrings;\n }", "@Override\n\tpublic HashMap<String, String> getErrors() {\n\t\treturn errors;\n\t}", "public static void writeError(Throwable JError, String JFilePath) {\n /*\n try\n\t\t{\n\t\tString JSdcardPath = JFilePath;\n\t\tif(JFilePath == null)\n\t\t{\n\t\t\tJSdcardPath = FILE_ROOT + \".Error/\";\n\t\t}\n\t\tmkdirs(FILE_ROOT);\n\t\tmkdirs(JSdcardPath);\n\n\t\tint JTotalError = new File(JSdcardPath).listFiles().length;\n\t\tString JNewFileName = JTotalError + \".txt\" ;\n\t\twriteObject( getStackTrace(JError), FILE_ROOT + \".Error/\", JNewFileName);\n\t\t}catch(IOException JE)\n\t\t{ }\n\t */\n }", "static PrintStream outputStream() {\n return System.err;\n }", "public static void exposeError(String errorMessage) {\r\n CmdUx.printHBars(errorMessage);\r\n }", "@GET\n @Path(\"/job/{id}/errors\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response getJobErrors(@PathParam(\"id\") String jobId) {\n JSONObject errorResult = new JSONObject();\n errorResult.put(\"errors\",getErrors(jobId));\n if (null == errorResult) {\n return Response.status(404).entity(\"Not found\").build();\n }\n return Response.status(200).entity(errorResult.toString(1)).build();\n }", "@Override\n\tpublic boolean isErrorEnabled() {\n\t\treturn false;\n\t}", "@Override\n\tpublic String getErrorPath() {\n\t\treturn \"/error\";\n\t}", "public java.util.List<WorldUps.UErr> getErrorList() {\n return error_;\n }", "public void exportJSON()\n {\n Gson JSONConverter = new Gson();\n FileWriter writer;\n\n try\n {\n // wipe the file\n PrintWriter write = new PrintWriter(new File(fp));\n write.print(\"\");\n write.close();\n\n // Initialize FileWriter to write Strings into JSON file.\n writer = new FileWriter(fp + \"/queue.json\");\n\n Iterator<ComparableCalendar> iter = this.queue.iterator();\n // Loop through the PQ.\n while(iter.hasNext())\n {\n ComparableCalendar nextObject = iter.next();\n // Convert an issue object into a JSON-formatted representation of it, as a String.\n String representationJSON = JSONConverter.toJson(nextObject);\n\n // Write that String to the file.\n writer.write(representationJSON + \"\\n\");\n }\n // Close the FileWriter to conserve system resources.\n writer.close();\n\n }\n catch (Exception e)\n {\n // Print any error messages that results to the console.\n e.printStackTrace();\n }\n\n }", "public String getError() {\n return writeResult.getError();\n }", "public void handleError() {\n\t\tSystem.out.println(defaultLocale);\n\t}", "@Override\r\n\tpublic String getErrorPath() {\n\t\treturn PATH;\r\n\t}", "String[] getError() {\n return error;\n }", "public void writeOutput() {\n // Create json object to be written\n Map<String, Object> jsonOutput = new LinkedHashMap<>();\n // Get array of json output objects for consumers\n List<Map<String, Object>> jsonConsumers = writeConsumers();\n // Add array for consumers to output object\n jsonOutput.put(Constants.CONSUMERS, jsonConsumers);\n // Get array of json output objects for distributors\n List<Map<String, Object>> jsonDistributors = writeDistributors();\n // Add array for distributors to output objects\n jsonOutput.put(Constants.DISTRIBUTORS, jsonDistributors);\n // Get array of json output objects for producers\n List<Map<String, Object>> jsonProducers = writeProducers();\n // Add array for producers to output objects\n jsonOutput.put(Constants.ENERGYPRODUCERS, jsonProducers);\n // Write to output file and close\n try {\n ObjectMapper mapper = new ObjectMapper();\n ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());\n writer.writeValue(Paths.get(outFile).toFile(), jsonOutput);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static PrintStream err() {\n return System.err;\n }", "public String error();", "protected void printError(Exception ex, HttpServletResponse response) {\n int statusCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;\n String exceptionName = \"runtime\";\n\n if (ex instanceof CmisRuntimeException) {\n LOG.error(ex.getMessage(), ex);\n } else if (ex instanceof CmisStorageException) {\n LOG.error(ex.getMessage(), ex);\n statusCode = getErrorCode((CmisStorageException) ex);\n exceptionName = ((CmisStorageException) ex).getExceptionName();\n } else if (ex instanceof CmisBaseException) {\n statusCode = getErrorCode((CmisBaseException) ex);\n exceptionName = ((CmisBaseException) ex).getExceptionName();\n } else if (ex instanceof IOException) {\n LOG.warn(ex.getMessage(), ex);\n } else {\n LOG.error(ex.getMessage(), ex);\n }\n\n if (response.isCommitted()) {\n LOG.warn(\"Failed to send error message to client. Response is already committed.\", ex);\n return;\n }\n\n String message = ex.getMessage();\n if (!(ex instanceof CmisBaseException)) {\n message = \"An error occurred!\";\n }\n\n try {\n response.resetBuffer();\n response.setStatus(statusCode);\n response.setContentType(\"text/html\");\n response.setCharacterEncoding(IOUtils.UTF8);\n\n PrintWriter pw = response.getWriter();\n\n pw.print(\"<html><head><title>Apache Chemistry OpenCMIS - \"\n + exceptionName\n + \" error</title>\"\n + \"<style><!--H1 {font-size:24px;line-height:normal;font-weight:bold;background-color:#f0f0f0;color:#003366;border-bottom:1px solid #3c78b5;padding:2px;} \"\n + \"BODY {font-family:Verdana,arial,sans-serif;color:black;font-size:14px;} \"\n + \"HR {color:#3c78b5;height:1px;}--></style></head><body>\");\n pw.print(\"<h1>HTTP Status \" + statusCode + \" - <!--exception-->\" + exceptionName + \"<!--/exception--></h1>\");\n pw.print(\"<p><!--message-->\" + StringEscapeUtils.escapeHtml(message) + \"<!--/message--></p>\");\n\n String st = ExceptionHelper.getStacktraceAsString(ex);\n if (st != null) {\n pw.print(\"<hr noshade='noshade'/><!--stacktrace--><pre>\\n\" + st\n + \"\\n</pre><!--/stacktrace--><hr noshade='noshade'/>\");\n }\n\n pw.print(\"</body></html>\");\n } catch (Exception e) {\n LOG.error(e.getMessage(), e);\n try {\n response.sendError(statusCode, message);\n } catch (Exception en) {\n // there is nothing else we can do\n }\n }\n }", "public SimpleResponse ERROR() {\n this.state = HttpStatus.BAD_REQUEST.value();\n\n return ERROR_CUSTOM();\n }", "@ExceptionHandler(Exception.class)\n\tpublic ModelAndView handleAllExceptions(Exception ex) {\n\t\tex.printStackTrace();\n\t\tModelAndView model = new ModelAndView(\"genericError\");\n\t\tmodel.addObject(\"errCode\", \"500\");\n\t\tmodel.addObject(\"errMsg\", \"Internal server error - omlouvame se za nami zpusobene potize.\");\n\t\treturn model;\n\t}", "public String toJson() throws Exception {\r\n\t\treturn SimpleJson.HashMapToText(getJsonToken());\r\n\t}", "private void errorProcess(CallbackContext callbackContext, Exception ex) {\n // Convierte el payLoad a JSON.\n Gson gson = new Gson();\n Map<String, String> exc_map = new HashMap<String, String>();\n exc_map.put(\"message\", ex.toString());\n exc_map.put(\"stacktrace\", getStackTrace(ex));\n // Convierte el payLoad a JSON.\n String jsonError = new Gson().toJson(exc_map);\n\n sendResultError(callbackContext, jsonError);\n ex.printStackTrace();\n if (callbackContext != null) {\n callbackContext.error(jsonError);\n }\n }", "public void error();", "Set<ISOAError> getErrors();", "public noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[] getErrorArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(ERROR$0, targetList);\r\n noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[] result = new noNamespace.ErrordetectiondashletDocument.Errordetectiondashlet.Errors.Error[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "@SuppressWarnings(\"unused\")\n public void SaveJsonCollectionsToFiles(){\n try {\n String formattedDate = FileNameUtils.DATE_FORMAT.format(new Date());\n ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());\n writer.writeValue(new File(FileNameUtils.GetValuesFileName(formattedDate)), jsonObjects);\n }\n catch(IOException exp){\n System.err.println(\"Error while creating JSON file. Reason: \" + exp.getMessage());\n }\n }", "@Override\r\n\tpublic void err(ServiceStatistics serviceStatistics) {\n\t\t\r\n\t}", "@Override\n public String getErrorPath() {\n return ERROR_PATH;\n }", "@After\n public static void renderValidationErrors() {\n if (validation.hasErrors()) {\n response.status = 400;\n Map<String, String> errorsMap = new HashMap();\n for (Error error : validation.errors()) {\n errorsMap.put(error.getKey(), Messages.get(error.message()));\n }\n renderJSON(errorsMap);\n }\n }", "public void printErrors() {\r\n\t\tif (this.syntaxError) {\r\n\t\t\tSystem.err.println(\"\\nErrors found running the parser:\");\r\n\t\t\tfor (String error : errors) {\r\n\t\t\t\tSystem.err.println(\"\\t => \" + error);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic Response error(ErrorMessage errorMessage) {\r\n\r\n\t\tJSONObject json = new JSONObject();\r\n\r\n\t\ttry {\r\n\t\t\tjson.put(STAT, FAIL);\r\n\t\t\tjson.put(CODE, errorMessage.getCode());\r\n\t\t\tjson.put(MESSAGE, errorMessage.getMessage());\r\n\t\t} catch (JSONException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn buildResponse(json);\r\n\t}", "public String muestraListaErrores(){\r\n \tString salida;\r\n \tsalida= \"\\n\";\r\n \tif (errors.size()==0){\r\n\t \tsalida=salida+\"No hubo errores\\n\";\r\n\t \treturn salida;\r\n \t}\r\n \telse {\r\n \t\tfor(TError error: errors) {\r\n \t\t\tsalida += error + \"\\n\";\r\n \t\t}\r\n \t\treturn salida;\r\n \t}\r\n }", "Object getFailonerror();", "Object getFailonerror();", "String getErrorsString();", "@ExceptionHandler(ServiceClientException.class)\n public ResponseEntity<ErrorMessages> catchSetupCardErrors(ServiceClientException ex) {\n log.error(ex.getMessage(), ex);\n List<ErrorMessage> errorMessages = ex.getErrors().stream().map(err -> ErrorMessage.builder().code(err.getCode()).message(err.getMessage()).build()).collect(Collectors.toList());\n ErrorMessages errors = ErrorMessages.builder().errors(errorMessages).build();\n return new ResponseEntity<>(errors, HttpStatus.INTERNAL_SERVER_ERROR);\n }", "void writeFormattedException(final String message,\n final Throwable throwable,\n final Level level,\n final Writer out)\n throws IOException {\n JsonGenerator generator = new JsonFactory().createJsonGenerator(out);\n\n Throwable rootThrowable = throwable;\n while (this.passthroughExceptions.contains(rootThrowable.getClass())\n && rootThrowable.getCause() != null) {\n rootThrowable = rootThrowable.getCause();\n }\n\n generator.writeStartObject();\n generator.writeStringField(\"project\", this.project);\n generator.writeStringField(\"environment\", this.environment);\n generator.writeStringField(\"serverName\", this.serverName);\n generator.writeStringField(\"backtrace\",\n ExceptionUtils.getStackTrace(throwable));\n generator.writeStringField(\"message\", rootThrowable.getMessage());\n generator.writeStringField(\"logMessage\", message);\n generator.writeStringField(\"type\", rootThrowable.getClass().getName());\n if (level != Level.ERROR) {\n generator.writeStringField(\"errorLevel\", level.toString());\n }\n writeContext(generator);\n generator.writeEndObject();\n generator.close();\n }", "public void exportFailure(BeanXporterEvent e);", "private void handleError(HttpServletResponse resp, Throwable ex) {\r\n try {\r\n if (resp.isCommitted()) {\r\n PrintWriter out = resp.getWriter();\r\n ex.printStackTrace(out);\r\n return;\r\n }\r\n resp.setStatus(500);\r\n resp.setContentType(\"text/html\");\r\n PrintWriter out = resp.getWriter();\r\n out.println(\"<html>\");\r\n out.println(\" <head><title>Execution Error: 500</title></head>\");\r\n out.println(\" <body>\");\r\n out.println(\" <h2>Execution Error: \"+ex.getClass().getSimpleName()+\"</h2>\");\r\n out.println(\" <p>Stack trace:</p>\");\r\n out.print(\" <blockquote><pre>\");\r\n if (ex instanceof RhinoException) {\r\n RhinoException rex = (RhinoException)ex;\r\n rex.printStackTrace(out);\r\n } else {\r\n ex.printStackTrace(out);\r\n }\r\n out.println(\"</pre></blockquote>\");\r\n out.println(\" <p><address>Powered by Alt Framework</address></p>\");\r\n out.println(\" </body>\");\r\n out.println(\"</html>\");\r\n } catch (IOException ex2) {\r\n ex2.printStackTrace(System.err);\r\n }\r\n }", "@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n @ExceptionHandler(RuntimeException.class)\n public Map<String, String> handleException(RuntimeException ex) {\n return Collections.singletonMap(\"message\", ex.getMessage());\n }", "public Map getError() {\n return this.error;\n }", "@Override\n\tpublic Response toResponse(JsonParseException exception) {\n return Response.status(Response.Status.BAD_REQUEST).build();\n\t}", "java.lang.String getErr();", "private ModelAndView handleAjaxSystemException(Exception ex,\n\t\t\tHttpServletRequest request, HttpServletResponse response,\n\t\t\tObject handler) throws HttpMessageNotWritableException, IOException {\n\t\tHttpInputMessage inputMessage = new ServletServerHttpRequest(request);\n\t\tHttpOutputMessage outputMessage = new ServletServerHttpResponse(\n\t\t\t\tresponse);\n\t\t// get contentType\n\t\tList<MediaType> acceptedMediaTypes = inputMessage.getHeaders()\n\t\t\t\t.getAccept();\n\t\tMappingJackson2HttpMessageConverter messageConverter = new MappingJackson2HttpMessageConverter();\n\t\t// printStackTrace To String\n\t\tByteArrayOutputStream byteOut = new ByteArrayOutputStream();\n\t\tPrintStream pstream = new PrintStream(byteOut);\n\t\tex.printStackTrace(pstream);\n\t\tpstream.close();\n\n\t\tExceptionMessage returnValue = new ExceptionMessage(ex.getMessage(),\n\t\t\t\tnew String(byteOut.toByteArray()));\n\t\tfor (MediaType mediaType : acceptedMediaTypes) {\n\t\t\tClass<? extends ExceptionMessage> returnValueType = returnValue\n\t\t\t\t\t.getClass();\n\t\t\tif (messageConverter.canWrite(returnValueType, mediaType)) {\n\t\t\t\tmessageConverter.write(returnValue, mediaType, outputMessage);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert java object to json\n\t\t// write to responseMessage\n\t\treturn new ModelAndView();\n\t}", "public static\n PrintStream err() {\n return Ansi.err;\n }", "public List<Exception> getErrors() {\n\t\treturn null;\n\t}", "private void sendError() throws IOException {\n System.out.println(\"Error Message\");\n DataOutputStream dos = new DataOutputStream(os);\n dos.writeInt(1);\n dos.writeByte(Message.MSG_ERROR_STATUS);\n }", "public noNamespace.ErrorDocument.Error[] getErrorArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(ERROR$0, targetList);\r\n noNamespace.ErrorDocument.Error[] result = new noNamespace.ErrorDocument.Error[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public static void printWriteFileError() {\n System.out.println(Message.WRITE_FILE_ERROR);\n }", "public List<String> getErrors()\n {\n return _errors;\n }", "public String getExceptionMessage() {\n\t\treturn \"Error while publishing JSON reports. Please contact system administrator or try again later!\";\n\t}", "public Collection<ErrorClass> getErrorCol() {\r\n\t\treturn values();\r\n\t}", "ResponseErrorAssembler addErrorMesages(Collection<Message> errorMessages);", "@RequestMapping(\"generalError\")\n\tpublic String error(HttpServletRequest request, HttpServletResponse response, Model model) {\n\t\tString classpath = \"javax.servlet.error\";\n\t\tInteger statusCode = (Integer) request.getAttribute(classpath + \".status_code\");\n\t\tThrowable throwable= (Throwable) request.getAttribute(classpath + \".exception\");\n\t\tString exceptionMessage= getExceptionMessage(throwable, statusCode);\n\t\tString requestUri = (String) request.getAttribute(classpath + \".request_uri\");\n\t\tif (requestUri == null) requestUri = \"Unknown\";\n\t\t\n\t\tString message = MessageFormat.format(\"{0} returned for {1} with message {2}\", statusCode, requestUri, exceptionMessage);\n\t\tmodel.addAttribute(\"errorMessage\", message);\n\t\treturn \"error/general\";\n\t}", "public String getErrorPath() {\n\t\treturn \"/error\";\n\t}", "public SimpleResponse ERROR_INTERNAL_SERVER() {\n this.state = HttpStatus.INTERNAL_SERVER_ERROR.value();\n return ERROR_CUSTOM();\n }", "@Override\n\t\t\t\t\t\t\tpublic void error(Exception e) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public String printInvalidSaveCollectionSheetReasons() {\n if (invalidSaveCollectionSheetReasonsExtended != null) {\n final StringBuilder builder = new StringBuilder();\n final String newline = System.getProperty(\"line.separator\");\n\n builder.append(\"Input Errors Found:\");\n builder.append(newline);\n for (String ire : invalidSaveCollectionSheetReasonsExtended) {\n builder.append(ire);\n builder.append(newline);\n }\n\n return builder.toString();\n }\n\n if (invalidSaveCollectionSheetReasons != null) {\n final StringBuilder builder = new StringBuilder();\n final String newline = System.getProperty(\"line.separator\");\n\n builder.append(\"Input Errors Found:\");\n builder.append(newline);\n for (InvalidSaveCollectionSheetReason ir : invalidSaveCollectionSheetReasons) {\n builder.append(ir);\n builder.append(newline);\n }\n\n return builder.toString();\n }\n\n return null;\n }", "@Test\n public void testSystemHealthErrorInterpretation() {\n for (RouterErrorCode errorCode : RouterErrorCode.values()) {\n switch (errorCode) {\n case InvalidBlobId :\n case InvalidPutArgument :\n case BlobTooLarge :\n case BadInputChannel :\n case BlobDeleted :\n case BlobDoesNotExist :\n case BlobAuthorizationFailure :\n case BlobExpired :\n case RangeNotSatisfiable :\n case ChannelClosed :\n case BlobUpdateNotAllowed :\n Assert.assertFalse(RouterUtils.isSystemHealthError(new RouterException(\"\", errorCode)));\n break;\n default :\n Assert.assertTrue(RouterUtils.isSystemHealthError(new RouterException(\"\", errorCode)));\n break;\n }\n }\n Assert.assertTrue(RouterUtils.isSystemHealthError(new Exception()));\n Assert.assertFalse(RouterUtils.isSystemHealthError(Utils.convertToClientTerminationException(new Exception())));\n }", "public static\n void hookSystemOutputStreams() {\n out();\n err();\n }", "public void error(Exception e);", "String responseErrorsToString(MovilizerResponse response);", "public List<ApiError> getErrors() {\n return errors;\n }", "private void writeErrorData(ComponentError error)\n throws TechnicalException\n {\n Sequence sequence = error.getSequence();\n XdmValue userdata = SaxonHelper.toXdmValue(sequence);\n if ( userdata != null ) {\n CalabashHelper.writeTo(myPipe, ERROR, userdata, myProcs);\n }\n }", "@Override\n\tpublic String getErrorPath() {\n\t\treturn null;\n\t}", "@ResponseBody\n @ExceptionHandler(Exception.class)\n @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)\n ErrorResponse<String> unexpectedExceptionHandler(Exception exception) {\n // todo : it would be wise to log the exception information here as well\n\n return new ErrorResponse<>(ErrorCodes.UNEXPECTED_EXCEPTION.getCode());\n }", "@Override\n public Response toResponse(Exception e) {\n\n\n ResponseEntity<Exception> re = new ResponseEntity<>(e, HttpStatus.INTERNAL_SERVER_ERROR);\n logger.error(\"errorResponse\", e); // logging stack trace.\n\n return this.errorResponse(HttpStatus.INTERNAL_SERVER_ERROR.value(), re, e);\n }", "String toJson() throws IOException;", "private void sendOldError(Exception e) {\n }", "java.lang.String getError();", "java.lang.String getError();" ]
[ "0.55262834", "0.54279536", "0.5326282", "0.52695954", "0.52012616", "0.5196195", "0.517119", "0.5162727", "0.5161481", "0.508816", "0.5037671", "0.5015347", "0.5004323", "0.4996523", "0.49708462", "0.49693108", "0.49635765", "0.49322423", "0.4922331", "0.48972917", "0.48781583", "0.48774642", "0.48710385", "0.4869185", "0.48168507", "0.48128277", "0.48010144", "0.47864512", "0.4778114", "0.4778101", "0.47712862", "0.4759937", "0.47587046", "0.47586387", "0.47487658", "0.4740679", "0.47358075", "0.47346807", "0.4718392", "0.47131032", "0.4708329", "0.46937162", "0.4680265", "0.46787253", "0.46749634", "0.46693116", "0.46669218", "0.466597", "0.46641344", "0.4660821", "0.46557784", "0.46533826", "0.46532688", "0.46470445", "0.46400392", "0.46364397", "0.463538", "0.4613727", "0.46073", "0.4605621", "0.4592045", "0.4590434", "0.4590434", "0.45885012", "0.4586922", "0.45818168", "0.4577534", "0.4573035", "0.45632598", "0.45624337", "0.45522618", "0.45513326", "0.45472988", "0.45444888", "0.45430994", "0.45390365", "0.45221096", "0.45202017", "0.4517598", "0.45094946", "0.45085812", "0.45073324", "0.45063677", "0.44912794", "0.44812977", "0.44801322", "0.44780663", "0.44735333", "0.44727185", "0.4465196", "0.44644642", "0.44643015", "0.4461346", "0.44511387", "0.4449182", "0.44419986", "0.4439893", "0.4439297", "0.44249597", "0.44249597" ]
0.83869123
0
No UI update is alowwed in onether Thread so use runOnUiThread()
private void updateUI() { runOnUiThread(new Runnable() { @Override public void run() { if(timer_count==5) { //Animation Starts by Singing Si animateReceiveMoney(); animateSendMoney(); PlayIntoSound(siID); tvSiOut.setVisibility(View.VISIBLE); tvSiIn.setVisibility(View.VISIBLE); tvDoIn.setVisibility(View.VISIBLE); tvDoOut.setVisibility(View.VISIBLE); tvSIDO.setVisibility(View.VISIBLE); tvSIDO.setText("SI"); } else if(timer_count==20){ //Animation Ends by Singing Do PlayIntoSound(doID); //dISPLAY DO TEXT tvSIDO.setText("SIDO"); } else if(timer_count==25){ //DISPLAY mONEY TRANSFER TEXT tvMoneyTransfer.setVisibility(View.VISIBLE); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void runOnUiThread(Runnable r) {\n }", "private void m50364C() {\n m50412n().runOnUiThread(new C11092g(this));\n }", "public abstract void runOnUiThread(Runnable runnable);", "@Override\n\tpublic void runOnUiThread( final Runnable action ) {\n\t\tif ( mContext != null ) ( (Activity) mContext ).runOnUiThread( action );\n\t}", "protected void updateUI() {\n this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n xWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro X:\\n\"\n + mWakeupUncalibratedGyroData[0]);\n yWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro Y:\\n\"\n + mWakeupUncalibratedGyroData[1]);\n zWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro Z:\\n\"\n + mWakeupUncalibratedGyroData[2]);\n }\n });\n }", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tupdateUI();\n\t\t\t\t\t\t}", "@Override\n public void run() {\n BookInfo.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mSwipyRefreshLayout.setRefreshing(false);\n }\n });\n }", "@Override\n public void run()\n {\n\n runOnUiThread(new Runnable()\n {\n @Override\n public void run()\n {\n if(bShift)\n if(iconShift!=null)iconShift.setBackgroundResource(R.drawable.shifting);\n else\n if(iconShift!=null)iconShift.setBackgroundResource(R.drawable.shift);\n\n //\n //Check combination status\n if(bOrdering)\n {\n\n if(!menuInitd)\n {\n Thread t = new Thread(new Runnable()\n {\n @Override\n public void run()\n {\n bInternet = getConnectionStatus();\n }\n });\n menuInitd = true;\n }\n\n //Check internet status\n if(bInternet)\n {\n if(iconInternet!=null)iconInternet.setBackgroundResource(R.drawable.internet);\n if(iconInput!=null)iconInput.setBackgroundResource(R.drawable.input);//tell user to input order\n //txtNotif.setText(\"<Empty>\");\n }\n else\n {\n if(iconInput!=null)iconInput.setBackgroundResource(R.drawable.no_input);//no internet - input would be kinda useless - for now\n if(iconInternet!=null)iconInternet.setBackgroundResource(R.drawable.no_internet);\n }\n\n //Set status\n switch(item.getRecStat())\n {\n case 0:\n if(iconStatus!=null)iconStatus.setBackgroundResource(R.drawable.exclaim);\n break;\n case 1:\n if(iconStatus!=null)iconStatus.setBackgroundResource(R.drawable.pending);\n break;\n case 2:\n if(iconStatus!=null)iconStatus.setBackgroundResource(R.drawable.ready);\n break;\n case 3:\n if(iconStatus!=null)iconStatus.setBackgroundResource(R.drawable.cancelled);\n break;\n default:\n if(iconStatus!=null)iconStatus.setBackgroundResource(R.drawable.question);\n break;\n }\n }\n else\n {\n //Reset icons\n if(txtNotif!=null)txtNotif.setText(\"\");\n if(iconInput!=null)iconInput.setBackgroundResource(R.drawable.rad);\n if(iconInternet!=null)iconInternet.setBackgroundResource(R.color.black);\n if(iconStatus!=null)iconStatus.setBackgroundResource(R.color.black);\n }\n }\n });\n }", "public void runOnUiThread(Runnable action) {\n h.post(action);\n }", "@Override\n public void run() {\n new Handler(Looper.getMainLooper()).post(new Runnable() {\n @Override\n public void run() {\n Log.d(\"UI thread\", \"I am the UI thread\");\n Log.i(TAG,\"Make Call: \"+selGroup);\n makeCall();\n }\n });\n /*\n MainActivity.this.myView.post(new Runnable() {\n public void run() {\n Log.d(\"UI thread\", \"I am the UI thread\");\n Log.i(TAG,\"Make Call: \"+selGroup);\n makeCall();\n }\n });\n */\n }", "@Override\n public void run() {\n Message uiMSG;\n //Create message with only SHOW_ORIGINAL_COLOR argument\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_ORIGINAL_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Send start message to UI thread\n\n fillProgressbar(progressBar); //Fill progress bar as a long time operation\n //Message with information SHOW_NEW_COLOR as a end of long time operation\n uiMSG = BackgroundThread.this.uiHandler.obtainMessage(BidirectionalMessageActivity.SHOW_NEW_COLOR, 0, 0, null);\n BackgroundThread.this.uiHandler.sendMessage(uiMSG); //Message with end result is sent\n }", "@Override\n public void run() {\n updateInstanceFields();\n updateUI();\n /* and here comes the \"trick\" */\n updateHandler.postDelayed(this, 100);\n }", "public static void checkUiThread() {\n if(Looper.getMainLooper() != Looper.myLooper()) {\n throw new IllegalStateException(\"Must be called from the Main Thread. Current Thread was :\"+ Thread.currentThread());\n }\n }", "@Override\n public void run() {\n mHandler.post(new Runnable() {\n\n @Override\n public void run() {\n // display toast\n locationupdate();\n }\n\n });\n }", "@Override\n public void call(Object... args) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n //edit.setText(\"Success!!!!!\");\n Toast.makeText(getApplicationContext(),\"Success send Test \",Toast.LENGTH_LONG).show();\n }\n });\n }", "private void TimerMethod() {\n this.runOnUiThread(Timer_Tick);\n }", "public void showProgress2(){\n// if (mHandler==null){\n// mHandler = new Handler(Looper.getMainLooper());\n// }\n new Handler(Looper.getMainLooper()).post(new Runnable() {\n @Override\n public void run() {\n loadingDialog = new Dialog(BaseActivity.this);\n loadingDialog.setTitle(\"Loading data..\");\n loadingDialog.setContentView(R.layout.loading);\n loadingDialog.show();\n\n }\n });\n// mHandler.post(new Runnable() {\n// @Override\n// public void run() {\n// loadingDialog = new Dialog(BaseActivity.this);\n// loadingDialog.setTitle(\"Loading data..\");\n// loadingDialog.setContentView(R.layout.loading);\n// loadingDialog.show();\n//\n// }\n// });\n }", "private void updateUI() {\n handler_.post(new Runnable() {\n public void run() {\n bar_.setProgress(time_);\n String remTimeStr = \"\" + (maxTime_ - time_);\n timeRemaining_.setText(REM_STRING.replace(\"?\", remTimeStr));\n }\n });\n }", "public void run() {\n handler.post(new Runnable() {\r\n public void run() {\r\n // Toast.makeText(getApplicationContext(), \"driver view refresh\", Toast.LENGTH_SHORT).show();\r\n \t\t\r\n\t\t\tarraylist_destination.clear();\r\n\t\t\tarraylist_driverid.clear();\r\n\t\t\tarraylist_riderid.clear();\r\n\t\t\tarraylist_drivername.clear();\r\n\t\t\tarraylist_pickuptime.clear();\r\n\t\t\tarraylist_tripid.clear();\r\n\t\t\tarraylist_driver_image.clear();\r\n\t\t\tarraylist_rider_image.clear();\r\n\t\t\tarraylist_distance.clear();\r\n\t\t\tarraylist_requesttype.clear();\r\n\t\t\tarraylist_start.clear();\r\n\t\t\tarraylist_actualfare.clear();\r\n\t\t\tarraylist_suggestion.clear();\r\n\t\t\tarraylist_eta.clear();\r\n\t\t\tarraylist_driverrating.clear();\r\n\t\t\tarraylist_status.clear();\r\n\t\t\tarraylist_vehicle_color.clear();\r\n\t\t\tarraylist_vehicle_type.clear();\r\n\t\t\tarraylist_vehicle_name.clear();\r\n\t\t\tarraylist_vehicle_img.clear();\r\n\t\t\tarraylist_vehicle_year.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(Utility.isConnectingToInternet(RiderQueue_Activity.this))\r\n \t \t{\r\n \t\t\t\t/**call pending request for rider queue class**/\r\n\t\t\t\tnew httpPendingRequest_riderqueue().execute(); \r\n \t \t\t}\r\n \t \telse{\r\n \t \t\tUtility.alertMessage(RiderQueue_Activity.this,\"error in internet connection\");\r\n \t \t}\r\n\t\t \r\n }\r\n });\r\n }", "private void initUI() {\n setContentView(R.layout.activity_launcher);\r\n new Thread() {\r\n @Override\r\n public void run() {\r\n // TODO Auto-generated method stub\r\n long time1 = System.currentTimeMillis();\r\n long time2 = 0;\r\n while (true) {\r\n if (BaseApplication.getInstance().isShelfDataLoadOver) {\r\n time2 = System.currentTimeMillis();\r\n break;\r\n }\r\n }\r\n long timeDis = time2 - time1;\r\n if (timeDis < 3500) {\r\n try {\r\n Thread.sleep(3500 - timeDis);\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n\r\n LauncherActivity.this.runOnUiThread(new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n // TODO Auto-generated method stub\r\n startBookMain();\r\n }\r\n });\r\n\r\n }\r\n }.start();\r\n }", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tif(e.getMessage()!=null) Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "@Override\n public void onClick(View v) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n doClickOnButton();\n }\n });\n }", "public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n TextView tdate=(TextView)findViewById(R.id.textview_time);\n long date=System.currentTimeMillis();\n SimpleDateFormat sdf=new SimpleDateFormat(\"hh-mm a\");\n String dateString=sdf.format(date);\n tdate.setText(dateString);\n }\n });\n }", "public void tongOnUI(final String msg) {\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t}", "public void runOnUiThread(Runnable action) {\n synchronized(action) {\n mActivity.runOnUiThread(action);\n try {\n action.wait();\n } catch (InterruptedException e) {\n Log.v(TAG, \"waiting for action running on UI thread is interrupted: \" +\n e.toString());\n }\n }\n }", "private void updateUI() {\n// if (mCurrentLocation != null) {\n// mLatitudeTextView.setText(String.valueOf(mCurrentLocation.getLatitude()));\n// mLongitudeTextView.setText(String.valueOf(mCurrentLocation.getLongitude()));\n// mLastUpdateTimeTextView.setText(mLastUpdateTime);\n// }\n }", "public void run() {\n runOnUiThread(new Runnable() {\n\n public void run() {\n Resources res = getResources();\n final TypedArray myImages;\n\n if (desc.toLowerCase().contains(getString(R.string.clear_sky))) {\n myImages = res.obtainTypedArray(R.array.images_clear_sky);\n } else if (desc.toLowerCase().contains(getString(R.string.cloud))) {\n myImages = res.obtainTypedArray(R.array.images_cloudy);\n } else if (desc.toLowerCase().contains(getString(R.string.rain))) {\n myImages = res.obtainTypedArray(R.array.images_rain);\n } else if (desc.toLowerCase().contains(getString(R.string.snow))) {\n myImages = res.obtainTypedArray(R.array.images_snow);\n } else {\n myImages = res.obtainTypedArray(R.array.images);\n }\n final Random random = new Random();\n int randomInt = random.nextInt(myImages.length());\n\n // Generate the drawableID from the randomInt\n int drawableID = myImages.getResourceId(randomInt, -1);\n if (layout != null)\n layout.setBackgroundResource(drawableID);\n\n }\n });\n }", "private void updateUi(final BluetoothReader bluetoothReader) {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (bluetoothReader instanceof Acr3901us1Reader) {\n /* The connected reader is ACR3901U-S1 reader. */\n if (mEditMasterKey.getText().length() == 0) {\n mEditMasterKey.setText(DEFAULT_3901_MASTER_KEY);\n }\n if (mEditApdu.getText().length() == 0) {\n mEditApdu.setText(DEFAULT_3901_APDU_COMMAND);\n }\n if (mEditEscape.getText().length() == 0) {\n mEditEscape.setText(DEFAULT_3901_ESCAPE_COMMAND);\n }\n mClear.setEnabled(true);\n mAuthentication.setEnabled(true);\n mStartPolling.setEnabled(false);\n mStopPolling.setEnabled(false);\n btn_connect.setEnabled(true);\n// mPowerOn.setEnabled(true);\n// mPowerOff.setEnabled(true);\n mTransmitApdu.setEnabled(true);\n mTransmitEscape.setEnabled(true);\n// mGetDeviceInfo.setEnabled(true);\n// mGetBatteryLevel.setEnabled(false);\n// mGetBatteryStatus.setEnabled(true);\n// mGetCardStatus.setEnabled(true);\n// mSetTxPower.setEnabled(false);\n mEditMasterKey.setEnabled(true);\n mEditApdu.setEnabled(true);\n mEditEscape.setEnabled(true);\n } else if (bluetoothReader instanceof Acr1255uj1Reader) {\n /* The connected reader is ACR1255U-J1 reader. */\n if (mEditMasterKey.getText().length() == 0) {\n try {\n mEditMasterKey.setText(Utils\n .toHexString(DEFAULT_1255_MASTER_KEY\n .getBytes(\"UTF-8\")));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }\n if (mEditApdu.getText().length() == 0) {\n mEditApdu.setText(DEFAULT_1255_APDU_COMMAND);\n }\n if (mEditEscape.getText().length() == 0) {\n mEditEscape.setText(DEFAULT_1255_ESCAPE_COMMAND);\n }\n mClear.setEnabled(true);\n mAuthentication.setEnabled(true);\n mStartPolling.setEnabled(true);\n mStopPolling.setEnabled(true);\n btn_connect.setEnabled(false);\n// mPowerOn.setEnabled(true);\n// mPowerOff.setEnabled(true);\n mTransmitApdu.setEnabled(true);\n mTransmitEscape.setEnabled(true);\n// mGetDeviceInfo.setEnabled(true);\n// mGetBatteryLevel.setEnabled(true);\n// mGetBatteryStatus.setEnabled(false);\n// mGetCardStatus.setEnabled(true);\n// mSetTxPower.setEnabled(true);\n mEditMasterKey.setEnabled(true);\n mEditApdu.setEnabled(true);\n mEditEscape.setEnabled(true);\n } else {\n mEditApdu.setText(R.string.noData);\n mEditEscape.setText(R.string.noData);\n mClear.setEnabled(true);\n mAuthentication.setEnabled(false);\n mStartPolling.setEnabled(false);\n mStopPolling.setEnabled(false);\n btn_connect.setEnabled(true);\n// mPowerOn.setEnabled(false);\n// mPowerOff.setEnabled(false);\n mTransmitApdu.setEnabled(false);\n mTransmitEscape.setEnabled(false);\n// mGetDeviceInfo.setEnabled(false);\n// mGetBatteryLevel.setEnabled(false);\n// mGetBatteryStatus.setEnabled(false);\n// mGetCardStatus.setEnabled(false);\n// mSetTxPower.setEnabled(false);\n mEditMasterKey.setEnabled(false);\n mEditApdu.setEnabled(false);\n mEditEscape.setEnabled(false);\n }\n }\n });\n }", "public void tingOnUI(final String msg) {\r\n\r\n\t\trunOnUiThread(new Runnable() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(SmartActivity.this, msg, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}", "public void run() {\n\t\t\twhile (true) {\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tThread.sleep(500L);\n\t\t\t\t\t// Thread.sleep(30);\n\t\t\t\t\trunOnUiThread(done);\n\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // This code will always run on the UI thread, therefore is safe to modify UI elements.\n if (isDrugSearch) {\n SetSearchDrugAdapter(searchText, viewIDModel);\n } else {\n SetSearchDrugManufacturerAdapter(searchText, viewIDModel);\n }\n\n }\n });\n }", "private void runThread(String msg) {\n\n new Thread() {\n public void run() {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n ((TextView)findViewById(R.id.Resultext)).setText(msg);\n }\n });\n\n }\n }.start();\n }", "@Override\n protected void onProgressUpdate(String... values) {\n setUiDuringBackgroundTask(values[0]);\n }", "@Override\n protected void onProgressUpdate(String... values) {\n setUiDuringBackgroundTask(values[0]);\n }", "public void run() {\n runOnUiThread(new Runnable() {\n public void run() {\n imageSwitcher.setImageResource(gallery[position]);\n position++;\n if (position == 8) {\n position = 0;\n }\n }\n });\n }", "public void run() {\n handler.post(new Runnable() {\n public void run() {\n\n //TODO CALL NOTIFICATION FUNC\n String lg_ti = \"Test.\";\n String des_ti = \"The license valid until \";\n String ban_ti = \"Warning!\";\n getNotificationData();\n //notificationShow(des_ti,lg_ti,ban_ti);\n }\n });\n }", "public void loadingGet(final View v){\n int max = 100;\n progressBar = new ProgressDialog(v.getContext());\n progressBar.setCancelable(false);\n progressBar.setMessage(\"In Progress ...\");\n progressBar.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progressBar.setMax(max);\n for (int i = 0; i <= max; i++) {\n progressBar.setProgress(i);\n if (i == max ){\n progressBar.dismiss();\n }\n progressBar.show();\n }\n // Create a Handler instance on the main thread\n final Handler handler = new Handler();\n\n // Create and start a new Thread\n new Thread(new Runnable() {\n public void run() {\n try{\n getRemittanceOIC();\n Thread.sleep(10000);\n }\n catch (Exception e) { } // Just catch the InterruptedException\n\n handler.post(new Runnable() {\n public void run() {\n progressBar.dismiss();\n final AlertDialog.Builder builder =\n new AlertDialog.Builder(Remittancetooic.this);\n builder.setTitle(\"Information confirmation\")\n .setMessage(\"Data has been successfully updated, thank you.\")\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n recreate();\n dialog.dismiss();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n // Create the AlertDialog object and show it\n builder.create();\n builder.setCancelable(false);\n builder.show();\n }\n });\n }\n }).start();\n }", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "public void run()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(mAPICallManager.getTasksCount()==0) showActionBarProgress(false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// toast\n\t\t\t\t\t\t\tToast.makeText(getActivity(), R.string.global_server_fail_toast, Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}", "private void timerMethod() {\n getActivity().runOnUiThread(refreshListView);\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\tSystem.out.println(\"updateThread\");\r\n\t\t\thandler.postDelayed(updateThread, 3000);\r\n\t\t}", "public void run() {\n Toast.makeText(context, toast, Toast.LENGTH_SHORT).show(); // toast for whatever reason\n }", "@Override\n \t public void run() {\n \t while (true) {\n \t try {\n \t Thread.sleep(3000);\n \t mHandler.post(new Runnable() {\n\n \t @Override\n \t public void run() {\n \t // TODO Auto-generated method stub\n \t // Write your code here to update the UI.\n \t \tGetMessageUnreadFunc();\n \t }\n \t });\n \t } catch (Exception e) {\n \t // TODO: handle exception\n \t }\n \t }\n \t }", "public void startThread(View view) {\n //startNormalThread();\n startRunnableThread();\n }", "@Override\n\tpublic void run() {\n\t\t((Activity)context).runOnUiThread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tString string = context.getString(R.string.message_timer, MainActivity.TIMER_TASK_PERIOD / 1000);\n\t\t\t\tToast.makeText(context, string, Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void onClick(View v) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n doClickOnButtonOk();\n }\n });\n }", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\thandler.post(updateThread);\r\n\t\t\t}", "public void run() {\n\t\t\t\t\tmHandler.post(new Runnable() {\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\tprogressbar.setProgress(Integer\r\n\t\t\t\t\t\t\t\t\t.parseInt(tvsp.progress));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartThread();\n\t\t\t Toast.makeText(getContext(), \"Êղسɹ¦\", 1).show();\n\t\t\t}", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void onClick(View v) {\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n clientThread.sendMessage(\"Que\");\n }\n });\n\n\n// new Thread(new ClientSend()).start();\n\n }", "@Override\n public void onClick(View v) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n doClickOnButton2();\n }\n });\n }", "private void updateUI() {\n\t\t\tfinal TextView MessageVitesse = (TextView) findViewById(R.id.TextView01);\r\n\t\t\tfinal ProgressBar Progress = (ProgressBar) findViewById (R.id.ProgressBar01);\r\n\t\t\tfinal TextView MessageStatus = (TextView)findViewById (R.id.TextView02);\r\n\t\t\t\t\t\r\n\t\t\t//on affecte des valeurs aux composant\r\n\t\t\tMessageVitesse.setText(\"Vitesse Actuelle : \"+ Vitesse + \" Ko/s\");\r\n\t\t\tProgress.setProgress(Pourcent);\r\n\t\t\tMessageStatus.setText (Status);\r\n\t\t\tif (Status.equals(\"Télèchargement terminé!!!\")&&NotifDejaLancée==false){\r\n\t\t\t\tlanceNotification();\r\n\t\t\t\tNotifDejaLancée=true;\r\n\t\t\t}\r\n\t\t\t}", "@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\twhile (true) {\r\n\t\t\t\t\t\t\t\tif (HomeView.ble_status == 0\r\n\t\t\t\t\t\t\t\t\t\t|| HomeView.ble_status == 1\r\n\t\t\t\t\t\t\t\t\t\t|| HomeView.ble_status == 2) {\r\n\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tscanLeDevice(true);\r\n\t\t\t\t\t\t\t\t\t\tbluetoothSwitch = true;\r\n\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\twait_time++;\r\n\t\t\t\t\t\t\t\tif (wait_time > 5) {\r\n\t\t\t\t\t\t\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\tprogress.dismiss();\r\n\t\t\t\t\t\t\t\t\t\t\twait_time = 0;\r\n\t\t\t\t\t\t\t\t\t\t\tbluetoothSwitch = false;\r\n\t\t\t\t\t\t\t\t\t\t\tsetUI();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t}", "@Override\n public void run() {\n setToast(\"연결이 종료되었습니다.\");\n }", "@Override\n public void run() {\n setToast(\"연결이 종료되었습니다.\");\n }", "private void initialiseView() {\n \tnoTasksMessageView = (TextView)findViewById(R.id.noTasksRunning);\r\n \ttaskKillWarningView = (TextView)findViewById(R.id.progressStatusMessage);\r\n\r\n \tIterator<Progress> jobsIterator = JobManager.iterator();\r\n \twhile (jobsIterator.hasNext()) {\r\n \t\tProgress job = jobsIterator.next();\r\n \t\tfindOrCreateUIControl(job);\r\n \t}\r\n\r\n // allow call back and continuation in the ui thread after JSword has been initialised\r\n \tfinal Handler uiHandler = new Handler();\r\n \tfinal Runnable uiUpdaterRunnable = new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n \t\t\tProgress prog = progressNotificationQueue.poll();\r\n \t\t\tif (prog!=null) {\r\n \t\t\t\tupdateProgress(prog);\r\n \t\t\t}\r\n\t\t\t}\r\n };\r\n\r\n // listen for Progress changes and call the above Runnable to update the ui\r\n\t\tworkListener = new WorkListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void workProgressed(WorkEvent ev) {\r\n\t\t\t\tcallUiThreadUpdateHandler(ev);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void workStateChanged(WorkEvent ev) {\r\n\t\t\t\tcallUiThreadUpdateHandler(ev);\r\n\t\t\t}\r\n\t\t\tprivate void callUiThreadUpdateHandler(WorkEvent ev) {\r\n\t\t\t\tProgress prog = ev.getJob();\r\n\t\t\t\tprogressNotificationQueue.offer(prog);\r\n \t\t\t// switch back to ui thread to continue\r\n \t\t\tuiHandler.post(uiUpdaterRunnable);\r\n\t\t\t}\r\n\t\t};\r\n\t\tJobManager.addWorkListener(workListener);\r\n\r\n\t\t// give new jobs a chance to start then show 'No Job' msg if nothing running\r\n\t\tuiHandler.postDelayed(\r\n\t\t\tnew Runnable() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tif (!JobManager.iterator().hasNext()) {\r\n\t\t\t\t\t\tshowNoTaskMsg(true);\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, 4000);\r\n }", "private void startThreaderPreLoaderForNearBy()\r\n\t{\r\n\t\ttry \r\n\t\t{\t\t\t\r\n\t\t\tloaderForNrearBy = new ThreadPreLoaderForNearBy();\r\n\t\t\tloaderForNrearBy.execute();\r\n\t\t} \r\n\t\tcatch (Exception e) \r\n\t\t{\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\thandlerForNearBy = new Handler() \r\n\t\t{\t\t\r\n\r\n\t\t\tpublic void handleMessage(Message msg) \r\n\t\t\t{\t\t\t\t\r\n\t\t\t\tif (whichmsg == -1) \r\n\t\t\t\t{\r\n\t\t\t\t\t//ShowAlert(\"Please check your net\");\r\n\t\t\t\t\tsetRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);\r\n\t\t\t\t} \r\n\t\t\t\telse if (whichmsg == 2) \r\n\t\t\t\t{\r\n\t\t\t\t\tif(mDialogForNearBy != null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmDialogForNearBy.dismiss();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsetRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR);\r\n\t\t\t\t\tif(listOfClosestRoute != null)\r\n\t\t\t\t\t{\t\t\t\r\n\t\t\t\t\t\tadapterForNearBy = new ListAdapterForClosestRoute(getParent() , listOfClosestRoute);\r\n\t\t\t\t\t\tadapterForNearBy.notifyDataSetChanged();\r\n\t\t\t\t\t\tlistView.setAdapter(adapterForNearBy);\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\trel_no_fav.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\ttextV_notice.setText(\"No nearby route\");\r\n\t\t\t\t\t\t/*\t\tif(rel_no_fav.getChildAt(1) == null)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tbtn = new Button(getParent());\r\n\t\t\t\t\t\t\tbtn.setText(\"Try Again\");\r\n\t\t\t\t\t\t\tLinearLayout.LayoutParams layoutParam =new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT , LayoutParams.WRAP_CONTENT);\r\n\t\t\t\t\t\t\tlayoutParam.topMargin = 20;\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tbtn.setGravity(Gravity.CENTER);\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tbtn.setLayoutParams(layoutParam);\r\n\t\t\t\t\t\t\trel_no_fav.addView(btn);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbtn.setOnClickListener(new OnClickListener() \r\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onClick(View v) \r\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tnearbyRoutes();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});*/\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\r\n\r\n\t\t\t}\r\n\t\t};\r\n\t}", "@Override \n\t\tpublic void run() {\n\t\t\trunOnUiThread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tIGPSService gpsService = gpsServiceConnection.getServiceIfBound();\n\t\t\t \tif (gpsService != null) {\n\t\t\t \t\ttry {\n\t\t\t \t\t\tmLastSuccess.setText(gpsService.getLastSuccessfulRequest());\n\t\t\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\t\t\tLog.d(LocationUtils.APPTAG, e.getLocalizedMessage());\n\t\t\t\t\t\t}\n\t\t\t \t}\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public void run() {\n\n\t\t\t\t\t\tif (adapter == null) {\n\t\t\t\t\t\t\tadapter = new MyAdapter();\n\t\t\t\t\t\t\tlistview.setAdapter(adapter);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlayout.setVisibility(View.INVISIBLE);\n\n\t\t\t\t\t}", "public void infoProgressOn (){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (tabTourInfoBinding.tourInfoProgress.getVisibility() != View.VISIBLE) {\n tabTourInfoBinding.tourInfoProgress.setVisibility(View.VISIBLE);\n }\n if (tabTourInfoBinding.tourInfoLayout.getVisibility() != View.GONE) {\n tabTourInfoBinding.tourInfoLayout.setVisibility(View.GONE);\n }\n }\n });\n }", "private void updateUI() {\n if (mCurrentLocation != null) {\n mLatitudeTextView.setText(String.valueOf(mCurrentLocation.getLatitude()));\n mLongitudeTextView.setText(String.valueOf(mCurrentLocation.getLongitude()));\n mLastUpdateTimeTextView.setText(mLastUpdateTime);\n\n localLatitude = Double.parseDouble(mLatitudeTextView.getText().toString());\n localLongtitude = Double.parseDouble(mLongitudeTextView.getText().toString());\n double newDistance = Math.round(gps2m(previousLatitude, previousLongitude, localLatitude, localLongtitude) * 100) / 100.0;\n\n /*\n if (!mStartUpdatesButton.isEnabled()) {\n mMoveTextView.setText(String.valueOf(newDistance) + \" m\");\n totalDistance += newDistance;\n\n mTotalDistanceTextView.setText(String.valueOf(totalDistance) + \"m\");\n }\n previousLatitude = localLatitude != 0 ? localLatitude : previousLongitude;\n previousLongitude = localLongtitude != 0 ? localLongtitude : previousLatitude;\n\n\n if (!mStartUpdatesButton.isEnabled()) {\n double speed = Double.parseDouble(timeToSpeed());\n\n timeslots.add(System.currentTimeMillis());\n userspeeds.add((float) speed);\n float randomspeed = (float)Math.random()*6;\n compspeeds.add(randomspeed);\n mSpeedTextView.setText(String.valueOf(speed) + \"km/h\");\n\n //TODO: change weight\n double calValue = calorieCalculator(weight, timeSingleValue / 3600, speed);\n calValue = Math.round(calValue * 100) / 100;\n calValue = calValue < 0 ? 0 : calValue;\n calValue = calValue > 100 ? 100 : calValue;\n calValue = calValue / 1000;\n mCalTextView.setText(String.valueOf(calValue));\n compDistance += 5*randomspeed/3600*1000;\n int predictedCalories = (int) Math.round((calValue / timeSingleValue)) * 3600;\n mCalPredictTextView.setText(String.valueOf(predictedCalories));\n\n\n if (compDistance > totalDistance) {\n if (status == 0 || status == 1) {\n MediaPlayer mediaPlayer1 = MediaPlayer.create(getApplicationContext(), R.raw.tooslow);\n mediaPlayer1.start();\n status = 2;\n }\n } else {\n if (status == 0 || status == 2) {\n MediaPlayer mediaPlayer2 = MediaPlayer.create(getApplicationContext(), R.raw.toofast);\n mediaPlayer2.start();\n status = 1;\n }\n }\n }\n */\n if (!mStartUpdatesButton.isEnabled()) {\n mMoveTextView.setText(String.valueOf(newDistance) + \" m\");\n totalDistance += newDistance;\n double totalDistanceOutput = Math.round(totalDistance * 100) / 100.0;\n totalDistanceOutput = totalDistanceOutput < 0 ? 0 : totalDistanceOutput;\n mTotalDistanceTextView.setText(String.valueOf(totalDistanceOutput) + \"m\");\n }\n previousLatitude = localLatitude != 0 ? localLatitude : previousLongitude;\n previousLongitude = localLongtitude != 0 ? localLongtitude : previousLatitude;\n if (!mStartUpdatesButton.isEnabled()) {\n double speed = Double.parseDouble(timeToSpeed());\n timeslots.add(System.currentTimeMillis());\n userspeeds.add((float) speed);\n float randomspeed = (float) Math.random() * 2;\n compspeeds.add(randomspeed);\n mSpeedTextView.setText(String.valueOf(speed) + \" km/h\");\n double calValue = calorieCalculator(weight, timeSingleValue / 3600, speed);\n calValue = calValue < 0 ? 0 : calValue;\n calValue = calValue > 100 ? 100 : calValue;\n calValue = calValue / 1000.0 * 60;\n calValue = Math.round(calValue * 100) / 100.0;\n mCalTextView.setText(String.valueOf(calValue) + \" kCal/m\");\n compDistance += 5 * randomspeed / 3600 * 1000;\n double predictedCalories = (calValue / timeSingleValue) * 60;\n predictedCalories = (predictedCalories < 0 || predictedCalories > 100000) ? 0 : predictedCalories;\n mCalPredictTextView.setText(\"~ \" + String.valueOf(predictedCalories) + \" kCal\");\n\n if (compDistance > totalDistance) {\n if (status == 0 || status == 1) {\n MediaPlayer mediaPlayer1 = MediaPlayer.create(getApplicationContext(), R.raw.tooslow);\n mediaPlayer1.start();\n status = 2;\n }\n } else {\n if (status == 0 || status == 2) {\n MediaPlayer mediaPlayer2 = MediaPlayer.create(getApplicationContext(), R.raw.toofast);\n mediaPlayer2.start();\n status = 1;\n }\n }\n }\n }\n }", "private void loadHumonInfo() {\n\n\n this.runOnUiThread(new Runnable() {\n public void run() {\n\n //load all text data\n TextView tempTextView = (TextView) findViewById(R.id.humonNameTextView);\n tempTextView.setText(humon.getName());\n tempTextView = (TextView) findViewById(R.id.humonDescriptionTextView);\n tempTextView.setText(humon.getDescription());\n tempTextView = (TextView) findViewById(R.id.healthValue);\n tempTextView.setText(\"\" + humon.getHealth());\n tempTextView = (TextView) findViewById(R.id.attackValue);\n tempTextView.setText(\"\" + humon.getAttack());\n tempTextView = (TextView) findViewById(R.id.defenseValue);\n tempTextView.setText(\"\" + humon.getDefense());\n tempTextView = (TextView) findViewById(R.id.speedValue);\n tempTextView.setText(\"\" + humon.getSpeed());\n tempTextView = (TextView) findViewById(R.id.luckValue);\n tempTextView.setText(\"\" + humon.getLuck());\n\n //load moves into grid\n ArrayList<Move> humonMoves = humon.getMoves();\n moveList.clear();\n for(int i = 0; i < humonMoves.size(); i++) {\n moveList.add(humonMoves.get(i));\n }\n moveAdapter.notifyDataSetChanged();\n\n //load humon image\n if(humon.getImagePath() != null) {\n if(humon.getImagePath().length() != 0) {\n Bitmap humonImage = BitmapFactory.decodeFile(humon.getImagePath());\n ImageView humonImageView = (ImageView) findViewById(R.id.humonImageView);\n humonImageView.setImageBitmap(humonImage);\n }\n }\n\n }\n });\n\n }", "void successUiUpdater();", "public void run() {\n LinearLayout layout = (LinearLayout) mainActivity.findViewById(R.id.camera_view);\n LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT, 0f);\n for(int i=0; i<camera_ids.length; i++) {\n if(surfaceViews[i] == null) {\n TextView textView = new TextView(mainActivity.getBaseContext());\n textView.setTextSize(40);\n textView.setText(\"Failed Camera \" + camera_ids[i]);\n textView.setGravity(Gravity.CENTER);\n layout.addView(textView, params);\n continue;\n }\n layout.addView(surfaceViews[i], params);\n }\n if(layout.getParent() != null) {\n ((ViewGroup)layout.getParent()).removeView(layout); // <- fix\n }\n mainActivity.addContentView(layout, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));\n }", "public void updateUI(){}", "public void run() {\n while(true)\r\n {\r\n synchronized (this) {\r\n try {\r\n wait(milisecsToWait);\r\n\r\n runOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n if( !monitor_for_ingress_status )\r\n return;\r\n if (ingress_running_in_foreground()) {\r\n if (!overlayView.isVisible()) {\r\n overlayView.setVisible();\r\n overlayView.setText(\"HI!\\nIngress is running\");\r\n } else {\r\n /*\r\n Log.i(\"julin\", \"overlay es visible e ingress esta en fg\");\r\n */\r\n }\r\n } else {\r\n if (overlayView.isVisible()) {\r\n overlayView.setInvisible();\r\n overlayView.setText(\"HI!\\nIngress is NOT running\");\r\n } else {\r\n /*\r\n Log.i(\"julin\", \"overlay es invisible e ingress no esta en fg\");\r\n try {\r\n Intent intent = new Intent(Intent.ACTION_MAIN);\r\n intent.setClassName(\"com.nianticproject.ingress\", \"com.nianticproject.ingress.NemesisActivity\");\r\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n startActivity(intent);\r\n }catch (Exception e){\r\n Log.e(\"julin\", e.getMessage());\r\n }\r\n */\r\n }\r\n }\r\n }\r\n });\r\n handler.sendEmptyMessage(1);\r\n\r\n } catch (InterruptedException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n\r\n }", "@Override\n public void run() {\n \tBTstatusTextView.setText(s);\n \t\n \tif(s.equals(\"BT-Ready\") && !(poll.getVisibility() == View.VISIBLE)){\n \t\tLog.d(\"poll buttion\", \"setting visible\");\n \t//Ready to poll\n \t\tpoll.setVisibility(View.VISIBLE);\n \t\n }\n }", "private void updateUI() {\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - start\");\n\n btnBTScan.setEnabled(btAdapter.isEnabled() && !btAdapter.isDiscovering());\n\n if (btAdapter.isDiscovering())\n btnBTScan.setText(R.string.btn_bt_devices_scan_running_text);\n else\n btnBTScan.setText(R.string.btn_bt_devices_scan_text);\n tglBTToggle.setChecked(btAdapter.isEnabled());\n\n // remove all found (if any) devices when BT is disabled\n if (!btAdapter.isEnabled())\n lvAdapter.clear();\n\n if (lvAdapter.getCount() > 0)\n tvHeader.setText(R.string.tv_bt_devices_header_text_devices_found);\n else\n tvHeader.setText(R.string.tv_bt_devices_header_text_no_devices);\n\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - finish\");\n }", "@Override\n public void run() {\n receivedTextView6.setText(str5);\n receivedTextView5.setText(str4);\n receivedTextView4.setText(str3);\n receivedTextView3.setText(str2);\n receivedTextView2.setText(str1);\n receivedTextView1.setText(str0);\n }", "public void run() {\n\n if(progressDialog.isShowing()) {\n progressDialog.dismiss();\n }\n searchView.clearFocus();\n imageButtonBack.clearFocus();\n// getCurrentFocus().clearFocus();\n listStoryRecycle.setVisibility(View.VISIBLE);\n }", "public void mo10681a() {\n if (MultiPhotoFrameMainActivity.this._handler != null) {\n MultiPhotoFrameMainActivity.this._handler.post(new Runnable() {\n public void run() {\n C2331d.m10114a((Activity) MultiPhotoFrameMainActivity.this, C2328a.WAIT_PROCESSING, (Bundle) null);\n }\n });\n }\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}", "@Override\n public void run() {\n thread2Handler = new Handler(getLooper()){\n /**\n * Message coming from the other thread will be queued in the last\n * @param msg\n */\n @Override\n public void handleMessage(Message msg) {\n Bundle bundle = msg.getData();\n /**\n * Values coming from Other thread\n */\n Log.d(\"Message\",\"Message from UI thread is\"+bundle.getString(\"MSG2_FROM_UI\")+\"\");\n Log.d(\"Message\",\"Message from First thread is\"+msg.arg1+\"\");\n }\n };\n\n for (int i = 0; i <10; i++) {\n try {\n sleep(1000);\n Log.d(TAG, \"run: -->\"+i );\n\n /**\n * Sending Message from Thread1 to MainUi thread\n */\n Bundle bundle = new Bundle();\n bundle.putInt(\"j\",i);\n Message msg = new Message();\n msg.setData(bundle);\n handler.sendMessage(msg);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\tpostInvalidate();\r\n\t\t\t//postDelayed(this, SCROLLER_DISTANCE);\r\n\t\t}", "public void postOnUiThread(b bVar) {\n this.mUIHandler.post(bVar);\n }", "@Override\r\n public void updateUI() {\r\n }", "public void run() {\n\t\t\tfinal Bitmap mBitmap = getImage();\n\n\t\t\tPlayUpActivity.handler.post(new Runnable() {\n\t\t\t\tpublic void run() {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (!isBitmapCacheTask) {\n\n\t\t\t\t\t\t\tif (mBaseAdapters != null\n\t\t\t\t\t\t\t\t\t&& mBaseAdapters.containsKey(url)\n\t\t\t\t\t\t\t\t\t&& mBaseAdapters.get(url) != null\n\t\t\t\t\t\t\t\t\t&& mBaseAdapters.get(url).size() > 0) {\n\t\t\t\t\t\t\t\tif (mBitmap != null) {\n\t\t\t\t\t\t\t\t\tSet<BaseAdapter> baseAdapters = mBaseAdapters\n\t\t\t\t\t\t\t\t\t\t\t.get(url);\n\n\t\t\t\t\t\t\t\t\tfor (BaseAdapter ba : baseAdapters) {\n\n\t\t\t\t\t\t\t\t\t\tba.notifyDataSetChanged();\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif (mBaseAdapters != null) {\n\t\t\t\t\t\t\t\t\t\tmBaseAdapters.get(url).clear();\n\t\t\t\t\t\t\t\t\t\tmBaseAdapters.remove(url);\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (notify) {\n\t\t\t\t\t\t\t\tMessage msg = new Message();\n\t\t\t\t\t\t\t\tmsg.obj = \"updateImage\";\n\t\t\t\t\t\t\t\tPlayupLiveApplication\n\t\t\t\t\t\t\t\t\t\t.callUpdateOnFragmentsNotTopBar(msg);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (imageViews.get(url) != null\n\t\t\t\t\t\t\t\t\t&& imageViews.containsKey(url)\n\t\t\t\t\t\t\t\t\t&& imageViews.get(url) != null\n\t\t\t\t\t\t\t\t\t&& imageViews.get(url).size() > 0) {\n\n\t\t\t\t\t\t\t\ttry {\n\n\t\t\t\t\t\t\t\t\timgView = null;\n\n\t\t\t\t\t\t\t\t\tList<ImageView> iView = imageViews.get(url);\n\n\t\t\t\t\t\t\t\t\tfor (ImageView img : iView) {\n\t\t\t\t\t\t\t\t\t\timgView = img;\n\n\t\t\t\t\t\t\t\t\t\tif (imgView.getVisibility() == View.VISIBLE) {\n\t\t\t\t\t\t\t\t\t\t\timgView.setImageBitmap(mBitmap);\n\t\t\t\t\t\t\t\t\t\t\t// if (bgColor != null &&\n\t\t\t\t\t\t\t\t\t\t\t// bgColor.trim().length() > 0) {\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// Drawable d =\n\t\t\t\t\t\t\t\t\t\t\t// imgView.getDrawable();\n\t\t\t\t\t\t\t\t\t\t\t// if (d != null) {\n\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t// d.setAlpha(Integer.parseInt(\"88\",\n\t\t\t\t\t\t\t\t\t\t\t// 16));\n\t\t\t\t\t\t\t\t\t\t\t// d.setColorFilter(Color.parseColor(\"#\"+\n\t\t\t\t\t\t\t\t\t\t\t// bgColor),Mode.DST_OVER);\n\t\t\t\t\t\t\t\t\t\t\t// imgView.setBackgroundDrawable(d);\n\t\t\t\t\t\t\t\t\t\t\t// }\n\t\t\t\t\t\t\t\t\t\t\t// }\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\timgView = null;\n\t\t\t\t\t\t\t\t\tif (linearLayout != null) {\n\n\t\t\t\t\t\t\t\t\t\tif (imageDownloader != null) {\n\t\t\t\t\t\t\t\t\t\t\timageDownloader\n\t\t\t\t\t\t\t\t\t\t\t\t\t.nullViewDrawablesRecursive(linearLayout);\n\t\t\t\t\t\t\t\t\t\t\tlinearLayout = null;\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tif (imageDownloaderSports != null) {\n\t\t\t\t\t\t\t\t\t\t\timageDownloaderSports\n\t\t\t\t\t\t\t\t\t\t\t\t\t.nullViewDrawablesRecursive(linearLayout);\n\t\t\t\t\t\t\t\t\t\t\timageDownloaderSports = null;\n\t\t\t\t\t\t\t\t\t\t\tlinearLayout = null;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tlinearLayout = null;\n\n\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t//Logs.show(e);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (mBitmap != null) {\n\n\t\t\t\t\t\t\t\t\tif (imageViews != null) {\n\t\t\t\t\t\t\t\t\t\timageViews.get(url).clear();\n\t\t\t\t\t\t\t\t\t\timageViews.remove(url);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (views != null && views.get(url) != null\n\t\t\t\t\t\t\t\t&& views.get(url).size() > 0) {\n\n\t\t\t\t\t\t\tList<View> layoutViews = views.get(url);\n\n\t\t\t\t\t\t\tfor (View lin : layoutViews) {\n\n\t\t\t\t\t\t\t\tif (lin.getVisibility() == View.VISIBLE) {\n\n\t\t\t\t\t\t\t\t\tlinearLayout = lin;\n\n\t\t\t\t\t\t\t\t\tif (linearLayout instanceof LinearLayout) {\n\n\t\t\t\t\t\t\t\t\t\tdeSelectSports(linearLayout);\n\n\t\t\t\t\t\t\t\t\t\tImageView sportsImage = (ImageView) linearLayout\n\t\t\t\t\t\t\t\t\t\t\t\t.findViewById(R.id.mysportsItemImage);\n\n\t\t\t\t\t\t\t\t\t\tsportsImage.setTag(\"1\");\n\t\t\t\t\t\t\t\t\t\tsportsImage.setImageBitmap(mBitmap);\n\n\t\t\t\t\t\t\t\t\t\tsportsImage = null;\n\t\t\t\t\t\t\t\t\t\tlinearLayout = null;\n\n\t\t\t\t\t\t\t\t\t} else if (linearLayout instanceof RelativeLayout) {\n\n\t\t\t\t\t\t\t\t\t\tif (linearLayout.getVisibility() == View.VISIBLE) {\n\n\t\t\t\t\t\t\t\t\t\t\tif (mBitmap != null) {\n\n\t\t\t\t\t\t\t\t\t\t\t\tImageView imageWithSummaryImage = (ImageView) linearLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.findViewById(R.id.ImageWithSummaryImage);\n\n\t\t\t\t\t\t\t\t\t\t\t\timageWithSummaryImage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\t\t\t\timageWithSummaryImage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.setImageBitmap(mBitmap);\n\n\t\t\t\t\t\t\t\t\t\t\t\tif (linearLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getTag(R.id.active_users_no) != null\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& linearLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getTag(R.id.active_users_no)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.trim()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.length() > 0) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tString bgColor = linearLayout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getTag(R.id.active_users_no)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString();\n\n\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tDrawable d = new BitmapDrawable(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmBitmap);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (d != null) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (imageWithSummaryImage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getTag() != null\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t&& imageWithSummaryImage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getTag()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"show_dark\")) {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\td.setColorFilter(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tColor.parseColor(\"#\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ bgColor),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMode.DST_OVER);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// d.setAlpha(20);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Log.e(\"123\",\"inside after downloades bgcolor != null \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// + ((ImageView)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// linearLayout.findViewById(R.id.ImageWithSummaryImage)).getVisibility());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// d.setColorFilter(Color.parseColor(\"#77\"+\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// bgColor),Mode.DST_OVER);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\timageWithSummaryImage\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.setImageDrawable(d);\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\timageWithSummaryImage = null;\n\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tlinearLayout = null;\n\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (mBitmap != null) {\n\t\t\t\t\t\t\t\tif (views != null) {\n\t\t\t\t\t\t\t\t\tviews.get(url).clear();\n\t\t\t\t\t\t\t\t\tviews.remove(url);\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (requestImageUrls != null\n\t\t\t\t\t\t\t\t&& requestImageUrls.containsKey(url)) {\n\t\t\t\t\t\t\trequestImageUrls.remove(url);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tkey = null;\n\t\t\t\t\t\turl = null;\n\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t//Logs.show(e);\n\t\t\t\t\t} finally {\n\t\t\t\t\t\t// mBitmap.recycle();\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t});\n\n\t\t}", "@Override\n public void onThinking() {\n toast(\"Processing\");\n showDialog();\n }", "public void run() {\n\n progressBarLocation.setVisibility(View.VISIBLE);\n scrollView.setVisibility(View.INVISIBLE);\n if(userSession.isIsSwitchIsOn()) // check if switch was on\n {\n progressBarLocation.setVisibility(View.GONE);\n editTextFirstName.setText(userSession.getFirstName());\n editTextLastName.setText(userSession.getLastName());\n editTextCity.setText(userSession.getCityName()); // get info and set them in fields\n editTextState.setText(userSession.getState());\n editTextPhoneNumber.setText(userSession.getPhoneNumber());\n editTextStreetAddress.setText(userSession.getStreetAddress());\n editTextZIPCode.setText(userSession.getZipCode());\n saveAddressSwitch.setChecked(true);\n scrollView.setVisibility(View.VISIBLE);\n }\n else\n {\n scrollView.setVisibility(View.VISIBLE);\n progressBarLocation.setVisibility(View.GONE);\n saveAddressSwitch.setChecked(false);\n userSession.setFirstName(null);\n userSession.setLastName(null);\n userSession.setCityName(null); // set session values to null\n userSession.setState(null);\n userSession.setStreetAddress(null);\n userSession.setZipCode(null);\n userSession.setPhoneNumber(null);\n userSession.setIsSwitchIsOn(false);\n }\n\n }", "public void ativaThread() {\n\t\t\n\t\tmDialog = ProgressDialog.show(this, \"Buslocation\",\n\t\t\t\t\"Buscando coordenadas...\", false, false);\n\t\tmHandler = new Handler();\n\t\tmThread = new MinhaThread(1);\n\t\tmThread.start();\n\t}", "public void run() {\n\t\t\t\t\tif (_uiContainer.isDisposed()) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tsetStatusMessage(UI.EMPTY_STRING);\r\n\t\t\t\t}", "public void run() {\n TextView tempTextView = (TextView) findViewById(R.id.humonNameTextView);\n tempTextView.setText(humon.getName());\n tempTextView = (TextView) findViewById(R.id.humonDescriptionTextView);\n tempTextView.setText(humon.getDescription());\n tempTextView = (TextView) findViewById(R.id.healthValue);\n tempTextView.setText(\"\" + humon.getHealth());\n tempTextView = (TextView) findViewById(R.id.attackValue);\n tempTextView.setText(\"\" + humon.getAttack());\n tempTextView = (TextView) findViewById(R.id.defenseValue);\n tempTextView.setText(\"\" + humon.getDefense());\n tempTextView = (TextView) findViewById(R.id.speedValue);\n tempTextView.setText(\"\" + humon.getSpeed());\n tempTextView = (TextView) findViewById(R.id.luckValue);\n tempTextView.setText(\"\" + humon.getLuck());\n\n //load moves into grid\n ArrayList<Move> humonMoves = humon.getMoves();\n moveList.clear();\n for(int i = 0; i < humonMoves.size(); i++) {\n moveList.add(humonMoves.get(i));\n }\n moveAdapter.notifyDataSetChanged();\n\n //load humon image\n if(humon.getImagePath() != null) {\n if(humon.getImagePath().length() != 0) {\n Bitmap humonImage = BitmapFactory.decodeFile(humon.getImagePath());\n ImageView humonImageView = (ImageView) findViewById(R.id.humonImageView);\n humonImageView.setImageBitmap(humonImage);\n }\n }\n\n }", "public static void runOnUIThread(\n final Runnable r)\n {\n NullCheck.notNull(r);\n final Looper looper = NullCheck.notNull(Looper.getMainLooper());\n final Handler h = new Handler(looper);\n h.post(r);\n }", "@Override\r\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\tToast.makeText(\r\n\t\t\t\t\t\t\t\tactivityContext,\r\n\t\t\t\t\t\t\t\tR.string.unable_to_fetch_the_details,\r\n\t\t\t\t\t\t\t\t2000);\r\n\r\n\t\t\t\t\t\t }" ]
[ "0.8158484", "0.72660595", "0.72636616", "0.71188825", "0.7107481", "0.70511836", "0.6950518", "0.67793906", "0.67644686", "0.67472094", "0.6712631", "0.6690769", "0.66419905", "0.66043866", "0.65854514", "0.65521157", "0.6544063", "0.6542534", "0.6531728", "0.6531202", "0.65231663", "0.65231663", "0.65231663", "0.65225923", "0.6472367", "0.64578843", "0.6386274", "0.6386274", "0.6352195", "0.6314737", "0.63042533", "0.6287784", "0.62789094", "0.62741035", "0.6272348", "0.6256296", "0.62526864", "0.62526864", "0.62523574", "0.6246765", "0.62392986", "0.6228994", "0.6228994", "0.6228994", "0.6228994", "0.6228994", "0.6228994", "0.6228994", "0.6228994", "0.6228994", "0.6221666", "0.61973953", "0.61947405", "0.6191605", "0.6188756", "0.6183929", "0.6156111", "0.61298", "0.61298", "0.612722", "0.61271334", "0.61227864", "0.6120308", "0.6120308", "0.6120308", "0.6119235", "0.6118815", "0.61167324", "0.6097777", "0.60976195", "0.6093894", "0.60902333", "0.6088055", "0.6086041", "0.60765356", "0.60756963", "0.6071336", "0.6050436", "0.6049002", "0.6047524", "0.6034829", "0.60303026", "0.60265785", "0.6023103", "0.6014035", "0.60136265", "0.6009819", "0.5999565", "0.5996139", "0.5995471", "0.5987216", "0.59871066", "0.59788036", "0.5966718", "0.59592974", "0.5955485", "0.59549963", "0.5942095", "0.59405017", "0.5936801" ]
0.68789
7
This Animation that feels natural is done by using the 3 Libraries AnimationPath , PathEvaluator , PathPoint It is published by a Google Developper on Youtube channel
public void animateSendMoney(){ tvSendMoney.setVisibility(View.VISIBLE); //Getting the Location of a View on the Screen int[] siLoc = new int[2]; tvSiOut.getLocationOnScreen(siLoc); int[] doLoc = new int[2]; tvDoOut.getLocationOnScreen(doLoc); // Set up the path we're animating along AnimatorPath path = new AnimatorPath(); path.moveTo(siLoc[0], siLoc[1]); //Move the View to the desired location // path.lineTo(doLoc[0], doLoc[1]); int x = (doLoc[0] - siLoc[0]); int y = (doLoc[1] - siLoc[1]); /*** * Drawing a Curve * 0,0 Means that remain on the point where you are * x/2 (The Middle X between the 2 points) * * x+10 because the First point has padding of 10 dp *x+10, siLoc[1], is the location of End Point */ path.curveTo(0,0,x/2,300,x+10,doLoc[1]); // Set up the animation final ObjectAnimator anim = ObjectAnimator.ofObject(this, "SendLoc", new PathEvaluator(), path.getPoints().toArray()); anim.setDuration(1500); anim.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AnimationSVGView() {\n this.model = new BasicAnimationModel();\n this.out = new StringBuilder();\n this.speed = 1;\n }", "@Test\n public void testChangeCanvas() throws IOException {\n AnimationModel am = new SimpleAnimationModel();\n int[] i = {40, 40, 40};\n StringBuilder sb = new StringBuilder();\n am.addShape(40, 40, 45, \"Reccy\", false, 100, 150,\n 20, 15, ShapeType.RECTANGLE);\n am.addMotion(5, 10, 100, 150, 150,\n 200, 20, 15, 15, 10, i,\n i, \"Reccy\");\n am.setCanvas(30, 30, 360, 400);\n am.startAnimation();\n IAnimationView av = new SVGAnimationView(am, 2, sb);\n av.render();\n assertEquals(\"<svg viewBox = \\\"30 30 360 400\\\" \"\n + \"version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"\n + \"<rect id=\\\"Reccy\\\" x=\\\"100.00\\\" y=\\\"150.00\\\" width=\\\"20.00\\\" \"\n + \"height=\\\"15.00\\\" fill=\\\"rgb(40,40,40)\\\" visibility=\\\"hidden\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"0.0ms\\\" dur=\\\"2500.0ms\\\" \"\n + \"attributeName=\\\"visibility\\\" from=\\\"hidden\\\" to=\\\"visible\\\" fill=\\\"freeze\\\" />\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2500.0ms\\\" dur=\\\"2500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"100\\\" to=\\\"150\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2500.0ms\\\" dur=\\\"2500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"150\\\" to=\\\"200\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2500.0ms\\\" dur=\\\"2500.0ms\\\" \"\n + \"attributeName=\\\"width\\\" from=\\\"20\\\" to=\\\"15\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2500.0ms\\\" dur=\\\"2500.0ms\\\" \"\n + \"attributeName=\\\"height\\\" from=\\\"15\\\" to=\\\"10\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"</svg>\", sb.toString());\n }", "@Override\n public void start(Stage primaryStage) {\n root.setId(\"container\");\n cPanel = new SplitPane();\n try {\n FXMLLoader myLoader = new FXMLLoader(getClass().getResource(\"ControlPanel.fxml\"));\n\n cPanel = (SplitPane) myLoader.load();\n cPanel.setLayoutX(91);\n cPanel.setLayoutY(315);\n root.getChildren().add(cPanel);\n \n } catch (IOException e) {\n System.err.println(e.getMessage());\n } \n\n ImageView map = new ImageView(new Image(getClass().getResourceAsStream(\"assets/FloorPlan.png\")));\n map.setFitHeight(550);\n map.setPreserveRatio(true);\n \n root.getChildren().add(0, map);\n \n primaryStage.setTitle(\"JavaFX PathTransition Test with SVG\");\n\n Scene scene = new Scene(root, 740, 550);\n primaryStage.setScene(scene);\n primaryStage.show();\n \n AnimationSequence animation = new AnimationSequence();\n \n root.getChildren().addAll(animation.getControlSystem());\n animation.setControlSystemCoordinates();\n \n scene.setOnMouseClicked(e ->{\n System.out.println(\"LayoutX: \"+e.getSceneX()+\"; LayoutY: \"+e.getSceneY());\n });\n \n ((Button)cPanel.lookup(\"#btnResume\")).setOnAction(e->{\n animation.playAnimation();\n });\n \n ((Button)cPanel.lookup(\"#btnPause\")).setOnAction(e->{\n animation.pauseAnimation();\n });\n//\n ((Button)cPanel.lookup(\"#btnStart\")).setOnAction(e->{\n\n root.getChildren().removeIf((Node n)-> (n instanceof Car));\n if(!animation.getAnimationSequence().isEmpty())\n animation.getAnimationSequence().clear();\n \n Thread t1 = new Thread(){\n @Override\n public void run(){\n animation.generateParkedCars(getNOC_ParkedCarsValue());\n// this.interrupt();\n Platform.runLater(()->{\n animation.layoutParkedCars(root);\n });\n }\n };\n\n \n Thread t2 = new Thread(){\n @Override\n public void run(){\n if(getNOC_CheckIn() != 0)\n animation.setNumOfCheckIn(getNOC_CheckIn());\n if(getNOC_CheckOut() != 0 && !AnimationSequence.getParkedVehicles().isEmpty())\n if(getNOC_CheckIn() != 0)\n animation.setNumOfCheckOut(getNOC_CheckOut(), false);\n else\n animation.setNumOfCheckOut(getNOC_CheckOut(), true);\n\n }\n };\n \n Thread t4 = new Thread(){\n @Override\n public void run(){\n ToggleButton tgBtnVisitorLog = (ToggleButton) cPanel.lookup(\"#tgBtnVisitorLog\");\n tgBtnVisitorLog.setSelected(true);\n TableView table = (TableView) cPanel.lookup(\"#tableView\");\n \n Platform.runLater(()->{\n ((TableColumn) table.getColumns().get(2)).setText(\"TIME-IN\");\n ((TableColumn) table.getColumns().get(3)).setText(\"TIME-OUT\");\n });\n \n if(!table.getItems().isEmpty())\n table.getItems().clear();\n table.getItems().addAll(animation.getVisitorLogTableData());\n }\n };\n \n Thread t3 = new Thread(){\n @Override\n public void run(){\n animation.generateVisitorLog();\n if(getNOC_CheckIn() != 0)\n animation.reconstructCheckInAnimation();\n else if(!AnimationSequence.getCheckInVehicles().isEmpty())\n AnimationSequence.getCheckInVehicles().clear();\n animation.getAnimSequenceData();\n }\n };\n \n ExecutorService executor = Executors.newFixedThreadPool(1);\n executor.execute(t1);\n executor.execute(t2);\n executor.execute(t3);\n executor.execute(t4);\n executor.shutdown();\n \n\n });\n \n ((Button)cPanel.lookup(\"#btnPlay\")).setOnAction(e -> {\n if(getNOC_CheckIn() != 0 || getNOC_CheckOut() != 0 && !AnimationSequence.getParkedVehicles().isEmpty())\n animation.playAnimationSequence();\n });\n \n ((ToggleButton) cPanel.lookup(\"#tgBtnAnimSequence\")).setOnAction(e-> animation.setToggle(e));\n ((ToggleButton) cPanel.lookup(\"#tgBtnVisitorLog\")).setOnAction(e-> animation.setToggle(e));\n\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "@Test\n public void testGaps() throws IOException {\n int[] a = {3, 4, 5};\n Motion motion1 = new Motion(2, 3, 3, 4, 5, 5, 7,\n 8,\n 9, 10, a, a);\n Motion motion2 = new Motion(4, 5, 4, 3, 5, 6, 8,\n 8,\n 10, 10, a, a);\n AnimationModel am = new SimpleAnimationModel();\n am.addShape(\"R\", ShapeType.RECTANGLE);\n am.addMotion(2, 3, 3, 4, 5, 5, 7,\n 8,\n 9, 10, a, a, \"R\");\n am.addMotion(4, 5, 4, 3, 5, 6, 8,\n 8,\n 10, 10, a, a, \"R\");\n am.startAnimation();\n StringBuilder sb = new StringBuilder();\n IAnimationView av = new SVGAnimationView(am, 2, sb);\n av.render();\n assertEquals(\"<svg viewBox = \\\"0 0 0 0\\\" version=\\\"1.1\\\" \"\n + \"xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"\n + \"<rect id=\\\"R\\\" x=\\\"3.00\\\" y=\\\"5.00\\\" width=\\\"7.00\\\" height=\\\"9.00\\\" \"\n + \"fill=\\\"rgb(3,4,5)\\\" visibility=\\\"hidden\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"0.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"visibility\\\" from=\\\"hidden\\\" to=\\\"visible\\\" fill=\\\"freeze\\\" />\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"3\\\" to=\\\"4\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"width\\\" from=\\\"7\\\" to=\\\"8\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"height\\\" from=\\\"9\\\" to=\\\"10\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2000.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"4\\\" to=\\\"3\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2000.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"5\\\" to=\\\"6\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"</svg>\", sb.toString());\n }", "public void start(Stage primaryStage) {\n Path path = new Path();\r\n path.getElements().add(new MoveTo(20, 20));\r\n path.getElements().add(new CubicCurveTo(380, 0, 380, 120, 200, 120));\r\n\r\n PathTransition pathTransition = new PathTransition();\r\n pathTransition.setDuration(Duration.millis(4000));\r\n pathTransition.setPath(path);\r\n pathTransition.setNode(rect);\r\n pathTransition.setCycleCount(Timeline.INDEFINITE);\r\n pathTransition.setAutoReverse(true);\r\n\r\n pathTransition.play();\r\n }", "@Test\n public void SVGViewTest1() throws FileNotFoundException {\n AnimatorModel model;\n String filename = \"toh-3.txt\";\n Readable inFile = new FileReader(filename);\n\n AnimationBuilder<AnimatorModel> builder =\n new AnimationBuilderImpl();\n\n model = AnimationReader.parseFile(inFile, builder);\n SVGView view = new SVGView(model, filename, 1);\n assertEquals(\"<svg width=\\\"410\\\" height=\\\"220\\\" viewBox=\\\"145 50 555 270\\\" \"\n + \"version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"\n + \"<rect id=\\\"disk1\\\" x=\\\"190\\\" y=\\\"180\\\" width=\\\"20\\\" height=\\\"30\\\" fill=\\\"\"\n + \"rgb(0,49,90)\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" attributeName=\\\"x\\\" \"\n + \"from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" attributeName=\\\"y\\\" \"\n + \"from=\\\"180.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"24000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"24000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"25000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"25000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"35000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"35000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"36000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"36000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"46000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"46000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"47000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"47000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"57000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"57000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"89000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"89000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"99000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"99000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"100000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"100000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"110000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"110000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"111000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"111000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"121000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"121000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"153000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"153000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"163000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"163000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"164000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"164000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"174000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"174000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"175000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"175000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"185000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"185000.0ms\\\" dur=\\\"32000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"217000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"217000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"227000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"227000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"228000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"228000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"238000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"238000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"239000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"239000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"CSS\\\" begin=\\\"249000.0ms\\\" dur=\\\"8000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(0,49,90)\\\" to=\\\"rgb(0,255,0)\\\" fill=\\\"freeze\\\" \"\n + \"/>\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"257000.0ms\\\" dur=\\\"45000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"257000.0ms\\\" dur=\\\"45000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"<rect id=\\\"disk2\\\" x=\\\"167\\\" y=\\\"210\\\" width=\\\"65\\\" height=\\\"30\\\" \"\n + \"fill=\\\"rgb(6,247,41)\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"56000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"56000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"57000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"57000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"67000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"67000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"68000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"68000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"78000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"78000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"79000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"79000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"89000.0ms\\\" dur=\\\"96000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"89000.0ms\\\" dur=\\\"96000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"185000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"185000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"195000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"195000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"196000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"196000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"206000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"467.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"206000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"207000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"467.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"207000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"CSS\\\" begin=\\\"217000.0ms\\\" dur=\\\"8000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(6,247,41)\\\" to=\\\"rgb(0,255,0)\\\" fill=\\\"freeze\\\" \"\n + \"/>\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"225000.0ms\\\" dur=\\\"77000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"467.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"225000.0ms\\\" dur=\\\"77000.0ms\\\"\"\n + \" attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"<rect id=\\\"disk3\\\" x=\\\"145\\\" y=\\\"240\\\" width=\\\"110\\\" height=\\\"30\\\" \"\n + \"fill=\\\"rgb(11,45,175)\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"120000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1000.0ms\\\" dur=\\\"120000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"121000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"121000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"131000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"131000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"132000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"132000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"142000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"445.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"142000.0ms\\\" dur=\\\"1000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"143000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"445.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"143000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"CSS\\\" begin=\\\"153000.0ms\\\" dur=\\\"8000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(11,45,175)\\\" to=\\\"rgb(0,255,0)\\\" fill=\\\"freeze\\\"\"\n + \" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"161000.0ms\\\" dur=\\\"141000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"445.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"161000.0ms\\\" dur=\\\"141000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"</svg>\", view.getViewState());\n }", "@Test\n public void testFromFile() throws IOException {\n Readable in = new FileReader(\"smalldemo.txt\");\n AnimationModel am = AnimationReader.parseFile(in, new Builder());\n StringBuilder sb = new StringBuilder();\n am.startAnimation();\n IAnimationView av = new SVGAnimationView(am, 2, sb);\n av.render();\n assertEquals(\"<svg viewBox = \\\"200 70 360 360\\\" version=\\\"1.1\\\" \"\n + \"xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"\n + \"<rect id=\\\"R\\\" x=\\\"200.00\\\" y=\\\"200.00\\\" width=\\\"50.00\\\" height=\\\"100.00\\\" fill=\\\"\"\n + \"rgb(255,0,0)\\\" visibility=\\\"hidden\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"0.0ms\\\" dur=\\\"500.0ms\\\" attributeName=\\\"\"\n + \"visibility\\\" from=\\\"hidden\\\" to=\\\"visible\\\" fill=\\\"freeze\\\" /><animate \"\n + \"attributeType=\\\"xml\\\" begin=\\\"5000.0ms\\\" dur=\\\"20000.0ms\\\" attributeName=\\\"x\\\" \"\n + \"from=\\\"200\\\" to=\\\"300\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"5000.0ms\\\" dur=\\\"20000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"200\\\" to=\\\"300\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"25500.0ms\\\" dur=\\\"9500.0ms\\\" \"\n + \"attributeName=\\\"width\\\" from=\\\"50\\\" to=\\\"25\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"35000.0ms\\\" dur=\\\"15000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"300\\\" to=\\\"200\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"35000.0ms\\\" dur=\\\"15000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"300\\\" to=\\\"200\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"<ellipse id=\\\"C\\\" cx=\\\"500.00\\\" cy=\\\"100.00\\\" rx=\\\"60.00\\\" ry=\\\"30.00\\\" \"\n + \"fill=\\\"rgb(0,0,255)\\\" visibility=\\\"hidden\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"0.0ms\\\" dur=\\\"3000.0ms\\\" attributeName=\\\"\"\n + \"visibility\\\" from=\\\"hidden\\\" to=\\\"visible\\\" fill=\\\"freeze\\\" /><animate \"\n + \"attributeType=\\\"xml\\\" begin=\\\"10000.0ms\\\" dur=\\\"15000.0ms\\\" attributeName=\\\"cy\\\" \"\n + \"from=\\\"100\\\" to=\\\"280\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"25000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"cy\\\" from=\\\"280\\\" to=\\\"400\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"25000.0ms\\\" dur=\\\"10000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(0, 0, 255)\\\" to=\\\"rgb(0, 170, 85)\\\" \"\n + \"fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"35000.0ms\\\" dur=\\\"5000.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(0, 170, 85)\\\" to=\\\"rgb(0, 255, 0)\\\" \"\n + \"fill=\\\"freeze\\\" />\\n\"\n + \"</ellipse>\\n\"\n + \"</svg>\", sb.toString());\n }", "public interface Paths {\n String svg_path=\"M 1024.00,0.00\\n\"+\n \"C 1024.00,0.00 1024.00,1024.00 1024.00,1024.00\\n\"+\n \"1024.00,1024.00 0.00,1024.00 0.00,1024.00\\n\"+\n \"0.00,1024.00 0.00,0.00 0.00,0.00\\n\"+\n \"0.00,0.00 1024.00,0.00 1024.00,0.00 Z\\n\"+\n \"M 471.00,82.00\\n\"+\n \"C 471.00,82.00 436.00,86.46 436.00,86.46\\n\"+\n \"402.29,92.53 363.11,105.02 332.00,119.31\\n\"+\n \"212.66,174.10 124.94,279.73 93.13,407.00\\n\"+\n \"93.13,407.00 84.32,449.00 84.32,449.00\\n\"+\n \"84.32,449.00 83.71,459.00 83.71,459.00\\n\"+\n \"83.71,459.00 82.04,468.00 82.04,468.00\\n\"+\n \"82.04,468.00 82.04,477.00 82.04,477.00\\n\"+\n \"81.41,483.79 80.02,482.44 80.00,493.00\\n\"+\n \"80.00,493.00 80.00,531.00 80.00,531.00\\n\"+\n \"80.02,541.55 81.41,540.19 81.91,547.00\\n\"+\n \"83.59,569.87 87.15,592.72 92.74,615.00\\n\"+\n \"100.84,647.21 115.95,687.81 132.22,716.80\\n\"+\n \"132.22,716.80 151.28,747.23 151.28,747.23\\n\"+\n \"151.28,747.23 165.74,768.69 165.74,768.69\\n\"+\n \"165.74,768.69 170.22,773.74 170.22,773.74\\n\"+\n \"170.22,773.74 180.37,787.49 180.37,787.49\\n\"+\n \"180.37,787.49 189.63,797.04 189.63,797.04\\n\"+\n \"189.63,797.04 195.01,804.24 195.01,804.24\\n\"+\n \"195.01,804.24 221.76,830.99 221.76,830.99\\n\"+\n \"221.76,830.99 228.24,835.74 228.24,835.74\\n\"+\n \"228.24,835.74 235.76,842.99 235.76,842.99\\n\"+\n \"235.76,842.99 249.49,853.14 249.49,853.14\\n\"+\n \"249.49,853.14 255.31,858.26 255.31,858.26\\n\"+\n \"255.31,858.26 271.58,869.13 271.58,869.13\\n\"+\n \"291.22,882.33 311.33,894.77 333.00,904.45\\n\"+\n \"333.00,904.45 341.00,907.55 341.00,907.55\\n\"+\n \"367.84,919.54 388.74,925.41 417.00,932.47\\n\"+\n \"417.00,932.47 449.00,938.71 449.00,938.71\\n\"+\n \"449.00,938.71 457.00,939.29 457.00,939.29\\n\"+\n \"462.41,939.99 463.86,940.92 470.00,941.08\\n\"+\n \"470.00,941.08 480.00,941.08 480.00,941.08\\n\"+\n \"487.10,941.88 487.04,942.99 496.00,943.00\\n\"+\n \"496.00,943.00 532.00,943.00 532.00,943.00\\n\"+\n \"540.96,942.99 540.90,941.88 548.00,941.00\\n\"+\n \"548.00,941.00 558.00,941.00 558.00,941.00\\n\"+\n \"558.00,941.00 567.00,939.29 567.00,939.29\\n\"+\n \"567.00,939.29 575.00,938.71 575.00,938.71\\n\"+\n \"600.22,935.42 641.23,924.46 665.00,915.29\\n\"+\n \"704.92,899.89 742.59,878.10 776.69,852.26\\n\"+\n \"776.69,852.26 793.76,837.74 793.76,837.74\\n\"+\n \"793.76,837.74 800.24,832.99 800.24,832.99\\n\"+\n \"800.24,832.99 815.67,817.67 815.67,817.67\\n\"+\n \"815.67,817.67 830.99,802.24 830.99,802.24\\n\"+\n \"830.99,802.24 836.37,795.04 836.37,795.04\\n\"+\n \"836.37,795.04 843.63,787.49 843.63,787.49\\n\"+\n \"843.63,787.49 853.78,773.74 853.78,773.74\\n\"+\n \"853.78,773.74 858.80,768.26 858.80,768.26\\n\"+\n \"858.80,768.26 865.22,758.47 865.22,758.47\\n\"+\n \"865.22,758.47 883.32,731.61 883.32,731.61\\n\"+\n \"912.11,682.93 931.69,628.01 939.70,572.00\\n\"+\n \"939.70,572.00 940.29,564.00 940.29,564.00\\n\"+\n \"940.29,564.00 941.83,554.00 941.83,554.00\\n\"+\n \"941.83,554.00 943.09,532.00 943.09,532.00\\n\"+\n \"943.09,532.00 944.00,520.00 944.00,520.00\\n\"+\n \"944.09,461.78 934.76,408.42 913.76,354.00\\n\"+\n \"913.76,354.00 903.46,328.00 903.46,328.00\\n\"+\n \"903.46,328.00 888.10,299.00 888.10,299.00\\n\"+\n \"848.42,227.81 787.58,169.24 716.00,130.54\\n\"+\n \"697.75,120.67 678.43,112.81 659.00,105.63\\n\"+\n \"633.52,96.22 601.90,88.14 575.00,84.30\\n\"+\n \"575.00,84.30 567.00,83.71 567.00,83.71\\n\"+\n \"557.81,82.51 560.60,82.12 550.00,82.00\\n\"+\n \"550.00,82.00 530.00,80.14 530.00,80.14\\n\"+\n \"530.00,80.14 487.00,80.14 487.00,80.14\\n\"+\n \"478.45,81.70 480.15,81.95 471.00,82.00 Z\\n\"+\n \"M 621.75,530.91\\n\"+\n \"C 622.02,527.46 613.08,514.77 610.99,510.91\\n\"+\n \"610.99,510.91 582.50,458.00 582.50,458.00\\n\"+\n \"582.50,458.00 574.45,440.00 574.45,440.00\\n\"+\n \"574.45,440.00 562.02,415.00 562.02,415.00\\n\"+\n \"562.02,415.00 558.45,406.00 558.45,406.00\\n\"+\n \"558.45,406.00 547.55,384.00 547.55,384.00\\n\"+\n \"547.55,384.00 544.45,376.00 544.45,376.00\\n\"+\n \"544.45,376.00 537.55,362.00 537.55,362.00\\n\"+\n \"537.55,362.00 534.45,354.00 534.45,354.00\\n\"+\n \"534.45,354.00 519.54,322.00 519.54,322.00\\n\"+\n \"519.54,322.00 513.96,306.00 513.96,306.00\\n\"+\n \"513.96,306.00 490.85,254.00 490.85,254.00\\n\"+\n \"487.38,245.70 482.11,237.17 482.00,228.00\\n\"+\n \"482.00,228.00 482.00,224.00 482.00,224.00\\n\"+\n \"482.15,213.62 490.05,209.14 496.26,213.13\\n\"+\n \"504.24,218.27 512.34,230.36 517.45,238.42\\n\"+\n \"517.45,238.42 565.14,314.91 565.14,314.91\\n\"+\n \"565.14,314.91 597.99,367.28 597.99,367.28\\n\"+\n \"597.99,367.28 627.99,417.28 627.99,417.28\\n\"+\n \"627.99,417.28 633.72,427.83 633.72,427.83\\n\"+\n \"633.72,427.83 642.04,442.99 642.04,442.99\\n\"+\n \"642.04,442.99 647.01,451.09 647.01,451.09\\n\"+\n \"647.01,451.09 662.50,482.00 662.50,482.00\\n\"+\n \"665.34,487.69 671.71,498.69 670.27,504.91\\n\"+\n \"668.95,510.57 661.64,511.99 657.23,514.72\\n\"+\n \"657.23,514.72 636.00,526.23 636.00,526.23\\n\"+\n \"636.00,526.23 629.08,529.26 629.08,529.26\\n\"+\n \"624.38,531.87 623.04,535.59 618.00,538.00\\n\"+\n \"619.10,535.68 621.58,532.97 621.75,530.91 Z\\n\"+\n \"M 436.60,334.30\\n\"+\n \"C 436.60,334.30 449.66,322.96 449.66,322.96\\n\"+\n \"449.66,322.96 454.84,315.00 454.84,315.00\\n\"+\n \"458.55,309.64 464.74,303.48 471.00,301.36\\n\"+\n \"483.14,297.26 496.23,303.73 504.96,312.09\\n\"+\n \"507.66,314.67 511.26,318.44 512.30,322.09\\n\"+\n \"513.68,326.94 513.16,338.17 511.62,343.00\\n\"+\n \"511.62,343.00 508.00,352.00 508.00,352.00\\n\"+\n \"497.67,351.97 498.41,349.50 489.97,344.58\\n\"+\n \"489.97,344.58 465.96,330.58 465.96,330.58\\n\"+\n \"463.47,329.14 453.27,323.10 450.91,325.36\\n\"+\n \"449.58,326.64 451.17,328.37 452.10,329.27\\n\"+\n \"454.46,331.55 459.05,334.01 462.00,335.50\\n\"+\n \"462.00,335.50 492.91,352.99 492.91,352.99\\n\"+\n \"496.07,354.74 503.04,358.49 503.71,362.18\\n\"+\n \"504.12,364.49 503.07,371.74 501.40,373.40\\n\"+\n \"500.07,374.73 498.69,374.72 497.00,375.00\\n\"+\n \"497.00,375.00 498.00,384.00 498.00,384.00\\n\"+\n \"489.25,387.43 489.12,391.54 488.00,400.00\\n\"+\n \"488.00,400.00 484.56,402.29 484.56,402.29\\n\"+\n \"484.56,402.29 476.00,415.76 476.00,415.76\\n\"+\n \"474.01,415.99 471.15,416.11 469.28,415.76\\n\"+\n \"469.28,415.76 450.91,405.14 450.91,405.14\\n\"+\n \"450.91,405.14 431.28,393.99 431.28,393.99\\n\"+\n \"428.52,392.33 417.78,384.60 414.91,387.36\\n\"+\n \"413.58,388.64 415.17,390.37 416.10,391.27\\n\"+\n \"418.75,393.84 423.68,396.31 426.99,398.00\\n\"+\n \"426.99,398.00 436.04,403.42 436.04,403.42\\n\"+\n \"436.04,403.42 459.09,416.86 459.09,416.86\\n\"+\n \"464.58,420.20 469.84,421.09 466.87,429.00\\n\"+\n \"464.69,434.81 460.98,439.65 458.04,445.01\\n\"+\n \"458.04,445.01 434.58,486.04 434.58,486.04\\n\"+\n \"434.58,486.04 412.58,524.04 412.58,524.04\\n\"+\n \"412.58,524.04 406.75,535.74 406.75,535.74\\n\"+\n \"406.75,535.74 403.11,540.22 403.11,540.22\\n\"+\n \"403.11,540.22 399.78,546.77 399.78,546.77\\n\"+\n \"399.78,546.77 390.27,562.01 390.27,562.01\\n\"+\n \"390.27,562.01 377.78,584.77 377.78,584.77\\n\"+\n \"377.78,584.77 355.78,622.77 355.78,622.77\\n\"+\n \"352.15,628.93 347.72,634.90 346.00,642.00\\n\"+\n \"346.00,642.00 342.00,642.00 342.00,642.00\\n\"+\n \"327.89,641.76 309.68,627.91 297.00,621.34\\n\"+\n \"292.74,619.14 282.33,612.37 282.23,607.00\\n\"+\n \"282.16,602.98 286.67,598.03 288.56,594.40\\n\"+\n \"288.56,594.40 293.73,585.99 293.73,585.99\\n\"+\n \"293.73,585.99 309.28,558.77 309.28,558.77\\n\"+\n \"309.28,558.77 322.22,535.23 322.22,535.23\\n\"+\n \"322.22,535.23 331.85,522.00 331.85,522.00\\n\"+\n \"331.85,522.00 360.15,472.00 360.15,472.00\\n\"+\n \"360.15,472.00 378.42,441.00 378.42,441.00\\n\"+\n \"378.42,441.00 399.85,404.00 399.85,404.00\\n\"+\n \"399.85,404.00 404.19,396.00 404.19,396.00\\n\"+\n \"404.19,396.00 412.07,386.00 412.07,386.00\\n\"+\n \"417.87,375.86 412.46,368.80 422.00,368.00\\n\"+\n \"419.91,356.08 424.78,360.59 428.99,351.99\\n\"+\n \"432.09,345.64 427.65,342.70 436.00,342.00\\n\"+\n \"436.00,340.05 435.83,335.96 436.60,334.30 Z\\n\"+\n \"M 497.00,467.00\\n\"+\n \"C 497.00,467.00 566.00,467.00 566.00,467.00\\n\"+\n \"566.00,467.00 577.46,468.74 577.46,468.74\\n\"+\n \"577.46,468.74 589.72,489.83 589.72,489.83\\n\"+\n \"589.72,489.83 600.58,509.96 600.58,509.96\\n\"+\n \"600.58,509.96 609.14,524.91 609.14,524.91\\n\"+\n \"609.14,524.91 615.84,535.28 615.84,535.28\\n\"+\n \"615.84,535.28 618.75,542.68 618.75,542.68\\n\"+\n \"618.75,542.68 633.00,569.00 633.00,569.00\\n\"+\n \"627.03,570.70 618.38,570.00 612.00,570.00\\n\"+\n \"612.00,570.00 575.00,570.00 575.00,570.00\\n\"+\n \"575.00,570.00 454.00,570.00 454.00,570.00\\n\"+\n \"454.00,570.00 413.00,570.00 413.00,570.00\\n\"+\n \"407.25,570.00 401.16,571.61 398.00,566.00\\n\"+\n \"398.00,566.00 408.22,549.23 408.22,549.23\\n\"+\n \"408.22,549.23 411.73,543.99 411.73,543.99\\n\"+\n \"411.73,543.99 415.53,536.16 415.53,536.16\\n\"+\n \"415.53,536.16 423.49,522.17 423.49,522.17\\n\"+\n \"423.49,522.17 445.49,484.17 445.49,484.17\\n\"+\n \"445.49,484.17 454.00,468.00 454.00,468.00\\n\"+\n \"454.00,468.00 497.00,467.00 497.00,467.00 Z\\n\"+\n \"M 702.17,542.80\\n\"+\n \"C 702.17,542.80 690.97,518.40 690.97,518.40\\n\"+\n \"690.97,518.40 685.92,508.73 685.92,508.73\\n\"+\n \"685.92,508.73 681.54,501.83 681.54,501.83\\n\"+\n \"681.54,501.83 678.58,494.04 678.58,494.04\\n\"+\n \"678.58,494.04 669.98,476.71 669.98,476.71\\n\"+\n \"668.90,474.57 667.26,470.96 669.00,468.74\\n\"+\n \"670.65,466.63 675.55,467.00 678.00,467.00\\n\"+\n \"678.00,467.00 771.00,467.00 771.00,467.00\\n\"+\n \"781.99,467.02 780.02,468.61 780.00,479.00\\n\"+\n \"780.00,479.00 780.00,540.00 780.00,540.00\\n\"+\n \"780.00,547.62 780.84,564.52 779.00,571.00\\n\"+\n \"779.00,571.00 755.00,570.00 755.00,570.00\\n\"+\n \"755.00,570.00 714.00,570.00 714.00,570.00\\n\"+\n \"712.50,563.82 705.24,548.95 702.17,542.80 Z\\n\"+\n \"M 244.00,544.00\\n\"+\n \"C 244.00,544.00 244.00,491.00 244.00,491.00\\n\"+\n \"244.00,491.00 244.00,475.00 244.00,475.00\\n\"+\n \"244.00,475.00 245.60,469.02 245.60,469.02\\n\"+\n \"245.60,469.02 253.00,468.00 253.00,468.00\\n\"+\n \"253.00,468.00 316.00,468.00 316.00,468.00\\n\"+\n \"316.00,468.00 348.00,469.00 348.00,469.00\\n\"+\n \"348.00,469.00 332.15,498.00 332.15,498.00\\n\"+\n \"332.15,498.00 320.46,519.00 320.46,519.00\\n\"+\n \"320.46,519.00 313.40,533.58 313.40,533.58\\n\"+\n \"313.40,533.58 305.83,546.80 305.83,546.80\\n\"+\n \"305.83,546.80 295.75,563.57 295.75,563.57\\n\"+\n \"295.75,563.57 291.45,569.18 291.45,569.18\\n\"+\n \"291.45,569.18 284.00,570.00 284.00,570.00\\n\"+\n \"284.00,570.00 245.00,571.00 245.00,571.00\\n\"+\n \"245.00,571.00 244.00,544.00 244.00,544.00 Z\\n\"+\n \"M 661.20,520.16\\n\"+\n \"C 665.01,518.10 669.48,513.82 674.00,513.69\\n\"+\n \"681.26,513.49 682.77,525.02 684.72,529.96\\n\"+\n \"685.98,533.16 687.84,534.10 689.23,536.51\\n\"+\n \"689.23,536.51 696.79,554.00 696.79,554.00\\n\"+\n \"702.32,565.71 706.00,565.74 706.00,580.00\\n\"+\n \"702.00,581.07 691.45,588.05 687.27,590.48\\n\"+\n \"677.93,595.93 672.90,598.00 662.00,598.00\\n\"+\n \"660.73,593.28 659.36,593.20 657.39,589.19\\n\"+\n \"657.39,589.19 654.74,583.08 654.74,583.08\\n\"+\n \"654.74,583.08 650.68,577.53 650.68,577.53\\n\"+\n \"650.68,577.53 640.75,561.49 640.75,561.49\\n\"+\n \"638.20,556.85 631.85,545.01 628.00,542.00\\n\"+\n \"628.00,542.00 628.00,536.00 628.00,536.00\\n\"+\n \"638.41,533.51 651.47,525.40 661.20,520.16 Z\\n\"+\n \"M 692.01,597.78\\n\"+\n \"C 692.01,597.78 700.77,593.28 700.77,593.28\\n\"+\n \"702.28,592.35 703.63,591.04 705.32,590.24\\n\"+\n \"707.11,589.89 710.07,590.01 712.00,590.24\\n\"+\n \"713.02,593.79 722.45,606.09 725.33,610.47\\n\"+\n \"725.33,610.47 749.32,646.47 749.32,646.47\\n\"+\n \"749.32,646.47 752.72,652.77 752.72,652.77\\n\"+\n \"752.72,652.77 761.84,667.20 761.84,667.20\\n\"+\n \"767.44,677.57 774.05,684.01 772.83,697.00\\n\"+\n \"772.00,705.79 771.20,707.97 765.00,714.14\\n\"+\n \"757.05,722.05 757.74,721.35 747.00,722.09\\n\"+\n \"743.86,722.30 742.31,722.92 739.00,722.68\\n\"+\n \"736.09,722.46 727.83,722.05 725.76,720.75\\n\"+\n \"718.69,716.32 714.23,704.93 710.57,697.60\\n\"+\n \"710.57,697.60 683.66,634.91 683.66,634.91\\n\"+\n \"680.50,626.27 674.27,614.84 674.00,606.00\\n\"+\n \"682.86,604.87 685.11,601.59 692.01,597.78 Z\\n\"+\n \"M 256.13,712.00\\n\"+\n \"C 256.13,712.00 264.84,685.00 264.84,685.00\\n\"+\n \"264.84,685.00 273.95,642.00 273.95,642.00\\n\"+\n \"273.95,642.00 277.26,627.00 277.26,627.00\\n\"+\n \"277.26,627.00 278.99,620.65 278.99,620.65\\n\"+\n \"278.99,620.65 284.00,618.00 284.00,618.00\\n\"+\n \"291.29,628.23 310.06,636.13 321.09,642.80\\n\"+\n \"327.01,646.39 330.75,645.36 334.00,652.00\\n\"+\n \"334.00,652.00 320.96,664.24 320.96,664.24\\n\"+\n \"320.96,664.24 315.04,668.38 315.04,668.38\\n\"+\n \"315.04,668.38 281.67,701.67 281.67,701.67\\n\"+\n \"281.67,701.67 263.48,719.19 263.48,719.19\\n\"+\n \"263.48,719.19 256.13,720.00 256.13,720.00\\n\"+\n \"256.13,720.00 256.13,712.00 256.13,712.00 Z\";\n}", "private void createAnimation () {\n // KeyFrame frame = new KeyFrame(Duration.millis(MILLISECOND_DELAY), e -> myManager.step());\n // myAnimation = new Timeline();\n // myAnimation.setCycleCount(Timeline.INDEFINITE);\n // myAnimation.getKeyFrames().add(frame);\n }", "public abstract void nextAnimationStep();", "@Override\n public void animate() {\n }", "public void animUpdate(PropertyChangeEvent anEvent)\n{\n // Return if shape is a new-born\n if(getAnimator()==null || getAnimator().isNewborn(this) || !getAnimator().isEnabled()) return;\n \n // If change is anim property, add record\n if(isAnimProperty(anEvent.getPropertyName()))\n addTimelineEntry(anEvent.getPropertyName(), anEvent.getNewValue(), anEvent.getOldValue());\n \n // Add anim records for Fill\n else if(anEvent.getPropertyName().equals(\"Fill\")) {\n RMFill f1 = (RMFill)anEvent.getNewValue();\n RMFill f2 = (RMFill)anEvent.getOldValue();\n RMColor c1 = f1!=null? f1.getColor() : RMColor.clearWhite;\n RMColor c2 = f2!=null? f2.getColor() : RMColor.clearWhite;\n addTimelineEntry(\"Color\", c1, c2);\n }\n \n // Add anim records for Fill.Color\n else if(anEvent.getPropertyName().equals(\"Fill.Color\"))\n addTimelineEntry(\"Color\", anEvent.getNewValue(), anEvent.getOldValue());\n \n // Add anim records for Stroke\n else if(anEvent.getPropertyName().equals(\"Stroke\")) {\n RMStroke s1 = (RMStroke)anEvent.getNewValue();\n RMStroke s2 = (RMStroke)anEvent.getOldValue();\n RMColor c1 = s1!=null? s1.getColor() : RMColor.clearWhite;\n RMColor c2 = s2!=null? s2.getColor() : RMColor.clearWhite;\n addTimelineEntry(\"StrokeColor\", c1, c2);\n float lw1 = s1!=null? s1.getWidth() : 0;\n float lw2 = s2!=null? s2.getWidth() : 0;\n addTimelineEntry(\"StrokeWidth\", lw1, lw2);\n }\n \n // Add anim records for Stroke.Color\n else if(anEvent.getPropertyName().equals(\"Stroke.Color\"))\n addTimelineEntry(\"StrokeColor\", anEvent.getNewValue(), anEvent.getOldValue());\n \n // Add anim records for Stroke.Width\n else if(anEvent.getPropertyName().equals(\"Stroke.Width\"))\n addTimelineEntry(\"StrokeWidth\", anEvent.getNewValue(), anEvent.getOldValue());\n}", "public static void main(String[] args) throws IOException {\n AnimationModel model;\n IView view = null;\n Readable file;\n Appendable output;\n\n\n HashMap<String, String> cla = argsToHM(args);\n\n if (checkValidArgs(cla)) {\n showError(\"Invalid command line args\");\n return;\n }\n\n try {\n file = new FileReader(setFile(cla));\n } catch (FileNotFoundException e) {\n showError(\"File not found\");\n return;\n }\n\n\n model = AnimationReader.parseFile(file,\n new AnimationModelImpl.Builder(\n new AnimationModelImpl()));\n\n\n switch (cla.get(\"-view\")) {\n case \"text\":\n output = System.out;\n view = new TextRepresentation(\n model.getShapes(),\n model.getMaxX(),\n model.getMaxY(),\n model.getWidth(),\n model.getHeight());\n view.createAnimOutput();\n output.append(view.getOutput().toString());\n return;\n\n case \"svg\":\n try {\n File f = new File(cla.get(\"-out\"));\n FileWriter fw = new FileWriter(f);\n BufferedWriter bw = new BufferedWriter(fw);\n view = new SVGRepresentation(model.getShapes(),\n model.getWidth(),\n model.getHeight(),\n Integer.valueOf(cla.get(\"-speed\")));\n view.createAnimOutput();\n System.out.println(view.getOutput().toString());\n bw.append(view.getOutput().toString());\n bw.close();\n return;\n }\n catch (IOException e) {\n showError(\"File unable to be written\");\n }\n break;\n\n case \"visual\":\n IView visPanel = new AnimationPanelView(model.getShapes(),\n Integer.valueOf(cla.get(\"-speed\")));\n\n view = new AnimationGraphicsView(visPanel, model.getMaxX(), model.getMaxY(),\n model.getWidth(),\n model.getHeight());\n break;\n\n case \"edit\":\n AnimationPanelView editPanel = new EditorView(model.getShapes(),\n Integer.valueOf(cla.get(\"-speed\")), true);\n view = new AnimationGraphicsView(editPanel, model.getMaxX(), model.getMaxY(),\n model.getWidth(),\n model.getHeight());\n break;\n default:\n showError(\"unrecognized/incorrect animation type specified\");\n break;\n }\n\n ExcellenceController controller = new ExcellenceController(model, view);\n controller.makeVisible();\n }", "protected abstract void animate(int anim);", "public static void main(String[] args) {\r\n double xStart = Double.parseDouble(args[0]);\r\n double yStart = Double.parseDouble(args[1]);\r\n double dx = Double.parseDouble(args[2]);\r\n double dy = Double.parseDouble(args[3]);\r\n drawAnimation(new Point(xStart, yStart), dx, dy);\r\n //drawAnimation(new Point(200,200),3,4);\r\n }", "public void animate()\n\t{\n\t\tanimation.read();\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "@Test\n public void SVGViewTest2() throws FileNotFoundException {\n EasyAnimator.main(new String[]{\"-in toh-3.txt -view svg -out svgTextOutput.txt -speed 20\"});\n\n BufferedReader bufferedReader;\n try {\n bufferedReader = new BufferedReader(new FileReader(\"svgTextOutput.txt\"));\n StringBuilder stringBuilder = new StringBuilder();\n String line = bufferedReader.readLine();\n\n while (line != null) {\n stringBuilder.append(line);\n stringBuilder.append(\"\\n\");\n line = bufferedReader.readLine();\n }\n assertEquals(\"<svg width=\\\"410\\\" height=\\\"220\\\" viewBox=\\\"145 50 555 270\\\" \"\n + \"version=\\\"1.1\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"\n + \"<rect id=\\\"disk1\\\" x=\\\"190\\\" y=\\\"180\\\" width=\\\"20\\\" height=\\\"30\\\" \"\n + \"fill=\\\"rgb(0,49,90)\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"50.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"50.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"50.0ms\\\" dur=\\\"1200.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"50.0ms\\\" dur=\\\"1200.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1250.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1250.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1750.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1750.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1800.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"1800.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2300.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2300.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2350.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2350.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2850.0ms\\\" dur=\\\"1600.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2850.0ms\\\" dur=\\\"1600.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"4450.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"4450.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"4950.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"4950.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"5000.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"5000.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"5500.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"5500.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"5550.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"5550.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"6050.0ms\\\" dur=\\\"1600.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"6050.0ms\\\" dur=\\\"1600.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"7650.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"7650.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"8150.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"340.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"8150.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"8200.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"340.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"8200.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"8700.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"8700.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"8750.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"8750.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"9250.0ms\\\" dur=\\\"1600.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"9250.0ms\\\" dur=\\\"1600.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"10850.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"10850.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"11350.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"190.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"11350.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"11400.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"190.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"11400.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"11900.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"11900.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"11950.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"11950.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"CSS\\\" begin=\\\"12450.0ms\\\" dur=\\\"400.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(0,49,90)\\\" to=\\\"rgb(0,255,0)\\\" fill=\\\"freeze\\\" \"\n + \"/>\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"12850.0ms\\\" dur=\\\"2250.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"490.0\\\" to=\\\"490.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"12850.0ms\\\" dur=\\\"2250.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"180.0\\\" to=\\\"180.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"<rect id=\\\"disk2\\\" x=\\\"167\\\" y=\\\"210\\\" width=\\\"65\\\" height=\\\"30\\\" \"\n + \"fill=\\\"rgb(6,247,41)\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"50.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"50.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"50.0ms\\\" dur=\\\"2800.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"50.0ms\\\" dur=\\\"2800.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2850.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"2850.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"3350.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"167.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"3350.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"3400.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"167.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"3400.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"3900.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"3900.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"3950.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"3950.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"4450.0ms\\\" dur=\\\"4800.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"4450.0ms\\\" dur=\\\"4800.0ms\\\"\"\n + \" attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"9250.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"9250.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"9750.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"317.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"9750.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"9800.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"317.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"9800.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"10300.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"467.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"10300.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"10350.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"467.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"10350.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"CSS\\\" begin=\\\"10850.0ms\\\" dur=\\\"400.0ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(6,247,41)\\\" to=\\\"rgb(0,255,0)\\\" fill=\\\"freeze\\\" \"\n + \"/>\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"11250.0ms\\\" dur=\\\"3850.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"467.0\\\" to=\\\"467.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"11250.0ms\\\" dur=\\\"3850.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"210.0\\\" to=\\\"210.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"<rect id=\\\"disk3\\\" x=\\\"145\\\" y=\\\"240\\\" width=\\\"110\\\" height=\\\"30\\\" \"\n + \"fill=\\\"rgb(11,45,175)\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"50.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"50.0ms\\\" dur=\\\"0.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"50.0ms\\\" dur=\\\"6000.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"50.0ms\\\" dur=\\\"6000.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"6050.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"6050.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"6550.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"145.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"6550.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"6600.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"145.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"6600.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"7100.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"445.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"7100.0ms\\\" dur=\\\"50.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"50.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"7150.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"x\\\" from=\\\"445.0\\\" to=\\\"445.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"7150.0ms\\\" dur=\\\"500.0ms\\\" \"\n + \"attributeName=\\\"y\\\" from=\\\"50.0\\\" to=\\\"240.0\\\" fill=\\\"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"CSS\\\" begin=\\\"7650.0ms\\\" dur=\\\"400.0000000000009ms\\\" \"\n + \"attributeName=\\\"fill\\\" from=\\\"rgb(11,45,175)\\\" to=\\\"rgb(0,255,0)\\\" fill=\\\"freeze\\\"\"\n + \" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"8050.000000000001ms\\\" dur=\\\"\"\n + \"7049.999999999999ms\\\" attributeName=\\\"x\\\" from=\\\"445.0\\\" to=\\\"445.0\\\" fill=\\\"\"\n + \"freeze\\\" />\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"8050.000000000001ms\\\" dur=\\\"\"\n + \"7049.999999999999ms\\\" attributeName=\\\"y\\\" from=\\\"240.0\\\" to=\\\"240.0\\\" fill=\\\"\"\n + \"freeze\\\" />\\n\"\n + \"</rect>\\n\"\n + \"</svg>\\n\", stringBuilder.toString());\n bufferedReader.close();\n } catch (Exception e) {\n // do nothing\n }\n }", "public Timeline createPartLineAnimation(int duration, int stop_duration, ArrayList<Coordinate> affected_points, int slow_duration, int slow_stop_duration, Circle vehicle, ArrayList<Coordinate> line_coordinates_part, EventHandler<MouseEvent> handler, boolean detour_delay)\r\n {\r\n Timeline affected_timeline = new Timeline();\r\n int original_duration = duration;\r\n int original_stop_duration = stop_duration;\r\n addLineVehicles(vehicle);\r\n vehicle.setOnMouseClicked(handler);\r\n\r\n // add all keyframes to timeline - one keyframe means path from one coordinate to another coordinate\r\n // vehicle waits in stop for 1 seconds and go to another coordinate for 2 seconds (in default mode)\r\n int delta_time = 0;\r\n KeyFrame waiting_in_stop = null;\r\n\r\n //int affected_stops_count = 0;\r\n for (int i = 0; i < line_coordinates_part.size() - 1; i++) {\r\n // if we go through street affected by slow traffic\r\n if (line_coordinates_part.get(i).isInArray(affected_points) && line_coordinates_part.get(i+1).isInArray(affected_points))\r\n {\r\n // duration between coordinates and duration of waiting in stop is different\r\n duration = slow_duration;\r\n stop_duration = slow_stop_duration;\r\n }\r\n else\r\n {\r\n // else use default duration\r\n duration = original_duration;\r\n stop_duration = original_stop_duration;\r\n }\r\n\r\n for (Stop s : this.getStopsMap()) {\r\n // if we are in stop, we wait 'stop_duration' time\r\n if (line_coordinates_part.get(i).getX() == s.getCoordinate().getX() && line_coordinates_part.get(i).getY() == s.getCoordinate().getY()) {\r\n waiting_in_stop = new KeyFrame(Duration.seconds(delta_time + stop_duration), // this means waiting in stop for some time\r\n new KeyValue(vehicle.centerXProperty(), line_coordinates_part.get(i).getX()),\r\n new KeyValue(vehicle.centerYProperty(), line_coordinates_part.get(i).getY()));\r\n\r\n delta_time = delta_time + stop_duration;\r\n\r\n break;\r\n }\r\n }\r\n // we travelled for 'duration' time\r\n KeyFrame end = new KeyFrame(Duration.seconds(delta_time + duration), // this means that the path from one coordinate to another lasts 2 seconds\r\n new KeyValue(vehicle.centerXProperty(), line_coordinates_part.get(i + 1).getX()),\r\n new KeyValue(vehicle.centerYProperty(), line_coordinates_part.get(i + 1).getY()));\r\n\r\n if (waiting_in_stop != null) {\r\n affected_timeline.getKeyFrames().addAll(end, waiting_in_stop);\r\n } else {\r\n affected_timeline.getKeyFrames().addAll(end);\r\n }\r\n\r\n delta_time = delta_time + duration;\r\n }\r\n\r\n this.setLineMovement(affected_timeline); // set movement of specified line\r\n\r\n if (detour_delay == false)\r\n {\r\n this.setDelay(duration, slow_duration, affected_points.size());\r\n }\r\n else\r\n {\r\n this.delay = this.detour_streets.size() * duration - duration;\r\n }\r\n\r\n\r\n return affected_timeline;\r\n }", "@Override\n\tpublic void draw() {\n\t\tdouble t = System.currentTimeMillis();\n\t\tdouble dt = t - currentTime;\n\t\tcurrentTime = t;\n\n\t\t// Fetch current animation\n\t\tBaseAnimation animation = AnimationManager.getInstance().getCurrentAnimation();\n\t\tif (animation == null) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Draw animation frame with delta time\n\t\tanimation.draw(dt);\n\n\t\t// Send image to driver\n\t\tdriver.displayImage(animation.getImage());\n\n\t\t// Display previews\n\t\tbackground(0);\n\t\tif (ledPreviewEnabled) {\n\t\t\timage(preview.renderPreview(animation.getImage()), 0, 0);\n\t\t} else {\n\t\t\ttextAlign(CENTER);\n\t\t\ttextSize(16);\n\t\t\ttext(\"Press W to preview the animation.\", previewRect.width/2, previewRect.height/2);\n\t\t}\n\t\t\n\t\tif (sourcePreviewEnabled && BaseCanvasAnimation.class.isAssignableFrom(animation.getClass())) {\n\t\t\timage(((BaseCanvasAnimation) animation).getCanvasImage(), 0, 0);\n\t\t} else if (sourcePreviewEnabled) {\n\n\t\t\t// Copy animation image (else the animation image gets resized)\n\t\t\t// and scale it for better visibility\n\t\t\tPImage sourcePreview = animation.getImage().get();\n\t\t\tsourcePreview.resize(130, 405);\n\n\t\t\timage(sourcePreview, 0, 0);\n\t\t}\n\n\t}", "void startAnimation();", "public Shape createStrokedShape(Shape shape) {\n/* 140 */ GeneralPath result = new GeneralPath();\n/* 141 */ PathIterator it = new FlatteningPathIterator(shape.getPathIterator(null), 1.0D);\n/* 142 */ float[] points = new float[6];\n/* 143 */ float moveX = 0.0F, moveY = 0.0F;\n/* 144 */ float lastX = 0.0F, lastY = 0.0F;\n/* 145 */ float thisX = 0.0F, thisY = 0.0F;\n/* 146 */ int type = 0;\n/* 147 */ float next = 0.0F;\n/* 148 */ int phase = 0;\n/* 149 */ while (!it.isDone()) {\n/* 150 */ float dx, dy, distance; type = it.currentSegment(points);\n/* 151 */ switch (type) {\n/* */ case 0:\n/* 153 */ moveX = lastX = points[0];\n/* 154 */ moveY = lastY = points[1];\n/* 155 */ result.moveTo(moveX, moveY);\n/* 156 */ next = OutlineZigzagEffect.this.wavelength / 2.0F;\n/* */ break;\n/* */ \n/* */ case 4:\n/* 160 */ points[0] = moveX;\n/* 161 */ points[1] = moveY;\n/* */ \n/* */ \n/* */ case 1:\n/* 165 */ thisX = points[0];\n/* 166 */ thisY = points[1];\n/* 167 */ dx = thisX - lastX;\n/* 168 */ dy = thisY - lastY;\n/* 169 */ distance = (float)Math.sqrt((dx * dx + dy * dy));\n/* 170 */ if (distance >= next) {\n/* 171 */ float r = 1.0F / distance;\n/* 172 */ while (distance >= next) {\n/* 173 */ float x = lastX + next * dx * r;\n/* 174 */ float y = lastY + next * dy * r;\n/* 175 */ if ((phase & 0x1) == 0) {\n/* 176 */ result.lineTo(x + OutlineZigzagEffect.this.amplitude * dy * r, y - OutlineZigzagEffect.this.amplitude * dx * r);\n/* */ } else {\n/* 178 */ result.lineTo(x - OutlineZigzagEffect.this.amplitude * dy * r, y + OutlineZigzagEffect.this.amplitude * dx * r);\n/* 179 */ } next += OutlineZigzagEffect.this.wavelength;\n/* 180 */ phase++;\n/* */ } \n/* */ } \n/* 183 */ next -= distance;\n/* 184 */ lastX = thisX;\n/* 185 */ lastY = thisY;\n/* 186 */ if (type == 4) result.closePath(); \n/* */ break;\n/* */ } \n/* 189 */ it.next();\n/* */ } \n/* 191 */ return (new BasicStroke(OutlineZigzagEffect.this.getWidth(), 2, OutlineZigzagEffect.this.getJoin())).createStrokedShape(result);\n/* */ }", "@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n protected void animateWalking() {\n if (seqIdx > 7) {\n seqIdx = 0;\n }\n if (walking) {\n this.setImage(\"images/bat/bat_\" + seqIdx + FILE_SUFFIX);\n } else {\n this.setImage(\"images/bat/bat_0.png\");\n }\n seqIdx++;\n }", "@Test\n public void testEverything() {\n testAnimation.addShape(r, 1, 100);\n testAnimation.addShape(c, 6, 100);\n\n move1 = new MoveShape(r, 200.0, 200.0, 300.0, 300.0);\n move2 = new MoveShape(c, 500.0, 100.0, 500.0, 400.0);\n move3 = new MoveShape(r, 300.0, 300.0, 200.0, 200.0);\n\n size1 = new ScaleShape(r, 50.0, 100.0, 25.0, 100.0);\n\n colorChange1 = new ChangeColor(c, 0, 0, 1, 0, 1, 0);\n\n testAnimation.addEvent(r, move1, 10, 50);\n testAnimation.addEvent(c, move2, 20, 70);\n testAnimation.addEvent(c, colorChange1, 50, 80);\n testAnimation.addEvent(r, size1, 51, 70);\n testAnimation.addEvent(r, move3, 70, 100);\n\n assertEquals(\"Shapes:\\n\"\n + \"Name: R\\n\"\n + \"Type: rectangle\\n\"\n + \"Min corner: (200.0,200.0), Width: 50.0, Height: 100.0, Color: (1,0,0)\\n\"\n + \"Appears at t=1\\n\"\n + \"Disappears at t=100\\n\"\n + \"\\n\"\n + \"Name: C\\n\"\n + \"Type: ellipse\\n\"\n + \"Center: (500.0,100.0), X radius: 60.0, Y radius: 30.0, Color: (0,0,1)\\n\"\n + \"Appears at t=6\\n\"\n + \"Disappears at t=100\\n\"\n + \"\\n\"\n + \"R moves from (200.0,200.0) to (300.0,300.0) from time t=10 to t=50\\n\"\n + \"C moves from (500.0,100.0) to (500.0,400.0) from time t=20 to t=70\\n\"\n + \"C changes color from (0,0,1) to (0,1,0) from time t=50 to t=80\\n\"\n + \"R changes width from 50.0 to 25.0 from time t=51 to t=70\"\n + \"\\nR moves from (300.0,300.0) to (200.0,200.0) from time\"\n + \" t=70 to t=100\\n\",\n testAnimation.toString());\n }", "public void onAnimationStart(Animation animation) {\n\r\n }", "@Override\n protected void animStart() {\n }", "public void makePath() {\n\t\tQueue<GamePoint> newPath = new LinkedList<GamePoint>();\n\t\ttarget.setOnMouseEntered(e -> target.getGrid().setGridLinesVisible(true));\n\t\ttarget.setOnMouseExited(e -> target.getGrid().setGridLinesVisible(false));\n\t\ttarget.setOnMouseDragged(e -> targetSetOnMouseDragged(target, e, newPath));\n\t\ttarget.setOnMouseReleased(e -> replacePath(newPath));\n\t}", "@Override\n public void onAnimationStart(Animation arg0) {\n \n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "@Override\n public void onAnimationStart(Animation anim) {\n }", "public abstract void animationStarted();", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void onAnimationStart(Animation arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onAnimationStart(Animation arg0) {\n\t\t\n\t}", "public void playWinAnimation()\n {\n // MAKE A NEW PATH\n ArrayList<Integer> winPath = new ArrayList();\n \n // THIS HAS THE APPROXIMATE PATH NODES, WHICH WE'LL SLIGHTLY\n // RANDOMIZE FOR EACH TILE FOLLOWING THE PATH.\n winPath.add(getGameWidth() - 8*WIN_PATH_COORD);\n winPath.add(getGameHeight() - 6*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 10*WIN_PATH_COORD);\n winPath.add(getGameHeight() - 4*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 10*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 2*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 8*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 1*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 6*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 1*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 4*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 2*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 4*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 4*WIN_PATH_COORD);\n \n winPath.add(getGameWidth() - 6*WIN_PATH_COORD); \n winPath.add(getGameHeight() - 6*WIN_PATH_COORD);\n \n // START THE ANIMATION FOR ALL THE TILES\n for (int i = 0; i < stackTiles.size(); i++)\n {\n // GET EACH TILE\n MahjongSolitaireTile tile = stackTiles.get(i);\n \n // MAKE SURE IT'S MOVED EACH FRAME\n movingTiles.add(tile); \n \n // AND GET IT ON A PATH\n tile.initWinPath(winPath);\n }\n }", "@Override\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t}", "public interface AnimationView {\n\n /**\n * Displays the specific view's output. For instance, visual will produce a visual representation\n * of the data, SVG will represent SVG output of the data, and the textual will produce a text\n * output of the data.\n *\n * @throws InterruptedException if the visual view is closed early\n * @throws IOException if the txt or svg file is unable to be written \n */\n void display() throws InterruptedException, IOException;\n}", "@Override\r\n\t\t\tpublic void onAnimationStart(Animation arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\n\t\t}", "@Override\n\t\t\t\t\tpublic void onAnimationStart(Animation arg0) {\n\n\t\t\t\t\t}", "public void mo5964b() {\n this.f5416fa.setVisibility(0);\n this.f5416fa.setImageBitmap(C1413m.f5711i);\n ObjectAnimator duration = ObjectAnimator.ofFloat(this.f5416fa, \"translationY\", new float[]{0.0f, -((float) C1413m.f5711i.getHeight())}).setDuration(350);\n ObjectAnimator duration2 = ObjectAnimator.ofFloat(this.f5416fa, \"alpha\", new float[]{1.0f, 0.9f, 0.8f, 0.7f, 0.55f, 0.35f, 0.2f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}).setDuration(350);\n duration.start();\n duration2.start();\n long j = (long) 240;\n ObjectAnimator.ofFloat(this.f5436pa, \"alpha\", new float[]{0.0f, 0.3f, 0.5f, 0.7f, 0.9f, 1.0f}).setDuration(j).start();\n this.f5438qa.getMeasuredHeight();\n this.f5384D.getmImageViewHeight();\n C1413m.m6828a(27, this.f5389I);\n ObjectAnimator.ofFloat(this.f5386F, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5384D, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n ObjectAnimator.ofFloat(this.f5385E, \"alpha\", new float[]{0.0f, 1.0f}).setDuration(j).start();\n this.f5384D.getTexView().setText(getResources().getString(R.string.pause));\n this.f5384D.getmImageView().setImageResource(R.drawable.iqoo_buttonanimation);\n this.f5393M = (AnimationDrawable) this.f5384D.getmImageView().getDrawable();\n this.f5393M.start();\n duration.addListener(new C1300Wa(this));\n }", "protected abstract void animationLogicTemplate();", "public void onAnimationStart(Animation animation) {\n }", "public void rotate() {\n \t// Parameters\n \tdouble z0 = angle;\n \tint n = numberIterations;\n \t\n \t// Get color of target and current vector for explanation texts\n \tColor vectorColor = (Color) angleVectorProperties.get(AnimationPropertiesKeys.COLOR_PROPERTY);\n \tColor goalColor = (Color) trueAngleVectorProperties.get(AnimationPropertiesKeys.COLOR_PROPERTY);\n \t\n \t// Animation title + frame (rectangle around title)\n\t\tTextProperties titleProps = new TextProperties();\n\t\ttitleProps.set(AnimationPropertiesKeys.COLOR_PROPERTY, Color.BLACK);\n\t\ttitleProps.set(AnimationPropertiesKeys.FONT_PROPERTY, new Font(\"Monospaced\", \n\t\t\t Font.BOLD, 24));\n\t\t\n\t\tText title = lang.newText(new Coordinates(20, 30), \"CORDIC\", \"title\", null, titleProps);\n\t\tRect titleFrame = lang.newRect(new Offset(-5, -5, \"title\", AnimalScript.DIRECTION_NW), new Offset(5, 5, \"title\", AnimalScript.DIRECTION_SE), \"titleFrame\", null);\n\n\t\t// Animation background information\n\t\tInfoBox description = new InfoBox(lang, new Offset(0, 20, \"title\", AnimalScript.DIRECTION_SW), 20, \"Background Information\"); \n\t\tList<String> preText = Arrays.asList(\n\t\t\t\t\"CORDIC (COordinate Rotation DIgital Computer) is a numerical algorithm which efficiently calculates sine and cosine of\",\n\t\t\t\t\"a given angle in the circular rotation mode, which is shown here (other modes allow for different computations).\",\n\t\t\t\t\"It was designed to be written in hardware using only addition and shifts and has been used for example in calculators.\",\n\t\t\t\t\"However, today it is seldom used since memory is no longer an issue and one can store thousands of sine and cosine\",\n\t\t\t\t\"values and interpolate if the exact value is not available.\",\n\t\t\t\t\"In CORDIC sine and cosine of a given angle are calculated by reading their values from the vector (1, 0) that is rotated\",\n\t\t\t\t\"by the given angle. However, since only addition and shifts are available for the computation the rotation must be\",\n\t\t\t\t\"approximated through additions or subtractions of smaller, given angles that were calculated such that their tangent\",\n\t\t\t\t\"equals a power of 2 (and can thus be applied by shifting).\",\n\t\t\t\t\"Also, for convergence the given angle must be in the interval of [-1.7433, 1.7433] respectively [-99.88°, 99.88°]. Sine\",\n\t\t\t\t\"and cosine of values beyond this interval may be calculated using their symmetry properties.\");\n\t\tdescription.setText(preText);\n\t\t\n\t\tlang.nextStep(\"Introduction\");\n\n\t\t// More detailed animation background information\t\n\t\tdescription.hide();\n\t\tInfoBox formula = new InfoBox(lang, new Offset(0, 20, \"title\", AnimalScript.DIRECTION_SW), 20, \"Iteration Formula\"); \n\t\tList<String> formulaText = Arrays.asList(\n\t\t\t\t\" x[i+1] = x[i] - sigma[i]*2^(-i)*y[i]\",\n\t\t\t\t\" y[i+1] = sigma[i]*2^(-i)*x[i] + y[i]\",\n\t\t\t\t\" z[i+1] = z[i] - sigma[i]*alpha[i]\",\n\t\t\t\t\"with x[0] = 1*K, y[0] = 0 and z[0] = target angle, where\",\n\t\t\t\t\"- x and y are the cosine and sine values of the angle that the vector describes at the n-th step\",\n\t\t\t\t\"- z is the target angle minus all rotations of (i-1) steps (i.e. the difference of the current angle to the target angle)\",\n\t\t\t\t\"- sigma[i] is the direction of rotation (either -1 for clockwise or 1 for counterclockwise); it is derived from z[i] and\",\n\t\t\t\t\" multiplied with the current angle to adjust the rotation direction (which is a simple sign change in hardware)\",\n\t\t\t\t\"- alpha[i] is the current angle of rotation looked up from a table of precomputed angles with a tangent equal to a power\",\n\t\t\t\t\" of 2\",\n\t\t\t\t\"The tangent is used because instead of applying the common rotation matrix the pseudo rotation matrix\",\n\t\t\t\t\" 1 -tan(angle)\",\n\t\t\t\t\" tan(angle) 1\",\n\t\t\t\t\"is used. Multiplying the pseudo rotation matrix by a correction factor cos(angle) yields the common rotation matrix\",\n\t\t\t\t\" cos(angle) -sin(angle)\",\n\t\t\t\t\" sin(angle) cos(angle\",\n\t\t\t\t\"Since multiplication in hardware is costly and one is only interested in the sine and cosine values of x and y at step n\",\n\t\t\t\t\"of the iteration this correction factor is precomputed, looked up in a table and used for x[0], so the vector will have\",\n\t\t\t\t\"size 1 at the n-th step of the iteration. Thus\",\n\t\t\t\t\"- K = Product_i=0^n-1*cos(alpha[i])\");\n\t\tformula.setText(formulaText);\n\t\t\n\t\tlang.nextStep();\n\t\t\n\t\tformula.hide();\n\t\t\n\t\t// Function graph\n\t\tint offsetFromLeft = 20;\n\t\tint lengthOfXY = 150;\n\t\tPolyline y = lang.newPolyline(new Offset[]{(new Offset(offsetFromLeft+lengthOfXY, 55+lengthOfXY*2, \"title\", AnimalScript.DIRECTION_SW)), (new Offset(offsetFromLeft+lengthOfXY, 55, \"title\", AnimalScript.DIRECTION_SW))}, \"yArrow\", null, functionGraphProperties);\n\t\tPolyline x = lang.newPolyline(new Offset[]{(new Offset(-lengthOfXY, -lengthOfXY, \"yArrow\", AnimalScript.DIRECTION_SW)), (new Offset(lengthOfXY, -lengthOfXY, \"yArrow\", AnimalScript.DIRECTION_SW))}, \"xArrow\", null, functionGraphProperties);\n\t\t\n\t\t// Create legend (angles of vectors) with rectangle frame (hidden until vectors are created)\n\t\tTextProperties targetProperties = new TextProperties();\n\t\ttargetProperties.set(AnimationPropertiesKeys.COLOR_PROPERTY, goalColor);\n\t\ttargetProperties.set(AnimationPropertiesKeys.FONT_PROPERTY, new Font(\"Monospaced\", Font.BOLD, 12));\n\t\tTextProperties vectorLegendProperties = new TextProperties();\n\t\tvectorLegendProperties.set(AnimationPropertiesKeys.COLOR_PROPERTY, vectorColor);\n\t\tvectorLegendProperties.set(AnimationPropertiesKeys.FONT_PROPERTY, new Font(\"Monospaced\", Font.BOLD, 12));\n\t\t\n\t\tText legendVector = lang.newText(new Offset(50, -lengthOfXY, \"xArrow\", AnimalScript.DIRECTION_NE), \"Current Angle\", \"legendVector\", null, vectorLegendProperties);\n\t\tText legendTarget = lang.newText(new Offset(0, 10, \"legendVector\", AnimalScript.DIRECTION_SW), \"Target Angle = \" + Math.toDegrees(z0), \"legendTarget\", null, targetProperties);\n\t\t\n\t\tRect legendFrame = lang.newRect(new Offset(-15, -15, \"legendVector\", AnimalScript.DIRECTION_NW), new Offset(15, 15, \"legendTarget\", AnimalScript.DIRECTION_SE), \"legendFrame\", null, legendFrameProperties);\n\n\t\tlegendVector.hide();\n\t\tlegendTarget.hide();\n\t\tlegendFrame.hide();\n\t\t\n\t\t// Source code and frame placed to the right of the legend\n\t\tSourceCode code = lang.newSourceCode(new Offset(50, 100, \"legendFrame\", AnimalScript.DIRECTION_NE), \"code\", null, sourceCodeProperties);\n\t\tcode.addCodeLine(\"define cordic(angle, numberIterations) //rotation mode\", \"definition\", 0, null);\n\t\tcode.addCodeLine(\"x[0] = K // get K from table\", \"xdef\", 2, null);\n\t\tcode.addCodeLine(\"y[0] = 0\", \"ydef\", 2, null);\n\t\tcode.addCodeLine(\"for i=0 to numberIterations-1 do\", \"for\", 2, null);\n\t\tcode.addCodeLine(\"if z[i] > 0\", \"if\", 4, null);\n\t\tcode.addCodeLine(\"sigma_i = 1\", \"posSigma\", 6, null);\n\t\tcode.addCodeLine(\"else\", \"else\", 4, null);\n\t\tcode.addCodeLine(\"sigma_i = -1\", \"negSigma\", 6, null);\n\t\tcode.addCodeLine(\"x[i+1] = x[i] - sigma_i*2^(-i)*y[i]\", \"xi\", 4, null);\n\t\tcode.addCodeLine(\"y[i+1] = sigma_i*2^(-i)*x[i] + y[i]\", \"yi\", 4, null);\n\t\tcode.addCodeLine(\"z[i+1] = z[i] - sigma_i*alpha_i // get alpha_i from table\", \"zi\", 4, null);\n\t\tcode.addCodeLine(\"return (x[numberIterations], y[numberIterations])\", \"return\", 2, null);\n\t\t\n\t\tRect codeFrame = lang.newRect(new Offset(-5, -5, \"code\", AnimalScript.DIRECTION_NW), new Offset(5, 5, \"code\", AnimalScript.DIRECTION_SE), \"codeFrame\", null, codeFrameProperties);\n\t\t\n\t\tlang.nextStep();\n\t\t\n\t\tcode.highlight(0);\n\t\t\n\t\t// Target vector\n\t\tPolyline goal = lang.newPolyline(new Offset[]{(new Offset(-lengthOfXY, 0, \"xArrow\", AnimalScript.DIRECTION_NE)), (new Offset(0, 0, \"xArrow\", AnimalScript.DIRECTION_NE))}, \"goalVector\", null, trueAngleVectorProperties);\n\t\tgoal.rotate(new Offset(-lengthOfXY, 0, \"xArrow\", AnimalScript.DIRECTION_NE), (int)Math.toDegrees(z0), null, null);\n\t\t\n\t\t// Show legend\n\t\tlegendVector.show();\n\t\tlegendTarget.show();\n\t\tlegendFrame.show();\n\t\t\n\t\t// Create number counter of iterations\n\t\tText nText = lang.newText(new Offset(0, 10, \"legendFrame\", AnimalScript.DIRECTION_SW), \"Iteration = 0\", \"nText\", null);\n\t\tnText.hide();\n\t\t// Create display text for z_i\n\t\tText ziText = lang.newText(new Offset(0, 8, \"nText\", AnimalScript.DIRECTION_SW), \"z_0 = \" + z0, \"ziText\", null);\n\t\tziText.hide();\n\t\t\n\t\tlang.nextStep(\"Initialization\");\n\t\t\n\t\tcode.unhighlight(0);\n\t\t\n\t\t// Call algorithm for CORDIC circular rotation and get the result for x[n] and y[n]\n\t\tdouble result[] = algorithmRotation(z0, n, lengthOfXY, code, legendVector, nText, ziText);\n\t\t\n\t\tcode.highlight(11);\n\n\t\t// Show marker for final sine and cosine values\n\t\tint xOffset = (int)(result[0]*lengthOfXY+lengthOfXY);\n\t\tint yOffset = (int)(result[1]*lengthOfXY+lengthOfXY);\n\t\tPolyline sin = lang.newPolyline(new Offset[]{(new Offset(6, -yOffset, \"yArrow\", AnimalScript.DIRECTION_SW)), (new Offset(-6, -yOffset, \"yArrow\", AnimalScript.DIRECTION_SW))}, \"sine\", null);\n\t\tPolyline cos = lang.newPolyline(new Offset[]{(new Offset(xOffset, 6, \"xArrow\", AnimalScript.DIRECTION_NW)), (new Offset(xOffset, -6, \"xArrow\", AnimalScript.DIRECTION_NW))}, \"cosine\", null);\n\t\t\n\t\t// Show final values of CORDIC and values of target angle\n\t\tText sinText = lang.newText(new Offset(-50, -35, \"yArrow\", AnimalScript.DIRECTION_N), \"sine = \" + result[1], \"sineText\", null, vectorLegendProperties);\n\t\tText cosText = lang.newText(new Offset(0, 0, \"xArrow\", AnimalScript.DIRECTION_SE), \"cosine = \" + result[0], \"cosineText\", null, vectorLegendProperties);\n\t\t\n\t\tText trueSinText = lang.newText(new Offset(0, 5, \"sineText\", AnimalScript.DIRECTION_SW), \"sine = \" + Math.sin(z0), \"sineText\", null, targetProperties);\n\t\tText trueCosText = lang.newText(new Offset(0, 5, \"cosineText\", AnimalScript.DIRECTION_SW), \"cosine = \" + Math.cos(z0), \"cosineText\", null, targetProperties);\n\t\t\n\t\tnText.hide();\n\t\tziText.hide();\n\t\t\n\t\tlang.nextStep(\"Leave Algorithm\");\n\t\t\n\t\t// HideAllPrimitivesExcept does not seem to work with\n\t\t// lang.hideAllPrimitivesExcept(Arrays.asList(title, titleFrame));\n\t\tlang.hideAllPrimitives();\n\t\t\n\t\ttitle.show();\n\t\ttitleFrame.show();\n\t\t\n\t\t// Final remark\n\t\tInfoBox outlook = new InfoBox(lang, new Offset(0, 20, \"title\", AnimalScript.DIRECTION_SW), 20, \"Final Remark\"); \n\t\tList<String> postText = Arrays.asList(\n\t\t\t\t\"This animation displayed the so called circular rotation mode of CORDIC for calculating sine and cosine of a given angle.\",\n\t\t\t\t\"The circular mode of CORDIC includes another so called vector mode which is the reverse of the rotation mode and provides\",\n\t\t\t\t\"the absolute of a vector and its angle. The changes necessary to apply this mode is to set z[0] = 0 and let the user\",\n\t\t\t\t\"define x[0] and y[0] (though the absolute value x[n] must be divided by K to obtain the real absolute value). Also, sigma[i]\",\n\t\t\t\t\"is evaluated using y[i-1] instead of z[i-1] (the basic idea is to try to rotate until y is zero instead of until the\",\n\t\t\t\t\"difference between the target and current angle is zero).\",\n\t\t\t\t\"Beyond that, even more modes exist which calculate for example the hyperbolical functions. These modes require different\",\n\t\t\t\t\"values for the variables than the circular mode and an additional one to generalize the algorithm.\");\n\t\toutlook.setText(postText);\n\t\t\n\t\tlang.nextStep(\"Final Remark\");\n\t}", "@Override\n\t\t\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "public Timeline createLineAnimation(AnchorPane anchor_pane_map, int duration, int stop_duration, ArrayList<Coordinate> affected_points, int slow_duration, int slow_stop_duration, EventHandler<MouseEvent> handler, boolean detour_delay)\r\n {\r\n // coordinates of path for vehicle on transportline\r\n ArrayList<Coordinate> line_coordinates = this.transportLinePath();\r\n // ids of coordinates of path for vehicle on transportline\r\n ArrayList<String> line_coordinates_ids = this.transportLinePathIDs();\r\n // all stops for transportline\r\n List<Stop> line_stops = this.getStopsMap();\r\n // create vehicle for line (circle)\r\n Circle vehicle = new Circle(this.getStopsMap().get(0).getCoordinate().getX(), this.getStopsMap().get(0).getCoordinate().getY(), 10);\r\n vehicle.setStroke(Color.AZURE);\r\n vehicle.setFill(this.getTransportLineColor());\r\n vehicle.setStrokeWidth(5);\r\n addLineVehicles(vehicle);\r\n vehicle.setOnMouseClicked(handler);\r\n\r\n Timeline timeline = new Timeline();\r\n int original_duration = duration;\r\n int original_stop_duration = stop_duration;\r\n\r\n // add all keyframes to timeline - one keyframe means path from one coordinate to another coordinate\r\n // vehicle waits in stop for 1 seconds and go to another coordinate for 2 seconds (in default mode)\r\n int delta_time = 0;\r\n KeyFrame waiting_in_stop = null;\r\n for (int i = 0; i < line_coordinates.size() - 1; i++) {\r\n // if we go through street affected by slow traffic\r\n if (line_coordinates.get(i).isInArray(affected_points) && line_coordinates.get(i+1).isInArray(affected_points))\r\n {\r\n // duration between coordinates and duration of waiting in stop is different\r\n duration = slow_duration;\r\n stop_duration = slow_stop_duration;\r\n }\r\n else\r\n {\r\n // else use default duration\r\n duration = original_duration;\r\n stop_duration = original_stop_duration;\r\n }\r\n\r\n for (Stop s : line_stops) {\r\n // if we are in stop, we wait 'stop_duration' time\r\n if (line_coordinates.get(i).getX() == s.getCoordinate().getX() && line_coordinates.get(i).getY() == s.getCoordinate().getY()) {\r\n waiting_in_stop = new KeyFrame(Duration.seconds(delta_time + stop_duration), // this means waiting in stop for some time\r\n new KeyValue(vehicle.centerXProperty(), line_coordinates.get(i).getX()),\r\n new KeyValue(vehicle.centerYProperty(), line_coordinates.get(i).getY()));\r\n\r\n delta_time = delta_time + stop_duration;\r\n break;\r\n }\r\n }\r\n // we travelled for 'duration' time\r\n KeyFrame end = new KeyFrame(Duration.seconds(delta_time + duration), // this means that the path from one coordinate to another lasts 2 seconds\r\n new KeyValue(vehicle.centerXProperty(), line_coordinates.get(i + 1).getX()),\r\n new KeyValue(vehicle.centerYProperty(), line_coordinates.get(i + 1).getY()));\r\n\r\n if (waiting_in_stop != null) {\r\n timeline.getKeyFrames().addAll(end, waiting_in_stop);\r\n } else {\r\n timeline.getKeyFrames().addAll(end);\r\n }\r\n\r\n delta_time = delta_time + duration;\r\n }\r\n\r\n timeline.setCycleCount(Timeline.INDEFINITE); // infinity number of repetitions\r\n anchor_pane_map.getChildren().add(vehicle);\r\n\r\n if (detour_delay == false)\r\n {\r\n this.setDelay(duration, slow_duration, affected_points.size());\r\n }\r\n else\r\n {\r\n this.delay = this.detour_streets.size() * duration - duration;\r\n }\r\n\r\n return timeline;\r\n }", "private void setupAnimationTimer() {\n new AnimationTimer() {\n @Override\n public void handle(long l) {\n view.movePlayer();\n view.updateView();\n }\n }.start();\n\n // Timeline for UI stuff\n uiTimeline = new Timeline();\n\n KeyFrame keyStart = new KeyFrame(\n Duration.seconds(0),\n e -> view.updateUI((1160 / distance) * 0.005)\n );\n KeyFrame keyEnd = new KeyFrame(Duration.millis(5));\n\n uiTimeline.getKeyFrames().addAll(keyStart, keyEnd);\n uiTimeline.setCycleCount(Timeline.INDEFINITE);\n uiTimeline.setAutoReverse(false);\n\n countdownTimer = new Timeline(\n new KeyFrame(\n Duration.seconds(distance - (1160 / distance) * 0.005),\n e -> journeyComplete()\n )\n );\n\n // Timeline for asteroids\n Timeline asteroidTimer = new Timeline(\n new KeyFrame(Duration.millis(2000), e -> model.AsteroidPool.spawn())\n );\n asteroidTimer.setCycleCount(Timeline.INDEFINITE);\n asteroidTimer.play();\n }", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\n\t\t\t}", "@Override\r\n\t\t\t\tpublic void onAnimationStart(Animation animation) {\n\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onAnimationStart(Animation animation) {\n\r\n\t\t\t\t}", "@Override\n public void onAnimationEnd(Animator animation) {\n ViewGroup.LayoutParams lp = LifeLabActivity.this.anim_view.getLayoutParams();\n lp.width = view.getWidth();\n lp.height = view.getHeight();\n LifeLabActivity.this.anim_view.setLayoutParams(lp);\n LifeLabActivity.this.anim_view.setX(view.getX());\n LifeLabActivity.this.anim_view.setY(view.getY());\n LifeLabActivity.this.anim_view.setVisibility(View.VISIBLE);\n LifeLabActivity.this.anim_view.post(new Runnable() {\n @Override\n public void run() {\n AnimatorSet as = new AnimatorSet();\n ValueAnimator x = ObjectAnimator.ofFloat(LifeLabActivity.this.anim_view, \"x\", LifeLabActivity.this.anim_view.getX(), 0);\n ValueAnimator y = ObjectAnimator.ofFloat(LifeLabActivity.this.anim_view, \"y\", LifeLabActivity.this.anim_view.getY(), 0);\n float x0 = LifeLabActivity.this.anim_view.getScaleX();\n float y0 = LifeLabActivity.this.anim_view.getScaleY();\n float sx = (float) Utils.getScreenWidthPx(LifeLabActivity.this) / (float) LifeLabActivity.this.anim_view.getWidth();\n ValueAnimator scalex = ObjectAnimator.ofFloat(LifeLabActivity.this.anim_view, \"scaleX\", x0, x0 * sx * 2);\n //Log.d(TAG, String.format(\"run X: %f, %f\", x0, x0 * sx));\n float sy = (float) Utils.getScreenHeightPx(LifeLabActivity.this) / (float) LifeLabActivity.this.anim_view.getHeight();\n //Log.d(TAG, String.format(\"screenH: %d, viewH:%d\", Utils.getScreenHeightPx(LifeLabActivity.this), LifeLabActivity.this.anim_view.getHeight()));\n //Log.d(TAG, String.format(\"y0: %f, sy: %f, y1: %f\", y0, sy, y0 * sy));\n ValueAnimator scaley = ObjectAnimator.ofFloat(LifeLabActivity.this.anim_view, \"scaleY\", y0, y0 * sy * 6);\n //Log.d(TAG, String.format(\"run Y: %f, %f\", x0, y0 * sy));\n as.play(x).with(scalex).with(y).with(scaley);\n //as.play(x).with(y);\n as.setDuration(300);\n as.addListener(new Animator.AnimatorListener() {\n @Override\n public void onAnimationStart(Animator animation) {\n\n }\n\n @Override\n public void onAnimationEnd(Animator animation) {\n View x = LifeLabActivity.this.anim_view;\n //Log.d(TAG, String.format(\"onAnimationEnd: %f %f %d %d\", x.getX(), x.getY(), x.getWidth(), x.getHeight()));\n Intent intent = new Intent(LifeLabActivity.this, LifeLabItemActivity.class);\n intent.putExtra(LifeLabItemActivity.LIFELAB_COLLECTION, lc);\n LifeLabActivity.this.startActivityForResult(intent, 0);\n }\n\n @Override\n public void onAnimationCancel(Animator animation) {\n\n }\n\n @Override\n public void onAnimationRepeat(Animator animation) {\n\n }\n });\n as.start();\n\n }\n });\n }", "@Test\n\tpublic void animationTest() {\n\t\t\n\t\tMap<Direction, TimeAnimation> animationMap = Player.makePlayerAnimation(PlayerType.CAVEMAN.name(), \n\t\t\t\tPlayerState.IDLE, 1, 1, null);\n\t\t\n\t\t// Test setting idle animation to north\n\t\tarcher.setAnimation(animationMap.get(Direction.N));\n\t\t\n\t\t// Test setting idle animation to south\n\t\tarcher.setAnimation(animationMap.get(Direction.S));\n\t\t\t\t\n\t\t// Test setting idle animation to south west\n\t\tarcher.setAnimation(animationMap.get(Direction.SW));\n\t}", "public void createCode(){\n\t\tsc = animationScript.newSourceCode(new Coordinates(10, 60), \"sourceCode\",\r\n\t\t\t\t\t\t null, AnimProps.SC_PROPS);\r\n\t\t \r\n\t\t// Add the lines to the SourceCode object.\r\n\t\t// Line, name, indentation, display dealy\r\n\t\tsc.addCodeLine(\"1. Berechne für jede (aktive) Zeile und Spalte der Kostenmatrix\", null, 0, null); // 0\r\n\t\tsc.addCodeLine(\" die Differenz aus dem kleinsten (blau) und zweit-kleinsten (lila)\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Element der entsprechenden Zeile/ Spalte.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"2. Wähle die Zeile oder Spalte (grün) aus bei der sich die größte\", null, 0, null); \r\n\t\tsc.addCodeLine(\" Differenz (blau) ergab.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"3. Das kleinste Element der entsprechenden Spalte\", null, 0, null); \r\n\t\tsc.addCodeLine(\" (bzw. Zeile) gibt nun die Stelle an, welche im\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Transporttableau berechnet wird (blau).\", null, 0, null);\r\n\t\tsc.addCodeLine(\"4. Nun wird der kleinere Wert von Angebots- und\", null, 0, null); // 4\r\n\t\tsc.addCodeLine(\" Nachfragevektor im Tableau eingetragen.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"5. Anschließend wird der eingetragene Wert von den Rändern\", null, 0, null); // 5\r\n\t\tsc.addCodeLine(\" abgezogen (mindestens einer muss 0 werden). \", null, 0, null);\r\n\t\tsc.addCodeLine(\"6. Ist nun der Wert im Nachfragevektor Null so markiere\", null, 0, null); // 6\r\n\t\tsc.addCodeLine(\" die entsprechende Spalte in der Kostenmatrix. Diese\", null, 0, null);\r\n\t\tsc.addCodeLine(\" wird nun nicht mehr beachtet (rot). Ist der Wert des\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Angebotsvektors Null markiere die Zeile der Kostenmatrix.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"7. Der Algorithmus wird beendet, falls lediglich eine Zeile oder\", null, 0, null); // 8\r\n\t\tsc.addCodeLine(\" Spalte der Kostenmatrix unmarkiert ist (eines reicht aus).\", null, 0, null);\r\n\t\tsc.addCodeLine(\"8 . Der entsprechenden Zeile bzw. Spalte im Transporttableau werden\", null, 0, null); // 9\t\t \r\n\t\tsc.addCodeLine(\" die restlichen Angebots- und Nachfragemengen zugeordnet.\", null, 0, null);\r\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\r\n\t\t\t}", "public abstract void animation(double seconds);", "public PathOverlay drawPath(Path path);", "public void drawHealth(int x, int y) {\n pushMatrix();\n translate(x, y);\n scale(0.8f);\n smooth();\n noStroke();\n fill(0);\n beginShape();\n vertex(52, 17);\n bezierVertex(52, -5, 90, 5, 52, 40);\n vertex(52, 17);\n bezierVertex(52, -5, 10, 5, 52, 40);\n endShape();\n fill(255,0,0);\n beginShape();\n vertex(50, 15);\n bezierVertex(50, -5, 90, 5, 50, 40);\n vertex(50, 15);\n bezierVertex(50, -5, 10, 5, 50, 40);\n endShape();\n popMatrix();\n}", "private void m217f() {\n RectF rectF = new RectF(-this.f407h, -this.f407h, this.f407h, this.f407h);\n RectF rectF2 = new RectF(rectF);\n rectF2.inset(-this.f411l, -this.f411l);\n if (this.f408i == null) {\n this.f408i = new Path();\n } else {\n this.f408i.reset();\n }\n this.f408i.setFillType(FillType.EVEN_ODD);\n this.f408i.moveTo(-this.f407h, 0.0f);\n this.f408i.rLineTo(-this.f411l, 0.0f);\n this.f408i.arcTo(rectF2, 180.0f, 90.0f, false);\n this.f408i.arcTo(rectF, 270.0f, -90.0f, false);\n this.f408i.close();\n float f = this.f407h / (this.f407h + this.f411l);\n Paint paint = this.f404e;\n RadialGradient radialGradient = new RadialGradient(0.0f, 0.0f, this.f407h + this.f411l, new int[]{this.f414o, this.f414o, this.f415p}, new float[]{0.0f, f, 1.0f}, TileMode.CLAMP);\n paint.setShader(radialGradient);\n Paint paint2 = this.f405f;\n LinearGradient linearGradient = new LinearGradient(0.0f, (-this.f407h) + this.f411l, 0.0f, (-this.f407h) - this.f411l, new int[]{this.f414o, this.f414o, this.f415p}, new float[]{0.0f, 0.5f, 1.0f}, TileMode.CLAMP);\n paint2.setShader(linearGradient);\n this.f405f.setAntiAlias(false);\n }", "public DirectShapeRenderer beginPath() {\n \t\treturn renderer.beginPath();\n \t}", "public interface IAnimationController {\n\n /**\n * This method should start the animation using the provided model.\n */\n void start();\n\n /**\n * Retrieve the log from this controller.\n *\n * @return The log of this controller\n * @throws UnsupportedOperationException Throws exception if the controller does not support the\n * functionality\n */\n Appendable getLog();\n\n /**\n * Retrieve the timer from this controller.\n * @return The timer of this controller\n * @throws UnsupportedOperationException Throws exception if the controller does not support the\n * functionality\n */\n Timer getTimer();\n\n /**\n * Retrieves the tempo of the controller.\n * @return tempo used by controller\n * @throws UnsupportedOperationException Throws exception if the controller does not support the\n * functionality\n */\n double getTempo();\n\n\n}", "public AnimationSVGView(AnimationModel model, Appendable out, int speed) {\n this.model = model;\n this.out = out;\n this.speed = speed;\n }", "@Test\n public void testShapesNoMovement() throws IOException {\n AnimationModel am = new SimpleAnimationModel();\n StringBuilder sb = new StringBuilder();\n am.addShape(\"Reccy\", ShapeType.RECTANGLE);\n int[] rgb = {50, 40, 20};\n am.addMotion(10, 15, 15, 15, 9,\n 9, 30, 30, 4, 4, rgb,\n rgb, \"Reccy\");\n am.startAnimation();\n IAnimationView av = new SVGAnimationView(am, 2, sb);\n av.render();\n assertEquals(\"<svg viewBox = \\\"0 0 0 0\\\" version=\\\"1.1\\\" \"\n + \"xmlns=\\\"http://www.w3.org/2000/svg\\\">\\n\"\n + \"<rect id=\\\"Reccy\\\" x=\\\"15.00\\\" y=\\\"9.00\\\" width=\\\"30.00\\\" \"\n + \"height=\\\"4.00\\\" fill=\\\"rgb(50,40,20)\\\" visibility=\\\"hidden\\\" >\\n\"\n + \"<animate attributeType=\\\"xml\\\" begin=\\\"0.0ms\\\" dur=\\\"5000.0ms\\\" \"\n + \"attributeName=\\\"visibility\\\" from=\\\"hidden\\\" to=\\\"visible\\\" fill=\\\"freeze\\\" /></rect>\\n\"\n + \"</svg>\", sb.toString());\n }", "@Override\n public void onAnimationStart(Animation animation) {\n\n }", "@Override\n public void onAnimationStart(Animation animation) {\n\n }", "@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\r\n\t\t\t}", "@Override\n\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t}", "@Override\n\tpublic void onAnimationStart(Animation animation) {\n\n\t}", "@Override\r\n\t\t\t\t\tpublic void onAnimationStart(Animation animation) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "public void animationTrans() {\n float unitAngle;\n if (type == CIRCLE) {\n unitAngle = (float) 360 / defaultCount;\n } else {\n unitAngle = 45f;\n }\n final float oldAngle = mAngle;\n float nAngle = mAngle % actualAngle;\n float gapAngle = (float) (nAngle / unitAngle) - (int) (nAngle / unitAngle);\n\n final float willAngle;\n if (type == CIRCLE) {\n willAngle = (float) ((0.5 - gapAngle) * unitAngle);\n } else {\n if (gapAngle < 0.5) {\n willAngle = (float) ((0 - gapAngle) * unitAngle);\n } else {\n willAngle = (float) ((1 - gapAngle) * unitAngle);\n }\n }\n Animation a = new Animation() {\n\n @Override\n protected void applyTransformation(float interpolatedTime, Transformation t) {\n\n mAngle = oldAngle + willAngle * interpolatedTime;\n\n requestLayout();\n }\n\n @Override\n public boolean willChangeBounds() {\n return true;\n }\n };\n\n a.setDuration(200);\n startAnimation(a);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n\n if (animationInProgress) {\n logger.info(\"Lost frame...\");\n return;\n }\n animationInProgress = true;\n\n java.util.List<Double> toIndex = indexFind.get(0);\n\n int value = Step + stepStep * animDirection;\n if (value < 1) {\n value = 1;\n }\n else if (value > toIndex.size()) {\n value = toIndex.size() - 1;\n }\n\n Step = value;\n\n try {\n long start = System.currentTimeMillis();\n XYPlot plot = (XYPlot)this.chartPanel.getChart().getPlot();\n currentIndex = Step - 1;\n plot.setDomainCrosshairValue(toIndex.get(currentIndex));\n //selectStructure(Step);\n //structureManagerInterface.selectStructure(currentIndex);\n float secs = (System.currentTimeMillis() - start) / 1000.0f;\n logger.info(\"Elapsed time: \" + secs);\n //setSnapshotValue(Step);\n }\n catch (Exception ex) {\n animationInProgress = false;\n timer.stop();\n JOptionPane.showMessageDialog(this, \"Error during animation: \" + ex.getMessage() + \"\\nAnimation stopped\", \"Error\",\n JOptionPane.ERROR_MESSAGE);\n return;\n }\n\n if (animationMode == 0) { // Animate once\n if (Step == 1 && animDirection == -1) {\n stopAnimation();\n }\n else if (Step == toIndex.size() && animDirection == 1) {\n stopAnimation();\n }\n }\n\n else if (animationMode == 1) { // Animate in loop\n if (Step == 1 && animDirection == -1) {\n Step = toIndex.size();\n }\n else if (Step == toIndex.size() && animDirection == 1) {\n Step = 1;\n }\n }\n\n else if (animationMode == 2) { // Animate back & forth\n if (Step == 1 && animDirection == -1) {\n if (toIndex.size() > 1) {\n Step = 1;\n animDirection = 1;\n }\n }\n else if (Step == toIndex.size() && animDirection == 1) {\n if (toIndex.size() > 1) {\n Step = toIndex.size() - 1;\n animDirection = -1;\n }\n }\n }\n\n animationInProgress = false;\n }", "Animation getStructure();", "private void initAnim()\n {\n \t\n //leftWalk = AnimCreator.createAnimFromPaths(Actor.ANIM_DURATION, \n // AUTO_UPDATE, leftWalkPaths);\n // get the images for leftWalk so we can flip them to use as right.#\n \tImage[] leftWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] rightWalkImgs = new Image[leftWalkPaths.length];\n \tImage[] leftStandImgs = new Image[leftStandPaths.length];\n \tImage[] rightStandImgs = new Image[leftStandPaths.length];\n \t\n \t\n \t\n \tleftWalkImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftWalkPaths).toArray(leftWalkImgs);\n \t\n \theight = leftWalkImgs[0].getHeight();\n \t\n \trightWalkImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftWalkImgs).toArray(rightWalkImgs);\n \t\n \tleftStandImgs = AnimCreator.getImagesFromPaths(\n \t\t\tleftStandPaths).toArray(leftStandImgs);\n \t\n \trightStandImgs = AnimCreator.getHorizontallyFlippedCopy(\n \t\t\tleftStandImgs).toArray(rightStandImgs);\n \t\n \tboolean autoUpdate = true;\n \t\n \tleftWalk = new /*Masked*/Animation(\n\t\t\t\t\t\t leftWalkImgs, \n\t\t\t\t\t\t Actor.ANIM_DURATION, \n\t\t\t\t\t\t autoUpdate);\n\n \trightWalk = new /*Masked*/Animation(\n \t\t\t\t\t\trightWalkImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t autoUpdate);\n \t\n \tleftStand = new /*Masked*/Animation(\n \t\t\t\t\t\tleftStandImgs, \n\t\t\t\t\t\t\tActor.ANIM_DURATION, \n\t\t\t\t\t\t\tautoUpdate);\n \t\n \trightStand = new /*Masked*/Animation(\n \t\t\t\t\t\trightStandImgs, \n \t\t\t\t\t\tActor.ANIM_DURATION,\n \t\t\t\t\t\tautoUpdate);\n \t\n \tsetInitialAnim();\n }", "void onAnimationStart();", "public void setAnimaciones( ){\n\n int x= 0;\n Array<TextureRegion> frames = new Array<TextureRegion>();\n for(int i=1;i<=8;i++){\n frames.add(new TextureRegion(atlas.findRegion(\"demon01\"), x, 15, 16, 15));\n x+=18;\n }\n this.parado = new Animation(1 / 10f, frames);//5 frames por segundo\n setBounds(0, 0, 18, 15);\n\n }", "public interface ImageAnimation \n { \n }", "private Animation animateBranchGrowing(List<Branch> branchGeneration, int depth, Duration duration) {\n final ParallelTransition sameDepthBranchAnimation = new ParallelTransition();\n\n for (final Branch branch : branchGeneration) {\n final KeyValue keyValue = new KeyValue(branch.base.endYProperty(), branch.length);\n final KeyFrame keyFrame = new KeyFrame(duration, keyValue);\n final Timeline branchGrowingAnimation = new Timeline(keyFrame);//line is growing by changinh endY from 0 to brunch.lengt\n\n final PauseTransition pauseTransition = new PauseTransition();\n pauseTransition.setDuration(Duration.ONE);\n pauseTransition.setOnFinished(event -> branch.base.setStrokeWidth(branch.length / 25));\n\n sameDepthBranchAnimation.getChildren().add(\n new SequentialTransition(\n //To set width from 0 to some value we use pause transition with duration.one millisecond\n //trick to show lines\n pauseTransition,\n branchGrowingAnimation\n )\n );\n }\n\n return sameDepthBranchAnimation;\n\n }", "@Override\n\t public void onAnimationStart(Animation animation) {\n\t \n\t }", "@Test\n public void testAddShape() {\n // add the \"R\" & \"C\" shapes to the animation\n testAnimation.addShape(r, 1, 100);\n testAnimation.addShape(c, 6, 100);\n\n assertEquals(\"Shapes:\\n\"\n + \"Name: R\\n\"\n + \"Type: rectangle\\n\"\n + \"Min corner: (200.0,200.0), Width: 50.0, Height: 100.0, Color: (1,0,0)\\n\"\n + \"Appears at t=1\\n\"\n + \"Disappears at t=100\\n\"\n + \"\\n\"\n + \"Name: C\\n\"\n + \"Type: ellipse\\n\"\n + \"Center: (500.0,100.0), X radius: 60.0, Y radius: 30.0, Color: (0,0,1)\\n\"\n + \"Appears at t=6\\n\"\n + \"Disappears at t=100\\n\"\n + \"\\n\", testAnimation.toString());\n }", "@Override\n public void onAnimationStart(Animation animation) {\n }", "@Override\n\t\tpublic void onAnimationStart(Animator animation) {\n\t\t\t\n\t\t}", "public Bitmap getPath(){\n\n // Path defines line, Paint defines the color\n Path path = new Path();\n Paint paint = new Paint();\n\n paint.setAntiAlias(true);\n\n // Defines shape and size\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeJoin(Paint.Join.ROUND);\n paint.setStrokeCap(Paint.Cap.SQUARE);\n\n // Creates a drawing block\n Bitmap bitmap = Bitmap.createBitmap(\n BITMAP_SIZE,\n BITMAP_SIZE,\n Bitmap.Config.ARGB_8888);\n\n // What draws on the bitmap\n Canvas canvas = new Canvas(bitmap);\n\n // Background color\n canvas.drawColor(Color.LTGRAY);\n\n // Draws 4 circles: green, yellow, red, gray\n paint.setStrokeWidth(15);\n paint.setColor(Color.GREEN);\n canvas.drawCircle(BITMAP_SIZE/2,BITMAP_SIZE/2,BITMAP_SIZE *.125f,paint);\n paint.setColor(Color.YELLOW);\n canvas.drawCircle(BITMAP_SIZE/2,BITMAP_SIZE/2,BITMAP_SIZE *.25f,paint);\n paint.setColor(Color.RED);\n canvas.drawCircle(BITMAP_SIZE/2,BITMAP_SIZE/2,BITMAP_SIZE *.375f,paint);\n paint.setColor(Color.DKGRAY);\n canvas.drawCircle(BITMAP_SIZE/2,BITMAP_SIZE/2,BITMAP_SIZE *.5f,paint);\n\n // Defines a line being drawn\n paint.setColor(Color.BLACK);\n paint.setStrokeWidth(5);\n path.moveTo(BITMAP_SIZE/2,BITMAP_SIZE/2);\n\n // Translate the XY coordinates to our coordinate system\n float[] translationVector = getTranslationVector(\n center.getX(),\n center.getY(),\n BITMAP_SIZE,\n BITMAP_SIZE,\n CONSTANT);\n //Draws the path\n for(MeasurementService.DataPoint p: list){\n path.lineTo(\n (p.getX() * CONSTANT) + translationVector[0],\n (p.getY() * CONSTANT) + translationVector[1]\n );\n }\n // Finalize the drawings in to the bitmap; (\"Push the drawings to the bitmap\")\n canvas.drawPath(path,paint);\n\n // Return the bitmap\n return bitmap;\n }", "public void updateAnimation() {\n\t\tif (anim < 1000) {\n\t\t\tanim++;\n\t\t} else anim = 0;\n\t}", "private void initBazier() {\n final float xPoint[] = new float[]{0, 200, 400, 600, 900};\n final float yPoint[] = new float[]{0, 800, 600, 1000, 200};\n \n Path path = mBazier;\n \n \n for (int i = 0; i < 1000; i++) {\n float progress = i / (float) 1000;\n float x = calculateBazierPoint(progress, xPoint);\n float y = calculateBazierPoint(progress, yPoint);\n //使用连接的方式 当xy变化足够小时,链接成的就是一条平滑的曲线\n path.lineTo(x, y);\n //刷新\n postInvalidate();\n try {\n Thread.sleep(50);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n \n }", "public void startAnimation() {\n animationStart = System.currentTimeMillis();\n }", "public A(){ \n super();\n AtrEA = new GreenfootImage(\"AtrEA.png\");\n DerEA1 = new GreenfootImage(\"DerEA1.png\");\n DerEA2 = new GreenfootImage(\"DerEA2.png\");\n DerEA3 = new GreenfootImage(\"DerEA3.png\");\n FrtEA1 = new GreenfootImage(\"FrtEA1.png\");\n FrtEA2 = new GreenfootImage(\"FrtEA2.png\");\n FrtEA3 = new GreenfootImage(\"FrtEA3.png\");\n IzqEA1 = new GreenfootImage(\"IzqEA1.png\");\n IzqEA2 = new GreenfootImage(\"IzqEA2.png\");\n IzqEA3 = new GreenfootImage(\"IzqEA3.png\"); \n animationE = 0;\n start = 1; \n }", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationRepeat(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationRepeat(Animation arg0) {\n\n\t\t\t\t\t\t\t}", "AnimationObject3d getParsedAnimationObject();" ]
[ "0.63804126", "0.62874824", "0.6174012", "0.6101986", "0.60791856", "0.60788596", "0.60452604", "0.6040151", "0.60178566", "0.60154366", "0.5850884", "0.58275366", "0.57722497", "0.57670337", "0.5765467", "0.5748643", "0.57413095", "0.5730124", "0.5730124", "0.5725604", "0.57237566", "0.5714168", "0.5709644", "0.5674346", "0.5644249", "0.5644249", "0.5631788", "0.5625657", "0.5616965", "0.5606701", "0.56054676", "0.55990857", "0.55979985", "0.55979985", "0.55979985", "0.55979985", "0.5588563", "0.55584884", "0.55584884", "0.554722", "0.554722", "0.5546885", "0.5544354", "0.55355734", "0.5515264", "0.5507428", "0.5495147", "0.548676", "0.54819185", "0.5475849", "0.5445567", "0.5444587", "0.544423", "0.5430134", "0.54268205", "0.54268205", "0.54268205", "0.54268205", "0.54116905", "0.54116905", "0.5409729", "0.5401267", "0.5400149", "0.53842235", "0.5378701", "0.53772056", "0.5374214", "0.53735125", "0.5368723", "0.53684175", "0.5359678", "0.53592604", "0.5359112", "0.5355973", "0.5347316", "0.5347316", "0.5347316", "0.53427094", "0.5338851", "0.53378254", "0.533735", "0.5337126", "0.5335366", "0.5331661", "0.53240305", "0.53198344", "0.531346", "0.5307291", "0.5298121", "0.52893263", "0.5276318", "0.52757466", "0.52729917", "0.5272328", "0.5270581", "0.5267304", "0.5266946", "0.52642983", "0.52642983", "0.5263228" ]
0.5568516
37
Always print errors to the command line.
public void error(String msg) { boolean doit = level == Level.NONE || level == Level.INFO; if (log != System.err || !doit) { System.err.println(msg); } if (!doit) return; write("ERROR", msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printErrors() {\r\n\t\tif (this.syntaxError) {\r\n\t\t\tSystem.err.println(\"\\nErrors found running the parser:\");\r\n\t\t\tfor (String error : errors) {\r\n\t\t\t\tSystem.err.println(\"\\t => \" + error);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void printErrors() {\n final int size = _errors.size();\n if (size > 0) {\n System.err.println(new ErrorMsg(ErrorMsg.COMPILER_ERROR_KEY));\n for (int i = 0; i < size; i++) {\n System.err.println(\" \" + _errors.get(i));\n }\n }\n }", "private static void printUsageExitError(){\n\t\tSystem.out.println(usage);\n\t\tSystem.exit(1);\n\t}", "protected void printError(String msg) {\r\n\t\tSystem.err.println();\r\n\t\tSystem.err.println(msg);\r\n\t\tSystem.err.println(\"Invoke with '--help' for help.\");\r\n\t}", "public static void errorAndExit() {\n System.out.println(\"USAGE:\");\n System.out.println(\"java MonkeySim <num_monkeys>\");\n System.out.println(\"<num_monkeys> must be a positive signed 32-bit integer\");\n System.exit(1);\n }", "private static void printErrorMessage() {\n System.out.println(\"Oh no! It looks like I wasn't able to understand the arguments you passed in :(\"\n + \"\\nI can only handle arguments passed in a format like the following: 1/2 * 3/4\\n\");\n }", "public void usageError(String msg) {\n System.err.println(\"Usage error: \" + msg + \"\\n\");\n printUsage(System.err);\n System.exit(1);\n }", "private static void printUsage(String error, CmdLineParser parser) {\n\tSystem.out.println(error);\n\tSystem.out.print(\"Usage: Main \");\n\tparser.printSingleLineUsage(System.out);\n\tSystem.out.println(\"\");\n\treturn;\n }", "public void printErrorParse() {\n\t\tSystem.out.println(ConsoleColors.RED + \"Invalid option. Please re-enter a valid option.\" + ConsoleColors.RESET);\n\t\t\n\t}", "void printError(String errorMsg, boolean displayHelp);", "public static void main(String[] args) {\n\t\tint test = 0;\n\t\ttry{\n\t\t\tSystem.out.println(\"Hello World!\");\n\t\t\tif( test == 0 )\n\t\t\t\tthrow new Error(\"test\");\n\t\t\tSystem.out.println(\"Hello World!\");\n\t\t\tSystem.out.println(\"Hello World!\");\n\t\t\tSystem.out.println(\"Hello World!\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void printFileError() {\n printLine();\n System.out.println(\" Oops! Something went wrong with duke.txt\");\n printLine();\n }", "private void printErrorMenu() {\n System.out.println(\"Invalid input. Please check inputs and try again.\");\n }", "protected void ERROR(String message)\n\t{\n\t\t//allow children to modify output\n\t\tPRINT(message);\n\t\tSystem.exit(1);\n\t}", "public static void error(Object message) {\n\t\tSystem.out.print(\"! ERROR: \" + message);\n\t}", "private static void err(String msg) {\n System.err.println(PerfCakeAgent.class.getSimpleName() + \" > ERROR: \" + msg);\n }", "private static void printUsage() {\r\n\t\t//TODO: print out clear usage instructions when there are problems with\r\n\t\t// any command line args\r\n\t\tSystem.out.println(\"This program expects three command-line arguments, in the following order:\"\r\n\t\t\t\t+ \"\\n -q for storing as a queue, -c for console output, and the input file name.\");\r\n\t}", "public static PrintStream err() {\n return System.err;\n }", "public void setErr(PrintStream err);", "public final void printErrors() {\n for (ShadowException exception : errorList) LOGGER.error(exception.getMessage());\n }", "private static void printUsage() {\n\t\tSystem.out.println(errorHeader + \"Incorrect parameters\\nUsage :\"\n\t\t\t\t+ \"\\njava DaemonImpl <server>\\n With server = address of the server\"\n\t\t\t\t+ \" the DaemonImpl is executed on\");\n\t}", "private static void printUsageAndExit() {\n\t\t printUsageAndExit(null);\n\t\t }", "private static void printUsage() \r\n\t{\r\n\t\tSystem.err.println(\"Usage: java GeneBankSearch \"\r\n\t\t\t\t+ \"<0/1(no/with Cache)> <btree file> <query file> \"\r\n\t\t\t\t+ \"[<cache size>] [<debug level>]\\n\");\r\n\t\tSystem.exit(1); \r\n\t}", "void printUsage(){\n\t\tSystem.out.println(\"Usage: RefactorCalculator [prettyPrint.tsv] [tokenfile.ccfxprep] [cloneM.tsv] [lineM.tsv]\");\n\t\tSystem.out.println(\"Type -h for help.\");\n\t\tSystem.exit(1); //error\n\t}", "public static void main(String[] args) {\n\r\n\t\tSystem.out.println(\"please print\");\r\n\t\t\r\n\t\t\r\n\t}", "public static void printError(String message)\n {\n System.out.println(\"\\n\\n=============================\\n\\n\");\n System.out.println(message);\n System.out.println(\"\\n\\n=============================\\n\\n\");\n }", "private void usageError(String error) {\n System.err.println(\"\\n\" + error);\n usage(-1);\n }", "public void printError(String arg0) {\n\n }", "final private static void usage () {\n\t\t usage_print () ;\n\t\t System.exit (0) ;\n }", "private static void printUsageAndExit() {\n printUsageAndExit(null);\n }", "public static void error(String msg) {\n System.err.println(\"Interpreter error: \" + msg);\n System.exit(-1);\n }", "private static void usage(String argv[]) {\n\tSystem.out.println(\"Usage: java Sudoku\");\n System.exit(-1);\n }", "public static void main(String[] args) {\n OutputStream realSystemOut = System.out;\n System.setOut(System.err);\n runSnippet(realSystemOut, args);\n }", "public static void errorln(Object message) {\n\t\tSystem.out.println(\"! ERROR: \" + message);\n\t}", "private static void error(String msg) {\r\n\t\tlogger.severe(msg);\r\n\t\tSystem.exit(0);\r\n\t}", "public final void printStackTrace()\r\n {\r\n printStackTrace( System.err );\r\n }", "abstract void consoleError(String error);", "public static void main(String[] args){\n \t\tfatalError();\n \t\tSystem.out.println(\"Termination not requested.\");\n \t}", "private void _debugSystemOutAndErr() {\n try {\n File outF = new File(System.getProperty(\"user.home\") +\n System.getProperty(\"file.separator\") + \"out.txt\");\n FileWriter wo = new FileWriter(outF);\n final PrintWriter outWriter = new PrintWriter(wo);\n File errF = new File(System.getProperty(\"user.home\") +\n System.getProperty(\"file.separator\") + \"err.txt\");\n FileWriter we = new FileWriter(errF);\n final PrintWriter errWriter = new PrintWriter(we);\n System.setOut(new PrintStream(new edu.rice.cs.util.OutputStreamRedirector() {\n public void print(String s) {\n outWriter.print(s);\n outWriter.flush();\n }\n }));\n System.setErr(new PrintStream(new edu.rice.cs.util.OutputStreamRedirector() {\n public void print(String s) {\n errWriter.print(s);\n errWriter.flush();\n }\n }));\n }\n catch (IOException ioe) {}\n }", "private static void error( Exception e ) {\n e.printStackTrace();\n System.exit(-1);\n }", "private static void printUsage() {\n System.err.println(\"\\n\\nUsage:\\n\\tAnalyzeRandomizedDB [-p] [-v] [--enzyme <enzymeName> [--mc <number_of_missed_cleavages>]] <original_DB> <randomized_DB>\");\n System.err.println(\"\\n\\tFlag significance:\\n\\t - p : print all redundant sequences\\n\\t - v : verbose output (application flow and basic statistics)\\n\");\n System.exit(1);\n }", "private static void errorQuit(String message) \n\t{\n\t\tSystem.out.println(message);\n\t\tSystem.exit(1);\n\t}", "public void printStackTrace() {\n printStackTrace(System.err);\n }", "private static void usage() {\n System.err.println(\"usage: Binomial degree(1..10)\");\n System.exit(-1);\n }", "public static\n PrintStream err() {\n return Ansi.err;\n }", "private static void usage()\n {\n System.out.println(\"Lex\");\n System.exit(-1);\n }", "@Test\n public void localAction_stderrIsReported() throws Exception {\n if (OS.getCurrent() == OS.WINDOWS) {\n return;\n }\n write(\n \"BUILD\",\n \"genrule(\",\n \" name = 'foo',\",\n \" srcs = [],\",\n \" outs = ['out/foo.txt'],\",\n \" cmd = 'echo my-error-message > $@',\",\n \")\",\n \"genrule(\",\n \" name = 'foobar',\",\n \" srcs = [':foo'],\",\n \" outs = ['out/foobar.txt'],\",\n \" cmd = 'cat $(location :foo) >&2 && exit 1',\",\n \" tags = ['no-remote'],\",\n \")\");\n RecordingOutErr outErr = new RecordingOutErr();\n this.outErr = outErr;\n\n assertThrows(BuildFailedException.class, () -> buildTarget(\"//:foobar\"));\n\n assertOutputContains(outErr.errAsLatin1(), \"my-error-message\");\n }", "private static void printUsage(String error) {\n\t\tSystem.err.println(\"\\nError: \" + error);\n\t\tSystem.err.println(\"Usage:\" +\n\t\t\t\t\t\t \"\\nISAReferenceGenerator\" +\n\t\t\t\t\t\t \"\\nISAReferenceGenerator input output\" +\n\t\t\t\t\t\t \"\\n\\tinput The ISA file to read (default: isa.txt)\" +\n\t\t\t\t\t\t \"\\n\\toutput The reference file to write (default: reference.txt)\");\n\t}", "public void error();", "protected static int mainImpl(final String[] args) {\n final GUIFeedback feedback = new GUIFeedback(\"Packaging error logs for submission\");\n try {\n if (args.length != 1) {\n throw new IllegalArgumentException(\"Invalid number of arguments - expected path to property file\");\n }\n new BundleErrorReportInfo(feedback, args[0]).run();\n return 0;\n } catch (final Throwable t) {\n LOGGER.error(\"Caught exception\", t);\n feedback.shout(t.getMessage() != null ? t.getMessage() : \"Couldn't package error logs\");\n return 1;\n }\n }", "static void fail(String message) {\n Log.error(message);\n System.exit(1);\n }", "@Override\r\n\tpublic final void showCommandError(String command, String message) {\n\t}", "private static void exitOnError(final String errorMsg)\n {\n System.out.println(errorMsg);\n System.exit(0);\n }", "private static void help() {\n System.out.println(USAGE); \n System.exit(0);\n }", "private static void printEmptyMessage() {\r\n\t\tSystem.out.println(\"usage: bfck [-p <filename>] [-i <filename>] [-o <filename>]\\n\"\r\n\t\t\t\t+ \" [--rewrite] [--translate] [--check] [--cgen]\\n\"\r\n\t\t\t\t+ \"BRAINFUCK [M\\u00fcl93] is a programming language created in 1993 by Urban M\\u00fcller,\"\r\n\t\t\t\t+ \" and notable for its extreme minimalism.\\nThis is the BrainFuck interpreter made by the group PolyStirN,\"\r\n\t\t\t\t+ \" composed of Jo\\u00ebl CANCELA VAZ, Pierre RAINERO, Aghiles DZIRI and Tanguy INVERNIZZI.\");\r\n\t}", "public static void printLoadingError() {\n System.out.println(Message.LOADING_ERROR);\n }", "public static void printError(String message) {\n\t\tprintMessage(\"ERROR: \" + message);\r\n\t}", "public static void printWriteFileError() {\n System.out.println(Message.WRITE_FILE_ERROR);\n }", "public static void main(String[] args) {\n\t\t\n\t\tlog.debug(\"Debugging\");\n\t\tlog.info(\"Just FYI\");\n\t\tlog.error(\"Error message\");\n\n\t\tlog.fatal(\"Fatal Error\");\n\t}", "public void printError(SourcePosition arg0, String arg1) {\n\n }", "public void helpByParamsError() {\n System.err.println(\"The command syntax is wrong.\");\n System.err.println(\"You can write the command in the following way:\");\n System.err.println(\"java -jar portScanner-1.5.jar ipOrElseDomain minPortRange maxPortRange [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar 127.0.0.1 0 65535 file.txt\");\n System.err.println(\"or else\");\n System.err.println(\"java -jar PortScanner-1.5.jar ipOrElseDomain [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar cloudflare.com file.txt\");\n System.err.println(\"The file is not obligatory option.\");\n System.exit(1);\n }", "public void cmdTestError(User teller) {\n throw new RuntimeException(\"This is a test. Don''t worry.\");\n }", "public static void main(String[] args) {\n\t\t\n\t\tlog.fatal(\"2-this comes under default config file\");\n\t\tlog.error(\"2-this 2 \");\nlog.debug(\"2-doesnot\");\nlog.info(\"2-nopes\");\n\t}", "public void printStackTrace(){\n\t\tprintStackTrace(System.err);\n\t}", "public boolean dumpErrorPathImmediately() {\n return dumpErrorPathImmediately;\n }", "public static void main(String[] args) {\n\t\tinvalidInput();\n\n\t}", "private static void checkVerbose(final Exception err, final OptionSet options) throws Exception\n {\n if (options.has(OPTION_VERBOSE))\n {\n throw err;\n }\n else\n {\n return;\n }\n }", "public void validationErr()\r\n\t{\n\t\tSystem.out.println(\"validation err\");\r\n\t}", "public static void usage() {\n System.out.println(\"Usage: java <java-class> [-d] [-m <value>] FILENAME\");\n System.out.println(\"\\t -d \\t\\t Enable debug mode.\");\n System.out.println(\"\\t -m <value>\\t Set the maximum random value \" + \n \"to a specific integer value.\");\n System.out.println(\"\\t -n <value>\\t Set the number of iterations \" + \n \"for the test.\");\n System.out.println(\"\\n\");\n System.exit(1);\n }", "public final void printOut() {\n\t\tUtilities.outputString(\"Error message from \" + THESTRINGS[0] + \":\");\n\t\tfor (int i=1; i<THESTRINGS.length; i++) {\n\t\t\tUtilities.outputString(THESTRINGS[i]);\n\t\t}\n\t}", "final private static void usage_print () {\n\t\tSystem.out.println (NAME + ' ' + VERSION + ' ' + COPYRIGHT) ;\n\t\tSystem.out.println () ;\n\n\t\tSystem.out.println (\n\t\t \"Usage: java bcmixin.Main [<options>] <modelname> <equationname>\"\n\t\t) ;\n\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where [<options>] include any of the following:\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" -help\") ;\n\t\tSystem.out.println (\" Prints this helpful message, then exits.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" where <modelname> means the model name that you want to work on.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where <equationname> provides the equation name, which must end with .equation.\") ;\n\t\tSystem.out.println () ;\n }", "public void error(String message) {\n\tSystem.err.println(\"Error: \" + message);\n\tthrow new Error(message);\n }", "public static void main(String[] args)\n\t{\n\t\t\n\t\ttry\n\t\t{\n\t\t\tthrow new MyException(\"This is the my custom error message\");\n\t\t}\n\t\tcatch (MyException error)\n\t\t{\n\t\t\tSystem.out.println(error);\n\t\t}\n\t}", "void err( Object msg );", "public void print_error( String text, int level ) {\n\t\tif ( get_debug_level() >= level ) {\n\t\t\t_platform_io.print_error( text );\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"\\n hello world \\n\");\n\t\t\n\t\tlogger.error(\"this is error\");\n\t\tlogger.warn(\"this is warning\");\n\t\t\n\t\tSystem.out.println(\"\\n completed \\n\");\n\n\t}", "public static void perror(String s) {\n String message = null;\n if ((process.errno > 0) && (process.errno < sys_nerr))\n message = sys_errlist[process.errno];\n if (message == null)\n System.err.println(s + \": unknown errno \" + process.errno);\n else\n System.err.println(s + \": \" + message);\n }", "public void showLoadingError() {\n System.out.println(\"Duke has failed to load properly.\");\n }", "public static void main(String[] args) {\n\t\tif (!processArguments(args)) {\n\t\t\tSystem.out.println(\"Invalid Arguments! Please try again..\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\ttry {\n\t\t\talgoritmoConPosibilidadDeExcepcion();\n\t\t\tSystem.out.println(\"Estoy dentro del bloque que da error, justo despues de dar error\");\n\t\t} catch (ParseException | UnsupportedOperationException e) {\n\t\t\t// Proporciona el feedback al usuario de la aplicacion\n\t\t\tSystem.out.println(\"Ha ocurrido un error\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "private static void verifyArgs()\r\n\t{\r\n\t\tif(goFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GO file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(annotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input annotation file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(goSlimFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an input GOslim file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t\tif(slimAnnotFile == null)\r\n\t\t{\r\n\t\t\tSystem.err.println(\"Error: you must specify an output file.\");\r\n\t\t\texitError();\r\n\t\t}\r\n\t}", "private void displayUsage() {\r\n System.err.println(\"\\nUSAGE: java -classpath ... \" + \"DiscourseImportTool\");\r\n System.err.println(\"Option descriptions:\");\r\n System.err.println(\"\\t-h\\t usage info\");\r\n System.err.println(\"\\t-e, email\\t send email if major failure\");\r\n System.err.println(\"\\t-b\\t batchSize number of items to batch during import\");\r\n System.err.println(\"\\t-discourse\\t discourse id to run the generator on\");\r\n System.err.println(\"\\t-project\\t project id to add discourse to\");\r\n }", "public void fail(Exception e, String msg) {\r\n System.err.println(msg + \": \" + e);\r\n System.exit(1);\r\n }", "@Test\n public void dynamicExecution_stderrIsReported() throws Exception {\n if (OS.getCurrent() == OS.WINDOWS) {\n return;\n }\n addOptions(\"--internal_spawn_scheduler\");\n addOptions(\"--strategy=Genrule=dynamic\");\n addOptions(\"--experimental_local_execution_delay=9999999\");\n write(\n \"BUILD\",\n \"genrule(\",\n \" name = 'foo',\",\n \" srcs = [],\",\n \" outs = ['out/foo.txt'],\",\n \" cmd = 'echo my-error-message > $@',\",\n \" tags = ['no-local'],\",\n \")\",\n \"genrule(\",\n \" name = 'foobar',\",\n \" srcs = [':foo'],\",\n \" outs = ['out/foobar.txt'],\",\n \" cmd = 'cat $(location :foo) >&2 && exit 1',\",\n \")\");\n RecordingOutErr outErr = new RecordingOutErr();\n this.outErr = outErr;\n\n assertThrows(BuildFailedException.class, () -> buildTarget(\"//:foobar\"));\n\n assertOutputContains(outErr.errAsLatin1(), \"my-error-message\");\n }", "private static void doUsage() {\r\n\t\tSystem.out.println(\"Usage: SpellChecker [-i] <dictionary> <document>\\n\"\r\n\t\t\t\t+ \" -d <dictionary>\\n\" + \" -h\");\r\n\t}", "public static void printErrorForInvalidCommand(String userInput) {\n System.out.println(\"Aw man! I am unable to \" + userInput + \" yet! Please specify a different function! :D\");\n }", "public PrintStreamCommandOutput( PrintStream output )\n {\n this( output, System.err );\n }", "@Override\n\tpublic void showError(String message) {\n\t\t\n\t}", "public void error() {\n throw new RuntimeException(getClass().getName() + \" error\");\n }", "public static void printReadFileAddTaskError() {\n System.out.println(Message.READ_FILE_ADD_TASK_ERROR);\n }", "private final void prtlnErr(String s) {\n\n\t\tSystem.err.println(getDateStamp() + \" \" + s);\n\n\t}", "@Override\n public void showError() {\n }", "public static void die(String... msg)\n {\n if (msg.length == 0)\n System.exit(1);\n System.err.println(msg[0]);\n System.exit(1);\n }", "private static void usage()\n {\n System.out.println(\"usage:\");\n System.out.println(\" ??? clock [-bg color] [-f fontsize] [-fg color]\");\n System.out.println(\" ??? formats\");\n System.out.println(\" ??? print [-f fmt] time\");\n System.out.println(\" ??? now [-r] [-f fmt]\");\n System.exit(1);\n }", "public static int error () {\n System.out.println(\"ERROR\");\n hasError = true;\n return -1;\n }", "public void printTerminalError(String message)\n\t{\n\t\tterminal.printTerminalError(message);\n\t}", "public static void main(String args[]) {\n System.exit(0);\n }", "public static void main(String[] args) {\n\n IllegalArgumentException illegalArgumentException = new IllegalArgumentException(\"illegal status run time\");\n System.out.println(Throwables.getStackTraceAsString(illegalArgumentException));\n }", "public static void printEmptyTodoError() {\n botSpeak(Message.EMPTY_TODO_ERROR);\n }", "public void writeError(final String message){\n switch (PreferencesHelper.getConsolePopupLevel()) {\n case ALL:\n popConsoleView();\n break;\n default:\n break;\n }\n\n final String output = getTimeString() + \" ERROR: \" + message + ENTER;\n UIBundlingThread.getInstance().addRunnable(new Runnable() {\n\n public void run() {\n if(errorStream == null){\n errorStream = console.newOutputStream();\n errorStream.setColor(CustomMediaFactory.getInstance().getColor(\n CustomMediaFactory.COLOR_RED));\n }\n writeToConsole(errorStream, output);\n }\n });\n\n\n }" ]
[ "0.67262363", "0.67158276", "0.66793257", "0.66017306", "0.6592855", "0.6575986", "0.65748954", "0.64469284", "0.6436956", "0.61682874", "0.615269", "0.6075232", "0.60579246", "0.6052674", "0.6041666", "0.6028691", "0.6009182", "0.59782904", "0.5954349", "0.59445614", "0.59418213", "0.5940889", "0.59270877", "0.59198505", "0.59169257", "0.5887607", "0.5877624", "0.58767605", "0.58539426", "0.58528984", "0.58285445", "0.5823159", "0.5812377", "0.5779001", "0.576584", "0.57584304", "0.5731099", "0.57257307", "0.57251006", "0.571511", "0.571245", "0.5711245", "0.57066405", "0.5700037", "0.56996816", "0.5676132", "0.56681037", "0.5661524", "0.5652355", "0.56447846", "0.5629056", "0.56251186", "0.5619013", "0.56126386", "0.5599938", "0.5580552", "0.55741346", "0.5516046", "0.551207", "0.55110306", "0.55075336", "0.54829884", "0.5466953", "0.5456362", "0.5443428", "0.5434933", "0.5434493", "0.54240066", "0.5419575", "0.5413587", "0.541236", "0.5410131", "0.5395097", "0.5385865", "0.5383029", "0.5369346", "0.5352071", "0.5350747", "0.53402954", "0.533922", "0.53313166", "0.53225327", "0.53173953", "0.53034395", "0.5302032", "0.5301429", "0.5298414", "0.5294905", "0.52902555", "0.52727455", "0.5267054", "0.52515155", "0.52508014", "0.52503085", "0.52475566", "0.52313495", "0.5229817", "0.52184296", "0.5216342", "0.5215814" ]
0.5618478
53
TODO Autogenerated method stub
@Override public View newView(Context context, Cursor cursor, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View v = inflater.inflate(R.layout.search_item, parent, false); TextView t = (TextView)v.findViewById(R.id.search_text); t.setText(cursor.getString(1)); return v; }
{ "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 bindView(View view, Context context, Cursor cursor) { }
{ "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 setFilterQueryProvider(FilterQueryProvider filterQueryProvider) { super.setFilterQueryProvider(filterQueryProvider); }
{ "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
Static variables //////////////////////////////// Instance variables ////////////////////////////////
public TestBugReports(String name) { super(name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void init() {}", "private Util() { }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private InstanceUtil() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "private StaticData() {\n\n }", "private Util() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "private stendhal() {\n\t}", "private Util() {\n }", "private Util() {\n }", "public static void init() {}", "public static void init() {\n\t\t\n\t}", "private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "public static void staticMethod() {\n Log.e(\"LOG_TAG\", \"Company: STATIC Instance method\");\n }", "private Singleton()\n\t\t{\n\t\t}", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "private void init() {\n\n\t}", "public static void init() {\n\n }", "private Utility() {\n\t}", "private void init() {\n }", "private ReportGenerationUtil() {\n\t\t\n\t}", "private VlcUtils()\n {\n \n }", "private static void LessonInstanceVsStatic() {\n System.out.println(MathHelper.E);\n System.out.println(MathHelper.PI);\n System.out.println(MathHelper.square(5));\n //Three helper methods for StringHelper\n System.out.println(StringHelper.removeLeadingAndTrailingSpaces(\" Hello \"));\n System.out.println(StringHelper.removeAllSpace(\" He ll o !\"));\n System.out.println(StringHelper.yelling(\"hello\"));\n //Three helper methods for MathHelper\n System.out.println(MathHelper.cubed(5));\n System.out.println(MathHelper.areaOfRectangle(2,3));\n System.out.println(MathHelper.perimeterOfRectangle(4, 5));\n\n }", "private SnapshotUtils() {\r\n\t}", "private static void staticFun()\n {\n }", "public Utils() {}", "private Helper() {\r\n // empty\r\n }", "private void _init() {\n }", "@SuppressWarnings(\"UnusedDeclaration\")\n public static void __staticInitializer__() {\n }", "protected void _init(){}", "public void init() {\n \n }", "private void init() {\n\n\n\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private CollectionUtils() {\n\n\t}", "@Override\n void init() {\n }", "private ApplicationConstants(){\n\t\t//not do anything \n\t}", "private ComparableEntitySpanUtils() {\n // Singleton\n }", "public static void init() {\n }", "public static void init() {\n }", "private OMUtil() { }", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void init() {}", "private Reactive() {\r\n\t\t// utility class\r\n\t}", "private Singleton() {\n\t}", "private HabitTrackerUtils() {\n // Required empty private constructor (to prevent instantiation).\n }", "private FaceConversionUtil() {\n\n\t}", "public void init() {\r\n\r\n\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic boolean isStatic() {\n\t\treturn false;\n\t}", "private JacobUtils() {}", "private ProcessorUtils() { }", "@Override\n public void init() {\n\n }", "private Utility() {\n throw new IllegalAccessError();\n }", "private BuilderUtils() {}", "@Override\n public void init() {}", "private UtilsCache() {\n\t\tsuper();\n\t}", "protected VboUtil() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private LevelConstants() {\n\t\t\n\t}", "private CommonMethods() {\n }", "private WolUtil() {\n }", "@Override\n protected void init() {\n }", "public void init() {\n\t\t\n\t}", "private SingletonLectorPropiedades() {\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public static utilitys getInstance(){\n\r\n\t\treturn instance;\r\n\t}", "public void init() {\n\t\t}", "public void init(){\n \n }", "@Override\n\t\tpublic void init() {\n\t\t}", "private LoggerConstants() {\n\t\tsuper();\n\t}", "private StaticProperty() {}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "private Constants() {\n\t\tthrow new AssertionError();\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}", "private DBconnectionUtil()\n\t{\n\t\t\n\t}", "private CreateDateUtils()\r\n\t{\r\n\t}", "public default boolean isStatic() {\n\t\treturn false;\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\t/**\n\t * returns a false because a class cannot be static\n\t * \n\t * @return false\n\t */\n\tpublic boolean getStatic() {\n\t\treturn false;\n\t}" ]
[ "0.7191533", "0.70271754", "0.6807254", "0.6807254", "0.6807254", "0.6807254", "0.6741395", "0.67030394", "0.6689465", "0.66766465", "0.66194654", "0.66194654", "0.6581831", "0.65539116", "0.65539116", "0.65274507", "0.65244246", "0.6514098", "0.6510133", "0.64874446", "0.64593786", "0.64460814", "0.6434816", "0.6423803", "0.6415744", "0.64117175", "0.63772196", "0.63631785", "0.6362755", "0.63515115", "0.63358766", "0.63336223", "0.6331684", "0.6323856", "0.6321964", "0.632089", "0.6316605", "0.62930846", "0.62896967", "0.62896967", "0.62896967", "0.62896967", "0.628108", "0.62752473", "0.6273735", "0.6273098", "0.62643903", "0.62643903", "0.62506795", "0.6241592", "0.62296766", "0.6226391", "0.62198555", "0.6217211", "0.6206674", "0.6199251", "0.6198487", "0.61950517", "0.61921376", "0.61916274", "0.61765915", "0.61749494", "0.61714107", "0.61706716", "0.61699545", "0.61686724", "0.61606157", "0.6158166", "0.6158166", "0.6158166", "0.6158166", "0.6158166", "0.6156606", "0.61565447", "0.615623", "0.6154455", "0.6153692", "0.61469805", "0.6131512", "0.6131512", "0.6131512", "0.6127468", "0.61253405", "0.61253124", "0.6118751", "0.6117593", "0.6113089", "0.6097429", "0.60939735", "0.60885406", "0.60885406", "0.60885406", "0.60885406", "0.60885406", "0.6084848", "0.607969", "0.6078651", "0.6078454", "0.6078454", "0.6078454", "0.6073643" ]
0.0
-1
Constructors //////////////////////////////// External signature methods ////////////////////////////////
public void setUp() { // ensure the ont doc manager is in a consistent state OntDocumentManager.getInstance().reset( true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public CyanSus() {\n\n }", "private void __sep__Constructors__() {}", "public CSSTidier() {\n\t}", "private Instantiation(){}", "protected abstract void construct();", "public Pitonyak_09_02() {\r\n }", "public PSRelation()\n {\n }", "public _355() {\n\n }", "private TMCourse() {\n\t}", "Reproducible newInstance();", "defaultConstructor(){}", "private SingleObject()\r\n {\r\n }", "public Curso() {\r\n }", "public mapper3c() { super(); }", "public Libro() {\r\n }", "public CMN() {\n\t}", "public Soil()\n\t{\n\n\t}", "public Clade() {}", "protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }", "public Odontologo() {\n }", "public Tbdtokhaihq3() {\n super();\n }", "public JSFOla() {\n }", "public AirAndPollen() {\n\n\t}", "public Ov_Chipkaart() {\n\t\t\n\t}", "public Chick() {\n\t}", "public Basic() {}", "private Rekenhulp()\n\t{\n\t}", "public Pasien() {\r\n }", "public OVChipkaart() {\n\n }", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private CustomerReader()\r\n\t{\r\n\t}", "public AFMV() {\r\n }", "public Demo() {\n\t\t\n\t}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public ObjectFactory() {\n\t}", "public Lanceur() {\n\t}", "public Chauffeur() {\r\n\t}", "private NfkjBasic()\n\t\t{\n\t\t\t\n\t\t}", "@Override\n public void construct() throws IOException {\n \n }", "@SuppressWarnings(\"unused\")\r\n private Rental() {\r\n }", "public Factory() {\n\t\tsuper();\n\t}", "public Trening() {\n }", "public CustomerNew () {\n\t\tsuper();\n\t}", "private MApi() {}", "public ObjectFactory() {\r\n\t}", "void DefaultConstructor(){}", "public Anschrift() {\r\n }", "public Phl() {\n }", "public SgaexpedbultoImpl()\n {\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private Catalog() {\r\n }", "public Mitarbeit() {\r\n }", "public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}", "public Achterbahn() {\n }", "public TTau() {}", "Customer() \n\t{\n\t}", "public Reader(){\n\n\t}", "public HGDClient() {\n \n \t}", "ConstructorPractice () {\n\t\tSystem.out.println(\"Default Constructor\");\n\t}", "public Resource() {\n }", "public Resource() {\n }", "private Marinator() {\n }", "private Marinator() {\n }", "private XMLUtils()\r\n\t{\r\n\t}", "private Composite() {\n }", "public Person() {\n\t\t\n\t}", "private CZ()\n {\n }", "public RngObject() {\n\t\t\n\t}", "public Parameters() {\n\t}", "public Cohete() {\n\n\t}", "public Aanbieder() {\r\n\t\t}", "public Book() {\n\t\t// Default constructor\n\t}", "public Orbiter() {\n }", "public SlanjePoruke() {\n }", "private Cat() {\n\t\t\n\t}", "public CalccustoRequest()\r\n\t{\r\n\t}", "public Livro() {\n\n\t}", "public native void constructor();", "public Vaccine() {\n\t}", "private Converter()\n\t{\n\t\tsuper();\n\t}", "public XCanopusFactoryImpl()\r\n {\r\n super();\r\n }", "public Connection() {\n\t\t\n\t}", "public Magazzino() {\r\n }", "protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "public C23317d() {\n }", "public lo() {}", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}", "public Demo3() {}", "public Car(){\n\t\t\n\t}", "public AbstractT153()\n {\n }", "public Spec__1() {\n }", "public ExamMB() {\n }", "public MonHoc() {\n }", "public Individual()\r\n\t{\r\n\t}", "public Supercar() {\r\n\t\t\r\n\t}", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "public Account() {\n this(0, 0.0, \"Unknown name\"); // Invole the 2-param constructor\n }", "public FileObject() {\n\t}" ]
[ "0.81955415", "0.801424", "0.7478754", "0.7386194", "0.7298536", "0.72933143", "0.7223569", "0.71421844", "0.7119575", "0.7055508", "0.705282", "0.699617", "0.6982899", "0.6961705", "0.6948894", "0.69350845", "0.6925131", "0.69189876", "0.69116014", "0.69058186", "0.68904036", "0.68561447", "0.6846115", "0.6845009", "0.6830356", "0.6826197", "0.6824188", "0.68240696", "0.6823412", "0.6799127", "0.6790616", "0.6786078", "0.676974", "0.6766531", "0.67599463", "0.6755741", "0.67555475", "0.67540634", "0.67462236", "0.6740158", "0.6737484", "0.6733435", "0.6724582", "0.67210406", "0.6719932", "0.6719553", "0.6713164", "0.671153", "0.67067134", "0.6706322", "0.67015237", "0.67005146", "0.66953045", "0.66950667", "0.66943145", "0.66919464", "0.6688399", "0.66871804", "0.6685197", "0.6678386", "0.6674454", "0.66678387", "0.66678387", "0.66647756", "0.66647756", "0.666257", "0.6662208", "0.66618407", "0.66562474", "0.66562456", "0.66548467", "0.66480535", "0.66426253", "0.6640045", "0.6634351", "0.6632357", "0.66270405", "0.6625208", "0.66199446", "0.66187954", "0.66142577", "0.6611727", "0.66115355", "0.6605697", "0.66010034", "0.6595783", "0.65945065", "0.65934783", "0.6591036", "0.65900284", "0.6587352", "0.6584903", "0.65802467", "0.65780467", "0.6575816", "0.6574508", "0.6572335", "0.657088", "0.6570506", "0.65690804", "0.6568623" ]
0.0
-1
Bug report by Danah Nada listIndividuals returning too many results
public void test_dn_0() { OntModel schema = ModelFactory.createOntologyModel( OntModelSpec.OWL_LITE_MEM_RULES_INF, null ); schema.read( "file:doc/inference/data/owlDemoSchema.xml", null ); int count = 0; for (Iterator i = schema.listIndividuals(); i.hasNext(); ) { //Resource r = (Resource) i.next(); i.next(); count++; /* Debugging * / for (StmtIterator j = r.listProperties(RDF.type); j.hasNext(); ) { System.out.println( "ind - " + r + " rdf:type = " + j.nextStatement().getObject() ); } System.out.println("----------"); /**/ } assertEquals( "Expecting 6 individuals", 6, count ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Individual> getListOfIndividuals(){\n \tList<Individual> individualList = new ArrayList<>();\n\t\tIndividual individualObject = null;\n\t\tMap<String, Object> myMap = null;\n\t\tObject obj = null;\n\t\tJSONObject jsonObject = null;\n\t\tJSONArray jsonArray = null;\n\t\tJSONObject jsonObj = null;\n\t\tJSONParser parser = new JSONParser();\n\t\ttry {\n\t\t\tobj = parser.parse(new FileReader(\"src/main/resources/db.json\"));\n\t\t\tjsonObject = (JSONObject) obj;\n\n\t\t\tjsonArray = (JSONArray) jsonObject.get(\"individuals\");\n\n\t\t\tint length = jsonArray.size();\n\t\t\tfor (int size = 0; size < length; size++) {\n\n\t\t\t\tjsonObj = (JSONObject) jsonArray.get(size);\n\t\t\t\tmyMap = new HashMap<String, Object>();\n\t\t\t\tmyMap.put(\"name\", jsonObj.get(\"name\"));\n\t\t\t\tmyMap.put(\"id\", ((Long) jsonObj.get(\"id\")).intValue());\n\t\t\t\tmyMap.put(\"active\", jsonObj.get(\"active\"));\n\t\t\t\tindividualObject = new Individual(myMap);\n\t\t\t\tindividualList.add(individualObject);\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn individualList;\n }", "public List<Individual> getListOfActiveIndividuals(){\n List<Individual> individualList = new ArrayList<>();\n\t\tList<Individual> activeIndividualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\n\t\t\tif (individual.isActive()) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tactiveIndividualList.add(individual);\n\n\t\t\t}\n\t\t}\n\n\t\treturn activeIndividualList;\n\n }", "public ArrayList<Integer> makeIndividual();", "private List<Individual<T>> selectIndividuals(Deme<T> deme) {\n return IntStream.range(0, tournamentSize).mapToObj(i -> selRandomOp.select(deme.getIndividuals()))\n .collect(Collectors.toList());\n }", "public List<Individual> getListOfInactiveIndividuals(){\n\t \tList<Individual> individualList = new ArrayList<>();\n\t\tList<Individual> inactiveIndividualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\n\t\t\tif (!individual.isActive()) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tinactiveIndividualList.add(individual);\n\n\t\t\t}\n\t\t}\n\n\t\treturn inactiveIndividualList;\n }", "@Override\n public List<IntraUserInformation> getSuggestionsToContact(int max, int offset) throws CantGetIntraUsersListException {\n\n try {\n\n //verifico la cache para mostrar los que tenia antes y los nuevos\n List<IntraUserInformation> userCacheList = new ArrayList<>();\n try {\n userCacheList = getCacheSuggestionsToContact(max, offset);\n } catch (CantGetIntraUsersListException e) {\n e.printStackTrace();\n }\n\n List<IntraUserInformation> intraUserInformationModuleList = new ArrayList<>();\n\n List<IntraUserInformation> intraUserInformationList = new ArrayList<>();\n intraUserInformationList = intraUserNertwokServiceManager.getIntraUsersSuggestions(max, offset);\n\n\n\n for (IntraUserInformation intraUser : intraUserInformationList) {\n\n //get connection state status\n ConnectionState connectionState = this.intraWalletUserManager.getIntraUsersConnectionStatus(intraUser.getPublicKey());\n\n //return intra user information - if not connected - status return null\n IntraUserInformation intraUserInformation = new IntraUserModuleInformation(intraUser.getName(),intraUser.getPhrase(),intraUser.getPublicKey(),intraUser.getProfileImage(), connectionState,\"Online\");\n intraUserInformationModuleList.add(intraUserInformation);\n }\n\n\n if(intraUserInformationModuleList!=null) {\n if (userCacheList.size() == 0) {\n return intraUserInformationModuleList;\n }\n else {\n if (intraUserInformationModuleList.size() == 0) {\n return userCacheList;\n }\n else {\n for (IntraUserInformation intraUserCache : userCacheList) {\n boolean exist = false;\n for (IntraUserInformation intraUser : intraUserInformationModuleList) {\n if (intraUserCache.getPublicKey().equals(intraUser.getPublicKey())) {\n exist = true;\n break;\n }\n }\n if (!exist)\n intraUserInformationModuleList.add(intraUserCache);\n }\n\n //save cache records\n try {\n saveCacheIntraUsersSuggestions(intraUserInformationModuleList);\n } catch (CantGetIntraUsersListException e) {\n e.printStackTrace();\n }\n\n return intraUserInformationModuleList;\n }\n }\n }\n else {\n return userCacheList;\n }\n\n\n\n }\n catch (ErrorSearchingSuggestionsException e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET SUGGESTIONS TO CONTACT\",e,\"\",\"Error on intra user network service\");\n }\n catch (Exception e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET SUGGESTIONS TO CONTACT\",e,\"\",\"Unknown Error\");\n }\n }", "@Override\n public List<IntraUserInformation> getAllIntraUsers(String identityPublicKey, int max, int offset) throws CantGetIntraUsersListException {\n try {\n List<IntraUserInformation> intraUserList = new ArrayList<IntraUserInformation>();\n\n\n List<IntraWalletUserActor> actorsList = this.intraWalletUserManager.getAllIntraWalletUsers(identityPublicKey, max, offset);\n\n for (IntraWalletUserActor intraUserActor : actorsList) {\n intraUserList.add(new IntraUserModuleInformation(intraUserActor.getName(),intraUserActor.getPhrase(),intraUserActor.getPublicKey(),intraUserActor.getProfileImage(),intraUserActor.getContactState(),\"\"));\n }\n return intraUserList;\n } catch (CantGetIntraWalletUsersException e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET ALL INTRA USERS FROM LOGGED USER\", e, \"\", \"\");\n } catch (Exception e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET ALL INTRA USERS FROM LOGGED USER\", FermatException.wrapException(e), \"\", \"unknown exception\");\n }\n }", "@Test\n\tpublic void testRetrieveMultipleAddressesForDriver() throws MalBusinessException{\n\t\t// driver with more than one address\n\t\tLong drv_id = 168535L;\n\t\tList<DriverAddress> da = driverService.getDriver(drv_id).getDriverAddressList();\n\t\tassertTrue(da.size() > 1);\n\t\t\n\t}", "void FindLstn (int boardID, short[] addrlist, short[] results, int limit);", "private List<Person> fetchingUtility() {\n List<Person> fetchedList = new ArrayList<>();\n fetchedList.add(new Person(-26.220616, 28.079329, \"PJ0\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.187616, 28.079329, \"PJ1\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.207616, 28.079329, \"PJ2\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.217616, 28.079329, \"PJ3\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.346316, 28.079329, \"PJ4\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.215896, 28.079329, \"PJ5\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.215436, 28.079129, \"PJ6\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.431461, 28.079329, \"PJ7\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.168879, 28.079329, \"PJ8\", \"https://twitter.com/pjapplez\", false));\n fetchedList.add(new Person(-26.227616, 28.079329, \"PJ9\", \"https://twitter.com/pjapplez\", false));\n\n return fetchedList;\n }", "@Test\r\n public void teamListTooLargeTest(){\r\n int tooBigListSize = 15;\r\n\r\n int expectedResult = extractor.extractXDriversOrTeams(tooBigListSize, \"table.msr_season_team_results\", \"td.msr_team\").size();\r\n\r\n assertEquals(\"expected results = \" + expectedResult, expectedResult, extractor.extractXDriversOrTeams(tooBigListSize, \"table.msr_season_team_results\", \"td.msr_team\").size());\r\n System.out.println(\"\");\r\n }", "public static void printOutIndividuals(Collection<DSEIndividual> individuals,\r\n\t\t\tString collectionName) {\r\n\t\t\r\n\t\tif (individuals.iterator().hasNext()){\r\n\t\t\r\n\t\tDSEIndividual firstIndividual = individuals.iterator().next();\r\n\t\tList<Criterion> criteriaToSave = determineCriterionsToSave(firstIndividual);\r\n\t\tList<Criterion> criteriaWithConfidence = determineCriteriaWithConfidenceInterval(firstIndividual);\r\n\t\t\t\t\r\n\t\tlogger.warn(\"------------ RESULTS \" + collectionName\r\n\t\t\t\t+ \" ----------------------\");\r\n\t\tlogger.warn(\"Printing results (number is \" + individuals.size() + \").\");\r\n\t\t\r\n\t\tList<Exception> exceptionList = new ArrayList<Exception>();\r\n\t\t\r\n\t\tint counter = 0;\r\n\t\r\n\t\tStringBuilder output = new StringBuilder(10000);\r\n\t\t\r\n\t\tlogger.warn(\"------------ PRETTY CSV RESULTS \" + collectionName\r\n\t\t\t\t+ \" ----------------------\");\r\n\t\t\r\n\t\toutput.append(\"\\n\");\r\n\t\toutput = prettyPrintHeadlineCSV(individuals, output,criteriaToSave);\r\n\t\r\n\t\t// content\r\n\t\tfor (DSEIndividual ind2 : individuals) {\r\n\t\t\ttry {\r\n\t\t\toutput = prettyPrintResultLineCSV(output, ind2,criteriaToSave, criteriaWithConfidence);\r\n\t\t\t} catch (Exception e){\r\n\t\t\t\texceptionList.add(new Exception(\"Encountered corrupted result number \"+counter+\", skipped it\", e));\r\n\t\t\t}\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\tlogger.warn(output);\r\n\t\t\r\n\t\tif (exceptionList.size() > 0){\r\n\t\t\tlogger.warn(\"Encountered exceptions while printing results\");\r\n\t\t\tfor (Exception exception : exceptionList) {\r\n\t\t\t\texception.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t}", "private List<String> getSubscribersForThisProduct(Event event) {\n List<Entity> entities = esClient.queryTable(ProfileResource.TABLE).type(\"profile\").limit(20).execute();\n Set<String> phoneNums = new HashSet<String>();\n System.out.println(\"Found \" + entities.size()+\" subscribers\");\n for (Entity e: entities) {\n phoneNums.add( (String) e.get(\"phone_num\") );\n }\n return new ArrayList<String>(phoneNums);\n }", "protected PaypalIpn[] fetchMultiResults(ResultSet rs) throws SQLException\r\n\t{\r\n\t\tCollection resultList = new ArrayList();\r\n\t\twhile (rs.next()) {\r\n\t\t\tPaypalIpn dto = new PaypalIpn();\r\n\t\t\tpopulateDto( dto, rs);\r\n\t\t\tresultList.add( dto );\r\n\t\t}\r\n\t\t\r\n\t\tPaypalIpn ret[] = new PaypalIpn[ resultList.size() ];\r\n\t\tresultList.toArray( ret );\r\n\t\treturn ret;\r\n\t}", "public void test_sf_940570() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RDFS_INF );\n OntClass C = m.createClass( NS + \"C\" );\n Resource a = m.createResource( NS + \"a\", C );\n \n TestUtil.assertIteratorValues( this, m.listIndividuals(), new Object[] {a} );\n \n OntModel dm = ModelFactory.createOntologyModel( OntModelSpec.DAML_MEM_RULE_INF );\n OntClass D = dm.createClass( NS + \"D\" );\n Resource b = dm.createResource( NS + \"b\", D );\n \n TestUtil.assertIteratorValues( this, dm.listIndividuals(), new Object[] {b} );\n }", "protected Opportunities[] fetchMultiResults(ResultSet rs) throws SQLException\r\n\t{\r\n\t\tCollection resultList = new ArrayList();\r\n\t\twhile (rs.next()) {\r\n\t\t\tOpportunities dto = new Opportunities();\r\n\t\t\tpopulateDto( dto, rs);\r\n\t\t\tresultList.add( dto );\r\n\t\t}\r\n\t\t\r\n\t\tOpportunities ret[] = new Opportunities[ resultList.size() ];\r\n\t\tresultList.toArray( ret );\r\n\t\treturn ret;\r\n\t}", "public List<SamplePerson> getAllPeople() {\n //TODO\n throw new NotImplementedException();\n }", "public ArrayList<Individual> getSortedPopulation(){\n ArrayList<Individual> sortedIndividuals = new ArrayList<Individual>();\n\n for(Individual individual: individuals){\n int indexToadd = 0;\n\n if(sortedIndividuals.isEmpty()){\n sortedIndividuals.add(individual);\n }\n else {\n for(Individual sortedIndividual : sortedIndividuals){\n if(individual.getFitness() > sortedIndividual.getFitness()){\n indexToadd = sortedIndividuals.indexOf(sortedIndividual);\n break;\n }\n }\n if(indexToadd == 0 ){\n sortedIndividuals.add(individual);\n }\n else {\n sortedIndividuals.add(indexToadd,individual);\n }\n }\n }\n return sortedIndividuals;\n }", "private List<Individual> createBadIndividuals(int generationSize) {\n\t\tIndividualFactory factory = new ArcherFactory();\n\t\tList<Individual> list = new ArrayList<Individual>();\n\t\tfor (int i = 0; i < generationSize; i++) {\n\t\t\tlist.add(factory.createIndividual(getBadCombination()));\n\t\t}\n\t\treturn list;\n\t}", "@Override\n public List<ArrayList<String>> queryInstructor(Token token, int instructorID) {\n // TODO Auto-generated method stub\n return null;\n }", "protected Utente[] fetchMultiResults(ResultSet rs) throws SQLException\n\t{\n\t\tCollection resultList = new ArrayList();\n\t\twhile (rs.next()) {\n\t\t\tUtente dto = new Utente();\n\t\t\tpopulateDto( dto, rs);\n\t\t\tresultList.add( dto );\n\t\t}\n\t\t\n\t\tUtente ret[] = new Utente[ resultList.size() ];\n\t\tresultList.toArray( ret );\n\t\treturn ret;\n\t}", "@Override\n public List<IntraUserInformation> getIntraUsersWaitingYourAcceptance(String identityPublicKey, int max, int offset) throws CantGetIntraUsersListException {\n List<IntraUserInformation> intraUserList = new ArrayList<IntraUserInformation>();\n try {\n\n\n List<IntraWalletUserActor> actorsList = this.intraWalletUserManager.getWaitingYourAcceptanceIntraWalletUsers(identityPublicKey, max, offset);\n\n for (IntraWalletUserActor intraUserActor : actorsList) {\n intraUserList.add(new IntraUserModuleInformation(intraUserActor.getName(),\"\",intraUserActor.getPublicKey(),intraUserActor.getProfileImage(),intraUserActor.getContactState(),\"\"));\n }\n\n return intraUserList;\n } catch (CantGetIntraWalletUsersException e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET INTRA USER WAITING YOUR ACCEPTANCE\", e, \"\", \"\");\n } catch (Exception e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET INTRA USER WAITING YOUR ACCEPTANCE\", FermatException.wrapException(e), \"\", \"unknown exception\");\n }\n }", "People getFriendList(int index);", "private static List<Gene> getGenePool() {\n List<Gene> list = new ArrayList<>();\n\n Item item1 = new Item();\n item1.setName(\"Swiss Army Knife\");\n item1.setWeight(0.08125);\n item1.setVal(15);\n Gene gene1 = new Gene(item1);\n\n Item item2 = new Item();\n item2.setName(\"Duct Tape\");\n item2.setWeight(1.3);\n item2.setVal(3);\n Gene gene2 = new Gene(item2);\n\n Item item3 = new Item();\n item3.setName(\"Rope (50 feet)\");\n item3.setWeight(7);\n item3.setVal(10);\n Gene gene3 = new Gene(item3);\n\n Item item4 = new Item();\n item4.setName(\"Satellite phone\");\n item4.setWeight(2);\n item4.setVal(8);\n Gene gene4 = new Gene(item4);\n\n Item item5 = new Item();\n item5.setName(\"Elmer's Glue\");\n item5.setWeight(0.25);\n item5.setVal(2);\n Gene gene5 = new Gene(item5);\n\n Item item6 = new Item();\n item6.setName(\"Toilet Paper Roll\");\n item6.setWeight(.5);\n item6.setVal(4);\n Gene gene6 = new Gene(item6);\n\n Item item7 = new Item();\n item7.setName(\"Binoculars\");\n item7.setWeight(3);\n item7.setVal(5);\n Gene gene7 = new Gene(item7);\n\n Item item8 = new Item();\n item8.setName(\"Compass\");\n item8.setWeight(0.0573202);\n item8.setVal(15);\n Gene gene8 = new Gene(item8);\n\n Item item9 = new Item();\n item9.setName(\"Jug (pre-filled with water)\");\n item9.setWeight(4);\n item9.setVal(6);\n Gene gene9 = new Gene(item9);\n\n Item item10 = new Item();\n item10.setName(\"Flashlight\");\n item10.setWeight(2);\n item10.setVal(4);\n Gene gene10 = new Gene(item10);\n\n Item item11 = new Item();\n item11.setName(\"Box of paper clips\");\n item11.setWeight(.9);\n item11.setVal(2);\n Gene gene11 = new Gene(item11);\n\n Item item12 = new Item();\n item12.setName(\"Gloves (1 pair)\");\n item12.setWeight(.8125);\n item12.setVal(3);\n Gene gene12 = new Gene(item12);\n\n Item item13 = new Item();\n item13.setName(\"Scissors\");\n item13.setWeight(0.2);\n item13.setVal(2);\n Gene gene13 = new Gene(item13);\n\n Item item14 = new Item();\n item14.setName(\"Signal Flair (4pk)\");\n item14.setWeight(4);\n item14.setVal(5);\n Gene gene14 = new Gene(item14);\n\n Item item15 = new Item();\n item15.setName(\"Water Purifying System\");\n item15.setWeight(0.5125);\n item15.setVal(4);\n Gene gene15 = new Gene(item15);\n\n Item item16 = new Item();\n item16.setName(\"Whistle\");\n item16.setWeight(0.075);\n item16.setVal(2);\n Gene gene16 = new Gene(item16);\n\n Item item17 = new Item();\n item17.setName(\"Sleeping Bag\");\n item17.setWeight(0.38125);\n item17.setVal(4);\n Gene gene17 = new Gene(item17);\n\n Item item18 = new Item();\n item18.setName(\"Insect Repellent\");\n item18.setWeight(1.15);\n item18.setVal(3);\n Gene gene18 = new Gene(item18);\n\n Item item19 = new Item();\n item19.setName(\"Trowel\");\n item19.setWeight(0.31875);\n item19.setVal(3);\n Gene gene19 = new Gene(item19);\n\n Item item20 = new Item();\n item20.setName(\"Lighter\");\n item20.setWeight(.2);\n item20.setVal(4);\n Gene gene20 = new Gene(item20);\n\n Item item21 = new Item();\n item21.setName(\"Safety Horn\");\n item21.setWeight(.21);\n item21.setVal(3);\n Gene gene21 = new Gene(item21);\n\n Item item22 = new Item();\n item22.setName(\"Headlamp\");\n item22.setWeight(.8);\n item22.setVal(4);\n Gene gene22 = new Gene(item22);\n\n Item item23 = new Item();\n item23.setName(\"Freeze Dried Food Kit\");\n item23.setWeight(2);\n item23.setVal(6);\n Gene gene23 = new Gene(item23);\n\n Item item24 = new Item();\n item24.setName(\"Sunscreen\");\n item24.setWeight(.5);\n item24.setVal(4);\n Gene gene24 = new Gene(item24);\n\n Item item25 = new Item();\n item25.setName(\"Trekking Pole (Adjustable)\");\n item25.setWeight(1.3);\n item25.setVal(4);\n Gene gene25 = new Gene(item25);\n\n Item item26 = new Item();\n item26.setName(\"Counter Assault Bear Spray\");\n item26.setWeight(.5);\n item26.setVal(4);\n Gene gene26 = new Gene(item26);\n\n Item item27 = new Item();\n item27.setName(\"Insect Spray\");\n item27.setWeight(.5);\n item27.setVal(3);\n Gene gene27 = new Gene(item27);\n\n Item item28 = new Item();\n item28.setName(\"Hand sanitizer\");\n item28.setWeight(.625);\n item28.setVal(3);\n Gene gene28 = new Gene(item28);\n\n Item item29 = new Item();\n item29.setName(\"Mirror\");\n item29.setWeight(.5);\n item29.setVal(3);\n Gene gene29 = new Gene(item29);\n\n Item item30 = new Item();\n item30.setName(\"First Aid Kit\");\n item30.setWeight(3);\n item30.setVal(6);\n Gene gene30 = new Gene(item30);\n\n list.add(gene1);\n list.add(gene2);\n list.add(gene3);\n list.add(gene4);\n list.add(gene5);\n list.add(gene6);\n list.add(gene7);\n list.add(gene8);\n list.add(gene9);\n list.add(gene10);\n list.add(gene11);\n list.add(gene12);\n list.add(gene13);\n list.add(gene14);\n list.add(gene15);\n list.add(gene16);\n list.add(gene17);\n list.add(gene18);\n list.add(gene19);\n list.add(gene20);\n list.add(gene21);\n list.add(gene22);\n list.add(gene23);\n list.add(gene24);\n list.add(gene25);\n list.add(gene26);\n list.add(gene27);\n list.add(gene28);\n list.add(gene29);\n list.add(gene30);\n\n return list;\n }", "public ArrayList<InspectionPersonnel> queryInspByPrecinct(String precinct) {\r\n\t\tArrayList<InspectionPersonnel> list = new ArrayList<InspectionPersonnel>();\r\n\t\tif (DBConnection.conn == null) {\r\n\t\t\tDBConnection.openConn();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tString sql = \"select * from InspectionPersonnel where precinct = ?\";\r\n\t\t\tps = DBConnection.conn.prepareStatement(sql);\r\n\t\t\tps.setString(1, precinct);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tInspectionPersonnel inspector = new InspectionPersonnel();\r\n\t\t\t\tinspector.setId(rs.getString(1));\r\n\t\t\t\tinspector.setPassword(rs.getString(2));\r\n\t\t\t\tinspector.setName(rs.getString(3));\r\n\t\t\t\tinspector.setSex(rs.getString(4));\r\n\t\t\t\tinspector.setSection(rs.getString(5));\r\n\t\t\t\tinspector.setPrecinct(rs.getString(6));\r\n\t\t\t\tinspector.setTel(rs.getString(7));\r\n\t\t\t\tinspector.setIdCardNo(rs.getString(8));\r\n\t\t\t\tinspector.setRegisterDate(rs.getDate(9));\r\n\t\t\t\tinspector.setLogoffTime(rs.getDate(10));\r\n\t\t\t\tlist.add(inspector);\r\n\t\t\t}\r\n\t\t\tDBConnection.closeResultSet(rs);\r\n\t\t\tDBConnection.closeStatement(ps);\r\n\t\t\tDBConnection.closeConn();\r\n\t\t\treturn list;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "InternalResultsResponse<Person> fetchAllPersons();", "@Override\n public List<IntraUserInformation> getIntraUsersWaitingTheirAcceptance(String identityPublicKey, int max, int offset) throws CantGetIntraUsersListException {\n try {\n List<IntraUserInformation> intraUserList = new ArrayList<IntraUserInformation>();\n\n List<IntraWalletUserActor> actorsList = this.intraWalletUserManager.getWaitingTheirAcceptanceIntraWalletUsers(identityPublicKey, max, offset);\n\n for (IntraWalletUserActor intraUserActor : actorsList) {\n intraUserList.add(new IntraUserModuleInformation(intraUserActor.getName(),\"\",intraUserActor.getPublicKey(),intraUserActor.getProfileImage(),intraUserActor.getContactState(),\"\"));\n }\n return intraUserList;\n } catch (CantGetIntraWalletUsersException e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET INTRA USER WAITING THEIR ACCEPTANCE\", e, \"\", \"Error on IntraUserActor Manager\");\n } catch (Exception e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET INTRA USER WAITING THEIR ACCEPTANCE\", FermatException.wrapException(e), \"\", \"unknown exception\");\n }\n }", "void getPeople();", "public GetIndividualsFullAction() {\n super();\n }", "public Individual getIndividualByName(String name) throws ObjectNotFoundException{\n \t\n\t\tList<Individual> individualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter = 0;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\n\t\t\tif (individual.getName().equals(name)) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size == individualList.size() && counter == 0)\n\t\t\tthrow new ObjectNotFoundException(\"individual\", \"name\", name);\n\n\t\treturn individual;\n\n\n }", "public Individual getIndividualById(Integer id) throws ObjectNotFoundException{\n \tList<Individual> individualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter = 0;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\t\t\tif (individual.getId().compareTo(id) == 0) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size == individualList.size() && counter == 0)\n\t\t\tthrow new ObjectNotFoundException(\"individual\", \"id\", id.toString());\n\n\t\treturn individual;\n\n }", "public ArrayList<Person> getPeople(String descendant) {\n String sql = \"SELECT firstName, lastName, personId, AssociatedUsername,gender,father,mother,spouse FROM Person WHERE AssociatedUsername = ?\";\n Person output = null;\n ArrayList<Person> people = null;\n\n try {\n PreparedStatement pstmt = conn.prepareStatement(sql);\n pstmt.setString(1, descendant);\n ResultSet rs = pstmt.executeQuery();\n\n //input the data into model\n while (rs.next()) {\n output = new Person(rs.getString(\"personId\"), rs.getString(\"AssociatedUsername\"),\n rs.getString(\"firstName\"), rs.getString(\"lastName\"), rs.getString(\"gender\"),\n rs.getString(\"father\"), rs.getString(\"mother\"), rs.getString(\"spouse\"));\n\n\n if (people == null)\n people = new ArrayList<>();\n people.add(output);\n }\n\n rs.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return people;\n }", "private List<User> simulateSearchResult(String firstName)\n\t{\n\n\t\tArrayList<User> user=(ArrayList<User>) userService.getAllUsers();\n\t\tArrayList<User> result = new ArrayList<User>();\n\t\tfor (User u : user) {\n\t\t\tif (u.getFirstName().contains(firstName)) {\n\t\t\t\tresult.add(u);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "List<ScPartyMember> selectAll();", "private IndividualGroupList adaptativeSplitIntoGroups(List<Individual> individuals) \n {\n int individualCount = individuals.size();\n\n IndividualGroupList groups = new IndividualGroupList();\n IndividualGroup group = new IndividualGroup();\n int currentGroupSize = 8;\n \n for (int i = 0; i < individualCount; i++)\n {\n Individual individual = individuals.get(i);\n\n int individualGroupSize = getGroupSize(individual.getPositiveProbability());\n\n if (individualGroupSize != currentGroupSize || group.countIndividuals() == currentGroupSize)\n {\n groups.add(group);\n group = new IndividualGroup();\n currentGroupSize = individualGroupSize;\n }\n\n group.add(individual);\n }\n\n if (group.countIndividuals() > 0)\n groups.add(group);\n \n return groups;\n }", "public List<Candidates> getMultiWinnerCandidates() {\n List<Candidates> singleCandidates = getWinningSingleCandidates();\n List<Candidates> multiWinners = new ArrayList<>();\n Map<Integer, Integer> partyResult = multiService.mandatesByParty();\n for (Entry<Integer, Integer> partyMandateCount : partyResult.entrySet()) {\n int numberMandates = partyMandateCount.getValue();\n int counter=0;\n for (Candidates partyCandidates : candidateService.findByPartyId(partyMandateCount.getKey())) { \n while (numberMandates >= 1) { \n Candidates newPartyCandidate = candidateService.findByPartyAndSeat(partyMandateCount.getKey(),\n counter + 1);\n// Candidates newAlsoPartyCandidate = candidateService.findByPartyAndSeat(partyMandateCount.getKey(),\n// counter+2);\n counter++; \n if (singleCandidates.contains(newPartyCandidate)) {\n while(singleCandidates.contains(newPartyCandidate)==false){\n multiWinners.add(newPartyCandidate);\n counter++;\n break;\n }\n } else {\n multiWinners.add(newPartyCandidate);\n break;\n } \n \n }\n numberMandates--;\n \n }\n }\n\n System.out.println(multiWinners.size());\n\n for (Candidates candidate : multiWinners) {\n candidate.setCandidate_elected(\"multi\");\n candidateService.saveOrUpdate(candidate);\n }\n return multiWinners;\n }", "protected CollectionIncomplete<Negotiation> getNegotiationsLinkedToSubAward(Map<String, String> negotiationFilters, Map<String, String> associatedValues, boolean rowCountOnly) {\n LOG.debug(\"ENTER getNegotiationsLinkedToSubAward rowCountOnly=\"+rowCountOnly);\n Map<String, String> values = transformMap(associatedValues, subAwardTransform);\n\n CollectionIncomplete<Negotiation> result = new CollectionIncomplete<>(new ArrayList(0),0L);\n if (values == null) {\n return result;\n }\n\n Long negotiationTypeId = getNegotiationService().getNegotiationAssociationType(NegotiationAssociationType.SUB_AWARD_ASSOCIATION).getId();\n String negotiationTypeIdFilter = negotiationFilters.get(NEGOTIATION_TYPE_ATTR);\n if ( StringUtils.isNotEmpty(negotiationTypeIdFilter) && !negotiationTypeId.equals( Long.parseLong(negotiationTypeIdFilter)) ) {\n LOG.debug(\"getNegotiationsLinkedToProposal: Skipping search as found different type filter=\"+negotiationTypeIdFilter);\n return result;\n }\n\n Criteria subAwardCriteria = getCollectionCriteriaFromMap(new SubAward(), values);\n\n //filter only active/pending subAwards\n Criteria activeSubAwardCriteria = getActiveOrPendingVersionCriteria();\n ReportQueryByCriteria activeSubAwardCodesQuery = QueryFactory.newReportQuery(SubAward.class, activeSubAwardCriteria);\n activeSubAwardCodesQuery.setAttributes(new String[]{MAX_SUBAWARD_CODE});\n activeSubAwardCodesQuery.addGroupBy(SUBAWARD_CODE);\n\n subAwardCriteria.addIn(SUBAWARD_CODE, activeSubAwardCodesQuery);\n ReportQueryByCriteria subQuery = QueryFactory.newReportQuery(SubAward.class, subAwardCriteria);\n subQuery.setAttributes(new String[] {SUBAWARD_CODE});\n\n\n Criteria negotiationsLinedToSubAwardsCriteria = getCollectionCriteriaFromMap(new Negotiation(), negotiationFilters);\n negotiationsLinedToSubAwardsCriteria.addIn(ASSOCIATED_DOC_ID_ATTR, subQuery);\n negotiationsLinedToSubAwardsCriteria.addEqualTo(NEGOTIATION_TYPE_ATTR, negotiationTypeId);\n\n LOG.debug(\"getNegotiationsLinkedToSubAward criteria=\"+negotiationsLinedToSubAwardsCriteria.toString());\n\n return executeSearch(negotiationsLinedToSubAwardsCriteria, rowCountOnly);\n\n }", "protected CollectionIncomplete<Negotiation> getNegotiationsLinkedToProposal(Map<String, String> negotiationFilters, Map<String, String> associatedValues, boolean rowCountOnly) {\n LOG.debug(\"ENTER getNegotiationsLinkedToProposal rowCountOnly=\"+rowCountOnly);\n Map<String, String> values = transformMap(associatedValues, institutionalProposalTransform);\n CollectionIncomplete<Negotiation> result = new CollectionIncomplete<>(new ArrayList(0),0L);\n if (values == null) {\n return result;\n }\n\n Long negotiationTypeId = getNegotiationService().getNegotiationAssociationType(NegotiationAssociationType.INSTITUATIONAL_PROPOSAL_ASSOCIATION).getId();\n String negotiationTypeIdFilter = negotiationFilters.get(NEGOTIATION_TYPE_ATTR);\n if ( StringUtils.isNotEmpty(negotiationTypeIdFilter) && !negotiationTypeId.equals( Long.parseLong(negotiationTypeIdFilter)) ) {\n LOG.debug(\"getNegotiationsLinkedToProposal: Skipping search as found different type filter=\"+negotiationTypeIdFilter);\n return result;\n }\n\n\n values.put(PROPOSAL_SEQUENCE_STATUS, VersionStatus.ACTIVE.name());\n Criteria criteria = getCollectionCriteriaFromMap(new InstitutionalProposal(), values);\n\n Criteria negotiationsLinkedToIPCriteria = getCollectionCriteriaFromMap(new Negotiation(), negotiationFilters);\n\n ReportQueryByCriteria subQuery = QueryFactory.newReportQuery(InstitutionalProposal.class, criteria);\n subQuery.setAttributes(new String[] {PROPOSAL_NUMBER});\n negotiationsLinkedToIPCriteria.addIn(ASSOCIATED_DOC_ID_ATTR, subQuery);\n negotiationsLinkedToIPCriteria.addEqualTo(NEGOTIATION_TYPE_ATTR, negotiationTypeId);\n\n return executeSearch(negotiationsLinkedToIPCriteria, rowCountOnly);\n\n }", "protected void retrieveMatchingWorkItems(List searchResults) throws NbaBaseException { \t//SPR2992 changed method signature\n\t\t//NBA213 deleted code\n\t\tListIterator results = searchResults.listIterator();\n\t\tsetMatchingWorkItems(new ArrayList());\t\t//SPR2992\n\t\twhile (results.hasNext()) {\n\t\t\tNbaTransactionSearchResultVO resultVO = (NbaTransactionSearchResultVO) results.next();\n\t\t\tNbaAwdRetrieveOptionsVO retOpt = new NbaAwdRetrieveOptionsVO();\n\t\t\tretOpt.setWorkItem(resultVO.getTransactionID(), false);\n\t\t\tretOpt.requestSources();\t\t\t\t \n\t\t\tretOpt.setLockWorkItem();\n\t\t\tNbaDst aWorkItem = retrieveWorkItem(getUser(), retOpt);\t//SPR3009, NBA213\n\t\t\tgetMatchingWorkItems().add(aWorkItem);\t//SPR2992\n\t\t}\n\t\t//NBA213 deleted code\n\t}", "@Test\r\n public void testGetKnownDiseaseAssociationsForMgiGeneId() {\r\n String mgiGeneId = \"MGI:95523\";\r\n\r\n Map<Disease, Set<DiseaseAssociation>> result = instance.getKnownDiseaseAssociationsForMgiGeneId(mgiGeneId);\r\n\r\n for (Disease disease : result.keySet()) {\r\n// System.out.println(disease);\r\n Set<DiseaseAssociation> diseaseAssociations = result.get(disease);\r\n if (disease.getDiseaseId().equals(\"OMIM:101200\")) {\r\n assertEquals(2, diseaseAssociations.size());\r\n }\r\n for (DiseaseAssociation diseaseAssociation : diseaseAssociations) {\r\n// System.out.println(String.format(\" %s\", diseaseAssociation));\r\n }\r\n }\r\n\r\n assertTrue(result.keySet().size() >= 11);\r\n \r\n \r\n }", "public List<Object> retrieveIncrementalMemberships() {\n List<Object> result = new ArrayList<Object>();\n for (ProvisioningMembershipWrapper provisioningMembershipWrapper : this.provisioningMembershipWrappers) {\n \n if (provisioningMembershipWrapper.getGrouperTargetMembership() != null) {\n result.add(provisioningMembershipWrapper.getGrouperTargetMembership());\n } else if (provisioningMembershipWrapper.getGrouperProvisioningMembership() != null) {\n result.add(provisioningMembershipWrapper.getGrouperProvisioningMembership());\n } else if (provisioningMembershipWrapper.getGcGrouperSyncMembership() != null) {\n result.add(provisioningMembershipWrapper.getGcGrouperSyncMembership());\n } else if (provisioningMembershipWrapper.getProvisioningStateMembership() != null) {\n result.add(provisioningMembershipWrapper.getProvisioningStateMembership());\n }\n }\n return result;\n }", "public void test2_updateSingletonList() {\n ArrayList<Participant> dummyList = new ArrayList<>();\n Participant dummy1 = new Participant(\"UpdateDummy1\");\n Participant dummy2 = new Participant(\"UpdateDummy2\");\n Participant dummy3 = new Participant(\"UpdateDummy3\");\n Participant dummy4 = new Participant(\"UpdateDummy4\");\n\n dummyList.add(dummy1);\n dummyList.add(dummy2);\n dummyList.add(dummy3);\n dummyList.add(dummy4);\n\n // add test users into the server\n apt.execute(dummy1, dummy2, dummy3, dummy4);\n\n // attempt to obtain all of these participants within the singleton list\n ParticipantController.updateSingletonList();\n\n for (Participant found : dummyList) {\n if (instance.getParticipantList().contains(found)) {\n assertTrue(true);\n } else {\n assertTrue(\"Not all found\", false);\n }\n }\n\n\n }", "public List<Identity> getIdentities(Identity criteria) throws SearchIdentityException {\r\n\t\t\r\n\t\tList<Identity> identitiesList=null;\r\n\t\tIdentity identityLocal=null;\r\n\t\tResultSet resultSet = null;\r\n\t\t\r\n\t\tfinal String sqlString = \"SELECT DISPLAY_NAME, EMAIL, UID FROM IDENTITIES \" + \"WHERE (? IS NULL OR DISPLAY_NAME LIKE ?) \"\r\n\t\t\t\t+ \"AND (? IS NULL OR EMAIL LIKE ?) \" + \"AND (? IS NULL OR UID LIKE ?)\";\r\n\r\n\r\n\t\ttry {\r\n\t\t\tif (criteria == null) {\r\n\t\t\t\tpreparedStatement = connection.prepareStatement(SqlConstants.SELECT_IDENTITY);\r\n\t\t\t} else {\r\n\t\t\t\tpreparedStatement = connection\r\n\t\t\t\t\t\t.prepareStatement(sqlString);\r\n\t\t\t\t\r\n\t\t\t\tpreparedStatement.setString(1, criteria.getDisplayName());\r\n\t\t\t\tpreparedStatement.setString(2, criteria.getDisplayName() + \"%\");\r\n\t\t\t\tpreparedStatement.setString(3, criteria.getEmail());\r\n\t\t\t\tpreparedStatement.setString(4, criteria.getEmail() + \"%\");\r\n\t\t\t\tpreparedStatement.setString(5, criteria.getUid());\r\n\t\t\t\tpreparedStatement.setString(6, criteria.getUid() + \"%\");\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tresultSet = preparedStatement.executeQuery();\r\n\t\t\t\r\n\t\t\tif(resultSet != null) {\r\n\t\t\t\tidentitiesList=new ArrayList<>();\r\n\t\t\t\t\r\n\t\t\t\twhile (resultSet.next()) {\r\n\t\t\t\t\t// assemble the object and send back the list\r\n\t\t\t\t\tidentityLocal=new Identity();\r\n\t\t\t\t\tidentityLocal.setDisplayName(resultSet.getString(Constants.DISPLAY_NAME_DB_COLOUMN));\r\n\t\t\t\t\tidentityLocal.setEmail(resultSet.getString(Constants.EMAIL_DB_COLOUMN));\r\n\t\t\t\t\tidentityLocal.setUid(resultSet.getString(Constants.UID_DB_COLOUMN));\r\n\t\t\t\t\t\r\n\t\t\t\t\tidentitiesList.add(identityLocal);\r\n\t\t\t\t}\r\n\t\t\t}else {\r\n\t\t\t\tlogger.info(\"No details found for identity: \"+criteria);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(Constants.EXCEPTION, e);\r\n\t\t\t\r\n\t\t\tthrow new SearchIdentityException(e, criteria);\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\ttry {\r\n\t\t\t\tif(resultSet != null)\r\n\t\t\t\tresultSet.close();\r\n\t\t\t\t\r\n\t\t\t\tif(preparedStatement != null)\r\n\t\t\t\t\tpreparedStatement.close();\r\n\t\t\t\t\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tlogger.error(Constants.EXCEPTION, e);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn identitiesList;\r\n\t}", "public List<Agent> findAgentsInterne() {\n Query q = getEntityManager().createQuery(\"select A from Agent A WHERE A.etat NOT IN('RET','DEM') AND A.lastDirection IN(SELECT D.code FROM Direction D WHERE D.internExtern=?1) ORDER BY A.personne.name\");\n q.setParameter(1, InterneExterne.Interne);\n List<Agent> list = q.getResultList();\n return list;\n }", "private int findBidders() {\r\n try {\r\n agents = new ArrayList<AMSAgentDescription>();\r\n //definisce i vincoli di ricerca, in questo caso tutti i risultati\r\n SearchConstraints searchConstraints = new SearchConstraints();\r\n searchConstraints.setMaxResults(Long.MAX_VALUE);\r\n //tutti gli agenti dell'AMS vengono messi in un array\r\n AMSAgentDescription [] allAgents = AMSService.search(this, new AMSAgentDescription(), searchConstraints);\r\n //scorre la lista degli agenti trovati al fine di filtrare solo quelli di interesse\r\n for (AMSAgentDescription a: allAgents) {\r\n //aggiunge l'agente partecipante all'ArrayList se e' un partecipante\r\n if(a.getName().getLocalName().contains(\"Participant\")) {\r\n agents.add(a);\r\n } \r\n }\r\n } catch (Exception e) {\r\n System.out.println( \"Problema di ricerca dell'AMS: \" + e );\r\n e.printStackTrace();\r\n }\r\n return agents.size();\r\n }", "public abstract List get(List oids) throws OIDDoesNotExistException;", "private Collection<ConnectionEntry> getMyInvites(Map<String, String> parameters)throws ProfileServiceException{\n \t\tif (logger.isLoggable(Level.FINEST)) {\n \t\t\tlogger.entering(sourceClass, \"getMyInvites\", parameters);\n \t\t}\n \n \t\tDocument data = null;\n \t\tCollection<ConnectionEntry> invites = null;\n \t\tString url = resolveProfileUrl(ProfileEntity.NONADMIN.getProfileEntityType(),\n \t\t\t\tProfileType.CONNECTIONS.getProfileType());\n \t\tdata = executeGet(url, parameters, ClientService.FORMAT_XML);\n \t\tif(parameters.containsKey(\"outputType\")){\n \t\t\tif(parameters.get(\"outputType\").equalsIgnoreCase(\"profile\")){\n \t\t\t\tinvites = Converter.returnConnectionEntries(data, \"profile\");\n \t\t\t}\n \t\t\telse \n \t\t\t\tinvites = Converter.returnConnectionEntries(data, \"connection\");\n \t\t}\n \t\telse{\n \t\t\tinvites = Converter.returnConnectionEntries(data, \"connection\");\n \t\t}\n \t\tif (logger.isLoggable(Level.FINEST)) {\n \t\t\tlogger.exiting(sourceClass, \"getMyInvites\");\n \t\t}\n \t\treturn invites;\n \t}", "private void getIDOLS(int index){\n\t\t\n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\t\t\n\n\t\tString params = \"?sort=firstNameAsc&fields=name,-resources,jive.username\"; \n\t\tString url = urlBase+\"/api/core/v3/people/\"+this.myUsers[index].id +\"/@followers\"+params;\n\t\tHttpGet getRequest = new HttpGet(url);\n\t\t\n\t\t\n\t\t\t\t \n\t\tgetRequest.setHeader(\"Authorization\", \"Basic \" + this.auth);\n\t\t\n\t\t\n\t\tSystem.out.println(\"\\nAdding IDOLs for: \" + this.myUsers[index].login); \n\t\t\n\t\ttry {\n\t\t\tHttpResponse response = httpClient.execute(getRequest);\n\t\t\tString json_output = readStream(response.getEntity().getContent());\n\t\t // Remove throwline if present\n\t\t\tjson_output = removeThrowLine(json_output);\n\t\t getIdolElements(index, json_output);\n\n\t \n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@Override\n\tpublic List<Resident> getResidentList() {\n\t\tQuery query = getSession().createQuery(\"select residents from RESIDENT_HMS residents\");\n\t\tList<Resident> residentlist=query.list();\n\t\treturn residentlist;\n\t}", "@Test\n\tpublic void findAllPublicIndividualNotesTest(){\n//\t\tlog.trace(\"GETTING all public individual notes by Trainee ID\");\n\t\t// get public individual notes\n\t\tList<Note> notes = noteDao.findAllPublicIndividualNotes(TEST_TRAINEE_ID);\n\t\t\n\t\t// compare with expected\n\t\tassertTrue(notes.size() == 7);\n\t\tfor(Note note : notes){\n\t\t\tassertEquals(TEST_TRAINEE_ID,note.getTrainee().getTraineeId());\n\t\t}\n\t}", "public NamedIndividual getNamedIndividual() {\n \treturn namedIndividual;\n }", "@Sql({\"/jdbc/search/gene/clean_database.sql\", \"/jdbc/search/gene/gene_autocomplete_schema.sql\", \"/jdbc/search/gene/gene_autocomplete_dataset.sql\"})\n @Test\n public void searchGene_WhenCallWithLimit_ThenReturnLimitedListOfGenesSuccessfully() {\n final List<String> searchGenes = searchGeneDBService.searchGene(\"BRCA\", \"homo_sapiens\", 2);\n\n //Assert\n assertThat(searchGenes)\n .isNotNull()\n .hasSize(2)\n .containsOnly(GENE1, GENE2);\n\n }", "private synchronized void addResultToMultiList() {\n\t addObjectToMultiList(resultArrayList);\r\n\t }", "private static StringBuilder addResultsToCSVString(Collection<DSEIndividual> individuals,\r\n\t\t\tList<Exception> exceptionList) {\r\n\t\tStringBuilder output = new StringBuilder(10000);\r\n\t\t\r\n\t\tDSEIndividual firstIndividual = individuals.iterator().next();\r\n\t\t\r\n\t\tList<Criterion> criteriaToSave = determineCriterionsToSave(firstIndividual);\r\n\t\tList<Criterion> criteriaWithConfidence = determineCriteriaWithConfidenceInterval(firstIndividual);\r\n\r\n\t\toutput = prettyPrintHeadlineCSV(individuals, output, criteriaToSave);\r\n\t\tint counter = 0;\r\n\r\n\t\t// content\r\n\t\tfor (DSEIndividual ind2 : individuals) {\r\n\t\t\ttry {\r\n\t\t\toutput = prettyPrintResultLineCSV(output, ind2,criteriaToSave, criteriaWithConfidence);\r\n\t\t\t} catch (Exception e){\r\n\t\t\t\texceptionList.add(new Exception(\"Encountered corrupted result number \"+counter+\", skipped it\", e));\r\n\t\t\t}\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t\treturn output;\r\n\t}", "java.util.List<People>\n getFriendListList();", "@Test\n public void testMultiSearch_withoutParens() {\n List<String> fields = new ArrayList<>();\n fields.add(\"sn\");\n fields.add(\"mail\");\n\n BridgeRequest request = new BridgeRequest();\n request.setStructure(\"user\");\n request.setFields(fields);\n request.setQuery(\"memberOf=cn=VPN Users,cn=Users,dc=kineticdata,dc=com\");\n\n BridgeError expectedError = null;\n try {\n getAdapter().search(request);\n } catch (BridgeError e) {\n expectedError = e;\n }\n\n assertNotNull(expectedError);\n }", "protected VwStatsPerGame[] fetchMultiResults(ResultSet rs) throws SQLException\n\t{\n\t\tCollection resultList = new ArrayList();\n\t\twhile (rs.next()) {\n\t\t\tVwStatsPerGame dto = new VwStatsPerGame();\n\t\t\tpopulateDto( dto, rs);\n\t\t\tresultList.add( dto );\n\t\t}\n\t\t\n\t\tVwStatsPerGame ret[] = new VwStatsPerGame[ resultList.size() ];\n\t\tresultList.toArray( ret );\n\t\treturn ret;\n\t}", "private void writeResults() {\n\t\tgetContext().writeName(\"searchResults\");\n\t // Open the Array of affectedParties\n\t TypeContext itemTypeContext = getContext().writeOpenArray();\n\t \n\t for(Person person : results){\n\t\t\t// Add a comma after each affectedParty object is written\n if (!itemTypeContext.isFirst()){\n \tgetContext().writeComma();\n }\n itemTypeContext.setFirst(false);\n\t\t\t\n // Open the affectedParty object and write the fields\n\t\t\tgetContext().writeOpenObject();\n\t\t\t\n\t\t\t// Write out the fields\n\t\t getContext().writeName(\"id\");\n\t\t getContext().transform(person.getId());\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"name\");\n\t\t getContext().transform(person.getName());\n\t\t getContext().writeComma();\n\n\t\t getContext().writeName(\"sex\");\n\t\t getContext().transform(person.getSex());\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"dob\");\n\t\t getContext().transform(person.getDob() == null?null:new SimpleDateFormat(\"dd/MM/yyyy\").format(person.getDob()));\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"dod\");\n\t\t getContext().transform(person.getDod() == null?null:new SimpleDateFormat(\"dd/MM/yyyy\").format(person.getDod()));\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"placeOfBirth\");\n\t\t getContext().transform(person.getPlaceOfBirth());\n\t\t getContext().writeComma();\n\t\t \n\t\t getContext().writeName(\"placeOfDeath\");\n\t\t getContext().transform(person.getPlaceOfDeath());\n\t\t getContext().writeComma();\n \t getContext().writeName(\"href\");\n \t getContext().transform(url + \"/\" + person.getId());\n\t\t\t\n \t // Close the affectedParty object\n \t getContext().writeCloseObject();\n }\n\t\t// Close the Array of affectedParties\n getContext().writeCloseArray();\n\t}", "@Test\n public void testGetInfluentialUsers01() {\n System.out.println(\"getInfluentialUsers\");\n\n Set<User> expResult = new HashSet<>();\n expResult.add(new User(\"nick3\", \"[email protected]\"));\n expResult.add(new User(\"nick5\", \"[email protected]\"));\n expResult.add(new User(\"nick8\", \"[email protected]\"));\n\n Set<User> result = sn10.getInfluentialUsers();\n assertEquals(expResult, result);\n }", "public ReactorResult<InvolvedPerson> getAllInvolvedPerson_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), INVOLVEDPERSON, InvolvedPerson.class);\r\n\t}", "Individual createIndividual();", "public ArrayList<IndividualUser> listAllUsers() {\n try {\n PreparedStatement s = sql.prepareStatement(\"SELECT id, userName, firstName, lastName FROM Users \");\n s.execute();\n ResultSet results = s.getResultSet();\n ArrayList<IndividualUser> users = new ArrayList<>();\n if (!results.isBeforeFirst()) {\n results.close();\n s.close();\n return users;\n }\n\n while (!results.isLast()) {\n results.next();\n IndividualUser u = new IndividualUser(results.getInt(1), results.getString(2), results.getString(3), results.getString(4));\n\n users.add(u);\n\n }\n\n results.close();\n s.close();\n\n return users;\n } catch (SQLException e) {\n sqlException(e);\n return null;\n }\n }", "@Override\n\tpublic void setNamedIndividualIRI() {\n\t\t\n\t}", "@Override\r\n\tpublic List<TraOfficialspecial> findBestSpecialList(int beginIndex,int size) {\n\t\treturn officialspecialMapper.findBestSpecialList(beginIndex,size);\r\n\t}", "IbeisIndividual addIndividual(String name) throws IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException, IndividualNameAlreadyExistsException;", "private static List<String> findInforUser(String user_id, String nick) {\n\n\t//\tString[] result = new String[2];\n\t\tList<String> lstInfor = new ArrayList<String>();\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\n\t\tDBPool dbpool = new DBPool();\n\n\t\ttry {\n\t\t\tconnection = dbpool.getConnection(\"VOVTV\");\n\t\t\tif (connection == null) {\n\t\t\t\tUtil.logger.error(\"Impossible to connect to DB\");\n\t\t\t\treturn lstInfor;\n\t\t\t}\n\n\t\t\t/*String sqlSelect = \"SELECT MSISDN,SexID,Brithday, Address,Favorites FROM [VOVTV].[dbo].NickName WHERE MSISDN LIKE '\"\n\t\t\t\t\t+ user_id + \"' and NickName LIKE '\"+nick+\"'\";*/\n\t\t\tString sqlSelect = \"SELECT MSISDN,SexID,Brithday, Address,Favorites FROM [dbo].NickName WHERE NickName LIKE '\"+nick+\"'\";\n\n\t\t\tUtil.logger.info(\"SEARCH INFOR : \" + sqlSelect);\n\t\t\t/*statement = connection.prepareStatement(sqlSelect);\n\t\t\tUtil.logger.info(\"SEARCH THEO BIRTHDAY AND ADDRESS\");\n\t\t\tif (statement.execute()) {\n\t\t\t\trs = statement.getResultSet();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tresult = Integer.valueOf(rs.getString(1));\n\t\t\t\t\t//result[1] = rs.getString(2);\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t\n\t\t\tVector result = DBUtil.getVectorTable(connection, sqlSelect);\n\n\t\t\tUtil.logger.info(\"DBUtil.getCode: queryStatement:\" + sqlSelect);\n\n\t\t\tif (result.size() > 0) {\n\t\t\t\tVector item = (Vector) result.elementAt(0);\n\t\t\t\tString msisdn = item.elementAt(0).toString();\n\t\t\t\tString sexid = item.elementAt(1).toString();\n\t\t\t\tString birthday = item.elementAt(2).toString();\n\t\t\t\tString address = item.elementAt(3).toString();\n\t\t\t\tString favorites = item.elementAt(4).toString();\n\t\t\t\tlstInfor.add(msisdn);\n\t\t\t\tString gt = \"\";\n\t\t\t\tif(sexid.equalsIgnoreCase(\"1\")) {\n\t\t\t\t\tgt = \"NAM\";\n\t\t\t\t} else {\n\t\t\t\t\tgt = \"NU\";\n\t\t\t\t}\n\t\t\t\tlstInfor.add(gt);\n\t\t\t\tlstInfor.add(birthday);\n\t\t\t\tlstInfor.add(address);\n\t\t\t\tlstInfor.add(favorites);\n\t\t\t\treturn lstInfor;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tUtil.logger.error(\": Error:\" + e.toString());\n\t\t\treturn lstInfor;\n\t\t} catch (Exception e) {\n\t\t\tUtil.logger.error(\": Error:\" + e.toString());\n\t\t\treturn lstInfor;\n\t\t} finally {\n\t\t\tdbpool.cleanup(rs);\n\t\t\tdbpool.cleanup(statement);\n\t\t\tdbpool.cleanup(connection);\n\t\t}\n\t\treturn lstInfor;\n\t}", "@Test\n public void testGetNearbyFriendsInAgivenDistance02() {\n System.out.println(\"getNearbyFriendsInAgivenDistance\");\n User user = null;\n for (User user1 : sn10.getUsersList()) {\n if (user1.getNickname().equals(\"nick0\")) {\n user = user1;\n }\n }\n Double distance = 70.0;\n HashSet<User> expResult = new HashSet();\n expResult.add(new User(\"nick4\", \"[email protected]\"));\n\n HashSet<User> result = sn10.getNearbyFriendsInAgivenDistance(user, distance);\n assertFalse(expResult.equals(result));\n }", "@Test\n @Tag(\"CREATE\")\n @Tag(\"RESOURCE\")\n @DisplayName(\"Test HQL Query for Multiple Select and Pagination with Address 02\")\n public void testHQLQueryForMultipleSelectAndPaginationWithAddress02()\n {\n System.out.println(\"Programme Start\");\n long startTime = System.nanoTime();\n\n try (Session session = HibernateUtil.getSessionFactory().openSession()) {\n Transaction transaction = null;\n try {\n transaction = session.beginTransaction();\n\n Query query = session.createQuery(\n \"select address02Street, address02Zip from SBAddress02 order by address02Street asc\");\n query.setFirstResult(5);\n query.setMaxResults(10);\n\n List<Object[]> addressDetails = query.list();\n\n transaction.commit();\n\n addressDetails.forEach(address -> System.out.println(\"Added Address : \" + address[0]));\n\n System.out.println(addressDetails.size());\n } catch (Exception e) {\n if (transaction != null) {\n transaction.rollback();\n }\n LOGGER.error(ExceptionUtils.getFullStackTrace(e));\n e.printStackTrace();\n }\n\n } catch (Throwable throwable) {\n LOGGER.error(ExceptionUtils.getFullStackTrace(throwable));\n throwable.printStackTrace();\n }\n\n long endTime = System.nanoTime();\n ELAPSED_TIME = endTime - startTime;\n System.out.println(\"Programme End\");\n\n }", "@Test\r\n public void driverListTooLargeTest(){\r\n int tooBigListSize = 26;\r\n extractor.setElement(\"table.msr_season_driver_results\");\r\n int expectedListSize = extractor.getElement().select(\"td.msr_driver\").size();\r\n \r\n\r\n assertEquals(\"should default to the size of table\", expectedListSize, extractor.extractXDriversOrTeams(tooBigListSize, \"table.msr_season_driver_results\", \"td.msr_driver\" ).size());\r\n\r\n }", "java.util.List<People>\n getUserList();", "private void getMyTargetsList() {\n try {\n\n String qryTargets = Constants.Targets+ \"?$filter=\" +Constants.KPIGUID+ \" eq guid'\"\n + mStrBundleKpiGUID+\"'\" ;\n ArrayList<MyTargetsBean> alMyTargets = OfflineManager.getMyTargetsList(qryTargets, mStrParnerGuid,\n mStrBundleKpiName, mStrBundleKpiCode, mStrBundleKpiGUID,\n mStrBundleCalBased, mStrBundleKpiFor,\n mStrBundleCalSource, mStrBundleRollup,mStrBundleKPICat,true);\n\n ArrayList<MyTargetsBean> alOrderValByOrderMatGrp = OfflineManager.getActualTargetByOrderMatGrp(CRSSKUGroupWiseTargetsActivity.this,mStrCPDMSDIV);\n mapMyTargetValByCRSSKU = getALOrderVal(alOrderValByOrderMatGrp);\n mapMyTargetVal = getALMyTargetList(alMyTargets);\n sortingValues();\n } catch (OfflineODataStoreException e) {\n sortingValues();\n LogManager.writeLogError(Constants.strErrorWithColon + e.getMessage());\n }\n }", "@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }", "public GAIndividual()\n {\n m_fitness = 0;\n m_genome = new ArrayList<Integer>();\n }", "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.Person\",searchObject );\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(1,results.size());\r\n\t\t\r\n\t\tIterator i = results.iterator();\r\n\t\tPerson result = (Person)i.next();\r\n\t\ttoXML(result);\r\n\t\tPerson result2 = (Person)fromXML(result);\r\n\t\t\r\n\t\tassertNotNull(result2);\r\n\t\tassertNotNull(result2.getId().getExtension()); \r\n\t\tassertEquals(II_ROOT_GLOBAL_CONSTANT_VALUE,result2.getId().getRoot());\r\n\t\tassertNotNull(result2.getName());\r\n\t\t\r\n\t\tAddress address = result2.getLivesAt();\r\n\t\tassertNotNull(address);\r\n\t\tassertNotNull(address.getId());\r\n\t\tassertNotNull(address.getZip());\r\n\t\tassertEquals(\"1\",address.getId().getExtension());\r\n\t}", "public abstract SmartObject findIndividualName(String individualName);", "public ArrayList<Member> getMemberWholeList() {\n\t\t return dao.selectMemberwholeList();\r\n\t}", "int getIndividualStamina();", "protected Iterator getNominationsSet() \n {\n return this.nominations.iterator();\n }", "protected CollectionIncomplete<Negotiation> getNegotiationsUnassociated(Map<String, String> negotiationFilters, Map<String, String> associatedValues, boolean rowCountOnly) {\n LOG.debug(\"ENTER getNegotiationsUnassociated rowCountOnly=\"+rowCountOnly);\n Map<String, String> values = transformMap(associatedValues, unassociatedTransform);\n\n CollectionIncomplete<Negotiation> result = new CollectionIncomplete<>(new ArrayList(0),0L);\n if (values == null) {\n return result;\n }\n\n Long negotiationTypeId = getNegotiationService().getNegotiationAssociationType(NegotiationAssociationType.NONE_ASSOCIATION).getId();\n String negotiationTypeIdFilter = negotiationFilters.get(NEGOTIATION_TYPE_ATTR);\n if ( StringUtils.isNotEmpty(negotiationTypeIdFilter) && !negotiationTypeId.equals( Long.parseLong(negotiationTypeIdFilter)) ) {\n LOG.debug(\"getNegotiationsLinkedToProposal: Skipping search as found different type filter=\"+negotiationTypeIdFilter);\n return result;\n }\n\n\n Criteria negotiationsUnassociatedCriteria = getCollectionCriteriaFromMap(new NegotiationUnassociatedDetail(), values);\n Criteria negotiationCrit = getCollectionCriteriaFromMap(new Negotiation(), negotiationFilters);\n ReportQueryByCriteria subQuery = QueryFactory.newReportQuery(NegotiationUnassociatedDetail.class, negotiationsUnassociatedCriteria);\n subQuery.setAttributes(new String[] {UNASSOCIATED_ID});\n\n negotiationCrit.addIn(ASSOCIATED_DOC_ID_ATTR, subQuery);\n negotiationCrit.addEqualTo(NEGOTIATION_TYPE_ATTR, negotiationTypeId);\n\n return executeSearch(negotiationCrit, rowCountOnly);\n }", "int getOtherIds(int index);", "private void getAllIds() {\n try {\n ArrayList<String> NicNumber = GuestController.getAllIdNumbers();\n for (String nic : NicNumber) {\n combo_nic.addItem(nic);\n\n }\n } catch (Exception ex) {\n Logger.getLogger(ModifyRoomReservation.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void queryItems() {\n int preferredPageSize = 10;\n CosmosQueryRequestOptions queryOptions = new CosmosQueryRequestOptions();\n //queryOptions.setEnableCrossPartitionQuery(true); //No longer necessary in SDK v4\n // Set populate query metrics to get metrics around query executions\n queryOptions.setQueryMetricsEnabled(true);\n\n CosmosPagedIterable<Family> familiesPagedIterable = container.queryItems(\n \"SELECT * FROM Family WHERE Family.lastName IN ('Andersen', 'Wakefield', 'Johnson')\", queryOptions, Family.class);\n\n familiesPagedIterable.iterableByPage(preferredPageSize).forEach(cosmosItemPropertiesFeedResponse -> {\n logger.info(\"Got a page of query result with \" +\n cosmosItemPropertiesFeedResponse.getResults().size() + \" items(s)\"\n + \" and request charge of \" + cosmosItemPropertiesFeedResponse.getRequestCharge());\n\n logger.info(\"Item Ids \" + cosmosItemPropertiesFeedResponse\n .getResults()\n .stream()\n .map(Family::getId)\n .collect(Collectors.toList()));\n });\n // </QueryItems>\n }", "@Override\n public List<ArrayList<String>> queryStudentPersonalData(Token token, int studentID) {\n List<ArrayList<Object>> objList = null;\n\n try {\n objList = queryStudentPersonalData1(token, studentID);\n } catch (SCRSException e) {\n System.out.println(e.getMessage());\n return null;\n }\n List<ArrayList<String>> result = UtilMethods.convertObjListToStringList(objList);\n return result;\n }", "private static Set<String> gatherAllowedRegisterIDs(\r\n\t\t\tfinal int allowedRegistersCount) {\r\n\t\tSet<String> allowedRegisterIDs = new TreeSet<String>();\r\n\t\tfor (int i = 1; i <= allowedRegistersCount; i++) {\r\n\t\t\tallowedRegisterIDs.add(String.valueOf(100 + i));\r\n\t\t}\r\n\t\tLOGGER.debug(\"Allowed register IDs are - {}\", allowedRegisterIDs);\r\n\t\treturn allowedRegisterIDs;\r\n\t}", "private ArrayList<UserIdBean> getRegistrationGapUserIdList(\n\t\t\tint maxReturnLength, String curriculum,\n\t\t\tArrayList<UserIdBean> userList)\n\t\t\tthrows RegistrationGapUsersListSQLException,\n\t\t\tRegistrationGapUsersConnectionSQLException {\n\t\tString sourceMethod = \"getRegistrationGapUserIdList\";\n\t\tArrayList<UserIdBean> list = userList;\n\t\tString sql = null;\n\t\tString imSql = \"select p.username as username, p.id as id, ce.id as certId from tpt_ce_stud_certification stud \"\n\t\t\t\t+ \"inner join tpt_ext_ce_certification ce on ce.id = stud.certification_id \"\n\t\t\t\t+ \"inner join cmt_person p on p.id = stud.owner_id \"\n\t\t\t\t+ \"where stud.status = '100' and ce.inherited = '0' and p.custom0 = 'Incomplete' \"\n\t\t\t\t+ \"and ce.custom3 = ? \"\n\t\t\t\t+ \"and rownum <= ? and length(p.username) > 5 \"\n\t\t\t\t+ \" and extract(year from stud.expired_on) = ? \"\n\t\t\t\t+ \" and stud.id not in (select login_id from at_mlms_login_log where login_date < sysdate-1)\"\n\t\t\t\t+ \" order by p.username\";\n\t\tString shopSql = \"select p.username as username, p.id as id, ce.id as certId from tpt_ce_stud_certification stud \"\n\t\t\t\t+ \"inner join tpt_ext_ce_certification ce on ce.id = stud.certification_id \"\n\t\t\t\t+ \"inner join cmt_person p on p.id = stud.owner_id \"\n\t\t\t\t+ \"inner join AT_MLMS_AB_MISC_ATTRIBUTES m on m.person_id = stud.owner_id \"\n\t\t\t\t+ \"where stud.status = '100' and ce.inherited = '0' and m.SHOP_COMPLETION_STATUS = 'Incomplete' \"\n\t\t\t\t+ \"and ce.custom3 = ? \"\n\t\t\t\t+ \"and stud.id not in (select login_id from at_mlms_login_log where login_date < sysdate-1)\"\n\t\t\t\t+ \"and rownum <= ? and length(p.username) > 5 \"\n\t\t\t\t+ \" and extract(year from stud.expired_on) = ? \"\n\t\t\t\t+ \" order by p.username\";\n\t\tif (list == null) {\n\t\t\tlist = new ArrayList<UserIdBean>(maxReturnLength * 2);\n\t\t}\n\t\tlogger.logp(Level.FINER, sourceClass, sourceMethod,\n\t\t\t\t\" populating response with training data \");\n\t\tString curriculumStr = null;\n\n\t\tString username = null;\n\t\tString personId = null;\n\t\tConnection userListCon = null;\n\t\tUserIdBean userBean = null;\n\n\t\tResultSet rs = null;\n\t\t// CallableStatement cstmt = null;\n\t\tPreparedStatement pstmt = null;\n\n\t\tif (curriculum != null && curriculum.equalsIgnoreCase(\"IM\")) {\n\t\t\tcurriculumStr = \"Individual Marketplace\";\n\t\t\tsql = imSql;\n\t\t} else if (curriculum != null && curriculum.equalsIgnoreCase(\"SHOP\")) {\n\t\t\tcurriculumStr = \"SHOP Marketplace\";\n\t\t\tsql = shopSql;\n\t\t}\n\t\tlogger.logp(Level.FINER, sourceClass ,sourceMethod ,\" making database call to get list, input parameters \\n curriculumStr \"\n\t\t\t\t\t\t+ curriculumStr + \"\\n maxReturnLength \"\n\t\t\t\t\t\t+ maxReturnLength + \"\\n currentOfferingYear \"\n\t\t\t\t\t\t+ currentOfferingyear);\n\n\t\ttry {\n\t\t\tuserListCon = this.getConnection();\n\n\t\t\tpstmt = userListCon.prepareCall(sql);\n\t\t\tpstmt.setString(1, curriculumStr);\n\t\t\tpstmt.setInt(2, maxReturnLength);\n\t\t\tpstmt.setString(3, currentOfferingyear);\n\t\t\trs = pstmt.executeQuery();\n\n\t\t\tint count = 0;\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\tcount++;\n\t\t\t\tuserBean = new UserIdBean();\n\t\t\t\tuserBean.setUsername(rs.getString(\"username\"));\n\t\t\t\tuserBean.setPersonId(rs.getString(\"id\"));\n\t\t\t\tuserBean.setCurriculum(curriculum);\n\t\t\t\tuserBean.setCertificationId(rs.getString(\"certId\"));\n\t\t\t\tif (userBean.getUsername() != null && userBean.getPersonId() != null) {\n\t\t\t\t\tlist.add(userBean);\n\t\t\t\t\tlogger.logp(Level.FINER, sourceClass ,sourceMethod , \" username \" + userBean.getUsername());\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}//\n\t\t\tlogger.logp(Level.INFO, sourceClass ,sourceMethod ,curriculum + \" records returned from registation gap query, \" +\n\t\t\t\" size of response list is \" + list.size());\n\n\t\t} catch (SQLException e) {\n\t\t\t// if ME820 unexpected database error\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\tthrow new RegistrationGapUsersListSQLException(sourceMethod + \" \"\n\t\t\t\t\t+ ErrorCodeType.ME_830.value() + \" \" + e.getMessage());\n\n\t\t} finally {\n\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t\tif (pstmt != null)\n\t\t\t\t\tpstmt.close();\n\t\t\t\tif (userListCon != null)\n\t\t\t\t\tuserListCon.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlogger.logp(Level.SEVERE, sourceClass ,sourceMethod ,\"SQLException: Datasource resources closing error! \" + e.getMessage());\n\t\t\t\tthrow new RegistrationGapUsersListSQLException(sourceMethod\n\t\t\t\t\t\t+ \" \" + \"Datasource resources closing error!\", e);\n\t\t\t}\n\t\t}\n\t\treturn list;\n\t}", "@Test\n public void testMultiSearch_withParens() {\n List<String> fields = new ArrayList<>();\n fields.add(\"sn\");\n fields.add(\"mail\");\n \n BridgeRequest request = new BridgeRequest();\n request.setStructure(\"user\");\n request.setFields(fields);\n request.setQuery(\"(samaccountname=*)\");\n \n RecordList list = null;\n BridgeError unexpectedError = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n \n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }", "@Override\n public Iterator<NFetchMode> iterator() {\n return Arrays.asList(all).iterator();\n }", "List<IdentificationDTO> getIdentificationList();", "@Override\r\n\tpublic List<TraOfficialspecial> findOfficialSpecialList(String specialName,String status,\r\n\t\t\tint beginIndex, int endIndex) {\n\t\treturn officialspecialMapper.findOfficialSpecialList(specialName,status, beginIndex, endIndex);\r\n\t}", "public List<PedidoIndividual> filtrar(PedidoIndividual filtro);", "@Override\n public IndividualGroupList splitIndividualsIntoGroups(List<Individual> individuals) \n {\n sortByPositiveProbability(individuals);\n return adaptativeSplitIntoGroups(individuals);\n }", "@Test\r\n public void teamListSizeTest(){\r\n int listSize = 5;\r\n \r\n\r\n assertEquals(\"expected results = \" + listSize, listSize, extractor.extractXDriversOrTeams(listSize, \"table.msr_season_team_results\", \"td.msr_team\").size());\r\n }", "java.util.List<UserOuterClass.ExperimentInfo> \n getExperimentsList();", "@Test\n public void getViajerosTest() {\n List<ViajeroEntity> list = vp.findAll();\n Assert.assertEquals(data.size(), list.size());\n for (ViajeroEntity ent : list) {\n boolean found = false;\n for (ViajeroEntity entity : data) {\n if (ent.getId().equals(entity.getId())) {\n found = true;\n }\n }\n Assert.assertTrue(found);\n }\n }", "public Set<Integer> getFourEndorsments(int id) throws SQLException {\n\n Set<Integer> list = new HashSet<Integer>();\n try {\n String query = \"select * from endorsment uf1\\n\"\n + \" inner join endorsment uf2 on uf1.id_endorst = uf2.id_endorses\\n\"\n + \" inner join endorsment uf3 on uf2.id_endorst = uf3.id_endorses\\n\"\n + \" inner join endorsment uf4 on uf3.id_endorst = uf4.id_endorses\\n\"\n + \" where uf1.id_endorses = ?\";\n con = getConnectionSQL();\n stmt = con.prepareStatement(query);\n stmt.setInt(1, id);\n rs = stmt.executeQuery();\n //expected 7 results back\n while (rs.next()) {\n int id_endorst = rs.getInt(12);\n list.add(id_endorst);\n //System.out.println(id_endorst);\n }\n return list;\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n closeConnection(con, stmt, rs);\n }\n //close connection\n\n// long after = System.currentTimeMillis();\n// System.out.println(\"The getFourEndorsments took \" + (after - before));\n\n return null;//could be null\n\n }", "public static void collectIndividualClients(List<? super Individual> cl) {\n cl.add(new Individual());\n cl.add(new Retiree());\n// Individual i = cl.get(0);\n }", "boolean getMoreResults();", "@Test\n public void testGetUsersList() {\n System.out.println(\"getUsersList\");\n\n Set<User> expResult = new HashSet<>();\n expResult.add(new User(\"nick0\", \"[email protected]\"));\n expResult.add(new User(\"nick1\", \"[email protected]\"));\n expResult.add(new User(\"nick2\", \"[email protected]\"));\n expResult.add(new User(\"nick3\", \"[email protected]\"));\n expResult.add(new User(\"nick4\", \"[email protected]\"));\n expResult.add(new User(\"nick5\", \"[email protected]\"));\n expResult.add(new User(\"nick6\", \"[email protected]\"));\n expResult.add(new User(\"nick7\", \"[email protected]\"));\n expResult.add(new User(\"nick8\", \"[email protected]\"));\n expResult.add(new User(\"nick9\", \"[email protected]\"));\n\n Set<User> result = sn10.getUsersList();\n assertEquals(expResult, result);\n }", "private void getAllUsers(){\n\t\t\n\t\tSystem.out.println(\"Retrieving Social Graph Data from tibbr...\"); \n\t\tDefaultHttpClient httpClient = new DefaultHttpClient();\n\n\t\tString params = \"?sort=firstNameAsc&fields=name,jive.username,-resources&count=5000&startIndex=0\"; \n\t\tHttpGet getRequest = new HttpGet(urlBase+\"/api/core/v3/people/@all\"+params);\n\t\t\n\n\t\t\t \n\t\tgetRequest.setHeader(\"Authorization\", \"Basic \" + this.auth);\n\t\t\n\t\t\t\n\t\ttry {\n\t\t\tHttpResponse response = httpClient.execute(getRequest);\n\t\t\tString jsonOut = readStream(response.getEntity().getContent());\n\t\t // Remove throwline if present\n\t\t\tjsonOut = removeThrowLine(jsonOut);\n\t\t getAllUserElements(jsonOut);\n\t\t \n\t \n\t\t} catch (ClientProtocolException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "List<ArtistCommunityInformation> listWorldArtists(\n ArtistCommunitySelectableIdentity selectedIdentity,\n final int max,\n final int offset) throws CantListArtistsException;" ]
[ "0.5694329", "0.56340814", "0.55455", "0.5528946", "0.5492359", "0.54387033", "0.54274106", "0.5354189", "0.5344312", "0.53352445", "0.5304161", "0.5243759", "0.5200151", "0.51912963", "0.51863766", "0.5150529", "0.5126602", "0.51261324", "0.51181746", "0.5112396", "0.5095287", "0.5094943", "0.508436", "0.50560033", "0.50350374", "0.5016853", "0.50002927", "0.49832556", "0.49825278", "0.49783644", "0.49654877", "0.4960402", "0.49562275", "0.49538368", "0.49172023", "0.49109507", "0.4899515", "0.48983467", "0.48940048", "0.48786226", "0.48775887", "0.48728362", "0.4870559", "0.48694453", "0.48637328", "0.48631552", "0.48560622", "0.4850859", "0.485068", "0.4848781", "0.4847987", "0.4846369", "0.4835839", "0.4830761", "0.48287252", "0.48216102", "0.48208508", "0.48182738", "0.48121375", "0.48115465", "0.4806143", "0.48035163", "0.47991568", "0.47917634", "0.47916904", "0.47880724", "0.47856486", "0.47852594", "0.47819698", "0.4781194", "0.47754183", "0.47732088", "0.47730425", "0.47723746", "0.47631934", "0.476049", "0.4758169", "0.4755116", "0.4747972", "0.4747131", "0.4734009", "0.47310308", "0.4728327", "0.47204065", "0.47197214", "0.47148484", "0.47143084", "0.4712155", "0.4709965", "0.4709177", "0.47080576", "0.4707707", "0.4705549", "0.46995166", "0.46991897", "0.4698644", "0.46951464", "0.4695144", "0.46912408", "0.46889812" ]
0.49489045
34
/ Bug report by Danah Nada duplicate elements in property domain
public void test_dn_01() { // direct reading for the model method 1 OntModel m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null ); m0.read( "file:testing/ontology/bugs/test_hk_07B.owl" ); OntProperty p0 = m0.getOntProperty( "file:testing/ontology/bugs/test_hk_07B.owl#PropB" ); int count = 0; for (Iterator i = p0.listDomain(); i.hasNext();) { count++; i.next(); } assertEquals( 3, count ); // repeat test - thus using previously cached model for import OntModel m1 = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null ); m1.read( "file:testing/ontology/bugs/test_hk_07B.owl" ); OntProperty p1 = m1.getOntProperty( "file:testing/ontology/bugs/test_hk_07B.owl#PropB" ); count = 0; for (Iterator i = p1.listDomain(); i.hasNext();) { count++; i.next(); } assertEquals( 3, count ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean requiresPropertyOrdering()\n/* */ {\n/* 377 */ return false;\n/* */ }", "@Test\n\tpublic void testAddLinkInvalidSameLinkTwiceArrayList() {\n\t\tAddress adr = new Address();\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tTypePropertyCollection proptype = (TypePropertyCollection) adr.getProperty(\"inhabitants\").getType();\n\t\tClass<?> colClassBefore = proptype.getCollectionClass();\n\t\ttry {\n\t\t\tproptype.setCollectionClass(ArrayList.class);\n\t\t\tAssert.assertSame(ArrayList.class, proptype.getCollectionClass());\n\t\t\tAssert.assertNull(adr.getInhabitants());\n\t\t\tAssert.assertNull(martin.getAddress());\n\n\t\t\t// add the same Person to the Address as inhabitant twice\n\t\t\tadr.addInhabitant(martin);\n\t\t\ttry {\n\t\t\t\t// should Assert.fail because of the association end with\n\t\t\t\t// multiplicity\n\t\t\t\t// 1\n\t\t\t\tadr.addInhabitant(martin);\n\t\t\t\tAssert.fail(\"expected ValidationException exception\");\n\t\t\t} catch (ValidationException e) {\n\t\t\t\tAssert.assertTrue(true);\n\t\t\t}\n\t\t} finally {\n\t\t\tproptype.setCollectionClass(colClassBefore);\n\t\t}\n\t}", "@Override\r\n public Object visit(OWLEquivalentDataPropertiesAxiom axiom) {\n return super.visit(axiom);\r\n }", "@Override\r\n\t\tpublic final boolean combinePropertyLists()\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}", "@Test\n public void shouldNotAddDuplicateDependents() {\n String currentPipeline = \"p5\";\n ValueStreamMap graph = new ValueStreamMap(currentPipeline, null);\n Node p4 = graph.addUpstreamNode(new PipelineDependencyNode(\"p4\", \"p4\"), null, currentPipeline);\n graph.addUpstreamNode(new PipelineDependencyNode(\"p4\", \"p4\"), null, currentPipeline);\n\n assertThat(p4.getChildren().size(), is(1));\n VSMTestHelper.assertThatNodeHasChildren(graph, \"p4\", 0, \"p5\");\n }", "@Test\n public void testWithUnknownProperty() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n List<EPGMVertex> vertices = socialGraph\n .callForGraph(new VertexDeduplication<>(\"Person\", Collections.singletonList(\"notSet\")))\n .getVerticesByLabel(\"Person\").collect();\n assertEquals(1, vertices.size());\n }", "public void testValidateSubjectPrimaryAssociationsDuplicate() throws Exception {\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n positionWrapperBean.addNewSubjectPrimaryAssociation();\n List subjectPrimaryAssociations = positionWrapperBean.getSubjectPrimaryAssociations();\n for (int i = 0; i < subjectPrimaryAssociations.size(); i++) {\n ArtefactAssociationWrapperBean artefactAssociationWrapperBean = (ArtefactAssociationWrapperBean) subjectPrimaryAssociations.get(i);\n artefactAssociationWrapperBean.setSourceId(new Long(12));\n artefactAssociationWrapperBean.setQualifierId(new Long(399));\n }\n // should produce a duplicate assocition error\n DataBinder binder = new DataBinder(positionWrapperBean, ZynapDefaultFormController.DEFAULT_COMMAND_NAME);\n Errors errors = binder.getBindingResult();\n positionValidator.validateSubjectPrimaryAssociations(positionWrapperBean, errors);\n assertEquals(1, errors.getErrorCount());\n FieldError error = errors.getFieldError(FIRST_PRIMARY_ASSOCIATION_SOURCE_FIELD);\n assertEquals(\"error.association.target.unique.required\", error.getCode());\n }", "public void testDuplicateProperty() throws Exception {\n loader.load(reader, ctx);\n assertTrue(ctx.getErrors().get(0) instanceof DuplicateComponentService);\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void testAddAndRemoveLinkOkComponentTreeSetSortedChangeProperties() {\n\t\t// initialize one address book containing 4 entries\n\t\tTypeRapidBean rtypeParent = (TypeRapidBean) TypeRapidBean\n\t\t\t\t.forName(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tTypePropertyCollection aetypeParentSons = (TypePropertyCollection) rtypeParent.getPropertyType(\"persons\");\n\t\tClass<?> colClassBefore = aetypeParentSons.getCollectionClass();\n\t\tAssert.assertSame(TreeSet.class, colClassBefore);\n\t\tRapidBean adrbook = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tAssert.assertNull(((PropertyCollection) adrbook.getProperty(\"persons\")).getValue());\n\t\tRapidBean person1 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson1.setPropValue(\"lastname\", \"B\");\n\t\tRapidBean person2 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson2.setPropValue(\"lastname\", \"C\");\n\t\tRapidBean person3 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson3.setPropValue(\"lastname\", \"D\");\n\t\tRapidBean person4 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson4.setPropValue(\"lastname\", \"E\");\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person4);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person3);\n\t\tAssert.assertEquals(4,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tIterator<Link> iter = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue())\n\t\t\t\t.iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(person3, iter.next());\n\t\tAssert.assertSame(person4, iter.next());\n\n\t\t// change one single property and check correct sorting\n\t\tperson2.setPropValue(\"lastname\", \"X\");\n\t\titer = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person3, iter.next());\n\t\tAssert.assertSame(person4, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\n\t\t// remove the links agains\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person3);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person4);\n\t\tAssert.assertEquals(0,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t}", "public void test_findUniqueByPropertys() {\r\n\t\tPerson person = (Person) this.persistenceService.findUniqueByPropertys(Person.class, getParamMap(2));\r\n\t\tassertForFindUniquePerson(person);\r\n\t}", "public void test_hk_02() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null); // ProfileRegistry.OWL_LANG);\n ontModel.createAllDifferent();\n assertTrue(ontModel.listAllDifferent().hasNext());\n AllDifferent allDifferent = (AllDifferent) ontModel.listAllDifferent().next();\n //allDifferent.setDistinct(ontModel.createList());\n assertFalse(allDifferent.listDistinctMembers().hasNext());\n }", "@Test\r\n public void testListValuedObjectPropertyInvalidation() {\r\n ObservableList<String> list = createObservableList(true);\r\n ObjectProperty<ObservableList<String>> property = new SimpleObjectProperty<>(list);\r\n InvalidationReport report = new InvalidationReport(property);\r\n property.set(createObservableList(true));\r\n assertEquals(\"supported: list-valued objectProperty must fire on not-same list\", \r\n 1, report.getEventCount());\r\n }", "@SuppressWarnings(\"unchecked\")\n private boolean handleProperties(final Document doc, final Element parent,\n final String prefix, final String name, final Object prop,\n boolean nameTobeFixed)\n {\n boolean hasFixMe = false;\n Element el = null;\n if (prop == null)\n {\n String fixedName = nameTobeFixed ? fixName(name, prefix) : name;\n hasFixMe = fixedName.startsWith(FIXME_INVALID_PREFIX);\n el = doc.createElement(ELEM_PROPERTY);\n el.setAttribute(ATTR_NAME, fixedName);\n }\n else if (prop instanceof Map)\n {\n Map<String, Object> sortedProps = sortMap((Map<String, Object>) prop);\n el = doc.createElement(ELEM_PROPERTY_SET);\n if (name != null)\n {\n String fixedName = nameTobeFixed ? fixName(name, prefix) : name;\n hasFixMe = fixedName.startsWith(FIXME_INVALID_PREFIX);\n el.setAttribute(ATTR_NAME, fixedName);\n }\n for (String key : sortedProps.keySet())\n {\n hasFixMe = hasFixMe\n | handleProperties(doc, el, prefix, key, sortedProps\n .get(key), false);\n }\n }\n else if (prop instanceof Collection)\n {\n String fixedName = nameTobeFixed ? fixName(name, prefix) : name;\n hasFixMe = fixedName.startsWith(FIXME_INVALID_PREFIX);\n el = doc.createElement(ELEM_PROPERTY);\n el.setAttribute(ATTR_NAME, fixedName);\n Iterator iter = ((Collection) prop).iterator();\n Element values = null;\n // Create a ELEM_PVALUES element if there are collection is empty, in\n // which case it creates an empty pvalues element or if the instance of\n // elements is String. Otherwise a propertySet element is created in\n // the next recursive call.\n if(((Collection) prop).isEmpty() || iter.next() instanceof String)\n {\n values = doc.createElement(ELEM_PVALUES);\n el.appendChild(values);\n }\n else\n {\n values = el;\n }\n for (Object obj : (Collection) prop)\n {\n hasFixMe = hasFixMe\n | handleProperties(doc, values, prefix, null, obj, false);\n }\n }\n else if (prop instanceof PSPair)\n {\n PSPair pair = (PSPair) prop;\n el = doc.createElement(ELEM_PAIR);\n el.setAttribute(ATTR_VALUE + \"1\", toString(pair.getFirst()));\n el.setAttribute(ATTR_VALUE + \"2\", toString(pair.getSecond()));\n }\n else if (parent.getNodeName().equals(ELEM_PVALUES))\n {\n el = doc.createElement(ELEM_PVALUE);\n el.appendChild(doc.createTextNode(toString(prop)));\n }\n else\n {\n String fixedName = nameTobeFixed ? fixName(name, prefix) : name;\n hasFixMe = fixedName.startsWith(FIXME_INVALID_PREFIX);\n el = doc.createElement(ELEM_PROPERTY);\n el.setAttribute(ATTR_NAME, fixedName);\n el.setAttribute(ATTR_VALUE, toString(prop));\n }\n parent.appendChild(el);\n return hasFixMe;\n }", "public void test_lt_01() {\n OntModel m = ModelFactory.createOntologyModel();\n \n DatatypeProperty p = m.createDatatypeProperty(NS + \"p\");\n OntClass c = m.createClass(NS + \"A\");\n \n Individual i = m.createIndividual(NS + \"i\", c);\n i.addProperty(p, \"testData\");\n \n int count = 0;\n \n for (Iterator j = i.listPropertyValues(p); j.hasNext();) {\n //System.err.println(\"Individual i has p value: \" + j.next());\n j.next();\n count++;\n }\n \n assertEquals(\"i should have one property\", 1, count);\n }", "@Test\n\tpublic void testAddLinkInvalidSameLinkTwiceHashSet() {\n\t\tAddress adr = new Address();\n\t\tTypePropertyCollection proptype = (TypePropertyCollection) adr.getProperty(\"inhabitants\").getType();\n\t\tAssert.assertSame(LinkedHashSet.class, proptype.getCollectionClass());\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tAssert.assertNull(adr.getInhabitants());\n\t\tAssert.assertNull(martin.getAddress());\n\n\t\t// add the same Person to the Address as inhabitant twice\n\t\tadr.addInhabitant(martin);\n\t\ttry {\n\t\t\tadr.addInhabitant(martin);\n\t\t\tAssert.fail(\"expected exception\");\n\t\t} catch (ValidationInstanceAssocTwiceException e) {\n\t\t\tAssert.assertTrue(true);\n\t\t}\n\t}", "@Test\n\tpublic void testAddLinkOkMultNtoNArrayListSameLinkTwice() {\n\t\t// create 2 ClosingPeriods and 2 Locations\n\t\tTypePropertyCollection proptypeCpLocations = (TypePropertyCollection) TypeRapidBean\n\t\t\t\t.forName(ClosingPeriod.class.getName()).getPropertyType(\"locations\");\n\t\tTypePropertyCollection proptypeLocClosedons = (TypePropertyCollection) TypeRapidBean\n\t\t\t\t.forName(Location.class.getName()).getPropertyType(\"closedons\");\n\t\tClass<?> colClassCpLocationsBefore = proptypeCpLocations.getCollectionClass();\n\t\tClass<?> colClassLocClosedonsBefore = proptypeLocClosedons.getCollectionClass();\n\t\tproptypeCpLocations.setCollectionClass(ArrayList.class);\n\t\tproptypeLocClosedons.setCollectionClass(ArrayList.class);\n\t\tClosingPeriod cp1 = new ClosingPeriod(new String[] { \"20051225\", \"XMas Holidays\", \"20060101\" });\n\t\tLocation loc1 = new Location(new String[] { \"Location A\" });\n\t\ttry {\n\t\t\tcp1.addLocation(loc1);\n\t\t\tcp1.addLocation(loc1);\n\t\t\tAssert.assertEquals(2, cp1.getLocations().size());\n\t\t\tClosingPeriod cp11Inverse = loc1.getClosedons().iterator().next();\n\t\t\tAssert.assertSame(cp1, cp11Inverse);\n\t\t\tAssert.assertEquals(2, loc1.getClosedons().size());\n\t\t\tcp1.removeLocation(loc1);\n\t\t\tAssert.assertEquals(1, cp1.getLocations().size());\n\t\t\tcp1.removeLocation(loc1);\n\t\t\tAssert.assertEquals(0, cp1.getLocations().size());\n\t\t} finally {\n\t\t\tproptypeCpLocations.setCollectionClass(colClassCpLocationsBefore);\n\t\t\tproptypeLocClosedons.setCollectionClass(colClassLocClosedonsBefore);\n\t\t}\n\t}", "@Test\r\n public void testListProperty() {\r\n ObservableList<String> list = createObservableList(true);\r\n ListProperty<String> property = new SimpleListProperty<>(list);\r\n ChangeReport report = new ChangeReport(property);\r\n property.set(createObservableList(true));\r\n assertEquals(\"listProperty must fire on not-same list\", 1, report.getEventCount());\r\n }", "@Test\r\n @ConditionalIgnore(condition = IgnoreEqualsNotFire.class)\r\n public void testListValuedObjectPropertyChange() {\r\n ObservableList<String> list = createObservableList(true);\r\n ObjectProperty<ObservableList<String>> property = new SimpleObjectProperty<>(list);\r\n ChangeReport report = new ChangeReport(property);\r\n property.set(createObservableList(true));\r\n assertEquals(\"not supported: \\n list-valued objectProperty must fire on not-same list\", \r\n 1, report.getEventCount());\r\n }", "public void test_ck_03() {\n // part A - surprising reification\n OntModel model1 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM, null);\n OntModel model2 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM_RULE_INF, null);\n \n Individual sub = model1.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n OntProperty pred = model1.createOntProperty(\"http://mytest#\");\n Individual obj = model1.createIndividual(\"http://mytest#i2\", model1.getProfile().CLASS());\n OntProperty probabilityP = model1.createOntProperty(\"http://mytest#prob\");\n \n Statement st = model1.createStatement(sub, pred, obj);\n model1.add(st);\n st.createReifiedStatement().addProperty(probabilityP, 0.9);\n assertTrue(\"st should be reified\", st.isReified());\n \n Statement st2 = model2.createStatement(sub, pred, obj);\n model2.add(st2);\n st2.createReifiedStatement().addProperty(probabilityP, 0.3);\n assertTrue(\"st2 should be reified\", st2.isReified());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP).addProperty(probabilityP, 0.3); //!!!\n // exception\n \n // Part B - exception in remove All\n Individual sub2 = model2.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP); //!!! exception\n \n sub2.addProperty(probabilityP, 0.3);\n sub2.removeAll(probabilityP); //!!! exception\n \n }", "@Test\n\tpublic void testAddLinkOkMultNtoNLinkedHashSet() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(LinkedHashSet.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(LinkedHashSet.class);\n\t\ttstNMAssociationInverse();\n\t}", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void testAddAndRemoveLinkOkComponentTreeSetSorted() {\n\t\tTypeRapidBean rtypeParent = (TypeRapidBean) TypeRapidBean\n\t\t\t\t.forName(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tTypePropertyCollection aetypeParentSons = (TypePropertyCollection) rtypeParent.getPropertyType(\"persons\");\n\t\tClass<?> colClassBefore = aetypeParentSons.getCollectionClass();\n\t\tAssert.assertSame(TreeSet.class, colClassBefore);\n\t\tRapidBean adrbook = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tRapidBean person1 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson1.setPropValue(\"lastname\", \"A\");\n\t\tRapidBean person2 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson2.setPropValue(\"lastname\", \"B\");\n\t\tAssert.assertNull(((PropertyCollection) adrbook.getProperty(\"persons\")).getValue());\n\t\tAssert.assertNull(person1.getParentBean());\n\t\tAssert.assertNull(person2.getParentBean());\n\n\t\t// add person 2 before person 1\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\tAssert.assertEquals(2,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tIterator<Link> iter = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue())\n\t\t\t\t.iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(adrbook, person1.getParentBean());\n\t\tAssert.assertSame(adrbook, person2.getParentBean());\n\n\t\t// reset persons and add person 1 before person 2\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).setValue(null);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\tAssert.assertEquals(2,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\titer = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(adrbook, person1.getParentBean());\n\t\tAssert.assertSame(adrbook, person2.getParentBean());\n\n\t\t// remove the links again\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person1);\n\t\tAssert.assertEquals(0,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tAssert.assertNull(person1.getParentBean());\n\t\tAssert.assertNull(person2.getParentBean());\n\t}", "@Test\n\tpublic void addSameValueTwice() {\n\t\tXSet xset = new XSet(3);\n\t\txset.add(1);\n\t\txset.add(1);\n\t\tassertTrue(xset.getSize() == 1);\n\t}", "public void test_findUniqueByProperty() {\r\n\t\tPerson person = (Person) this.persistenceService.findUniqueByProperty(Person.class, NAME_PROPERTY, NAME_PARAM[2]);\r\n\t\tassertForFindUniquePerson(person);\r\n\t}", "@Override\r\n public void publishPropertyViolation (Publisher publisher) {\n }", "public boolean isAdditiveProperty() {\n\t\treturn false;\n\t}", "@Test\n @DependsOnMethod(\"testShallowCopy\")\n public void testEquals() {\n Citation citation = HardCodedCitations.EPSG;\n final PropertyAccessor accessor = createPropertyAccessor();\n assertFalse(accessor.equals(citation, HardCodedCitations.GEOTIFF, ComparisonMode.STRICT));\n assertTrue (accessor.equals(citation, HardCodedCitations.EPSG, ComparisonMode.STRICT));\n /*\n * Same test than above, but on a copy of the EPSG constant.\n */\n citation = new DefaultCitation();\n assertTrue (accessor.shallowCopy(HardCodedCitations.EPSG, citation));\n assertFalse(accessor.equals(citation, HardCodedCitations.GEOTIFF, ComparisonMode.STRICT));\n assertTrue (accessor.equals(citation, HardCodedCitations.EPSG, ComparisonMode.STRICT));\n /*\n * Identifiers shall be stored in different collection instances with equal content.\n */\n final int index = accessor.indexOf(\"identifiers\", true);\n final Object source = accessor.get(index, HardCodedCitations.EPSG);\n final Object target = accessor.get(index, citation);\n assertInstanceOf(\"identifiers\", Collection.class, source);\n assertInstanceOf(\"identifiers\", Collection.class, target);\n// assertNotSame(source, target); // TODO: require non-empty collection.\n assertEquals (source, target);\n HardCodedCitations.assertIdentifiersForEPSG((Collection<?>) source);\n HardCodedCitations.assertIdentifiersForEPSG((Collection<?>) target);\n /*\n * Set the identifiers to null, which should clear the collection.\n */\n// TODO assertEquals(\"Expected the previous value.\", source, accessor.set(index, citation, null, true));\n final Object value = accessor.get(index, citation);\n assertNotNull(\"Should have replaced null by an empty collection.\", value);\n assertTrue(\"Should have replaced null by an empty collection.\", ((Collection<?>) value).isEmpty());\n }", "public static void copyAggregateProperties(Node aggregate, boolean skipExistingProperties, String[] copyProperties,\n CopyAggregatePropertiesStatistics copyStats) {\n String[] unskippedProperties = copyProperties;\n // first, clear the properties be copied in case we make a refresh\n if (skipExistingProperties) {\n unskippedProperties = Arrays.stream(copyProperties).filter(Predicate.not(aggregate::hasProperty)).toArray(String[]::new);\n }\n for (String copyProperty : unskippedProperties) {\n aggregate.removeProperty(copyProperty);\n }\n Iterable<Relationship> elementRels = aggregate.getRelationships(ConceptEdgeTypes.HAS_ELEMENT);\n // List of properties to copy that are no array properties - and thus\n // cannot be merged - but have different\n // values.\n Set<String> divergentProperties = new HashSet<>();\n // For each element...\n Map<String, Object> newAggregateProperties = new HashMap<>();\n // Collect existing property values on the aggregate\n for (String copyProperty : unskippedProperties) {\n if (aggregate.hasProperty(copyProperty))\n newAggregateProperties.put(copyProperty, aggregate.getProperties(copyProperty));\n }\n for (Relationship elementRel : elementRels) {\n Node term = elementRel.getEndNode();\n if (null != copyStats)\n copyStats.numElements++;\n // Copy each specified property.\n // Array properties are merged.\n // Non-array properties are set, if non existent. If a non-array\n // property has multiple, different values\n // among the elements, this property is subject to the majority vote\n // after this loop.\n for (String copyProperty : unskippedProperties) {\n if (term.hasProperty(copyProperty)) {\n if (null != copyStats)\n copyStats.numProperties++;\n Object property = term.getProperty(copyProperty);\n if (property.getClass().isArray()) {\n final Object[] mergedValue = mergeArrayValue(newAggregateProperties.getOrDefault(copyProperty, null), JulieNeo4jUtilities.convertArray(property));\n newAggregateProperties.put(copyProperty, mergedValue);\n } else {\n if (!newAggregateProperties.containsKey(copyProperty))\n newAggregateProperties.put(copyProperty, property);\n Object aggregateProperty = newAggregateProperties.get(copyProperty);\n if (!aggregateProperty.equals(property)) {\n divergentProperties.add(copyProperty);\n }\n }\n }\n }\n }\n // We now make majority votes on the values of divergent properties. The\n // minority property values are then\n // stored in a special property with the suffix\n // AggregateConstants.SUFFIX_DIVERGENT_ELEMENT_ROPERTY\n\n for (String divergentProperty : divergentProperties) {\n Multiset<Object> propertyValues = HashMultiset.create();\n elementRels = aggregate.getRelationships(ConceptEdgeTypes.HAS_ELEMENT);\n for (Relationship elementRel : elementRels) {\n Node term = elementRel.getEndNode();\n Object propertyValue = getNonNullNodeProperty(term, divergentProperty);\n if (null != propertyValue)\n propertyValues.add(propertyValue);\n }\n // Determine the majority value.\n Object majorityValue = null;\n int maxCount = 0;\n for (Entry<Object> entry : propertyValues.entrySet()) {\n if (entry.getCount() > maxCount) {\n majorityValue = entry.getElement();\n maxCount = entry.getCount();\n }\n }\n\n // Set the majority value to the aggregate.\n// aggregate.setProperty(divergentProperty, majorityValue);\n newAggregateProperties.put(divergentProperty, majorityValue);\n // Set the minority values to the aggregate as a special property.\n for (Object propertyValue : propertyValues.elementSet()) {\n if (!propertyValue.equals(majorityValue)) {\n Object[] convert = JulieNeo4jUtilities.convertElementsIntoArray(propertyValue.getClass(),\n propertyValue);\n final String divergentKey = divergentProperty + AggregateConstants.SUFFIX_DIVERGENT_ELEMENT_ROPERTY;\n final Object[] mergedValue = mergeArrayValue(newAggregateProperties.getOrDefault(divergentKey, null), convert);\n newAggregateProperties.put(divergentKey, mergedValue);\n// mergeArrayProperty(aggregate,\n// divergentKey, convert);\n }\n }\n }\n\n // The aggregate could have a conflict on the preferred name. This is\n // already resolved by a majority\n // vote above. We now additionally merge the minority names to the\n // synonyms.\n final String divergentPrefnameKey = PROP_PREF_NAME + AggregateConstants.SUFFIX_DIVERGENT_ELEMENT_ROPERTY;\n final Object[] synonymsWithDivergentPrefNames = mergeArrayValue(newAggregateProperties.getOrDefault(PROP_SYNONYMS, null), (Object[]) newAggregateProperties.get(divergentPrefnameKey));\n if (synonymsWithDivergentPrefNames != null)\n newAggregateProperties.put(PROP_SYNONYMS, synonymsWithDivergentPrefNames);\n// mergeArrayProperty(aggregate, PROP_SYNONYMS,\n// (Object[]) getNonNullNodeProperty(aggregate,\n// divergentPrefnameKey));\n\n // As a last step, remove duplicate synonyms, case ignored\n if (newAggregateProperties.containsKey(PROP_SYNONYMS)) {\n String[] synonyms = (String[]) newAggregateProperties.get(PROP_SYNONYMS);\n Set<String> lowerCaseSynonyms = new HashSet<>();\n List<String> acceptedSynonyms = new ArrayList<>();\n for (String synonym : synonyms) {\n String lowerCaseSynonym = synonym.toLowerCase();\n if (!lowerCaseSynonyms.contains(lowerCaseSynonym)) {\n lowerCaseSynonyms.add(lowerCaseSynonym);\n acceptedSynonyms.add(synonym);\n }\n }\n Collections.sort(acceptedSynonyms);\n newAggregateProperties.put(PROP_SYNONYMS,\n acceptedSynonyms.toArray(new String[0]));\n }\n\n for (String copyProperty : newAggregateProperties.keySet()) {\n aggregate.setProperty(copyProperty, newAggregateProperties.get(copyProperty));\n }\n }", "@Test\n\tpublic void testAddLinkOkMultNtoNArrayList() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\ttstNMAssociationInverse();\n\t}", "public void testResolvedDuplicate() throws Exception\n {\n String json = MAPPER.writeValueAsString(new DupFieldBean2());\n assertEquals(json, a2q(\"{'z':4}\"));\n }", "@Test\n public void testWriteProperty() {\n DoubleArrayPropertyPersistenceHandler handler = new DoubleArrayPropertyPersistenceHandler();\n WidgetProperty property = new DoubleArrayProperty(\n \"description\", WidgetPropertyCategory.BEHAVIOR, new double[] {});//$NON-NLS-1$\n property.setDynamicsDescriptor(new DynamicsDescriptor());\n property.setPropertyValue(new double[] { 1.0, 2.0, 3.0, 4.0 });\n\n Element valueTag = new Element(\"value\"); //$NON-NLS-1$\n\n handler.writeProperty(valueTag, property.getPropertyValue());\n\n assertEquals(1, valueTag.getChildren().size());\n\n Element doubleArrayElement = (Element) valueTag.getChildren().get(0);\n assertEquals(\"doubleArray\", doubleArrayElement.getName()); //$NON-NLS-1$\n\n assertEquals(4, doubleArrayElement.getChildren().size());\n\n Element doubleTag = (Element) doubleArrayElement.getChildren().get(0);\n assertEquals(\"double\", doubleTag.getName()); //$NON-NLS-1$\n assertNotNull(doubleTag);\n assertEquals(1, doubleTag.getAttributes().size());\n String valueString = doubleTag.getAttributeValue(\"value\"); //$NON-NLS-1$\n assertEquals(\"1.0\", valueString); //$NON-NLS-1$\n\n doubleTag = (Element) doubleArrayElement.getChildren().get(1);\n assertEquals(\"double\", doubleTag.getName()); //$NON-NLS-1$\n assertNotNull(doubleTag);\n assertEquals(1, doubleTag.getAttributes().size());\n valueString = doubleTag.getAttributeValue(\"value\"); //$NON-NLS-1$\n assertEquals(\"2.0\", valueString); //$NON-NLS-1$\n\n doubleTag = (Element) doubleArrayElement.getChildren().get(2);\n assertEquals(\"double\", doubleTag.getName()); //$NON-NLS-1$\n assertNotNull(doubleTag);\n assertEquals(1, doubleTag.getAttributes().size());\n valueString = doubleTag.getAttributeValue(\"value\"); //$NON-NLS-1$\n assertEquals(\"3.0\", valueString); //$NON-NLS-1$\n\n doubleTag = (Element) doubleArrayElement.getChildren().get(3);\n assertEquals(\"double\", doubleTag.getName()); //$NON-NLS-1$\n assertNotNull(doubleTag);\n assertEquals(1, doubleTag.getAttributes().size());\n valueString = doubleTag.getAttributeValue(\"value\"); //$NON-NLS-1$\n assertEquals(\"4.0\", valueString); //$NON-NLS-1$\n }", "@Test\n public void propertyTest() throws Exception {\n String unMatchedTriples = \"\";\n StmtIterator msIter = propertyMeasuringStick.listStatements();\n while (msIter.hasNext()) {\n Statement msStmt = msIter.nextStatement();\n // TODO: find a more formal way to filter out properties we don't need to test\n if (!msStmt.getPredicate().toString().equals(\"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\") &&\n !msStmt.getPredicate().toString().equals(\"http://www.w3.org/2000/01/rdf-schema#subPropertyOf\")) {\n StmtIterator poIter = propertyOutput.listStatements();\n boolean match = false;\n while (poIter.hasNext()) {\n Statement outputStmt = poIter.nextStatement();\n if (outputStmt.equals(msStmt)) {\n match = true;\n }\n }\n // If a match is not found then set this statement.\n if (!match) {\n unMatchedTriples += msStmt.getSubject() + \" \" + msStmt.getPredicate().toString() + \" \" + msStmt.getObject().toString() + \" .\\n\";\n }\n }\n }\n // Output assertion with message of results\n if (!unMatchedTriples.equals(\"\"))\n assertTrue(\"\\nThe following triples ARE in \" + propertyOutputFileName + \" but NOT in propertyMeasuringStick.n3:\\n\" + unMatchedTriples\n , false);\n else\n assertTrue(true);\n\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingObjectsThatAreAlreadyPersistent() {\n }", "@Override public void addImpliedProperties(UpodPropertySet ups)\n{\n}", "@Test\n public void shouldNotPopulateDuplicateNamesForAMaterial() {\n\n String P1 = \"P1\";\n String currentPipeline = \"P2\";\n ValueStreamMap graph = new ValueStreamMap(currentPipeline, null);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(\"git_fingerprint\", \"git\", \"git\"), new CaseInsensitiveString(\"git1\"), currentPipeline, new MaterialRevision(null));\n graph.addUpstreamNode(new PipelineDependencyNode(P1, P1), null, currentPipeline);\n graph.addUpstreamMaterialNode(new SCMDependencyNode(\"git_fingerprint\", \"git\", \"git\"), new CaseInsensitiveString(\"git1\"), P1, new MaterialRevision(null));\n\n SCMDependencyNode node = (SCMDependencyNode) graph.findNode(\"git_fingerprint\");\n HashSet<String> materialNames = new HashSet<String>();\n materialNames.add(\"git1\");\n\n assertThat(node.getMaterialNames(), is(materialNames));\n }", "@Test\n public void shouldDeduplicateUniquePropertyIndexKeys() throws Exception\n {\n File legacyStoreDir = find19FormatStoreDirectory( storeDir.directory() );\n\n // WHEN\n // upgrading that store, the two key tokens for \"name\" should be merged\n\n newStoreUpgrader().migrateIfNeeded( storeDir.directory(), schemaIndexProvider );\n\n // THEN\n // verify that the \"name\" property for both the involved nodes\n GraphDatabaseService db = new GraphDatabaseFactory().newEmbeddedDatabase( storeDir.absolutePath() );\n try\n {\n Node nodeA = getNodeWithName( db, \"A\" );\n assertThat( nodeA, inTx( db, hasProperty( \"name\" ).withValue( \"A\" ) ) );\n\n Node nodeB = getNodeWithName( db, \"B\" );\n assertThat( nodeB, inTx( db, hasProperty( \"name\" ).withValue( \"B\" ) ) );\n\n Node nodeC = getNodeWithName( db, \"C\" );\n assertThat( nodeC, inTx( db, hasProperty( \"name\" ).withValue( \"C\" ) ) );\n assertThat( nodeC, inTx( db, hasProperty( \"other\" ).withValue( \"a value\" ) ) );\n assertThat( nodeC, inTx( db, hasProperty( \"third\" ).withValue( \"something\" ) ) );\n }\n finally\n {\n db.shutdown();\n }\n\n // THEN\n // verify that there are no duplicate keys in the store\n try ( PropertyKeyTokenStore tokenStore = storeFactory.newPropertyKeyTokenStore() )\n {\n Token[] tokens = tokenStore.getTokens( MAX_VALUE );\n assertNoDuplicates( tokens );\n }\n\n assertConsistentStore( storeDir.directory() );\n }", "@Test(expected = IllegalArgumentException.class)\n public void testGetPropertyValueSetEmptyPropertyName1(){\n List<User> list = toList(new User(2L), new User(5L), new User(5L));\n CollectionsUtil.getPropertyValueSet(list, \" \", Integer.class);\n }", "public void testValidateSecondaryAssociationsDuplicateTargetAndQualifier() {\n positionWrapperBean.addNewSecondaryAssociation();\n positionWrapperBean.addNewSecondaryAssociation();\n\n DataBinder binder = new DataBinder(positionWrapperBean, ZynapDefaultFormController.DEFAULT_COMMAND_NAME);\n MutablePropertyValues pvs = new MutablePropertyValues();\n setPrimaryAssociation(pvs);\n pvs.addPropertyValue(new PropertyValue(FIRST_SECONDARY_ASSOCIATION_TARGET_FIELD, new Long(33)));\n pvs.addPropertyValue(new PropertyValue(FIRST_SECONDARY_ASSOCIATION_QUALIFIER_FIELD, new Long(33)));\n pvs.addPropertyValue(new PropertyValue(SECOND_SECONDARY_ASSOCIATION_TARGET_FIELD, new Long(33)));\n pvs.addPropertyValue(new PropertyValue(SECOND_SECONDARY_ASSOCIATION_QUALIFIER_FIELD, new Long(33)));\n binder.bind(pvs);\n\n Errors errors = binder.getBindingResult();\n assertFalse(errors.hasErrors());\n }", "private static HashMap<String, DefinedProperty> initDefinedProperties() {\n\t\tHashMap<String, DefinedProperty> newList = new HashMap<String, DefinedProperty>();\n\t\t// common properties\n\t\taddProperty(newList, \"name\", DefinedPropertyType.STRING, \"\", DefinedProperty.ANY, false, false);\n\t\taddProperty(newList, \"desc\", DefinedPropertyType.STRING, \"\", DefinedProperty.ANY, false, false);\n\t\t// implicit default properties\n\t\taddProperty(newList, \"donttest\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.ANY, false, false);\n\t\taddProperty(newList, \"dontcompare\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.ANY, false, false);\n\t\t// interface properties\n\t\taddProperty(newList, \"use_interface\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG |DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"use_new_interface\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REGSET | DefinedProperty.REG |DefinedProperty.FIELD, false, false);\n\t\t// reg + regset properties\n\t\taddProperty(newList, \"js_superset_check\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"external\", DefinedPropertyType.SPECIAL, null, DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"repcount\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t// regset only properties\n\t\taddProperty(newList, \"js_macro_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_macro_mode\", DefinedPropertyType.STRING, \"STANDARD\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_namespace\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_typedef_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_instance_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_instance_repeat\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.REGSET, false, false);\n\t\t// reg only properties\n\t\taddProperty(newList, \"category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"js_attributes\", DefinedPropertyType.STRING, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"aliasedId\", DefinedPropertyType.STRING, \"false\", DefinedProperty.REG, true, false); // hidden\n\t\taddProperty(newList, \"regwidth\", DefinedPropertyType.NUMBER, \"32\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"uvmreg_is_mem\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"cppmod_prune\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"uvmreg_prune\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\t// signal properties\n\t\taddProperty(newList, \"cpuif_reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"field_reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"activehigh\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"activelow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"signalwidth\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.SIGNAL, false, false);\n\t\t// fieldset only properties\n\t\taddProperty(newList, \"fieldstructwidth\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.FIELDSET, false, false);\n\t\t// field properties\n\t\taddProperty(newList, \"rset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"rclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"woclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"woset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"we\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"wel\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swwe\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swwel\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hwset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hwclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swmod\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swacc\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sticky\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"stickybit\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"intr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"anded\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"ored\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"xored\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"counter\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"overflow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"fieldwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"singlepulse\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"underflow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrvalue\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrvalue\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"saturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrsaturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrsaturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"threshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrthreshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrthreshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sw\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hw\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"precedence\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"encode\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"resetsignal\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"mask\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"enable\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"haltmask\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"haltenable\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"halt\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"next\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"nextposedge\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"nextnegedge\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"maskintrbits\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false); \n\t\taddProperty(newList, \"satoutput\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sub_category\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"rtl_coverage\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\t\n\t\t// override allowed property set if input type is jspec\n\t\tif (Ordt.hasInputType(Ordt.InputType.JSPEC)) {\n\t\t\tputProperty(newList, \"sub_category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG | DefinedProperty.FIELDSET | DefinedProperty.FIELD, false, false);\n\t\t\tputProperty(newList, \"category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"js_attributes\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"regwidth\", DefinedPropertyType.NUMBER, \"32\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"address\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"arrayidx1\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t\tputProperty(newList, \"addrinc\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t}\t\t\n\n\t\treturn newList;\n\t}", "private void internalSetProperty(DavProperty<?> property) throws DavException {\n if (!exists()) {\n throw new DavException(DavServletResponse.SC_NOT_FOUND);\n }\n DavPropertyName propName = property.getName();\n if (JCR_MIXINNODETYPES.equals(propName)) {\n Node n = (Node) item;\n try {\n NodeTypeProperty mix = new NodeTypeProperty(property);\n Set<String> mixins = mix.getNodeTypeNames();\n\n for (NodeType existingMixin : n.getMixinNodeTypes()) {\n String name = existingMixin.getName();\n if (mixins.contains(name)){\n // do not add existing mixins\n mixins.remove(name);\n } else {\n // remove mixin that are not contained in the new list\n n.removeMixin(name);\n }\n }\n\n // add the remaining mixing types that are not yet set\n for (String mixin : mixins) {\n n.addMixin(mixin);\n }\n } catch (RepositoryException e) {\n throw new JcrDavException(e);\n }\n } else if (JCR_PRIMARYNODETYPE.equals(propName)) {\n Node n = (Node) item;\n try {\n NodeTypeProperty ntProp = new NodeTypeProperty(property);\n Set<String> names = ntProp.getNodeTypeNames();\n if (names.size() == 1) {\n String ntName = names.iterator().next();\n n.setPrimaryType(ntName);\n } else {\n // only a single node type can be primary node type.\n throw new DavException(DavServletResponse.SC_BAD_REQUEST);\n }\n } catch (RepositoryException e) {\n throw new JcrDavException(e);\n }\n } else {\n // all props except for mixin node types and primaryType are read-only\n throw new DavException(DavServletResponse.SC_CONFLICT);\n }\n }", "private static boolean isListProperty(String prop) {\n prop = prop.intern();\n for (int i = 0; i < listProperties.length; i++) {\n if (prop == listProperties[i]) {\n return true;\n }\n }\n return false;\n }", "void linkElementsAsPeerDuplicates(String userId,\n String metadataElement1GUID,\n String metadataElement2GUID,\n int statusIdentifier,\n String steward,\n String stewardTypeName,\n String stewardPropertyName,\n String source,\n String notes,\n boolean setKnownDuplicate) throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException;", "@Test\r\n\tpublic void testComplexArrayProperty() throws Exception {\r\n\t\tAdvancedExampleComponent component = new AdvancedExampleComponent();\r\n\t\tXMLBasedPropertyContainer container = new XMLBasedPropertyContainer(XMLBasedPropertyProvider.getInstance()\r\n\t\t\t\t.getMetaPropertiesSet(component.getClass()), component);\r\n\r\n\t\t// Retreiving value of complex property.\r\n\t\tProperty subProperty = container.getProperty(\"complexArrayProperty[0].intProperty\");\r\n\t\tsubProperty.setValue(0);\r\n\t\tassertNotNull(subProperty);\r\n\r\n\t\t// Attaching monitor to the property.\r\n\t\tPropertyMonitorStub monitor = new PropertyMonitorStub();\r\n\t\tcontainer.addPropertyMonitor(\"complexArrayProperty[0].intProperty\", monitor);\r\n\t\tsubProperty.setValue(1);\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t\tcontainer.removePropertyMonitor(\"complexArrayProperty[0].intProperty\", monitor);\r\n\r\n\t\t// Attaching monitor only to \"complexArrayProperty\"\r\n\t\tmonitor = new PropertyMonitorStub();\r\n\t\tcontainer.addPropertyMonitor(\"complexArrayProperty\", monitor);\r\n\t\tsubProperty.setValue(0);\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t\tcontainer.removePropertyMonitor(\"complexArrayProperty\", monitor);\r\n\r\n\t\t// The monitor should not get the message now.\r\n\t\tsubProperty.setValue(1);\r\n\t\tassertEquals(1, monitor.getPropertyChangedInvokationCounter());\r\n\t}", "@Test\n public void testGetDuplicateTranslationKeys() throws Exception {\n final File testFile = getTestFile(\"messages.properties\");\n FileUtils.writeLines(testFile, Arrays.asList(\"dup=foo\", \"not.dup=bar\", \"dup=fizzbuzz\"));\n assertThat(parser.getDuplicateTranslationKeys(testFile)).hasSize(1).contains(\"dup\");\n }", "@Override\r\n\tpublic void copy(Property p) {\n\t\t\r\n\t}", "@Test\n\tpublic void testSetValueOkMult1toN() {\n\n\t\t// create 1 Address and 2 Persons\n\t\tAddress adr = new Address();\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tPerson jojo = new Person(\"\\\"Johannes\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tAssert.assertNull(adr.getInhabitants());\n\t\tAssert.assertNull(martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\n\t\t// create a new collection and use the collection\n\t\t// property's setter\n\t\tCollection<Person> persons = new ArrayList<Person>();\n\t\tpersons.add(martin);\n\t\tpersons.add(jojo);\n\t\tadr.setInhabitants(persons);\n\n\t\t// assert the Persons being linked to the Address\n\t\tAssert.assertEquals(2, adr.getInhabitants().size());\n\t\tIterator<?> iter = adr.getInhabitants().iterator();\n\t\tAssert.assertSame(martin, iter.next());\n\t\tAssert.assertSame(jojo, iter.next());\n\t\t// assert the Address being linked to both Persons implicitely\n\t\tAssert.assertSame(adr, martin.getAddress());\n\t\tAssert.assertSame(adr, jojo.getAddress());\n\t}", "@Test\r\n @ConditionalIgnore(condition = IgnoreEqualsNotFire.class)\r\n public void testListPropertySetEqualListListChangeEventAfter() {\r\n ObservableList<String> list = createObservableList(true);\r\n ObjectProperty<ObservableList<String>> objectProperty = new SimpleObjectProperty<>(list);\r\n ListProperty<String> listProperty = new SimpleListProperty<>();\r\n listProperty.bindBidirectional(objectProperty);\r\n ObservableList<String> otherList = createObservableList(true);\r\n objectProperty.set(otherList);\r\n ListChangeReport report = new ListChangeReport(listProperty);\r\n otherList.remove(0);\r\n assertEquals(\"Culprit is bidi-bound ObjectProperty \\n listProperty must fire list change after modification on new list\", \r\n 1, report.getEventCount());\r\n }", "public static State addPropertyToState(Property property, State state, Domain domain) {\n\n\t\tboolean inverseProperty = false;\n\n\t\tint headIn = domain.addConstant(\"property\");\n\t\tTermList paramIn = TermList.NIL;\n\t\tif (property.getValue() != null && !property.getValue().equals(\"\")) {\n\t\t\tString value = property.getValue();\n if ((\"hasObjective\".equals(property.getName()) && \"concept\".equals(property.getMetadata().getType())) //||\n \t//(\"has\".equals(property.getName()) && \"learner\".equals(property.getMetadata().getType()))\n \t) {\n paramIn = new TermList(domain.getTermConstant(domain.addConstant(value)), paramIn);\n inverseProperty = true;\n } else {\n paramIn = new TermList(domain.getTermConstant(domain.addConstant(value)), paramIn);\n }\n\t\t}\n\t\tif (property.getResource()!=null) {\n\t\t\tparamIn = new TermList(domain.getTermConstant(domain.addConstant(property.getResource().getIdentifier())), paramIn);\n\t\t}\n\t\tparamIn = new TermList(domain.getTermConstant(domain.addConstant(property.getName())), paramIn);\n\t\tparamIn = new TermList(domain.getTermConstant(domain.addConstant(property.getMetadata().getIdentifier())), paramIn);\n\n\t\tCollection<Term> arguments = state.getArguments(headIn);\n\t\tif (!arguments.contains(paramIn)) {\n\t\t\tPredicate jShop2Property = new Predicate(headIn, 0, paramIn);\n\t\t\tstate.add(jShop2Property);\n\t\t\tif (inverseProperty){\n\t\t\t\tPredicate invjShop2Property = new Predicate(headIn, 0,\n\t\t\t\t\t\tnew TermList(domain.getTermConstant(domain.addConstant(property.getResource().getIdentifier())),\n\t\t\t\t\t\t\t\tnew TermList(domain.getTermConstant(domain.addConstant(\"inverseHasObjective\")),\n\t\t\t\t\t\t\t\t\t\tnew TermList(domain.getTermConstant(domain.addConstant(property.getMetadata().getIdentifier())), TermList.NIL))));\n\t\t\t\tstate.add(invjShop2Property);\n\t\t\t}\n\t\t}\n\n\t\tif (property.getResource()!=null) {\n\t\t\taddMetadataToState(property.getResource(), state, domain);\n\t\t}\n\n\t\treturn state;\n\t}", "private void processPropertyParentNode(Element node) {\n PropertyDataItem prp = new PropertyDataItem(node.attributeValue(\"name\"));\n\n Iterator childNodes = node.elementIterator();\n\n while (childNodes.hasNext()) {\n\n prp.addChildNode(((Element) childNodes.next()).attributeValue(\"name\"));\n }\n\n properties.add(prp);\n }", "public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }", "@Test\r\n public void testObjectPropertyWithEqualOrSameList() {\r\n ObservableList<String> list = createObservableList(true);\r\n ObjectProperty<ObservableList<String>> property = new SimpleObjectProperty<>(list);\r\n ObjectProperty<ObservableList<String>> otherPropertySameList = new SimpleObjectProperty<>(list);\r\n assertFalse(\"sanity: two properties with same list are not equal\", \r\n property.equals(otherPropertySameList));\r\n ObjectProperty<ObservableList<String>> otherPropertyEqualList =\r\n new SimpleObjectProperty(createObservableList(true));\r\n assertFalse(\"sanity: two properties with equal list are not equal\", \r\n property.equals(otherPropertyEqualList));\r\n }", "@Property\n @Report(Reporting.GENERATED)\n public boolean broken_reverse_property(@ForAll List<?> original) {\n return Lists.reverse(original).equals(original);\n }", "@Test\n void getByPropertyEqualSuccess() {\n List<Order> orders = dao.getByPropertyEqual(\"description\", \"February Large Long-Sleeve\");\n assertEquals(1, orders.size());\n assertEquals(2, orders.get(0).getId());\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 }", "@SuppressWarnings(\"unchecked\")\n\t@Test\n\tpublic void testGetValueImmutability() throws java.text.ParseException {\n\n\t\tPropertyCollection prop = this.createCollectionProperty(\n\t\t\t\t\"<property name=\\\"test\\\"\" + \" targettype=\\\"org.rapidbeans.test.TestBean\\\"\" + \" />\", \",\", \"\\\\\");\n\n\t\t// originally prop's value is null (undefined)\n\t\tAssert.assertNull(prop.getValue());\n\n\t\tTestBean bean1 = new TestBean(\"\\\"Bluemel\\\" \\\"Martin\\\" \\\"19641014\\\"\");\n\t\tTestBean bean2 = new TestBean(\"\\\"Bluemel\\\" \\\"Johannes\\\" \\\"19641014\\\"\");\n\t\tCollection<Link> col = new ArrayList<Link>();\n\t\tcol.add(bean1);\n\t\tcol.add(bean2);\n\t\tprop.setValue(col);\n\n\t\t// then I try to remove an object of the collection via the iterator\n\t\t// returned by the getter\n\t\tCollection<Link> col1 = (Collection<Link>) prop.getValue();\n\t\ttry {\n\t\t\tcol1.clear();\n\t\t} catch (ImmutableCollectionException e) {\n\t\t\tAssert.assertTrue(true);\n\t\t}\n\n\t\t// of course our prop stays the same\n\t\tAssert.assertEquals(2, ((Collection<Link>) prop.getValue()).size());\n\t}", "@Override\n public void copyProperties(Object dest, Object orig)\n throws IllegalAccessException, InvocationTargetException {\n try {\n // if we have an object in our list, that means we hit some sort of recursion, stop\n // here.\n if (lookingAt.stream().anyMatch(o -> o == dest)) {\n return; // recursion detected\n }\n lookingAt.add(dest);\n super.copyProperties(dest, orig);\n } finally {\n lookingAt.remove(dest);\n }\n }", "@Override\n public boolean isLabelProperty(Object element, String property) {\n return false;\n }", "@Test\n\tpublic void setGeneratedObjectRule(){\n\t\tConcreteProduct prototype = ObjectG.prototype(ConcreteProduct.class);\n\t\tprototype.getPrice2Product().setProduct(PrototypeRules.<Product>generatedObject());\n\n\t\tfinal ConcreteProduct unique = ObjectG.unique(prototype);\n\t\tassertEquals(unique, unique.getPrice2Product().getProduct());\n\t}", "@Override\n public int hashCode() {\n return 1;\n }", "@Override\n\t\tpublic void processPropertyDocument(PropertyDocument propertyDocument) {\n\t\t}", "public interface ElPropertyValue extends ElPropertyDeploy {\r\n\r\n /**\r\n * Return the Id values for the given bean value.\r\n */\r\n public Object[] getAssocOneIdValues(Object bean);\r\n\r\n /**\r\n * Return the Id expression string.\r\n * <p>\r\n * Typically used to produce id = ? expression strings.\r\n * </p>\r\n */\r\n public String getAssocOneIdExpr(String prefix, String operator);\r\n\r\n /**\r\n * Return the logical id value expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInValueExpr(int size);\r\n \r\n /**\r\n * Return the logical id in expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInExpr(String prefix);\r\n \r\n /**\r\n * Return true if this is an ManyToOne or OneToOne associated bean property.\r\n */\r\n public boolean isAssocId();\r\n\r\n /**\r\n * Return true if any path of this path contains a Associated One or Many.\r\n */\r\n public boolean isAssocProperty();\r\n\r\n /**\r\n * Return true if the property is encrypted via Java.\r\n */\r\n public boolean isLocalEncrypted();\r\n \r\n /**\r\n * Return true if the property is encrypted in the DB.\r\n */\r\n public boolean isDbEncrypted();\r\n\r\n /**\r\n * Return the deploy order for the property.\r\n */\r\n public int getDeployOrder();\r\n \r\n /**\r\n * Return the default StringParser for the scalar property.\r\n */\r\n public StringParser getStringParser();\r\n\r\n /**\r\n * Return the default StringFormatter for the scalar property.\r\n */\r\n public StringFormatter getStringFormatter();\r\n\r\n /**\r\n * Return true if the last type is \"DateTime capable\" - can support\r\n * {@link #parseDateTime(long)}.\r\n */\r\n public boolean isDateTimeCapable();\r\n\r\n /**\r\n * Return the underlying JDBC type or 0 if this is not a scalar type.\r\n */\r\n public int getJdbcType();\r\n \r\n /**\r\n * For DateTime capable scalar types convert the long systemTimeMillis into\r\n * an appropriate java time (Date,Timestamp,Time,Calendar, JODA type etc).\r\n */\r\n public Object parseDateTime(long systemTimeMillis);\r\n\r\n /**\r\n * Return the value from a given entity bean.\r\n */\r\n public Object elGetValue(Object bean);\r\n\r\n /**\r\n * Return the value ensuring objects prior to the top scalar property are\r\n * automatically populated.\r\n */\r\n public Object elGetReference(Object bean);\r\n\r\n /**\r\n * Set a value given a root level bean.\r\n * <p>\r\n * If populate then\r\n * </p>\r\n */\r\n public void elSetValue(Object bean, Object value, boolean populate, boolean reference);\r\n\r\n /**\r\n * Make the owning bean of this property a reference (as in not new/dirty).\r\n */\r\n public void elSetReference(Object bean);\r\n\r\n /**\r\n * Convert the value to the expected type.\r\n * <p>\r\n * Typically useful for converting strings to the appropriate number type\r\n * etc.\r\n * </p>\r\n */\r\n public Object elConvertType(Object value);\r\n}", "public abstract QueryElement addNotEquals(String property, Object value);", "protected boolean shouldAddProperty(String key) {\n return !key.equals(\"label\") && !key.equals(\"id\");\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingNonPersistentFields() {\n }", "@Override\n protected void checkElementNameUnique(Element element)\n {\n }", "public void testFindDuplicates() {\r\n System.out.println(\"findDuplicates\");\r\n \r\n List<String> elements = new ArrayList<>();\r\n elements.add(\"foo\");\r\n elements.add(\"bar\");\r\n elements.add(\"abc\");\r\n elements.add(\"foo\");\r\n elements.add(\"cde\");\r\n elements.add(\"cde\");\r\n elements.add(\"efg\");\r\n elements.add(\"cde\");\r\n \r\n Set<String> expResult = new LinkedHashSet<>();\r\n expResult.add(\"foo\");\r\n \r\n LexicalChecker instance = new LexicalChecker();\r\n Set<String> result = instance.findDuplicates(elements);\r\n \r\n assertNotSame(expResult, result);\r\n \r\n expResult.add(\"cde\");\r\n assertEquals(expResult, result);\r\n }", "@Override\n\tProp getp1() {\n\t\treturn null;\n\t}", "public void verifyNoMatching(AcProperty e)\n {\n }", "@Test\n public void test16PersistentProperty() throws Exception\n {\n // test find all meta\n List<PSPersistentPropertyMeta> listMeta = ms_cms.findAllPersistentMeta();\n assertTrue(listMeta.size() == 3);\n\n // test find persistent meta by name\n listMeta = ms_cms\n .findPersistentMetaByName(PSPersistentPropertyManager.SYS_USER);\n assertTrue(listMeta.size() == 3);\n\n // test find all properties\n List<PSPersistentProperty> origProps = ms_cms.findAllPersistentProperties();\n\n String myUser = \"myUser\" + System.currentTimeMillis();\n\n // test find by name\n List<PSPersistentProperty> props = ms_cms\n .findPersistentPropertiesByName(myUser);\n assertTrue(props.size() == 0);\n\n // test insert / save property\n PSPersistentProperty prop = new PSPersistentProperty(myUser, \"sys_lang\",\n \"sys_session\", \"private\", \"admin2 sys_lang private\");\n ms_cms.savePersistentProperty(prop);\n props = ms_cms.findPersistentPropertiesByName(myUser);\n assertTrue(props.size() == 1);\n\n // test modify / update property\n String newValue = \"changed\";\n prop.setValue(newValue);\n ms_cms.updatePersistentProperty(prop);\n\n // test delete property\n ms_cms.deletePersistentProperty(prop);\n props = ms_cms.findPersistentPropertiesByName(myUser);\n assertTrue(props.size() == 0);\n\n props = ms_cms.findAllPersistentProperties();\n assertTrue(origProps.size() == props.size());\n }", "ImmutableList<MappingAssertion> addDistinct(ImmutableList<MappingAssertion> mapping);", "public interface UniquePropertyContainer extends PropertyContainer {\n <T> Optional<T> getProperty(PropertyKey<T> key);\n <T> Optional<T> remove(PropertyKey<T> key);\n\n @Override\n default <T> Optional<T> first(PropertyKey<T> key) {\n return getProperty(key);\n }\n\n @Override\n default <T> Optional<T> last(PropertyKey<T> key) {\n return getProperty(key);\n }\n\n @Override\n default <T> Optional<T> removeFirst(PropertyKey<T> key) {\n return remove(key);\n }\n\n @Override\n default <T> Optional<T> removeLast(PropertyKey<T> key) {\n return remove(key);\n }\n}", "IGLProperty clone();", "public void testAddRejectReasons_RejectReasonsContainsManyDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(3);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(2);\r\n entry.addRejectReason(new ExpenseEntryRejectReason(1));\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 1, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[2]}, duplicate);\r\n }", "private DiffProperty() {\n\t\t// No implementation\n\t}", "public void testFailureDueToDups() throws Exception\n {\n try {\n String json = MAPPER.writeValueAsString(new DupFieldBean());\n fail(\"Should not pass, got: \"+json);\n } catch (InvalidDefinitionException e) {\n verifyException(e, \"Multiple fields representing\");\n }\n }", "public void testOnlyBaseMutated()\n {\n poly.getPrefixMapping().setNsPrefix( \"a\", alpha );\n assertEquals( null, g1.getPrefixMapping().getNsPrefixURI( \"a\" ) );\n assertEquals( null, g2.getPrefixMapping().getNsPrefixURI( \"a\" ) );\n assertEquals( alpha, gBase.getPrefixMapping().getNsPrefixURI( \"a\" ) );\n }", "public void testAddRejectReasons_RejectReasonsContainsDuplicateElementsAccuracy() {\r\n ExpenseEntryRejectReason[] rejectReasons = new ExpenseEntryRejectReason[4];\r\n rejectReasons[0] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[1] = new ExpenseEntryRejectReason(1);\r\n rejectReasons[2] = new ExpenseEntryRejectReason(2);\r\n rejectReasons[3] = new ExpenseEntryRejectReason(1);\r\n\r\n ExpenseEntryRejectReason[] duplicate = entry.addRejectReasons(rejectReasons);\r\n\r\n // check nothing is added into the rejectReasons map\r\n Map rejectReasonsMap = (Map) V1Dot1TestHelper.getPrivateField(entry.getClass(), entry, \"rejectReasons\");\r\n assertEquals(\"The reject reasons should not be added.\", 0, rejectReasonsMap.size());\r\n\r\n // check the duplicate result\r\n assertNotNull(\"The duplicate result should be correct.\", duplicate);\r\n V1Dot1TestHelper.assertEquals(\"The duplicate result should be correct.\",\r\n new ExpenseEntryRejectReason[] {rejectReasons[0], rejectReasons[1], rejectReasons[3]}, duplicate);\r\n }", "@Test\n public void testIndexMaintenanceWithHeterogenousObjects() throws Exception {\n DefaultQueryService.TEST_QUERY_HETEROGENEOUS_OBJECTS = true;\n IndexManager.TEST_RANGEINDEX_ONLY = true;\n Cache cache = CacheUtils.getCache();\n qs = cache.getQueryService();\n region = CacheUtils.createRegion(\"portfolio1\", null);\n idSet.clear();\n Portfolio p = new Portfolio(4);\n region.put(\"4\", p);\n idSet.add(\"\" + p.getID());\n p = new Portfolio(5);\n region.put(\"5\", p);\n idSet.add(\"\" + p.getID());\n region.put(\"6\", 6);\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID()\", SEPARATOR + \"portfolio1 pf\");\n RangeIndex ri = (RangeIndex) i1;\n assertEquals(2, ri.valueToEntriesMap.size());\n Iterator itr = ri.valueToEntriesMap.values().iterator();\n while (itr.hasNext()) {\n RangeIndex.RegionEntryToValuesMap re2ValMap = (RangeIndex.RegionEntryToValuesMap) itr.next();\n assertEquals(1, re2ValMap.map.size());\n Object obj = re2ValMap.map.values().iterator().next();\n assertFalse(obj instanceof Collection);\n assertTrue(obj instanceof Portfolio);\n Portfolio pf = (Portfolio) obj;\n assertTrue(idSet.contains(String.valueOf(pf.getID())));\n }\n assertEquals(1, ri.undefinedMappedEntries.map.size());\n Map.Entry entry = (Map.Entry) ri.undefinedMappedEntries.map.entrySet().iterator().next();\n assertFalse(entry.getValue() instanceof Collection);\n assertTrue(entry.getValue() instanceof Integer);\n assertTrue(entry.getValue().equals(6));\n\n region.put(\"7\", 7);\n idSet.add(7);\n assertEquals(2, ri.undefinedMappedEntries.map.size());\n itr = ri.undefinedMappedEntries.map.entrySet().iterator();\n while (itr.hasNext()) {\n entry = (Map.Entry) itr.next();\n assertFalse(entry.getValue() instanceof Collection);\n assertTrue(entry.getValue() instanceof Integer);\n idSet.contains(entry.getValue());\n }\n\n region.remove(\"7\");\n idSet.remove(7);\n Index i2 =\n qs.createIndex(\"indx2\", IndexType.FUNCTIONAL, \"pf.pkid\", SEPARATOR + \"portfolio1 pf\");\n ri = (RangeIndex) i2;\n assertEquals(2, ri.valueToEntriesMap.size());\n itr = ri.valueToEntriesMap.values().iterator();\n while (itr.hasNext()) {\n RangeIndex.RegionEntryToValuesMap re2ValMap = (RangeIndex.RegionEntryToValuesMap) itr.next();\n assertEquals(1, re2ValMap.map.size());\n Object obj = re2ValMap.map.values().iterator().next();\n assertFalse(obj instanceof Collection);\n assertTrue(obj instanceof Portfolio);\n Portfolio pf = (Portfolio) obj;\n assertTrue(idSet.contains(String.valueOf(pf.getID())));\n }\n assertEquals(1, ri.undefinedMappedEntries.map.size());\n entry = (Map.Entry) ri.undefinedMappedEntries.map.entrySet().iterator().next();\n assertFalse(entry.getValue() instanceof Collection);\n assertTrue(entry.getValue() instanceof Integer);\n assertTrue(entry.getValue().equals(6));\n\n region.put(\"7\", 7);\n idSet.add(7);\n assertEquals(2, ri.undefinedMappedEntries.map.size());\n itr = ri.undefinedMappedEntries.map.entrySet().iterator();\n while (itr.hasNext()) {\n entry = (Map.Entry) itr.next();\n assertFalse(entry.getValue() instanceof Collection);\n assertTrue(entry.getValue() instanceof Integer);\n idSet.contains(entry.getValue());\n }\n }", "@Override\r\n\tpublic boolean insertLostProperty(ReportDto dto) {\n\t\treturn false;\r\n\t}", "@Override\n public int sizeOfSecondPiePtArray() {\n synchronized (monitor()) {\n check_orphaned();\n return get_store().count_elements(PROPERTY_QNAME[0]);\n }\n }", "private static PropertyDefinition determineDirectProperty(\n \t\t\tMutableGroup group, QName propertyName, boolean strict) {\n \t\tChildDefinition<?> child = group.getDefinition().getChild(propertyName);\n \t\tif (child != null && child.asProperty() != null && \n \t\t\t\t(!strict || allowAdd(group, null, child.asProperty().getName()))) {\n \t\t\treturn child.asProperty();\n \t\t}\n \t\t\n \t\treturn null;\n \t}", "private static void disjointObjectPropertiesPair(OWLDisjointObjectPropertiesAxiom disjointRolePairAxiom,\n\t\t\tfinal Set<Rule> rules) {\n\t\tList<OWLObjectPropertyExpression> disjointProperties = disjointRolePairAxiom.properties()\n\t\t\t\t.collect(Collectors.toList());\n\t\tif (disjointProperties.size() != 2) {\n\t\t\tthrow new RuntimeException(\"Expected a pair of disjoint properties: \" + disjointRolePairAxiom);\n\t\t}\n\t\tOWLObjectPropertyExpression firstProperty = disjointProperties.get(0);\n\t\tOWLObjectPropertyExpression secondProperty = disjointProperties.get(1);\n\n\t\tRule disjointPropertiesPairRule = new Rule(OWLConceptToAtom(InternalizedEntities.OWL_NOTHING, VAR_X),\n\t\t\t\tnew Atom[] { OWLObjectPropertytoAtom(firstProperty, VAR_X, VAR_Y),\n\t\t\t\t\t\tOWLObjectPropertytoAtom(secondProperty, VAR_X, VAR_Y) });\n\t\trules.add(disjointPropertiesPairRule);\n\t}", "protected static ARTResource getPropertyDomain(SKOSXLModel skosXLModel, ARTURIResource prop)\r\n\t\t\tthrows ModelAccessException {\r\n\t\tARTResource result = null;\r\n\t\tARTResourceIterator innerIT;\r\n\t\tinnerIT = skosXLModel.getOWLModel().listPropertyDomains(prop, true, NodeFilters.MAINGRAPH);\r\n\t\tif (innerIT.streamOpen())\r\n\t\t\tresult = innerIT.getNext();\r\n\t\tinnerIT.close();\r\n\t\tif (result != null)\r\n\t\t\treturn result;\r\n\t\telse {\r\n\t\t\t// System.out.println(\"trying to get property domain from superproperties\");\r\n\t\t\tARTURIResourceIterator innerURIIT = ((DirectReasoning) skosXLModel.getOWLModel())\r\n\t\t\t\t\t.listDirectSuperProperties(prop, NodeFilters.MAINGRAPH);\r\n\t\t\tARTURIResource superProp = null;\r\n\r\n\t\t\tif (innerURIIT.streamOpen())\r\n\t\t\t\tsuperProp = innerURIIT.getNext();\r\n\t\t\tinnerURIIT.close();\r\n\t\t\tif (superProp != null && (!superProp.equals(prop))) {\r\n\t\t\t\t// System.out.println(\"trying to get property domain for property: \" + prop\r\n\t\t\t\t// + \" from superproperties: \" + superProp);\r\n\t\t\t\treturn getPropertyDomain(skosXLModel, superProp);\r\n\t\t\t} else\r\n\t\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Test\n public void testGetDuplicateTranslationKeysWithEmptyLine() throws Exception {\n final File testFile = getTestFile(\"messages.properties\");\n FileUtils.writeLines(testFile, Arrays.asList(\"emptyline.dup=foo\", \"emptyline.not.dup=bar\", \" \", \"emptyline.dup=fizzbuzz\"));\n assertThat(parser.getDuplicateTranslationKeys(testFile)).hasSize(1).contains(\"emptyline.dup\");\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFields() {\n }", "private boolean propriedadesIguais( Integer pro1, Integer pro2 ){\r\n\t if ( pro2 != null ){\r\n\t\t if ( !pro2.equals( pro1 ) ){\r\n\t\t\t return false;\r\n\t\t }\r\n\t } else if ( pro1 != null ){\r\n\t\t return false;\r\n\t }\r\n\t \r\n\t // Se chegou ate aqui quer dizer que as propriedades sao iguais\r\n\t return true;\r\n\t}", "@Test\n public void testGetPropertyAsList() {\n System.out.println(\"getPropertyAsList\");\n Properties props = new Properties();\n String key = \"testProp\";\n props.setProperty(key, \"alpha, beta, gamma\");\n List<String> expResult = Arrays.asList(\"alpha\", \"beta\", \"gamma\");\n List<String> result = EngineConfiguration.getPropertyAsList(props, key);\n assertEquals(expResult, result);\n }", "@Test\n public void testXSDElement() {\n ArrayList<String> target = new ArrayList<String>();\n target.add(\"subscriber-name\");\n target.add(\"global-customer-id\");\n target.add(\"subscriber-type\");\n target.add(\"service-type\");\n\n Vector<String> indexedProps = new Vector<String>();\n for (int i = 0; i < javaTypeNodes.getLength(); ++i) {\n XSDElement javaTypeElement = new XSDElement((Element) javaTypeNodes.item(i));\n indexedProps.addAll(javaTypeElement.getIndexedProps());\n }\n assertThat(new ArrayList<>(indexedProps),\n both(everyItem(is(in(target.toArray())))).and(containsInAnyOrder(target.toArray())));\n }", "@Override\n public boolean isLabelProperty(Object element, String property) {\n return false;\n }", "@Test\n public void test57() throws Throwable {\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot();\n ExtendedCategoryAxis extendedCategoryAxis0 = new ExtendedCategoryAxis(\"wX*\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot1 = new CombinedDomainCategoryPlot((CategoryAxis) extendedCategoryAxis0);\n combinedDomainCategoryPlot0.remove(combinedDomainCategoryPlot1);\n combinedDomainCategoryPlot0.setRenderer((CategoryItemRenderer) null, true);\n AxisChangeEvent axisChangeEvent0 = new AxisChangeEvent((Axis) extendedCategoryAxis0);\n combinedDomainCategoryPlot0.axisChanged(axisChangeEvent0);\n combinedDomainCategoryPlot0.setRenderer(84, (CategoryItemRenderer) null, true);\n AxisSpace axisSpace0 = combinedDomainCategoryPlot0.getFixedDomainAxisSpace();\n boolean boolean0 = combinedDomainCategoryPlot0.getDrawSharedDomainAxis();\n }", "@Override\n\tpublic void visit(OWLObjectPropertyDomainAxiom axiom) {\n\t\taddFact(RewritingVocabulary.DOMAIN, //\n\t\t\t\taxiom.getProperty().asOWLObjectProperty().getIRI(),//\n\t\t\t\taxiom.getDomain().asOWLClass().getIRI());\n\n\t}", "protected boolean isMultiplePropertiesChanging() {\n return multiplePropertiesChanging;\n }", "public void testAssertPropertyReflectionEquals_notEqualsDifferentValues() {\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", \"xxxxxx\", testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "ProductPropertyExecution addProductPropertyList(List<PropertyValue> propertyValueList,PPManage ppManage);", "@Test\n public void testGetPropertyValueSetEmptyCollection(){\n assertEquals(emptySet(), CollectionsUtil.getPropertyValueSet(new ArrayList<>(), \"id\", Integer.class));\n }", "public boolean isAssocProperty();", "private TBMFocalElement extendOld(TBMFocalElement focalElement, TBMVarDomain domain) {\n\n TBMFocalElement result = this.createFocalElement();\n\n result.setMass(focalElement.getMass());\n result.setDomain(domain);\n // Get from domain the variables that are not in focalElement \n Set<Resource> diff = domain.listVariables().filterDrop(r -> focalElement.getDomain().hasVariable(r)).toSet();\n\n if (diff.isEmpty()) { //there are no differences, clone the focalElement and it's configurations\n // Clone focal element\n Set<TBMConfiguration> iterConfs = focalElement.listAllConfigurations().toSet();\n for (TBMConfiguration conf : iterConfs) {\n //Create empty conf\n TBMConfiguration newConfig = this.createConfiguration();\n //Add variables of config\n //configuration.listAllElements().forEachRemaining(res -> newConfig.addElement(res)); \n conf.listAllElements().toSet().forEach(elem -> newConfig.addElement(elem));\n //newConfig.addElement(iterElements.next());\n\n //Add config to result\n result.addConfiguration(newConfig);\n }\n } else { //there are differences\n\n Set<TBMConfiguration> resultConfigurations = new HashSet<>();\n\n ExtendedIterator<TBMConfiguration> origConfigurations = focalElement.listAllConfigurations();\n while (origConfigurations.hasNext()) {\n resultConfigurations.add(origConfigurations.next());\n }\n\n // For each of the different variables\n for (Resource var : diff) {\n\n Set<TBMConfiguration> newConfigurations = new HashSet<>();\n\n // For each of the instances of the variable\n Set<Resource> instance = this.listSubjectsWithProperty(RDF.type, var).toSet();\n for (Resource newVar : instance) {\n\n for (TBMConfiguration resultConfiguration : resultConfigurations) {\n //Create empty conf\n TBMConfiguration currentConfig = this.createConfiguration();\n //Add variables of current config\n for (Resource res : resultConfiguration.listAllElements().toSet()) {\n currentConfig.addElement(res);\n }\n //resultConfiguration.listAllElements().forEachRemaining(res -> currentConfig.addElement(res));\n //Add new variable\n currentConfig.addElement(newVar);\n //Add result to current congig\n newConfigurations.add(currentConfig);\n }\n }\n //replace old configs with new configs\n resultConfigurations = newConfigurations;\n }\n\n //add resulting configs to result FE\n resultConfigurations.forEach(conf -> result.addConfiguration(conf));\n\n }\n return result;\n\n }", "public PropertySet(PropertySet p){\n\t\tthis.properties = p.properties;\n\t}", "@Test(expected = IllegalArgumentException.class)\n public void testGetPropertyValueSetEmptyPropertyName(){\n List<User> list = toList(new User(2L), new User(5L), new User(5L));\n CollectionsUtil.getPropertyValueSet(list, \"\", Integer.class);\n }", "@Test\n public void testWithDeadlyParams() {\n HashSet<ComplexOomage> oomages = new HashSet<ComplexOomage>();\n int N = 10000;\n ArrayList<Integer> params;\n\n for (int oom = 0; oom < N; oom += 1) {\n params = new ArrayList<Integer>(N);\n for (int i = 0; i < 10; i += 1) {\n params.add(255);\n }\n oomages.add(new ComplexOomage(params));\n }\n assertTrue(haveNiceHashCodeSpread(oomages));\n }", "public interface TLPropertyOwner extends NamedEntity, TLMemberFieldOwner {\n\n /**\n * Returns the value of the 'elements' field.\n * \n * @return List&lt;TLProperty&gt;\n */\n public List<TLProperty> getElements();\n\n /**\n * Returns the element with the specified name.\n * \n * @param elementName the name of the element to return\n * @return TLPropertyg\n */\n public TLProperty getElement(String elementName);\n\n /**\n * Adds a <code>TLProperty</code> element to the current list.\n * \n * @param element the element value to add\n */\n public void addElement(TLProperty element);\n\n /**\n * Adds a <code>TLProperty</code> element to the current list.\n * \n * @param index the index at which the given element should be added\n * @param element the element value to add\n * @throws IndexOutOfBoundsException thrown if the index is out of range (index &lt; 0 || index &gt; size())\n */\n public void addElement(int index, TLProperty element);\n\n /**\n * Removes the specified <code>TLProperty</code> from the current list.\n * \n * @param element the element value to remove\n */\n public void removeProperty(TLProperty element);\n\n /**\n * Moves this element up by one position in the list. If the element is not owned by this object or it is already at\n * the front of the list, this method has no effect.\n * \n * @param element the element to move\n */\n public void moveUp(TLProperty element);\n\n /**\n * Moves this element down by one position in the list. If the element is not owned by this object or it is already\n * at the end of the list, this method has no effect.\n * \n * @param element the element to move\n */\n public void moveDown(TLProperty element);\n\n /**\n * Sorts the list of elements using the comparator provided.\n * \n * @param comparator the comparator to use when sorting the list\n */\n public void sortElements(Comparator<TLProperty> comparator);\n\n}" ]
[ "0.59263474", "0.58229536", "0.5793806", "0.5773219", "0.573585", "0.57344806", "0.57029545", "0.56798565", "0.5642006", "0.5621364", "0.55797607", "0.5543657", "0.55354273", "0.55099857", "0.5483394", "0.5441972", "0.54308665", "0.54171187", "0.5412242", "0.53929037", "0.53867686", "0.5379572", "0.5348726", "0.5348041", "0.53372586", "0.53315157", "0.53085536", "0.52846426", "0.52739906", "0.52557963", "0.52445674", "0.5227756", "0.5215628", "0.5186441", "0.51696855", "0.5157733", "0.5152698", "0.5151983", "0.5148109", "0.5146934", "0.51461136", "0.5134532", "0.51306665", "0.5127098", "0.51200366", "0.51176435", "0.5116374", "0.51101816", "0.5109534", "0.5107438", "0.5100877", "0.50891423", "0.5086388", "0.50801504", "0.50770956", "0.50745225", "0.5068344", "0.5066621", "0.50638604", "0.50593865", "0.5059087", "0.50574183", "0.5048339", "0.50418544", "0.50375044", "0.50286156", "0.50231373", "0.5022805", "0.50098026", "0.50097746", "0.49937296", "0.4991269", "0.4990196", "0.49828196", "0.49738124", "0.49677223", "0.4958714", "0.49572688", "0.49547985", "0.49529317", "0.49516708", "0.4950528", "0.49502558", "0.49401897", "0.4936904", "0.49352598", "0.4927985", "0.49251136", "0.4916164", "0.49155396", "0.49155268", "0.49138305", "0.49121627", "0.49039456", "0.49015054", "0.4893226", "0.48920515", "0.48886225", "0.48860714", "0.4885826" ]
0.49290064
86
Bug report by Danah Nada cannot remove import
public void test_dn_02() { OntModel mymod = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null ); mymod.read( "file:testing/ontology/testImport3/a.owl" ); assertEquals( "Graph count..", 2, mymod.getSubGraphs().size() ); for (Iterator it = mymod.listImportedModels(); it.hasNext();) { mymod.removeSubModel( (Model) it.next() ); } assertEquals( "Graph count..", 0, mymod.getSubGraphs().size() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void unsetImport()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(IMPORT$0, 0);\n }\n }", "public void clear()\n {\n normalImports.clear();\n wildcardImports.clear();\n }", "public void importGraphUndirective() {\n }", "protected boolean isImport() {\n\t\t// Overrides\n\t\treturn false;\n\t}", "void reportImport() {\n this.hasImports = true;\n }", "public void fixImports(Module module, Collection<SLanguage> addedLanguages) {\n }", "protected void uninstall() {\n\t\t//\n\t}", "public void testImportGone() throws Exception {\n\t\tBundle tba = getContext().installBundle(\n\t\t\t\tgetWebServer() + \"classpath.tb4a.jar\");\n\t\tBundle tbb = getContext().installBundle(\n\t\t\t\tgetWebServer() + \"classpath.tb4b.jar\");\n\t\ttry {\n\t\t\ttba.start();\n\t\t\tassertEquals(Bundle.ACTIVE, tba.getState());\n\t\t\ttbb.start();\n\t\t\tassertEquals(Bundle.ACTIVE, tbb.getState());\n\t\t}\n\t\tfinally {\n\t\t\ttba.uninstall();\n\t\t\ttbb.uninstall();\n\t\t}\n\t}", "@Test\r\n public void testImportRedundancy() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.*\");\r\n typeParser.addImport(\"java.util.*\");\r\n Type t1 = typeParser.parse(\"List\");\r\n assertEquals(t1, java.util.List.class);\r\n }", "@Override\n public String visit(ImportDeclaration n, Object arg) {\n return null;\n }", "protected void uninstallComponents() {\n\t}", "protected void uninstallComponents() {\n }", "public void removeImport(int i)\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(IMPORT$0, i);\n }\n }", "public void testImportUninstalledCode() throws Exception {\n\t\tString s = getWebServer() + \"classpath.tb1.jar\";\n\t\tlog(\"Web req \" + s);\n\t\ttry {\n\t\t\tURL url = new URL(s);\n\t\t\tlog(\"Length \"\n\t\t\t\t\t+ url.openConnection().getContentLength());\n\t\t\tBundle tb = getContext().installBundle(s);\n\t\t\ttry {\n\t\t\t\tassertEquals(Bundle.INSTALLED, tb.getState());\n\t\t\t\ttry {\n\t\t\t\t\ttb.start();\n\t\t\t\t\tfail(\"No exception thrown, Error!\");\n\t\t\t\t}\n\t\t\t\tcatch (BundleException be) {\n\t\t\t\t\t// expected\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\ttb.uninstall();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tfail(\"unexpected exception\", e);\n\t\t}\n\t}", "@Override\n\tpublic void deleteModule() throws Exception {\n\n\t}", "private UnloadTestModelLoader() {\n registerProject(\"a\");\n registerProject(\"e\");\n registerProject(\"b\", \"e\");\n registerProject(\"c\");\n registerProject(\"d\");\n registerProject(\"f\");\n registerProject(\"p1\", \"a\", \"b\");\n registerProject(\"p2\", \"b\", \"c\");\n registerProject(\"p3\", \"b\", \"d\");\n registerProject(\"p4\", \"d\");\n }", "public void remDefinedInModule(){\n ((MvwDefinitionDMO) core).remDefinedInModule();\n }", "private void ImportLibrary(){\n for(int i = 0; i < refact.size(); i++){\n if(refact.get(i).contains(\"import\")){\n for(String library : libraries){\n refact.add(i, library + \"\\r\");\n }\n break;\n }\n }\n\n\n }", "Import createImport();", "Import createImport();", "public void imprimirHijos(){\n\t\tmodCons.imprimirHijos();\n\t}", "@Test\n public void testNonSpecifiedImports() throws Exception {\n final DefaultConfiguration checkConfig =\n createModuleConfig(CustomImportOrderCheck.class);\n checkConfig.addAttribute(\"thirdPartyPackageRegExp\", \"org.\");\n checkConfig.addAttribute(\"customImportOrderRules\",\n \"STATIC###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE###SAME_PACKAGE(3)\");\n checkConfig.addAttribute(\"sortImportsInGroupAlphabetically\", \"true\");\n final String[] expected = {\n \"4: \" + getCheckMessage(MSG_LEX, \"java.awt.Button.ABORT\",\n \"java.io.File.createTempFile\"),\n \"5: \" + getCheckMessage(MSG_LEX, \"java.awt.print.Paper.*\",\n \"java.io.File.createTempFile\"),\n \"10: \" + getCheckMessage(MSG_LEX, \"java.awt.Dialog\", \"java.awt.Frame\"),\n \"15: \" + getCheckMessage(MSG_LEX, \"java.io.File\", \"javax.swing.JTable\"),\n \"16: \" + getCheckMessage(MSG_LEX, \"java.io.IOException\", \"javax.swing.JTable\"),\n \"17: \" + getCheckMessage(MSG_LEX, \"java.io.InputStream\", \"javax.swing.JTable\"),\n \"18: \" + getCheckMessage(MSG_LEX, \"java.io.Reader\", \"javax.swing.JTable\"),\n \"20: \" + getCheckMessage(MSG_ORDER, SAME, THIRD, \"com.puppycrawl.tools.*\"),\n \"22: \" + getCheckMessage(MSG_NONGROUP_IMPORT, \"com.google.common.collect.*\"),\n \"23: \" + getCheckMessage(MSG_LINE_SEPARATOR, \"org.junit.*\"),\n };\n\n verify(checkConfig, getPath(\"InputCustomImportOrderDefault.java\"), expected);\n }", "private XIncluder() {}", "TopLevelImport createTopLevelImport();", "public void testMultipleConflictingDynamicImports() throws Exception {\n\n\t\tsetupImportChoices();\n\t\tConfigurableWeavingHook hook = new ConfigurableWeavingHook();\n\t\thook.addImport(IMPORT_TEST_CLASS_PKG + \";version=\\\"(1.0,1.5)\\\"\");\n\t\thook.addImport(IMPORT_TEST_CLASS_PKG + \";foo=bar\");\n\t\thook.setChangeTo(IMPORT_TEST_CLASS_NAME);\n\t\tServiceRegistration<WeavingHook> reg = null;\n\t\ttry {\n\t\t\treg = hook.register(getContext(), 0);\n\t\t\tClass<?>clazz = weavingClasses.loadClass(DYNAMIC_IMPORT_TEST_CLASS_NAME);\n\t\t\tassertEquals(\"Weaving was unsuccessful\",\n\t\t\t\t\tTEST_IMPORT_SYM_NAME + \"_1.1.0\",\n\t\t\t\t\tclazz.getConstructor().newInstance().toString());\n\t\t} finally {\n\t\t\tif (reg != null)\n\t\t\t\treg.unregister();\n\t\t\ttearDownImportChoices();\n\t\t}\n\t}", "Import getImport();", "private String imported(String string) {\n string = IMPORT.matcher(string).replaceAll(\"\");\n string = DOT.matcher(string).replaceAll(\"/\");\n string = SEMICOLON.matcher(string).replaceAll(\"\");\n string = \"/\" + string.trim() + \".java\";\n return string;\n }", "Imports createImports();", "static void m23073a(Bundle bundle) {\n bundle = bundle.keySet().iterator();\n while (bundle.hasNext()) {\n String str = (String) bundle.next();\n if (str != null && str.startsWith(\"google.c.\")) {\n bundle.remove();\n }\n }\n }", "void resetClassLoader (boolean forAdjunct) {\r\n synchronized (classLoaderLock) {\r\n if (classLoader == null) {\r\n return;\r\n }\r\n if (forAdjunct) {\r\n classLoader = CALClassLoader.resetAdjunctClasses(classLoader);\r\n } else {\r\n // Simply discard the class loader. This will unload all classes in the module\r\n // and adjunct.\r\n classLoader = null;\r\n }\r\n }\r\n }", "private void removeOrphanClasspaths() {\n Set<String> allRecordedRemotePaths = new HashSet<String>(localPathTranslation.keySet());\n for (String remotePath : localClasspathProcessor.getLocalClasspath().values()) {\n allRecordedRemotePaths.remove(remotePath);\n }\n localPathTranslation.keySet().removeAll(allRecordedRemotePaths);\n\n // Now add new translations\n for (String remotePath : localClasspathProcessor.getLocalClasspath().values()) {\n if (!localPathTranslation.containsKey(remotePath)) {\n localPathTranslation.put(remotePath, UNDEFINED);\n }\n }\n }", "public void clearScriptPath() {\r\n loader = null;\r\n }", "public static void removeCurrentThreadLib() {\n\t\tcommonLibs.remove();\n\t}", "public void dontWantToInstall() {\n\t\tpackageList.removeAll(packageList);\n\t}", "private void deregisterReferences(final Resource referencer) {\n \n \t\tObject[] resImports = getImports(referencer).toArray();\n \n \t\tfor (int i = 0; i < resImports.length; i++) {\n \n \t\t\tfinal Resource referenced = (Resource) resImports[i];\n \n \t\t\tMap importsMap = getImportsMap(referencer);\n \n \t\t\tif (importsMap != null) {\n \n \t\t\t\timportsMap.remove(referenced);\n \n \t\t\t\tdomain.sendNotification(new NotificationImpl(\n \t\t\t\t\tEventTypes.IMPORT, referenced, (Object) null, -1) {\n \n \t\t\t\t\tpublic Object getNotifier() {\n \t\t\t\t\t\treturn referencer;\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t\tif (importsMap.isEmpty()) {\n \t\t\t\t\timports.remove(referencer);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tMap exportsMap = getExportsMap(referenced);\n \n \t\t\tif (exportsMap != null) {\n \n \t\t\t\texportsMap.remove(referencer);\n \n \t\t\t\tdomain.sendNotification(new NotificationImpl(\n \t\t\t\t\tEventTypes.EXPORT, referencer, (Object) null, -1) {\n \n \t\t\t\t\tpublic Object getNotifier() {\n \t\t\t\t\t\treturn referenced;\n \t\t\t\t\t}\n \t\t\t\t});\n \n \t\t\t\tif (exportsMap.isEmpty()) {\n \t\t\t\t\texports.remove(referenced);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "@Override\n\tprotected void GenerateImportLibrary(String LibName) {\n\n\t}", "public void removeCustomFileImporter(FileImporter importer) {\n\t\tif (importer == null)\n\t\t\tthrow new NullPointerException(\"importer\");\n\t\t_customFileImporters.remove(importer);\n\t}", "public void testDynamicImport() throws Exception {\n\t\tdoTest(\";version=\\\"[1,2)\\\"\", TEST_ALT_IMPORT_SYM_NAME + \"_1.0.0\");\n\t}", "@Override\n\tpublic void excluir() {\n\t\t\n\t}", "public static List<String> checkImports(CompilationUnit cu) {\n\t\tList<String> list = new ArrayList<>();\n\t\tImportCollector ic = new ImportCollector();\n\t\tic.visit(cu, list);\n\t\treturn list;\n\t}", "public T caseImport(Import object) {\r\n\t\treturn null;\r\n\t}", "public T caseImport(Import object)\n {\n return null;\n }", "public T caseImport(Import object)\n {\n return null;\n }", "void removeGssExportedName(int i);", "public void removeAllPackages() {\r\n myPackages.clear();\r\n }", "@Override\n\tprotected void generatePkgImports() {\n\t\toutputList.add(new OutputLine(indentLvl, \"import uvm_pkg::*;\"));\n\t\toutputList.add(new OutputLine(indentLvl, \"import ordt_uvm_reg_translate1_pkg::*;\"));\n\t\tif (UVMRdlTranslate1Classes.altModelPackage != null) outputList.add(new OutputLine(indentLvl, \"import \" + UVMRdlTranslate1Classes.altModelPackage + \";\")); // add alt model pkg\n\t\toutputList.add(new OutputLine(indentLvl, \"import jspec::*;\"));\n\t}", "private void removeSource(String sourceName) {\n\t\t\n\t}", "synchronized boolean unregisterPackages(List exports, List imports, boolean force) {\n // Check if somebody other than ourselves use our exports\n if (!force) {\n for (Iterator i = exports.iterator(); i.hasNext(); ) {\n ExportPkg ep = (ExportPkg)i.next();\n Pkg p = ep.pkg;\n if (p.providers.contains(ep)) {\n for (Iterator ii = p.importers.iterator(); ii.hasNext(); ) {\n ImportPkg ip = (ImportPkg) ii.next();\n if (ep == ip.provider && ep.bpkgs != ip.bpkgs) {\n if (Debug.packages) {\n Debug.println(\"unregisterPackages: Failed to unregister, \" + ep +\n \" is still in use.\");\n }\n markAsZombies(exports);\n return false;\n }\n }\n\t}\n }\n }\n\n for (Iterator i = exports.iterator(); i.hasNext(); ) {\n ExportPkg ep = (ExportPkg)i.next();\n Pkg p = ep.pkg;\n if (Debug.packages) {\n Debug.println(\"unregisterPackages: unregister export - \" + ep);\n }\n p.removeExporter(ep);\n if (p.isEmpty()) {\n packages.remove(ep.name);\n }\n }\n\n for (Iterator i = imports.iterator(); i.hasNext(); ) {\n ImportPkg ip = (ImportPkg)i.next();\n Pkg p = ip.pkg;\n if (Debug.packages) {\n Debug.println(\"unregisterPackages: unregister import - \" + ip.pkgString());\n }\n p.removeImporter(ip);\n if (p.isEmpty()) {\n packages.remove(ip.name);\n }\n }\n return true;\n }", "private void fixSingletonIncluded() {\n if (included_strings != null && included_strings.size() == 1) {\n str = included_strings.iterator().next();\n included_strings = null;\n flags &= ~STR;\n }\n }", "protected String getImportStatement() {\n return \"\";\n }", "@Override\n\tpublic Void visit(ClauseImport clause, Void ctx) {\n\t\treturn null;\n\t}", "boolean hasImported();", "public void testLoadIsImport() {\n \n \t\t// setup\n \t\tIProject project = getProject(getUniqueString());\n \t\tensureExistsInWorkspace(project, true);\n \t\tIScopeContext context = new ProjectScope(project);\n \t\tString qualifier = \"test.load.is.import\";\n \t\tIEclipsePreferences node = context.getNode(qualifier);\n \t\tString key = \"key\";\n \t\tString oldValue = \"old value\";\n \t\tString newValue = \"new value\";\n \t\tIPreferencesService service = Platform.getPreferencesService();\n \n \t\t// set the values in the nodes and flush the values to the file system\n \t\tnode.put(key, oldValue);\n \t\ttry {\n \t\t\tnode.flush();\n \t\t} catch (BackingStoreException e) {\n \t\t\tfail(\"1.99\", e);\n \t\t}\n \t\tassertEquals(\"1.00\", oldValue, node.get(key, null));\n \n \t\t// copy the data into a buffer for later use\n \t\tFile fileInFS = getFileInFilesystem(project, qualifier);\n \t\tInputStream input = null;\n \t\tOutputStream output = null;\n \t\tbyte[] buffer = null;\n \t\ttry {\n \t\t\tinput = new BufferedInputStream(new FileInputStream(fileInFS));\n \t\t\toutput = new ByteArrayOutputStream(1024);\n \t\t\ttransferData(input, output);\n \t\t\tbuffer = ((ByteArrayOutputStream) output).toByteArray();\n \t\t} catch (IOException e) {\n \t\t\tfail(\"2.99\", e);\n \t\t}\n \n \t\t// remove the file from the project\n \t\tIFile fileInWS = getFileInWorkspace(project, qualifier);\n \t\ttry {\n \t\t\tfileInWS.delete(IResource.NONE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"3.90\", e);\n \t\t}\n \t\tassertTrue(\"3.0\", !fileInWS.exists());\n \t\tassertTrue(\"3.1\", !fileInFS.exists());\n \t\tIEclipsePreferences projectNode = (IEclipsePreferences) service.getRootNode().node(ProjectScope.SCOPE).node(project.getName());\n \t\ttry {\n \t\t\tassertTrue(\"3.2\", !projectNode.nodeExists(qualifier));\n \t\t} catch (BackingStoreException e) {\n \t\t\tfail(\"3.91\", e);\n \t\t}\n \t\t//\t\tassertNull(\"3.3\", projectNode.node(qualifier).get(oldKey, null));\n \n \t\t// create the file in the project and discover it via a refresh local\n \t\ttry {\n \t\t\toutput = new BufferedOutputStream(new FileOutputStream(fileInFS));\n \t\t} catch (FileNotFoundException e) {\n \t\t\tfail(\"4.90\", e);\n \t\t}\n \t\tinput = new BufferedInputStream(new ByteArrayInputStream(buffer));\n \t\ttransferData(input, output);\n \t\ttry {\n \t\t\tproject.refreshLocal(IResource.DEPTH_INFINITE, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"4.91\", e);\n \t\t}\n \t\t// ensure that the resource changes happen\n \t\twaitForBuild();\n \n \t\t// verification - note that the preference modify listener gets called\n \t\t// here so that's why we are checking for \"new value\" and not the original one\n \t\tnode = context.getNode(qualifier);\n \t\tassertEquals(\"5.0\", newValue, node.get(key, null));\n \t}", "@Test\r\n public void testImportStringAmbiguity() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.*\");\r\n typeParser.addImport(\"java.awt.*\");\r\n try\r\n {\r\n typeParser.parse(\"List\");\r\n fail(\"Expected exception\");\r\n }\r\n catch (IllegalArgumentException e)\r\n {\r\n // Expected\r\n }\r\n }", "private Unescaper() {\n\n\t}", "public void flushModules(String name) {\n String n = name;\n\n if (n == null) {\n n = BwModule.defaultModuleName;\n }\n\n ArrayList<String> mnames = new ArrayList<>(modules.keySet());\n\n for (String s: mnames) {\n if (s.equals(n)) {\n continue;\n }\n\n modules.remove(s);\n }\n }", "public void testVersionConstrainedDynamicImport() throws Exception {\n\t\tdoTest(\";version=\\\"[1,1.5)\\\"\" , TEST_IMPORT_SYM_NAME + \"_1.1.0\");\n\t}", "@Test\r\n public void testImportStringHandling() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.List\");\r\n try\r\n {\r\n typeParser.addImport(\"java.awt.List\");\r\n fail(\"Expected exception\");\r\n }\r\n catch (IllegalArgumentException e)\r\n {\r\n // Expected\r\n }\r\n }", "private void tryUngetService(final ServiceReference<ComponentFactory> reference)\n {\n try\n {\n m_CoreContext.ungetService(reference);\n }\n catch (final Exception e)\n {\n m_Logging.error(e, \"Unable to remove registration for plug-in with product type [%s] from bundle [%s]\", \n reference.getProperty(ComponentConstants.COMPONENT_NAME), reference.getBundle());\n }\n }", "boolean ignoreExternal();", "public static void removeSearchBase(Project project){\n searchBase.remove(project);\n // 223003 - memory leaked project instance \n fileNameSearchBase.remove(project); // prevent leak\n }", "static void ignore() {\n }", "public void setRemoveModule(boolean b){\n\t\tremovemodule = true;\n\t}", "public static void m38540b() {\n Editor edit = PreferenceManager.getDefaultSharedPreferences(C13499h.m39721g()).edit();\n edit.remove(\"com.facebook.appevents.SourceApplicationInfo.callingApplicationPackage\");\n edit.remove(\"com.facebook.appevents.SourceApplicationInfo.openedByApplink\");\n edit.apply();\n }", "private static void doUnloading() {\n stopJit();\n // Do multiple GCs to prevent rare flakiness if some other thread is keeping the\n // classloader live.\n for (int i = 0; i < 5; ++i) {\n Runtime.getRuntime().gc();\n }\n startJit();\n }", "public void testPackageEndInTrash() throws ParseException {\n SourceFile s = _parseString(\"package edu.rice.cs.drjava;\\n\"+\n \"import java.io.*asdf\\n\"+\n \"import java.util.List#$\\n\"+\n \"package edu.rice.cs.drjava\\n\"+\n \"public class A {\\n\"+\n \"}\");\n assertEquals(\"Number of packages\",2,s.getPackageStatements().length);\n assertEquals(\"Number of imports\",2,s.getImportStatements().length);\n }", "default HtmlFormatter removePackages() {\n return replace(\n PACKAGE_PATTERN,\n \"\"\n );\n }", "void removeOrReplaceByDebugLocalRead();", "public Object fix(IModule module);", "@Override\n\tpublic void imprimir() {\n\t\t\n\t}", "private final void ensureBindingImports()\n {\n if (!bindingImportsAdded)\n {\n for (Iterator<BindingExpression> iter = bindingExpressions.iterator(); iter.hasNext(); )\n {\n BindingExpression expr = iter.next();\n addImport(expr.getDestinationTypeName(), expr.getXmlLineNumber());\n }\n bindingImportsAdded = true;\n }\n }", "@Override\n\tpublic void detalhar() {\n\t\t\n\t}", "public void importPackage(String pack) throws Exception;", "private static boolean ModuleImport_4_0(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"ModuleImport_4_0\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, K_AT);\n r = r && ModuleImportPath(b, l + 1);\n r = r && ModuleImport_4_0_2(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "void processImports() {\n FamixImport foundImport;\n\t\tArrayList<FamixImport> foundImportsList;\n\t\tArrayList<FamixImport> alreadyIncludedImportsList;\n\t\timportsPerEntity = new HashMap<String, ArrayList<FamixImport>>();\n\t \n\t\ttry{\n\t for (FamixAssociation association : theModel.associations) {\n \tString uniqueNameFrom = association.from;\n\t \tfoundImport = null;\n\t if (association instanceof FamixImport) {\n\t \tfoundImport = (FamixImport) association;\n\t // Fill HashMap importsPerEntity \n\t \talreadyIncludedImportsList = null;\n\t \tif (importsPerEntity.containsKey(uniqueNameFrom)){\n\t \t\talreadyIncludedImportsList = importsPerEntity.get(uniqueNameFrom);\n\t \t\talreadyIncludedImportsList.add(foundImport);\n\t \t\timportsPerEntity.put(uniqueNameFrom, alreadyIncludedImportsList);\n\t \t}\n\t \telse{\n\t\t\t \tfoundImportsList = new ArrayList<FamixImport>();\n\t\t \tfoundImportsList.add(foundImport);\n\t\t \timportsPerEntity.put(uniqueNameFrom, foundImportsList);\n\t \t}\n\t }\n\t }\n\t\t} catch(Exception e) {\n\t this.logger.warn(new Date().toString() + \"Exception may result in incomplete dependency list. Exception: \" + e);\n\t //e.printStackTrace();\n\t\t}\n }", "@Override\n public boolean isPackaged() {\n return false;\n }", "@Override\n\tpublic void deconfigure() throws CoreException {\n\t\tPTJavaFileBuilder.removeBuilderFromProject(fProject);\n\t\t// TO DO: delete markers here\n\t}", "private static boolean ModuleImport_4(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"ModuleImport_4\")) return false;\n ModuleImport_4_0(b, l + 1);\n return true;\n }", "@Test\n public void testStaticStandardThird() throws Exception {\n final DefaultConfiguration checkConfig =\n createModuleConfig(CustomImportOrderCheck.class);\n checkConfig.addAttribute(\"thirdPartyPackageRegExp\", \"com.|org.\");\n checkConfig.addAttribute(\"customImportOrderRules\",\n \"STATIC###STANDARD_JAVA_PACKAGE###THIRD_PARTY_PACKAGE\");\n checkConfig.addAttribute(\"sortImportsInGroupAlphabetically\", \"true\");\n final String[] expected = {\n \"4: \" + getCheckMessage(MSG_LEX, \"java.awt.Button.ABORT\",\n \"java.io.File.createTempFile\"),\n \"5: \" + getCheckMessage(MSG_LEX, \"java.awt.print.Paper.*\",\n \"java.io.File.createTempFile\"),\n \"10: \" + getCheckMessage(MSG_LEX, \"java.awt.Dialog\", \"java.awt.Frame\"),\n \"15: \" + getCheckMessage(MSG_LEX, \"java.io.File\", \"javax.swing.JTable\"),\n \"16: \" + getCheckMessage(MSG_LEX, \"java.io.IOException\", \"javax.swing.JTable\"),\n \"17: \" + getCheckMessage(MSG_LEX, \"java.io.InputStream\", \"javax.swing.JTable\"),\n \"18: \" + getCheckMessage(MSG_LEX, \"java.io.Reader\", \"javax.swing.JTable\"),\n \"22: \" + getCheckMessage(MSG_LEX, \"com.google.common.collect.*\",\n \"com.puppycrawl.tools.*\"),\n };\n\n verify(checkConfig, getPath(\"InputCustomImportOrderDefault.java\"), expected);\n }", "private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }", "@Test\r\n public void testImportStringPriorities() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser0 = TypeParsers.create();\r\n typeParser0.addImport(\"java.awt.List\");\r\n typeParser0.addImport(\"java.util.*\");\r\n\r\n Type t0 = typeParser0.parse(\"List\");\r\n assertEquals(t0, java.awt.List.class);\r\n \r\n TypeParser typeParser1 = TypeParsers.create();\r\n typeParser1.addImport(\"java.awt.*\");\r\n typeParser1.addImport(\"java.util.List\");\r\n\r\n Type t1 = typeParser1.parse(\"List\");\r\n assertEquals(t1, java.util.List.class);\r\n \r\n }", "@Test\n public void testPackageFileOverviewVisibilityAppliesToNameWithoutExplicitVisibility_esModule() {\n testNoWarning(\n srcs(\n SourceFile.fromCode(\n Compiler.joinPathParts(\"foo\", \"bar.js\"),\n lines(\n \"/**\",\n \" * @fileoverview\",\n \" * @package\",\n \" */\",\n \"/** @constructor */\",\n \"var Foo = function() {};\",\n \"export {Foo};\")),\n SourceFile.fromCode(\n Compiler.joinPathParts(\"baz\", \"quux.js\"),\n \"import {Foo} from '/foo/bar.js'; new Foo();\")));\n }", "public void updateImports(ModelContainer model) {\n\t\tupdateImports(model.getAboxOntology(), tboxIRI, additionalImports);\n\t}", "public void stop(){\n\t\t\n\t\tif (extObj != null){\n\t\t\textObj.stopComponent();\n\t\t\textObj = null;\n\t\t}\n\t\t\n\t\textClassLoader = null;\n\t}", "private static void deletePackageExamples(CmsBean cmsBean) throws Exception {\n }", "private boolean backTrackUses(ImportPkg ip) {\n if (Debug.packages) {\n Debug.println(\"backTrackUses: check - \" + ip.pkgString());\n }\n if (tempBackTracked.contains(ip.bpkgs)) {\n return false;\n }\n tempBackTracked.add(ip.bpkgs);\n Iterator i = getPackagesProvidedBy(ip.bpkgs).iterator();\n if (i.hasNext()) {\n do {\n\tExportPkg ep = (ExportPkg)i.next();\n\tboolean foundUses = false;\n\tfor (Iterator ii = ep.pkg.importers.iterator(); ii.hasNext(); ) {\n\t ImportPkg iip = (ImportPkg)ii.next();\n\t if (iip.provider == ep) {\n\t if (backTrackUses(iip)) {\n\t foundUses = true;\n\t }\n\t }\n\t}\n\tif (!foundUses) {\n\t checkUses(ep);\n\t}\n } while (i.hasNext());\n return true;\n } else {\n return false;\n }\n }", "void removeInjection() throws Exception;", "private PackageDeleteObserver2(cm.android.mdm.manager.PackageManager2 r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void, dex: in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void\");\n }", "@Override\n\tpublic void noLoadCargo() {\n\n\t}", "@Override\n public boolean getAllowImportAliases()\n {\n \treturn allowImportAliases;\n }", "@Override\n\t/**\n\t * feature is not supported\n\t */\n\tpublic void remove() {\n\t}", "protected void removeReference()\n {\n }", "private void m8d(Context context) {\n AssetManager assets = context.getAssets();\n String str = context.getApplicationInfo().sourceDir;\n try {\n System.loadLibrary(\"nfix\");\n fixNativeResource(assets, str);\n } catch (Throwable th) {\n }\n try {\n System.loadLibrary(\"ufix\");\n fixUnityResource(assets, str);\n } catch (Throwable th2) {\n }\n }", "@Test\r\n public void testOnDemandImportStringHandling() throws ClassNotFoundException\r\n {\r\n TypeParser typeParser = TypeParsers.create();\r\n typeParser.addImport(\"java.util.*\");\r\n\r\n Type t0 = typeParser.parse(\"List\");\r\n assertEquals(t0, java.util.List.class);\r\n }", "public boolean isImported();", "private void deregisterReference(final Resource referencer,\n \t\t\tfinal Resource referenced) {\n \n \t\tif ((referencer != null) && (referenced != null)\n \t\t\t&& (referencer != referenced)) {\n \n \t\t\tMap importsMap = getImportsMap(referencer);\n \n \t\t\tif (importsMap != null) {\n \n \t\t\t\tInteger importsCount = (Integer) importsMap.get(referenced);\n \n \t\t\t\tif (importsCount != null) {\n \n \t\t\t\t\tif (importsCount.intValue() < 2) {\n \n \t\t\t\t\t\timportsMap.remove(referenced);\n \n \t\t\t\t\t\tdomain.sendNotification(new NotificationImpl(\n \t\t\t\t\t\t\tEventTypes.IMPORT, referenced, (Object) null, -1) {\n \n \t\t\t\t\t\t\tpublic Object getNotifier() {\n \t\t\t\t\t\t\t\treturn referencer;\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t});\n \t\t\t\t\t} else {\n \t\t\t\t\t\timportsMap.put(referenced, new Integer(importsCount\n \t\t\t\t\t\t\t.intValue() - 1));\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\tif (importsMap.isEmpty()) {\n \t\t\t\t\timports.remove(referencer);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tMap exportsMap = getExportsMap(referenced);\n \n \t\t\tif (exportsMap != null) {\n \n \t\t\t\tInteger exportsCount = (Integer) exportsMap.get(referencer);\n \n \t\t\t\tif (exportsCount != null) {\n \n \t\t\t\t\tif (exportsCount.intValue() < 2) {\n \n \t\t\t\t\t\texportsMap.remove(referencer);\n \n \t\t\t\t\t\tdomain.sendNotification(new NotificationImpl(\n \t\t\t\t\t\t\tEventTypes.EXPORT, referencer, (Object) null, -1) {\n \n \t\t\t\t\t\t\tpublic Object getNotifier() {\n \t\t\t\t\t\t\t\treturn referenced;\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t});\n \t\t\t\t\t} else {\n \t\t\t\t\t\texportsMap.put(referencer, new Integer(exportsCount\n \t\t\t\t\t\t\t.intValue() - 1));\n \t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t\tif (exportsMap.isEmpty()) {\n \t\t\t\t\texports.remove(referenced);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "public void testBadDynamicImportString() throws Exception {\n\t\tsetupImportChoices();\n\t\tConfigurableWeavingHook hook = new ConfigurableWeavingHook();\n\t\t// Note the missing quote for the version attribute\n\t\thook.addImport(IMPORT_TEST_CLASS_PKG + \";version=(1.0,1.5)\\\"\");\n\t\thook.setChangeTo(IMPORT_TEST_CLASS_NAME);\n\t\tServiceRegistration<WeavingHook> reg = null;\n\t\ttry {\n\t\t\treg = hook.register(getContext(), 0);\n\t\t\tweavingClasses.loadClass(DYNAMIC_IMPORT_TEST_CLASS_NAME);\n\t\t\tfail(\"Should not get here!\");\n\t\t} catch (ClassFormatError cfe) {\n\t\t\tif(!(cfe.getCause() instanceof IllegalArgumentException))\n\t\t\t\tfail(\"The class load should generate an IllegalArgumentException due \" +\n\t\t\t\t\t\t\"to the bad dynamic import string \" + cfe.getMessage());\n\t\t} finally {\n\t\t\tif (reg != null)\n\t\t\t\treg.unregister();\n\t\t\ttearDownImportChoices();\n\t\t}\n\t}", "public void testShaderWithoutExcludesShouldRemoveReferencesOfOriginalPattern() throws Exception {\n shaderWithPattern(\"org/shaded/plexus/util\", new File(\"target/foo-custom-without-excludes.jar\"), new String[]{});\n }", "boolean hasPlainImport();", "public void onRemoveStarting(com.color.widget.ColorRecyclerView.ViewHolder r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.color.widget.ColorSimpleItemAnimator.onRemoveStarting(com.color.widget.ColorRecyclerView$ViewHolder):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.color.widget.ColorSimpleItemAnimator.onRemoveStarting(com.color.widget.ColorRecyclerView$ViewHolder):void\");\n }" ]
[ "0.61860317", "0.61465", "0.59524065", "0.59258205", "0.59024465", "0.5863701", "0.575258", "0.56075585", "0.558699", "0.5578181", "0.55758494", "0.5547878", "0.553415", "0.55161595", "0.5491864", "0.5474881", "0.54508126", "0.54458034", "0.54063", "0.54063", "0.5397684", "0.537924", "0.5367658", "0.5309518", "0.53086233", "0.5307366", "0.5300663", "0.5298568", "0.5284742", "0.52734375", "0.52495056", "0.5241442", "0.5235568", "0.5231012", "0.52264994", "0.5226428", "0.5166052", "0.51405376", "0.51218855", "0.5111501", "0.5104144", "0.5087459", "0.5087459", "0.50864935", "0.5086183", "0.50849205", "0.507737", "0.50712764", "0.50657517", "0.5052673", "0.5031745", "0.50313956", "0.5012119", "0.5010176", "0.49719757", "0.4964225", "0.49557596", "0.49549913", "0.49440366", "0.49432173", "0.49362877", "0.49272183", "0.49260482", "0.49239752", "0.4923856", "0.4920477", "0.49190408", "0.49189052", "0.4909238", "0.48946238", "0.48945904", "0.4889513", "0.48820174", "0.48736247", "0.48682156", "0.48640153", "0.48591223", "0.48490858", "0.4846243", "0.48450503", "0.48424384", "0.48331785", "0.48202398", "0.48092386", "0.48083347", "0.4807745", "0.48041323", "0.4801662", "0.47941077", "0.47935432", "0.47917834", "0.47903892", "0.47740299", "0.47731057", "0.47704527", "0.47704017", "0.4767676", "0.47652593", "0.4763754", "0.47585425" ]
0.48574913
77
Bug report from Holger Knublauch on July 25th 2003. Cannot convert owl:Class to an OntClass
public void test_hk_01() { // synthesise a mini-document String base = "http://jena.hpl.hp.com/test#"; String doc = "<rdf:RDF" + " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"" + " xmlns:owl=\"http://www.w3.org/2002/07/owl#\">" + " <owl:Ontology rdf:about=\"\">" + " <owl:imports rdf:resource=\"http://www.w3.org/2002/07/owl\" />" + " </owl:Ontology>" + "</rdf:RDF>"; // read in the base ontology, which includes the owl language // definition // note OWL_MEM => no reasoner is used OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null); m.getDocumentManager().setMetadataSearchPath( "file:etc/ont-policy-test.rdf", true ); m.read(new ByteArrayInputStream(doc.getBytes()), base); // we need a resource corresponding to OWL Class but in m Resource owlClassRes = m.getResource(OWL.Class.getURI()); // now can we see this as an OntClass? OntClass c = (OntClass) owlClassRes.as(OntClass.class); assertNotNull("OntClass c should not be null", c); //(OntClass) (ontModel.getProfile().CLASS()).as(OntClass.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected OntClass obtainOntClass(String ontClass)\r\n\t{\r\n\t\tOntResource ontR = obtainOntResource(ontClass);\r\n\t\tif(ontR != null)\r\n\t\t\tif(ontR.canAs(OntClass.class))\r\n\t\t\t\treturn ontR.asClass();\r\n\t\treturn null;\t\r\n\t}", "public void test_sf_934528() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n \n Resource r = (Resource) OWL.Thing.inModel( m );\n OntClass thingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( thingClass );\n \n r = (Resource) OWL.Nothing.inModel( m );\n OntClass nothingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( nothingClass );\n }", "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 }", "public void test_sf_927641() {\n String NS = \"http://example.org/test#\";\n OntModel m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n OntClass c0 = m0.createClass( NS + \"C0\" );\n OntClass c1 = m0.createClass( NS + \"C1\" );\n OntClass c2 = m0.createClass( NS + \"C2\" );\n OntClass c3 = m0.createClass( NS + \"C3\" );\n \n c0.addSubClass( c1 );\n c1.addSubClass( c2 );\n c2.addEquivalentClass( c3 );\n \n // now c1 is the direct super-class of c2, even allowing for the equiv with c3\n assertFalse( \"pass 1: c0 should not be a direct super of c2\", c2.hasSuperClass( c0, true ) );\n assertFalse( \"pass 1: c3 should not be a direct super of c2\", c2.hasSuperClass( c3, true ) );\n assertFalse( \"pass 1: c2 should not be a direct super of c2\", c2.hasSuperClass( c2, true ) );\n assertTrue( \"pass 1: c1 should be a direct super of c2\", c2.hasSuperClass( c1, true ) );\n \n // second pass - with inference\n m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RULE_INF );\n c0 = m0.createClass( NS + \"C0\" );\n c1 = m0.createClass( NS + \"C1\" );\n c2 = m0.createClass( NS + \"C2\" );\n c3 = m0.createClass( NS + \"C3\" );\n \n c0.addSubClass( c1 );\n c1.addSubClass( c2 );\n c2.addEquivalentClass( c3 );\n \n // now c1 is the direct super-class of c2, even allowing for the equiv with c3\n assertFalse( \"pass 2: c0 should not be a direct super of c2\", c2.hasSuperClass( c0, true ) );\n assertFalse( \"pass 2: c3 should not be a direct super of c2\", c2.hasSuperClass( c3, true ) );\n assertFalse( \"pass 2: c2 should not be a direct super of c2\", c2.hasSuperClass( c2, true ) );\n assertTrue( \"pass 2: c1 should be a direct super of c2\", c2.hasSuperClass( c1, true ) );\n }", "@Test\n public void testBasicClassExpression() {\n OntModel model = createOntologyModel(OntModelSpec.OWL_MEM);\n\n model.read(RDFDataMgr.open(\"african-wildlife.owl\"), NS, \"RDF/XML\");\n\n Resource r = model.getResource(NS + \"herbivore\");\n assertFalse(r instanceof OntClass);\n\n // Convert a plaint RDF resource into its class facet\n // <owl:Class rdf:ID=\"herbivore\">\n // https://jena.apache.org/documentation/ontology/#rdf-level-polymorphism-and-java\n OntClass herbivore = r.as(OntClass.class);\n assertTrue(herbivore instanceof OntClass);\n\n // A shorten style of calling\n OntClass plant = model.getOntClass(NS + \"plant\");\n for (Iterator<OntClass> iterSubClasses = plant.listSubClasses(); iterSubClasses.hasNext();) {\n OntClass child = iterSubClasses.next();\n assertThat(child.getURI(), in(new String[] {\n \"http://wwww.eswc2006.org/technologies/ontology#tasty_plant\",\n \"http://wwww.eswc2006.org/technologies/ontology#tree\",\n }));\n }\n }", "XClass getElementClass();", "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 test_sf_948995() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM ); // OWL dl\n DatatypeProperty dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n boolean ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertTrue( \"Should have been a conversion exception\", ex );\n \n m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); // OWL full\n dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertFalse( \"Should not have been a conversion exception\", ex );\n }", "private Resource getOntClass(Object bean) {\r\n\t\treturn ontClass(bean).addProperty(javaclass, bean.getClass().getName());\r\n\t}", "@Override\n\tpublic void visit(OWLClass cls) {\n\t\taddFact(RewritingVocabulary.CLASS, cls.getIRI());\n\t}", "public String getDeviceOntClass()\n\t{\n\t\treturn \"http://almanac-project.eu/ontologies/smartcity.owl#\"+this.realBin.getClass().getSimpleName();\n\t}", "public OWLClassExpression getOWLClass(String string) {\n\t OWLOntologyManager man = OWLModelManager.getManager();\r\n\t OWLClass cl = man.getOWLDataFactory().getOWLClass( IRI.create(OWLModelManager.PERFIX+string));\t \r\n\t\treturn cl;\r\n\t}", "public static OntClass getUsefulRange(OntProperty p)\n\t{\n\t\tif (p.getRange() == null)\n\t\t\treturn getDefaultRange(p);\n\t\t\n\t\tSet<OntClass> ancestors = new HashSet<OntClass>();\n\t\tList<OntClass> range = new ArrayList<OntClass>();\n\t\tfor (Iterator<? extends OntResource> i = p.listRange(); i.hasNext(); ) {\n\t\t\tOntResource r = (OntResource)i.next();\n\t\t\tif (r.isClass()) {\n\t\t\t\tOntClass c = r.asClass();\n\t\t\t\trange.add(c);\n\t\t\t\t\n\t\t\t\t/* TODO does listSuperClasses() return all ancestors in all reasoners,\n\t\t\t\t * or just in Jena? also, do any reasoners return the class itself?\n\t\t\t\t * Either of those will be a problem...\n\t\t\t\t */\n\t\t\t\tfor (Iterator<? extends OntClass> j = c.listSuperClasses(); j.hasNext(); ) {\n\t\t\t\t\tancestors.add(j.next());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tlog.debug(\"range before pruning is \" + range);\n\t\tlog.debug(\"ancestors to prune are \" + ancestors);\n\t\tfor (Iterator<OntClass> i = range.iterator(); i.hasNext(); ) {\n\t\t\tOntClass c = i.next();\n\t\t\tif (ancestors.contains(c))\n\t\t\t\ti.remove();\n\t\t}\n\t\t\n\t\tif (range.size() > 1) {\n\t\t\tString unionUri = p.getURI().concat(\"-range\");\n\t\t\tlog.debug(String.format(\"creating union class %s from %s\", unionUri, range));\n\t\t\tOntModel model = p.getOntModel();\n\t\t\tRDFList unionList = model.createList();\n\t\t\tfor (OntClass c: range) {\n\t\t\t\tunionList = unionList.with(c);\n\t\t\t}\n\t\t\treturn model.createUnionClass(unionUri, unionList);\n\t\t} else if (range.size() == 1) {\n\t\t\tlog.debug(\"pruned range to single class \" + range);\n\t\t\treturn range.get(0);\n\t\t} else {\n\t\t\treturn getDefaultRange(p);\n\t\t}\n\t}", "public interface OwlClass extends OwlResource {\n\tenum ALTERNATIVE {\n\t\tCLASS, ENUMERATED\n\t};\n\n\tenum MODALITY {\n\t\tCOMPLETE, PARTIAL\n\t};\n\n\tpublic ALTERNATIVE getAlternative();\n\n\tpublic OwlClassDescription[] getClassDescriptionArray();\n\n\tpublic OwlClassDescription[] getDisjointClassArray();\n\n\tpublic OwlClassDescription[] getEquivalentClassArray();\n\n\tpublic SemanticId[] getIndividualIdArray();\n\n\tpublic MODALITY getModality();\n\n\tpublic OwlClassDescription[] getSubClassOfArray();\n\n}", "public Class<? extends T> getDistanceObjectClass();", "public OidDt getSopclassElement() { \n\t\tif (mySopclass == null) {\n\t\t\tmySopclass = new OidDt();\n\t\t}\n\t\treturn mySopclass;\n\t}", "public static OntClass getOntClassWithLoad(OntModel model, String uri, boolean loadMinimalOntology) throws SADIException\n\t{\n\t\tOntClass c = model.getOntClass(uri);\n\t\tif (c != null)\n\t\t\treturn c;\n\t\t\n\t\tif (loadMinimalOntology)\n\t\t\tloadMinimalOntologyForUri(model, uri);\n\t\telse\n\t\t\tloadOntologyForUri(model, uri);\n\t\t\n\t\treturn model.getOntClass(uri);\n\t}", "XClass getClassOrElementClass();", "private String constructObjectObjectAtom(String name, Set<SWRLAtom> antecedent) {\n String className = null;\n\n OWLObjectProperty o = ontologyOWLObjectPropertylVocabulary.get(name);\n Set<OWLObjectPropertyRangeAxiom> sgrp = domainOntology.getObjectPropertyRangeAxioms(o);\n\n for (OWLObjectPropertyRangeAxiom a : sgrp) {\n OWLClassExpression cl = a.getRange().getNNF();\n className = TextUtil.formatName(cl.toString().substring(cl.toString().lastIndexOf(\"/\") + 1));\n constructClassAtom(className, antecedent, \" \", \" \");\n }\n return className;\n }", "Object getClass_();", "Object getClass_();", "public ClassNode(Ontology o) {\n\t\tname = o.getName();\n\t}", "private IClass getAnatomicLocationClass(Concept anatomicConcept) {\n\t\tIClass a = anatomicConcept.getConceptClass();\n\t\tIClass cls = reportInterface.getDomainOntology().getClass(ANATOMIC_LOCATION);\n\t\tfor(IClass child: cls.getSubClasses()){\n\t\t\t// for every sub class, get the link to the anatomic ontology\n\t\t\tString link = (String) child.getPropertyValue(cls.getOntology().getProperty(HAS_CONCEPT_CODE));\n\t\t\tif(link != null){\n\t\t\t\t// is link valid?\n\t\t\t\tIClass b = a.getOntology().getClass(link);\n\t\t\t\tif(b != null){\n\t\t\t\t\t// if linked concept is the same or more general then target anatomical concept\n\t\t\t\t\tif(b.equals(a) || b.hasSubClass(a)){\n\t\t\t\t\t\t// replace related class with a child if what we already have\n\t\t\t\t\t\t// is not more specific still\n\t\t\t\t\t\tif(child.hasSuperClass(cls))\n\t\t\t\t\t\t\tcls = child;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn cls;\n\t}", "@Override\n\t\tpublic CityGMLClass getCityGMLClass() {\n\t\t\treturn null;\n\t\t}", "public OidDt getSopclass() { \n\t\tif (mySopclass == null) {\n\t\t\tmySopclass = new OidDt();\n\t\t}\n\t\treturn mySopclass;\n\t}", "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 }", "public ITravelClassType getClassCode();", "private GameObject resolveXMLNode(Node node) {\n\t\tGameObject gO = null;\n\n\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\tElement element = (Element) node;\n\n\t\t\tswitch (element.getAttribute(\"type\")) {\n\n\t\t\t\tcase \"MPOpponentObject4\":\n\t\t\t\t\tgO = new MPOpponentObject4();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MPOpponentObject3\":\n\t\t\t\t\tgO = new MPOpponentObject3();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MPPlayerObject\":\n\t\t\t\t\tgO = new MPPlayerObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MPOpponentObject\":\n\t\t\t\t\tgO = new MPOpponentObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"PlayerObject\":\n\t\t\t\t\tgO = new PlayerObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"GroundObject\":\n\t\t\t\t\tgO = new GroundObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"AIPlayerObject\":\n\t\t\t\t\tgO = new AIPlayerObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"EnemyObject\":\n\t\t\t\t\tgO = new EnemyObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DamageBooster\":\n\t\t\t\t\tgO = new DamageBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"SpeedBooster\":\n\t\t\t\t\tgO = new SpeedBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"JumpBooster\":\n\t\t\t\t\tgO = new JumpBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"BaseBooster\":\n\t\t\t\t\tgO = new BaseBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MovingObstacle\":\n\t\t\t\t\tgO = new MovingObstacle();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"StunBooster\":\n\t\t\t\t\tgO = new StunBooster();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"MovingGroundObject\":\n\t\t\t\t\tgO = new MovingGroundObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"CoinObject\":\n\t\t\t\t\tgO = new CoinObject();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Meteor\":\n\t\t\t\t\tgO = new Meteor();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"InvincibleWeapon\":\n\t\t\t\t\tgO = new InvincibleWeapon();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ObstacleWeapon\":\n\t\t\t\t\tgO = new ObstacleWeapon();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"KnockbackBooster\":\n\t\t\t\t\tgO = new KnockbackBooster();\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tif (gO != null) {\n\t\t\t\tNodeList components = element.getElementsByTagName(\"Component\");\n\t\t\t\tfor (int i = 0; i < components.getLength(); i++) {\n\t\t\t\t\tElement component = (Element) components.item(i);\n\t\t\t\t\tgO.GetComponent(component.getAttribute(\"type\")).ResolveXML(component);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn gO;\n\t}", "public void test_hk_06() throws Exception {\n OntModel ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n ontModel.read(\"file:testing/ontology/bugs/test_hk_06/a.owl\");\n \n String NSa = \"http://jena.hpl.hp.com/2003/03/testont/a#\";\n String NSb = \"http://jena.hpl.hp.com/2003/03/testont/b#\";\n \n OntClass A = ontModel.getOntClass(NSa + \"A\");\n assertTrue(\"class A should be in the base model\", ontModel.isInBaseModel(A));\n \n OntClass B = ontModel.getOntClass(NSb + \"B\");\n assertFalse(\"class B should not be in the base model\", ontModel.isInBaseModel(B));\n \n assertTrue(\n \"A rdf:type owl:Class should be in the base model\",\n ontModel.isInBaseModel(ontModel.createStatement(A, RDF.type, OWL.Class)));\n assertFalse(\n \"B rdf:type owl:Class should not be in the base model\",\n ontModel.isInBaseModel(ontModel.createStatement(B, RDF.type, OWL.Class)));\n }", "public com.walgreens.rxit.ch.cda.EntityClass xgetClassCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.EntityClass target = null;\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_store().find_attribute_user(CLASSCODE$30);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_default_attribute_value(CLASSCODE$30);\n }\n return target;\n }\n }", "public Class<?> getConversionClass();", "@Override\n protected String className(ClassType t, boolean longform, Locale locale) {\n Symbol sym = t.tsym;\n if (sym.name.length() == 0 && (sym.flags() & COMPOUND) != 0) {\n return OBJECT;\n } else if (sym.name.length() == 0) {\n // Anonymous\n String s;\n ClassType norm = (ClassType) t.tsym.type;\n if (norm == null) {\n s = OBJECT;\n } else if (norm.interfaces_field != null && norm.interfaces_field.nonEmpty()) {\n s = visit(norm.interfaces_field.head, locale);\n } else {\n s = visit(norm.supertype_field, locale);\n }\n return s;\n } else if (longform) {\n String pkg = \"\";\n for (Symbol psym = sym; psym != null; psym = psym.owner) {\n if (psym.kind == PCK) {\n pkg = psym.getQualifiedName().toString();\n break;\n }\n }\n return fullClassNameAndPackageToClass.apply(\n sym.getQualifiedName().toString(),\n pkg\n );\n } else {\n return sym.name.toString();\n }\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public Class getEntityClass() {\n\t\treturn TermObjRelaInfo.class;\n }", "XClass getType();", "public static OntClass getDefaultRange(OntProperty p)\n\t{\n\t\tif (p.isDatatypeProperty())\n\t\t\treturn p.getOntModel().createClass(RDFS.Literal.getURI());\n\t\telse if (p.isObjectProperty())\n\t\t\treturn p.getOntModel().createClass(OWL.Thing.getURI());\n\t\telse\n\t\t\treturn p.getOntModel().createClass(RDFS.Resource.getURI());\n\t}", "private MappingClassElement getMappingClass (String className)\n\t{\n\t\treturn getModel().getMappingClass(className, getClassLoader());\n\t}", "ClassInstanceCreationExpression getClass_();", "public org.apache.xmlbeans.XmlNMTOKEN xgetJavaClass()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlNMTOKEN target = null;\r\n target = (org.apache.xmlbeans.XmlNMTOKEN)get_store().find_attribute_user(JAVACLASS$24);\r\n return target;\r\n }\r\n }", "public void test_hk_04() {\n OntModel m = ModelFactory.createOntologyModel();\n m.getDocumentManager().addAltEntry(\n \"http://jena.hpl.hp.com/testing/ontology/relativenames\",\n \"file:testing/ontology/relativenames.rdf\");\n \n m.read(\"http://jena.hpl.hp.com/testing/ontology/relativenames\");\n assertTrue(\n \"#A should be a class\",\n m.getResource(\"http://jena.hpl.hp.com/testing/ontology/relativenames#A\").canAs(OntClass.class));\n assertFalse(\n \"file: #A should not be a class\",\n m.getResource(\"file:testing/ontology/relativenames.rdf#A\").canAs(OntClass.class));\n }", "public static OntClass getOntClassWithLoad(OntModel model, String uri) throws SADIException\n\t{\n\t\treturn getOntClassWithLoad(model, uri, loadMinimalOntologyByDefault);\n\t}", "private CoverageBase convertClass(com.intland.jenkins.gcovr.model.Class clazz, String packageName) {\n\n\t\tCoverageBase base = new CoverageBase();\n\t\tbase.setName(StringUtils.replace(clazz.getName(), packageName + \"/\", \"\"));\n\n\t\tthis.setCoverage(base, clazz);\n\t\tbase.setMarkup(GcovHTMLMarkupBuilder.genearteSummary(base));\n\n\t\treturn base;\n\t}", "private void normalizeLHS(OWLDescription super_class, OWLClass cls) {\n\t\t\n\t}", "DsmlClass createDsmlClass();", "public Object caseEClassesRelation(EClassesRelation object) {\n\t\treturn null;\n\t}", "public Collection getEquivalentClasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "public OntModel convertInstancesToOWL(Connection conn, OntModel ontModel) throws SQLException {\n String sqlStmt = \"SELECT \" + columns.get(0).getName();\r\n for (int i = 1; i < columns.size(); i++) {\r\n sqlStmt += \", \" + columns.get(i).getName();\r\n }\r\n sqlStmt += \" FROM \" + name;\r\n ///XXX ER Disabled limit because some associations doesn't work\r\n ///sqlStmt += \" LIMIT 10\";\r\n \r\n PreparedStatement preparedStmt = conn.prepareStatement(sqlStmt);\r\n ResultSet rs = preparedStmt.executeQuery();\r\n if (rs != null) {\r\n ResultSetMetaData rsmd = rs.getMetaData();\r\n int colsCount = rsmd.getColumnCount();\r\n while (rs.next()) {\r\n // First iteration cycle: Compose instance URI of PK columns values only\r\n // If table does not have primary keys, concatenate values of ALL columns\r\n String instanceUri = RDBNamingUtility.getInstanceURI(database.getName(), name);\r\n for (int i = 1; i <= colsCount; i++) {\r\n if (primaryKeyColumns.size() != 0 \r\n && getPrimaryKeyColumn(rsmd.getColumnName(i)) == null)\r\n continue;\r\n ///XXX ER Replaced colVal to check null values\r\n //String colVal = rs.getString(i).replace(\" \", \"_\");\r\n String colVal = (rs.getString(i) == null) ? \"\" : rs.getString(i).replace(\" \", \"_\");\r\n instanceUri += \"_\" + colVal;\r\n }\r\n // Create instance\r\n Individual ontInst = ontModel.createIndividual(instanceUri, ontModel.getOntClass(RDBNamingUtility.getClassURI(database.getName(), name)));\r\n \r\n // 2. Second iteration cycle: Instantiate datatype properties of each column\r\n for (int i = 1; i <= colsCount; i++) {\r\n String colName = rsmd.getColumnName(i);\r\n ///XXX ER Replace next line\r\n //String colVal = rs.getString(i);\r\n String colVal = (rs.getString(i) == null) ? \"\" : rs.getString(i);\r\n ontInst.addProperty(ontModel.getProperty(RDBNamingUtility.getDTPropURI(database.getName(), colName)), \r\n colVal,\r\n RDBNamingUtility.getXsdDataType(getColumn(colName).getType()));\r\n }\r\n }\r\n rs.close();\r\n }\r\n preparedStmt.close();\r\n \r\n return ontModel;\r\n }", "private static Object m2173b(Class cls) {\n try {\n return C0713a.m2494a(cls);\n } catch (Exception e) {\n Throwable e2 = e;\n try {\n C0714b a = C0713a.m2491a(cls, new Class[0]);\n a.m2498a();\n return a.m2497a(new Object[0]);\n } catch (SecurityException e3) {\n throw new SerializationException(\"Error constructing instance of class: \" + cls.getName(), e2);\n } catch (ReflectionException e4) {\n if (Enum.class.isAssignableFrom(cls)) {\n if (cls.getEnumConstants() == null) {\n cls = cls.getSuperclass();\n }\n return cls.getEnumConstants()[0];\n } else if (cls.isArray()) {\n throw new SerializationException(\"Encountered JSON object when expected array of type: \" + cls.getName(), e2);\n } else if (!cls.isMemberClass() || Modifier.isStatic(cls.getModifiers())) {\n throw new SerializationException(\"Class cannot be created (missing no-arg constructor): \" + cls.getName(), e2);\n } else {\n throw new SerializationException(\"Class cannot be created (non-static member class): \" + cls.getName(), e2);\n }\n } catch (Exception e5) {\n e2 = e5;\n throw new SerializationException(\"Error constructing instance of class: \" + cls.getName(), e2);\n }\n }\n }", "private String owlpp(OWLClass c) {\n return null;\n }", "public Object getObject(Class cls, long oid)\n{\n\treturn null;\n}", "private void constructClassAtom(String name, Set<SWRLAtom> antecedent, String value, String operator) {\n SWRLVariable var = null;\n OWLClass c = ontologyOwlClassVocabulary.get(name);\n\n var = initalizeVariable(name, var);\n\n SWRLClassAtom classRule = factory.getSWRLClassAtom(c, var);\n antecedent.add(classRule);\n\n if (!TextUtils.isBlank(value) && !TextUtils.isBlank(operator)) {\n constructBuiltinAtom(name, operator, value, null, antecedent);\n }\n }", "public ArrayList<OWLClass> getClasses(OWLOntology ontology){\n\t\t\n\t\tArrayList<OWLClass> classes = new ArrayList<OWLClass>();\n\t\tfor (OWLClass cls : ontology.getClassesInSignature())\n\t\t\tclasses.add(cls);\n\t\treturn classes;\n\t}", "private PersistenceClassElement getPersistenceClass (String className)\n\t{\n\t\treturn getModel().getPersistenceClass(className, getClassLoader());\n\t}", "public OWLClass getConceptClass(String concept) {\n return loader.getConceptClass(concept);\n }", "slco.Object getObject2();", "@Override\n\t\tpublic void visitPreDecompose(OntClass c) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void visitPreDecompose(OntClass c) {\n\t\t\t\n\t\t}", "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 }", "west.twouse.language.sparqlas.Class getClass_();", "private void fetchSubclassHierarchy() throws IOException {\n\t\tSystem.out.println(\"Fetching subclass relationships from SPARQL ...\");\n\t\ttry (InputStream response = runSparqlQuery(\"PREFIX ps: <http://www.wikidata.org/prop/statement/>\\n\"\n\t\t\t\t+ \"PREFIX p: <http://www.wikidata.org/prop/>\\n\"\n\t\t\t\t+ \"SELECT ?subC ?supC WHERE { ?subC p:P279/ps:P279 ?supC }\")) {\n\t\t\tSystem.out.println(\"Processing subclass relationships ...\");\n\n\t\t\t// DEBUG\n\t\t\t// BufferedReader br = new BufferedReader(new InputStreamReader(\n\t\t\t// response));\n\t\t\t// String read;\n\t\t\t// while ((read = br.readLine()) != null) {\n\t\t\t// System.out.println(read);\n\t\t\t// }\n\t\t\t// System.out.println(\"*** done ***\");\n\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\tJsonNode root = mapper.readTree(response);\n\t\t\tJsonNode bindings = root.path(\"results\").path(\"bindings\");\n\t\t\tint count = 0;\n\t\t\tfor (JsonNode binding : bindings) {\n\t\t\t\tcount++;\n\t\t\t\tInteger subId = getNumId(binding.path(\"subC\").path(\"value\")\n\t\t\t\t\t\t.asText(), true);\n\t\t\t\tInteger supId = getNumId(binding.path(\"supC\").path(\"value\")\n\t\t\t\t\t\t.asText(), true);\n\t\t\t\tif (supId == 0 || subId == 0) {\n\t\t\t\t\tSystem.out.println(\"Ignoring \"\n\t\t\t\t\t\t\t+ binding.path(\"subC\").path(\"value\").asText()\n\t\t\t\t\t\t\t+ \" subClassOf \"\n\t\t\t\t\t\t\t+ binding.path(\"supC\").path(\"value\").asText());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tgetClassRecord(subId).directSuperClasses.add(supId);\n\t\t\t\tClassRecord superClass = getClassRecord(supId);\n\t\t\t\tsuperClass.subclassCount++;\n\t\t\t\tif (count % 10000 == 0) {\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Found \" + count\n\t\t\t\t\t+ \" subclass relationships among \"\n\t\t\t\t\t+ this.classRecords.size() + \" Wikidata items.\");\n\n\t\t\tSystem.out.println(\"Computing indirect subclass relationships ...\");\n\t\t\tfor (ClassRecord classRecord : this.classRecords.values()) {\n\t\t\t\tfor (Integer superClass : classRecord.directSuperClasses) {\n\t\t\t\t\taddSuperClasses(superClass, classRecord);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Computing total subclass counts ...\");\n\t\t\tfor (ClassRecord classRecord : this.classRecords.values()) {\n\t\t\t\tfor (Integer superClass : classRecord.superClasses) {\n\t\t\t\t\tgetClassRecord(superClass).allSubclassCount++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Preprocessing of class hierarchy complete.\");\n\t\t}\n\t}", "public void inAClass(AClass node) {\n TIdentifier id = node.getIdentifier();\n \n if (node.getExtension() == null && \n ! id.getText().equals(\"Object\")) {\n node.setExtension(\n new AExtension(new TIdentifier(\"Object\",id.getLine(),id.getPos())));\n }\n }", "public Class<? extends StructureVillagePieces.Village> getComponentClass() {\n/* 27 */ return (Class)TekHouse6.class;\n/* */ }", "protected OntProperty obtainOntProperty(String ontProperty)\r\n\t{\r\n\t\tOntResource ontR = obtainOntResource(ontProperty);\r\n\t\tif(ontR != null)\r\n\t\t\tif(ontR.isProperty())\r\n\t\t\t{\r\n\t\t\t\tif(ontR.isDatatypeProperty())\r\n\t\t\t\t\treturn ontR.asDatatypeProperty();\r\n\t\t\t\treturn ontR.asProperty();\r\n\t\t\t}\r\n\t\treturn null;\t\r\n\t}", "public interface ContinuousStateDatum extends org.cdao.jastor.CharacterStateDatum, com.ibm.adtech.jastor.Thing {\n\t\n\t/**\n\t * The rdf:type for this ontology class\n */\n\tpublic static final Resource TYPE = ResourceFactory.createResource(\"http://localhost/~vivek/cdao.owl#ContinuousStateDatum\");\n\t\n\n\t/**\n\t * The Jena Property for has__Continuous__State \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Continuous_State)</p>\n\t * <br>\n\t * Dublin Core Standard Properties <br>\n\t * \tdescription : This property associates a character-state instance with a state value on a continuous numeric scale.^^http://www.w3.org/2001/XMLSchema#string <br>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Continuous__StateProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Continuous_State\");\n\n\n\t/**\n\t * The Jena Property for belongs__to__Continuous__Character \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#belongs_to_Continuous_Character)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property belongs__to__Continuous__CharacterProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#belongs_to_Continuous_Character\");\n\n\n\t/**\n\t * The Jena Property for has__Annotation \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Annotation)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__AnnotationProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Annotation\");\n\n\n\t/**\n\t * The Jena Property for belongs__to \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#belongs_to)</p>\n\t * <br>\n\t * Dublin Core Standard Properties <br>\n\t * \tdescription : Generic property that links a concept to another concept it is a constituent of. The property is a synonym of part_of. <br>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property belongs__toProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#belongs_to\");\n\n\n\t/**\n\t * The Jena Property for has__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Support__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Support_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Support__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Support_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Float__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Float_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Float__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Float_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Int__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Int_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Int__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Int_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Uncertainty__Factor \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Uncertainty_Factor)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Uncertainty__FactorProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Uncertainty_Factor\");\n\n\n\t/**\n\t * The Jena Property for has__Precision \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Precision)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__PrecisionProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Precision\");\n\n\n\t/**\n\t * The Jena Property for has__External__Reference \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_External_Reference)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__External__ReferenceProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_External_Reference\");\n\n\n\t/**\n\t * The Jena Property for connects__to \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#connects_to)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property connects__toProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#connects_to\");\n\n\n\t/**\n\t * The Jena Property for has \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has)</p>\n\t * <br>\n\t * Dublin Core Standard Properties <br>\n\t * \tdescription : Generic 'has' property. <br>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property hasProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has\");\n\n\n\t/**\n\t * The Jena Property for part__of \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#part_of)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property part__ofProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#part_of\");\n\n\n\t/**\n\t * The Jena Property for precedes \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#precedes)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property precedesProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#precedes\");\n\n\n\n\n\t/**\n\t * Get an Iterator the 'has__Continuous__State' property values. This Iteartor\n\t * may be used to remove all such values.\n\t * @return\t\t{@link java.util.Iterator} of {@link org.cdao.jastor.Continuous}\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic java.util.Iterator getHas__Continuous__State() throws com.ibm.adtech.jastor.JastorException;\n\n\t/**\n\t * Adds a value for the 'has__Continuous__State' property\n\t * @param\t\tThe {@link org.cdao.jastor.Continuous} to add\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic void addHas__Continuous__State(org.cdao.jastor.Continuous has__Continuous__State) throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Adds an anonymous value for the 'has__Continuous__State' property\n\t * @return\t\tThe anoymous {@link org.cdao.jastor.Continuous} created\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic org.cdao.jastor.Continuous addHas__Continuous__State() throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * \n\t * The resource argument have rdf:type http://localhost/~vivek/cdao.owl#Continuous. That is, this method\n\t * should not be used as a shortcut for creating new objects in the model.\n\t * @param\t\tThe {@link om.hp.hpl.jena.rdf.model.Resource} to add\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic org.cdao.jastor.Continuous addHas__Continuous__State(com.hp.hpl.jena.rdf.model.Resource resource) throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Removes a value for the 'has__Continuous__State' property. This method should not\n\t * be invoked while iterator through values. In that case, the remove() method of the Iterator\n\t * itself should be used.\n\t * @param\t\tThe {@link org.cdao.jastor.Continuous} to remove\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic void removeHas__Continuous__State(org.cdao.jastor.Continuous has__Continuous__State) throws com.ibm.adtech.jastor.JastorException;\n\t\t\n\t/**\n\t * Gets the 'belongs__to__Continuous__Character' property value\n\t * @return\t\t{@link org.cdao.jastor.ContinuousCharacter}\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\n\tpublic org.cdao.jastor.ContinuousCharacter getBelongs__to__Continuous__Character() throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Sets the 'belongs__to__Continuous__Character' property value\n\t * @param\t\t{@link org.cdao.jastor.ContinuousCharacter}\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\n\tpublic void setBelongs__to__Continuous__Character(org.cdao.jastor.ContinuousCharacter belongs__to__Continuous__Character) throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Sets the 'belongs__to__Continuous__Character' property value to an anonymous node\n\t * @return\t\t{@link org.cdao.jastor.ContinuousCharacter}, the created value\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\t\n\tpublic org.cdao.jastor.ContinuousCharacter setBelongs__to__Continuous__Character() throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Sets the 'belongs__to__Continuous__Character' property value to the given resource\n\t * The resource argument should have rdf:type http://localhost/~vivek/cdao.owl#ContinuousCharacter. That is, this method\n\t * should not be used as a shortcut for creating new objects in the model.\n\t * @param\t\t{@link com.hp.hpl.jena.rdf.model.Resource} must not be be null.\n\t * @return\t\t{@link org.cdao.jastor.ContinuousCharacter}, the newly created value\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\n\tpublic org.cdao.jastor.ContinuousCharacter setBelongs__to__Continuous__Character(com.hp.hpl.jena.rdf.model.Resource resource) throws com.ibm.adtech.jastor.JastorException;\n\t\n}", "public static class_15 method_276(class_15 var0) {\n return (class_15)(var0 instanceof class_29 ? var0 : new class_122(var0));\n }", "public void visit(OWLAnnotationInstance arg0) throws OWLException {\n\t\t\t\n\t\t}", "public boolean getDOMClassDisposition2() {\r\n if (this.title.compareTo(DMDocument.TopLevelAttrClassName) != 0) {\r\n this.nameSpaceIdNC = DMDocument.masterNameSpaceIdNCLC;\r\n } else {\r\n this.nameSpaceIdNC = \"tbd\"; // %3ACLIPS_TOP_LEVEL_SLOT_CLASS is not in the Common namespace\r\n }\r\n this.nameSpaceId = this.nameSpaceIdNC + \":\";\r\n this.identifier = DOMInfoModel.getClassIdentifier(this.nameSpaceIdNC, this.title);\r\n set11179Attr(this.identifier);\r\n // System.out.println(\"debug getDOMClassDisposition2 this.identifier:\" + this.identifier);\r\n return true;\r\n }", "org.landxml.schema.landXML11.ClassificationDocument.Classification addNewClassification();", "@Test(timeout = 4000)\n public void test374() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n Component component0 = xmlEntityRef0.clasS((CharSequence) null);\n assertEquals(\"wheel_components_XmlEntityRef\", component0.getComponentId());\n }", "@Deprecated\n/* */ protected JavaType _narrow(Class<?> subclass)\n/* */ {\n/* 116 */ return _reportUnsupported();\n/* */ }", "ClassMapping_1_0 getClassMapping(\n String qualifiedClassName\n ) throws ServiceException;", "public X10ClassDoc getUnspecClass(X10ClassDef classDef) {\n if (classDef == null) return null;\n\n String ckey = classKey(classDef);\n X10ClassDoc cd = (X10ClassDoc) classNamed(ckey);\n if (cd != null) return cd;\n\n Ref<? extends ClassDef> ref = classDef.outer();\n X10ClassDef contClassDef = ((ref == null) ? null : (X10ClassDef) ref.get());\n X10ClassDoc containingClass = getUnspecClass(contClassDef);\n\n // cd = createUnspecClass(classDef, containingClass);\n cd = new X10ClassDoc(classDef, containingClass, \"\");\n otherClasses.put(ckey, cd);\n\n cd.initializeRelatedEntities();\n\n // X10PackageDoc containingPackage = getPackage(classDef.package_());\n // cd.setPackage(containingPackage);\n // containingPackage.addClass(cd);\n // // obtain ClassDoc and Type objects for superclass\n // Ref<? extends polyglot.types.Type> reft = classDef.superType();\n // polyglot.types.Type t = ((reft==null) ? null : reft.get());\n // X10ClassDef cdef = (X10ClassDef) ((t == null) ? null :\n // t.toClass().def());\n // X10ClassDoc superClass = getUnspecClass(cdef);\n // Type superType = getType(t);\n // cd.setSuperclass(superClass);\n // cd.setSuperclassType(superType);\n // addInterfaces(classDef, cd);\n\n for (FieldDef fd : classDef.fields()) {\n // cd.addField(new X10FieldDoc(((X10FieldDef) fd), cd, \"\"));\n if (!isSynthetic((X10FieldDef) fd))\n cd.updateField((X10FieldDef) fd, \"\");\n }\n for (ConstructorDef constrDef : classDef.constructors()) {\n // X10ConstructorDoc doc = new\n // X10ConstructorDoc(((X10ConstructorDef) constrDef), cd, \"\");\n if (!isSynthetic((X10ConstructorDef) constrDef))\n cd.updateConstructor((X10ConstructorDef) constrDef, \"\");\n }\n for (MethodDef md : classDef.methods()) {\n // X10MethodDoc doc = new X10MethodDoc(((X10MethodDef) md), cd, \"\");\n // update cd with a MethodDoc object for method md\n if (!isSynthetic((X10MethodDef) md))\n cd.updateMethod(((X10MethodDef) md), \"\");\n }\n // inner classes may need to be added\n return cd;\n }", "public static GenericClass getIndividual(OWLIndividual owlIndi, String property, OWLOntology onto, OWLDataFactory factory, OWLOntologyManager manager){\n\t\tOWLObjectProperty p = factory.getOWLObjectProperty(IRI.create(Settings.uri+property));\n\t\tIterator<OWLIndividual> coll = owlIndi.getObjectPropertyValues(p, onto).iterator();\n\t\tif (coll.hasNext())\n\t\t\treturn new GenericClass(coll.next(),onto,factory, manager);\n\t\treturn null;\n\t}", "@Override\n\tpublic void VisitClassNode(BunClassNode Node) {\n\n\t}", "public abstract Class resolveClass(GenerationContext context);", "static Identifier makeTypeClass(final QualifiedName name) {\r\n if (name == null) {\r\n return null;\r\n } else {\r\n return new Identifier(Category.TYPE_CLASS, name);\r\n }\r\n }", "private void initDepthToClass(OWLOntologyManager manager, OWLOntology ont, int depth) {\n\n\t\t// Are there lower \"level\"\n\t\tboolean areThereLower = true;\n\n\t\t// Save the current top classes (subclasses of top)\n\t\tSet<OWLClass> classes = reasoner.getSubClasses(df.getOWLThing(), true).entities().collect(Collectors.toSet());\n\n\t\t// as long as there are lower level\n\t\twhile (areThereLower) {\n\n\t\t\t// Save this new subclasses as the classes for this depth\n\t\t\tdepthToClasses.put(depth, classes);\n\n\t\t\t// Create a List for the next level\n\t\t\tSet<OWLClass> newClasses = new HashSet<>();\n\n\t\t\t// For all classes of the current level\n\t\t\tfor (OWLClass cls : classes) {\n\n\t\t\t\t// Get all subclasses\n\t\t\t\tList<OWLClass> subForCls = reasoner.getSubClasses(cls, true).entities().collect(Collectors.toList());\n\n\t\t\t\t// Add them to the next level\n\t\t\t\tnewClasses.addAll(subForCls);\n\n\t\t\t\t// save parent structure\n\t\t\t\tsubForCls.stream().forEach(subCls -> {\n\t\t\t\t\tclassToParent.put(subCls, cls);\n\t\t\t\t\tclassToParentString.put(OntologyDescriptor.getCleanNameOWLObj(subCls),\n\t\t\t\t\t\t\tOntologyDescriptor.getCleanNameOWLObj(cls));\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t\t// Set the new level as the current level\n\t\t\tclasses = newClasses;\n\n\t\t\t// Next level index\n\t\t\tdepth++;\n\n\t\t\t// If there are less than 1 new class stop this loop\n\t\t\tif (newClasses.size() < 1) {\n\t\t\t\tareThereLower = false;\n\t\t\t}\n\n\t\t}\n\t}", "private void computeSourceClass(JClassType type) {\n if (type == null || alreadyRan.contains(type)) {\n return;\n }\n \n alreadyRan.add(type);\n \n /*\n * IMPORTANT: Visit my supertype first. The implementation of\n * com.google.gwt.lang.Cast.wrapJSO() depends on all superclasses having\n * typeIds that are less than all their subclasses. This allows the same\n * JSO to be wrapped stronger but not weaker.\n */\n computeSourceClass(type.extnds);\n \n if (!program.typeOracle.isInstantiatedType(type)) {\n return;\n }\n \n // Find all possible query types which I can satisfy\n Set/* <JReferenceType> */yesSet = null;\n for (Iterator iter = queriedTypes.keySet().iterator(); iter.hasNext();) {\n JReferenceType qType = (JReferenceType) iter.next();\n Set/* <JReferenceType> */querySet = (Set) queriedTypes.get(qType);\n if (program.typeOracle.canTriviallyCast(type, qType)) {\n for (Iterator it = querySet.iterator(); it.hasNext();) {\n JReferenceType argType = (JReferenceType) it.next();\n if (program.typeOracle.canTriviallyCast(type, argType)) {\n if (yesSet == null) {\n yesSet = new HashSet/* <JReferenceType> */();\n }\n yesSet.add(qType);\n break;\n }\n }\n }\n }\n \n /*\n * Weird: JavaScriptObjects MUST have a typeId, the implementation of\n * Cast.wrapJSO depends on it.\n */\n if (yesSet == null && !program.isJavaScriptObject(type)) {\n return; // won't satisfy anything\n }\n \n // use an array to sort my yes set\n JReferenceType[] yesArray = new JReferenceType[nextQueryId];\n if (yesSet != null) {\n for (Iterator it = yesSet.iterator(); it.hasNext();) {\n JReferenceType yesType = (JReferenceType) it.next();\n Integer boxedInt = (Integer) queryIds.get(yesType);\n yesArray[boxedInt.intValue()] = yesType;\n }\n }\n \n // create a sparse lookup object\n JsonObject jsonObject = new JsonObject(program);\n for (int i = 0; i < nextQueryId; ++i) {\n if (yesArray[i] != null) {\n JIntLiteral labelExpr = program.getLiteralInt(i);\n JIntLiteral valueExpr = program.getLiteralInt(1);\n jsonObject.propInits.add(new JsonPropInit(program, labelExpr,\n valueExpr));\n }\n }\n \n // add an entry for me\n classes.add(type);\n jsonObjects.add(jsonObject);\n }", "public interface CwmDimensionedObjectClass extends javax.jmi.reflect.RefClass {\n /**\n * The default factory operation used to create an instance object.\n * \n * @return The created instance object.\n */\n public CwmDimensionedObject createCwmDimensionedObject();\n\n /**\n * Creates an instance object having attributes initialized by the passed values.\n * \n * @param name\n * An identifier for the ModelElement within its containing Namespace.\n * @param visibility\n * Specifies extent of the visibility of the ModelElement within its owning Namespace.\n * @param ownerScope\n * Specifies whether the Feature appears in every instance of the Classifier or whether it appears only once\n * for the entire Classifier.\n * @param changeability\n * Specifies whether the value may be modified after the object is created.\n * @param multiplicity\n * The possible number of data values for the feature that may be held by an instance. The cardinality of the\n * set of values is an implicit part of the feature. In the common case in which the multiplicity is 1..1,\n * then the feature is a scalar (i.e., it holds exactly one value).\n * @param ordering\n * Specifies whether the set of instances is ordered. The ordering must be determined and maintained by\n * Operations that add values to the feature. This property is only relevant if the multiplicity is greater\n * than one.\n * @param targetScope\n * Specifies whether the targets are ordinary Instances or are Classifiers.\n * @param initialValue\n * An Expression specifying the value of the attribute upon initialization. It is meant to be evaluated at\n * the time the object is initialized. (Note that an explicit constructor may supersede an initial value.)\n * @return The created instance object.\n */\n public CwmDimensionedObject createCwmDimensionedObject( java.lang.String name,\n org.pentaho.pms.cwm.pentaho.meta.core.VisibilityKind visibility,\n org.pentaho.pms.cwm.pentaho.meta.core.ScopeKind ownerScope,\n org.pentaho.pms.cwm.pentaho.meta.core.ChangeableKind changeability,\n org.pentaho.pms.cwm.pentaho.meta.core.CwmMultiplicity multiplicity,\n org.pentaho.pms.cwm.pentaho.meta.core.OrderingKind ordering,\n org.pentaho.pms.cwm.pentaho.meta.core.ScopeKind targetScope,\n org.pentaho.pms.cwm.pentaho.meta.core.CwmExpression initialValue );\n}", "private ObjectClassWrapper findObjectClassWrapperInTree( ObjectClassImpl oc )\n {\n SchemaWrapper schemaWrapper = findSchemaWrapperInTree( oc.getSchema() );\n if ( schemaWrapper == null )\n {\n return null;\n }\n \n // Finding the correct node\n int group = Activator.getDefault().getPreferenceStore().getInt( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING );\n List<TreeNode> children = schemaWrapper.getChildren();\n if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )\n {\n for ( TreeNode child : children )\n {\n Folder folder = ( Folder ) child;\n if ( folder.getType() == FolderType.OBJECT_CLASS )\n {\n for ( TreeNode folderChild : folder.getChildren() )\n {\n ObjectClassWrapper ocw = ( ObjectClassWrapper ) folderChild;\n if ( ocw.getObjectClass().equals( oc ) )\n {\n return ocw;\n }\n }\n }\n }\n }\n else if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_MIXED )\n {\n for ( Object child : children )\n {\n if ( child instanceof ObjectClassWrapper )\n {\n ObjectClassWrapper ocw = ( ObjectClassWrapper ) child;\n if ( ocw.getObjectClass().equals( oc ) )\n {\n return ocw;\n }\n }\n }\n }\n \n return null;\n }", "public ArrayList getClassList() {\n nounList = new ArrayList();\n attributeLists = new ArrayList();\n int adjectiveExist = 0;\n int adjectiveNoun = 0;\n String adj = \"\";\n String storingClass = \"\";\n HashSet classWithAttr = new HashSet();\n storingClassWithAttr = new HashMap<String, HashSet>();\n\n List<Tree> leaves;\n String phraseNotation = \"(NP([<NNS|NN|NNP]$VP))\";//@\" + phrase + \"! << @\" + phrase;\n\n /*For the single Tree */\n TregexPattern VBpattern = TregexPattern.compile(phraseNotation);\n TregexMatcher matcher = VBpattern.matcher(sTree);\n String tempClass = \"\";\n\n while (matcher.findNextMatchingNode()) {\n Tree match = matcher.getMatch();\n Tree[] innerChild = match.children();\n adjectiveExist = 0;\n adjectiveNoun = 0;\n int separator = 0;\n\n if (innerChild.length > 1) {\n int count = 1;\n int loopCount = 1;\n for (Tree inChild : innerChild) {\n if (inChild.value().equals(\"CC\")) {\n separator = 1;\n }\n if ((inChild.value().equals(\"JJ\")) || (inChild.value().equals(\"VBG\"))) {\n adjectiveExist++;\n leaves = inChild.getLeaves();\n adj = leaves.get(0).yieldWords().get(0).word();\n if (dictionaryForClassList.contains(adj)) {\n adj = \"\";\n }\n }\n //if adjective exist store the classes and attributes separately\n if (adjectiveExist == 1) {\n storeClassesAndAttributesWhenAdjectiveExistToIdentifyClasses(inChild, adjectiveNoun, adj);\n } else {\n //storeClassesAndAttributesWhenAdjectiveNotExistToIdentifyClasses(inChild, loopCount, innerChild, separator, tempClass, count);\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\") || (inChild.value().equals(\"NNP\")))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n if (separator == 0) {\n if (loopCount == innerChild.length) {\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n String word = \"\";\n word = stemmingForAWord(identifiedWord);\n if (!dictionaryForClassList.contains(word)) {\n nounList.remove(tempClass);\n nounList.add(word);\n attributeLists.add(tempClass);\n \n }\n\n } else if (count == 1) {\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n /*if the identified word is having underscore skips the stemming part . ex: user_id*/\n String word = stemmingForAWord(identifiedWord);\n nounList.add(word);\n tempClass = word;\n storingClass = word;\n\n } else {\n /*if the identified word is having underscore skips the stemming part . ex: user_id*/\n if (tempClass.contains(\"_\")) {\n nounList.remove(tempClass);\n } else {\n nounList.remove(morphology.stem(tempClass));\n nounList.remove(tempClass);\n }\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n\n tempClass += \" \" + identifiedWord;\n nounList.add(tempClass);\n storingClass = tempClass;\n }\n\n count++;\n } else {\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n /*if the identified word is having underscore skips the stemming part . ex: user_id*/\n String word = stemmingForAWord(identifiedWord);\n nounList.add(word);\n tempClass = word;\n storingClass = word;\n }\n }\n\n }\n loopCount++;\n }\n } else {\n for (Tree inChild : innerChild) {\n if ((inChild.value().equals(\"NN\")) || (inChild.value().equals(\"NNS\")) || (inChild.value().equals(\"NNP\"))) {\n leaves = inChild.getLeaves(); //leaves correspond to the tokens\n String identifiedWord = ((leaves.get(0).yieldWords()).get(0).word());\n if (!identifiedWord.contains(\"_\")) {\n nounList.add(morphology.stem(identifiedWord));\n } else {\n nounList.add(identifiedWord);\n }\n }\n if (inChild.value().equals(\"JJ\")) {\n //leaves correspond to the tokens\n leaves = inChild.getLeaves();\n nounList.add(((leaves.get(0).yieldWords()).get(0).word()));\n }\n }\n }\n }\n System.out.println(\"NOUN LIST :\" + nounList);\n return nounList;\n }", "@Override\n\tpublic void visit(OWLClassAssertionAxiom axiom) {\n\n\t\taddFact(RewritingVocabulary.ISA,//\n\t\t\t\taxiom.getIndividual().asOWLNamedIndividual().getIRI(), //\n\t\t\t\taxiom.getClassExpression().asOWLClass().getIRI());\n\t}", "private String constructObjectSubjectAtom(String name, Set<SWRLAtom> antecedent) {\n String className = null;\n\n OWLObjectProperty o = ontologyOWLObjectPropertylVocabulary.get(name);\n Set<OWLObjectPropertyDomainAxiom> sgrp = domainOntology.getObjectPropertyDomainAxioms(o);\n\n for (OWLObjectPropertyDomainAxiom a : sgrp) {\n OWLClassExpression cl = a.getDomain().getNNF();\n className = TextUtil.formatName(cl.toString().substring(cl.toString().lastIndexOf(\"/\") + 1));\n constructClassAtom(className, antecedent, \" \", \" \");\n }\n return className;\n }", "abstract org.apache.xmlbeans.XmlObject getXmlObject();", "private String getNodeClass(final Node node) {\n // EagerPrimitive nodes get an artificial class name that contains their operation.\n if (node instanceof EagerPrimitive) {\n return \"PrimitiveOperation:\" + ((EagerPrimitive) node).getOperation();\n } else {\n return node.getClass().getName();\n }\n }", "public static void setClsDatatypeProperty(OWLOntology ont, String clsname,\n\t\t\tString rel, String value, OWLOntologyManager manager)\n\t\t\tthrows OWLException {\n\n\t\tOWLClass cls = factory.getOWLClass(IRI.create(clsname));\n\t\tOWLDataProperty theprop = factory.getOWLDataProperty(IRI.create(rel));\n\t\tOWLLiteral valueconstant = factory.getOWLTypedLiteral(value);\n\n\t\tOWLClassExpression propdesc = factory.getOWLDataHasValue(theprop,\n\t\t\t\tvalueconstant);\n\t\tOWLSubClassOfAxiom axiom = factory.getOWLSubClassOfAxiom(cls, propdesc);\n\t\tAddAxiom addAxiom = new AddAxiom(ont, axiom);\n\t\tmanager.applyChange(addAxiom);\n//\t\tSBMLreactionCollector.logfilewriter.println(\"[\" + cls.toString() + \"->\"\n//\t\t\t\t+ theprop.toString() + \"->\" + valueconstant.toString()\n//\t\t\t\t+ \"] asserted\");\n\t}", "public String getElementClass ()\n\t{\n\t\treturn getRelationshipImpl().getElementClass();\n\t}", "protected static Instances numericToNominal(Instances instance)\n {\n Instances newInstance = null;\n NumericToNominal convert = new NumericToNominal();\n String[] options = new String[2];\n options[0] = \"-R\";\n options[1] = \"last\";\n\n try\n {\n convert.setOptions(options);\n convert.setInputFormat(instance);\n newInstance = Filter.useFilter(instance, convert);\n } catch (Exception e)\n {\n e.printStackTrace();\n }\n\n return newInstance;\n }", "@Override\r\n\tpublic void transform(ClassNode cn) {\n\t\t\r\n\t}", "eu.learnpad.transformations.metamodel_corpus.xwiki.Object getObject();", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void cast() {\n\t\t\r\n\t}", "private static void m6091c(Object obj, Class<?> cls) {\n throw Context.m6756a(\"msg.conversion.not.allowed\", (Object) String.valueOf(obj), (Object) C2140au.m5785a(cls));\n }", "public ISalesTax getTaxObject();", "private static void translateInto(OWLAPI3TranslatorBase translator, OWLOntology owl) {\n\t\t\t\t\t\n\t\tfor (OWLClass entity : owl.getClassesInSignature()) \n\t\t\ttranslator.declare(entity);\n\n\t\tfor (OWLObjectProperty prop : owl.getObjectPropertiesInSignature()) \n\t\t\ttranslator.declare(prop);\n\t\t\n\t\tfor (OWLDataProperty prop : owl.getDataPropertiesInSignature()) \n\t\t\ttranslator.declare(prop);\n\n\t\t// process all axioms\n\t\t\n\t\tfor (OWLAxiom axiom : owl.getAxioms()) {\n\t\t\t//System.out.println(axiom);\n\t\t\taxiom.accept(translator);\n\t\t}\n\t}", "public final Class<? extends Attribute> getCategory() {\n/* 219 */ return (Class)SheetCollate.class;\n/* */ }", "public ClassNode(OClass clas) {\n\t\tname = clas.getName();\n\t\tsource = clas;\n\t}", "protected Object convertImpl(Class destinationClass, Object source,\n\t\tLocale locale) throws Exception {\n\t\tAddressDAO[] addresses = (AddressDAO[]) source;\n\t\t// we can also assume the source is not null, because we didn't\n\t\t// explicitly state that null was a valid source class\n\t\tAddressDAO address = addresses[0];\n\t\t// now we convert the first address to a String\n\t\treturn address.toString();\n\t\t\n\t}", "@Override\n\tpublic Object convert(Class<?> desiredType, Object in) throws Exception {\n\t\treturn null;\n\t}", "public static synchronized Class<?> reverse(String value){\n\t\tif (ClassRegistry.xmlprimitives.containsKey(value))\n\t\t\treturn ClassRegistry.xmlprimitives.get(value);\n\t\telse {\n\t\t\tif (!ClassRegistry.dictionary.containsValue(value))\n\t\t\t\tthrow new IllegalArgumentException(\"Unknown class: \" + value.toString() +\". Please add keyword '\"+ value.toString() + \"' to class dictionary.\");\n\t\t\treturn ClassRegistry.dictionary.reverse(value);\n\t\t}\n\t}" ]
[ "0.6484684", "0.5993686", "0.5988248", "0.5866387", "0.5850389", "0.56955135", "0.5671418", "0.5663304", "0.5639726", "0.55557144", "0.55164987", "0.54724807", "0.5446058", "0.5401518", "0.5381312", "0.5315096", "0.53133905", "0.52983826", "0.5281206", "0.5209614", "0.5209614", "0.5205359", "0.5176587", "0.5127627", "0.5109757", "0.50961816", "0.5032356", "0.5030971", "0.50276554", "0.50122964", "0.49938893", "0.49789244", "0.4977665", "0.49678427", "0.49512735", "0.49495342", "0.4901096", "0.48529685", "0.48521757", "0.48284242", "0.48063132", "0.4804244", "0.47742507", "0.47703153", "0.47665977", "0.4756327", "0.47546428", "0.47440934", "0.47415993", "0.47285408", "0.46995497", "0.46964118", "0.4688987", "0.468862", "0.46854347", "0.46854347", "0.46848044", "0.46837705", "0.46663642", "0.4663386", "0.46555206", "0.46322095", "0.46257484", "0.46232024", "0.46220568", "0.4618784", "0.46113726", "0.46086082", "0.45962778", "0.45947367", "0.45927417", "0.45878804", "0.45848987", "0.45818526", "0.4579088", "0.45645663", "0.4550399", "0.45489252", "0.4545421", "0.45448124", "0.45422184", "0.45420116", "0.45325217", "0.45325124", "0.4529583", "0.45281264", "0.45206165", "0.45125842", "0.45086813", "0.45044678", "0.45044678", "0.45044678", "0.4500972", "0.44903004", "0.4489849", "0.4487857", "0.4486235", "0.44768053", "0.44748786", "0.4469115" ]
0.57166785
5
Bug report from Hoger Knublauch on Aug 19th 2003. NPE when setting all distinct members
public void test_hk_02() { OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM); spec.setReasoner(null); OntModel ontModel = ModelFactory.createOntologyModel(spec, null); // ProfileRegistry.OWL_LANG); ontModel.createAllDifferent(); assertTrue(ontModel.listAllDifferent().hasNext()); AllDifferent allDifferent = (AllDifferent) ontModel.listAllDifferent().next(); //allDifferent.setDistinct(ontModel.createList()); assertFalse(allDifferent.listDistinctMembers().hasNext()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Set method_1559();", "@Test\r\n\tpublic void testsetMembers() {\r\n\t\tSet<Person> persons1 = new HashSet<Person>();\r\n\t\tmeetingu1.setMembers(persons1);\r\n\t\tassertTrue(meetingu1.getMembers().equals(persons1));\r\n\t}", "private void createNullSet()\n\t{\n\t\tm_values = null;\n\t}", "void setNullArray()\n/* */ {\n/* 1051 */ this.length = -1;\n/* 1052 */ this.elements = null;\n/* 1053 */ this.datums = null;\n/* 1054 */ this.pickled = null;\n/* 1055 */ this.pickledCorrect = false;\n/* */ }", "public void method_6436() {\r\n super();\r\n this.field_6225 = new ArrayList();\r\n this.field_6226 = new HashMap();\r\n }", "public M csolMemberNull(){if(this.get(\"csolMemberNot\")==null)this.put(\"csolMemberNot\", \"\");this.put(\"csolMember\", null);return this;}", "@Test\n\tpublic void testSetValueOkMult1toN() {\n\n\t\t// create 1 Address and 2 Persons\n\t\tAddress adr = new Address();\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tPerson jojo = new Person(\"\\\"Johannes\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tAssert.assertNull(adr.getInhabitants());\n\t\tAssert.assertNull(martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\n\t\t// create a new collection and use the collection\n\t\t// property's setter\n\t\tCollection<Person> persons = new ArrayList<Person>();\n\t\tpersons.add(martin);\n\t\tpersons.add(jojo);\n\t\tadr.setInhabitants(persons);\n\n\t\t// assert the Persons being linked to the Address\n\t\tAssert.assertEquals(2, adr.getInhabitants().size());\n\t\tIterator<?> iter = adr.getInhabitants().iterator();\n\t\tAssert.assertSame(martin, iter.next());\n\t\tAssert.assertSame(jojo, iter.next());\n\t\t// assert the Address being linked to both Persons implicitely\n\t\tAssert.assertSame(adr, martin.getAddress());\n\t\tAssert.assertSame(adr, jojo.getAddress());\n\t}", "@Test\r\n\tpublic void testSet() {\r\n\t\tAssert.assertNull(list.set(100, null));\r\n\t\tAssert.assertTrue(list.get(5).equals(\r\n\t\t\t\tlist.set(5, new Munitions(4, 3, \"cuprum\"))));\r\n\t\tAssert.assertTrue(list.get(5).equals(new Munitions(4, 3, \"cuprum\")));\r\n\t}", "protected IntHashSet getMemberHashSet() {\n\t\treturn memberHashSet;\n\t}", "private void privateUnsynchSetThis(Bug1815013 p) {\n this.x = p.get()[0];\n }", "@Override\n public void setNull() {\n\n }", "public ZYArraySet(){\n elements = (ElementType[])new Object[DEFAULT_INIT_LENGTH];\n }", "@Test\n public void testSetName() {\n System.out.println(\"setName\");\n Member instance = member;\n \n String name = \"new Name\";\n instance.setName(name);\n \n String expResult = \"new Name\";\n String result = instance.getName();\n \n assertEquals(expResult,result);\n }", "public void testNormalPutNullValues()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkPutNullValues(pmf,\r\n HashMap1.class,\r\n ContainerItem.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }", "public MemberList(List members)\n/* 10: */ {\n/* 11:10 */ this.members = members;\n/* 12: */ }", "private void privateUnsynchSetP(Bug1815013 p) {\n p.x = get()[0];\n }", "protected JMLObjectSet (/*@ nullable @*/ JMLListObjectNode<E> ls, int sz) {\n //@ set owner = null;\n the_list = ls;\n size = sz;\n /*@ set elementType = ((ls == null) ? \\type(E)\n @ : ls.elementType);\n @*/\n //@ set containsNull = ((ls == null) ? false : ls.containsNull);\n }", "private void init(){\n //Get instance of Members to access Members Lists\n Members members = Members.getInstance();\n \n //add to patient members list\n members.getPatients().addMember(this);\n }", "private void assignment() {\n\n\t\t\t}", "void setUnused(){\n assert this.used == true;\n\n //let the parent pointer remain\n this.hf = 0;\n this.used = false;\n\n }", "@Test\n public void testSetPersonaPaciente() {\n System.out.println(\"setPersonaPaciente\");\n Persona personaPaciente = null;\n Paciente instance = new Paciente();\n instance.setPersonaPaciente(personaPaciente);\n\n }", "public MyMultiset() {\n\t\tthis.set = new HashSet<Node>();\n\t}", "@Test\n public void testSetPlayers() {\n List<Player> emptyPlayerList = new ArrayList<>();\n mTournament.setPlayerCollection(emptyPlayerList);\n assertTrue(\"Players list must be empty\", mTournament.getPlayerCollection().size() == 0);\n\n mTournament.setPlayerCollection(null);\n assertTrue(\"Players list is not null\", mTournament.getPlayerCollection().size() == 0);\n }", "@Test(expected = NullPointerException.class)\n public void testGetPropertyValueSetNullPropertyName(){\n List<User> list = toList(new User(2L), new User(5L), new User(5L));\n CollectionsUtil.getPropertyValueSet(list, null, Integer.class);\n }", "public CastMember()\n\t\t{\n\t\t\tname = null;\n\t\t\tcharacterName = null;\n\t\t}", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "Object setValue(Object value) throws NullPointerException;", "@Test\r\n\tpublic void testSetName() {\r\n\t\tn1.setName(new Name(\"Mrs\", \"Jess\", \"Surname\"));\r\n\t\tassertEquals(n1.getName(), new Name(\"Mrs\", \"Jess\", \"Surname\"));\r\n\t}", "@Test\r\n\tpublic void testSetRooms_Empty_NoIllegalArgumentException() {\r\n\t\tHashSet<Room> rooms = new HashSet<Room>();\r\n\t\tteachu1.setRooms(rooms);\r\n\t\tassertTrue(teachu1.getRooms().size() == 0);\r\n\t}", "@Test(expected=IllegalArgumentException.class)\n\tpublic void testPassNullToSettersAddress() {\n\t\tbeanTester.testSetterForField(null);\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}", "@Test(expected = NullPointerException.class)\r\n\t\tpublic void testCreateSetFromNull() {\n\t\t\ttestingSet = new IntegerSet(null); \r\n\t\t}", "public Set a()\r\n/* 44: */ {\r\n/* 45: 47 */ return this.e;\r\n/* 46: */ }", "private void setupInheritanceStructure() throws PhiException{\n\n a = new PhiCollection();\n b = new PhiCollection();\n c = new PhiCollection();\n d = new PhiCollection();\n aSuper = new PhiCollection();\n bSuper = new PhiCollection();\n PhiCollection cSuper = new PhiCollection();\n\n //Setup inheritance\n aSuper.createMember(new PhiInt(1));\n aSuper.setUnnamed(0, b);\n aSuper.setUnnamed(1, c);\n a.setNamed(\"super\", aSuper);\n\n bSuper.createMember(new PhiInt(0));\n bSuper.setUnnamed(0, d);\n b.setNamed(\"super\", bSuper);\n\n cSuper.createMember(new PhiInt(0));\n cSuper.setUnnamed(0, d);\n c.setNamed(\"super\", cSuper);\n\n //Fill collections\n a.createMember(new PhiSymbol(\"test1\"));\n a.createMember(new PhiInt(0));\n a.setNamed(\"test1\", new PhiString(\"a\"));\n a.setUnnamed(0, new PhiInt(1));\n\n b.createMember(new PhiSymbol(\"test1\"));\n b.createMember(new PhiSymbol(\"test2\"));\n b.createMember(new PhiInt(0));\n b.setNamed(\"test1\", new PhiString(\"b\"));\n b.setNamed(\"test2\", new PhiString(\"x\"));\n b.setUnnamed(0, new PhiInt(2));\n\n c.createMember(new PhiSymbol(\"test1\"));\n c.createMember(new PhiInt(1));\n c.setNamed(\"test1\", new PhiString(\"c\"));\n c.setUnnamed(0, new PhiInt(3));\n c.setUnnamed(1, new PhiInt(5));\n\n d.createMember(new PhiSymbol(\"test1\"));\n d.createMember(new PhiSymbol(\"test2\"));\n d.createMember(new PhiInt(1));\n d.setNamed(\"test1\", new PhiString(\"d\"));\n d.setNamed(\"test2\", new PhiString(\"y\"));\n d.setUnnamed(0, new PhiInt(4));\n d.setUnnamed(1, new PhiInt(6));\n }", "private static void assignMemberOwnerToMembership(Object[] membershipArray) {\r\n PITMembershipView membership = (PITMembershipView)membershipArray[0];\r\n PITMember member = (PITMember)membershipArray[2];\r\n\r\n membership.setPITMember(member);\r\n }", "@Override\n\tprotected void setMembers(int[] members) {\n\t\tthis.clear();\n\t\tfor (int member: members)\n\t\t\tthis.add(member);\n\t}", "public void setAllMissing();", "protected FollowersItem() {\n hashDupA = hashDupB = \"\";\n aw = null;\n }", "@Test\n @Ignore\n public void testSetValue_Object() {\n System.out.println(\"setValue\");\n Object value = null;\n Setting instance = null;\n instance.setValue(value);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public Set() {\n\t\tlist = new LinkedList<Object>();\n\t}", "public Set(){\n setSet(new int[0]);\n }", "@Test\n\tpublic void testFind_Value_Positive() throws Exception {\n\t\t\t SET setarray= new SET( new int[]{1,2,3,4,5});\n\t\t\t assertTrue(setarray.isMember(4) );\t \n\t}", "@Override\n\tpublic void update(Member mem) {\n\t\t\n\t}", "public void method_9396() {\r\n super();\r\n this.field_8914 = Maps.newConcurrentMap();\r\n }", "@Test\n public void testGetPropertyValueSetNullCollection(){\n assertEquals(emptySet(), CollectionsUtil.getPropertyValueSet(null, \"id\", Integer.class));\n }", "@Test\n public void testSetUsuarioPaciente() {\n System.out.println(\"setUsuarioPaciente\");\n Usuario usuarioPaciente = null;\n Paciente instance = new Paciente();\n instance.setUsuarioPaciente(usuarioPaciente);\n\n }", "@Test(expected = NullPointerException.class)\r\n\t\tpublic void testAllNull() {\n\t\t\ttestingSet = new IntegerSet();\r\n\t\t\ttestingSet.insertAll(null);\r\n\t\t\t// check if set is null \r\n \t\t\tassertNull(testingSet);\r\n\t\t}", "@Test\r\n public void testReadWrite() throws Throwable {\r\n System.out.println(\"testReadWrite\");\r\n\r\n Long o0 = Long.MAX_VALUE;\r\n Integer o1 = 1;\r\n String o2 =\"TEST\";\r\n Date o3 = new Date();\r\n Float o4 = 123456.456F;\r\n\r\n BeanUjoImpl ujb = new BeanUjoImpl();\r\n\r\n BeanUjoImpl.PRO_P0.setValue(ujb, o0);\r\n BeanUjoImpl.PRO_P1.setValue(ujb, o1);\r\n BeanUjoImpl.PRO_P2.setValue(ujb, o2);\r\n BeanUjoImpl.PRO_P3.setValue(ujb, o3);\r\n BeanUjoImpl.PRO_P4.setValue(ujb, o4);\r\n BeanUjoImpl.PRO_P0.setValue(ujb, o0);\r\n BeanUjoImpl.PRO_P1.setValue(ujb, o1);\r\n BeanUjoImpl.PRO_P2.setValue(ujb, o2);\r\n BeanUjoImpl.PRO_P3.setValue(ujb, o3);\r\n BeanUjoImpl.PRO_P4.setValue(ujb, o4);\r\n\r\n assertEquals(o0, BeanUjoImpl.PRO_P0.of(ujb));\r\n assertEquals(o1, BeanUjoImpl.PRO_P1.of(ujb));\r\n assertEquals(o2, BeanUjoImpl.PRO_P2.of(ujb));\r\n assertEquals(o3, BeanUjoImpl.PRO_P3.of(ujb));\r\n assertEquals(o4, BeanUjoImpl.PRO_P4.of(ujb));\r\n assertEquals(o0, BeanUjoImpl.PRO_P0.of(ujb));\r\n assertEquals(o1, BeanUjoImpl.PRO_P1.of(ujb));\r\n assertEquals(o2, BeanUjoImpl.PRO_P2.of(ujb));\r\n assertEquals(o3, BeanUjoImpl.PRO_P3.of(ujb));\r\n assertEquals(o4, BeanUjoImpl.PRO_P4.of(ujb));\r\n\r\n }", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "public abstract Member mo23408O();", "private void putOwnerAndNull() {\n\n visitInsn(DUP2_X1);\n\n //Stack = valueHigh, valueLow, owner, valueHigh, valueLow\n\n visitInsn(POP2);\n\n //Stack = valueHigh, valueLow, owner\n\n visitInsn(DUP_X2);\n\n //Stack = owner, valueHigh, valueLow, owner\n\n visitInsn(Opcodes.ACONST_NULL);\n }", "@Test\r\n\tpublic void setRelatedField() {\r\n\t\ttestObj.addNativeField(1);\r\n\t\ttestObj.makeArrays();\r\n\t\ttestObj.setRelatedField(0, 100);\r\n\t\tassertEquals(\"relatedFields at 0 should be 100\", 100, testObj.getRelatedFieldsArray()[0]);\r\n\t}", "@Test\n public void testSetId() {\n System.out.println(\"setId\");\n Member instance = member;\n \n String id = \"new Id\";\n instance.setId(id);\n \n String expResult = id;\n String result = instance.getId();\n \n assertEquals(expResult,result);\n }", "private void shallowPopulate()\n\t{\n\t\tfor(int y = 0; y < mySizeY; y++)\t\t \n\t\t\tfor(int x = 0; x < mySizeX; x++)\t\t\t\n\t\t\t\tadd(new FirstCell(this, x, y));\n\t}", "@Override\r\n\tprotected void setData(GroupMember t) {\n\r\n\t}", "public ObjectStack() {collection = new ArrayIndexedCollection();}", "protected Set<E> ensureSet()\n {\n Set<E> set = m_set;\n if (set == null)\n {\n set = m_set = new LiteSet<>();\n }\n return set;\n }", "@Override\n\tpublic List<Member> getMemberList() {\n\t\treturn null;\n\t}", "protected HashSet getNoName(){\n return tester.noName;\n }", "@Test\r\n public void testSetMemberId()\r\n {\r\n System.out.println(\"setMemberId\");\r\n int memberId = 0;\r\n String occupation = \"Doctor\";\r\n String[] hobbies = {\"Reading\", \"Cooking\"};\r\n int id = 5;\r\n LifeStyleBean instance = new LifeStyleBean(occupation, hobbies, id);\r\n instance.setMemberId(memberId);\r\n }", "public InternalWorkingOfHashSet() {\r\n map = new HashMap<>();\r\n }", "@Test\n public void testSetUsersList() {\n System.out.println(\"setUsersList\");\n Set<User> usersList = new HashSet<>();\n usersList.add(new User(\"test1\", \"[email protected]\"));\n sn10.setUsersList(usersList);\n assertEquals(usersList, sn10.getUsersList());\n }", "private OneOfEach() {\n initFields();\n }", "@Test\n public void testSetValue() {\n System.out.println(\"setValue\");\n Object value = null;\n Setting instance = null;\n instance.setValue(value);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "@Test\n\tpublic void testCourseSetMembersReconciled() throws Exception {\n\t\tMembership member = (Membership)cmService.getCourseSetMemberships(\"ucb\").iterator().next();\n\t\tAssert.assertEquals(\"birgeneau\", member.getUserId());\n\t\tAssert.assertEquals(\"president\", member.getRole());\n\t\t\n\t\t// Add a new membership\n\t\tMembership newMember = cmAdmin.addOrUpdateCourseSetMembership(\"foo\", \"bar\", \"ucb\", \"active\");\n\t\t\n\t\t// Ensure it was added\n\t\tAssert.assertTrue(cmService.getCourseSetMemberships(\"ucb\").contains(newMember));\n\t\t\n\t\t// Reconcile again\n\t\tjob.syncAllCmObjects();\n\t\t\n\t\t// Ensure that the new member was removed\n\t\tAssert.assertFalse(cmService.getCourseSetMemberships(\"ucb\").contains(newMember));\n\t}", "public MultiStringColl() {\n c = null;\n how_many = 0;\n }", "void set( couple ch)\r\n { \r\n \r\n //couple ch = itr.next();\r\n ch.g1.sethappy(ch.bucket);\r\n ch.b1.sethappy(ch.bucket);\r\n ch.happiness = ch.b1.happy + ch.g1.happy;\r\n ch.compatibility = (ch.b1.budget - ch.g1.getmaint()) + Math.abs(ch.b1.getintg() - ch.g1.getiq()) + Math.abs(ch.b1.getattr() - ch.g1.getb());\r\n // this sets the happiness n compatibility of the co \r\n \r\n }", "protected void setUp() {\n // set up for test\n instance = new GeneralizationImpl();\n GeneralizableElement mockChild = EasyMock.createMock(GeneralizableElement.class);\n GeneralizableElement mockParent = EasyMock.createMock(GeneralizableElement.class);\n Classifier mockPowertype = EasyMock.createMock(Classifier.class);\n instance.setChild(mockChild);\n instance.setDiscriminator(TEST_DISCRIMINATORS[0]);\n instance.setParent(mockParent);\n instance.setPowertype(mockPowertype);\n\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingNullReferences() {\n }", "public void method_2244() {\r\n this.field_1858 = 0;\r\n }", "public MyTreeSet()\r\n {\r\n root = null;\r\n }", "@Test\n public void testSetElections() {\n System.out.println(\"setElections\");\n Collection<Election> elections = new ArrayList<Election>();\n Election mock = new Election();\n elections.add(mock);\n Commissioner instance = new Commissioner();\n instance.setElections(elections);\n assertEquals(instance.getElections(),elections);\n }", "@Test\n public void testStillUpdateInstanceHistoryAfterMultipleNulls() throws ClassNotFoundException {\n\n // Only two of these locations should have any access history (lines 8 and 11, where\n // the object is assigned a non-null value.\n List<ObjectDefinition> objectDefinitions = new ArrayList<ObjectDefinition>();\n objectDefinitions.add(new ObjectDefinition(\"w\", \"MultipleNullAssignments\", 8));\n objectDefinitions.add(new ObjectDefinition(\"w\", \"MultipleNullAssignments\", 9));\n objectDefinitions.add(new ObjectDefinition(\"w\", \"MultipleNullAssignments\", 10));\n objectDefinitions.add(new ObjectDefinition(\"w\", \"MultipleNullAssignments\", 11));\n objectDefinitions.add(new ObjectDefinition(\"w\", \"MultipleNullAssignments\", 12));\n objectDefinitions.add(new ObjectDefinition(\"w\", \"MultipleNullAssignments\", 13));\n\n Map<ObjectDefinition, List<AccessHistory>> accesses = analysis.run(\n \"MultipleNullAssignments\", \"tests/analysis_examples\", objectDefinitions);\n\n assertEquals(1, accesses.get(new ObjectDefinition(\"w\", \"MultipleNullAssignments\", 8)).size());\n assertEquals(0, accesses.get(new ObjectDefinition(\"w\", \"MultipleNullAssignments\", 9)).size());\n assertEquals(0, accesses.get(new ObjectDefinition(\"w\", \"MultipleNullAssignments\", 10)).size());\n assertEquals(1, accesses.get(new ObjectDefinition(\"w\", \"MultipleNullAssignments\", 11)).size());\n assertEquals(0, accesses.get(new ObjectDefinition(\"w\", \"MultipleNullAssignments\", 12)).size());\n assertEquals(0, accesses.get(new ObjectDefinition(\"w\", \"MultipleNullAssignments\", 13)).size());\n\n }", "public void setNull(){\n for (int i = 0; i < Nodes.size(); i++){\n this.References.add(null);\n }\n }", "@Test\n\tpublic void testSetPositionWithoutUpdate() {\n\t}", "@Test\n\tpublic void testSetValueMult1to1OverwriteInverse() {\n\n\t\t// set up\n\t\tPerson martin = new Person(\"\\\"Bl�mel\\\" \\\"Martin\\\" \\\"19641014\\\"\");\n\t\tPerson jojo = new Person(\"\\\"Bl�mel\\\" \\\"Johannes\\\" \\\"19641014\\\"\");\n\t\tTestUser user = new TestUser(\"admin\");\n\t\tuser.setPerson(jojo);\n\t\tAssert.assertSame(jojo, user.getPerson());\n\t\tAssert.assertSame(user, jojo.getUser());\n\t\tAssert.assertNull(martin.getUser());\n\n\t\t// test: relink martin to user (other way round)\n\t\tmartin.setUser(user);\n\t\tAssert.assertSame(martin, user.getPerson());\n\t\tAssert.assertSame(user, martin.getUser());\n\t\tAssert.assertNull(jojo.getUser());\n\t}", "public MyHashSet() {\n nodes = new Node[Max_Size];\n }", "private void setup()\n\t{\n\t\tif(values == null)\n\t\t\tvalues = new HashMap<>();\n\t\telse\n\t\t\tvalues.clear();\n\t}", "public void clearMembers() {\n\t\tmembers.clear();\n\t}", "public void testMethodInfo886() throws Exception {\n\t\tClassInfo var2776 = instantiateClassInfo426();\n\t\tLocalField var2777 = instantiateLocalField425();\n\t\tList<ClassInfo> var2764 = Collections.emptyList();\n\t\tList<ParameterInfo> var2766 = Collections.emptyList();\n\t\tList<LocalVariableInfo> var2767 = Collections.emptyList();\n\t\tList<Operation> var2768 = Collections.emptyList();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tMethodInfo var2778 = new MethodInfo(var2776, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList());\n\t\tvar2777.getDescription();\n\t\tvar2777.getDescription();\n\t\tClassInfo var2765 = new ClassInfo(\"super\", false, null, var2764, null);\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tClassInfo var2771 = new ClassInfo(\"super\", false, var2765, var2764,\n\t\t\t\tnull);\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.getSetters();\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setB()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"void setA()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PRIVATE, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2765.addMethod(new MethodInfo(var2765, \"voidX()\", -1, null, var2766,\n\t\t\t\tvar2767, Visibility.PUBLIC, var2768, false, false, Collections\n\t\t\t\t\t\t.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setD()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2771.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.addMethod(new MethodInfo(var2771, \"void setC()\", -1, null,\n\t\t\t\tvar2766, var2767, Visibility.PUBLIC, var2768, false, false,\n\t\t\t\tCollections.<Integer> emptyList()));\n\t\tvar2776.getSetters();\n\t\tvar2778.isSetter();\n\t\tvar2778.isSetter();\n\t}", "private static void assignMembersOwnersToMemberships(Collection<Object[]> membershipArrays) {\r\n for (Object[] membershipArray : GrouperUtil.nonNull(membershipArrays)) {\r\n assignMemberOwnerToMembership(membershipArray);\r\n } \r\n }", "protected Set() {\n size = 0;\n set = new int[TEN];\n }", "private UniqueChromosomeReconstructor() { }", "@Test\n\tpublic void testStorage() {\n\t\tBag<Object> bag = new Bag<>();\n\t\tObject element0 = new Object();\n\t\tObject element1 = new Object();\n\t\tObject element2 = new Object();\n\t\tObject element3 = new Object();\n\t\tObject element4 = new Object();\n\t\tObject element5 = new Object();\n\t\tObject element6 = new Object();\n\t\tObject element7 = new Object();\n\n\t\tbag.set(0, element0);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(null, bag.get(1));\n\t\tassertSame(null, bag.get(2));\n\t\tassertSame(null, bag.get(3));\n\t\tassertSame(null, bag.get(4));\n\t\tassertSame(null, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(1, element1);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(null, bag.get(2));\n\t\tassertSame(null, bag.get(3));\n\t\tassertSame(null, bag.get(4));\n\t\tassertSame(null, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(2, element2);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(element2, bag.get(2));\n\t\tassertSame(null, bag.get(3));\n\t\tassertSame(null, bag.get(4));\n\t\tassertSame(null, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(3, element3);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(element2, bag.get(2));\n\t\tassertSame(element3, bag.get(3));\n\t\tassertSame(null, bag.get(4));\n\t\tassertSame(null, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(4, element4);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(element2, bag.get(2));\n\t\tassertSame(element3, bag.get(3));\n\t\tassertSame(element4, bag.get(4));\n\t\tassertSame(null, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(5, element5);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(element2, bag.get(2));\n\t\tassertSame(element3, bag.get(3));\n\t\tassertSame(element4, bag.get(4));\n\t\tassertSame(element5, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(6, element6);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(element2, bag.get(2));\n\t\tassertSame(element3, bag.get(3));\n\t\tassertSame(element4, bag.get(4));\n\t\tassertSame(element5, bag.get(5));\n\t\tassertSame(element6, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\n\t\tbag.set(7, element7);\n\t\tassertSame(element0, bag.get(0));\n\t\tassertSame(element1, bag.get(1));\n\t\tassertSame(element2, bag.get(2));\n\t\tassertSame(element3, bag.get(3));\n\t\tassertSame(element4, bag.get(4));\n\t\tassertSame(element5, bag.get(5));\n\t\tassertSame(element6, bag.get(6));\n\t\tassertSame(element7, bag.get(7));\n\n\t\tbag.clear();\n\n\t\tassertSame(null, bag.get(0));\n\t\tassertSame(null, bag.get(1));\n\t\tassertSame(null, bag.get(2));\n\t\tassertSame(null, bag.get(3));\n\t\tassertSame(null, bag.get(4));\n\t\tassertSame(null, bag.get(5));\n\t\tassertSame(null, bag.get(6));\n\t\tassertSame(null, bag.get(7));\n\t}", "private void testSet() {\n init();\n assertTrue(\"l2.set(l2, 0, 39)\", \n FListInteger.get(l2.set(l2, 0, 39), 0) == 39);\n assertTrue(\"l2.set(l2, 0, 51)\", \n FListInteger.get(l2.set(l2, 0, 51), 0) == 51);\n assertTrue(\"l1.set(l1, 0, 10101)\",\n FListInteger.get(l1.set(l1, 0, 10101), 0) == 10101);\n }", "void setEmpty() {\n this.lo = 1;\n this.hi = 0;\n }", "@Test\r\n public void testSetListCheque() {\r\n System.out.println(\"setListCheque\");\r\n List<Cheque> listCheque = null;\r\n chequeBeans instance = new chequeBeans();\r\n instance.setListCheque(listCheque);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Override\n\t\tpublic void set(E arg0) {\n\t\t\t\n\t\t}", "@Override\r\n\t\tpublic void set(E arg0) {\n\r\n\t\t}", "@Override\n\tpublic void flagNull() {\n\t\t\n\t}", "private void initializeInfo()\n {\n Iterator<node_info> it=this.ga.getV().iterator();\n while (it.hasNext())\n {\n it.next().setInfo(null);\n }\n }", "@Test\n public void testSetPrenom() {\n String prenom = \"Pablo\";\n Beneficiaire instance = ben1;\n instance.setPrenom(prenom);\n assertTrue(prenom.equals(instance.getPrenom()));\n\n prenom = \"Nino\";\n instance = ben3;\n instance.setPrenom(prenom);\n assertTrue(prenom.equals(instance.getPrenom()));\n\n prenom = \"Lulu\";\n assertFalse(prenom.equals(instance.getPrenom()));\n }", "@Test(expected = IllegalArgumentException.class)\n @SuppressFBWarnings(\"NP\")\n public void testSetFirstName3() {\n user1.setFirstName(null);\n }", "public void setOtherMembers(String value) {\r\n \r\n \t\t_otherMembersList = new ArrayList<String>();\r\n \r\n \t\tif (value.matches(\"\"))\r\n \t\t\treturn;\r\n \r\n \t\tLog.d(\"DEBUG\", value);\r\n \r\n \t\tString[] others = value.split(\"(\\\\s+)?,(\\\\s+)?\");\r\n \r\n \t\tfor (String member : others) {\r\n \t\t\t_otherMembersList.add(member);\r\n \t\t}\r\n \r\n \t\tCollections.sort(_otherMembersList);\r\n \t}", "protected void InitValuables() {\n\t\tsuper.InitValuables();\n\t\t\n\t}", "private void init() {\n filmCollection = new FilmCollection();\n cameraCollection = new CameraCollection();\n }", "@Override\n public void setCurSharedRef(MPlaceholder arg0)\n {\n \n }", "public void setupConvenienceObjects();", "@Override\n public void setObject(Object arg0)\n {\n \n }", "public PointSET() {\n //s = new TreeSet<Point2D>(Point2D.X_ORDER);\n }" ]
[ "0.628982", "0.61802757", "0.615177", "0.58024764", "0.578766", "0.5686045", "0.56060797", "0.5574799", "0.5573333", "0.55250955", "0.5510157", "0.54917467", "0.5450633", "0.5447879", "0.5438393", "0.5406466", "0.53988564", "0.53973436", "0.53658223", "0.5353107", "0.53517336", "0.53490967", "0.5332464", "0.5294483", "0.5293348", "0.5288176", "0.5285366", "0.5254224", "0.5243292", "0.52287763", "0.5228486", "0.5228486", "0.5225743", "0.5225459", "0.52240026", "0.52224296", "0.52212524", "0.5220059", "0.52159333", "0.52105063", "0.5208676", "0.5204709", "0.5199208", "0.51857305", "0.517593", "0.5166896", "0.51651055", "0.5164215", "0.5163444", "0.5156802", "0.5147412", "0.5141472", "0.51339453", "0.51228243", "0.51030827", "0.5102097", "0.5101202", "0.50983584", "0.50947213", "0.5089446", "0.508886", "0.508582", "0.50843614", "0.5082368", "0.50790876", "0.50730914", "0.5068061", "0.506681", "0.50615317", "0.5061171", "0.5060352", "0.5059618", "0.5057164", "0.5055027", "0.505305", "0.50497955", "0.5045722", "0.50410855", "0.50400573", "0.50361526", "0.503319", "0.5030767", "0.5030713", "0.502998", "0.50276345", "0.5025161", "0.50205827", "0.5017411", "0.5016686", "0.50096285", "0.5007217", "0.5005358", "0.50047475", "0.50021005", "0.5001815", "0.49996656", "0.49996546", "0.49988872", "0.49961767", "0.49890962", "0.4989073" ]
0.0
-1
Bug report from Holger Knublauch on Aug 19th, 2003. Initialisation error
public void test_hk_03() { OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM); spec.setReasoner(null); OntModel ontModel = ModelFactory.createOntologyModel(spec, null); OntProperty property = ontModel.createObjectProperty("http://www.aldi.de#property"); /* MinCardinalityRestriction testClass = */ ontModel.createMinCardinalityRestriction(null, property, 42); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init() {\n\n\t}", "@Override\n\t\tpublic void init() {\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}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\n\tpublic void init() {\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 static void init() {\n\t\t\n\t}", "private void init() {\n }", "public void init() {\n\t\t\n\t}", "@Override\n\tprotected void initialise() {\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\tpublic void init()\n\t{\n\n\t}", "@Override\n protected void init() {\n }", "@Override\r\n\tpublic void init() {\n\t\tsuper.init();\r\n\t}", "private void _init() {\n }", "private void initialize() {\n\t\t\n\t}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public void init() {\n\t\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "@Override\n\t\tprotected void initialise() {\n\n\t\t}", "@Override\n public void init() {}", "public void init() {\r\n\r\n\t}", "protected void init() {\n\t}", "protected void init() {\n\t}", "public void init() {\n\t\t}", "public void init() {}", "public void init() {}", "private void init() {\n\n\n\n }", "@Override\n public void init() {\n }", "public void init() {\r\n\t\t// to override\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}", "public static void init() {}", "@Override public void init()\n\t\t{\n\t\t}", "private void initialize() {\n\t}", "protected void _init(){}", "public void init() {\n\t\t \r\n\t\t }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "static void init() {}", "public void init() {\n\r\n\t}", "public void init() {\n\r\n\t}", "protected void initialize() {}", "protected void initialize() {}", "protected void init() {\n }", "public void init()\n { \t\n }", "@Override\n\tpublic synchronized void init() {\n\t}", "protected void init() {\n // to override and use this method\n }", "public void init() { }", "public void init() { }", "public static void init() {\n }", "public static void init() {\n }", "public void init()\n {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "public static void init() {\n\n }", "private void initialize() {\n }", "protected void initialize() {\n\t\t\n\t}", "protected void initialize() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "abstract public void init();", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "protected abstract void init();", "protected abstract void init();", "protected abstract void init();", "protected abstract void init();", "protected abstract void init();", "protected abstract void init();", "protected abstract void init();", "protected abstract void init();", "protected abstract void init();", "protected abstract void init();", "protected abstract void init();", "@Override\n public void init() {\n\n super.init();\n\n }" ]
[ "0.701228", "0.70037806", "0.69097555", "0.69097555", "0.69097555", "0.69097555", "0.69097555", "0.6872802", "0.68249077", "0.68218255", "0.6817342", "0.6817342", "0.6817342", "0.6817342", "0.68105346", "0.67920923", "0.6785022", "0.6785022", "0.6785022", "0.678147", "0.67774796", "0.6770432", "0.67649907", "0.67639565", "0.67639565", "0.67639565", "0.6741121", "0.6704335", "0.6700576", "0.6688442", "0.6671869", "0.66709924", "0.665571", "0.66551834", "0.66551834", "0.66551834", "0.6652626", "0.6652626", "0.6652626", "0.6647166", "0.66463226", "0.66460687", "0.6645474", "0.6645474", "0.6629816", "0.6624901", "0.6624901", "0.6623849", "0.66182417", "0.6617841", "0.6583469", "0.6583469", "0.6583469", "0.65288776", "0.65234613", "0.65116495", "0.6502256", "0.6489213", "0.64876306", "0.64876306", "0.64832467", "0.6481724", "0.6481724", "0.6474758", "0.6474758", "0.64639497", "0.64398587", "0.6423138", "0.6419462", "0.6414554", "0.6414554", "0.64029926", "0.64029926", "0.63985884", "0.6388173", "0.6388173", "0.63792396", "0.6376286", "0.63742906", "0.63742906", "0.6372153", "0.6371897", "0.63688284", "0.63688284", "0.63688284", "0.63688284", "0.63681495", "0.63681495", "0.63681376", "0.6335375", "0.6335375", "0.6335375", "0.6335375", "0.6335375", "0.6335375", "0.6335375", "0.6335375", "0.6335375", "0.6335375", "0.6335375", "0.63228726" ]
0.0
-1
Bug report from Holger Knublauch on Aug 19th, 2003. Document manager alt mechanism breaks relative name translation
public void test_hk_04() { OntModel m = ModelFactory.createOntologyModel(); m.getDocumentManager().addAltEntry( "http://jena.hpl.hp.com/testing/ontology/relativenames", "file:testing/ontology/relativenames.rdf"); m.read("http://jena.hpl.hp.com/testing/ontology/relativenames"); assertTrue( "#A should be a class", m.getResource("http://jena.hpl.hp.com/testing/ontology/relativenames#A").canAs(OntClass.class)); assertFalse( "file: #A should not be a class", m.getResource("file:testing/ontology/relativenames.rdf#A").canAs(OntClass.class)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "MnemonicNameReference createMnemonicNameReference();", "private String resolveLabel(String aLabel){\n\t\t// Pre-condition\n\t\tif(aLabel == null) return aLabel;\n\t\t// Main code\n\t\tif (aLabel == \"univ\") return null;\n\t\tString actualName = aLabel.contains(\"this/\")?aLabel.substring(\"this/\".length()):aLabel;\n\t\treturn actualName;\n\t}", "private static String getName(Document doc) {\n\t\t\tthrow new UnsupportedOperationException(\"Not implemented yet.\");\r\n\t\t}", "public String getInoDocname();", "public String getXPageAlt();", "AlphabetNameReference createAlphabetNameReference();", "public void testExtendsName() {\n final LinkerDef baseLinker = new LinkerDef();\n setLinkerName(baseLinker, \"msvc\");\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker);\n extendedLinker.setBase(new FlexLong(\"10000\"));\n final String[] preArgs = getPreArguments(extendedLinker);\n assertEquals(\"/NOLOGO\", preArgs[0]);\n assertEquals(\"/SUBSYSTEM:WINDOWS\", preArgs[1]);\n assertEquals(\"/INCREMENTAL:NO\", preArgs[2]);\n assertEquals(\"/BASE:0x2710\", preArgs[3]);\n }", "private void setTranslationKey(String name) {\n\t\t\r\n\t}", "protected abstract String getRefName();", "public String qualifiedDocName() { return \"\"; }", "@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.414 -0500\", hash_original_method = \"33259345EBD99FFF49F4E1AAD2529013\", hash_generated_method = \"296CADF2DCFE4D340DC221E4F2AE1D69\")\n \nString [] processName (String qName, boolean isAttribute)\n {\n String name[];\n Hashtable table;\n\n // detect errors in call sequence\n declsOK = false;\n\n // Select the appropriate table.\n if (isAttribute) {\n table = attributeNameTable;\n } else {\n table = elementNameTable;\n }\n\n // Start by looking in the cache, and\n // return immediately if the name\n // is already known in this content\n name = (String[])table.get(qName);\n if (name != null) {\n return name;\n }\n\n // We haven't seen this name in this\n // context before. Maybe in the parent\n // context, but we can't assume prefix\n // bindings are the same.\n name = new String[3];\n name[2] = qName.intern();\n int index = qName.indexOf(':');\n\n // No prefix.\n if (index == -1) {\n if (isAttribute) {\n if (qName == \"xmlns\" && namespaceDeclUris)\n name[0] = NSDECL;\n else\n name[0] = \"\";\n } else if (defaultNS == null) {\n name[0] = \"\";\n } else {\n name[0] = defaultNS;\n }\n name[1] = name[2];\n }\n\n // Prefix\n else {\n String prefix = qName.substring(0, index);\n String local = qName.substring(index+1);\n String uri;\n if (\"\".equals(prefix)) {\n uri = defaultNS;\n } else {\n uri = (String)prefixTable.get(prefix);\n }\n if (uri == null\n || (!isAttribute && \"xmlns\".equals (prefix))) {\n return null;\n }\n name[0] = uri;\n name[1] = local.intern();\n }\n\n // Save in the cache for future use.\n // (Could be shared with parent context...)\n table.put(name[2], name);\n return name;\n }", "@Override\r\n\tpublic void updateName(int eno, String newName) {\n\r\n\t}", "public String getName(Resource resource, OgemaLocale locale, boolean useRelativePathAsAlias, boolean useDefaultLanguage);", "public void setDocumentName(String name)\n {\n setText(name);\n }", "private void updateDisplayName() {\n String path;\n FileObject webRoot = ProjectWebRootQuery.getWebRoot(styleSheet);\n if(webRoot == null) {\n path = styleSheet.getNameExt();\n } else {\n path = FileUtil.getRelativePath(webRoot, styleSheet);\n }\n setDisplayName(path);\n }", "public abstract WordEntry manualTranslate(String text, String from, String to);", "public void setInoDocname(String pDocname);", "private String beautiplyFileNameReferer() {\r\n\r\n\t\tif (checkBeautiplyImagesExixtence()) {\r\n\t\t\ttry {\r\n\t\t\t\tString fname = beautiplyFileNameGenerator();\r\n\t\t\t\tFileInputStream fis = context.openFileInput(fname);\r\n\t\t\t\treturn fname;\r\n\t\t\t} catch (FileNotFoundException e4) {\r\n\t\t\t\treturn beautiplyFileNameReferer();\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\r\n\t}", "public String normalizePathName( final String name );", "abstract protected String getResourceBundlePropName();", "public void setName(String name)\n/* */ {\n/* 368 */ this.name = name;\n/* 369 */ this.fullName = name;\n/* 370 */ this.namespace = null;\n/* */ }", "private static String expandUmlauts(String name) {\n return name.toLowerCase().replace(\"ä\", \"ae\").replace(\"ö\", \"oe\").replace(\"ü\", \"ue\");\n }", "protected String newLinkName(){\n\t\treturn \"WomoEvtLnk_\" + linkNr++;\n\t}", "@Override\r\n public void setAlt(String alt) {\n }", "public abstract WordEntry autoTranslate(String text, String to);", "private static String getNTName(Reference reference) {\n\t\t\n\t\treturn getNTName(((BaseLanguageReference)reference.getBase()).getBase()); \n\t\t\n\t}", "private String translateCodebase() {\n if(codebase==null)\n return(codebase);\n if(System.getProperty(\"os.name\").startsWith(\"Win\") && codebase.startsWith(\"file://\")) {\n codebase = \"file:/\"+codebase.substring(7);\n }\n return(codebase);\n }", "void localizationChaneged();", "private void setLandscapeName(){\n \t\tLog.i(TAG, \"setLandscapeName() called\");\n \t\tnamelandtext.setText(provide.getCurItem().getName());\n \t}", "public void markSrvTargetNameReplace() throws JNCException {\n markLeafReplace(\"srvTargetName\");\n }", "void lSetAltText(String altText);", "String getOriginalName();", "private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }", "FileNameReference createFileNameReference();", "private static String generateAliasRoot(String description) {\r\n String result = truncate(unqualifyEntityName(description), ALIAS_TRUNCATE_LENGTH).toLowerCase().replace('/', '_') // entityNames may now include slashes for the representations\r\n .replace('$', '_'); //classname may be an inner class\r\n result = cleanAlias(result);\r\n if (Character.isDigit(result.charAt(result.length() - 1))) {\r\n return result + \"x\"; //ick!\r\n } else {\r\n return result;\r\n }\r\n }", "public StandardDTEDNameTranslator() {}", "@Override\n public String[] alternativeNames() {\n return normAlts;\n }", "public static String getFullName(String baseName, String localeName)\n/* */ {\n/* 924 */ if ((baseName == null) || (baseName.length() == 0)) {\n/* 925 */ if (localeName.length() == 0) {\n/* 926 */ return localeName = ULocale.getDefault().toString();\n/* */ }\n/* 928 */ return localeName + \".res\";\n/* */ }\n/* 930 */ if (baseName.indexOf('.') == -1) {\n/* 931 */ if (baseName.charAt(baseName.length() - 1) != '/') {\n/* 932 */ return baseName + \"/\" + localeName + \".res\";\n/* */ }\n/* 934 */ return baseName + localeName + \".res\";\n/* */ }\n/* */ \n/* 937 */ baseName = baseName.replace('.', '/');\n/* 938 */ if (localeName.length() == 0) {\n/* 939 */ return baseName + \".res\";\n/* */ }\n/* 941 */ return baseName + \"_\" + localeName + \".res\";\n/* */ }", "@Override\n public void focusLost( FocusEvent arg0 ) {\n String newname = text.getText();\n if ( renameTransformation( fname, newname, frepdir ) ) {\n ti.setText( newname );\n }\n text.dispose();\n }", "public L getDocumentLocation();", "private void addTranslations() {\n addTranslation(\"org.argouml.uml.diagram.ui.FigNote\",\n \"org.argouml.uml.diagram.static_structure.ui.FigComment\");\n addTranslation(\"org.argouml.uml.diagram.static_structure.ui.FigNote\",\n \"org.argouml.uml.diagram.static_structure.ui.FigComment\");\n addTranslation(\"org.argouml.uml.diagram.state.ui.FigState\",\n \"org.argouml.uml.diagram.state.ui.FigSimpleState\");\n addTranslation(\"org.argouml.uml.diagram.ui.FigCommentPort\",\n \"org.argouml.uml.diagram.ui.FigEdgePort\");\n addTranslation(\"org.tigris.gef.presentation.FigText\",\n \"org.argouml.uml.diagram.ui.ArgoFigText\");\n addTranslation(\"org.tigris.gef.presentation.FigLine\",\n \"org.argouml.gefext.ArgoFigLine\");\n addTranslation(\"org.tigris.gef.presentation.FigPoly\",\n \"org.argouml.gefext.ArgoFigPoly\");\n addTranslation(\"org.tigris.gef.presentation.FigCircle\",\n \"org.argouml.gefext.ArgoFigCircle\");\n addTranslation(\"org.tigris.gef.presentation.FigRect\",\n \"org.argouml.gefext.ArgoFigRect\");\n addTranslation(\"org.tigris.gef.presentation.FigRRect\",\n \"org.argouml.gefext.ArgoFigRRect\");\n addTranslation(\n \"org.argouml.uml.diagram.deployment.ui.FigMNodeInstance\",\n \"org.argouml.uml.diagram.deployment.ui.FigNodeInstance\");\n addTranslation(\"org.argouml.uml.diagram.ui.FigRealization\",\n \"org.argouml.uml.diagram.ui.FigAbstraction\");\n }", "EPREFIX_TYPE getName();", "private String fixName(String name, String prefix)\n {\n if (name.startsWith(prefix))\n return name.substring(prefix.length());\n return FIXME_INVALID_PREFIX + name;\n }", "public String getName() throws PDFNetException {\n/* 537 */ return GetName(this.a);\n/* */ }", "String getAbsoluteName() {\n return absoluteName;\n }", "public abstract String getManipulatorLinkLabel();", "public static final String alt(String text) {\n return \"%\" + text; /*I18nOK:LINE*/\n }", "@Override\n public void focusLost( FocusEvent arg0 ) {\n String newname = text.getText();\n if ( renameDirectory( repdir, name, newname ) ) {\n ti.setText( newname );\n }\n text.dispose();\n }", "public interface NameService {\n \n\t/**\n\t * See {@link #getName(Class, OgemaLocale, boolean)}. Uses default setting\n\t * useDefaultLanguage = true, i.e. if a name in the language provided is not available, a default language is selected. \n\t * If no name could be determined, null is returned.\n\t */\n\tpublic String getName(Class<? extends Resource> resourceType, OgemaLocale locale);\n\t\n\t/**\n\t * Returns a human-friendly name of the resource type provided, in the given language.<br>\n\t * @param useDefaultLanguage \n\t * \t\ttrue: if a name is not found in the given language, a default name is provided (depends on implementation, English if available in default implementation)<br>\n\t * \t\tfalse: if a name is not found in the given language null is returned \n\t * @return either a name or null, if a name has not been registered for the given resource type\n\t */\n\tpublic String getName(Class<? extends Resource> resourceType, OgemaLocale locale, boolean useDefaultLanguage);\t\n\t\n\t/**\n\t * Get a list of resource types with available names.<br>\n\t * Return empty list if no dictionary for the requested language is available.\n\t */\n\tpublic List<Class<? extends Resource>> getAvailableTypes(OgemaLocale locale);\n\t\n\t/**\n\t * Check whether a name is available for the given type\n\t */\n\tpublic boolean isTypeAvailable(Class<? extends Resource> resourceType, OgemaLocale locale);\n\t\n\t/**\n\t * See {@link #getName(Resource, OgemaLocale, boolean, boolean)}. Default values useRelativePathAsAlias = false and \n\t * useDefaultLanguage = true are used.\n\t */\n\tpublic String getName(Resource resource, OgemaLocale locale);\t\n\t/**\n\t * Tries to determine a human-friendly name for the given resource with the strategy defined below.\n\t * If none can be determined, null is returned. \n\t * The strategy of the default name service is as follows:\n\t * <ul>\n\t * \t<li>If the resource has a <code>name()</code>-subresource of type StringResource, the value of the latter is returned.\n\t * So for resources having a direct name subresource the argument locale is irrelevant</li>\n\t * <li>If any parent resource has a <code>name()</code>-subresource, the returned String is a concatenation of this name\n\t * \tplus an alias for the relativ path from the parent to the original resource. If no alias is known for this, the behaviour \n\t * \tdepends on the flag useRelativePathAsAlias. If it is true, the relative resource path is appended, if it is false (default), null is returned.</li>\n\t * <li>otherwise null is returned</li>\t \n\t * </ul>\n\t * @param locale language for which the resource name shall be returned\n\t */\n\tpublic String getName(Resource resource, OgemaLocale locale, boolean useRelativePathAsAlias, boolean useDefaultLanguage);\t\n\t\n\t//would require much overhead to implement this\n// public List<OgemaLocale> getAvailableLanguages(Class<? extends Resource> resourceType);\n \n public String getServletUrl() throws UnsupportedOperationException;\n}", "@Override\n\tpublic void openDocument(String path, String name) {\n\t\t\n\t}", "public String getLocallyAccessibleName( String name );", "String getDefaultAlias();", "public void updateFileName()\n {\n\n String fn= presenter.getCurrentTrack().getFileName();\n if(fn!=null && !fn.isEmpty()) {\n File file = new File(fn);\n fn=file.getName();\n }\n if(fn==null || fn.isEmpty())\n fn=\"*\";\n fileNameTextView.setText(fn);\n }", "private void loadI18n(String prefix, String baseName) throws IOException {\n LogManager.log(\"... loading i18n properties using prefix \\\"\" + prefix + \"\\\" with base name \\\"\" + baseName + \"\\\"\");\n InputStream is = ResourceUtils.getResource(EngineResources.ENGINE_CONTENTS_LIST);\n String[] resources = StringUtils.splitByLines(StreamUtils.readStream(is));\n is.close();\n List<String> list = new ArrayList<String>();\n LogManager.log(\"... total engine resources: \" + resources.length); //NOI18N\n for (String res : resources) {\n if (res.startsWith(prefix + baseName) &&\n res.endsWith(FileUtils.PROPERTIES_EXTENSION)) {\n list.add(res);\n }\n }\n LogManager.log(\"... total i18n resources: \" + list.size()); //NOI18N\n setI18n(list);\n }", "public void setRelativeText(java.lang.String newRelativeText) {\n \t\trelativeText = newRelativeText;\n \t}", "private String getDicBaseFileName(String aParentDir) {\n\t\treturn aParentDir + '/' + CPlatform.getUserLanguage();\n\t}", "public SecName(FrillLoc loc) {\n MyLocation = loc;\n NameFont = new FontFinder(FontList.FONT_LABEL);\n }", "private void updateTexts(DocumentEvent e) {\n\n Document doc = e.getDocument();\n\n if (doc == projectNameTextField.getDocument() || doc == projectLocationTextField.getDocument()) {\n // Change in the project name\n\n String projectName = projectNameTextField.getText();\n String projectFolder = projectLocationTextField.getText();\n\n //if (projectFolder.trim().length() == 0 || projectFolder.equals(oldName)) {\n createdFolderTextField.setText(projectFolder + File.separatorChar + projectName);\n //}\n\n }\n panel.fireChangeEvent(); // Notify that the panel changed\n }", "protected Object needsAnAlias(Object original)\n {\n return JMXObjectNameFix.needsAnAlias(original);\n }", "@Test\n\tpublic void testInvariantPrefixRenaming() throws Exception {\n\t\ttestMachinePrefixRenaming(IInvariant.ELEMENT_TYPE);\n\t}", "void xsetName(org.openxmlformats.schemas.drawingml.x2006.main.STGeomGuideName name);", "public abstract String getMachineUnlocalizedName();", "String getRootAlias();", "public interface MenuNames {\n public static final String FILE = I18N.get(\"ui.MenuNames.FILE\");\n public static final String FILE_NEW = I18N.get(\"ui.MenuNames.FILE.NEW\");\n public static final String FILE_SAVEVIEW = I18N.get(\"ui.MenuNames.FILE.SAVEVIEW\");\n public static final String EDIT = I18N.get(\"ui.MenuNames.EDIT\");\n public static final String TOOLS_EDIT_ATTRIBUTES = I18N.get(\"ui.MenuNames.EDIT\") + \" \" + I18N.get(\"ui.MenuNames.ATTRIBUTS\");\n public static final String TOOLS_EDIT_GEOMETRY = I18N.get(\"ui.MenuNames.EDIT\") + \" \" + I18N.get(\"ui.MenuNames.GEOMETRY\");\n public static final String VIEW = I18N.get(\"ui.MenuNames.VIEW\");\n public static final String MAP_DECORATIONS = I18N.get(\"ui.MenuNames.VIEW.MAP_DECORATIONS\");\n public static final String LAYER = I18N.get(\"ui.MenuNames.LAYER\");\n public static final String TOOLS = I18N.get(\"ui.MenuNames.TOOLS\");\n //public static final String TOOLS_ADVANCED = I18N.get(\"ui.MenuNames.TOOLS.ADVANCED\"); // not used, not translated\n public static final String TOOLS_ANALYSIS = I18N.get(\"ui.MenuNames.TOOLS.ANALYSIS\");\n public static final String TOOLS_GENERALIZATION = I18N.get(\"ui.MenuNames.TOOLS.GENERALIZATION\");\n public static final String TOOLS_GENERATE = I18N.get(\"ui.MenuNames.TOOLS.GENERATE\");\n public static final String TOOLS_JOIN = I18N.get(\"ui.MenuNames.TOOLS.JOIN\");\n public static final String TOOLS_QA = I18N.get(\"ui.MenuNames.TOOLS.QA\");\n public static final String TOOLS_WARP = I18N.get(\"ui.MenuNames.TOOLS.WARP\");\n //public static final String TOOLS_PROGRAMMING =I18N.get(\"ui.MenuNames.TOOLS.PROGRAMMING\");\n public static final String TOOLS_QUERIES =I18N.get(\"org.openjump.core.ui.plugin.queries.SimpleQuery.menu\");\n public static final String WINDOW = I18N.get(\"ui.MenuNames.WINDOW\");\n public static final String RASTERTOOLS = I18N.get(\"ui.MenuNames.RASTER\");\n // Michael Michaud 2008-04-06\n // New menu for synchronization\n public static final String WINDOW_SYNCHRONIZATION = I18N.get(\"ui.MenuNames.WINDOW.SYNCHRONIZATION\");\n public static final String HELP = I18N.get(\"ui.MenuNames.HELP\");\n public static final String PLUGINS = I18N.get(\"ui.MenuNames.PLUGINS\");\n \n // Michael Michaud 2007-03-23\n // New menu for plugin manager, beanshell console, scripts\n public static final String CUSTOMIZE = I18N.get(\"ui.MenuNames.CUSTOMIZE\");\n \n //erwan begin 2005-12-01 --- SIGLE\t\n //Menu\n public static final String ATTRIBUTS = I18N.get(\"ui.MenuNames.ATTRIBUTS\");\n public static final String SELECTION = I18N.get(\"ui.MenuNames.SELECTION\");\n public static final String RASTER = I18N.get(\"ui.MenuNames.RASTER\");\n public static final String STATISTICS = I18N.get(\"ui.MenuNames.STATISTICS\");\n public static final String GEOPROCESSING = \"SIGLE-\" + I18N.get(\"ui.MenuNames.GEOPROCESSING\");\n \n //Submenu\n //public static final String ONELAYER = I18N.get(\"ui.MenuNames.ONELAYER\");\n //public static final String TWOLAYERS = I18N.get(\"ui.MenuNames.TWOLAYERS\");\n \n public static final String CONVERT = I18N.get(\"ui.MenuNames.CONVERT\");\n public static final String EXTRACT = I18N.get(\"ui.MenuNames.EXTRACT\");\n public static final String MERGE = I18N.get(\"ui.MenuNames.MERGE\");\n public static final String GENERALIZATION = I18N.get(\"ui.MenuNames.GENERALIZATION\");\n public static final String TOPOLOGY = I18N.get(\"ui.MenuNames.TOPOLOGY\");\n //public static final String QA = I18N.get(\"ui.MenuNames.QA\"); // see MenuNames.TOOLS_QA\n public static final String DELETE = I18N.get(\"ui.MenuNames.DELETE\");\n public static final String DETECT = I18N.get(\"ui.MenuNames.DETECT\");\n public static final String PLOT = I18N.get(\"ui.MenuNames.PLOT\");\n \t\n //\terwan end 2005-12-01\n // Submenus for LayerName PopupMenu\n public static final String STYLE = I18N.get(\"ui.MenuNames.STYLE\");\n public static final String DATASTORE = I18N.get(\"ui.MenuNames.DATASTORE\");\n public static final String SCHEMA = I18N.get(\"ui.MenuNames.SCHEMA\");\n \n public static final String LAYERVIEWPANEL_POPUP = I18N.get(\"ui.MenuNames.LAYERVIEWPANEL_POPUP\");\n public static final String ATTRIBUTEPANEL_POPUP = I18N.get(\"ui.MenuNames.ATTRIBUTEPANEL_POPUP\");\n public static final String LAYERNAMEPANEL_LAYER_POPUP = I18N.get(\"ui.MenuNames.LAYERNAMEPANEL_LAYER_POPUP\");\n public static final String LAYERNAMEPANEL_CATEGORY_POPUP = I18N.get(\"ui.MenuNames.LAYERNAMEPANEL_CATEGORY_POPUP\");\n}", "private static String translateOriginExpressionRelativeToAbsolute(String originExpRelative, ReferenceSymbolic origin) {\n\t\tfinal String originString = origin.asOriginString();\n\t\t\n\t\t//replaces {$REF} with ref.origin\n\t\tString retVal = originExpRelative.replace(REF, originString);\n\t\t\n\t\t//eats all /whatever/UP pairs \n\t\tString retValOld;\n\t\tdo {\n\t\t\tretValOld = retVal;\n\t\t\tretVal = retVal.replaceFirst(\"\\\\.[^\\\\.]+\\\\.\\\\Q\" + UP + \"\\\\E\", \"\");\n\t\t} while (!retVal.equals(retValOld));\n\t\treturn retVal;\n\t}", "public void changeMenuItemName(int itemId, String itemName) {\n if(itemId>-1){\n iMenu.changeMenuItemName(itemId, itemName);\n } else iMenu.updateManuItem(itemName, itemName, (byte)4, \"\"); //CR 13179 bug 14155,14156\n\n }", "public String getDocumentName() {\r\n if (resource != null) {\r\n return resource.getFullPath().toString();\r\n }\r\n return \"null\";\r\n }", "public long getDocumentName();", "public String getInternalName();", "public static String getSynthName() \n {\n return \"Override Me\"; \n }", "public void setLabelFor(View root, int virtualDescendantId) {\n/* 1603 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "protected abstract URL resolve(NamespaceId namesapace, String resource) throws IOException;", "int getNameSourceStart();", "abstract protected String getWrapperFileNameBase();", "private static String translateToOriginPatternString(String originExpAbsolute) {\n\t\tString retVal = originExpAbsolute.replace(\".\", \"\\\\.\"); \n\t\tretVal = retVal.replace(ANY, \"(.*)\");\n\t\tretVal = retVal.replace(REGEX_ALLCHARS, \".\"); \n\t\tretVal = retVal.replace(\"{\", \"\\\\{\"); //this is for {ROOT}\n\t\tretVal = retVal.replace(\"}\", \"\\\\}\"); //this also is for {ROOT}\n\t\tretVal = retVal.replace(\"[\", \"\\\\[\"); //this is for [<className>]\n\t\tretVal = retVal.replace(\"]\", \"\\\\]\"); //this also is for [<className>]\n\t\tretVal = retVal.replace(\"$\", \"\\\\$\"); //this is for names of inner classes\n\t\tretVal = retVal.replace(REGEX_ENDLINE, \"$\"); \n\t\treturn retVal;\n\t}", "private void changeTitle(SingleDocumentModel model) {\n\t\tsetTitleAt(models.indexOf(model), model.getFilePath().getFileName().toString());\n\t}", "public String mangle(String sName);", "protected String revealedId (String name)\n {\n return name;\n }", "public int acceptTranslation()\n\t{\n\t\t// get the current translations\n\t\tString translation = this.altTargetWindow.getText();\n\t\tif (translation.equals(\"\"))\n\t\t\treturn SWT.NO;\n\t\treturn this.xliffEditorWindow.setTranslation(this.xliffEditorWindow.getIOldSegmentPosition(), translation, true);\n\t}", "public String getContextualizedLabel() {\n\t\tString completeLbl = CodeUnit.getLabel(getRepo(), getArtFrag(), null, true);//this.getLabel();\r\n\t\t\r\n\t\t// strip number for anon class (shows in tooltip)\r\n\t\tif (RSECore.isAnonClassName(completeLbl))\r\n\t\t\tcompleteLbl = RSECore.stripAnonNumber(completeLbl);\r\n\t\t\r\n\t\tTitledArtifactEditPart parentTAFEP = this.getParentTAFEP();\r\n\t\tif (parentTAFEP != null) {\r\n\t\t\tString contextLbl = null;\r\n\t\t\tcontextLbl = getCntxLabel(parentTAFEP);\r\n\t\t\tif (completeLbl.startsWith(contextLbl) && !contextLbl.equals(\".\")) {\r\n\t\t\t\tcompleteLbl = completeLbl.substring(contextLbl.length());\r\n\t\t\t}\r\n\t\t}\r\n\t\tcompleteLbl = strTruncEnd(completeLbl, \".*\");\r\n\t\tcompleteLbl = strTruncBeg(completeLbl, \".\");\r\n\t\tif (completeLbl.length() == 0) completeLbl = \".\";\r\n\t\treturn completeLbl;\r\n\t}", "public void setInternalName(String name);", "@Override\n\tpublic void setName(String arg0) {\n\n\t}", "public static void applyPrefix(String[] text, ITextEditor editor, String tagname, String uri, String defaultPrefix) {\r\n \t\tif(defaultPrefix == null || defaultPrefix.length() == 0) return;\r\n \t\tIDocument doc = null;\r\n \tif(editor != null && editor.getDocumentProvider() != null) {\r\n \t\tdoc = editor.getDocumentProvider().getDocument(editor.getEditorInput());\r\n \t}\r\n \tapplyPrefix(text, doc, tagname, uri, defaultPrefix);\r\n \t}", "void updateDisplayName();", "private String resolveName()\n {\n\n String forwardName = null;\n\n // trigger\n final EventFacade trigger = this.getTrigger();\n\n if (trigger != null)\n {\n\n forwardName = trigger.getName();\n\n }\n\n // name\n if (forwardName == null)\n {\n\n forwardName = this.getName();\n\n }\n\n // target\n if (forwardName == null)\n {\n\n forwardName = this.getTarget().getName();\n\n }\n\n // else\n if (forwardName == null)\n {\n\n forwardName = \"unknown\";\n\n }\n\n // return\n return forwardName;\n\n }", "@Override\n public boolean getDefineAlternateReferenceLocationFlag() {\n return false;\n }", "@Test\n\tpublic void testAxiomPrefixRenaming() throws Exception {\n\t\ttestContextPrefixRenaming(IAxiom.ELEMENT_TYPE);\n\t}", "protected void reinitializeName()\n {\n\t\tname = StsLoader.reinitializeName(name);\n }", "public String getTranslatedTabLabel()\n {\n return \"Harry Potter\";\n }", "public static String name(){\n return \"10.Schneiderman.Lorenzo\"; \n }", "private String getSourceName(JCas pJCas) {\n \n String sourceURI = getReferenceLocation(pJCas);\n String name = null;\n if (sourceURI != null) {\n File aFile = new File(sourceURI);\n name = aFile.getName();\n \n } else {\n name = \"knowtator_\" + String.valueOf(this.inputFileCounter++);\n }\n \n return name;\n }", "@Test\n\tpublic void testAxiomRenaming() throws Exception {\n\t\tfinal IContextRoot ctx = createContext(\"c1\");\n\t\tfinal String prefix = PreferenceUtils.getAutoNamePrefix(ctx, IAxiom.ELEMENT_TYPE);\n\t\tfinal IAxiom axm1 = createAxiom(ctx, prefix + \"24\", \"\", false);\n\t\tfinal IAxiom axm2 = createAxiom(ctx, \"foo\", \"\", true);\n\n\t\trenameAxioms(ctx);\n\t\tassertEquals(prefix + \"1\", axm1.getLabel());\n\t\tassertEquals(prefix + \"2\", axm2.getLabel());\n\t}", "public Document abbrExtensionByDoc(Document doc) {\n\t\tif (doc.getInitial_event() != null) {\n\t\t\tList<Paragraph> originalp = doc.getInitial_event();\n\t\t\toriginalp = abbrExtension(originalp);\n\t\t\tdoc.setInitial_event(originalp);\n\t\t}\n\t\tif (doc.getInclusion_criteria() != null) {\n\t\t\tList<Paragraph> originalp = doc.getInclusion_criteria();\n\t\t\toriginalp = abbrExtension(originalp);\n\t\t\tdoc.setInclusion_criteria(originalp);\n\t\t}\n\t\tif (doc.getExclusion_criteria() != null) {\n\t\t\tList<Paragraph> originalp = doc.getExclusion_criteria();\n\t\t\toriginalp = abbrExtension(originalp);\n\t\t\tdoc.setExclusion_criteria(originalp);\n\t\t}\n\t\treturn doc;\n\t}", "public void setEntryName(String ename);", "public void modifyText(ModifyEvent e) {\n Text redefineText = (Text) e.getSource();\n coll.set_value(Key, redefineText.getText());\n\n OtpErlangObject re = parent.getIdeBackend(parent.confCon, coll.type, coll.coll_id, Key, redefineText.getText());\n String reStr = Util.stringValue(re);\n //ErlLogger.debug(\"Ll:\"+document.getLength());\n try {\n parent.document.replace(0, parent.document.getLength(), reStr);\n } catch (BadLocationException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "public void testExtendsClassname() {\n final LinkerDef baseLinker = new LinkerDef();\n baseLinker.setClassname(\"com.github.maven_nar.cpptasks.msvc.MsvcLinker\");\n final LinkerDef extendedLinker = (LinkerDef) createExtendedProcessorDef(baseLinker);\n extendedLinker.setBase(new FlexLong(\"10000\"));\n final String[] preArgs = getPreArguments(extendedLinker);\n assertEquals(\"/NOLOGO\", preArgs[0]);\n assertEquals(\"/SUBSYSTEM:WINDOWS\", preArgs[1]);\n assertEquals(\"/INCREMENTAL:NO\", preArgs[2]);\n assertEquals(\"/BASE:0x2710\", preArgs[3]);\n }", "private void setName(){\r\n\t\tString tagString = new String();\r\n\t\tfor (String k : tags.keySet()){\r\n\t\t\ttagString += \"@\" + k;\r\n\t\t}\r\n\t\tString newName = originalName + tagString +\".\"+ extension;\r\n\t\tif (!newName.equals(name)){\r\n\t\t\tremovePrevNames(newName); //if the new name is a previous name\r\n\t\t\taddPrevNames(name);\r\n\t\t\tupdateLog(newName);\r\n\t\t\tname = newName;\r\n\t\t\t//notify the tag observer\r\n\t\t\tsetChanged();\r\n\t\t\tnotifyObservers();\r\n\t\t\tclearChanged();\r\n\t\t}\r\n\t}", "public static void updateStrings() {\n String pathName;\n switch (Parameters.getLanguage()) {\n case ENGLISH:\n default:\n pathName = englishStringPath;\n break;\n case SPANISH:\n pathName = spanishStringPath;\n break;\n case CATALAN:\n pathName = catalanStringPath;\n break;\n }\n updateStrings(pathName);\n }", "public void setName(String newName) { throw new NotImplementedException(\"Variable names are final!\"); }", "private String retrieveAbsoluteName(Object obj)\r\n {\r\n return (String) objectNames.get(obj);\r\n }" ]
[ "0.5680752", "0.5531381", "0.54821396", "0.5424262", "0.5419801", "0.5383974", "0.53527284", "0.5351328", "0.53053874", "0.52851903", "0.52476406", "0.52474064", "0.5247077", "0.5234683", "0.5183763", "0.51808083", "0.5168182", "0.5163238", "0.51594144", "0.5157396", "0.5139034", "0.51380104", "0.51363134", "0.5126837", "0.5115717", "0.5114074", "0.50924265", "0.5090137", "0.50895846", "0.5083484", "0.5081548", "0.5080803", "0.507873", "0.50732225", "0.5065538", "0.5063236", "0.50632226", "0.50594604", "0.5042057", "0.50367373", "0.5024786", "0.5021315", "0.49907768", "0.49863923", "0.49712646", "0.49690074", "0.49660853", "0.49617976", "0.4957862", "0.49535072", "0.49507022", "0.49488428", "0.49427468", "0.4929185", "0.49236602", "0.49226826", "0.49110678", "0.49061427", "0.49050024", "0.49044687", "0.4891626", "0.488724", "0.48828202", "0.48758778", "0.48635197", "0.4861635", "0.4851759", "0.48512787", "0.48502567", "0.48251903", "0.4823276", "0.48215356", "0.48139685", "0.4813085", "0.47908872", "0.4789538", "0.4782978", "0.4782418", "0.47820458", "0.4779613", "0.47757363", "0.47722587", "0.47697455", "0.476742", "0.47661325", "0.47637755", "0.47590068", "0.47547287", "0.47489184", "0.4746004", "0.47404635", "0.4740425", "0.47352615", "0.47307673", "0.47286382", "0.47249845", "0.47227126", "0.47208273", "0.47199306", "0.47177544" ]
0.48167747
72
Bug report from Holger Knublach: not all elements of a union are removed
public void test_hk_05() { OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM); spec.setReasoner(null); OntModel ontModel = ModelFactory.createOntologyModel(spec, null); String ns = "http://foo.bar/fu#"; OntClass a = ontModel.createClass(ns + "A"); OntClass b = ontModel.createClass(ns + "B"); int oldCount = getStatementCount(ontModel); RDFList members = ontModel.createList(new RDFNode[] { a, b }); IntersectionClass intersectionClass = ontModel.createIntersectionClass(null, members); intersectionClass.remove(); assertEquals("Before and after statement counts are different", oldCount, getStatementCount(ontModel)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void union(int p, int q) {}", "@Test\n\tpublic void testUnion5() {\n\n\t\tint[] arr = {};\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\t\tint[] uni2 = { 0, 2, 3 };\n\t\tSLLSet listObj7 = new SLLSet(uni2);\n\t\tSLLSet listObj8 = listObj2.union(listObj7);\n\n\t\tString expected = \"0, 2, 3\";\n\t\tint expectedSize = 3;\n\n\t\tassertEquals(expectedSize, listObj8.getSize());\n\t\tassertEquals(expected, listObj8.toString());\n\n\t}", "boolean getNoUnions();", "@Test\r\n\t\tpublic void testUnion() {\n\t\t\ttestingSet = new IntegerSet(list1);\r\n\t\t\ttestingSet2= new IntegerSet(list2);\r\n\t\t\t// 3rd set =to the union of the two lists \r\n\t\t\ttestingSet3= new IntegerSet(union);\r\n\t\t\t// 4th set equal to the union of sets 1 and 2 \r\n\t\t\ttestingSet4= testingSet.union(testingSet, testingSet2);\r\n\t\t\t// sets 3 and 4 should be equal\r\n\t\t\t// assertEquals method is deprecated \r\n\t\t\tassertArrayEquals(testingSet3.toArray(),testingSet4.toArray());\r\n\t\t\t \r\n\t\t}", "@Test\n\tpublic void testUnionSLLSetArrayAll0() {\n\n\t\tint[] arr1 = { 0, 0, 0 };\n\t\tint[] arr2 = { 0, 0, 0, 0 };\n\t\tint[] arr3 = { 0, 0 };\n\t\tint[] arr4 = { 0, 0 };\n\t\tSLLSet listObj100 = new SLLSet(arr1);\n\t\tSLLSet listObj99 = new SLLSet(arr2);\n\t\tSLLSet listObj98 = new SLLSet(arr3);\n\t\tSLLSet listObj97 = new SLLSet(arr4);\n\t\tSLLSet listObj96 = new SLLSet();\n\t\tSLLSet[] Array = { listObj100, listObj99, listObj98, listObj97, listObj96 }; // test static SLLSet union(sArray)\n\n\t\tSLLSet listObj23 = SLLSet.union(Array);\n\n\t\tString expected = \"0\";\n\t\tint expectedSize = 1;\n\n\t\tassertEquals(expectedSize, listObj23.getSize());\n\t\tassertEquals(expected, listObj23.toString());\n\n\t}", "BUnion createBUnion();", "@Override\n public boolean supportsUnionAll() {\n return true;\n }", "public boolean supportsUnionAll() {\n \t\treturn false;\n \t}", "boolean hasNoUnions();", "public Bag union(Bag u) {\n return u;\n }", "@Test\n\tpublic void testRemoveAll() {\n\t\tSet<Integer> setA = new HashSet<>(Arrays.asList(1, 2, 3, 4, 5));\n\t\tSet<Integer> setB = new HashSet<>(Arrays.asList(9, 8, 7, 6, 5, 4, 3));\n\t\tsetA.removeAll(setB);\n\t\tSet<Integer> union = new HashSet<>(Arrays.asList(1, 2));\n\t\tassertEquals(setA, union);\n\t}", "public XSUnionSimpleType asUnion() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: ddiv \n // 1: fdiv \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/UnionSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "@Test(expected = NullPointerException.class)\r\n\t\tpublic void testUnionWithNullInput() {\n\t\t\ttestingSet = new IntegerSet(null);\r\n\t\t\ttestingSet2= new IntegerSet(null); \r\n\t\t\t// union of 2 sets should result in null value \r\n\t\t\ttestingSet3= testingSet.union(testingSet, testingSet2);\r\n\t\t\t\r\n\t\t}", "@Test\n public void testUnionOnSchemaSuccOps() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : int, y : int);\"\n + \"u = union onschema l1, l2;\"\n + \"o = order u by i desc;\"\n + \"lim = limit o 2;\"\n + \"fil = filter lim by i == 5 and y is null;\"\n ; \n Util.registerMultiLineQuery(pig, query); \n \n Schema sch = pig.dumpSchema(\"fil\");\n Schema expectedSch = Utils.getSchemaFromString(\"i: int, x: int, y: int\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n\n Iterator<Tuple> it = pig.openIterator(\"fil\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(5,null,null)\",\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "@Test\n\t public void test_Union_Set_Same() throws Exception{\n\t\t int[] setarray1= new int[]{1,2,3};\n\t\t int[] setarray2= new int[]{1,2,3};\n\t\t SET set = new SET(setarray1);\n\t\t int returnedArrOperation[] =set.Union(setarray1,setarray2); \n\t\t int []expectedArr = new int[] {1,2,3};\n\t\t Assert.assertArrayEquals( expectedArr, returnedArrOperation );\n\t }", "@Test\r\n public void testUnion1() {\r\n int actual[] = set1.unionOfSets(set2);\r\n Assert.assertArrayEquals(new int[] { 1, 2, 3, 4, 5 }, actual);\r\n }", "@Test\n public void testUnionWithEmptyDataSet() throws Exception {\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n // Don't know how to make an empty result in an other way than filtering it\n DataSet<Tuple3<Integer, Long, String>> empty =\n CollectionDataSets.get3TupleDataSet(env).filter(new RichFilter1());\n\n DataSet<Tuple3<Integer, Long, String>> unionDs =\n CollectionDataSets.get3TupleDataSet(env).union(empty);\n\n List<Tuple3<Integer, Long, String>> result = unionDs.collect();\n\n String expected = FULL_TUPLE_3_STRING;\n\n compareResultAsTuples(result, expected);\n }", "public final void mT__63() throws RecognitionException {\n try {\n int _type = T__63;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:61:7: ( 'union' )\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:61:9: 'union'\n {\n match(\"union\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "@Test\n public void testUnionOnSchemaNoCommonCols() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : float);\"\n + \"u = union onschema l1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,2,null,null)\",\n \"(5,3,null,null)\",\n \"(null,null,1L,2.0F)\",\n \"(null,null,5L,3.0F)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "@Test\n public void testUnionOnSchemaSameSchema() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"u = union onschema l1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Schema expectedSch = Utils.getSchemaFromString(\"i: int, j: int\");\n Schema sch = pig.dumpSchema(\"u\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,2)\",\n \"(5,3)\",\n \"(1,2)\",\n \"(5,3)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "@Test\n public void testUnionOnSchemaCastOnByteArray() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i, j);\"\n + \" f1 = foreach l1 generate (int)i, (int)j;\"\n + \"u = union onschema f1, l1;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,2)\",\n \"(5,3)\",\n \"(1,2)\",\n \"(5,3)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "public void union(Shape s);", "@Test void testInterpretUnion() {\n rootSchema.add(\"simple\", new ScannableTableTest.SimpleTable());\n final String sql = \"select * from \\\"simple\\\"\\n\"\n + \"union\\n\"\n + \"select * from \\\"simple\\\"\";\n sql(sql).returnsRowsUnordered(\"[0]\", \"[10]\", \"[20]\", \"[30]\");\n }", "@Test\n void complexUnions(TestInfo testInfo) throws Exception {\n String partial = \"[\\\"int\\\", \\\"long\\\", \\\"float\\\", \\\"double\\\", \\\"boolean\\\", \\\"bytes\\\",\"\n + \" \\\"string\\\", {\\\"type\\\":\\\"array\\\", \\\"items\\\": \\\"long\\\"},\" + \" {\\\"type\\\":\\\"map\\\", \\\"values\\\":\\\"long\\\"}\";\n String namedTypes = \", {\\\"type\\\":\\\"record\\\",\\\"name\\\":\\\"Foo\\\",\\\"fields\\\":[]},\"\n + \" {\\\"type\\\":\\\"fixed\\\",\\\"name\\\":\\\"Bar\\\",\\\"size\\\": 1},\"\n + \" {\\\"type\\\":\\\"enum\\\",\\\"name\\\":\\\"Baz\\\",\\\"symbols\\\": [\\\"X\\\"]}\";\n\n String namedTypes2 = \", {\\\"type\\\":\\\"record\\\",\\\"name\\\":\\\"Foo2\\\",\\\"fields\\\":[]},\"\n + \" {\\\"type\\\":\\\"fixed\\\",\\\"name\\\":\\\"Bar2\\\",\\\"size\\\": 1},\"\n + \" {\\\"type\\\":\\\"enum\\\",\\\"name\\\":\\\"Baz2\\\",\\\"symbols\\\": [\\\"X\\\"]}\";\n\n check(new File(DIR, testInfo.getTestMethod().get().getName()), partial + namedTypes + \"]\", false);\n check(new File(DIR, testInfo.getTestMethod().get().getName()), partial + namedTypes + namedTypes2 + \"]\", false);\n checkParseError(partial + namedTypes + namedTypes + \"]\");\n\n // fail with two branches of the same unnamed type\n checkUnionError(new Schema[] { Schema.create(Type.INT), Schema.create(Type.INT) });\n checkUnionError(new Schema[] { Schema.create(Type.LONG), Schema.create(Type.LONG) });\n checkUnionError(new Schema[] { Schema.create(Type.FLOAT), Schema.create(Type.FLOAT) });\n checkUnionError(new Schema[] { Schema.create(Type.DOUBLE), Schema.create(Type.DOUBLE) });\n checkUnionError(new Schema[] { Schema.create(Type.BOOLEAN), Schema.create(Type.BOOLEAN) });\n checkUnionError(new Schema[] { Schema.create(Type.BYTES), Schema.create(Type.BYTES) });\n checkUnionError(new Schema[] { Schema.create(Type.STRING), Schema.create(Type.STRING) });\n checkUnionError(\n new Schema[] { Schema.createArray(Schema.create(Type.INT)), Schema.createArray(Schema.create(Type.INT)) });\n checkUnionError(\n new Schema[] { Schema.createMap(Schema.create(Type.INT)), Schema.createMap(Schema.create(Type.INT)) });\n\n List<String> symbols = new ArrayList<>();\n symbols.add(\"NOTHING\");\n\n // succeed with two branches of the same named type, if different names\n Schema u;\n u = buildUnion(new Schema[] { new Schema.Parser().parse(\"{\\\"type\\\":\\\"record\\\",\\\"name\\\":\\\"x.A\\\",\\\"fields\\\":[]}\"),\n new Schema.Parser().parse(\"{\\\"type\\\":\\\"record\\\",\\\"name\\\":\\\"y.A\\\",\\\"fields\\\":[]}\") });\n check(new File(DIR, testInfo.getTestMethod().get().getName()), u.toString(), false);\n\n u = buildUnion(new Schema[] { new Schema.Parser().parse(\"{\\\"type\\\":\\\"enum\\\",\\\"name\\\":\\\"x.A\\\",\\\"symbols\\\":[\\\"X\\\"]}\"),\n new Schema.Parser().parse(\"{\\\"type\\\":\\\"enum\\\",\\\"name\\\":\\\"y.A\\\",\\\"symbols\\\":[\\\"Y\\\"]}\") });\n check(new File(DIR, testInfo.getTestMethod().get().getName()), u.toString(), false);\n\n u = buildUnion(new Schema[] { new Schema.Parser().parse(\"{\\\"type\\\":\\\"fixed\\\",\\\"name\\\":\\\"x.A\\\",\\\"size\\\":4}\"),\n new Schema.Parser().parse(\"{\\\"type\\\":\\\"fixed\\\",\\\"name\\\":\\\"y.A\\\",\\\"size\\\":8}\") });\n check(new File(DIR, testInfo.getTestMethod().get().getName()), u.toString(), false);\n\n // fail with two branches of the same named type, but same names\n checkUnionError(new Schema[] { Schema.createRecord(\"Foo\", null, \"org.test\", false),\n Schema.createRecord(\"Foo\", null, \"org.test\", false) });\n checkUnionError(new Schema[] { Schema.createEnum(\"Bar\", null, \"org.test\", symbols),\n Schema.createEnum(\"Bar\", null, \"org.test\", symbols) });\n checkUnionError(new Schema[] { Schema.createFixed(\"Baz\", null, \"org.test\", 2),\n Schema.createFixed(\"Baz\", null, \"org.test\", 1) });\n\n Schema union = buildUnion(new Schema[] { Schema.create(Type.INT) });\n // fail if creating a union of a union\n checkUnionError(new Schema[] { union });\n }", "public org.apache.gora.cascading.test.storage.TestRow.Builder clearUnionRecursive() {\n unionRecursive = null;\n fieldSetFlags()[3] = false;\n return this;\n }", "@Test\r\n public void testCreateUnion_thisIsEmpty() {\r\n Tour tourA = new Tour();\r\n Tour tourB = new Tour(new int[][]{{12, 12}});\r\n Tour result = tourA.createUnion(tourB);\r\n Tour expected = new Tour(new int[][]{{12, 12}});\r\n assertTrue(result.toString(), expected.isEqual(result));\r\n }", "public PipeUnion<T> getUnion();", "private static Collection<Node> union(Collection<Node> xs, Collection<Node> ys) {\n if (xs == null || xs.size() == 0) {\n return ys;\n }\n if (ys == null || ys.size() == 0) {\n return xs;\n }\n \n List<Node> result = new ArrayList<>(xs);\n for (Node y : ys) {\n if (!result.contains(y)) {\n result.add(y);\n }\n }\n return result;\n }", "@Test\n public void testUnionOnSchemaDiffNumType() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : double);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : long, j : float);\"\n + \"u = union onschema l1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1L,2.0)\",\n \"(5L,3.0)\",\n \"(1L,2.0)\",\n \"(5L,3.0)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "@Test\n public void testUnionOnSchemaScopedColumnNameNeg() throws Exception {\n \n String expectedErr = \"Found more than one match: l1::i, l2::i\";\n String query_prefix =\n \" l1 = load '/tmp/fn' as (i : int, j : long); \"\n + \"l2 = load '/tmp/fn' as (i : int, j : long); \"\n + \"cg = cogroup l1 by i, l2 by i;\"\n + \"f = foreach cg generate flatten(l1), flatten(l2); \"\n + \"l3 = load '/tmp/fn2' as (i : int, j : long); \"\n ;\n String query = query_prefix + \"u = union onschema f, l3; \";\n checkSchemaEx(query, expectedErr);\n\n // now try reversing the order of relation\n query = query_prefix + \"u = union onschema l3, f; \";\n checkSchemaEx(query, expectedErr);\n\n }", "public Filter doUnion(Filter f);", "public Set union(Set join){\n Set newSet = new Set();\n for(int element = 0; element < join.size(); element++){\n if (!elementOf(join.getSet()[element]))\n newSet.add(join.getSet()[element]);\n }\n for(int element = 0; element < set.length; element++){\n newSet.add(set[element]);\n }\n return newSet;\n }", "@Test\n public void testUnionOnSchemaFilter() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, x : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"u = union onschema l1, l2;\"\n + \"fil = filter u by i == 5 and (x is null or x != 1);\"\n ; \n Util.registerMultiLineQuery(pig, query);\n \n Schema sch = pig.dumpSchema(\"fil\");\n Schema expectedSch = Utils.getSchemaFromString(\"i: int, x: int, j: int\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n\n Iterator<Tuple> it = pig.openIterator(\"fil\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(5,null,3)\",\n \"(5,3,null)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "public boolean isUnion() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: laload \n // 1: dastore \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/UnionSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "@Test\n public void testUnionOnSchemaScopeMulti() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query_prefix =\n \" a = load '\" + INP_FILE_2NUMS+ \"' as (i:int, j:int); \"\n + \"b = group a by i; \"\n + \"c = foreach b generate group as gp, flatten(a); \"\n + \"d = group c by $0; \"\n + \"e = foreach d generate group as gp, flatten(c); \"\n + \"f = load '\" + INP_FILE_2NUMS + \"' as (i, j); \"\n ;\n String query = query_prefix + \"u = union onschema e,f;\";\n Util.registerMultiLineQuery(pig, query);\n\n Schema sch = pig.dumpSchema(\"u\");\n Schema expectedSch = \n Utils.getSchemaFromString(\"gp: int,c::gp: int,i: int,j: int\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n \n query = query_prefix + \"u = union onschema f,e;\";\n Util.registerMultiLineQuery(pig, query);\n\n sch = pig.dumpSchema(\"u\");\n expectedSch = \n Utils.getSchemaFromString(\"i: int,j: int, gp: int,c::gp: int\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n \n Iterator<Tuple> it = pig.openIterator(\"u\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,2,null,null)\",\n \"(5,3,null,null)\",\n \"(1,2,1,1)\",\n \"(5,3,5,5)\",\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "void unsetUnordered();", "public Builder clearNoUnions() {\n bitField0_ = (bitField0_ & ~0x00000080);\n noUnions_ = false;\n onChanged();\n return this;\n }", "@Override\n\tpublic SetLinkedList<T> union(SetLinkedList<T> otherSet) {\n\t\tthrow new UnsupportedOperationException(\"Not implemented yet!\");\n\t}", "@Test\n public void testUnionOnSchemaNoSchema() throws Exception {\n String expectedErr = \"UNION ONSCHEMA cannot be used with \" +\n \"relations that have null schema\";\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' ;\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : float);\"\n + \"u = union onschema l1, l2;\"\n ; \n checkSchemaEx(query, expectedErr);\n \n query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' ;\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' ;\"\n + \"u = union onschema l1, l2;\"\n ; \n checkSchemaEx(query, expectedErr);\n\n }", "@Test\n public void testUnionOnSchemaInputUdfs() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : chararray);\"\n + \"f1 = foreach l1 generate i, CONCAT(j,j) as cj, \" +\n \t\t\"org.apache.pig.test.TestUnionOnSchema\\\\$UDFTupleNullSchema(i,j) as uo;\"\n + \"u = union onschema f1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n\n Schema sch = pig.dumpSchema(\"u\");\n String expectedSch = \"{i: int,cj: chararray,uo: (),j: chararray}\";\n Assert.assertTrue( expectedSch.equals( sch.toString() ) );\n \n\n Iterator<Tuple> it = pig.openIterator(\"u\");\n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,null,null,'2')\",\n \"(5,null,null,'3')\",\n \"(1,'22',(1,'2'),null)\",\n \"(5,'33',(5,'3'),null)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "public Set Union(Set secondSet) {\n\t\t\n\t\tArrayList<String> firstArray = noDuplicates(stringArray);\n\t\t// Taking out duplications out of our sets by calling the noDuplicates private function\n\t\tArrayList<String> secondArray = noDuplicates(secondSet.returnArray());\n\t\t\n\t\tArrayList<String> unionOfBoth = new ArrayList<String>();\n\t\t// New ArrayList to hold the final values\n\t\t\n\t\tfor (int i=0; i < 10; i++) {\n\t\t\tif (firstArray.size() > i) {\n\t\t\t\tif (unionOfBoth.contains(firstArray.get(i)) == false && firstArray.get(i).equals(\"emptyElement\") == false) {\n\t\t\t\t\tunionOfBoth.add(firstArray.get(i));\n\t\t\t\t\t// If our final ArrayList does not already contain the element, and the item is not an empty string\n\t\t\t\t\t// (Does not contain the phrase \"emptyElement\"), then add it to our final ArrayList\n\t\t\t\t}\n\t\t\t\telse if (unionOfBoth.contains(firstArray.get(i)) == false && firstArray.get(i).equals(\"emptyElement\")) {\n\t\t\t\t\tunionOfBoth.add(\"\");\n\t\t\t\t\t// If our final ArrayList does not already contain the element, but the item is an empty string\n\t\t\t\t\t// (Does contain the phrase \"emptyElement\"), then add an empty string to our final ArrayList\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (secondArray.size() > i) {\n\t\t\t\tif (unionOfBoth.contains(secondArray.get(i)) == false && secondArray.get(i).equals(\"emptyElement\") == false) {\n\t\t\t\t\tunionOfBoth.add(secondArray.get(i));\n\t\t\t\t\t// If our final ArrayList does not already contain the element, and the item is not an empty string\n\t\t\t\t\t// (Does not contain the phrase \"emptyElement\"), then add it to our final ArrayList\n\t\t\t\t}\n\t\t\t\telse if (unionOfBoth.contains(secondArray.get(i)) == false && secondArray.get(i).equals(\"emptyElement\")) {\n\t\t\t\t\tunionOfBoth.add(\"\");\n\t\t\t\t\t// If our final ArrayList does not already contain the element, but the item is an empty string\n\t\t\t\t\t// (Does contain the phrase \"emptyElement\"), then add an empty string to our final ArrayList\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tSet unionReturn = new Set(unionOfBoth); // Initiate a Set object from out final ArrayList\n\t\t\n\t\treturn unionReturn; // Return the final Set Object\n\t}", "public boolean getNoUnions() {\n return noUnions_;\n }", "@Test\n public void testUnion2IdenticalDataSets() throws Exception {\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n DataSet<Tuple3<Integer, Long, String>> ds = CollectionDataSets.get3TupleDataSet(env);\n DataSet<Tuple3<Integer, Long, String>> unionDs =\n ds.union(CollectionDataSets.get3TupleDataSet(env));\n\n List<Tuple3<Integer, Long, String>> result = unionDs.collect();\n\n String expected = FULL_TUPLE_3_STRING + FULL_TUPLE_3_STRING;\n\n compareResultAsTuples(result, expected);\n }", "public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }", "public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }", "public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\n }", "@Test\n public void testUnionOnSchemaIncompatibleTypes() throws Exception {\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : float);\"\n + \"u = union onschema l1, l2;\";\n\n checkSchemaEx(query, \"Cannot cast from chararray to bytearray\");\n\n //without \"onschema\"\n query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : float);\"\n + \"u = union l1, l2;\";\n\n checkSchemaEx(query, \"Cannot cast from chararray to bytearray\");\n\n\n \n query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : map[ ], y : chararray);\"\n + \"u = union onschema l1, l2;\"\n ; \n checkSchemaEx(query, \"Cannot cast from long to bytearray\");\n \n query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (x : long, y : chararray);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (x : map[ ], y : chararray);\"\n + \"u = union l1, l2;\"\n ;\n checkSchemaEx(query, \"Cannot cast from long to bytearray\");\n\n // bag column with different internal column types\n query =\n \" l1 = load '\" + INP_FILE_2NUMS \n + \"' as (x : long, b : bag { t : tuple (c1 : int, c2 : chararray)} );\"\n \n + \"l2 = load '\" + INP_FILE_2NUMS \n + \"' as (x : long, b : bag { t : tuple (c1 : long, c2 : chararray)} );\"\n + \"u = union onschema l1, l2;\"\n ; \n Schema sch = new Schema();\n sch.add(new FieldSchema(\"x\", DataType.LONG));\n Schema bagInnerSchema = new Schema();\n bagInnerSchema.add(new FieldSchema(null, new Schema(), DataType.TUPLE));\n sch.add(new FieldSchema(\"b\", bagInnerSchema, DataType.BAG));\n checkSchemaEquals(query, sch);\n \n // tuple column with different internal column types\n query =\n \" l1 = load '\" + INP_FILE_2NUMS \n + \"' as (t : tuple (c1 : int, c2 : chararray) );\"\n \n + \"l2 = load '\" + INP_FILE_2NUMS \n + \"' as (t : tuple (c1 : long, c2 : chararray) );\"\n + \"u = union onschema l1, l2;\"\n ; \n sch = new Schema();\n sch.add(new FieldSchema(\"t\", new Schema(), DataType.TUPLE));\n checkSchemaEquals(query, sch);\n }", "public org.apache.gora.cascading.test.storage.TestRow.Builder clearUnionLong() {\n unionLong = null;\n fieldSetFlags()[5] = false;\n return this;\n }", "@Test\n public void testUnionOnSchema3Inputs() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int); \"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : double, x : int); \" \n + \"l3 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : long, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)} ); \"\n + \"u = union onschema l1, l2, l3;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n pig.explain(\"u\", System.out);\n\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1.0,2,null,null,null)\",\n \"(5.0,3,null,null,null)\",\n \"(1.0,null,2,null,null)\",\n \"(5.0,null,3,null,null)\",\n \"(1.0,2,null,'abc',{(1,'a'),(1,'b')})\",\n \"(5.0,3,null,'def',{(2,'a'),(2,'b')})\",\n\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "private static <T> Set<T> union(Collection<T> c1, Collection<T> c2) {\n return Stream.concat(c1.stream(), c2.stream()).collect(Collectors.toUnmodifiableSet());\n }", "@Override\n public SetI union(SetI other) {\n Set o;\n\n if (!(other instanceof Set)) {\n // Different Set impl. Convertion needed.\n // Will impact performance.\n o = Set.fromAnotherImpl(other);\n }\n else {\n o = (Set) other;\n }\n\n int[] newArr = new int[count + o.count];\n int i = 0, j = 0, k = 0;\n\n // Merge sorted arrays.\n while (i < count && j < o.count) {\n // Skip duplicated elements.\n if (contains(o.arr[j])) {\n ++j;\n }\n else if (arr[i] < o.arr[j]) {\n newArr[k++] = arr[i++];\n }\n else {\n newArr[k++] = o.arr[j++];\n }\n }\n\n while (i < count) {\n newArr[k++] = arr[i++];\n }\n\n while (j < o.count) {\n // Skip duplicated elements.\n if (!contains(o.arr[j])) {\n newArr[k++] = o.arr[j];\n }\n ++j;\n }\n\n return new Set(newArr, k);\n }", "public boolean getNoUnions() {\n return noUnions_;\n }", "public static synchronized Vector union(Vector left, Vector right)\n\t throws IcofException {\n\n\tString funcName = new String(\"union(Vector, Vector)\");\n\n\tVector aUnion = new Vector();\n\n\ttry {\n\n\t for (int i = 0; i < left.size(); i++) {\n\t\tif (!left.elementAt(i).toString().equals(\"\")) {\n\t\t if (!aUnion.contains(left.elementAt(i))) {\n\t\t\taUnion.add(left.elementAt(i));\n\t\t }\n\t\t}\n\t }\n\n\t for (int j = 0; j < right.size(); j++) {\n\t\tif (!right.elementAt(j).toString().equals(\"\")) {\n\t\t if (!aUnion.contains(right.elementAt(j))) {\n\t\t\taUnion.add(right.elementAt(j));\n\t\t }\n\t\t}\n\t }\n\n\t aUnion.trimToSize();\n\t} catch (Exception e) {\n\t IcofException ie = new IcofException(CLASS_NAME, funcName,\n\t\t IcofException.SEVERE, \"Error creating union of Vectors \",\n\t\t \"\");\n\t throw (ie);\n\t}\n\n\treturn aUnion;\n }", "@Test\n public void testUnionOnSchemaUdfTypeEvolution() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query_prefix =\n \" l1 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \" l2 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \"f1 = foreach l1 generate i, MAX(b.c1) as mx;\"\n + \"f2 = foreach l2 generate i, COUNT(b.c1) as mx;\"\n\n ; \n String query = query_prefix + \"u = union onschema f1, f2;\";\n Util.registerMultiLineQuery(pig, query);\n Schema sch = pig.dumpSchema(\"u\");\n Schema expectedSch = \n Utils.getSchemaFromString(\"i: int, mx: long\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n // verify schema for reverse order of relations as well\n query = query_prefix + \"u = union onschema f2, f1;\";\n Util.registerMultiLineQuery(pig, query);\n sch = pig.dumpSchema(\"u\");\n expectedSch = \n Utils.getSchemaFromString(\"i: int, mx: long\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n \n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,1L)\",\n \"(5,2L)\",\n \"(1,2L)\",\n \"(5,2L)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "public void check_union_set(boolean on){\r\n this.e_union_set = on;\r\n }", "public ZYSet<ElementType> union(ZYSet<ElementType> otherSet){\n ZYSet<ElementType> result = new ZYArraySet<ElementType>();\n for(ElementType e :this){\n result.add(e);\n }\n for(ElementType e :otherSet){\n result.add(e);\n }\n \n return result;\n }", "public Set union(Set in_set) throws SetException {\n\t\tSet union = new Set(this);\n\t\tfor (Object element : in_set.list) {\n\t\t\tif (!member(element))\n\t\t\t\tunion.addItem(element);\n\t\t}\n\t\treturn union;\n\t}", "public org.apache.gora.cascading.test.storage.TestRow.Builder clearUnionString() {\n unionString = null;\n fieldSetFlags()[4] = false;\n return this;\n }", "public void union(String first, String second) {\n\t\t\n\t\tString firstRepresentative = find(first);\n\t\tString secondRepresentative = find(second);\n\t\t\n\t\tSet<String> firstSet = null;\n\t\tSet<String> secondSet = null;\n\t\t\n\t\t//look for the sets containing the first and second elements \n\t\tfor(int i = 0; i < disjointSet.size(); i++) {\n\t\t\tMap<String, Set<String>> map = disjointSet.get(i);\n\t\t\tif(map.containsKey(firstRepresentative)) {\n\t\t\t\tfirstSet = map.get(firstRepresentative);\n\t\t\t}\n\t\t\tif(map.containsKey(secondRepresentative)) {\n\t\t\t\tsecondSet = map.get(secondRepresentative);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(firstSet != null && secondSet != null) {\n\t\t\t\n\t\t\t//merge the two sets\n\t\t\tfirstSet.addAll(secondSet);\n\t\t\t\n\t\t\t//select a representative and delete the set already merged \n\t\t\tfor(int i = 0; i < disjointSet.size(); i++) {\n\t\t\t\tMap<String, Set<String>> map = disjointSet.get(i);\n\t\t\t\tif(map.containsKey(firstRepresentative)) {\n\t\t\t\t\tmap.put(firstRepresentative, firstSet);\n\t\t\t\t}\n\t\t\t\telse if(map.containsKey(secondRepresentative)) {\n\t\t\t\t\tmap.remove(secondRepresentative);\n\t\t\t\t\tdisjointSet.remove(i);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "@Test\n public void testUnionOnSchemaAdditionalColumn() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"l2 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : long, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \"l3 = load '\" + INP_FILE_EMPTY + \"' as (i : int, x : long);\"\n + \"u = union onschema l1, l2, l3;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n pig.explain(\"u\", System.out);\n\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1L,2,null,null,null,null)\",\n \"(5L,3,null,null,null,null)\",\n \"(1L,2,'abc',{(1,'a'),(1,'b')},(1,'c'),null)\",\n \"(5L,3,'def',{(2,'a'),(2,'b')},(2,'c'),null)\",\n\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "UnionSecuenciaLuz createUnionSecuenciaLuz();", "@Test\n public void testUnionOnSchemaByteArrayConversions() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : bytearray, x : bytearray, j : bytearray \" \n + \", b : bytearray); \"\n + \"l2 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : long, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)} ); \"\n + \"u = union onSchema l1, l2;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n pig.explain(\"u\", System.out);\n\n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1L,null,2,{(1,'a'),(1,'b')},'abc')\",\n \"(1L,'abc',2,{(1,'a'),(1,'b')},null)\",\n \"(5L,null,3,{(2,'a'),(2,'b')},'def')\",\n \"(5L,'def',3,{(2,'a'),(2,'b')},null)\", \n });\n //update expectedRes to use bytearray instead of chararray in 2nd field\n for(Tuple t : expectedRes){\n if(t.get(1) != null){\n t.set(1, new DataByteArray(t.get(1).toString()));\n }\n }\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "public final void mT__79() throws RecognitionException {\n try {\n int _type = T__79;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:77:7: ( 'union' )\n // InternalMyDsl.g:77:9: 'union'\n {\n match(\"union\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public T caseUnion(Union object) {\n\t\treturn null;\n\t}", "public static Set unionRaw(Set s1, Set s2) {\n\t\t// Warning : HashSet is a raw type. References to generic type HashSet<E> should\n\t\t// be parameterized\n\t\tSet result = new HashSet(s1);\n\t\t// Warning : Type safety: The method addAll(Collection) belongs to the raw type\n\t\t// Set. References to generic type Set<E> should be parameterized\n\t\tresult.addAll(s2);\n\t\treturn result;\n\t}", "void union(int a, int b) {\n\t\tif (a==9 && b==4){\r\n\t\tSystem.out.println(\"DEBUGGING 9 AND 4\");\r\n\t\tSystem.out.println(\"size of A: \"+ sizeOf(a));\r\n\t\tSystem.out.println(\"size of B: \"+ sizeOf(b));\r\n\t\t}\r\n\t\tint rootB = getRoot(b); // N array access\r\n\t\tint rootA = getRoot(a); // N array access\r\n\t\tif (rootA==rootB)return;\r\n\r\n\t\tif (sizeOf(rootA)<sizeOf(rootB)){\r\n\t\t\tidNode[rootA] = rootB; // 1 array access\r\n\t\t}\r\n\t\telse{\r\n\t\t\tidNode[rootB] = rootA; // 1 array access\r\n\t\t}\r\n\t}", "@Test\n public void testUnionOnSchemaUdfTypeEvolution2() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query_prefix =\n \" l1 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \" l2 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \" \n + \" (i : int, c : chararray, j : int \" \n + \", b : bag { t : tuple (c1 : int, c2 : chararray)}\" \n + \", t : tuple (tc1 : int, tc2 : chararray) );\"\n + \"f1 = foreach l1 generate i, MAX(b.c1) as mx;\"\n + \"f11 = foreach f1 generate i, mx;\"\n + \"f2 = foreach l2 generate i, COUNT(b.c1) as mx;\"\n + \"f22 = foreach f2 generate i, mx;\"\n\n ; \n String query = query_prefix + \"u = union onschema f11, f22;\";\n Util.registerMultiLineQuery(pig, query);\n Schema sch = pig.dumpSchema(\"u\");\n Schema expectedSch = \n Utils.getSchemaFromString(\"i: int, mx: long\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n // verify schema for reverse order of relations as well\n query = query_prefix + \"u = union onschema f22, f11;\";\n Util.registerMultiLineQuery(pig, query);\n sch = pig.dumpSchema(\"u\");\n expectedSch = \n Utils.getSchemaFromString(\"i: int, mx: long\");\n assertEquals(\"Checking expected schema\",sch, expectedSch);\n \n \n Iterator<Tuple> it = pig.openIterator(\"u\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1,1L)\",\n \"(5,2L)\",\n \"(1,2L)\",\n \"(5,2L)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "@Test\n public void testTwoUnions() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUMS + \"' as (i : int, j : int);\"\n + \"l2 = load '\" + INP_FILE_2NUMS + \"' as (i : long, j : int);\"\n + \"u1 = union onschema l1, l2;\"\n + \"l3 = load '\" + INP_FILE_2NUMS + \"' as (i : long, j : double);\"\n + \"u2 = union onschema u1, l3;\"\n ; \n Util.registerMultiLineQuery(pig, query);\n Iterator<Tuple> it = pig.openIterator(\"u2\");\n \n List<Tuple> expectedRes = \n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1L,2.0)\",\n \"(5L,3.0)\",\n \"(1L,2.0)\",\n \"(5L,3.0)\",\n \"(1L,2.0)\",\n \"(5L,3.0)\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n\n }", "@Override\n\tpublic Type union(Type t) {\n\t\treturn this;\n\t}", "@Test\r\n public void test_UnionOf_simple() {\r\n System.out.println(\"unionOf\");\r\n int p = 11;\r\n int q = 99;\r\n UnionFind instance = new QuickUnion(100);\r\n instance.unionOf(p, q);\r\n assertEquals(true, instance.isConnected(p, q));\r\n\r\n }", "@Test\n public void testUnion5IdenticalDataSets() throws Exception {\n\n final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n DataSet<Tuple3<Integer, Long, String>> ds = CollectionDataSets.get3TupleDataSet(env);\n DataSet<Tuple3<Integer, Long, String>> unionDs =\n ds.union(CollectionDataSets.get3TupleDataSet(env))\n .union(CollectionDataSets.get3TupleDataSet(env))\n .union(CollectionDataSets.get3TupleDataSet(env))\n .union(CollectionDataSets.get3TupleDataSet(env));\n\n List<Tuple3<Integer, Long, String>> result = unionDs.collect();\n\n String expected =\n FULL_TUPLE_3_STRING\n + FULL_TUPLE_3_STRING\n + FULL_TUPLE_3_STRING\n + FULL_TUPLE_3_STRING\n + FULL_TUPLE_3_STRING;\n\n compareResultAsTuples(result, expected);\n }", "public boolean hasUnionRecursive() {\n return fieldSetFlags()[3];\n }", "public NodeUnion<? extends IdentifierListNode> getUnionForTargets();", "protected <Ty> HashSet<Ty> union(HashSet<Ty> setA, HashSet<Ty> setB) {\n HashSet<Ty> retSet = new HashSet<>();\n retSet.addAll(setA);\n retSet.addAll(setB);\n return retSet;\n }", "void unsetCombine();", "@Test void testMergeUnionOnStringDifferentCollation() {\n tester()\n .withHook(Hook.PLANNER, (Consumer<RelOptPlanner>) planner ->\n planner.removeRule(EnumerableRules.ENUMERABLE_UNION_RULE))\n .withRel(b -> {\n final RelBuilder builder = b.transform(c -> c.withSimplifyValues(false));\n return builder\n .values(builder.getTypeFactory().builder()\n .add(\"name\",\n builder.getTypeFactory().createSqlType(SqlTypeName.VARCHAR)).build(),\n \"facilities\", \"HR\", \"administration\", \"Marketing\")\n .values(createRecordVarcharSpecialCollation(builder),\n \"Marketing\", \"administration\", \"presales\", \"HR\")\n .union(false)\n .sort(0)\n .build();\n })\n .explainHookMatches(\"\" // It is important that we have MergeUnion in the plan\n + \"EnumerableMergeUnion(all=[false])\\n\"\n + \" EnumerableSort(sort0=[$0], dir0=[ASC])\\n\"\n + \" EnumerableCalc(expr#0=[{inputs}], expr#1=[CAST($t0):VARCHAR COLLATE \\\"ISO-8859-1$en_US$tertiary$JAVA_COLLATOR\\\" NOT NULL], name=[$t1])\\n\"\n + \" EnumerableValues(tuples=[[{ 'facilities' }, { 'HR' }, { 'administration' }, { 'Marketing' }]])\\n\"\n + \" EnumerableSort(sort0=[$0], dir0=[ASC])\\n\"\n + \" EnumerableValues(tuples=[[{ 'Marketing' }, { 'administration' }, { 'presales' }, { 'HR' }]])\\n\")\n .returnsOrdered(\"name=administration\",\n \"name=facilities\",\n \"name=HR\",\n \"name=Marketing\",\n \"name=presales\");\n }", "@Override\n public IntSet union(IntSet other) {\n return other;\n }", "public boolean hasNoUnions() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "public static void union(int u, int v) {\n\t\tu = root(u); // optimizations\n\t\tv = root(v); // to make find faster\n\t\tif (u == v) return; // already in same component\n\t\t\n\t\tif (size[u] >= size[v]) {\n\t\t\tp[v] = u;\n\t\t\tsize[u] += size[v];\n\t\t} else {\n\t\t\tp[u] = v;\n\t\t\tsize[v] += size[u];\n\t\t}\n\t}", "@Test\n public void testRemoveAll_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.removeAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "public boolean hasNoUnions() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }", "public BSTSet union(BSTSet s) {\n int[] thisArray = BSTToArray();\n int[] sArray = s.BSTToArray();\n int[] unionArray = new int[thisArray.length + sArray.length];\n int unionArrayIndex = 0;\n\n // add both arrays together\n for (int i = 0; i < thisArray.length; i++) {\n unionArray[unionArrayIndex++] = thisArray[i];\n }\n\n for (int i = 0; i < sArray.length; i++) {\n unionArray[unionArrayIndex++] = sArray[i];\n }\n\n return new BSTSet(unionArray);\n }", "@Test void testInterpretUnionAll() {\n rootSchema.add(\"simple\", new ScannableTableTest.SimpleTable());\n final String sql = \"select * from \\\"simple\\\"\\n\"\n + \"union all\\n\"\n + \"select * from \\\"simple\\\"\";\n sql(sql).returnsRowsUnordered(\"[0]\", \"[10]\", \"[20]\", \"[30]\", \"[0]\", \"[10]\",\n \"[20]\", \"[30]\");\n }", "protected void reflectRelationOnUnionQuery(ConditionQuery baseQueryAsSuper, ConditionQuery unionQueryAsSuper) {\r\n }", "public NodeUnion<? extends DeclaredTypeListNode> getUnionForBounds();", "@Test\n public void testUnionOnSchemaInnerSchema() throws Exception {\n PigServer pig = new PigServer(Util.getLocalTestMode());\n String query =\n \" l1 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \"\n + \" (i : long, c : chararray, j : int \"\n + \", b : bag { t : tuple (c1 : int, c2 : chararray)} ); \"\n + \"l2 = load '\" + INP_FILE_2NUM_1CHAR_1BAG + \"' as \"\n + \" (i : long, c : chararray, j : int \"\n + \", b : bag { t : tuple (c1 : int, c2 : chararray)} ); \"\n + \"u = union onschema l1, l2; \"\n // The addition in the inner foreach will fail if the inner schema's uids\n // are all set to -1, since the code that finds the inner load's schema will\n // match the last item in b's schema, which is a chararray\n + \"p = foreach u { x = foreach b GENERATE c1 + 5 as c3; GENERATE i, c, x; }\";\n\n Util.registerMultiLineQuery(pig, query);\n pig.explain(\"p\", System.out);\n\n Iterator<Tuple> it = pig.openIterator(\"p\");\n\n List<Tuple> expectedRes =\n Util.getTuplesFromConstantTupleStrings(\n new String[] {\n \"(1L,'abc',{(6),(6)})\",\n \"(5L,'def',{(7),(7)})\",\n \"(1L,'abc',{(6),(6)})\",\n \"(5L,'def',{(7),(7)})\"\n });\n Util.checkQueryOutputsAfterSort(it, expectedRes);\n }", "public ArrayList<Predmet> union(ArrayList<ArrayList<Predmet>> listU){\n\t\tSet<Predmet> set = new HashSet<Predmet>();\n\t\t\n\t\tfor(ArrayList<Predmet> p : listU)\n\t\t\tset.addAll(p);\n\t\t\n\t\treturn new ArrayList<Predmet>(set);\n\t}", "public void removeRepresentations()\r\n\t{\n\t}", "@Test\n public void testUnionOfLists() {\n System.out.println(\"UnionOfLists\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n arr1.add(10);\n arr1.add(23);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(23);\n arr2.add(10);\n Collections.sort(arr1);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n List result = instance.UnionOfLists();\n Collections.sort(result);\n assertEquals(arr1, result);\n }", "public void setUnionAnthor(String unionAnthor) {\n this.unionAnthor = unionAnthor;\n }", "public org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union getUnion()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union target = null;\n target = (org.apache.xmlbeans.impl.xb.xsdschema.UnionDocument.Union)get_store().find_element_user(UNION$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "@Override\r\n protected void reflectRelationOnUnionQuery(ConditionQuery bq, ConditionQuery uq) {\r\n String msg = \"InlineView must not need UNION method: \" + bq + \" : \" + uq;\r\n throw new IllegalConditionBeanOperationException(msg);\r\n }", "public void reflectRelationOnUnionQuery(ConditionQuery bqs, ConditionQuery uqs) {\r\n WhiteStilettoAliasRefCQ bq = (WhiteStilettoAliasRefCQ)bqs;\r\n WhiteStilettoAliasRefCQ uq = (WhiteStilettoAliasRefCQ)uqs;\r\n if (bq.hasConditionQueryWhiteStilettoAlias()) {\r\n uq.queryWhiteStilettoAlias().reflectRelationOnUnionQuery(bq.queryWhiteStilettoAlias(), uq.queryWhiteStilettoAlias());\r\n }\r\n }", "public static FlavorSet union(FlavorSet a, FlavorSet b) {\n if (a.isEmpty()) {\n return b;\n } else if (b.isEmpty()) {\n return a;\n } else {\n return new FlavorSet(\n Stream.concat(a.flavors.stream(), b.flavors.stream())\n .collect(ImmutableSortedSet.toImmutableSortedSet(FLAVOR_ORDERING)));\n }\n }", "public static void TEST_UNION(Feature f_parent, Feature f_left, Feature f_right) {\n int i;\n\n if ((!f_parent.type.equals(f_left.type)) || (!f_parent.type.equals(f_right.type)))\n Dataset.perror(\n \"Feature.class :: parent feature of type \"\n + f_parent.type\n + \" but children: \"\n + f_left.type\n + \", \"\n + f_right.type);\n\n if (Feature.IS_CONTINUOUS(f_parent.type)) {\n if ((f_left.dmin != f_parent.dmin) || (f_right.dmax != f_parent.dmax))\n Dataset.perror(\"Feature.class :: double domain does not cover parent's range\");\n if (f_left.dmax != f_right.dmin)\n Dataset.perror(\"Feature.class :: double domain union mismatch\");\n } else if (Feature.IS_INTEGER(f_parent.type)) {\n if ((f_left.imin != f_parent.imin) || (f_right.imax != f_parent.imax))\n Dataset.perror(\"Feature.class :: integer domain does not cover parent's range\");\n if (f_left.imax + 1 != f_right.imin)\n Dataset.perror(\n \"Feature.class :: integer domain union mismatch : f_left.imax = \"\n + f_left.imax\n + \", f_right.imin = \"\n + f_right.imin);\n } else if (Feature.IS_NOMINAL(f_parent.type)) {\n if ((f_left.modalities == null) || (f_right.modalities == null))\n Dataset.perror(\"Feature.class :: nominal domain has null domain in a child\");\n if ((f_left.modalities.size() == 0) || (f_right.modalities.size() == 0))\n Dataset.perror(\"Feature.class :: nominal domain has empty domain in a child\");\n if (f_parent.modalities == null)\n Dataset.perror(\"Feature.class :: nominal domain has null domain in parent\");\n if (f_parent.modalities.size() == 0)\n Dataset.perror(\"Feature.class :: nominal domain has empty domain in parent\");\n for (i = 0; i < f_left.modalities.size(); i++)\n if (!f_parent.modalities.contains((String) f_left.modalities.elementAt(i)))\n Dataset.perror(\n \"Feature.class :: parent's nominal domain does not contain left child modality \"\n + ((String) f_left.modalities.elementAt(i)));\n for (i = 0; i < f_right.modalities.size(); i++)\n if (!f_parent.modalities.contains((String) f_right.modalities.elementAt(i)))\n Dataset.perror(\n \"Feature.class :: parent's nominal domain does not contain right child modality \"\n + ((String) f_right.modalities.elementAt(i)));\n if (f_left.modalities.size() + f_right.modalities.size() != f_parent.modalities.size())\n Dataset.perror(\n \"Feature.class :: parent's nominal domain contains modalities not in children\");\n }\n }", "public void setUnionForBounds(NodeUnion<? extends DeclaredTypeListNode> bounds) throws NullPointerException;", "@Test\r\n public void testCreateUnion_OneAndOne() {\r\n Tour tourA = new Tour(new int[][]{{1, 1}});\r\n Tour tourB = new Tour(new int[][]{{12, 12}});\r\n Tour result = tourA.createUnion(tourB);\r\n Tour expected = new Tour(new int[][]{{1, 1}, {12, 12}});\r\n assertTrue(result.toString(), expected.isEqual(result));\r\n }", "@Override\n public SetInterface<T> union(SetInterface<T> rhs) {\n //create return SetInterface\n SetInterface<T> result = new LinkedSet();\n //add the items from the calling set to the result set\n Node n = first;\n while(n != null){\n result.addItem(n.value);\n n = n.next;\n }\n \n //convert rhs to an array so we know what we're dealing with\n T[] rhsArr = rhs.toArray();\n //add the items from rhsArr to result\n for(int i = 0; i < rhsArr.length; i++){\n result.addItem(rhsArr[i]);\n }\n \n return result;\n }", "public static boolean UnionOperator(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"UnionOperator\")) return false;\n if (!nextTokenIs(b, \"<union operator>\", K_UNION, PIPE)) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_, UNION_OPERATOR, \"<union operator>\");\n r = consumeToken(b, K_UNION);\n if (!r) r = consumeToken(b, PIPE);\n exit_section_(b, l, m, r, false, null);\n return r;\n }", "public void union(Node a, Node b) {\n Node set1 = find(a);\n Node set2 = find(b);\n\n if (set1 != set2) {\n // Limits the worst case runtime of a find to O(log N)\n if (set1.getSize() < set2.getSize()) {\n set2.setParent(set1);\n set1.setSize(set1.getSize() + set2.getSize());\n }\n else {\n set1.setParent(set2);\n set2.setSize(set1.getSize() + set2.getSize());\n }\n }\n }", "public org.apache.gora.cascading.test.storage.TestRow.Builder clearUnionDefNull() {\n unionDefNull = null;\n fieldSetFlags()[6] = false;\n return this;\n }" ]
[ "0.6647736", "0.6597184", "0.65100104", "0.64949393", "0.6414737", "0.6407552", "0.6358547", "0.63571", "0.63311446", "0.61577183", "0.6139773", "0.6118107", "0.6101388", "0.6098091", "0.60634315", "0.60463345", "0.6036528", "0.6010859", "0.59984225", "0.5990614", "0.59903663", "0.5976362", "0.5963929", "0.593163", "0.59249926", "0.5916326", "0.5906867", "0.58937764", "0.5878122", "0.58522975", "0.5840951", "0.58280814", "0.5805219", "0.5799857", "0.57952625", "0.57591003", "0.5749917", "0.57478833", "0.5744292", "0.5741492", "0.5726941", "0.5718534", "0.57073164", "0.56990606", "0.56990606", "0.56990606", "0.56948996", "0.56774044", "0.5673425", "0.5656495", "0.5642966", "0.5642462", "0.5628278", "0.5620837", "0.5613346", "0.56051236", "0.56036115", "0.56028074", "0.55997217", "0.558383", "0.557323", "0.5571905", "0.5571595", "0.555475", "0.5549164", "0.5533372", "0.55299294", "0.5505522", "0.5494912", "0.5489569", "0.5482278", "0.5472698", "0.54712963", "0.5464787", "0.54640853", "0.5462425", "0.54446304", "0.544392", "0.5440537", "0.54261637", "0.5414787", "0.54131866", "0.54111576", "0.54094386", "0.54051006", "0.53879976", "0.5386449", "0.53786856", "0.53784424", "0.53779846", "0.5353532", "0.5346692", "0.5344636", "0.5338364", "0.53263825", "0.5326203", "0.5321205", "0.53134775", "0.531251", "0.5304424", "0.5290211" ]
0.0
-1
Bug report from Holger Knublach: moving between ontology models comes down to a test for a resource being in the base model
public void test_hk_06() throws Exception { OntModel ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null); ontModel.read("file:testing/ontology/bugs/test_hk_06/a.owl"); String NSa = "http://jena.hpl.hp.com/2003/03/testont/a#"; String NSb = "http://jena.hpl.hp.com/2003/03/testont/b#"; OntClass A = ontModel.getOntClass(NSa + "A"); assertTrue("class A should be in the base model", ontModel.isInBaseModel(A)); OntClass B = ontModel.getOntClass(NSb + "B"); assertFalse("class B should not be in the base model", ontModel.isInBaseModel(B)); assertTrue( "A rdf:type owl:Class should be in the base model", ontModel.isInBaseModel(ontModel.createStatement(A, RDF.type, OWL.Class))); assertFalse( "B rdf:type owl:Class should not be in the base model", ontModel.isInBaseModel(ontModel.createStatement(B, RDF.type, OWL.Class))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void test_sf_934528() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n \n Resource r = (Resource) OWL.Thing.inModel( m );\n OntClass thingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( thingClass );\n \n r = (Resource) OWL.Nothing.inModel( m );\n OntClass nothingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( nothingClass );\n }", "public void test_hk_04() {\n OntModel m = ModelFactory.createOntologyModel();\n m.getDocumentManager().addAltEntry(\n \"http://jena.hpl.hp.com/testing/ontology/relativenames\",\n \"file:testing/ontology/relativenames.rdf\");\n \n m.read(\"http://jena.hpl.hp.com/testing/ontology/relativenames\");\n assertTrue(\n \"#A should be a class\",\n m.getResource(\"http://jena.hpl.hp.com/testing/ontology/relativenames#A\").canAs(OntClass.class));\n assertFalse(\n \"file: #A should not be a class\",\n m.getResource(\"file:testing/ontology/relativenames.rdf#A\").canAs(OntClass.class));\n }", "public void test_ck_02() {\n OntModel vocabModel = ModelFactory.createOntologyModel();\n ObjectProperty p = vocabModel.createObjectProperty(\"p\");\n OntClass A = vocabModel.createClass(\"A\");\n \n OntModel workModel = ModelFactory.createOntologyModel();\n Individual sub = workModel.createIndividual(\"uri1\", A);\n Individual obj = workModel.createIndividual(\"uri2\", A);\n workModel.createStatement(sub, p, obj);\n }", "public void test_sb_01() {\n OntModel model= ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_RDFS_INF, null);\n \n Resource result= null;\n Resource nullValueForResourceType= null;\n \n result= model.createOntResource( OntResource.class, nullValueForResourceType, \"http://www.somewhere.com/models#SomeResourceName\" );\n assertNotNull( result );\n }", "@Test\n public void testObjectResourceConversion() throws RepositoryException {\n assertExtract(\"/html/rdfa/object-resource-test.html\");\n logger.debug(dumpModelToTurtle());\n assertContains(null, FOAF.getInstance().page, RDFUtils.iri(\"http://en.wikipedia.org/New_York\"));\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 }", "public void test_sf_940570() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RDFS_INF );\n OntClass C = m.createClass( NS + \"C\" );\n Resource a = m.createResource( NS + \"a\", C );\n \n TestUtil.assertIteratorValues( this, m.listIndividuals(), new Object[] {a} );\n \n OntModel dm = ModelFactory.createOntologyModel( OntModelSpec.DAML_MEM_RULE_INF );\n OntClass D = dm.createClass( NS + \"D\" );\n Resource b = dm.createResource( NS + \"b\", D );\n \n TestUtil.assertIteratorValues( this, dm.listIndividuals(), new Object[] {b} );\n }", "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 }", "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 void test_sf_927641() {\n String NS = \"http://example.org/test#\";\n OntModel m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n OntClass c0 = m0.createClass( NS + \"C0\" );\n OntClass c1 = m0.createClass( NS + \"C1\" );\n OntClass c2 = m0.createClass( NS + \"C2\" );\n OntClass c3 = m0.createClass( NS + \"C3\" );\n \n c0.addSubClass( c1 );\n c1.addSubClass( c2 );\n c2.addEquivalentClass( c3 );\n \n // now c1 is the direct super-class of c2, even allowing for the equiv with c3\n assertFalse( \"pass 1: c0 should not be a direct super of c2\", c2.hasSuperClass( c0, true ) );\n assertFalse( \"pass 1: c3 should not be a direct super of c2\", c2.hasSuperClass( c3, true ) );\n assertFalse( \"pass 1: c2 should not be a direct super of c2\", c2.hasSuperClass( c2, true ) );\n assertTrue( \"pass 1: c1 should be a direct super of c2\", c2.hasSuperClass( c1, true ) );\n \n // second pass - with inference\n m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RULE_INF );\n c0 = m0.createClass( NS + \"C0\" );\n c1 = m0.createClass( NS + \"C1\" );\n c2 = m0.createClass( NS + \"C2\" );\n c3 = m0.createClass( NS + \"C3\" );\n \n c0.addSubClass( c1 );\n c1.addSubClass( c2 );\n c2.addEquivalentClass( c3 );\n \n // now c1 is the direct super-class of c2, even allowing for the equiv with c3\n assertFalse( \"pass 2: c0 should not be a direct super of c2\", c2.hasSuperClass( c0, true ) );\n assertFalse( \"pass 2: c3 should not be a direct super of c2\", c2.hasSuperClass( c3, true ) );\n assertFalse( \"pass 2: c2 should not be a direct super of c2\", c2.hasSuperClass( c2, true ) );\n assertTrue( \"pass 2: c1 should be a direct super of c2\", c2.hasSuperClass( c1, true ) );\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 }", "public interface RuleRefableBase extends org.semanticwb.model.Referensable\r\n{\r\n /**\r\n * Referencia a un objeto de tipo Rule \r\n */\r\n public static final org.semanticwb.platform.SemanticClass swb_RuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticClass(\"http://www.semanticwebbuilder.org/swb4/ontology#RuleRef\");\r\n public static final org.semanticwb.platform.SemanticProperty swb_hasRuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty(\"http://www.semanticwebbuilder.org/swb4/ontology#hasRuleRef\");\r\n public static final org.semanticwb.platform.SemanticProperty swb_notInheritRuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty(\"http://www.semanticwebbuilder.org/swb4/ontology#notInheritRuleRef\");\r\n public static final org.semanticwb.platform.SemanticProperty swb_andEvalRuleRef=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticProperty(\"http://www.semanticwebbuilder.org/swb4/ontology#andEvalRuleRef\");\r\n /**\r\n * Interfaz que define propiedades para elementos que pueden referencia a reglas \r\n */\r\n public static final org.semanticwb.platform.SemanticClass swb_RuleRefable=org.semanticwb.SWBPlatform.getSemanticMgr().getVocabulary().getSemanticClass(\"http://www.semanticwebbuilder.org/swb4/ontology#RuleRefable\");\r\n\r\n public org.semanticwb.model.GenericIterator<org.semanticwb.model.RuleRef> listRuleRefs();\r\n public boolean hasRuleRef(org.semanticwb.model.RuleRef value);\r\n public org.semanticwb.model.GenericIterator<org.semanticwb.model.RuleRef> listInheritRuleRefs();\r\n\r\n /**\r\n * Adds the RuleRef\r\n * @param value An instance of org.semanticwb.model.RuleRef\r\n */\r\n public void addRuleRef(org.semanticwb.model.RuleRef value);\r\n\r\n /**\r\n * Remove all the values for the property RuleRef\r\n */\r\n public void removeAllRuleRef();\r\n\r\n /**\r\n * Remove a value from the property RuleRef\r\n * @param value An instance of org.semanticwb.model.RuleRef\r\n */\r\n public void removeRuleRef(org.semanticwb.model.RuleRef value);\r\n\r\n/**\r\n* Gets the RuleRef\r\n* @return a instance of org.semanticwb.model.RuleRef\r\n*/\r\n public org.semanticwb.model.RuleRef getRuleRef();\r\n\r\n public boolean isNotInheritRuleRef();\r\n\r\n public void setNotInheritRuleRef(boolean value);\r\n\r\n public boolean isAndEvalRuleRef();\r\n\r\n public void setAndEvalRuleRef(boolean value);\r\n}", "public void test_dn_02() {\n OntModel mymod = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null );\n mymod.read( \"file:testing/ontology/testImport3/a.owl\" );\n \n assertEquals( \"Graph count..\", 2, mymod.getSubGraphs().size() );\n \n for (Iterator it = mymod.listImportedModels(); it.hasNext();) {\n mymod.removeSubModel( (Model) it.next() );\n }\n \n assertEquals( \"Graph count..\", 0, mymod.getSubGraphs().size() );\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 }", "public void test_hc_01() \n throws Exception \n {\n for (int i = 0; i < 5; i++) {\n \n OntModel m = ModelFactory.createOntologyModel();\n \n FileInputStream ifs = new FileInputStream(\"testing/ontology/relativenames.rdf\");\n \n //System.out.println(\"Start reading...\");\n m.read(ifs, \"http://example.org/foo\");\n //System.out.println(\"Done reading...\");\n \n ifs.close();\n //System.out.println(\"Closed ifs\");\n m.close();\n //System.out.println(\"Closed model\");\n }\n }", "public static void main(String args[]) {\n Model model = ModelFactory.createDefaultModel(); \n\n//set namespace\n Resource NAMESPACE = model.createResource( relationshipUri );\n \tmodel.setNsPrefix( \"rela\", relationshipUri);\n \n// Create the types of Property we need to describe relationships in the model\n Property childOf = model.createProperty(relationshipUri,\"childOf\"); \n Property siblingOf = model.createProperty(relationshipUri,\"siblingOf\");\n Property spouseOf = model.createProperty(relationshipUri,\"spouseOf\");\n Property parentOf = model.createProperty(relationshipUri,\"parentOf\"); \n \n \n// Create resources representing the people in our model\n Resource Siddharth = model.createResource(familyUri+\"Siddharth\");\n Resource Dhvanit = model.createResource(familyUri+\"Dhvanit\");\n Resource Rekha = model.createResource(familyUri+\"Rekha\");\n Resource Sandeep = model.createResource(familyUri+\"Sandeep\");\n Resource Kanchan = model.createResource(familyUri+\"Kanchan\");\n Resource Pihu = model.createResource(familyUri+\"Pihu\");\n Resource DwarkaPrasad = model.createResource(familyUri+\"Dwarkesh\");\n Resource Shakuntala = model.createResource(familyUri+\"Shakuntala\");\n Resource Santosh = model.createResource(familyUri+\"Santosh\");\n Resource Usha = model.createResource(familyUri+\"Usha\");\n Resource Priyadarshan = model.createResource(familyUri+\"Priyadarshan\");\n Resource Sudarshan = model.createResource(familyUri+\"Sudarshan\");\n Resource Pragya = model.createResource(familyUri+\"Pragya\");\n Resource Shailendra = model.createResource(familyUri+\"Shailendra\");\n Resource Rajni = model.createResource(familyUri+\"Rajni\");\n Resource Harsh = model.createResource(familyUri+\"Harsh\");\n Resource Satendra = model.createResource(familyUri+\"Satendra\");\n Resource Vandana = model.createResource(familyUri+\"Vandana\");\n Resource Priyam = model.createResource(familyUri+\"Priyam\");\n Resource Darshan = model.createResource(familyUri+\"Darshan\");\n Resource Vardhan = model.createResource(familyUri+\"Vardhan\");\n \n List<Statement> list = new ArrayList(); \n list.add(model.createStatement(Dhvanit,spouseOf,Kanchan)); \n list.add(model.createStatement(Sandeep,spouseOf,Rekha)); \n list.add(model.createStatement(DwarkaPrasad,spouseOf,Shakuntala)); \n list.add(model.createStatement(Santosh,spouseOf,Usha)); \n list.add(model.createStatement(Shailendra,spouseOf,Rajni)); \n list.add(model.createStatement(Satendra,spouseOf,Vandana)); \n list.add(model.createStatement(Sandeep,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Sandeep,childOf,Shakuntala)); \n list.add(model.createStatement(Santosh,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Santosh,childOf,Shakuntala)); \n list.add(model.createStatement(Shailendra,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Shailendra,childOf,Shakuntala)); \n list.add(model.createStatement(Satendra,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Satendra,childOf,Shakuntala)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Sandeep)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Santosh)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Shailendra)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Satendra)); \n list.add(model.createStatement(Shakuntala,parentOf,Sandeep)); \n list.add(model.createStatement(Shakuntala,parentOf,Santosh)); \n list.add(model.createStatement(Shakuntala,parentOf,Shailendra)); \n list.add(model.createStatement(Shakuntala,parentOf,Satendra)); \n list.add(model.createStatement(Sandeep,parentOf,Siddharth)); \n list.add(model.createStatement(Sandeep,parentOf,Dhvanit)); \n list.add(model.createStatement(Rekha,parentOf,Siddharth)); \n list.add(model.createStatement(Rekha,parentOf,Dhvanit)); \n list.add(model.createStatement(Siddharth,childOf,Rekha)); \n list.add(model.createStatement(Dhvanit,childOf,Rekha)); \n list.add(model.createStatement(Siddharth,childOf,Sandeep)); \n list.add(model.createStatement(Dhvanit,childOf,Sandeep)); \n list.add(model.createStatement(Harsh,childOf,Shailendra)); \n list.add(model.createStatement(Harsh,childOf,Rajni)); \n list.add(model.createStatement(Shailendra,parentOf,Harsh)); \n list.add(model.createStatement(Rajni,parentOf,Harsh)); \n list.add(model.createStatement(Santosh,parentOf,Priyadarshan)); \n list.add(model.createStatement(Santosh,parentOf,Sudarshan));\n list.add(model.createStatement(Santosh,parentOf,Pragya));\n list.add(model.createStatement(Usha,parentOf,Priyadarshan)); \n list.add(model.createStatement(Usha,parentOf,Sudarshan));\n list.add(model.createStatement(Usha,parentOf,Pragya));\n list.add(model.createStatement(Priyadarshan,childOf,Santosh));\n list.add(model.createStatement(Pragya,childOf,Santosh));\n list.add(model.createStatement(Sudarshan,childOf,Santosh));\n list.add(model.createStatement(Priyadarshan,childOf,Usha));\n list.add(model.createStatement(Pragya,childOf,Usha));\n list.add(model.createStatement(Sudarshan,childOf,Usha));\n list.add(model.createStatement(Satendra,parentOf,Priyam)); \n list.add(model.createStatement(Satendra,parentOf,Darshan));\n list.add(model.createStatement(Satendra,parentOf,Vardhan));\n list.add(model.createStatement(Vandana,parentOf,Priyam)); \n list.add(model.createStatement(Vandana,parentOf,Darshan));\n list.add(model.createStatement(Vandana,parentOf,Vardhan));\n list.add(model.createStatement(Priyam,childOf,Satendra));\n list.add(model.createStatement(Darshan,childOf,Satendra));\n list.add(model.createStatement(Vardhan,childOf,Satendra));\n list.add(model.createStatement(Priyam,childOf,Vandana));\n list.add(model.createStatement(Darshan,childOf,Vandana));\n list.add(model.createStatement(Vardhan,childOf,Vandana));\n list.add(model.createStatement(Pihu,childOf,Dhvanit));\n list.add(model.createStatement(Pihu,childOf,Kanchan));\n list.add(model.createStatement(Dhvanit,parentOf,Pihu));\n list.add(model.createStatement(Kanchan,parentOf,Pihu));\n list.add(model.createStatement(Siddharth,siblingOf,Dhvanit));\n list.add(model.createStatement(Dhvanit,siblingOf,Siddharth)); \n list.add(model.createStatement(Priyadarshan,siblingOf,Sudarshan));\n list.add(model.createStatement(Priyadarshan,siblingOf,Pragya));\n list.add(model.createStatement(Sudarshan,siblingOf,Priyadarshan));\n list.add(model.createStatement(Sudarshan,siblingOf,Pragya));\n list.add(model.createStatement(Pragya,siblingOf,Priyadarshan));\n list.add(model.createStatement(Pragya,siblingOf,Sudarshan)); \n list.add(model.createStatement(Priyam,siblingOf,Darshan));\n list.add(model.createStatement(Priyam,siblingOf,Vardhan)); \n list.add(model.createStatement(Darshan,siblingOf,Vardhan)); \n list.add(model.createStatement(Darshan,siblingOf,Priyam));\n list.add(model.createStatement(Vardhan,siblingOf,Priyam));\n list.add(model.createStatement(Vardhan,siblingOf,Darshan));\n list.add(model.createStatement(Santosh,siblingOf,Sandeep));\n list.add(model.createStatement(Santosh,siblingOf,Shailendra));\n list.add(model.createStatement(Santosh,siblingOf,Satendra));\n list.add(model.createStatement(Sandeep,siblingOf,Santosh));\n list.add(model.createStatement(Sandeep,siblingOf,Shailendra));\n list.add(model.createStatement(Sandeep,siblingOf,Satendra));\n list.add(model.createStatement(Shailendra,siblingOf,Santosh));\n list.add(model.createStatement(Shailendra,siblingOf,Sandeep));\n list.add(model.createStatement(Shailendra,siblingOf,Satendra));\n list.add(model.createStatement(Satendra,siblingOf,Shailendra));\n list.add(model.createStatement(Satendra,siblingOf,Santosh));\n list.add(model.createStatement(Satendra,siblingOf,Sandeep));\n \n model.add(list);\n try{\n \t File file=new File(\"/Users/siddharthgupta/Documents/workspace/FamilyModel/src/family/family.rdf\");\n \t \tFileOutputStream f1=new FileOutputStream(file);\n \t \tRDFWriter d = model.getWriter(\"RDF/XML-ABBREV\");\n \t \t\t\td.write(model,f1,null);\n \t\t}catch(Exception e) {}\n }", "public void test_ck_03() {\n // part A - surprising reification\n OntModel model1 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM, null);\n OntModel model2 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM_RULE_INF, null);\n \n Individual sub = model1.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n OntProperty pred = model1.createOntProperty(\"http://mytest#\");\n Individual obj = model1.createIndividual(\"http://mytest#i2\", model1.getProfile().CLASS());\n OntProperty probabilityP = model1.createOntProperty(\"http://mytest#prob\");\n \n Statement st = model1.createStatement(sub, pred, obj);\n model1.add(st);\n st.createReifiedStatement().addProperty(probabilityP, 0.9);\n assertTrue(\"st should be reified\", st.isReified());\n \n Statement st2 = model2.createStatement(sub, pred, obj);\n model2.add(st2);\n st2.createReifiedStatement().addProperty(probabilityP, 0.3);\n assertTrue(\"st2 should be reified\", st2.isReified());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP).addProperty(probabilityP, 0.3); //!!!\n // exception\n \n // Part B - exception in remove All\n Individual sub2 = model2.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP); //!!! exception\n \n sub2.addProperty(probabilityP, 0.3);\n sub2.removeAll(probabilityP); //!!! exception\n \n }", "public void testAssertionsRelsExt() throws Exception{\n pid = PID.getInstance(\"demo:foo\");\n\n String p, o;\n\n p = \"http://purl.org/dc/elements/1.1/title\";\n o = \"The God of Small Things\";\n triples.add(createTriple(pid, p, o, true, null));\n\n try {\n validateAndClear(\"RELS-EXT\");\n fail(\"RELS-EXT Dublin Core assertions not allowed\");\n } catch (ValidationException e) {\n }\n\n // specific model relationships are allowed\n o = \"urn:xyz\";\n p = Constants.MODEL.HAS_SERVICE.uri;\n triples.add(createTriple(pid, p, o, false, null));\n try {\n validateAndClear(\"RELS-EXT\");\n } catch (ValidationException e) {\n fail(\"RELS-EXT Model relationship \" + p + \" should be allowed\");\n }\n\n p = Constants.MODEL.IS_CONTRACTOR_OF.uri;\n triples.add(createTriple(pid, p, o, false, null));\n try {\n validateAndClear(\"RELS-EXT\");\n } catch (ValidationException e) {\n fail(\"RELS-EXT Model relationship \" + p + \" should be allowed\");\n }\n\n p = Constants.MODEL.HAS_MODEL.uri;\n triples.add(createTriple(pid, p, o, false, null));\n try {\n validateAndClear(\"RELS-EXT\");\n } catch (ValidationException e) {\n fail(\"RELS-EXT Model relationship \" + p + \" should be allowed\");\n }\n\n p = Constants.MODEL.IS_DEPLOYMENT_OF.uri;\n triples.add(createTriple(pid, p, o, false, null));\n try {\n validateAndClear(\"RELS-EXT\");\n } catch (ValidationException e) {\n fail(\"RELS-EXT Model relationship \" + p + \" should be allowed\");\n }\n\n\n }", "public void initWithOutReasoner()\r\n\t{\r\n\t\tcredits();\r\n\t\tONT_MODEL = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM);\r\n\t}", "@Before\n public void initCommon() {\n try {\n ResourceSetImpl _resourceSetImpl = new ResourceSetImpl();\n this.rs = _resourceSetImpl;\n String _basePath = this.getBasePath();\n String _translatePath = this.translatePath(\"ISML-MDE/tool/co.edu.javeriana.isml.common/model/common/primitives/Primitives.isml\");\n String _plus = (_basePath + _translatePath);\n final URI uri = URI.createURI(_plus);\n final Resource resource = this.rs.createResource(uri);\n resource.load(CollectionLiterals.<Object, Object>emptyMap());\n String _basePath_1 = this.getBasePath();\n String _translatePath_1 = this.translatePath(\"ISML-MDE/tool/co.edu.javeriana.isml.common/model/common/primitives/Constraints.isml\");\n String _plus_1 = (_basePath_1 + _translatePath_1);\n this.rs.createResource(URI.createURI(_plus_1)).load(CollectionLiterals.<Object, Object>emptyMap());\n String _basePath_2 = this.getBasePath();\n String _translatePath_2 = this.translatePath(\"ISML-MDE/tool/co.edu.javeriana.isml.common/view/common/widgets/PrimitiveWidgets.isml\");\n String _plus_2 = (_basePath_2 + _translatePath_2);\n this.rs.createResource(URI.createURI(_plus_2)).load(CollectionLiterals.<Object, Object>emptyMap());\n String _basePath_3 = this.getBasePath();\n String _translatePath_3 = this.translatePath(\"ISML-MDE/tool/co.edu.javeriana.isml.common/services/common/services/Persistence.isml\");\n String _plus_3 = (_basePath_3 + _translatePath_3);\n this.rs.createResource(URI.createURI(_plus_3)).load(CollectionLiterals.<Object, Object>emptyMap());\n } catch (Throwable _e) {\n throw Exceptions.sneakyThrow(_e);\n }\n }", "@Test\n public void testCase1() {\n File base = new File(DIR, \"case1\");\n File pl0 = new File(base, \"pl0/EASy\");\n File pl1 = new File(base, \"pl1/EASy\");\n try {\n Location pl0Loc = VarModel.INSTANCE.locations().addLocation(pl0, OBSERVER);\n Location pl1Loc = VarModel.INSTANCE.locations().addLocation(pl1, OBSERVER);\n // add Parent\n pl1Loc.addDependentLocation(pl0Loc);\n \n VarModel.INSTANCE.loaders().registerLoader(ModelUtility.INSTANCE, OBSERVER);\n \n List<ModelInfo<Project>> infos = VarModel.INSTANCE.availableModels().getModelInfo(\"pl1\");\n Assert.assertNotNull(infos);\n Assert.assertTrue(1 == infos.size());\n Project project = VarModel.INSTANCE.load(infos.get(0));\n Assert.assertNotNull(project);\n \n VarModel.INSTANCE.locations().removeLocation(pl1Loc, OBSERVER);\n VarModel.INSTANCE.locations().removeLocation(pl0Loc, OBSERVER);\n VarModel.INSTANCE.loaders().unregisterLoader(ModelUtility.INSTANCE, OBSERVER);\n } catch (ModelManagementException e) {\n Assert.fail(\"unexpected exception \" + e);\n }\n }", "public void testBug364450() throws JavaModelException {\n //$NON-NLS-1$\n IPath projectPath = env.addProject(\"Project\");\n env.addExternalJars(projectPath, Util.getJavaClassLibs());\n //$NON-NLS-1$\n env.setOutputFolder(projectPath, \"bin\");\n IPath wPath = //$NON-NLS-1$ //$NON-NLS-2$\n env.addClass(//$NON-NLS-1$ //$NON-NLS-2$\n projectPath, //$NON-NLS-1$ //$NON-NLS-2$\n \"w\", //$NON-NLS-1$ //$NON-NLS-2$\n \"W\", \"package w;\\n\" + \"public class W {\\n\" + //$NON-NLS-1$\n \"\tprivate w.I i;}\");\n IPath aPath = //$NON-NLS-1$ //$NON-NLS-2$\n env.addClass(//$NON-NLS-1$ //$NON-NLS-2$\n projectPath, //$NON-NLS-1$ //$NON-NLS-2$\n \"a\", //$NON-NLS-1$ //$NON-NLS-2$\n \"A\", \"package a;\\n\" + \"import w.I;\\n\" + \"import w.W;\\n\" + //$NON-NLS-1$\n \"public class A {}\");\n env.waitForManualRefresh();\n fullBuild(projectPath);\n env.waitForAutoBuild();\n //$NON-NLS-1$ //$NON-NLS-2$\n expectingSpecificProblemFor(wPath, new Problem(\"W\", \"w.I cannot be resolved to a type\", wPath, 37, 40, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR));\n //$NON-NLS-1$ //$NON-NLS-2$\n expectingSpecificProblemFor(aPath, new Problem(\"A\", \"The import w.I cannot be resolved\", aPath, 18, 21, CategorizedProblem.CAT_IMPORT, IMarker.SEVERITY_ERROR));\n aPath = //$NON-NLS-1$ //$NON-NLS-2$\n env.addClass(//$NON-NLS-1$ //$NON-NLS-2$\n projectPath, //$NON-NLS-1$ //$NON-NLS-2$\n \"a\", //$NON-NLS-1$ //$NON-NLS-2$\n \"A\", \"package a;\\n\" + \"import w.I;\\n\" + \"import w.W;\\n\" + //$NON-NLS-1$\n \"public class A {}\");\n env.waitForManualRefresh();\n incrementalBuild(projectPath);\n env.waitForAutoBuild();\n //$NON-NLS-1$ //$NON-NLS-2$\n expectingSpecificProblemFor(aPath, new Problem(\"A\", \"The import w.I cannot be resolved\", aPath, 18, 21, CategorizedProblem.CAT_IMPORT, IMarker.SEVERITY_ERROR));\n env.removeProject(projectPath);\n }", "public void test_der_01() {\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM_TRANS_INF, null);\n Resource a = m.createResource(\"http://example.org#A\");\n Resource b = m.createResource(\"http://example.org#B\");\n OntClass A = new OntClassImpl(a.getNode(), (EnhGraph) m) {\n protected boolean hasSuperClassDirect(Resource cls) {\n throw new RuntimeException(\"did not find direct reasoner\");\n }\n };\n \n // will throw an exception if the wrong code path is taken\n A.hasSuperClass(b, true);\n }", "public interface Ontology {\n\n /**\n * Load an array URIs which resolve to ontology resources.\n *\n * @param urls a {@link java.lang.String} containing ontology URIs.\n */\n public void load(String[] urls);\n\n /**\n * Load a collection of default ontology resources.\n */\n public void load() ;\n\n /**\n * merge relevant ontology subgraphs into a new subgraph which can\n * be used within Mudrod\n *\n * @param o an ontology to merge with the current ontology held\n * within Mudrod.\n */\n public void merge(Ontology o);\n\n /**\n * Retreive all subclasses for a particular entity provided within the\n * search term e.g.subclass-based query expansion.\n *\n * @param entitySearchTerm an input search term\n * @return an {@link java.util.Iterator} object containing subClass entries.\n */\n public Iterator<String> subclasses(String entitySearchTerm);\n\n /**\n * Retreive all synonyms for a particular entity provided within the\n * search term e.g.synonym-based query expansion.\n *\n * @param queryKeyPhrase a phrase to undertake synonym expansion on.\n * @return an {@link java.util.Iterator} object containing synonym entries.\n */\n public Iterator<String> synonyms(String queryKeyPhrase);\n\n}", "public void test_sf_948995() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM ); // OWL dl\n DatatypeProperty dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n boolean ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertTrue( \"Should have been a conversion exception\", ex );\n \n m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); // OWL full\n dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertFalse( \"Should not have been a conversion exception\", ex );\n }", "private ResourceLocation getModelLocation(ResourceLocation p_177580_1_) {\n/* 280 */ return new ResourceLocation(p_177580_1_.getResourceDomain(), \"models/\" + p_177580_1_.getResourcePath() + \".json\");\n/* */ }", "public void test_hk_02() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null); // ProfileRegistry.OWL_LANG);\n ontModel.createAllDifferent();\n assertTrue(ontModel.listAllDifferent().hasNext());\n AllDifferent allDifferent = (AllDifferent) ontModel.listAllDifferent().next();\n //allDifferent.setDistinct(ontModel.createList());\n assertFalse(allDifferent.listDistinctMembers().hasNext());\n }", "private Model getThisModel(String name, Model model) {\n\t\t\t\n\t\t\t Model modret=ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);\n\t\t\t\t String text=dbs.getModel(name);\n\t\t\t\t\n\t\t\t\t//System.out.println(\"TEXT\"+text+\"TEXT!!!\");\n\t\t\t\t if(text==null){\n\t\t\t\t\t modret.setNsPrefix(\"foaf\", NS.FOAF);\n\t\t\t\t\t\tmodret.setNsPrefix(\"cisp\", NS.CISP);\n\t\t\t\t\t\tmodret.setNsPrefix(\"prov\", NS.PROV);\n\t\t\t\t\t\tmodret.setNsPrefix(\"rdf\", NS.RDF);\n\t\t\t\t\treturn modret;\n\t\t\t\t }\n\t\t\t\t else{\n\t\t\t\t\t //read model \n\t\t\t\t\t InputStream input = new ByteArrayInputStream(text.getBytes());\n\t \n\t\t\t\t\t modret.read(input, null,\"RDF/JSON\");\n\t\t\t\t\t modret.setNsPrefix(\"foaf\", NS.FOAF);\n\t\t\t\t\t\tmodret.setNsPrefix(\"cisp\", NS.CISP);\n\t\t\t\t\t\tmodret.setNsPrefix(\"prov\", NS.PROV);\n\t\t\t\t\t\tmodret.setNsPrefix(\"rdf\", NS.RDF);\n\t\t\t\t }\n\t\t\t\t return modret;\n\t \n\t\t }", "public void test_dn_01() {\n // direct reading for the model method 1\n OntModel m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null );\n m0.read( \"file:testing/ontology/bugs/test_hk_07B.owl\" );\n \n OntProperty p0 = m0.getOntProperty( \"file:testing/ontology/bugs/test_hk_07B.owl#PropB\" );\n int count = 0;\n for (Iterator i = p0.listDomain(); i.hasNext();) {\n count++;\n i.next();\n }\n assertEquals( 3, count );\n \n // repeat test - thus using previously cached model for import\n \n OntModel m1 = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null );\n m1.read( \"file:testing/ontology/bugs/test_hk_07B.owl\" );\n \n OntProperty p1 = m1.getOntProperty( \"file:testing/ontology/bugs/test_hk_07B.owl#PropB\" );\n count = 0;\n for (Iterator i = p1.listDomain(); i.hasNext();) {\n count++;\n i.next();\n }\n assertEquals( 3, count );\n }", "Ontology getSourceOntology();", "public interface MyOntologyService {\n\n OWLOntology readMyOntology(OWLOntologyManager ontManager, String owlFilePath);\n\n OWLNamedIndividual applyClassAssertionFromObject(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n Object obj,\n String indName);\n\n void applyObjectPropertyAssertion(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_obj,\n String objectPropertyName,\n OWLNamedIndividual ind_field_obj);\n\n OWLObjectPropertyAssertionAxiom getObjectPropertyAssertionAxiom(\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_subject,\n String propName,\n OWLNamedIndividual ind_object);\n\n void applyDataPropertyAssertion(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_obj,\n String dataPropertyName,\n Object data);\n\n OWLDataPropertyAssertionAxiom getDataPropertyAssertionAxiom(\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_subject,\n String propName,\n Object data);\n\n OWLObjectProperty getObjectProperty(\n String propName,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm);\n\n OWLDataProperty getDataProperty(\n String propName,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm);\n\n OWLNamedIndividual getNamedIndividual(\n String indName,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm);\n\n boolean isObjectPropEntailed(\n PelletReasoner reasoner,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_subject,\n String propName,\n OWLNamedIndividual ind_object);\n\n boolean isDataPropEntailed(\n PelletReasoner reasoner,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_subject,\n String propName,\n Object data);\n\n// void createRuleObjectForTest(\n// OWLOntologyManager ontManager,\n// OWLDataFactory factory,\n// OWLOntology myOntology,\n// PrefixOWLOntologyFormat pm\n// );\n\n // Dilara's method\n //This method is to use OWL API and create rule from our own Rule object.\n SWRLRule getOWLRepresentation(RuleForPrinego rule);\n\n RuleForPrinego SWRLtoRule(SWRLRule swl);\n\n List<SWRLRule> listRules(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm\n );\n\n boolean createRule(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n SWRLRule rule\n );\n\n boolean deleteRule(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n SWRLRule rule\n );\n\n}", "public OWLModel getKnowledgeBase();", "@rdf(FOAF.SPATIALTHING)\npublic interface SpatialThing extends Thing {\n}", "static OWLOntology loadOntologyDocumentSource(final OWLOntologyDocumentSource source, boolean minimal, OWLOntologyManager manager) throws OWLOntologyCreationException {\n\t\tjava.util.logging.Logger.getLogger(\"org.obolibrary\").setLevel(java.util.logging.Level.SEVERE);\n\t\tfinal Set<OWLParserFactory> originalFactories = removeOBOParserFactories(manager);\n\t\ttry {\n\t\t\t// load model from source\n\t\t\tif (minimal == false) {\n\t\t\t\t// add the obsolete imports to the ignored imports\n\t\t\t\tOWLOntology abox = loadOWLOntologyDocumentSource(source, manager);\n\t\t\t\treturn abox;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// only load the model, skip imports\n\t\t\t\t// approach: return an empty ontology IRI for any IRI mapping request using.\n\t\t\t\tfinal OWLOntologyManager m = OWLManager.createOWLOntologyManager();\n\t\t\t\tfinal Set<IRI> emptyOntologies = new HashSet<IRI>();\n\t\t\t\tm.getIRIMappers().add(new OWLOntologyIRIMapper() {\n\n\t\t\t\t\t// generated\n\t\t\t\t\tprivate static final long serialVersionUID = -8200679663396870351L;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic IRI getDocumentIRI(IRI ontologyIRI) {\n\n\t\t\t\t\t\t// quick check:\n\t\t\t\t\t\t// do nothing for the original IRI and known empty ontologies\n\t\t\t\t\t\tif (source.getDocumentIRI().equals(ontologyIRI) || emptyOntologies.contains(ontologyIRI)) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\temptyOntologies.add(ontologyIRI);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tOWLOntology emptyOntology = m.createOntology(ontologyIRI);\n\t\t\t\t\t\t\treturn emptyOntology.getOntologyID().getDefaultDocumentIRI().orNull();\n\t\t\t\t\t\t} catch (OWLOntologyCreationException e) {\n\t\t\t\t\t\t\tthrow new RuntimeException(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tOWLOntology minimalAbox = loadOWLOntologyDocumentSource(source, m);\n\t\t\t\treturn minimalAbox;\n\t\t\t}\n\t\t} finally {\n\t\t\tresetOBOParserFactories(manager, originalFactories);\n\t\t}\n\t}", "@Test\n void twoPools () throws XPathExpressionException,\n ParserConfigurationException, SAXException, IOException {\n\n Model base = new Model(\"./tests/TestModels/TravelAgency\" + \"/TwoPools\" +\n \".bpmn.xml\");\n //the model against which all others will be tested.\n\n Model onlyTypesAreDifferent = new Model(\"./tests/TestModels\" +\n \"/TravelAgency/TwoPoolsOneDifferent.bpmn.xml\");\n assertTrue(TravelAgency.modelsAreDifferent(base,\n onlyTypesAreDifferent));\n //The type of the models matters: as such it is a different model\n // from the original.\n\n }", "private void initOntology() {\n\n\tontology = ModelFactory.createDefaultModel();\n\t\t\t\n\ttry \n\t{\n\t\t//ontology.read(new FileInputStream(\"ontology.ttl\"),null,\"TTL\");\n\t\tontology.read(new FileInputStream(\"Aminer-data.ttl\"),null,\"TTL\");\n\t\t//ontology.read(new FileInputStream(\"SO data.ttl\"),null,\"TTL\");\n\t} \n\tcatch (FileNotFoundException e) \n\t{\n\t\tSystem.out.println(\"Error creating ontology model\" +e.getMessage());\n\t\te.printStackTrace();\n\t}\n\t\t\t\n\t\t\n\t}", "@Test(expected = OntoGraphException.class)\n public void testBadOntologySuffix() throws OntoGraphException {\n GraphRequestModel requestModel = createCustomGraphRequestModelWithDiffOntologyErrors(\"test.foo\", \n \t\t\"test file contents\");\n controller.graph(requestModel);\n }", "@Test(expected = OntoGraphException.class)\n public void testInvalidOntology() throws OntoGraphException {\n GraphRequestModel requestModel = createCustomGraphRequestModelWithDiffOntologyErrors(\"test.rdf\", \n \t\t\"test file contents\");\n controller.graph(requestModel);\n }", "@Test\n public void testPutToInternal_BinaryDescriptionObject() {\n final var binaryUri = HTTP_BASE_URI + UUID.randomUUID();\n final var binaryDescUri = binaryUri + \"/\" + FCR_METADATA;\n final var descriptionId = FedoraId.create(idTranslator.toInternalId(binaryDescUri));\n final var rdf = \"@prefix dc: <\" + DC.getURI() + \"> .\" +\n \"@prefix dcterms: <\" + DCTerms.getURI() + \"> .\" +\n \"<\" + binaryUri + \"> dc:title 'fancy title' ;\" +\n \" dcterms:isPartOf <\" + binaryDescUri + \"> .\";\n final InputStream requestBodyStream = new ByteArrayInputStream(rdf.getBytes());\n final Resource binaryRes = ResourceFactory.createResource(descriptionId.getFullDescribedId());\n final var translated = httpRdfService.bodyToInternalModel(descriptionId, requestBodyStream, CONTENT_TYPE,\n idTranslator, false);\n assertTrue(translated.contains(binaryRes, DCTerms.isPartOf, binaryRes));\n assertTrue(translated.contains(binaryRes, DC.title, ResourceFactory.createPlainLiteral(\"fancy title\")));\n assertFalse(translated.listSubjects().filterKeep(a -> a.isURIResource() && a.hasURI(descriptionId.getFullId()))\n .hasNext());\n assertFalse(translated.listObjects()\n .filterKeep(a -> a.isURIResource() && a.asResource().getURI().equals(descriptionId.getFullId()))\n .hasNext());\n }", "private void init() {\n\t\tthis.model = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);\n\t\tthis.model.setNsPrefixes(INamespace.NAMSESPACE_MAP);\n\n\t\t// create classes and properties\n\t\tcreateClasses();\n\t\tcreateDatatypeProperties();\n\t\tcreateObjectProperties();\n\t\t// createFraktionResources();\n\t}", "public void test_hk_05() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n String ns = \"http://foo.bar/fu#\";\n OntClass a = ontModel.createClass(ns + \"A\");\n OntClass b = ontModel.createClass(ns + \"B\");\n \n int oldCount = getStatementCount(ontModel);\n \n RDFList members = ontModel.createList(new RDFNode[] { a, b });\n IntersectionClass intersectionClass = ontModel.createIntersectionClass(null, members);\n intersectionClass.remove();\n \n assertEquals(\"Before and after statement counts are different\", oldCount, getStatementCount(ontModel));\n }", "@Test(description = \"update interface with one relationship for existing interface with another interface\")\n public void updateOneRelationship4ExistingOneRelationships()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final RelationshipData rel1 = data.getRelationship(\"TestRel1\");\n final RelationshipData rel2 = data.getRelationship(\"TestRel2\");\n final InterfaceData inter = data.getInterface(\"TestInterface\").addRelationship(rel1);\n data.create();\n\n inter.removeRelationships()\n .addRelationship(rel2);\n this.update(inter);\n\n Assert.assertEquals(this.mql(\"print interface '\" + inter.getName() + \"' select relationship dump\"),\n rel2.getName(),\n \"check that only second relationship is defined\");\n }", "@Test\n public void testMoveLexicon() {\n //System.out.println(\"moveLexicon\");\n LemonSerializerImpl instance = new LemonSerializerImpl(null);\n LemonModel from = makeModel(instance);\n Lexicon lexicon = from.getLexica().iterator().next();\n LemonModel to = instance.create(URI.create(\"file:test2\"));\n instance.moveLexicon(lexicon, from, to);\n }", "private String replaceIntermediateObjectWithRel(Context context, String strOldRelId ,String strNewRelId ,String strNewRelIdSide,Map attributeMap) throws Exception {\r\n\r\n\t\tString strNewConnId=\"\";\r\n\t\tboolean isRelToRel = true;\r\n\t\tboolean isFrom = true;\r\n\r\n\t\ttry{\r\n\r\n\t\tDomainRelationship domRel = new DomainRelationship(strOldRelId);\r\n //Get the attributes on Relationship\r\n /*Map attributeMap = new HashMap();\r\n attributeMap = domRel.getAttributeMap(context,true);*/\r\n\r\n\r\n\t\t//Get the \"Type\" of rel\r\n\t\tStringList slRelSelects = new StringList(1);\r\n slRelSelects.addElement(DomainRelationship.SELECT_TYPE);\r\n\r\n if(strNewRelIdSide!=null && strNewRelIdSide.equalsIgnoreCase(\"from\")){\r\n \t//New Rel replaces FL/GBOM which is on \"from\" side of Old Rel hence we query now \"to\" side of Old Rel\r\n \tslRelSelects.add(\"to.id\");\r\n slRelSelects.add(\"torel.id\");\r\n\r\n }else if(strNewRelIdSide!=null && strNewRelIdSide.equalsIgnoreCase(\"to\")){\r\n \t//New Rel replaces FL/GBOM which is on \"to\" side of Old Rel hence we query now \"from\" side of Old Rel\r\n \tslRelSelects.add(\"from.id\");\r\n slRelSelects.add(\"fromrel.id\");\r\n }\r\n\r\n Hashtable htRelData = domRel.getRelationshipData(context,slRelSelects);\r\n\r\n String strFromSideOfRel =\"\";\r\n String strToSideOfRel =\"\";\r\n String strRelId =\"\";\r\n String strObjId =\"\";\r\n\r\n StringList slRelTypes = (StringList) htRelData.get(DomainRelationship.SELECT_TYPE);\r\n String strRelType = (String) slRelTypes.get(0);\r\n RelationshipType RelType = new RelationshipType(strRelType);\r\n\r\n\r\n if((StringList) htRelData.get(\"from.id\")!=null || ((StringList)htRelData.get(\"fromrel.id\"))!=null ){\r\n\r\n \tStringList slFromSideOfRel = new StringList();\r\n \tif(!((StringList)htRelData.get(\"from.id\")).isEmpty()){\r\n \t\tslFromSideOfRel = (StringList) htRelData.get(\"from.id\");\r\n \t\tstrFromSideOfRel = (String) slFromSideOfRel.get(0);\r\n\r\n \t\tisRelToRel = false;\r\n \t\t//isFrom = false;\r\n \t\tstrObjId = strFromSideOfRel;\r\n\r\n\r\n \t}else if(!((StringList)htRelData.get(\"fromrel.id\")).isEmpty()){\r\n \t\tslFromSideOfRel = (StringList) htRelData.get(\"fromrel.id\");\r\n \t\tstrFromSideOfRel = (String) slFromSideOfRel.get(0);\r\n\r\n \t\tstrRelId = strFromSideOfRel;\r\n \t\tisFrom = false;\r\n \t}\r\n }\r\n\r\n if((StringList) htRelData.get(\"to.id\")!=null || ((StringList)htRelData.get(\"torel.id\"))!=null ){\r\n\r\n \tStringList slToSideOfRel = new StringList();\r\n \tif(!((StringList)htRelData.get(\"to.id\")).isEmpty()){\r\n \t\tslToSideOfRel = (StringList) htRelData.get(\"to.id\");\r\n \t\tstrToSideOfRel = (String) slToSideOfRel.get(0);\r\n\r\n \t\tisRelToRel = false;\r\n \t\tstrObjId = strToSideOfRel;\r\n \t\tisFrom = false;\r\n \t}else if(!((StringList)htRelData.get(\"torel.id\")).isEmpty()){\r\n\r\n \t\tslToSideOfRel = (StringList) htRelData.get(\"torel.id\");\r\n\r\n \t\tstrToSideOfRel = (String) slToSideOfRel.get(0);\r\n \t\tstrRelId =strToSideOfRel;\r\n \t\t//isFrom = false;\r\n \t}\r\n }\r\n\r\n\r\n if(isRelToRel){\r\n\r\n strNewConnId = connectRelationship(context, RelType, strRelId,strNewRelId, isFrom);\r\n\r\n }else{\r\n\r\n \tstrNewConnId = connectObject(context, RelType, strObjId,strNewRelId, isFrom);\r\n }\r\n\r\n\t\t\t StringList relDataSelects = new StringList();\r\n\t\t\t relDataSelects.addElement(\"frommid.id\");\r\n\t\t\t relDataSelects.addElement(\"tomid.id\");\r\n\r\n\t\t\t Map gbomRelData = domRel.getRelationshipData(context,relDataSelects);\r\n\t\t\t StringList sLFrommid = new StringList();\r\n\t\t\t StringList sLTomid = new StringList();\r\n\r\n\t\t\t sLFrommid = (StringList) gbomRelData.get(\"frommid.id\");\r\n\t\t\t if(!sLFrommid.isEmpty()){\r\n\t\t\t\tfor(int i=0;i<sLFrommid.size();i++){\r\n\r\n\t\t\t\t\tString strFromMid = (String)sLFrommid.get(i);\r\n\t\t\t\t\tsetToRelationship(context,strFromMid,strNewConnId,true);\r\n\t\t\t }\r\n\t\t\t }\r\n\r\n\r\n\t\t\t sLTomid = (StringList) gbomRelData.get(\"tomid.id\");\r\n\t\t\t if(!sLTomid.isEmpty()){\r\n\t\t\t\tfor(int i=0;i<sLTomid.size();i++){\r\n\r\n\t\t\t\t\tString strToMid = (String)sLTomid.get(i);\r\n\t\t\t\t\tsetToRelationship(context,strToMid,strNewConnId,false);\r\n\t\t\t }\r\n\t\t\t }\r\n\r\n\t\t\tDomainRelationship domNewConnId = new DomainRelationship(strNewConnId);\r\n\t\t\tmqlLogRequiredInformationWriter(\"Rel id :: \"+ strNewConnId +\"\\n\");\r\n\t\t mqlLogRequiredInformationWriter(\"Attribute value Map set for this rel id :: \"+ attributeMap +\"\\n\\n\");\r\n\t domNewConnId.setAttributeValues(context, attributeMap);\r\n\r\n\r\n\r\n\t\t}catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn strNewConnId;\r\n\t}", "Ontology getTargetOntology();", "public interface EHR_Entity extends Data_Entity {\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#agent_id\r\n String getAgent_id();\r\n\r\n RDFProperty getAgent_idProperty();\r\n\r\n boolean hasAgent_id();\r\n\r\n void setAgent_id(String newAgent_id);\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#object_ids\r\n Collection getObject_ids();\r\n\r\n RDFProperty getObject_idsProperty();\r\n\r\n boolean hasObject_ids();\r\n\r\n Iterator listObject_ids();\r\n\r\n void addObject_ids(String newObject_ids);\r\n\r\n void removeObject_ids(String oldObject_ids);\r\n\r\n void setObject_ids(Collection newObject_ids);\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#type\r\n String getType();\r\n\r\n RDFProperty getTypeProperty();\r\n\r\n boolean hasType();\r\n\r\n void setType(String newType);\r\n}", "public 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 interface IFlexoOntologyConcept<TA extends TechnologyAdapter<TA>> extends IFlexoOntologyObject<TA> {\n\t/**\n\t * Ontology of Concept.\n\t * \n\t * @return\n\t */\n\tpublic IFlexoOntology<TA> getOntology();\n\n\t/**\n\t * Annotation upon Concept.\n\t * \n\t * @return\n\t */\n\tpublic List<? extends IFlexoOntologyAnnotation> getAnnotations();\n\n\t/**\n\t * Container of Concept.\n\t * \n\t * @return\n\t */\n\tpublic IFlexoOntologyConceptContainer<TA> getContainer();\n\n\t/**\n\t * Association with structural features for Concept.\n\t * \n\t * @return\n\t */\n\tpublic List<? extends IFlexoOntologyFeatureAssociation<TA>> getStructuralFeatureAssociations();\n\n\t/**\n\t * Association with behavioural features for Concept.\n\t * \n\t * @return\n\t */\n\tpublic List<? extends IFlexoOntologyFeatureAssociation<TA>> getBehaviouralFeatureAssociations();\n\n\t/**\n\t * \n\t * Is this a Super Concept of concept.\n\t * \n\t * @return\n\t */\n\tpublic boolean isSuperConceptOf(IFlexoOntologyConcept<TA> concept);\n\n\t/**\n\t * \n\t * Is this a Sub Concept of concept.\n\t * \n\t * @return\n\t */\n\tpublic boolean isSubConceptOf(IFlexoOntologyConcept<TA> concept);\n\n\t/**\n\t * Visitor access.\n\t * \n\t * @param visitor\n\t * @return\n\t * \n\t * @pattern visitor\n\t */\n\tpublic <T> T accept(IFlexoOntologyConceptVisitor<T> visitor);\n\n\t/**\n\t * This equals has a particular semantics (differs from {@link #equals(Object)} method) in the way that it returns true only and only if\n\t * compared objects are representing same concept regarding URI. This does not guarantee that both objects will respond the same way to\n\t * some methods.<br>\n\t * This method returns true if and only if objects are same, or if one of both object redefine the other one (with eventual many levels)\n\t * \n\t * @param o\n\t * @return\n\t */\n\tpublic boolean equalsToConcept(IFlexoOntologyConcept<TA> concept);\n\n\t/**\n\t * Return all properties accessible in the scope of this ontology object, where declared domain is this object\n\t * \n\t * @return\n\t */\n\n}", "private void createOntologyResources(String conceptName, String conditionName, \r\n\t\t\t\t\t\t\t\t\t\tVector<String> syndromeSensDefNames, Vector<String> syndromeSpecDefNames, \r\n\t\t\t\t\t\t\t\t\t\tString relation, String inclusionKeywords, String exclusionKeywords, \r\n\t\t\t\t\t\t\t\t\t\tVector<Coding> codes) throws Exception{\n\t\tOWLDatatypeProperty codeIDProperty = owlModel.getOWLDatatypeProperty(Constants.PROPERTY_CODE_ID);\r\n\t\tOWLDatatypeProperty codeTitleProperty = owlModel.getOWLDatatypeProperty(Constants.PROPERTY_CODE_TITLE);\r\n\t\tOWLDatatypeProperty codingSystemProperty = owlModel.getOWLDatatypeProperty(Constants.PROPERTY_CODESYSTEM_NAME);\r\n\t\tOWLDatatypeProperty nameProperty = owlModel.getOWLDatatypeProperty(Constants.PROPERTY_HAS_NAME);\r\n\t\tOWLObjectProperty externalCodingsProperty = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_EXTERNAL_CODES);\r\n\r\n\t\tOWLNamedClass newConcept = null;\r\n\t\tif (conceptName == null) {\r\n\t\t\t// We need to have at least one concept associated with a condition (exact concept),\r\n\t\t\t// so if there isn't one, we need to create it.\r\n\t\t\tSystem.out.println(\"WARNING: Missing concept for condition \" + conditionName + \". A concept with the same name will be created.\");\r\n\r\n\t\t\tconceptName = conditionName.toLowerCase();\r\n\t\t\trelation = \"concept name\";\r\n\t\r\n\t\t\t// check if such concept already exists:\r\n\t\t\tnewConcept = owlModel.getOWLNamedClass(conceptName.replace(' ', '_'));\r\n\t\t}\r\n\t\t\r\n\t\tif (newConcept == null) {\r\n\t\t\t\r\n\t\t\t// 1. Create new subclass(instance) of Concept:\r\n\t\t\tOWLNamedClass conceptClass = owlModel.getOWLNamedClass(Constants.CLASS_CONCEPT);\r\n\t\t\tOWLNamedClass conceptMetaClass = owlModel.getOWLNamedClass(Constants.METACLASS_CONCEPT);\r\n\t\t\tnewConcept = (OWLNamedClass) conceptMetaClass.createInstance(conceptName.replace(' ', '_'));\r\n\t\t\tnewConcept.addSuperclass(conceptClass);\r\n\t\t\tnewConcept.removeSuperclass(owlModel.getOWLThingClass());\r\n\t\t\tnewConcept.setPropertyValue(nameProperty, conceptName);\r\n\t\t\t\r\n\t\t\t// 2. Add external codes:\r\n\t\t\tCoding c = null;\r\n\t\t\tString codeName = null;\r\n\t\t\tOWLIndividual code = null;\r\n\t\t\tOWLNamedClass codeClass = null;\r\n\r\n\t\t\tfor (int i=0; i<codes.size(); i++){\r\n\t\t\t\tc = codes.get(i);\r\n\t\t\t\tcodeName = c.system + \"_\" + c.codeID.trim().replace(' ', '_');\r\n\t\t\t\tcode = owlModel.getOWLIndividual(codeName);\r\n\t\t\t\tif (code == null) {\r\n\t\t\t\t\tcodeClass = owlModel.getOWLNamedClass(c.system);\r\n\t\t\t\t\tcode = codeClass.createOWLIndividual(codeName);\r\n\t\t\t\t\tcode.setPropertyValue(codingSystemProperty, c.system);\r\n\t\t\t\t\tcode.setPropertyValue(codeIDProperty, c.codeID);\r\n\t\t\t\t\tif (c.codeTitle != null) code.setPropertyValue(codeTitleProperty, c.codeTitle);\r\n\t\t\t\t}\r\n\t\t\t\tnewConcept.addPropertyValue(externalCodingsProperty, code);\r\n\t\t\t}\r\n\r\n\t\t\t// 3. Process keywords:\r\n\t\t\tprocessKeywordString(inclusionKeywords, newConcept, Constants.PROPERTY_HAS_INCLUSION_KEYWORDS);\r\n\t\t\tprocessKeywordString(exclusionKeywords, newConcept, Constants.PROPERTY_HAS_EXCLUSION_KEYWORDS);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"WARNING: Non-unique concept '\" + conceptName + \"' resulting from artificially creating an exact concept for a condition that did not have any associated concepts listed.\");\r\n\t\t}\r\n\t\t \t\t\r\n\t\t// 4. Check if ClinicalCondition exists, if not, create new subclass:\r\n\t\tOWLNamedClass conditionClass = owlModel.getOWLNamedClass(Constants.CLASS_CONDITION);\r\n\t\tOWLNamedClass conditionMetaClass = owlModel.getOWLNamedClass(Constants.METACLASS_CONDITION);\r\n\t\tOWLNamedClass condition = owlModel.getOWLNamedClass(conditionName.replace(' ', '_'));\r\n\r\n\t\tif (condition == null) {\r\n\t\t\tcondition = (OWLNamedClass) conditionMetaClass.createInstance(conditionName.replace(' ', '_'));\r\n\t\t\tcondition.addSuperclass(conditionClass);\r\n\t\t\tcondition.removeSuperclass(owlModel.getOWLThingClass());\r\n\t\t\tcondition.setPropertyValue(nameProperty, conditionName);\r\n\t\t\t\r\n\t\t\t// 5. Add new condition to syndrome definition(s):\r\n\t\t\tOWLObjectProperty sensitiveDefinitionProperty = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_SENSITIVE_DEFINITION);\r\n\t\t\tOWLObjectProperty specificDefinitionProperty = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_SPECIFIC_DEFINITION);\r\n\t\t\tOWLNamedClass syndromeSens = null; \r\n\t\t\tOWLNamedClass syndromeSpec = null; \r\n\t\t\tif (syndromeSensDefNames != null && syndromeSensDefNames.size() > 0) {\r\n\t\t\t\tfor (int i=0; i<syndromeSensDefNames.size(); i++){\r\n\t\t\t\t\tsyndromeSens = owlModel.getOWLNamedClass(syndromeSensDefNames.get(i));\r\n\t\t\t\t\tsyndromeSens.addPropertyValue(sensitiveDefinitionProperty, condition);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (syndromeSpecDefNames != null && syndromeSpecDefNames.size() > 0) {\r\n\t\t\t\tfor (int i=0; i<syndromeSpecDefNames.size(); i++){\r\n\t\t\t\t\tsyndromeSpec = owlModel.getOWLNamedClass(syndromeSpecDefNames.get(i));\r\n\t\t\t\t\tsyndromeSpec.addPropertyValue(specificDefinitionProperty, condition);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// 6. Add Concept to one of the slots of ClinicalCondition\r\n\t\tOWLObjectProperty p = null;\r\n\t\tif (relation.equalsIgnoreCase(\"concept name\")){\r\n\t\t\tp = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_EXACT_CONCEPT);\r\n\t\t} \r\n\t\telse if (relation.substring(0, 7).equalsIgnoreCase(\"related\")){\r\n\t\t\tp = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_RELATED_CONCEPTS);\r\n\t\t} \r\n\t\telse if (relation.equalsIgnoreCase(\"synonym\")){\r\n\t\t\tp = owlModel.getOWLObjectProperty(Constants.PROPERTY_HAS_SYNONYMOUS_CONCEPTS);\r\n\t\t}\r\n\t\telse throw new Exception(\"Cannot determine the relation of a concept to clinical condition! Relation specified is '\" + relation + \"'.\");\r\n\t\tcondition.addPropertyValue(p, newConcept);\r\n\t}", "public interface Activity extends RUP_Core_Elements {\n\n /* ***************************************************\n * Property http://www.semanticweb.org/morningstar/ontologies/2019/9/untitled-ontology-9#hasRecommendation\n */\n \n /**\n * Gets all property values for the hasRecommendation property.<p>\n * \n * @returns a collection of values for the hasRecommendation property.\n */\n Collection<? extends PM_Learning_Material> getHasRecommendation();\n\n /**\n * Checks if the class has a hasRecommendation property value.<p>\n * \n * @return true if there is a hasRecommendation property value.\n */\n boolean hasHasRecommendation();\n\n /**\n * Adds a hasRecommendation property value.<p>\n * \n * @param newHasRecommendation the hasRecommendation property value to be added\n */\n void addHasRecommendation(PM_Learning_Material newHasRecommendation);\n\n /**\n * Removes a hasRecommendation property value.<p>\n * \n * @param oldHasRecommendation the hasRecommendation property value to be removed.\n */\n void removeHasRecommendation(PM_Learning_Material oldHasRecommendation);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/morningstar/ontologies/2019/9/untitled-ontology-9#isPerformOf\n */\n \n /**\n * Gets all property values for the isPerformOf property.<p>\n * \n * @returns a collection of values for the isPerformOf property.\n */\n Collection<? extends Role> getIsPerformOf();\n\n /**\n * Checks if the class has a isPerformOf property value.<p>\n * \n * @return true if there is a isPerformOf property value.\n */\n boolean hasIsPerformOf();\n\n /**\n * Adds a isPerformOf property value.<p>\n * \n * @param newIsPerformOf the isPerformOf property value to be added\n */\n void addIsPerformOf(Role newIsPerformOf);\n\n /**\n * Removes a isPerformOf property value.<p>\n * \n * @param oldIsPerformOf the isPerformOf property value to be removed.\n */\n void removeIsPerformOf(Role oldIsPerformOf);\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}", "@Override\n protected void mergeModel_Organization( Model target, Model source, boolean sourceDominant,\n Map<Object, Object> context )\n {\n Organization src = source.getOrganization();\n if ( source.getOrganization() != null )\n {\n Organization tgt = target.getOrganization();\n if ( tgt == null )\n {\n target.setOrganization( tgt = new Organization() );\n mergeOrganization( tgt, src, sourceDominant, context );\n }\n }\n }", "@Test\n public void testGetModel ()\n {\n System.out.println (\"getModel\");\n OrgOrgRelationInputModelFactory instance = getInstance ();\n OrgOrgRelationInputModel result = instance.getModel ();\n List<OrgOrgRelation> orgRalations = result.getOrgOrgRelations ();\n \n if (orgRalations.size () < 16)\n {\n fail (\" too few organizations\");\n }\n OrgOrgRelation orgRelation = orgRalations.get (1);\n assertEquals (\"4\", orgRelation.getOrgId());\n assertEquals (\"1\", orgRelation.getRelatedOrgId());\n assertEquals (\"kuali.org.Part\", orgRelation.getTypeKey ());\n assertEquals (\"kuali.org.org.relation.state.active\", orgRelation.getState ());\n assertEquals (\"KU\", orgRelation.getOrgShortName());\n assertEquals (\"KUSystem\", orgRelation.getRelatedOrgShortName());\n }", "public ResourceTypeBase(org.semanticwb.platform.SemanticObject base)\r\n {\r\n super(base);\r\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingNonPersistentFields() {\n }", "@Test(dependsOnMethods = {\"modifyResource\"})\n public void modifyNotExistingResource() throws Exception {\n showTitle(\"modifyNotExistingResource\");\n\n try {\n UmaResource resource = new UmaResource();\n resource.setName(\"Photo Album 3\");\n resource.setIconUri(\"http://www.example.com/icons/flower.png\");\n resource.setScopes(Arrays.asList(\"http://photoz.example.com/dev/scopes/view\", \"http://photoz.example.com/dev/scopes/all\"));\n\n getResourceService().updateResource(\"Bearer \" + pat.getAccessToken(), \"fake_resource_id\", resource);\n } catch (ClientErrorException ex) {\n System.err.println(ex.getResponse().readEntity(String.class));\n int status = ex.getResponse().getStatus();\n assertTrue(status != Response.Status.OK.getStatusCode(), \"Unexpected response status\");\n }\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFields() {\n }", "@Test\n public void missingEntity() {\n\n final URI entityURI =\n getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).appendKeySegment(1).build();\n\n // Request to single (non collection) navigation property\n ClientEntity entity = getFactory().newEntity(ET_KEY_NAV);\n final ClientLink navLinkOne =\n getFactory().newEntityNavigationLink(NAV_PROPERTY_ET_KEY_NAV_ONE, getClient().newURIBuilder(SERVICE_URI)\n .appendEntitySetSegment(ES_KEY_NAV).appendKeySegment(42).build());\n entity.addLink(navLinkOne);\n\n try {\n getEdmEnabledClient().getCUDRequestFactory()\n .getEntityUpdateRequest(entityURI, UpdateType.PATCH, entity).execute();\n fail();\n } catch (ODataClientErrorException e) {\n assertEquals(HttpStatusCode.NOT_FOUND.getStatusCode(), e.getStatusLine().getStatusCode());\n }\n\n // Request to collection navigation propetry\n entity = getFactory().newEntity(ET_KEY_NAV);\n final ClientLink navLinkMany =\n getFactory().newEntitySetNavigationLink(NAV_PROPERTY_ET_KEY_NAV_MANY, getClient().newURIBuilder(SERVICE_URI)\n .appendEntitySetSegment(ES_KEY_NAV).appendKeySegment(3).build());\n entity.addLink(navLinkMany);\n\n try {\n getEdmEnabledClient().getCUDRequestFactory()\n .getEntityUpdateRequest(entityURI, UpdateType.PATCH, entity).execute();\n } catch (ODataClientErrorException e) {\n assertEquals(HttpStatusCode.NOT_FOUND.getStatusCode(), e.getStatusLine().getStatusCode());\n }\n }", "@BeforeClass\n public static void setup() throws Exception{\n Observation systolic = new Observation();\n Observation dystolic = new Observation();\n Reference subject = new Reference().setReference(\"patient/p007\");\n systolic.setSubject(subject)\n .setCode(new CodeableConcept().addCoding(new Coding().setSystem(Constants.LOINCSYSTEM).setCode(\"8480-6\")))\n .setValue(new Quantity().setValue(150).setUnit(\"mmHg\"))\n .setInterpretation(new CodeableConcept().addCoding(new Coding().setSystem(Constants.V2OBSERVATIONINTERPRETATION).setCode(\"H\")));\n\n dystolic.setSubject(subject)\n .setCode(new CodeableConcept().addCoding(new Coding().setSystem(Constants.LOINCSYSTEM).setCode(\"8462-4\")))\n .setValue(new Quantity().setValue(100).setUnit(\"mmHg\"))\n .setInterpretation(new CodeableConcept().addCoding(new Coding().setSystem(Constants.V2OBSERVATIONINTERPRETATION).setCode(\"H\")));\n Observation.ObservationRelatedComponent related1 = new Observation.ObservationRelatedComponent();\n //related1.setTarget()\n\n Observation loincPanel = new Observation();\n loincPanel.setSubject(subject)\n .setCode(new CodeableConcept().addCoding(new Coding().setSystem(Constants.LOINCSYSTEM).setCode(\"35094-2\")))\n .setSubject(new Reference().setIdentifier(new Identifier().setSystem(\"org.jax\").setValue(\"Mouse Jerry\")));\n loincPanel.addRelated(related1);\n //.setInterpretation(new CodeableConcept().addCoding(new Coding().setSystem(\"http://hl7.org/fhir/v2/0078\").setCode(\"H\")));\n\n\n bpPanel = panelFactory.createFhirLoincPanel(new LoincId(\"35094-2\"));\n Map<LoincId, Observation> components = new HashMap<>();\n components.put(new LoincId(\"8480-6\"), systolic);\n components.put(new LoincId(\"8462-4\"), dystolic);\n bpPanel.addComponents(components);\n FhirObservationAnalyzer.init(resources.loincIdSet(), resources.annotationMap());\n FHIRLoincPanel.initResources(resources.loincIdSet(), resources.loincEntryMap(), resources.annotationMap());\n assertTrue(bpPanel.panelComponents().size() == 2);\n assertNotNull(resources.loincIdSet());\n assertTrue(resources.loincIdSet().size() > 5000);\n assertNotNull(resources.annotationMap());\n\n\n }", "public void testEditDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\r\n\t\t\t//Step 2\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\t// Step 3\r\n\t\t\tdataValue.put(barcode, \"870\");\r\n\t\t\tdataValue.put(label, \"specimen parent label123\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"4546\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tentityManagerInterface.editData(tissueSpecimen, dataValue, recordId);\r\n\r\n\t\t\t// step 4\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue = entityManagerInterface.getRecordById(tissueSpecimen, recordId);\r\n\r\n\t\t\tassertEquals(\"870\", dataValue.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label123\", dataValue.get(label));\r\n\t\t\tassertEquals(\"4546\", dataValue.get(quantityInCellCount));\r\n\r\n\t\t\t//Step 5\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\t//Step 6\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"875\");\r\n\t\t\tdataValue.put(label, \"New Label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"454647\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"1223\");\r\n\r\n\t\t\tentityManagerInterface.editData(advanceTissueSpecimenA, dataValue, recordId);\r\n\r\n\t\t\t//Step 7\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue = entityManagerInterface.getRecordById(advanceTissueSpecimenA, recordId);\r\n\r\n\t\t\tassertEquals(\"875\", dataValue.get(barcode));\r\n\t\t\tassertEquals(\"New Label\", dataValue.get(label));\r\n\t\t\tassertEquals(\"454647\", dataValue.get(quantityInCellCount));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(2, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ advanceTissueSpecimenA.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingObjectsThatAreAlreadyPersistent() {\n }", "@Test\r\n\tpublic void resource_CopyTests() {\n\t\tLibraryNode destLib = ml.createNewLibrary_Empty(\"http://opentravel.org/Test/tx\", \"TL2\", pc.getDefaultProject());\r\n\t\t// Given - a valid resource using mock library provided business object\r\n\t\tLibraryNode srcLib = ml.createNewLibrary(pc, \"ResourceTestLib\");\r\n\t\tBusinessObjectNode bo = null;\r\n\t\tfor (Node n : srcLib.getDescendants_LibraryMembers())\r\n\t\t\tif (n instanceof BusinessObjectNode) {\r\n\t\t\t\tbo = (BusinessObjectNode) n;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tResourceNode resource = ml.addResource(bo);\r\n\t\tassertTrue(\"Resource created must not be null.\", resource != null);\r\n\t\tml.check(resource);\r\n\t\tml.check(srcLib);\r\n\r\n\t\t// When - copied to destination library\r\n\t\tdestLib.copyMember(resource);\r\n\t\t// Then - source lib is not changed\r\n\t\tassertTrue(srcLib.contains(resource));\r\n\t\tml.check(srcLib);\r\n\t\tml.check(resource);\r\n\t\t// Then - it is copied and is valid\r\n\t\tResourceNode newResource = null;\r\n\t\tfor (Node r : destLib.getDescendants_LibraryMembers())\r\n\t\t\tif (r.getName().equals(resource.getName()))\r\n\t\t\t\tnewResource = (ResourceNode) r;\r\n\t\tassertTrue(destLib.contains(newResource));\r\n\t\tBusinessObjectNode subject = newResource.getSubject();\r\n\t\tml.check(newResource);\r\n\t\tml.check(destLib);\r\n\t}", "@Test(description = \"update interface with one relationship for non existing interface\")\n public void updateOneRelationship4NonExisting()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final RelationshipData rel = data.getRelationship(\"TestType\");\n data.create();\n\n final InterfaceData inter = data.getInterface(\"TestInterface\").addRelationship(rel);\n this.update(inter);\n\n Assert.assertEquals(this.mql(\"print interface '\" + inter.getName() + \"' select relationship dump\"),\n rel.getName(),\n \"check that only one relationship is defined\");\n }", "public static Model copyModel(Model base) {\n BNodeReplacer rep = new BNodeReplacer();\n Model newModel = ModelFactory.createDefaultModel();\n StmtIterator it = base.listStatements();\n Statement st;\n Node s;\n Node p;\n Node o;\n while (it.hasNext()) {\n st = it.nextStatement();\n s = st.getSubject().asNode();\n p = st.getPredicate().asNode();\n o = st.getObject().asNode();\n if (s.isBlank()) s = newModel.createResource(rep.getNew(s.getBlankNodeId())).asNode();\n if (p.isBlank()) p = newModel.createResource(rep.getNew(p.getBlankNodeId())).asNode();\n if (o.isBlank()) o = newModel.createResource(rep.getNew(o.getBlankNodeId())).asNode();\n newModel.getGraph().add(new Triple(s, p, o));\n }\n it.close();\n newModel.setNsPrefixes(base.getNsPrefixMap());\n return newModel;\n }", "@Test\r\n\tpublic void resource_MoveTests() {\n\t\tLibraryNode srcLib = ml.createNewLibrary(pc, \"ResourceTestLib\");\r\n\t\tLibraryNode destLib = ml.createNewLibrary(pc, \"ResourceTestLib2\");\r\n\t\tBusinessObjectNode bo = null;\r\n\t\tfor (Node n : srcLib.getDescendants_LibraryMembers())\r\n\t\t\tif (n instanceof BusinessObjectNode) {\r\n\t\t\t\tbo = (BusinessObjectNode) n;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\tResourceNode resource = ml.addResource(bo);\r\n\t\tassertTrue(\"Resource created must not be null.\", resource != null);\r\n\t\tml.check(resource);\r\n\t\tml.check(srcLib);\r\n\r\n\t\t// When - moved to destination library\r\n\t\tsrcLib.moveMember(resource, destLib);\r\n\t\t// Then - it is moved and is valid\r\n\t\tassertTrue(!srcLib.contains(resource));\r\n\t\tassertTrue(destLib.contains(resource));\r\n\t\tml.check(resource);\r\n\t\tml.check(srcLib);\r\n\t\tml.check(destLib);\r\n\t}", "public interface FunctionalStatusObservation2 extends FunctionalStatusResultObservation {\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.templateId-&gt;exists(id : datatypes::II | id.root = \\'2.16.840.1.113883.10.20.22.4.67\\' and id.extension.oclIsUndefined())'\"\n\t * @generated\n\t */\n\tboolean validateFunctionalStatusObservation2TemplateId(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.author-&gt;exists(author : cda::Author | not author.oclIsUndefined() and author.oclIsKindOf(consol::AuthorParticipation))'\"\n\t * @generated\n\t */\n\tboolean validateFunctionalStatusObservation2AuthorParticipation(DiagnosticChain diagnostics,\n\t\t\tMap<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model kind=\"operation\" required=\"true\" ordered=\"false\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.getSupplies()-&gt;select(supply : cda::Supply | not supply.oclIsUndefined() and supply.oclIsKindOf(consol::NonMedicinalSupplyActivity2))-&gt;asSequence()-&gt;any(true).oclAsType(consol::NonMedicinalSupplyActivity2)'\"\n\t * @generated\n\t */\n\tNonMedicinalSupplyActivity2 getConsolNonMedicinalSupplyActivity2();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tpublic FunctionalStatusObservation2 init();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tpublic FunctionalStatusObservation2 init(Iterable<? extends Initializer<? extends EObject>> initializers);\n}", "public void testMerge() {\n \n LoreModel model = new LoreModel(OntModelSpec.OWL_MEM, ModelFactory.createDefaultModel());\n \n Authority authA = Authority.createOrGet(model,\"A\");\n Property obsIn = model.getProperty(LoreModel.URI+\"#observedIn\");\n \n Experiment exp1 = Experiment.createOrGet(model, \"exp1\");\n Experiment exp2 = Experiment.createOrGet(model, \"exp2\");\n Experiment exp3 = Experiment.createOrGet(model, \"exp3\");\n \n RecordObject o1 = RecordObject.createOrGet(model, authA, \"a\");\n o1.addProperty(obsIn, exp1);\n o1.addProperty(obsIn, exp2);\n \n RecordObject o2 = RecordObject.createOrGet(model, authA, \"b\");\n o2.addProperty(obsIn, exp1);\n o2.addProperty(obsIn, exp2);\n \n RecordObject o3 = RecordObject.createOrGet(model, authA, \"c\");\n o2.addProperty(obsIn, exp3);\n RecordObject o4 = RecordObject.createOrGet(model, authA, \"d\");\n o2.addProperty(obsIn, exp3);\n \n assertEquals(4, model.listIndividualsOfClass(RecordObject.class, false).size());\n assertEquals(3, model.listIndividualsOfClass(Experiment.class, false).size());\n \n ContextBasedMerger instance = new ContextBasedMerger();\n \n \n \n ResourceReferences<Individual> selection = instance.selectionP.validate(\n \"SELECT ?exp WHERE {?exp <\"+RDF.type.getURI()+\"> \"\n + \"<\"+Experiment.CLASS_URI+\">}\");\n ResourceReferences<OntClass> contextRestriction = instance.contextRestrictionsP\n .validate(RecordObject.CLASS_URI);\n \n instance.setParameter(instance.selectionP, selection);\n instance.setParameter(instance.contextRestrictionsP, contextRestriction);\n instance.setModel(model);\n instance.run();\n \n assertEquals(4, model.listIndividualsOfClass(RecordObject.class, false).size());\n assertEquals(2, model.listIndividualsOfClass(Experiment.class, false).size());\n \n }", "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\tpublic void testInternalEntityRelatedTypes() {\n\t\tlogger.info(\"Run testInternalEntityRelatedTypes\");\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\n\t\t// Entity1InputType\n\t\tfinal IntrospectionFullType entity1InputType = getFullType(introspection,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(27, entity1InputType.getInputFields().size());\n\n\t\tassertInputField(entity1InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"intAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertInputField(entity1InputType, \"longAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLLong.getName());\n\t\tassertInputField(entity1InputType, \"doubleAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLFloat.getName());\n\t\tassertInputField(entity1InputType, \"stringAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"booleanAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBoolean.getName());\n\t\tassertInputField(entity1InputType, \"bigIntAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBigInteger.getName());\n\t\tassertInputField(entity1InputType, \"bigDecimalAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBigDecimal.getName());\n\t\tassertInputField(entity1InputType, \"bytesAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLByte.getName());\n\t\tassertInputField(entity1InputType, \"shortAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLShort.getName());\n\t\tassertInputField(entity1InputType, \"charAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLChar.getName());\n\t\tassertInputField(entity1InputType, \"dateAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLDate.getName());\n\t\tassertInputField(entity1InputType, \"fileAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLFile.getName());\n\t\tassertInputField(entity1InputType, \"localDateAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLLocalDate.getName());\n\t\tassertInputField(entity1InputType, \"localDateTimeAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLLocalDateTime.getName());\n\t\tassertInputField(entity1InputType, \"instantAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLInstant.getName());\n\n\t\tassertInputField(entity1InputType, \"stringList\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"stringSet\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\n\t\tassertInputField(entity1InputType, \"stringList\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"stringSet\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\n\t\tassertInputField(entity1InputType, \"enumAttr\", IntrospectionTypeKindEnum.ENUM, Enum1.class.getSimpleName());\n\n\t\tassertInputField(entity1InputType, \"enumList\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tEnum1.class);\n\t\tassertInputField(entity1InputType, \"enumSet\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tEnum1.class);\n\n\t\tassertInputField(entity1InputType, \"entity2\" + schemaConfig.getAttributeIdSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"entity3\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"entity4\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\tassertInputField(entity1InputType, \"embeddedData1\", IntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEmbeddedData1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tassertInputField(entity1InputType, \"embeddedData1s\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEmbeddedData1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\n\t\t// Entity1LoadResult\n\t\tfinal IntrospectionFullType entity1LoadResult = getFullType(introspection,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, entity1LoadResult.getFields().size());\n\n\t\tassertField(entity1LoadResult, \"data\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity1.class.getSimpleName());\n\t\tassertField(entity1LoadResult, \"orderBy\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tgetOrderByOutputTypeName());\n\t\tassertField(entity1LoadResult, \"paging\", IntrospectionTypeKindEnum.OBJECT, getPagingOutputTypeName());\n\n\t\t// Entity2InputType\n\t\tfinal IntrospectionFullType entity2InputType = getFullType(introspection,\n\t\t\t\tEntity2.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity2InputType.getInputFields().size());\n\n\t\tassertInputField(entity2InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity2InputType, \"entity1\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\t// Entity2LoadResult\n\t\tfinal IntrospectionFullType entity2LoadResult = getFullType(introspection,\n\t\t\t\tEntity2.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, entity2LoadResult.getFields().size());\n\n\t\tassertField(entity2LoadResult, \"data\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity2.class.getSimpleName());\n\t\tassertField(entity2LoadResult, \"orderBy\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tgetOrderByOutputTypeName());\n\t\tassertField(entity2LoadResult, \"paging\", IntrospectionTypeKindEnum.OBJECT, getPagingOutputTypeName());\n\n\t\t// Entity3InputType\n\t\tfinal IntrospectionFullType entity3InputType = getFullType(introspection,\n\t\t\t\tEntity3.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity3InputType.getInputFields().size());\n\n\t\tassertInputField(entity3InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity3InputType, \"entity1\" + schemaConfig.getAttributeIdSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\t// Entity4InputType\n\t\tfinal IntrospectionFullType entity4InputType = getFullType(introspection,\n\t\t\t\tEntity4.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity4InputType.getInputFields().size());\n\n\t\tassertInputField(entity4InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity4InputType, \"entity1\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t}", "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 }", "@Test(expected = OntoGraphException.class)\n public void testEmptyOntology() throws OntoGraphException {\n GraphRequestModel requestModel = createCustomGraphRequestModelWithDiffOntologyErrors(\"test.rdf\", \" \");\n controller.graph(requestModel);\n }", "public interface HierarchicalKnowledgeBase {\n\n /**\n * Get the concept with the provided id.\n * @param id Concept ID.\n * @return Concept\n */\n Concept getConcept(String id);\n\n /**\n * Get the instance with the provided id.\n * @param id Instance ID.\n * @return Instance\n */\n Instance getInstance(String id);\n\t/**\n * Get a collection with the subclasses of the provided concept\n * @param concept Concept provided\n * @return collection of subclasses of the concept\n */\n Set<Concept> getSubclasses(Concept concept);\n \n /**\n * Returns a collection containing the superclasses of the provided concept\n * @param concept Concept provided\n * @return collection of subclasses of the concept\n */\n Set<Concept> getSuperclasses(Concept concept);\n \n /**\n * Check if concept x is equivalent to concept y\n * @param x Concept x\n * @param y Concept y\n * @return True if x is equivalent to y\n */\n boolean equivalent(Concept x, Concept y);\n \n /**\n * Check if concept x is subclass of concept y\n * @param x Concept x\n * @param y Concept y\n * @return True if x subclass of y, false in other case.\n */\n boolean isSubclass(Concept x, Concept y);\n \n /**\n * Check if concept x is a subclass of y, false in other case\n * @param x Concept x\n * @param y Concept y\n * @return True if x is a superclass of y\n */\n boolean isSuperclass(Concept x, Concept y);\n \n /**\n * Returns the concept Resource from which this Resource is instance. If\n * the Resource is not an instance, the function returns the same Resource.\n * @param instance Concept or Instance Resource\n * @return Concept parent of the instance.\n */\n Concept resolveInstance(Instance instance);\n \n /**\n * Return all instances of the provided concept.\n * @return {@link Set} with the instances of the concept.\n * If there are no instances, a empty set is returned.\n */\n Set<Instance> getInstances(Concept concept);\n\n /**\n * Return all concepts managed by this KB.\n * @return {@link Set} with all available concepts.\n */\n Set<Concept> getConcepts();\n\n /**\n * Return all instances managed by this KB.\n * @return {@link Set} with all available instances.\n */\n Set<Instance> getInstances();\n}", "org.hl7.fhir.ObservationRelated addNewRelated();", "private void createSubmodelURIandNameMap(){\n\t\tfor(Submodel sub : semsimmodel.getSubmodels()){\n\t\t\t\n\t\t\tResource subres = null;\n\t\t\t\n\t\t\tif(sub.hasMetadataID()) subres = rdf.createResource(\"#\" + sub.getMetadataID());\n\t\t\telse subres = createNewResourceForSemSimObject(\"submodel\");\n\t\t\t\n\t\t\tsubmodelNameAndURImap.put(sub.getName(), subres.getURI());\n\t\t}\n\t}", "public interface Service extends WrappedIndividual {\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#hasMicroService\n */\n \n /**\n * Gets all property values for the hasMicroService property.<p>\n * \n * @returns a collection of values for the hasMicroService property.\n */\n Collection<? extends MService> getHasMicroService();\n\n /**\n * Checks if the class has a hasMicroService property value.<p>\n * \n * @return true if there is a hasMicroService property value.\n */\n boolean hasHasMicroService();\n\n /**\n * Adds a hasMicroService property value.<p>\n * \n * @param newHasMicroService the hasMicroService property value to be added\n */\n void addHasMicroService(MService newHasMicroService);\n\n /**\n * Removes a hasMicroService property value.<p>\n * \n * @param oldHasMicroService the hasMicroService property value to be removed.\n */\n void removeHasMicroService(MService oldHasMicroService);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#hasSCF\n */\n \n /**\n * Gets all property values for the hasSCF property.<p>\n * \n * @returns a collection of values for the hasSCF property.\n */\n Collection<? extends SCF> getHasSCF();\n\n /**\n * Checks if the class has a hasSCF property value.<p>\n * \n * @return true if there is a hasSCF property value.\n */\n boolean hasHasSCF();\n\n /**\n * Adds a hasSCF property value.<p>\n * \n * @param newHasSCF the hasSCF property value to be added\n */\n void addHasSCF(SCF newHasSCF);\n\n /**\n * Removes a hasSCF property value.<p>\n * \n * @param oldHasSCF the hasSCF property value to be removed.\n */\n void removeHasSCF(SCF oldHasSCF);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#performAt\n */\n \n /**\n * Gets all property values for the performAt property.<p>\n * \n * @returns a collection of values for the performAt property.\n */\n Collection<? extends Facility> getPerformAt();\n\n /**\n * Checks if the class has a performAt property value.<p>\n * \n * @return true if there is a performAt property value.\n */\n boolean hasPerformAt();\n\n /**\n * Adds a performAt property value.<p>\n * \n * @param newPerformAt the performAt property value to be added\n */\n void addPerformAt(Facility newPerformAt);\n\n /**\n * Removes a performAt property value.<p>\n * \n * @param oldPerformAt the performAt property value to be removed.\n */\n void removePerformAt(Facility oldPerformAt);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#produces\n */\n \n /**\n * Gets all property values for the produces property.<p>\n * \n * @returns a collection of values for the produces property.\n */\n Collection<? extends Computer> getProduces();\n\n /**\n * Checks if the class has a produces property value.<p>\n * \n * @return true if there is a produces property value.\n */\n boolean hasProduces();\n\n /**\n * Adds a produces property value.<p>\n * \n * @param newProduces the produces property value to be added\n */\n void addProduces(Computer newProduces);\n\n /**\n * Removes a produces property value.<p>\n * \n * @param oldProduces the produces property value to be removed.\n */\n void removeProduces(Computer oldProduces);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#uses\n */\n \n /**\n * Gets all property values for the uses property.<p>\n * \n * @returns a collection of values for the uses property.\n */\n Collection<? extends Equipment> getUses();\n\n /**\n * Checks if the class has a uses property value.<p>\n * \n * @return true if there is a uses property value.\n */\n boolean hasUses();\n\n /**\n * Adds a uses property value.<p>\n * \n * @param newUses the uses property value to be added\n */\n void addUses(Equipment newUses);\n\n /**\n * Removes a uses property value.<p>\n * \n * @param oldUses the uses property value to be removed.\n */\n void removeUses(Equipment oldUses);\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}", "public void testInheritanceEditMetadataForChangeParentWithNoData()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\t//step 2\t\t\t\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\t//step 3\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\t//step 4\r\n\t\t\tEntityInterface savedTissueSpecimen = entityManagerInterface\r\n\t\t\t\t\t.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 5\r\n\t\t\tEntityInterface newSpecimen = factory.createEntity();\r\n\t\t\tnewSpecimen.setName(\"newSpecimen\");\r\n\t\t\tnewSpecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcodeOfNewSpecimen = factory.createStringAttribute();\r\n\t\t\tbarcodeOfNewSpecimen.setName(\"barcodeOfNewSpecimen\");\r\n\t\t\tnewSpecimen.addAbstractAttribute(barcodeOfNewSpecimen);\r\n\r\n\t\t\t//step 6\r\n\t\t\tnewSpecimen = entityManagerInterface.persistEntity(newSpecimen);\r\n\r\n\t\t\t//step 6\r\n\t\t\ttissueSpecimen.setParentEntity(newSpecimen);\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\t//step 7\r\n\t\t\tassertTrue(true);\r\n\t\t\tsavedTissueSpecimen = entityManagerInterface.getEntityByIdentifier(savedTissueSpecimen\r\n\t\t\t\t\t.getId());\r\n\t\t\tassertEquals(savedTissueSpecimen.getParentEntity(), newSpecimen);\r\n\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcodeOfNewSpecimen, \"123456\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\r\n\t\t\tentityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tResultSet resultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ tissueSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ specimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(0, resultSet.getInt(1));\r\n\r\n\t\t\tresultSet = executeQuery(\"select count(*) from \"\r\n\t\t\t\t\t+ newSpecimen.getTableProperties().getName());\r\n\t\t\tresultSet.next();\r\n\t\t\tassertEquals(1, resultSet.getInt(1));\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public void makePreferredOTTOLRelationshipsConflicts(){\n \t\tTransaction tx;\n \t\tString name = \"life\";\n \t\tIndexHits<Node> foundNodes = findTaxNodeByName(name);\n Node firstNode = null;\n if (foundNodes.size() < 1){\n System.out.println(\"name '\" + name + \"' not found. quitting.\");\n return;\n } else if (foundNodes.size() > 1) {\n System.out.println(\"more than one node found for name '\" + name + \"'not sure how to deal with this. quitting\");\n } else {\n for (Node n : foundNodes)\n firstNode = n;\n }\n \t\tTraversalDescription CHILDOF_TRAVERSAL = Traversal.description()\n \t\t\t\t.relationships( RelTypes.TAXCHILDOF,Direction.INCOMING );\n \t\tSystem.out.println(firstNode.getProperty(\"name\"));\n \t\tint count = 0;\n \t\ttx = graphDb.beginTx();\n \t\ttry{\n \t\t\tfor(Node friendnode : CHILDOF_TRAVERSAL.traverse(firstNode).nodes()){\n \t\t\t\tboolean conflict = false;\n \t\t\t\tString endNode = \"\";\n \t\t\t\tRelationship ncbirel = null;\n \t\t\t\tRelationship ottolrel = null;\n \t\t\t\tfor(Relationship rel : friendnode.getRelationships(Direction.OUTGOING)){\n \t\t\t\t\tif (rel.getEndNode() == rel.getStartNode()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}else{\n \t\t\t\t\t\tif (endNode == \"\")\n \t\t\t\t\t\t\tendNode = (String) rel.getEndNode().getProperty(\"name\");\n \t\t\t\t\t\tif ((String)rel.getEndNode().getProperty(\"name\") != endNode){\n \t\t\t\t\t\t\tconflict = true;\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif(((String)rel.getProperty(\"source\")).compareTo(\"ncbi\")==0)\n \t\t\t\t\t\t\tncbirel = rel;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (conflict && ncbirel != null){\n \t\t\t\t\tcount += 1;\n //\t\t\t\t\tSystem.out.println(\"would make one from \"+ncbirel.getStartNode().getProperty(\"name\")+\" \"+ncbirel.getEndNode().getProperty(\"name\"));\n \t\t\t\t\tif(ncbirel.getStartNode()!=ncbirel.getEndNode()){\n \t\t\t\t\t\tncbirel.getStartNode().createRelationshipTo(ncbirel.getEndNode(), RelTypes.PREFTAXCHILDOF);\n \t\t\t\t\t\tRelationship newrel2 = ncbirel.getStartNode().createRelationshipTo(ncbirel.getEndNode(), RelTypes.TAXCHILDOF);\n \t\t\t\t\t\tnewrel2.setProperty(\"source\", \"ottol\");\n \t\t\t\t\t}else{\n \t\t\t\t\t\tSystem.out.println(\"would make cycle from \"+ncbirel.getEndNode().getProperty(\"name\"));\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\tif(count % transaction_iter == 0)\n \t\t\t\t\tSystem.out.println(count);\n \t\t\t}\n \t\t\ttx.success();\n \t\t}finally{\n \t\t\ttx.finish();\n \t\t}\n \t}", "public void loadOntology(OntologyDocument mainOntology, Collection<OntologyDocument> subOntologies, boolean loadSubOntologies)\r\n\t{\r\n\t\t//Configure local copies of the ontologies\r\n\t\tOntDocumentManager dm = ONT_MODEL.getDocumentManager();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tif(mainOntology.hasAltLocalFile())\r\n\t\t\t\tdm.addAltEntry(mainOntology.getURL(), mainOntology.getLocalfile());\r\n\t\t} catch (NoLocalFileException e) {\r\n\t\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).error(e);\r\n\t\t}\r\n\t\t\r\n\t\tfor(OntologyDocument od : subOntologies)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\tif(od.hasAltLocalFile())\r\n\t\t\t\tdm.addAltEntry(od.getURL(), od.getLocalfile());\r\n\t\t\t} catch (NoLocalFileException e) {\r\n\t\t\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).error(e);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).info(\"Loading Main Ontology: \"+mainOntology.getURL());\r\n\t\tONT_MODEL.read(mainOntology.getURL());\t\r\n\t\tBASE_NS = (String)ONT_MODEL.getNsPrefixMap().get(\"\");\r\n\t\t\r\n\t\tif(loadSubOntologies)\r\n\t\t\tfor(OntologyDocument od : subOntologies)\r\n\t\t\t{\r\n\t\t\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).info(\"Loading Sub-Ontology: \"+od.getURL());\r\n\t\t\t\tONT_MODEL.read(od.getURL());\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).info(\"Loading Complete\");\r\n\t\t//Print Namespaces\r\n\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).info( \"Base Namespace: \"+ BASE_NS );\r\n\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).info( \"Namespaces loaded: \" + ONT_MODEL.getNsPrefixMap() );\r\n\t\t\r\n\t\tpreCalculateProfs();\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void updateResourceInformation() {\n\t}", "public void testInheritanceGetAllAttributes()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\t// Step 2\t\t\t\r\n\t\t\tentityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\t\t\tentityManagerInterface.persistEntity(advanceTissueSpecimenB);\r\n\r\n\t\t\t// Step 3\t\r\n\r\n\t\t\tCollection<AttributeInterface> specimenAttributes = specimen.getAllAttributes();\r\n\t\t\t//2 user attributes + 1 system attribute for id\r\n\t\t\tassertEquals(3, specimenAttributes.size());\r\n\r\n\t\t\t//2 child Attributes + 1 parent Attribute + 2 system generated attributes for id\r\n\t\t\tCollection<AttributeInterface> tissueSpecimenAttributes = tissueSpecimen\r\n\t\t\t\t\t.getAllAttributes();\r\n\t\t\tassertEquals(5, tissueSpecimenAttributes.size());\r\n\r\n\t\t\tCollection<AttributeInterface> advanceTissueSpecimenAAttributes = advanceTissueSpecimenA\r\n\t\t\t\t\t.getAllAttributes();\r\n\t\t\t//1 child attribute + 2 parent Attribute + 1 grand parent attribute + 3 system generated attributes\r\n\t\t\tassertEquals(7, advanceTissueSpecimenAAttributes.size());\r\n\r\n\t\t\tCollection<AttributeInterface> advanceTissueSpecimenBAttributes = advanceTissueSpecimenB\r\n\t\t\t\t\t.getAllAttributes();\r\n\t\t\t//2 child attribute + 2 parent Attribute + 1 grand parent attribute + 3 system generated attributes\r\n\t\t\tassertEquals(8, advanceTissueSpecimenBAttributes.size());\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "@Test\n public void f12AssociateAssetTypeWithModelTest() {\n clickOn(\"#assetTypeMenuBtn\").sleep(2000);\n\n //select second asset type\n Node node = lookup(\"#columnName\").nth(2).query();\n clickOn(node).sleep(1000);\n\n clickOn(\"#associatedModelLabel\").sleep(1000);\n Label label = (Label) scene.getRoot().lookup(\"#associatedModelLabel\");\n String modelBefore = label.getText();\n\n //go to model tab\n clickOn(scene.getRoot().lookup(\"#modelTab\")).sleep(1000);\n FlowPane models = (FlowPane) scene.getRoot().lookup(\"#modelsThumbPane\");\n\n //change to RandomForest\n clickOn(models.getChildren().get(2)).sleep(1000);\n clickOn(\"#modelSaveBtn\").sleep(1000);\n\n node = lookup(\"#columnName\").nth(2).query();\n clickOn(node);\n\n label = (Label) scene.getRoot().lookup(\"#associatedModelLabel\");\n String modelAfter = label.getText();\n\n clickOn(\"#associatedModelLabel\").sleep(3000);\n //model after changing should not be the same\n assertFalse(\"Model after changing is the same as it was before.\", modelBefore.equals(modelAfter));\n }", "@SuppressWarnings(\"null\")\n\tprotected void writeToModel(Resource owner,Model model,String baseURI) throws InvalidLinkedUSDLModelException\n\t{\n\t\tResource pp = null;\n\n\t\tif(baseURI != null || !baseURI.equalsIgnoreCase(\"\")) // the baseURI argument is valid\n\t\t\tthis.namespace = baseURI;\n\t\telse if(this.getNamespace() == null) //use the default baseURI\n\t\t\tthis.namespace = PricingAPIProperties.defaultBaseURI;\n\t\t\n\t\tif(this.localName != null){\n\t\t\tLinkedUSDLValidator validator = new LinkedUSDLValidator();\n\t\t\tvalidator.checkDuplicateURI(model, ResourceFactory.createResource(this.namespace + this.localName),Prefixes.USDL_PRICE.getName()+\":\"+this.resourceType);\n\t\t\tpp = model.createResource(this.namespace + this.localName);\n\t\t\t\n\t\t\tpp.addProperty(RDFSEnum.LABEL.getProperty(model), model.createLiteral(this.name));//label name\n\t\t\t\n\t\t\tpp.addProperty(RDFEnum.RDF_TYPE.getProperty(model), USDLPriceEnum.PRICE_PLAN.getResource(model));//rdf type\n\t\t\t\n\t\t\tif(this.comment != null)\n\t\t\t\tpp.addProperty(RDFSEnum.COMMENT.getProperty(model), model.createLiteral(this.comment)); // a comment\n\t\t\t\n\t\t\tif(this.priceCap != null)\n\t\t\t{\n\t\t\t\tpriceCap.writeToModel(pp,model,baseURI);//we need to pass pp in order to establish a connection between the resource PricePlan and the resource priceCap\n\t\t\t}\n\t\t\t\n\t\t\tif(this.priceFloor != null)\n\t\t\t{\n\t\t\t\tpriceFloor.writeToModel(pp,model,baseURI);//we need to pass pp in order to establish a connection between the resource PricePlan and the resource priceCap\n\t\t\t}\n\t\t\t\n\t\t\tif(!priceComponents.isEmpty())\n\t\t\t{\n\t\t\t\tfor(PriceComponent pc : priceComponents)\n\t\t\t\t{\n\t\t\t\t\tpc.writeToModel(pp,model,baseURI);//we need to pass pp in order to establish a connection between the resource PricePlan and the resource priceCap\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\towner.addProperty(USDLPriceEnum.HAS_PRICE_PLAN.getProperty(model), pp);//establish a connection between the owner of the PricePlan and the created PricePlan, wich will probably be an instance of the ServiceOffering object\n\t\t}\n\t\t\n\t\t\n\t}", "public void testGetDataForInheritance()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\t\t\tAttributeInterface barcode = factory.createStringAttribute();\r\n\t\t\tbarcode.setName(\"barcode\");\r\n\t\t\tspecimen.addAbstractAttribute(barcode);\r\n\r\n\t\t\tAttributeInterface label = factory.createStringAttribute();\r\n\t\t\tlabel.setName(\"label\");\r\n\t\t\tspecimen.addAbstractAttribute(label);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\r\n\t\t\tAttributeInterface quantityInCellCount = factory.createIntegerAttribute();\r\n\t\t\tquantityInCellCount.setName(\"quantityInCellCount\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(quantityInCellCount);\r\n\r\n\t\t\tAttributeInterface arivalDate = factory.createDateAttribute();\r\n\t\t\tarivalDate.setName(\"arivalDate\");\r\n\t\t\ttissueSpecimen.addAbstractAttribute(arivalDate);\r\n\r\n\t\t\t//step 2\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenA = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenA.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenA.setName(\"advanceTissueSpecimenA\");\r\n\r\n\t\t\tAttributeInterface newAttribute = factory.createIntegerAttribute();\r\n\t\t\tnewAttribute.setName(\"newAttributeA\");\r\n\t\t\tadvanceTissueSpecimenA.addAbstractAttribute(newAttribute);\r\n\r\n\t\t\tEntityInterface advanceTissueSpecimenB = factory.createEntity();\r\n\t\t\tadvanceTissueSpecimenB.setParentEntity(tissueSpecimen);\r\n\t\t\tadvanceTissueSpecimenB.setName(\"advanceTissueSpecimenB\");\r\n\r\n\t\t\tAttributeInterface newAttributeB = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB.setName(\"newAttributeB\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB);\r\n\t\t\tAttributeInterface newAttributeB2 = factory.createIntegerAttribute();\r\n\t\t\tnewAttributeB2.setName(\"newAttributeB2\");\r\n\t\t\tadvanceTissueSpecimenB.addAbstractAttribute(newAttributeB2);\r\n\r\n\t\t\tadvanceTissueSpecimenA = entityManagerInterface.persistEntity(advanceTissueSpecimenA);\r\n\t\t\tadvanceTissueSpecimenB = entityManagerInterface.persistEntity(advanceTissueSpecimenB);\r\n\r\n\t\t\t/*\r\n\t\t\t * Test getData method\r\n\t\t\t */\r\n\r\n\t\t\t//step 3\t\t\t\r\n\t\t\tMap dataValue = new HashMap();\r\n\t\t\tdataValue.put(barcode, \"123456\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"45\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-12-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\r\n\t\t\tLong recordId = entityManagerInterface.insertData(tissueSpecimen, dataValue);\r\n\r\n\t\t\tMap outputMap = entityManagerInterface.getRecordById(tissueSpecimen, recordId);\r\n\r\n\t\t\t//step 4\t\r\n\t\t\tassertEquals(4, outputMap.size());\r\n\t\t\tassertEquals(\"123456\", outputMap.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label\", outputMap.get(label));\r\n\t\t\tassertEquals(\"45\", outputMap.get(quantityInCellCount));\r\n\t\t\tassertEquals(\"11-12-1982\", outputMap.get(arivalDate));\r\n\r\n\t\t\t//step 5\t\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"869\");\r\n\t\t\tdataValue.put(label, \"specimen parent label\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"46\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"11-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttribute, \"12\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenA, dataValue);\r\n\r\n\t\t\toutputMap = entityManagerInterface.getRecordById(advanceTissueSpecimenA, recordId);\r\n\t\t\t//step 6\t\t\t\r\n\t\t\tassertEquals(5, outputMap.size());\r\n\t\t\tassertEquals(\"869\", outputMap.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label\", outputMap.get(label));\r\n\t\t\tassertEquals(\"46\", outputMap.get(quantityInCellCount));\r\n\t\t\tassertEquals(\"11-11-1982\", outputMap.get(arivalDate));\r\n\r\n\t\t\t//step 7\t\t\t\t\r\n\t\t\tdataValue.clear();\r\n\t\t\tdataValue.put(barcode, \"1001\");\r\n\t\t\tdataValue.put(label, \"specimen parent label new\");\r\n\t\t\tdataValue.put(quantityInCellCount, \"411\");\r\n\t\t\tdataValue.put(arivalDate, Utility.parseDate(\"01-11-1982\",\r\n\t\t\t\t\tConstants.DATE_PATTERN_MM_DD_YYYY));\r\n\t\t\tdataValue.put(newAttributeB, \"40\");\r\n\t\t\tdataValue.put(newAttributeB2, \"41\");\r\n\r\n\t\t\trecordId = entityManagerInterface.insertData(advanceTissueSpecimenB, dataValue);\r\n\t\t\toutputMap = entityManagerInterface.getRecordById(advanceTissueSpecimenB, recordId);\r\n\t\t\t//step 8\t\t\t\t\r\n\t\t\tassertEquals(6, outputMap.size());\r\n\t\t\tassertEquals(\"1001\", outputMap.get(barcode));\r\n\t\t\tassertEquals(\"specimen parent label new\", outputMap.get(label));\r\n\t\t\tassertEquals(\"411\", outputMap.get(quantityInCellCount));\r\n\t\t\tassertEquals(\"01-11-1982\", outputMap.get(arivalDate));\r\n\t\t\tassertEquals(\"40\", outputMap.get(newAttributeB));\r\n\t\t\tassertEquals(\"41\", outputMap.get(newAttributeB2));\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "@Test\n public void testRelRevSupport() throws RepositoryException {\n assertExtract(\"/html/rdfa/rel-rev.html\");\n logger.debug(dumpModelToTurtle());\n\n assertContains(baseIRI, RDFUtils.iri(\"http://bob.example.com/cite\"),\n RDFUtils.iri(\"http://www.example.com/books/the_two_towers\"));\n assertContains(RDFUtils.iri(\"http://path/to/chapter\"), RDFUtils.iri(\"http://bob.example.com/isChapterOf\"),\n baseIRI);\n }", "opmodelFactory getopmodelFactory();", "public interface ContinuousStateDatum extends org.cdao.jastor.CharacterStateDatum, com.ibm.adtech.jastor.Thing {\n\t\n\t/**\n\t * The rdf:type for this ontology class\n */\n\tpublic static final Resource TYPE = ResourceFactory.createResource(\"http://localhost/~vivek/cdao.owl#ContinuousStateDatum\");\n\t\n\n\t/**\n\t * The Jena Property for has__Continuous__State \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Continuous_State)</p>\n\t * <br>\n\t * Dublin Core Standard Properties <br>\n\t * \tdescription : This property associates a character-state instance with a state value on a continuous numeric scale.^^http://www.w3.org/2001/XMLSchema#string <br>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Continuous__StateProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Continuous_State\");\n\n\n\t/**\n\t * The Jena Property for belongs__to__Continuous__Character \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#belongs_to_Continuous_Character)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property belongs__to__Continuous__CharacterProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#belongs_to_Continuous_Character\");\n\n\n\t/**\n\t * The Jena Property for has__Annotation \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Annotation)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__AnnotationProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Annotation\");\n\n\n\t/**\n\t * The Jena Property for belongs__to \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#belongs_to)</p>\n\t * <br>\n\t * Dublin Core Standard Properties <br>\n\t * \tdescription : Generic property that links a concept to another concept it is a constituent of. The property is a synonym of part_of. <br>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property belongs__toProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#belongs_to\");\n\n\n\t/**\n\t * The Jena Property for has__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Support__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Support_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Support__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Support_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Float__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Float_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Float__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Float_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Int__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Int_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Int__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Int_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Uncertainty__Factor \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Uncertainty_Factor)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Uncertainty__FactorProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Uncertainty_Factor\");\n\n\n\t/**\n\t * The Jena Property for has__Precision \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Precision)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__PrecisionProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Precision\");\n\n\n\t/**\n\t * The Jena Property for has__External__Reference \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_External_Reference)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__External__ReferenceProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_External_Reference\");\n\n\n\t/**\n\t * The Jena Property for connects__to \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#connects_to)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property connects__toProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#connects_to\");\n\n\n\t/**\n\t * The Jena Property for has \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has)</p>\n\t * <br>\n\t * Dublin Core Standard Properties <br>\n\t * \tdescription : Generic 'has' property. <br>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property hasProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has\");\n\n\n\t/**\n\t * The Jena Property for part__of \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#part_of)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property part__ofProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#part_of\");\n\n\n\t/**\n\t * The Jena Property for precedes \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#precedes)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property precedesProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#precedes\");\n\n\n\n\n\t/**\n\t * Get an Iterator the 'has__Continuous__State' property values. This Iteartor\n\t * may be used to remove all such values.\n\t * @return\t\t{@link java.util.Iterator} of {@link org.cdao.jastor.Continuous}\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic java.util.Iterator getHas__Continuous__State() throws com.ibm.adtech.jastor.JastorException;\n\n\t/**\n\t * Adds a value for the 'has__Continuous__State' property\n\t * @param\t\tThe {@link org.cdao.jastor.Continuous} to add\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic void addHas__Continuous__State(org.cdao.jastor.Continuous has__Continuous__State) throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Adds an anonymous value for the 'has__Continuous__State' property\n\t * @return\t\tThe anoymous {@link org.cdao.jastor.Continuous} created\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic org.cdao.jastor.Continuous addHas__Continuous__State() throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * \n\t * The resource argument have rdf:type http://localhost/~vivek/cdao.owl#Continuous. That is, this method\n\t * should not be used as a shortcut for creating new objects in the model.\n\t * @param\t\tThe {@link om.hp.hpl.jena.rdf.model.Resource} to add\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic org.cdao.jastor.Continuous addHas__Continuous__State(com.hp.hpl.jena.rdf.model.Resource resource) throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Removes a value for the 'has__Continuous__State' property. This method should not\n\t * be invoked while iterator through values. In that case, the remove() method of the Iterator\n\t * itself should be used.\n\t * @param\t\tThe {@link org.cdao.jastor.Continuous} to remove\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic void removeHas__Continuous__State(org.cdao.jastor.Continuous has__Continuous__State) throws com.ibm.adtech.jastor.JastorException;\n\t\t\n\t/**\n\t * Gets the 'belongs__to__Continuous__Character' property value\n\t * @return\t\t{@link org.cdao.jastor.ContinuousCharacter}\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\n\tpublic org.cdao.jastor.ContinuousCharacter getBelongs__to__Continuous__Character() throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Sets the 'belongs__to__Continuous__Character' property value\n\t * @param\t\t{@link org.cdao.jastor.ContinuousCharacter}\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\n\tpublic void setBelongs__to__Continuous__Character(org.cdao.jastor.ContinuousCharacter belongs__to__Continuous__Character) throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Sets the 'belongs__to__Continuous__Character' property value to an anonymous node\n\t * @return\t\t{@link org.cdao.jastor.ContinuousCharacter}, the created value\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\t\n\tpublic org.cdao.jastor.ContinuousCharacter setBelongs__to__Continuous__Character() throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Sets the 'belongs__to__Continuous__Character' property value to the given resource\n\t * The resource argument should have rdf:type http://localhost/~vivek/cdao.owl#ContinuousCharacter. That is, this method\n\t * should not be used as a shortcut for creating new objects in the model.\n\t * @param\t\t{@link com.hp.hpl.jena.rdf.model.Resource} must not be be null.\n\t * @return\t\t{@link org.cdao.jastor.ContinuousCharacter}, the newly created value\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\n\tpublic org.cdao.jastor.ContinuousCharacter setBelongs__to__Continuous__Character(com.hp.hpl.jena.rdf.model.Resource resource) throws com.ibm.adtech.jastor.JastorException;\n\t\n}", "@Override\n\tpublic void updateResourceInformation() {\n\t}", "@Test\n public void testDAM32102001() {\n // By default the loading related entity is eager.\n testDAM32101001();\n }", "public interface MaternalTransfer extends org.eclipse.mdht.uml.cda.Observation {\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferTemplateId'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.templateId->exists(id : datatypes::II | id.root = \\'2.16.840.1.113883.10.20.26.35\\')'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferTemplateId(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferClassCode'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.classCode=vocab::ActClassObservation::OBS'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferClassCode(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferMoodCode'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.moodCode=vocab::x_ActMoodDocumentObservation::EVN'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferMoodCode(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferCodeP'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined())'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferCodeP(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferCode'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='(self.code.oclIsUndefined() or self.code.isNullFlavorUndefined()) implies (not self.code.oclIsUndefined() and self.code.oclIsKindOf(datatypes::CD) and \\nlet value : datatypes::CD = self.code.oclAsType(datatypes::CD) in \\nvalue.code = \\'73763-5\\' and value.codeSystem = \\'2.16.840.1.113883.6.1\\')'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferCode(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferValue'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='(self.value->isEmpty() or self.value->exists(element | element.isNullFlavorUndefined())) implies (self.value->size() = 1 and self.value->forAll(element | element.oclIsTypeOf(datatypes::BL)))'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferValue(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * <!-- begin-model-doc -->\n\t * @param diagnostics The chain of diagnostics to which problems are to be appended.\n\t * @param context The cache of context-specific information.\n\t * <!-- end-model-doc -->\n\t * @model annotation=\"http://www.eclipse.org/uml2/2.0.0/UML originalName='Maternal TransferParticipant'\"\n\t * annotation=\"http://www.eclipse.org/uml2/1.1.0/GenModel body='self.participant->one(participant : cda::Participant2 | not participant.oclIsUndefined() and participant.oclIsKindOf(cda::Participant2))'\"\n\t * @generated\n\t */\n\tboolean validateMaternalTransferParticipant(DiagnosticChain diagnostics, Map<Object, Object> context);\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tpublic MaternalTransfer init();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @generated\n\t */\n\tpublic MaternalTransfer init(\n\t\t\tIterable<? extends org.eclipse.mdht.emf.runtime.util.Initializer<? extends EObject>> initializers);\n}", "public void test0104() throws JavaModelException {\n\tIPath projectPath = env.addProject(\"Project\");\n\tenv.removePackageFragmentRoot(projectPath, \"\");\n\tIPath root = env.addPackageFragmentRoot(projectPath, \"src\");\n\tIPath classTest1 = env.addClass(root, \"p1\", \"Test1\",\n\t\t\"package p1;\\n\" +\n\t\t\"public class Test1 {}\"\n\t);\n\tfullBuild();\n\tProblem[] prob1 = env.getProblemsFor(classTest1);\n\texpectingSpecificProblemFor(classTest1, \n\t\tnew Problem(\"p1\", \"The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files\", classTest1, 0, 1, 10));\n\tassertEquals(JavaBuilder.GENERATED_BY, prob1[0].getGeneratedBy());\n}", "@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 }", "@Test(description = \"update interface with one relationship for existing interface with all relationships\")\n public void updateOneRelationship4ExistingAllRelationships()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final RelationshipData rel = data.getRelationship(\"TestRel\");\n final InterfaceData inter = data.getInterface(\"TestInterface\").addAllRelationships();\n data.create();\n\n inter.removeRelationships()\n .addRelationship(rel);\n this.update(inter);\n\n Assert.assertEquals(this.mql(\"print interface '\" + inter.getName() + \"' select relationship dump\"),\n rel.getName(),\n \"check that only one relationship is defined\");\n }", "DppBaseResourceInner innerModel();", "public void initWithPelletReasoner()\r\n\t{\r\n\t\tcredits();\r\n\t\tONT_MODEL = ModelFactory.createOntologyModel(PelletReasonerFactory.THE_SPEC);\t\r\n\t}", "@Test\n public void test11RelationshipConfigIdName() throws Exception\n {\n Collection<PSConfig> configs = ms_cms.findAllConfigs();\n assertTrue(configs.size() == 2);\n \n List<PSRelationshipConfigName> aaList = \n ms_cms.findRelationshipConfigNames(\"%Assembly%\");\n for (PSRelationshipConfigName cfg : aaList)\n {\n assertTrue(cfg.getName().contains(\"Assembly\"));\n }\n \n PSConfig cfg = ms_cms.findConfig(\n PSConfigurationFactory.RELATIONSHIPS_CFG);\n assertNotNull(cfg);\n \n PSRelationshipConfigSet relConfigSet = loadRelationshipConfigSet();\n\n //\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\\n // Negative testing various operations on SYSTEM relationship configs\n //\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\\n \n // modify an id of a system relationship config\n PSRelationshipConfig sysConfig = relConfigSet\n .getConfig(PSRelationshipConfig.TYPE_FOLDER_CONTENT);\n try\n {\n sysConfig.setId(100);\n // above line should fail, cannot set id to an object which already\n // has an assigned id.\n assertTrue(false); \n }\n catch (Exception e) {}\n sysConfig.resetId();\n sysConfig.setId(100); \n try\n {\n saveRelationshipConfigSet(relConfigSet, cfg);\n // above line should fail, id of a system config cannot be modified.\n assertTrue(false); \n }\n catch (Exception e) {}\n\n try\n {\n relConfigSet.deleteConfig(sysConfig.getName());\n // above line should fail, cannot delete a system config.\n assertTrue(false); \n }\n catch (Exception e) {}\n \n //\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\\n // Negative testing various operations on USER relationship configs\n //\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\\n \n relConfigSet = loadRelationshipConfigSet();\n PSRelationshipConfig userConfig = (PSRelationshipConfig) relConfigSet\n .getConfig(PSRelationshipConfig.TYPE_FOLDER_CONTENT).clone();\n userConfig.setType(PSRelationshipConfig.RS_TYPE_USER);\n userConfig.resetId();\n relConfigSet.add(userConfig);\n try\n {\n saveRelationshipConfigSet(relConfigSet, cfg);\n // above line should fail, cannot save with a user config with DUP-NAME.\n assertTrue(false); \n }\n catch (Exception e) {}\n\n userConfig.setName(\"myFolderContent\");\n userConfig.resetId();\n userConfig.setId(\n PSRelationshipConfig.SysConfigEnum.FOLDER_CONTENT.getId());\n try\n {\n saveRelationshipConfigSet(relConfigSet, cfg);\n // above line should fail, cannot save with a user config with DUP-ID.\n assertTrue(false); \n }\n catch (Exception e) {}\n \n }", "@Override\n public void addRelationshipBetweenPhysicalAndPhysical(PhysicalObject physicalObjectA,\n PhysicalObject physicalObjectB, double weight) {\n assert false : \"shouldn't call this method\";\n }", "public interface Type<SomeType extends Type<SomeType, SomeThing>,\n SomeThing extends Thing<SomeThing, SomeType>>\n extends SchemaConcept<SomeType> {\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type<SomeType, SomeThing> asType() {\n return this;\n }\n\n @Override\n Remote<SomeType, SomeThing> asRemote(GraknClient.Transaction tx);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n\n interface Local<\n SomeType extends Type<SomeType, SomeThing>,\n SomeThing extends Thing<SomeThing, SomeType>>\n extends SchemaConcept.Local<SomeType>, Type<SomeType, SomeThing> {\n }\n\n /**\n * A Type represents any ontological element in the graph.\n * Types are used to model the behaviour of Thing and how they relate to each other.\n * They also aid in categorising Thing to different types.\n */\n interface Remote<\n SomeRemoteType extends Type<SomeRemoteType, SomeRemoteThing>,\n SomeRemoteThing extends Thing<SomeRemoteThing, SomeRemoteType>>\n extends SchemaConcept.Remote<SomeRemoteType>, Type<SomeRemoteType, SomeRemoteThing> {\n\n //------------------------------------- Modifiers ----------------------------------\n\n /**\n * Changes the Label of this Concept to a new one.\n *\n * @param label The new Label.\n * @return The Concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> label(Label label);\n\n /**\n * Sets the Type to be abstract - which prevents it from having any instances.\n *\n * @param isAbstract Specifies if the concept is to be abstract (true) or not (false).\n * @return The concept itself\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> isAbstract(Boolean isAbstract);\n\n /**\n * @param role The Role Type which the instances of this Type are allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> plays(Role role);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked in a strictly one-to-one mapping.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> key(AttributeType<?> attributeType);\n\n /**\n * Creates a RelationType which allows this type and a AttributeType to be linked.\n *\n * @param attributeType The AttributeType which instances of this type should be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> has(AttributeType<?> attributeType);\n\n //------------------------------------- Accessors ---------------------------------\n\n /**\n * @return A list of Role Types which instances of this Type can indirectly play.\n */\n Stream<Role.Remote> playing();\n\n /**\n * @return The AttributeTypes which this Type is linked with.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> attributes();\n\n /**\n * @return The AttributeTypes which this Type is linked with as a key.\n */\n @CheckReturnValue\n Stream<? extends AttributeType.Remote<?>> keys();\n\n /**\n * @return All the the super-types of this Type\n */\n @Override\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> sups();\n\n /**\n * Get all indirect sub-types of this type.\n * The indirect sub-types are the type itself and all indirect sub-types of direct sub-types.\n *\n * @return All the indirect sub-types of this Type\n */\n @Override\n @CheckReturnValue\n Stream<? extends Type.Remote<SomeRemoteType, SomeRemoteThing>> subs();\n\n /**\n * Get all indirect instances of this type.\n * The indirect instances are the direct instances and all indirect instances of direct sub-types.\n *\n * @return All the indirect instances of this type.\n */\n @CheckReturnValue\n Stream<? extends Thing.Remote<SomeRemoteThing, SomeRemoteType>> instances();\n\n /**\n * Return if the type is set to abstract.\n * By default, types are not abstract.\n *\n * @return returns true if the type is set to be abstract.\n */\n @CheckReturnValue\n Boolean isAbstract();\n\n //------------------------------------- Other ----------------------------------\n\n /**\n * Removes the ability of this Type to play a specific Role\n *\n * @param role The Role which the Things of this Type should no longer be allowed to play.\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unplay(Role role);\n\n /**\n * Removes the ability for Things of this Type to have Attributes of type AttributeType\n *\n * @param attributeType the AttributeType which this Type can no longer have\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unhas(AttributeType<?> attributeType);\n\n /**\n * Removes AttributeType as a key to this Type\n *\n * @param attributeType the AttributeType which this Type can no longer have as a key\n * @return The Type itself.\n */\n Type.Remote<SomeRemoteType, SomeRemoteThing> unkey(AttributeType<?> attributeType);\n\n @Deprecated\n @CheckReturnValue\n @Override\n default Type.Remote<SomeRemoteType, SomeRemoteThing> asType() {\n return this;\n }\n\n @Deprecated\n @CheckReturnValue\n @Override\n default boolean isType() {\n return true;\n }\n }\n}", "@Test\n\tpublic void deletingAReferencedResourceRemovesReference() {\n\t\tfinal PhysicalElement pe = resMan.createResource(newResourceName(), PhysicalElement.class);\n\t\tfinal PhysicalElement pe2 = resMan.createResource(newResourceName(), PhysicalElement.class);\n\n\t\tpe2.location().create();\n\t\tpe.location().setAsReference(pe2.location());\n\n\t\tassertExists(pe2.location());\n\t\tassertFalse(pe2.location().isReference(false));\n\t\tassertExists(pe.location());\n\t\tassertTrue(pe.location().isReference(false));\n\n\t\tpe2.location().delete();\n\t\tassertDeleted(pe2.location());\n\t\tassertDeleted(pe.location());\n\t\tassertFalse(pe.location().isReference(false));\n\t}", "public void merge(Ontology o);", "@Test\n\tpublic void testUimaFitAndClasspathResourceModel() throws Exception {\n\t\tJCas jCas = JCasFactory.createJCas(\"de.julielab.jcore.types.jcore-all-types\");\n\t\tjCas.setDocumentText(\"This is a nice sentence.\");\n\t\tnew Sentence(jCas, 0, jCas.getDocumentText().length()).addToIndexes();\n\t\tnew Token(jCas, 0, 4).addToIndexes();\n\t\tnew Token(jCas, 5, 7).addToIndexes();\n\t\tnew Token(jCas, 8, 9).addToIndexes();\n\t\tnew Token(jCas, 10, 14).addToIndexes();\n\t\tnew Token(jCas, 15, 23).addToIndexes();\n\t\tnew Token(jCas, 23, 24).addToIndexes();\n\n\t\t// creating and running the PoS tag annotator\n\t\tAnalysisEngine engine =\n\t\t\t\tAnalysisEngineFactory.createEngine(PosTagAnnotator.class, PosTagAnnotator.PARAM_TAGSET,\n\t\t\t\t\t\t\"de.julielab.jcore.types.PennBioIEPOSTag\", PosTagAnnotator.PARAM_MODEL_FILE,\n\t\t\t\t\t\t\"POSTagPennBioIE-3.0.bin.gz\");\n\t\tengine.process(jCas.getCas());\n\n\t\tCollection<PennBioIEPOSTag> posTags = JCasUtil.select(jCas, PennBioIEPOSTag.class);\n\t\t// Check the generated POS tags. I know, 'nice' is not an NN, this is obviously not a word often used in the\n\t\t// training data.\n\t\t// And yes, I know, looks overly complex for a string concatenation :-)\n\t\tassertEquals(\"DT VBZ DT NN NN .\", StringUtils.join(\n\t\t\t\tCollections2.<PennBioIEPOSTag, String> transform(posTags, new Function<PennBioIEPOSTag, String>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic String apply(PennBioIEPOSTag input) {\n\t\t\t\t\t\treturn input.getValue();\n\t\t\t\t\t}\n\t\t\t\t}), \" \"));\n\t}", "public Main() {\r\n\t\t\t// TODO Auto-generated constructor stub\r\n\t OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null );\r\n\r\n\t // we have a local copy of the wine ontology\r\n/*\t m.getDocumentManager().addAltEntry( \"http://www.w3.org/2001/sw/WebOnt/guide-src/wine\",\r\n\t \"file:testing/reasoners/bugs/wine.owl\" );\r\n\t m.getDocumentManager().addAltEntry( \"http://www.w3.org/2001/sw/WebOnt/guide-src/food\",\r\n\t \"file:testing/reasoners/bugs/food.owl\" );*/\r\n\r\n//\t m.read( \"http://www.w3.org/2001/sw/WebOnt/guide-src/wine\" );\r\n\t m = loadOntModelFromOwlFile(\"C:\\\\Documents and Settings\\\\Administrador\\\\Escritorio\\\\Tesis\\\\Ontologias\\\\turismo2.owl\");\r\n\t ClassHierarchy classh = new ClassHierarchy();\r\n\t classh.showHierarchy2( System.out, m );\r\n\t classh.creoInd(m);\r\n\t classh.showHierarchy( System.out, m );\r\n\t\t}" ]
[ "0.69991106", "0.64872515", "0.64777446", "0.6471463", "0.62705654", "0.6268071", "0.62405485", "0.6086918", "0.5985408", "0.59333277", "0.59137195", "0.58753157", "0.5872665", "0.58510214", "0.5817298", "0.5798291", "0.57781637", "0.57169425", "0.5700158", "0.5694701", "0.55740756", "0.5564269", "0.5563676", "0.5554216", "0.55499697", "0.5549272", "0.5539147", "0.5537836", "0.55082417", "0.54895806", "0.54854965", "0.5473403", "0.5466806", "0.5465727", "0.54642206", "0.54575443", "0.5452373", "0.5428732", "0.5427374", "0.54215497", "0.54122126", "0.54097", "0.5407109", "0.5406486", "0.5403059", "0.54011524", "0.5397302", "0.5354373", "0.5348648", "0.5341267", "0.53257483", "0.53154576", "0.5305248", "0.53025895", "0.53013355", "0.5284268", "0.527803", "0.52607626", "0.526072", "0.5259511", "0.5255491", "0.52445596", "0.5238288", "0.52258426", "0.5225549", "0.5221648", "0.52183616", "0.5217202", "0.5208597", "0.51955044", "0.51930743", "0.5181261", "0.515881", "0.5156741", "0.51560754", "0.5148831", "0.5145474", "0.5139082", "0.5138701", "0.5130523", "0.51245683", "0.51220596", "0.511981", "0.511973", "0.5115371", "0.5113369", "0.5112529", "0.5108221", "0.5106641", "0.5104787", "0.51019365", "0.5089429", "0.50881875", "0.5086619", "0.50746715", "0.5063995", "0.50539273", "0.50440156", "0.5037528", "0.50350446" ]
0.6763117
1
Bug report by Christoph Kunz, 26/Aug/03. CCE when creating a statement from a vocabulary
public void test_ck_02() { OntModel vocabModel = ModelFactory.createOntologyModel(); ObjectProperty p = vocabModel.createObjectProperty("p"); OntClass A = vocabModel.createClass("A"); OntModel workModel = ModelFactory.createOntologyModel(); Individual sub = workModel.createIndividual("uri1", A); Individual obj = workModel.createIndividual("uri2", A); workModel.createStatement(sub, p, obj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "QuoteTerm createQuoteTerm();", "java.lang.String getNewSentence();", "GeneralTerm createGeneralTerm();", "protected Sentence() {/* intentionally empty block */}", "public T caseLemmaStatement(LemmaStatement object) {\n\t\treturn null;\n\t}", "@Override\n public Predicate generateOutputStructure(Predicate predicate) {\n Predicate modifiedPredicate = new Predicate(predicate.getPredicateName());\n phrase = nlgFactory.createClause();\n //create phrase using the annotations of each predicate element describing its function in the sentence\n for (PredicateElement element : predicate.getElements()) {\n if (element != null && element.getPredicateElementAnnotation() != null) {\n PredicateElementAnnotation elementAnnotation = element.getPredicateElementAnnotation();\n if (elementAnnotation.equals(PredicateElementAnnotation.subject)) {\n phrase.setSubject(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.verb)) {\n phrase.setVerb(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.directObject)) {\n phrase.setObject(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.indirectObject)) {\n phrase.setIndirectObject(element.toString());\n } else if (elementAnnotation.equals(PredicateElementAnnotation.complement)) {\n phrase.setComplement(element.toString());\n }\n }\n }\n //get annotation which affect whole predicate and use them to create correct type of phrase\n if (predicate.getPredicateAnnotations() != null) {\n List<PredicateAnnotation> predicateAnnotations = predicate.getPredicateAnnotations();\n if (predicateAnnotations.contains(PredicateAnnotation.NEGATION)) {\n phrase.setFeature(Feature.NEGATED, true);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.YES_NO)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.YES_NO);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHO_SUBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHO_SUBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHAT_SUBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHAT_SUBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHO_OBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHO_OBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.WHAT_OBJECT)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.WHAT_OBJECT);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.HOW)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.HOW);\n }\n if (predicateAnnotations.contains(PredicateAnnotation.HOW_MANY)) {\n phrase.setFeature(Feature.INTERROGATIVE_TYPE, InterrogativeType.HOW_MANY);\n }\n if (predicateAnnotations.contains((PredicateAnnotation.IMPERATIVE))) {\n phrase.setFeature(Feature.FORM, Form.IMPERATIVE);\n }\n }\n //create the output sentence\n String resultString = realiser.realiseSentence(phrase);\n setOutputStructure(resultString);\n //split output structure into its elements\n String resStructure = phrase.getParent().getFeatureAsString((\"textComponents\"));\n resStructure = resStructure.replace(\"[\", \"\");\n resStructure = resStructure.replace(\"]\", \"\");\n ArrayList<String> outputOrderList = new ArrayList<>();\n String[] resSplit = resStructure.split(\",\");\n for (int i = 0; i < resSplit.length; i++) {\n outputOrderList.add(resSplit[i].trim());\n }\n //create new predicate element list\n ArrayList<PredicateElement> modifiedPredicateElementList = new ArrayList<>();\n //use this orderList as new predicate element list -> order important for planning\n boolean elementAlreadyAdded = false;\n for (String outputOrderElement : outputOrderList) {\n //keep old predicate if worldobjectid and type were already set (\"I\", \"you\")\n for(PredicateElement element: predicate.getElements()) {\n if(element.getWorldObjectId() != null && element.toString().equals(outputOrderElement)) {\n modifiedPredicateElementList.add(element);\n elementAlreadyAdded = true;\n break;\n }\n }\n if(elementAlreadyAdded) {\n elementAlreadyAdded = false;\n continue;\n }\n modifiedPredicateElementList.add(new StringPredicateElement(outputOrderElement));\n }\n if(phrase.hasFeature(Feature.INTERROGATIVE_TYPE)) {\n modifiedPredicateElementList.add(new StringPredicateElement(\"?\"));\n }else {\n modifiedPredicateElementList.add(new StringPredicateElement(\".\"));\n }\n //set new elements for the modified predicate\n modifiedPredicate.setElements(modifiedPredicateElementList.toArray(new StringPredicateElement[modifiedPredicateElementList.size()]));\n return modifiedPredicate;\n }", "public abstract CharSequence mo2160e();", "QDataSetTerm createDataSetTerm();", "private Clause make(Literal... e) {\n Clause c = new Clause();\n for (int i = 0; i < e.length; ++i) {\n c = c.add(e[i]);\n }\n return c;\n }", "public String generateSentence(Hashtable<String, Vector<String>> aHashTable) {\n\t\t\n\t\t// Vector to hold the phrase\n\t\tVector<String> newPhrase = new Vector<String>();\n\t\t\n\t\t// String for the next word\n\t\tString nextWord = \"\";\n\t\t\t\t\n\t\t// Select the first word\n\t\tVector<String> startWords = aHashTable.get(\"_start\");\n\t\tint startWordsLen = startWords.size();\n\t\tnextWord = startWords.get(rnd.nextInt(startWordsLen));\n\t\tnewPhrase.add(nextWord);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t// Keep looping through the words until we've reached the end\n\t\t\twhile (nextWord.charAt(nextWord.length()-1) != '^') \n\t\t\t{\n\t\t\t\tVector<String> wordSelection = aHashTable.get(nextWord);\n\t\t\t\tint wordSelectionLen = wordSelection.size();\n\t\t\t\tnextWord = wordSelection.get(rnd.nextInt(wordSelectionLen)).trim();\n\t\t\t\tnewPhrase.add(nextWord);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tString _tryAgain = generateSentence(aHashTable); \n\t\t\tnewPhrase.add(_tryAgain);\n\t\t}\n\t\t\n\t\tString _returnString = newPhrase.toString();\n\t\t_returnString = _returnString.substring(1, _returnString.length() -2); // remove [ and ^]\n\t\t\n\t\tString _finalString = \"\";\n String[] _splitBySpace = _returnString.split(\"[,\\\\,\\\\(\\\\)]\");\n\t\tfor(int i = 0 ; i < _splitBySpace.length ; i++)\n\t\t{\n\t\t\tif(_splitBySpace[i].trim() != \"\")\n\t\t\t\t_finalString += _splitBySpace[i].replace(\"\\\"\", \"\").trim() + \" \";\n\t\t}\n\t\t\n\t\treturn _finalString.trim();//_returnString.substring(1, _returnString.length() -2); // remove [ and ^]\t\n\t}", "LetExp createLetExp();", "EQLDecomposition createEQLDecomposition();", "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 }", "SQLCaseWhens createSQLCaseWhens();", "protected void sequence_CommCase_CommClause(ISerializationContext context, CommCase semanticObject) {\r\n\t\tgenericSequencer.createSequence(context, semanticObject);\r\n\t}", "WordConstant createWordConstant();", "Expression getActionSentence();", "void createKeyword(String name);", "STRONG createSTRONG();", "private static void insertCebuanoWords1(Context context)\n {\n WordRepository.create(context,\"i\", \"ako\",2);\n WordRepository.create(context,\"you\", \"ikaw\",2);\n WordRepository.create(context,\"mine\", \"akoa\",2);\n WordRepository.create(context,\"ours\", \"kita\",2);\n WordRepository.create(context,\"there's\", \"adunay\",2);\n WordRepository.create(context,\"your's\", \"imong\",2);\n WordRepository.create(context,\"eat\", \"kaon\",2);\n WordRepository.create(context,\"sleep\", \"pagkatulog\",2);\n WordRepository.create(context,\"run\", \"pagdagan\",2);\n WordRepository.create(context,\"enter\", \"pagsulod\",2);\n WordRepository.create(context,\"in love\", \"sa gugma\",2);\n WordRepository.create(context,\"walk\", \"lakaw\",2);\n WordRepository.create(context,\"push\", \"pagduso\",2);\n WordRepository.create(context,\"old\", \"tigulang na\",2);\n WordRepository.create(context,\"generous\", \"manggihatagon\",2);\n WordRepository.create(context,\"brave\", \"maisog\",2);\n WordRepository.create(context,\"funny\", \"kataw-anan\",2);\n WordRepository.create(context,\"evil\", \"daotan\",2);\n WordRepository.create(context,\"rich\", \"dato\",2);\n WordRepository.create(context,\"poor\", \"kabus\",2);\n WordRepository.create(context,\"shy\", \"maulaw\",2);\n WordRepository.create(context,\"ugly\", \"pangit\",2);\n WordRepository.create(context,\"dirty\", \"hugaw\",2);\n WordRepository.create(context,\"clean\", \"limpyo\",2);\n WordRepository.create(context,\"handsome\", \"gwapo\",2);\n WordRepository.create(context,\"smiling\", \"nagpahiyom\",2);\n WordRepository.create(context,\"beautiful\", \"matahum\",2);\n WordRepository.create(context,\"slouch\", \"pahuway\",2);\n WordRepository.create(context,\"tense\", \"labi\",2);\n WordRepository.create(context,\"short\", \"mubo\",2);\n WordRepository.create(context,\"tall\", \"taas\",2);\n WordRepository.create(context,\"big\", \"dako\",2);\n WordRepository.create(context,\"skinny\", \"panit\",2);\n WordRepository.create(context,\"small\", \"gamay\",2);\n WordRepository.create(context,\"deep\", \"lawom\",2);\n WordRepository.create(context,\"wide\", \"sa gilapdon\",2);\n WordRepository.create(context,\"roud\", \"makusog\",2);\n WordRepository.create(context,\"straight\", \"tul-id\",2);\n WordRepository.create(context,\"spicy\", \"maanindot\",2);\n WordRepository.create(context,\"salty\", \"asin\",2);\n WordRepository.create(context,\"sweet\", \"matam-is\",2);\n WordRepository.create(context,\"bitter\", \"pait\",2);\n WordRepository.create(context,\"harug\", \"harug\",2);\n WordRepository.create(context,\"cold\", \"kabugnaw\",2);\n WordRepository.create(context,\"hot\", \"init\",2);\n WordRepository.create(context,\"soft\", \"humok\",2);\n WordRepository.create(context,\"hard\", \"lisud\",2);\n WordRepository.create(context,\"dry\", \"uga nga\",2);\n WordRepository.create(context,\"smooth\", \"hamis nga\",2);\n WordRepository.create(context,\"rought\", \"gihunahuna\",2);\n WordRepository.create(context,\"wet\", \"basa\",2);\n WordRepository.create(context,\"silent\", \"hilom\",2);\n WordRepository.create(context,\"loud\", \"kusog\",2);\n WordRepository.create(context,\"noisy\", \"lanog\",2);\n WordRepository.create(context,\"awful\", \"makalilisang\",2);\n WordRepository.create(context,\"tingog\", \"kinabuhi\",2);\n WordRepository.create(context,\"whisper\", \"paghunghong\",2);\n WordRepository.create(context,\"few\", \"diyutay\",2);\n WordRepository.create(context,\"some\", \"pipila\",2);\n WordRepository.create(context,\"multiple\", \"daghang\",2);\n WordRepository.create(context,\"plenty\", \"daghan\",2);\n WordRepository.create(context,\"many\", \"daghan\",2);\n WordRepository.create(context,\"one\", \"sa usa ka\",2);\n WordRepository.create(context,\"several\", \"ubay-ubay\",2);\n WordRepository.create(context,\"each\", \"matag usa\",2);\n WordRepository.create(context,\"all\", \"tanan\",2);\n WordRepository.create(context,\"nasty\", \"dili maayo\",2);\n WordRepository.create(context,\"waiting\", \"naghulat\",2);\n WordRepository.create(context,\"horrible\", \"makalilisang\",2);\n WordRepository.create(context,\"artisimple\", \"artipisyal\",2);\n WordRepository.create(context,\"doubtfully\", \"pagduhaduha\",2);\n WordRepository.create(context,\"rainy\", \"ulan,\",2);\n WordRepository.create(context,\"dangerous\", \"delikado\",2);\n WordRepository.create(context,\"angry\", \"nasuko\",2);\n WordRepository.create(context,\"hurt\", \"nasakitan\",2);\n WordRepository.create(context,\"selfish\", \"hakog\",2);\n WordRepository.create(context,\"scary\", \"makahadlok\",2);\n WordRepository.create(context,\"confused\", \"naglibog\",2);\n WordRepository.create(context,\"tired\", \"gikapoy\",2);\n WordRepository.create(context,\"embarass\", \"panghimaraot\",2);\n WordRepository.create(context,\"afraid\", \"nahadlok\",2);\n WordRepository.create(context,\"lazy\", \"tapolan\",2);\n }", "Literal createLiteral();", "Literal createLiteral();", "public static String generateNegativeConstraintsConjunct(GenerateCVC1 cvc, QueryBlockDetails queryBlock, Conjunct conjunct) throws Exception {\n\n\t\t\n\t\tString constraintString = \"\";\n\n\t\tconstraintString += \"%--------------------------------\\n%NEGATIVE CONSTRAINTS FOR THIS CONJUNCT\\n%---------------------------------------\\n\";\n\t\t\n\t\tVector<String> OrConstraints=new Vector<String>();\n\t\tVector<String> OrStringConstraints = new Vector<String>();\n\n\t\t/** Generate negative constraint for equivalence class.*/\n\t\t/**FIXME: Mahesh..Ask Amol why the below code and why cant't we use getconstraintsforequijoins()*/\n\t\tif(!conjunct.getEquivalenceClasses().isEmpty()){\n\n\t\t\t/**Get the equivalence classes*/\n\t\t\tVector<Vector<Node>> equivalenceClasses = conjunct.getEquivalenceClasses();\n\n\t\t\tfor(int i=0; i<equivalenceClasses.size(); i++){\t/** For each equivalence class list*/\n\n\t\t\t\t/**Get this equivalence */\n\t\t\t\tVector<Node> ec = equivalenceClasses.get(i);\n\n\t\t\t\t/**for each node in this equivalence*/\n\t\t\t\tfor(int j=0;j<ec.size(); j++)\n\t\t\t\t{\n\n\t\t\t\t\tNode eceNulled = ec.get(j);\t\t\t/** This is R.a - to be nulled */\n\n\n\t\t\t\t\tString CVCStr = \"%DataSet Generated By Nulling: \"+ ((Node)eceNulled).toString() + \"\\n\";\n\t\t\t\t\tTable tableNulled = eceNulled.getTable();\n\t\t\t\t\tColumn colNulled = eceNulled.getColumn();\n\n\t\t\t\t\t/** TODO: Have one vector for positive and negative conditions. */\n\n\t\t\t\t\tcvc.setResultsetTableColumns1( new HashMap<Table, Vector<String>>() );\t\t\t\t\t\n\n\t\t\t\t\t/** S = set of elements in ec which have a foreign key relationship with R.a <use closure for this> */\n\t\t\t\t\tArrayList<Node> S = new ArrayList<Node>();\n\t\t\t\t\tVector<Node> nullableFKs = new Vector<Node>();\n\t\t\t\t\tS.add(eceNulled);\n\n\t\t\t\t\tfor(int k=0; k<ec.size(); k++)\n\t\t\t\t\t{\n\t\t\t\t\t\tNode ece = ec.get(k);\n\t\t\t\t\t\tTable tableEce = ece.getTable();\n\t\t\t\t\t\tColumn colEce = ece.getColumn();\n\t\t\t\t\t\t/**TODO Maintain a datasructure for list of PK and FK so as to compare in one pass.*/\n\t\t\t\t\t\tfor(int l=0; l < cvc.getForeignKeys().size(); l++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/**In ForeignKeys Left points to the foreign key attribute while the right points to the Primary or the referenced column*/\n\t\t\t\t\t\t\tNode fk = cvc.getForeignKeys().get(l);\n\n\t\t\t\t\t\t\t/**Adapted for Nullable foreign keys.\n\t\t\t\t\t\t\t *If FK is not nullable, then we need to null it along with the referenced relation which is eceNulled*/\n\t\t\t\t\t\t\tif( (fk.getLeft().getTable() == tableEce && fk.getLeft().getColumn() == colEce) \n\t\t\t\t\t\t\t\t\t&& (fk.getRight().getTable() == tableNulled && fk.getRight().getColumn() == colNulled)){\n\t\t\t\t\t\t\t\tif(!colEce.isNullable())\n\t\t\t\t\t\t\t\t\tS.add(ece);/**To be taken along with nulled Column*/\n\t\t\t\t\t\t\t\tif(colEce.isNullable())\n\t\t\t\t\t\t\t\t\tnullableFKs.add(ece);/** To be taken along with nulled column, in case P.size > 1 */\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/**\n\t\t\t\t\t * Now, we have in S, the nulled column along with the foreign key columns in that equivalence class\n\t\t\t\t\t * that reference the nulled column and are not nullable.\n\t\t\t\t\t * But, if EC - S, contains a nullable column which references the nulled column, \n\t\t\t\t\t * AND also contains some other column which may or may not be nullable, \n\t\t\t\t\t * then we cannot assign NULL to the nullable FK column. We then need to nullify the nullable FK column\n\t\t\t\t\t * along with the nulled column. If EC - S, just contains a single nullable column referencing the \n\t\t\t\t\t * nulled column, then we can assign NULL to that column in order to nullify the nulled column. \n\t\t\t\t\t */\n\n\n\t\t\t\t\t/** Form P = EC - S */\n\t\t\t\t\tVector<Node> P = new Vector<Node>();\n\t\t\t\t\tfor(int k=0; k<ec.size(); k++)\t\t\t\t\t\t\n\t\t\t\t\t\tif( cvc.getqParser().alreadyNotExistInEquivalenceClass(S, ec.get(k)))\n\t\t\t\t\t\t\tP.add(ec.get(k));\n\n\n\t\t\t\t\tSystem.out.println(\"R.a = \"+eceNulled);\n\t\t\t\t\tSystem.out.print(\"EC : \"); Node.printPredicateVector(ec);\n\n\t\t\t\t\t/**For Now : if P is empty continue;*/\n\t\t\t\t\tif(P.size() == 0)\n\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\tif(P.size() == 1 \n\t\t\t\t\t\t\t&& P.get(0).getColumn().getReferenceColumn() == eceNulled.getColumn()\n\t\t\t\t\t\t\t&& P.get(0).getColumn().isNullable()){\n\n\t\t\t\t\t\t/**check if the column in P is referencing the nulled column and is nullable.\n\t\t\t\t\t\t *If so, then we can nullify the nulled relation inspite of the FK*/\n\t\t\t\t\t\tOrConstraints.add( GenerateCVCConstraintForNode.cvcSetNull(cvc, P.get(0).getColumn(), \"1\"));\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t/**Otherwise, we need to nullify the foreign keys along with the nulled column.\n\t\t\t\t\t\t * Note that we need to do this irrespective of whether the column in P is FK \n\t\t\t\t\t\t * or whether it is nullable. Because, then we cannot assign NULL to any of the columns in P\n\t\t\t\t\t\t * This is because, NULLs cannot be equated and hence the joins in P will not be propogated up.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tP.removeAll(nullableFKs);\n\n\t\t\t\t\t\t/** Generate positiveConds for members in P*/ \n\t\t\t\t\t\tGenerateJoinPredicateConstraints.genPositiveConds(P);\n\t\t\t\t\t}\n\n\t\t\t\t\t/**Now generate negative conditions for Nulled relation\n\t\t\t\t\t *i.e. NOT EXISTS (i: Nulled Rel): NulledRel[i].col = P[1].col*/\n\t\t\t\t\tOrConstraints.add( GenerateJoinPredicateConstraints.genNegativeConds( cvc, queryBlock, colNulled, P.get(0)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\t\t/**Now generate Positive conditions for each of the non equi join conditions \n\t\t * that were not considered when building equivalence classes*/\n\t\tVector<Node> allConds = conjunct.getAllConds();\n\t\t\n\t\t/**get constraint*/\n\t\tString constraint = GenerateJoinPredicateConstraints.getNegativeConstraintsForNonEquiJoins(cvc, queryBlock, allConds) ;\n\n\t\tif( constraint.length() != 0)\n\t\t\tOrConstraints.add( constraint );\n\n\t\t/** Now generate Negative constraints for selection conditions */\n\t\tVector<Node> selectionConds = conjunct.getSelectionConds();\n\n\t\t/**get negative conditions for these nodes*/\n\t\tVector<Node> negativeSelConds = GenerateCVCConstraintForNode.getNegativeConditions(selectionConds);\n\n\t\t/**Generate constraints for the negative conditions*/\n\t\tfor(int k = 0; k < negativeSelConds.size(); k++){\n\n\t\t\t/**get table details*/\n\t\t\tString tableNo = negativeSelConds.get(k).getLeft().getTableNameNo();\n\t\t\tint offset = cvc.getRepeatedRelNextTuplePos().get(tableNo)[1];\n\n\t\t\tint count = cvc.getNoOfTuples().get(tableNo)* queryBlock.getNoOfGroups();/** We should generate the constraints across all groups */;;\n\t\t\tfor(int l = 1; l <= count; l++)\n\t\t\t\tOrConstraints.add( \"ASSERT \" + GenerateCVCConstraintForNode.genPositiveCondsForPred(queryBlock, negativeSelConds.get(k),l+offset-1)+\";\" +\"\\n\" );\n\t\t}\n\n\n\n\t\t/**Generate negative constraints for string selection conditions */\n\t\tVector<Node> stringSelectionConds = conjunct.getStringSelectionConds();\t\n\n\t\t/**get negative conditions for these nodes*/\n\t\tVector<Node> negativeStringSelConds = GenerateCVCConstraintForNode.getNegativeConditions(stringSelectionConds);\n\n\t\t/**Generate constraints for the negative conditions*/\n\t\tfor(int k = 0; k < negativeStringSelConds.size(); k++){\n\n\t\t\t/**get table details*/\n\t\t\tString tableNo = negativeStringSelConds.get(k).getLeft().getTableNameNo();\n\t\t\tint offset = cvc.getRepeatedRelNextTuplePos().get(tableNo)[1];\n\n\t\t\tint count = cvc.getNoOfTuples().get(tableNo)* queryBlock.getNoOfGroups();/** We should generate the constraints across all groups */;;\n\t\t\tfor(int l = 1; l <= count; l++)\n\t\t\t\tOrStringConstraints.add( \"ASSERT \" + GenerateCVCConstraintForNode.genPositiveCondsForPred(queryBlock, negativeStringSelConds.get(k),l+offset-1)+\";\" +\"\\n\" );\n\t\t}\n\n\n\t\t/**Generate negative constraints for like conditions */\n\t\tVector<Node> likeConds = conjunct.getLikeConds();\n\n\t\t/**get negative conditions for these nodes*/\n\t\tVector<Node> negativeLikeConds = GenerateCVCConstraintForNode.getNegativeConditions(likeConds);\n\n\t\tfor(int k=0; k<likeConds.size(); k++){\n\n\t\t\t/**get table details*/\n\t\t\tString tableNo = negativeLikeConds.get(k).getLeft().getTableNameNo();\n\t\t\tint offset = cvc.getRepeatedRelNextTuplePos().get(tableNo)[1];\n\n\t\t\tint count = cvc.getNoOfTuples().get(tableNo)* queryBlock.getNoOfGroups();/** We should generate the constraints across all groups */;;\n\t\t\tfor(int l=1;l<=count;l++)\n\t\t\t\tOrStringConstraints.add( \"ASSERT \" + GenerateCVCConstraintForNode.genPositiveCondsForPred(queryBlock, negativeLikeConds.get(k),l+offset-1)+\";\" +\"\\n\" );\n\t\t}\n\n\n\t\t/**get the where clause sub query conditions in this conjunct*/\n\t\tif(conjunct.getAllSubQueryConds() != null){\n\t\t\tfor(int i=0; i < conjunct.getAllSubQueryConds().size(); i++){\n\t\t\t\t\n\t\t\t\tNode subQ = conjunct.getAllSubQueryConds().get(i);\n\t\t\t\t\n\t\t\t\t/**FIXME: Add negative constraints for this where clause sub query block\n\t\t\t\t * We could use methods of class: GenerateConstraintsForWhereClauseSubQueryBlock*/\n\t\t\t\t/**FIXME:If the given conjunct has NOT EXISTS conditions, then negative of that becomes positive*/\n\t\t\t\tint index = UtilsRelatedToNode.getQueryIndexOfSubQNode(subQ);\n\n\t\t\t\t/**get sub query block*/\n\t\t\t\tQueryBlockDetails subQuery = queryBlock.getWhereClauseSubQueries().get(index);\n\t\t\t\t\n\t\t\t\tString negativeConstraint = \"\";\n\t\t\t\t\n\t\t\t\t/**if this sub query is of EXISTS Type*/\n\t\t\t\tif(subQ.getType().equals(Node.getExistsNodeType()) ){\n\t\t\t\t\t\n\t\t\t\t\tfor (Conjunct con: subQuery.getConjuncts())\n\t\t\t\t\t\tnegativeConstraint += generateNegativeConstraintsConjunct(cvc, subQuery, con);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/**if sub query is of type NOT Exists*/\n\t\t\t\t/**We need to get positive constraints for this sub query*/\n\t\t\t\telse if ( subQ.getType().equals(Node.getNotExistsNodeType() ) ){\n\t\t\t\t\t\n\t\t\t\t\tfor (Conjunct con: subQuery.getConjuncts())\n\t\t\t\t\t\tnegativeConstraint += getConstraintsForConjuct(cvc, queryBlock, con);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\n\t\t\t\t\t/**get negative condition for this sub query node*/\n\t\t\t\t\tNode subQNegative = GenerateCVCConstraintForNode.getNegativeCondition(subQ);\n\t\t\t\t\t\n\t\t\t\t\t/**get negative constraints for where clause connective*/\t\t\t\t\t\n\t\t\t\t\tnegativeConstraint = GenerateConstraintsForWhereClauseSubQueryBlock.getConstraintsForWhereSubQueryConnective(cvc, queryBlock, subQNegative);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconstraintString += negativeConstraint;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!OrConstraints.isEmpty() && OrConstraints.size() != 0)\n\t\t\tconstraintString += processOrConstraints(OrConstraints);\n\t\tconstraintString += \"\\n%--------------------------------\\n%END OF NEGATIVE CONSTRAINTS FOR THIS CONJUNCT\\n%---------------------------------------\";\n\n\t\tif(!OrStringConstraints.isEmpty() && OrStringConstraints.size() != 0 )\n\t\t\tcvc.getStringConstraints().add(processOrConstraints(OrStringConstraints));\n\n\t\treturn constraintString;\n\t}", "public void firstSem3() {\n chapter = \"firstSem3\";\n String firstSem3 = \"The calm afternoon is suddenly broken up by a shout. A little way in front of you, a man runs out onto \" +\n \"the path - he has a long beard and is festooned with campaign buttons. \\\"Find your dream!\\\" he shouts, \" +\n \"maybe to the sky, maybe to a tree. \\\"More like find your place in the corporate machinery, hahahaha!\\\"\\t\" +\n \"You stand stock-still for a moment, bewildered, until someone taps on your shoulder. It's your roommate. \\\"Oh,\" +\n \" that's just Crazy Joe, don't worry. I met him during orientation. He says weird shit, but he's totally \" +\n \"harmless.\\\"\\n\\t\"+student.getRmName()+\" puts a hand on your shoulder and gently steers you past the raving man. \" +\n \"As you pass, Crazy Joe's eyes focus on you, and he whispers in a voice only you can hear: \\\"Beware. Beware the beast.\\\"\" +\n \"\\n\\tThat's weird as fuck, right?\\n\\tLATER THAT NIGHT...\";\n getTextIn(firstSem3);\n }", "public String getGrammarText();", "public Sentence(String rawSen2) {\n\t\trawSen = rawSen2;\n\t}", "public LexicalAnalyzer(BufferedReader reader)\n\t{\n\t\tthis.reader = reader;\n\t\toperatorSet.add(\"*\");\n\t\toperatorSet.add(\"-\");\n\t\toperatorSet.add(\"+\");\n\t\toperatorSet.add(\"/\");\n\t\toperatorSet.add(\"=\");\n\t\toperatorSet.add(\"<\");\n\t\toperatorSet.add(\">\");\n\t\t\n\t\tsymbolSet.add(\".\");\n\t\tsymbolSet.add(\",\");\n\t\tsymbolSet.add(\";\");\n\t\tsymbolSet.add(\":\");\n\t\tsymbolSet.add(\"(\");\n\t\tsymbolSet.add(\")\");\n\t\t\n\t\tkeyWordSet.add(\"program\");\n\t\tkeyWordSet.add(\"begin\");\n\t\tkeyWordSet.add(\"end.\");\n\t\tkeyWordSet.add(\"integer\");\n\t\tkeyWordSet.add(\"array\");\n\t\tkeyWordSet.add(\"do\");\n\t\tkeyWordSet.add(\"assign\");\n\t\tkeyWordSet.add(\"to\");\n\t\tkeyWordSet.add(\"unless\");\n\t\tkeyWordSet.add(\"when\");\n\t\tkeyWordSet.add(\"in\");\n\t\tkeyWordSet.add(\"out\");\n\t\tkeyWordSet.add(\"else\");\n\t\tkeyWordSet.add(\"and\");\n\t\tkeyWordSet.add(\"or\");\n\t\tkeyWordSet.add(\"not\");\n\t\t\n\t\tsymbolTable.add(new SymbolTableEntry(\"program\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"begin\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"end.\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"integer\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"array\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"do\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"assign\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"to\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"unless\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"when\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"in\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"out\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"else\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"and\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"or\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"not\", \"keyword\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\".\", \"symbol\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\",\", \"symbol\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\";\", \"symbol\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\":\", \"symbol\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"(\", \"symbol\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\")\", \"symbol\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"+\", \"op\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"-\", \"op\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"*\", \"op\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"/\", \"op\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"=\", \"op\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\"<\", \"op\"));\n\t\tsymbolTable.add(new SymbolTableEntry(\">\", \"op\"));\n\t\t\n\t}", "public void translate() {\n\t\tif(!init)\r\n\t\t\treturn; \r\n\t\ttermPhraseTranslation.clear();\r\n\t\t// document threshold: number of terms / / 8\r\n//\t\tdocThreshold = (int) (wordKeyList.size() / computeAvgTermNum(documentTermRelation) / 8.0);\r\n\t\t//\t\tuseDocFrequency = true;\r\n\t\tint minFrequency=1;\r\n\t\temBkgCoefficient=0.5;\r\n\t\tprobThreshold=0.001;//\r\n\t\titerationNum = 20;\r\n\t\tArrayList<Token> tokenList;\r\n\t\tToken curToken;\r\n\t\tint j,k;\r\n\t\t//p(w|C)\r\n\r\n\t\tint[] termValues = termIndexList.values;\r\n\t\tboolean[] termActive = termIndexList.allocated;\r\n\t\ttotalCollectionCount = 0;\r\n\t\tfor(k=0;k<termActive.length;k++){\r\n\t\t\tif(!termActive[k])\r\n\t\t\t\tcontinue;\r\n\t\t\ttotalCollectionCount +=termValues[k];\r\n\t\t}\r\n\t\t\r\n\t\t// for each phrase\r\n\t\tint[] phraseFreqKeys = phraseFrequencyIndex.keys;\r\n\t\tint[] phraseFreqValues = phraseFrequencyIndex.values;\r\n\t\tboolean[] states = phraseFrequencyIndex.allocated;\r\n\t\tfor (int phraseEntry = 0;phraseEntry<states.length;phraseEntry++){\r\n\t\t\tif(!states[phraseEntry]){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (phraseFreqValues[phraseEntry] < minFrequency)\r\n\t\t\t\tcontinue;\r\n\t\t\ttokenList=genSignatureTranslation(phraseFreqKeys[phraseEntry]); // i is phrase number\r\n\t\t\tfor (j = 0; j <tokenList.size(); j++) {\r\n\t\t\t\tcurToken=(Token)tokenList.get(j);\r\n\t\t\t\tif(termPhraseTranslation.containsKey(curToken.getIndex())){\r\n\t\t\t\t\tIntFloatOpenHashMap old = termPhraseTranslation.get(curToken.getIndex());\r\n\t\t\t\t\tif(old.containsKey(phraseFreqKeys[phraseEntry])){\r\n\t\t\t\t\t\tSystem.out.println(\"aha need correction\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\told.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight()); //phrase, weight\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tIntFloatOpenHashMap newPhrase = new IntFloatOpenHashMap();\r\n\t\t\t\t\tnewPhrase.put(phraseFreqKeys[phraseEntry], (float) curToken.getWeight());\r\n\t\t\t\t\ttermPhraseTranslation.put(curToken.getIndex(), newPhrase);\r\n\t\t\t\t}\r\n\t\t\t\t//\t\t\t\toutputTransMatrix.add(i,curToken.getIndex(),curToken.getWeight());\r\n\t\t\t\t//\t\t\t\toutputTransTMatrix.add(curToken.getIndex(), i, curToken.getWeight());\r\n\t\t\t\t//TODO termPhrase exists, create PhraseTerm\r\n\t\t\t}\r\n\t\t\ttokenList.clear();\r\n\t\t}\r\n\r\n\t}", "public void firstSem10c(){\n chapter = \"firstSem10c\";\n String firstSem10c = \"Shocked, you wander around your very empty dorm room, staring at the broken glass. You spy a scrap of paper nearby - it's \" +\n \"a part of the Dave Grohl poster. How can he still be smiling at a time like this? \\\"Man, I'm sorry,\\\" your RA says again. \\\"That sucks. \" +\n \"I can help you clean up the glass and stuff. You want Insomnia Cookie or anything? On me. Well, partially. I only have like ten dollars.\\\" \" +\n \"You nod, only half-listening. \\\"Yeah.\\\" you say finally. \\\"Cookies would be good.\\\"\\n\\t LATER...\\n\";\n getTextIn(firstSem10c);\n }", "@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 }", "public abstract Statement createSimpleStatement(int type, CodeLocation codeLoc, List<Annotation> annotations, Variable assign, Value ... v);", "String legalTerms();", "CaseStatement createCaseStatement();", "public void firstSem4() {\n chapter = \"firstSem4\";\n String firstSem4 = \"You're sitting at your computer - you can't sleep, and your only companions are \"+student.getRmName()+\"'s \" +\n \"snoring and Dave Grohl, whose kind face looks down at you from your poster. Your head is buzzing with everything you've \" +\n \"seen today.\\tA gentle 'ding' sounds from your computer, and you click your email tab. It's a campus-wide message \" +\n \"from the president, all caps, and it reads as follows:\\n\\t\" +\n \"DEAR STUDENTS,\\n\" +\n \"AS YOU MAY HAVE HEARD, THERE HAVE BEEN SEVERAL CONFIRMED INTERACTIONS WITH THE CAMPUS BEAST. THESE INTERACTIONS\" +\n \" RANGE FROM SIGHTINGS (17) TO KILLINGS (6). BE THIS AS IT MAY, REST ASSURED THAT WE ARE TAKING EVERY NECESSARY \" +\n \"PRECAUTION TO ENSURE STUDENT WELL-BEING. WE ARE ALL DEDICATED TO MAKING \"+(student.getCollege().getName()).toUpperCase()+\n \" A SAFE, INCLUSIVE ENVIRONMENT FOR ALL. TO CONTRIBUTE, I ASK THAT YOU DO YOUR PART, AND REPORT ANY SIGHTINGS, MAIMINGS,\" +\n \" OR KILLINGS TO PUBLIC SAFETY WITHIN A REASONABLE AMOUNT OF TIME. ENJOY YOUR STUDIES!\\nTOODOLOO,\\nPRESIDENT DOUG\";\n getTextIn(firstSem4);\n }", "@Test(timeout = 4000)\n public void test48() throws Throwable {\n SystemInUtil.addInputLine((String) null);\n JSTerm jSTerm0 = new JSTerm();\n LinkedList<Integer> linkedList0 = new LinkedList<Integer>();\n SystemInUtil.addInputLine(\" Expecting word as term\");\n jSTerm0.removeAll(linkedList0);\n jSTerm0.retainAll(linkedList0);\n SystemInUtil.addInputLine((String) null);\n jSTerm0.add((Object) \"!ot\");\n jSTerm0.standarizerPredicateForm();\n SystemInUtil.addInputLine(\"[\");\n StringReader stringReader0 = new StringReader(\"0.0\");\n StreamTokenizer streamTokenizer0 = null;\n try {\n streamTokenizer0 = new StreamTokenizer((Reader) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.io.StreamTokenizer\", e);\n }\n }", "@Test(timeout = 4000)\n public void test34() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n SystemInUtil.addInputLine(\")\");\n jSTerm0.add((Object) \"lc\");\n jSTerm0.isEmpty();\n jSSubstitution0.add((Object) \"lc\");\n jSTerm0.applySubstitutionPF(jSSubstitution0);\n jSTerm0.add((Object) null);\n JSJshopVars.percent = 846;\n StringReader stringReader0 = new StringReader(\"lc\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm1 = new JSTerm(streamTokenizer0);\n JSSubstitution jSSubstitution1 = new JSSubstitution();\n streamTokenizer0.eolIsSignificant(true);\n // Undeclared exception!\n try { \n jSTerm0.standarizerPredicateForm();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"umd.cs.shop.JSPredicateForm\", e);\n }\n }", "private void make_extended() {\n Iterator it = this.getIncreased_grammar().getGrammar().iterator();\n C_Production tmp_pr;\n C_Symbol searcher_symbol; \n \n while(it.hasNext()) {\n tmp_pr = (C_Production)it.next();\n searcher_symbol = new C_Symbol(String.valueOf((char)176));\n tmp_pr.getRight().add(0, searcher_symbol);\n }\n }", "List<VocabWord> document(int index);", "PhrasesIdentification() {\n }", "public WordGenerator()\n {\n adjective1a = new ArrayList<String>();\n adjective1b = new ArrayList<String>();\n adjective1c = new ArrayList<String>();\n adjective2a = new ArrayList<String>();\n adjective2b = new ArrayList<String>();\n adjective2c = new ArrayList<String>();\n fillAdjectives();\n noun = \"\";\n adj1 = \"\";\n adj2 = \"\";\n }", "protected void constructNewQuestion(){\n arabicWordScoreItem = wordScoreTable.whatWordToLearn();\n arabicWord = arabicWordScoreItem.word;\n correctAnswer = dictionary.get(arabicWord);\n\n for (int i=0;i<wrongAnswers.length;i++){\n int wrongAnswerId;\n String randomArabicWord;\n String wrongAnswer;\n do {\n wrongAnswerId = constructQuestionRandom.nextInt(next_word_index);\n randomArabicWord = dictionary_key_list.get(wrongAnswerId);\n wrongAnswer = dictionary.get(randomArabicWord);\n } while (wrongAnswer.equals(correctAnswer));\n wrongAnswers[i] = wrongAnswer;\n }\n }", "GeneralClause createGeneralClause();", "private PSKeyword createKeyword(String index)\n {\n PSKeyword keyword = new PSKeyword(\"label_\" + index, \n \"description_\" + index, index);\n keyword.setGUID(new PSGuid(PSTypeEnum.KEYWORD_DEF, 1001));\n List<PSKeywordChoice> choices = new ArrayList<PSKeywordChoice>();\n for (int i=0; i<3; i++)\n {\n PSKeywordChoice choice = new PSKeywordChoice();\n choice.setLabel(\"choice_\" + index + \".\" + i);\n choice.setDescription(\"description_\" + index + \".\" + i);\n choice.setValue(\"1.\" + i);\n choice.setSequence(i);\n \n choices.add(choice);\n }\n keyword.setChoices(choices);\n \n return keyword;\n }", "public void firstSem10a(){\n chapter = \"firstSem10a\";\n String firstSem10a = \"There's a commotion outside your room - your door looks like it's been smashed down, and your RA is standing outside, looking \" +\n \"distressed. You can hear a shout from inside - your roommate - and sounds of a struggle. \\\"Get in there and help!\\\" you shout to the RA, \" +\n \"but he just shakes his head. \\\"Sorry, I can't. I'm anti-violence. You can't fight hate with hate, you know.\\\"\\tPushing past him, you \" +\n \"run into your room to see your roommate grappling with a large beast. THE beast. It is real. What do you want to do?\";\n getTextIn(firstSem10a);\n }", "@Override\n\tpublic void process(JCas aJCas) throws AnalysisEngineProcessException {\n\t\tString text = aJCas.getDocumentText();\n\n\t\t// create an empty Annotation just with the given text\n\t\tAnnotation document = new Annotation(text);\n//\t\tAnnotation document = new Annotation(\"Barack Obama was born in Hawaii. He is the president. Obama was elected in 2008.\");\n\n\t\t// run all Annotators on this text\n\t\tpipeline.annotate(document); \n\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class);\n\t\t HelperDataStructures hds = new HelperDataStructures();\n\n\t\t\n\t\t//SPnew language-specific settings:\n\t\t//SPnew subject tags of the parser\n\t\t HashSet<String> subjTag = new HashSet<String>(); \n\t\t HashSet<String> dirObjTag = new HashSet<String>(); \n\t\t //subordinate conjunction tags\n\t\t HashSet<String> compTag = new HashSet<String>(); \n\t\t //pronoun tags\n\t\t HashSet<String> pronTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> passSubjTag = new HashSet<String>();\n\t\t HashSet<String> apposTag = new HashSet<String>(); \n\t\t HashSet<String> verbComplementTag = new HashSet<String>(); \n\t\t HashSet<String> infVerbTag = new HashSet<String>(); \n\t\t HashSet<String> relclauseTag = new HashSet<String>(); \n\t\t HashSet<String> aclauseTag = new HashSet<String>(); \n\t\t \n\t\t HashSet<String> compLemma = new HashSet<String>(); \n\t\t HashSet<String> coordLemma = new HashSet<String>(); \n\t\t HashSet<String> directQuoteIntro = new HashSet<String>(); \n\t\t HashSet<String> indirectQuoteIntroChunkValue = new HashSet<String>();\n\t\t \n//\t\t HashSet<String> finiteVerbTag = new HashSet<String>();\n\t\t \n\n\t\t //OPEN ISSUES PROBLEMS:\n\t\t //the subject - verb relation finding does not account for several specific cases: \n\t\t //opinion verbs with passive subjects as opinion holder are not accounted for,\n\t\t //what is needed is a marker in the lex files like PASSSUBJ\n\t\t //ex: Obama is worried/Merkel is concerned\n\t\t //Many of the poorer countries are concerned that the reduction in structural funds and farm subsidies may be detrimental in their attempts to fulfill the Copenhagen Criteria.\n\t\t //Some of the more well off EU states are also worried about the possible effects a sudden influx of cheap labor may have on their economies. Others are afraid that regional aid may be diverted away from those who currently benefit to the new, poorer countries that join in 2004 and beyond. \n\t\t// Does not account for infinitival constructions, here again a marker is needed to specify\n\t\t //subject versus object equi\n\t\t\t//Christian Noyer was reported to have said that it is ok.\n\t\t\t//Reuters has reported Christian Noyer to have said that it is ok.\n\t\t //Obama is likely to have said.. \n\t\t //Several opinion holder- opinion verb pairs in one sentence are not accounted for, right now the first pair is taken.\n\t\t //what is needed is to run through all dependencies. For inderect quotes the xcomp value of the embedded verb points to the \n\t\t //opinion verb. For direct quotes the offsets closest to thwe quote are relevant.\n\t\t //a specific treatment of inverted subjects is necessary then. Right now the\n\t\t //strategy relies on the fact that after the first subj/dirobj - verb pair the\n\t\t //search is interrupted. Thus, if the direct object precedes the subject, it is taken as subject.\n\t\t // this is the case in incorrectly analysed inverted subjeects as: said Zwickel on Monday\n\t\t //coordination of subject not accounted for:employers and many economists\n\t\t //several subject-opinion verbs:\n\t\t //Zwickel has called the hours discrepancy between east and west a \"fairness gap,\" but employers and many economists point out that many eastern operations have a much lower productivity than their western counterparts.\n\t\t if (language.equals(\"en\")){\n \t subjTag.add(\"nsubj\");\n \t subjTag.add(\"xsubj\");\n \t subjTag.add(\"nmod:agent\");\n \t \n \t dirObjTag.add(\"dobj\"); //for inverted subject: \" \" said IG metall boss Klaus Zwickel on Monday morning.\n \t \t\t\t\t\t\t//works only with break DEPENDENCYSEARCH, otherwise \"Monday\" is nsubj \n \t \t\t\t\t\t\t//for infinitival subject of object equi: Reuters reports Obama to have said\n \tpassSubjTag.add(\"nsubjpass\");\n \tapposTag.add(\"appos\");\n \trelclauseTag.add(\"acl:relcl\");\n \taclauseTag.add(\"acl\");\n \t compTag.add(\"mark\");\n \t pronTag.add(\"prp\");\n \thds.pronTag.add(\"prp\");\n \tcompLemma.add(\"that\");\n \tcoordLemma.add(\"and\");\n \tverbComplementTag.add(\"ccomp\");\n \tverbComplementTag.add(\"parataxis\");\n\n \tinfVerbTag.add(\"xcomp\"); //Reuters reported Merkel to have said\n \tinfVerbTag.add(\"advcl\");\n \tdirectQuoteIntro.add(\":\");\n \tindirectQuoteIntroChunkValue.add(\"SBAR\");\n \thds.objectEqui.add(\"report\");\n \thds.objectEqui.add(\"quote\");\n \thds.potentialIndirectQuoteTrigger.add(\"say\");\n// \thds.objectEqui.add(\"confirm\");\n// \thds.subjectEqui.add(\"promise\");\n// \thds.subjectEqui.add(\"quote\");\n// \thds.subjectEqui.add(\"confirm\");\n }\n\t\t \n\t\t boolean containsSubordinateConjunction = false;\n\t\t\n\t\t \n\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tSystem.out.println(\"PREPROCESSING..\");\n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\t//SP Map offsets to NER\n\t\t\t\tList<NamedEntity> ners = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tNamedEntity.class, sentenceAnn);\n\t\t\t\tfor (NamedEntity ne : ners){\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.getCoveredText().toString());\n//\t\t\t\t\tSystem.out.println(\"NER TYPE: \" + ne.jcasType.casTypeCode);\n\t\t\t\t\t//Person is 71, Location is 213, Organization is 68 geht anders besser siehe unten\n\t\t\t\t\tint nerStart = ne\n\t\t\t\t\t\t\t.getBegin();\n\t\t\t\t\tint nerEnd = ne.getEnd();\n//\t\t\t\t\tSystem.out.println(\"NER: \" + ne.getCoveredText() + \" \" + nerStart + \"-\" + nerEnd ); \n\t\t\t\t\tString offsetNer = \"\" + nerStart + \"-\" + nerEnd;\n\t\t\t\t\thds.offsetToNer.put(offsetNer, ne.getCoveredText());\n//\t\t\t\t\tNer.add(offsetNer);\n\t\t\t\t\thds.Ner.add(offsetNer);\n//\t\t\t\t\tSystem.out.println(\"NER: TYPE \" +ne.getValue().toString());\n\t\t\t\t\tif (ne.getValue().equals(\"PERSON\")){\n\t\t\t\t\t\thds.NerPerson.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t\telse if (ne.getValue().equals(\"ORGANIZATION\")){\n\t\t\t\t\t\thds.NerOrganization.add(offsetNer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//DBpediaLink info: map offsets to links\n\t\t\t\tList<DBpediaResource> dbpeds = JCasUtil.selectCovered(aJCas, //SPnew tut\n\t\t\t\t\t\tDBpediaResource.class, sentenceAnn);\n\t\t\t\tfor (DBpediaResource dbped : dbpeds){\n//\t\t\t\t\t\n//\t\t\t\t\tint dbStart = dbped\n//\t\t\t\t\t\t\t.getBegin();\n//\t\t\t\t\tint dbEnd = dbped.getEnd();\n\t\t\t\t\t// not found if dbpedia offsets are wrongly outside than sentences\n//\t\t\t\t\tSystem.out.println(\"DBPED SENT: \" + sentenceAnn.getBegin()+ \"-\" + sentenceAnn.getEnd() ); \n//\t\t\t\t\tString offsetDB = \"\" + dbStart + \"-\" + dbEnd;\n//\t\t\t\t\thds.labelToDBpediaLink.put(dbped.getLabel(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getLabel() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t\thds.dbpediaSurfaceFormToDBpediaLink.put(dbped.getCoveredText(), dbped.getUri());\n//\t\t\t\t\tSystem.out.println(\"NOW DBPED: \" + dbped.getCoveredText() + \"URI: \" + dbped.getUri() ); \n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//SP Map offsets to lemma of opinion verb/noun; parser does not provide lemma\n\t\t\t\t for (CoreLabel token: sentence.get(TokensAnnotation.class)) {\n//\t\t\t\t\t System.out.println(\"LEMMA \" + token.lemma().toString());\n\t\t\t\t\t int beginTok = token.beginPosition();\n\t\t\t\t\t int endTok = token.endPosition();\n\t\t\t\t\t String offsets = \"\" + beginTok + \"-\" + endTok;\n\t\t\t\t\t hds.offsetToLemma.put(offsets, token.lemma().toString());\n\t\t\t\t\t \n\t\t\t\t\t \t if (opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t \n//\t\t\t \t System.out.println(\"offsetToLemmaOfOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\t\t\t\t\t \t if (passive_opinion_verbs.contains(token.lemma().toString())){\n\t\t\t\t\t\t\t hds.offsetToLemmaOfPassiveOpinionVerb.put(offsets, token.lemma().toString());\n\t\t\t\t\t\t\t hds.OpinionExpression.add(offsets);\n\t\t\t\t\t\t\t hds.offsetToLemmaOfOpinionExpression.put(offsets, token.lemma().toString());\n//\t\t\t \t System.out.println(\"offsetToLemmaOfPassiveOpinionVerb \" + token.lemma().toString());\n\t\t\t\t\t \t }\n\n\t\t\t\t } \n\n\t\t\t//SPnew parser\n\t\t\tTree tree = sentence.get(TreeAnnotation.class);\n\t\t\tTreebankLanguagePack tlp = new PennTreebankLanguagePack();\n\t\t\tGrammaticalStructureFactory gsf = tlp.grammaticalStructureFactory();\n\t\t\tGrammaticalStructure gs = gsf.newGrammaticalStructure(tree);\n\t\t\tCollection<TypedDependency> td = gs.typedDependenciesCollapsed();\n\n\t\t\t \n//\t\t\tSystem.out.println(\"TYPEDdep\" + td);\n\t\t\t\n\t\t\tObject[] list = td.toArray();\n//\t\t\tSystem.out.println(list.length);\n\t\t\tTypedDependency typedDependency;\nDEPENDENCYSEARCH: for (Object object : list) {\n\t\t\ttypedDependency = (TypedDependency) object;\n//\t\t\tSystem.out.println(\"DEP \" + typedDependency.dep().toString()+ \n//\t\t\t\t\t\" GOV \" + typedDependency.gov().toString()+ \n//\t\t\t\" :: \"+ \" RELN \"+typedDependency.reln().toString());\n\t\t\tString pos = null;\n String[] elements;\n String verbCand = null;\n int beginVerbCand = -5;\n\t\t\tint endVerbCand = -5;\n\t\t\tString offsetVerbCand = null;\n\n if (compTag.contains(typedDependency.reln().toString())) {\n \tcontainsSubordinateConjunction = true;\n// \tSystem.out.println(\"subordConj \" + typedDependency.dep().toString().toLowerCase());\n }\n \n else if (subjTag.contains(typedDependency.reln().toString())){\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \t\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tfor (HashMap.Entry<String, String> entry : hds.offsetToLemma.entrySet()) {\n//\t\t\t\t String key = entry.getKey();\n//\t\t\t\t Object value = entry.getValue();\n//\t\t\t\t System.out.println(\"OFFSET \" + key + \" LEMMA \" + value);\n//\t\t\t\t // FOR LOOP\n//\t\t\t\t}\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\tSystem.out.println(\"SUBJCHAINHEAD1\");\n\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\tSystem.out.println(\"verbCand \" + verbCand);\n\t\t\t\t//hack for subj after obj said Zwickel (obj) on Monday morning (subj)\n\t\t\t\tif (language.equals(\"en\") \n\t\t\t\t\t\t&& hds.predicateToObject.containsKey(offsetVerbCand)\n\t\t\t\t\t\t){\n// \t\tSystem.out.println(\"CONTINUE DEP\");\n \t\tcontinue DEPENDENCYSEARCH;\n \t}\n\t\t\t\telse {\n\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n\t\t\t\t}\n }\n //Merkel is concerned\n else if (passSubjTag.contains(typedDependency.reln().toString())){\n \t//Merkel was reported\n \t//Merkel was concerned\n \t//Merkel was quoted\n \thds.predicateToSubjectChainHead.clear();\n \thds.subjectToPredicateChainHead.clear();\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n//\t\t\t\tSystem.out.println(\"VERBCand \" + verbCand + offsetVerbCand);\n//\t\t\t\tif (hds.offsetToLemma.containsKey(offsetVerbCand)){\n//\t\t\t\t\tString verbCandLemma = hds.offsetToLemma.get(offsetVerbCand);\n////\t\t\t\t\tSystem.out.println(\"LEMMA verbCand \" + verbCandLemma);\n//\t\t\t\t\tif (hds.objectEqui.contains(verbCandLemma) || hds.subjectEqui.contains(verbCandLemma)){\n//\t\t\t\t\t\tSystem.out.println(\"SUBJCHAIN BEGIN verbCand \" + verbCand);\n//\t\t\t\t\t\tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n//\t\t\t\t\t}\n//\t\t\t\t}\n \t\n \tstoreRelations(typedDependency, hds.predicateToSubjectChainHead, hds.subjectToPredicateChainHead, hds);\n// \tSystem.out.println(\"SUBJCHAINHEAD2\");\n \t//Merkel is concerned\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfPassiveOpinionVerb,\n \t\t\thds);\n }\n //Meanwhile, the ECB's vice-president, Christian Noyer, was reported at the start of the week to have said that the bank's future interest-rate moves\n// would depend on the behavior of wage negotiators as well as the pace of the economic recovery.\n\n else if (apposTag.contains(typedDependency.reln().toString())){\n \t\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tString appo = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tint beginAppo = typedDependency.dep().beginPosition();\n\t\t\t\tint endAppo = typedDependency.dep().endPosition();\n\t\t\t\tString offsetAppo = \"\" + beginAppo + \"-\" + endAppo;\n\t\t\t\t\n// \tSystem.out.println(\"APPOSITION1 \" + subjCand + \"::\"+ appo + \":\" + offsetSubjCand + \" \" + offsetAppo);\n \thds.subjectToApposition.put(offsetSubjCand, offsetAppo);\n }\n else if (relclauseTag.contains(typedDependency.reln().toString())){\n \tString subjCand = typedDependency.gov().toString().toLowerCase();\n \tint beginSubjCand = typedDependency.gov().beginPosition();\n \tint endSubjCand = typedDependency.gov().endPosition();\n \tString offsetSubjCand = \"\" + beginSubjCand + \"-\" + endSubjCand;\n \tverbCand = typedDependency.dep().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.dep().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.dep().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\tString subjCandPos = null;\n\t\t\t\tif (hds.predicateToSubject.containsKey(offsetVerbCand)){\n\t\t\t\t\t\n\t\t\t\t\tif (subjCand.matches(\".+?/.+?\")) { \n\t\t\t\t\t\telements = subjCand.split(\"/\");\n\t\t\t\t\t\tsubjCand = elements[0];\n\t\t\t\t\t\tsubjCandPos = elements[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tString del = hds.predicateToSubject.get(offsetVerbCand);\n\t\t\t\t\thds.predicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToPredicate.remove(del);\n\t\t\t\t\thds.normalPredicateToSubject.remove(offsetVerbCand);\n\t\t\t\t\thds.subjectToNormalPredicate.remove(del);\n//\t\t\t\t\tSystem.out.println(\"REMOVE RELPRO \" + verbCand + \"/\" + hds.offsetToLemma.get(del));\n\t\t\t\t\thds.predicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToPredicate.put( offsetSubjCand, offsetVerbCand);\n\t\t\t\t\thds.normalPredicateToSubject.put(offsetVerbCand, offsetSubjCand);\n\t\t\t\t\thds.subjectToNormalPredicate.put( offsetSubjCand, offsetVerbCand);\n//\t\t\t\t\tSystem.out.println(\"RELCLAUSE \" + subjCand + \"::\" + \":\" + verbCand);\n\t\t\t\t\thds.offsetToSubjectHead.put(offsetSubjCand,subjCand);\n\t\t\t\t\thds.SubjectHead.add(offsetSubjCand);\n\t\t\t\t\t\n\t\t\t\t\tif (subjCandPos != null && hds.pronTag.contains(subjCandPos)){\n\t\t\t\t\t\thds.PronominalSubject.add(offsetSubjCand);\n\t\t\t\t\t}\n\t\t\t\t}\n \t\n \t\n }\n \n else if (dirObjTag.contains(typedDependency.reln().toString())\n \t\t){\n \tstoreRelations(typedDependency, hds.predicateToObject, hds.ObjectToPredicate, hds);\n \tverbCand = typedDependency.gov().toString().toLowerCase();\n\t\t\t\tbeginVerbCand = typedDependency.gov().beginPosition();\n\t\t\t\tendVerbCand = typedDependency.gov().endPosition();\n\t\t\t\toffsetVerbCand = \"\" + beginVerbCand + \"-\" + endVerbCand;\n\t\t\t\t\n\t\t\t\tString objCand = typedDependency.dep().toString().toLowerCase();\n \tint beginObjCand = typedDependency.dep().beginPosition();\n \tint endObjCand = typedDependency.dep().endPosition();\n \tString offsetObjCand = \"\" + beginObjCand + \"-\" + endObjCand;\n \tString objCandPos;\n \tif (objCand.matches(\".+?/.+?\")) { \n\t\t\t\t\telements = objCand.split(\"/\");\n\t\t\t\t\tobjCand = elements[0];\n\t\t\t\t\tobjCandPos = elements[1];\n//\t\t\t\t\tSystem.out.println(\"PRON OBJ \" + objCandPos);\n\t\t\t\t\tif (pronTag.contains(objCandPos)){\n\t\t\t\t\thds.PronominalSubject.add(offsetObjCand);\n\t\t\t\t\t}\n\t\t\t\t\t}\n// \tSystem.out.println(\"DIROBJ STORE ONLY\");\n \t//told Obama\n \t//said IG metall boss Klaus Zwickel\n \t// problem: pointing DO\n \t//explains David Gems, pointing out the genetically manipulated species.\n \t if (language.equals(\"en\") \n \t\t\t\t\t\t&& !hds.normalPredicateToSubject.containsKey(offsetVerbCand)\n \t\t\t\t\t\t){\n// \t\t System.out.println(\"INVERSE SUBJ HACK ENGLISH PREDTOOBJ\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t }\n }\n //was reported to have said\n else if (infVerbTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.mainToInfinitiveVerb, hds.infinitiveToMainVerb, hds);\n// \tSystem.out.println(\"MAIN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n else if (aclauseTag.contains(typedDependency.reln().toString())){\n \tstoreRelations(typedDependency, hds.nounToInfinitiveVerb, hds.infinitiveVerbToNoun, hds);\n// \tSystem.out.println(\"NOUN-INF\");\n \tdetermineSubjectToVerbRelations(typedDependency, \n \t\t\thds.offsetToLemmaOfOpinionVerb,\n \t\t\thds);\n \t\n }\n \n \n\n\t\t\t}\n\t\t\t\n//\t\t\tSemanticGraph dependencies = sentence.get(CollapsedCCProcessedDependenciesAnnotation.class);\n//\t\t\tSystem.out.println(\"SEM-DEP \" + dependencies);\t\n\t\t}\n\t\t\n\n\t\tMap<Integer, edu.stanford.nlp.dcoref.CorefChain> corefChains = document.get(CorefChainAnnotation.class);\n\t\t \n\t\t if (corefChains == null) { return; }\n\t\t //SPCOPY\n\t\t for (Entry<Integer, edu.stanford.nlp.dcoref.CorefChain> entry: corefChains.entrySet()) {\n//\t\t System.out.println(\"Chain \" + entry.getKey() + \" \");\n\t\t \tint chain = entry.getKey();\n\t\t String repMenNer = null;\n\t\t String repMen = null;\n\t\t String offsetRepMenNer = null;\n\n\t\t List<IaiCorefAnnotation> listCorefAnnotation = new ArrayList<IaiCorefAnnotation>();\n\t\t \n\t\t for (CorefMention m : entry.getValue().getMentionsInTextualOrder()) {\n\t\t \tboolean corefMentionContainsNer = false;\n\t\t \tboolean repMenContainsNer = false;\n\n//\t\t \n\n\t\t\t\t// We need to subtract one since the indices count from 1 but the Lists start from 0\n\t\t \tList<CoreLabel> tokens = sentences.get(m.sentNum - 1).get(TokensAnnotation.class);\n\t\t // We subtract two for end: one for 0-based indexing, and one because we want last token of mention not one following.\n//\t\t System.out.println(\" \" + m + \", i.e., 0-based character offsets [\" + tokens.get(m.startIndex - 1).beginPosition() +\n//\t\t \", \" + tokens.get(m.endIndex - 2).endPosition() + \")\");\n\t\t \n\t\t int beginCoref = tokens.get(m.startIndex - 1).beginPosition();\n\t\t\t\t int endCoref = tokens.get(m.endIndex - 2).endPosition();\n\t\t\t\t String offsetCorefMention = \"\" + beginCoref + \"-\" + endCoref;\n\t\t\t\t String corefMention = m.mentionSpan;\n\n\t\t\t\t CorefMention RepresentativeMention = entry.getValue().getRepresentativeMention();\n\t\t\t\t repMen = RepresentativeMention.mentionSpan;\n\t\t\t\t List<CoreLabel> repMenTokens = sentences.get(RepresentativeMention.sentNum - 1).get(TokensAnnotation.class);\n//\t\t\t\t System.out.println(\"REPMEN ANNO \" + \"\\\"\" + repMen + \"\\\"\" + \" is representative mention\" +\n// \", i.e., 0-based character offsets [\" + repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition() +\n//\t\t \", \" + repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition() + \")\");\n\t\t\t\t int beginRepMen = repMenTokens.get(RepresentativeMention.startIndex - 1).beginPosition();\n\t\t\t\t int endRepMen = repMenTokens.get(RepresentativeMention.endIndex - 2).endPosition();\n\t\t\t\t String offsetRepMen = \"\" + beginRepMen + \"-\" + endRepMen;\n\t\t \t \n\t\t\t\t//Determine repMenNer that consists of largest NER (Merkel) to (Angela Merkel)\n\t\t\t\t //and \"Chancellor \"Angela Merkel\" to \"Angela Merkel\"\n\t\t \t //Further reduction to NER as in \"Chancellor Angela Merkel\" to \"Angela Merkel\" is\n\t\t\t\t //done in determineBestSubject. There, Chunk information and subjectHead info is available.\n\t\t\t\t //Chunk info and subjectHead info is used to distinguish \"Chancellor Angela Merkel\" to \"Angela Merkel\"\n\t\t\t\t //from \"The enemies of Angela Merkel\" which is not reduced to \"Angela Merkel\"\n\t\t\t\t //Problem solved: The corefMentions of a particular chain do not necessarily have the same RepMenNer (RepMen) \n\t\t\t\t // any more: Chancellor Angela Merkel repMenNer Chancellor Angela Merkel , then Angela Merkel has RepMenNer Angela Merkel\n\t\t\t\t if (offsetRepMenNer != null && hds.Ner.contains(offsetRepMenNer)){\n//\t\t\t\t\t System.out.println(\"NEWNer.contains(offsetRepMenNer)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetRepMen != null && hds.Ner.contains(offsetRepMen)){\n\t\t\t\t\t repMenNer = repMen;\n\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\tSystem.out.println(\"NEWNer.contains(offsetRepMen)\");\n\t\t\t\t }\n\t\t\t\t else if (offsetCorefMention != null && hds.Ner.contains(offsetCorefMention)){\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"Ner.contains(offsetCorefMention)\");\n\t\t\t\t\t}\n\t\t\t\t else {\n\t\t\t\t\t corefMentionContainsNer = offsetsContainAnnotation(offsetCorefMention,hds.Ner);\n\t\t\t\t\t repMenContainsNer = offsetsContainAnnotation(offsetRepMen,hds.Ner);\n//\t\t\t\t\t System.out.println(\"ELSE Ner.contains(offsetCorefMention)\");\n\t\t\t\t }\n\t\t\t\t //Determine repMenNer that contains NER\n\t\t\t\t\tif (repMenNer == null){\n\t\t\t\t\t\tif (corefMentionContainsNer){\n\t\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (repMenContainsNer){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT2\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//no NER:\n\t\t\t\t\t\t//Pronoun -> repMen is repMenNer\n\t\t\t\t\t\telse if (hds.PronominalSubject.contains(offsetCorefMention) && repMen != null){\n\t\t\t\t\t\t\trepMenNer = repMen;\n\t\t\t\t\t\t\toffsetRepMenNer = offsetRepMen;\n//\t\t\t\t\t\t\tSystem.out.println(\"DEFAULT3\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//other no NER: corefMention is repMenNer because it is closer to original\n\t\t\t\t\t\trepMenNer = corefMention;\n\t\t\t\t\t\toffsetRepMenNer = offsetCorefMention;\n//\t\t\t\t\t\tSystem.out.println(\"DEFAULT4\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \n \t IaiCorefAnnotation corefAnnotation = new IaiCorefAnnotation(aJCas);\n\t\t\t\n\t\t\t\t\t\n\n\n\t\t\t\t\tcorefAnnotation.setBegin(beginCoref);\n\t\t\t\t\tcorefAnnotation.setEnd(endCoref);\n\t\t\t\t\tcorefAnnotation.setCorefMention(corefMention);\n\t\t\t\t\tcorefAnnotation.setCorefChain(chain);\n\t\t\t\t\t//done below\n//\t\t\t\t\tcorefAnnotation.setRepresentativeMention(repMenNer);\n//\t\t\t\t\tcorefAnnotation.addToIndexes(); \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tlistCorefAnnotation.add(corefAnnotation);\n\t\t\t\t\t\n//\t\t\t\t\tdone below:\n//\t\t\t\t\t offsetToRepMen.put(offsetCorefMention, repMenNer);\n//\t\t\t\t\t RepMen.add(offsetCorefMention);\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t }//end coref mention\n//\t\t System.out.println(\"END Chain \" + chain );\n//\t\t System.out.println(listCorefAnnotation.size());\n\t\t String offsetCorefMention = null;\n\t\t for (int i = 0; i < listCorefAnnotation.size(); i++) {\n\t\t \tIaiCorefAnnotation corefAnnotation = listCorefAnnotation.get(i);\n\t\t \tcorefAnnotation.setRepresentativeMention(repMenNer);\n\t\t \tcorefAnnotation.addToIndexes();\n\t\t \toffsetCorefMention = \"\" + corefAnnotation.getBegin() + \"-\" + corefAnnotation.getEnd();\n\t\t\t\t\thds.offsetToRepMen.put(offsetCorefMention, repMenNer);\n\t\t\t\t\thds.RepMen.add(offsetCorefMention);\n\t\t\t\t\t//COREF\n//\t\t\t\t\tSystem.out.println(\"Chain \" + corefAnnotation.getCorefChain());\n//\t\t\t\t\tSystem.out.println(\"corefMention \" + corefAnnotation.getCorefMention() + offsetCorefMention);\n//\t\t\t\t\tSystem.out.println(\"repMenNer \" + repMenNer);\n\t\t }\n\t\t } //end chains\n\n\n//\t\t System.out.println(\"NOW quote finder\");\n\n\n\t\t\n\t\t///* quote finder: begin find quote relation and quotee\n\t\t// direct quotes\n\t\t\n\t\t\n\t\tString quotee_left = null;\n\t\tString quotee_right = null; \n\t\t\n\t\tString representative_quotee_left = null;\n\t\tString representative_quotee_right = null; \n\t\t\n\t\tString quote_relation_left = null;\n\t\tString quote_relation_right = null;\n\t\t\n\t\tString quoteType = null;\n\t\tint quoteeReliability = 5;\n\t\tint quoteeReliability_left = 5;\n\t\tint quoteeReliability_right = 5;\n\t\tint quotee_end = -5;\n\t\tint quotee_begin = -5;\n\t\t\n\t\tboolean quoteeBeforeQuote = false;\n\n\n\t\n\t\t\n\t\t// these are all the quotes in this document\n\t\tList<CoreMap> quotes = document.get(QuotationsAnnotation.class);\n\t\tfor (CoreMap quote : quotes) {\n\t\t\tif (quote.get(TokensAnnotation.class).size() > 5) {\n\t\t\t\tQuoteAnnotation annotation = new QuoteAnnotation(aJCas);\n\n\t\t\t\tint beginQuote = quote.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endQuote = quote.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(quote.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tannotation.setBegin(beginQuote);\n\t\t\t\tannotation.setEnd(endQuote);\n\t\t\t\tannotation.addToIndexes();\n//\t\t\t}\n//\t\t}\n//\t\t\n//\t\tList<Q> newQuotes = document.get(QuotationsAnnotation.class);\t\t\n//\t\tfor (CoreMap annotation : newQuotes) {\n//\t\t\t\tif (1==1){\n//\t\t\t\tRe-initialize markup variables since they are also used for indirect quotes\n\t\t\t\tquotee_left = null;\n\t\t\t\tquotee_right = null; \n\t\t\t\t\n\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\n\t\t\t\tquote_relation_left = null;\n\t\t\t\tquote_relation_right = null;\n\t\t\t\tquoteeReliability = 5;\n\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\tquotee_end = -5;\n\t\t\t\tquotee_begin = -5;\n\t\t\t\tquoteType = \"direct\";\n\t\t\t\tquoteeBeforeQuote = false;\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> directQuoteTokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tToken.class, annotation);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n\t\t\t\t\n \n//\t\t\t\tfor (Token aFollowToken: followTokens){\n//\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\tChunk.class, aFollowToken);\n \n//direct quote quotee right:\n\t\t\t\t\n\t for (Token aFollow2Token: followTokens){\n\t\t\t\t\t List<SentenceAnnotation> sentencesFollowQuote = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t SentenceAnnotation.class, aFollow2Token);\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t for (SentenceAnnotation sentenceFollowsQuote: sentencesFollowQuote){\n\t\t\t\t\t\t List<Chunk> chunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\tChunk.class, sentenceFollowsQuote);\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT\");\n\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"RIGHT\", \n\t\t\t\t\tchunks, hds, annotation);\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_right = quote_annotation_result[0];\n\t\t\t representative_quotee_right = quote_annotation_result[1];\n\t\t\t quote_relation_right = quote_annotation_result[2];\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_right = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t //Will Throw exception!\n\t\t\t //do something! anything to handle the exception.\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_right = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n//\t\t\tSystem.out.println(\"DIRECT QUOTE RIGHT RESULT quotee \" + quotee_right + \" representative_quotee \" + representative_quotee_right\n//\t\t\t\t\t+ \" quote_relation \" + quote_relation_right);\n\t\t \n\t\t\t}\n\t\t\t\t\t \n\t\t\t\t\t \n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tList<Token> precedingTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\tToken.class, annotation, 1);\n for (Token aPrecedingToken: precedingTokens){ \n \t\n \tif (directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString()) \n \t\t\t|| compLemma.contains(aPrecedingToken.getLemma().getValue().toString())) {\n// \t\tSystem.out.println(\"Hello, World lemma found\" + aPrecedingToken.getLemma().getValue());\n \t\tquoteeBeforeQuote = true;\n \t}\n \t\tList <NamedEntity> namedEntities = null;\n \t\tList <Token> tokens = null;\n \t\tList<Chunk> chunks = null;\n \t\t\n\t\t\t\t List<Sentence> precedingSentences = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken, 1);\n\t\t\t\t \n\t\t\t\t\t\tif (precedingSentences.isEmpty()){\n\t\t\t\t\t\t\tList<Sentence> firstSentence;\n\t\t\t\t \tfirstSentence = JCasUtil.selectCovering(aJCas,\n\t\t\t\t \t\tSentence.class, aPrecedingToken);\n\n\t\t\t\t \tfor (Sentence aSentence: firstSentence){\n\t\t\t\t \t\t\n\n\t\t\t\t\t\t\t\tchunks = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\tChunk.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t \t\tnamedEntities = JCasUtil.selectCovered(aJCas,\n\t \t \t\tNamedEntity.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\ttokens = JCasUtil.selectCovered(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence.getBegin(), aPrecedingToken.getEnd());\n\t\t\t\t \t\n\t\t\t\t \t}\n\t\t\t\t\t\t}\n\t\t\t\t else {\t\n\t\t\t\t \tfor (Sentence aSentence: precedingSentences){\n//\t\t\t\t \t\tSystem.out.println(\"Hello, World sentence\" + aSentence);\n\t\t\t\t \t\tchunks = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tChunk.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\tnamedEntities = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tNamedEntity.class, aSentence, aPrecedingToken);\n\t\t\t\t \t\ttokens = JCasUtil.selectBetween(aJCas,\n\t\t\t\t \t\t\t\tToken.class, aSentence, aPrecedingToken);\n\t\t\t\t \t}\n\t\t\t\t }\n \t\n//\t\t\t\t \n//\t\t\t\t\t\tSystem.out.println(\"DIRECT QUOTE LEFT\");\n\t\t\t\t\t\tString[] quote_annotation_direct_left = determine_quotee_and_quote_relation(\"LEFT\", chunks,\n\t\t\t\t\t\t\t\t hds, annotation\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t );\n//\t\t\t\t\t\tSystem.out.println(\"QUOTE ANNOTATION \" + quote_annotation_direct_left.length);\t\t\n\t\tif (quote_annotation_direct_left.length>=4){\n//\t\t\tSystem.out.println(\"QUOTE ANNOTATION UPDATE \" + quote_annotation_direct_left[0] +\n//\t\t\t\t\t\" \" + quote_annotation_direct_left[1] + \" \" +\n//\t\t\t\t\tquote_annotation_direct_left[2]);\n\t\t quotee_left = quote_annotation_direct_left[0];\n\t\t representative_quotee_left = quote_annotation_direct_left[1];\n\t\t quote_relation_left = quote_annotation_direct_left[2];\n\t\t try {\n\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_direct_left[3]);\n\t\t\t} catch (NumberFormatException e) {\n\t\t //Will Throw exception!\n\t\t //do something! anything to handle the exception.\n\t\t\tquoteeReliability = -5;\n\t\t\tquoteeReliability_left = -5;\n\t\t\t}\t\t\t\t\t \n\t\t }\n//\t\tSystem.out.println(\"DIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t+ \" quote_relation \" + quote_relation_left);\n\t\t//no subject - predicate quotee quote_relation, quote introduced with colon: \n\t\tif (quotee_left == null && quote_relation_left == null && representative_quotee_left == null \n\t\t&& directQuoteIntro.contains(aPrecedingToken.getLemma().getValue().toString())){\n//\t\t\tSystem.out.println(\"NER DIRECT QUOTE LEFT COLON\");\n\t\t\tString quoteeCandOffset = null; \n\t\t\tString quoteeCandText = null;\n\t\t if (namedEntities.size() == 1){\n \t \tfor (NamedEntity ne : namedEntities){\n// \t \t\tSystem.out.println(\"ONE NER \" + ne.getCoveredText());\n \t \t\tquoteeCandText = ne.getCoveredText();\n\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\tquotee_end = ne.getEnd();\n\t\t\t\t\tquotee_begin = ne.getBegin();\n\t\t\t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n\t\t\t\t\tquoteeReliability = 1;\n\t\t\t\t\tquoteeReliability_left = 1;\n \t }\n \t }\n \t else if (namedEntities.size() > 1) {\n \t \tint count = 0;\n \t \tString quotee_cand = null;\n// \t \tSystem.out.println(\"Hello, World ELSE SEVERAL NER\");\n \t \tfor (NamedEntity ner : namedEntities){\n// \t \t\tSystem.out.println(\"Hello, World NER TYPE\" + ner.getValue());\n \t \t\tif (ner.getValue().equals(\"PERSON\")){\n \t \t\t\tcount = count + 1;\n \t \t\t\tquotee_cand = ner.getCoveredText();\n \t \t\t\tquotee_end = ner.getEnd();\n \t \t\t\tquotee_begin = ner.getBegin();\n \t \t\t\tquoteeCandOffset = \"\" + quotee_begin + \"-\" + quotee_end;\n \t \t\t\t\n// \t \t\t\tSystem.out.println(\"Hello, World FOUND PERSON\" + quotee_cand);\n \t \t\t}\n \t \t}\n \t \tif (count == 1){ // there is exactly one NER.PERSON\n// \t \t\tSystem.out.println(\"ONE PERSON, SEVERAL NER \" + quotee_cand);\n \t \t\t\tquoteeCandText = quotee_cand;\n\t\t\t\t\t\tquote_relation_left = aPrecedingToken.getLemma().getValue().toString();\n\t\t\t\t\t\tquoteeReliability = 3;\n\t\t\t\t\t\tquoteeReliability_left = 3;\n \t \t}\n \t }\n\t\t if(quoteeCandOffset != null && quoteeCandText != null ){\n//\t\t \t quotee_left = quoteeCandText;\n\t\t \t String result [] = determineBestRepMenSubject(\n\t\t \t\t\t quoteeCandOffset,quoteeCandOffset, quoteeCandText, hds);\n\t\t \t if (result.length>=2){\n\t\t \t\t quotee_left = result [0];\n\t\t \t\t representative_quotee_left = result [1];\n//\t\t \t System.out.println(\"RESULT2 NER quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left);\n\t\t \t }\n\t\t }\n\t\t}\n }\n\t\t\n \n\n\t\t\t\t\n\t\t\t\tif (quotee_left != null && quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"TWO QUOTEES\");\n\t\t\t\t\t\n\t\t\t\t\tif (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\") \n\t\t\t\t\t\t|| \tdirectQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t|| directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"PUNCT \" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\",\")){\n//\t\t\t\t\t\tSystem.out.println(\"COMMA \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse if (!directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\".\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"!\")\n\t\t\t\t\t\t\t&& !directQuoteTokens.get(directQuoteTokens.size() - 2).getLemma().getValue().equals(\"?\")\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t){\n//\t\t\t\t\t\tSystem.out.println(\"NO PUNCT \" + quotee_right + \" \" + quote_relation_right + \" \" + quoteeReliability_right);\n\t\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n//\t\t\t\t\t\tSystem.out.println(\"UNCLEAR LEFT RIGHT \" + quotee_left + quote_relation_left + quote + quotee_right + quote_relation_right);\n\t\t\t\t\tannotation.setQuotee(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteRelation(\"<unclear>\");\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (quoteeBeforeQuote == true){\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_left != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE LEFT\" + quotee_left + quote_relation_left + quoteeReliability_left);\n\t\t\t\t\tannotation.setQuotee(quotee_left);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t}\n\t\t\t\telse if (quotee_right != null){\n//\t\t\t\t\tSystem.out.println(\"QUOTEE RIGHT FOUND\" + quotee_right + \" QUOTE RELATION \" + quote_relation_right + \":\" + quoteeReliability_right);\n\t\t\t\t\tannotation.setQuotee(quotee_right);\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t\tannotation.setQuoteeReliability(quoteeReliability_right);\n\t\t\t\t\tannotation.setRepresentativeQuoteeMention(representative_quotee_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_left != null ){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_left);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"NO QUOTEE FOUND\" + quote + quote_relation_left + quote_relation_right);\n\t\t\t\t}\n\t\t\t\telse if (quote_relation_right != null){\n\t\t\t\t\tannotation.setQuoteRelation(quote_relation_right);\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n\t\t\t\t}\n\t\t\t\telse if (quoteType != null){\n\t\t\t\t\tannotation.setQuoteType(quoteType);\n//\t\t\t\t\tSystem.out.println(\"Hello, World NO QUOTEE and NO QUOTE RELATION FOUND\" + quote);\n\t\t\t\t}\n\t\t\t\tif (annotation.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\tSystem.out.println(\"NOW!!\" + annotation.getRepresentativeQuoteeMention());\n\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(annotation.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\tannotation.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(annotation.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\tSystem.out.println(\"DBPRED FOUND\" + annotation.getRepresentativeQuoteeMention() + \" URI: \" + annotation.getQuoteeDBpediaUri());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} //for direct quote\n\t\t\n\t\t// annotate indirect quotes: opinion verb + 'that' ... until end of sentence: said that ...\n\n//\t\tList<CoreMap> sentences = document.get(SentencesAnnotation.class); //already instantiated above\nINDIRECTQUOTE:\t\tfor (CoreMap sentence : sentences) {\n//\t\t\tif (sentence.get(TokensAnnotation.class).size() > 5) { \n\t\t\t\tSentenceAnnotation sentenceAnn = new SentenceAnnotation(aJCas);\n\t\t\t\t\n\t\t\t\tint beginSentence = sentence.get(TokensAnnotation.class).get(0)\n\t\t\t\t\t\t.beginPosition();\n\t\t\t\tint endSentence = sentence.get(TokensAnnotation.class)\n\t\t\t\t\t\t.get(sentence.get(TokensAnnotation.class).size() - 1)\n\t\t\t\t\t\t.endPosition();\n\t\t\t\tsentenceAnn.setBegin(beginSentence);\n\t\t\t\tsentenceAnn.setEnd(endSentence);\n//\t\t\t\tsentenceAnn.addToIndexes();\n\t\t\t\t\n\t\t\t\tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t \tint indirectQuoteBegin = -5;\n\t\t\t\tint indirectQuoteEnd = -5;\n\t\t\t\tboolean subsequentDirectQuoteInstance = false;\n\t\t\t\t\n\t\t\t\tList<Chunk> chunksIQ = JCasUtil.selectCovered(aJCas,\n\t\t\t\tChunk.class, sentenceAnn);\n\t\t\t\tList<Chunk> chunksBeforeIndirectQuote = null;\n\t\t\t\t\n\t\t\t\tint index = 0;\nINDIRECTCHUNK:\tfor (Chunk aChunk : chunksIQ) {\n\t\t\t\t\tindex++;\n\t\t\t\t\t\n//\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE CHUNK VALUE \" + aChunk.getChunkValue().toString());\n//\t\t\t\t\tif (aChunk.getChunkValue().equals(\"SBAR\")) {\n\t\t\t\t\tif(indirectQuoteIntroChunkValue.contains(aChunk.getChunkValue())){\n//\t\t\t\t\t\tSystem.out.println(\"INDIRECT QUOTE INDEX \" + \"\" + index);\n\t\t\t\t\t\t\n\t\t\t\t\t\tList<Token> tokensSbar = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tToken.class, aChunk);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (Token aTokenSbar : tokensSbar){\n//\t\t\t\t\t\t\tString that = \"that\";\n\t\t\t\t\t\t\tif (compLemma.contains(aTokenSbar.getLemma().getCoveredText())){\n\t\t\t\t\t\t// VP test: does that clause contain VP?\n//\t\t\t\t\t\t\t\tSystem.out.println(\"TOK1\" + aTokenSbar.getLemma().getCoveredText());\n//\t\t\t \tQuoteAnnotation indirectQuote = new QuoteAnnotation(aJCas);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//NEW\n//\t\t\t\t\t\t\t\tif (LANGUAGE == \"en\")\n\t\t\t\t\t\t\t\tList<Token> precedingSbarTokens = JCasUtil.selectPreceding(aJCas,\n\t\t\t\t\t\t\t\t\t\tToken.class, aChunk, 1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (Token aPrecedingSbarToken: precedingSbarTokens){ \n//\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOK2\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \tif (coordLemma.contains(aPrecedingSbarToken.getLemma().getValue().toString())){\n//\t\t\t\t \t\tSystem.out.println(\"TOKK\" + aPrecedingSbarToken.getLemma().getCoveredText());\n\t\t\t\t \t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t \t\tint k = 0;\n\t\t\t\t \tSAY:\tfor (Chunk chunkBeforeAndThat : chunksBeforeIndirectQuote){\n//\t\t\t\t \t\t\txxxx\n\t\t\t\t \t\tk++;\n\t\t\t\t \t\t\tif (chunkBeforeAndThat.getChunkValue().equals(\"VP\")){\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\tList<Token> tokensInVp = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tToken.class, chunkBeforeAndThat);\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Token aTokenInVp : tokensInVp){\n//\t\t\t\t\t\t\t\t\t\t\t\t\tString and;\n//\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"TOKK\" + aTokenInVp.getLemma().getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (aTokenInVp.getLemma().getValue().equals(\"say\")){\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY OLD\" + indirectQuoteBegin + \":\" + sentenceAnn.getCoveredText());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tchunksBeforeIndirectQuote = chunksIQ.subList(0, k);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tindirectQuoteBegin = chunksBeforeIndirectQuote.get(chunksBeforeIndirectQuote.size()-1).getEnd()+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"SAY NEW\" + indirectQuoteBegin + \":\" );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak SAY;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t\t\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuoteChunk = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class, aChunk);\n\t\t\t\t\t\t\t\tif (coveringDirectQuoteChunk.isEmpty()){\n//\t\t\t\t\t\t\t\t indirectQuoteBegin = aChunk.getEnd() + 1;\n\t\t\t\t\t\t\t\t indirectQuote.setBegin(indirectQuoteBegin);\n//\t\t\t\t\t\t\t\t chunksBeforeIndirectQuote = chunksIQ.subList(0, index-1);\n\t\t\t\t\t\t\t\t indirectQuoteEnd = sentenceAnn.getEnd();\n\t\t\t\t\t\t\t\t indirectQuote.setEnd(indirectQuoteEnd);\n\t\t\t\t\t\t\t\t indirectQuote.addToIndexes();\n\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = false;\n//\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FALSE\");\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t List<Token> followTokens = JCasUtil.selectFollowing(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tToken.class, indirectQuote, 1);\n\t\t\t\t\t\t\t\t for (Token aFollow3Token: followTokens){\n\t\t\t\t\t\t\t\t\t List<QuoteAnnotation> subsequentDirectQuotes = JCasUtil.selectCovering(aJCas,\n\t\t\t\t\t\t\t\t\t\t\tQuoteAnnotation.class,aFollow3Token);\n\t\t\t\t\t\t\t\t\t if (!subsequentDirectQuotes.isEmpty()){\n\t\t\t\t\t\t\t\t\t\t for (QuoteAnnotation subsequentDirectQuote: subsequentDirectQuotes){\n\t\t\t\t\t\t\t\t\t\t\t if (subsequentDirectQuote.getRepresentativeQuoteeMention() != null\n\t\t\t\t\t\t\t\t\t\t\t\t && subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")){\n//\t\t\t\t\t\t\t\t\t\t\t System.out.println(\"SUBSEQUENT FOUND\"); \n\t\t\t\t\t\t\t\t\t\t\t hds.subsequentDirectQuote = subsequentDirectQuote;\n\t\t\t\t\t\t\t\t\t\t\t subsequentDirectQuoteInstance = true;\n\t\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t break INDIRECTCHUNK;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\n\t\t\t\t}\n\t\t\t\t\tif (indirectQuoteBegin >= 0 && indirectQuoteEnd >= 0){\n//\t\t\t\t\t\tList<QuoteAnnotation> coveringDirectQuote = JCasUtil.selectCovering(aJCas,\n//\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n//\t\t\t\t\t\tif (coveringDirectQuote.isEmpty()){\n////\t\t\t\t\t\t\t\n//\t\t\t\t\t\tindirectQuote.addToIndexes();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//indirect quote is covered by direct quote and therefore discarded\n//\t\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n//\t\t\t\t\t\t}\n\t\t\t\t\tList<QuoteAnnotation> coveredDirectQuotes = JCasUtil.selectCovered(aJCas,\n\t\t\t\t\t\t\t\tQuoteAnnotation.class, indirectQuote);\n\t\t\t\t\tfor (QuoteAnnotation coveredDirectQuote : coveredDirectQuotes){\n//\t\t\t\t\t\tSystem.out.println(\"Hello, World covered direct quote\" + coveredDirectQuote.getCoveredText());\n\t\t\t\t\t\t//delete coveredDirectQuoteIndex\n\t\t\t\t\t\tcoveredDirectQuote.removeFromIndexes();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t//no indirect quote in sentence\n\t\t\t\t\t\tcontinue INDIRECTQUOTE;\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n//\t\t\t\t\t\tRe-initialize markup variables since they are also used for direct quotes\n\t\t\t\t\t\tquotee_left = null;\n\t\t\t\t\t\tquotee_right = null; \n\t\t\t\t\t\t\n\t\t\t\t\t\trepresentative_quotee_left = null;\n\t\t\t\t\t\trepresentative_quotee_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquote_relation_left = null;\n\t\t\t\t\t\tquote_relation_right = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\tquoteType = \"indirect\";\n\t\t\t\t\t\tquoteeReliability = 5;\n\t\t\t\t\t\tquoteeReliability_left = 5;\n\t\t\t\t\t\tquoteeReliability_right = 5;\n\t\t\t\t\t\tquotee_end = -5;\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\tif (chunksBeforeIndirectQuote != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"chunksBeforeIndirectQuote FOUND!! \");\n\t\t\t\t\t\t\tString[] quote_annotation_result = determine_quotee_and_quote_relation(\"LEFT\", chunksBeforeIndirectQuote,\n\t\t\t\t\t\t\t\t\t hds, indirectQuote\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t );\n\t\t\tif (quote_annotation_result.length>=4){\n\t\t\t quotee_left = quote_annotation_result[0];\n\t\t\t representative_quotee_left = quote_annotation_result[1];\n\t\t\t quote_relation_left = quote_annotation_result[2];\n//\t\t\t System.out.println(\"INDIRECT QUOTE LEFT RESULT quotee \" + quotee_left + \" representative_quotee \" + representative_quotee_left\n//\t\t\t\t\t + \" QUOTE RELATION \" + quote_relation_left);\n\t\t\t try {\n\t\t\t\t quoteeReliability = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t quoteeReliability_left = Integer.parseInt(quote_annotation_result[3]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tquoteeReliability = -5;\n\t\t\t\tquoteeReliability_left = -5;\n\t\t\t\t}\t\t\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (quotee_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t\tindirectQuote.setQuoteeReliability(quoteeReliability_left);\n\t\t\t\t\t\t\tindirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//indirect quote followed by direct quote:\n\t\t\t\t\t\t\t//the quotee and quote relation of the indirect quote are copied to the direct quote \n\t\t\t\t\t\t\t//Genetic researcher Otmar Wiestler hopes that the government's strict controls on genetic research \n\t\t\t\t\t\t\t//will be relaxed with the advent of the new ethics commission. \n\t\t\t\t\t\t\t//\"For one thing the government urgently needs advice, because of course it's such an extremely \n\t\t\t\t\t\t\t//complex field. And one of the reasons Chancellor Schröder formed this new commission was without \n\t\t\t\t\t\t\t//a doubt to create his own group of advisors.\"\n\n\t\t\t\t\t\t\tif (subsequentDirectQuoteInstance == true\n\t\t\t\t\t\t\t\t&&\thds.subsequentDirectQuote.getRepresentativeQuoteeMention().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuotee().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t&& \thds.subsequentDirectQuote.getQuoteRelation().equals(\"<unclear>\")\n\t\t\t\t\t\t\t\t\t){\n//\t\t\t\t\t\t\t\tSystem.out.println(\"SUBSEQUENT UNCLEAR DIR QUOTE FOUND!!\"); \n\t\t\t\t\t\t\t\tint begin = hds.subsequentDirectQuote.getBegin();\n\t\t\t\t\t\t\t\tint end = hds.subsequentDirectQuote.getEnd();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuotee(quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteType(\"direct\");\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setQuoteeReliability(quoteeReliability_left + 2);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.setRepresentativeQuoteeMention(representative_quotee_left);\n\t\t\t\t\t\t\t\thds.subsequentDirectQuote.addToIndexes();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE \" + quotee_left + quote_relation_left + quoteeReliability);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (quote_relation_left != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteRelation(quote_relation_left);\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\telse if (quoteType != null){\n\t\t\t\t\t\t\tindirectQuote.setQuoteType(quoteType);\n//\t\t\t\t\t\t\tSystem.out.println(\"Hello, World INDIRECT QUOTE NOT FOUND\" + quote_relation_left);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (indirectQuote.getRepresentativeQuoteeMention() != null){\n//\t\t\t\t\t\t\tSystem.out.println(\"NOW!!\" + indirectQuote.getRepresentativeQuoteeMention());\n\t\t\t\t\t\t\tif (hds.dbpediaSurfaceFormToDBpediaLink.containsKey(indirectQuote.getRepresentativeQuoteeMention())){\n\t\t\t\t\t\t\t\tindirectQuote.setQuoteeDBpediaUri(hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n//\t\t\t\t\t\t\t\tSystem.out.println(\"DBPEDIA \" + indirectQuote.getRepresentativeQuoteeMention() + \" URI: \" + hds.dbpediaSurfaceFormToDBpediaLink.get(indirectQuote.getRepresentativeQuoteeMention()));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t }\n//\t\t\t} //for chunk\n//\t\t\t\tsay without that\n//\t\t\t}\t\t\n\t\t} //Core map sentences indirect quotes\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "AnalyticClause createAnalyticClause();", "private SpreedWord() {\n\n }", "public abstract void newSpeechConcepts(long ms, int n);", "public void firstSem10d(){\n chapter = \"firstSem10d\";\n String firstSem10d = \"Shocked, you and your roommate look at each other. \\\"That was...intense,\\\" your roommate says uncomfortably, and you agree. \" +\n \"\\\"Can I ask why you didn't go for the shotgun?\\\" you ask eventually, trying to find a way to bring down the adrenaline in the room. \"+\n student.getRmName()+\" shakes their head. \\\"I told you, man, that's for defense against gunmen.\\\" They look around, seemingly noticing the \" +\n \"level of destruction for the first time. \\\"This sucks. I can help you clean up the glass and stuff. You want Insomnia Cookie or anything? On me. \" +\n \"Well, partially. I only have like ten dollars.\\\" You nod, only half-listening. \\\"Yeah.\\\" you say finally. \\\"Cookies would be good.\\\"\\n\" +\n \"\\t LATER...\\n\";\n getTextIn(firstSem10d);\n }", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n String string0 = SQLUtil.normalize(\"alter sessionv)y/b{p(k{:tw\", false);\n assertEquals(\"alter sessionv) y / b { p (k { : tw\", string0);\n }", "CompoundStatement createCompoundStatement();", "public static void main(String[] args) {\n\r\n\t\tWord word = new Word(\"Look,\");\r\n\t\tWord word2 = new Word(\" I was \");\r\n\t\tWord word3 = new Word(\"gonna go \");\r\n\t\tWord word4 = new Word(\"easy on\");\r\n\t\tWord word5 = new Word(\" you and \");\r\n\r\n\t\tSentence sent = new Sentence();\r\n\r\n\t\tsent.add(word);\r\n\t\tsent.add(word2);\r\n\t\tsent.add(word3);\r\n\t\tsent.add(word4);\r\n\t\tsent.add(word5);\r\n\r\n\t\tSystem.out.println(\"--------------\");\r\n\r\n\t\tText text = new Text(sent.sh());\r\n//\t\t\r\n//\t\ttext.headline(\"dfgsdsd\");\r\n//\t\t\r\n//\t\ttext.add(\"efwefw\");\r\n//\t\t\r\n//\t\tSystem.out.println(text.displayAll());\r\n\r\n\t\tLogic lg = new Logic(text.getText());\r\n\r\n\t\tlg.headline(\"fdsfdf\");\r\n\t\tlg.add(\"sfasfas\");\r\n\r\n\t\tSystem.out.println(lg.displayAll());\r\n\r\n\t}", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n String string0 = SQLUtil.normalize(\"^PcBSW[==qn/g\", true);\n assertEquals(\"^ PcBSW  [ = = qn / g\", string0);\n }", "private static StringBuffer generateProvenanceProcedure(String query,\n\t int qIndex) {\n\n\t/*\n\t * First, we need the list of the FROM clause atoms/aliases that we will\n\t * use to augment the SELECT clause with ROWIDs. assume the query is an\n\t * SPJ Select .... From... Where .\n\t */\n\tString uQuery = query.toUpperCase();\n\n\tint fromIndex = uQuery.indexOf(\"FROM\");\n\tint whereIndex = uQuery.indexOf(\"WHERE\");\n\n\tif (whereIndex == -1) {\n\t whereIndex = uQuery.length();\n\t}\n\tString fromClause = query.substring(fromIndex + 4, whereIndex - 1)\n\t\t.trim();\n\t// System.out.println(\"From: \"+fromClause);\n\tStringTokenizer st = new StringTokenizer(fromClause, \",\");\n\n\t// Keep the list of FROM clause atoms\n\tList<String> fromAtoms = new ArrayList<String>();\n\twhile (st.hasMoreTokens()) {\n\t String thisFromAtom = st.nextToken().trim();\n\n\t // System.out.println(\"Atom:\"+thisFromAtom);\n\n\t // bug fixed\n\t // bug: didn't consider \"as\"\n\t if (thisFromAtom.contains(\"as\")) {\n\t\tStringTokenizer atomTok = new StringTokenizer(thisFromAtom,\n\t\t\t\"as\");\n\t\tString atomAlias = atomTok.nextToken();\n\t\tif (atomTok.hasMoreTokens())\n\t\t atomAlias = atomTok.nextToken();\n\t\tfromAtoms.add(atomAlias);\n\t } else if (thisFromAtom.contains(\"AS\")) {\n\t\tStringTokenizer atomTok = new StringTokenizer(thisFromAtom,\n\t\t\t\"AS\");\n\t\tString atomAlias = atomTok.nextToken();\n\t\tif (atomTok.hasMoreTokens())\n\t\t atomAlias = atomTok.nextToken();\n\t\tfromAtoms.add(atomAlias);\n\t } else {\n\t\tStringTokenizer atomTok = new StringTokenizer(thisFromAtom, \" \");\n\t\tString atomAlias = atomTok.nextToken();\n\t\tif (atomTok.hasMoreTokens())\n\t\t atomAlias = atomTok.nextToken();\n\t\tfromAtoms.add(atomAlias);\n\t }\n\n\t // original code from Bogdan\n\t // StringTokenizer atomTok = new StringTokenizer(thisFromAtom,\" \");\n\t // String atomAlias = atomTok.nextToken();\n\t // if(atomTok.hasMoreTokens())\n\t // atomAlias=atomTok.nextToken();\n\t // fromAtoms.add(atomAlias);\n\n\t}\n\n\t// System.out.println(\"FROM atoms:\"+fromAtoms);\n\n\t/*\n\t * the extension to the SELECT clause which will be used to extract the\n\t * ROWIDs of the source tuples (why-provenance)\n\t */\n\tStringBuffer selectExtension = new StringBuffer();\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t String fromAtom = fromAtoms.get(i - 1);\n\t selectExtension.append(\", \" + fromAtom + \".\"\n\t\t + Parameters.ROWID_ATT_NAME);\n\t selectExtension.append(\" as src\" + i + \"_ID\");\n\t}\n\tselectExtension.append(\"\\n\\t\\t \");\n\n\t// System.out.println(\"Select extension: \"+selectExtension);\n\tStringBuffer buffer = new StringBuffer();\n\t// buffer.append(\"DELIMITER !\\n\");\n\tbuffer.append(\"CREATE PROCEDURE \" + Parameters.TRACK_PROV_PROCNAME\n\t\t+ \"()\\n\");\n\tbuffer.append(\"BEGIN\\n\\n\");\n\tbuffer.append(\"\\t declare deriv_no int default 0;\\n\");\n\tbuffer.append(\"\\t declare done int default 0;\\n\\n\");\n\n\t// declare res_id_var, src1_id_var, src2_id_var int;\n\tbuffer.append(\"\\t declare res_id_var\");\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\", src\" + i + \"_id_var\");\n\t}\n\tbuffer.append(\" int;\\n\");\n\t// declare prov_cursor cursor for\n\t// select __ROWID, src1_ID, src2_ID\n\t// from Q1_RES q_result\n\t// natural join\n\t// (\n\t// select r1.A as A, r1.__ROWID as src1_ID, r2.__ROWID as src2_ID\n\t// from R r1, R r2\n\t// where r1.B=r2.A\n\t// ) prov_query;\n\tbuffer.append(\"\\t declare prov_cursor cursor for\\n\");\n\tbuffer.append(\"\\t\\t select \" + Parameters.ROWID_ATT_NAME);\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\", src\" + i + \"_ID\");\n\t}\n\tbuffer.append(\"\\n\");\n\tbuffer.append(\"\\t\\t from \" + Parameters.QUERY_RESULT_PREFIX + qIndex\n\t\t+ Parameters.QUERY_RESULT_SUFFIX);\n\tbuffer.append(\" q_result\\n\");\n\tbuffer.append(\"\\t\\t natural join\\n\");\n\tbuffer.append(\"\\t\\t (\\n\");\n\t// the augmented query here:\n\tStringBuffer queryBuf = new StringBuffer(query);\n\tqueryBuf.insert(fromIndex, selectExtension); // right before the FROM\n\t\t\t\t\t\t // clause\n\tbuffer.append(\"\\t\\t \" + queryBuf + \"\\n\");\n\tbuffer.append(\"\\t\\t ) prov_query;\\n\\n\");\n\tbuffer.append(\"\\t declare continue handler for not found set done = 1;\\n\\n\");\n\tbuffer.append(\"\\t open prov_cursor;\\n\\n\");\n\tbuffer.append(\"\\t read_loop: loop\\n\\n\");\n\tbuffer.append(\"\\t\\t fetch prov_cursor into res_id_var\");\n\t// , src1_id_var, src2_id_var;\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\", src\" + i + \"_id_var\");\n\t}\n\tbuffer.append(\";\\n\\n\");\n\tbuffer.append(\"\\t\\t if done then leave read_loop;\\n\");\n\tbuffer.append(\"\\t\\t end if;\\n\\n\");\n\tfor (int i = 1; i <= fromAtoms.size(); i++) {\n\t buffer.append(\"\\t\\t insert ignore into PROV values (res_id_var,deriv_no,src\"\n\t\t + i + \"_id_var);\\n\");\n\t}\n\t// insert ignore into PROV values (res_id_var,deriv_no,src1_id_var);\n\t// insert ignore into PROV values (res_id_var,deriv_no,src2_id_var);\n\tbuffer.append(\"\\n\\t\\t set deriv_no = deriv_no + 1;\\n\\n\");\n\tbuffer.append(\"\\t end loop;\\n\\n\");\n\tbuffer.append(\"\\t close prov_cursor;\\n\\n\");\n\tbuffer.append(\"END\\n\");\n\treturn buffer;\n }", "public VocabularyTerms() {}", "public String convertStatement (String oraStatement);", "public String convertStatement (String oraStatement);", "@Override\n\tpublic void runFromSentence(TokenizedSentence sentence) \n\t{\n\t\t\n\t}", "public abstract Statement createSimpleStatement(int type, CodeLocation codeLoc, List<Annotation> annotations);", "LWordConstant createLWordConstant();", "public TextPassage(String text, int tpIndex, Vocabulary voc) {\r\n\t\tthis.text = text;\r\n\t\tthis.tpIndex = tpIndex;\r\n\t\twords = new TIntArrayList();\r\n\t\tString[] tokens = text.split(\"[\\\\W0-9]\");\r\n\t\tfor (int i = 0; i < tokens.length; i++) {\r\n\t\t\tString token = tokens[i].toLowerCase();\r\n\t\t\tif (token.length() > 1 && voc.contains(token)) {\r\n\t\t\t\twords.add(voc.getTypeIndex(token).intValue());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "QuoteTermAttribute createQuoteTermAttribute();", "private String tokenToGrammar(Token v) {\n\n if(v.getChVals().equals(\"$\")){\n return \"$\";\n }\n\n String type = v.getType();\n\n if(type.equals(\"keyword\")) {\n type = v.getChVals();\n }\n\n switch (type) {\n case \"begin\":\n return \"b\";\n case \"halt\":\n return \"t\";\n case \"cat\":\n return \"c\";\n case \"mouse\":\n return \"m\";\n case \"clockwise\":\n return \"l\";\n case \"move\":\n return \"o\";\n case \"north\":\n return \"n\";\n case \"south\":\n return \"s\";\n case \"east\":\n return \"e\";\n case \"west\":\n return \"w\";\n case \"hole\":\n return \"h\";\n case \"repeat\":\n return \"r\";\n case \"size\":\n return \"z\";\n case \"end\":\n return \"d\";\n case \"integer\":\n return \"i\";\n case \"variable\":\n return \"v\";\n default:\n return type;\n }\n }", "void translate(Sentence sentence);", "public static void main(String arg[]) {\n \tFile wordListFile = new File(\"WordList.txt\");\r\n \tFile definitionsFile = new File (\"DefinitionsAndSentences.txt\"); \t\r\n \tFile outputFile = new File (\"debug.txt\"); \r\n \t\r\n \tInputStream inputStreamOne;\r\n \tInputStreamReader readerOne;\r\n \tBufferedReader binOne;\r\n \t\r\n \tInputStream inputStreamTwo;\r\n \tInputStreamReader readerTwo;\r\n \tBufferedReader binTwo;\r\n \t\r\n \tOutputStream outputStream;\r\n \tOutputStreamWriter writerTwo;\r\n \tBufferedWriter binThree;\r\n \t \t\r\n \t\r\n \t// Lists to store data to write to database\r\n \tArrayList<TermItem>databaseTermList = new ArrayList<TermItem>();\r\n \tArrayList<DefinitionItem>databaseDefinitionList = new ArrayList<DefinitionItem>();\r\n \tArrayList<SentenceItem>databaseSampleSentenceList = new ArrayList<SentenceItem>();\r\n \t\r\n \t// Create instance to use in main()\r\n \tDictionaryParserThree myInstance = new DictionaryParserThree();\r\n \t\r\n \tint totalTermCounter = 1;\r\n \tint totalDefinitionCounter = 1;\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tmyInstance.createDatabase();\r\n\t\t\t// Open streams for reading data from both files\r\n\t\t\tinputStreamOne = new FileInputStream(wordListFile);\r\n\t \treaderOne= new InputStreamReader(inputStreamOne);\r\n\t \tbinOne= new BufferedReader(readerOne);\r\n\t \t\r\n\t \tinputStreamTwo = new FileInputStream(definitionsFile);\r\n\t \treaderTwo= new InputStreamReader(inputStreamTwo);\r\n\t \tbinTwo= new BufferedReader(readerTwo);\r\n\t \t\r\n\t \toutputStream = new FileOutputStream(outputFile);\r\n\t \twriterTwo= new OutputStreamWriter(outputStream);\r\n\t \tbinThree= new BufferedWriter(writerTwo);\r\n\r\n\t \tString inputLineTwo;\r\n\t \tString termArray[] = new String[NUM_SEARCH_TERMS];\r\n\t \t\r\n\t \t// Populate string array with all definitions.\r\n\t \tfor (int i = 0; (inputLineTwo = binTwo.readLine()) != null; i++) {\r\n\t\t \t termArray[i] = inputLineTwo; \r\n\t \t}\t \t\r\n\t \t\r\n\t \t// Read each line from the input file (contains top gutenberg words to be used)\r\n\t \tString inputLineOne;\r\n\t \tint gutenbergCounter = 0;\r\n\t \twhile ((inputLineOne = binOne.readLine()) != null) {\r\n\t \t\t\r\n\t \t\t\r\n\t \t\t// Each line contains three or four words. Grab each word inside double brackets.\r\n\t\t \tString[] splitString = (inputLineOne.split(\"\\\\[\\\\[\")); \t\t \t\r\n\t \t\tfor (String stringSegment : splitString) {\r\n\t \t\t\t\r\n\t \t\t\tif (stringSegment.matches((\".*\\\\]\\\\].*\")))\r\n\t \t\t\t{\r\n\t \t\t\t\t// Increment counter to track Gutenberg rating (already from lowest to highest)\r\n\t \t\t\t\tgutenbergCounter++;\r\n\t \t \t\t\r\n\t \t\t\t\tboolean isCurrentTermSearchComplete = false;\r\n\t \t\t \tint lowerIndex = 0;\r\n\t \t\t \tint upperIndex = NUM_SEARCH_TERMS - 1;\r\n\t \t\t \t\r\n\t \t\t \tString searchTermOne = stringSegment.substring(0, stringSegment.indexOf(\"]]\"));\r\n\t \t\t \tsearchTermOne = searchTermOne.substring(0, 1).toUpperCase() + searchTermOne.substring(1);\r\n\t \t\t \t\r\n\t \t\t\t\twhile (!isCurrentTermSearchComplete) {\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\t// Go to halfway point of lowerIndex and upperIndex.\r\n\t \t\t\t\t\tString temp = termArray[(lowerIndex + upperIndex)/2];\r\n\t \t\t\t\t\tString currentTerm = temp.substring(temp.indexOf(\"<h1>\") + 4, temp.indexOf(\"</h1>\"));\r\n\t \t\t\t\t\t\t \t\t\t\t\t\r\n\t \t \t \t\t\t\t\t\r\n\t \t\t\t\t\t// If definition term is lexicographically lower, need to increase lower Index\r\n\t \t\t\t\t\t// and search higher.\r\n\t \t\t\t\t\t// If definition term is lexicographically higher, need decrease upper index\r\n\t \t\t\t\t\t// and search higher.\r\n\t \t\t\t\t\t// If a match is found, need to find first definition, and record each definition\r\n\t \t\t\t\t\t// in case of duplicates.\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\tif (currentTerm.compareTo(searchTermOne) < 0) {\t \t\t\t\t\t\t\r\n\t \t\t\t\t\t\tlowerIndex = (lowerIndex + upperIndex)/2;\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\telse if (currentTerm.compareTo(searchTermOne) > 0) {\r\n\t \t\t\t\t\t\tupperIndex = (lowerIndex + upperIndex)/2; \t\t\t\t\t\t\r\n\t \t\t\t\t\t} \t\t\t\t\t\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\telse {\t\r\n\t \t\t\t\t\t\t// Backtrack row-by-row until we reach the first term in the set. Once we reach the beginning,\r\n\t \t\t\t\t\t\t// cycle through each match in the set and obtain each definition until we reach the an unmatching term.\r\n\r\n\t \t\t\t\t\t\t//else {\r\n\t \t\t\t\t\t\t\tSystem.out.println(searchTermOne);\r\n\t\t \t\t\t\t\t\tint k = (lowerIndex + upperIndex)/2;\r\n\t\t \t\t\t\t\t\tboolean shouldIterateAgain = true;\r\n\t\t \t\t\t\t\t\twhile (shouldIterateAgain) {\r\n\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\tif (k <= 0 || k >= NUM_SEARCH_TERMS) {\r\n\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\t\telse {\r\n\t\t\t\t \t\t\t\t\t\tString current = termArray[k].substring(termArray[k].indexOf(\"<h1>\") + 4, termArray[k].indexOf(\"</h1>\"));\r\n\t\t\t\t \t\t\t\t\t\tString previous = termArray[k - 1].substring(termArray[k - 1].indexOf(\"<h1>\") + 4, termArray[k - 1].indexOf(\"</h1>\"));\r\n\t\t\t\t\t \t\t\t\t\t\r\n\t\t\t\t \t\t\t\t\t\tif (current.compareTo(previous) == 0) {\t\t\t\r\n\t\t\t\t \t\t\t\t\t\t\tk--;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t\t\t\t\t \t\t\t\t\telse {\r\n\t\t\t\t\t \t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\t} \r\n\t\t \t\t\t\t\t\tshouldIterateAgain = true;\r\n\t\t \t\t\t\t\t\twhile (shouldIterateAgain) {\r\n\t\t \t\t\t\t\t\t\t\t\t \t\r\n\t\t \t\t\t\t\t\t\t// Used to store data to later pass to DB\r\n\t\t \t\t\t\t\t DictionaryParserThree.TermItem tempTermItem = myInstance.new TermItem();\r\n\r\n\t\t \t\t\t\t\t // Determine unique ID (which will be written to DB later)\r\n\t\t \t\t\t\t\t // Add current term and gutenberg rating.\r\n\t\t \t\t\t\t\t tempTermItem.ID = totalTermCounter;\t\t \t\t\t\t\t \t \t\t\t\t\t \r\n\t\t \t\t\t\t\t \ttempTermItem.theWord = searchTermOne; // same as termArray[k]'s term\r\n\t\t \t\t\t\t\t \r\n\t\t \t\t\t\t\t\t\ttempTermItem.gutenbergRating = gutenbergCounter;\r\n\t\t \t\t\t\t\t\t\tdatabaseTermList.add(tempTermItem);\r\n\t\t \t\t\t\t\t\t\tbinThree.write(\"Term ID \" + tempTermItem.ID + \" \" + tempTermItem.theWord + \" guten rank is \" + tempTermItem.gutenbergRating);\r\n\t\t \t\t\t\t\t\t\tbinThree.newLine();\t\t\t\t\t\t\t\r\n\t\t \t\t\t\t \t\tsplitString = termArray[k].split(\"<def>\");\r\n\t\t \t\t\t\t \t\t\r\n\t\t \t\t\t\t \t\tint m = 0;\r\n\t \t\t\t\t\t \t\tfor (String stringSegment2 : splitString) {\r\n\t \t\t\t\t\t \t\t\tif (stringSegment2.matches(\".*</def>.*\") && m > 0) {\r\n\t \t\t\t\t\t \t\t\t\t\r\n\t \t\t\t\t\t \t\t\t\t// Determine unique ID (which will be written to DB later)\r\n\t \t\t\t\t\t \t\t\t\t// Add definition, as well as term ID it is associated with.\r\n\t \t\t\t\t\t \t\t\t\tDictionaryParserThree.DefinitionItem tempDefinitionItem = myInstance.new DefinitionItem();\r\n\t \t\t\t\t\t \t\t\t\ttempDefinitionItem.ID = totalDefinitionCounter;\r\n\t \t\t\t\t\t \t\t\t\ttempDefinitionItem.theDefinition = stringSegment2.substring(0, stringSegment2.indexOf(\"</def>\"));\r\n\t \t\t\t\t\t\t \t\t\ttempDefinitionItem.termID = totalTermCounter;\r\n\t \t\t\t\t\t\t \t\t\tdatabaseDefinitionList.add(tempDefinitionItem);\r\n\r\n\t \t\t\t\t\t\t \t\t\tint n = 0;\r\n\t \t\t\t\t\t\t \t\t\tString[] splitString2 = (stringSegment2.split(\"<blockquote>\")); \r\n\t \t \t\t\t\t\t \t\tfor (String stringSegment3 : splitString2) {\r\n\t \t \t\t\t\t\t \t\t\tif (stringSegment3.matches(\".*</blockquote>.*\") && n > 0) {\r\n\t \t \t\t\t\t\t \t\t\t\t// Add data which will be added to DB later.\r\n\t \t \t\t\t\t\t \t\t\t\t// Add sample sentence as well as the definition ID it is associated with.\r\n\t \t \t\t\t\t\t \t\t\t\tDictionaryParserThree.SentenceItem tempSentenceItem = myInstance.new SentenceItem();\t\r\n\t \t \t\t\t\t\t \t\t\t\ttempSentenceItem.definitionID = totalDefinitionCounter;\r\n\t \t \t\t\t\t\t \t\t\t\ttempSentenceItem.theSampleSentence = stringSegment3.substring(0, stringSegment3.indexOf(\"</blockquote>\"));\r\n\t \t \t\t\t\t\t \t\t\t\tdatabaseSampleSentenceList.add(tempSentenceItem);\t \t \t\t\t\t\t \t\t\t\t\r\n\t \t \t \t\t\t\t\t \t\t\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.write(\"Definition is\" + tempDefinitionItem.theDefinition);\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.newLine();\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.write(\" and sample sentence is \" + tempSentenceItem.theSampleSentence);\r\n\t \t \t\t \t\t\t\t\t\t\tbinThree.newLine();\t\r\n\t \t \t\t\t\t\t \t\t\t}\r\n\t \t \t\t\t\t\t \t\t\t// Increment counter for split string (for this line's sample sentence)\r\n\t \t \t\t\t\t\t \t\t\tn++;\r\n\t \t \t\t\t\t\t \t\t}\r\n\t \t \t\t\t\t\t \t\ttotalDefinitionCounter++;\r\n\t \t\t\t\t\t \t\t\t}\r\n\t \t\t\t\t\t \t\t\t// Increment counter for split string (for this line's definition)\r\n\t \t\t\t\t \t\t\t\tm++;\r\n\t \t\t\t\t \t\t\t\t\r\n\t \t\t\t\t\t \t\t}\t \t \t\t\t\t\t \t\t\r\n\t \t\t\t\t\t \t\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\ttotalTermCounter++;\r\n\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\t// Compare next definition and see if duplicate exists.\r\n\t\t \t\t\t\t\t\t\t// If so, add to string array.\r\n\t \t\t\t\t\t \t\tif (k < 0 || k >= NUM_SEARCH_TERMS - 1) {\r\n\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t \t\telse { \t \t\t\t\t\t \t\t\r\n\t\t\t \t\t\t\t\t\t\tString current = termArray[k].substring(termArray[k].indexOf(\"<h1>\") + 4, termArray[k].indexOf(\"</h1>\"));\r\n\t\t\t\t \t\t\t\t\t\tString next = termArray[k + 1].substring(termArray[k + 1].indexOf(\"<h1>\") + 4, termArray[k + 1].indexOf(\"</h1>\"));\r\n\t\t\t\t\t \t\t\t\t\tif (current.compareTo(next) == 0) {\t\r\n\t\t\t\t \t\t\t\t\t\t\tk++;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t\t\t\t \t\t\t\t\t\telse {\r\n\t\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t \t\t}\r\n\t\t\t \t\t\t\t\t\t//}\t \t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\tisCurrentTermSearchComplete = true;\r\n\t\t \t\t\t\t\t\t\r\n\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\t// If the term does not exist in the database.\r\n\t \t\t\t\t\tif (Math.abs(upperIndex) - Math.abs(lowerIndex) <= 1)\r\n\t \t\t\t\t\t{\r\n \t\t\t\t\t\t\t isCurrentTermSearchComplete = true;\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} \t \t\t\r\n\t \t}\r\n\t \t\r\n\t \t \t\r\n\t \tSystem.out.println(\"ended search.\");\t\r\n\t \tmyInstance.writeAllItemsToDatabase(databaseTermList, databaseDefinitionList, databaseSampleSentenceList);\t\r\n\t \tSystem.out.println(\"ended write.\");\r\n\t \t\r\n\t \tbinOne.close();\r\n\t \treaderOne.close();\r\n\t \tinputStreamOne.close();\t \t\r\n\t \t\r\n\t \tbinTwo.close();\r\n\t \treaderTwo.close();\r\n\t \tinputStreamTwo.close();\t \t\r\n\t \t\r\n\t \tbinThree.close(); \r\n\t \twriterTwo.close();\r\n\t \toutputStream.close();\r\n\t \tSystem.exit(0);\r\n\r\n\r\n\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} \t\r\n }", "public Sentence(){\n\t\tsentence = new ArrayList<TWord>();\n\t}", "private void createWord() {\n\t\tString value = \"\";\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& Character.isWhitespace(data[currentIndex])) {\n\t\t\tcurrentIndex++;\n\t\t}\n\t\tif (currentIndex + 1 < data.length && data[currentIndex] == '$'\n\t\t\t\t&& data[currentIndex + 1] == '}') {\n\t\t\tvalue += data[currentIndex++];\n\t\t\tvalue += data[currentIndex++];\n\t\t\ttoken = new Token(TokenType.WORD, value);\n\t\t\treturn;\n\t\t}\n\t\t// no escaping!\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& !Character.isWhitespace(data[currentIndex])) {\n\t\t\tif (data[currentIndex] == '\\\\') {\n\t\t\t\tthrow new LexerException(\"No exceping alowed.\");\n\t\t\t}\n\t\t\tvalue += data[currentIndex++];\n\t\t}\n\t\ttoken = new Token(TokenType.WORD, value);\n\n\t}", "public void firstSem2a6(){\n chapter = \"firstSem2a6\";\n String firstSem2a6 = \"\\\"Well? Are we friends, like that guy said?\\\"\";\n getTextIn(firstSem2a6);\n }", "Statement createStatement();", "Statement createStatement();", "Statement createStatement();", "public static void main(String[] args) {\n\t\t\n//\t\t//PA4 a\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"a\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"b\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n//\t\t//PA4 b\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"a\");rhs11.add(\"b\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"c\");rhs12.add(\"d\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n//\t\t//PA4 c\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"S\");rhs11.add(\"U\");rhs11.add(\"S\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"S\");rhs12.add(\"S\");\t\t\n//\t\tArrayList<String> rhs13 = new ArrayList<>();\n//\t\trhs13.add(\"S\");rhs13.add(\"*\");\n//\t\tArrayList<String> rhs14 = new ArrayList<>();\n//\t\trhs14.add(\"(\");rhs14.add(\"S\");rhs14.add(\")\");\n//\t\tArrayList<String> rhs15 = new ArrayList<>();\n//\t\trhs15.add(\"a\");\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\trhs1.add(rhs13);\n//\t\trhs1.add(rhs14);\n//\t\trhs1.add(rhs15);\n//\n//\n//\t\tRule r1 = new Rule(\"S\", rhs1); // S -> Aa | b\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\t\t\n\t\t\n//\t\t//PA-3 d\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"rexpr\");rhs11.add(\"U\");rhs11.add(\"rterm\");\t\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"rterm\");\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\tRule r1 = new Rule(\"rexpr\", rhs1);\n//\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"rterm\");rhs21.add(\"r factor\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"r factor\");\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\t\tRule r2 = new Rule(\"rterm\", rhs2);\n//\n//\t\tArrayList<ArrayList<String>> rhs3 = new ArrayList<>();\n//\t\tArrayList<String> rhs31 = new ArrayList<>();\n//\t\trhs31.add(\"r factor\");rhs31.add(\"*\");\n//\t\tArrayList<String> rhs32 = new ArrayList<>();\n//\t\trhs32.add(\"rprimary\");\n//\t\trhs3.add(rhs31);\n//\t\trhs3.add(rhs32);\n//\t\tRule r3 = new Rule(\"r factor\", rhs3);\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs4 = new ArrayList<>();\n//\t\tArrayList<String> rhs41 = new ArrayList<>();\n//\t\trhs41.add(\"a\");\n//\t\tArrayList<String> rhs42 = new ArrayList<>();\n//\t\trhs42.add(\"b\");\n//\t\trhs4.add(rhs41);\n//\t\trhs4.add(rhs42);\n//\t\tRule r4 = new Rule(\"rprimary\", rhs4);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\trules.add(r3);\n//\t\trules.add(r4);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\t\n\t\t\t\n//\t\t//PA-3 e\t\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"0\");\n//\t\tArrayList<String> rhs12 = new ArrayList<>();\n//\t\trhs12.add(\"T\");rhs12.add(\"1\");\t\t\n//\t\trhs1.add(rhs11);\n//\t\trhs1.add(rhs12);\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"1\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"A\");rhs22.add(\"0\");\t\t\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\n//\t\tRule r1 = new Rule(\"A\", rhs1);\n//\t\tRule r2 = new Rule(\"T\", rhs2);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tg.eliminateEpsilonRule();\n//\t\tg.eliminateLR();\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\n\n\t\t\n//\t\t//PA-3 f\n//\t\t\n//\t\tArrayList<ArrayList<String>> rhs1 = new ArrayList<>();\n//\t\tArrayList<String> rhs11 = new ArrayList<>();\n//\t\trhs11.add(\"B\");rhs11.add(\"C\");\t\n//\t\trhs1.add(rhs11);\n//\t\tRule r1 = new Rule(\"A\", rhs1);\n//\n//\t\tArrayList<ArrayList<String>> rhs2 = new ArrayList<>();\n//\t\tArrayList<String> rhs21 = new ArrayList<>();\n//\t\trhs21.add(\"B\");rhs21.add(\"b\");\n//\t\tArrayList<String> rhs22 = new ArrayList<>();\n//\t\trhs22.add(\"e\");\n//\t\trhs2.add(rhs21);\n//\t\trhs2.add(rhs22);\n//\t\tRule r2 = new Rule(\"B\", rhs2);\n//\n//\t\tArrayList<ArrayList<String>> rhs3 = new ArrayList<>();\n//\t\tArrayList<String> rhs31 = new ArrayList<>();\n//\t\trhs31.add(\"A\");rhs31.add(\"C\");\n//\t\tArrayList<String> rhs32 = new ArrayList<>();\n//\t\trhs32.add(\"a\");\n//\t\trhs3.add(rhs31);\n//\t\trhs3.add(rhs32);\n//\t\tRule r3 = new Rule(\"C\", rhs3);\n//\n//\t\tArrayList<Rule> rules = new ArrayList<>();\n//\t\trules.add(r1);\n//\t\trules.add(r2);\n//\t\trules.add(r3);\n//\t\tGrammar g = new Grammar(rules);\n//\t\tSystem.out.println(g);\n//\t\tg.eliminateEpsilonRule();\n//\t\tSystem.out.println(g);\n//\n//\t\tg.eliminateLR();\n//\n//\t\tSystem.out.println(g);\n//\t\tSystem.out.println(\"----------------------\");\n\n\t}", "HornSentence(Literal head, HashSet premises){\n this.head = head;\n this.premises = new HashSet(premises);\n }", "GeneralClauseContinuation createGeneralClauseContinuation();", "private String composeMarkedSentence(String source) {\n \tString charstates=\"\";\r\n \ttry{\r\n \t\tint ct=0;\r\n \t\tStatement stmt = conn.createStatement();\r\n \t\tStatement stmt1 = conn.createStatement();\r\n \t\tStatement stmt2 = conn.createStatement();\r\n\t ResultSet rs = stmt.executeQuery(\"select * from marked_simpleseg where source='\"+source+\"'\");\r\n\t \twhile(rs.next()){\r\n\t \t\tct+=1;\r\n\t \t}\r\n\t\t\tif(ct==1){\r\n\t\t\t\tResultSet rs1 = stmt1.executeQuery(\"select * from marked_simpleseg where source='\"+source+\"'\");\r\n\t\t\t\twhile(rs1.next()){\r\n\t\t\t\t\tString str=rs1.getString(3);\r\n\t\t\t\t\tPattern pattern1 = Pattern.compile(\"[a-zA-Z\\\\_]+=\\\"[\\\\w±\\\\+\\\\–\\\\-\\\\.:/\\\\_;x´X\\\\×\\\\s,]+\\\"\");\r\n\t \tMatcher matcher = pattern1.matcher(str);\r\n\t \twhile ( matcher.find()){\r\n\t \t\tint i=matcher.start();\r\n\t \t\tint j=matcher.end();\r\n\t \t\tcharstates=charstates.concat(str.subSequence(i,j).toString()+\" \");\r\n\t }\r\n\t \tmatcher.reset();\r\n\t\t\t\t}\r\n\t\t\t\thasSeg = 0;\r\n\t\t\t}\r\n\t\t\telse if(ct>1){\r\n\t\t\t\tResultSet rs2 = stmt2.executeQuery(\"select * from marked_simpleseg where source='\"+source+\"'\");\r\n\t\t\t\twhile(rs2.next()){\r\n\t\t\t\t\tcharstates=charstates.concat(rs2.getString(3));\r\n\t\t\t\t}\r\n\t\t\t\thasSeg = 1;\r\n\t\t\t}\r\n \t}catch (Exception e)\r\n {\r\n \t\tStringWriter sw = new StringWriter();PrintWriter pw = new PrintWriter(sw);e.printStackTrace(pw);LOGGER.error(ApplicationUtilities.getProperty(\"CharaParser.version\")+System.getProperty(\"line.separator\")+sw.toString());\r\n }\r\n \treturn charstates;\r\n\t}", "public Element compileTerm() {\n\t\tElement ele = null;\n\t\tString token, tokenType;\n\t\tString varName;\n\n\t\tElement termParent = document.createElement(\"term\");\n\n\t\ttoken = jTokenizer.returnTokenVal();\n\t\ttokenType = jTokenizer.tokenType();\n\n\t\t// Case 1: ( expression )\n\n\t\tif (token.equals(\"(\")) {\n\t\t\t// (\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\n\t\t\t// exp\n\t\t\tjTokenizer.advance();\n\t\t\ttermParent.appendChild(compileExpression());\n\n\t\t\t// )\n\t\t\tjTokenizer.advance();\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\n\t\t}\n\n\t\t// Case 2: unaryOp term\n\t\telse if (token.matches(\"\\\\-|~\")) {\n\n\t\t\t// unary op\n\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\tString op = jTokenizer.returnTokenVal();\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\t\n\t\t\t\n\t\t\t//Since it is postfix, the term comes first\n\t\t\t\n\t\t\t// term\n\t\t\tjTokenizer.advance();\n\t\t\ttermParent.appendChild(compileTerm());\n\n\t\t\t// appending the op\n\t\t\tif (op.equals(\"~\")) {\n\t\t\t\twriter.writeArithmetic(\"not\");\n\t\t\t} else {\n\t\t\t\twriter.writeArithmetic(\"neg\");\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t// Any constant or keyword\n\t\telse if (tokenType.matches(\"keyword|integerConstant|stringConstant\")) {\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\t\n\t\t\t//pushing an integer constant\n\t\t\tif (tokenType.equals(\"integerConstant\")) {\n\t\t\t\twriter.writePush(\"constant\", Integer.parseInt(token));\t\n\t\t\t}\n\t\t\t//For string, have to iterate along the length of the string and call string.append\n\t\t\telse if (tokenType.equals(\"stringConstant\")) {\n\t\t\t\twriter.writePush(\"constant\", token.length());\n\t\t\t\twriter.writeCall(\"String.new\", 1);\n\n\t\t\t\tfor (int i = 0; i < token.length(); i++) {\n\t\t\t\t\twriter.writePush(\"constant\", (int) token.charAt(i));\n\t\t\t\t\twriter.writeCall(\"String.appendChar\", 2);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} \n\t\t\t//Pushing the keyword onto the stack, depending on what it is\n\t\t\telse if (tokenType.equals(\"keyword\")) {\n\t\t\t\tif (token.equals(\"true\")) {\n\t\t\t\t\twriter.writePush(\"constant\", 0);\n\t\t\t\t\twriter.writeArithmetic(\"not\");\n\t\t\t\t} else if (token.equals(\"this\")) {\n\t\t\t\t\twriter.writePush(\"pointer\", 0);\n\t\t\t\t} else if (token.equals(\"false\") || token.equals(\"null\")) {\n\t\t\t\t\twriter.writePush(\"constant\", 0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Variable, Variable[expression] or subroutineCall\n\t\telse if (tokenType.equals(\"identifier\")) {\n\t\t\tele = createXMLnode(tokenType);\n\t\t\ttermParent.appendChild(ele);\n\t\t\tvarName = jTokenizer.returnTokenVal();\n\t\t\tjackTokenizer clone = new jackTokenizer(jTokenizer);\n\t\t\tclone.advance();\n\t\t\ttoken = clone.returnTokenVal();\n\n\t\t\t// Case 1: Array dereferencing\n\t\t\tif (token.equals(\"[\")) {\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// push base id\n\t\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\n\t\t\t\t// Exp\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttermParent.appendChild(compileExpression());\n\n\t\t\t\t// ]\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// base + offset\n\t\t\t\twriter.writeArithmetic(\"add\");\n\n\t\t\t\t// pop into that\n\t\t\t\twriter.writePop(\"pointer\", 1);\n\t\t\t\t// push value into stack\n\t\t\t\twriter.writePush(\"that\", 0);\n\t\t\t}\n\n\t\t\t// Case 2: variable/class.subroutine call\n\t\t\telse if (token.equals(\".\")) {\n\n\t\t\t\tboolean method = false;\n\n\t\t\t\t// .\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// subroutine name\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tString subName = jTokenizer.returnTokenVal();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// (\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\tString firstName = varName;\n\t\t\t\t//Similar to the compileDo method, have to distinguish between\n\t\t\t\t//method and function\n\t\t\t\tif (symTable.lookup(firstName) != null) {\n\t\t\t\t\tmethod = true;\n\t\t\t\t\twriter.writePush(symTable.lookup(firstName).kind, symTable.lookup(firstName).index);\n\t\t\t\t\tvarName = symTable.lookup(firstName).type;\n\t\t\t\t}\n\t\t\t\t// expressionList\n\t\t\t\tjTokenizer.advance();\n\t\t\t\tElement compileExpression = compileExpressionList();\n\t\t\t\tint nArgs = compileExpression.getChildNodes().getLength();\n\t\t\t\ttermParent.appendChild(compileExpression);\n\n\t\t\t\t// Checking if method or function\n\t\t\t\tif (method) {\n\t\t\t\t\tnArgs++;\n\t\t\t\t}\n\t\t\t\twriter.writeCall(varName + \".\" + subName, nArgs);\n\n\t\t\t\t// )\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\t\t\t}\n\n\t\t\t// Case 3: function call\n\t\t\telse if (token.equals(\"(\")) {\n\t\t\t\t// (\n\t\t\t\tjTokenizer.advance();\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// expression list\n\t\t\t\tjTokenizer.advance();\n\t\t\t\tElement node = compileExpressionList();\n\t\t\t\tint nArgs = node.getChildNodes().getLength();\n\t\t\t\ttermParent.appendChild(node);\n\n\t\t\t\t// )\n\t\t\t\ttokenType = jTokenizer.tokenType();\n\t\t\t\tele = createXMLnode(tokenType);\n\t\t\t\ttermParent.appendChild(ele);\n\n\t\t\t\t// Writing the VML for a method call\n\t\t\t\twriter.writePush(\"pointer\", 0);\n\t\t\t\twriter.writeCall(className + \".\" + varName, ++nArgs);\n\t\t\t}\n\t\t\t// Case 4: Variable name.\n\t\t\telse {\n\t\t\t\twriter.writePush(symTable.lookup(varName).kind, symTable.lookup(varName).index);\n\t\t\t}\n\t\t}\n\t\treturn termParent;\n\t}", "public ParseTreeNode generateParseTree(ContextFreeGrammar cfg, Word w) {\n int n = w.length();\r\n int exactDervOfWord = (2*n) - 1;\r\n List<Rule> rules = new ArrayList<Rule>();\r\n rules = cfg.getRules();\r\n Variable startVariable = cfg.getStartVariable();\r\n int numDerivations = 0;\r\n List<List<Word>> generalList = new ArrayList<List<Word>>();\r\n List<List<Word>> varList = new ArrayList<List<Word>>();\r\n\r\n\r\n // 2. Lists for storing derivation\r\n // make exact number of list for words to be stored at each derivation \r\n makeLists(exactDervOfWord, generalList);\r\n\r\n // 3. Derivation from Start Variable\r\n for (Rule rule : rules) {\r\n if (rule.getVariable().equals(startVariable)) {\r\n generalList.get(numDerivations).add(rule.getExpansion());\r\n }\r\n }\r\n numDerivations += 1;\r\n\r\n // 4. \r\n while (numDerivations < exactDervOfWord-n) {\r\n if (numDerivations == 1){\r\n // Stores the var only from the start expansion into varList\r\n List<Word> listOfVars = new ArrayList<Word>();\r\n for (Word word : generalList.get(numDerivations-1)){\r\n boolean varOnly= true;\r\n for (int i =0; i < word.length(); i++){\r\n if(word.get(i).isTerminal()){\r\n varOnly = false;\r\n }\r\n }\r\n if (varOnly){\r\n listOfVars.add(word);\r\n }\r\n }\r\n varList.add(listOfVars);\r\n numDerivations += 1; \r\n }\r\n if (numDerivations > 1 && numDerivations - 1 < exactDervOfWord-n ) {\r\n List<List<List<Word>>> listOfExpPerDerviation = new ArrayList<List<List<Word>>>();\r\n for (Word word : varList.get(numDerivations-2)){\r\n List<List<Word>> listOfExPerWord = new ArrayList<List<Word>>();\r\n for(int i= 0; i <word.length(); i++){\r\n for(Rule rule :rules){\r\n List<Word> tempListofExpan = new ArrayList<Word>();\r\n if(rule.getVariable().equals(word.get(i))){\r\n if (!rule.getExpansion().isTerminal()){\r\n tempListofExpan.add(word);\r\n tempListofExpan.add(word.replace(i, rule.getExpansion()));\r\n listOfExPerWord.add(tempListofExpan);\r\n }\r\n }\r\n }\r\n }\r\n listOfExpPerDerviation.add(listOfExPerWord);\r\n }\r\n numDerivations += 1;\r\n }\r\n }\r\n\r\n return null;\r\n return null;\r\n }", "public void firstSem2a5(){\n chapter = \"firstSem2a5\";\n String firstSem2a5 = \"What about your friend here?\\\" he asks, nodding to \"+student.getRmName()+\". \\\"Oh, I'm good,\\\"\" +\n student.getRmName()+\"says quickly. I already have a job, through the underground Communist...uh, through\" +\n \" the school paper.\\\" You chat with the man a little longer before he excuses himself to go back to the \" +\n \"kitchen.\\tYou and \"+student.getRmName()+\" finish up your dinner and head back. About halfway there, your roommate \" +\n \"stops and peers at you intensely. \\\"Well?\\\" they say.\";\n getTextIn(firstSem2a5);\n }", "private static void verifEnt() {\r\n\t\tif (tCour != ENT)\r\n\t\t\tUtilLex.messErr(\"expression entiere attendue\");\r\n\t}", "@Override\n public Object visit(PhraseExpr node) {\n node.setExprType(SemanticTools.PHRASE);\n this.currentPhraseExpr = node;\n if (node.getInstrument() != null) {\n node.getInstrument().accept(this);\n if (!node.getInstrument().getExprType().equals(SemanticTools.STRING)) {\n errorHandler.register(\n errorHandler.SEMANT_ERROR,\n root.getScore().getFilename(),\n node.getLineNum(),\n \"Instrument must be a String\"\n );\n } else {\n if (!SemanticTools.isValidInstrument(\n ((ConstStringExpr) node.getInstrument()).getConstant())\n ) {\n errorHandler.register(\n errorHandler.SEMANT_ERROR,\n root.getScore().getFilename(),\n node.getLineNum(),\n \"Instrument must be of types: \" + SemanticTools.instruments\n );\n }\n }\n } else {\n // default value\n node.setInstrument(new ConstStringExpr(node.getLineNum(), \"piano\"));\n }\n if (node.getOctaveModifier() != null) {\n node.getOctaveModifier().accept(this);\n if (!node.getOctaveModifier().getExprType().equals(SemanticTools.INT)) {\n errorHandler.register(\n errorHandler.SEMANT_ERROR,\n root.getScore().getFilename(),\n node.getLineNum(),\n \"Octave modifiers must be of type \" + SemanticTools.INT\n );\n } else {\n int octave = Integer.parseInt(\n ((ConstIntExpr) node.getOctaveModifier()).getConstant()\n );\n\n if (octave > SemanticTools.MAX_OCT || octave < SemanticTools.MIN_OCT) {\n errorHandler.register(\n errorHandler.SEMANT_ERROR,\n root.getScore().getFilename(),\n node.getLineNum(),\n \"Octave modifiers must be within the range \"\n + SemanticTools.MIN_OCT + \" to \"\n + SemanticTools.MAX_OCT\n );\n }\n }\n } else {\n // default value\n node.setOctaveModifier(new ConstIntExpr(node.getLineNum(), \"0\"));\n }\n if (node.getVolume() != null) {\n node.getVolume().accept(this);\n if (!node.getVolume().getExprType().equals(SemanticTools.INT)) {\n errorHandler.register(\n errorHandler.SEMANT_ERROR,\n root.getScore().getFilename(),\n node.getLineNum(),\n \"Volume must be of type \" + SemanticTools.INT\n );\n } else {\n int vol = Integer.parseInt(\n ((ConstIntExpr) node.getVolume()).getConstant()\n );\n\n if (vol > 127 || vol < 0) {\n errorHandler.register(\n errorHandler.SEMANT_ERROR,\n root.getScore().getFilename(),\n node.getLineNum(),\n \"Volume must be in range 0-127\"\n );\n }\n }\n } else {\n //default value\n node.setVolume(new ConstIntExpr(node.getLineNum(), \"127\"));\n }\n node.getMeasureList().accept(this);\n return null;\n }", "@Test(timeout = 4000)\n public void test53() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The database key of the entry being cross referenced. Any fields that are missing from the current record are inherited from the field being cross referenced.\");\n assertEquals(\"th databas key of th entr being cros refer. any field that ar mis from th cur record ar inherit from th field being cros refer.\", string0);\n }", "public List<? extends HasWord> defaultTestSentence()\n/* */ {\n/* 472 */ return Sentence.toSentence(new String[] { \"w\", \"lm\", \"tfd\", \"mElwmAt\", \"En\", \"ADrAr\", \"Aw\", \"DHAyA\", \"HtY\", \"AlAn\", \".\" });\n/* */ }", "public abstract void mo2157b(CharSequence charSequence);", "void addWordToDoc(int doc,VocabWord word);", "public Sentence(int addr, TOP_Type type) {\n super(addr, type);\n readObject();\n }", "public void getTerm()\n\t\t{\n\t\t\t//Open SciencePhrases.txt\n\t\t\tFile f1 = new File(\"SciencePhrases.txt\");\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tspIn = new Scanner(f1);\n\t\t\t}\n\t\t\tcatch(FileNotFoundException e)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"Cannot create SciencePhrases.txt to be written \"\n\t\t\t\t\t\t+ \"to.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\n\t\t\t//Storing term at curTerm in the variables term and picTerm\n\t\t\tString cur = new String(\"\");\n\t\t\tfor(int i = 0; i<curTerm; i++)\n\t\t\t{\n\t\t\t\tterm = \"\";\n\t\t\t\twhile(!cur.equals(\"-\"))\n\t\t\t\t\tcur = spIn.nextLine();\n\t\t\t\tcur = spIn.nextLine();\n\t\t\t\tpicTerm = cur;\n\t\t\t\tcur = spIn.nextLine();\n\t\t\t\twhile(!cur.equals(\"-\"))\n\t\t\t\t{\n\t\t\t\t\tterm += cur;\n\t\t\t\t\tcur = spIn.nextLine();\n\t\t\t\t}\n\t\t\t}\t\n\t\t}", "void mo1927a(NLPResponseData nLPResponseData);", "public static void main(final String[] args)\r\n {\r\n // Set the path to the data files\r\n Dictionary.initialize(\"c:/Program Files/WordNet/2.1/dict\");\r\n \r\n // Get an instance of the Dictionary object\r\n Dictionary dict = Dictionary.getInstance();\r\n \r\n // Declare a filter for all terms starting with \"car\", ignoring case\r\n TermFilter filter = new WildcardFilter(\"car*\", true);\r\n \r\n // Get an iterator to the list of nouns\r\n Iterator<IndexTerm> iter = \r\n dict.getIndexTermIterator(PartOfSpeech.NOUN, 1, filter);\r\n \r\n // Go over the list items\r\n while (iter.hasNext())\r\n {\r\n // Get the next object\r\n IndexTerm term = iter.next();\r\n \r\n // Write out the object\r\n System.out.println(term.toString());\r\n \r\n // Write out the unique pointers for this term\r\n int nNumPtrs = term.getPointerCount();\r\n if (nNumPtrs > 0)\r\n {\r\n // Print out the number of pointers\r\n System.out.println(\"\\nThis term has \" + Integer.toString(nNumPtrs) +\r\n \" pointers\");\r\n \r\n // Print out all of the pointers\r\n String[] ptrs = term.getPointers();\r\n for (int i = 0; i < nNumPtrs; ++i)\r\n {\r\n String p = Pointer.getPointerDescription(term.getPartOfSpeech(), ptrs[i]);\r\n System.out.println(ptrs[i] + \": \" + p);\r\n }\r\n }\r\n \r\n // Get the definitions for this term\r\n int nNumSynsets = term.getSynsetCount();\r\n if (nNumSynsets > 0)\r\n {\r\n // Print out the number of synsets\r\n System.out.println(\"\\nThis term has \" + Integer.toString(nNumSynsets) +\r\n \" synsets\");\r\n \r\n // Print out all of the synsets\r\n Synset[] synsets = term.getSynsets();\r\n for (int i = 0; i < nNumSynsets; ++i)\r\n {\r\n System.out.println(synsets[i].toString());\r\n }\r\n }\r\n }\r\n \r\n System.out.println(\"Demo processing finished.\");\r\n }", "@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 }", "private static String handlePhrases(String PubmedQuery) {\r\n //Find phrases \"between double quotes\"\r\n String[] phrases = PubmedQuery.split(\"\\\"\");\r\n for(int i = 0 ; i < phrases.length ; i++){\r\n phrases[i] = phrases[i].trim();\r\n if(!phrases[i].equals(\"\")){ // String not Empty\r\n if(i%2 != 0){ // String surrounded by quotes, i.e. a phrase\r\n phrases[i] = \"\\\"\" + phrases[i] + \"\\\"\";\r\n } else { // not a phrase, i.e. a bag of terms, operator or [field of index] (inside brackets)\r\n if(phrases[i].startsWith(\"[\")){ //index field of previus component contained (i.e. case: \"...\"[...])\r\n boolean perviusPhraseFound = false; // True if index field was added to previus phrase element\r\n // Get index field of previus component and handle proprietly\r\n String [] tokens = phrases[i].split(\"]\");\r\n String indexField = tokens[0].replace(\"[\", \"\");\r\n String luceneField = supportedIndexFields.get(indexField);\r\n if(luceneField != null){ \r\n //add \"indexField:\" as a prefix in previus (not empty) phrase\r\n int tmp = i-1;\r\n while(!perviusPhraseFound & tmp >= 0){\r\n if(!phrases[tmp].equals(\"\")){\r\n perviusPhraseFound = true;\r\n //TO DO : handle wrong syntax (e.g. ... AND [ArticleTitle])\r\n phrases[tmp] = luceneField + \":\" + phrases[tmp] + \"\";\r\n } else {\r\n tmp--;\r\n }\r\n }\r\n } // else : Lucene counterpart not found, unsupported field - do nothing\r\n // Remove from current phrase this index field (prefix)\r\n phrases[i] = phrases[i].substring(indexField.length()+2 );\r\n } \r\n // Further handling...\r\n phrases[i] = handleNonPhraseToken(phrases[i]);\r\n }\r\n } //else { /* Empty token, do nothing with this */ System.out.println(\"\\t\\t\\t empty\"); }\r\n }\r\n \r\n String luceneQuery = \"\";\r\n boolean fisrtPhrase = true;\r\n for(int i = 0 ; i < phrases.length ; i ++){\r\n if(phrases[i].length() > 0){\r\n if(!phrases[i].startsWith(\" OR \") & !phrases[i].startsWith(\" -\") & !phrases[i].startsWith(\" +\") ){\r\n if(fisrtPhrase){\r\n luceneQuery += \" +\";\r\n fisrtPhrase = false;\r\n } else {\r\n if(!phrases[i-1].endsWith(\" OR \") & !phrases[i-1].endsWith(\" -\") & !phrases[i-1].endsWith(\" +\")){\r\n luceneQuery += \" +\";\r\n }\r\n } \r\n } // add default operator + when required (no OR or - is present for that term)\r\n luceneQuery += phrases[i];\r\n }// else empty phrase : skip\r\n }\r\n return luceneQuery;\r\n }", "public Keyword(String word, int rank){\n this.keyword = word;\n this.rank = rank;\n this.decomplist = new ArrayList<Decomposition>();\n }", "@Test\n void testExample1() {\n List<Token> input = Arrays.asList(\n new Token(Token.Type.IDENTIFIER, \"LET\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \":\", -1),\n new Token(Token.Type.IDENTIFIER, \"INTEGER\", -1),\n new Token(Token.Type.OPERATOR, \"=\", -1),\n new Token(Token.Type.INTEGER, \"1\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"WHILE\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"!=\", -1),\n new Token(Token.Type.INTEGER, \"10\", -1),\n new Token(Token.Type.IDENTIFIER, \"DO\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"PRINT\", -1),\n new Token(Token.Type.OPERATOR, \"(\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \")\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"=\", -1),\n new Token(Token.Type.IDENTIFIER, \"first\", -1),\n new Token(Token.Type.OPERATOR, \"+\", -1),\n new Token(Token.Type.INTEGER, \"1\", -1),\n new Token(Token.Type.OPERATOR, \";\", -1),\n\n new Token(Token.Type.IDENTIFIER, \"END\", -1)\n );\n Ast.Source expected = new Ast.Source(Arrays.asList(\n new Ast.Statement.Declaration(\"first\", \"INTEGER\",\n Optional.of(new Ast.Expression.Literal(BigInteger.valueOf(1)))),\n new Ast.Statement.While(\n new Ast.Expression.Binary(\"!=\",\n new Ast.Expression.Variable(\"first\"),\n new Ast.Expression.Literal(BigInteger.valueOf(10))\n ),\n Arrays.asList(\n new Ast.Statement.Expression(\n new Ast.Expression.Function(\"PRINT\", Arrays.asList(\n new Ast.Expression.Variable(\"first\"))\n )\n ),\n new Ast.Statement.Assignment(\"first\",\n new Ast.Expression.Binary(\"+\",\n new Ast.Expression.Variable(\"first\"),\n new Ast.Expression.Literal(BigInteger.valueOf(1))\n )\n )\n )\n )\n ));\n test(input, expected, Parser::parseSource);\n }", "@Override\r\npublic Object produceValue(Annotation np, Document doc)\r\n{\n SortedSet<Integer> quoteLocations = new TreeSet<Integer>();\r\n Pattern p = Pattern.compile(\"\\\"|''|``|\\u201C|\\u201D\");\r\n\r\n String text = doc.getText();\r\n Matcher m = p.matcher(text);\r\n\r\n boolean inQuote = false;\r\n while (m.find()) {\r\n int start = m.start();\r\n if (inQuote && (text.substring(start).startsWith(\"``\") || text.substring(start).startsWith(\"\\u201C\"))) {\r\n // We have an opening quote; Make sure the previous quote is closed\r\n quoteLocations.add((start - 1));\r\n inQuote = false;\r\n }\r\n quoteLocations.add((start));\r\n inQuote = !inQuote;\r\n }\r\n // System.out.println(\"Quote locations: \"+quoteLocations);\r\n\r\n // Figure out which noun corresponds to which quote\r\n AnnotationSet sent = doc.getAnnotationSet(Constants.SENT);\r\n Iterator<Integer> quoteIter = quoteLocations.iterator();\r\n HashMap<Integer, Annotation> reporters = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> companies = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> sentReporter = new HashMap<Integer, Annotation>();\r\n HashMap<Integer, Annotation> compReporter = new HashMap<Integer, Annotation>();\r\n int counter = 1;\r\n while (quoteIter.hasNext()) {\r\n int qStart = quoteIter.next();\r\n if (!quoteIter.hasNext()) {\r\n break;\r\n }\r\n int qEnd = quoteIter.next() + 1;\r\n\r\n AnnotationSet sentences = sent.getOverlapping(qStart, qEnd);\r\n\r\n // Three cases for the size of the sentences set\r\n Annotation match, compMatch;\r\n if (sentences.size() < 1) {\r\n System.out.println(\"Quote is not covered by any sentence:\");\r\n int beg = qStart - 15;\r\n beg = beg < 0 ? 0 : beg;\r\n int en = qStart + 15;\r\n en = en >= text.length() ? text.length() - 1 : en;\r\n System.out.println(Utils.getAnnotText(beg, en, text));\r\n System.out.println(\"Position \" + qStart);\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n // throw new RuntimeException(\"Quote is not covered by any sentence\");\r\n }\r\n else if (sentences.size() == 1) {\r\n Annotation s = sentences.getFirst();\r\n // System.out.println(\"Sent: \"+Utils.getAnnotText(s, text));\r\n if (s.properCovers(qStart, qEnd)) {\r\n match = findReporter(qStart, qEnd, s, doc);\r\n compMatch = findCompany(qStart, qEnd, s, doc);\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n }\r\n else {\r\n match = findReportCont(sentReporter, s, doc);\r\n compMatch = findReportCont(compReporter, s, doc);\r\n }\r\n sentReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.decode(s.getAttribute(\"sentNum\")), compMatch);\r\n }\r\n else {\r\n // The quoted string spans more than one sentence.\r\n Annotation beg = sentences.getFirst();\r\n // System.out.println(\"First sent: \"+Utils.getAnnotText(beg, text));\r\n Annotation end = sentences.getLast();\r\n // System.out.println(\"Last sent: \"+Utils.getAnnotText(end, text));\r\n match = Annotation.getNullAnnot();\r\n compMatch = Annotation.getNullAnnot();\r\n if (beg.getStartOffset() < qStart) {\r\n match = findReporter(qStart, qEnd, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, beg, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot()) && qEnd < end.getEndOffset()) {\r\n match = findReporter(qStart, qEnd, end, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n if (match.equals(Annotation.getNullAnnot())) {\r\n match = findReportCont(sentReporter, beg, doc);\r\n compMatch = findCompany(qStart, qEnd, end, doc);\r\n }\r\n sentReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), match);\r\n sentReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), match);\r\n compReporter.put(Integer.parseInt(beg.getAttribute(\"sentNum\")), compMatch);\r\n compReporter.put(Integer.parseInt(end.getAttribute(\"sentNum\")), compMatch);\r\n\r\n }\r\n reporters.put(counter, match);\r\n companies.put(counter, compMatch);\r\n counter += 2;\r\n\r\n // System.out.println(\"Quote: \"+Utils.getAnnotText(qStart, qEnd, text));\r\n // if(!match.equals(Annotation.getNullAnnot())){\r\n // System.out.println(\"Match: \"+Utils.getAnnotText(match, text));\r\n // }else{\r\n // System.out.println(\"no match!\");\r\n // }\r\n }\r\n int initial = quoteLocations.size();\r\n\r\n AnnotationSet nps = doc.getAnnotationSet(Constants.NP);\r\n for (Annotation a : nps.getOrderedAnnots()) {\r\n int s = a.getStartOffset();\r\n quoteLocations = quoteLocations.tailSet(s);\r\n int numQuotes = initial - quoteLocations.size();\r\n\r\n // System.err.println(numQuotes);\r\n if (numQuotes % 2 == 0) {\r\n a.setProperty(this, -1);\r\n a.setProperty(Property.AUTHOR, Annotation.getNullAnnot());\r\n a.setProperty(Property.COMP_AUTHOR, Annotation.getNullAnnot());\r\n }\r\n else {\r\n a.setProperty(this, numQuotes);\r\n a.setProperty(Property.AUTHOR, reporters.get(numQuotes));\r\n a.setProperty(Property.COMP_AUTHOR, companies.get(numQuotes));\r\n // if(FeatureUtils.isPronoun(a, annotations, text)&&FeatureUtils.getPronounPerson(FeatureUtils.getText(a,\r\n // text))==1\r\n // &&FeatureUtils.NumberEnum.SINGLE.equals(FeatureUtils.getNumber(a, annotations, text))){\r\n // Annotation repo = reporters.get(new Integer(numQuotes));\r\n // if(repo==null||repo.equals(Annotation.getNullAnnot())){\r\n // Annotation thisSent = sent.getOverlapping(a).getFirst();\r\n // System.out.println(\"*** No author in \"+Utils.getAnnotText(thisSent, text+\"***\"));\r\n // }\r\n // }\r\n }\r\n }\r\n // System.out.println(\"End of inquote\");\r\n\r\n return np.getProperty(this);\r\n}", "public void makeWord(String inputText,String pageId,createIndex createindex,String contentType)\n {\n int length,i;\n char c;\n boolean linkFound=false;\n int count1,count2,count3,count4,count5,count6,count7,count8,count9;\n\n\n\n StringBuilder word=new StringBuilder();\n // String finalWord=null,stemmedWord=null;\n docId=Integer.parseInt(pageId.trim());\n\n ci=createindex;\n // Stemmer st=new Stemmer();\n //createIndex createindex=new createIndex();\n\n length=inputText.length();\n\n for(i=0;i<length;i++)\n {\n c=inputText.charAt(i);\n if(c<123 && c>96)\n {\n word.append(c);\n }\n\n else if(c=='{')\n {\n if ( i+9 < length && inputText.substring(i+1,i+9).equals(\"{infobox\") )\n {\n\n StringBuilder infoboxString = new StringBuilder();\n\n count1 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n infoboxString.append(c);\n if ( c == '{') {\n count1++;\n }\n else if ( c == '}') {\n count1--;\n }\n if ( count1 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {infoboxString.deleteCharAt(infoboxString.length()-1);}\n break;\n }\n }\n\n processInfobox(infoboxString);\n\n }\n\n else if ( i+8 < length && inputText.substring(i+1,i+8).equals(\"{geobox\") )\n {\n\n StringBuilder geoboxString = new StringBuilder();\n\n count2 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n geoboxString.append(c);\n if ( c == '{') {\n count2++;\n }\n else if ( c == '}') {\n count2--;\n }\n if ( count2 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {geoboxString.deleteCharAt(geoboxString.length()-1);}\n break;\n }\n }\n\n // processGeobox(geoboxString);\n }\n\n else if ( i+6 < length && inputText.substring(i+1,i+6).equals(\"{cite\") )\n {\n\n /*\n * Citations are to be removed.\n */\n\n count3 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '{') {\n count3++;\n }\n else if ( c == '}') {\n count3--;\n }\n if ( count3 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n else if ( i+4 < length && inputText.substring(i+1,i+4).equals(\"{gr\") )\n {\n\n /*\n * {{GR .. to be removed\n */\n\n count4 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '{') {\n count4++;\n }\n else if ( c == '}') {\n count4--;\n }\n if ( count4 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n else if ( i+7 < length && inputText.substring(i+1,i+7).equals(\"{coord\") )\n {\n\n /**\n * Coords to be removed\n */\n\n count5 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n\n if ( c == '{') {\n count5++;\n }\n else if ( c == '}') {\n count5--;\n }\n if ( count5 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n //System.out.println(\"process infobox\");\n }\n else if(c=='[')\n {\n // System.out.println(\"process square brace\");\n\n if ( i+11 < length && inputText.substring(i+1,i+11).equalsIgnoreCase(\"[category:\"))\n {\n\n StringBuilder categoryString = new StringBuilder();\n\n count6 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n categoryString.append(c);\n if ( c == '[') {\n count6++;\n }\n else if ( c == ']') {\n count6--;\n }\n if ( count6 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n if ( c == '=' ) {categoryString.deleteCharAt(categoryString.length()-1);}\n break;\n }\n }\n\n // System.out.println(\"category string=\"+categoryString.toString());\n processCategories(categoryString);\n\n }\n else if ( i+8 < length && inputText.substring(i+1,i+8).equalsIgnoreCase(\"[image:\") ) {\n\n /**\n * Images to be removed\n */\n\n count7 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n if ( c == '[') {\n count7++;\n }\n else if ( c == ']') {\n count7--;\n }\n if ( count7 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n else if ( i+7 < length && inputText.substring(i+1,i+7).equalsIgnoreCase(\"[file:\") ) {\n\n /**\n * File to be removed\n */\n\n count8 = 0;\n for ( ; i < length ; i++ ) {\n\n c = inputText.charAt(i);\n\n if ( c == '[') {\n count8++;\n }\n else if ( c == ']') {\n count8--;\n }\n if ( count8 == 0 || (c == '=' && i+1 < length && inputText.charAt(i+1) == '=')) {\n break;\n }\n }\n\n }\n\n }\n else if(c=='<')\n {\n //System.out.println(\"Process < >\");\n\n if ( i+4 < length && inputText.substring(i+1,i+4).equalsIgnoreCase(\"!--\") ) {\n\n /**\n * Comments to be removed\n */\n\n int locationClose = inputText.indexOf(\"-->\" , i+1);\n if ( locationClose == -1 || locationClose+2 > length ) {\n i = length-1;\n }\n else {\n i = locationClose+2;\n }\n\n }\n else if ( i+5 < length && inputText.substring(i+1,i+5).equalsIgnoreCase(\"ref>\") ) {\n\n /**\n * References to be removed\n */\n int locationClose = inputText.indexOf(\"</ref>\" , i+1);\n if ( locationClose == -1 || locationClose+5 > length ) {\n i = length-1;\n }\n else {\n i = locationClose+5;\n }\n\n }\n else if ( i+8 < length && inputText.substring(i+1,i+8).equalsIgnoreCase(\"gallery\") ) {\n\n /**\n * Gallery to be removed\n */\n int locationClose = inputText.indexOf(\"</gallery>\" , i+1);\n if ( locationClose == -1 || locationClose+9 > length) {\n i = length-1;\n }\n else {\n i = locationClose+9;\n }\n }\n\n }\n else if ( c == '=' && i+1 < length && inputText.charAt(i+1) == '=')\n {\n\n linkFound = false;\n i+=2;\n while ( i < length && ((c = inputText.charAt(i)) == ' ' || (c = inputText.charAt(i)) == '\\t') )\n {\n i++;\n }\n\n if ( i+14 < length && inputText.substring(i , i+14 ).equals(\"external links\") )\n {\n //System.out.println(\"External link found\");\n linkFound = true;\n i+= 14;\n }\n\n }\n else if ( c == '*' && linkFound == true )\n {\n\n //System.out.println(\"Link found\");\n count9 = 0;\n boolean spaceParsed = false;\n StringBuilder link = new StringBuilder();\n while ( count9 != 2 && i < length )\n {\n c = inputText.charAt(i);\n if ( c == '[' || c == ']' )\n {\n count9++;\n }\n if ( count9 == 1 && spaceParsed == true)\n {\n link.append(c);\n }\n else if ( count9 != 0 && spaceParsed == false && c == ' ')\n {\n spaceParsed = true;\n }\n i++;\n }\n\n StringBuilder linkWord = new StringBuilder();\n for ( int j = 0 ; j < link.length() ; j++ )\n {\n char currentCharTemp = link.charAt(j);\n if ( (int)currentCharTemp >= 'a' && (int)currentCharTemp <= 'z' )\n {\n linkWord.append(currentCharTemp);\n }\n else\n {\n\n // System.out.println(\"link : \" + linkWord.toString());\n processLink(linkWord);\n linkWord.setLength(0);\n }\n }\n if ( linkWord.length() > 1 )\n {\n //System.out.println(\"link : \" + linkWord.toString());\n processLink(linkWord);\n linkWord.setLength(0);\n }\n\n }\n else\n {\n if(word.length()>1)\n filterAndAddWord(word,contentType);\n\n word.setLength(0);\n }\n }\n\n\n if(word.length()>1)\n filterAndAddWord(word,contentType);\n\n word.setLength(0);\n /*\n if(word.length()>0)\n {\n finalWord=new String(word);\n if(!(checkStopword(finalWord)))\n {\n st.add(finalWord.toCharArray(),finalWord.length());\n stemmedWord=st.stem();\n\n createindex.addToTreeSet(stemmedWord,docId);\n\n }\n\n word.delete(0, word.length());\n } */\n\n }", "public void buildPredicate(String s){\n\t\tint i = s.indexOf(\"(\");\n\t\tif(i>0){\n\t\t\tname = s.substring(0, i);\n\t\t\tStringTokenizer st = new StringTokenizer(s.substring(i),\"(),\");\n\t\t\twhile(st.hasMoreTokens()){\n\t\t\t\tString tok = st.nextToken();\n\t\t\t\tVarTerm vt = new VarTerm(tok);\n\t\t\t\taddTerm(vt);\n\t\t\t}\n\t\t}\n\t}", "public abstract CharSequence mo2161g();", "@Test(timeout = 4000)\n public void test37() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(u\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n SystemInUtil.addInputLine(\"%I\");\n streamTokenizer0.ordinaryChars((-4), (-4));\n SystemInUtil.addInputLine(\"jsutil>>stringtokenizer\");\n streamTokenizer0.ordinaryChar((-4));\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n stringReader0.reset();\n streamTokenizer1.sval = \"O+{,>!q=l-@]>\";\n SystemInUtil.addInputLine(\"0(u\");\n streamTokenizer1.wordChars(96, (-4));\n JSTerm jSTerm0 = new JSTerm(streamTokenizer1);\n streamTokenizer0.lowerCaseMode(false);\n streamTokenizer0.eolIsSignificant(true);\n streamTokenizer1.quoteChar((-4));\n streamTokenizer0.commentChar((-2));\n SystemInUtil.addInputLine((String) null);\n stringReader0.reset();\n StringReader stringReader1 = new StringReader(\"%I\");\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSPredicateForm jSPredicateForm0 = jSTerm0.applySubstitutionPF((JSSubstitution) null);\n assertEquals(10, jSPredicateForm0.capacity());\n }", "public Lexicon lex()\n/* */ {\n/* 505 */ return new BaseLexicon();\n/* */ }", "public void firstSem10b(){\n chapter = \"firstSem10b\";\n String firstSem10b = \"By the time you get back to your room around 4AM, something's very wrong. Your door appears to have been ripped off its\" +\n \" hinges, and your room is in complete disarray. Dave Grohl has been ripped to tatters, and your roommate's nowhere to be seen.\\n\\t\\\"\"+\n student.getName()+\"!\\\" your RA shouts, running down the hall toward you. \\\"I've been trying to call you...the beast got \"+student.getRmName()\n +\". Just took him. I wanted to stop it, but...you know, I'm anti-violence. You just can't fight hate with hate. Sorry, man.\\\"\";\n getTextIn(firstSem10b);\n }", "private void parseTerm() throws IOException {\r\n\t\tString line;\r\n\t\tTerm newTerm = new Term();\r\n\t\twhile((line=next(0))!=null) {\r\n\t\t\tif(line.startsWith(\"[\"))\r\n\t\t\t\t{\r\n\t\t\t\tthis.buffer=line;\r\n\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tint colon=line.indexOf(':');\r\n\t\t\tif(colon==-1) continue;\r\n\t\t\tif(line.startsWith(\"id:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.id = line.substring(colon+1).trim();\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"name:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.name=nocomment(line.substring(colon+1));\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\tif(line.startsWith(\"namespace:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.namespace=nocomment(line.substring(colon+1));\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\telse if(line.startsWith(\"def:\"))\r\n\t\t\t\t{\r\n\t\t\t\tnewTerm.def=nocomment(line.substring(colon+1));\r\n\t\t\t\tterms.addTerm(newTerm);\r\n\t\t\t\tif (newTerm.namespace.equals(\"molecular_function\")){\r\n\t\t\t\t\tdagMF.addVertex(newTerm);\r\n\t\t\t\t}\r\n\t\t\t\telse if (newTerm.namespace.equals(\"biological_process\")){\r\n\t\t\t\t\tdagBP.addVertex(newTerm);\t\r\n\t\t\t\t}\r\n\t\t\t\telse if (newTerm.namespace.equals(\"cellular_component\")){\r\n\t\t\t\t\tdagCC.addVertex(newTerm);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(\"TERM WAS NOT ADDED, NO NAMESPACE!\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t}\r\n\t}" ]
[ "0.56907034", "0.5470831", "0.5432763", "0.53478014", "0.5224758", "0.51880085", "0.5152516", "0.5137233", "0.5113096", "0.51094174", "0.5101511", "0.5088498", "0.5082556", "0.50765234", "0.5066641", "0.50469834", "0.50427884", "0.50380754", "0.5025703", "0.50013167", "0.49650776", "0.49650776", "0.49559", "0.49481213", "0.49470127", "0.49361646", "0.49323288", "0.49244183", "0.49212274", "0.49133652", "0.4913044", "0.49022385", "0.48745817", "0.48710722", "0.48609057", "0.48562658", "0.4854785", "0.48528558", "0.4848992", "0.48471427", "0.48449063", "0.4837588", "0.48365143", "0.48328155", "0.48206028", "0.4814279", "0.4810262", "0.47993612", "0.47958964", "0.47956812", "0.47839195", "0.47813198", "0.47746897", "0.4770628", "0.47691604", "0.476076", "0.476076", "0.47519872", "0.47432286", "0.47378793", "0.47347453", "0.4733704", "0.47323415", "0.47300568", "0.47290352", "0.4728328", "0.47273108", "0.47233528", "0.4722063", "0.4722063", "0.4722063", "0.47185487", "0.47162995", "0.47081256", "0.47000915", "0.46901792", "0.4679246", "0.4673466", "0.46700007", "0.46699375", "0.46666002", "0.46641496", "0.46487075", "0.46432516", "0.46431285", "0.46396372", "0.46389574", "0.46385428", "0.4637445", "0.46339738", "0.46317032", "0.46295375", "0.4625383", "0.46214473", "0.4618445", "0.4617324", "0.46151927", "0.46144366", "0.46142074", "0.46036178" ]
0.5312614
4
Bug report from Christoph Kunz reification problems and UnsupportedOperationException
public void test_ck_03() { // part A - surprising reification OntModel model1 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM, null); OntModel model2 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM_RULE_INF, null); Individual sub = model1.createIndividual("http://mytest#i1", model1.getProfile().CLASS()); OntProperty pred = model1.createOntProperty("http://mytest#"); Individual obj = model1.createIndividual("http://mytest#i2", model1.getProfile().CLASS()); OntProperty probabilityP = model1.createOntProperty("http://mytest#prob"); Statement st = model1.createStatement(sub, pred, obj); model1.add(st); st.createReifiedStatement().addProperty(probabilityP, 0.9); assertTrue("st should be reified", st.isReified()); Statement st2 = model2.createStatement(sub, pred, obj); model2.add(st2); st2.createReifiedStatement().addProperty(probabilityP, 0.3); assertTrue("st2 should be reified", st2.isReified()); sub.addProperty(probabilityP, 0.3); sub.removeAll(probabilityP).addProperty(probabilityP, 0.3); //!!! // exception // Part B - exception in remove All Individual sub2 = model2.createIndividual("http://mytest#i1", model1.getProfile().CLASS()); sub.addProperty(probabilityP, 0.3); sub.removeAll(probabilityP); //!!! exception sub2.addProperty(probabilityP, 0.3); sub2.removeAll(probabilityP); //!!! exception }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static UnsupportedOperationException getModificationUnsupportedException()\n {\n throw new UnsupportedOperationException(\"Illegal operation. Specified list is unmodifiable.\");\n }", "public UnsupportedCycOperationException() {\n super();\n }", "private void habilitar() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void m9741j() throws cf {\r\n }", "Boolean mo1305n() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "@Override\n protected boolean matchesSafely(ReusableBuffer item) {\n throw new UnsupportedOperationException();\n }", "private void chk() {\n if (clist != null)\n throw new UnsupportedOperationException();\n }", "protected void input_back(){\n throw new UnsupportedOperationException();\n }", "@Override\n\tprotected Object clone() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public void _reportUnsupportedOperation() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Operation not supported by parser of type \");\n sb.append(getClass().getName());\n throw new UnsupportedOperationException(sb.toString());\n }", "@Override\n public boolean isSupported() {\n return true;\n }", "protected UnsupportedCycOperationException(Throwable cause) {\n super(cause);\n }", "@Override\n public boolean isSupported() {\n return true;\n }", "public void remove()\n/* */ {\n/* 99 */ throw new UnsupportedOperationException();\n/* */ }", "protected boolean func_70041_e_() { return false; }", "void m5770d() throws C0841b;", "static void m6826d() {\n throw new NoSuchMethodError();\n }", "void m5771e() throws C0841b;", "Compatibility compatibility();", "public boolean mo1266f() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "@Override\r\n public void remove() throws UnsupportedOperationException {\r\n throw new UnsupportedOperationException(\"Me ei poisteta\");\r\n }", "@Test\n public void test0() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(575,\"org.apache.commons.collections4.iterators.NodeListIteratorEvoSuiteTest.test0\");\n IIOMetadataNode iIOMetadataNode0 = new IIOMetadataNode();\n NodeListIterator nodeListIterator0 = new NodeListIterator((Node) iIOMetadataNode0);\n // Undeclared exception!\n try {\n nodeListIterator0.remove();\n fail(\"Expecting exception: UnsupportedOperationException\");\n \n } catch(UnsupportedOperationException e) {\n //\n // remove() method not supported for an NodeListIterator.\n //\n }\n }", "protected boolean func_70814_o() { return true; }", "@Override\n public void remove() {\n throw new UnsupportedOperationException(); \n }", "public void remove()\n/* */ {\n/* 110 */ throw new UnsupportedOperationException();\n/* */ }", "private void m50366E() {\n }", "void m5769c() throws C0841b;", "private void checkMutability()\n\t{\n\t\tif (immutable)\n\t\t{\n\t\t\tthrow new UnsupportedOperationException(\"Map is immutable\");\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test55() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n String string0 = \"not\";\n jSTerm0.add((Object) \"not\");\n // Undeclared exception!\n try { \n jSTerm0.clonePF();\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // 1 >= 1\n //\n verifyException(\"java.util.Vector\", e);\n }\n }", "private void cargartabla() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\tthrow new UnsupportedOperationException();\r\n\t\t}", "@Override\r\n\t\t\tpublic void remove() {\r\n\t\t\t\tthrow new UnsupportedOperationException();\r\n\t\t\t}", "@Override\n public void func_104112_b() {\n \n }", "zzafe mo29840Y() throws RemoteException;", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "public int zzef() {\n throw new UnsupportedOperationException();\n }", "public UnsupportedOperationException(@NotNull String str) {\n super(str, null);\n Intrinsics.checkParameterIsNotNull(str, \"message\");\n this.b = str;\n }", "private CompareDB () {\n\t\tthrow new UnsupportedOperationException();\n\t}", "@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\t\t\n\t}", "public void mo1972o() throws cf {\r\n }", "void unableToListContents();", "void m5768b() throws C0841b;", "@Override\r\n public boolean removeFirst() {\r\n throw new UnsupportedOperationException(UNSUPPORTED);\r\n }", "@Override\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n\t\t\t}", "public void mo1964g() throws cf {\r\n }", "@SuppressWarnings(\"static-method\")\n\tpublic void open() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public void mo1976s() throws cf {\r\n }", "private void ensureStreamVersion() throws UnsupportedOperationException {\n if (streamVersion != 1 && streamVersion != 3) {\n throw new UnsupportedOperationException(\"Unsupported stream version \" + streamVersion);\n }\n }", "public ConversionNotSupportedException(Object value, Class requiredType, Throwable cause)\r\n/* 14: */ {\r\n/* 15:47 */ super(value, requiredType, cause);\r\n/* 16: */ }", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "protected final boolean isMutable() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.icu.impl.coll.CollationDataBuilder.isMutable():boolean, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.impl.coll.CollationDataBuilder.isMutable():boolean\");\n }", "public boolean method_2434() {\r\n return false;\r\n }", "public boolean method_218() {\r\n return false;\r\n }", "public void mo1962e() throws cf {\r\n }", "@Override\n\tpublic void testCompatibility() {\n\t\tSystem.out.println(\"compatibility test success\");\n\t}", "@Test(expected = UnsupportedOperationException.class)\n public void remove() {\n iterator.next();\n iterator.remove();\n }", "@Override\n int convertBackward(int unused) {\n throw new UnsupportedOperationException();\n }", "public boolean method_216() {\r\n return false;\r\n }", "@Override\n\tpublic void remove() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public boolean method_4132() {\n return false;\n }", "@Override\n public final void remove() {\n throw new UnsupportedOperationException();\n }", "private static boolean m20205b(java.lang.Throwable r3) {\n /*\n r0 = r3\n L_0x0001:\n if (r0 == 0) goto L_0x0015\n boolean r1 = r0 instanceof com.google.android.exoplayer2.upstream.DataSourceException\n if (r1 == 0) goto L_0x0010\n r1 = r0\n com.google.android.exoplayer2.upstream.DataSourceException r1 = (com.google.android.exoplayer2.upstream.DataSourceException) r1\n int r1 = r1.f18593a\n if (r1 != 0) goto L_0x0010\n r2 = 1\n return r2\n L_0x0010:\n java.lang.Throwable r0 = r0.getCause()\n goto L_0x0001\n L_0x0015:\n r1 = 0\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer2.upstream.cache.C8465b.m20205b(java.io.IOException):boolean\");\n }", "public boolean method_4088() {\n return false;\n }", "public boolean method_2453() {\r\n return false;\r\n }", "@Override\n\tpublic boolean isForceLoaded()\n\t{\n\t\tthrow new UnimplementedOperationException();\n\t}", "@Override\n public String toString() {\n throw new UnsupportedOperationException(\"implement me!\");\n }", "@Override\r\n\tpublic MorseCodeTree<String> update() throws UnsupportedOperationException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn null;\r\n\t}", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\n public void remove() {\n throw new UnsupportedOperationException();\n }", "@Override\r\n public boolean remove(Object obj) {\r\n throw new UnsupportedOperationException(UNSUPPORTED);\r\n }", "public boolean method_208() {\r\n return false;\r\n }", "public void mo1974q() throws cf {\r\n }", "@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}", "@Override\n public String writeToString() {\n throw new UnsupportedOperationException();\n }", "@Override\n\t\tpublic void remove() {\n\t\t\tthrow new UnsupportedOperationException();\n\t\t\t// Iterator.super.remove();\n\t\t}", "@Test(expected = UnsupportedOperationException.class)\n public void testCalcDimensions() {\n System.out.println(\"calcDimensions\");\n String msg = \"\";\n AbstractBarcodeBean instance = new AbstractBarcodeBeanImpl();\n instance.calcDimensions(msg);\n }", "@Test(timeout = 4000)\n public void test193() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n // Undeclared exception!\n try { \n errorPage0.id(\"O=V>!a<w512kq\");\n fail(\"Expecting exception: UnsupportedOperationException\");\n \n } catch(UnsupportedOperationException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"java.util.AbstractMap\", e);\n }\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "protected void ensureBufferSpace(int expectedAdditions)\n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }", "private CollectionUtils() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "public void mo1944a() throws cf {\r\n }", "public void remove() throws UnsupportedOperationException {\n\t\t\tthrow new UnsupportedOperationException(\"Myö ei poisteta\");\n\t\t}", "protected UnsupportedCycOperationException(String message, Throwable cause) {\n super(message, cause);\n }", "public int mo1265e() {\n throw new UnsupportedOperationException(getClass().getSimpleName());\n }", "zzang mo29839S() throws RemoteException;", "static /* synthetic */ boolean m1-get1(android.widget.ColorListView r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00ef in method: android.widget.ColorListView.-get1(android.widget.ColorListView):boolean, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.ColorListView.-get1(android.widget.ColorListView):boolean\");\n }", "public boolean method_210() {\r\n return false;\r\n }", "public boolean method_4093() {\n return false;\n }", "public final void mo51373a() {\n }", "@Override\n public void refresh() {\n throw new UnsupportedOperationException(\"operation not supported\");\n }", "public void remove(){\r\n\t\t\tthrow new UnsupportedOperationException();\r\n\t\t}", "protected int handlePrevious(int position) {\n/* 289 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public A force_get()\n {\n throw new UnsupportedOperationException();\n }", "public void method_4270() {}", "@Test\n public void test07() throws Throwable {\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\"Jf)%}s\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) subCategoryAxis0);\n StandardEntityCollection standardEntityCollection0 = new StandardEntityCollection();\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n PlotRenderingInfo plotRenderingInfo0 = chartRenderingInfo0.getPlotInfo();\n CategoryTextAnnotation categoryTextAnnotation0 = new CategoryTextAnnotation(\"The renderer has changed and I don't know what to do!\", (Comparable) \"Jf)%}s\", 473.308516391);\n categoryTextAnnotation0.setValue(473.308516391);\n boolean boolean0 = standardEntityCollection0.equals(categoryTextAnnotation0);\n SynthListUI synthListUI0 = new SynthListUI();\n JList<Object> jList0 = null;\n // Undeclared exception!\n try { \n synthListUI0.indexToLocation((JList) null, 0);\n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"javax.swing.plaf.basic.BasicListUI\", e);\n }\n }", "protected CharSequence convertSelectionToString(Object selectedItem) {\n/* 487 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean add(Object o) {\r\n throw new com.chimu.jdk12.java.lang.UnsupportedOperationException(); //UnsupportedOperationException();\r\n }", "public UnsupportedCycOperationException(String message) {\n super(message);\n }" ]
[ "0.64473635", "0.63682926", "0.6118292", "0.61031723", "0.60034883", "0.5965616", "0.5920582", "0.5846466", "0.5803184", "0.5798667", "0.5782967", "0.5756689", "0.57469153", "0.5745526", "0.5745228", "0.5739288", "0.5733269", "0.57009196", "0.5700593", "0.56943333", "0.56925875", "0.5692555", "0.5680749", "0.56697774", "0.5666926", "0.56666124", "0.5652777", "0.56087667", "0.56020474", "0.5600356", "0.5596126", "0.5583278", "0.5578112", "0.55760556", "0.55682945", "0.55682945", "0.55682945", "0.55625814", "0.55579543", "0.5548284", "0.5543167", "0.5543167", "0.5536916", "0.5528878", "0.5528214", "0.55197257", "0.5513341", "0.5512432", "0.5506954", "0.5499106", "0.54973555", "0.5494595", "0.5494267", "0.54866385", "0.5484832", "0.5481166", "0.54794765", "0.5477827", "0.54760456", "0.5472425", "0.54652244", "0.54589176", "0.54581976", "0.54498553", "0.54497814", "0.54485583", "0.5440681", "0.54362416", "0.5426546", "0.542447", "0.541778", "0.541778", "0.5416144", "0.5405252", "0.5401444", "0.53885114", "0.53876525", "0.5383319", "0.53828967", "0.53815925", "0.5374151", "0.53716964", "0.53702193", "0.53682613", "0.5363971", "0.5345722", "0.53448343", "0.5344143", "0.5334744", "0.5323503", "0.5302319", "0.52972203", "0.52949697", "0.52827656", "0.5279251", "0.5278523", "0.52775323", "0.5274863", "0.5273449", "0.52724606", "0.52679" ]
0.0
-1
Problem reported by Andy Seaborne combine abox and tbox in RDFS with ontmodel
public void test_afs_01() { String sourceT = "<rdf:RDF " + " xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'" + " xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'" + " xmlns:owl=\"http://www.w3.org/2002/07/owl#\">" + " <owl:Class rdf:about='http://example.org/foo#A'>" + " </owl:Class>" + "</rdf:RDF>"; String sourceA = "<rdf:RDF " + " xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'" + " xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' " + " xmlns:owl=\"http://www.w3.org/2002/07/owl#\">" + " <rdf:Description rdf:about='http://example.org/foo#x'>" + " <rdf:type rdf:resource='http://example.org/foo#A' />" + " </rdf:Description>" + "</rdf:RDF>"; Model tBox = ModelFactory.createDefaultModel(); tBox.read(new ByteArrayInputStream(sourceT.getBytes()), "http://example.org/foo"); Model aBox = ModelFactory.createDefaultModel(); aBox.read(new ByteArrayInputStream(sourceA.getBytes()), "http://example.org/foo"); Reasoner reasoner = ReasonerRegistry.getOWLReasoner(); reasoner = reasoner.bindSchema(tBox); OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM_RULE_INF); spec.setReasoner(reasoner); OntModel m = ModelFactory.createOntologyModel(spec, aBox); List inds = new ArrayList(); for (Iterator i = m.listIndividuals(); i.hasNext();) { inds.add(i.next()); } assertTrue("x should be an individual", inds.contains(m.getResource("http://example.org/foo#x"))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BoxModel getModel(int metadata)\r\n/* 121: */ {\r\n/* 122:127 */ ForgeDirection dir = ForgeDirection.getOrientation(metadata);\r\n/* 123:128 */ BoxModel boxes = new BoxModel();\r\n/* 124:129 */ float w = 0.125F;\r\n/* 125:130 */ boxes.add(new Box(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.0625F, 0.9375F).rotateToSide(dir).setTextureSides(new Object[] { Integer.valueOf(dir.ordinal()), nodeBase }));\r\n/* 126:131 */ boxes.add(new Box(0.1875F, 0.0625F, 0.1875F, 0.8125F, 0.25F, 0.8125F).rotateToSide(dir));\r\n/* 127:132 */ boxes.add(new Box(0.3125F, 0.25F, 0.3125F, 0.6875F, 0.375F, 0.6875F).rotateToSide(dir));\r\n/* 128:133 */ boxes.add(new Box(0.375F, 0.25F, 0.375F, 0.625F, 0.375F, 0.625F).rotateToSide(dir).setTexture(nodeBase).setAllSideInvisible().setSideInvisible(new Object[] { Integer.valueOf(dir.getOpposite().ordinal()), Boolean.valueOf(false) }));\r\n/* 129:134 */ return boxes;\r\n/* 130: */ }", "private BioMightBoundBoxes setupDefaultBoundBoxes() \r\n\t{\r\n\t\t// Set up the collection to hold the Bounding Boxes\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize a BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize a Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = null;\r\n\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT FOOT BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-65.0);\r\n\t\tzPos= new BigDecimal(3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(-2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftFootRef, bioBoundBox);\r\n\t\r\n\t\r\n\t\t//********************************************************************* er\r\n\t\t// RIGHT CNEMES BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Foot\r\n\t\t// On a porportioned human, the \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-14.0);\r\n\t\tzPos= new BigDecimal(-3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Foot Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightFootRef, bioBoundBox);\r\n\t\r\n\t\t// return the collection that holds both foot bound boxes\r\n\t\treturn (bioBoundBoxes);\r\n\t}", "@org.junit.Test\n\tpublic void testRDF_NOTOX() throws Exception {\n\t\tString file = \"D:/src-toxbank/isa-tab-files/NOTOX-APAP-Tx 12-nov-2013/NOTOX-APAP-Tx\";\n\t\t//String file = \"D:/src-toxbank/isa-tab-files/NOTOX-APAP-Ex 12-nov-2013/NOTOX-APAP-Ex\";\n\t\t//String file = \"D:/src-toxbank/isa-tab-files/NOTOX-APAP-Px 12-nov-2013/NOTOX-APAP-Px\";\n\t\t//String file = \"D:/src-toxbank/isa-tab-files/NOTOX-APAP-Ex_archive 6-dec-2013\";\n\t\t//String file = \"D:/src-toxbank/isa-tab-files/TG-GATES_archive\";\n\t\t//String file = \"D:/src-toxbank/isa-tab-files/D-IMU-1_archive\";\n\t\t\n\t\tModel model = testRDF(new File(file));\n\t\t\n\t\t\n\t\t//Model model = testRDF(\"toxbank//LCMSMS_archive\");\n\t\ttestKeywords(model, 4);\n\t\t//testTitleAndAbstract(model);\n\t\t//testToxBankResources(model,1);\n\t\t//testRetrieveAllToxbankProtocols(model);\n\t\t//testRetrieveAllProtocols(model,10);\n\t\t//testRetrieveAllStudiesAndProtocols(model);\n\t\t//testToxbankHasProtocol(model,11);\n\t\t//testToxbankHasAuthor(model,1);\n\t\t//testToxbankHasProject(model,1);\n\t\t//JsonNode root = testGraph(model, 14,\"toxbank//NOTOX-APAP-Tx\");\n\t\t//model.write(System.out,\"N3\");\n\t\tmodel.close();\n\t}", "private static void jbptTest2() throws FileNotFoundException, Exception {\n\t\tFile folder = new File(\"models\");\n\t\t\n\t\tFile[] arModels = folder.listFiles(new FileUtil().getFileter(\"pnml\"));\n\t\tfor(File file: arModels)\n\t\t{\n\t\t\t//print the file name\n\t\t\tSystem.out.println(\"========\" + file.getName() + \"========\");\n\n\t\t\t//initialize the counter for conditions and events\n\t\t\tAbstractEvent.count = 0;\n\t\t\tAbstractCondition.count = 0;\n\n\t\t\t//get the file path\n\t\t\tString filePrefix = file.getPath();\n\t\t\tfilePrefix = filePrefix.substring(0, filePrefix.lastIndexOf('.'));\n\t\t\tString filePNG = filePrefix + \".png\";\n\t\t\tString fileCPU = filePrefix + \"-cpu.png\";\n\t\t\tString fileNet = filePrefix + \"-cpu.pnml\";\n\n\t\t\tPnmlImport pnmlImport = new PnmlImport();\n\t\t\tPetriNet p1 = pnmlImport.read(new FileInputStream(file));\n\n\t\t\t// ori\n\t\t\t/*ProvidedObject po1 = new ProvidedObject(\"petrinet\", p1);\n\t\t\t\n\t\t\tDotPngExport dpe1 = new DotPngExport();\n\t\t\tOutputStream image1 = new FileOutputStream(filePNG);\n\t\t\t\n\t\t\tdpe1.export(po1, image1);*/\n\n\t\t\tNetSystem ns = PetriNetConversion.convert(p1);\n\t\t\tProperCompletePrefixUnfolding cpu = new ProperCompletePrefixUnfolding(ns);\n\t\t\tNetSystem netPCPU = PetriNetConversion.convertCPU2NS(cpu);\n\t\t\t// cpu\n\t\t\tPetriNet p2 = PetriNetConversion.convert(netPCPU);\n\t\t\t\n\t\t\tProvidedObject po2 = new ProvidedObject(\"petrinet\", p2);\n\t\t\tDotPngExport dpe2 = new DotPngExport();\n\t\t\tOutputStream image2 = new FileOutputStream(fileCPU);\n\t\t\tdpe2.export(po2, image2);\n//\t\t\t\n\t\t\tExport(p2, fileNet);\n//\t\t\t// net\n//\t\t\tNetSystem nsCPU = PetriNetConversion.convertCPU2NS(cpu);\n//\t\t\tPetriNet pnCPU = PetriNetConversion.convertNS2PN(nsCPU);\n//\t\t\tProvidedObject po3 = new ProvidedObject(\"petrinet\", pnCPU);\n//\t\t\tDotPngExport dpe3 = new DotPngExport();\n//\t\t\tOutputStream image3 = new FileOutputStream(fileNet);\n//\t\t\tdpe3.export(po3, image3);\n\t\t}\n\t\t\tSystem.exit(0);\n\t}", "private BioMightBoundBox setupDefaultBoundBox(String parentID) \r\n\t{\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\t\r\n\t\t\r\n\t\t//**********************************************************************\r\n\t\t// ARMS BOUND BOX\t\t\r\n\t\t//\r\n\t\t// Set up the Bounding Box for the Arms\r\n\t\t// For default model, length of arms is 4.5\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-15.0);\r\n\t\tzPos= new BigDecimal(-5.0);\r\n\t\r\n\t\txVector= new BigDecimal(11.5);\r\n\t\tyVector= new BigDecimal(6.0); \r\n\t\tzVector= new BigDecimal(5.0);\r\n\t\t\r\n\t\t// Setup the boundbox\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\t// Set up its connectors\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t//********************************************\r\n\t\t// ARM - ORGAN CONNECTORS\r\n\t\t//********************************************\r\n\t\r\n\t\t// EpitheliumTissue Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\r\n\t\t//********************************************\t\r\n\t\t// ARMS - VASCULAR CONNECTORS \r\n\t\t//********************************************\r\n\t\r\n\t\t// InternalCarotidArteryEpithelium\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"InternalCarotidArteryEpithelium\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"InternalCarotidArteryEpithelium\", bioMightConnector);\r\n\t\r\n\t\t// ExternalCarotidArteryEpithelium \r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"ExternalCarotidArteryEpithelium\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"ExternalCarotidArteryEpithelium\", bioMightConnector);\r\n\t\r\n\t\t//********************************************\r\n\t\t// ARMS - MUSCULAR CONNECTORS\r\n\t\t//********************************************\r\n\r\n\t\r\n\t\t//********************************************\r\n\t\t// ARMS - SKELETAL CONNECTORS\r\n\t\t//********************************************\r\n\r\n\t\t// ThoracicVertebrae T6 \r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -5.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"CervicalVertebrae\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"CervicalVertebrae\", bioMightConnector);\r\n\t\t\r\n\t\t\r\n\t\t// Stuff the Connectors into the Bounding Box \r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\treturn (bioBoundBox);\t\r\n\t}", "protected void boxOfMortys() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(-10, -10, 0);\n pos2 = new Triple(110, -10, 0);\n pos3 = new Triple(110, -10, 120);\n pos4 = new Triple(-10, -10, 120);\n pos5 = new Triple(-10, 110, 0);\n pos6 = new Triple(110, 110, 0);\n pos7 = new Triple(110, 110, 120);\n pos8 = new Triple(-10, 110, 120);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, 1, 0),\n new Vertex(pos3, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos5, 1, 0),\n new Vertex(pos8, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos3, 0, 1),\n new Vertex(pos2, 0, 0),\n 22 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos8, 0, 1),\n new Vertex(pos5, 0, 0),\n 22 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }", "public void test_ck_02() {\n OntModel vocabModel = ModelFactory.createOntologyModel();\n ObjectProperty p = vocabModel.createObjectProperty(\"p\");\n OntClass A = vocabModel.createClass(\"A\");\n \n OntModel workModel = ModelFactory.createOntologyModel();\n Individual sub = workModel.createIndividual(\"uri1\", A);\n Individual obj = workModel.createIndividual(\"uri2\", A);\n workModel.createStatement(sub, p, obj);\n }", "private G4Box buildMAPMT(String mapmtName) {\n\n \t\n G4Box MAPMTVolume = new G4Box(mapmtName, MAPMT_dx, MAPMT_dy, MAPMT_dz);\n\n //Aluminum walls of MAPMT\n G4Box AluminumLeft = new G4Box(\"AlLeft_\" + mapmtName, MAPMTWall_thickness / 2, MAPMT_dy - MAPMTWall_thickness, MAPMT_dz);\n AluminumLeft.translate(MAPMT_dx - MAPMTWall_thickness / 2, 0, 0);\n AluminumLeft.setMother(MAPMTVolume);\n\n G4Box AluminumRight = new G4Box(\"AlRight_\" + mapmtName, MAPMTWall_thickness / 2, MAPMT_dy - MAPMTWall_thickness, MAPMT_dz);\n AluminumRight.translate(-MAPMT_dx + MAPMTWall_thickness / 2, 0, 0);\n AluminumRight.setMother(MAPMTVolume);\n\n G4Box AluminumTop = new G4Box(\"AlTop_\" + mapmtName, MAPMT_dx, MAPMTWall_thickness / 2, MAPMT_dz);\n AluminumTop.translate(0, MAPMT_dy - MAPMTWall_thickness / 2, 0);\n AluminumTop.setMother(MAPMTVolume);\n\n G4Box AluminumBottom = new G4Box(\"AlBottom_\" + mapmtName, MAPMT_dx, MAPMTWall_thickness / 2, MAPMT_dz);\n AluminumBottom.translate(0, -MAPMT_dy + MAPMTWall_thickness / 2, 0);\n AluminumBottom.setMother(MAPMTVolume);\n\n //window\n G4Box Window = new G4Box(\"Window_\" + mapmtName, MAPMT_dx - MAPMTWall_thickness, MAPMT_dy - MAPMTWall_thickness, MAPMTWindow_thickness / 2);\n Window.translate(0, 0, -MAPMT_dz + MAPMTWindow_thickness / 2);\n Window.setMother(MAPMTVolume);\n\n //photocathode\n G4Box Photocathode = new G4Box(\"Photocathode_\" + mapmtName, MAPMTPhotocathode_side / 2, MAPMTPhotocathode_side / 2, MAPMTPhotocathode_thickness / 2);\n Photocathode.translate(0, 0, -MAPMT_dz + MAPMTWindow_thickness + MAPMTPhotocathode_thickness / 2);\n Photocathode.setMother(MAPMTVolume);\n // add the photocatodes to the list\n photocatodes.add(Photocathode);\n \n //socket\n G4Box Socket = new G4Box(\"Socket_\" + mapmtName, MAPMT_dx - MAPMTWall_thickness, MAPMT_dy - MAPMTWall_thickness, MAPMTSocket_thickness / 2);\n Socket.translate(0, 0, MAPMT_dz - MAPMTSocket_thickness / 2);\n Socket.setMother(MAPMTVolume);\n\n return MAPMTVolume;\n }", "@Override\r\n protected void computeBox ()\r\n {\r\n // Stem or similar info\r\n Rectangle newBox = new Rectangle(getTailLocation());\r\n newBox.add(getHeadLocation());\r\n\r\n // Each and every note\r\n for (TreeNode n : getNotes()) {\r\n Note note = (Note) n;\r\n\r\n newBox.add(note.getBox());\r\n }\r\n\r\n setBox(newBox);\r\n }", "public BoxModel getEnergyModel()\r\n/* 111: */ {\r\n/* 112:118 */ BoxModel boxes = new BoxModel();\r\n/* 113:119 */ boxes.add(new Box(0.1875F, 0.3125F, 0.3125F, 0.8125F, 0.6875F, 0.6875F));\r\n/* 114:120 */ boxes.add(new Box(0.3125F, 0.1875F, 0.3125F, 0.6875F, 0.8125F, 0.6875F));\r\n/* 115:121 */ boxes.add(new Box(0.3125F, 0.3125F, 0.1875F, 0.6875F, 0.6875F, 0.8125F));\r\n/* 116:122 */ boxes.add(new Box(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F));\r\n/* 117:123 */ return boxes;\r\n/* 118: */ }", "private void initializeTBoxAxioms(Set<OWLSubClassOfAxiom> normalizedAxioms) {\n\t\tfor (OWLSubClassOfAxiom axiom : normalizedAxioms) {\n\t\t\tOWLClassExpression subClass = axiom.getSubClass();\n\t\t\tOWLClassExpression superClass = axiom.getSuperClass();\n\n\t\t\tif ((subClass.getClassExpressionType().equals(ClassExpressionType.OBJECT_INTERSECTION_OF)\n\t\t\t\t\t\t|| subClass.getClassExpressionType().equals(ClassExpressionType.OWL_CLASS) || subClass.isOWLThing())\n\t\t\t\t\t\t&& (superClass.getClassExpressionType().equals(ClassExpressionType.OBJECT_UNION_OF)\n\t\t\t\t\t\t\t\t\t|| superClass.getClassExpressionType().equals(ClassExpressionType.OWL_CLASS) || superClass.isOWLNothing())) {\n\n\t\t\t\tif (subClass.getClassExpressionType().equals(ClassExpressionType.OBJECT_INTERSECTION_OF))\n\t\t\t\t\tfor (OWLClassExpression conjunct : subClass.asConjunctSet())\n\t\t\t\t\t\tif (!conjunct.getClassExpressionType().equals(ClassExpressionType.OWL_CLASS))\n\t\t\t\t\t\t\tSystem.out.println(\"WARNING!!! Unrecognized OBJECT_INTERSECTION_OF subclass at initializeTBoxAxioms at NFSRIQOntology.java\" + \"\\n\" + \" -> \" + axiom\n\t\t\t\t\t\t\t\t\t\t+ \" -> \" + subClass.getClassExpressionType() + \"\\n -> \" + subClass + \"\\n\");\n\n\t\t\t\tif (subClass.getClassExpressionType().equals(ClassExpressionType.OBJECT_UNION_OF))\n\t\t\t\t\tfor (OWLClassExpression disjunct : superClass.asDisjunctSet())\n\t\t\t\t\t\tif (!disjunct.getClassExpressionType().equals(ClassExpressionType.OWL_CLASS))\n\t\t\t\t\t\t\tSystem.out.println(\"WARNING!!! Unrecognized OBJECT_UNION_OF subclass at initializeTBoxAxioms at NFSRIQOntology.java\" + \"\\n\" + \" -> \" + axiom + \" -> \"\n\t\t\t\t\t\t\t\t\t\t+ superClass.getClassExpressionType() + \"\\n -> \" + superClass + \"\\n\");\n\n\t\t\t\tintDisjAxioms.add(axiom);\n\n\t\t\t} else if (subClass.getClassExpressionType().equals(ClassExpressionType.OWL_CLASS)) {\n\n\t\t\t\tswitch (Srd.conceptTypeToString(superClass)) {\n\t\t\t\tcase Srd.allValuesFrom + Srd.className:\n\t\t\t\tcase Srd.allValuesFrom + Srd.bottom:\n\t\t\t\t\t// A sqs forall R.B\n\t\t\t\t\tunivAxioms.add(axiom);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Srd.maxCardinality + Srd.className:\n\t\t\t\tcase Srd.maxCardinality + Srd.top:\n\t\t\t\t\t// A sqs < n R.B\n\t\t\t\t\tmaxCardAxioms.add(axiom);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Srd.minCardinality + Srd.className:\n\t\t\t\tcase Srd.minCardinality + Srd.top:\n\t\t\t\t\t// A sqs > n R.B\n\t\t\t\t\tminCardAxioms.add(axiom);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"WARNING!!! Unrecognized superClass ClassExpressionType at initializeAxioms at NFSRIQOntology.java\" + \"\\n\" + \" -> \" + axiom + \"\\n\" + \" -> \"\n\t\t\t\t\t\t\t\t+ superClass.getClassExpressionType() + \"\\n -> \" + superClass + \"\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t} else\n\t\t\t\tSystem.out.println(\"WARNING!!! Unrecognized type of axiom at initializeTBoxAxioms at NFSRIQOntology.java\" + \"\\n\" + \" -> \" + axiom + \"\\n\");\n\n\t\t}\n\t}", "private static void demo_WordNetOps() throws Exception {\n\n RoWordNet r1, r2, result;\n Synset s;\n Timer timer = new Timer();\n String time = \"\";\n\n IO.outln(\"Creating two RoWN objects R1 and R2\");\n timer.start();\n r1 = new RoWordNet();\n r2 = new RoWordNet();\n\n // adding synsets to O1\n s = new Synset();\n s.setId(\"S1\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L1\"))));\n r1.addSynset(s, false); // adding synset S1 to O2;\n\n s = new Synset();\n s.setId(\"S2\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L2\"))));\n r1.addSynset(s, false); // adding synset S2 to O1;\n\n // adding synsets to O2\n s = new Synset();\n s.setId(\"S1\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L1\"))));\n r2.addSynset(s, false); // adding synset S1 to O2;\n\n s = new Synset();\n s.setId(\"S2\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L4\"))));\n r2.addSynset(s, false); // adding synset S2 to O2, but with literal L4\n // not L2;\n\n s = new Synset();\n s.setId(\"S3\");\n s.setLiterals(new ArrayList<Literal>(asList(new Literal(\"L3\"))));\n r2.addSynset(s, false); // adding synset S3 to O2;\n time = timer.mark();\n\n // print current objects\n IO.outln(\"\\n Object R1:\");\n for (Synset syn : r1.synsets) {\n IO.outln(syn.toString());\n }\n\n IO.outln(\"\\n Object R2:\");\n for (Synset syn : r2.synsets) {\n IO.outln(syn.toString());\n }\n IO.outln(\"Done: \" + time);\n\n // DIFFERENCE\n IO.outln(\"\\nOperation DIFFERENCE(R1,R2) (different synsets in R1 and R2 having the same id):\");\n timer.start();\n String[] diff = Operation.diff(r1, r2);\n time = timer.mark();\n\n for (String id : diff) {\n IO.outln(\"Different synset having the same id in both RoWN objects: \" + id);\n }\n\n IO.outln(\"Done: \" + time);\n\n // UNION\n IO.outln(\"\\nOperation UNION(R1,R2):\");\n timer.start();\n try {\n result = new RoWordNet(r1);// we copy-construct the result object\n // after r1 because the union and merge\n // methods work in-place directly on the\n // first parameter of the methods\n result = Operation.union(result, r2);\n IO.outln(\" Union object:\");\n for (Synset syn : result.synsets) {\n IO.outln(syn.toString());\n }\n } catch (Exception ex) {\n IO.outln(\"Union operation failed (as it should, as synset S2 is in both objects but has a different literal and are thus two different synsets having the same id that cannot reside in a single RoWN object). \\nException message: \" + ex\n .getMessage());\n }\n IO.outln(\"Done: \" + timer.mark());\n\n // MERGE\n IO.outln(\"\\nOperation MERGE(R1,R2):\");\n\n result = new RoWordNet(r1);\n timer.start();\n result = Operation.merge(result, r2);\n time = timer.mark();\n\n IO.outln(\" Merged object (R2 overwritten on R1):\");\n for (Synset syn : result.synsets) {\n IO.outln(syn.toString());\n }\n IO.outln(\"Done: \" + time);\n\n // COMPLEMENT\n IO.outln(\"\\nOperation COMPLEMENT(R2,R1) (compares only synset ids):\");\n timer.start();\n String[] complement = Operation.complement(r2, r1);\n time = timer.mark();\n IO.outln(\" Complement ids:\");\n for (String id : complement) {\n IO.outln(\"Synset that is in R2 but not in R1: \" + id);\n }\n IO.outln(\"Done: \" + timer.mark());\n\n // INTERSECTION\n IO.outln(\"\\nOperation INTERSECTION(R1,R2) (fully compares synsets):\");\n timer.start();\n String[] intersection = Operation.intersection(r1, r2);\n time = timer.mark();\n IO.outln(\" Intersection ids:\");\n for (String id : intersection) {\n IO.outln(\"Equal synset in both R1 and R2: \" + id);\n }\n IO.outln(\"Done: \" + timer.mark());\n\n // IO.outln(((Synset) r1.getSynsetById(\"S1\")).equals((Synset)\n // r2.getSynsetById(\"S1\")));\n\n }", "public static void main(String[] args) throws Exception {\n\t\t\n\n BufferedReader reader = new BufferedReader(new FileReader(\"src/main/resources/example/ontologytemp.owl\"));\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"src/main/resources/example/test.owl\"));\n\t\t\n\t\t\n\t\t/*File owl = new File(\"/Users/user/Dropbox/Thesis/OntopCLIfiles/ontology5.owl\");\n File obda = new File(\"/Users/user/Dropbox/Thesis/OntopCLIfiles/ontology-conf.obda\");\n\t\tString baseUri = \"http://www.semanticweb.org/user/ontologies/\";\n\t\tString jdbcUrl = \"jdbc:mysql://localhost/conference10\";\n\t\tString jdbcUserName = \"root\";\n\t\tString jdbcPassword = \"root\";\n\t\tString jdbcDriverClass = \"com.mysql.jdbc.Driver\";\n\t\t\n\t\tDirectMappingBootstrapper dm = new DirectMappingBootstrapper(baseUri, jdbcUrl, jdbcUserName, jdbcPassword, jdbcDriverClass);\n\t\tOBDAModel model = dm.getModel();\n\t\tOWLOntology onto = dm.getOntology();\n\t\tModelIOManager mng = new ModelIOManager(model);\n\t\tmng.save(obda);\n onto.getOWLOntologyManager().saveOntology(onto,\n new FileDocumentTarget(owl));*/\n\t\t\n\t\t\n\t\t/*\n\t\tXFactoryBufferedImpl factory = new XFactoryBufferedImpl();\t\n\t\t\n\t\tXAttribute attr = factory.createAttributeLiteral(\"concept:name\", \"tracevalue\", null); // create attribute for trace\n\t\tXAttributeMap attrMapTrace = new XAttributeMapImpl(); // create a new map attribute\n\t\tattrMapTrace.put(\"concept:name\", attr);\t// put attribute to the map attribute\n\t\tXTrace xtrace = factory.createTrace(attrMapTrace); // create xtrace\n\t\t\n\t\tXAttributeMap attrMap = new XAttributeMapImpl(); // create a new map attribute\n\t\tattr = factory.createAttributeLiteral(\"key1\", \"value\", null); // create attribute\t\t\n\t\t//attr = factory.createAttributeLiteral(\"key2\", \"value\", null); // create attribute\n\t\tattrMap.put(\"key1\", attr); // put attribute to the map attribute\n\t\t//attrMap.put(\"key2\", attr);\n\t\tXEvent xevent = factory.createEvent(attrMap); // create xevent\n\t\txtrace.insertOrdered(xevent); // insert event in correct order in a trace\n\t\t\n\t\tattrMap = new XAttributeMapImpl(); // create a new map attribute\n\t\tattr = factory.createAttributeLiteral(\"key1\", \"value\", null); // create attribute\t\t\n\t\t//attr = factory.createAttributeLiteral(\"key2\", \"value\", null); // create attribute\n\t\tattrMap.put(\"key1\", attr); // put attribute to the map attribute\n\t\t//attrMap.put(\"key2\", attr);\n\t\tXEvent xevent2 = factory.createEvent(attrMap); // create xevent\n\t\t\n\t\tSystem.out.println(xtrace.contains(xevent2));\n\t\t*/\n\t}", "private void bakeItemModels() {\n/* 754 */ Iterator<ResourceLocation> var1 = this.itemLocations.values().iterator();\n/* */ \n/* 756 */ while (var1.hasNext()) {\n/* */ \n/* 758 */ ResourceLocation var2 = var1.next();\n/* 759 */ ModelBlock var3 = (ModelBlock)this.models.get(var2);\n/* */ \n/* 761 */ if (func_177581_b(var3)) {\n/* */ \n/* 763 */ ModelBlock var4 = func_177582_d(var3);\n/* */ \n/* 765 */ if (var4 != null)\n/* */ {\n/* 767 */ var4.field_178317_b = var2.toString();\n/* */ }\n/* */ \n/* 770 */ this.models.put(var2, var4); continue;\n/* */ } \n/* 772 */ if (isCustomRenderer(var3))\n/* */ {\n/* 774 */ this.models.put(var2, var3);\n/* */ }\n/* */ } \n/* */ \n/* 778 */ var1 = this.field_177599_g.values().iterator();\n/* */ \n/* 780 */ while (var1.hasNext()) {\n/* */ \n/* 782 */ TextureAtlasSprite var5 = (TextureAtlasSprite)var1.next();\n/* */ \n/* 784 */ if (!var5.hasAnimationMetadata())\n/* */ {\n/* 786 */ var5.clearFramesTextureData();\n/* */ }\n/* */ } \n/* */ }", "public void drawTree(GUIMain guiMn, MenuDoAction menu, DoNewInsertOpenModel doNewInsertOpenModel) {\n DefaultMutableTreeNode tissueBranch;\n HumanBody body = null;\n\n if (guiMn.simMain.solver == null) {\n System.err.println(\"The model files are not correct\\n\");\n }\n HostModel host = guiMn.simMain.solver.getHostModelToSolve().getHostModel();\n body = host.getPlacentalia();\n Map<Tissue, DefaultMutableTreeNode> ancestor = new HashMap<>();\n if (body.getNumOrganSystems() > 0) {\n Iterator<PhysioSystem> iter = body.getOrganSystems().iterator();\n\n // loop over PhysioSystems (usually there is only one)\n while (iter.hasNext()) {\n PhysioSystem organsys = iter.next();\n NodeLeaf organSystem = new NodeLeaf(organsys, \"./data/images/iconOrganSystem.gif\");\n DefaultMutableTreeNode organBranch = guiMn.simMain.st.addObject(guiMn, organSystem);\n ArrayList<Tissue> tissues = organsys.tissues;\n Iterator<Tissue> tissueIterator = tissues.iterator();\n\n // loop over Tissues in this PhysioSystem\n while (tissueIterator.hasNext()) {\n NodeLeaf leaf = null;\n\n Tissue tiss = tissueIterator.next();\n if (tiss.getName() == null) {\n System.out.println(\"Error null Tissue\");\n }\n NodeLeaf leafTissue = new NodeLeaf(tiss, \"./data/images/iconTissue.gif\");\n tissueBranch = guiMn.simMain.st.addObject(guiMn, organBranch, leafTissue, true);\n ancestor.put(tiss, tissueBranch);\n ArrayList<CompartmentSBML> comps = tiss.getInternVolumes();\n Iterator<CompartmentSBML> compIterator = comps.iterator();\n\n // loop over compartments in this Tissues\n while (compIterator.hasNext()) {\n CompartmentSBML compa = compIterator.next();\n leaf = processComp(guiMn, compa, tissueBranch);\n }\n // Post processing for \"outside\" field\n ArrayList<CompartmentSBML> compbis = tiss.getInternVolumes();\n Iterator<CompartmentSBML> postIterator = compbis.iterator();\n // loop over compartments in this Tissue\n CompartmentSBML compInside;\n while (postIterator.hasNext()) {\n compInside = postIterator.next();\n if(compInside == null)\n {\n System.out.println(\"No id in model: \" + compInside.getName());\n }\n postProcessComp(guiMn, tiss, tissueBranch, compInside);\n }\n // now there are still compartments in root that are at the wrong place\n } // end of Tissue loop\n } // end of Physiological systems loop\n }\n // when a tissue is embedded in another tissue \n careForPartOf(guiMn, ancestor);\n }", "public OWLOntology getModelAbox(IRI id) {\n\t\tModelContainer model = modelMap.get(id);\n\t\tif (model != null) {\n\t\t\treturn model.getAboxOntology();\n\t\t}\n\t\tOWLOntology abox = null;\n\t\ttry {\n\t\t\tabox = loadModelABox(id);\n\t\t} catch (OWLOntologyCreationException e) {\n\t\t\tLOG.info(\"Could not load model with id: \"+id, e);\n\t\t}\n\t\treturn abox;\n\t}", "@Test\n public void readAndApply() {\n StorageDelegator delegator = App.getDelegator();\n Way w = (Way) delegator.getOsmElement(Way.NAME, 210558045L);\n Node n = (Node) delegator.getOsmElement(Node.NAME, 416426220L);\n Relation r = (Relation) delegator.getOsmElement(Relation.NAME, 1638705L);\n\n checkInitialState(delegator);\n\n // apply OSC file\n TestUtils.clickMenuButton(device, \"Transfer\", false, false);\n TestUtils.clickText(device, false, \"File\", false, false);\n TestUtils.clickText(device, false, \"Apply changes from OSC file\", false, false);\n //\n TestUtils.selectFile(device, main, null, OSC_FILE, false);\n\n TestUtils.findText(device, false, \"Loading\", 2000); // spinner appears\n TestUtils.textGone(device, \"Loading\", 10000);// spinner goes away\n\n // check new data state\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Way.NAME, 210558043L));\n Assert.assertEquals(OsmElement.STATE_DELETED, delegator.getApiStorage().getOsmElement(Way.NAME, 210558043L).getState());\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Node.NAME, 2206392996L));\n Assert.assertEquals(OsmElement.STATE_DELETED, delegator.getApiStorage().getOsmElement(Node.NAME, 2206392996L).getState());\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Node.NAME, 2206392994L));\n Assert.assertEquals(OsmElement.STATE_DELETED, delegator.getApiStorage().getOsmElement(Node.NAME, 2206392994L).getState());\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Node.NAME, 2206392992L));\n Assert.assertEquals(OsmElement.STATE_DELETED, delegator.getApiStorage().getOsmElement(Node.NAME, 2206392992L).getState());\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Node.NAME, 2206392993L));\n Assert.assertEquals(OsmElement.STATE_DELETED, delegator.getApiStorage().getOsmElement(Node.NAME, 2206392993L).getState());\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Node.NAME, 2206392996L));\n Assert.assertEquals(OsmElement.STATE_DELETED, delegator.getApiStorage().getOsmElement(Node.NAME, 2206392996L).getState());\n\n // placeholder ids are renumbered on input so we need to find the Way some other way\n List<Way> ways = delegator.getCurrentStorage().getWays(new BoundingBox(8.3891745, 47.3899902, 8.3894486, 47.3901275));\n for (Way way : ways) {\n if (way.getOsmId() < 0) {\n w = way;\n }\n }\n Assert.assertNotNull(w);\n Assert.assertNotNull(delegator.getApiStorage().getOsmElement(Way.NAME, w.getOsmId()));\n Assert.assertEquals(OsmElement.STATE_CREATED, w.getState());\n Assert.assertEquals(4, w.getNodes().size());\n Assert.assertTrue(w.isClosed());\n Assert.assertTrue(w.hasTag(\"name\", \"new\"));\n\n w = (Way) delegator.getApiStorage().getOsmElement(Way.NAME, 210558045L);\n Assert.assertNotNull(w);\n Assert.assertEquals(OsmElement.STATE_MODIFIED, w.getState());\n Assert.assertTrue(w.hasTag(\"addr:housenumber\", \"444\"));\n\n n = (Node) delegator.getApiStorage().getOsmElement(Node.NAME, 416426220L);\n Assert.assertNotNull(n);\n Assert.assertEquals(OsmElement.STATE_MODIFIED, n.getState());\n Assert.assertEquals(47.3898126D, n.getLat() / 1E7D, 0.00000001);\n Assert.assertEquals(8.3894851D, n.getLon() / 1E7D, 0.00000001);\n\n r = (Relation) delegator.getOsmElement(Relation.NAME, 1638705L);\n Assert.assertEquals(OsmElement.STATE_MODIFIED, r.getState());\n Assert.assertNull(r.getMember(Way.NAME, 119104094L));\n\n TestUtils.unlock(device);\n Assert.assertTrue(TestUtils.clickMenuButton(device, context.getString(R.string.undo), false, false));\n TestUtils.clickText(device, false, \"OK\", true, false);\n try {\n Thread.sleep(5000); // NOSONAR\n } catch (InterruptedException e) {\n }\n checkInitialState(delegator);\n }", "@Test\n public void f12AssociateAssetTypeWithModelTest() {\n clickOn(\"#assetTypeMenuBtn\").sleep(2000);\n\n //select second asset type\n Node node = lookup(\"#columnName\").nth(2).query();\n clickOn(node).sleep(1000);\n\n clickOn(\"#associatedModelLabel\").sleep(1000);\n Label label = (Label) scene.getRoot().lookup(\"#associatedModelLabel\");\n String modelBefore = label.getText();\n\n //go to model tab\n clickOn(scene.getRoot().lookup(\"#modelTab\")).sleep(1000);\n FlowPane models = (FlowPane) scene.getRoot().lookup(\"#modelsThumbPane\");\n\n //change to RandomForest\n clickOn(models.getChildren().get(2)).sleep(1000);\n clickOn(\"#modelSaveBtn\").sleep(1000);\n\n node = lookup(\"#columnName\").nth(2).query();\n clickOn(node);\n\n label = (Label) scene.getRoot().lookup(\"#associatedModelLabel\");\n String modelAfter = label.getText();\n\n clickOn(\"#associatedModelLabel\").sleep(3000);\n //model after changing should not be the same\n assertFalse(\"Model after changing is the same as it was before.\", modelBefore.equals(modelAfter));\n }", "public void coupleTypeAction() {\n\t\t\n\t\t//Get arrays of facets\n\t\tObject[] facets = myParent.jobItem.design.frames.toArray();\n\t\t\n\t\tfor (Object f : facets) {\n\t\t\t\n\t\t\t//Facet has vertical and horizontal mullions\n\t\t\tif (((Facet) f).bOpeningObject.mullions.size() > 0 || ((Facet) f).bOpeningObject.mullionsH.size() > 0) {\n\t\t\t\tthis.okToUse = false;\n\t\t\t}\n\t\t\t\n\t\t\t//Facet has background opening internal and vertical and horizontal mullions\n\t\t\tif (((Facet) f).bOpeningObjectIn != null && (((Facet) f).bOpeningObjectIn.mullions.size() > 0 ||\n\t\t\t\t\t\t((Facet) f).bOpeningObjectIn.mullionsH.size() > 0)) {\n\t\t\t\tthis.okToUse = false;\n\t\t\t}\n\t\t\t\n\t\t\t//Facet has background opening output and vertical and horizontal mullions\n\t\t\tif (((Facet) f).bOpeningObjectOut != null && (((Facet) f).bOpeningObjectOut.mullions.size() > 0 ||\n\t\t\t\t\t\t((Facet) f).bOpeningObjectOut.mullionsH.size() > 0)) {\n\t\t\t\tthis.okToUse = false;\n\t\t\t}\n\t\t\t\n\t\t\t//Get array of frames from facet\n\t\t\tObject[] frames = ((Facet) f).frames.toArray();\n\t\t\t\n\t\t\tfor (Object ff : frames) {\n\t\t\t\t\n\t\t\t\t//Axis x columns or Axis y columns is more than one\n\t\t\t\tif (((Frame) ff).xCols > 1 || ((Frame) ff).yRows > 1) {\n\t\t\t\t\tthis.okToUse = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Get array of opening from frame\n\t\t\t\tObject[] os = ((Frame) ff).openings.toArray();\n\t\t\t\t\n\t\t\t\tfor (Object o : os) {\n\t\t\t\t\t\n\t\t\t\t\t//Content mid from opening is more than 1\n\t\t\t\t\tif (((OpeningObject) o).contentMid > 1) {\n\t\t\t\t\t\tthis.okToUse = false;\n\t\t\t\t\t}\n\t\t\t\t\t//Content in from opening is more than 1\n\t\t\t\t\tif (((OpeningObject) o).contentIn > 1) {\n\t\t\t\t\t\tthis.okToUse = false;\n\t\t\t\t\t}\n\t\t\t\t\t//Content out from opening is more than 1\n\t\t\t\t\tif (((OpeningObject) o).contentOut > 1) {\n\t\t\t\t\t\tthis.okToUse = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Setting default values configuration\n\t\tthis.divideFacet = false;\n\t\tthis.isFixedAngle = true;\n\t\tthis.angle = 180;\n\t\tthis.isPhantom = false;\n\t\t\n\t\t//Get selected coupler mullion selected\n\t\tTypeCouplerMullion typeCouplerMullion = (TypeCouplerMullion) couplerTypeC.getSelectedItem();\n\t\t\n\t\tthis.typeID = typeCouplerMullion.getId().getId();\n\t\t\n\t\t// Clean parts selected from coupler mullion controller\n\t\tcouplerMullionController.setPartsSelected(null);\n\t\tif(typeCouplerMullion.getType()==0){//Divider\n\t\t\tthis.selectedLevel = 0; \n\t\t\tthis.divideFacet = true; \n\t\t}else if(typeCouplerMullion.getType()==1){//Coupler\n\t\t\tthis.selectedLevel = 1; \n\t\t}else{\n\t\t\tthis.selectedLevel = 2; \n\t\t}\n\t\t\n\t\tif (typeCouplerMullion != null) {\n\t\t\t\n\t\t\t//Get angle from type coupler mullion\n\t\t\tthis.angle = typeCouplerMullion.getAngle();\n\t\t\t//Find parts for coupler selected option\n\t\t\tcouplerMullionController.findPartsForCouplerMullionSelected(typeCouplerMullion.getSupplierId(),\n typeCouplerMullion.getPartId(), typeCouplerMullion.isRemote());\n\t\t}\n\t\t\n\t\tif (divideFacet && (myParent.layoutP.bow.isSelected() || myParent.layoutP.bay.isSelected())) {\n\t\t\tthis.okToUse = false;\n\t\t}\n\t}", "private IKBox retrieveOntologyKBox(String kboxURI) throws ThinklabException {\r\n\r\n\t\tString kURI = \r\n\t\t\tMiscUtilities.changeProtocol(kboxURI, \"owl\");\r\n\r\n\t\tIKBox ret = kBoxes.get(kURI); \r\n\t\t\r\n\t\tif (ret == null) {\r\n\r\n\t\t\tret = new OntologyKBox(kboxURI);\r\n\t\t\tkBoxes.put(kURI, ret);\r\n\t\t}\r\n\t\t\r\n\t\treturn ret;\r\n\t\r\n\t}", "@Override\n public List<FreeSpace3D> segmentSpace(Box box){\n ArrayList<FreeSpace3D> newFreeSpace3DS = new ArrayList<>();\n ArrayList<Surface> newSurfaces = new ArrayList();\n if(box.getZBottom() > position.getZ())\n {\n //the bottom of physical box is a separating plane\n FreeSpace3D fs = new FreeSpace3D(width, depth, box.getZBottom() - position.getZ(), position, this.pallet, supportingSurfaces);\n newFreeSpace3DS.add(fs);\n }\n\n if(box.getZTop() < getZTop())\n {\n // the top of the physical box is a separating plane\n // determine the intersecting area\n PositionedRectangle intersectingArea = box.getTop().getHorizontalIntersection(this.getPositionedBottom());\n Surface sf = new Surface(intersectingArea);\n FreeSpace3D fs = new FreeSpace3D(width, depth,position.getZ() + height - box.getZTop(),\n new Vector3D(position.getX(), position.getY(),box.getZTop()), this.pallet, sf);\n newFreeSpace3DS.add(fs);\n }\n\n if(box.getXLeft() > getXLeft())\n {\n //the left side of physical box is a separating plane\n ArrayList<Surface> remainingSupportingSurfaces = updateSurfaces(new PositionedRectangle(box.getXLeft() - getXLeft(), depth, position));\n if(!remainingSupportingSurfaces.isEmpty()){\n FreeSpace3D fs = new FreeSpace3D(box.getXLeft() - getXLeft(), depth, height, position, this.pallet, remainingSupportingSurfaces);\n newFreeSpace3DS.add(fs);\n }\n }\n\n if(box.getXRight() < getXRight())\n {\n // the right of the physical box is a separating plane\n ArrayList<Surface> remainingSupportingSurfaces = updateSurfaces(new PositionedRectangle(getXRight() - box.getXRight(), depth, new Vector3D(box.getXRight(), position.getY(), position.getZ())));\n if(!remainingSupportingSurfaces.isEmpty()){\n FreeSpace3D fs = new FreeSpace3D(getXRight() - box.getXRight(), depth,\n height, new Vector3D(box.getXRight(), position.getY(), position.getZ()), this.pallet, remainingSupportingSurfaces);\n newFreeSpace3DS.add(fs);\n }\n }\n\n if(box.getYFront() > getYFront())\n {\n // the front of the physical box is a separating plane\n ArrayList<Surface> remainingSupportingSurfaces = updateSurfaces(new PositionedRectangle(width, box.getYFront() - getYFront(), position));\n if(!remainingSupportingSurfaces.isEmpty()){\n FreeSpace3D fs = new FreeSpace3D(width, box.getYFront() - getYFront(), height, position, this.pallet, remainingSupportingSurfaces);\n newFreeSpace3DS.add(fs);\n }\n }\n\n if(box.getYBack() < getYBack())\n {\n // the back of the physical box is a separating plane\n ArrayList<Surface> remainingSupportingSurfaces = updateSurfaces(new PositionedRectangle(width, getYBack() - box.getYBack(), new Vector3D(position.getX(), box.getYBack(), position.getZ())));\n if(!remainingSupportingSurfaces.isEmpty()){\n FreeSpace3D fs = new FreeSpace3D(width, getYBack() - box.getYBack(),\n height, new Vector3D(position.getX(), box.getYBack(), position.getZ()), this.pallet, remainingSupportingSurfaces);\n newFreeSpace3DS.add(fs);\n }\n }\n\n return newFreeSpace3DS;\n }", "@Test\n public void f4RULModelsTest() {\n //Parts of this test uses f12 (Associate asset type)\n\n //Go to first asset\n clickOn(\"#thumbnailTab\");\n FlowPane root = (FlowPane) scene.getRoot().lookup(\"#assetsThumbPane\");\n clickOn(root.getChildren().get(0)).sleep(1000);\n\n clickOn(\"#modelOutput\").sleep(3000);\n Text firstModel = (Text) scene.getRoot().lookup(\"#modelOutput\");\n String modelBefore = firstModel.getText();\n\n //Go to asset type info\n clickOn(\"#assetTypeMenuBtn\").sleep(2000);\n\n //select first asset type\n Node node = lookup(\"#columnName\").nth(1).query();\n clickOn(node).sleep(1000);\n clickOn(\"#associatedModelLabel\").sleep(1000);\n\n //go to model tab\n clickOn(scene.getRoot().lookup(\"#modelTab\")).sleep(1000);\n FlowPane models = (FlowPane) scene.getRoot().lookup(\"#modelsThumbPane\");\n\n //change to LSTM\n clickOn(models.getChildren().get(1)).sleep(1000);\n clickOn(\"#modelSaveBtn\").sleep(1000);\n\n //Go back to first asset to check the model again\n clickOn(\"#assetMenuBtn\").sleep(1000);\n clickOn(\"#thumbnailTab\").sleep(1000);\n root = (FlowPane) scene.getRoot().lookup(\"#assetsThumbPane\");\n\n //Check that the model of first asset changed\n clickOn(root.getChildren().get(0)).sleep(1000);\n clickOn(\"#modelOutput\").sleep(3000);\n Text secondModel = (Text) scene.getRoot().lookup(\"#modelOutput\");\n String modelAfter = secondModel.getText();\n\n assertNotSame(\"Models should be different after updating\", modelBefore, modelAfter);\n clickOn(\"#backBtn\").sleep(2000);\n }", "public void constructBoundingBox()\r\n\t{\n\t\tdouble a = m_Qmin.x;\r\n\t\tdouble b = m_Qmin.y;\r\n\t\tdouble c = m_Qmin.z;\r\n\r\n\t\tdouble d = m_Qmax.x;\r\n\t\tdouble e = m_Qmax.y;\r\n\t\tdouble f = m_Qmax.z;\r\n\r\n\t\t//constructing the vertexes of the bounding box\r\n\t\tSceneVertex A = new SceneVertex( new Vector3d(a, b, c));\r\n\t\tSceneVertex B = new SceneVertex( new Vector3d(d, b, c));\r\n\t\tSceneVertex C = new SceneVertex( new Vector3d(d, b, f));\r\n\t\tSceneVertex D = new SceneVertex( new Vector3d(d, e, f));\r\n\t\tSceneVertex E = new SceneVertex( new Vector3d(a, e, f));\r\n\t\tSceneVertex F = new SceneVertex( new Vector3d(a, e, c));\r\n\t\tSceneVertex G = new SceneVertex( new Vector3d(d, e, c));\r\n\t\tSceneVertex H = new SceneVertex( new Vector3d(a, b, f));\r\n\r\n\r\n\t\t// building the vertices arrays for the faces\r\n\t\tArrayList<SceneVertex> verArrP0front = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP0front.add(A);\r\n\t\tverArrP0front.add(B);\r\n\t\tverArrP0front.add(G);\r\n\t\tverArrP0front.add(F);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP1left = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP1left.add(A);\r\n\t\tverArrP1left.add(F);\r\n\t\tverArrP1left.add(E);\r\n\t\tverArrP1left.add(H);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP2back = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP2back.add(H);\r\n\t\tverArrP2back.add(C);\r\n\t\tverArrP2back.add(D);\r\n\t\tverArrP2back.add(E);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP3right = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP3right.add(G);\r\n\t\tverArrP3right.add(D);\r\n\t\tverArrP3right.add(C);\r\n\t\tverArrP3right.add(B);\r\n\t\t\r\n\t\tArrayList<SceneVertex> verArrP4bottom = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP4bottom.add(A);\r\n\t\tverArrP4bottom.add(H);\r\n\t\tverArrP4bottom.add(C);\r\n\t\tverArrP4bottom.add(B);\r\n\r\n\t\tArrayList<SceneVertex> verArrP5top = new ArrayList<SceneVertex>(4);\r\n\t\tverArrP5top.add(F);\r\n\t\tverArrP5top.add(G);\r\n\t\tverArrP5top.add(D);\r\n\t\tverArrP5top.add(E);\r\n\t\t\r\n\t\t// creating BoundingBox\r\n\t\tm_BoundingBox = new SceneNode(DrawingMode.GL_LINE, \"BoundingBox\", null);\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP0front, \"FRONT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP1left, \"LEFT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP2back, \"BACK\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP3right, \"RIGHT\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP4bottom, \"BOTTOM\"));\r\n\t\tm_BoundingBox.addChild( new ScenePolygon(verArrP5top, \"TOP\"));\r\n\r\n\t\t\r\n\t}", "private void generateBoxGeom()\n {\n // textures all share the same array, so process separately.\n textureBuffer = createBuffer(BOX_TEX_COORDS.length);\n textureBuffer.put(BOX_TEX_COORDS);\n textureBuffer.rewind();\n\n vertexBuffer = new FloatBuffer[6];\n normalBuffer = new FloatBuffer[6];\n\n for(int i = 0; i < 6; i++)\n {\n vertexBuffer[i] = createBuffer(12);\n normalBuffer[i] = createBuffer(12);\n }\n\n vertexBuffer[POSITIVE_X].put(RIGHT_BOX_COORDS);\n normalBuffer[POSITIVE_X].put(RIGHT_BOX_NORMALS);\n\n vertexBuffer[NEGATIVE_X].put(LEFT_BOX_COORDS);\n normalBuffer[NEGATIVE_X].put(LEFT_BOX_NORMALS);\n\n vertexBuffer[POSITIVE_Y].put(TOP_BOX_COORDS);\n normalBuffer[POSITIVE_Y].put(TOP_BOX_NORMALS);\n\n vertexBuffer[NEGATIVE_Y].put(BOTTOM_BOX_COORDS);\n normalBuffer[NEGATIVE_Y].put(BOTTOM_BOX_NORMALS);\n\n vertexBuffer[POSITIVE_Z].put(BACK_BOX_COORDS);\n normalBuffer[POSITIVE_Z].put(BACK_BOX_NORMALS);\n\n vertexBuffer[NEGATIVE_Z].put(FRONT_BOX_COORDS);\n normalBuffer[NEGATIVE_Z].put(FRONT_BOX_NORMALS);\n\n for(int i = 0; i < 6; i++)\n {\n vertexBuffer[i].rewind();\n normalBuffer[i].rewind();\n }\n }", "private void updatingOptionalFeature(ArrayList<String>\tOnlyInLeft, ArrayList<String>\tOnlyInRight, Model splModel, Model newModel){\r\n//STEP 1 ---------------------------------------------------------------------------------------------\r\n\t\t//Feature optionalFeature = null;\t\t\r\n\t\t//New 02/12/201/\r\n\t\tFeature newModelOptionalFeature = null;\r\n\t\tFeature newVariant = null;\r\n\t\tConstraint constraint = null;\r\n\t\tnewVariant = new Feature(newModel.getId()+\"_Variant\", \"variant\", this.alternativeFeatureGroup.get(0).getId());\r\n\t\tthis.addVariant(newVariant);\r\n\t\t//-New 02/12/201/\r\n\t\t\r\n\t\tif(OnlyInLeft.size()==0){\r\n\t\t}else{\r\n\t\t\tnewModelOptionalFeature= new Feature(\"f\"+(this.optionalFeatures.size()+1) , \"optional\", this.getBase().getName(), OnlyInLeft);\r\n\t\t\tthis.optionalFeatures.add(newModelOptionalFeature);\r\n\t\t\t\r\n\t\t\t//New 02/12/201/\r\n\t\t\tfor(int i = 0; i < this.getVariants().getFeatures().size();i++){\r\n\t\t\t\tFeature variant = this.getVariants().getFeatures().get(i);\r\n\t\t\t\tif(variant==newVariant){\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconstraint = new Constraint(variant.getName(), \"\\u00AC\"+newModelOptionalFeature.getName());\r\n\t\t\t\t\t//addConstraint(constraint);\r\n\t\t\t\t}//if(variant==newVariant){\r\n\t\t\t\t\r\n\t\t\t}//for(int i = 0; i <this.getVariants().getFeatures().size();i++){\t\r\n\t\t\t//-New 02/12/201/\r\n\t\t\tconstraint = new Constraint(newVariant.getName(), newModelOptionalFeature.getName());\r\n\t\t\t//this.constraints.add(constraint);\r\n\t\t\taddConstraint(constraint);\r\n\t\t\t\r\n\t\t\t//System.out.println(\" *** \"+this.constraints.size());\r\n\t\t\t//System.out.println(\" ... \"+constraint.toString());\r\n\t\t\t\r\n\t\t}//if(OnlyInLeft.size()==0){\r\n\r\n//STEP 2 ---------------------------------------------------------------------------------------------\r\n\t\t\r\n\t\tFeature optionalFeature = null;\r\n\t\t\r\n\t\tArrayList<String> elts = MyString.intersection(OnlyInRight, this.getBase().getElements());\r\n\t\tif(elts.size()==0){\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tthis.getBase().setElements(MyString.minus(this.getBase().getElements(), elts));\r\n\t\t\toptionalFeature= new Feature(\"f\"+(this.optionalFeatures.size()+1) , \"optional\", this.getBase().getName(), elts);\r\n\t\t\tthis.optionalFeatures.add(optionalFeature);\r\n\t\t\t\r\n\t\t\t//OnlyInRight = MyString.minus(OnlyInRight, elts);\r\n\t\t\t\r\n\t\t\t//New 03/12/2018\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < this.getVariants().getFeatures().size();i++){\r\n\t\t\t\tFeature variant = this.getVariants().getFeatures().get(i);\r\n\t\t\t\tif(variant==newVariant){\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconstraint = new Constraint(variant.getName(), optionalFeature.getName());\r\n\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\taddConstraint(constraint);\r\n\t\t\t\t}//if(variant==newVariant){\r\n\t\t\t}//for(int i = 0; i <this.getVariants().getFeatures().size();i++){\r\n\t\t\t\r\n\t\t\tconstraint = new Constraint(newVariant.getName(), \"\\u00AC\" + optionalFeature.getName());\r\n\t\t\t//this.constraints.add(constraint);\r\n\t\t\t//addConstraint(constraint);\r\n\t\t\t//-New 03/12/2018\r\n\t\t\t\r\n\t\t\t//New 03/12/2018\r\n\t\t\t//update parent feature of feature groups\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 1; i < this.getAlternativeFeatureGroup().size(); i++){\r\n\t\t\t\tFeatureGroup fg = this.getAlternativeFeatureGroup().get(i);\r\n\t\t\t\t\r\n\t\t\t\tif(fg.getParent().equals(this.getBase().getName())){\r\n\t\t\t\t\t\r\n\t\t\t\t\tString elt = fg.getFeatures().get(0).getElements().get(0); \r\n\t\t\t\t\tString parentElt = splModel.getParent(splModel.getElement(elt)).getId();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(optionalFeature.contains(parentElt)){\r\n\t\t\t\t\t\t//System.out.println(\"%%%%%%%%%%%%% + \"+parentElt);\r\n\t\t\t\t\t\tfg.setParent(optionalFeature.getName());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}//for(int i = 1; i < this.getAlternativeFeatureGroup().size(); i++){\r\n\t\t\t\r\n\t\t\t//-New 03/12/2018\r\n\t\t}//if(elts.size()==0){\r\n\t\t\r\n//STEP 3 ---------------------------------------------------------------------------------------------\r\n\r\n\t\t\r\n\t\tint i = 0;\r\n\t\twhile( i<this.optionalFeatures.size()){ //New 03/12/02018\r\n\t\t\tFeature f = this.optionalFeatures.get(i);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(f==newModelOptionalFeature){\r\n\t\t\t}else{\r\n\t\t\t\telts = f.getElements();\r\n\t\t\t\tArrayList<String> elts1 = MyString.intersection(OnlyInRight, elts);\r\n\t\t\t\tif(elts1.size()==0 ){\r\n\t\t\t\t\t//SUP\r\n\t\t\t\t\t//New 03/12/02018\r\n\t\t\t\t\tconstraint = new Constraint(newVariant.getName(), f.getName());\r\n\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\taddConstraint(constraint);\r\n\t\t\t\t\t//-New 03/12/02018\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif( MyString.contains(OnlyInRight, elts) ){\r\n\t\t\t\t\t\t//New 03/12/02018\r\n\t\t\t\t\t\t//OnlyInRight = MyString.minus(OnlyInRight, elts); \r\n\t\t\t\t\t\tconstraint = new Constraint(newVariant.getName(), \"\\u00AC\"+f.getName());\r\n\t\t\t\t\t\t//addConstraint(constraint);\r\n\t\t\t\t\t\t//-New 03/12/02018\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\toptionalFeature= new Feature(\"f\"+(this.optionalFeatures.size()+1) , \"optional\", this.getBase().getName(), elts1);\r\n\t\t\t\t\t\tthis.optionalFeatures.add(optionalFeature);\r\n\t\t\t\t\t\tf.setElements(MyString.minus(elts, elts1));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//OnlyInRight = MyString.minus(OnlyInRight, elts1);\r\n\r\n\t\t\t\t\t\t//New 09-01-2019\r\n\t\t\t\t\t\t//OnlyInRight = elts; \r\n\t\t\t\t\t\t//--------New 09-01-2019\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(int j = 0; j < this.getVariants().getFeatures().size(); j++){\r\n\t\t\t\t\t\t\tFeature variant = this.getVariants().getFeatures().get(j);\r\n\t\t\t\t\t\t\tif(variant==newVariant){\r\n\t\t\t\t\t\t\t}else{ \r\n\t\t\t\t\t\t\t\tif(Constraint.contains(this.constraints, variant.getName(), f.getName(), \"implies\") ){\r\n\t\t\t\t\t\t\t\t\tconstraint = new Constraint(variant.getName(), optionalFeature.getName());\r\n\t\t\t\t\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\t\t\t\t\taddConstraint(constraint);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}//if(variant==newVariant){\r\n\t\t\t\t\t\t}//for(int j = 0; j < this.getVariants().getFeatures().size(); j++){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tconstraint = new Constraint(newVariant.getName(), \"\\u00AC\"+optionalFeature.getName());\r\n\t\t\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\t\t\t//addConstraint(constraint);\r\n\t\t\t\t\t\t\tconstraint = new Constraint(newVariant.getName(), f.getName());\r\n\t\t\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\t\t\taddConstraint(constraint);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//-New 03/12/02018\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//New 03/12/2018\r\n\t\t\t\t\t\t\t//update parent feature of feature groups\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\t\r\n\t\t\t\t\t\t\tfor(int j = 1; j < this.getAlternativeFeatureGroup().size(); j++){\r\n\t\t\t\t\t\t\t\tFeatureGroup fg = this.getAlternativeFeatureGroup().get(j);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(fg.getParent().equals(f.getName())){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tString elt = fg.getFeatures().get(0).getElements().get(0); \r\n\t\t\t\t\t\t\t\t\tString parentElt = splModel.getParent(splModel.getElement(elt)).getId();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif(optionalFeature.contains(parentElt)){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tfg.setParent(optionalFeature.getName());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}//for(int i = 1; i < this.getAlternativeFeatureGroup().size(); i++){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//-New 03/12/2018\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//if( MyString.contains(OnlyInRight, f.getElements()) ){\r\n\t\t\t\t}//if( elts1.size()==0 ){\r\n\t\t\t\r\n\t\t\t}//if(f==newModelOptionalFeature){ New 03/12/02018\r\n\t\t\ti++;\r\n\t\t}//while(){\r\n\t\t\r\n\t\r\n\t\t\r\n\t\tthis.updatingAlternativeFeatures(splModel, newModelOptionalFeature, newVariant, OnlyInRight, newModel);\r\n\t}", "private void updateBoxes(){\n if(model.getMap() != null) {\n DoubleVec position = invModelToView(new DoubleVec(canvas.getWidth()*0.5,canvas.getHeight()*0.5));\n inner = new Rectangle(position, 1.0/zoomFactor * fi * canvas.getWidth(), 1.0/zoomFactor * fi * canvas.getHeight(), 0);\n outer = new Rectangle(position, 1.0/zoomFactor * fo * canvas.getWidth(), 1.0/zoomFactor * fo * canvas.getHeight(), 0);\n }\n }", "private void analyzeBox(QuadTreeNode node) {\n\t\t\tif (node.type().equals(\"leaf\")) {\n\t\t\t\tif (node.isWithin(((LeafNode)node).id, xl, yl, xu, yu)) elements.add(((LeafNode)node).id);\n\t\t\t} else if (node.type().equals(\"inner\")) {\n\t\t\t\tInnerNode nodeHandle = (InnerNode) node;\n\t\t\t\t//First Quad\n\t\t\t\tif (!nodeHandle.children[0].type().equals(\"empty\") && \n\t\t\t\t\t\txu >= nodeHandle.children[0].llx() && \n\t\t\t\t\t\tyu >= nodeHandle.children[0].lly()) analyzeBox(nodeHandle.children[0]);\n\t\t\t\t//Second Quad\n\t\t\t\tif (!nodeHandle.children[1].type().equals(\"empty\") && \n\t\t\t\t\t\txl < nodeHandle.children[1].urx() && \n\t\t\t\t\t\tyu > nodeHandle.children[1].lly()) analyzeBox(nodeHandle.children[1]);\n\t\t\t\t//Third Quad\n\t\t\t\tif (!nodeHandle.children[2].type().equals(\"empty\") && \n\t\t\t\t\t\txl < nodeHandle.children[2].urx() && \n\t\t\t\t\t\tyl < nodeHandle.children[2].ury()) analyzeBox(nodeHandle.children[2]);\n\t\t\t\t//Fourth Quad\n\t\t\t\tif (!nodeHandle.children[3].type().equals(\"empty\") && \n\t\t\t\t\t\txu >= nodeHandle.children[3].llx() && \n\t\t\t\t\t\tyl <= nodeHandle.children[3].ury()) analyzeBox(nodeHandle.children[3]);\n\t\t\t}\n\t\t}", "public Boolean buildModel(DaoStage activeStage) {\n\n // if no previous model, create locus, actor, prop lists\n if (activeStage.getLocusList().locii.size() == 0) {\n // create actor list mirroring locus list\n List<String> actorList = new ArrayList<>();\n activeStage.setActorList(actorList);\n // create stage locus list mirroring locus list\n List<String> propList = new ArrayList<>();\n activeStage.setPropList(propList);\n List<Integer> propFgColorList = new ArrayList<>();\n activeStage.setPropFgColorList(propFgColorList);\n List<Integer> propBgColorList = new ArrayList<>();\n activeStage.setPropBgColorList(propBgColorList);\n\n // create prop list\n DaoLocusList daoLocusList = new DaoLocusList();\n activeStage.setLocusList(daoLocusList);\n // establish ring max id list\n Integer ring = 0;\n Integer ringId = 0;\n List<Integer> ringMaxId = new ArrayList<>();\n ringMaxId.add(0);\n\n // seed 1st locus at 0,0\n DaoLocus origin = new DaoLocus();\n // mirror locus list add with actor & prop\n mirrorLociiAdd(origin, daoLocusList, actorList, propList, propFgColorList, propBgColorList);\n // set nickname, seed vert\n origin.setNickname(setLocusName(ring, ringMaxId.get(ring)));\n origin.setVertX(RING_CENTER_X);\n origin.setVertY(RING_CENTER_Y);\n origin.setVertZ(RING_CENTER_Z);\n Log.d(TAG, origin.toString() + \" at origin.\");\n\n // populate 1st ring around origin\n ++ring; // 1st\n ringId = populateLocii(ring, ringMaxId.get(ring - 1), daoLocusList, origin, actorList,\n propList, propFgColorList, propBgColorList);\n ringMaxId.add(ringId);\n\n // populate next ring by expanding around each locus in previous ring\n while (ring < activeStage.getRingSize()) {\n ++ring;\n // for each locus in previous ring\n Integer locusIndex = ringMaxId.get(ring - 2) + 1;\n ringId = ringMaxId.get(ring - 1);\n while (locusIndex < ringMaxId.get(ring - 1) + 1) {\n origin = daoLocusList.locii.get(locusIndex);\n ringId = populateLocii(ring, ringId, daoLocusList, origin, actorList,\n propList, propFgColorList, propBgColorList);\n ++locusIndex;\n }\n ringMaxId.add(ringId);\n }\n // create bounding rect with min/max inverted\n setBoundingRect(new RectF(RING_MAX_X, RING_MAX_Y, RING_MIN_X, RING_MIN_Y));\n // create bounding rect\n initBoundingRect(activeStage);\n }\n else if (activeStage.getPropFgColorList() == null ||\n activeStage.getPropBgColorList() == null ||\n activeStage.getPropFgColorList().size() != activeStage.getPropList().size() ||\n activeStage.getPropBgColorList().size() != activeStage.getPropList().size()) {\n Log.e(TAG, \"BuildModel finds depopulated FG,BG Color Lists...repairing...\");\n List<Integer> propFgColorList = new ArrayList<>();\n activeStage.setPropFgColorList(propFgColorList);\n List<Integer> propBgColorList = new ArrayList<>();\n activeStage.setPropBgColorList(propBgColorList);\n // for each prop\n for (int i = 0; i < activeStage.getPropList().size(); i++) {\n // if prop defined\n if (!activeStage.getPropList().get(i).equals(DaoDefs.INIT_STRING_MARKER)) {\n Log.d(TAG, \"buildModel repairing prop(\" + i + \") \" + activeStage.getPropList().get(i));\n if (activeStage.getPropList().get(i).equals(DaoActor.ACTOR_MONIKER_FORBIDDEN)) {\n propFgColorList.add(DaoStage.STAGE_BG_COLOR);\n propBgColorList.add(DaoStage.STAGE_BG_COLOR);\n } else if (activeStage.getPropList().get(i).equals(DaoActor.ACTOR_MONIKER_MIRROR)) {\n String actorMoniker = activeStage.getActorList().get(i);\n if (!actorMoniker.equals(DaoDefs.INIT_STRING_MARKER)) {\n DaoActor daoActor = (DaoActor) getRepoProvider().getDalActor().getDaoRepo().get(actorMoniker);\n if (daoActor != null) {\n propFgColorList.add(daoActor.getForeColor());\n propBgColorList.add(DaoStage.STAGE_BG_COLOR);\n Log.d(TAG,\"buildModel adds mirror for actor \" + daoActor.getMoniker() + \" at \" + i);\n }\n else {\n // add empty fg/bg color\n propFgColorList.add(DaoDefs.INIT_INTEGER_MARKER);\n propBgColorList.add(DaoDefs.INIT_INTEGER_MARKER);\n }\n }\n }\n }\n else {\n String actorMoniker = activeStage.getActorList().get(i);\n if (!actorMoniker.equals(DaoDefs.INIT_STRING_MARKER)) {\n DaoActor daoActor = (DaoActor) getRepoProvider().getDalActor().getDaoRepo().get(actorMoniker);\n if (daoActor != null) {\n activeStage.getPropList().set(i, DaoActor.ACTOR_MONIKER_MIRROR);\n propFgColorList.add(daoActor.getForeColor());\n propBgColorList.add(DaoStage.STAGE_BG_COLOR);\n Log.d(TAG,\"buildModel adds mirror for actor \" + daoActor.getMoniker() + \" at \" + i);\n }\n else {\n // add empty fg/bg color\n propFgColorList.add(DaoDefs.INIT_INTEGER_MARKER);\n propBgColorList.add(DaoDefs.INIT_INTEGER_MARKER);\n }\n }\n else {\n // add empty fg/bg color\n propFgColorList.add(DaoDefs.INIT_INTEGER_MARKER);\n propBgColorList.add(DaoDefs.INIT_INTEGER_MARKER);\n }\n }\n }\n }\n return true;\n }", "private void createModel() {\n model = new Node(\"Enemy\"+enemyCounter);\n Box b = new Box(.5f, 2, .5f);\n Geometry bg = new Geometry(\"Box\", b);\n Material bm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Sphere sphere = new Sphere(32, 32, 1.5f, false, false);\n Geometry sg = new Geometry(\"Sphere\", sphere);\n Material sm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n bm.setColor(\"Color\", ColorRGBA.Blue);\n sm.setColor(\"Color\", ColorRGBA.Red);\n bg.setMaterial(bm); \n sg.setMaterial(sm);\n model.attachChild(bg);\n model.attachChild(sg);\n sg.setLocalTranslation(0,2.5f,0);\n \n attachChild(model);\n }", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\tModel model = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null );\n\n\t\t// Load ontology 1\n\t\tmodel.read(\"file:///E:/Kuliah/TUGASAKHIR/TugasAkhirLatestFolder/Software/ontologyandmappingsanddatasources/endtoendtest/book1-test1.owl\");\n\n\t\t// Query in ontology 1\n\t\tQueryExecution qe = QueryExecutionFactory.create( QueryFactory.read( \"E:\\\\Kuliah\\\\TUGASAKHIR\\\\TugasAkhirLatestFolder\\\\Software\\\\ontologyandmappingsanddatasources\\\\endtoendtest\\\\book1-query1.sparql\" ), model );\n\t\tResultSet results = qe.execSelect();\n\t\t// PrefixMapping query;\n\t\t// Output query results\t\n\t\t// ResultSetFormatter.out(System.out, results, query);\n\n\t\t// Load ontology 2\n\t\tmodel = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null );\n\t\tmodel.read(\"file:///E:/Kuliah/TUGASAKHIR/TugasAkhirLatestFolder/Software/ontologyandmappingsanddatasources/endtoendtest/book2-test1.owl\");\n\t\t\t\n\t\t// Transform query\n\t\tString transformedQuery = null;\n\t\tString firstQuery = null;\n\t\ttry {\n\t\t InputStream in = new FileInputStream(\"E:/Kuliah/TUGASAKHIR/TugasAkhirLatestFolder/Software/ontologyandmappingsanddatasources/endtoendtest/book1-query1.sparql\");\n\t\t BufferedReader reader = new BufferedReader( new InputStreamReader(in) );\n\t\t String line = null;\n\t\t String queryString = \"\";\n\t\t while ((line = reader.readLine()) != null) {\n\t\t\tqueryString += line + \"\\n\";\n\t\t }\n\t\t firstQuery = queryString;\n\t\t Properties parameters = new Properties();\n\t\t \n\t\t AlignmentParser aparser = new AlignmentParser(0);\n//\t\t Mapping\n\t\t Alignment alu = aparser.parse(\"file:///E:/Kuliah/TUGASAKHIR/TugasAkhirLatestFolder/Software/align-4.9/html/tutorial/tutorial4/bookalignment.rdf\");\n\t\t BasicAlignment al = (BasicAlignment) alu;\n\t\t\ttransformedQuery = ((BasicAlignment)al).rewriteQuery( queryString, parameters );\n//\t\t transformedQuery = ((ObjectAlignment)al).\n\t\t} catch ( Exception ex ) { ex.printStackTrace(); }\n\n\t\t// Query ontology 2\n\t\tSystem.out.println(transformedQuery);\n//\t\tdisplayQueryAnswer( model, QueryFactory.create( transformedQuery ) );\n\t\tqe = QueryExecutionFactory.create( QueryFactory.create( firstQuery ), model );\n\t\tresults = qe.execSelect();\n\t\tSystem.out.println(results);\n\t\t\n\t\t// Output query results\t\n\t\t// ResultSetFormatter.out(System.out, results, query);\n\t}", "@Override\n public void newBundlesRoot(Bundles new_root) {\n // Adjust state of super\n super.newBundlesRoot(new_root);\n // Save some state\n Map<String,Point2D> wxy_copy = entity_to_wxy;\n // Reset stateful variables for this class\n digraph = new SimpleMyGraph<Bundle>();\n graph = new SimpleMyGraph<Bundle>();\n entity_to_shape = new HashMap<String,Utils.Symbol>();\n entity_to_wxy = new HashMap<String,Point2D>();\n entity_to_sxy = new HashMap<String,String>();\n entity_to_sx = new HashMap<String,Integer>();\n entity_to_sy = new HashMap<String,Integer>();\n // Reapply all the relationships\n for (int i=0;i<active_relationships.size();i++) {\n // System.err.println(\"newBundlesRoot(): Adding In Relationship \\\"\" + active_relationships.get(i) + \"\\\"... bundles.size() = \" + new_root.size());\n addRelationship(active_relationships.get(i), false, new_root);\n }\n // Reapply the world coordinates\n Iterator<String> it = entity_to_wxy.keySet().iterator();\n while (it.hasNext()) {\n String entity = it.next();\n if (wxy_copy.containsKey(entity)) entity_to_wxy.put(entity, wxy_copy.get(entity));\n }\n transform();\n }", "private HashMap setupBoundBoxes(BioMightBoundBox bioMightBoundBoxIn) \r\n\t{\r\n\t\t// Set up the bounding boxes for the various components\r\n\t\t// The various components locations will be driven by the\r\n\t\t// bounding boxes\r\n\t\tHashMap boundingBoxMap = new HashMap();\r\n\t\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\r\n\t\t// Initialize the BoundBoxes. This is used for\r\n\t\t// collections such as arms, legs,lungs,etc\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\t\r\n\t\t// Use the information in the incomiing Bound Box\r\n\t\t// to orientate the inner bound boxes\r\n\t\tif (bioMightBoundBoxIn != null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Arm - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxIn.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxIn.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxIn.getZPos());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//********************************************************************* \r\n\t\t// EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Arm\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-12.0);\r\n\t\tzPos= new BigDecimal(-1.0);\r\n\t\t\r\n\t\txVector= new BigDecimal(9.0);\r\n\t\tyVector= new BigDecimal(8.0); \r\n\t\tzVector= new BigDecimal(4.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Arm Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -9.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"ArmEpithelialCell\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"ArmEpithelialCell\", bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\tboundingBoxMap.put(Constants.ArmEpitheliumRef, bioBoundBox);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\t//********************************************************************* \r\n\t\t// ARMS BOUND BOXES\r\n\t\t// Set up the Bounding Box for the Bronchi\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT ARMS BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Left Arm\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(1.0);\r\n\t\tyPos = new BigDecimal(-11.0);\r\n\t\tzPos= new BigDecimal(-3.5);\r\n\t\t\r\n\t\txVector= new BigDecimal(2.0);\r\n\t\tyVector= new BigDecimal(2.0); \r\n\t\tzVector= new BigDecimal(2.0);\r\n\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\t\r\n\t\t// ArmEpithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -8.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftArmRef, bioBoundBox);\t\r\n\r\n\t\t//********************************************************************* \r\n\t\t// RIGHT ARMS BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Bronchi\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(-1.0);\r\n\t\tyPos = new BigDecimal(-11.0);\r\n\t\tzPos= new BigDecimal(-3.5);\r\n\t\t\r\n\t\txVector= new BigDecimal(2.0);\r\n\t\tyVector= new BigDecimal(2.0); \r\n\t\tzVector= new BigDecimal(2.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\t\r\n\t\t// ArmEpithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -8.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightArmRef, bioBoundBox);\t\t\r\n\r\n\t\t// Put the BioMight BoundBoxes for the Bronchi \r\n\t\t// into the BoundingBoxMap \r\n\t\tboundingBoxMap.put(Constants.BronchiRef, bioBoundBoxes);\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn (boundingBoxMap);\r\n\t}", "public static void main(String[] args)\n {\n System.out.println(\"CompareTD2BU :fileName1 :dirName2 :rootName2 :ext2 :outputNameRoot :gammaMultiplier\");\n// System.out.println(\"CompareTD2BU takes compares a series of vertex communties against a standard community\");\n// System.out.println(\"for the timgraph defined by the\");\n// System.out.println(\"final timgraph arguments (including the input file name and directory).\");\n// System.out.println(\"The first community is given by fileName1 and is the fixed standard against\");\n// System.out.println(\"which all others are compared. The second community is a set formed from\");\n// System.out.println(\"<dirName2><rootName2>*<ext2> so note the dirName2 must end in a slash.\");\n// System.out.println(\"The * is taken to be the values of gamma involved. The last argument\");\n// System.out.println(\"outputNameRoot gives the full directory and name root of the output file.\");\n// \n //First arg chooses first community file\n //String fileName1=\"input/ICtest_psecinputBVNLS.dat\";\n //String fileName1=\"input/ICNS090224npstemppew0020inputELS.dat\";\n //String fileName1=\"input/ICNS090729_psecinputBVNLS.dat\";\n String fileName1=\"input/karateTSEActualVPinputBVNLS.dat\";\n int ano=0;\n if (args.length>ano ) if (timgraph.isOtherArgument(args[ano])) fileName1=args[ano].substring(1);\n System.out.println(\"--- Using reference network \"+fileName1);\n\n\n //String dirName2=\"output/IC/PaperTerm/\";\n String dirName2=\"output/karate/\";\n ano++;\n if (args.length>ano ) if (timgraph.isOtherArgument(args[ano])) dirName2=args[ano].substring(1);\n\n //String rootName2=\"ICNS090729stempt_PapersVCWLG_VP\";\n String rootName2=\"karateTSE_VC_WLG_VP\";\n ano++;\n if (args.length>ano ) if (timgraph.isOtherArgument(args[ano])) rootName2=args[ano].substring(1);\n\n String ext2 = \"output.vcis\";\n ano++;\n if (args.length>ano ) if (timgraph.isOtherArgument(args[ano])) ext2=args[ano].substring(1);\n\n System.out.println(\"--- Comparing against networks \"+dirName2+rootName2+\"(gamma)\"+ext2);\n\n //Third arg is output file name\n String rootName3=\"output/karateTSE_actual_WLG_VP\";\n //String rootName3=\"output/ICNS090729stempt_psec_Papers\";\n ano++;\n if (args.length>ano ) if (timgraph.isOtherArgument(args[ano])) rootName3=args[ano].substring(1);\n System.out.println(\"--- Output to \"+rootName3);\n\n //Third arg is gamma multiplier\n double gammaMultiplier=1.0;\n ano++;\n if (args.length>ano ) if (timgraph.isOtherArgument(args[ano])) gammaMultiplier=Double.parseDouble(args[ano].substring(1));\n System.out.println(\"--- gamma multiplier \"+gammaMultiplier);\n\n\n FindFile ff = new FindFile();\n ff.getFileList(dirName2, rootName2, ext2, true);\n int nf = ff.filelist.length;\n String [] name2Array = new String[nf];\n MutualInformation [] miArray = new MutualInformation[nf];\n double [] gammaArray = new double[nf];\n PrintWriter results = null;\n String outputFile=rootName3+\"_gammaMI.dat\";\n try {results = new PrintWriter(new FileWriter(outputFile));}// eo try\n catch (IOException e){\n System.err.println(\"Problem with output file \"+outputFile+\", \"+e);\n System.exit(1);\n }\n System.out.println(\"--- Opened output file \"+outputFile);\n String sep=\"\\t\";\n results.println(MutualInformation.toStringBasicLabel(sep)+sep+\"gamma\"+sep+MutualInformation.toStringLabel(sep));\n\n for (int f=0; f<nf; f++){\n String fullFileName2=dirName2+ff.filelist[f];\n System.out.println(\"--- Using network two \"+fullFileName2);\n int c0= fullFileName2.lastIndexOf(rootName2)+rootName2.length();\n int c1= fullFileName2.lastIndexOf(ext2);\n String gammaString=fullFileName2.substring(c0, c1);\n double gamma=Double.parseDouble(gammaString)*gammaMultiplier;\n System.out.println(\"--- gamma = \"+gamma);\n \n MutualInformation mi = CompareVertexCommunities.doComparision(fileName1,fullFileName2);\n results.println(mi.toStringBasic(sep)+sep+gamma+sep+mi.toString(sep));\n results.flush();\n miArray[f]= new MutualInformation(mi,false,false);\n name2Array[f]=ff.filelist[f];\n gammaArray[f]=gamma;\n } // eo for\n results.close();\n System.out.println(\"--- Closed output file \"+outputFile);\n }", "public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }", "public void test_hk_06() throws Exception {\n OntModel ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n ontModel.read(\"file:testing/ontology/bugs/test_hk_06/a.owl\");\n \n String NSa = \"http://jena.hpl.hp.com/2003/03/testont/a#\";\n String NSb = \"http://jena.hpl.hp.com/2003/03/testont/b#\";\n \n OntClass A = ontModel.getOntClass(NSa + \"A\");\n assertTrue(\"class A should be in the base model\", ontModel.isInBaseModel(A));\n \n OntClass B = ontModel.getOntClass(NSb + \"B\");\n assertFalse(\"class B should not be in the base model\", ontModel.isInBaseModel(B));\n \n assertTrue(\n \"A rdf:type owl:Class should be in the base model\",\n ontModel.isInBaseModel(ontModel.createStatement(A, RDF.type, OWL.Class)));\n assertFalse(\n \"B rdf:type owl:Class should not be in the base model\",\n ontModel.isInBaseModel(ontModel.createStatement(B, RDF.type, OWL.Class)));\n }", "private void fiveNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pI(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\")));\n n(tx, true, \"n2\", Stream.of(pI(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\")));\n n(tx, true, \"n3\", Stream.of(pO(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pI(\"n3:4\")));\n n(tx, true, \"n4\", Stream.of(pO(\"n4:1\"), pI(\"n4:2\"), pB(\"n4:3\"), pB(\"n4:4\")));\n n(tx, true, \"n5\", Stream.of(pI(\"n5:1\"), pB(\"n5:2\"), pB(\"n5:3\"), pO(\"n5:4\")));\n l(tx, \"n2\", \"n2:3\", \"n3\", \"n3:4\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n3\", \"n3:1\", \"n1\", \"n1:1\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n3\", \"n3:3\", \"n5\", \"n5:1\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n4\", \"n4:1\", \"n1\", \"n1:3\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n5\", \"n5:4\", \"n4\", \"n4:2\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }", "public void makePreferredOTTOLRelationshipsConflicts(){\n \t\tTransaction tx;\n \t\tString name = \"life\";\n \t\tIndexHits<Node> foundNodes = findTaxNodeByName(name);\n Node firstNode = null;\n if (foundNodes.size() < 1){\n System.out.println(\"name '\" + name + \"' not found. quitting.\");\n return;\n } else if (foundNodes.size() > 1) {\n System.out.println(\"more than one node found for name '\" + name + \"'not sure how to deal with this. quitting\");\n } else {\n for (Node n : foundNodes)\n firstNode = n;\n }\n \t\tTraversalDescription CHILDOF_TRAVERSAL = Traversal.description()\n \t\t\t\t.relationships( RelTypes.TAXCHILDOF,Direction.INCOMING );\n \t\tSystem.out.println(firstNode.getProperty(\"name\"));\n \t\tint count = 0;\n \t\ttx = graphDb.beginTx();\n \t\ttry{\n \t\t\tfor(Node friendnode : CHILDOF_TRAVERSAL.traverse(firstNode).nodes()){\n \t\t\t\tboolean conflict = false;\n \t\t\t\tString endNode = \"\";\n \t\t\t\tRelationship ncbirel = null;\n \t\t\t\tRelationship ottolrel = null;\n \t\t\t\tfor(Relationship rel : friendnode.getRelationships(Direction.OUTGOING)){\n \t\t\t\t\tif (rel.getEndNode() == rel.getStartNode()){\n \t\t\t\t\t\tcontinue;\n \t\t\t\t\t}else{\n \t\t\t\t\t\tif (endNode == \"\")\n \t\t\t\t\t\t\tendNode = (String) rel.getEndNode().getProperty(\"name\");\n \t\t\t\t\t\tif ((String)rel.getEndNode().getProperty(\"name\") != endNode){\n \t\t\t\t\t\t\tconflict = true;\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif(((String)rel.getProperty(\"source\")).compareTo(\"ncbi\")==0)\n \t\t\t\t\t\t\tncbirel = rel;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\tif (conflict && ncbirel != null){\n \t\t\t\t\tcount += 1;\n //\t\t\t\t\tSystem.out.println(\"would make one from \"+ncbirel.getStartNode().getProperty(\"name\")+\" \"+ncbirel.getEndNode().getProperty(\"name\"));\n \t\t\t\t\tif(ncbirel.getStartNode()!=ncbirel.getEndNode()){\n \t\t\t\t\t\tncbirel.getStartNode().createRelationshipTo(ncbirel.getEndNode(), RelTypes.PREFTAXCHILDOF);\n \t\t\t\t\t\tRelationship newrel2 = ncbirel.getStartNode().createRelationshipTo(ncbirel.getEndNode(), RelTypes.TAXCHILDOF);\n \t\t\t\t\t\tnewrel2.setProperty(\"source\", \"ottol\");\n \t\t\t\t\t}else{\n \t\t\t\t\t\tSystem.out.println(\"would make cycle from \"+ncbirel.getEndNode().getProperty(\"name\"));\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t}\n \t\t\t\tif(count % transaction_iter == 0)\n \t\t\t\t\tSystem.out.println(count);\n \t\t\t}\n \t\t\ttx.success();\n \t\t}finally{\n \t\t\ttx.finish();\n \t\t}\n \t}", "public void test_sb_01() {\n OntModel model= ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_RDFS_INF, null);\n \n Resource result= null;\n Resource nullValueForResourceType= null;\n \n result= model.createOntResource( OntResource.class, nullValueForResourceType, \"http://www.somewhere.com/models#SomeResourceName\" );\n assertNotNull( result );\n }", "public BoxModel getWorldModel(IBlockAccess world, int x, int y, int z)\r\n/* 87: */ {\r\n/* 88: 89 */ int pipe_type = 0;int metadata = 0;int node_dir = 0;\r\n/* 89: 92 */ if (!(world.getTileEntity(x, y, z) instanceof INode)) {\r\n/* 90: 93 */ return new BoxModel();\r\n/* 91: */ }\r\n/* 92: 96 */ INode node = (INode)world.getTileEntity(x, y, z);\r\n/* 93: */ \r\n/* 94: 98 */ BoxModel boxes = node.getModel(node.getNodeDir());\r\n/* 95: 99 */ List pipe_boxes = getPipeModel(world, x, y, z, null);\r\n/* 96:101 */ if (pipe_boxes.size() > 1) {\r\n/* 97:102 */ boxes.addAll(pipe_boxes);\r\n/* 98: */ }\r\n/* 99:105 */ return boxes;\r\n/* 100: */ }", "@SuppressWarnings(\"unchecked\")\n\tpublic void searchTraject() throws IOException {\n\n\t\tif (trajectType == null) {\n\t\t\tmessages.warn(\"Gelieve eerst een route- of netwerktype te selecteren alvorens te zoeken.\");\n\t\t}\n\n\t\telse if (trajectType.contains(\"Route\") && trajectNaam == null) {\n\t\t\tmessages.warn(\"Gelieve bij het zoeken naar routes een trajectnaam te selecteren.\");\n\t\t}\n\n\t\telse {\n\t\t\tMapViewer viewer = getViewer();\n\t\t\tMapContext context = viewer.getConfiguration().getContext();\n\n\t\t\t// viewer.setShowSelectControl(false);\n\t\t\t// viewer.setShowDrawPointControl(false);\n\n\t\t\tenvelope = getEnvelopeProvincie();\n\n\t\t\tgetMelding().setProbleem(null);\n\t\t\tprobleemType = \"\";\n\n\t\t\t// Itereren over de lagen en de correcte operaties uitvoeren\n\t\t\tfor (FeatureMapLayer layer : context.getFeatureLayers()) {\n\t\t\t\tlayer.setFilter(null);\n\t\t\t\tlayer.setHidden(true);\n\t\t\t\tlayer.set(\"selectable\", false);\n\t\t\t\t// Provincie altijd zichtbaar\n\t\t\t\tif (layer.getLayerId().equalsIgnoreCase(\"provincie\")) {\n\t\t\t\t\tlayer.setHidden(false);\n\t\t\t\t}\n\n\t\t\t\telse if (layer.getLayerId().equalsIgnoreCase(trajectType)) {\n\t\t\t\t\t// Netwerk\n\t\t\t\t\tif (trajectType.contains(\"Segment\")) {\n\t\t\t\t\t\tsearchNetwerkLayer(layer);\n\t\t\t\t\t}\n\t\t\t\t\t// Route\n\t\t\t\t\telse {\n\t\t\t\t\t\tsearchRouteLayer(layer);\n\t\t\t\t\t\tenvelope = viewer.getContentExtent(layer);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// RouteBord\n\t\t\t\telse if (layer.getLayerId().equalsIgnoreCase(\n\t\t\t\t\t\ttrajectType + \"Bord\")) {\n\t\t\t\t\tsearchRouteBordLayer(layer);\n\t\t\t\t}\n\t\t\t\t// NetwerkBord\n\t\t\t\t// Filtering op de borden\n\t\t\t\telse if (layer.getLayerId().equalsIgnoreCase(\n\t\t\t\t\t\ttrajectType.replace(\"Segment\", \"\") + \"Bord\")) {\n\t\t\t\t\tlayer.setHidden(false);\n\t\t\t\t\tsearchNetwerkBordLayer(layer);\n\t\t\t\t}\n\t\t\t\t// WandelKnooppunt\n\t\t\t\telse if (layer.getLayerId().contains(\"Knooppunt\")\n\t\t\t\t\t\t&& trajectType.contains(\"WandelNetwerk\")) {\n\t\t\t\t\tFeatureMapLayer mapLayer = (FeatureMapLayer) context\n\t\t\t\t\t\t\t.getLayer(\"wandelNetwerkKnooppunt\");\n\t\t\t\t\tsearchKnooppuntLayer(mapLayer);\n\t\t\t\t}\n\n\t\t\t\t// FietsKnooppunt\n\t\t\t\telse if (layer.getLayerId().contains(\"Knooppunt\")\n\t\t\t\t\t\t&& trajectType.contains(\"FietsNetwerk\")) {\n\t\t\t\t\tFeatureMapLayer mapLayer = (FeatureMapLayer) context\n\t\t\t\t\t\t\t.getLayer(\"fietsNetwerkKnooppunt\");\n\t\t\t\t\tsearchKnooppuntLayer(mapLayer);\n\t\t\t\t}\n\n\t\t\t\t// Intekenen Punt\n\t\t\t\telse if (layer.getLayerId().equalsIgnoreCase(\n\t\t\t\t\t\tGEOMETRY_LAYER_NAME)) {\n\t\t\t\t\tlayer.setHidden(true);\n\t\t\t\t\t((GeometryListFeatureMapLayer) layer)\n\t\t\t\t\t\t\t.setGeometries(Collections.EMPTY_LIST);\n\t\t\t\t} else {\n\t\t\t\t\tlayer.setHidden(true);\n\t\t\t\t\tlayer.setFilter(null);\n\t\t\t\t\tlayer.set(\"selectable\", false);\n\t\t\t\t\tlayer.setSelection(Collections.EMPTY_LIST);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tviewer.updateCurrentExtent(envelope);\n\t\t\tviewer.updateContext(null);\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tString peopleAndPets = \"C:/people+pets.owl\"; \n\n\t\tString ip = \"localhost\";\n\t\tint port = 8088;\n\n\t\tRacerClient racer = new RacerClient(ip,port);\t\t\n\n\t\ttry {\n\n\t\t\tracer.openConnection();\n\n\t\t\tracer.loggingOn();\n\t\t\tracer.sendRaw(\"(logging-on)\");\n\n\t\t\tracer.fullReset();\n\n\t\t\tracer.owlReadFile(\"\\\"\"+peopleAndPets+\"\\\"\"); \n\n\t\t\tSystem.out.println(racer.taxonomy()); \n\t\t\tSystem.out.println(racer.taxonomy$()); \n\n\t\t\tRacerList<RacerList>\n\t\t\tres1 = (RacerList<RacerList>)\n\t\t\tracer.taxonomy$(); \n\n\t\t\tfor (RacerList triple : res1) {\n\t\t\t\tSystem.out.println(\"--------\"); \n\t\t\t\tSystem.out.println(\"Concept : \"+triple.getValue().get(0)); \n\t\t\t\tSystem.out.println(\"Parents : \"+triple.getValue().get(1)); \n\t\t\t\tSystem.out.println(\"Children: \"+triple.getValue().get(2)); \n\t\t\t} \n\n\t\t\tSystem.out.println(racer.currentAbox()); \n\t\t\tSystem.out.println(racer.currentAbox$()); \n\n\t\t\tracer.instanceM(\"i\",\"C\"); \n\n\t\t\tSystem.out.println(racer.aboxConsistentP()); \n\t\t\tSystem.out.println(racer.aboxConsistentP(racer.currentAbox())); \n\t\t\tSystem.out.println(racer.aboxConsistentMP(racer.currentAbox())); \n\t\t\tSystem.out.println(racer.aboxConsistentP(racer.currentAbox$())); \n\t\t\tSystem.out.println(racer.aboxConsistentMP(racer.currentAbox$())); \n\n\t\t\tSystem.out.println(racer.racerAnswerQuery(\"(?x ?y)\",\n\t\t\t\t\t\"(and (?x #!:person) (?x ?y #!:has_pet))\")); \n\n\t\t\tRacerList<RacerList<RacerList<RacerSymbol>>>\n\t\t\tres2 = (RacerList<RacerList<RacerList<RacerSymbol>>>)\n\t\t\tracer.racerAnswerQuery$(\"(?x ?y)\",\"(and (?x #!:person) (?x ?y #!:has_pet))\"); \n\n\t\t\tfor (RacerList<RacerList<RacerSymbol>> bindings : res2) {\n\t\t\t\tfor (RacerList<RacerSymbol> binding : bindings) {\n\t\t\t\t\tfor (RacerSymbol varval : binding) {\n\t\t\t\t\t\tSystem.out.println(varval);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\n\t\t\tSystem.out.println(racer.retrieveM$(\"(?x ?y)\",\n\t\t\t\t\t\"(and (?x #!:person) (?x ?y #!:has_pet))\")); \n\n\t\t\tRacerList<RacerList<RacerList<RacerSymbol>>>\n\t\t\tres2b = (RacerList<RacerList<RacerList<RacerSymbol>>>)\n\t\t\tracer.racerAnswerQuery$(\"(?x ?y)\",\"(and (?x #!:person) (?x ?y #!:has_pet))\"); \n\n\t\t\tfor (RacerList<RacerList<RacerSymbol>> bindings : res2b) {\n\t\t\t\tfor (RacerList<RacerSymbol> binding : bindings) {\n\t\t\t\t\tfor (RacerSymbol varval : binding) {\n\t\t\t\t\t\tSystem.out.println(varval);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(racer.describeAllQueries()); \n\t\t\tSystem.out.println(racer.describeAllQueries(true)); \n\t\t\tSystem.out.println(racer.describeAllQueries(false)); \n\t\t\tSystem.out.println(racer.describeAllQueries$(true)); \n\t\t\tSystem.out.println(racer.describeAllQueries$(\"nil\")); \n\t\t\tSystem.out.println(racer.describeAllQueries$(\"t\")); \n\t\t\tSystem.out.println(racer.describeAllQueries$(new RacerSymbol(\"nil\"))); \n\t\t\tSystem.out.println(racer.describeAllQueries$(new RacerSymbol(\"t\"))); \n\t\t\tSystem.out.println(racer.describeAllQueries(new RacerSymbol(\"nil\"))); \n\t\t\tSystem.out.println(racer.describeAllQueries(new RacerSymbol(\"t\"))); \n\n\t\t\tRacerList res3 = (RacerList)\n\t\t\t\t\tracer.racerAnswerQuery$(\"(?x)\",\n\t\t\t\t\t\t\t\"(?x #!:person)\",\n\t\t\t\t\t\t\t\":how-many\",3,\n\t\t\t\t\t\t\t\":exclude-permutations\",true);\n\n\t\t\tSystem.out.println(res3); \n\n\t\t\tString res4 = \n\t\t\t\t\tracer.racerAnswerQuery(\"(?x)\",\n\t\t\t\t\t\t\t\"(?x #!:person)\",\n\t\t\t\t\t\t\t\":how-many\",3,\n\t\t\t\t\t\t\t\":exclude-permutations\",true);\n\n\t\t\tSystem.out.println(res4); \n\n\t\t\tRacerList<RacerList<RacerResult>>\n\t\t\tres5 = (RacerList<RacerList<RacerResult>>)\n\t\t\tracer.allConceptAssertions$(); \n\n\t\t\tfor (RacerList<RacerResult> ass : res5) {\n\t\t\t\tSystem.out.println(\"-----------\");\n\t\t\t\tSystem.out.println(\"Individual: \"+ass.getValue().get(0)); \n\t\t\t\tSystem.out.println(\"Concept : \"+ass.getValue().get(1)+\" of \"+ass.getValue().get(1).getClass()); \n\n\t\t\t}\n\n\t\t\tRacerList<RacerList<RacerResult>>\n\t\t\tres6 = (RacerList<RacerList<RacerResult>>)\n\t\t\tracer.allAnnotationConceptAssertions$(); \n\n\t\t\tfor (RacerList<RacerResult> ass : res6) {\n\t\t\t\tSystem.out.println(\"-----------\");\n\t\t\t\tSystem.out.println(\"Individual: \"+ass.getValue().get(0)); \n\t\t\t\tSystem.out.println(\"Concept : \"+ass.getValue().get(1)+\" of \"+ass.getValue().get(1).getClass()); \n\n\t\t\t}\n\n\t\t\tracer.withUniqueNameAssumption(); \n\n\t\t\tracer.aboxConsistentP(); \n\n\t\t\tracer.withNrqlSettings(\":how-many-tuples\",1); \n\t\t\tSystem.out.println(racer.racerAnswerQuery$(\"(?x)\",\"(?x #!:person)\")); \n\n\t\t\tracer.endWithNrqlSettings(); \n\n\t\t\tSystem.out.println(racer.racerAnswerQuery$(\"(?x)\",\"(?x #!:person)\")); \n\n\t\t\tRacerList<RacerSymbol> head = new RacerList();\n\t\t\thead.getValue().add(new RacerSymbol(\"?x\")); \n\t\t\tRacerList body = (RacerList)racer.parseRacerAnswer(\"(?x #!:person)\"); \n\t\t\tSystem.out.println(racer.racerAnswerQuery$(head,body)); \n\t\t\tracer.endWithUniqueNameAssumption(); \n\n\t\t\tSystem.out.println(racer.racerAnswerQuery(head,body)); \n\n\t\t\t// sometimes, type casts and dynamic type checks can't be avoided: \n\n\t\t\tfor(String concept : new String[] {\"top\",\"#!:person\",\"#!:mad_cow\",\"bottom\"}) {\n\n\t\t\t\tSystem.out.println(); \n\t\t\t\tSystem.out.println(\"Retrieving instances of \"+concept+\":\"); \n\n\t\t\t\tRacerResult \n\t\t\t\tres7 = (RacerResult)\n\t\t\t\tracer.conceptInstancesM$(concept); \n\n\t\t\t\tif (res7 instanceof RacerSymbol) { // no instances? nil can't be cast in a RacerList!\n\t\t\t\t\tSystem.out.println(\"No instances!\"); \n\t\t\t\t} else {\n\t\t\t\t\tfor (RacerSymbol ind : (RacerList<RacerSymbol>) res7) {\n\t\t\t\t\t\tSystem.out.println(ind); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(racer.evaluateM$(\"(+ 1 2)\")); \n\n\t\t\tracer.mirror(\"\\\"http://www.people+pets.owl/people+pets.owl\\\"\",\"\\\"file://\"+peopleAndPets+\"\\\"\");\n\n\t\t\tracer.owlReadDocument(\"\\\"http://www.people+pets.owl/people+pets.owl\\\"\");\n\n\t\t\tracer.fullReset();\n\n\t\t\tracer.mirror(racer.RacerStringArgument(\"http://www.people+pets.owl/people+pets.owl\"),\n\t\t\t\t\tracer.RacerStringArgument(\"file://\"+peopleAndPets));\n\n\t\t\tracer.owlReadDocument(racer.RacerStringArgument(\"http://www.people+pets.owl/people+pets.owl\"));\n\n\t\t\tSystem.out.println(racer.describeAbox(racer.currentAbox())); \n\n\t\t\tSystem.out.println(racer.describeAbox(racer.RacerSymbolArgument(\"file://\"+peopleAndPets))); \n\n\t\t\tSystem.out.println(racer.racerAnswerQuery(\n\t\t\t\t\t\"(?x ?y)\",\n\t\t\t\t\t\"(and (?x #!:person) (?x ?y #!:has_pet))\")); \n\n\t\t\tSystem.out.println(racer.describeQuery(racer.RacerSymbolArgument(\":last\"),racer.RacerBooleanArgument(true)));\n\n\t\t\t// System.out.println(racer.exitServer());\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t}", "private IKBox retrieveGenericKBox(String kboxURI) throws ThinklabException {\r\n\t\r\n\t\tIKBox ret = null;\r\n\t\tURL sourceURL = null;\r\n\t\tInputStream input = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\r\n\t\t\t/* see if we have a metadata document in the corresponding file: url */\r\n\t\t\tsourceURL = new URL(\"file\" + kboxURI.substring(4));\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tinput = sourceURL.openStream();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tinput = null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (input == null) {\r\n\r\n\t\t\t\t/* try http: */\r\n\t\t\t\tsourceURL = new URL(\"http\" + kboxURI.substring(4));\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tinput = sourceURL.openStream();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tinput = null;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\r\n\t\t} catch (MalformedURLException e) {\r\n\t\t}\r\n\t\t\r\n\t\tif (input == null) {\r\n\t\t\tthrow new ThinklabUndefinedKBoxException(\"url \" + kboxURI + \" does not point to a valid metadata document\");\r\n\t\t}\r\n\r\n\t\t\r\n\t\t/* we have a metadata document; extract protocol, url, and all parameters */\r\n\t\tProperties properties = new Properties();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tproperties.load(input);\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new ThinklabIOException(e);\r\n\t\t}\r\n\t\t\r\n\t\tString protocol = properties.getProperty(IKBox.KBOX_PROTOCOL_PROPERTY);\r\n\t\tString dataUri = properties.getProperty(IKBox.KBOX_URI_PROPERTY);\r\n\t\tString ontologies = properties.getProperty(IKBox.KBOX_ONTOLOGIES_PROPERTY);\r\n\t\tString wrapperCls = properties.getProperty(IKBox.KBOX_WRAPPER_PROPERTY);\r\n\t\t\r\n\t\tThinklab.get().logger().info(\"opening kbox \" + kboxURI + \" with data uri \" + dataUri);\r\n\t\t\r\n\t\tif (protocol == null || protocol.equals(\"\"))\r\n\t\t\tthrow new ThinklabUndefinedKBoxException(\"kbox metadata for \" + kboxURI + \" don't specify a protocol\");\r\n\t\t\r\n\t\t/* handle \"internal\" protocol for OWL kboxes separately */\r\n\t\tif (protocol.equals(\"owl\")) {\r\n\t\t\treturn new OntologyKBox(dataUri);\r\n\t\t}\r\n\t\t\r\n\t\t/* load plugin for protocol; create kbox */\r\n\t\tKBoxHandler plu = kboxPlugins.get(protocol);\r\n\t\tif (plu == null)\r\n\t\t\tthrow new ThinklabUndefinedKBoxException(\"kbox protocol \" \r\n\t\t\t\t\t+ protocol + \" referenced in \" +\r\n\t\t\t\t\tkboxURI + \" is undefined\");\r\n\t\t\r\n\t\t/* \r\n\t\t * see if kbox requires ontologies that are not loaded and import them as necessary. \r\n\t\t * FIXME these should probably be considered temporary and loaded in the current session, not\r\n\t\t * imported. \r\n\t\t */\r\n\t\tif (ontologies != null && !ontologies.trim().equals(\"\")) {\r\n\t\t\tString[] onts = ontologies.split(\",\");\r\n\t\t\tfor (String ourl : onts) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tKnowledgeManager.get().getKnowledgeRepository().refreshOntology(new URL(ourl), null, false);\r\n\t\t\t\t} catch (MalformedURLException e) {\r\n\t\t\t\t\tthrow new ThinklabIOException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tret = plu.createKBox(kboxURI, protocol, dataUri, properties);\r\n\t\t\r\n\t\tif (ret != null && wrapperCls != null) {\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tClass<?> cls = Class.forName(wrapperCls);\r\n\t\t\t\tKBoxWrapper wrapper = (KBoxWrapper) cls.newInstance();\r\n\t\t\t\tif (wrapper != null) {\r\n\t\t\t\t\twrapper.initialize(ret);\r\n\t\t\t\t\tret = wrapper;\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new ThinklabIOException(\"kbox wrapper error: \" + e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn ret;\r\n\t}", "@Ignore\n @Test\n public void run_RL() {\n String configfile = \"C:\\\\Users\\\\gomes\\\\Desktop\\\\traffic_master\\\\n_Capstone_0426_9000.xml\";\n\n float duration = 3600f;\n float outdt = 300f;\n\n // Load ..............................\n api.OTM otm = null;\n\n try {\n otm = new api.OTM(configfile);\n\n// // Output requests .....................\n// List<Long> list_orig_link_ids = otm.scenario.get_link_ids();\n// otm.output.request_links_flow(null, list_orig_link_ids, outdt);\n// otm.output.request_links_veh(null, list_orig_link_ids, outdt);\n//\n// List<Long> ramp_ids = new ArrayList<>();\n// for(ActuatorInfo act_info : otm.scenario.get_actuators())\n// ramp_ids.add(act_info.target.getId());\n\n// ControllerCapacity controller = (ControllerCapacity) otm.scenario.get_actual_controller_with_id(1);\n\n // Qtable loop\n\n double[] sum_vehicles = new double[6];\n double[] sum_flow = new double[6];\n\n// for( int i=0 ; i<6 ; i++){\n//\n// // update control\n// for(Long ramp_id : ramp_ids) {\n// float rate_ramp = i*300f;\n// controller.set_rate_vph_for_actuator(ramp_id, rate_ramp);\n// }\n//\n// System.out.println(\"i=\" + i);\n//\n// otm.run(0,duration);\n//\n// // extract output .........................\n// sum_vehicles[i] = 0d;\n// sum_flow[i] = 0d;\n//\n// for(AbstractOutput output : otm.output.get_data()){\n//\n// if (output instanceof LinkFlow){\n//\n// for(Long link_id : list_orig_link_ids) {\n// Profile1D profile = ((LinkFlow) output).get_flow_profile_for_link_in_vph(link_id);\n// List<Double> values = profile.get_values();\n// // System.out.println(String.format(\"LinkFlow: id=%d num_values=%d\",link_id,values.size()));\n//\n// sum_flow[i] += values.stream().mapToDouble(x->x).sum();\n// }\n// }\n//\n//\n// if (output instanceof LinkVehicles) {\n// for(Long link_id : list_orig_link_ids) {\n// Profile1D profile = ((LinkVehicles) output).get_profile_for_linkid(link_id);\n// List<Double> values = profile.get_values();\n// // System.out.println(String.format(\"LinkVehicles: id=%d num_values=%d\",link_id,values.size()));\n//\n// sum_vehicles[i] += values.stream().mapToDouble(x->x).sum();\n// }\n// }\n//\n// }\n//\n// System.out.println(i + \"\\t\" + sum_flow[i] + \"\\t\" + sum_vehicles[i]);\n//\n// // do some Qtable calculation\n\n\n\n// }\n } catch (OTMException e) {\n e.printStackTrace();\n }\n\n }", "public static void main(String[] args) {\n\t\tVehicleClass car = new VehicleClass(8,1,120/3.6);\r\n\t\tVehicleClass truck = new VehicleClass(18,1.5,90/3.6);\r\n\t\tModel model = new Model();\r\n\t\tmodel.dt=0.2;\r\n\t\tArrayList<MacroCellMultiClass> cells = new ArrayList<MacroCellMultiClass>();\r\n\t\tint nrCells = 3;\r\n\t\t\r\n\t\tfor (int n=0; n<nrCells; n++) {\r\n\t\tMacroCellMultiClass mc = new MacroCellMultiClass(model);\r\n\t\t\r\n\t\tmc.addVehicleClass(car);\r\n\t\tmc.addVehicleClass(truck);\r\n\t\tmc.setWidth(3.5);\r\n\t\tmc.l = 50;\r\n\t\tcells.add(mc);\r\n\t\t\r\n\t\t\r\n\t\tmc.init();\r\n\t\t}\r\n\t\tcells.get(0).addOut(cells.get(1));\r\n\t\tfor (int n=1; n<nrCells-1; n++) {\r\n\t\t\tMacroCellMultiClass mc = cells.get(n);\r\n\t\t\tmc.addIn(cells.get(n-1));\r\n\t\t\tmc.addOut(cells.get(n+1));\r\n\t\t}\r\n\t\tcells.get(nrCells-1).addIn(cells.get(nrCells-2));\r\n\t\t\r\n\t\t//System.out.println(mc.getEffectiveDensity());\r\n\t\t\r\n\t\t//System.out.println(car.getAFreeFlow());\r\n\t\t//car.setVMax(130);\r\n\t\t//System.out.println(car.getAFreeFlow());\r\n\t\t//System.out.println(car.getBFreeFlow(85/3.6, 0.02));\r\n\t\t//System.out.println(car.getAFreeFlow());\r\n\t\t\r\n\t\tfor (int i=0; i<200; i++) {\r\n\t\t\tfor (MacroCellMultiClass mc: cells) {\r\n\t\tSystem.out.println(Arrays.toString(mc.KCell));\r\n\t\tmc.updateEffectiveDensity();\r\n\t\tSystem.out.println(mc.effDensity);\r\n\t\tmc.updateVelocity();\r\n\t\tSystem.out.println(Arrays.toString(mc.VCell));\r\n\t\tmc.updateVehicleShare();\r\n\t\tSystem.out.println(Arrays.toString(mc.vehicleShare));\r\n\t\tmc.updateFlow();\r\n\t\tSystem.out.println(Arrays.toString(mc.QCell));\r\n\t\tmc.updateEffectiveFlow();\r\n\t\tSystem.out.println(mc.effFlow);\r\n\t\t\t\r\n\t\t//System.out.println(mc.)\r\n\t\tmc.updateEffectiveSupply();\r\n\t\tSystem.out.println(mc.effSupply);\r\n\t\tmc.updateEffectiveDemand();\r\n\t\tSystem.out.println(mc.effDemand);\r\n\t\tmc.updateLabda();\r\n\t\tSystem.out.println(Arrays.toString(mc.labda));\r\n\t\tSystem.out.println(\"++++++++++++\");\r\n\t\t}\r\n\t\t\tfor (MacroCellMultiClass mc: cells) {\r\n\t\t\r\n\t\tmc.updateClassDemand();\r\n\t\tSystem.out.println(Arrays.toString(mc.classDemand));\r\n\t\t\r\n\t\tmc.updateClassSupply();\r\n\t\tSystem.out.println(Arrays.toString(mc.classSupply));\r\n\t\tSystem.out.println(\"++++++++++++\");\r\n\t\t\t}\r\n\t\t\tfor (MacroCellMultiClass mc: cells) {\r\n\t\tmc.updateClassFluxIn();\r\n\t\tSystem.out.println(Arrays.toString(mc.classFluxIn));\r\n\t\tmc.updateClassFluxOut();\r\n\t\tSystem.out.println(Arrays.toString(mc.classFluxOut));\r\n\t\tmc.updateDensity();\r\n\t\tSystem.out.println(Arrays.toString(mc.KCell));\r\n\t\tSystem.out.println(\"++++++++++++\");\r\n\t\t\r\n\t\t}\r\n\t\t\tSystem.out.println(\"-------------------------------\");\r\n\t\t}\r\n\t\t\r\n\t\r\n\t}", "@Test\n public void f9EditParametersTest() {\n clickOn(\"#assetTypeMenuBtn\").sleep(1000);\n\n //select 1st asset type\n Node node = lookup(\"#columnName\").nth(1).query();\n clickOn(node).sleep(1000);\n\n //go to model tab\n clickOn(scene.getRoot().lookup(\"#modelTab\")).sleep(1000);\n FlowPane allModels = (FlowPane) scene.getRoot().lookup(\"#modelsThumbPane\");\n Pane selectedModel = (Pane) allModels.getChildren().get(0);\n clickOn(selectedModel).sleep(1000);\n\n //Changing Parameters\n VBox paraBox = (VBox) scene.getRoot().lookup(\"#modelParameters\");\n Pane batchSizePara = (Pane) paraBox.getChildren().get(0);\n TextField batchSizeVal = (TextField) batchSizePara.getChildren().get(1);\n clickOn(batchSizeVal).type(KeyCode.BACK_SPACE).sleep(500).type(KeyCode.BACK_SPACE).sleep(500).write(\"60\").sleep(1500);\n\n Pane qrPara = (Pane) paraBox.getChildren().get(1);\n CheckBox qrVal = (CheckBox) qrPara.getChildren().get(1);\n clickOn(qrVal).sleep(1500);\n\n Pane collinearPara = (Pane) paraBox.getChildren().get(2);\n CheckBox colinearVal = (CheckBox) collinearPara.getChildren().get(1);\n clickOn(colinearVal).sleep(1500);\n\n //Parameter after changing it from the default value should be 160\n assertEquals(\"Batch Size value is a now 160\", \"160\", batchSizeVal.getText());\n\n //reset to default\n clickOn(scene.getRoot().lookup(\"#modelDefaultBtn\")).sleep(1000);\n clickOn(paraBox.getChildren().get(0)).sleep(1500);\n\n //Now go to the last model (Multilayer Perceptron)\n selectedModel = (Pane) allModels.getChildren().get(allModels.getChildren().size() - 1);\n clickOn(scene.getRoot().lookup(\"#modelTab\")).sleep(1000);\n\n moveBy(0, 200).scroll(65, VerticalDirection.UP);\n clickOn(selectedModel).sleep(1000);\n clickOn(scene.getRoot().lookup(\"#modelDefaultBtn\")).sleep(2000);\n\n //Change parameters\n Pane autoBuildPara = (Pane) paraBox.getChildren().get(0);\n CheckBox autoBuildVal = (CheckBox) autoBuildPara.getChildren().get(1);\n clickOn(autoBuildVal).sleep(1500);\n\n Pane showGUIPara = (Pane) paraBox.getChildren().get(2);\n CheckBox showGUIVal = (CheckBox) showGUIPara.getChildren().get(1);\n clickOn(showGUIVal).sleep(1500);\n\n Pane momentumPara = (Pane) paraBox.getChildren().get(3);\n TextField momentumVal = (TextField) momentumPara.getChildren().get(1);\n clickOn(momentumVal).type(KeyCode.BACK_SPACE).sleep(500).write(\"1\").sleep(1500);\n\n //Momentum after changing shouldn't be the default 0.2 value anymore\n assertFalse(\"Momentum is default 0.2\", momentumVal.getText().equals(\"0.2\"));\n\n Pane decayPara = (Pane) paraBox.getChildren().get(9);\n CheckBox decayVal = (CheckBox) decayPara.getChildren().get(1);\n clickOn(decayVal).sleep(1500);\n\n// //Go to RandomForest Model\n selectedModel = (Pane) allModels.getChildren().get(2);\n clickOn(selectedModel).sleep(1000);\n clickOn(scene.getRoot().lookup(\"#modelDefaultBtn\")).sleep(2000);\n\n// //Change parameters\n Pane execPara = (Pane) paraBox.getChildren().get(1);\n TextField execVal = (TextField) execPara.getChildren().get(1);\n clickOn(execVal).sleep(1500);\n//\n Pane calcBagPara = (Pane) paraBox.getChildren().get(3);\n CheckBox calcBagVal = (CheckBox) calcBagPara.getChildren().get(1);\n clickOn(calcBagVal).sleep(1500);\n//\n Pane bagSizePara = (Pane) paraBox.getChildren().get(6);\n TextField bagSizeVal = (TextField) bagSizePara.getChildren().get(1);\n clickOn(bagSizeVal).type(KeyCode.BACK_SPACE).sleep(500).type(KeyCode.BACK_SPACE).sleep(500).write(\"0\").sleep(1500);\n\n //Bag Size after changing shouldn't be the default 100 value anymore\n assertFalse(\"Bag size is default 100\", bagSizeVal.getText().equals(\"100\"));\n //Have parameters VBox\n assertNotNull(\"Parameters box for the model exists\", paraBox);\n\n clickOn(scene.getRoot().lookup(\"#modelDefaultBtn\")).sleep(2000);\n clickOn(paraBox.getChildren().get(0)).sleep(2000);\n }", "private void fourNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pB(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\"), pO(\"n1:5\")));\n n(tx, true, \"n2\", Stream.of(pB(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\"), pI(\"n2:5\")));\n n(tx, true, \"n3\", Stream.of(pB(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pO(\"n3:4\"), pI(\"n3:5\")));\n n(tx, true, \"n4\", Stream.of(pB(\"n4:1\"), pB(\"n4:2\"), pI(\"n4:3\"), pI(\"n4:4\"), pO(\"n4:5\")));\n l(tx, \"n1\", \"n1:5\", \"n2\", \"n2:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n4\", \"n4:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n2\", \"n2:3\", \"n4\", \"n4:3\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n3\", \"n3:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n4\", \"n4:5\", \"n3\", \"n3:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }", "private void initialize() {\n\t\t\ttry {\n\t\t\t\tFMAOBO fmaobo = new FMAOBO();\n\t\t\t\tTA ta = new TA (fmaobo);\n\t\t\t\tBp3d bp3d = new Bp3d();\n\t\t\t\t\t\t\t\t\n\t\t\t\tMap<String, TreeParent> treeParents = \n\t\t\t\t\tnew TreeMap<String, TreeParent>();\n\t\t\t\tMap<String, TreeObject> treeObjects = \n\t\t\t\t\tnew TreeMap<String, TreeObject>();\n\t\t\t\t\t\t\t\t\n\t\t\t\t/** TreeParent/TreeObject作成**/\n\t\t\t\tfor(String id : bp3d.getAllIds()){\t\t\t\t\n\t\t\t\t\tString label = \"\";\n\n\t\t\t\t\tif(ta.contains(id)){\n\t\t\t\t\t\tSet<String> taIds = new TreeSet<String>();\n\t\t\t\t\t\tSet<String> taKanjis = new TreeSet<String>();\n\t\t\t\t\t\tfor(TAEntry taEnt : ta.getTAByFmaId(id)){\n\t\t\t\t\t\t\ttaIds.add(taEnt.getTaId());\n\t\t\t\t\t\t\ttaKanjis.add(taEnt.getTaKanji());\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\tlabel = Bp3dUtility.join(taIds, \"/\") + \":\" + bp3d.getEntry(id).getEn() \n\t\t\t\t\t\t\t+ \":\" + Bp3dUtility.join(taKanjis, \"/\");\n\t\t\t\t\t}else{\t\t\t\t\t\t\n\t\t\t\t\t\tlabel = id + \":\" + bp3d.getEntry(id).getEn();\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif(bp3d.hasChild(id)){\n\t\t\t\t\t\ttreeParents.put(id, new TreeParent(label));\n\t\t\t\t\t}else{\n\t\t\t\t\t\ttreeObjects.put(id, new TreeObject(label));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/** addChild **/\n\t\t\t\tfor(String pid : bp3d.getReverseMemberOfs().keySet()){\n\t\t\t\t\tTreeParent parent = treeParents.get(pid);\n\t\t\t\t\tfor(String cid : bp3d.getChildren(pid)){\n\t\t\t\t\t\tif(bp3d.hasChild(cid)){\n\t\t\t\t\t\t\tparent.addChild(treeParents.get(cid));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif(parent == null){\n\t\t\t\t\t\t\t\tSystem.out.println(\"parent pid=null:\" + pid + \":\" + bp3d.getEntry(pid).getEn());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tparent.addChild(treeObjects.get(cid));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/** parentのないノードをrootにぶら下げる**/\n\t\t\t\tinvisibleRoot = new TreeParent(\"\");\n\t\t\t\t\n\t\t\t\tfor(String id : bp3d.getAllIds()){\n\t\t\t\t\tif(!bp3d.hasParent(id)){\n//\t\t\t\t\t\tSystem.out.println(id + \" has no parent.\");\n\t\t\t\t\t\tif(bp3d.hasChild(id)){\n\t\t\t\t\t\t\tinvisibleRoot.addChild((TreeParent)(treeParents.get(id)));\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tinvisibleRoot.addChild((TreeObject)(treeObjects.get(id)));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\t\t\n\t\t}", "public void addBox()\n {\n if(Student.sittingRia==false) {\n box = new BoxRia(\"chalkboard.png\",4,2);\n addObject(box,box.myRow,box.mySeat);\n chalk = new BoxRia(\"chalk.png\",0,0);\n addObject(chalk,2,3);\n }\n }", "public static void main(String[] args) throws Exception {\n //Used to build the topology\n TopologyBuilder builder = new TopologyBuilder();\n\n MongoClient mongo = new MongoClient(new ServerAddress(\"localhost\", 27017));\n final CreateCollectionOptions options = new CreateCollectionOptions();\n options.capped(true);\n options.sizeInBytes(10000);\n\n final MongoCollection coll = mongo.getDatabase(\"test\").getCollection(\"xdrs_crudos_reducida\");\n\n\n FrankestainAdapterSpout spout = new FrankestainAdapterSpout(\"localhost\", 27017, \"test\", \"xdrs_crudos_reducida\", new Document()) {\n\n private static final long serialVersionUID = 1L;\n\n @Override\n public void declareOutputFields(OutputFieldsDeclarer declarer) {\n\n declarer.declare(new Fields(\"id\"));\n }\n\n @Override\n public List<Object> dbObjectToStormTuple(Document document) {\n\n return tuple(document);\n }\n\n };\n // mongo.getDatabase(\"test\").createCollection(\"xdrs_crudos_reducida\", options);\n //mongo.dropDatabase(\"mongo_storm_tailable_cursor\");\n //Add the spout, with a name of 'spout'\n //and parallelism hint of 5 executors\n\n builder.setSpout(\"frank_spout\", spout);\n //builder.setSpout(\"frank_spout\", spout, 1);\n //Add the SplitSentence bolt, with a name of 'split'\n //and parallelism hint of 8 executors\n //shufflegrouping subscribes to the spout, and equally distributes\n //tuples (sentences) across instances of the SplitSentence bolt\n builder.setBolt(\"franktree_bolt_1\", new FrankestainTree()).shuffleGrouping(\"frank_spout\");\n // builder.setBolt(\"franktree_bolt_1\", new FrankestainTree(), 4).fieldsGrouping(\"frank_spout\", \"xdrs\", new Fields(\"fieldline\"));\n //builder.setBolt(\"franktree_bolt_1\", new FrankestainTree(), 1).shuffleGrouping(\"frank_spout\").shuffleGrouping(\"frankSpSons_bolt_7\");\n //Add the counter, with a name of 'count'\n //and parallelism hint of 12 executors\n //fieldsgrouping subscribes to the split bolt, and\n //ensures that the same word is sent to the same instance (group by field 'word')\n builder.setBolt(\"franksetint_bolt_2\", new FrankestainSetInterval()).shuffleGrouping(\"franktree_bolt_1\");\n/*\n builder.setBolt(\"franksearPM_bolt_3\", new FrankestainSearchPM(), 1).shuffleGrouping(\"franksetint_bolt_2\");\n\n builder.setBolt(\"frankIM_bolt_4\", new FrankestainIM(), 1).shuffleGrouping(\"franksearPM_bolt_3\");\n\n builder.setBolt(\"frankSwit_bolt_5\", new FrankestainSwitch(), 1).shuffleGrouping(\"frankIM_bolt_4\");\n\n builder.setBolt(\"frankSaGr_bolt_6\", new FrankestainSaveGroup(), 1).shuffleGrouping(\"frankSwit_bolt_5\");\n\n builder.setBolt(\"frankSpSons_bolt_7\", new FrankestainSplitSons(), 1).shuffleGrouping(\"frankSwit_bolt_5\").shuffleGrouping(\"franksearPM_bolt_3\");\n*/\n //new configuration\n Config conf = new Config();\n conf.setDebug(true);\n\n //If there are arguments, we are running on a cluster\n if (args != null && args.length > 0) {\n //parallelism hint to set the number of workers\n conf.setNumWorkers(3);\n //submit the topology\n StormSubmitter.submitTopology(args[0], conf, builder.createTopology());\n\n /*\n Manera de ejecutarlo modo remoto con StormSubmitter\n storm jar target/WordCount-1.0-SNAPSHOT.jar com.ayscom.example.WordCountTopology Mytopology_name\n */\n\n }\n //Otherwise, we are running locally\n else {\n //Cap the maximum number of executors that can be spawned\n //for a component to 3\n conf.setMaxTaskParallelism(3);\n //LocalCluster is used to run locally\n LocalCluster cluster = new LocalCluster();\n //submit the topology\n cluster.submitTopology(\"frankLocalTest\", conf, builder.createTopology());\n /*\n Manera de ejecutarlo manera local con LocalCluster, no se envia parametros.\n storm jar target/WordCount-1.0-SNAPSHOT.jar com.ayscom.example.WordCountTopology\n */\n //sleep\n Thread.sleep(5000);\n //shut down the cluster\n cluster.shutdown();\n }\n }", "private void computeLocalKB(){\n\t\tfor (String s : contextsSet) {\n\t\t\t//System.out.println(s);\n\t\t\t\n\t\t\tOWLOntology contextOntology = null;\n\t\t\ttry {\n\t\t\t\tcontextOntology = manager.createOntology();\n\t\t\t\t\n\t\t\t\tfor(String[] a : hasModuleAssociations){\n\t\t\t\t\tif(a[0].equals(s)){\n\t\t\t\t\t\t//System.out.println(\" -> \" + a[1]);\n\t\t\t\t\t\n\t\t\t\t\t\t//Check that to each module name a local ontology exists!\n\t\t\t\t\t\t//int moduleIndex = inputCKR.getLocalOntologyName().indexOf(a[1]);\n\t\t\t\t\t\tCKRModule mod = inputCKR.getLocalModule(a[1]);\n\t\t\t\t\t\n\t\t\t\t\t\tif (mod == null) {\n\t\t\t\t\t\t\tSystem.err.println(\"[!] Warning: no ontology associated to module \" + a[1]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmanager.addAxioms(contextOntology, \n\t\t\t\t\t\t\t\t\t//inputCKR.getLocalOntology().get(moduleIndex).getAxioms()\n\t\t\t\t\t\t\t\t\tmod.getModuleOntology().getAxioms());\n\t\t\t\t\t\t\t//System.out.println(\"Module \" + a[1] + \" added to \" + a[0]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//***DO NOT*** Add axioms from global ontology.\n\t\t\t\t//manager.addAxioms(contextOntology, inputCKR.getGlobalOntology().getAxioms());\n\t\t\t} catch (OWLOntologyCreationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t//if ((contextOntology == null) || (contextOntology.isEmpty()))\n\t\t\t//System.out.println(\"Warning: ontology for \" + s + \" is empty.\");\n\t\t\t\n\t\t\tcontextsOntologies.put(s, contextOntology);\n\t\t}\n\t}", "private void applyMetadataTemplateProjectES_BU_TF() {\n\t\tArrayList<ArtifactType> artifactTypes = new ArrayList<ArtifactType>();\n\t\tArrayList<DependencyType> dependencyTypes = new ArrayList<DependencyType>();\n\t\tArrayList<TaskType> taskTypes = new ArrayList<TaskType>();\n\t\tArrayList<RuleType> ruleTypes = new ArrayList<RuleType>();\n\t\tArrayList<Rule> rules = new ArrayList<Rule>();\n\t\t\n\t\tArrayList<ArtifactType> u = new ArrayList<ArtifactType>();\n\t\tArrayList<ArtifactType> p = new ArrayList<ArtifactType>();\n\t\tArrayList<DependencyType> d = new ArrayList<DependencyType>();\n\t\tString description = \"\";\n\t\t\n\t\tArtifactType ATstart = new ArtifactType(\"Start\",\".start\");\n\t\tArtifactType ATstory = new ArtifactType(\"Story\",\".txt\");\n\t\tArtifactType ATstoryTest = new ArtifactType(\"StoryTest\",\".java\");\n\t\tArtifactType ATinterface = new ArtifactType(\"Interface\",\".java\");\n\t\tArtifactType ATdomainClass = new ArtifactType(\"DomainClass\",\".java\");\n\t\tArtifactType ATdomainTest = new ArtifactType(\"DomainTest\",\".java\");\n\t\tartifactTypes.add(ATstart);\n\t\tartifactTypes.add(ATstory);\n\t\tartifactTypes.add(ATstoryTest);\n\t\tartifactTypes.add(ATinterface);\t\t\n\t\tartifactTypes.add(ATdomainClass);\n\t\tartifactTypes.add(ATdomainTest);\n\n\t\tu.add(ATstart);\n\t\tp.add(ATstory);\n\t\tDependencyType DTstory = new DependencyType(ATstart,ATstory,\"DTstory\");\n\t\td.add(DTstory);\n\t\tdependencyTypes.add(DTstory);\n\t\tdescription = \"Create a story for the project\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tu.add(ATstory);\n\t\tp.add(ATdomainTest);\n\t\tDependencyType DTdomainTest = new DependencyType(ATstory,ATdomainTest,\"DTdomainTest\");\n\t\td.add(DTdomainTest);\n\t\tDTdomainTest.setMultiplicity(0);\n\t\tdependencyTypes.add(DTdomainTest);\n\t\tdescription = \"Create a domain test for the story\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tu.add(ATdomainTest);\n\t\tp.add(ATdomainClass);\n\t\tDependencyType DTdomainClass = new DependencyType(ATdomainTest,ATdomainClass,\"DTdomainClass\");\n\t\td.add(DTdomainClass);\n\t\tdependencyTypes.add(DTdomainClass);\n\t\tdescription = \"Create a domain class for the domain test\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tu.add(ATdomainTest);\n\t\tp.add(ATinterface);\n\t \tDependencyType DTinterface = new DependencyType(ATdomainTest,ATinterface,\"DTinterface\");\n\t\td.add(DTinterface);\n\t\tdependencyTypes.add(DTinterface);\n\t\tdescription = \"Create a interface for the domain test\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tu.add(ATinterface);\n\t p.add(ATstoryTest);\n\t\tDependencyType DTstoryTest = new DependencyType(ATinterface,ATstoryTest,\"DTstoryTest\");\n\t\td.add(DTstoryTest);\n\t\tdependencyTypes.add(DTstoryTest);\n\t\tdescription = \"Create a story test for the interface\";\n\t\ttaskTypes.add(new TaskType(new ArrayList<ArtifactType>(u),new ArrayList<ArtifactType>(p),new ArrayList<DependencyType>(d),description));\n\t\tu.clear(); p.clear(); d.clear();\n\t\t\n\t\tstatus.setArtifactTypes(artifactTypes);\n\t\tstatus.setDependencyTypes(dependencyTypes);\n\t\tstatus.setTaskTypes(taskTypes);\t\n\t\tstatus.setRuleTypes(ruleTypes);\n\t\tstatus.setRules(rules);\n\t}", "public static void main(String[] args) throws IOException {\n\t\tFile dir = new File(\"/home/kevin/Simulators/catalogs/SWminAdefaultB\");\n\t\tFile geomFile = new File(dir, \"UCERF3.D3.1.1km.tri.2.flt\");\n//\t\tFile dir = new File(\"/data/kevin/simulators/catalogs/bruce/rundir2142\");\n//\t\tFile geomFile = new File(dir, \"zfault_Deepen.in\");\n\t\t\n\t\tList<SimulatorElement> elements = readGeometryFile(geomFile, 11, 'S');\n\t\tSystem.out.println(\"Loaded \"+elements.size()+\" elements\");\n//\t\tfor (Location loc : elements.get(0).getVertices())\n//\t\t\tSystem.out.println(loc);\n\t\tMinMaxAveTracker strikeTrack = new MinMaxAveTracker();\n\t\tMinMaxAveTracker dipTrack = new MinMaxAveTracker();\n\t\tfor (SimulatorElement e : elements) {\n\t\t\tFocalMechanism mech = e.getFocalMechanism();\n\t\t\tstrikeTrack.addValue(mech.getStrike());\n\t\t\tdipTrack.addValue(mech.getDip());\n\t\t\tif (Math.random() < 0.001)\n\t\t\t\tSystem.out.println(e.getID()+\". \"+e.getSectionName()+\" Mech: s=\"+mech.getStrike()\n\t\t\t\t\t+\"\\td=\"+mech.getDip()+\"\\tr=\"+mech.getRake());\n\t\t}\n\t\tSystem.out.println(\"Strikes: \"+strikeTrack);\n\t\tSystem.out.println(\"Dips: \"+dipTrack);\n\t\tSystem.exit(0);\n\t\t\n//\t\tFile eventsDir = new File(\"/home/kevin/Simulators/UCERF3_qlistbig2\");\n//\t\tFile eventsDir = new File(\"/home/kevin/Simulators/UCERF3_35kyrs\");\n\t\tFile eventsDir = dir;\n\t\t\n//\t\tboolean bigEndian = isBigEndian(new File(eventsDir, \"UCERF3base_80yrs.pList\"), elements);\n//\t\tlistFileDebug(new File(eventsDir, \"UCERF3base_80yrs.eList\"), 100, bigEndian, true);\n//\t\tboolean bigEndian = isBigEndian(new File(eventsDir, \"UCERF3_35kyrs.pList\"), elements);\n//\t\tlistFileDebug(new File(eventsDir, \"UCERF3_35kyrs.eList\"), 100, bigEndian, true);\n\t\t\n//\t\tList<RSQSimEvent> events = readEventsFile(eventsDir, elements, Lists.newArrayList(new MagRangeRuptureIdentifier(7d, 10d)));\n\t\tList<RSQSimEvent> events = readEventsFile(eventsDir, elements);\n\t\tSystem.out.println(\"Loaded \"+events.size()+\" events\");\n\t\tSystem.out.println(\"Duration: \"+SimulatorUtils.getSimulationDurationYears(events)+\" years\");\n\t\tfor (double minMag : new double[] { 6d, 6.5d, 7d }) {\n\t\t\tList<RSQSimEvent> subEvents = new MagRangeRuptureIdentifier(minMag, 10d).getMatches(events);\n\t\t\tSystem.out.println(subEvents.size()+\" events M>=\"+minMag);\n\t\t\tMinMaxAveTracker ptsTrack = new MinMaxAveTracker();\n\t\t\tfor (RSQSimEvent e : subEvents)\n\t\t\t\tptsTrack.addValue(e.getNumElements());\n\t\t\tSystem.out.println(\"Points: \"+ptsTrack);\n\t\t}\n\t\t\n//\t\tSectionIDIden safIden = SectionIDIden.getUCERF3_SAF(FaultModels.FM3_1,\n//\t\t\t\tRSQSimUtils.getUCERF3SubSectsForComparison(FaultModels.FM3_1, DeformationModels.GEOLOGIC), elements);\n//\t\tRuptureIdentifier ssafIden = new LogicalAndRupIden(safIden, new RegionIden(new CaliforniaRegions.RELM_SOCAL()));\n//\t\tList<RSQSimEvent> safEvents = ssafIden.getMatches(events);\n//\t\t\n//\t\tdouble delta = 5d;\n//\t\tfor (int i=0; i<safEvents.size()-3; i++) {\n//\t\t\tRSQSimEvent e1 = safEvents.get(i);\n//\t\t\tRSQSimEvent e2 = safEvents.get(i+1);\n//\t\t\tRSQSimEvent e3 = safEvents.get(i+2);\n//\t\t\tdouble t1 = e1.getTimeInYears();\n//\t\t\tdouble t2 = e2.getTimeInYears();\n//\t\t\tdouble t3 = e3.getTimeInYears();\n//\t\t\tdouble myDelta = t3 - t1;\n//\t\t\tif (myDelta < delta) {\n//\t\t\t\tSystem.out.println(\"****************\");\n//\t\t\t\tSystem.out.println(e1.getID()+\" M\"+(float)e1.getMagnitude());\n//\t\t\t\tSystem.out.println(e2.getID()+\" M\"+(float)e1.getMagnitude()+\" \"+(float)(t2-t1)+\" yrs later\");\n//\t\t\t\tSystem.out.println(e3.getID()+\" M\"+(float)e3.getMagnitude()+\" \"+(float)(t3-t2)+\" yrs later\");\n//\t\t\t}\n//\t\t}\n\t\t\n//\t\twhile (true) {\n//\t\t\ttry {\n//\t\t\t\tThread.sleep(1000);\n//\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n//\t\t\t}\n//\t\t}\n\t\t\n//\t\tFaultModels fm = FaultModels.FM3_1;\n//\t\tSectionIDIden garlockIden = SectionIDIden.getUCERF3_Garlock(\n//\t\t\t\tfm, RSQSimUtils.getUCERF3SubSectsForComparison(fm, fm.getFilterBasis()), elements);\n//\t\tSectionIDIden safIden = SectionIDIden.getUCERF3_SAF(\n//\t\t\t\tfm, RSQSimUtils.getUCERF3SubSectsForComparison(fm, fm.getFilterBasis()), elements);\n//\t\tLogicalAndRupIden safSoCalIden = new LogicalAndRupIden(safIden, new RegionIden(new CaliforniaRegions.RELM_SOCAL()));\n//\t\tSystem.out.println(\"Num M>=7 events on both Garlock AND S.SAF: \"+\n//\t\t\t\tnew LogicalAndRupIden(safSoCalIden, garlockIden).getMatches(events).size());\n//\t\tfor (double fract : new double[] {0d, 0.25, 0.5, 0.75, 1d}) {\n//\t\t\tgarlockIden.setMomentFractForInclusion(fract);\n//\t\t\tSystem.out.println(\"Garlock M>=7 events with \"+(float)(fract*100d)+\" % moment: \"+garlockIden.getMatches(events).size());\n//\t\t\tsafIden.setMomentFractForInclusion(fract);\n//\t\t\tSystem.out.println(\"S.SAF M>=7 events with \"+(float)(fract*100d)+\" % moment: \"+safSoCalIden.getMatches(events).size());\n//\t\t}\n//\t\tdouble duration = events.get(events.size()-1).getTimeInYears() - events.get(0).getTimeInYears();\n//\t\tSystem.out.println(\"Duration: \"+duration+\" years\");\n//\t\tSystem.out.println(\"\\t\"+events.get(0).getTimeInYears()+\" to \"+events.get(events.size()-1).getTimeInYears()+\" years\");\n//\t\tMinMaxAveTracker magTrack = new MinMaxAveTracker();\n//\t\tfor (EQSIM_Event event : events)\n//\t\t\tmagTrack.addValue(event.getMagnitude());\n//\t\tSystem.out.println(\"Mags: \"+magTrack);\n//\t\t\n//\t\tRegionIden soCalIden = new RegionIden(new CaliforniaRegions.RELM_SOCAL());\n//\t\tsoCalIden.getMatches(events);\n\t}", "private Model getThisModel(String name, Model model) {\n\t\t\t\n\t\t\t Model modret=ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);\n\t\t\t\t String text=dbs.getModel(name);\n\t\t\t\t\n\t\t\t\t//System.out.println(\"TEXT\"+text+\"TEXT!!!\");\n\t\t\t\t if(text==null){\n\t\t\t\t\t modret.setNsPrefix(\"foaf\", NS.FOAF);\n\t\t\t\t\t\tmodret.setNsPrefix(\"cisp\", NS.CISP);\n\t\t\t\t\t\tmodret.setNsPrefix(\"prov\", NS.PROV);\n\t\t\t\t\t\tmodret.setNsPrefix(\"rdf\", NS.RDF);\n\t\t\t\t\treturn modret;\n\t\t\t\t }\n\t\t\t\t else{\n\t\t\t\t\t //read model \n\t\t\t\t\t InputStream input = new ByteArrayInputStream(text.getBytes());\n\t \n\t\t\t\t\t modret.read(input, null,\"RDF/JSON\");\n\t\t\t\t\t modret.setNsPrefix(\"foaf\", NS.FOAF);\n\t\t\t\t\t\tmodret.setNsPrefix(\"cisp\", NS.CISP);\n\t\t\t\t\t\tmodret.setNsPrefix(\"prov\", NS.PROV);\n\t\t\t\t\t\tmodret.setNsPrefix(\"rdf\", NS.RDF);\n\t\t\t\t }\n\t\t\t\t return modret;\n\t \n\t\t }", "private static native long createEdgeBoxes_0(float alpha, float beta, float eta, float minScore, int maxBoxes, float edgeMinMag, float edgeMergeThr, float clusterMinMag, float maxAspectRatio, float minBoxArea, float gamma, float kappa);", "private void postProcessComp(GUIMain guiMn, Tissue tiss,\n DefaultMutableTreeNode tissueBranch, CompartmentSBML insideComp\n ) {\n// System.out.println(\"\\nentering postProcessComp, insideComp id: \" + insideComp.getIdentity());\n if (insideComp.getIdentity().contentEquals(\"C_c\")) {\n int y = 0;\n }\n NodeLeaf insideLeaf;\n if (insideComp.outside != null) {\n CompartmentSBML outsideComp;\n\n outsideComp = findOutsideComp(tiss, insideComp);\n if (outsideComp == null) {\n System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n return ;\n }\n\n DefaultMutableTreeNode outsideCompDMT = null;\n while (outsideCompDMT == null) {\n outsideCompDMT = compToTree(tissueBranch, outsideComp);\n if (outsideCompDMT == null) {\n// System.out.println(\"\\noutsideCompDMT call to processComp: \" + insideComp.getIdentity());\n processComp(guiMn, outsideComp, tissueBranch);\n }\n }\n \n String outsideCompId = outsideComp.getIdentity();\n if (insideComp.outside.contentEquals(outsideCompId)) { // FIXME \n // we found the compartment pointer\n insideLeaf = new NodeLeaf(tiss, \"./data/images/compartment.gif\");\n String namu = insideComp.getIdentity();\n insideLeaf.setName(namu);\n insideLeaf.setCompartment(insideComp);\n\n // does this object already exist, if so attach its children to this object parent\n DefaultMutableTreeNode pathExistLeaf = guiMn.simMain.st.contains(tissueBranch, insideLeaf);\n if (pathExistLeaf == null) {\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, insideLeaf, true);\n// System.out.println(\"add insideLeaf 3: \" + insideLeaf + \" to outsideCompDMT; \" + outsideCompDMT);\n return;\n } else {\n // this object already exists, remove it from its old position\n guiMn.simMain.st.removeObject(guiMn, pathExistLeaf, true);\n \n // attach its children to this object parent\n guiMn.simMain.st.addObject(guiMn, outsideCompDMT, pathExistLeaf, true);\n// System.out.println(\"add pathExistLeaf to outsideCompDMT; \" + outsideCompDMT);\n // FIXME remove old pathExistLeaf\n return;\n }\n } else {\n// System.out.println(\"leaving 1\");\n }\n } else {\n// System.out.println(\"leaving 2\");\n }\n\n return;\n }", "@Test\n public void shouldCreateKnownBsmCoreData() {\n \n Integer testMsgCnt = 127;\n Integer expectedMsgCnt = 127;\n \n Integer testId = 0b11111111111111111111111111111111;\n String expectedId = \"FF\";\n \n Integer testSec = 65534;\n Integer expectedSec = 65534;\n \n Integer testLat = 900000000;\n BigDecimal expectedLat = BigDecimal.valueOf(90.0000000).setScale(7);\n \n Integer testLong = 1800000000;\n BigDecimal expectedLong = BigDecimal.valueOf(180.0000000).setScale(7);\n \n Integer testElev = 61439;\n BigDecimal expectedElev = BigDecimal.valueOf(6143.9);\n \n // Positional accuracy\n Integer testSemiMajorAxisAccuracy = 254;\n BigDecimal expectedSemiMajorAxisAccuracy = BigDecimal.valueOf(12.70).setScale(2);\n \n Integer testSemiMinorAxisAccuracy = 254;\n BigDecimal expectedSemiMinorAxisAccuracy = BigDecimal.valueOf(12.70).setScale(2);\n \n Integer testSemiMajorAxisOrientation = 65534;\n BigDecimal expectedSemiMajorAxisOrientation = BigDecimal.valueOf(359.9945078786);\n \n \n Integer testTransmissionState = 6;\n String expectedTransmissionState = \"reserved3\";\n \n Integer testSpeed = 8190;\n BigDecimal expectedSpeed = BigDecimal.valueOf(163.80).setScale(2);\n \n Integer testHeading = 28799;\n BigDecimal expectedHeading = BigDecimal.valueOf(359.9875);\n \n Integer testSteeringWheelAngle = 126;\n BigDecimal expectedSteeringWheelAngle = BigDecimal.valueOf(189.0).setScale(1);\n \n // Acceleration set \n Integer testAccelLong = 2000;\n BigDecimal expectedAccelLong = BigDecimal.valueOf(20.00).setScale(2);\n \n Integer testAccelLat = 2000;\n BigDecimal expectedAccelLat = BigDecimal.valueOf(20.00).setScale(2);\n \n Integer testAccelVert = 127;\n BigDecimal expectedAccelVert = BigDecimal.valueOf(2.54);\n \n Integer testAccelYaw = 32767;\n BigDecimal expectedAccelYaw = BigDecimal.valueOf(327.67);\n \n // Brake system status\n byte[] testWheelBrakesBytes = new byte[1];\n testWheelBrakesBytes[0] = (byte) 0b10000000;\n String expectedBrakeAppliedStatus = \"unavailable\";\n \n Integer testTractionControlStatus = 3;\n String expectedTractionControlStatus = \"engaged\";\n \n Integer testAntiLockBrakeStatus = 3;\n String expectedAntiLockBrakeStatus = \"engaged\";\n \n Integer testStabilityControlStatus = 3;\n String expectedStabilityControlStatus = \"engaged\";\n \n Integer testBrakeBoostApplied = 2;\n String expectedBrakeBoostApplied = \"on\";\n \n Integer testAuxiliaryBrakeStatus = 3;\n String expectedAuxiliaryBrakeStatus = \"reserved\";\n \n // Vehicle size\n Integer testVehicleWidth = 1023;\n Integer expectedVehicleWidth = 1023;\n \n Integer testVehicleLength = 4095;\n Integer expectedVehicleLength = 4095;\n \n BSMcoreData testcd = new BSMcoreData();\n testcd.msgCnt = new MsgCount(testMsgCnt);\n testcd.id = new TemporaryID(new byte[]{testId.byteValue()});\n testcd.secMark = new DSecond(testSec);\n testcd.lat = new Latitude(testLat);\n testcd._long = new Longitude(testLong);\n testcd.elev = new Elevation(testElev);\n testcd.accuracy = new PositionalAccuracy(\n new SemiMajorAxisAccuracy(testSemiMajorAxisAccuracy),\n new SemiMinorAxisAccuracy(testSemiMinorAxisAccuracy),\n new SemiMajorAxisOrientation(testSemiMajorAxisOrientation));\n testcd.transmission = new TransmissionState(testTransmissionState);\n testcd.speed = new Speed(testSpeed);\n testcd.heading = new Heading(testHeading);\n testcd.angle = new SteeringWheelAngle(testSteeringWheelAngle);\n testcd.accelSet = new AccelerationSet4Way(\n new Acceleration(testAccelLong),\n new Acceleration(testAccelLat),\n new VerticalAcceleration(testAccelVert),\n new YawRate(testAccelYaw));\n testcd.brakes = new BrakeSystemStatus(\n new BrakeAppliedStatus(testWheelBrakesBytes),\n new TractionControlStatus(testTractionControlStatus),\n new AntiLockBrakeStatus(testAntiLockBrakeStatus),\n new StabilityControlStatus(testStabilityControlStatus),\n new BrakeBoostApplied(testBrakeBoostApplied),\n new AuxiliaryBrakeStatus(testAuxiliaryBrakeStatus));\n testcd.size = new VehicleSize(\n new VehicleWidth(testVehicleWidth),\n new VehicleLength(testVehicleLength));\n \n BasicSafetyMessage testbsm = new BasicSafetyMessage();\n testbsm.coreData = testcd;\n \n J2735Bsm actualbsm = null;\n try {\n actualbsm = OssBsm.genericBsm(testbsm);\n \n if (actualbsm.coreData == null) {\n fail(\"Bsm core data failed to populate\");\n }\n \n } catch (OssBsmPart2Exception e) {\n fail(\"Unexpected exception: \" + e.getClass());\n }\n \n J2735BsmCoreData actualcd = actualbsm.coreData;\n \n assertEquals(\"Incorrect message count\", expectedMsgCnt, actualcd.msgCnt);\n assertEquals(\"Incorrect message id\", expectedId, actualcd.id);\n assertEquals(\"Incorrect second\", expectedSec, actualcd.secMark);\n assertEquals(\"Incorrect lat position\", expectedLat, actualcd.position.getLatitude());\n assertEquals(\"Incorrect long position\", expectedLong, actualcd.position.getLongitude());\n assertEquals(\"Incorrect elev position\", expectedElev, actualcd.position.getElevation());\n assertEquals(\"Incorrect semi major accuracy\", expectedSemiMajorAxisAccuracy, actualcd.accuracy.semiMajor);\n assertEquals(\"Incorrect semi minor accuracy\", expectedSemiMinorAxisAccuracy, actualcd.accuracy.semiMinor);\n assertEquals(\"Incorrect semi major orient\", expectedSemiMajorAxisOrientation, actualcd.accuracy.orientation);\n assertEquals(\"Incorrect transmission state\", expectedTransmissionState, actualcd.transmission.name());\n assertEquals(\"Incorrect speed\", expectedSpeed, actualcd.speed);\n assertEquals(\"Incorrect heading\", expectedHeading, actualcd.heading);\n assertEquals(\"Incorrect steering wheel angle\", expectedSteeringWheelAngle, actualcd.angle);\n assertEquals(\"Incorrect accel long\", expectedAccelLong, actualcd.accelSet.getAccelLong());\n assertEquals(\"Incorrect accel lat\", expectedAccelLat, actualcd.accelSet.getAccelLat());\n assertEquals(\"Incorrect accel vert\", expectedAccelVert, actualcd.accelSet.getAccelVert());\n assertEquals(\"Incorrect accel yaw\", expectedAccelYaw, actualcd.accelSet.getAccelYaw());\n for (Map.Entry<String, Boolean> curVal: actualcd.brakes.wheelBrakes.entrySet()) {\n if (curVal.getKey() == expectedBrakeAppliedStatus) {\n assertTrue(\"Incorrect brake applied status, expected \" + curVal.getKey() + \" to be true\", curVal.getValue());\n } else {\n assertFalse(\"Incorrect brake applied status, expected \" + curVal.getKey() + \" to be false\", curVal.getValue());\n }\n }\n assertEquals(\"Incorrect brake tcs status\", expectedTractionControlStatus, actualcd.brakes.traction);\n assertEquals(\"Incorrect brake abs status\", expectedAntiLockBrakeStatus, actualcd.brakes.abs);\n assertEquals(\"Incorrect brake scs status\", expectedStabilityControlStatus, actualcd.brakes.scs);\n assertEquals(\"Incorrect brake boost status\", expectedBrakeBoostApplied, actualcd.brakes.brakeBoost);\n assertEquals(\"Incorrect brake aux status\", expectedAuxiliaryBrakeStatus, actualcd.brakes.auxBrakes);\n assertEquals(\"Incorrect vehicle width\", expectedVehicleWidth, actualcd.size.getWidth());\n assertEquals(\"Incorrect vehicle length\", expectedVehicleLength, actualcd.size.getLength());\n }", "public static void main(String[] args) {\n neqsim.thermo.system.SystemInterface feedGas = new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0,\n 10.00);\n feedGas.addComponent(\"nitrogen\", 1.03);\n feedGas.addComponent(\"CO2\", 1.42);\n feedGas.addComponent(\"methane\", 83.88);\n feedGas.addComponent(\"ethane\", 8.07);\n feedGas.addComponent(\"propane\", 3.54);\n feedGas.addComponent(\"i-butane\", 0.54);\n feedGas.addComponent(\"n-butane\", 0.84);\n feedGas.addComponent(\"i-pentane\", 0.21);\n feedGas.addComponent(\"n-pentane\", 0.19);\n feedGas.addComponent(\"n-hexane\", 0.28);\n feedGas.addComponent(\"water\", 0.0);\n feedGas.addComponent(\"TEG\", 0);\n feedGas.createDatabase(true);\n feedGas.setMixingRule(10);\n feedGas.setMultiPhaseCheck(true);\n\n Stream dryFeedGas = new Stream(\"dry feed gas\", feedGas);\n dryFeedGas.setFlowRate(11.23, \"MSm3/day\");\n dryFeedGas.setTemperature(30.4, \"C\");\n dryFeedGas.setPressure(52.21, \"bara\");\n StreamSaturatorUtil saturatedFeedGas = new StreamSaturatorUtil(dryFeedGas);\n Stream waterSaturatedFeedGas = new Stream(saturatedFeedGas.getOutStream());\n saturatedFeedGas.setName(\"water saturator\");\n neqsim.thermo.system.SystemInterface feedTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n feedTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.02, 0.98 });\n\n Stream TEGFeed = new Stream(\"lean TEG to absorber\", feedTEG);\n TEGFeed.setFlowRate(6.1 * 1100.0, \"kg/hr\");\n TEGFeed.setTemperature(35.4, \"C\");\n TEGFeed.setPressure(52.21, \"bara\");\n\n SimpleTEGAbsorber absorber = new SimpleTEGAbsorber(\"SimpleTEGAbsorber\");\n absorber.addGasInStream(waterSaturatedFeedGas);\n absorber.addSolventInStream(TEGFeed);\n absorber.setNumberOfStages(10);\n absorber.setStageEfficiency(0.35);\n\n Stream dehydratedGas = new Stream(absorber.getGasOutStream());\n dehydratedGas.setName(\"dry gas from absorber\");\n Stream richTEG = new Stream(absorber.getSolventOutStream());\n\n ThrottlingValve glycol_flash_valve = new ThrottlingValve(richTEG);\n glycol_flash_valve.setName(\"Rich TEG HP flash valve\");\n glycol_flash_valve.setOutletPressure(4.9);\n\n Heater richGLycolHeaterCondeser = new Heater(glycol_flash_valve.getOutStream());\n richGLycolHeaterCondeser.setName(\"rich TEG preheater\");\n richGLycolHeaterCondeser.setOutTemperature(273.15 + 35.5);\n\n Heater richGLycolHeater = new Heater(richGLycolHeaterCondeser.getOutStream());\n richGLycolHeater.setName(\"rich TEG heater HP\");\n richGLycolHeater.setOutTemperature(273.15 + 62.0);\n\n Separator flashSep = new Separator(richGLycolHeater.getOutStream());\n flashSep.setName(\"degasing separator\");\n Stream flashGas = new Stream(flashSep.getGasOutStream());\n flashGas.setName(\"gas from degasing separator\");\n Stream flashLiquid = new Stream(flashSep.getLiquidOutStream());\n flashLiquid.setName(\"liquid from degasing separator\");\n\n Heater richGLycolHeater2 = new Heater(flashLiquid);\n richGLycolHeater2.setName(\"LP rich glycol heater\");\n richGLycolHeater2.setOutTemperature(273.15 + 139.0);\n richGLycolHeater2.setOutPressure(1.23);\n\n Mixer mixerTOreboiler = new Mixer(\"reboil mxer\");\n mixerTOreboiler.addStream(richGLycolHeater2.getOutStream());\n\n Heater heaterToReboiler = new Heater(mixerTOreboiler.getOutStream());\n heaterToReboiler.setOutTemperature(273.15 + 206.6);\n\n Separator regenerator2 = new Separator(heaterToReboiler.getOutStream());\n\n Stream gasFromRegenerator = new Stream(regenerator2.getGasOutStream());\n\n Heater sepregenGasCooler = new Heater(gasFromRegenerator);\n sepregenGasCooler.setOutTemperature(273.15 + 109.0);\n sepregenGasCooler.setOutPressure(1.23);\n//\t\tsepregenGasCooler.setEnergyStream(richGLycolHeaterCondeser.getEnergyStream());\n\n Separator sepRegen = new Separator(sepregenGasCooler.getOutStream());\n\n Stream liquidRegenReflux = new Stream(sepRegen.getLiquidOutStream());\n\n Recycle resycle2 = new Recycle(\"reflux resycle\");\n resycle2.addStream(liquidRegenReflux);\n\n Heater coolerRegenGas = new Heater(sepRegen.getGasOutStream());\n coolerRegenGas.setOutTemperature(273.15 + 35.5);\n\n Separator sepregenGas = new Separator(coolerRegenGas.getOutStream());\n\n Stream gasToFlare = new Stream(sepregenGas.getGasOutStream());\n\n Stream liquidToTrreatment = new Stream(sepregenGas.getLiquidOutStream());\n\n Stream hotLeanTEG = new Stream(regenerator2.getLiquidOutStream());\n\n neqsim.thermo.system.SystemInterface stripGas = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n stripGas.setMolarComposition(new double[] { 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 });\n\n Stream strippingGas = new Stream(\"stripGas\", stripGas);\n strippingGas.setFlowRate(70.0, \"kg/hr\");\n strippingGas.setTemperature(206.6, \"C\");\n strippingGas.setPressure(1.23, \"bara\");\n\n WaterStripperColumn stripper = new WaterStripperColumn(\"TEG stripper\");\n stripper.addGasInStream(strippingGas);\n stripper.addSolventInStream(hotLeanTEG);\n stripper.setNumberOfStages(10);\n stripper.setStageEfficiency(0.5);\n\n Recycle resycle3 = new Recycle(\"gas stripper resycle\");\n resycle3.addStream(stripper.getGasOutStream());\n\n Pump hotLeanTEGPump = new Pump(stripper.getSolventOutStream());\n hotLeanTEGPump.setName(\"hot lean TEG pump\");\n hotLeanTEGPump.setOutletPressure(20.0);\n\n Heater coolerhOTteg = new Heater(hotLeanTEGPump.getOutStream());\n coolerhOTteg.setName(\"hot lean TEG cooler\");\n coolerhOTteg.setOutTemperature(273.15 + 116.8);\n\n Heater coolerhOTteg2 = new Heater(coolerhOTteg.getOutStream());\n coolerhOTteg2.setName(\"medium hot lean TEG cooler\");\n coolerhOTteg2.setOutTemperature(273.15 + 89.3);\n\n Heater coolerhOTteg3 = new Heater(coolerhOTteg2.getOutStream());\n coolerhOTteg3.setName(\"lean TEG cooler\");\n coolerhOTteg3.setOutTemperature(273.15 + 44.85);\n\n Pump hotLeanTEGPump2 = new Pump(coolerhOTteg3.getOutStream());\n hotLeanTEGPump2.setName(\"lean TEG HP pump\");\n hotLeanTEGPump2.setOutletPressure(52.21);\n\n Stream leanTEGtoabs = new Stream(hotLeanTEGPump2.getOutStream());\n leanTEGtoabs.setName(\"lean TEG to absorber\");\n\n neqsim.thermo.system.SystemInterface pureTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone();\n pureTEG.setMolarComposition(new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 });\n\n Stream makeupTEG = new Stream(\"lean TEG to absorber\", pureTEG);\n makeupTEG.setFlowRate(1e-6, \"kg/hr\");\n makeupTEG.setTemperature(35.4, \"C\");\n makeupTEG.setPressure(52.21, \"bara\");\n\n Calculator makeupCalculator = new Calculator(\"makeup calculator\");\n makeupCalculator.addInputVariable(dehydratedGas);\n makeupCalculator.addInputVariable(flashGas);\n makeupCalculator.addInputVariable(gasToFlare);\n makeupCalculator.addInputVariable(liquidToTrreatment);\n makeupCalculator.setOutputVariable(makeupTEG);\n\n StaticMixer makeupMixer = new StaticMixer(\"makeup mixer\");\n makeupMixer.addStream(leanTEGtoabs);\n makeupMixer.addStream(makeupTEG);\n\n Recycle resycleLeanTEG = new Recycle(\"lean TEG resycle\");\n resycleLeanTEG.addStream(makeupMixer.getOutStream());\n\n neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem();\n operations.add(dryFeedGas);\n operations.add(saturatedFeedGas);\n operations.add(waterSaturatedFeedGas);\n operations.add(TEGFeed);\n operations.add(absorber);\n operations.add(dehydratedGas);\n operations.add(richTEG);\n operations.add(glycol_flash_valve);\n operations.add(richGLycolHeaterCondeser);\n operations.add(richGLycolHeater);\n operations.add(flashSep);\n operations.add(flashGas);\n operations.add(flashLiquid);\n operations.add(richGLycolHeater2);\n operations.add(mixerTOreboiler);\n operations.add(heaterToReboiler);\n operations.add(regenerator2);\n operations.add(gasFromRegenerator);\n operations.add(sepregenGasCooler);\n operations.add(sepRegen);\n operations.add(liquidRegenReflux);\n operations.add(resycle2);\n\n operations.add(coolerRegenGas);\n operations.add(sepregenGas);\n operations.add(gasToFlare);\n operations.add(liquidToTrreatment);\n operations.add(hotLeanTEG);\n operations.add(strippingGas);\n operations.add(stripper);\n\n operations.add(resycle3);\n operations.add(hotLeanTEGPump);\n operations.add(coolerhOTteg);\n operations.add(coolerhOTteg2);\n operations.add(coolerhOTteg3);\n operations.add(hotLeanTEGPump2);\n operations.add(leanTEGtoabs);\n operations.add(makeupCalculator);\n operations.add(makeupTEG);\n operations.add(makeupMixer);\n operations.add(resycleLeanTEG);\n\n operations.run();\n richGLycolHeater2.getOutStream().getFluid().display();\n System.out.println(\"Energy reboiler \" + heaterToReboiler.getDuty());\n mixerTOreboiler.addStream(liquidRegenReflux);\n mixerTOreboiler.addStream(resycle3.getOutStream());\n //\n operations.run();\n absorber.replaceSolventInStream(resycleLeanTEG.getOutStream());\n operations.run();\n // richGLycolHeater2.getOutStream().getFluid().display();\n\n System.out.println(\"Energy reboiler 2 \" + heaterToReboiler.getDuty());\n\n System.out.println(\"wt lean TEG after stripper \"\n + ((WaterStripperColumn) operations.getUnit(\"TEG stripper\")).getSolventOutStream().getFluid()\n .getPhase(\"aqueous\").getWtFrac(\"TEG\"));\n\n operations.save(\"c:/temp/TEGprocessSimple.neqsim\");\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minResultConfidence = 0.8f;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_FIRST_ELEMENT, LABEL_SECOND_ELEMENT);\n }", "public void test_sf_940570() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RDFS_INF );\n OntClass C = m.createClass( NS + \"C\" );\n Resource a = m.createResource( NS + \"a\", C );\n \n TestUtil.assertIteratorValues( this, m.listIndividuals(), new Object[] {a} );\n \n OntModel dm = ModelFactory.createOntologyModel( OntModelSpec.DAML_MEM_RULE_INF );\n OntClass D = dm.createClass( NS + \"D\" );\n Resource b = dm.createResource( NS + \"b\", D );\n \n TestUtil.assertIteratorValues( this, dm.listIndividuals(), new Object[] {b} );\n }", "static void trial4() {\n ModelBuilder modelBuilder = new ModelBuilder();\n Model cubeModel = modelBuilder.createBox(\n 5f,\n 5f,\n 5f,\n new Material( ColorAttribute.createDiffuse(Color.GREEN) ),\n Usage.Position);\n Mesh cubeMesh = cubeModel.meshes.get(0);\n\n // There are 36 vertex indices\n // I take it this is because there are 2 triangle per face\n // 3 x 2 x 6 = 36\n System.err.println(cubeMesh.getNumIndices());\n\n short[] cubeIndices = new short[36];\n cubeMesh.getIndices(cubeIndices);\n for (int i = 0; i < 36; i+=3) {\n for (int j = 0; j <= 2; j++) {\n System.err.printf(\"%3d \", cubeIndices[i+j]);\n }\n System.err.println();\n }\n\n }", "private ArrayList<Tensor<?>> Funcionar_salida_Ant_umbral(float location, float email, float imei, float device, float serialnumber, float macaddress, float advertiser) {\n float n_epochs = 1;\n\n float output = 0; //y\n\n //First, create an input tensor:\n /*\n\n */\n\n\n //**** TEORIA *******\n //First, create an input tensor:\n //Tensor input = Tensor.create(features);\n // float[][] output = new float[1][1];\n //Then perform inference by:\n //Tensor op_tensor = sess.runner().feed(\"input\", input).fetch(\"output\").run().get(0).expect(Float.class);\n //Copy this output to a float array using:\n //op_tensor.copyTo(output);\n // values.copyTo(output);\n Tensor input_location = Tensor.create(location);\n Tensor input_email = Tensor.create(email);\n Tensor input_imei = Tensor.create(imei);\n Tensor input_device = Tensor.create(device);\n Tensor input_serialnumber = Tensor.create(serialnumber);\n Tensor input_macaddress = Tensor.create(macaddress);\n Tensor input_advertiser = Tensor.create(advertiser);\n\n Tensor input_umbral_verde = Tensor.create(umbral_verde);\n Tensor input_umbral_naranja = Tensor.create(umbral_naranja);\n Tensor input_umbral_rojo = Tensor.create(umbral_rojo);\n\n Tensor input_Plocation = Tensor.create(Plocation);\n Tensor input_Pemail = Tensor.create(Pemail);\n Tensor input_Pdevice = Tensor.create(Pdevice);\n Tensor input_Pimei = Tensor.create(Pimei);\n Tensor input_Pserialnumber = Tensor.create(Pserialnumber);\n Tensor input_Pmacaddress = Tensor.create(Pmacaddress);\n Tensor input_Padvertiser = Tensor.create(Padvertiser);\n\n\n\n ArrayList<Tensor<?>> list_op_tensor = new ArrayList<Tensor<?>>();\n\n String location_filtrado = \"NO\";\n String email_filtrado = \"NO\";\n String imei_filtrado = \"NO\";\n String device_filtrado = \"NO\";\n String serialnumber_filtrado = \"NO\";\n String macaddress_filtrado = \"NO\";\n String advertiser_filtrado = \"NO\";\n\n String filtraciones_aplicacion = \"\";\n\n if (location == 1){\n location_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Location\" + \"\\n\";\n }\n if (email == 1){\n email_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Email\" + \"\\n\";\n }\n if (device == 1){\n device_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -DeviceID\" + \"\\n\";\n }\n if (imei == 1){\n imei_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -Imei\" + \"\\n\";\n\n }\n if (serialnumber == 1){\n serialnumber_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -SerialNumber\" + \"\\n\";\n\n }\n if (macaddress == 1){\n macaddress_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -MacAddress\" + \"\\n\";\n\n }\n if (advertiser == 1){\n advertiser_filtrado = \"SI\";\n filtraciones_aplicacion = filtraciones_aplicacion + \" -AdvertiserID\" + \"\\n\";\n\n }\n\n //Tensor op_tensor = sess.runner().feed(\"input\",input).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral_green\n Tensor op_tensor_verde = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"umbral\",input_umbral_verde).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral Naranja\n Tensor op_tensor_naranja = sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"umbral\",input_umbral_naranja).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n //umbral rojo\n Tensor op_tensor_rojo =sess.runner().feed(\"location_input\",input_location).feed(\"email_input\",input_email).feed(\"imei_input\",input_imei).feed(\"device_input\",input_device).feed(\"umbral\",input_umbral_rojo).feed(\"Plocation\",input_Plocation).feed(\"Pemail\",input_Pemail).feed(\"Pdevice\",input_Pdevice).feed(\"Pimei\",input_Pimei).feed(\"Pserialnumber\",input_Pserialnumber).feed(\"Pmacaddress\",input_Pmacaddress).feed(\"Padvertiser\",input_Padvertiser).fetch(\"output\").run().get(0).expect(Float.class);\n\n list_op_tensor.add(op_tensor_verde);\n list_op_tensor.add(op_tensor_naranja);\n list_op_tensor.add(op_tensor_rojo);\n\n //para escribir en la app en W y B test\n // LO COMENTO 12/02/2021\n // ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").run();\n // NO VA ESTA PRUEBA ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"W/read\").fetch(\"b/read\").fetch(\"y/output\").run();\n\n //CREAR UN TEXTO PARA ESCRIBIR EL OUTPUT PREDECIDO: Out\n\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada X=1\");\n // Y.setText(\"Salida: Y= \"+ Float.toString(op_tensor.floatValue()) +\", si entrada email,...\");\n\n String recomendacion = \"No hacer nada\";\n String Nivel = \" Bajo\";\n int Nivel_color = 0; //0 es verde, 1 naranja, 2 rojo\n if (op_tensor_verde.floatValue() == 1) {\n if(op_tensor_naranja.floatValue() == 1 ){\n if(op_tensor_rojo.floatValue() == 1 ){\n Nivel = \" Alto\";\n Nivel_color = 2;\n }\n else {\n Nivel = \" Medio\";\n Nivel_color = 1;\n }\n }\n else {\n Nivel = \" Bajo\";\n Nivel_color = 0;\n }\n }\n\n /// test.setBackgroundResource(R.color.holo_green_light);\n\n\n // resumen_app.setText(\"Resumen App analizada: \"+ \"\\n\" + \"Nota: Si una app tiene una filtración, se marcará dicho valor con un 'SI'\"+ \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado + \"\\n\" +\n // \"Recomendación: \" + recomendacion);\n subtitulo.setText(\"Nivel: \" );\n titulo.setText(Nivel );\n // titulo.setTextColor(android.R.color.background_dark);\n\n // resumen_app.setText(\"Filtraciones Spotify: \"+ \"\\n\" + \"\\n\" + \"Location: \" + location_filtrado + \"\\n\" + \"Email: \" + email_filtrado + \"\\n\" + \"DeviceID: \" + device_filtrado + \"\\n\" + \"Imei: \" + imei_filtrado );\n resumen_app.setText(\"Filtraciones Spotify: \"+ \"\\n\" + \"\\n\" + filtraciones_aplicacion );\n\n //mirar bien codigo:\n if ( Nivel_color == 0) {\n // resumen_app.setBackgroundResource(R.color.verde);\n nivel_color = 0;\n resumen_app.setBackgroundResource(R.drawable.stilo_borde_textview);\n }\n if ( Nivel_color == 1) {\n // resumen_app.setBackgroundResource(R.color.naranja);\n nivel_color = 1;\n resumen_app.setBackgroundResource(R.drawable.stilo_borde_naranja);\n }\n if ( Nivel_color == 2) {\n // resumen_app.setBackgroundResource(R.color.rojo);\n nivel_color = 2;\n resumen_app.setBackgroundResource(R.drawable.stilo_borde_rojo);\n }\n\n /* ArrayList<Tensor<?>> values = (ArrayList<Tensor<?>>) sess.runner().fetch(\"Plocation/read\").fetch(\"Pemail/read\").fetch(\"Pdevice/read\").fetch(\"Pimei/read\").run();\n\n // y_mejoras_location.add(((values.get(0).floatValue())));\n y_mejoras_location.add(Plocation);\n x_mejoras_location.add(\"\" + (0 + num_epoch*num));\n\n // y_mejoras_email.add(((values.get(1).floatValue())));\n y_mejoras_email.add(Pemail);\n x_mejoras_email.add(\"\" + (0 + num_epoch*num));\n\n // y_mejoras_device.add(((values.get(2).floatValue())));\n y_mejoras_device.add(Pdevice);\n x_mejoras_device.add(\"\" + (0 + num_epoch*num));\n\n //y_mejoras_imei.add(((values.get(3).floatValue())));\n y_mejoras_imei.add(Pimei);\n x_mejoras_imei.add(\"\" + (0 + num_epoch*num));\n\n\n */\n\n ///\n\n // Y.setText(Float.toString(values.get(1).floatValue()));\n\n return list_op_tensor;\n }", "public void processOWLDefinition(ModuleItem pkg) throws SerializationException, IOException{\n ModelCompiler jarCompiler = ModelCompilerFactory.newModelCompiler(ModelFactory.CompileTarget.JAR);\n JarModel compiledJarModel = (JarModel) jarCompiler.compile(ontoModel);\n byte[] jarBytes = compiledJarModel.buildJar().toByteArray();\n \n //Get the Working-Set from onto-model\n ModelCompiler wsCompiler = ModelCompilerFactory.newModelCompiler(ModelFactory.CompileTarget.WORKSET);\n WorkingSetModel compiledWSModel = (WorkingSetModel) wsCompiler.compile(ontoModel);\n SemanticWorkingSetConfigData semanticWorkingSet = compiledWSModel.getWorkingSet();\n \n //Get the Fact Types DRL from onto-model\n ModelCompiler drlCompiler = ModelCompilerFactory.newModelCompiler(ModelFactory.CompileTarget.DRL);\n DRLModel drlModel = (DRLModel)drlCompiler.compile(ontoModel);\n \n //Get the Fact Types XSD from onto-model\n ModelCompiler xsdCompiler = ModelCompilerFactory.newModelCompiler(ModelFactory.CompileTarget.XSD);\n XSDModel xsdModel = (XSDModel)xsdCompiler.compile(ontoModel);\n \n //convert from semantic to guvnor model\n WorkingSetConfigData workingSetConfigData = this.convertSemanticWorkingSetConfigData(semanticWorkingSet);\n \n //create a second Working-Set for the Configuration (Cohort) Facts\n WorkingSetConfigData cohortWorkingSetConfigData = this.convertSemanticWorkingSetConfigData(\"Configuration Facts\", semanticWorkingSet);\n \n //create categories from working-set data\n this.createCategoryTreeFromWorkingSet(workingSetConfigData);\n \n //create the Jar Model\n this.createJarModelAsset(pkg, jarBytes);\n \n //create the working-set assets\n this.createWSAsset(pkg, workingSetConfigData);\n this.createWSAsset(pkg, cohortWorkingSetConfigData);\n \n //store the fact type drl as a generic resource\n this.storeFactTypeDRL(pkg, drlModel);\n \n //create and store the Fact Type Descriptor\n this.createFactTypeDescriptor(pkg, xsdModel);\n }", "public void test_sf_934528() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n \n Resource r = (Resource) OWL.Thing.inModel( m );\n OntClass thingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( thingClass );\n \n r = (Resource) OWL.Nothing.inModel( m );\n OntClass nothingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( nothingClass );\n }", "public static void main(String args[]) {\n Model model = ModelFactory.createDefaultModel(); \n\n//set namespace\n Resource NAMESPACE = model.createResource( relationshipUri );\n \tmodel.setNsPrefix( \"rela\", relationshipUri);\n \n// Create the types of Property we need to describe relationships in the model\n Property childOf = model.createProperty(relationshipUri,\"childOf\"); \n Property siblingOf = model.createProperty(relationshipUri,\"siblingOf\");\n Property spouseOf = model.createProperty(relationshipUri,\"spouseOf\");\n Property parentOf = model.createProperty(relationshipUri,\"parentOf\"); \n \n \n// Create resources representing the people in our model\n Resource Siddharth = model.createResource(familyUri+\"Siddharth\");\n Resource Dhvanit = model.createResource(familyUri+\"Dhvanit\");\n Resource Rekha = model.createResource(familyUri+\"Rekha\");\n Resource Sandeep = model.createResource(familyUri+\"Sandeep\");\n Resource Kanchan = model.createResource(familyUri+\"Kanchan\");\n Resource Pihu = model.createResource(familyUri+\"Pihu\");\n Resource DwarkaPrasad = model.createResource(familyUri+\"Dwarkesh\");\n Resource Shakuntala = model.createResource(familyUri+\"Shakuntala\");\n Resource Santosh = model.createResource(familyUri+\"Santosh\");\n Resource Usha = model.createResource(familyUri+\"Usha\");\n Resource Priyadarshan = model.createResource(familyUri+\"Priyadarshan\");\n Resource Sudarshan = model.createResource(familyUri+\"Sudarshan\");\n Resource Pragya = model.createResource(familyUri+\"Pragya\");\n Resource Shailendra = model.createResource(familyUri+\"Shailendra\");\n Resource Rajni = model.createResource(familyUri+\"Rajni\");\n Resource Harsh = model.createResource(familyUri+\"Harsh\");\n Resource Satendra = model.createResource(familyUri+\"Satendra\");\n Resource Vandana = model.createResource(familyUri+\"Vandana\");\n Resource Priyam = model.createResource(familyUri+\"Priyam\");\n Resource Darshan = model.createResource(familyUri+\"Darshan\");\n Resource Vardhan = model.createResource(familyUri+\"Vardhan\");\n \n List<Statement> list = new ArrayList(); \n list.add(model.createStatement(Dhvanit,spouseOf,Kanchan)); \n list.add(model.createStatement(Sandeep,spouseOf,Rekha)); \n list.add(model.createStatement(DwarkaPrasad,spouseOf,Shakuntala)); \n list.add(model.createStatement(Santosh,spouseOf,Usha)); \n list.add(model.createStatement(Shailendra,spouseOf,Rajni)); \n list.add(model.createStatement(Satendra,spouseOf,Vandana)); \n list.add(model.createStatement(Sandeep,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Sandeep,childOf,Shakuntala)); \n list.add(model.createStatement(Santosh,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Santosh,childOf,Shakuntala)); \n list.add(model.createStatement(Shailendra,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Shailendra,childOf,Shakuntala)); \n list.add(model.createStatement(Satendra,childOf,DwarkaPrasad)); \n list.add(model.createStatement(Satendra,childOf,Shakuntala)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Sandeep)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Santosh)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Shailendra)); \n list.add(model.createStatement(DwarkaPrasad,parentOf,Satendra)); \n list.add(model.createStatement(Shakuntala,parentOf,Sandeep)); \n list.add(model.createStatement(Shakuntala,parentOf,Santosh)); \n list.add(model.createStatement(Shakuntala,parentOf,Shailendra)); \n list.add(model.createStatement(Shakuntala,parentOf,Satendra)); \n list.add(model.createStatement(Sandeep,parentOf,Siddharth)); \n list.add(model.createStatement(Sandeep,parentOf,Dhvanit)); \n list.add(model.createStatement(Rekha,parentOf,Siddharth)); \n list.add(model.createStatement(Rekha,parentOf,Dhvanit)); \n list.add(model.createStatement(Siddharth,childOf,Rekha)); \n list.add(model.createStatement(Dhvanit,childOf,Rekha)); \n list.add(model.createStatement(Siddharth,childOf,Sandeep)); \n list.add(model.createStatement(Dhvanit,childOf,Sandeep)); \n list.add(model.createStatement(Harsh,childOf,Shailendra)); \n list.add(model.createStatement(Harsh,childOf,Rajni)); \n list.add(model.createStatement(Shailendra,parentOf,Harsh)); \n list.add(model.createStatement(Rajni,parentOf,Harsh)); \n list.add(model.createStatement(Santosh,parentOf,Priyadarshan)); \n list.add(model.createStatement(Santosh,parentOf,Sudarshan));\n list.add(model.createStatement(Santosh,parentOf,Pragya));\n list.add(model.createStatement(Usha,parentOf,Priyadarshan)); \n list.add(model.createStatement(Usha,parentOf,Sudarshan));\n list.add(model.createStatement(Usha,parentOf,Pragya));\n list.add(model.createStatement(Priyadarshan,childOf,Santosh));\n list.add(model.createStatement(Pragya,childOf,Santosh));\n list.add(model.createStatement(Sudarshan,childOf,Santosh));\n list.add(model.createStatement(Priyadarshan,childOf,Usha));\n list.add(model.createStatement(Pragya,childOf,Usha));\n list.add(model.createStatement(Sudarshan,childOf,Usha));\n list.add(model.createStatement(Satendra,parentOf,Priyam)); \n list.add(model.createStatement(Satendra,parentOf,Darshan));\n list.add(model.createStatement(Satendra,parentOf,Vardhan));\n list.add(model.createStatement(Vandana,parentOf,Priyam)); \n list.add(model.createStatement(Vandana,parentOf,Darshan));\n list.add(model.createStatement(Vandana,parentOf,Vardhan));\n list.add(model.createStatement(Priyam,childOf,Satendra));\n list.add(model.createStatement(Darshan,childOf,Satendra));\n list.add(model.createStatement(Vardhan,childOf,Satendra));\n list.add(model.createStatement(Priyam,childOf,Vandana));\n list.add(model.createStatement(Darshan,childOf,Vandana));\n list.add(model.createStatement(Vardhan,childOf,Vandana));\n list.add(model.createStatement(Pihu,childOf,Dhvanit));\n list.add(model.createStatement(Pihu,childOf,Kanchan));\n list.add(model.createStatement(Dhvanit,parentOf,Pihu));\n list.add(model.createStatement(Kanchan,parentOf,Pihu));\n list.add(model.createStatement(Siddharth,siblingOf,Dhvanit));\n list.add(model.createStatement(Dhvanit,siblingOf,Siddharth)); \n list.add(model.createStatement(Priyadarshan,siblingOf,Sudarshan));\n list.add(model.createStatement(Priyadarshan,siblingOf,Pragya));\n list.add(model.createStatement(Sudarshan,siblingOf,Priyadarshan));\n list.add(model.createStatement(Sudarshan,siblingOf,Pragya));\n list.add(model.createStatement(Pragya,siblingOf,Priyadarshan));\n list.add(model.createStatement(Pragya,siblingOf,Sudarshan)); \n list.add(model.createStatement(Priyam,siblingOf,Darshan));\n list.add(model.createStatement(Priyam,siblingOf,Vardhan)); \n list.add(model.createStatement(Darshan,siblingOf,Vardhan)); \n list.add(model.createStatement(Darshan,siblingOf,Priyam));\n list.add(model.createStatement(Vardhan,siblingOf,Priyam));\n list.add(model.createStatement(Vardhan,siblingOf,Darshan));\n list.add(model.createStatement(Santosh,siblingOf,Sandeep));\n list.add(model.createStatement(Santosh,siblingOf,Shailendra));\n list.add(model.createStatement(Santosh,siblingOf,Satendra));\n list.add(model.createStatement(Sandeep,siblingOf,Santosh));\n list.add(model.createStatement(Sandeep,siblingOf,Shailendra));\n list.add(model.createStatement(Sandeep,siblingOf,Satendra));\n list.add(model.createStatement(Shailendra,siblingOf,Santosh));\n list.add(model.createStatement(Shailendra,siblingOf,Sandeep));\n list.add(model.createStatement(Shailendra,siblingOf,Satendra));\n list.add(model.createStatement(Satendra,siblingOf,Shailendra));\n list.add(model.createStatement(Satendra,siblingOf,Santosh));\n list.add(model.createStatement(Satendra,siblingOf,Sandeep));\n \n model.add(list);\n try{\n \t File file=new File(\"/Users/siddharthgupta/Documents/workspace/FamilyModel/src/family/family.rdf\");\n \t \tFileOutputStream f1=new FileOutputStream(file);\n \t \tRDFWriter d = model.getWriter(\"RDF/XML-ABBREV\");\n \t \t\t\td.write(model,f1,null);\n \t\t}catch(Exception e) {}\n }", "private void tryToInfer(Statement s, \n\t\t\t Model aboxAssertionsModel, \n\t\t\t Model aboxInferencesModel) {\n\t\tif (!aboxAssertionsModel.contains(s) && !aboxInferencesModel.contains(s)) {\n\t\t\taboxInferencesModel.add(s);\n\t\t}\n\t}", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minimumConfidence = 0.8;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_FIRST_ELEMENT, LABEL_SECOND_ELEMENT);\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tdouble cr1 = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\tcr1 = round(utilities.OntologyOperations.getNumClassCompounds(ontoFile1), 2);\n\t\t\t\t} catch (OWLOntologyCreationException e2) {\n\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\n\n\t\t\t\t//Inheritance Richness\n\t\t\t\tdouble ir1 = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\tir1 = round(OntologyProfiler.computeInheritanceRichness(ontoFile1), 2);\n\t\t\t\t} catch (OWLOntologyCreationException e2) {\n\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t\t//Relationship Richness\n\t\t\t\tdouble rr1 = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\trr1 = round(OntologyProfiler.computeRelationshipRichness(ontoFile1), 2);\n\t\t\t\t} catch (OWLOntologyCreationException e2) {\n\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t\t//WordNet Coverage\n\t\t\t\tdouble wc1 = 0;\n\t\t\t\ttry {\n\t\t\t\t\twc1 = round(OntologyProfiler.computeWordNetCoverageComp(ontoFile1), 2);\n\t\t\t\t} catch (OWLOntologyCreationException | FileNotFoundException | JWNLException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t//Synonym Richness\n\t\t\t\tdouble sr1 = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\tsr1 = round(utilities.OntologyOperations.getSynonymRichness(ontoFile1), 2);\n\t\t\t\t} catch (OWLOntologyCreationException e2) {\n\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t\t//Hyponym Richness\n\t\t\t\tdouble hr1 = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\thr1 = round(utilities.OntologyOperations.getHyponymRichness(ontoFile1), 2);\n\t\t\t\t} catch (OWLOntologyCreationException e2) {\n\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t\t//Domain Diversity\n\t\t\t\tdouble dd1 = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdd1 = round(utilities.OntologyOperations.domainDiversity(ontoFile1), 2);\n\t\t\t\t\t} catch (FileNotFoundException | JWNLException e1) {\n\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} catch (OWLOntologyCreationException e2) {\n\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t\tString ontology1Name = StringUtilities.stripPath(ontoFile1.toString());\n\t\t\t\tsbOntologyProfile1.append(\"- \" + ontology1Name + \" -\");\n\t\t\t\tsbOntologyProfile1.append(\"\\n\");\n\t\t\t\tsbOntologyProfile1.append(\"Compound Ratio: \" + String.valueOf(cr1));\n\t\t\t\tsbOntologyProfile1.append(\"\\n\");\n\t\t\t\tsbOntologyProfile1.append(\"Inheritance Richness: \" + String.valueOf(ir1));\n\t\t\t\tsbOntologyProfile1.append(\"\\n\");\n\t\t\t\tsbOntologyProfile1.append(\"Relationship Richness: \" + String.valueOf(rr1));\n\t\t\t\tsbOntologyProfile1.append(\"\\n\");\n\t\t\t\tsbOntologyProfile1.append(\"WordNet Coverage: \" + String.valueOf(wc1));\n\t\t\t\tsbOntologyProfile1.append(\"\\n\");\n\t\t\t\tsbOntologyProfile1.append(\"Synonym Richness: \" + String.valueOf(sr1));\n\t\t\t\tsbOntologyProfile1.append(\"\\n\");\n\t\t\t\tsbOntologyProfile1.append(\"Hyponym Richness: \" + String.valueOf(hr1));\n\t\t\t\tsbOntologyProfile1.append(\"\\n\");\n\t\t\t\tsbOntologyProfile1.append(\"Domain Diversity: \" + String.valueOf(dd1));\n\n\n\t\t\t\ttextAreaOntology1Profile.setText(sbOntologyProfile1.toString());\n\n\t\t\t\t//compute profile metrics for ontology 2\n\n\t\t\t\t//Compound Ratio\n\t\t\t\tdouble cr2 = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\tcr2 = round(utilities.OntologyOperations.getNumClassCompounds(ontoFile2), 2);\n\t\t\t\t} catch (OWLOntologyCreationException e2) {\n\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\n\n\t\t\t\t//Inheritance Richness\n\t\t\t\tdouble ir2 = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\tir2 = round(OntologyProfiler.computeInheritanceRichness(ontoFile2), 2);\n\t\t\t\t} catch (OWLOntologyCreationException e2) {\n\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t\t//Relationship Richness\n\t\t\t\tdouble rr2 = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\trr2 = round(OntologyProfiler.computeRelationshipRichness(ontoFile2), 2);\n\t\t\t\t} catch (OWLOntologyCreationException e2) {\n\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t\t//WordNet Coverage\n\t\t\t\tdouble wc2 = 0;\n\t\t\t\ttry {\n\t\t\t\t\twc2 = round(OntologyProfiler.computeWordNetCoverageComp(ontoFile2), 2);\n\t\t\t\t} catch (OWLOntologyCreationException | FileNotFoundException | JWNLException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\n\t\t\t\t//Synonym Richness\n\t\t\t\tdouble sr2 = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\tsr2 = round(utilities.OntologyOperations.getSynonymRichness(ontoFile2), 2);\n\t\t\t\t} catch (OWLOntologyCreationException e2) {\n\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t\t//Hyponym Richness\n\t\t\t\tdouble hr2 = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\thr2 = round(utilities.OntologyOperations.getHyponymRichness(ontoFile2), 2);\n\t\t\t\t} catch (OWLOntologyCreationException e2) {\n\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t\t//Domain Diversity\n\t\t\t\tdouble dd2 = 0;\n\n\t\t\t\ttry {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tdd2 = round(utilities.OntologyOperations.domainDiversity(ontoFile2), 2);\n\t\t\t\t\t} catch (FileNotFoundException | JWNLException e1) {\n\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} catch (OWLOntologyCreationException e2) {\n\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t\tString ontology2Name = StringUtilities.stripPath(ontoFile2.toString());\n\t\t\t\tsbOntologyProfile2.append(\"- \" + ontology2Name + \" -\");\n\t\t\t\tsbOntologyProfile2.append(\"\\n\");\n\t\t\t\tsbOntologyProfile2.append(\"Compound Ratio: \" + String.valueOf(cr2));\n\t\t\t\tsbOntologyProfile2.append(\"\\n\");\n\t\t\t\tsbOntologyProfile2.append(\"Inheritance Richness: \" + String.valueOf(ir2));\n\t\t\t\tsbOntologyProfile2.append(\"\\n\");\n\t\t\t\tsbOntologyProfile2.append(\"Relationship Richness: \" + String.valueOf(rr2));\n\t\t\t\tsbOntologyProfile2.append(\"\\n\");\n\t\t\t\tsbOntologyProfile2.append(\"WordNet Coverage: \" + String.valueOf(wc2));\n\t\t\t\tsbOntologyProfile2.append(\"\\n\");\n\t\t\t\tsbOntologyProfile2.append(\"Synonym Richness: \" + String.valueOf(sr2));\n\t\t\t\tsbOntologyProfile2.append(\"\\n\");\n\t\t\t\tsbOntologyProfile2.append(\"Hyponym Richness: \" + String.valueOf(hr2));\n\t\t\t\tsbOntologyProfile2.append(\"\\n\");\n\t\t\t\tsbOntologyProfile2.append(\"Domain Diversity: \" + String.valueOf(dd2));\n\n\n\t\t\t\ttextAreaOntology2Profile.setText(sbOntologyProfile2.toString());\n\n\t\t\t\t//add combined values to the graph for CR, IR, RR, WC and create series for Terminological Profile, Structural Profile and Lexical Profile\n\t\t\t\tdouble combinedCR = (cr1 + cr2) / 2;\n\n\t\t\t\t//must normalize IR somehow...\n\t\t\t\t//double combinedIR = (ir1 + ir2) / 2;\n\t\t\t\tdouble combinedRR = (rr1 + rr2) / 2;\n\t\t\t\tdouble combinedIRAndRR = (0.45 + combinedRR) / 2;\n\t\t\t\tdouble combinedWC = (wc1 + wc2) / 2;\n\n\t\t\t\tfinal DefaultCategoryDataset combinedProfileDataset =\n\t\t\t\t\t\tnew DefaultCategoryDataset();\n\n\t\t\t\tcombinedProfileDataset.addValue(combinedCR, \"Terminological Profile\", \"CR\");\n\t\t\t\tcombinedProfileDataset.addValue(combinedIRAndRR, \"Structural Profile\", \"IR\");\n\t\t\t\t//combinedProfileDataset.addValue(combinedRR, \"Structural Profile\", \"RR\");\n\t\t\t\tcombinedProfileDataset.addValue(combinedWC, \"Lexical Profile\", \"WC\");\n\n\t\t\t\tJFreeChart combinedProfileChart = ChartFactory.createBarChart(\"\", \"\", \"\", combinedProfileDataset, PlotOrientation.VERTICAL, true, false, false);\n\t\t\t\tcombinedProfileChart.setBorderVisible(false);\n\t\t\t\tcombinedProfileChart.getLegend().setFrame(BlockBorder.NONE);\n\t\t\t\tCategoryPlot combinedProfilePlot = combinedProfileChart.getCategoryPlot();\n\t\t\t\tcombinedProfilePlot.setBackgroundPaint(Color.white);\n\n\t\t\t\tCategoryAxis combinedProfileAxis = combinedProfilePlot.getDomainAxis();\n\t\t\t\tcombinedProfileAxis.setLowerMargin(0.1);\n\t\t\t\tcombinedProfileAxis.setUpperMargin(0.1);\n\t\t\t\tcombinedProfileAxis.setCategoryMargin(0.1);\n\n\n\t\t\t\tChartPanel chartPanelCombinedOntologyProfiles = new ChartPanel((JFreeChart) combinedProfileChart);\n\t\t\t\tchartPanelCombinedOntologyProfiles.setBorder(null);\n\n\t\t\t\tchartPanelCombinedOntologyProfiles.setBackground(Color.WHITE);\n\t\t\t\tchartPanelCombinedOntologyProfiles.setMaximumDrawHeight(224);\n\t\t\t\tchartPanelCombinedOntologyProfiles.setMaximumDrawWidth(346);\n\t\t\t\tcombinedProfilespanel.add(chartPanelCombinedOntologyProfiles);\n\t\t\t\tDimension dim = new Dimension();\n\t\t\t\tdim.setSize(346, 224);\n\t\t\t\tchartPanelCombinedOntologyProfiles.setPreferredSize(dim);\n\t\t\t\tcombinedProfilespanel.setVisible(true);\n\n\n\t\t\t}", "private void initOntology() {\n\n\tontology = ModelFactory.createDefaultModel();\n\t\t\t\n\ttry \n\t{\n\t\t//ontology.read(new FileInputStream(\"ontology.ttl\"),null,\"TTL\");\n\t\tontology.read(new FileInputStream(\"Aminer-data.ttl\"),null,\"TTL\");\n\t\t//ontology.read(new FileInputStream(\"SO data.ttl\"),null,\"TTL\");\n\t} \n\tcatch (FileNotFoundException e) \n\t{\n\t\tSystem.out.println(\"Error creating ontology model\" +e.getMessage());\n\t\te.printStackTrace();\n\t}\n\t\t\t\n\t\t\n\t}", "private void establishPetriNetStructure(PetriNet net) {\n\t\t// establish the same petri net structure like in the given model\n\t\tHashMap mapping = new HashMap();\n\t\t// arraylist for all nodes in the petri net\n\t\tArrayList nodeList = new ArrayList();\n\t\tSubgraph graph = net.getGrappaVisualization().getSubgraph().getGraph();\n\t\t// get all the nodes that are in a cluster\n\t\tEnumeration subGraphElts = graph.subgraphElements();\n\t\twhile (subGraphElts.hasMoreElements()) {\n\t\t\tElement e1 = (Element) subGraphElts.nextElement();\n\t\t\tif (e1 instanceof Subgraph) {\n\t\t\t\tSubgraph subgraph = (Subgraph) e1;\n\t\t\t\tEnumeration enumerationNodes = subgraph.nodeElements();\n\t\t\t\t// put all the nodeElements in nodeList\n\t\t\t\twhile (enumerationNodes.hasMoreElements()) {\n\t\t\t\t\tElement enumNode = (Element) enumerationNodes.nextElement();\n\t\t\t\t\tif (enumNode != null && enumNode.object instanceof ModelGraphVertex) {\n\t\t\t\t\t\tnodeList.add(enumNode);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// add the nodes that are not in a cluster to the list of all nodes\n\t\tEnumeration nodeElts = graph.nodeElements();\n\t\twhile (nodeElts.hasMoreElements()) {\n\t\t\tElement e1 = (Element) nodeElts.nextElement();\n\t\t\tif (e1.object != null && e1.object instanceof ModelGraphVertex) {\n\t\t\t\tnodeList.add(e1);\n\t\t\t}\n\t\t}\n\t\t// convert the ordinary transitions to simulated transitions\n\t\tIterator transitions = nodeList.iterator();\n\t\twhile (transitions.hasNext()) {\n\t\t\tElement e1 = (Element) transitions.next();\n\t\t\tif (e1.object != null && e1.object instanceof Transition) {\n\t\t\t\tNode n = (Node) e1;\n\t\t\t\tint x = (int) n.getCenterPoint().getX() * ManagerLayout.getInstance().getScaleFactor();\n\t\t\t\tint y = -(int) n.getCenterPoint().getY() * ManagerLayout.getInstance().getScaleFactor();\n\t\t\t\tint width = (int) (((Double) n.getAttributeValue(Grappa.WIDTH_ATTR)).doubleValue() *\n\t\t\t\t\t\tManagerLayout.getInstance().getStretchFactor());\n\t\t\t\tint height = (int) (((Double) n.getAttributeValue(Grappa.HEIGHT_ATTR)).doubleValue() *\n\t\t\t\t\t\tManagerLayout.getInstance().getStretchFactor());\n\t\t\t\tColoredTransition simTransition = new ColoredTransition((Transition) e1.object, this,\n\t\t\t\t\t\tx, y, width, height);\n\t\t\t\tthis.addTransition(simTransition);\n\t\t\t\t\n\t\t\t\t// keep the mapping until the edges have been established\n\t\t\t\tmapping.put((Transition) e1.object, simTransition);\n\t\t\t}\n\t\t}\n\t // convert the ordinary places to simulated places\n\t\tIterator places = nodeList.iterator();\n\t\twhile (places.hasNext()) {\n\t\t\tElement e1 = (Element) places.next();\n\t\t\tif (e1.object != null && e1.object instanceof Place) {\n\t\t\t\tNode n = (Node) e1;\n\t\t\t\tint x = (int) n.getCenterPoint().getX() * ManagerLayout.getInstance().getScaleFactor();\n\t\t\t\tint y = -(int) n.getCenterPoint().getY() * ManagerLayout.getInstance().getScaleFactor();\n\t\t\t\tint width = (int) (((Double) n.getAttributeValue(Grappa.WIDTH_ATTR)).doubleValue() *\n\t\t\t\t\t\tManagerLayout.getInstance().getStretchFactor());\n\t\t\t\tint height = (int) (((Double) n.getAttributeValue(Grappa.HEIGHT_ATTR)).doubleValue() *\n\t\t\t\t\t\tManagerLayout.getInstance().getStretchFactor());\n\t\t\t\tColoredPlace simPlace = new ColoredPlace((Place) e1.object, this,\n\t\t\t\t\t\t\t\t\t\t x, y, width, height);\n\t\t\t\tthis.addPlace(simPlace);\n\t\t\t}\n\t\t}\n // convert the ordinary edges to simulated edges\n\t\tIterator edges = net.getEdges().iterator();\n\t\twhile (edges.hasNext()) {\n\t\t\tPNEdge edge = (PNEdge) edges.next();\n\t\t\tColoredEdge simEdge;\n\t\t\t// if place is source\n\t\t\tif (edge.isPT()) {\n\t\t\t\tPlace p = (Place) edge.getSource();\n\t\t\t\t// find respective place in this net (place names are assumed to be unique)\n\t\t\t\tPlace myPlace = this.findPlace(p.getIdentifier());\n\t\t\t\tTransition t = (Transition) edge.getDest();\n\t\t\t\t// find respective transition in this net\n\t\t\t\tTransition myTransition = (Transition) mapping.get(t);\n\t\t\t\t// reproduce edge\n\t\t\t\tsimEdge = new ColoredEdge(myPlace, myTransition);\n\t\t\t\tthis.addEdge(simEdge);\n\t\t\t} else {\n\t\t\t\t// if transition is source\n\t\t\t\tPlace p = (Place) edge.getDest();\n\t\t\t\t// find respective place in this net (place names are assumed to be unique)\n\t\t\t\tPlace myPlace = (Place)this.findPlace(p.getIdentifier());\n\t\t\t\tTransition t = (Transition) edge.getSource();\n\t\t\t\t// find respective transition in this net\n\t\t\t\tTransition myTransition = (Transition) mapping.get(t);\n\t\t\t\t// reproduce edge\n\t\t\t\tsimEdge = new ColoredEdge(myTransition, myPlace);\n\t\t\t\tthis.addEdge(simEdge);\n\t\t\t}\n\t\t}\n\t\tIterator clusters = net.getClusters().iterator();\n\t\twhile (clusters.hasNext()) {\n\t\t\tTransitionCluster currentCluster = (TransitionCluster) clusters.next();\n\t\t\tthis.addCluster(new TransitionCluster(currentCluster));\n\t\t}\n\t}", "private void finalizeOutOfTypeSystemFS(FSData aFS) {\n // make ID unique by prefixing a letter\n aFS.id = 'a' + aFS.id;\n // remap ref features\n for (Map.Entry<String, Object> entry : aFS.featVals.entrySet()) {\n String attrName = entry.getKey();\n if (attrName.startsWith(\"_ref_\")) {\n int val = Integer.parseInt((String) entry.getValue());\n if (val >= 0) // negative numbers represent null and are left unchanged\n {\n // attempt to locate target in type system\n FSInfo fsValInfo = fsTree.get(val);\n if (fsValInfo != null) {\n // entry.setValue(Integer.toString(fsValInfo.fs._id));\n entry.setValue(fsValInfo.fs);\n } else\n // out of type system - remap by prepending letter\n {\n entry.setValue(\"a\" + val);\n }\n }\n }\n\n }\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minimumConfidence = 0.67;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_FIRST_ELEMENT, LABEL_SECOND_ELEMENT);\n }", "public static void main(String[] args) throws SKOSCreationException {\n SKOSManager man = new SKOSManager();\n\n // a skos vocabulary is essentially an OWL ontology that can contain multiple concept schemes\n SKOSDataset vocab = man.createSKOSDataset(URI.create(baseURI));\n\n // a data factory is used to create types of SKOS Objects\n SKOSDataFactory factory = man.getSKOSDataFactory();\n\n SKOSConceptScheme scheme = factory.getSKOSConceptScheme(URI.create(baseURI + \"conceptSchemeA\"));\n\n // make a concept scheme assertion in a particular data set\n SKOSEntityAssertion schemaAss = factory.getSKOSEntityAssertion(scheme);\n\n SKOSConcept concept1 = factory.getSKOSConcept(URI.create(baseURI + \"concept1\"));\n SKOSConcept concept2 = factory.getSKOSConcept(URI.create(baseURI + \"concept2\"));\n\n // just add it with a Concept Assertion\n SKOSEntityAssertion conAss1 = factory.getSKOSEntityAssertion(concept1);\n SKOSEntityAssertion conAss2 = factory.getSKOSEntityAssertion(concept2);\n\n // make assertion on concepts in your SKOS vocabulary - you do it by making SKOS assertion objects\n SKOSObjectRelationAssertion inScheme = factory.getSKOSObjectRelationAssertion(concept1, factory.getSKOSInSchemeProperty(), scheme);\n SKOSObjectRelationAssertion inScheme1 = factory.getSKOSObjectRelationAssertion(concept2, factory.getSKOSInSchemeProperty(), scheme);\n\n SKOSObjectRelationAssertion topConcept = factory.getSKOSObjectRelationAssertion(scheme, factory.getSKOSHasTopConceptProperty(), concept1);\n\n // add object relation between individuals, this is with respect to a vocabulary\n\n SKOSObjectRelationAssertion assertion1 = factory.getSKOSObjectRelationAssertion(concept2, factory.getSKOSBroaderProperty(), concept1);\n\n // add data relation on individuals, this is with respect to a vocabulary\n\n SKOSAnnotation labelAnno = factory.getSKOSAnnotation(factory.getSKOSPrefLabelProperty().getURI(), \"Some Label\", \"en\");\n SKOSAnnotation altLabelAnno = factory.getSKOSAnnotation(factory.getSKOSAltLabelProperty().getURI(), \"Another Label\", \"en\");\n SKOSAnnotationAssertion assertion2 = factory.getSKOSAnnotationAssertion(concept2, labelAnno);\n SKOSAnnotationAssertion assertion3 = factory.getSKOSAnnotationAssertion(concept2, altLabelAnno);\n\n\n /* creating a sub property of altLabel */\n\n SKOSAnnotationProperty newAltLabel = factory.getSKOSAnnotationProperty(URI.create(\"http://myexample/altLable/newSubAltLabel\"));\n SKOSAltLabelProperty altLabel = factory.getSKOSAltLabelProperty();\n\n SKOStoOWLConverter converter = new SKOStoOWLConverter();\n\n OWLOntologyManager owlMan = man.getOWLManger();\n OWLDataFactory owlFact = owlMan.getOWLDataFactory();\n OWLSubAnnotationPropertyOfAxiom axiom = owlFact.getOWLSubAnnotationPropertyOfAxiom(converter.getAsOWLAnnotationProperty(newAltLabel), converter.getAsOWLAnnotationProperty(altLabel));\n try {\n owlMan.applyChange(new AddAxiom(converter.getAsOWLOntology(vocab), axiom));\n } catch (OWLOntologyChangeException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n /*\n * The full legal use of SKOS documantation propertiiies canno't be supported by this implmentation with the OWL API\n * The documantation properties can be used as either data or object properties, depending on how they are being used\n */\n\n // SKOS documentation properties as object properties\n\n // we might want to create some abritary resource, e.g. a web page that is used as a scope note\n SKOSResource someResource = factory.getSKOSResource(URI.create(\"http://www.wikipedia.org/someExample\"));\n SKOSObjectRelationAssertion assertion4 = factory.getSKOSObjectRelationAssertion(concept2, factory.getSKOSScopeNoteObjectProperty(), someResource);\n\n // we might want to use the documentation properties with a filler that is a literal\n SKOSDataRelationAssertion assertion5 = factory.getSKOSDataRelationAssertion(concept2, factory.getSKOSScopeNoteDataProperty(), \"A scope note for the concept\", \"en\");\n\n\n /* Annotations - you can assign any kind of annotation (e.g. dublic core) to your entities\n * here is an example adding a dc:creator and a rdfs:comment\n */\n\n SKOSAnnotation anno1 = factory.getSKOSAnnotation(DublinCoreVocabulary.DATE.getURI(), \"12-07-2008\");\n SKOSAnnotation anno2 = factory.getSKOSAnnotation(DublinCoreVocabulary.CREATOR.getURI(), \"Simon Jupp\", \"en\");\n SKOSAnnotation anno3 = factory.getSKOSAnnotation(URI.create(\"http://my-custom-annotation.com/example\"), someResource);\n SKOSAnnotation anno4 = factory.getSKOSAnnotation(DublinCoreVocabulary.CREATOR.getURI(), factory.getSKOSUntypedConstant(\"Simon Jupp\", \"en\"));\n // todo need to work on typed on objects\n //factory.getSKOSAnnotationsByURI(DublinCoreVocabulary.CREATOR.getURI(), factory.getSKOSTypedConstant(\"String\", \"Simon Jupp\"));\n\n \n SKOSAnnotationAssertion assertion6 = factory.getSKOSAnnotationAssertion(concept2, anno1);\n SKOSAnnotationAssertion assertion7 = factory.getSKOSAnnotationAssertion(concept2, anno2);\n SKOSAnnotationAssertion assertion8 = factory.getSKOSAnnotationAssertion(concept2, anno3);\n SKOSAnnotationAssertion assertion9 = factory.getSKOSAnnotationAssertion(concept2, anno4);\n\n /* Add some utility stuff fomr creating single or multiple inScheme objects,\n * these are afetr all just ObjectPropertyAssertions */\n // or add it to concept shceme in a paryicular vocab\n // SKOSInSchemeAssertion insSchemeAss = factory.getSKOSInSchemeAssertion(vocab, concept1, scheme);\n // this can also takes sets\n // SKOSInSchemeAssertion insSchemeAss = factory.getSKOSInsCHEMEAssertion(vocab, Set <SKOSConcept> concept1, scheme);\n\n List<SKOSChange> addList = new ArrayList<SKOSChange>();\n addList.add(new AddAssertion(vocab, schemaAss));\n addList.add(new AddAssertion(vocab, inScheme));\n addList.add(new AddAssertion(vocab, inScheme1));\n addList.add(new AddAssertion(vocab, conAss1));\n addList.add(new AddAssertion(vocab, conAss2));\n addList.add(new AddAssertion(vocab, topConcept));\n addList.add(new AddAssertion(vocab, assertion1));\n addList.add(new AddAssertion(vocab, assertion2));\n addList.add(new AddAssertion(vocab, assertion3));\n addList.add(new AddAssertion(vocab, assertion4));\n addList.add(new AddAssertion(vocab, assertion5));\n addList.add(new AddAssertion(vocab, assertion6));\n addList.add(new AddAssertion(vocab, assertion7));\n addList.add(new AddAssertion(vocab, assertion8));\n addList.add(new AddAssertion(vocab, assertion9));\n try {\n\n// man.applyChange(new AddAssertion(vocab, schemaAss));\n// man.applyChange(new AddAssertion(vocab, inScheme));\n// man.applyChange(new AddAssertion(vocab, inScheme1));\n// man.applyChange(new AddAssertion(vocab, conAss1));\n// man.applyChange(new AddAssertion(vocab, conAss2));\n// man.applyChange(new AddAssertion(vocab, topConcept));\n// man.applyChange(new AddAssertion(vocab, assertion1));\n// man.applyChange(new AddAssertion(vocab, assertion2));\n// man.applyChange(new AddAssertion(vocab, assertion3));\n\n man.applyChanges(addList);\n\n System.err.println(\"writing ontology\");\n man.save(vocab, SKOSFormatExt.RDFXML, URI.create(\"file:/Users/simon/testskos.rdf\"));\n\n } catch (SKOSChangeException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n } catch (SKOSStorageException e) {\n e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n\n\n\n\n//\n// // create a Label relation...\n// List<OWLConstant> labels = new ArrayList<OWLConstant>();\n// labels.add(factory.getOWLUntypedConstant(\"Some Label\"));\n// labels.add(factory.getOWLUntypedConstant(\"Another Label\"));\n//\n// SKOSLabelRelation labRel = factory.getSKOSLabelRelation(URI.create(baseURI + \"labelRel1\"), labels);\n// vocab.addSKOSLabelRelation(labRel);\n//\n// SKOSObjectRelationAssertion assertion4 = factory.getSKOSLabelRelationAssertion(concept2, labRel);\n//\n System.out.println(\"Read\");\n\n // get all the concept schemes\n for (SKOSConceptScheme sch : vocab.getSKOSConceptSchemes()) {\n\n System.err.println(\"Concept Scheme_______\");\n // get all the concepts in that scheme\n for (SKOSConcept co : vocab.getConceptsInScheme(sch)) {\n\n System.out.println(\"\\tConcept: \" + co.getURI());\n\n // get any pref labels\n for (SKOSAnnotation con : co.getSKOSAnnotationsByURI(vocab, factory.getSKOSPrefLabelProperty().getURI())) {\n if (con.getAnnotationValueAsConstant() instanceof SKOSUntypedLiteral) {\n SKOSUntypedLiteral unCon = con.getAnnotationValueAsConstant().getAsSKOSUntypedLiteral();\n System.out.println(\"\\t\\tPrefLabel: \" + unCon.getLiteral() + \" lang: \" + unCon.getLang());\n }\n else if (con.getAnnotationValueAsConstant() instanceof SKOSTypedLiteral) {\n SKOSTypedLiteral unCon = con.getAnnotationValueAsConstant().getAsSKOSTypedLiteral();\n System.out.println(\"\\t\\tPrefLabel: \" + unCon.getLiteral());\n }\n }\n\n // get definitions\n for (SKOSObject object : co.getSKOSRelatedEntitiesByProperty(vocab, factory.getSKOSDefinitionObjectProperty())) {\n\n if (object instanceof SKOSLiteral) {\n \n }\n else if (object instanceof SKOSEntity) {\n\n }\n\n\n }\n\n // get broader concepts from all schemes\n for (SKOSEntity c : co.getSKOSRelatedEntitiesByProperty(vocab, factory.getSKOSBroaderProperty())) {\n System.out.println(\"\\t\\thasBroader: \" + c.getURI());\n }\n\n // get label relations\n// for (SKOSLabelRelation rel : co.getSKOSLabelRelations(vocab)) {\n//\n// Iterator it = rel.getLabels().iterator();\n// while (it.hasNext()) {\n// OWLConstant con = (OWLConstant) it.next();\n// System.out.println(\"Releated Labels: \" + con.getLiteral() );\n// }\n// }\n\n\n }\n\n }\n//\n// // do a simple lookup\n// SKOSEntity entity = vocab.getSKOSEntity(\"Another Label\");\n// System.out.println(\"Entity lookup : \" + entity.asSKOSConcept().getAsOWLIndividual().getURI());\n//\n//\n//\n// } catch (OWLOntologyChangeException e) {\n// e.printStackTrace();\n// } catch (OWLOntologyStorageException e) {\n// e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n// }\n\n }", "public void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minResultConfidence = 0.8f;\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_QUAD_ELEMENT, LABEL_SINGLE_ELEMENT);\n }", "private void _generate(int versions) {\n\t \n\t \n\t \n\t _generate(); //V0\n\t \n\t File[] files = new File(System.getProperty(\"user.dir\")).listFiles();\n\t Model model = ModelFactory.createDefaultModel();\n\t //model.set\n\t\tfor(File file : files){\n\t\t\tif(!file.getName().contains(\"owl\")) continue;\n\t\t\ttry{\n\t\t\t\t\n\t\t\t\tFileInputStream in = new FileInputStream(file);\n\t\t\t\tmodel.read(in, \"http://example.com\", \"RDF/XML\");\t\t\t\n\t\t\t\tin.close();\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tlong startingSize = model.size();\n\t\tmodel.close();\n\t double desSize = startingSize*(1+evoChange);\n\t int schemaEvol = (int)(strict*10);\n\t int schemaEvol2 = schemaEvol / (evoVersions-1);\n\t System.out.println(\"schema evol param: \" + schemaEvol2);\n\t int howManyDepts = (int) Math.floor(totalDeptsV0*evoChange);\n\t HashMap<Integer, String> newClasses = new HashMap<Integer, String>();\n\t for(int i = 0; i < schemaEvol; i++)\n\t\t newClasses.put(i,\"\");\n\n\t double evoChangeOriginal = evoChange;\n\t boolean pub = false, conf = false, journ = false, tech = false, \n\t\t\t book = false, thes = false, proj = false, even = false;\n\t HashMap<String, HashMap<Integer, Double>> initialWeightsMap = new HashMap<String, HashMap<Integer,Double>>();\n\t for(String key : fileWeightsMap.keySet()){\n\t\t HashMap<Integer, Double> innerClone = new HashMap<Integer, Double>();\n\t\t for(Integer innerKey : fileWeightsMap.get(key).keySet()){\n\t\t\t innerClone.put(innerKey, fileWeightsMap.get(key).get(innerKey));\n\t\t }\n\t\t initialWeightsMap.put(key, innerClone);\n\t }\n\t for(int vi = 0 ; vi < evoVersions-1; vi++){\n\t \t\n\t\t globalVersionTrigger = true;\n\t\t File dir = new File(System.getProperty(\"user.dir\")+\"/v\"+vi);\n dir.mkdirs();\n\t\t //assignFilters(classFilters);\n\t\t //System.out.println(\"current filters: \" + currentFilters.toString());\n\t \tint classForChange ;\n\t \n\t \t//the number of depts (files) to evolve, based on the defined evoChange parameter\t \n\t \n\t List<String> asList = new ArrayList<String>(fileWeightsMap.keySet());\n\t \n\t writer_log = new OwlWriter(this);\t \n writer_log.startLogFile(dir.getAbsolutePath()+\"/changes.rdf\");\n writer_log.start();\n\t for(int d = 0 ; d < howManyDepts ; d++){\n\t \t\n\t \t//System.out.println(\"aslist: \" + asList.size());\n\t \tif(asList.size() == 0) break;\n\t String randomFile = asList.get(random_.nextInt(asList.size()));\n\t instances_ = fileInstanceMap.get(randomFile);\n\t \n\t asList.remove(randomFile);\n\t \t\n\t //System.out.println(\"Selected file: \" + randomFile);\n\t writer_ = new OwlWriter(this);\n\t \n\t writer_.startFile(dir.getAbsolutePath()+\"/\"+randomFile);\n\t writer_.start();\n\t for(Integer nextClass : fileWeightsMap.get(randomFile).keySet()){\n\t \t\n\t \tclassForChange = nextClass;\n\t \t\n\t \tif(classForChange < 2) {\n\t \t\t\tcontinue;\n\t \t}\n\t \t\n\t \tif(classForChange == 4) continue;\n\t \tint totalIter = (int) Math.floor(2*initialWeightsMap.get(randomFile).get(classForChange))/howManyDepts;\n\t \t\n\t for(int i = 0; i < totalIter ; i++){\n\t \t\n\t \t_generateASection(classForChange, \n\t \t\t\tinstances_[classForChange].count ); \t \t\t\t\n\t }\n\t \n\t if(nextClass == 21 ){\n\t \twriter_log.addTypeClass(ontology+\"WebCourse\");\n\t \twriter_log.addSuperClass(ontology+\"WebCourse\", ontology+\"Course\");\n\t }\n\t else if(nextClass == 20 ){\n\t \twriter_log.addTypeClass(ontology+\"VisitingStudent\");\n\t \twriter_log.addSuperClass(ontology+\"VisitingStudent\", ontology+\"Student\");\n\t }\n\t else if(nextClass == 19 ){\n\t \twriter_log.addTypeClass(ontology+\"VisitingProfessor\");\n\t \twriter_log.addSuperClass(ontology+\"VisitingProfessor\", ontology+\"Professor\");\n\t }\n\t \n\t }\n\t \n\t for(int k = 0; k < schemaEvol2+1; k++){\n\t \t\n\t \tif(newClasses.isEmpty()) break;\n\t \tint newClass = _getRandomFromRange(0, newClasses.keySet().size()+1);\n\t \tint index = 0;\n\t \tfor(Integer s : newClasses.keySet()){\n\t \t\tif(index == newClass){\n\t \t\t\tnewClass = s;\n\t \t\t\tbreak;\n\t \t\t}\n\t \t\tindex++;\n\t \t}\n\t \t/*if(newClass == 1){\n\t \t_generatePublications();\n\t \tnewClasses.remove(newClass);\n\t }*/\n\t if(newClass == 2){\n\t \t_generateConferencePublications();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"ConferencePublication\");\n\t \twriter_log.addSuperClass(ontology+\"ConferencePublication\", ontology+\"Publication\");\n\t }\n\t if(newClass == 3){\n\t \t_generateJournalPublications();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"JournalArticle\");\n\t \twriter_log.addSuperClass(ontology+\"JournalArticle\", ontology+\"Publication\");\n\t }\n\t if(newClass == 4 ){\n\t \t_generateTechnicalReports();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"TechnicalReport\");\n\t \twriter_log.addSuperClass(ontology+\"TechnicalReport\", ontology+\"Publication\");\n\t }\n\t if(newClass == 5 ){\n\t \t_generateBooks();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"Book\");\n\t \twriter_log.addSuperClass(ontology+\"Book\", ontology+\"Publication\");\n\t }\n\t if(newClass == 6 ){\n\t \t_generateThesis();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"Thesis\");\n\t \twriter_log.addSuperClass(ontology+\"Thesis\", ontology+\"Publication\");\n\t }\n\t if(newClass == 7 ){\n\t \t_generateProjects();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"Project\");\n\t }\n\t if(newClass == 8){\n\t \t_generateEvents();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"Event\");\n\t }\n\t }\n\t \n\t writer_.end();\n\t writer_.endFile();\n\t //correction\n\t //remainingUnderCourses_.\n\t remainingUnderCourses_.clear();\n\t \n\t for (int i = 0; i < UNDER_COURSE_NUM + (int) (UNDER_COURSE_NUM*evoChange); i++) {\n\t remainingUnderCourses_.add(new Integer(i));\n\t }\n\t remainingGradCourses_.clear();\n\t for (int i = 0; i < GRAD_COURSE_NUM + (int) (GRAD_COURSE_NUM*evoChange); i++) {\n\t remainingGradCourses_.add(new Integer(i));\n\t }\n\t remainingWebCourses_.clear();\n\t for (int i = 0; i < WEB_COURSE_NUM + (int) (WEB_COURSE_NUM*evoChange); i++) {\n\t remainingWebCourses_.add(new Integer(i));\n\t }\n\t \n\t assignWeights(randomFile);\t \t \n\t \n\t }\t\n\t evoChange = evoChange + evoVersions*evoChangeOriginal*evoChangeOriginal;\n\t \n\t writer_log.end();\n\t writer_log.endLogFile();\n\t \n\t \t\n\t }\n\t \n\t \n }", "public boolean isBoxInBox(BBox BBox)\n {\n Vec3 sizeA = extents;\n Vec3 sizeB = BBox.extents;\n// System.out.println(\"sizeA: \" + sizeA);\n// System.out.println(\"mA: \" + m);\n// System.out.println(\"sizeB: \" + sizeB);\n// System.out.println(\"mB: \" + BBox.m);\n Vec3[] rotA, rotB;\n rotA = getInvRot();\n rotB = BBox.getInvRot();\n\n float[][] r = new float[3][3]; // Rotation from B to A\n float[][] ar = new float[3][3]; // absolute values of R matrix, to use with box extents\n float extentA, extentB, separation;\n int i, k;\n\n // Calculate B to A rotation matrix\n for (i = 0; i < 3; i++)\n {\n for (k = 0; k < 3; k++)\n {\n r[i][k] = rotA[i].dot(rotB[k]);\n ar[i][k] = abs(r[i][k]);\n }\n }\n\n // Vector separating the centers of Box B and of Box A\t\n Vec3 vSepWS = BBox.getCenterPoint().subtract(getCenterPoint());\n // Rotated into Box A's coordinates\n Vec3 vSepA = new Vec3(\n vSepWS.dot(rotA[0]),\n vSepWS.dot(rotA[1]),\n vSepWS.dot(rotA[2]));\n\n // Test if any of A's basis vectors separate the box\n for (i = 0; i < 3; i++)\n {\n extentA = sizeA.get(i);\n extentB = sizeB.dot(new Vec3(ar[i][0], ar[i][1], ar[i][2]));\n separation = abs(vSepA.get(i));\n\n if (separation > extentA + extentB)\n {\n return false;\n }\n }\n\n // Test if any of B's basis vectors separate the box\n for (k = 0; k < 3; k++)\n {\n extentA = sizeA.dot(new Vec3(ar[0][k], ar[1][k], ar[2][k]));\n extentB = sizeB.get(k);\n separation = abs(vSepA.dot(new Vec3(r[0][k], r[1][k], r[2][k])));\n\n if (separation > extentA + extentB)\n {\n return false;\n }\n }\n\n // Now test Cross Products of each basis vector combination ( A[i], B[k] )\n for (i = 0; i < 3; i++)\n {\n for (k = 0; k < 3; k++)\n {\n int i1 = (i + 1) % 3, i2 = (i + 2) % 3;\n int k1 = (k + 1) % 3, k2 = (k + 2) % 3;\n extentA = sizeA.get(i1) * ar[i2][k] + sizeA.get(i2) * ar[i1][k];\n extentB = sizeB.get(k1) * ar[i][k2] + sizeB.get(k2) * ar[i][k1];\n separation = abs(vSepA.get(i2) * r[i1][k] - vSepA.get(i1) * r[i2][k]);\n if (separation > extentA + extentB)\n {\n return false;\n }\n }\n }\n\n // No separating axis found, the boxes overlap\t\n return true;\n }", "@Override\n\tpublic void computeBBox(SoAction action, SbBox3f box, SbVec3f center) {\n\n\t}", "private void setupModel() {\n\n //Chooses which model gets prepared\n switch (id) {\n case 2:\n singlePackage = new Node();\n activeNode = singlePackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_solo)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n case 3:\n multiPackage = new Node();\n activeNode = multiPackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_multi_new)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n case 4:\n wagonPackage = new Node();\n activeNode = wagonPackage;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.package_car_new)\n .build().thenAccept(a -> activeRenderable = a)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n\n default:\n mailbox = new Node();\n activeNode = mailbox;\n\n //Builder for model\n ModelRenderable.builder()\n .setSource(ArActivity.this, R.raw.mailbox)\n .build().thenAccept(renderable -> activeRenderable = renderable)\n .exceptionally(\n throwable -> {\n Toast.makeText(this, \"Unable to show \", Toast.LENGTH_SHORT).show();\n return null;\n }\n );\n break;\n }\n }", "public WorkingMemory createInferredModel(IRI modelId) {\n\t\tSet<Statement> statements = JavaConverters.setAsJavaSetConverter(SesameJena.ontologyAsTriples(getModelAbox(modelId))).asJava();\n\t\tSet<Triple> triples = statements.stream().map(s -> Bridge.tripleFromJena(s.asTriple())).collect(Collectors.toSet());\n\t\ttry {\n\t\t\t// Using model's ontology IRI so that a spurious different ontology declaration triple isn't added\n\t\t\tOWLOntology schemaOntology = OWLManager.createOWLOntologyManager().createOntology(getOntology().getRBoxAxioms(Imports.INCLUDED), modelId);\n\t\t\tSet<Statement> schemaStatements = JavaConverters.setAsJavaSetConverter(SesameJena.ontologyAsTriples(schemaOntology)).asJava();\n\t\t\ttriples.addAll(schemaStatements.stream().map(s -> Bridge.tripleFromJena(s.asTriple())).collect(Collectors.toSet()));\n\t\t} catch (OWLOntologyCreationException e) {\n\t\t\tLOG.error(\"Couldn't add rbox statements to data model.\", e);\n\t\t}\n\t\treturn getRuleEngine().processTriples(JavaConverters.asScalaSetConverter(triples).asScala());\n\t}", "public static void main( String[] args ){\n AdjListsGraph<String> a = new AdjListsGraph<String>( \"Sample-Graph.tgf\" );\n System.out.println( a );\n System.out.println( \"Number of vertices (5):\" + a.getNumVertices());\n System.out.println( \"Number of arcs (7):\" + a.getNumArcs());\n System.out.println( \"isEdge A<-->B (TRUE):\" + a.isEdge(\"A\", \"B\"));\n System.out.println( \"isArc A-->C (TRUE):\" + a.isArc( \"A\",\"C\"));\n System.out.println( \"isEdge D<-->E (FALSE):\" + a.isEdge( \"D\",\"E\" ));\n System.out.println( \"isArc D -> E (TRUE):\" + a.isArc( \"D\",\"E\" ));\n System.out.println( \"isArc E -> D (FALSE):\" + a.isArc( \"E\",\"D\" ));\n System.out.println( \"Removing vertex A.\");\n a.removeVertex( \"A\" );\n System.out.println( \"Adding edge B<-->D\");\n a.addEdge( \"B\",\"D\" );\n System.out.println( \"Number of vertices (4):\" + a.getNumVertices());\n System.out.println( \"Number of arcs (5):\" + a.getNumArcs());\n System.out.println( a );\n System.out.println( \"Adj to B ([C,D]):\" + a.getSuccessors( \"B\" ) );\n System.out.println( \"Adj to C ([B]):\" + a.getSuccessors( \"C\" ));\n System.out.println( \"Adding A (at the end of vertices).\" );\n a.addVertex( \"A\" ); \n System.out.println( \"Adding B (should be ignored).\" );\n a.addVertex( \"B\" );\n System.out.println( \"Saving the graph into BCDEA.tgf\" );\n a.saveToTGF( \"BCDEA.tgf\" );\n System.out.println( \"Adding F->G->H->I->J->K->A.\" );\n a.addVertex( \"F\" );\n a.addVertex( \"G\" );\n a.addArc( \"F\", \"G\" );\n a.addVertex( \"H\" );\n a.addArc( \"G\", \"H\" );\n a.addVertex( \"I\" );\n a.addArc( \"H\", \"I\" );\n a.addVertex( \"J\" );\n a.addArc( \"I\", \"J\" );\n a.addVertex( \"K\" );\n a.addArc( \"J\", \"K\" );\n a.addArc( \"K\", \"A\" );\n System.out.println( a );\n System.out.println( \"Saving the graph into A-K.tgf\" );\n a.saveToTGF( \"A-K.tgf\" );\n }", "public static void main (String[] args){\n\t\t Model model1 = ModelFactory.createDefaultModel();\n\t\t Model model2 = ModelFactory.createDefaultModel();\n\t\t // use the FileManager to find the input file\n\t\t InputStream in1 = FileManager.get().open( \"D:\\\\eclipse\\\\carta-de-exigencia-cetesb.rdf\" );\n\t\t InputStream in2 = FileManager.get().open( \"D:\\\\eclipse\\\\liminar-contra-a-usp.rdf\" );\n\t\tif (in1 == null || in2 ==null) {\n\t\t throw new IllegalArgumentException(\n\t\t \"File: \" + \"D:\\\\eclipse\\\\carta-de-exigencia-cetesb.rdf\" + \" not found\");\n\t\t}\n\n\t\t// read the RDF/XML file\n\t\tmodel1.read(in1, null);\n\t\tmodel2.read(new InputStreamReader (in2), \"\");\n\t\tModel model = model1.union(model2);\n\n\t\tmodel.write(System.out);\n\t\t// write it to standard out\n\t\t//model1.write(System.out);\n\t\t//model1.read(new InputStreamReader(in1 ), \"\"); \n\t}", "private static Set<TipoLinkPartita> initModel() {\n\n Set<TipoLinkPartita> partite = new HashSet<TipoLinkPartita>();\n\n Squadra verdi = new Squadra(\"Verdi\");\n Squadra rossi = new Squadra(\"Rossi\");\n Squadra gialli = new Squadra(\"Gialli\");\n Squadra blu = new Squadra(\"Blu\");\n\n try {\n\n TipoLinkPartita p = new TipoLinkPartita(verdi, 2, rossi, 0);\n verdi.inserisciLinkPartita(p);\n partite.add(p);\n\n p = new TipoLinkPartita(verdi, 3, blu, 1);\n verdi.inserisciLinkPartita(p);\n partite.add(p);\n\n p = new TipoLinkPartita(blu, 2, rossi, 0);\n blu.inserisciLinkPartita(p);\n partite.add(p);\n\n p = new TipoLinkPartita(gialli, 1, rossi, 3);\n rossi.inserisciLinkPartita(p);\n partite.add(p);\n\n } catch (EccezionePrecondizioni e) {\n e.printStackTrace();\n }\n\n // Crea ed aggiunge giocatori alle squadre\n // eta' casuale tra 1970 e 1980\n // (Math.random() resituisce un double casuale tra 0.0 e 1.0)\n for (int i = 0; i < 20; i++) {\n\n Giocatore g = new Giocatore(\"verde-\" + i, 1970 + (int) (10 * Math.random()));\n verdi.insericiLinkGioca(g);\n\n g = new Giocatore(\"rosso-\" + i, 1970 + (int) (10 * Math.random()));\n rossi.insericiLinkGioca(g);\n\n g = new Giocatore(\"giallo-\" + i, 1970 + (int) (10 * Math.random()));\n gialli.insericiLinkGioca(g);\n\n g = new Giocatore(\"blu-\" + i, 1970 + (int) (10 * Math.random()));\n blu.insericiLinkGioca(g);\n }\n\n return partite;\n }", "@Test\n\tpublic void invertedModel() throws IOException, GeoTessException\n\t{\n\t\tGeoTessMetaData metaData = new GeoTessMetaData();\n\t\tmetaData.setAttributes(\"speed\", \"furlongs/fortnight\");\n\t\tmetaData.setLayerNames(\"hires; lores; thin\");\n\t\tmetaData.setDataType(\"byte\");\n\t\tmetaData.setModelSoftwareVersion(\"GeoTessModelTest 1.0\");\n\t\tmetaData.setModelGenerationDate(new Date().toString());\n\n\t\tmetaData.setLayerTessIds(new int[] {0, 1, 1});\n\n\t\tGeoTessModel imodel = new GeoTessModel(\"src/test/resources/permanent_files/invertedGrid.geotess\", metaData);\n\n\t\tProfile p;\n\t\tfloat r1, r2;\n\t\tfor (int layer=0; layer<imodel.getNLayers(); ++layer)\n\t\t{\n\t\t\tint tessid = imodel.getMetaData().getTessellation(layer);\n\n\t\t\tHashSetInteger connectedVertices = imodel.getGrid().getVertexIndicesTopLevel(tessid);\n\n\t\t\tr1 = (layer+1)*1000F;\n\t\t\tr2 = (layer+2)*1000F;\n\n\t\t\tfor (int vtx=0; vtx<imodel.getNVertices(); ++vtx)\n\t\t\t{\n\t\t\t\tif (connectedVertices.contains(vtx))\n\t\t\t\t{\n\t\t\t\t\tif (layer == imodel.getNLayers()-1)\n\t\t\t\t\t\tp = new ProfileThin(r1, Data.getDataByte(((byte)layer)));\n\t\t\t\t\telse\n\t\t\t\t\t\tp = new ProfileConstant(r1, r2,\tData.getDataByte(((byte)layer)));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tp = new ProfileEmpty(r1, r2);\n\n\t\t\t\timodel.setProfile(vtx, layer, p);\n\t\t\t}\n\t\t}\n\n\t\t//System.out.println(imodel);\n\n\t\tGeoTessPosition pos = imodel.getGeoTessPosition();\n\n\t\tpos.set(new double[] {0., 0., 1.}, 1500.);\n\n\t\t//\t\tdouble[][] borehole = GeoTessModelUtils.getBorehole(pos, 1e30, 0, 1000, false, false, new int[] {0});\n\t\t//\t\tfor (int i=0; i<borehole.length; ++i)\n\t\t//\t\t\tSystem.out.printf(\"%10.4f %2.0f%n\", borehole[i][0], borehole[i][1]);\n\n\t\tassertEquals(0, pos.getLayerId());\n\n\t\tpos.setRadius(10000.);\n\n\t\tassertEquals(1, pos.getLayerId());\n\n\t\tassertEquals(2000., pos.getRadiusTop(0), 1e-12);\n\n\t}", "protected void refreshOntBox() {\r\n\t\tontBox.removeAllItems();\r\n\t\t\r\n\t\tSet sortedOntSet = new TreeSet(OntologyComparator.INSTANCE);\r\n\t\tsortedOntSet.addAll(swoopModel.getOntologies());\r\n\t\tfor (Iterator iter=sortedOntSet.iterator(); iter.hasNext();) {\r\n\t\t\tOWLOntology ont = (OWLOntology) iter.next();\r\n\t\t\tontBox.addItem(ont);\r\n\t\t}\r\n\t}", "public BranchGroup cubo1(){\n\t\t\tBranchGroup objRoot = new BranchGroup();\n\n\t TransformGroup objScale = new TransformGroup();\n\t Transform3D t3d = new Transform3D();\n\t Transform3D rotate = new Transform3D();\n Transform3D tempRotate = new Transform3D();\n\t \t rotate.rotX(Math.PI/1.0d);\n tempRotate.rotY(Math.PI/1.80d);\n Matrix3d n = new Matrix3d();\n Vector3d op = new Vector3d(.5,.05,.5);\n tempRotate.setScale(op);\n Vector3d op2 = new Vector3d(-.5,.6,1);\n tempRotate.setTranslation(op2);\n rotate.mul(tempRotate);\n TransformGroup objRotate = new TransformGroup(rotate);\n\n objRoot.addChild(objRotate);\n\t \n t3d.mul(rotate);\n\t objScale.setTransform(t3d);\n\t \n\t objRoot.addChild(objScale);\n\n\tTransformGroup objTrans = new TransformGroup();\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\n\t\tobjTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);\n\t\t\t\t\t\n\t\t\n\t\tobjScale.addChild(objTrans);\n\n\t\tint flags = ObjectFile.RESIZE;\n\t\tif (!noTriangulate) flags |= ObjectFile.TRIANGULATE;\n\t\tif (!noStripify) flags |= ObjectFile.STRIPIFY;\n\t\tObjectFile f = new ObjectFile(flags, \n\t\t (float)(creaseAngle * Math.PI / 180.0));\n\t\tScene s = null;\n\t\ttry {\n\t\t s = f.load(filename);\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (ParsingErrorException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\tcatch (IncorrectFormatException e) {\n\t\t System.err.println(e);\n\t\t System.exit(1);\n\t\t}\n\t\t \n\t\tobjTrans.addChild(s.getSceneGroup());\n\t\t\n \n \n\t\tBoundingSphere bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);\n\n\t Color3f bgColor = new Color3f(0.05f, 0.05f, 0.5f);\n\t Background bgNode = new Background(bgColor);\n\t bgNode.setApplicationBounds(bounds);\n\t objRoot.addChild(bgNode);\n\n\t\treturn objRoot;\n\t\t \n\t }", "private static int getHeavyType(MMFFMolecule mol, int atom) {\n // Aromatic Atoms\n if (mol.isAromaticAtom(atom)) {\n // 5 member rings\n if (isInAromaticRingOfSize(mol, atom, 5)) {\n ArrayList<Integer> alphaHet = new ArrayList<Integer>(mol.getAllAtoms());\n ArrayList<Integer> betaHet = new ArrayList<Integer>(mol.getAllAtoms());\n\n boolean alphaBetaSameRing = false;\n boolean isAlphaOS = false;\n boolean isBetaOS = false;\n\n if (mol.getAtomicNo(atom) == 6 || mol.getAtomicNo(atom) == 7) {\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n // Skip atoms not in the ring.\n if (!isInAromaticRingOfSize(mol, nbr, 5))\n continue;\n\n if (inSameRing(mol, atom, nbr, 5)\n && (mol.getAtomicNo(nbr) == 8\n || mol.getAtomicNo(nbr) == 16\n || mol.getAtomicNo(nbr) == 7\n && degree(mol, nbr) == 3\n && !isAtomNOxide(mol, nbr)))\n alphaHet.add(nbr);\n\n for (int j=0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n\n if (nbr2 == atom)\n continue;\n\n if (!isInAromaticRingOfSize(mol, nbr2, 5))\n continue;\n\n if (inSameRing(mol, atom, nbr2, 5)\n && (mol.getAtomicNo(nbr2) == 8\n || mol.getAtomicNo(nbr2) == 16\n || mol.getAtomicNo(nbr2) == 7\n && degree(mol, nbr2) == 3\n && !isAtomNOxide(mol, nbr2)))\n betaHet.add(nbr2);\n }\n }\n\n for (int alpha : alphaHet)\n if (mol.getAtomicNo(alpha) == 8 || mol.getAtomicNo(alpha) == 16) {\n isAlphaOS = true;\n break;\n }\n\n for (int beta : betaHet)\n if (mol.getAtomicNo(beta) == 8 || mol.getAtomicNo(beta) == 16) {\n isBetaOS = true;\n break;\n }\n\n for (int i=0; i<alphaHet.size(); i++)\n for (int j=i; j<betaHet.size(); j++)\n if (inSameRing(mol, alphaHet.get(i), betaHet.get(j), 5)) {\n alphaBetaSameRing = true;\n break;\n }\n }\n\n switch (mol.getAtomicNo(atom)) {\n // ----- Carbon -----\n case 6:\n if (betaHet.isEmpty()) {\n int nN = 0;\n int nFormalCharge = 0;\n int nIn5Ring = 0;\n int nIn6Ring = 0;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) == 7\n && degree(mol, nbr) == 3) {\n nN++;\n\n if (mol.getAtomCharge(nbr) > 0\n && !isAtomNOxide(mol, nbr))\n nFormalCharge++;\n\n if (isInAromaticRingOfSize(mol, nbr, 5))\n nIn5Ring++;\n\n if (isInAromaticRingOfSize(mol, nbr, 6))\n nIn6Ring++;\n }\n }\n\n // CIM+ (Aromatic carbon between N's in\n // imidazolium)\n if ((nN == 2 && nIn5Ring > 0 || nN == 3 && nIn5Ring == 2)\n && nFormalCharge > 0 && nIn6Ring == 0)\n return 80;\n }\n\n // If we have both or none of alpha/beta heteroatoms.\n if (!(alphaHet.isEmpty() ^ betaHet.isEmpty())) {\n boolean surroundedByBenzeneC = true;\n boolean surroundedByArom = true;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) != 6\n || !inRingOfSize(mol, nbr, 6))\n surroundedByBenzeneC = false;\n\n if (inSameRing(mol, atom, nbr, 5)\n && !mol.isAromaticAtom(nbr))\n surroundedByArom = false;\n }\n\n // C5 (General Carbon in 5 membered heteroaromatic\n // ring)\n if (alphaHet.isEmpty() && betaHet.isEmpty()\n && !surroundedByBenzeneC && surroundedByArom)\n return 78;\n\n // C5 (General Carbon in 5 membered heteroaromatic\n // ring)\n if (!alphaHet.isEmpty() && !alphaHet.isEmpty()\n && (!alphaBetaSameRing || !isAlphaOS && !isBetaOS))\n return 78;\n }\n\n // C5A (Aromatic 5-ring C, alpha to N:, O: or S:)\n if (!alphaHet.isEmpty() && (betaHet.isEmpty() || isAlphaOS))\n return 63;\n\n // C5B (Aromatic 5-ring C, alpha to N:, O: or S:)\n if (!betaHet.isEmpty() && (alphaHet.isEmpty() || isBetaOS))\n return 64;\n break;\n\n // ----- Nitrogen -----\n case 7:\n // N5AX (N-oxide nitrogen in 5-ring alpha position)\n // N5BX (N-oxide nitrogen in 5-ring beta position)\n // N5OX (N-oxide nitrogen in other 5-ring position)\n if (isAtomNOxide(mol, atom))\n return 82;\n\n if (alphaHet.isEmpty() && betaHet.isEmpty()) {\n // NPYL (Aromatic 5-ring nitrogen with pi lone\n // pair)\n if (degree(mol, atom) == 3)\n return 39;\n\n // N5M (Nitrogen in 5-ring aromatic anion)\n return 76;\n }\n\n // NIM+ (Aromatic nitrogen in imidazolium)\n // N5A+ (Positive nitrogen in 5-ring alpha position)\n // N5B+ (Positive nitrogen in 5-ring beta position)\n // N5+ (Positive nitrogen in other 5-ring position)\n if (degree(mol, atom) == 3)\n if (alphaHet.isEmpty() ^ betaHet.isEmpty())\n return 81;\n\n // N5A (Aromatic 5-ring N, alpha to N:, O: or S:)\n if (!alphaHet.isEmpty() && (betaHet.isEmpty() || isAlphaOS))\n return 65;\n\n // N5B (Aromatic 5-ring N, beta to N:, O: or S:)\n if (!betaHet.isEmpty() && (alphaHet.isEmpty() || isBetaOS))\n return 66;\n\n // N5 (General Nitrogen in 5-membered heteroaromatic\n // ring)\n if (!alphaHet.isEmpty() && !betaHet.isEmpty())\n return 79;\n break;\n\n // ----- Oxygen -----\n case 8:\n // OFUR (Aromatic 5-ring Oxygen with pi lone pair)\n return 59;\n\n // ----- Sulfur -----\n case 16:\n // STHI (Aromatic 5-ring Sulfur with pi lone pair)\n return 44;\n }\n }\n\n // 6 member rings\n if (isInAromaticRingOfSize(mol, atom, 6)) {\n switch (mol.getAtomicNo(atom)) {\n // ----- Carbon -----\n case 6:\n // CB (Aromatic Carbon (eg in benzene))\n return 37;\n\n // ----- Nitrogen -----\n case 7:\n // NPOX (Pyridinium N-oxide Nitrogen)\n if (isAtomNOxide(mol, atom))\n return 69;\n\n // NPD+ (Aromatic Nitrogen in pyridinium)\n if (degree(mol, atom) == 3)\n return 58;\n\n // NPYD (Aromatic Nitrogen with sigma lone pair)\n return 38;\n }\n }\n }\n\n // Aliphatic Heavy Atoms\n switch (mol.getAtomicNo(atom)) {\n // ----- Lithium -----\n case 3:\n // LI+ (Lithium cation)\n if (mol.getConnAtoms(atom) == 0)\n return 92;\n break;\n\n // ----- Carbon -----\n case 6:\n // 4 Neighbours\n if (degree(mol, atom) == 4) {\n // CR3R (Aliphatic Carbon in 3-member ring)\n if (mol.getAtomRingSize(atom) == 3)\n return 22;\n\n // CR4R (Aliphatic Carbon in 4-member ring)\n if (mol.getAtomRingSize(atom) == 4)\n return 20;\n\n // CR (Alkyl Carbon)\n return 1;\n }\n\n // 3 Neighbours\n if (degree(mol, atom) == 3) {\n int nN2 = 0;\n int nN3 = 0;\n int nO = 0;\n int nS = 0;\n int doubleBondedElement = 0;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n // Find a double-bonded element\n if (mol.getBondOrder(mol.getBond(atom, nbr)) == 2)\n doubleBondedElement = mol.getAtomicNo(nbr);\n\n // Count the terminal Oxygen/Sulfur atoms.\n if (degree(mol, nbr) == 1) {\n if (mol.getAtomicNo(nbr) == 8)\n nO++;\n if (mol.getAtomicNo(nbr) == 16)\n nS++;\n } else if (mol.getAtomicNo(nbr) == 7) {\n if (degree(mol, nbr) == 3)\n nN3++;\n else if (degree(mol, nbr) == 2 &&\n mol.getBondOrder(mol.getBond(atom, nbr)) == 2)\n nN2++;\n }\n }\n\n // If there are two or more Nitrogens with 3 neighbours\n // each, and there are no nitrogens with two neighbours\n // only, and Carbon is double-bonded to Nitrogen.\n if (nN3 >= 2 && nN2 == 0 && doubleBondedElement == 7) {\n // CNN+ (Carbon in +N=C-N: resonance structures)\n // CGD+ (Guanidinium Carbon)\n return 57;\n }\n\n // If there are two terminal Oxygen/Sulfur atoms.\n if (nO == 2 || nS == 2) {\n // CO2M (Carbon in carboxylate anion)\n // CS2M (Carbon in thiocarboxylate anion)\n return 41;\n }\n\n // If the Carbon is in a 4-member ring and is\n // double-bonded to another Carbon.\n if (mol.getAtomRingSize(atom) == 4\n && doubleBondedElement == 6) {\n // CR4E (Olefinic Carbon in 4-member ring)\n return 30;\n }\n\n // If the Carbon is double bonded to Nitrogen, Oxygen,\n // Phosphorus or Sulfur.\n if (doubleBondedElement == 7 || doubleBondedElement == 8\n || doubleBondedElement == 15 || doubleBondedElement == 16) {\n // C=N (Imine-atomType Carbon)\n // CGD (Guanidine Carbon)\n // C=O (Generic carbonyl Carbon)\n // C=OR (Ketone or aldehyde carbonyl Carbon)\n // C=ON (Amide carbonyl Carbon)\n // COO (Carboxylic acid or ester carbonyl Carbon)\n // COON (Carbamate carbonyl Carbon)\n // COOO (Carbonic acid or ester carbonyl function)\n // C=OS (Thioester carbonyl Carbon, double bonded to O)\n // C=P (Carbon doubly bonded to P)\n // C=S (Thioester Carbon, double bonded to S)\n // C=SN (Thioamide Carbon, double bonded to S)\n // CSO2 (Carbon in >C=SO2)\n // CS=O (Sulfinyl Carbon in >C=S=O)\n // CSS (Thiocarboxylic acid or ester Carbon)\n return 3;\n }\n\n // Generic SP2 Carbon\n // C=C (Vinylic Carbon)\n // CSP2 (Generic SP2 Carbon)\n return 2;\n }\n\n // 2 Neighbours\n if (degree(mol, atom) == 2) {\n // CSP (Acetylenic Carbon), =C= (Allenic Carbon)\n return 4;\n }\n\n if (degree(mol, atom) == 1) {\n // C%- (Isonitrile Carbon)\n return 60;\n }\n break;\n\n // ----- Nitrogen -----\n case 7:\n // Count the number of terminal Oxygens as well as terminal\n // Oxygens bonded to neighbouring Phosphorus or Sulfur atoms.\n int nTermOtoN = 0;\n boolean isSulfonamideN = false;\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) == 8 && degree(mol, nbr) == 1)\n nTermOtoN++;\n\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) >= 3\n && (mol.getAtomicNo(nbr) == 15 || mol.getAtomicNo(nbr) == 16)) {\n int nOtoSP = 0;\n\n for (int j=0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n if (mol.getAtomicNo(nbr2) == 8 && degree(mol, nbr2) == 1)\n nOtoSP++;\n }\n\n if (!isSulfonamideN)\n isSulfonamideN = nOtoSP >= 2;\n }\n }\n\n // 4 neighbours.\n if (degree(mol, atom) == 4) {\n // N3OX (sp3-hybridized N-oxide Nitrogen)\n if (isAtomNOxide(mol, atom))\n return 68;\n\n // NR+ (Quaternary Nitrogen)\n return 34;\n }\n\n // 3 neighbours.\n if (degree(mol, atom) == 3) {\n // Total bond order >= 4\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) >= 4) {\n boolean doubleCN = false;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getBondOrder(mol.getBond(atom, nbr)) == 2) {\n doubleCN = mol.getAtomicNo(nbr) == 7\n || mol.getAtomicNo(nbr) == 6;\n\n if (mol.getAtomicNo(nbr) == 6) {\n for (int j=0; doubleCN && j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n\n if (nbr2 == atom)\n continue;\n\n doubleCN = !(mol.getAtomicNo(nbr2) == 7\n && degree(mol, nbr2) == 3);\n }\n }\n }\n }\n\n // N20X (sp2-hybridized N-oxide Nitrogen)\n if (nTermOtoN == 1)\n return 67;\n\n // NO2 (Nitrogen in nitro group)\n // NO3 (Nitrogen in nitrate group)\n if (nTermOtoN >= 2)\n return 45;\n\n // N+=C (Iminium Nitrogen)\n // N+=N (Positively charged Nitrogen doubly bonded to\n // N)\n if (doubleCN)\n return 54;\n }\n\n // Total bond order >= 3\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) >= 3) {\n boolean isNCOorNCS = false;\n boolean isNCNplus = false;\n boolean isNGDplus = false;\n boolean isNNNorNNC = false;\n boolean isNbrC = false;\n boolean isNbrBenzeneC = false;\n int EdoubledC = 0;\n int EtripledC = 0;\n int N2toC = 0;\n int N3toC = 0;\n int OtoC = 0;\n int StoC = 0;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n // Neighbour is Carbon\n if (mol.getAtomicNo(nbr) == 6) {\n isNbrC = true;\n\n if (mol.isAromaticAtom(nbr)\n && mol.getAtomRingSize(nbr) == 6)\n isNbrBenzeneC = true;\n\n N2toC = 0;\n N3toC = 0;\n OtoC = 0;\n StoC = 0;\n int nFormalCharge = 0;\n int inAromatic6Ring = 0;\n\n for (int j =0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n int bond = mol.getBond(nbr, nbr2);\n\n // Check if we have an Oxygen or Sulfur\n // double bonded to this Carbon.\n if (mol.getBondOrder(bond) == 2\n && (mol.getAtomicNo(nbr2) == 8\n || mol.getAtomicNo(nbr2) == 16))\n isNCOorNCS = true;\n\n // Check and identify if an element is\n // double bonded to this Carbon.\n if (mol.getBondOrder(bond) == 2\n || (mol.isAromaticBond(bond)\n && (mol.getAtomicNo(nbr2) == 6\n || (mol.getAtomicNo(nbr2) == 7\n && inRings(mol, nbr2) == 1))))\n EdoubledC = mol.getAtomicNo(nbr2);\n\n // Check and identify if an element is\n // triple bonded to this Carbon.\n if (mol.getBondOrder(bond) == 3)\n EtripledC = mol.getAtomicNo(nbr2);\n\n // If this Carbon is bonded to a Nitrogen\n // with 3 neighbours.\n if (mol.getAtomicNo(nbr2) == 7\n && degree(mol, nbr2) == 3) {\n if (mol.getAtomCharge(nbr2) == 1)\n nFormalCharge++;\n\n if (isInAromaticRingOfSize(mol, nbr, 6))\n inAromatic6Ring++;\n\n int OtoN3 = 0;\n for (int k=0; k<mol.getAllConnAtoms(nbr2); k++) {\n int nbr3 = mol.getConnAtom(nbr2, k);\n if (mol.getAtomicNo(nbr3) == 8)\n OtoN3++;\n }\n\n if (OtoN3 < 2)\n N3toC++;\n }\n\n // If this Carbon is bonded to a Nitrogen\n // with 2 neighbours with a double or\n // aromatic bond.\n if (mol.getAtomicNo(nbr2) == 7\n && degree(mol, nbr2) == 2\n && (mol.getBondOrder(bond) == 2\n || mol.isAromaticBond(bond)))\n N2toC++;\n\n // If this Carbon is bonded to an aromatic\n // atom.\n if (mol.isAromaticAtom(nbr2)) {\n if (mol.getAtomicNo(nbr2) == 8)\n OtoC++;\n\n if (mol.getAtomicNo(nbr2) == 16)\n StoC++;\n }\n }\n\n\n if (EdoubledC == 7) {\n if (N3toC == 2 && N2toC == 0\n && nFormalCharge > 0\n && inAromatic6Ring == 0\n && degree(mol, nbr) < 4)\n isNCNplus = true;\n\n if (N3toC == 3)\n isNGDplus = true;\n }\n\n // Neighbour is Nitrogen\n } else if (mol.getAtomicNo(nbr) == 7) {\n int NtoN = 0;\n int OtoN = 0;\n int StoN = 0;\n\n for (int j=0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n int bond = mol.getBond(nbr, nbr2);\n\n if (mol.getBondOrder(bond) == 2) {\n if (mol.getAtomicNo(nbr2) == 6) {\n for (int k=0; k<mol.getAllConnAtoms(nbr2); k++) {\n int nbr3 = mol.getConnAtom(nbr2, k);\n\n if (nbr3 == atom)\n continue;\n\n if (mol.getAtomicNo(nbr3) == 7)\n NtoN++;\n else if (mol.getAtomicNo(nbr3) == 8)\n OtoN++;\n else if (mol.getAtomicNo(nbr3) == 16)\n StoN++;\n }\n\n if (NtoN == 0 && OtoN == 0 && StoN == 0\n && !isNbrBenzeneC)\n isNNNorNNC = true;\n }\n\n if (mol.getAtomicNo(nbr2) == 7\n && !isNbrBenzeneC)\n isNNNorNNC = true;\n }\n }\n }\n }\n\n // If ipso Nitrogen is bonded to Carbon.\n if (isNbrC) {\n if (EtripledC == 7)\n isSulfonamideN = true;\n\n // NCN+ (Either Nitrogen in N+=C-N)\n if (isNCNplus)\n return 55;\n\n // NGD+ (Guanidinium Nitrogen)\n if (isNGDplus)\n return 56;\n\n // NC=C (Enamine or aniline nitrogen, deloc. lp)\n // NC=N (Nitrogen in N-C=N with deloc. lp)\n // NC=P (Nitrogen in N-C=P with deloc. lp)\n // NC%C (Nitrogen attached to C-C triple bond)\n if (!isNCOorNCS && !isSulfonamideN\n && (OtoC == 0 && StoC == 0 && isNbrBenzeneC\n || EdoubledC == 6 || EdoubledC == 7\n || EdoubledC == 15 || EtripledC == 6))\n return 40;\n }\n\n\n // NC=O (Amide nitrogen)\n // NC=S (Thioamide nitrogen)\n // NN=C (Nitrogen in N-N=C moiety with deloc. lp)\n // NN=N (Nitrogen in N-N=N moiety with deloc. lp)\n if (!isSulfonamideN && (isNCOorNCS || isNNNorNNC))\n return 10;\n }\n }\n\n // 2 neighbours.\n if (degree(mol, atom) == 2) {\n // Total bond order = 4\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) == 4) {\n boolean isIsonitrile = false;\n for (int i=0; !isIsonitrile && i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n isIsonitrile = mol.getBondOrder(mol.getBond(atom, nbr)) == 3;\n }\n\n // NR% (Isonitrile Nitrogen)\n if (isIsonitrile)\n return 61;\n\n // =N= (Central Nitrogen in C=N=N or N=N=N)\n return 53;\n }\n\n // Total bond order = 3\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) == 3) {\n boolean isNitroso = false;\n boolean isImineOrAzo = false;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n if (mol.getBondOrder(mol.getBond(atom, nbr)) == 2) {\n isNitroso = mol.getAtomicNo(nbr) == 8\n && nTermOtoN == 1;\n\n isImineOrAzo = mol.getAtomicNo(nbr) == 6\n || mol.getAtomicNo(nbr) == 7;\n }\n }\n\n // N=O (Nitrogen in nitroso group)\n if (isNitroso && !isImineOrAzo)\n return 46;\n\n // N=C (Imine Nitrogen)\n // N=N (Azo-group Nitrogen)\n if (isImineOrAzo)\n return 9;\n }\n\n // Total bond order >= 2\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) >= 2) {\n boolean isNSO = false;\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) == 16) {\n int nTermOtoS = 0;\n\n for (int j=0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n if (mol.getAtomicNo(nbr2) == 8\n && degree(mol, nbr2) == 1)\n nTermOtoS++;\n }\n\n isNSO = nTermOtoS == 1;\n }\n }\n\n // NSO (Divalent nitrogen replacing monovalent O in SO2 group)\n if (isNSO)\n return 48;\n\n // NM (Anionic divalent Nitrogen)\n if (!isSulfonamideN)\n return 62;\n }\n }\n\n // NSO2 (Sulfonamide nitrogen)\n // NSO3 (Sulfonamide nitrogen)\n // NC%N (Nitrogen attached to cyano group)\n if (isSulfonamideN)\n return 43;\n\n // 1 neighbour\n if (degree(mol, atom) == 1) {\n boolean isNSP = false;\n boolean isNAZT = false;\n\n for (int i=0; !isNSP && !isNAZT && i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n isNSP = mol.getBondOrder(mol.getBond(atom, nbr)) == 3;\n\n if (mol.getAtomicNo(nbr) == 7 && degree(mol, nbr) == 2) {\n for (int j=0; !isNAZT && j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n\n isNAZT = mol.getAtomicNo(nbr2) == 7\n && degree(mol, nbr2) == 2\n || mol.getAtomicNo(nbr2) == 6\n && degree(mol, nbr2) == 3;\n }\n\n }\n }\n\n // NSP (Triple bonded Nitrogen)\n if (isNSP)\n return 42;\n\n // NAZT (Terminal nitrogen in azido or diazo group)\n if (isNAZT)\n return 47;\n }\n\n // If nothing was matched\n // NR (Amine Nitrogen)\n return 8;\n\n // ----- Oxygen -----\n case 8:\n // 3 neighbours. O+ (Oxonium Oxygen)\n if (degree(mol, atom) == 3)\n return 49;\n // 2 neighbours.\n if (degree(mol, atom) == 2) {\n // O=+ (Oxenium Oxygen)\n if (mol.getOccupiedValence(atom) + mol.getImplicitHydrogens(atom) == 3)\n return 51;\n\n int nHtoO = 0;\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) == 1)\n nHtoO++;\n }\n\n // OH2 (Oxygen in water)\n if (nHtoO + mol.getImplicitHydrogens(atom) == 2)\n return 70;\n\n // Otherwise ipso must be one of:\n // OC=O (Carboxylic acid or ester Oxygen)\n // OC=C (Enolic or phenolic Oxygen)\n // OC=N (Oxygen in -O-C=N- moiety)\n // OC=S (Divalent Oxygen in thioacid or ester)\n // ONO2 (Divalent nitrate \"ether\" Oxygen)\n // ON=O (Divalent nitrate \"ether\" Oxygen)\n // OSO3 (Divalent Oxygen in sulfate group)\n // OSO2 (Divalent Oxygen in sulfite group)\n // OSO (One of two divalent Oxygens attached to Sulfur)\n // OS=O (Divalent Oxygen in R(RO)S=O)\n // -OS (Other divalent Oxygen attached to Sulfur)\n // OPO3 (Divalent Oxygen in phosphate group)\n // OPO2 (Divalent Oxygen in phosphite group)\n // OPO (Divalent Oxygen, one of two Oxygens attached to P)\n // -OP (Other divalent Oxygen attached to Phosphorus)\n return 6;\n }\n // 1 or 0 neighbours.\n if (mol.getConnAtoms(atom) <= 1) {\n int nNtoS = 0;\n int nOtoS = 0;\n int nStoS = 0;\n\n boolean isOxideOtoH = mol.getAllConnAtoms(atom)\n - mol.getConnAtoms(atom)\n + mol.getImplicitHydrogens(atom) > 0 ? true : false;\n boolean isCarboxylateO = false;\n boolean isCarbonylO = false;\n boolean isOxideOtoC = false;\n boolean isNitrosoO = false;\n boolean isOxideOtoN = false;\n boolean isNOxideO = false;\n boolean isNitroO = false;\n boolean isThioSulfinateO = false;\n boolean isSulfateO = false;\n boolean isSulfoxideO = false;\n boolean isPhosphateOrPerchlorateO = false;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n if (isOxideOtoH) break;\n if (isCarboxylateO) break;\n if (isCarbonylO) break;\n if (isOxideOtoC) break;\n if (isNitrosoO) break;\n if (isOxideOtoN) break;\n if (isNOxideO) break;\n if (isNitroO) break;\n if (isThioSulfinateO) break;\n if (isSulfateO) break;\n if (isSulfoxideO) break;\n if (isPhosphateOrPerchlorateO) break;\n\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) == 6\n || mol.getAtomicNo(nbr) == 7\n || mol.getAtomicNo(nbr) == 16) {\n for (int j=0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n\n if (mol.getAtomicNo(nbr2) == 7\n && degree(mol, nbr2) == 2)\n nNtoS++;\n if (mol.getAtomicNo(nbr2) == 8\n && degree(mol, nbr2) == 1)\n nOtoS++;\n if (mol.getAtomicNo(nbr2) == 16\n && degree(mol, nbr2) == 1)\n nStoS++;\n }\n }\n\n isOxideOtoH = mol.getAtomicNo(nbr) == 1;\n\n // If ipso neighbour is a Carbon.\n if (mol.getAtomicNo(nbr) == 6) {\n isCarboxylateO = nOtoS == 2;\n\n isCarbonylO = mol.getBondOrder(mol.getBond(atom, nbr)) == 2;\n\n isOxideOtoC = mol.getBondOrder(mol.getBond(atom, nbr)) == 1\n && nOtoS == 1;\n }\n\n // If ipso neighbour is a Nitrogen.\n if (mol.getAtomicNo(nbr) == 7) {\n isNitrosoO = mol.getBondOrder(mol.getBond(atom, nbr)) == 2;\n\n if (mol.getBondOrder(mol.getBond(atom, nbr)) == 1 && nOtoS == 1) {\n isOxideOtoN = degree(mol, nbr) == 2\n || mol.getOccupiedValence(nbr)\n + mol.getImplicitHydrogens(nbr) == 3;\n\n isNOxideO = mol.getOccupiedValence(nbr)\n + mol.getImplicitHydrogens(nbr) == 4;\n }\n\n isNitroO = nOtoS >= 2;\n }\n\n // If ipso neighbour is a Sulfur.\n if (mol.getAtomicNo(nbr) == 16) {\n isThioSulfinateO = nStoS == 1;\n\n isSulfateO = mol.getBondOrder(mol.getBond(atom, nbr)) == 1\n || mol.getBondOrder(mol.getBond(atom, nbr)) == 2\n && nOtoS + nNtoS > 1;\n\n isSulfoxideO = mol.getBondOrder(mol.getBond(atom, nbr)) == 2\n && nOtoS + nNtoS == 1;\n }\n\n isPhosphateOrPerchlorateO = mol.getAtomicNo(nbr) == 15\n || mol.getAtomicNo(nbr) == 17;\n }\n\n // OM (Oxide oxygen on sp3 carbon\n // OM2 (Oxide oxygen on sp2 carbon\n // OM (Oxide oxygen on sp3 nitrogen (not in original MMFF.I Table III)\n // OM2 (Oxide oxygen on sp2 nitrogen (not in original MMFF.I Table III)\n if (isOxideOtoC || isOxideOtoN || isOxideOtoH)\n return 35;\n\n // O2CM (Oxygen in carboxylate group)\n // ONX (Oxygen in N-oxides)\n // O2N (Oxygen in nitro group)\n // O2NO (Nitro-group oxygen in nitrate)\n // O3N (Nitrate anion oxygen)\n // OSMS (Terminal oxygen in thiosulfinate anion)\n // O-S (Single terminal O on tetracoordinate sulfur)\n // O2S (One of 2 terminal O's on sulfur)\n // O3S (One of 3 terminal O's on sulfur)\n // O4S (Terminal O in sulfate anion)\n // OP (Oxygen in phosphine oxide)\n // O2P (One of 2 terminal O's on P)\n // O3P (One of 3 terminal O's on P)\n // O4P (One of 4 terminal O's on P)\n // O4Cl (Oxygen in perchlorate anion)\n if (isCarboxylateO || isNitroO || isNOxideO || isThioSulfinateO\n || isSulfateO || isPhosphateOrPerchlorateO)\n return 32;\n\n // O=C (Generic carbonyl oxygen)\n // O=CN (Carbonyl oxygen in amides)\n // O=CR (Carbonyl oxygen in aldehydes and ketones)\n // O=CO (Carbonyl oxygen in acids and esters)\n // O=N (Nitroso oxygen)\n // O=S (Doubly bonded sulfoxide oxygen)\n if (isCarbonylO || isNitrosoO || isSulfoxideO)\n return 7;\n }\n break;\n\n // ----- Fluorine -----\n case 9:\n // F (Fluorine)\n if (mol.getConnAtoms(atom) == 1)\n return 11;\n // F- (Fluoride anion)\n if (mol.getConnAtoms(atom) == 0)\n return 89;\n break;\n\n // ----- Sodium -----\n case 11:\n // Na+ (Sodium cation)\n if (mol.getConnAtoms(atom) == 0)\n return 93;\n break;\n\n // ----- Magnesium -----\n case 12:\n // Mg+2 (Dipositive Magnesium cation)\n if (mol.getConnAtoms(atom) == 0)\n return 99;\n break;\n\n // ----- Silicon -----\n case 14:\n // Si (Silicon)\n return 19;\n\n // ----- Phosphorus -----\n case 15:\n // PO4 (Phosphate group phosphorus)\n // PO3 (Phosphorus with 3 attached oxygens)\n // PO2 (Phosphorus with 2 attached oxygens)\n // PO (Phosphine oxide phosphorus)\n if (degree(mol, atom) == 4)\n return 25;\n // P (Phosphorus in phosphines)\n if (degree(mol, atom) == 3)\n return 26;\n // -P=C (Phosphorus doubly bonded to C)\n if (degree(mol, atom) == 2)\n return 75;\n break;\n\n // ----- Sulfur -----\n case 16:\n // 3 or 4 neighbours.\n if (degree(mol, atom) == 3 || degree(mol, atom) == 4) {\n int nONtoS = 0;\n int nStoS = 0;\n boolean isCdoubleS = false;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n // Check if ipso Sulfur is double bonded to Carbon.\n if (mol.getAtomicNo(nbr) == 6\n && mol.getBondOrder(mol.getBond(atom, nbr)) == 2)\n isCdoubleS = true;\n\n // If neighbour is terminal Oxygen/Sulfur or a\n // secondary Nitrogen increment counter.\n if ((mol.getConnAtoms(nbr) == 1 && mol.getAtomicNo(nbr) == 8)\n || (degree(mol, nbr) == 2 && mol.getAtomicNo(nbr) == 7))\n nONtoS++;\n\n if (mol.getConnAtoms(nbr) == 1 && mol.getAtomicNo(nbr) == 16)\n nStoS++;\n }\n\n // =SO2 (Sulfone Sulfur, doubly bonded to Carbon)\n if (degree(mol, atom) == 3 && nONtoS == 2 && isCdoubleS\n || degree(mol, atom) == 4)\n return 18;\n\n // SSOM (Tricoordinate Sulfur in anionic thiosulfinate\n // group)\n if ((nONtoS > 0 && nStoS > 0) || nONtoS == 2 && !isCdoubleS)\n return 73;\n\n // S=O (Sulfoxide Sulfur)\n // S=N (Tricoordinate Sulfur doubly bonded to N)\n return 17;\n }\n // 2 neighbours.\n if (degree(mol, atom) == 2) {\n boolean isOdoubleS = false;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n // Check if ipso Sulfur is double bonded to Oxygen.\n if (mol.getAtomicNo(nbr) == 8\n && mol.getBondOrder(mol.getBond(atom, nbr)) == 2)\n isOdoubleS = true;\n }\n\n // =S=O (Sulfinyl Sulfur)\n if (isOdoubleS)\n return 74;\n\n // S (Thiol, Sulfide or Disulfide Sulfur)\n return 15;\n }\n // 1 neighbour.\n if (degree(mol, atom) == 1) {\n int nbrTermS = 0;\n boolean isCdoubleS = false;\n\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n // Count how many terminal Sulfurs are 2 jumps from\n // atom.\n for (int j=0; j<mol.getAllConnAtoms(nbr); j++) {\n int nbr2 = mol.getConnAtom(nbr, j);\n\n if (mol.getAtomicNo(nbr2) == 16\n && degree(mol, nbr2) == 1)\n nbrTermS++;\n }\n\n // Check if ipso Sulfur is double bonded to Carbon.\n if (mol.getAtomicNo(nbr) == 6\n && mol.getBondOrder(mol.getBond(atom, nbr)) == 2)\n isCdoubleS = true;\n }\n\n // If ipso Sulfur is double bonded to Carbon and the\n // latter is not bonded to other terminal Sulfur atoms,\n // then it is not a dithiocarboxylate, but a thioketone,\n // etc.\n // S=C (Sulfur doubly bonded to carbon)\n if (isCdoubleS && nbrTermS != 2)\n return 16;\n\n // Ipso must be one of:\n // S-P (Terminal Sulfur bonded to P)\n // SM (Anionic terminal Sulfur)\n // SSMO (Terminal Sulfur in thiosulfinate group)\n return 72;\n }\n break;\n\n // ----- Chlorine -----\n case 17:\n // 4 Neighbours\n if (mol.getConnAtoms(atom) == 4) {\n int nO = 0;\n for (int i=0; i<mol.getAllConnAtoms(atom); i++) {\n int nbr = mol.getConnAtom(atom, i);\n\n if (mol.getAtomicNo(nbr) == 8)\n nO++;\n }\n\n // CLO4 (Perchlorate anion Chlorine)\n if (nO == 4)\n return 77;\n }\n // Cl (Chloride)\n if (mol.getConnAtoms(atom) == 1)\n return 12;\n // Cl- (Chloride anion)\n if (mol.getConnAtoms(atom) == 0)\n return 90;\n break;\n\n // ----- Potassium -----\n case 19:\n // K+ (Potassium cation)\n if (mol.getConnAtoms(atom) == 0)\n return 94;\n break;\n\n // ----- Calcium -----\n case 20:\n // Ca+2 (Dipositive Calcium cation)\n if (mol.getConnAtoms(atom) == 0)\n return 96;\n break;\n\n // ----- Iron -----\n case 26:\n if (mol.getConnAtoms(atom) == 0) {\n // Fe+2 (Dipositive Iron cation)\n if (mol.getAtomCharge(atom) == 2)\n return 87;\n\n // Fe+3 (Tripositive Iron cation)\n if (mol.getAtomCharge(atom) == 3)\n return 88;\n }\n break;\n\n // ----- Copper -----\n case 29:\n if (mol.getConnAtoms(atom) == 0) {\n // Cu+1 (Monopositive Copper cation)\n if (mol.getAtomCharge(atom) == 1)\n return 97;\n\n // Cu+2 (Dipositive Copper cation)\n if (mol.getAtomCharge(atom) == 2)\n return 98;\n }\n break;\n\n // ----- Zinc -----\n case 30:\n // ZN+2 (Dipositive Zinc cation)\n if (mol.getConnAtoms(atom) == 0)\n return 95;\n break;\n\n // ----- Bromine -----\n case 35:\n // Br (Bromine)\n if (mol.getConnAtoms(atom) == 1)\n return 13;\n\n // Br- (Bromide anion)\n if (mol.getConnAtoms(atom) == 0)\n return 91;\n break;\n\n // ----- Iodine -----\n case 53:\n // I (Iodine)\n if (mol.getConnAtoms(atom) == 1)\n return 14;\n break;\n }\n\n // Fail with 0.\n return 0;\n }", "private HashMap setupBoundBoxes(BioMightBoundBoxes bioMightBoundBoxesIn) \r\n\t{\r\n\t\t// Set up the bounding boxes for the various components\r\n\t\t// The various components locations will be driven by the\r\n\t\t// bounding boxes\r\n\t\tHashMap boundingBoxesMap = new HashMap();\r\n\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize the BoundBoxes. These will have a bound\r\n\t\t// box for each foot by default\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = null;\r\n\t\tdouble[] endPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] endPoints = null;\r\n\t\r\n\t\t// Use the information in the incoming Bound Box\r\n\t\t// to orientate the inner bound boxes\r\n\t\tif (bioMightBoundBoxesIn != null)\r\n\t\t{\r\n\t\t\t// In the default instance,there will be two bound boxes\r\n\t\t\tBioMightBoundBox bioMightBoundBoxTemp = bioMightBoundBoxesIn.getBoundingBox(Constants.LeftFootRef);\r\n\t\t\tSystem.out.println(\"LeftFoot - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxTemp.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getZPos());\r\n\r\n\t\t\t// In the default instance,there will be two bound boxes\r\n\t\t\tbioMightBoundBoxTemp = bioMightBoundBoxesIn.getBoundingBox(Constants.RightFootRef);\r\n\t\t\tSystem.out.println(\"RightFoot - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxTemp.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getZPos());\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Feet SetupBoundBoxes - Incoming BoundBoxes are Null\");\r\n\t\t}\r\n\t\r\n\t\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT FOOT EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(1.0);\r\n\t\tyPos = new BigDecimal(-48.0);\r\n\t\tzPos= new BigDecimal(0.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(1.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tendPos = getEndPoints(1.0, -67.50, -1.0);\r\n\t\tendPoints = BioGraphics.octogonYPlane(endPos, circumference);\r\n\t\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, endPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tSystem.out.println(\"Adding - LeftBoundBox to bioBoundBoxes\"); \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.FootEpitheliumRef, bioBoundBox);\r\n\t\t\r\n\t\t// Put the BioMight BoundBoxes for the Left Foot into the BoundingBoxMap \r\n\t\tboundingBoxesMap.put(Constants.LeftFootRef, bioBoundBoxes);\r\n\t\tSystem.out.println(\"Adding - Left Foot bioBoundBoxes into BoxesMap\"); \r\n\r\n\t\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\t\r\n\t\t//********************************************************************* \r\n\t\t// RIGHT FOOT EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(-8.0);\r\n\t\tyPos = new BigDecimal(-65.0);\r\n\t\tzPos= new BigDecimal(-1.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(-1.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tendPos = getEndPoints(-1.0, -67.50, -1.0);\r\n\t\tendPoints = BioGraphics.octogonYPlane(endPos, circumference);\r\n\t\t\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, endPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\t\t\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tSystem.out.println(\"Adding - RightBoundBox to bioBoundBoxes\"); \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.FootEpitheliumRef, bioBoundBox);\t\t\r\n\r\n\t\t// Put the BioMight BoundBoxes for the Left Shoulder into the BoundingBoxMap \r\n\t\tboundingBoxesMap.put(Constants.RightFootRef, bioBoundBoxes);\r\n\t\tSystem.out.println(\"Adding - Right Foot bioBoundBoxes into BoxesMap\"); \r\n\r\n\t\treturn (boundingBoxesMap);\r\n\t}", "public static void test2() {\n String dataDir = \"/Data/cteam/tp/csm/seismicz/subz_401_4_600/\";\n String dataFile = \"tpets.dat\";\n int n1 = 401, n2 = 357, n3 = 161;\n float v = 1.0f, d = 30.0f;\n EigenTensors3 et = loadTensors(dataDir+dataFile);\n System.out.println(et);\n float[][][] paint = new float[n3][n2][n1];\n Painting3Group p3g = new Painting3Group(paint);\n PaintBrush pb = new PaintBrush(n1,n2,n3,et);\n pb.setSize(30);\n Painting3 p3 = p3g.getPainting3();\n for (int i3=0; i3<10; ++i3)\n for (int i2=0; i2<10; ++i2)\n for (int i1=0; i1<1; ++i1) {\n p3.paintAt(n1/2+i1,n2/2+i2,n3/2+i3,v,d,pb);\n }\n\n Contour c = p3.getContour(v);\n\n SimpleFrame sf = new SimpleFrame();\n sf.setTitle(\"Formation\");\n World world = sf.getWorld();\n TriangleGroup tg = new TriangleGroup(c.i,c.x);\n world.addChild(tg);\n }", "public static void main(String[] args) throws Exception {\n ExecutionEnvironment env = ExecutionEnvironment.createLocalEnvironment();\n env.getConfig().disableSysoutLogging();\n env.setParallelism(4);\n\n /********** DATA LOADING ***************/\n //Load the data set\n DataFlink<DataInstance> data = DataFlinkLoader.open(env,\"./datasets/BigSensorReadings.arff\");\n\n int nRooms = 10;\n\n /********** Model Definition ************/\n DAG fireDetectorModel = creatBigFireDectectorModel(data.getAttributes(),nRooms);\n\n /********** Model Learning ************/\n //Define the learning engine (distributed Variational Message Passing) and the parameters\n dVMP svb = new dVMP();\n svb.setBatchSize(1000);\n svb.setOutput(true);\n svb.setDAG(fireDetectorModel);\n\n //Specify the associated constraints (encoding prior knowledge)\n for (int i = 0; i < nRooms; i++) {\n Variable sensorT1 = fireDetectorModel.getVariables().getVariableByName(\"SensorTemp1_\"+i);\n Variable sensorT2 = fireDetectorModel.getVariables().getVariableByName(\"SensorTemp2_\"+i);\n svb.addParameterConstraint(new Constraint(\"alpha\", sensorT1, 0.0));\n svb.addParameterConstraint(new Constraint(\"alpha\", sensorT2, 0.0));\n svb.addParameterConstraint(new Constraint(\"beta1\", sensorT1, 1.0));\n svb.addParameterConstraint(new Constraint(\"beta1\", sensorT2, 1.0));\n\n Variable temp = fireDetectorModel.getVariables().getVariableByName(\"Temperature_\"+i);\n svb.addParameterConstraint(new Constraint(\"alpha | {Fire_\"+i+\" = 0}\", temp, 0.0));\n svb.addParameterConstraint(new Constraint(\"beta1 | {Fire_\"+i+\" = 0}\", temp, 1.0));\n\n }\n\n //Set-up the learning phase\n svb.initLearning();\n\n //Perform Learning\n Stopwatch watch = Stopwatch.createStarted();\n svb.updateModel(data);\n System.out.println(watch.stop());\n\n\n //Print the learnt model\n System.out.println(svb.getLearntBayesianNetwork());\n\n }", "private void initTfod() {\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL);\n }", "private void initTfod() {\n\n int tfodMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\n \"tfodMonitorViewId\",\n \"id\",\n hardwareMap.appContext.getPackageName());\n TFObjectDetector.Parameters tfodParameters = new TFObjectDetector.Parameters(tfodMonitorViewId);\n tfodParameters.minimumConfidence = TFOD_CONFIDENCE; //Added by J.Tu on 2019-04-24 00:23\n tfod = ClassFactory.getInstance().createTFObjectDetector(tfodParameters, vuforia);\n //tfod.loadModelFromAsset(TFOD_MODEL_ASSET, LABEL_GOLD_MINERAL, LABEL_SILVER_MINERAL);\n\n }", "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 }", "private void validt() {\n\t\t// -\n\t\tnmfkpinds.setPgmInd99(false);\n\t\tstateVariable.setZmsage(blanks(78));\n\t\tfor (int idxCntdo = 1; idxCntdo <= 1; idxCntdo++) {\n\t\t\tproductMaster.retrieve(stateVariable.getXwabcd());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00005 Product not found on Product_Master\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"OEM0003\", \"XWABCD\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// - If addition, pull the price from file:\n\t\t\tif (nmfkpinds.funKey06()) {\n\t\t\t\tstateVariable.setXwpric(stateVariable.getXwanpr());\n\t\t\t}\n\t\t\t// -\n\t\t\tstoreMaster.retrieve(stateVariable.getXwaacs());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00006 Store not found on Store_Master\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0369\", \"XWAACS\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tstockBalances.retrieve(stateVariable.getXwabcd(), stateVariable.getXwaacs());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00007 Store not found on Stock_Balances or CONDET.Contract_Qty >\n\t\t\t// BR Onhand_Quantity\n\t\t\tif (nmfkpinds.pgmInd99() || (stateVariable.getXwa5qt() > stateVariable.getXwbhqt())) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0370\", \"XWAACS\", msgObjIdx, messages);\n\t\t\t\tnmfkpinds.setPgmInd99(true);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// - Transaction Type:\n\t\t\ttransactionTypeDescription.retrieve(stateVariable.getXwricd());\n\t\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t\t// BR00008 Trn_Hst_Trn_Type not found on Transaction_type_description\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tstateVariable.setXwtdsc(all(\"-\", 20));\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0371\", \"XWRICD\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// - Unit of measure:\n\t\t\t// BR00009 U_M = 'EAC'\n\t\t\tif (equal(\"EAC\", stateVariable.getXwa2cd())) {\n\t\t\t\tstateVariable.setUmdes(replaceStr(stateVariable.getUmdes(), 1, 11, um[1]));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnmfkpinds.setPgmInd99(true);\n\t\t\t\tmsgObjIdx = setMsgObj(\"OES0372\", \"XWA2CD\", msgObjIdx, messages);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void\nrayPickBoundingBox(SoRayPickAction action, final SbBox3f bbox)\n//\n////////////////////////////////////////////////////////////////////////\n{\n // Save the state so we don't affect the real complexity\n action.getState().push();\n\n // Change the complexity\n SoComplexityElement.set(action.getState(), 0.0f);\n SoComplexityTypeElement.set(action.getState(),\n SoComplexityTypeElement.Type.OBJECT_SPACE);\n\n // Change the current matrix to scale and translate the cube to the\n // correct spot. (We can't just use an extra matrix passed to\n // computeObjectSpaceRay(), since the points generated by\n // generatePrimitives() have to be transformed, not just the ray.)\n final SbVec3fSingle size = new SbVec3fSingle();\n bbox.getSize(size);\n\n // If any of the dimensions is 0, beef it up a little bit to avoid\n // scaling by 0\n if (size.getValueRead()[0] == 0.0)\n size.getValue()[0] = 0.00001f;\n if (size.getValueRead()[1] == 0.0)\n size.getValue()[1] = 0.00001f;\n if (size.getValueRead()[2] == 0.0)\n size.getValue()[2] = 0.00001f;\n\n SoModelMatrixElement.translateBy(action.getState(), this,\n bbox.getCenter());\n SoModelMatrixElement.scaleBy(action.getState(), this,\n size.operator_mul(0.5f));\n\n // Compute the picking ray in the space of the shape\n computeObjectSpaceRay(action);\n\n // Pick using primitive generation. Make sure we know that we are\n // picking on just a bounding box of another shape, so details\n // won't be created.\n pickingBoundingBox = true;\n generatePrimitives(action);\n\n // Restore the state\n action.getState().pop();\n}", "private void m1247a(LinearSystem eVar, boolean z, SolverVariable hVar, SolverVariable hVar2, EnumC0282a aVar, boolean z2, ConstraintAnchor eVar2, ConstraintAnchor eVar3, int i, int i2, int i3, int i4, float f, boolean z3, boolean z4, int i5, int i6, int i7, float f2, boolean z5) {\n SolverVariable hVar3;\n boolean z6;\n int i8;\n int i9;\n SolverVariable hVar4;\n SolverVariable hVar5;\n int i10;\n int i11;\n int i12;\n int i13;\n int i14;\n SolverVariable hVar6;\n boolean z7;\n int i15;\n SolverVariable hVar7;\n boolean z8;\n boolean z9;\n SolverVariable hVar8;\n SolverVariable hVar9;\n int i16;\n int i17;\n boolean z10;\n int i18;\n boolean z11;\n int i19;\n int i20;\n int i21;\n int i22;\n int i23;\n boolean z12;\n int i24;\n int i25;\n SolverVariable hVar10;\n SolverVariable hVar11;\n int i26;\n SolverVariable a = eVar.mo3927a(eVar2);\n SolverVariable a2 = eVar.mo3927a(eVar3);\n SolverVariable a3 = eVar.mo3927a(eVar2.mo3761g());\n SolverVariable a4 = eVar.mo3927a(eVar3.mo3761g());\n if (eVar.f1585c && eVar2.mo3751a().f1561i == 1 && eVar3.mo3751a().f1561i == 1) {\n if (LinearSystem.m1445a() != null) {\n LinearSystem.m1445a().f1621s++;\n }\n eVar2.mo3751a().mo3877a(eVar);\n eVar3.mo3751a().mo3877a(eVar);\n if (!z4 && z) {\n eVar.mo3935a(hVar2, a2, 0, 6);\n return;\n }\n return;\n }\n if (LinearSystem.m1445a() != null) {\n hVar3 = a4;\n LinearSystem.m1445a().f1600B++;\n } else {\n hVar3 = a4;\n }\n boolean j = eVar2.mo3764j();\n boolean j2 = eVar3.mo3764j();\n boolean j3 = this.f1497z.mo3764j();\n int i27 = j ? 1 : 0;\n if (j2) {\n i27++;\n }\n if (j3) {\n i27++;\n }\n int i28 = z3 ? 3 : i5;\n switch (aVar) {\n case FIXED:\n z6 = false;\n break;\n case WRAP_CONTENT:\n z6 = false;\n break;\n case MATCH_PARENT:\n z6 = false;\n break;\n case MATCH_CONSTRAINT:\n if (i28 != 4) {\n z6 = true;\n break;\n } else {\n z6 = false;\n break;\n }\n default:\n z6 = false;\n break;\n }\n if (this.f1470as == 8) {\n i8 = 0;\n z6 = false;\n } else {\n i8 = i2;\n }\n if (z5) {\n if (!j && !j2 && !j3) {\n eVar.mo3933a(a, i);\n } else if (j && !j2) {\n eVar.mo3943c(a, a3, eVar2.mo3759e(), 6);\n }\n }\n if (!z6) {\n if (z2) {\n eVar.mo3943c(a2, a, 0, 3);\n if (i3 > 0) {\n i26 = 6;\n eVar.mo3935a(a2, a, i3, 6);\n } else {\n i26 = 6;\n }\n if (i4 < Integer.MAX_VALUE) {\n eVar.mo3940b(a2, a, i4, i26);\n }\n } else {\n eVar.mo3943c(a2, a, i8, 6);\n }\n i11 = i6;\n i9 = i28;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i7;\n } else {\n if (i6 == -2) {\n i20 = i7;\n i21 = i8;\n } else {\n i21 = i6;\n i20 = i7;\n }\n if (i20 == -2) {\n i20 = i8;\n }\n if (i21 > 0) {\n i22 = 6;\n eVar.mo3935a(a2, a, i21, 6);\n i8 = Math.max(i8, i21);\n } else {\n i22 = 6;\n }\n if (i20 > 0) {\n eVar.mo3940b(a2, a, i20, i22);\n i8 = Math.min(i8, i20);\n i23 = 1;\n } else {\n i23 = 1;\n }\n if (i28 == i23) {\n if (z) {\n eVar.mo3943c(a2, a, i8, 6);\n i9 = i28;\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n } else if (z4) {\n eVar.mo3943c(a2, a, i8, 4);\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n i9 = i28;\n } else {\n eVar.mo3943c(a2, a, i8, 1);\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n i9 = i28;\n }\n } else if (i28 == 2) {\n if (eVar2.mo3758d() == ConstraintAnchor.EnumC0280c.TOP || eVar2.mo3758d() == ConstraintAnchor.EnumC0280c.BOTTOM) {\n hVar10 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.TOP));\n hVar11 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.BOTTOM));\n } else {\n hVar10 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.LEFT));\n hVar11 = eVar.mo3927a(this.f1429D.mo3776a(ConstraintAnchor.EnumC0280c.RIGHT));\n }\n i11 = i21;\n i24 = i8;\n hVar5 = a3;\n i12 = i20;\n i9 = i28;\n i10 = i27;\n hVar4 = hVar3;\n eVar.mo3929a(eVar.mo3942c().mo3906a(a2, a, hVar11, hVar10, f2));\n z12 = false;\n if (z12 || i10 == 2 || z3) {\n z6 = z12;\n } else {\n int max = Math.max(i11, i24);\n if (i12 > 0) {\n max = Math.min(i12, max);\n i25 = 6;\n } else {\n i25 = 6;\n }\n eVar.mo3943c(a2, a, max, i25);\n z6 = false;\n }\n } else {\n i11 = i21;\n i24 = i8;\n i10 = i27;\n hVar5 = a3;\n hVar4 = hVar3;\n i12 = i20;\n i9 = i28;\n }\n z12 = z6;\n if (z12) {\n }\n z6 = z12;\n }\n if (z5 && !z4) {\n if (j || j2 || j3) {\n if (!j || j2) {\n if (!j && j2) {\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), 6);\n if (z) {\n eVar.mo3935a(a, hVar, 0, 5);\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n }\n } else if (!j || !j2) {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n if (z6) {\n if (z && i3 == 0) {\n eVar.mo3935a(a2, a, 0, 6);\n }\n if (i9 == 0) {\n if (i12 > 0 || i11 > 0) {\n i19 = 4;\n z11 = true;\n } else {\n i19 = 6;\n z11 = false;\n }\n hVar7 = hVar5;\n eVar.mo3943c(a, hVar7, eVar2.mo3759e(), i19);\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), i19);\n z8 = i12 > 0 || i11 > 0;\n z7 = z11;\n i15 = 5;\n } else {\n hVar7 = hVar5;\n if (i9 == 1) {\n z8 = true;\n i15 = 6;\n z7 = true;\n } else if (i9 == 3) {\n if (!z3) {\n if (this.f1487p != -1 && i12 <= 0) {\n i18 = 6;\n eVar.mo3943c(a, hVar7, eVar2.mo3759e(), i18);\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), i18);\n z8 = true;\n i15 = 5;\n z7 = true;\n }\n }\n i18 = 4;\n eVar.mo3943c(a, hVar7, eVar2.mo3759e(), i18);\n eVar.mo3943c(a2, hVar4, -eVar3.mo3759e(), i18);\n z8 = true;\n i15 = 5;\n z7 = true;\n } else {\n z8 = false;\n i15 = 5;\n z7 = false;\n }\n }\n } else {\n hVar7 = hVar5;\n z8 = true;\n i15 = 5;\n z7 = false;\n }\n if (z8) {\n hVar9 = hVar4;\n hVar8 = hVar7;\n hVar6 = a2;\n eVar.mo3934a(a, hVar7, eVar2.mo3759e(), f, hVar4, a2, eVar3.mo3759e(), i15);\n boolean z13 = eVar2.f1416c.f1414a instanceof Barrier;\n boolean z14 = eVar3.f1416c.f1414a instanceof Barrier;\n if (z13 && !z14) {\n z9 = z;\n z10 = true;\n i17 = 5;\n i16 = 6;\n if (z7) {\n }\n eVar.mo3935a(a, hVar8, eVar2.mo3759e(), i17);\n eVar.mo3940b(hVar6, hVar9, -eVar3.mo3759e(), i16);\n if (z) {\n }\n } else if (!z13 && z14) {\n z10 = z;\n i17 = 6;\n i16 = 5;\n z9 = true;\n if (z7) {\n i17 = 6;\n i16 = 6;\n }\n if ((!z6 && z9) || z7) {\n eVar.mo3935a(a, hVar8, eVar2.mo3759e(), i17);\n }\n if ((!z6 && z10) || z7) {\n eVar.mo3940b(hVar6, hVar9, -eVar3.mo3759e(), i16);\n }\n if (z) {\n i14 = 0;\n i13 = 6;\n eVar.mo3935a(a, hVar, 0, 6);\n } else {\n i14 = 0;\n i13 = 6;\n }\n }\n } else {\n hVar8 = hVar7;\n hVar9 = hVar4;\n hVar6 = a2;\n }\n z10 = z;\n z9 = z10;\n i17 = 5;\n i16 = 5;\n if (z7) {\n }\n eVar.mo3935a(a, hVar8, eVar2.mo3759e(), i17);\n eVar.mo3940b(hVar6, hVar9, -eVar3.mo3759e(), i16);\n if (z) {\n }\n }\n } else if (z) {\n eVar.mo3935a(hVar2, a2, 0, 5);\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n }\n } else if (z) {\n eVar.mo3935a(hVar2, a2, 0, 5);\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n } else {\n hVar6 = a2;\n i14 = 0;\n i13 = 6;\n }\n if (z) {\n eVar.mo3935a(hVar2, hVar6, i14, i13);\n }\n } else if (i10 < 2 && z) {\n eVar.mo3935a(a, hVar, 0, 6);\n eVar.mo3935a(hVar2, a2, 0, 6);\n }\n }", "public void test_ck_03() {\n // part A - surprising reification\n OntModel model1 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM, null);\n OntModel model2 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM_RULE_INF, null);\n \n Individual sub = model1.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n OntProperty pred = model1.createOntProperty(\"http://mytest#\");\n Individual obj = model1.createIndividual(\"http://mytest#i2\", model1.getProfile().CLASS());\n OntProperty probabilityP = model1.createOntProperty(\"http://mytest#prob\");\n \n Statement st = model1.createStatement(sub, pred, obj);\n model1.add(st);\n st.createReifiedStatement().addProperty(probabilityP, 0.9);\n assertTrue(\"st should be reified\", st.isReified());\n \n Statement st2 = model2.createStatement(sub, pred, obj);\n model2.add(st2);\n st2.createReifiedStatement().addProperty(probabilityP, 0.3);\n assertTrue(\"st2 should be reified\", st2.isReified());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP).addProperty(probabilityP, 0.3); //!!!\n // exception\n \n // Part B - exception in remove All\n Individual sub2 = model2.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP); //!!! exception\n \n sub2.addProperty(probabilityP, 0.3);\n sub2.removeAll(probabilityP); //!!! exception\n \n }", "public void term()\n \t{\n //\t\tfor(Iterator<Technology> tIt = Technology.getTechnologies(); tIt.hasNext(); )\n //\t\t{\n //\t\t\tTechnology tech = tIt.next();\n //\n // for (Iterator<Foundry> itF = tech.getFoundries(); itF.hasNext();)\n // {\n // Foundry foundry = itF.next();\n // HashMap<Layer,String> gdsLayers = new HashMap<Layer,String>();\n // for(Iterator<Layer> lIt = tech.getLayers(); lIt.hasNext(); )\n // {\n // Layer layer = lIt.next();\n // String str = get(foundry, layer);\n // GDSLayers numbers = GDSLayers.parseLayerString(str);\n // if (numbers == null) continue;\n //\n // Setting setting = foundry.getGDSLayerSetting(layer);\n // String oldStr = getString(setting);\n // GDSLayers oldNumbers = oldStr != null ? GDSLayers.parseLayerString(oldStr) : GDSLayers.EMPTY;\n // if (!oldNumbers.equals(numbers))\n // setString(setting, numbers.toString());\n // }\n // }\n //\t\t}\n setBoolean(gdsOutMergesBoxesSetting, gdsOutputMergesBoxes.isSelected());\n setBoolean(gdsOutWritesExportPinsSetting, gdsOutputWritesExportPins.isSelected());\n setBoolean(gdsOutUpperCaseSetting, gdsOutputUpperCase.isSelected());\n setInt(gdsOutDefaultTextLayerSetting, TextUtils.atoi(gdsDefaultTextLayer.getText()));\n setBoolean(gdsOutputConvertsBracketsInExportsSetting, gdsOutputConvertsBracketsInExports.isSelected());\n setInt(gdsCellNameLenMaxSetting, TextUtils.atoi(gdsCellNameLenMax.getText()));\n \t}", "@Override\n\tpublic void addModel(ChunkProcessor obj, ThreadChunkDeligate chunks, int x, int y, int z, BlockData data, NamespaceID biome)\n\t{\n\t\tint eggs = Integer.parseInt(data.state.get(\"eggs\"));\n\t\t\n\t\tNamespaceID[] mtlSides = getMtlSides(data, biome);\n\t\t\n\t\tTransform rotate = new Transform();\n\t\tTransform translate = new Transform();\n\t\tTransform rt;\n\n // Generates a random number between 0 and 3 inclusively. \n Random r = new Random();\n int randomRotation = r.nextInt(4);\n\t\t\n // Creates a rotation such that we will use to randomly rotate the egg(s) with. \n\t\tswitch (randomRotation)\n\t\t{\n\t\t\tcase 0:\n\t\t\t\trotate = Transform.rotation(0, 0, 0);\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\trotate = Transform.rotation(0, 90, 0);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\trotate = Transform.rotation(0, 180, 0);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\trotate = Transform.rotation(0, 270, 0);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t\n\t\ttranslate = Transform.translation(x, y, z);\n\t\trt = translate.multiply(rotate);\n\t\t\n\t\tboolean[] drawSides = new boolean[] {true,true,true,true,true,false};\n\t\t\n\t\t// Adds the first egg\n\t\tUV[] uvTop = new UV[] { new UV(0,12/16f), new UV(0,1), new UV(4/16f,1), new UV(4/16f,12/16f) };\n\t\tUV[] uvSide = new UV[] { new UV(5/16f,5/16f), new UV(1/16f,5/16f), new UV(1/16f,12/16f), new UV(5/16f,12/16f) };\n\t\tUV[][] uvSides = new UV[][] { uvTop, uvSide, uvSide, uvSide, uvSide, uvSide };\n\t\taddBox(obj, -4/16f,-8/16f, -3/16f, 1/16f, -1/16f, 2/16f, rt, mtlSides, uvSides, drawSides);\n\t\t\n\t\t// Adds the second egg, if applicable\n\t\tif (eggs > 1) \n\t\t{\n\t\t\tuvTop = new UV[] { new UV(6/16f,5/16f), new UV(6/16f,9/16f), new UV(10/16f,9/16f), new UV(10/16f,5/16f) };\n\t\t\tuvSide = new UV[] { new UV(14/16f,1/16f), new UV(10/16f,1/16f), new UV(10/16f,6/16f), new UV(14/16f,6/16f) };\n\t\t\tuvSides = new UV[][] { uvTop, uvSide, uvSide, uvSide, uvSide, uvSide };\n\t\t\taddBox(obj, -1/16f,-8/16f, -7/16f, 3/16f, -3/16f, -3/16f, rt, mtlSides, uvSides, drawSides);\n\t\t}\n\t\t\n\t\t// Adds the third egg, if applicable\n\t\tif (eggs > 2) \n\t\t{\n\t\t\tuvTop = new UV[] { new UV(8/16f,13/16f), new UV(5/16f,13/16f), new UV(5/16f,1), new UV(8/16f,1) };\n\t\t\tuvSide = new UV[] { new UV(11/16f,9/16f), new UV(8/16f,9/16f), new UV(8/16f,13/16f), new UV(11/16f,13/16f) };\n\t\t\tuvSides = new UV[][] { uvTop, uvSide, uvSide, uvSide, uvSide, uvSide };\n\t\t\taddBox(obj, -1/16f,-8/16f, 3/16f, 2/16f, -4/16f, 6/16f, rt, mtlSides, uvSides, drawSides);\n\t\t}\n\t\t\n\t\t// Adds the fourth egg, if applicable\n\t\tif (eggs > 3) \n\t\t{\n\t\t\tuvTop = new UV[] { new UV(8/16f,1/16f), new UV(4/16f,1/16f), new UV(4/16f,5/16f), new UV(8/16f,5/16f) };\n\t\t\tuvSide = new UV[] { new UV(4/16f,1/16f), new UV(0,1/16f), new UV(0,5/16f), new UV(4/16f,5/16f) };\n\t\t\tuvSides = new UV[][] { uvTop, uvSide, uvSide, uvSide, uvSide, uvSide };\n\t\t\taddBox(obj, 2/16f,-8/16f, -1/16f, 5/16f, -5/16f, 2/16f, rt, mtlSides, uvSides, drawSides);\n\t\t}\n\t}", "public static void runTest() {\n Graph mnfld = new Graph();\n float destTank = 7f;\n\n // Adding Tanks\n mnfld.addPipe( new Node( 0f, 5.0f ) );\n mnfld.addPipe( new Node( 1f, 5.0f ) );\n mnfld.addPipe( new Node( 7f, 5.0f ) );\n\n // Adding Pipes\n mnfld.addPipe( new Node( 2f, 22f, 100f ) );\n mnfld.addPipe( new Node( 3f, 33f, 150f ) );\n mnfld.addPipe( new Node( 4f, 44f, 200f ) );\n mnfld.addPipe( new Node( 5f, 55f, 250f ) );\n mnfld.addPipe( new Node( 6f, 66f, 300f ) );\n mnfld.addPipe( new Node( 8f, 88f, 200f ) );\n mnfld.addPipe( new Node( 9f, 99f, 150f ) );\n mnfld.addPipe( new Node( 10f, 1010f, 150f ) );\n mnfld.addPipe( new Node( 20f, 2020f, 150f ) );\n\n // Inserting Edges to the graph\n mnfld.insertConnection( new Edge( mnfld.getPipe( 0f ), mnfld.getPipe( 2f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 0f ), mnfld.getPipe( 3f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1f ), mnfld.getPipe( 2f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 22f ), mnfld.getPipe( 4f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 44f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 44f ), mnfld.getPipe( 7f ), 500f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 55f ), mnfld.getPipe( 6f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 66f ), mnfld.getPipe( 7f ), 100f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 66f ), mnfld.getPipe( 8f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 88f ), mnfld.getPipe( 7f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 9f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 99f ), mnfld.getPipe( 5f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 33f ), mnfld.getPipe( 1010f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1010f ), mnfld.getPipe( 7f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 1f ), mnfld.getPipe( 20f ), 1f ) );\n mnfld.insertConnection( new Edge( mnfld.getPipe( 2020f ), mnfld.getPipe( 3f ), 1f ) );\n\n // -- Running Dijkstra & Finding shortest Paths -- //\n// Dijkstra.findPaths( mnfld, 10, \"0.0\", destTank );\n//\n// mnfld.restoreDroppedConnections();\n//\n// System.out.println( \"\\n\\n\" );\n Dijkstra.findMinPaths( mnfld, mnfld.getPipe( 0f ) );\n Dijkstra.mergePaths( mnfld, 1f, mnfld.getPipe( destTank ).getPath(), mnfld.getPipe( destTank ) );\n\n }", "private void serializeOutOfTypeSystemElements() throws SAXException {\n if (cds.marker != null) {\n return;\n }\n if (cds.sharedData == null) {\n return;\n }\n Iterator<OotsElementData> it = cds.sharedData.getOutOfTypeSystemElements().iterator();\n while (it.hasNext()) {\n OotsElementData oed = it.next();\n workAttrs.clear();\n // Add ID attribute\n addIdAttribute(workAttrs, oed.xmiId);\n\n // Add other attributes\n Iterator<XmlAttribute> attrIt = oed.attributes.iterator();\n while (attrIt.hasNext()) {\n XmlAttribute attr = attrIt.next();\n addAttribute(workAttrs, attr.name, attr.value);\n }\n // debug\n if (oed.elementName.qName.endsWith(\"[]\")) {\n Misc.internalError(new Exception(\n \"XMI Cas Serialization: out of type system data has type name ending with []\"));\n }\n // serialize element\n startElement(oed.elementName, workAttrs, oed.childElements.size());\n\n // serialize features encoded as child elements\n Iterator<XmlElementNameAndContents> childElemIt = oed.childElements.iterator();\n while (childElemIt.hasNext()) {\n XmlElementNameAndContents child = childElemIt.next();\n workAttrs.clear();\n Iterator<XmlAttribute> attrIter = child.attributes.iterator();\n while (attrIter.hasNext()) {\n XmlAttribute attr = attrIter.next();\n addAttribute(workAttrs, attr.name, attr.value);\n }\n\n if (child.contents != null) {\n startElement(child.name, workAttrs, 1);\n addText(child.contents);\n } else {\n startElement(child.name, workAttrs, 0);\n }\n endElement(child.name);\n }\n\n endElement(oed.elementName);\n }\n }", "private void settleNest()\n\t{\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tif(nestslots[i] == null && nestslots[i+1]!= null){\n\t\t\t\tnestslots[i] = nestslots[i+1];\n\t\t\t\tnestslots[i+1] = null;\n\t\t\t\tif(i==0)\n\t\t\t\t\tneststate = NestStatus.needCheck;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif(nestslots[7]==null && extraparts.size()>0){\n\t\t\tnestslots[7]=extraparts.get(0);\n\t\t\textraparts.remove(0);\n\t\t}\n\t\t\n\t\t//if(lanestate == LaneStatus.hasPart && nestslots[7]==null){\n\t\t//\tacceptPart();\n\t\t//}\n\t}" ]
[ "0.5699599", "0.53466654", "0.5290348", "0.52421683", "0.51410985", "0.5117375", "0.5106757", "0.5084516", "0.507915", "0.50660443", "0.5045811", "0.5040852", "0.5015416", "0.49982005", "0.4969671", "0.49414104", "0.49388042", "0.49354208", "0.49241772", "0.4922084", "0.49053878", "0.4891262", "0.4864484", "0.4854231", "0.48404256", "0.48392072", "0.48223576", "0.4816772", "0.48098314", "0.48053995", "0.47998923", "0.4799484", "0.47955695", "0.47832844", "0.4771114", "0.4767279", "0.47604835", "0.4747028", "0.47347283", "0.47292295", "0.4728795", "0.4725517", "0.47247916", "0.47202268", "0.4708344", "0.47040647", "0.46952146", "0.4675601", "0.46559227", "0.46530497", "0.4651199", "0.46458334", "0.46438557", "0.46406552", "0.46398705", "0.4626607", "0.46183702", "0.46171623", "0.4616815", "0.46157184", "0.46088427", "0.4608647", "0.46052825", "0.46046358", "0.4601326", "0.4601166", "0.45991927", "0.45971966", "0.45959282", "0.4593448", "0.45933118", "0.45884442", "0.45878452", "0.45864308", "0.45858783", "0.45821705", "0.45801032", "0.45756757", "0.45709997", "0.45659733", "0.45657837", "0.45630625", "0.45601195", "0.45572248", "0.45559016", "0.4555134", "0.45505062", "0.45484564", "0.45416126", "0.45359844", "0.4529993", "0.4527982", "0.45235923", "0.4522628", "0.4522127", "0.45219916", "0.4519705", "0.45191488", "0.45190257", "0.45150226" ]
0.5082818
8
Bug report by Dave Reynolds SF bug report 810492
public void test_der_01() { OntModel m = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM_TRANS_INF, null); Resource a = m.createResource("http://example.org#A"); Resource b = m.createResource("http://example.org#B"); OntClass A = new OntClassImpl(a.getNode(), (EnhGraph) m) { protected boolean hasSuperClassDirect(Resource cls) { throw new RuntimeException("did not find direct reasoner"); } }; // will throw an exception if the wrong code path is taken A.hasSuperClass(b, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "protected boolean func_70041_e_() { return false; }", "protected boolean func_70814_o() { return true; }", "private void m50366E() {\n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "private void m50367F() {\n }", "public void m9741j() throws cf {\r\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo12628c() {\n }", "public void mo1976s() throws cf {\r\n }", "public final void mo91715d() {\n }", "public abstract void mo70713b();", "public void mo38117a() {\n }", "@Override\n\tprotected void interr() {\n\t}", "static void feladat9() {\n\t}", "public void method_4270() {}", "public boolean method_2453() {\r\n return false;\r\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "static void m7753b() {\n f8029a = false;\n }", "@Override\n public void perish() {\n \n }", "public void mo23813b() {\n }", "public boolean method_4088() {\n return false;\n }", "public abstract void mo6549b();", "public final void mo8775b() {\n }", "static void feladat8() {\n\t}", "static void feladat6() {\n\t}", "public void m23075a() {\n }", "private void kk12() {\n\n\t}", "static void feladat7() {\n\t}", "public void mo115190b() {\n }", "protected void mo6255a() {\n }", "public void mo1964g() throws cf {\r\n }", "public void skystonePos6() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo21781F() {\n }", "public void mo21877s() {\n }", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "public void skystonePos4() {\n }", "public void func_70305_f() {}", "public boolean method_2434() {\r\n return false;\r\n }", "public void mo1972o() throws cf {\r\n }", "public abstract void mo56925d();", "static void feladat4() {\n\t}", "void m5770d() throws C0841b;", "public void mo1963f() throws cf {\r\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public boolean method_4093() {\n return false;\n }", "public void mo21794S() {\n }", "private final void m90474c() {\n RxBus.m86979a().mo84367a(new UnFriendlyEvent(2));\n popSelf();\n }", "public abstract void mo27385c();", "public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }", "public boolean method_218() {\r\n return false;\r\n }", "private void strin() {\n\n\t}", "private /* synthetic */ void m57187h() {\n this.f41189e = true;\n }", "protected void a(bug parambug)\r\n/* 35: */ {\r\n/* 36:36 */ this.j.a((bxf)null);\r\n/* 37: */ }", "public void mo6081a() {\n }", "public boolean method_4132() {\n return false;\n }", "public void mo21779D() {\n }", "public void mo21825b() {\n }", "public void mo1962e() throws cf {\r\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public boolean method_208() {\r\n return false;\r\n }", "void m5771e() throws C0841b;", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void mo21787L() {\n }", "public boolean method_216() {\r\n return false;\r\n }", "private final void m90475d() {\n RxBus.m86979a().mo84367a(new UnFriendlyEvent(1));\n popSelf();\n }", "void m1864a() {\r\n }", "public final void mo11687c() {\n }", "@Override\r\n\tprotected void doF3() {\n\t\t\r\n\t}", "public final void mo1285b() {\n }", "public abstract void mo27386d();", "public void mo3376r() {\n }", "public abstract void mo53562a(C18796a c18796a);", "void m5768b() throws C0841b;", "public void mo21878t() {\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 }", "static void feladat3() {\n\t}", "public void smell() {\n\t\t\n\t}", "public void skystonePos2() {\n }", "public void mo3749d() {\n }", "public void mo21782G() {\n }", "void mo57277b();", "@Override\n\tprotected void update() {\n\t\t\n\t}", "static void feladat5() {\n\t}", "public static void feec() {\n\t}", "public void mo4359a() {\n }", "public boolean method_194() {\r\n return false;\r\n }", "public void method_6349() {\r\n super.method_6349();\r\n }", "public void method_6191() {\r\n super.method_6191();\r\n }", "public void mo12930a() {\n }" ]
[ "0.62617165", "0.6161108", "0.6105981", "0.601318", "0.5896023", "0.5821794", "0.57625407", "0.575925", "0.5681507", "0.5643661", "0.5639221", "0.56164384", "0.554341", "0.5504057", "0.5486499", "0.5481931", "0.5470238", "0.5470084", "0.54620093", "0.54322624", "0.54139614", "0.5408902", "0.5394096", "0.5380081", "0.53698623", "0.53683347", "0.5367504", "0.53577", "0.5341753", "0.5335077", "0.5334063", "0.5329176", "0.532835", "0.5327523", "0.5325133", "0.5325026", "0.5314045", "0.5312264", "0.5307926", "0.52981097", "0.52972037", "0.5292204", "0.5287016", "0.5286508", "0.5285914", "0.52791536", "0.5270215", "0.52633893", "0.5255628", "0.5243954", "0.52436095", "0.52220875", "0.52216154", "0.52186596", "0.5216259", "0.5210512", "0.52092093", "0.52030957", "0.5203088", "0.52012986", "0.52006954", "0.51987976", "0.51935154", "0.51899207", "0.51899207", "0.5187961", "0.5184345", "0.51831853", "0.51701033", "0.5168748", "0.516635", "0.51645064", "0.51593935", "0.5145234", "0.51395327", "0.51386744", "0.51361483", "0.5132297", "0.5130239", "0.51288503", "0.5127797", "0.5127797", "0.5127797", "0.5127797", "0.5127797", "0.5127797", "0.5127797", "0.5127749", "0.51236165", "0.51127666", "0.5110576", "0.5110114", "0.50958157", "0.5092124", "0.5091915", "0.50912404", "0.5085026", "0.5083746", "0.50796247", "0.5079377", "0.5076944" ]
0.0
-1
Bug report by Lawrence Tay missing datatype property
public void test_lt_01() { OntModel m = ModelFactory.createOntologyModel(); DatatypeProperty p = m.createDatatypeProperty(NS + "p"); OntClass c = m.createClass(NS + "A"); Individual i = m.createIndividual(NS + "i", c); i.addProperty(p, "testData"); int count = 0; for (Iterator j = i.listPropertyValues(p); j.hasNext();) { //System.err.println("Individual i has p value: " + j.next()); j.next(); count++; } assertEquals("i should have one property", 1, count); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void initDatatypeProperties() {\n OntModel ontologie = ModelFactory.createOntologyModel();\n OntologyFactory.readOntology(ontologyPath, ontologie);\n ontologie.add(ontologie);\n datatypeProperties.addAll(ontologie.listDatatypeProperties().toList());\n }", "public String getDataType() ;", "java.lang.String getDataType();", "public String getDatatype()\n {\n return mDatatype;\n }", "int getDataType();", "protected String getDataType()\n {\n return dataType;\n }", "public int getOldProperty_descriptionType(){\n return localOldProperty_descriptionType;\n }", "@Override\n\tpublic int getDataType()\n\t{\n\t\treturn dataType;\n\t}", "DataType getBase_DataType();", "public int getDataType();", "@Override\n public String getDataType() {\n return getPrimitiveType().name();\n }", "DataType createDataType();", "Datty getDatty();", "MappedDatatype createMappedDatatype();", "int getDataTypeValue();", "public String getDataType() {\r\n return dataType;\r\n }", "public void setDataType(DataType dataType) {\n this.dataType = dataType;\n }", "public void setDataType(String dataType) {\r\n this.dataType = dataType;\r\n }", "public void setOldProperty_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localOldProperty_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localOldProperty_descriptionType=param;\n \n\n }", "public String getDataType() \n {\n System.out.println(dataType.getValue().toString());\n return dataType.getValue().toString(); \n }", "public String getDataType() {\n return dataType;\n }", "DatatypesType createDatatypesType();", "public void setDataType(String dataType) {\n this.dataType = dataType;\n }", "public Class getDataType() {\n return datatype;\n }", "public void setDataType(DataType dataType) {\r\n\t\tthis.dataType = dataType;\r\n\t}", "public String datatype() {\n\t\treturn datatype;\n\t}", "protected abstract DTDataTypes52 getDataType(C column);", "public DataType getDataType() {\n return this.dataType;\n }", "public void test_sf_948995() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM ); // OWL dl\n DatatypeProperty dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n boolean ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertTrue( \"Should have been a conversion exception\", ex );\n \n m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); // OWL full\n dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertFalse( \"Should not have been a conversion exception\", ex );\n }", "default DataType getDataType(DataTypeName id) {return (DataType)this;}", "public int getDataType()\n {\n return dtype;\n }", "@Test\n public void testParseDataType() {\n IntegerSpec integerSpec = new IntegerSpec();\n dataTypeParser.setDataTypeSpec(integerSpec);\n dataTypeParser.parse();\n IntegerSpec parsedIntegerSpec = (IntegerSpec) dataTypeParser.getDataTypeSpec();\n\n dataTypeParser = new DataTypeParser(new IntegerSpec(), new RandomGenerator(randomSeed));\n\n IntegerSpec integerSpec1 = new IntegerSpec();\n integerSpec1.setDefaultValue(0);\n dataTypeParser.setDataTypeSpec(integerSpec1);\n dataTypeParser.parse();\n IntegerSpec parsedIntegerSpec1 = (IntegerSpec) dataTypeParser.getDataTypeSpec();\n\n assertNotNull(parsedIntegerSpec.getRandomSeed());\n assertEquals(parsedIntegerSpec.getRandomSeed(), parsedIntegerSpec1.getRandomSeed());\n }", "public void setOldValues_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localOldValues_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localOldValues_descriptionType=param;\n \n\n }", "public int getOldValues_descriptionType(){\n return localOldValues_descriptionType;\n }", "abstract Object getValue (String str, ValidationContext vc) throws DatatypeException;", "@Override\n\tpublic boolean isPrimitiveTypeExpected() {\n\t\treturn false;\n\t}", "public abstract int getJavaDataType(String propertyName)\n throws ModelException;", "EDataType createEDataType();", "@Override\n\tpublic void setDataType(Class<?> dataType) {\n\t\t\n\t}", "public void setDataType(Class newclass) {\n datatype=newclass;\n }", "public DataType getDataType() {\r\n\t\treturn dataType;\r\n\t}", "private void _writeDatatypeAware(final DatatypeAware datatyped) throws IOException {\n final String datatype = datatyped.getDatatype().getReference();\n String value = XSD.ANY_URI.equals(datatype) ? datatyped.locatorValue().toExternalForm()\n : datatyped.getValue();\n _writeKeyValue(\"value\", value);\n if (!XSD.STRING.equals(datatype)) {\n _writeKeyValue(\"datatype\", datatyped.getDatatype().toExternalForm());\n }\n }", "public static void main(String[] args) {\n\t\tDataTypeTest test = new DataTypeTest();\r\n\t\ttest.i = -1/0; \r\n\t\ttest.i = (int) 3.5f;\r\n\t\ttest.d = 2l;\r\n\t\t//test.s = (short) 10000000000000000000;\r\n\t\ttest.b = (byte) test.s;\r\n\t\ttest.f = test.l;\r\n\t\ttest.c = (char) test.i;\r\n\t\t//test.bool = 1;\r\n\t}", "@JsonProperty(\"data_type\")\n public Term getDataType() {\n return dataType;\n }", "DatatypeType createDatatypeType();", "public FlexData(Type type) {\n entryCollectionList = null;\n entryCollectionMap = null;\n this.type = type;\t\t\n standardDateFormat = \"yyyy-MM-dd\"; // DB2-Datum\n\t}", "public void test_getTypedValues_accuracy() {\n instance.addTypedValue(typedValue);\n assertEquals(\"TypedValue got incorrectly\", 1, instance.getTypedValues().size());\n }", "public IncorrectType58119e() {\n }", "@Test public void gh1206() {\n execute(new CreateDB(NAME, \"<x>a</x>\"));\n query(\"/* castable as xs:double\", false);\n }", "public static interface DataTypeWithFormat {\r\n \r\n /**\r\n * Format\r\n * \r\n * @return\r\n */\r\n public abstract String getFormat();\r\n \r\n /**\r\n * Locale\r\n * \r\n * @return\r\n */\r\n public abstract Locale getLocale();\r\n }", "@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}", "public Object caseDataType(DataType object) {\r\n\t\treturn null;\r\n\t}", "void setDataType(int type );", "@Override\n public Result.Datatype getDefaultDatatype() {\n return Result.Datatype.TEXT;\n }", "@Test\n public void test_column_type_detection_datetimes_02() throws SQLException {\n testColumnTypeDetection(\"x\", NodeFactory.createLiteral(\"2013-04-08\", XSDDatatype.XSDdate), true, Types.DATE, Date.class.getCanonicalName());\n }", "public void createDataTypeProperty(String sourceInstance, String propertyName, Object value)\r\n\t{\r\n\t\tOntResource si = this.obtainOntResource(sourceInstance);\r\n\t\tProperty prop = this.obtainOntProperty(propertyName);\r\n\t\tsi.addProperty(prop, ONT_MODEL.createTypedLiteral(value)); \t\r\n\t}", "public int getNewProperty_descriptionType(){\n return localNewProperty_descriptionType;\n }", "@Test\n public void testSaveWrongDataType() {\n final MarketDataSet dataSet = MarketDataSet.empty();\n dataSet.put(MarketDataKey.of(ExternalId.of(TEST_SCHEME, \"JPYUSD\").toBundle(), DataField.of(MarketDataRequirementNames.MARKET_VALUE)), \"NaN\");\n final ToolContext toolContext = StarlingTestUtils.getToolContext(\"/inmemory/marketdata-test.properties\");\n final LocalDate today = LocalDate.now();\n final MarketDataManager marketDataManager = new MarketDataManager(toolContext);\n // saves the data\n marketDataManager.saveOrUpdate(dataSet, today);\n final HistoricalTimeSeriesSource source = toolContext.getHistoricalTimeSeriesSource();\n assertNull(source.getHistoricalTimeSeries(ExternalId.of(TEST_SCHEME, \"JPYUSD\").toBundle(), \n DataSource.DEFAULT.getName(), DataProvider.DEFAULT.getName(), MARKET_VALUE));\n }", "public void setDataType(String v)\n {\n this.setFieldValue(FLD_dataType, StringTools.trim(v));\n }", "@TargetAttributeType(name = DATA_TYPE_ATTRIBUTE_NAME, fixed = true, hidden = true)\n\tpublic default TargetDataType getDataType() {\n\t\treturn getTypedAttributeNowByName(DATA_TYPE_ATTRIBUTE_NAME, TargetDataType.class,\n\t\t\tTargetDataType.UNDEFINED1);\n\t}", "public int getDataTypeValue() {\n return dataType_;\n }", "public void setNewProperty_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localNewProperty_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewProperty_descriptionType=param;\n \n\n }", "@RestrictTo(RestrictTo.Scope.LIBRARY)\n @DataType\n public int getDataType() {\n return mBundle.getInt(DATA_TYPE_FIELD, -1);\n }", "private void setupPrimitiveTypes()\n {\n primitiveTypes.add(INTEGER_TYPE);\n primitiveTypes.add(FLOAT_TYPE);\n primitiveTypes.add(DOUBLE_TYPE);\n primitiveTypes.add(STRING_TYPE);\n primitiveTypes.add(BOOL_TYPE);\n primitiveTypes.add(TIMESTAMP_TYPE);\n }", "public DataPrimitive(String value) {\n\t\tsuper();\n\t\tif (value == null) {\n\t\t\tthis.value = \"\"; \n\t\t} else {\n\t\t\tthis.value = value;\n\t\t}\n\t}", "public void setDataType(int atype)\n {\n dtype = atype;\n }", "public String getDataType()\n {\n String v = (String)this.getFieldValue(FLD_dataType);\n return StringTools.trim(v);\n }", "public void setDataType(String dataType) {\n this.dataType = dataType == null ? null : dataType.trim();\n }", "protected void renderDataType(OWLDataType datatype) throws OWLException {\n\t}", "public abstract void validate(String value) throws DatatypeException;", "public void createDataTypeProperty(String sourceInstance, String propertyName, String value, String valueDataType)\r\n\t{\r\n\t\tOntResource si = this.obtainOntResource(sourceInstance);\r\n\t\tProperty prop = this.obtainOntProperty(propertyName);\r\n\t\tsi.addProperty(prop, ONT_MODEL.createTypedLiteral(value, valueDataType)); \t\r\n\t}", "public GO_RecordType() {\n }", "public void setNewValues_descriptionType(int param){\n \n // setting primitive attribute tracker to true\n localNewValues_descriptionTypeTracker =\n param != java.lang.Integer.MIN_VALUE;\n \n this.localNewValues_descriptionType=param;\n \n\n }", "@Test\n public void testNullTypeName() {\n ColumnType typeBool = new ColumnType(-7, null);\n ColumnType typeBool2 = new ColumnType(-7, null);\n assertEquals(\"Expected bool types are equal\", typeBool, typeBool2);\n }", "private void checkModels()\n {\n if (myDataType != null)\n {\n SpecialKey specialKey = myDataType.getMetaDataInfo().getSpecialTypeForKey(myField.get());\n if (specialKey instanceof TimeKey)\n {\n if (!(myCriterionValue instanceof DateModel))\n {\n switchValueModels(DateModel.class);\n }\n }\n else\n {\n if (myCriterionValue instanceof DateModel)\n {\n switchValueModels(GhostTextModel.class);\n }\n }\n }\n }", "void checkSameDataType(String datatype, String datatype1)\n {\n DefaultTableModel semanticerror = (DefaultTableModel)tblErrorSemantic.getModel();\n if(datatype.equals(datatype1))\n {\n\n }\n else if(datatype.equals(\"INT\") && datatype1.equals(\"FLOAT\"))\n {\n \n }\n else if(datatype.equals(\"FLOAT\") && datatype1.equals(\"INT\"))\n {\n \n }\n else if(datatype1 == null)\n {\n\n }\n else\n {\n semanticerror.addRow(new Object[] {tblLexeme.getModel().getValueAt(tokenPos-2, 0),\"Incompatible Types: \"+datatype1+\" Cannot be converted to \"+datatype, tblLexeme.getModel().getValueAt(tokenPos-2, 2)}); \n } \n datatype = null;\n }", "public DefaultSimpleMetaDataModel(DataType dataType)\n {\n super(dataType);\n\n if (complexTypes.contains(dataType))\n {\n throw new IllegalArgumentException(\"Invalid DataType for SimpleMetadataModel \" + dataType);\n }\n }", "@Override\n\tpublic DataType getDataType() {\n\t\tif (dataType == null) {\n\t\t\tdataType = getDataType(getProgram());\n\t\t}\n\t\treturn dataType;\n\t}", "public FitsDatatype(int theType) {\n super(-1);\n nativeType = theType;\n fromNative(0);\n }", "@Override\n\tpublic String getType() {\n\t\treturn \"nominal\";\n\t}", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n Object[] objectArray0 = SQLUtil.parseColumnTypeAndSize(\"\\\"\");\n assertEquals(1, objectArray0.length);\n }", "@Test(timeout = 4000)\n public void test59() throws Throwable {\n System.setCurrentTimeMillis((-27L));\n DBCatalog dBCatalog0 = new DBCatalog();\n DBSchema dBSchema0 = new DBSchema(\" Y*-X>Nz.q@~K^o8Z]v\", dBCatalog0);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\" Y*-X>Nz.q@~K^o8Z]v\", dBSchema0);\n // Undeclared exception!\n try { \n SQLUtil.parseColumnTypeAndSize(\"getObjectImpl(int,Map)\");\n fail(\"Expecting exception: NumberFormatException\");\n \n } catch(NumberFormatException e) {\n //\n // For input string: \\\"int\\\"\n //\n verifyException(\"java.lang.NumberFormatException\", e);\n }\n }", "public int getUnknownDataValueMode() {\r\n return dataBinder.getUnknownDataValueMode();\r\n }", "@Test(timeout = 4000)\n public void test020() throws Throwable {\n Object[] objectArray0 = SQLUtil.parseColumnTypeAndSize(\"\");\n assertEquals(1, objectArray0.length);\n }", "public T caseDatatype(Datatype object)\n {\n return null;\n }", "public T caseDataType(DataType object) {\n\t\treturn null;\n\t}", "public T caseDataType(DataType object) {\n\t\treturn null;\n\t}", "@Test\n public void testDiferentDataTypes() throws InterruptedException, RtdException {\n RtdBaseContinuous<BigDecimal> bigDecimalRtd = new RtdBaseContinuous<BigDecimal>();\n bigDecimalRtd.setDuration(500);\n bigDecimalRtd.setData(new BigDecimal(10));\n \n RtdBaseDiscrete<Point> pointRtd = new RtdBaseDiscrete<Point>();\n pointRtd.setData(new Point(5, 6));\n \n RtdBaseDiscrete<EmployeeentityBeanClassTest> employeeRtd = new RtdBaseDiscrete<EmployeeentityBeanClassTest>();\n EmployeeentityBeanClassTest emp = new EmployeeentityBeanClassTest();\n emp.setId(1);\n emp.setName(\"Max\");\n emp.setSalary(1000);\n employeeRtd.setData(emp);\n \n assertTrue(\"Incorrect BigDecimal\", bigDecimalRtd.getData().floatValue()==BigDecimal.valueOf(10).floatValue());\n assertTrue(\"Incorrect Point\", pointRtd.getData().getX() == 5 && pointRtd.getData().getY() == 6);\n assertTrue(\"Incorrect Employee \", employeeRtd.getData().getId() == 1 \n && employeeRtd.getData().getName().equals(\"Max\")\n && employeeRtd.getData().getSalary() == 1000);\n \n }", "public abstract DataTypeDescription<T> getDescription();", "public com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType getDataType() {\n @SuppressWarnings(\"deprecation\")\n com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType result = com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType.valueOf(dataType_);\n return result == null ? com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType.UNRECOGNIZED : result;\n }", "public com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType getDataType() {\n @SuppressWarnings(\"deprecation\")\n com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType result = com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType.valueOf(dataType_);\n return result == null ? com.zzsong.netty.protobuff.two.ProtoData.MyDataInfo.DataType.UNRECOGNIZED : result;\n }", "Datatype internalize(Datatype arg) throws CCAException;", "public static boolean isArray_dataType() {\n return false;\n }", "public static interface DataTypeWithRatioScale<T> {\r\n \r\n /**\r\n * Add\r\n *\r\n * @param augend\r\n * @param addend\r\n * @return\r\n */\r\n public abstract T add(T augend, T addend);\r\n\r\n /**\r\n * Compare\r\n *\r\n * @param s1\r\n * @param s2\r\n * @return\r\n * @throws NumberFormatException\r\n * @throws ParseException\r\n */\r\n public abstract int compare(String s1, String s2) throws NumberFormatException,\r\n ParseException;\r\n\r\n /**\r\n * Compare\r\n *\r\n * @param t1\r\n * @param t2\r\n * @return\r\n */\r\n public abstract int compare(T t1, T t2);\r\n\r\n /**\r\n * Divide\r\n *\r\n * @param dividend\r\n * @param divisor\r\n * @return\r\n */\r\n public abstract String divide(String dividend, String divisor);\r\n \r\n /**\r\n * Divide\r\n *\r\n * @param dividend\r\n * @param divisor\r\n * @return\r\n */\r\n public abstract T divide(T dividend, T divisor);\r\n \r\n /**\r\n * Format\r\n *\r\n * @param t\r\n * @return\r\n */\r\n public abstract String format(T t);\r\n\r\n /**\r\n * Converts a double into a value.\r\n *\r\n * @param s\r\n * @return\r\n */\r\n public abstract T fromDouble(Double d);\r\n\r\n /**\r\n * Description\r\n *\r\n * @return\r\n */\r\n public abstract DataTypeDescription<T> getDescription();\r\n\r\n /**\r\n * Maximum\r\n *\r\n * @return\r\n */\r\n public T getMaximum();\r\n \r\n /**\r\n * Minimum\r\n *\r\n * @return\r\n */\r\n public T getMinimum();\r\n\r\n /**\r\n * Valid\r\n *\r\n * @param s\r\n * @return\r\n */\r\n public abstract boolean isValid(String s);\r\n\r\n /**\r\n * Multiply\r\n *\r\n * @param multiplicand\r\n * @param multiplicator\r\n * @return\r\n */\r\n public abstract String multiply(String multiplicand,\r\n String multiplicator);\r\n\r\n /**\r\n * Multiply\r\n *\r\n * @param multiplicand\r\n * @param multiplicator\r\n * @return\r\n */\r\n public abstract T multiply(T multiplicand, double multiplicator);\r\n\r\n /**\r\n * Multiply\r\n *\r\n * @param multiplicand\r\n * @param multiplicator\r\n * @return\r\n */\r\n public abstract T multiply(T multiplicand, int multiplicator);\r\n\r\n /**\r\n * Multiply\r\n *\r\n * @param multiplicand\r\n * @param multiplicator\r\n * @return\r\n */\r\n public abstract T multiply(T multiplicand, T multiplicator);\r\n \r\n /**\r\n * Parse\r\n *\r\n * @param s\r\n * @return\r\n */\r\n public abstract T parse(String s);\r\n\r\n /**\r\n * Divide\r\n *\r\n * @param dividend\r\n * @param divisor\r\n * @return\r\n */\r\n public abstract double ratio(T dividend, T divisor);\r\n \r\n /**\r\n * Subtract\r\n *\r\n * @param minuend\r\n * @param subtrahend\r\n * @return\r\n */\r\n public abstract T subtract(T minuend, T subtrahend);\r\n \r\n /**\r\n * Converts a double into a value.\r\n *\r\n * @param s\r\n * @return\r\n */\r\n public abstract Double toDouble(T t);\r\n }", "@Override\n public boolean isPrimitive() {\n return true;\n }", "@Test(timeout = 4000)\n public void test118() throws Throwable {\n DBDataType dBDataType0 = DBDataType.getInstance((-280560843), \"\");\n DefaultDBColumn defaultDBColumn0 = new DefaultDBColumn(\"ORDINAL_POSITION\", (DBTable) null, dBDataType0);\n String string0 = SQLUtil.renderColumnTypeWithSize((DBColumn) defaultDBColumn0);\n assertEquals(\"\", string0);\n }", "public final DATATYPE getDataType(){\n\t\t\n\t\treturn wDataType;\n\t}", "public int getDataTypeValue() {\n return dataType_;\n }", "@Override\n public byte getType() {\n return TYPE_DATA;\n }", "public String getData_type_desc() {\n return data_type_desc;\n }", "public static void main(String[] args) {\n\tDataTypeDemo obj=new DataTypeDemo();\n\t\nbyte b=5; //initialization\nshort s=312;\nint i=214748364;\nlong l= 300000000000000l;\nchar c ='Y';\nboolean flag=true;\nfloat f= 30.04f;\ndouble d=45.0008;\n\nString name=\"PramitiSoft\";\n\n\n\nSystem.out.println(\"Value of byte variable=\"+b);\nSystem.out.println(\"Value of Short variable=\"+s);\nSystem.out.println(\"Value of int variable=\"+i);\nSystem.out.println(\"Value of long variable=\"+l);\nSystem.out.println(\"Value of char variable=\"+c);\nSystem.out.println(\"Value of boolean variable=\"+flag);\nSystem.out.println(\"Value of float variable=\"+f);\nSystem.out.println(\"Value of double variable=\"+d);\nSystem.out.println(\"**********************************************\");\n\nSystem.out.println(\" Deafult Value of byte variable=\"+obj.defaultbyteValue);\nSystem.out.println(\"Default Value of Short variable=\"+obj.defaultShortValue);\nSystem.out.println(\"Default Value of int variable=\"+obj.defaultIntValue);\nSystem.out.println(\"Default Value of long variable=\"+obj.defaultlongValue);\nSystem.out.println(\"Default Value of char variable=\"+obj.defaultCharValue);\nSystem.out.println(\"Default Value of boolean variable=\"+obj.defaultbooleanValue);\nSystem.out.println(\"Default Value of float variable=\"+obj.defaultfloatValue);\nSystem.out.println(\"Default Value of double variable=\"+obj.defaultdoubleValue);\nSystem.out.println(\"Default Value of String variable=\"+obj.defaultStringValue);\n\nSystem.out.println(\"**********************************************\");\n\nSystem.out.println(\" Bytes in Interger variable =\"+Byte.BYTES);\nSystem.out.println(\"Size in Interger variable =\"+Byte.SIZE);\nSystem.out.println(\"Max Value of Interger variable =\"+Byte.MAX_VALUE);\nSystem.out.println(\" Min Value Interger variable =\"+Byte.MIN_VALUE);\n\n\n}" ]
[ "0.6707502", "0.65003145", "0.6406118", "0.61700034", "0.61013055", "0.60936344", "0.60634446", "0.60568917", "0.6039084", "0.60320973", "0.59841675", "0.59752953", "0.5966294", "0.5957516", "0.5946796", "0.59448355", "0.59407634", "0.58953387", "0.5887884", "0.58768755", "0.5857815", "0.5838818", "0.5829053", "0.5827764", "0.5779182", "0.57609195", "0.57540953", "0.57441604", "0.5731356", "0.57288486", "0.5712271", "0.5705387", "0.56938463", "0.56913525", "0.5690337", "0.5673543", "0.56701434", "0.5655492", "0.5650583", "0.5626032", "0.5620026", "0.56195456", "0.56194407", "0.56120545", "0.5606189", "0.559401", "0.55760795", "0.5563429", "0.5511865", "0.55089533", "0.55084616", "0.55067796", "0.5503423", "0.54961437", "0.5491437", "0.5488038", "0.5478511", "0.5475009", "0.5472721", "0.5459531", "0.54553014", "0.5453542", "0.54411674", "0.5431573", "0.54199326", "0.54174215", "0.54022413", "0.5397053", "0.53863406", "0.53848183", "0.53777575", "0.5374243", "0.53718066", "0.5371586", "0.5370888", "0.536331", "0.53564304", "0.535266", "0.5351471", "0.53406286", "0.53387266", "0.5333713", "0.5331471", "0.5326284", "0.5325072", "0.53250194", "0.53250194", "0.5323459", "0.5322755", "0.52995545", "0.52994", "0.52967775", "0.52938205", "0.529002", "0.52809286", "0.5279863", "0.5278842", "0.5275135", "0.52737916", "0.52728397", "0.5269064" ]
0.0
-1
Bug report by anon at SourceForge Bug ID 887409
public void test_anon_0() { String NS = "http://example.org/foo#"; String sourceT = "<rdf:RDF " + " xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'" + " xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'" + " xmlns:ex='http://example.org/foo#'" + " xmlns:owl='http://www.w3.org/2002/07/owl#'>" + " <owl:ObjectProperty rdf:about='http://example.org/foo#p' />" + " <owl:Class rdf:about='http://example.org/foo#A' />" + " <ex:A rdf:about='http://example.org/foo#x' />" + " <owl:Class rdf:about='http://example.org/foo#B'>" + " <owl:equivalentClass>" + " <owl:Restriction>" + " <owl:onProperty rdf:resource='http://example.org/foo#p' />" + " <owl:hasValue rdf:resource='http://example.org/foo#x' />" + " </owl:Restriction>" + " </owl:equivalentClass>" + " </owl:Class>" + "</rdf:RDF>"; OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null); m.read(new ByteArrayInputStream(sourceT.getBytes()), "http://example.org/foo"); OntClass B = m.getOntClass( NS + "B"); Restriction r = B.getEquivalentClass().asRestriction(); HasValueRestriction hvr = r.asHasValueRestriction(); RDFNode n = hvr.getHasValue(); assertTrue( "Should be an individual", n instanceof Individual ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void m9741j() throws cf {\r\n }", "public final void mo51373a() {\n }", "public void mo38117a() {\n }", "public void method_4270() {}", "public final void mo91715d() {\n }", "private void m50366E() {\n }", "protected boolean func_70041_e_() { return false; }", "public void mo12628c() {\n }", "public void mo21792Q() {\n }", "public void mo21785J() {\n }", "public final void mo11687c() {\n }", "public void mo23813b() {\n }", "@Override\n public InputStreamSource getBugreportz() {\n return null;\n }", "public void mo21782G() {\n }", "public void mo21779D() {\n }", "public void mo21787L() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void m23075a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "protected boolean func_70814_o() { return true; }", "protected void mo6255a() {\n }", "public final void mo8775b() {\n }", "public void mo1964g() throws cf {\r\n }", "public void mo55254a() {\n }", "public void mo56167c() {\n }", "public void mo1976s() throws cf {\r\n }", "public void mo3376r() {\n }", "public void mo44053a() {\n }", "public void mo115190b() {\n }", "public void mo21794S() {\n }", "public void mo21781F() {\n }", "public void mo21877s() {\n }", "public void mo3749d() {\n }", "public void mo12930a() {\n }", "public void mo9848a() {\n }", "void m5770d() throws C0841b;", "public boolean method_194() {\r\n return false;\r\n }", "public void mo21825b() {\n }", "@Override\r\n protected void parseIssues()\r\n {\n\r\n }", "public void mo6944a() {\n }", "public void mo4359a() {\n }", "public void mo21878t() {\n }", "static void feladat9() {\n\t}", "protected void a(bug parambug)\r\n/* 35: */ {\r\n/* 36:36 */ this.j.a((bxf)null);\r\n/* 37: */ }", "public void mo21793R() {\n }", "public void mo9137b() {\n }", "public void mo21791P() {\n }", "public void mo115188a() {\n }", "public void mo1974q() throws cf {\r\n }", "public boolean method_2434() {\r\n return false;\r\n }", "public abstract void mo6549b();", "public void mo21789N() {\n }", "public boolean method_2453() {\r\n return false;\r\n }", "void mo57277b();", "public void mo2471e() {\n }", "public void mo6081a() {\n }", "protected String method_4266() {\r\n String[] var10000 = field_3418;\r\n return \"mob.enderdragon.growl\";\r\n }", "void m5771e() throws C0841b;", "public abstract void mo70713b();", "public void mo21795T() {\n }", "private String jsf22Bugfix() {\n return \"\";\n }", "public boolean method_108() {\r\n return false;\r\n }", "public void mo1406f() {\n }", "public final void mo1285b() {\n }", "public abstract void mo56925d();", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "static void m7753b() {\n f8029a = false;\n }", "void m5768b() throws C0841b;", "public abstract void mo53562a(C18796a c18796a);", "public boolean method_4088() {\n return false;\n }", "public void mo97908d() {\n }", "static void m14941f(String str, Throwable th) {\n int b = m14929b();\n int d = C3205z0.DEBUG.mo12550d();\n }", "public void mo1972o() throws cf {\r\n }", "zzafe mo29840Y() throws RemoteException;", "static void feladat7() {\n\t}", "public boolean method_216() {\r\n return false;\r\n }", "public void mo21784I() {\n }", "void m1864a() {\r\n }", "public void mo2740a() {\n }", "private void m50367F() {\n }", "@Test(timeout = 4000)\n public void test13() throws Throwable {\n FileSystemHandling.setPermissions((EvoSuiteFile) null, true, true, true);\n LinkedList<byte[][]> linkedList0 = new LinkedList<byte[][]>();\n FBObjectListener.FetcherListener fBObjectListener_FetcherListener0 = null;\n FileSystemHandling.shouldAllThrowIOExceptions();\n linkedList0.add((byte[][]) null);\n FBCachedFetcher fBCachedFetcher0 = new FBCachedFetcher(linkedList0, (FBObjectListener.FetcherListener) null);\n // Undeclared exception!\n try { \n fBCachedFetcher0.relative(1433);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.firebirdsql.jdbc.FBCachedFetcher\", e);\n }\n }", "static void feladat6() {\n\t}", "public void mo1963f() throws cf {\r\n }", "public void mo1531a() {\n }", "public void mo8738a() {\n }", "public synchronized void mo28699e() {\n if (mo27566d()) {\n throw new PooledByteBuffer.C3959a();\n }\n }", "public boolean method_208() {\r\n return false;\r\n }", "private static void runTestCWE9() {\n}", "private static void runTestCWE9() {\n}", "public void mo21780E() {\n }", "private final void m90474c() {\n RxBus.m86979a().mo84367a(new UnFriendlyEvent(2));\n popSelf();\n }", "public void mo21783H() {\n }", "@Override\r\n\tpublic void fixIssue() {\n\t\tthis.techie.fixIssue(\"network issue\");\r\n\t}", "public void mo5248a() {\n }", "public void mo9233aH() {\n }" ]
[ "0.64422226", "0.6435748", "0.63026464", "0.62940997", "0.6280498", "0.6239986", "0.62349135", "0.6197201", "0.6185781", "0.6178558", "0.61361635", "0.61249185", "0.6102997", "0.60988677", "0.6092033", "0.60621697", "0.6052185", "0.6052185", "0.6052185", "0.6052185", "0.6052185", "0.6052185", "0.6052185", "0.6026924", "0.6024413", "0.6001547", "0.5997581", "0.59885734", "0.59882975", "0.59881985", "0.59733206", "0.5972673", "0.59717894", "0.5968597", "0.5968063", "0.5965736", "0.5961887", "0.59475946", "0.5941677", "0.5939831", "0.5925139", "0.5925042", "0.59216505", "0.59194803", "0.5904529", "0.58937633", "0.5892778", "0.58917713", "0.58907217", "0.58902276", "0.5883108", "0.5882987", "0.587454", "0.5874514", "0.585843", "0.5856931", "0.58468646", "0.58465457", "0.5844173", "0.5842771", "0.5842721", "0.58406824", "0.5830217", "0.58234066", "0.5821829", "0.5821073", "0.5809733", "0.5801315", "0.5798371", "0.5791904", "0.5786054", "0.5783113", "0.5764211", "0.5756905", "0.57547957", "0.5752573", "0.5751005", "0.57370085", "0.57337373", "0.57329005", "0.5730673", "0.5730091", "0.57265395", "0.57250303", "0.57205576", "0.5709228", "0.57006264", "0.5700458", "0.56988025", "0.56982625", "0.56960535", "0.5688745", "0.56873053", "0.5687206", "0.5687206", "0.5686994", "0.5686525", "0.5683743", "0.56821555", "0.566346", "0.5662291" ]
0.0
-1
Bug report by Harry Chen closed exception when reading many models
public void test_hc_01() throws Exception { for (int i = 0; i < 5; i++) { OntModel m = ModelFactory.createOntologyModel(); FileInputStream ifs = new FileInputStream("testing/ontology/relativenames.rdf"); //System.out.println("Start reading..."); m.read(ifs, "http://example.org/foo"); //System.out.println("Done reading..."); ifs.close(); //System.out.println("Closed ifs"); m.close(); //System.out.println("Closed model"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void modelRead(){\r\n\t\tthis.model.read(in, null);\r\n\t\tSystem.out.println(\"\\n -- model read finished --\\n\");\r\n\t}", "public void dispose() {\n\t\tSet<IRI> ids = new HashSet<IRI>(getModelIds());\n\t\tfor (IRI id : ids) {\n\t\t\tunlinkModel(id);\n\t\t}\n\t}", "public boolean loadModel() throws Exception{\r\n\t\t\r\n\t\tboolean rB = false ;\r\n\t\tModelCatalogItem mcItem ;\r\n\t\t\r\n\t\t// before, we have determined name and version according to the request options (e.g. \"latest\")\r\n\t\tmcItem = soappModelCatalog.getItemByModelname( activeModel, activeVersion ); \r\n\t\t// here, an active version should always be defined, if not, the first one will be selected\r\n\t\t\r\n\t\t\r\n\t\tif (mcItem != null){\r\n\t\t\t\t\t\t\t\t\t\t\tout.print(2, \"loading resources for requested model <\"+activeModel+\">, version <\"+activeVersion+\"> ... \") ;\r\n\t\t\t\r\n\t\t\tif ((somData==null) || (somData.getData().getColumnHeaders().size()==0)){\t\t\t\t\t\t\r\n\t\t\t\tsomApplication.loadSource();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// this also sets the data\r\n\t\t\tsoappTransformer = loadSomAppTransformer(mcItem);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\trB= transformIncomingData();\r\n\t\t\t\r\n\t\t\tsoappClassifier = loadSomAppClassifier(mcItem);\r\n\r\n\t\t\trB= (soappTransformer!=null) && (soappClassifier!=null);\r\n\t\t}else{\r\n\t\t\tout.print(2, \"identification resources for requested model <\"+activeModel+\"> failed.\") ;\r\n\t\t}\r\n\t\treturn rB;\r\n\t}", "@Test\n public void readFile() throws IOException {\n ModelInfo modelInfo = ModelReader.create().load();\n\n }", "public List<ModelObject> readAll();", "public List<ModelClass> getAllModels() throws StorageIOException {\n try {\n Dao<ModelDB, String> modelDao = this.databaseHelper.getDao(ModelDB.class);\n QueryBuilder<ModelDB, String> queryBuilder = modelDao.queryBuilder();\n \n queryBuilder.orderBy(\"name\", true);\n \n List<ModelDB> entities = modelDao.query(queryBuilder.prepare());\n List<ModelClass> models = new ArrayList<ModelClass>(entities.size());\n \n for (ModelDB e : entities) {\n models.add(dbToClass(e));\n }\n\n return models;\n \n } catch (SQLException e) {\n throw new StorageIOException(\"Failed to get models\", e);\n }\n }", "private Model getThisModel(String name, Model model) {\n\t\t\t\n\t\t\t Model modret=ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM);\n\t\t\t\t String text=dbs.getModel(name);\n\t\t\t\t\n\t\t\t\t//System.out.println(\"TEXT\"+text+\"TEXT!!!\");\n\t\t\t\t if(text==null){\n\t\t\t\t\t modret.setNsPrefix(\"foaf\", NS.FOAF);\n\t\t\t\t\t\tmodret.setNsPrefix(\"cisp\", NS.CISP);\n\t\t\t\t\t\tmodret.setNsPrefix(\"prov\", NS.PROV);\n\t\t\t\t\t\tmodret.setNsPrefix(\"rdf\", NS.RDF);\n\t\t\t\t\treturn modret;\n\t\t\t\t }\n\t\t\t\t else{\n\t\t\t\t\t //read model \n\t\t\t\t\t InputStream input = new ByteArrayInputStream(text.getBytes());\n\t \n\t\t\t\t\t modret.read(input, null,\"RDF/JSON\");\n\t\t\t\t\t modret.setNsPrefix(\"foaf\", NS.FOAF);\n\t\t\t\t\t\tmodret.setNsPrefix(\"cisp\", NS.CISP);\n\t\t\t\t\t\tmodret.setNsPrefix(\"prov\", NS.PROV);\n\t\t\t\t\t\tmodret.setNsPrefix(\"rdf\", NS.RDF);\n\t\t\t\t }\n\t\t\t\t return modret;\n\t \n\t\t }", "protected void tearDown() throws Exception {\r\n\t\tmodelDS = null;\r\n\t\tif (null != connection) {\r\n\t\t\tconnection.close();\r\n\t\t\tconnection = null;\r\n\t\t}\r\n\t}", "public synchronized static void loadModels() throws SchemaProviderException {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Loading OXM Models\");\n }\n\n for (SchemaVersion oxmVersion : translator.getSchemaVersions().getVersions()) {\n DynamicJAXBContext jaxbContext = nodeIngestor.getContextForVersion(oxmVersion);\n if (jaxbContext != null) {\n loadModel(oxmVersion.toString(), jaxbContext);\n }\n }\n }", "@Override\npublic void close() throws IOException, JoinsException, SortException, IndexException {\n\t\n}", "@Override\r\n\tpublic void dispose() {\n\t\tmodelBatch.dispose();\r\n\t\tinstances.clear();\r\n\t\tassets.dispose();\r\n\t}", "@Override\n\tpublic void close() throws Exception {\n\t\tsuper.close();\n\t\t\n\t\tbnetMap.clear();\n\t\titemIds.clear();\n\t}", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "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 ModelAccessException() {\n\t\tsuper();\n\n\t}", "private MappedByteBuffer loadModelFile(Activity activity) throws IOException {\n AssetFileDescriptor fileDescriptor = activity.getAssets().openFd(MODEL_PATH);\n FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());\n FileChannel fileChannel = inputStream.getChannel();\n long startOffset = fileDescriptor.getStartOffset();\n long declaredLength = fileDescriptor.getDeclaredLength();\n return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);\n }", "private MappedByteBuffer loadModelFile(Activity activity) throws IOException {\n AssetFileDescriptor fileDescriptor = activity.getAssets().openFd(MODEL_PATH);\n FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());\n FileChannel fileChannel = inputStream.getChannel();\n long startOffset = fileDescriptor.getStartOffset();\n long declaredLength = fileDescriptor.getDeclaredLength();\n return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);\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 abstract Model openModel(String graphName) throws JenaProviderException;", "private void load() throws DAOSysException\t\t{\n\t\tif (_debug) System.out.println(\"AL:load()\");\n\t\tAnnualLeaseDAO dao = null;\n\t\ttry\t{\n\t\t\tdao = getDAO();\n\t\t\tsetModel((AnnualLeaseModel)dao.dbLoad(getPrimaryKey()));\n\n\t\t} catch (Exception ex)\t{\n\t\t\tthrow new DAOSysException(ex.getMessage());\n\t\t}\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 }", "private MappedByteBuffer loadModelFile(Activity activity) throws IOException {\n AssetFileDescriptor fileDescriptor = activity.getAssets().openFd(MODEL_PATH);\n FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());\n FileChannel fileChannel = inputStream.getChannel();\n long startOffset = fileDescriptor.getStartOffset();\n long declaredLength = fileDescriptor.getDeclaredLength();\n return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);\n }", "public void doClose() {\n mVehicleTypeDao.closeAll();\n // mAccidentNoteDao.closeAll();\n // mInvolvedPartyDao.closeAll();\n // mDeviceUserDao.closeAll();\n // mInsurancePolicyPDao.closeAll();\n //mInvolvedVehicleDao.closeAll();\n //mAccidentIdDao.closeAll();\n mPersistenceObjDao.closeAll();\n //mPremiumAdvertiserDao.closeAll();\n //mInsurancePolicyDao.closeAll();\n //mDeviceVehicleDao.closeAll();\n //mVehicleManifestDao.closeAll();\n mDeviceUserDao.closeAll();\n }", "@GuardedBy(\"mLock\") // Do not call outside this lock.\n private List<ModelFile> listAllModelsLocked() {\n if (mAllModelFiles == null) {\n final List<ModelFile> allModels = new ArrayList<>();\n // The update model has the highest precedence.\n if (new File(UPDATED_MODEL_FILE_PATH).exists()) {\n final ModelFile updatedModel = ModelFile.fromPath(UPDATED_MODEL_FILE_PATH);\n if (updatedModel != null) {\n allModels.add(updatedModel);\n }\n }\n // Factory models should never have overlapping locales, so the order doesn't matter.\n final File modelsDir = new File(MODEL_DIR);\n if (modelsDir.exists() && modelsDir.isDirectory()) {\n final File[] modelFiles = modelsDir.listFiles();\n final Pattern modelFilenamePattern = Pattern.compile(MODEL_FILE_REGEX);\n for (File modelFile : modelFiles) {\n final Matcher matcher = modelFilenamePattern.matcher(modelFile.getName());\n if (matcher.matches() && modelFile.isFile()) {\n final ModelFile model = ModelFile.fromPath(modelFile.getAbsolutePath());\n if (model != null) {\n allModels.add(model);\n }\n }\n }\n }\n mAllModelFiles = allModels;\n }\n return mAllModelFiles;\n }", "@Override\n\t\tpublic void close() throws Exception {\n\t\t}", "private List<Model> getModel() {\n \r\n DataBaseTestAdapter1 mDbHelper = new DataBaseTestAdapter1(this); \r\n\t \tmDbHelper.createDatabase(); \r\n\t \tmDbHelper.open(); \r\n\t \t \r\n \t \tpure = (Pure?\"T\":\"F\");\r\n\r\n \t \tString sql =\"SELECT Code FROM \"+major+\" WHERE (Pure='All' OR Pure='\" + pure + \"') ORDER BY Year,Code\"; \r\n\t \tCursor testdata = mDbHelper.getTestData(sql); \r\n\t \tString code = DataBaseUtility1.GetColumnValue(testdata, \"Code\");\r\n\t \tlist.add(new Model(code));\r\n\t \twhile (testdata.moveToNext()){\r\n\t \t\t \r\n\t \tcode = DataBaseUtility1.GetColumnValue(testdata, \"Code\");\r\n\t \tModel temp = new Model(code);\r\n\t \t\r\n\t \tif ((code.equals(\"CommonCore1\") && SA) ||\t\t\t//name conversion\r\n\t \t\t\t(code.equals(\"CommonCore2\") && S_T) ||\r\n\t \t\t\t(code.equals(\"CommonCore3\") && A_H) ||\r\n\t \t\t\t(code.equals(\"CommonCore4\") && Free) ||\r\n\t \t\t\t(code.equals(\"SBM\") && SBM) ||\r\n\t \t\t\t(code.equals(\"ENGG\") && ENGG) ||\r\n\t \t\t\t(code.equals(\"FreeElective\") && FreeE) ||\r\n\t \t\t\t(code.equals(\"COMPElective1\") && compx1) ||\r\n\t \t\t\t((code.equals(\"COMPElective1\")|| code.equals(\"COMPElective2\")) && compx2) ||\r\n\t \t\t\t((code.equals(\"COMPElective1\")|| code.equals(\"COMPElective2\") || code.equals(\"COMPElective3\")) && compx3) ||\r\n\t \t\t\t((code.equals(\"COMPElective1\")|| code.equals(\"COMPElective2\") || code.equals(\"COMPElective3\") || code.equals(\"COMPElective4\")) && compx4) ||\r\n\t \t\t\t((code.equals(\"COMPElective1\")|| code.equals(\"COMPElective2\") || code.equals(\"COMPElective3\") || code.equals(\"COMPElective4\") || code.equals(\"COMPElective5\")) && compx5) ||\r\n\t \t\t\t(code.equals(\"COMP/ELEC/MATH1\") && CEMx1) ||\r\n\t \t\t\t((code.equals(\"COMP/ELEC/MATH1\") || code.equals(\"COMP/ELEC/MATH2\")) && CEMx2) \r\n\t \t\t\t\t\t\t\t){\r\n\t \t\t\r\n\t \t\ttemp.setSelected(true);\r\n\t \t}\r\n\t \r\n\t \tlist.add(temp);\r\n \t}\r\n\r\n\t\ttestdata.close();\r\n \tmDbHelper.close();\r\n\r\n return list;\r\n }", "@Override\n\tpublic void load(ModelInfo info) {\n\t}", "@Override\r\n\tprotected void doClose() throws Exception {\n\t\t\r\n\t}", "protected void tearDown() throws Exception {\n _reader.close();\n }", "private void initializeModel() {\n\t\tmodel = new Model();\n\n\t\t// load up playersave\n\t\ttry {\n\t\t\tFileInputStream save = new FileInputStream(\"playersave.ser\");\n\t\t\tObjectInputStream in = new ObjectInputStream(save);\n\t\t\tmodel = ((Model) in.readObject());\n\t\t\tin.close();\n\t\t\tsave.close();\n\t\t\tSystem.out.println(\"playersave found. Loading file...\");\n\t\t}catch(IOException i) {\n\t\t\t//i.printStackTrace();\n\t\t\tSystem.out.println(\"playersave file not found, starting new game\");\n\t\t}catch(ClassNotFoundException c) {\n\t\t\tSystem.out.println(\"playersave not found\");\n\t\t\tc.printStackTrace();\n\t\t}\n\t\t\n\t\t// load up customlevels\n\t\ttry {\n\t\t\tFileInputStream fileIn = new FileInputStream(\"buildersave.ser\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tmodel.importCustomLevels(((ArrayList<LevelModel>) in.readObject()));\n\t\t\tin.close();\n\t\t\tfileIn.close();\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> found. Loading file...\");\n\t\t}catch(IOException i) {\n\t\t\t//i.printStackTrace();\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> file not found, starting new game\");\n\t\t\treturn;\n\t\t}catch(ClassNotFoundException c) {\n\t\t\tSystem.out.println(\"Builder ArrayList<LevelModel> not found\");\n\t\t\tc.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t}", "public static void loadBioPAXModel(Model model, String title, String ownerName, String db) throws Exception{\n\t\tSet<BioPAXElement> elementSet = model.getObjects();\n\t\tfor (BioPAXElement bpe : elementSet) {\n\t\t\tif (bpe instanceof Xref){\n\t\t\t\t// Process Xrefs\n\t\t\t\tprocessXREF(bpe);\n\t\t\t} else {\n\t\t\t\t// Process all Other Elements to create Node objects\n\t\t\t\tprocessElementToNode(bpe);\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// Process all Properties in each Element to create NDExPropertyValuePair and Edge objects\n\t}", "private void refreshSubData() {\n\t SfJdRecordFileModel model = (SfJdRecordFileModel) listCursor.getCurrentObject(); \r\n\t }", "public void closeModel() {\n \t\tif (checkForSave(\"<html>Save changes before closing?</html>\")) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tresetMouseState();\r\n \r\n \t\t// clear undo history\r\n \t\tgraph.getModel().removeUndoableEditListener(undoProxy);\r\n \t\tundoProxy.discardAllEdits();\r\n \t\t// end\r\n \t\t// graph.setModel(null); //wreaks quite a bit of havoc\r\n \t\tmainWindow.removeGraph();\r\n \t\tgraph = null;\r\n \t\tcloseModel.setEnabled(false);\r\n \t\tsaveModel.setEnabled(false);\r\n \t\teditMeasures.setEnabled(false);\r\n \t\tsaveModelAs.setEnabled(false);\r\n \t\tcomponentBar.clearButtonGroupSelection(0);\r\n \t\tcomponentBar.enableButtonGroup(0, false);\r\n \t\tsetConnect.setEnabled(false);\r\n \t\tactionCopy.setEnabled(false);\r\n \t\tactionCut.setEnabled(false);\r\n \t\tactionPaste.setEnabled(false);\r\n \t\tactionDelete.setEnabled(false);\r\n \t\t// FG\r\n \t\tactionSetRight.setEnabled(false);\r\n \t\tactionRotate.setEnabled(false);\r\n \r\n \t\tsetSelect.setEnabled(false);\r\n \t\tsimulate.setEnabled(false);\r\n \t\tsolveAnalitic.setEnabled(false);\r\n \t\tsolveApp.setEnabled(false);\r\n \t\teditUserClasses.setEnabled(false);\r\n \t\teditMeasures.setEnabled(false);\r\n \t\tswitchToExactSolver.setEnabled(false);\r\n \t\t// Disables the botton to start simualtion\r\n \t\tsimulate.setEnabled(false);\r\n \t\teditSimParams.setEnabled(false);\r\n \t\teditPAParams.setEnabled(false);\r\n \t\ttakeScreenShot.setEnabled(false);\r\n \t\t// Disables show results button and measure definition\r\n \t\tshowResults.setSelected(false);\r\n \t\tshowResults.setEnabled(false);\r\n \t\tif (resultsWindow != null) {\r\n \t\t\tresultsWindow.dispose();\r\n \t\t}\r\n \t\tresultsWindow = null;\r\n \t\topenedArchive = null;\r\n \t\tmodel = new JMODELModel();\r\n \t\tmainWindow.updateTitle(null);\r\n \t\t// Free same resources by forcing a garbage collection\r\n \t\tSystem.gc();\r\n \t}", "@Override\n\tpublic void close() throws Exception {\n\t\t\n\t}", "protected void saveData(DataModel[] models) throws Exception {\n }", "@Test\n public void testRead_LemonModel_Reader() {\n //System.out.println(\"read\");\n LemonSerializerImpl instance = new LemonSerializerImpl(null);\n LemonModel lm = instance.create(URI.create(\"file:test\"));\n Reader ds = new StringReader(testXMLDoc);\n instance.read(lm, ds);\n }", "@Override\n public void close() throws Exception {\n }", "private List<Object[]> getModelo() throws Exception {\n\t\treturn getModelo(null);\n\t}", "private void initializeModel() {\n\t\t\n\t}", "public void closeAndUpload() {\n\t\t Iterator iter=modlist.keySet().iterator();\n\t\t String key;\n\t\t ArrayList keyset=new ArrayList(); //necessaary as it needs to be removed at the same time as releasing a lock\n\t\t while(iter.hasNext()){\n\t\t\t keyset.add(iter.next());\n\t\t }\n\t\t \n\t\t iter=keyset.iterator();\n\t\t Model model;\n\t\t while(iter.hasNext()){\n\t\t\t key=(String) iter.next();\n\t\t\t model=(Model) modlist.get(key);\n\t\t\t boolean answer=true;\n\t\t\t while(answer){\n\t\t\t//\t System.out.println(\"HEY\");\n\t\t\t\t try {\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t}\n\t\t\t//\t System.out.println(key);\n\t\t\t\t \n\t\t\t\t\t answer=getLockModel(key, model);\n\t\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t }\n\t\t// System.out.println(\"END THIS?\");\n\t\t modlist.clear();\n\t}", "protected void prepareModel() {\n model();\n }", "private void recreateModel() {\n items = null;\n didItCountAlready = false;\n }", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "private static ArrayList<Model> getModels(HttpResponse<String> response){\n\t\tArrayList<Model> models;\n\t\ttry {\n\t\t\tmodels = new ObjectMapper().readValue(response.body(), new TypeReference<ArrayList<Model>>(){});\n\t\t\treturn models;\n\t\t} catch (JsonMappingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@Override\n protected void doClose() {\n FileUtil.closeSilent(this.in);\n this.recordFactory = null;\n this.geometryFactory = null;\n this.in = null;\n this.recordDefinition = null;\n this.resource = null;\n }", "@Override\n public void close() throws Exception {\n }", "@Override\n\tpublic void closeAndCleanupAllData() throws Exception {\n\t\tclose();\n\t}", "@Override\n\tpublic OFModel[] getModels() {\n\t\treturn null;\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t}", "@Override\n public void close() {\n \n }", "@Override\n\tpublic void close() {\n\t\tsuper.close();\n\t\t\n\t\tbnetMap.clear();\n\t\titemIds.clear();\n\t}", "private void loadModel(InputStream is, int recursivityLevel) throws IOException \r\n\t{\r\n\t\tLoadModelTask task = new LoadModelTask(is, recursivityLevel, this);\r\n\t\ttask.execute();\r\n\t\t//timeRange.setLimits(minTs, maxTs);\r\n\t\tthis.setEnabled(false);\r\n\t}", "public void edit() throws Exception {\n super.assertModelsExist();\n for (Model model : models) {\n gotoEditPage(model);\n populateValues(model);\n save(model);\n handlePostErrors();\n }\n }", "@Override\r\n\tpublic void close() throws Exception {\n\r\n\t}", "public interface MultipleDocumentModel extends Iterable<SingleDocumentModel> {\r\n\t/**\r\n\t * Creates new document\r\n\t * \r\n\t * @return new document\r\n\t */\r\n\tSingleDocumentModel createNewDocument();\r\n\r\n\t/**\r\n\t * Returns currently selected document\r\n\t * \r\n\t * @return currently selected document\r\n\t */\r\n\tSingleDocumentModel getCurrentDocument();\r\n\r\n\t/**\r\n\t * Loads document from given path\r\n\t * \r\n\t * @param path from which file is loaded\r\n\t * @return new Single document model\r\n\t * @throws NullPointerException if path is null\r\n\t */\r\n\tSingleDocumentModel loadDocument(Path path);\r\n\r\n\t/**\r\n\t * Saves document to disc. If given path isn't null, path of document is changed\r\n\t * to it after saving. Otherwise saves to original path\r\n\t * \r\n\t * @param model that is saved\r\n\t * @param newPath path to which is saved, if null saved to origin\r\n\t */\r\n\tvoid saveDocument(SingleDocumentModel model, Path newPath);\r\n\r\n\t/**\r\n\t * Closes selected single document model\r\n\t * \r\n\t * @param model that is closed\r\n\t */\r\n\tvoid closeDocument(SingleDocumentModel model);\r\n\r\n\t/**\r\n\t * Adds listener to this model\r\n\t * \r\n\t * @param l that is added\r\n\t */\r\n\tvoid addMultipleDocumentListener(MultipleDocumentListener l);\r\n\r\n\t/**\r\n\t * Removes document listener from this model\r\n\t * \r\n\t * @param l listener to be removed\r\n\t */\r\n\tvoid removeMultipleDocumentListener(MultipleDocumentListener l);\r\n\r\n\t/**\r\n\t * Returns number of stored documents\r\n\t * \r\n\t * @return num of documents\r\n\t */\r\n\tint getNumberOfDocuments();\r\n\r\n\t/**\r\n\t * Returns document at given index\r\n\t * @param index of document\r\n\t * @return\r\n\t */\r\n\tSingleDocumentModel getDocument(int index);\r\n}", "@Override\n\t\tpublic void rewind() throws DbException, TransactionAbortedException {\n\t\t\tclose();\n\t\t\topen();\n\t\t}", "private void cargarModelo() {\n dlmLibros = new DefaultListModel<>();\n listaLibros.setModel(dlmLibros);\n }", "public void loadModel() throws SQLException {\n\t\tObject rs = MysqlConnection.getDbConnection().getQueryData(query);\n\t\tclassifier = (FilteredClassifier)rs;\n\t}", "protected void handleMultipleRowsFound()\r\n/* 44: */ throws DataAccessException\r\n/* 45: */ {\r\n/* 46:103 */ throw new IncorrectResultSizeDataAccessException(\r\n/* 47:104 */ \"LobStreamingResultSetExtractor found multiple rows in database\", 1);\r\n/* 48: */ }", "public boolean selectFromAvailableModels() throws Exception{\r\n\t\t\r\n\t\tboolean rB=false;\r\n\t\t\t\r\n\t\tbaseFolder = soappProperties.getBaseModelFolder() ;\r\n\t\t\t\t\t // sth like: \"D:/data/projects/_classifierTesting/bank2/models\"\r\n\t\t\r\n\t\tactiveModel = soappProperties.getActiveModel() ; // sth like \"bank2\" \r\n\t\t// this refers to the name of the project as it is contained in the model file!!\r\n\t\t// on first loading, a catalog of available model will be created for faster access if it does not exists\r\n\t\r\n\t\tif (activeModel.length()>0){ \r\n\t\t\t\t\t\t\t\t\t\t\tout.print(2, \"checking model catalog associated with selected project ...\") ;\r\n\t\t\tcheckCreateLocationCatalog() ;\r\n\t\t} else{\r\n\t\t\t// alternatively, we set the active model to blank here, and provide the package name ;\r\n\t\t\t// whenever the active model name is given (and existing) it will be preferred!\r\n\t\t\t \r\n\t\t\tmodelPackageName = soappProperties.getModelPackageName();\r\n\t\t\tactiveModel = getModelThroughPackage(modelPackageName ) ;\r\n\t\t}\r\n\t\t\r\n\t\t// now reading from the modelcatalog.dat\r\n\t\t\r\n\t\t/*\r\n\t \t_MODELSELECT_LATEST = 1;\r\n\t\t_MODELSELECT_FIRSTFOUND = 2;\r\n\t\t_MODELSELECT_BEST = 4;\r\n\t\t_MODELSELECT_ROBUST = 8;\r\n\t\t_MODELSELECT_VERSION = 16 ;\r\n\t\t */\r\n\t\tModelCatalogItem mcItem= null, mci = null ;\r\n\r\n\t\tif (soappModelCatalog.size()>0){\r\n\t\t\tint m=0;\r\n\t\t\tboolean mciOK=false;\r\n\t\t\t\r\n\t\t\twhile ( (mciOK==false) && (mcItem==null) && (m<soappModelCatalog.size())){\r\n\t\t\t\t\r\n\t\t\t\tif (soappProperties.getModelSelectionMode() == SomAppProperties._MODELSELECT_FIRSTFOUND){\r\n\t\t\t\t\tmci = soappModelCatalog.getItem(m);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (soappProperties.getModelSelectionMode() == SomAppProperties._MODELSELECT_LATEST){\r\n\t\t\t\t\tmci = soappModelCatalog.getLatestItem();\r\n\t\t\t\t}\r\n\t\t\t\tif (soappProperties.getModelSelectionMode() == SomAppProperties._MODELSELECT_BEST){\r\n\t\t\t\t\tmci = soappModelCatalog.getBestItem();\r\n\t\t\t\t}\r\n\t\t\t\tif (soappProperties.getModelSelectionMode() == SomAppProperties._MODELSELECT_VERSION){\r\n\t\t\t\t\tmci = soappModelCatalog.getItemByModelname( activeModel, soappProperties.preferredModelVersion ) ;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// checking whether the model contains the required fields mcItem.requiredfields\r\n\t\t\t\tif (modelCheckRequirements(mci) == false ){\r\n\t\t\t\t\tsoappModelCatalog.addToExcludedItems(mci);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmciOK=true;\r\n\t\t\t\t\tmcItem = mci;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tm++;\r\n\t\t\t} // ->\r\n\t\t\t\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\tmcItem=null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tactiveModel = \"\" ;\r\n\t\tactiveVersion = \"\" ;\r\n\t\t\r\n\t\tif (mcItem!=null){\r\n\t\t\tactiveVersion = mcItem.modelVersion;\r\n\t\t\tactiveModel = mcItem.modelName;\r\n\t\t\trB=true;\r\n\t\t\t\r\n\t\t\tif (activeModel.length()==0){\r\n\t\t\t\trB = false;\r\n\t\t\t}\r\n\t\t\tif (activeVersion.length()==0){\r\n\t\t\t\trB = false;\r\n\t\t\t}\r\n\r\n\t\t}else{ // mcItem ?\r\n\t\t\tout.print(2,\"No matching model (by required fields) found in the list (n=\"+soappModelCatalog.size()+\") of available models.\");\r\n\t\t}\r\n\t\treturn rB;\r\n\t}", "public void test_dn_02() {\n OntModel mymod = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null );\n mymod.read( \"file:testing/ontology/testImport3/a.owl\" );\n \n assertEquals( \"Graph count..\", 2, mymod.getSubGraphs().size() );\n \n for (Iterator it = mymod.listImportedModels(); it.hasNext();) {\n mymod.removeSubModel( (Model) it.next() );\n }\n \n assertEquals( \"Graph count..\", 0, mymod.getSubGraphs().size() );\n }", "private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }", "public static void dispose () {\n\t\tif (cachedStillModels != null) {\n\t\t\tfor (StillModel m : cachedStillModels.values()) {\n\t\t\t\tm.dispose();\n\t\t\t}\n\n\t\t\tcachedStillModels.clear();\n\t\t}\n\n\t\tif (cachedMaterials != null) {\n\t\t\tcachedMaterials.clear();\n\t\t}\n\t}", "private void updateRecords() throws Exception {\n if (records==null){\n records = new ArrayList<>();\n if (shp!=null){\n Iterator<Record> it = getRecords();\n while (it.hasNext()){\n records.add(it.next());\n numShapes++;\n }\n }\n }\n }", "public void Close() throws IOException, ClassNotFoundException {\n\t\tsaveBlock(); \n\t\tmergeAllIndex();\n\t\tsaveToken();\n\t\tdocIdx.close();\n\t}", "@Override\n\t\tpublic void close() {\n\t\t\t\n\t\t}", "@Override\n public void close() throws IOException {\n }", "@After\n\tpublic void cleanUp() {\n\t\tif (model != null) {\n\t\t\tmodel.release(true);\n\t\t\tloader.unloadAll();\n\t\t}\n\t}", "private void addEntitiesToEntityCache(ModelReader modelReader,\n\t\t ResourceHandler resourceHandler,\n String loaderEnt,\n String locationEnt) throws OfbizDataException {\n\t\tif (modelReader == null || resourceHandler == null) {\n\t\t\tLOG.warn(String.format(\"Null reader or resource handler\" +\n\t\t\t\t\t \" in addEntitiesToEntityCache() method. Model\" +\n \" reader: %s Resource handler: %s\",\n modelReader, resourceHandler));\n\t\t\treturn;\n\t\t}\n\t\ttry {\n Document document;\n\t\t\tMap<String, ModelEntity> entityCache = modelReader.getEntityCache();\n List<ModelViewEntity> tempViewEntityList\n = new LinkedList<ModelViewEntity>();\n Hashtable<String, String> docElementValues\n = new Hashtable<String, String>();\n\n\t\t\tsynchronized (ModelReader.class) {\n\t\t\t\ttry {\n\t\t\t\t\tdocument = resourceHandler.getDocument();\n\t\t\t\t} catch (GenericConfigException e) {\n String msg = \"Error getting document from resource handler\";\n LOG.error(msg);\n\t\t\t\t\tthrow new GenericEntityConfException(msg, e);\n\t\t\t\t}\n\t\t\t\tif(document == null) {\n\t\t\t\t\tString msg = String.format(\"Could not get document for %s\",\n resourceHandler);\n\t\t\t\t\tLOG.error(msg);\n\t\t\t\t\tthrow new OfbizDataException(msg);\n\t\t\t\t}\n\n\t\t\t\tElement docElement = document.getDocumentElement();\n\n\t\t\t\tif (docElement == null) {\n\t\t\t\t\tString msg = \"NULL doc element.\";\n\t\t\t\t\tLOG.error(msg);\n\t\t\t\t\tthrow new OfbizDataException(msg);\n\t\t\t\t}\n\t\t\t\tdocElement.normalize();\n\t\t\t\tNode curChild = docElement.getFirstChild();\n\n\t\t\t\tint i = 0;\n\n\t\t\t\tif (curChild != null) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tboolean isEntity = \"entity\".equals(curChild.getNodeName());\n\t\t\t\t\t\tboolean isViewEntity = \"view-entity\".equals(curChild.getNodeName());\n\n\t\t\t\t\t\tif ((isEntity || isViewEntity) &&\n\t\t\t\t\t\t\tcurChild.getNodeType() == Node.ELEMENT_NODE) {\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t\tElement curEntity = (Element) curChild;\n\t\t\t\t\t\t\tString entityName =\n\t\t\t\t\t\t\t\tUtilXml.checkEmpty(curEntity.getAttribute(\"entity-name\"));\n\n\t\t\t\t\t\t\t// check to see if entity with same name has already\n\t\t\t\t\t\t\t// been read\n\t\t\t\t\t\t\tif (entityCache.containsKey(entityName)) {\n if(LOG.isDebugEnabled()) {\n LOG.debug(String.format(\n \"Entity %s is defined more than once, most \" +\n \"recent will overwrite previous definition\",\n entityName));\n }\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// add entity to entityResourceHandlerMap map\n\t\t\t\t\t\t\tmodelReader.addEntityToResourceHandler(entityName,\n\t\t\t\t\t\t\t\t loaderEnt,\n locationEnt);\n\n\t\t\t\t\t\t\tModelEntity entity;\n\n\t\t\t\t\t\t\tif (isEntity) {\n\t\t\t\t\t\t\t\tentity = createModelEntity(modelReader,\n curEntity,\n\t\t\t\t\t\t\t\t\t\t docElement,\n null,\n docElementValues);\n if(LOG.isDebugEnabled()){\n LOG.debug(String.format(\"[Entity]: # %d: %s\",\n i, entityName));\n }\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tentity = createModelViewEntity(modelReader,\n curEntity,\n\t\t\t\t\t\t\t\t\t\t docElement,\n null,\n docElementValues);\n\t\t\t\t\t\t\t\t// put the view entity in a list to get ready\n\t\t\t\t\t\t\t\t// for the second pass to populate fields...\n\t\t\t\t\t\t\t\ttempViewEntityList.add((ModelViewEntity)entity);\n if(LOG.isDebugEnabled()){\n String msg = String.format(\"[ViewEntity]: # %d: %s\",\n i, entityName);\n LOG.debug(msg);\n }\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (entity != null) {\n safelyMapAdd(entityCache, entityName, entity);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tLOG.warn(String.format(\"Could not create entity \" +\n \"for entityName: %s\",\n\t\t\t\t\t\t\t\t\t\t entityName));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} while ((curChild = curChild.getNextSibling()) != null);\n\t\t\t\t} else {\n\t\t\t\t\tLOG.warn(\"No child nodes found.\");\n\t\t\t\t}\n\n\t\t\t\tmodelReader.rebuildResourceHandlerEntities();\n\n\t\t\t\t// do a pass on all of the view entities now that all of the\n\t\t\t\t// entities have loaded and populate the fields\n for (ModelViewEntity me : tempViewEntityList) {\n me.populateFields(entityCache);\n }\n\t\t\t\tLOG.debug(\"FINISHED LOADING ENTITIES.\");\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tString msg = String.format(\"Got exception when adding entities \" +\n\t\t\t\t\t\"from resource handler: %s\", resourceHandler);\n\t\t\tLOG.error(msg, ex);\n\t\t\tthrow new OfbizDataException(msg, ex);\n\t\t}\n\t}", "private ModelCheckpoints loadFromTransientModule(SModelName originalModelName) {\n // XXX getCheckpointModelsFor iterates models of the module, hence needs a model read\n // OTOH, just a wrap with model read doesn't make sense here (models could get disposed right after the call),\n // so likely we shall populate myCheckpoints in constructor/dedicated method. Still, what about checkpoint model disposed *after*\n // I've collected all the relevant state for this class?\n // Not sure whether read shall be local to this class or external on constructor/initialization method\n // It seems to be an implementation detail that we traverse model and use its nodes to persist mapping label information (that's what we need RA for).\n return new ModelAccessHelper(myTransientModelProvider.getRepository()).runReadAction(() -> {\n String nameNoStereotype = originalModelName.getLongName();\n ArrayList<CheckpointState> cpModels = new ArrayList<>(4);\n for (SModel m : myModule.getModels()) {\n if (!nameNoStereotype.equals(m.getName().getLongName()) || false == m instanceof ModelWithAttributes) {\n continue;\n }\n // we keep CP (both origin and actual) as model properties to facilitate scenario when CP models are not persisted.\n // Otherwise, we could have use values written into CheckpointVault's registry file. As long as there's no registry for workspace models,\n // we have to use this dubious mechanism (not necessarily bad, just a bit confusing as we duplicate actual CP value as model attribute and\n // in the CheckpointVault's registry).\n CheckpointIdentity modelCheckpoint = readIdentityAttributes((ModelWithAttributes) m, GENERATION_PLAN, CHECKPOINT);\n if (modelCheckpoint == null) {\n continue;\n }\n CheckpointIdentity prevCheckpoint = readIdentityAttributes((ModelWithAttributes) m, PREV_GENERATION_PLAN, PREV_CHECKPOINT);\n cpModels.add(new CheckpointState(m, prevCheckpoint, modelCheckpoint));\n }\n return cpModels.isEmpty() ? null : new ModelCheckpoints(cpModels);\n });\n }", "@Override\n public ModelDAO getModelDAO() {\n return null;\n }", "public void openModel() {\r\n \t\tisReleased = true;\r\n \t\tif (checkForSave(\"<html>Save changes before opening a saved model?</html>\")) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\tif(animationHolder != null ) {\r\n \t\t\tanimationHolder.stop();\r\n \t\t}\r\n \t\tJMODELModel tmpmodel = new JMODELModel();\r\n \t\tint state = modelLoader.loadModel(tmpmodel, mainWindow);\r\n \t\tif (state == ModelLoader.SUCCESS || state == ModelLoader.WARNING) {\r\n \t\t\tresetMouseState();\r\n \t\t\t// Avoid checkForSave again...\r\n \t\t\tif (model != null) {\r\n \t\t\t\tmodel.resetSaveState();\r\n \t\t\t}\r\n \t\t\tnewModel();\r\n \t\t\t// At this point loading was successful, so substitutes old model\r\n \t\t\t// with loaded one\r\n \t\t\tmodel = tmpmodel;\r\n \t\t\tthis.populateGraph();\r\n \t\t\tsetSelect.setEnabled(true);\r\n \t\t\tcomponentBar.clickButton(setSelect);\r\n \t\t\topenedArchive = modelLoader.getSelectedFile();\r\n \t\t\tmainWindow.updateTitle(openedArchive.getName());\r\n \t\t\t// Removes selection\r\n \t\t\tgraph.clearSelection();\r\n \t\t\t// If model contains results, enable Results Window\r\n \t\t\tif (model.containsSimulationResults()) {\r\n \t\t\t\tif (model.isParametricAnalysisEnabled()) {\r\n \t\t\t\t\tthis.setResultsWindow(new PAResultsWindow(model.getParametricAnalysisModel(), (PAResultsModel) model.getSimulationResults()));\r\n \t\t\t\t\tshowResults.setEnabled(true);\r\n \t\t\t\t} else {\r\n \t\t\t\t\tthis.setResultsWindow(new ResultsWindow(model.getSimulationResults()));\r\n \t\t\t\t\tshowResults.setEnabled(true);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tmodel.resetSaveState();\r\n \t\t\tSystem.gc();\r\n \t\t} else if (state == ModelLoader.FAILURE) {\r\n \t\t\tshowErrorMessage(modelLoader.getFailureMotivation());\r\n \t\t}\r\n \t\t// Shows warnings if any\r\n \t\tif (state == ModelLoader.WARNING) {\r\n \t\t\tnew WarningWindow(modelLoader.getLastWarnings(), mainWindow, modelLoader.getInputFileFormat(), CommonConstants.JSIM).show();\r\n \t\t}\r\n \r\n \t}", "protected Object[] getModelObjects(IResource[] resources) {\n \t\tObject[] result = new Object[resources.length];\n \t\tfor (int i = 0; i < resources.length; i++) {\n \t\t\tresult[i] = getModelObject(resources[i]);\n \t\t}\n \t\treturn result;\n \t}", "@Override\n public void close() throws IOException {\n\n }", "public long getModelCount() throws StorageIOException {\n try {\n return this.databaseHelper.getDao(ModelDB.class).countOf();\n } catch (SQLException e) {\n throw new StorageIOException(\"Failed to get models' count\", e);\n }\n }", "public void loadFirstData() throws Exception {\n\t}", "private void serializeBeforeOpen() {\r\n sr.save(this.path);\r\n }", "public ModelObject read(ModelObject obj);", "protected void addFinishedData() throws ModelException {\n int i;\n \n //Harvest data\n ArrayList<Behavior> p_oBehs = m_oDisturbanceBehaviors.getBehaviorByParameterFileTag(\"Harvest\");\n if (mp_oHarvestData.size() == 0) {\n if (p_oBehs.size() > 0) {\n m_oDisturbanceBehaviors.removeBehavior(p_oBehs.get(0));\n }\n } else {\n Harvest oHarvest;\n if (p_oBehs.size() > 0) {\n oHarvest = (Harvest) p_oBehs.get(0);\n oHarvest.clearHarvestEvents();\n } else {\n oHarvest = (Harvest) m_oDisturbanceBehaviors.createBehaviorFromParameterFileTag(\"Harvest\");\n }\n for (i = 0; i < mp_oHarvestData.size(); i++) {\n oHarvest.addHarvestEvent(mp_oHarvestData.get(i));\n }\n }\n \n //Mortality episode data\n p_oBehs = m_oDisturbanceBehaviors.getBehaviorByParameterFileTag(\"EpisodicMortality\");\n if (mp_oMortEpisodeData.size() == 0) {\n if (p_oBehs.size() > 0) {\n m_oDisturbanceBehaviors.removeBehavior(p_oBehs.get(0));\n }\n } else {\n EpisodicMortality oEp;\n if (p_oBehs.size() > 0) {\n oEp = (EpisodicMortality) p_oBehs.get(0);\n oEp.clearMortalityEpisodes();\n } else {\n oEp = (EpisodicMortality) m_oDisturbanceBehaviors.createBehaviorFromParameterFileTag(\"EpisodicMortality\");\n }\n for (i = 0; i < mp_oMortEpisodeData.size(); i++) {\n oEp.addMortalityEpisode(mp_oMortEpisodeData.get(i));\n }\n }\n\n //Planting data\n p_oBehs = m_oPlantBehaviors.getBehaviorByParameterFileTag(\"Plant\");\n if (mp_oPlantingData.size() == 0) {\n if (p_oBehs.size() > 0) {\n m_oDisturbanceBehaviors.removeBehavior(p_oBehs.get(0));\n }\n } else {\n Planting oPlant;\n if (p_oBehs.size() > 0) {\n oPlant = (Planting) p_oBehs.get(0);\n oPlant.clearPlantingEvents();\n } else {\n oPlant = (Planting) m_oPlantBehaviors.createBehaviorFromParameterFileTag(\"Plant\");\n }\n for (i = 0; i < mp_oPlantingData.size(); i++) {\n oPlant.addPlantingEvent(mp_oPlantingData.get(i));\n }\n }\n }", "private void getObsequios(){\n mObsequios = estudioAdapter.getListaObsequiosSinEnviar();\n //ca.close();\n }", "public void loadModel(){\n remoteModel = new FirebaseCustomRemoteModel.Builder(dis).build();\n FirebaseModelManager.getInstance().getLatestModelFile(remoteModel)\n .addOnCompleteListener(new OnCompleteListener<File>() {\n @Override\n public void onComplete(@NonNull Task<File> task) {\n File modelFile = task.getResult();\n if (modelFile != null) {\n interpreter = new Interpreter(modelFile);\n // Toast.makeText(MainActivity2.this, \"Hosted Model loaded.. Running interpreter..\", Toast.LENGTH_SHORT).show();\n runningInterpreter();\n }\n else{\n try {\n InputStream inputStream = getAssets().open(dis+\".tflite\");\n byte[] model = new byte[inputStream.available()];\n inputStream.read(model);\n ByteBuffer buffer = ByteBuffer.allocateDirect(model.length)\n .order(ByteOrder.nativeOrder());\n buffer.put(model);\n //Toast.makeText(MainActivity2.this, dis+\"Bundled Model loaded.. Running interpreter..\", Toast.LENGTH_SHORT).show();\n interpreter = new Interpreter(buffer);\n runningInterpreter();\n } catch (IOException e) {\n // File not found?\n Toast.makeText(MainActivity2.this, \"No hosted or bundled model\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n });\n }", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "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 }", "@Override protected void finalize() {\r\n if (connection != null)\r\n throw new ORM8RuntimeException(\"DbConnection not closed for \" + connectionString);\r\n }", "public void advanceObjectsCollection() {\r\n\t\twhile (this.in.readToTag()) {\r\n\t\t\tfinal Type type = this.in.getTag().getType();\r\n\t\t\tif ((type == Type.BEGIN)\r\n\t\t\t\t\t&& this.in.getTag().getName().equals(\r\n\t\t\t\t\t\t\tPersistReader.TAG_OBJECTS)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfinal String str = \"Can't find objects collection, invalid file.\";\r\n\t\tif (this.logger.isErrorEnabled()) {\r\n\t\t\tthis.logger.error(str);\r\n\t\t}\r\n\t\tthrow new PersistError(str);\r\n\r\n\t}", "private void readBehaviors(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t readBehaviors(book, _dataModel.getBehaviors());\r\n\t}", "public void reInitializeModels () {\n this.model = new ModelManager(getTypicalAddressBook(), new UserPrefs());\n this.expectedModel = new ModelManager(model.getAddressBook(), new UserPrefs());\n }", "public void testClose() throws Exception {\n try {\n System.out.println(\"other methods should fail if initialize is not called\");\n\n JMSConnectionInfoFilePersister instance = new JMSConnectionInfoFilePersister();\n // initialize with some records\n instance.initialize(persisterProps); \n \n // force close on instance\n instance.close();\n \n instance.retrieve();\n } catch (ConnectionInfoPersistException ex) {\n assertTrue(true);\n }\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n }", "@Override\n public void close() {\n }", "@Override\n public void close() {\n }", "@Override\n public void close() {\n }", "public Model openDefaultModel() throws JenaProviderException {\n\t\treturn openModel(getDefaultGraphName());\n\t}", "@Override\r\n\tpublic List<LabelArticle> getModel(ResultSet rs) {\n\t\treturn null;\r\n\t}", "@Override\n void close() throws Exception;", "private static List<Exam> readWriteData() throws Exception \r\n\t{\n\t\t\r\n\t\tList<Exam> exams = examDao.queryForAll();\r\n\t\treturn exams;\r\n\t}", "private void releaseObjects() {\n if (fPermStorage != null) {\n Iterator<IJavaObject> iterator = fPermStorage.iterator();\n while (iterator.hasNext()) {\n IJavaObject object = iterator.next();\n try {\n object.enableCollection();\n } catch (CoreException e) {\n if ((e.getStatus().getException() instanceof VMDisconnectedException)) {\n break;\n }\n JDIDebugPlugin.log(e);\n }\n }\n fPermStorage = null;\n }\n }", "@Override\n public BufferedReader requestContentTxtFile(Context context) throws IOException{\n InputStream ins = context.getResources().openRawResource(R.raw.timferris);\n BufferedReader reader = new BufferedReader(new InputStreamReader(ins));\n Log.d(\"teste leitura\", \"Model return after reading has been reached\");\n\n return reader;\n }", "@Override\n \tpublic EMFModel loadResourceData(IProgress progress) throws ResourceLoadingCancelledException, ResourceDependencyLoopException,\n \t\t\tFileNotFoundException, FlexoException {\n \t\ttry {\n \t\t\tgetEMFResource().load(null);\n \t\t\tEMFModelConverter converter = new EMFModelConverter();\n \t\t\tEMFModel resourceData = converter.convertModel(getMetaModelResource().getMetaModelData(), getEMFResource());\n \t\t\tsetResourceData(resourceData);\n \t\t\treturn resourceData;\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t\treturn null;\n \t\t}\n \t}" ]
[ "0.6154889", "0.5647678", "0.56370723", "0.55342597", "0.5519318", "0.5393877", "0.53445196", "0.53428644", "0.53391993", "0.5324932", "0.52686757", "0.5267075", "0.524673", "0.52108806", "0.52094454", "0.5192155", "0.5192155", "0.51866436", "0.5167482", "0.5161062", "0.51159465", "0.5111899", "0.5096393", "0.50889236", "0.50842625", "0.5080145", "0.5069973", "0.5049007", "0.5037501", "0.50341755", "0.5018729", "0.5016717", "0.50097436", "0.4995035", "0.49945727", "0.4987476", "0.49836478", "0.49775186", "0.49632728", "0.4955056", "0.49537945", "0.49522784", "0.4942605", "0.49358478", "0.49331367", "0.49304876", "0.49137253", "0.49128386", "0.4889934", "0.48795235", "0.4877525", "0.4871477", "0.48550186", "0.48518538", "0.48473495", "0.48456323", "0.48444083", "0.48426843", "0.48361075", "0.4833183", "0.48322648", "0.48207015", "0.4817766", "0.48162925", "0.4812179", "0.48052403", "0.47997785", "0.47948506", "0.47917345", "0.4790279", "0.4787936", "0.47778317", "0.47730884", "0.4771955", "0.47713882", "0.47689122", "0.47686365", "0.47660467", "0.47650483", "0.47631434", "0.47589067", "0.47557402", "0.47555053", "0.47471228", "0.47468537", "0.47453263", "0.47375008", "0.47364002", "0.47348303", "0.47348303", "0.4734289", "0.473068", "0.473068", "0.47292846", "0.47291735", "0.4729171", "0.47253484", "0.47251743", "0.47139123", "0.47122133" ]
0.56404805
2
Bug report by sinclair bain (slbain) SF bugID 912202 NPE in createOntResource() when 2nd param is null
public void test_sb_01() { OntModel model= ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_RDFS_INF, null); Resource result= null; Resource nullValueForResourceType= null; result= model.createOntResource( OntResource.class, nullValueForResourceType, "http://www.somewhere.com/models#SomeResourceName" ); assertNotNull( result ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract T getBlankResource();", "Network_Resource createNetwork_Resource();", "Resource createResource();", "ObjectResource createObjectResource();", "Service_Resource createService_Resource();", "public void testNullResource()\n\t\tthrows Exception\n\t\t{\n\t\ttry {\n\t\t\tFileStoreIvornFactory.createIdent(\n\t\t\t\t\"anything\",\n\t\t\t\tnull\n\t\t\t\t) ;\n\t\t\t}\n\t\tcatch (FileStoreIdentifierException ouch)\n\t\t\t{\n\t\t\treturn ;\n\t\t\t}\n\t\tfail(\"Expected FileStoreIdentifierException\") ;\n\t\t}", "public S_RESOURCEObj() {\r\n }", "public void testGetObjectSpecificationWithNotFoundNullIdentifier() throws Exception {\r\n root.addChild(createObject(\"key:identifier\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n try {\r\n specificationFactory.getObjectSpecification(\"key\", null);\r\n fail(\"UnknownReferenceException is expected.\");\r\n } catch (UnknownReferenceException e) {\r\n // ok\r\n }\r\n }", "Device_Resource createDevice_Resource();", "InformationResource createInformationResource();", "public DefaultCoupledResource() {\n }", "On_Device_Resource createOn_Device_Resource();", "@Test(expectedExceptions = IllegalArgumentException.class)\n void createNullTest() {\n reservationService.create(null);\n }", "protected abstract T createResource(Coordinate coord) throws VizException;", "public GenericResource()\r\n {\r\n }", "public GenericResource() {\r\n }", "public GenericResource()\n {\n }", "@Test(expected = IllegalArgumentException.class)\n public void testAllowedRegistrationsWithNullReference() throws Exception {\n new DefaultPersonBizPolicyConsultant().setAllowedRegistrationStatusOnCreate(null);\n }", "public void testConstructorWithNotFoundReference() throws Exception {\r\n try {\r\n ConfigurationObject object1 = createObject(\"object:ob1\", TYPE_OBJECT);\r\n ConfigurationObject params1 = new DefaultConfigurationObject(\"params\");\r\n params1.addChild(createParamReference(1, \"object:ob2\"));\r\n object1.addChild(params1);\r\n\r\n root.addChild(object1);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }", "public GenericResource() {\n }", "@Override\n\tpublic void create(Owner owner) {\n\n\t}", "public NotificationResource() {\r\n }", "public DmcNamedObjectNontransportableREF(){\r\n\t\tobject = null;\r\n\t}", "public abstract T getCreatedResource();", "public abstract String createNewObject(OwResource resource_p, String strObjectClassName_p, OwPropertyCollection properties_p, OwPermissionCollection permissions_p, OwContentCollection content_p, OwObject parent_p, String strMimeType_p,\r\n String strMimeParameter_p) throws Exception;", "public CarroResource() {\r\n }", "@Override\n \tpublic Representation postResource(Representation representation)\n \t\t\tthrows Exception {\n \t\treturn null;\n \t}", "public void createOntProperty(String sourceInstance, String propertyName, String destInstance)\r\n\t{\r\n\t\tOntResource si = this.obtainOntResource(sourceInstance);\r\n\t\tOntResource di = this.obtainOntResource(destInstance);\r\n\t\tProperty prop = this.obtainOntProperty(propertyName); \r\n\t\tsi.addProperty(prop, di);\r\n\t}", "private Resource() {}", "@Test(expected = NullPointerException.class)\r\n\tpublic void createWithNullAnchor() {\r\n\t\tnew WeldJoint<Body>(b1, b2, null);\r\n\t}", "@Override\n\tprotected Object handleGetObject(String arg0) {\n\t\treturn null;\n\t}", "ResourceAPI createResourceAPI();", "public BoletajeResource() {\n }", "public TarefaResource() {\r\n }", "public WifisResource() {\r\n\r\n }", "public MyResource() {\n System.out.println(\"creating Resource\");\n }", "interface Blank extends WithParentResource {\n }", "interface Blank extends WithParentResource {\n }", "interface Blank extends WithParentResource {\n }", "@Test\n public void test130() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.address();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public Object makeResource();", "protected abstract T createRessource();", "@Test\n public void setResolutionConfigSlot_faultCreation_nullValue() throws Exception {\n iService.setResolutionConfigSlot( getUnsavedFault(), null, HumanResourceKey.ADMIN );\n }", "public synchronized Resource createUniqueResource() throws ModelException {\n\n ensureCanCreateUnique();\n\n int id = getUnusedNodeID();\n BlankResourceImpl r = new BlankResourceImpl(this, id);\n return r;\n }", "public WorkflowResource() {\r\n\t}", "private ObjectNode ProcessResource(Resource res){\n if (res.isURIResource()){\n return ProcessUri(res);\n }\n else if (res.isAnon()){\n //handle blank node\n String anonId = res.getId().toString();\n\n ObjectNode json_object = mapper.createObjectNode();\n json_object.put(ArangoAttributes.TYPE, RdfObjectTypes.BLANK_NODE);\n json_object.put(ArangoAttributes.VALUE, anonId);\n\n return json_object;\n }\n return null;\n }", "public BookResource() {\n }", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "public void testCtorWithNullTransferable() throws Exception {\n try {\n new PasteAssociationAction(null, namespace);\n fail(\"IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "@Test(dependsOnMethods = {\"modifyResource\"})\n public void modifyNotExistingResource() throws Exception {\n showTitle(\"modifyNotExistingResource\");\n\n try {\n UmaResource resource = new UmaResource();\n resource.setName(\"Photo Album 3\");\n resource.setIconUri(\"http://www.example.com/icons/flower.png\");\n resource.setScopes(Arrays.asList(\"http://photoz.example.com/dev/scopes/view\", \"http://photoz.example.com/dev/scopes/all\"));\n\n getResourceService().updateResource(\"Bearer \" + pat.getAccessToken(), \"fake_resource_id\", resource);\n } catch (ClientErrorException ex) {\n System.err.println(ex.getResponse().readEntity(String.class));\n int status = ex.getResponse().getStatus();\n assertTrue(status != Response.Status.OK.getStatusCode(), \"Unexpected response status\");\n }\n }", "protected OntResource obtainOntResource(String ontRes)\r\n\t{\r\n\t\tOntResource ontR;\r\n\t\ttry {\r\n\t\t\tontR = ONT_MODEL.getOntResource(ontRes);\r\n\t\t\tif(ontR != null)\r\n\t\t\t\treturn ontR;\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString qname = ONT_MODEL.expandPrefix(ontRes);\r\n\t\t\tontR = ONT_MODEL.getOntResource(qname);\r\n\t\t\tif(ontR != null)\r\n\t\t\t\treturn ontR;\r\n\t\t} catch (Exception e) {\r\n\t\t}\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\treturn ontR = ONT_MODEL.getOntResource(BASE_NS + ontRes);\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\t\t\r\n\t\torg.apache.commons.logging.LogFactory.getLog(this.getClass()).error(\"Ontology Resource not found: \"+ ontRes);\r\n\t\treturn null;\r\n\t}", "public BuildingResource() {\n }", "protected abstract T createTestResource();", "@Override\n public String visit(ObjectCreationExpr n, Object arg) {\n return null;\n }", "ServiceDataResource createServiceDataResource();", "@Override\r\n\tpublic EktParam openClientR(EktParam ektParam) {\n\t\treturn null;\r\n\t}", "Ressource createRessource();", "public Resource() {\n }", "public Resource() {\n }", "org.landxml.schema.landXML11.NoPassingZoneDocument.NoPassingZone addNewNoPassingZone();", "O() { super(null); }", "@Override\n protected boolean isZoneLevelResource() {\n return false;\n }", "public CharityResource() {\n }", "public void testCtorWithNullNamespace() throws Exception {\n try {\n new PasteAssociationAction(transferable, null);\n fail(\"IllegalArgumentException is expected.\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "private void createResource(IResource resource) throws CoreException {\n \t\tif (resource.exists()) {\n \t\t\treturn;\n \t\t}\n \n \t\tcreateResource(resource.getParent());\n \n \t\tint type = resource.getType();\n \n \t\tif (type == IResource.FOLDER) {\n \t\t\t((IFolder) resource).create(true, true, null);\n \t\t} else if (type == IResource.FILE) {\n \t\t\t((IFile) resource).create(null, true, null);\n \t\t} else {\n \t\t\tthrow new ResourceException(IResourceStatus.RESOURCE_WRONG_TYPE, null, \"Wrong resource type\", null);\n \t\t}\n \t}", "@Test(expected = IllegalArgumentException.class)\n public void testConstructorTypologyNull() {\n PlannedActivity plannedActivity = new PlannedActivity(0,\n new Site(\"factory\", \"area\"), null, \"descriton\", 0, true, 1,\n new Procedure(\"name\", \"smp\"), \"workspaceNotes\");\n\n }", "public void testGetObjectSpecificationWithNullKey() throws Exception {\r\n root.addChild(createObject(\"key:identifier\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n try {\r\n specificationFactory.getObjectSpecification(null, \"identifier\");\r\n fail(\"IllegalArgumentException is expected.\");\r\n } catch (IllegalArgumentException e) {\r\n // ok\r\n }\r\n }", "public AddResource() {\n }", "@Override\n\tpublic Resource insert(Resource resource) {\n\t\treturn null;\n\t}", "public synchronized Resource createResource(QName str) throws ModelException {\n\n // check whether we have it in the registry\n Resource r = (Resource)rmap.get(str);\n // System.err.println(\"Creating resource: \" + str + \", in rmap=\" + r);\n\n if(r == null) {\n r = new ResourceImpl(/*getUnusedNodeID(),*/ str);\n rmap.put(str, r);\n }\n return r;\n }", "@Test(timeout = 4000)\n public void test323() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try { \n xmlEntityRef0.base((CharSequence) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void createResident(Resident resident);", "@Test\n public void test101() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.cite((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public SourceInterestMapResource() {\n }", "@Override\n protected JBossControllerAddress createBlankInstance() {\n\n return new JBossControllerAddress(null, null, null, null);\n }", "Resource create(Session session, IRI identifier, IRI type);", "public void testDuplicateOfficeActionCreation(Map<String, String> offActnParam) {\n\n ClientResponse response = createDocument(offActnParam);\n assertEquals(409, response.getStatus());\n }", "@Path(\"resource/create\")\n @POST\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n// public Response createText(@FormParam(\"\") TextDTO text) {\n public Response createResource(RSComponentDTO dto) {\n Response.ResponseBuilder rb = Response.created(context.getAbsolutePath());\n\n try {\n\n Collection parentCollection = ResourceSystemComponent.load(Collection.class, dto.uriParent);\n RSCType type = DTOValueRSC.instantiate(RSCType.class).withValue(ResourceSystemAnnotationType.RESOURCE);\n RSCParent parent = DTOValueRSC.instantiate(RSCParent.class).withValue(parentCollection);\n\n ResourceSystemComponent resource = ResourceSystemComponent.of(Resource.class, dto.uri)\n .withParams(dto.name, dto.description, type, parent);\n\n resource.setResourceContent(load(dto.catalogItemUri));\n parentCollection.add(resource);\n parentCollection.save();\n\n } catch (InstantiationException ie) {\n log.error(ie.getLocalizedMessage());\n rb.entity(new ServiceResult(\"1\", \"Error, \" + ExceptionUtils.getRootCauseMessage(ie)));\n return rb.build();\n } catch (IllegalAccessException iae) {\n log.error(iae.getLocalizedMessage());\n rb.entity(new ServiceResult(\"2\", \"Error, \" + ExceptionUtils.getRootCauseMessage(iae)));\n return rb.build();\n } catch (VirtualResourceSystemException vrse) {\n log.error(vrse.getLocalizedMessage());\n rb.entity(new ServiceResult(\"3\", \"Error, \" + ExceptionUtils.getRootCauseMessage(vrse)));\n return rb.build();\n } catch (ManagerAction.ActionException ex) {\n log.error(ex.getLocalizedMessage());\n rb.entity(new ServiceResult(\"4\", \"Error, \" + ExceptionUtils.getRootCauseMessage(ex)));\n return rb.build();\n } catch (Annotation.Data.InvocationMethodException ime) {\n log.error(ime.getLocalizedMessage());\n rb.entity(new ServiceResult(\"5\", \"Error, \" + ExceptionUtils.getRootCauseMessage(ime)));\n return rb.build();\n }\n\n log.info(\"resource created\");\n\n return rb.entity(new ServiceResult()).build();\n }", "public MyPathResource() {\r\n }", "public String create(KmsPortlet arg0) {\n\t\treturn null;\n\t}", "public ProductResource() {\n }", "public OriDestEOImpl() {\n }", "E create(Resource data);", "public void createObject() throws NullPointerException{\n Object object1 = new Object();\r\n Object object2 = new Object();\r\n object2=null;\r\n if(object2!=null){\r\n object2.equals(object1);\r\n }\r\n else{\r\n //throw new NullPointerException(\"Exception handled by throws statement\");//throws an exception, is always followed by an object new.\r\n }\r\n }", "private static native JsJsonNull createProd() /*-{\n return null;\n }-*/;", "protected abstract S createDefault();", "@Test(expected = HTIllegalAccessException.class)\n public void testStartTaskReservedByNotActualOwner() throws HTException {\n\n Task t = createTask_OnePotentialOwner();\n //org.junit.Assert.assertEquals(\"user1\", t.getActualOwner().getName());\n org.junit.Assume.assumeTrue(\"user1\".equals(t.getActualOwner().getName()));\n //org.junit.Assert.assertEquals(Status.RESERVED, t.getStatus());\n org.junit.Assume.assumeTrue(Status.RESERVED.equals(t.getStatus()));\n \n this.services.startTask(t.getId(), \"user2\");\n }", "@Test(expected = NullPointerException.class)\n\tpublic void criaContatoSobrenomeNulo() {\n\t\tcontato = new Contato(\"Jardely\", null, \"984653722\");\n\t}", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testGetReservationWithNullID() throws Exception {\n\t\tbookingManagement.getReservation(null);\n\t}", "public DefaultCoupledResource(final ScopedName name,\n final Citation reference,\n final DataIdentification resource,\n final OperationMetadata operation)\n {\n this.scopedName = name;\n this.resourceReferences = singleton(reference, Citation.class);\n this.resources = singleton(resource, DataIdentification.class);\n this.operation = operation;\n }", "public ConsommersResource() {\r\n }", "NULL createNULL();", "@Test(expected = IllegalArgumentException.class)\n public void testConstructorWorkspaceNull() {\n PlannedActivity plannedActivity = new PlannedActivity(0,\n new Site(\"factory\", \"area\"), new Typology(\"typology\"),\n \"desctiption\", 0, true, 1, new Procedure(\"name\", \"smp\"), null);\n\n }", "public ModelResource() {\n }", "@Override\n public boolean create(Revue objet) {\n return false;\n }", "@Test(expected = IllegalArgumentException.class)\n public void testConstructorNullTerritory() {\n RiskPlayer player = new RiskPlayer(UUID.randomUUID());\n RiskBoard board = new RiskBoard();\n player.conqueredTerritory(TerritoryEnum.GREENLAND);\n board.getTerritory(TerritoryEnum.GREENLAND).changePlayer(player, 2);\n new ValidDieDefendAction(player, board, null);\n }", "public ContatosResource() {\n }", "public void testCtor1_NullNewWayPoint() {\n try {\n new WayPointEvent(edge, null, offset);\n fail(\"IllegalArgumentException expected.\");\n } catch (IllegalArgumentException iae) {\n //good\n }\n }", "@Override\n\tpublic boolean create(Etape obj) {\n\t\treturn false;\n\t}", "@Test(expected=HTIllegalAccessException.class)\n public void testStartTaskNotOwner() throws HTException {\n\n Task t = createTask_OnePotentialOwner();\n this.services.startTask(t.getId(), \"user2\");\n }" ]
[ "0.6081469", "0.5915434", "0.5898497", "0.588536", "0.57518387", "0.56730133", "0.563996", "0.55960554", "0.55825317", "0.5563678", "0.5550209", "0.55175734", "0.54916114", "0.5473853", "0.54393524", "0.5378486", "0.5357276", "0.53570974", "0.5336975", "0.53167397", "0.5302263", "0.52765834", "0.5263031", "0.52567136", "0.52454495", "0.52417666", "0.5225505", "0.52078456", "0.52054334", "0.5195323", "0.5194329", "0.5190712", "0.51858366", "0.5172204", "0.5171394", "0.51684564", "0.51581764", "0.51581764", "0.51581764", "0.51576287", "0.5141842", "0.5140038", "0.51299715", "0.5122628", "0.51188594", "0.5115082", "0.50995314", "0.50977385", "0.50923806", "0.50823694", "0.5073585", "0.5063514", "0.5054676", "0.5046522", "0.5027195", "0.50165373", "0.5008096", "0.500681", "0.500681", "0.5000739", "0.49963135", "0.4991168", "0.49879327", "0.49748203", "0.4974486", "0.49706554", "0.49695814", "0.49693972", "0.49660593", "0.49659666", "0.4965718", "0.49623612", "0.4951589", "0.49478954", "0.49468833", "0.4944877", "0.49426657", "0.49400264", "0.49337035", "0.4933437", "0.4927369", "0.4925383", "0.49202934", "0.4917484", "0.49082556", "0.49032095", "0.4902024", "0.49010888", "0.48997903", "0.48991507", "0.48968706", "0.489385", "0.48891994", "0.48842177", "0.48807773", "0.48704314", "0.4866783", "0.4862148", "0.48620808", "0.48605615" ]
0.6260808
0
/ Bug report from Dave Reynolds: listDeclaredProperties not complete
public void test_der_02() { String SOURCE= "<?xml version='1.0'?>" + "<!DOCTYPE owl [" + " <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >" + " <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >" + " <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >" + " <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >" + " <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >" + " <!ENTITY base 'http://jena.hpl.hp.com/test' >" + " ]>" + "<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>" + " <owl:ObjectProperty rdf:ID='hasPublications'>" + " <rdfs:domain>" + " <owl:Class>" + " <owl:unionOf rdf:parseType='Collection'>" + " <owl:Class rdf:about='#Project'/>" + " <owl:Class rdf:about='#Task'/>" + " </owl:unionOf>" + " </owl:Class>" + " </rdfs:domain>" + " <rdfs:domain rdf:resource='#Dummy' />" + " <rdfs:range rdf:resource='#Publications'/>" + " </owl:ObjectProperty>" + " <owl:Class rdf:ID='Dummy'>" + " </owl:Class>" + "</rdf:RDF>"; String NS = "http://jena.hpl.hp.com/test#"; OntModel m = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null); m.read(new ByteArrayInputStream( SOURCE.getBytes()), NS ); OntClass dummy = m.getOntClass( NS + "Dummy" ); // assert commented out - bug not accepted -ijd //TestUtil.assertIteratorValues( this, dummy.listDeclaredProperties(), // new Object[] {m.getObjectProperty( NS+"hasPublications")} ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<? extends T> getDeclaredProperties();", "public abstract List<BeanPropertyDefinition> findProperties();", "ArrayList<PropertyMetadata> getProperties();", "public Set<String> getDeclaredProperties() {\n \t\tfinal Set<String> ret = new HashSet<String>();\n \t\tret.addAll(complexProperties.keySet());\n \t\tret.addAll(simpleProperties.keySet());\n \t\tret.addAll(listProperties.keySet());\n \t\tret.addAll(setProperties.keySet());\n \t\tret.addAll(mapProperties.keySet());\n \t\treturn ret;\n \t}", "public List<NamedThing> getProperties() {\n // TODO this should be changed to AnyProperty type but it as impact everywhere\n List<NamedThing> properties = new ArrayList<>();\n List<Field> propertyFields = getAnyPropertyFields();\n for (Field f : propertyFields) {\n try {\n if (NamedThing.class.isAssignableFrom(f.getType())) {\n f.setAccessible(true);\n Object fValue = f.get(this);\n if (fValue != null) {\n NamedThing se = (NamedThing) fValue;\n properties.add(se);\n } // else not initalized but this is already handled in the initProperties that must be called\n // before the getProperties\n }\n } catch (IllegalAccessException e) {\n throw new TalendRuntimeException(CommonErrorCodes.UNEXPECTED_EXCEPTION, e);\n }\n }\n return properties;\n }", "protected List getProperties() {\n return null;\n }", "public abstract List<PropertyType> getBuiltInProperties();", "java.util.List<org.apache.calcite.avatica.proto.Responses.DatabasePropertyElement> \n getPropsList();", "public Collection<ModuleProperty> getProperties();", "@Override\n\t@SuppressWarnings(\"unchecked\")\n\t@Transactional(propagation = Propagation.SUPPORTS)\n\tpublic List<Property> findPropertyNames() \n\t{\n\t\tList<Property> details = entityManager.createNamedQuery(\"Property.readPropertyNames\").getResultList();\n\t\tlogger.info(\"Property Details are:\" + details);\n\t\treturn details;\n\t}", "public Iterator<String> getUserDefinedProperties();", "public List<IPropertyDescriptor<T>> getProperties();", "@Override\n\tpublic Set<OWLEntity> getAllProperties() {\n\t\tSet<OWLEntity> result = new HashSet<OWLEntity>();\n\t\tresult.addAll(ontology.getObjectPropertiesInSignature());\n\t\treturn result;\n\t}", "public Result testGetPropertyDescriptors() {\n beanInfo.getPropertyDescriptors();\n PropertyDescriptor[] propertyDescriptors = beanInfo\n .getPropertyDescriptors();\n assertTrue(findProperty(\"property8\", propertyDescriptors));\n assertTrue(findProperty(\"class\", propertyDescriptors));\n assertEquals(propertyDescriptors.length, 2);\n return passed();\n }", "List<? extends T> getProperties();", "java.util.Enumeration getPropertyNames();", "public void _getProperties() {\n Property[] properties = oObj.getProperties();\n IsThere = properties[0];\n tRes.tested(\"getProperties()\", ( properties != null ));\n return;\n }", "Property[] getProperties();", "public HasDisplayableProperties getProperties();", "@Override\n\t\tpublic Map<String, Object> getAllProperties() {\n\t\t\treturn null;\n\t\t}", "@Override\n public PropertyDescriptor[] getPropertyDescriptors() {\n return getPdescriptor();\n }", "public final List<String> getPropertiesList()\n {\n\n List<String> allProps = new ArrayList<String>();\n Enumeration<?> e = this.fProp.propertyNames();\n\n while (e.hasMoreElements())\n {\n String key = (String) e.nextElement();\n String value = this.fProp.getProperty(key);\n allProps.add(key + \"=\" + value);\n } // end while\n\n Collections.sort(allProps);\n return allProps;\n\n }", "@Override\n\tpublic List<Property> findAll() {\n\t\treturn pr.findAll();\n\t}", "private static HashMap<String, DefinedProperty> initDefinedProperties() {\n\t\tHashMap<String, DefinedProperty> newList = new HashMap<String, DefinedProperty>();\n\t\t// common properties\n\t\taddProperty(newList, \"name\", DefinedPropertyType.STRING, \"\", DefinedProperty.ANY, false, false);\n\t\taddProperty(newList, \"desc\", DefinedPropertyType.STRING, \"\", DefinedProperty.ANY, false, false);\n\t\t// implicit default properties\n\t\taddProperty(newList, \"donttest\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.ANY, false, false);\n\t\taddProperty(newList, \"dontcompare\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.ANY, false, false);\n\t\t// interface properties\n\t\taddProperty(newList, \"use_interface\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG |DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"use_new_interface\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REGSET | DefinedProperty.REG |DefinedProperty.FIELD, false, false);\n\t\t// reg + regset properties\n\t\taddProperty(newList, \"js_superset_check\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"external\", DefinedPropertyType.SPECIAL, null, DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"repcount\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t// regset only properties\n\t\taddProperty(newList, \"js_macro_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_macro_mode\", DefinedPropertyType.STRING, \"STANDARD\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_namespace\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_typedef_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_instance_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_instance_repeat\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.REGSET, false, false);\n\t\t// reg only properties\n\t\taddProperty(newList, \"category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"js_attributes\", DefinedPropertyType.STRING, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"aliasedId\", DefinedPropertyType.STRING, \"false\", DefinedProperty.REG, true, false); // hidden\n\t\taddProperty(newList, \"regwidth\", DefinedPropertyType.NUMBER, \"32\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"uvmreg_is_mem\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"cppmod_prune\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"uvmreg_prune\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\t// signal properties\n\t\taddProperty(newList, \"cpuif_reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"field_reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"activehigh\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"activelow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"signalwidth\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.SIGNAL, false, false);\n\t\t// fieldset only properties\n\t\taddProperty(newList, \"fieldstructwidth\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.FIELDSET, false, false);\n\t\t// field properties\n\t\taddProperty(newList, \"rset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"rclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"woclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"woset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"we\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"wel\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swwe\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swwel\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hwset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hwclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swmod\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swacc\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sticky\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"stickybit\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"intr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"anded\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"ored\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"xored\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"counter\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"overflow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"fieldwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"singlepulse\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"underflow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrvalue\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrvalue\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"saturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrsaturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrsaturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"threshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrthreshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrthreshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sw\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hw\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"precedence\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"encode\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"resetsignal\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"mask\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"enable\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"haltmask\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"haltenable\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"halt\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"next\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"nextposedge\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"nextnegedge\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"maskintrbits\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false); \n\t\taddProperty(newList, \"satoutput\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sub_category\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"rtl_coverage\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\t\n\t\t// override allowed property set if input type is jspec\n\t\tif (Ordt.hasInputType(Ordt.InputType.JSPEC)) {\n\t\t\tputProperty(newList, \"sub_category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG | DefinedProperty.FIELDSET | DefinedProperty.FIELD, false, false);\n\t\t\tputProperty(newList, \"category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"js_attributes\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"regwidth\", DefinedPropertyType.NUMBER, \"32\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"address\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"arrayidx1\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t\tputProperty(newList, \"addrinc\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t}\t\t\n\n\t\treturn newList;\n\t}", "public static void prtProperties() {\n prop.list(System.out);\n }", "EProperties getProperties();", "java.util.List<? extends org.apache.calcite.avatica.proto.Responses.DatabasePropertyElementOrBuilder> \n getPropsOrBuilderList();", "public List<PropertySchema> getProperties() {\n return _properties;\n }", "public Iterator<String> listProperties(String ontClass)\r\n\t{\r\n\t\tOntClass ontR = obtainOntClass(ontClass);\r\n\t\treturn new ToStringIterator<String>(ontR.listDeclaredProperties());\r\n\t}", "public static void viewListAllProperties() {\n\t\tArrayList<Property> prop_list = getRegControl().listOfAllProperties();\r\n\t\t// if the prop_list is empty, print out the warning message and stop the method\r\n\t\tif (prop_list.size() == 0) {\r\n\t\t\tSystem.out.println(\"Property Registry empty; no properties to display\\n\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// loop through all found properties and print out their toString()\r\n\t\tfor (Property property : prop_list) {\r\n\t\t\tSystem.out.println(property.toString());\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic Iterable<String> getPropertyKeys() {\n\t\t\treturn null;\n\t\t}", "public ObjectProperties getObjectProperties();", "public List <String> getPropertyNames()\n{\n // Get list from PropertyNamesMap - load if not found\n List <String> list = _propertyNamesMap.get(getClass());\n if(list==null) {\n _propertyNamesMap.put(getClass(), list = new ArrayList()); addPropNames(); }\n return list;\n}", "public Dictionary<String, Object> getProperties();", "public List<TLProperty> getElements();", "public Properties getProperties() { return props; }", "Properties getProperties();", "@Nullable\n @Generated\n @Selector(\"propertyList\")\n @MappedReturn(ObjCObjectMapper.class)\n public native Object propertyList();", "private void findFields() {\n for(Class<?> clazz=getObject().getClass();clazz != null; clazz=clazz.getSuperclass()) {\r\n\r\n Field[] fields=clazz.getDeclaredFields();\r\n for(Field field:fields) {\r\n ManagedAttribute attr=field.getAnnotation(ManagedAttribute.class);\r\n Property prop=field.getAnnotation(Property.class);\r\n boolean expose_prop=prop != null && prop.exposeAsManagedAttribute();\r\n boolean expose=attr != null || expose_prop;\r\n\r\n if(expose) {\r\n String fieldName = Util.attributeNameToMethodName(field.getName());\r\n String descr=attr != null? attr.description() : prop.description();\r\n boolean writable=attr != null? attr.writable() : prop.writable();\r\n\r\n MBeanAttributeInfo info=new MBeanAttributeInfo(fieldName,\r\n field.getType().getCanonicalName(),\r\n descr,\r\n true,\r\n !Modifier.isFinal(field.getModifiers()) && writable,\r\n false);\r\n\r\n atts.put(fieldName, new FieldAttributeEntry(info, field));\r\n }\r\n }\r\n }\r\n }", "int getPropertiesCount();", "public Iterator<String> getProperties() {\n List<String> list = Collections.emptyList();\n return list.iterator();\n }", "public ArrayList<String> getPropNames()\n {\n return this.prop_names;\n }", "public static Set<OntProperty> listRestrictedProperties(OntClass clazz)\n\t{\n\t\tRestrictedPropertyCollector collector = new RestrictedPropertyCollector();\n\t\tnew VisitingDecomposer(collector).decompose(clazz);\n\t\treturn collector.getProperties();\n\t}", "public PropertyDescriptor[] getPropertyDescriptors() {\n return getPdescriptor();\n }", "PropertyDesc[] getPropertyDesc()\r\n\t{\r\n\t\tPropertyDesc[] p = new PropertyDesc[properties.size()];\r\n\t\tint i = 0;\r\n\t\tfor (Variable v : properties)\r\n\t\t{\r\n\t\t\tp[i++] = new PropertyDesc(v.name, v.varType, v.classID);\r\n\t\t}\r\n\t\treturn p;\r\n\t}", "public List<PropertyMap<?>> getProperties(String owner);", "@SuppressWarnings(\"unchecked\")\n\tpublic Hashtable getProperties() {\n\t\treturn _props;\n\t}", "public java.util.List<org.apache.calcite.avatica.proto.Responses.DatabasePropertyElement> getPropsList() {\n return props_;\n }", "public Hashtable getProperties() {\n PropertyHelper ph = PropertyHelper.getPropertyHelper(this);\n return ph.getProperties();\n }", "public Enumeration getPropertyNames() {\r\n return properties.keys();\r\n }", "public Map getProperties();", "public\tList<JsClass.Property>\tgetAddedProperties() {\n\t\t\n\t\treturn\tCollections.unmodifiableList(this.addedProperties);\n\t}", "public Map<String, String> getAllProperties()\n {\n return _propertyEntries;\n }", "List<Property<?>> getProperties(ProjectEntity entity);", "public Properties getProperties();", "public Properties getPropertyInfo(Properties list);", "public abstract AbstractProperties getProperties();", "public PropertyDescriptor[] getPropertyDescriptors () {\n return desc;\n }", "List<? extends T> getPropertiesLike(String name);", "public void getProperties() throws IllegalArgumentException, IllegalAccessException {\r\n\t\t Class<?> aClass = this.getClass();\r\n\t\t Field[] declaredFields = aClass.getDeclaredFields();\r\n\t\t Map<String, String> logEntries = new HashMap<>();\r\n\r\n\t\t for (Field field : declaredFields) {\r\n\t\t field.setAccessible(true);\r\n\r\n\t\t Object[] arguments = new Object[]{\r\n\t\t field.getName(),\r\n\t\t field.getType().getSimpleName(),\r\n\t\t String.valueOf(field.get(this))\r\n\t\t };\r\n\r\n\t\t String template = \"- Property: {0} (Type: {1}, Value: {2})\";\r\n\t\t String logMessage = System.getProperty(\"line.separator\")\r\n\t\t + MessageFormat.format(template, arguments);\r\n\r\n\t\t logEntries.put(field.getName(), logMessage);\r\n\t\t }\r\n\r\n\t\t SortedSet<String> sortedLog = new TreeSet<>(logEntries.keySet());\r\n\r\n\t\t StringBuilder sb = new StringBuilder(\"Class properties:\");\r\n\r\n\t\t Iterator<String> it = sortedLog.iterator();\r\n\t\t while (it.hasNext()) {\r\n\t\t String key = it.next();\r\n\t\t sb.append(logEntries.get(key));\r\n\t\t }\r\n\r\n\t\t System.out.println(sb.toString());\r\n\t\t}", "public Enumeration getPropertyNames()\n {\n final EnumerationUnion eu = new EnumerationUnion();\n if( properties != null )\n {\n eu.add( properties.keys() );\n }\n if( ancestors != null )\n {\n final int size = ancestors.size();\n for( int i = 0; i < size; i++ )\n {\n final ScriptingClass clazz = (ScriptingClass)\n ancestors.elementAt( i );\n eu.add( clazz.getPropertyNames() );\n }\n }\n try\n {\n final ScriptingClass object = getClassLoader().load( \"object\" );\n eu.add( object.getPropertyNames() );\n }\n catch( ScriptingClassNotFoundException e )\n {\n }\n return eu;\n }", "@Override\r\n public List<Map<String, PrimitiveTypeProvider>> getAll() {\r\n ListenableFuture<PropertiesMessage> future = this.adampro.getProperties(\r\n EntityPropertiesMessage.newBuilder().setEntity(fromBuilder.getEntity()).build());\r\n int count = 1_000;\r\n PropertiesMessage propertiesMessage;\r\n try {\r\n propertiesMessage = future.get();\r\n } catch (InterruptedException | ExecutionException e) {\r\n LOGGER.error(\"error in getAll: {}\", LogHelper.getStackTrace(e));\r\n return new ArrayList<>(0);\r\n }\r\n try {\r\n count = Integer.parseInt(propertiesMessage.getPropertiesMap().get(\"count\"));\r\n } catch (Exception e) {\r\n LOGGER.error(\"error in getAll: {}\", LogHelper.getStackTrace(e));\r\n }\r\n return preview(count);\r\n }", "PropertyInfo getPropertyInfo();", "public Set getPropertyNames(){\n return this.vendorSpecificProperties;\n }", "List<PropertyType<?>> getPropertyTypes();", "public Object getProperties() {\n return this.properties;\n }", "default Map<String, Object> getProperties()\r\n {\r\n return emptyMap();\r\n }", "public List<PmPropertyBean> getProperties(Map paramter);", "public java.util.List<org.apache.calcite.avatica.proto.Responses.DatabasePropertyElement> getPropsList() {\n if (propsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(props_);\n } else {\n return propsBuilder_.getMessageList();\n }\n }", "public static List<AccessibleObject> getPropertiesMeta(Class<?> meta, ReflectionAccess level) {\n\t\tList<AccessibleObject> properties = new ArrayList<>();\n\t\tBeanInfo beaninfo = null;\n\t\ttry {\n\t\t\tbeaninfo = Introspector.getBeanInfo(meta);\n\t\t} catch (IntrospectionException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfor (PropertyDescriptor pd : beaninfo.getPropertyDescriptors()) {\n\t\t\tMethod reader = pd.getReadMethod();\n\t\t\tif (reader != null && !new Object().getClass().equals(reader.getDeclaringClass())) {\n\t\t\t\tproperties.add(reader);\n\t\t\t}\n\t\t\tMethod writer = pd.getWriteMethod();\n\t\t\tif (writer != null && !new Object().getClass().equals(writer.getDeclaringClass())) {\n\t\t\t\tproperties.add( writer);\n\t\t\t}\n\t\t}\n\t\tfor (Field field : FieldUtil.getAllField(meta, level)) {\n\t\t\tproperties.add(field);\n\t\t}\n\t\treturn properties;\n\t}", "@Override\n\tpublic Map<String, Object> getProperties() {\n\t\treturn null;\n\t}", "@Override\n public String[] getPropertyNames() {\n final String[] names = new String[this.properties.size()];\n this.properties.keySet().toArray(names);\n return names;\n }", "List<Object> getListProperty(Object name) throws JMSException;", "public abstract Properties getProperties();", "@Override\r\n\tpublic Properties getProperties() {\n\t\treturn null;\r\n\t}", "public Iterable<String> getPropertyKeys();", "public Enumeration enumeratePropertyNames() {\n return this.attributes.keys();\n }", "public PropertyMetaData[] getPropertyMetaData() \n {\n return METADATA;\n }", "String [] getPropertyNames(Long id) throws RemoteException;", "public java.util.List<? extends org.apache.calcite.avatica.proto.Responses.DatabasePropertyElementOrBuilder> \n getPropsOrBuilderList() {\n return props_;\n }", "public java.beans.PropertyDescriptor[] getPropertyDescriptors() {\n\ttry {\n\t\tjava.beans.PropertyDescriptor aDescriptorList[] = {\n\t\t\tcomponentOrientationPropertyDescriptor()\n\t\t};\n\t\treturn aDescriptorList;\n\t} catch (Throwable exception) {\n\t\thandleException(exception);\n\t};\n\treturn null;\n}", "public PropertyDescriptor[] getPropertyDescriptors() {\n\tPropertyDescriptor[] pd = new PropertyDescriptor[3];\n\ttry {\n\t\tpd [0] = new PropertyDescriptor(\"name\", RateTypeAccessBean.class);\n\t\tpd [1] = new PropertyDescriptor(\"ratetype\", RateTypeAccessBean.class);\n\t\tpd [2] = new PropertyDescriptor(\"basecurrency\", RateTypeAccessBean.class, \"getBasecurrency\", null);\n\t\treturn pd;\n\t} catch (IntrospectionException ex) {\n\t\tex.printStackTrace(System.out);\n\t}\n\treturn null;\n}", "public static List<DisplayProperty> getDisplayProperties() {return DISPLAY_PROPERTIES;}", "public List<Property> getProperties(String spid) throws EVDBRuntimeException, EVDBAPIException {\n\t\t\n\t\tPerformer p = (Performer)listProperties(Performer.class, PERFORMERS_PROPERTIES_LIST, spid);\n\t\t\n\t\treturn p.getProperties();\n\t}", "@Override\n public Map<String, String> getProperties() {\n return null;\n }", "public java.util.List<? extends org.apache.calcite.avatica.proto.Responses.DatabasePropertyElementOrBuilder> \n getPropsOrBuilderList() {\n if (propsBuilder_ != null) {\n return propsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(props_);\n }\n }", "@Override\n\tpublic List<XSOntDataProperty> getSuperProperties() {\n\t\treturn new ArrayList<XSOntDataProperty>();\n\t}", "public List<Property> properties(String name)\n\t{\n\t\treturn filter(p -> p.getName().equals(name) && p instanceof Property)\n\t\t\t\t.stream()\n\t\t\t\t\t.map(e -> (Property) e)\n\t\t\t\t\t.collect(Collectors.toList());\n\t}", "boolean hasGetProperty();", "@Override\n public Map<String, String> getProperties()\n {\n return null;\n }", "public String[] getPropertyNames();", "java.lang.String getProperties();", "@Override\n public Properties getProperties() {\n return null;\n }", "abstract ChildListPropertyDescriptor internalThenDeclarationsProperty();", "public Set<Property> getProperties() {\r\n\t\treturn properties;\r\n\t}", "final List internalStructuralPropertiesForType(int apiLevel) {\n return propertyDescriptors(apiLevel);\n }", "public Enumeration getPropertyNames()\n {\n Hashtable props = getProperties();\n return (props != null) ? props.keys() : new Vector().elements();\n }", "public Set<Pp> getProperties() {\n return properties;\n }", "@Override\n public ConfigurablePropertyMap getProperties() {\n return properties;\n }", "StringMap getProperties();", "Object getProps();" ]
[ "0.8019972", "0.7396135", "0.72856396", "0.7218985", "0.7142752", "0.707889", "0.7017757", "0.68701595", "0.6828023", "0.6826083", "0.6792678", "0.6743483", "0.6692016", "0.66771054", "0.66596264", "0.6648058", "0.6642406", "0.6638734", "0.66154015", "0.6612184", "0.6608673", "0.660754", "0.65843475", "0.655523", "0.6553906", "0.6553022", "0.6531738", "0.65132177", "0.65108377", "0.64810073", "0.646953", "0.64616853", "0.64075005", "0.6349461", "0.634801", "0.6338999", "0.63368094", "0.63350755", "0.6320616", "0.63057965", "0.6297014", "0.6268844", "0.6242841", "0.62399364", "0.6224466", "0.62188065", "0.62171566", "0.6215148", "0.62146014", "0.62119853", "0.6205229", "0.6204439", "0.61969244", "0.61954015", "0.6192218", "0.61893624", "0.61844647", "0.61578923", "0.6147436", "0.6143107", "0.613625", "0.6132277", "0.6126497", "0.6107066", "0.6105839", "0.60923505", "0.6090962", "0.60888153", "0.60880244", "0.608016", "0.60774595", "0.60622054", "0.6048042", "0.60468715", "0.6045173", "0.6043098", "0.6040938", "0.602792", "0.602468", "0.6022991", "0.6020963", "0.60161865", "0.5999332", "0.5998871", "0.59901226", "0.5989636", "0.598961", "0.59865665", "0.59846187", "0.59763694", "0.5973192", "0.597176", "0.5945607", "0.5942745", "0.5942543", "0.5933839", "0.59316665", "0.5925422", "0.59239537", "0.59233075", "0.59215176" ]
0.0
-1
Bug report from Ole Hjalmar direct subClassOf not reporting correct result with rule reasoner
public void xxtest_oh_01() { String NS = "http://www.idi.ntnu.no/~herje/ja/"; Resource[] expected = new Resource[] { ResourceFactory.createResource( NS+"reiseliv.owl#Reiseliv" ), ResourceFactory.createResource( NS+"hotell.owl#Hotell" ), ResourceFactory.createResource( NS+"restaurant.owl#Restaurant" ), ResourceFactory.createResource( NS+"restaurant.owl#UteRestaurant" ), ResourceFactory.createResource( NS+"restaurant.owl#UteBadRestaurant" ), ResourceFactory.createResource( NS+"restaurant.owl#UteDoRestaurant" ), ResourceFactory.createResource( NS+"restaurant.owl#SkogRestaurant" ), }; test_oh_01scan( OntModelSpec.OWL_MEM, "No inf", expected ); test_oh_01scan( OntModelSpec.OWL_MEM_MINI_RULE_INF, "Mini rule inf", expected ); test_oh_01scan( OntModelSpec.OWL_MEM_RULE_INF, "Full rule inf", expected ); test_oh_01scan( OntModelSpec.OWL_MEM_MICRO_RULE_INF, "Micro rule inf", expected ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void test_sf_927641() {\n String NS = \"http://example.org/test#\";\n OntModel m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n OntClass c0 = m0.createClass( NS + \"C0\" );\n OntClass c1 = m0.createClass( NS + \"C1\" );\n OntClass c2 = m0.createClass( NS + \"C2\" );\n OntClass c3 = m0.createClass( NS + \"C3\" );\n \n c0.addSubClass( c1 );\n c1.addSubClass( c2 );\n c2.addEquivalentClass( c3 );\n \n // now c1 is the direct super-class of c2, even allowing for the equiv with c3\n assertFalse( \"pass 1: c0 should not be a direct super of c2\", c2.hasSuperClass( c0, true ) );\n assertFalse( \"pass 1: c3 should not be a direct super of c2\", c2.hasSuperClass( c3, true ) );\n assertFalse( \"pass 1: c2 should not be a direct super of c2\", c2.hasSuperClass( c2, true ) );\n assertTrue( \"pass 1: c1 should be a direct super of c2\", c2.hasSuperClass( c1, true ) );\n \n // second pass - with inference\n m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RULE_INF );\n c0 = m0.createClass( NS + \"C0\" );\n c1 = m0.createClass( NS + \"C1\" );\n c2 = m0.createClass( NS + \"C2\" );\n c3 = m0.createClass( NS + \"C3\" );\n \n c0.addSubClass( c1 );\n c1.addSubClass( c2 );\n c2.addEquivalentClass( c3 );\n \n // now c1 is the direct super-class of c2, even allowing for the equiv with c3\n assertFalse( \"pass 2: c0 should not be a direct super of c2\", c2.hasSuperClass( c0, true ) );\n assertFalse( \"pass 2: c3 should not be a direct super of c2\", c2.hasSuperClass( c3, true ) );\n assertFalse( \"pass 2: c2 should not be a direct super of c2\", c2.hasSuperClass( c2, true ) );\n assertTrue( \"pass 2: c1 should be a direct super of c2\", c2.hasSuperClass( c1, true ) );\n }", "public static void main(String[] args) {\n// subClass[] classes = new subClass[1];\n// System.out.println(superClass.value);\n// System.out.println(subClass.value);\n subClass s = new subClass();\n s.lala();\n// superClass p = s;\n// System.out.println(s==p);\n// System.out.println(s.name);\n// System.out.println(s.value);\n// subClass.haha();\n// s.heihei();\n// System.out.println( p.name);\n// System.out.println(p.value);\n// p.haha();\n// p.heihei();\n\n }", "boolean isSubclass(Concept x, Concept y);", "boolean isSuperclass(Concept x, Concept y);", "public void test_der_01() {\n OntModel m = ModelFactory.createOntologyModel(OntModelSpec.RDFS_MEM_TRANS_INF, null);\n Resource a = m.createResource(\"http://example.org#A\");\n Resource b = m.createResource(\"http://example.org#B\");\n OntClass A = new OntClassImpl(a.getNode(), (EnhGraph) m) {\n protected boolean hasSuperClassDirect(Resource cls) {\n throw new RuntimeException(\"did not find direct reasoner\");\n }\n };\n \n // will throw an exception if the wrong code path is taken\n A.hasSuperClass(b, true);\n }", "private void normalizeLHS(OWLDescription super_class, OWLClass cls) {\n\t\t\n\t}", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "public void test_inheritence() {\n assertTrue(\"invalid inheritence.\", Task.class.getSuperclass() == BaseTaskEntity.class);\n }", "@Test public void testInheritance () {\n ArrayList<String> point = new ArrayList<String>(\n Arrays.asList(\"qimpp\", \"Point\") );\n GNode pointNode = treeManager.dereference(point);\n\n ArrayList<String> colorPoint = new ArrayList<String>(\n Arrays.asList(\"qimpp\", \"ColorPoint\") );\n GNode colorNode = treeManager.dereference(colorPoint);\n\n assertTrue( colorNode != null );\n assertTrue( pointNode != null );\n GNode g = (GNode)(treeManager.getParent(colorNode).getProperty(\"ClassDeclaration\"));\n \n\n assertTrue( treeManager.getParent(colorNode) == pointNode );\n\n //\n // Test distinction between package names\n //\n\n ArrayList<String> otherColor =\n new ArrayList<String>( Arrays.asList(\"org\", \"fake\",\n \"ColorPoint\"));\n GNode otherColorNode = treeManager.dereference(otherColor);\n\n assertTrue( otherColorNode != null );\n assertTrue( treeManager.getParent( otherColorNode )\n != treeManager.getParent(colorNode) );\n assertTrue( otherColorNode != colorNode );\n }", "public Collection getSuperclasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "@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 protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "public boolean checkSubClass(OWLClass class1, OWLClass class2) {\n \n Set<OWLClass> supers = new HashSet<OWLClass>();\n \n for (Set<OWLClass> set : loader.getSuperClasses(class2)) {\n supers.addAll(set);\n }\n \n for (OWLClass cls : supers) {\n if (cls.getIRI().equals(class1.getIRI())) {\n return true;\n }\n }\n return false;\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@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}", "Set<Concept> getSubclasses(Concept concept);", "public void test_hk_06() throws Exception {\n OntModel ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n ontModel.read(\"file:testing/ontology/bugs/test_hk_06/a.owl\");\n \n String NSa = \"http://jena.hpl.hp.com/2003/03/testont/a#\";\n String NSb = \"http://jena.hpl.hp.com/2003/03/testont/b#\";\n \n OntClass A = ontModel.getOntClass(NSa + \"A\");\n assertTrue(\"class A should be in the base model\", ontModel.isInBaseModel(A));\n \n OntClass B = ontModel.getOntClass(NSb + \"B\");\n assertFalse(\"class B should not be in the base model\", ontModel.isInBaseModel(B));\n \n assertTrue(\n \"A rdf:type owl:Class should be in the base model\",\n ontModel.isInBaseModel(ontModel.createStatement(A, RDF.type, OWL.Class)));\n assertFalse(\n \"B rdf:type owl:Class should not be in the base model\",\n ontModel.isInBaseModel(ontModel.createStatement(B, RDF.type, OWL.Class)));\n }", "private void fetchSubclassHierarchy() throws IOException {\n\t\tSystem.out.println(\"Fetching subclass relationships from SPARQL ...\");\n\t\ttry (InputStream response = runSparqlQuery(\"PREFIX ps: <http://www.wikidata.org/prop/statement/>\\n\"\n\t\t\t\t+ \"PREFIX p: <http://www.wikidata.org/prop/>\\n\"\n\t\t\t\t+ \"SELECT ?subC ?supC WHERE { ?subC p:P279/ps:P279 ?supC }\")) {\n\t\t\tSystem.out.println(\"Processing subclass relationships ...\");\n\n\t\t\t// DEBUG\n\t\t\t// BufferedReader br = new BufferedReader(new InputStreamReader(\n\t\t\t// response));\n\t\t\t// String read;\n\t\t\t// while ((read = br.readLine()) != null) {\n\t\t\t// System.out.println(read);\n\t\t\t// }\n\t\t\t// System.out.println(\"*** done ***\");\n\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\tJsonNode root = mapper.readTree(response);\n\t\t\tJsonNode bindings = root.path(\"results\").path(\"bindings\");\n\t\t\tint count = 0;\n\t\t\tfor (JsonNode binding : bindings) {\n\t\t\t\tcount++;\n\t\t\t\tInteger subId = getNumId(binding.path(\"subC\").path(\"value\")\n\t\t\t\t\t\t.asText(), true);\n\t\t\t\tInteger supId = getNumId(binding.path(\"supC\").path(\"value\")\n\t\t\t\t\t\t.asText(), true);\n\t\t\t\tif (supId == 0 || subId == 0) {\n\t\t\t\t\tSystem.out.println(\"Ignoring \"\n\t\t\t\t\t\t\t+ binding.path(\"subC\").path(\"value\").asText()\n\t\t\t\t\t\t\t+ \" subClassOf \"\n\t\t\t\t\t\t\t+ binding.path(\"supC\").path(\"value\").asText());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tgetClassRecord(subId).directSuperClasses.add(supId);\n\t\t\t\tClassRecord superClass = getClassRecord(supId);\n\t\t\t\tsuperClass.subclassCount++;\n\t\t\t\tif (count % 10000 == 0) {\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Found \" + count\n\t\t\t\t\t+ \" subclass relationships among \"\n\t\t\t\t\t+ this.classRecords.size() + \" Wikidata items.\");\n\n\t\t\tSystem.out.println(\"Computing indirect subclass relationships ...\");\n\t\t\tfor (ClassRecord classRecord : this.classRecords.values()) {\n\t\t\t\tfor (Integer superClass : classRecord.directSuperClasses) {\n\t\t\t\t\taddSuperClasses(superClass, classRecord);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Computing total subclass counts ...\");\n\t\t\tfor (ClassRecord classRecord : this.classRecords.values()) {\n\t\t\t\tfor (Integer superClass : classRecord.superClasses) {\n\t\t\t\t\tgetClassRecord(superClass).allSubclassCount++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Preprocessing of class hierarchy complete.\");\n\t\t}\n\t}", "public SemanticError checkCyclicInheritance() {\n\t\tMap<String, VSOPClass> map = new HashMap<>();\n\n\t\tfor (VSOPClass c = superClass; c != null; c = c.superClass) {\n\t\t\tif (c == this) {\n\t\t\t\treturn new SemanticError(ln, col, String.format(\"Cyclic inheritance of class %s\", id));\n\t\t\t}\n\n\t\t\tif (map.containsKey(c.id))\n\t\t\t\treturn null;\n\n\t\t\tmap.put(c.id, c);\n\t\t}\n\n\t\treturn null;\n\t}", "public void test_hk_04() {\n OntModel m = ModelFactory.createOntologyModel();\n m.getDocumentManager().addAltEntry(\n \"http://jena.hpl.hp.com/testing/ontology/relativenames\",\n \"file:testing/ontology/relativenames.rdf\");\n \n m.read(\"http://jena.hpl.hp.com/testing/ontology/relativenames\");\n assertTrue(\n \"#A should be a class\",\n m.getResource(\"http://jena.hpl.hp.com/testing/ontology/relativenames#A\").canAs(OntClass.class));\n assertFalse(\n \"file: #A should not be a class\",\n m.getResource(\"file:testing/ontology/relativenames.rdf#A\").canAs(OntClass.class));\n }", "public void testDiscriminator()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\t\t\ttissueSpecimen.setDiscriminatorColumn(\"SPECIMEN_CLASS\");\r\n\t\t\ttissueSpecimen.setDiscriminatorValue(\"Tissue\");\r\n\r\n\t\t\tEntityInterface cellSpecimen = factory.createEntity();\r\n\t\t\tcellSpecimen.setName(\"cellSpecimen\");\r\n\t\t\tcellSpecimen.setParentEntity(specimen);\r\n\t\t\tcellSpecimen.setDiscriminatorColumn(\"SPECIMEN_CLASS\");\r\n\t\t\tcellSpecimen.setDiscriminatorValue(\"Cell\");\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\t\t\tcellSpecimen = entityManagerInterface.persistEntity(cellSpecimen);\r\n\t\t\tcellSpecimen = entityManagerInterface.persistEntity(cellSpecimen);\r\n\r\n\t\t\tcellSpecimen = entityManagerInterface.getEntityByIdentifier(cellSpecimen.getId());\r\n\t\t\ttissueSpecimen = entityManagerInterface.getEntityByIdentifier(tissueSpecimen.getId());\r\n\r\n\t\t\tassertEquals(\"SPECIMEN_CLASS\", cellSpecimen.getDiscriminatorColumn());\r\n\t\t\tassertEquals(\"Cell\", cellSpecimen.getDiscriminatorValue());\r\n\r\n\t\t\tassertEquals(\"SPECIMEN_CLASS\", tissueSpecimen.getDiscriminatorColumn());\r\n\t\t\tassertEquals(\"Tissue\", tissueSpecimen.getDiscriminatorValue());\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "private boolean addIfContainedSubClass(EClass eClass) {\n EList<EClass> superClasses = eClass.getESuperTypes();\n for (EClass superClass : superClasses) {\n if (visitedContainedClasses.contains(superClass)) {\n\n // eClass is a subclass of the containment set\n unvisitedContainedClasses.add(eClass);\n\n possiblyReportNewClass(true, \"sub class\", superClass, eClass);\n return true;\n }\n }\n return false;\n }", "public boolean checkSuperClass(OWLClass class1, OWLClass class2) {\n \n Set<OWLClass> supers = new HashSet<OWLClass>();\n \n for (Set<OWLClass> set : loader.getSuperClasses(class1)) {\n supers.addAll(set);\n }\n \n for (OWLClass cls : supers) {\n if (cls.getIRI().equals(class2.getIRI())) {\n return true;\n }\n }\n return false;\n }", "void processInheritanceAssociations() {\n\t\tFamixAssociation foundInheritance;\n\t\tHashSet<String> foundInheritanceList;\n\t\tHashSet<String> alreadyIncludedInheritanceList;\n\t\tinheritanceAssociationsPerClass = new HashMap<String, HashSet<String>>();\n\t\ttry{\n\t\t\tIterator<FamixAssociation> iterator = theModel.waitingAssociations.iterator();\n\t for (Iterator<FamixAssociation> i=iterator ; i.hasNext();) {\n\t \tboolean inheritanceAssociation = false;\n\t \tboolean fromExists = false;\n \tboolean toExists = false;\n \tboolean toHasValue = false;\n\t \tFamixAssociation association = (FamixAssociation) i.next();\n\t\t String uniqueNameFrom = association.from;\n\n \t/* Test helper\n \tif (association.from.startsWith(\"Limaki.Actions.Command\")){\n \t\tboolean breakpoint = true;\n \t} */\n\n\t\t if (association instanceof FamixInheritanceDefinition){\n\t\t \tinheritanceAssociation = true;\n\t\t }\n \tif (inheritanceAssociation) {\n\t\t\t if (theModel.classes.containsKey(uniqueNameFrom)) {\n\t\t\t \tfromExists = true;\n\t\t\t }\n \t}\n \tif (inheritanceAssociation && fromExists) {\n\t\t\t if ((association.to != null) && (!association.to.equals(\"\"))) {\n\t\t\t \ttoHasValue = true;\n\t\t\t\t if (theModel.classes.containsKey(association.to) || theModel.classes.containsKey(\"xLibraries.\" + association.to)) {\n\t\t\t\t \ttoExists = true;\n\t\t\t\t }\n\t\t\t }\n \t}\n\t\t // If association.to is not a unique name of an existing type, try to replace it by the complete unique name.\n\t \t// Determine the type of association.to, first based on imports, and second based on package contents.\n\t \tif (inheritanceAssociation && fromExists && !toExists && toHasValue) {\n String to = findClassInImports(association.from, association.to);\n if (!to.equals(\"\")) {\n association.to = to;\n }\n else {\n\t \tString belongsToPackage = theModel.classes.get(association.from).belongsToPackage;\n\t to = findClassInPackage(association.to, belongsToPackage);\n\t if (!to.equals(\"\")) { // So, in case association.to shares the same package as association.from \n\t association.to = to;\n\t }\n }\n \t\t if (theModel.classes.containsKey(association.to) || theModel.classes.containsKey(\"xLibraries.\" + association.to)) {\n \t\t \ttoExists = true;\n \t\t }\n \t}\n\t \tif (inheritanceAssociation && fromExists && toExists && !theModel.associations.contains(association)) {\n\t\t \t// Add the inheritance association to the FamixModel, but only if to and from are equal. \n\t \tif (!association.from.equals(association.to)) { \n\t \t\taddToModel(association);\n\t \t}\n\n\t \t// Fill the HashMap inheritanceAccociationsPerClass with inheritance dependencies to super classes or interfaces \n\t \talreadyIncludedInheritanceList = null;\n\t \tfoundInheritance = null;\n\t \tfoundInheritanceList = null;\n\t \talreadyIncludedInheritanceList = null;\n\t \tfoundInheritance = association;\n\t \tif(inheritanceAssociationsPerClass.containsKey(uniqueNameFrom)){\n\t \t\talreadyIncludedInheritanceList = inheritanceAssociationsPerClass.get(uniqueNameFrom);\n\t \t\tif (!alreadyIncludedInheritanceList.contains(association.to)) {\n\t \t\t\talreadyIncludedInheritanceList.add(foundInheritance.to);\n\t \t\t}\n\t \t\tinheritanceAssociationsPerClass.put(uniqueNameFrom, alreadyIncludedInheritanceList);\n\t \t}\n\t \telse{\n\t\t \tfoundInheritanceList = new HashSet<String>();\n\t\t \tfoundInheritanceList.add(foundInheritance.to);\n\t\t \tinheritanceAssociationsPerClass.put(uniqueNameFrom, foundInheritanceList);\n\t \t}\n\t \t\n\t \t// Remove from waitingAssociations afterwards, to enhance the performance. \t\n\t\t\t i.remove();\n\t \t}\n\t }\n\t\t} catch(Exception e) {\n\t this.logger.debug(new Date().toString() + \"Exception may result in incomplete dependency list. Exception: \" + e);\n\t //e.printStackTrace();\n\t\t}\n\t\tindirectAssociations_DeriveIndirectInheritance();\n this.logger.info(new Date().toString() + \" Finished: processInheritanceAssociations()\");\n }", "private static void minCardinality(final Set<Rule> rules, final OWLClassExpression subClass,\n\t\t\tfinal OWLClassExpression superClass) {\n\t\tOWLObjectMinCardinality minCard = (OWLObjectMinCardinality) superClass;\n\t\tint minCardinality = minCard.getCardinality();\n\t\tif (minCardinality >= 1) {\n\t\t\tif (minCardinality > 1) {\n\t\t\t\tSystem.out.println(\"MIN CARDINALITY: \"+ minCardinality + \"in axiom superclass: \"+superClass);\n\t\t\t}\n\t\t\tArrayList<Variable> existentialVars = new ArrayList<>(minCardinality);\n\t\t\tfor (int i = 0; i < minCardinality; i++) {\n\t\t\t\texistentialVars.add(new Variable(\"X\" + i));\n\t\t\t}\n\n\t\t\tArrayList<Atom> head = new ArrayList<>();\n\t\t\tfor (int i = 0; i < minCardinality; i++) {\n\t\t\t\thead.add(OWLObjectPropertytoAtom(minCard.getProperty(), VAR_X, existentialVars.get(i)));\n\t\t\t\thead.add(OWLConceptToAtom(minCard.getFiller(), existentialVars.get(i)));\n\t\t\t\t// head.add(OWLConceptToAtom(InternalizedEntities.OWL_THING,\n\t\t\t\t// existentialVars.get(i)));\n\t\t\t\tfor (int j = i + 1; j < minCardinality; j++) {\n\t\t\t\t\thead.add(new Atom(OWLRDFVocabulary.OWL_DIFFERENT_FROM.toString(), existentialVars.get(i),\n\t\t\t\t\t\t\texistentialVars.get(j)));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tAtom[] body = new Atom[] { OWLConceptToAtom(subClass, VAR_X) };\n\t\t\tRule existentialRule = new Rule(head.toArray(new Atom[head.size()]), body);\n\t\t\trules.add(existentialRule);\n\t\t}\n\t}", "@Test\n public void testBasicClassExpression() {\n OntModel model = createOntologyModel(OntModelSpec.OWL_MEM);\n\n model.read(RDFDataMgr.open(\"african-wildlife.owl\"), NS, \"RDF/XML\");\n\n Resource r = model.getResource(NS + \"herbivore\");\n assertFalse(r instanceof OntClass);\n\n // Convert a plaint RDF resource into its class facet\n // <owl:Class rdf:ID=\"herbivore\">\n // https://jena.apache.org/documentation/ontology/#rdf-level-polymorphism-and-java\n OntClass herbivore = r.as(OntClass.class);\n assertTrue(herbivore instanceof OntClass);\n\n // A shorten style of calling\n OntClass plant = model.getOntClass(NS + \"plant\");\n for (Iterator<OntClass> iterSubClasses = plant.listSubClasses(); iterSubClasses.hasNext();) {\n OntClass child = iterSubClasses.next();\n assertThat(child.getURI(), in(new String[] {\n \"http://wwww.eswc2006.org/technologies/ontology#tasty_plant\",\n \"http://wwww.eswc2006.org/technologies/ontology#tree\",\n }));\n }\n }", "@Test\n public void test6(){\n System.out.println(Son.son);\n System.out.println(Parent.parent);\n }", "@Override\n public boolean predicate2(Object dm, Designer dsgr) {\n if (!(Model.getFacade().isAClassifier(dm))) {\n return NO_PROBLEM;\n }\n if (!(Model.getFacade().isPrimaryObject(dm))) {\n return NO_PROBLEM;\n }\n\n // If the classifier does not have a name,\n // then no problem - the model is not finished anyhow.\n if ((Model.getFacade().getName(dm) == null)\n\t || (\"\".equals(Model.getFacade().getName(dm)))) {\n return NO_PROBLEM;\n\t}\n\n // Abstract elements do not necessarily require associations\n if (Model.getFacade().isAGeneralizableElement(dm)\n\t && Model.getFacade().isAbstract(dm)) {\n return NO_PROBLEM;\n }\n\n // Types can probably have associations, but we should not nag at them\n // not having any.\n // utility is a namespace collection - also not strictly required\n // to have associations.\n if (Model.getFacade().isType(dm)) {\n return NO_PROBLEM;\n }\n if (Model.getFacade().isUtility(dm)) {\n return NO_PROBLEM;\n }\n\n // See issue 1129: If the classifier has dependencies,\n // then mostly there is no problem. \n if (Model.getFacade().getClientDependencies(dm).size() > 0) {\n return NO_PROBLEM;\n }\n if (Model.getFacade().getSupplierDependencies(dm).size() > 0) {\n return NO_PROBLEM;\n }\n \n // special cases for use cases\n // Extending use cases and use case that are being included are\n // not required to have associations.\n if (Model.getFacade().isAUseCase(dm)) {\n Object usecase = dm;\n Collection includes = Model.getFacade().getIncludes(usecase);\n if (includes != null && includes.size() >= 1) {\n return NO_PROBLEM;\n }\n Collection extend = Model.getFacade().getExtends(usecase);\n if (extend != null && extend.size() >= 1) {\n return NO_PROBLEM;\n }\n }\n \n \n\n //TODO: different critic or special message for classes\n //that inherit all ops but define none of their own.\n\n if (findAssociation(dm, 0)) {\n return NO_PROBLEM;\n }\n return PROBLEM_FOUND;\n }", "public Collection getSubclasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "public tudresden.ocl20.core.jmi.ocl.commonmodel.Classifier commonSuperType(tudresden.ocl20.core.jmi.ocl.commonmodel.Classifier c) {\n \n\tif (this.conformsTo(c)) { return c; }\n\tif (c.conformsTo(this)) { return this; }\n Set thisParents = new HashSet(); ;\n thisParents.add(this);\n Set cParents = new HashSet(); ;\n cParents.add(c);\n \n //the transitive closure of the Classifier and all of its parents\n Set thisTC = new HashSet();\n Set cTC = new HashSet();\n \n while(!(thisParents.isEmpty() && cParents.isEmpty())){\n thisTC.addAll(thisParents);\n cTC.addAll(cParents);\n \n Set thisParentsTemp = new HashSet();\n Iterator thisParentsIt = thisParents.iterator();\n while(thisParentsIt.hasNext()){\n tudresden.ocl20.core.jmi.ocl.commonmodel.Classifier aThisParent = (tudresden.ocl20.core.jmi.ocl.commonmodel.Classifier) thisParentsIt.next();\n if(cTC.contains(aThisParent)){\n return aThisParent;\n }\n thisParentsTemp.addAll(aThisParent.getParents());\n }\n thisParents=thisParentsTemp;\n \n Set cParentsTemp = new HashSet();\n Iterator cParentsIt = cParents.iterator();\n while(cParentsIt.hasNext()){\n tudresden.ocl20.core.jmi.ocl.commonmodel.Classifier aCParent = (tudresden.ocl20.core.jmi.ocl.commonmodel.Classifier) cParentsIt.next();\n if(thisTC.contains(aCParent)){\n return aCParent;\n }\n cParentsTemp.addAll(aCParent.getParents());\n }\n cParents=cParentsTemp;\n }\n return null; //should only occure if c is a collection type\n }", "Rule Inheritance() {\n return Sequence(\"extends \", Identifier());\n }", "abstract String classify(Instance inst);", "public void test_ck_03() {\n // part A - surprising reification\n OntModel model1 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM, null);\n OntModel model2 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM_RULE_INF, null);\n \n Individual sub = model1.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n OntProperty pred = model1.createOntProperty(\"http://mytest#\");\n Individual obj = model1.createIndividual(\"http://mytest#i2\", model1.getProfile().CLASS());\n OntProperty probabilityP = model1.createOntProperty(\"http://mytest#prob\");\n \n Statement st = model1.createStatement(sub, pred, obj);\n model1.add(st);\n st.createReifiedStatement().addProperty(probabilityP, 0.9);\n assertTrue(\"st should be reified\", st.isReified());\n \n Statement st2 = model2.createStatement(sub, pred, obj);\n model2.add(st2);\n st2.createReifiedStatement().addProperty(probabilityP, 0.3);\n assertTrue(\"st2 should be reified\", st2.isReified());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP).addProperty(probabilityP, 0.3); //!!!\n // exception\n \n // Part B - exception in remove All\n Individual sub2 = model2.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP); //!!! exception\n \n sub2.addProperty(probabilityP, 0.3);\n sub2.removeAll(probabilityP); //!!! exception\n \n }", "private void testInheritance() {\n AbstractVehicle myCar = new Car();\n\n myCar.drive();\n\n //So a super class can be instantiated using instance of its subclass\n //But reverse is not true, so although VolvoCar extends Car,\n //we cannot create instance of VolvoCar from Car instance.\n //VolvoCar volvoCar = new Car();\n VolvoCar volvoCar = new VolvoCar();\n volvoCar.drive();\n\n //However, in such a scenario the super class can only invoke its own methods,\n // and not methods of the sub-class.....\n //So myCar can invoke methods defined in Vehicle class where actual\n //implementation comes from Car instance.\n //so getNoOfDoors will return 4.\n System.out.println(\"Car doors - \" + myCar.getNoOfDoors());\n\n //But myCar cannot invoke isInsured() which is defined only in subclass Car.\n //Below line gives error cannot resolve isInsured() in Vehicle.\n //myCar.isInsured();\n \n Car testCar = new Car();\n testCar.isInsured();\n\n }", "public boolean isSubsumedBy(OWLClass cls1,\r\n OWLClass cls2,\r\n ReasonerTaskListener taskListener) throws DIGReasonerException;", "XClass getSuperclass();", "public Set<String> LCS(String instance1, String instance2)\r\n\t{\r\n\t\tSet<String> parents1 = new HashSet<String>();\t\r\n\t\tfor(Iterator<String> iter = listBelongingClasses(instance1);iter.hasNext(); )\r\n\t\t\tparents1.add(iter.next());\r\n\t\t\r\n\r\n\t\tSet<String> parents2 = new HashSet<String>();\t\r\n\t\tfor(Iterator<String> iter = listBelongingClasses(instance2);iter.hasNext(); )\r\n\t\t\tparents2.add(iter.next());\t\r\n\t\t\r\n\t\tSet<String> res = new HashSet<String>();\r\n\t\tint maxProf = Integer.MIN_VALUE;\r\n\t\t\r\n\t\tparents1.retainAll(parents2);\r\n\t\tfor(String c: parents1)\r\n\t\t{\r\n\t\t\tint pc = this.profConcept(c);\r\n\t\t\tif(pc>maxProf)\r\n\t\t\t{\r\n\t\t\t\tres.clear();\r\n\t\t\t\tres.add(c);\r\n\t\t\t\tmaxProf = pc;\r\n\t\t\t}\r\n\t\t\telse if(pc==maxProf)\r\n\t\t\t{\r\n\t\t\t\tres.add(c);\r\n\t\t\t\tmaxProf = pc;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn res;\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\tSet<String> res = new HashSet<String>();\r\n\t\t\r\n\t\tSet<String> sc1 = new HashSet<String>();\t\r\n\t\tfor(Iterator<String> iter = listDeclaredBelongingClasses(instance1);iter.hasNext(); )\r\n\t\t\tsc1.add(iter.next());\r\n\t\t\r\n\t\tSet<String> sc2 = new HashSet<String>();\t\r\n\t\tfor(Iterator<String> iter = listDeclaredBelongingClasses(instance2);iter.hasNext(); )\r\n\t\t\tsc2.add(iter.next());\r\n\t\t\r\n\t\tSet<String> inter = new HashSet<String>(sc1);\r\n\t\tinter.retainAll(sc2);\r\n\t\t\r\n\t\tres.addAll(inter);\r\n\t\t\r\n\t\tsc1.removeAll(inter);\r\n\t\tsc2.removeAll(inter);\r\n\t\t\r\n\t\t\r\n\t\tSet<String> sparentsc1 = new HashSet<String>();\r\n\t\tSet<String> sparentsc2 = new HashSet<String>();\r\n\r\n\t\twhile(!sc1.isEmpty() && !sc2.isEmpty())\r\n\t\t{\r\n\t\t\t\r\n\t\t\tfor(String c1: sc1)\r\n\t\t\t{\r\n\t\t\t\tIterator<String> iter = listSuperClasses(c1, true);\r\n\t\t\t\tif(iter != null)\r\n\t\t\t\t\twhile(iter.hasNext())\r\n\t\t\t\t\t\tsparentsc1.add(iter.next());\r\n\t\t\t}\r\n\t\t\tfor(String c2: sc2)\r\n\t\t\t{\r\n\t\t\t\tIterator<String> iter = listSuperClasses(c2, true);\r\n\t\t\t\tif(iter != null)\r\n\t\t\t\t\twhile(iter.hasNext())\r\n\t\t\t\t\t\tsparentsc2.add(iter.next());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tinter.clear();\r\n\t\t\tinter.addAll(sparentsc1);\r\n\t\t\tinter.retainAll(sparentsc2);\r\n\t\t\t\r\n\t\t\tres.addAll(inter);\r\n\t\t\tsparentsc1.removeAll(inter);\r\n\t\t\tsparentsc2.removeAll(inter);\r\n\t\t\t\r\n\t\t\tsc1 = new HashSet<String>(sparentsc1);\r\n\t\t\tsc2 = new HashSet<String>(sparentsc2);\r\n\t\t}\r\n\t\treturn inter;\r\n\t\t*/\r\n\t}", "@Test\n public void test7(){\n System.out.println(Parent.parent);\n System.out.println(Son.son);\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 test_ck_02() {\n OntModel vocabModel = ModelFactory.createOntologyModel();\n ObjectProperty p = vocabModel.createObjectProperty(\"p\");\n OntClass A = vocabModel.createClass(\"A\");\n \n OntModel workModel = ModelFactory.createOntologyModel();\n Individual sub = workModel.createIndividual(\"uri1\", A);\n Individual obj = workModel.createIndividual(\"uri2\", A);\n workModel.createStatement(sub, p, obj);\n }", "public void test642_smartLifting6() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl6Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl6_1 t = new Team642sl6_2();\\n\" +\n\t\t\t \" T642sl6_2 o = new T642sl6_4();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl6_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl6_4 extends Team642sl6_3 {\\n\" +\n\t\t\t \" public class Role642sl6_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_4.this.toString() + \\\".Role642sl6_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl6_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl6_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl6_1 {\\n\" +\n\t\t\t \" public class Role642sl6_1 extends T642sl6_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_1.this.toString() + \\\".Role642sl6_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl6_2 extends Role642sl6_1 playedBy T642sl6_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_1.this.toString() + \\\".Role642sl6_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl6_3 extends Role642sl6_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_1.this.toString() + \\\".Role642sl6_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl6_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl6_2 as Role642sl6_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_4 extends T642sl6_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl6_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl6_2 extends Team642sl6_1 {\\n\" +\n\t\t\t \" public class Role642sl6_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_2.this.toString() + \\\".Role642sl6_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl6_4 extends Role642sl6_3 playedBy T642sl6_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_2.this.toString() + \\\".Role642sl6_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl6_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_5 extends T642sl6_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl6_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl6_3 extends Team642sl6_2 {\\n\" +\n\t\t\t \" public class Role642sl6_5 extends Role642sl6_3 playedBy T642sl6_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl6_3.this.toString() + \\\".Role642sl6_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl6_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_6 extends T642sl6_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl6_2 extends T642sl6_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl6_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl6_3 extends T642sl6_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl6_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl6_2.Role642sl6_3\");\n }", "@Test\r\n public void testInheritance() throws Exception {\r\n TestHelper.assertSuperclass(instance.getClass().getSuperclass(), GetDocumentsContestAction.class);\r\n }", "Set<Concept> getSuperclasses(Concept concept);", "private boolean isClassOrSubClass(ASTClassOrInterfaceDeclaration node, String className) {\r\n // check implemented interfaces\r\n // ASTImplementsList impl = node.getFirstChildOfType(ASTImplementsList.class);\r\n // if (impl != null && impl.jjtGetParent().equals(node)) {\r\n // for (int ix = 0; ix < impl.jjtGetNumChildren(); ix++) {\r\n // ASTClassOrInterfaceType type = (ASTClassOrInterfaceType) impl.jjtGetChild(ix);\r\n // if (isClassOrSubClass(type, className)) {\r\n // return true;\r\n // }\r\n // }\r\n // }\r\n\r\n // check superclass\r\n if (node.jjtGetNumChildren() != 0 && node.jjtGetChild(0).getClass().equals(ASTExtendsList.class)) {\r\n ASTClassOrInterfaceType type = (ASTClassOrInterfaceType) (node.jjtGetChild(0)).jjtGetChild(0);\r\n if (isClassOrSubClass(type, className)) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }", "@Override\n protected final void resetEntitySubClass ()\n {\n super.resetEntitySubClass ();\n }", "@Override\n protected void resetEntitySubClass ()\n {\n super.resetEntitySubClass ();\n }", "public void test642_smartLifting7() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl7Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl7_1 t = new Team642sl7_3();\\n\" +\n\t\t\t \" T642sl7_2 o = new T642sl7_4();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_4 extends Team642sl7_3 {\\n\" +\n\t\t\t \" public class Role642sl7_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_4.this.toString() + \\\".Role642sl7_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_3 extends T642sl7_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_1 {\\n\" +\n\t\t\t \" public class Role642sl7_1 extends T642sl7_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_1.this.toString() + \\\".Role642sl7_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl7_2 extends Role642sl7_1 playedBy T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_1.this.toString() + \\\".Role642sl7_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl7_3 extends Role642sl7_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_1.this.toString() + \\\".Role642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl7_2 as Role642sl7_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_4 extends T642sl7_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_2 extends Team642sl7_1 {\\n\" +\n\t\t\t \" public class Role642sl7_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_2.this.toString() + \\\".Role642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl7_4 extends Role642sl7_3 playedBy T642sl7_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_2.this.toString() + \\\".Role642sl7_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_5 extends T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl7_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl7_3 extends Team642sl7_2 {\\n\" +\n\t\t\t \" public class Role642sl7_5 extends Role642sl7_3 playedBy T642sl7_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl7_3.this.toString() + \\\".Role642sl7_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl7_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl7_6 extends T642sl7_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl7_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl7_2 extends T642sl7_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl7_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl7_3.Role642sl7_3\");\n }", "@Test\n public void testInheritance() {\n assertTrue(\n \"ClientsPrepopulatingBaseAction does not subclass BaseAction.\",\n ClientsPrepopulatingBaseAction.class.getSuperclass() == BaseAction.class);\n }", "public interface Type extends DeclarationContainer, DeclarationWithType {\n\n public default boolean newSubtypeOf(Type other) throws LookupException {\n return sameAs(other);\n }\n\n @Override\n default SelectionResult<Declaration> updatedTo(Declaration declaration) {\n return DeclarationWithType.super.updatedTo(declaration);\n }\n\n @Override\n default List<? extends DeclarationContainerRelation> relations() throws LookupException {\n \treturn inheritanceRelations();\n }\n\n public default void accumulateSuperTypeJudge(SuperTypeJudge judge) throws LookupException {\n judge.add(this);\n List<Type> temp = getProperDirectSuperTypes();\n for(Type type:temp) {\n Type existing = judge.get(type);\n if(existing == null) {\n type.accumulateSuperTypeJudge(judge);\n }\n }\n }\n\n\n /**\n * Find the super type with the same base type as the given type.\n * \n * @param type The type with the same base type as the requested super type.\n * @return A super type of this type that has the same base type as the given\n * type. If there is no such super type, null is returned.\n * @throws LookupException\n */\n public default Type getSuperTypeWithSameBaseTypeAs(Type type) throws LookupException {\n return superTypeJudge().get(type);\n }\n\n public SuperTypeJudge superTypeJudge() throws LookupException;\n\n public void accumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateSelfAndAllSuperTypes(Set<Type> acc) throws LookupException;\n\n\n public Set<Type> getSelfAndAllSuperTypesView() throws LookupException;\n\n public abstract List<InheritanceRelation> explicitNonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> explicitNonMemberInheritanceRelations(Class<I> kind);\n\n public List<InheritanceRelation> implicitNonMemberInheritanceRelations();\n\n public default void reactOnDescendantAdded(Element element) {}\n\n public default void reactOnDescendantRemoved(Element element) {}\n\n public default void reactOnDescendantReplaced(Element oldElement, Element newElement) {}\n\n /**\n * Return the fully qualified name.\n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ getPackage().getFullyQualifiedName().equals(\"\") ==> \\result == getName();\n\t @ ! getPackage().getFullyQualifiedName().equals(\"\") == > \\result.equals(getPackage().getFullyQualifiedName() + getName());\n\t @*/\n public String getFullyQualifiedName();\n\n /*******************\n * LEXICAL CONTEXT \n *******************/\n\n @Override\n public LocalLookupContext<?> targetContext() throws LookupException;\n\n @Override\n public LookupContext localContext() throws LookupException;\n\n /**\n * If the given element is an inheritance relation, the lookup must proceed to the parent. For other elements,\n * the context is a lexical context connected to the target context to perform a local search.\n * @throws LookupException \n */\n @Override\n public LookupContext lookupContext(Element element) throws LookupException;\n\n public List<ParameterBlock<?>> parameterBlocks();\n\n public <P extends Parameter> ParameterBlock<P> parameterBlock(Class<P> kind);\n\n public void addParameterBlock(ParameterBlock<?> block);\n\n public void removeParameterBlock(ParameterBlock<?> block);\n\n public <P extends Parameter> List<P> parameters(Class<P> kind);\n\n /**\n * Indices start at 1.\n */\n public <P extends Parameter> P parameter(Class<P> kind, int index);\n\n public <P extends Parameter> int nbTypeParameters(Class<P> kind);\n\n public <P extends Parameter> void addParameter(Class<P> kind,P parameter);\n\n public <P extends Parameter> void addAllParameters(Class<P> kind,Collection<P> parameter);\n\n public <P extends Parameter> void replaceParameter(Class<P> kind, P oldParameter, P newParameter);\n\n public <P extends Parameter> void replaceAllParameters(Class<P> kind, List<P> newParameters);\n\n /************************\n * BEING A TYPE ELEMENT *\n ************************/\n\n public List<Declaration> getIntroducedMembers();\n\n /**********\n * ACCESS *\n **********/\n\n /**\n * Add the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post directlyDeclaredElements().contains(element);\n\t @*/\n public void add(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Remove the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post ! directlyDeclaredElements().contains(element);\n\t @*/\n public void remove(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Add all type elements in the given collection to this type.\n * @param elements\n * @throws ChameleonProgrammerException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre elements != null;\n\t @ pre !elements.contains(null);\n\t @\n\t @ post directlyDeclaredElements().containsAll(elements);\n\t @*/\n public default void addAll(Collection<? extends Declarator> elements) {\n \telements.forEach(e -> add(e));\n }\n\n /**************\n * SUPERTYPES *\n **************/\n\n /**\n * Return the proper direct super types of this type. A proper super type is a super type\n * that is not equal to this type. A direct super type is a super type that is specified\n * by an inheritance relation of this type, or this type.\n * \n * @return A list containing the direct super types of this type.\n * @throws LookupException The type of an inheritance relation could not be resolved.\n */\n public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n public Set<Type> getAllSuperTypes() throws LookupException;\n\n public default boolean contains(Type other, TypeFixer trace) throws LookupException {\n return sameAs(other, trace);\n }\n \n public default boolean subtypeOf(Type other) throws LookupException {\n return subtypeOf(other, new TypeFixer());\n }\n\n public default boolean subtypeOf(Type other, TypeFixer trace) throws LookupException {\n TypeFixer clone = trace.clone();\n boolean result = sameAs(other,clone);\n if(! result) {\n clone = trace.clone();\n result = uniSubtypeOf(other,clone);\n if(! result) {\n result = other.uniSupertypeOf(this, trace);\n }\n }\n return result;\n }\n\n public default boolean uniSupertypeOf(Type type, TypeFixer trace) throws LookupException {\n return false;\n }\n\n public default boolean uniSubtypeOf(Type other, TypeFixer trace) throws LookupException {\n Type sameBase = getSuperTypeWithSameBaseTypeAs(other);\n return sameBase != null && sameBase.compatibleParameters(other, trace);\n }\n\n /**\n * Check if this type is assignable to another type.\n * \n * @param other\n * @return\n * @throws LookupException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result == equals(other) || subTypeOf(other);\n\t @*/\n public boolean assignableTo(Type other) throws LookupException;\n\n /**\n * Return the inheritance relations of this type.\n * \n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result != null;\n\t @*/\n public default List<InheritanceRelation> inheritanceRelations() throws LookupException {\n return nonMemberInheritanceRelations();\n }\n\n public List<InheritanceRelation> nonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> nonMemberInheritanceRelations(Class<I> kind);\n\n /**\n * Add the give given inheritance relation to this type.\n * @param relation The relation to add. Cannot be null.\n * @throws ChameleonProgrammerException\n * It is not possible to add the given type. E.g. you cannot\n * add an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post inheritanceRelations().contains(relation);\n\t @*/\n public void addInheritanceRelation(InheritanceRelation relation);\n\n public void addAllInheritanceRelations(Collection<InheritanceRelation> relations);\n /**\n * Remove the give given inheritance relation from this type.\n * @param relation\n * @throws ChameleonProgrammerException\n * It is not possible to remove the given type. E.g. you cannot\n * remove an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post ! inheritanceRelations().contains(relation);\n\t @*/\n public void removeNonMemberInheritanceRelation(InheritanceRelation relation) throws ChameleonProgrammerException;\n\n public void removeAllNonMemberInheritanceRelations();\n\n /**\n * Return the members of the given kind directly declared by this type.\n * @return\n * @throws LookupException \n * @throws \n */\n public <T extends Declaration> List<T> localMembers(final Class<T> kind) throws LookupException;\n\n /**\n * Return the members that are implicitly part of this type, such as default constructors and destructors.\n * @return\n */\n public List<Declaration> implicitMembers();\n\n public <M extends Declaration> List<M> implicitMembers(Class<M> kind);\n\n /**\n * Return the members directly declared by this type. The order of the elements in the list is the order in which they\n * are written in the type.\n * @return\n * @throws LookupException \n */\n public List<Declaration> localMembers() throws LookupException;\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind);\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind, ChameleonProperty property);\n\n public List<Declaration> directlyDeclaredMembers();\n\n public <D extends Declaration> List<SelectionResult<D>> members(DeclarationSelector<D> selector) throws LookupException;\n\n public <D extends Declaration> List<? extends SelectionResult<D>> localMembers(DeclarationSelector<D> selector) throws LookupException;\n\n public List<Declaration> members() throws LookupException;\n\n /**\n * Return the members of this class.\n * @param <M>\n * @param kind\n * @return\n * @throws LookupException\n */\n public <M extends Declaration> List<M> members(final Class<M> kind) throws LookupException;\n\n /**\n * DO NOT CONFUSE THIS METHOD WITH localMembers(). This method does not\n * transform type elements into members.\n * \n * FIXME: rename to localDeclarators()\n * \n * @return\n */\n public List<? extends Declarator> directlyDeclaredElements();\n\n public <T extends Declarator> List<T> directlyDeclaredElements(Class<T> kind);\n\n @Override\n public List<? extends Declaration> declarations() throws LookupException;\n\n public Type alias(String name);\n\n public Type intersection(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(IntersectionType type) throws LookupException;\n\n public void replace(Declarator oldElement, Declarator newElement);\n\n public Type baseType();\n\n public default boolean compatibleParameters(Type other, TypeFixer trace) throws LookupException {\n int size = nbTypeParameters(TypeParameter.class);\n boolean result = true;\n for(int i=0; i< size && result;i++) {\n TypeParameter otherParameter = other.parameter(TypeParameter.class, i);\n TypeParameter myParameter = parameter(TypeParameter.class,i);\n result = otherParameter.contains(myParameter, trace.clone());\n }\n return result;\n }\n\n\n public Type union(Type lowerBound) throws LookupException;\n\n public Type unionDoubleDispatch(Type type) throws LookupException;\n\n public Type unionDoubleDispatch(UnionType type) throws LookupException;\n\n public default boolean sameAs(Type other, TypeFixer trace) throws LookupException {\n if(other == this || trace.contains(other, this)) {\n return true;\n }\n TypeFixer newTrace = trace.clone();\n newTrace.add(other, this);\n boolean result = uniSameAs(other,newTrace);\n if(! result) {\n newTrace = trace.clone();\n newTrace.add(other, this);\n result = other.uniSameAs(this,newTrace);\n }\n return result;\n }\n\n /**\n * Check if this type is equal to the given type, taking\n * recursive types into account. If a loop is encountered,\n * that branch of the check will return true: it did not\n * encounter a problem.\n * \n * @param other The type of which we want to check if it is the same as this type.\n * @param fixer The object that will ensure that we can do a fixed point computation.\n * @return\n * @throws LookupException\n */\n public boolean uniSameAs(Type other, TypeFixer fixer) throws LookupException;\n\n /**\n * <p>Return the lower bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the lower bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post \\result.subtypeOf(this);\n @*/\n public default Type lowerBound() throws LookupException {\n return this;\n }\n\n /**\n * <p>Return the upper bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the upper bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post subtypeOf(\\result);\n @*/\n public default Type upperBound() throws LookupException {\n return this;\n }\n\n /**\n * A name that is strictly for debugging purposes.\n * \n * @return The result is not null.\n */\n public String infoName();\n\n /**\n * Verify whether the this type is a subtype of the given other type. \n * If that is the case, then a valid verification result is returned.\n * Otherwise, a problem is reported. The message of the problem is \n * constructed using the descriptions of the meaning of\n * each type as determined by the arguments.\n * \n * @param type The type for which the subtype relation is verified.\n * @param meaningThisType A textual description of the meaning of this type.\n * @param meaningOtherType A textual description of the meaning of the other type.\n * @param cause The element in which the verification is done.\n * @return\n */\n public Verification verifySubtypeOf(Type type, String meaningThisType, String meaningOtherType, Element cause);\n\n\n /**\n * @return\n */\n public default boolean isWildCard() {\n return false;\n }\n\n}", "public void test642_smartLifting1() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl1Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl1_1 t = new Team642sl1_1();\\n\" +\n\t\t\t \" T642sl1_2 o = new T642sl1_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_4 extends Team642sl1_3 {\\n\" +\n\t\t\t \" public class Role642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_4.this.toString() + \\\".Role642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_2 extends Team642sl1_1 {\\n\" +\n\t\t\t \" public class Role642sl1_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_2.this.toString() + \\\".Role642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl1_4 extends Role642sl1_3 playedBy T642sl1_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_2.this.toString() + \\\".Role642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_5 extends T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_3 extends Team642sl1_2 {\\n\" +\n\t\t\t \" public class Role642sl1_5 extends Role642sl1_3 playedBy T642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_3.this.toString() + \\\".Role642sl1_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_6 extends T642sl1_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl1_2 extends T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_3 extends T642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl1_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl1_1 {\\n\" +\n\t\t\t \" public class Role642sl1_1 extends T642sl1_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl1_2 extends Role642sl1_1 playedBy T642sl1_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl1_3 extends Role642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl1_1.this.toString() + \\\".Role642sl1_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl1_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl1_2 as Role642sl1_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl1_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl1_4 extends T642sl1_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl1_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl1_1.Role642sl1_3\");\n }", "@Test\n\tpublic void SubclassEqualIdEqualTest() {\n\t\tone = new ConcreteEntity(1);\n\t\ttwo = new ConcreteEntitySubclass(1);\n\t\tassertTrue(one.equals(two));\n\t\tassertTrue(two.equals(one));\n\t}", "private AttributeNode findSuper(String className, String attributeName) {\n \n // find the superclass by searching the OCR's for a generalization \n \n List<ObjectClassRelationship> ocrs = \n elements.getElements(DomainObjectFactory.newObjectClassRelationship());\n \n String superClassName = null;\n for(ObjectClassRelationship ocr : ocrs) {\n if (ocr.getType() == ObjectClassRelationship.TYPE_IS && \n ocr.getSource().getLongName().equals(className)) {\n superClassName = ocr.getTarget().getLongName();\n break;\n }\n }\n \n if (superClassName == null) {\n System.err.println(\"Superclass not found for \"+className);\n return null;\n }\n \n // find the super class in the tree\n \n int div = superClassName.lastIndexOf(\".\");\n String sPackage = superClassName.substring(0, div);\n String sName = superClassName.substring(div+1);\n \n for(Object pchild : rootNode.getChildren()) {\n PackageNode pnode = (PackageNode)pchild;\n if (pnode.getFullPath().equals(sPackage)) {\n for(Object cchild : pnode.getChildren()) {\n ClassNode cnode = (ClassNode)cchild;\n if (cnode.getDisplay().equals(sName)) {\n PackageNode inherited = null;\n for(Object achild : cnode.getChildren()) {\n if (\"Inherited Attributes\".equals(\n ((UMLNode)achild).getDisplay())) {\n // remember the inheritance subtree for later\n inherited = (PackageNode)achild;\n }\n else if (achild instanceof AttributeNode) {\n AttributeNode anode = (AttributeNode)achild;\n if (anode.getDisplay().equals(attributeName)) {\n return anode;\n }\n }\n }\n // attribute wasn't found, check inheritance subtree\n if (inherited != null) {\n for(Object achild : inherited.getChildren()) {\n AttributeNode anode = (AttributeNode)achild;\n if (anode.getDisplay().equals(attributeName)) {\n return findSuper(cnode.getFullPath(), attributeName);\n }\n }\n \n }\n }\n } \n }\n }\n \n return null;\n }", "private String indirectAssociations_findSuperClassThatContainsMethod(String fromClass, String fromMethod, String uniqueClassName, String methodName) {\n \tString result = \"\";\n \tif (inheritanceAssociationsPerClass.containsKey(uniqueClassName)){\n \t\tHashSet<String> inheritanceAssociations = inheritanceAssociationsPerClass.get(uniqueClassName);\n \t\tfor (String stringSuper : inheritanceAssociations){\n \t\t\tFamixClass superClass = theModel.classes.get(stringSuper);\n \t\t\tif ((superClass != null) && superClass.isInterface == false) {\n\t \t\t\tif (stringSuper.equals(uniqueClassName)) {\n\t \t\t\t\tbreak; // Otherwise, things go wrong with derived C# classes with the same name.\n\t \t\t\t}\n\t FamixMethod foundMethod = findInvokedMethodOnName(fromClass, fromMethod, stringSuper, methodName);\n\t if (foundMethod != null) {\n\t \t\tresult = stringSuper;\n\t \t\tbreak;\n\t\t }\n\t\t else {\n\t\t \tif (inheritanceAssociationsPerClass.containsKey(stringSuper)){\n\t\t \t\tresult = indirectAssociations_findSuperClassThatContainsMethod(fromClass, fromMethod, stringSuper, methodName);\n\t\t \t\tbreak;\n\t\t \t}\n\t\t }\n \t\t\t}\n\t\t\t} \n \t}\n \treturn result; \n }", "public void testFullyQualified(){ \n // when I do this, I need to change the regex as EITHER\n // \n $anno $a = $anno.of(R.class);\n \n @draft.java.proto.SannoTest.R\n class C{} \n _class _c = _class.of(C.class); \n assertNotNull( $a.firstIn(_c) );\n \n @R\n class D{} \n _class _d = _class.of(D.class); \n assertNotNull( $a.firstIn(_d) ); \n }", "public void testInverseInheritance()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkValueInheritance(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class,\r\n HashMap2ItemChild.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2ItemChild.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }", "@Test\n public void testGetClass() throws Exception {\n Class<?> mainClass = MainGetClassSubClass.class;\n runTest(\n mainClass,\n ImmutableList.of(mainClass, SuperClass.class, SubClass.class),\n // Prevent SuperClass from being merged into SubClass.\n keepMainProguardConfiguration(mainClass, ImmutableList.of(\"-keep class **.SuperClass\")),\n this::checkAllClassesPresentWithDefaultConstructor);\n }", "boolean hasEnclosingInstance(ClassType encl);", "public void test642_smartLifting3() {\n \n runConformTest(\n new String[] {\n\t\t\"T642sl3Main.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3Main {\\n\" +\n\t\t\t \" public static void main(String[] args) {\\n\" +\n\t\t\t \" Team642sl3_1 t = new Team642sl3_3();\\n\" +\n\t\t\t \" T642sl3_2 o = new T642sl3_3();\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" System.out.print(t.t1(o));\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_4 extends Team642sl3_3 {\\n\" +\n\t\t\t \" public class Role642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_4.this.toString() + \\\".Role642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_3 extends T642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_1 {\\n\" +\n\t\t\t \" public class Role642sl3_1 extends T642sl3_6 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public abstract class Role642sl3_2 extends Role642sl3_1 playedBy T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public class Role642sl3_3 extends Role642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_1.this.toString() + \\\".Role642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String t1(T642sl3_2 as Role642sl3_1 obj) {\\n\" +\n\t\t\t \" return obj.toString();\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_4.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_4 extends T642sl3_2 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_2 extends Team642sl3_1 {\\n\" +\n\t\t\t \" public class Role642sl3_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_2.this.toString() + \\\".Role642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" public class Role642sl3_4 extends Role642sl3_3 playedBy T642sl3_3 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_2.this.toString() + \\\".Role642sl3_4\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_5.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_5 extends T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_1.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_1\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"Team642sl3_3.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public team class Team642sl3_3 extends Team642sl3_2 {\\n\" +\n\t\t\t \" public class Role642sl3_5 extends Role642sl3_3 playedBy T642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return Team642sl3_3.this.toString() + \\\".Role642sl3_5\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"Team642sl3_3\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_6.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public class T642sl3_6 extends T642sl3_5 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_6\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\",\n\t\t\"T642sl3_2.java\",\n\t\t\t \"\\n\" +\n\t\t\t \"public abstract class T642sl3_2 extends T642sl3_1 {\\n\" +\n\t\t\t \" public String toString() {\\n\" +\n\t\t\t \" return \\\"T642sl3_2\\\";\\n\" +\n\t\t\t \" }\\n\" +\n\t\t\t \"}\\n\" +\n\t\t\t \" \\n\"\n },\n \"Team642sl3_3.Role642sl3_4\");\n }", "public void shouldAddSubclassAxiom(OWLOntologyManager manager, OWLClass classA, OWLClass classB) throws OWLOntologyCreationException,OWLOntologyStorageException {\n\t\tOWLOntology ontology = manager.getOntology(currentOntologyID); \n\t\t\t\n\t\t// Now we want to specify that A is a subclass of B. To do this, we add\n\t\t// a subclass axiom. A subclass axiom is simply an object that specifies\n\t\t// that one class is a subclass of another class. We need a data factory\n\t\t// to create various object from. Each manager has a reference to a data\n\t\t// factory that we can use.\n\t\tOWLDataFactory factory = manager.getOWLDataFactory();\n\t\n\t\t// Now create the axiom\n\t\tOWLAxiom axiom = factory.getOWLSubClassOfAxiom(classA, classB);\n\t\t\n\t\t// We now add the axiom to the ontology, so that the ontology states\n\t\t// that A is a subclass of B. To do this we create an AddAxiom change\n\t\t// object. At this stage neither classes A or B, or the axiom are\n\t\t// contained in the ontology. We have to add the axiom to the ontology.\n\t\tAddAxiom addAxiom = new AddAxiom(ontology, axiom);\n\t\t// We now use the manager to apply the change\n\t\tmanager.applyChange(addAxiom);\n\t\n\t}", "@Test\n public void testCheckCast() throws Exception {\n Class<?> mainClass = MainCheckCastSubClass.class;\n runTest(\n mainClass,\n ImmutableList.of(mainClass, SuperClass.class, SubClass.class),\n keepMainProguardConfiguration(mainClass),\n (ignoreMainClass, ignoreProgramClasses, inspector) -> {\n assertTrue(inspector.clazz(mainClass).isPresent());\n assertTrue(inspector.clazz(SubClass.class).isPresent());\n // SuperClass may have been merged with SubClass.\n inspector.forAllClasses(this::checkPresentWithDefaultConstructor);\n });\n }", "public void testGeneralizationImpl_CorrectType() {\n assertEquals(\"equal value expected.\",\n GeneralizationImpl.class.getSuperclass(), RelationshipAbstractImpl.class);\n assertTrue(\"true value expected.\",\n Generalization.class.isAssignableFrom(GeneralizationImpl.class));\n }", "public void test_sf_934528() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n \n Resource r = (Resource) OWL.Thing.inModel( m );\n OntClass thingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( thingClass );\n \n r = (Resource) OWL.Nothing.inModel( m );\n OntClass nothingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( nothingClass );\n }", "public FE_isSubj() { this.name = \"isSubj\";\t}", "@Test(description = \"positive test that a derived relationship is defined\")\n public void t23a_positiveTestDerived()\n throws Exception\n {\n this.createNewData(\"Parent\")\n .create();\n this.createNewData(\"Test\")\n .create()\n .update(\"\")\n .setValue(\"derived\", AbstractTest.PREFIX + \"Parent\")\n .update(\"\")\n .checkExport();\n }" ]
[ "0.69069886", "0.6470291", "0.6394809", "0.6239125", "0.6151987", "0.6123878", "0.6096734", "0.60889167", "0.60889167", "0.60889167", "0.60833156", "0.58997685", "0.5898393", "0.58652514", "0.58652514", "0.58652514", "0.58652514", "0.58652514", "0.58652514", "0.58652514", "0.58652514", "0.58652514", "0.58652514", "0.58652514", "0.58652514", "0.58652514", "0.58652514", "0.58601964", "0.58582443", "0.58582443", "0.58582443", "0.58310264", "0.5826786", "0.5826786", "0.5826786", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58235353", "0.58091193", "0.5778788", "0.57385325", "0.5670345", "0.56215394", "0.5583879", "0.55360895", "0.5528007", "0.5458417", "0.5446217", "0.54063165", "0.5381557", "0.53436655", "0.5342497", "0.5338548", "0.5319842", "0.5309408", "0.53076607", "0.5304439", "0.52983946", "0.529832", "0.52936393", "0.5291546", "0.52871066", "0.52844197", "0.5280404", "0.5276662", "0.5276506", "0.5252485", "0.5250197", "0.5248625", "0.52455854", "0.52361465", "0.52310455", "0.5229375", "0.52248526", "0.52181417", "0.521426", "0.5204943", "0.5171629", "0.5171456", "0.51588273", "0.5155825", "0.51493275", "0.5146668", "0.51465523", "0.51433915", "0.51426446", "0.51354146" ]
0.0
-1
Test case for SF bug 927641 list direct subclasses
public void test_sf_927641() { String NS = "http://example.org/test#"; OntModel m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); OntClass c0 = m0.createClass( NS + "C0" ); OntClass c1 = m0.createClass( NS + "C1" ); OntClass c2 = m0.createClass( NS + "C2" ); OntClass c3 = m0.createClass( NS + "C3" ); c0.addSubClass( c1 ); c1.addSubClass( c2 ); c2.addEquivalentClass( c3 ); // now c1 is the direct super-class of c2, even allowing for the equiv with c3 assertFalse( "pass 1: c0 should not be a direct super of c2", c2.hasSuperClass( c0, true ) ); assertFalse( "pass 1: c3 should not be a direct super of c2", c2.hasSuperClass( c3, true ) ); assertFalse( "pass 1: c2 should not be a direct super of c2", c2.hasSuperClass( c2, true ) ); assertTrue( "pass 1: c1 should be a direct super of c2", c2.hasSuperClass( c1, true ) ); // second pass - with inference m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RULE_INF ); c0 = m0.createClass( NS + "C0" ); c1 = m0.createClass( NS + "C1" ); c2 = m0.createClass( NS + "C2" ); c3 = m0.createClass( NS + "C3" ); c0.addSubClass( c1 ); c1.addSubClass( c2 ); c2.addEquivalentClass( c3 ); // now c1 is the direct super-class of c2, even allowing for the equiv with c3 assertFalse( "pass 2: c0 should not be a direct super of c2", c2.hasSuperClass( c0, true ) ); assertFalse( "pass 2: c3 should not be a direct super of c2", c2.hasSuperClass( c3, true ) ); assertFalse( "pass 2: c2 should not be a direct super of c2", c2.hasSuperClass( c2, true ) ); assertTrue( "pass 2: c1 should be a direct super of c2", c2.hasSuperClass( c1, true ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Collection getSuperclasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "private List<IClass> getChildren(IClass cls) {\n\t\tList<IClass> subclasses = new ArrayList<IClass>();\n\t\tCollections.addAll(subclasses, cls.getDirectSubClasses());\n\t\treturn subclasses;\n\t}", "public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "@Override\n protected void checkSubclass() {\n }", "@Test public void testInheritance () {\n ArrayList<String> point = new ArrayList<String>(\n Arrays.asList(\"qimpp\", \"Point\") );\n GNode pointNode = treeManager.dereference(point);\n\n ArrayList<String> colorPoint = new ArrayList<String>(\n Arrays.asList(\"qimpp\", \"ColorPoint\") );\n GNode colorNode = treeManager.dereference(colorPoint);\n\n assertTrue( colorNode != null );\n assertTrue( pointNode != null );\n GNode g = (GNode)(treeManager.getParent(colorNode).getProperty(\"ClassDeclaration\"));\n \n\n assertTrue( treeManager.getParent(colorNode) == pointNode );\n\n //\n // Test distinction between package names\n //\n\n ArrayList<String> otherColor =\n new ArrayList<String>( Arrays.asList(\"org\", \"fake\",\n \"ColorPoint\"));\n GNode otherColorNode = treeManager.dereference(otherColor);\n\n assertTrue( otherColorNode != null );\n assertTrue( treeManager.getParent( otherColorNode )\n != treeManager.getParent(colorNode) );\n assertTrue( otherColorNode != colorNode );\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@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}", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@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}", "public void testHierarchyInheritance() throws Exception {\n // Create the mime path folders and add some instance\n TestUtilities.createFile(getWorkDir(), \"Editors/text/x-java/org-netbeans-modules-editor-mimelookup-impl-DummySettingImpl.instance\");\n TestUtilities.createFile(getWorkDir(), \"Editors/text/x-jsp/text/x-java/\");\n TestUtilities.sleepForWhile();\n\n {\n Lookup javaLookup = new SwitchLookup(MimePath.parse(\"text/x-java\"));\n Collection javaInstances = javaLookup.lookupAll(DummySetting.class);\n assertEquals(\"Wrong number of instances\", 1, javaInstances.size());\n assertEquals(\"Wrong instance\", DummySettingImpl.class, javaInstances.iterator().next().getClass());\n }\n \n {\n Lookup jspJavaLookup = new SwitchLookup(MimePath.parse(\"text/x-jsp/text/x-java\"));\n Collection jspJavaInstances = jspJavaLookup.lookupAll(DummySetting.class);\n assertEquals(\"Wrong number of instances\", 1, jspJavaInstances.size());\n assertEquals(\"Wrong instance\", DummySettingImpl.class, jspJavaInstances.iterator().next().getClass());\n }\n }", "@Override\r\n public List getComplexChildClasses() throws Exception\r\n {\n return null;\r\n }", "public List<String> getSubClasses(String className, boolean direct) {\n IRI clsIRI = IRI.create(ontologyNamespace + className);\n System.out.println(\"Searching for IRI: \" + clsIRI);\n if (!ontology.containsClassInSignature(clsIRI)) {\n \tSystem.out.println(\"Tag is not present in ontology:\" + className);\n \treturn Collections.EMPTY_LIST;\n }\n // Létrehozzuk az osztály egy példányát és lekérdezzük a leszármazottait.\n OWLClass cls = factory.getOWLClass(clsIRI);\n NodeSet<OWLClass> subClss;\n\t\ttry {\n\t\t\tsubClss = reasoner.getSubClasses(cls, direct);\n\t\t} catch (OWLReasonerRuntimeException e) {\n\t\t\tSystem.err.println(\"Hiba az alosztályok következtetése közben: \" + e.getMessage());\n\t\t\treturn Collections.EMPTY_LIST;\n\t\t}\n List<String> result = new ArrayList<>();\n for(OWLClass i : subClss.getFlattened()) {\n \tif(!i.isBuiltIn())\n \t\tresult.add(i.getIRI().getFragment());\n }\n return result;\n }", "Iterator<String> subTypes(String className) {\n\treturn new RandomizedIterator(className, this);\n }", "private void findAllSubclassesOneClass(Class theClass,\r\n\t\t\tList listAllClasses, List listSubClasses) {\r\n\t\tfindAllSubclassesOneClass(theClass, listAllClasses, listSubClasses,\r\n\t\t\t\tfalse);\r\n\t}", "private ArrayList findAllSubclasses(List listSuperClasses,\r\n\t\t\tList listAllClasses) {\r\n\t\treturn findAllSubclasses(listSuperClasses, listAllClasses, false);\r\n\t}", "public static void main(String[] args) {\n// subClass[] classes = new subClass[1];\n// System.out.println(superClass.value);\n// System.out.println(subClass.value);\n subClass s = new subClass();\n s.lala();\n// superClass p = s;\n// System.out.println(s==p);\n// System.out.println(s.name);\n// System.out.println(s.value);\n// subClass.haha();\n// s.heihei();\n// System.out.println( p.name);\n// System.out.println(p.value);\n// p.haha();\n// p.heihei();\n\n }", "public void test_inheritence() {\n assertTrue(\"invalid inheritence.\", Task.class.getSuperclass() == BaseTaskEntity.class);\n }", "int getSuperClassesCount();", "org.jetbrains.r.classes.S4ClassInfo.S4SuperClass getSuperClasses(int index);", "Set<Concept> getSubclasses(Concept concept);", "private void fetchSubclassHierarchy() throws IOException {\n\t\tSystem.out.println(\"Fetching subclass relationships from SPARQL ...\");\n\t\ttry (InputStream response = runSparqlQuery(\"PREFIX ps: <http://www.wikidata.org/prop/statement/>\\n\"\n\t\t\t\t+ \"PREFIX p: <http://www.wikidata.org/prop/>\\n\"\n\t\t\t\t+ \"SELECT ?subC ?supC WHERE { ?subC p:P279/ps:P279 ?supC }\")) {\n\t\t\tSystem.out.println(\"Processing subclass relationships ...\");\n\n\t\t\t// DEBUG\n\t\t\t// BufferedReader br = new BufferedReader(new InputStreamReader(\n\t\t\t// response));\n\t\t\t// String read;\n\t\t\t// while ((read = br.readLine()) != null) {\n\t\t\t// System.out.println(read);\n\t\t\t// }\n\t\t\t// System.out.println(\"*** done ***\");\n\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\tJsonNode root = mapper.readTree(response);\n\t\t\tJsonNode bindings = root.path(\"results\").path(\"bindings\");\n\t\t\tint count = 0;\n\t\t\tfor (JsonNode binding : bindings) {\n\t\t\t\tcount++;\n\t\t\t\tInteger subId = getNumId(binding.path(\"subC\").path(\"value\")\n\t\t\t\t\t\t.asText(), true);\n\t\t\t\tInteger supId = getNumId(binding.path(\"supC\").path(\"value\")\n\t\t\t\t\t\t.asText(), true);\n\t\t\t\tif (supId == 0 || subId == 0) {\n\t\t\t\t\tSystem.out.println(\"Ignoring \"\n\t\t\t\t\t\t\t+ binding.path(\"subC\").path(\"value\").asText()\n\t\t\t\t\t\t\t+ \" subClassOf \"\n\t\t\t\t\t\t\t+ binding.path(\"supC\").path(\"value\").asText());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tgetClassRecord(subId).directSuperClasses.add(supId);\n\t\t\t\tClassRecord superClass = getClassRecord(supId);\n\t\t\t\tsuperClass.subclassCount++;\n\t\t\t\tif (count % 10000 == 0) {\n\t\t\t\t\tSystem.out.print(\"*\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"Found \" + count\n\t\t\t\t\t+ \" subclass relationships among \"\n\t\t\t\t\t+ this.classRecords.size() + \" Wikidata items.\");\n\n\t\t\tSystem.out.println(\"Computing indirect subclass relationships ...\");\n\t\t\tfor (ClassRecord classRecord : this.classRecords.values()) {\n\t\t\t\tfor (Integer superClass : classRecord.directSuperClasses) {\n\t\t\t\t\taddSuperClasses(superClass, classRecord);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Computing total subclass counts ...\");\n\t\t\tfor (ClassRecord classRecord : this.classRecords.values()) {\n\t\t\t\tfor (Integer superClass : classRecord.superClasses) {\n\t\t\t\t\tgetClassRecord(superClass).allSubclassCount++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tSystem.out.println(\"Preprocessing of class hierarchy complete.\");\n\t\t}\n\t}", "private static <T> Collection<Class<?>> getClassHierarchy(T instance) {\n Collection<Class<?>> hierarchy = new LinkedList<>();\n Class<?> clazz = (Class<?>) instance;\n while (clazz != null) {\n hierarchy.add(clazz);\n clazz = clazz.getSuperclass();\n }\n return hierarchy;\n }", "private Stream<TypeElement> getConcreteSubclassesStream(String baseClassName) {\n final TypeElement baseFlowTypeElement =\n sourceRoot.getElementUtils().getTypeElement(baseClassName);\n return ElementFilter.typesIn(sourceRoot.getIncludedElements()).stream()\n .filter(\n typeElement ->\n sourceRoot\n .getTypeUtils()\n .isSubtype(typeElement.asType(), baseFlowTypeElement.asType())\n && !typeElement.getModifiers().contains(Modifier.ABSTRACT));\n }", "private void findAllSubclassesOneClass(Class theClass,\r\n\t\t\tList listAllClasses, List listSubClasses, boolean innerClasses) {\r\n\t\tIterator iterClasses = null;\r\n\t\tString strClassName = null;\r\n\t\tString strSuperClassName = null;\r\n\t\tClass c = null;\r\n\t\tClass cParent = null;\r\n\t\tboolean bIsSubclass = false;\r\n\t\tstrSuperClassName = theClass.getName();\r\n\t\titerClasses = listAllClasses.iterator();\r\n\t\twhile (iterClasses.hasNext()) {\r\n\t\t\tstrClassName = (String) iterClasses.next();\r\n\t\t\t// only check classes if they are not inner classes\r\n\t\t\t// or we intend to check for inner classes\r\n\t\t\tif ((strClassName.indexOf(\"$\") == -1) || innerClasses) {\r\n\t\t\t\t// might throw an exception, assume this is ignorable\r\n\t\t\t\ttry {\r\n\t\t\t\t\t// Class.forName() doesn't like nulls\r\n\t\t\t\t\tif (strClassName == null)\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\tif (strClassName.endsWith(\".groovy\")) {\r\n\t\t\t\t\t\tGroovyClassLoader loader = new GroovyClassLoader(Thread.currentThread()\r\n\t\t\t\t\t\t\t\t.getContextClassLoader());\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tc = loader.parseClass(loader.getResourceAsStream(strClassName));\r\n\t\t\t\t\t\t} catch (Throwable e) {\r\n\t\t\t\t\t\t\ttry\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tFile gFile = new File(strClassName);\r\n\t\t\t\t\t\t\t\tc = loader.parseClass(new FileInputStream(gFile));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcatch(Throwable e1)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"file load failed: \" + e1);\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\tc = Class.forName(strClassName, false, Thread\r\n\t\t\t\t\t\t\t\t.currentThread().getContextClassLoader());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!c.isInterface()\r\n\t\t\t\t\t\t\t&& !Modifier.isAbstract(c.getModifiers())) {\r\n\t\t\t\t\t\tbIsSubclass = theClass.isAssignableFrom(c);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tbIsSubclass = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (bIsSubclass) {\r\n\t\t\t\t\t\tlistSubClasses.add(c);\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Throwable ignored) {\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public Collection getSubclasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "@Test\r\n public void testInheritance() throws Exception {\r\n TestHelper.assertSuperclass(instance.getClass().getSuperclass(), GetDocumentsContestAction.class);\r\n }", "private static void getClassHierarchy(Class clazz) {\n List<String> classNames = new ArrayList<>();\n while (clazz != null) {\n classNames.add(clazz.getName());\n clazz = clazz.getSuperclass();\n }\n for (int i = classNames.size() - 1; i >= 0; i--) {\n System.out.println(classNames.get(i));\n if (i > 0) {\n System.out.println(\" ^\");\n System.out.println(\" |\");\n }\n }\n }", "public Iterator<String> listSuperClasses(String ontClass, boolean direct)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tOntClass ontC = obtainOntClass(ontClass);\r\n\t\t\treturn new ToStringIterator<String>(ontC.listSuperClasses(direct));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\treturn new ArrayList<String>().iterator();\r\n\t\t}\r\n\t}", "public int[] getSubclasses() {\n return subclasses;\n }", "java.util.List<org.mojolang.mojo.lang.NominalType> \n getInheritsList();", "java.util.List<org.jetbrains.r.classes.S4ClassInfo.S4SuperClass> \n getSuperClassesList();", "public void testHierarchyRootInheritance() throws Exception {\n TestUtilities.createFile(getWorkDir(), \"Editors/text/x-jsp/text/x-java/\");\n TestUtilities.createFile(getWorkDir(), \"Editors/org-netbeans-modules-editor-mimelookup-impl-DummySettingImpl.instance\");\n TestUtilities.sleepForWhile();\n\n {\n Lookup lookup = new SwitchLookup(MimePath.parse(\"\"));\n Collection instances = lookup.lookupAll(DummySetting.class);\n assertEquals(\"Wrong number of instances\", 1, instances.size());\n assertEquals(\"Wrong instance\", DummySettingImpl.class, instances.iterator().next().getClass());\n }\n \n {\n Lookup jspLookup = new SwitchLookup(MimePath.parse(\"text/x-jsp\"));\n Collection jspInstances = jspLookup.lookupAll(DummySetting.class);\n assertEquals(\"Wrong number of instances\", 1, jspInstances.size());\n assertEquals(\"Wrong instance\", DummySettingImpl.class, jspInstances.iterator().next().getClass());\n }\n \n {\n Lookup javaLookup = new SwitchLookup(MimePath.parse(\"text/x-jsp/text/x-java\"));\n Collection javaInstances = javaLookup.lookupAll(DummySetting.class);\n assertEquals(\"Wrong number of instances\", 1, javaInstances.size());\n assertEquals(\"Wrong instance\", DummySettingImpl.class, javaInstances.iterator().next().getClass());\n }\n }", "public Iterator<String> listSubClasses(String ontClass, boolean direct)\r\n\t{\r\n\t\ttry{\r\n\t\t\tOntClass ontC = obtainOntClass(ontClass);\r\n\t\t\treturn new ToStringIterator<String>(ontC.listSubClasses(direct));\r\n\t\t}catch(Exception e)\r\n\t\t{\r\n\t\t\treturn new ArrayList<String>().iterator();\r\n\t\t}\r\n\t}", "private ArrayList findAllSubclasses(List listSuperClasses,\r\n\t\t\tList listAllClasses, boolean innerClasses) {\r\n\t\tIterator iterClasses = null;\r\n\t\tArrayList listSubClasses = null;\r\n\t\tString strClassName = null;\r\n\t\tClass tempClass = null;\r\n\t\tlistSubClasses = new ArrayList();\r\n\t\titerClasses = listSuperClasses.iterator();\r\n\t\twhile (iterClasses.hasNext()) {\r\n\t\t\tstrClassName = (String) iterClasses.next();\r\n\t\t\t// only check classes if they are not inner classes\r\n\t\t\t// or we intend to check for inner classes\r\n\t\t\tif ((strClassName.indexOf(\"$\") == -1) || innerClasses) {\r\n\t\t\t\t// might throw an exception, assume this is ignorable\r\n\t\t\t\ttry {\r\n\t\t\t\t\ttempClass = Class.forName(strClassName, false, Thread\r\n\t\t\t\t\t\t\t.currentThread().getContextClassLoader());\r\n\t\t\t\t\tfindAllSubclassesOneClass(tempClass, listAllClasses,\r\n\t\t\t\t\t\t\tlistSubClasses, innerClasses);\r\n\t\t\t\t\t// call by reference - recursive\r\n\t\t\t\t} catch (Throwable ignored) {\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn listSubClasses;\r\n\t}", "@Test\n\tpublic void findTypeList() {\n\t}", "@Test\n public void atBaseTypeTest() {\n // TODO: test atBaseType\n }", "public void _testCreateGroovyClass2GenericSuper() throws Exception {\n \t\tIPackageFragment pack1= fSourceFolder.createPackageFragment(\"test1\", false, null);\n \n \t\tNewClassWizardPage wizardPage= new NewClassWizardPage();\n \t\twizardPage.setPackageFragmentRoot(fSourceFolder, true);\n \t\twizardPage.setPackageFragment(pack1, true);\n \t\twizardPage.setEnclosingTypeSelection(false, true);\n \t\twizardPage.setTypeName(\"E\", true);\n \n \t\twizardPage.setSuperClass(\"java.util.ArrayList<String>\", true);\n \n \t\tList<String> interfaces= new ArrayList<String>();\n \t\twizardPage.setSuperInterfaces(interfaces, true);\n \n \t\twizardPage.setMethodStubSelection(false, false, false, true);\n \t\twizardPage.setAddComments(true, true);\n \t\twizardPage.enableCommentControl(true);\n \n \t\twizardPage.createType(null);\n \n \t\tString actual= wizardPage.getCreatedType().getCompilationUnit().getSource();\n \n \t\tStringBuffer buf= new StringBuffer();\n \t\tbuf.append(\"/**\\n\");\n \t\tbuf.append(\" * File\\n\");\n \t\tbuf.append(\" */\\n\");\n \t\tbuf.append(\"package test1;\\n\");\n \t\tbuf.append(\"\\n\");\n \t\tbuf.append(\"import java.util.ArrayList;\\n\");\n \t\tbuf.append(\"\\n\");\n \t\tbuf.append(\"/**\\n\");\n \t\tbuf.append(\" * Type\\n\");\n \t\tbuf.append(\" */\\n\");\n \t\tbuf.append(\"class E extends ArrayList<String> {\\n\");\n \t\tbuf.append(\" /* class body */\\n\");\n \t\tbuf.append(\"}\\n\");\n \t\tString expected= buf.toString();\n \n assertEqualLines(expected, actual);\n \t}", "private void setClasses(OWLClass cls, int depth, Set<String> supers) {\n\n\t\tif (depth > 0) {\n\t\t\tString nm = render(cls);\n\t\t\tsupersInfo.put(nm, supers);\n\t\t\tSet<OWLClass> children = theProvider.getDescendants(cls);\n\t\t\tString lbl = (children.size() > 0 && depth == 1) ? nm + \"+\" : nm;\n\t\t\tPair<String, OWLClass> nameInfo = new Pair<String, OWLClass>(lbl,\n\t\t\t\t\tcls);\n\t\t\tclassMap.put(nm, nameInfo);\n\t\t\tif (depth > 1) {\n\t\t\t\tSet<String> supers2 = new HashSet<String>(supers);\n\t\t\t\tsupers2.add(nm);\n\t\t\t\tint newDepth = --depth;\n\t\t\t\tfor (OWLClass sub : theProvider.getChildren(cls)) {\n\t\t\t\t\tsetClasses(sub, newDepth, supers2);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// collect the spiders info\n\t\t\tSet<OWLIndividual> inds = cls.getIndividuals(mgr\n\t\t\t\t\t.getActiveOntologies());\n\t\t\t// TODO all individuals are reported as belonging to Thing, but not\n\t\t\t// to the other\n\t\t\t// superclasses of the class within which they are actually defined.\n\t\t\t// For now,\n\t\t\t// only show spiders for the actual class, c, within which they are\n\t\t\t// defined, and work\n\t\t\t// out how to show spiders in any superclass of c later on\n\t\t\tif (showSpiders && !inds.isEmpty() && !nm.equals(\"Thing\")) {\n\t\t\t\tArrayList<Pair<String, List<CVizZone>>> spInfo = new ArrayList<Pair<String, List<CVizZone>>>();\n\t\t\t\tfor (OWLIndividual i : inds) {\n\t\t\t\t\tif (i.isNamed()) {\n\t\t\t\t\t\tspInfo.add(new Pair<String, List<CVizZone>>(ren\n\t\t\t\t\t\t\t\t.render((OWLEntity) i),\n\t\t\t\t\t\t\t\tnew ArrayList<CVizZone>()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tindMap.put(nm, spInfo);\n\t\t\t}\n\t\t\t// collect the children info\n\t\t\tSet<String> childrenStr = new HashSet<String>();\n\t\t\tIterator<OWLClass> it = children.iterator();\n\t\t\tOWLClass c;\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tchildrenStr.add(render(it.next()));\n\t\t\t}\n\t\t\tchildrenInfo.put(nm, childrenStr);\n\n\t\t\t// collect the disjointness info\n\t\t\tNodeSet<OWLClass> ds = theReasoner.getDisjointClasses(cls);\n\t\t\tSet<String> disjoints = new HashSet<String>();\n\t\t\tIterator<Node<OWLClass>> it2 = ds.iterator();\n\t\t\twhile (it2.hasNext()) {\n\t\t\t\tc = it2.next().getRepresentativeElement();\n\t\t\t\tdisjoints.add(render(c));\n\t\t\t}\n\t\t\tif (disjoints.size() > 0)\n\t\t\t\tdisjointsInfo.put(nm, disjoints);\n\t\t\t// collect the equivalent classes info\n\t\t\tNode<OWLClass> equivs = theReasoner.getEquivalentClasses(cls);\n\t\t\tif (!equivs.isSingleton())\n\t\t\t\tequivsInfo.put(nm, new HashSet<OWLClass>(equivs.getEntities()));\n\t\t\t// collect the union classes info\n\t\t\tSet<OWLEquivalentClassesAxiom> eq;\n\t\t\tfor (OWLOntology ont : activeOntologies) {\n\t\t\t\teq = ont.getEquivalentClassesAxioms(cls);\n\t\t\t\tif (eq.size() > 0) {\n\t\t\t\t\tfor (OWLEquivalentClassesAxiom a : eq) {\n\t\t\t\t\t\tboolean isUnion = true;\n\t\t\t\t\t\tClassExpressionType t;\n\t\t\t\t\t\tfor (OWLClassExpression e : a.getClassExpressions()) {\n\t\t\t\t\t\t\tt = e.getClassExpressionType();\n\t\t\t\t\t\t\tif (!(t.equals(ClassExpressionType.OWL_CLASS) || t\n\t\t\t\t\t\t\t\t\t.equals(ClassExpressionType.OBJECT_UNION_OF))) {\n\t\t\t\t\t\t\t\tisUnion = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isUnion) {\n\t\t\t\t\t\t\tSet<OWLClass> us = a.getClassesInSignature();\n\t\t\t\t\t\t\tus.remove(cls);\n\t\t\t\t\t\t\tif (us.size() > 0)\n\t\t\t\t\t\t\t\tunionsInfo.put(render(cls), us);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// collect the inconsistent classes info\n\t\t\tif (!theReasoner.isSatisfiable(cls)) {\n\t\t\t\tinconsistentClasses.add(nm);\n\t\t\t}\n\t\t}\n\t}", "public void testNormalInheritance()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkValueInheritance(pmf,\r\n HashMap1.class,\r\n ContainerItem.class,\r\n ContainerItemChild.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap1.class);\r\n clean(ContainerItem.class);\r\n }\r\n }", "@Test\n public void test6(){\n System.out.println(Son.son);\n System.out.println(Parent.parent);\n }", "protected abstract void registerSuperTypes();", "private Set<String> classSet(String whichClass) {\n return subclasses.get(whichClass);\n }", "@Test\n\tpublic void testInheritance() throws Exception {\n\t\ttestWith(TestClassSubClass.getInstance());\n\t}", "Set<Concept> getSuperclasses(Concept concept);", "private boolean addKnown(String superclass, String subclass) {\n\tSet<String> v;\n v = classSet(superclass);\n if (v == null) {\n v = new ConcurrentSkipListSet<String>();\n Set<String> existed = subclasses.putIfAbsent(superclass, v);\n if (existed != null) v = existed; // discard new set.\n }\n\treturn v.add(subclass);\n }", "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 }", "public Collection<URI> getDirectSuperClasses(\n final String repositoryName,\n final URI term) {\n //Preconditions\n assert \"OpenCyc\".equals(repositoryName) : \"repositoryName must be OpenCyc\";\n assert term != null : \"term must not be null\";\n\n final Collection<URI> superClassTerms = new ArrayList<>();\n final Integer id = uriToIdDictionary.get(RDFUtility.formatResource(term));\n if (id != null) {\n final List<Integer> superClasses = superClassDictionary.get(id);\n if (superClasses != null) {\n for (final Integer superClass : superClasses) {\n superClassTerms.add(RDFUtility.makeURIFromAlias(uris.get(superClass)));\n }\n }\n }\n return superClassTerms;\n }", "boolean isSubclass(Concept x, Concept y);", "XClass getSuperclass();", "public void testGetClasses() throws Exception {\n assertSetEquals(HasMemberClasses.class.getClasses(),\n HasMemberClassesSuperclass.B.class, HasMemberClasses.H.class);\n }", "private void setupInheritanceStructure() throws PhiException{\n\n a = new PhiCollection();\n b = new PhiCollection();\n c = new PhiCollection();\n d = new PhiCollection();\n aSuper = new PhiCollection();\n bSuper = new PhiCollection();\n PhiCollection cSuper = new PhiCollection();\n\n //Setup inheritance\n aSuper.createMember(new PhiInt(1));\n aSuper.setUnnamed(0, b);\n aSuper.setUnnamed(1, c);\n a.setNamed(\"super\", aSuper);\n\n bSuper.createMember(new PhiInt(0));\n bSuper.setUnnamed(0, d);\n b.setNamed(\"super\", bSuper);\n\n cSuper.createMember(new PhiInt(0));\n cSuper.setUnnamed(0, d);\n c.setNamed(\"super\", cSuper);\n\n //Fill collections\n a.createMember(new PhiSymbol(\"test1\"));\n a.createMember(new PhiInt(0));\n a.setNamed(\"test1\", new PhiString(\"a\"));\n a.setUnnamed(0, new PhiInt(1));\n\n b.createMember(new PhiSymbol(\"test1\"));\n b.createMember(new PhiSymbol(\"test2\"));\n b.createMember(new PhiInt(0));\n b.setNamed(\"test1\", new PhiString(\"b\"));\n b.setNamed(\"test2\", new PhiString(\"x\"));\n b.setUnnamed(0, new PhiInt(2));\n\n c.createMember(new PhiSymbol(\"test1\"));\n c.createMember(new PhiInt(1));\n c.setNamed(\"test1\", new PhiString(\"c\"));\n c.setUnnamed(0, new PhiInt(3));\n c.setUnnamed(1, new PhiInt(5));\n\n d.createMember(new PhiSymbol(\"test1\"));\n d.createMember(new PhiSymbol(\"test2\"));\n d.createMember(new PhiInt(1));\n d.setNamed(\"test1\", new PhiString(\"d\"));\n d.setNamed(\"test2\", new PhiString(\"y\"));\n d.setUnnamed(0, new PhiInt(4));\n d.setUnnamed(1, new PhiInt(6));\n }", "protected Set<NewType> getNewSubTypes() {\r\n\t\tfinal Set<NewType> subTypes = new HashSet<NewType>();\r\n\r\n\t\tfinal GeneratorContext context = this.getGeneratorContext();\r\n\t\tfinal Iterator<NewType> newTypesIterator = context.getNewTypes().iterator();\r\n\r\n\t\twhile (newTypesIterator.hasNext()) {\r\n\t\t\tfinal NewType newType = newTypesIterator.next();\r\n\t\t\tif (newType.getSuperType() == this) {\r\n\t\t\t\tsubTypes.add(newType);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn subTypes;\r\n\t}", "void addTypes(EntryRep bits) {\n\tString classFor = bits.classFor();\n\tString[] superclasses = bits.superclasses();\n\n\t//The given EntryRep will add its className to the\n\t//subtype list of all its supertypes.\n\n\tString prevClass = classFor;\n\tfor (int i = 0; i < superclasses.length; i++) {\n\t if (!addKnown(superclasses[i], prevClass)) {\n\t\treturn;\n\t }\n\t prevClass = superclasses[i];\n\t}\n\n\t// If we are here prevClass must have java.Object as its\n\t// direct superclass (we don't store \"java.Object\" in\n\t// EntryRep.superclasses since that would be redundant) and\n\t// prevClass is not already in the the tree. Place it in the\n\t// \"net.jini.core.entry.Entry\" bucket so it does not get lost\n\t// if it does not have any sub-classes.\n\t//\n\t// Fix suggested by Lutz Birkhahn <[email protected]>\n\taddKnown(ROOT, prevClass);\n }", "@Test\n public void test7(){\n System.out.println(Parent.parent);\n System.out.println(Son.son);\n }", "List memberClasses();", "public List<Class<?>> getSuperClasses(Class<?> aClass) {\n\t\treturn ModelClasses.getAllSuperClasses(aClass);\n\t}", "public void testAncestry()\n {\n checkClass(HStaticIconTest.class);\n\n TestUtils.testExtends(HStaticIcon.class, HVisible.class);\n TestUtils.testImplements(HStaticIcon.class, HNoInputPreferred.class);\n }", "@DSComment(\"From safe class list\")\n @DSSafe(DSCat.SAFE_LIST)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:56:09.367 -0500\", hash_original_method = \"4A1605B03FE1E22048A20B9E05E481A5\", hash_generated_method = \"4396D2BAEFB73347858E563F022F81BC\")\n \n@Override\n public String toString() {\n return getClass().getName() + '(' + getName() + ')';\n }", "public void testDiscriminator()\r\n\t{\r\n\r\n\t\tEntityManagerInterface entityManagerInterface = EntityManager.getInstance();\r\n\t\tDomainObjectFactory factory = DomainObjectFactory.getInstance();\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Step 1\r\n\t\t\tEntityInterface specimen = factory.createEntity();\r\n\t\t\tspecimen.setName(\"specimen\");\r\n\t\t\tspecimen.setAbstract(true);\r\n\r\n\t\t\tEntityInterface tissueSpecimen = factory.createEntity();\r\n\t\t\ttissueSpecimen.setName(\"tissueSpecimen\");\r\n\t\t\ttissueSpecimen.setParentEntity(specimen);\r\n\t\t\ttissueSpecimen.setDiscriminatorColumn(\"SPECIMEN_CLASS\");\r\n\t\t\ttissueSpecimen.setDiscriminatorValue(\"Tissue\");\r\n\r\n\t\t\tEntityInterface cellSpecimen = factory.createEntity();\r\n\t\t\tcellSpecimen.setName(\"cellSpecimen\");\r\n\t\t\tcellSpecimen.setParentEntity(specimen);\r\n\t\t\tcellSpecimen.setDiscriminatorColumn(\"SPECIMEN_CLASS\");\r\n\t\t\tcellSpecimen.setDiscriminatorValue(\"Cell\");\r\n\r\n\t\t\tspecimen = entityManagerInterface.persistEntity(specimen);\r\n\t\t\ttissueSpecimen = entityManagerInterface.persistEntity(tissueSpecimen);\r\n\t\t\tcellSpecimen = entityManagerInterface.persistEntity(cellSpecimen);\r\n\t\t\tcellSpecimen = entityManagerInterface.persistEntity(cellSpecimen);\r\n\r\n\t\t\tcellSpecimen = entityManagerInterface.getEntityByIdentifier(cellSpecimen.getId());\r\n\t\t\ttissueSpecimen = entityManagerInterface.getEntityByIdentifier(tissueSpecimen.getId());\r\n\r\n\t\t\tassertEquals(\"SPECIMEN_CLASS\", cellSpecimen.getDiscriminatorColumn());\r\n\t\t\tassertEquals(\"Cell\", cellSpecimen.getDiscriminatorValue());\r\n\r\n\t\t\tassertEquals(\"SPECIMEN_CLASS\", tissueSpecimen.getDiscriminatorColumn());\r\n\t\t\tassertEquals(\"Tissue\", tissueSpecimen.getDiscriminatorValue());\r\n\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tLogger.out.debug(DynamicExtensionsUtility.getStackTrace(e));\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public Collection getDescendantClasses(OWLClass aClass, ReasonerTaskListener taskListener) throws DIGReasonerException;", "private static String [] init(String className, TypeTree tree) {\n // Use a Linked to avoid resizing.\n Collection<String> types = new LinkedList<String>();\n String [] typearray;\n\t if (className.equals(EntryRep.matchAnyClassName())) {\n\t\t// handle \"match any\" specially\" -- search from ROOT\n\t\t// Simplification suggested by \n\t\t// Lutz Birkhahn <[email protected]>\n\t\tclassName = ROOT;\n\t } else {\n\t\t// add this class\n\t\ttypes.add(className);\n\t }\n\n\t // add all subclasses\n\t walkTree(tree.classSet(className), types, tree);\n\n\t // Convert it to an array and then randomize\n\t typearray = types.toArray(new String[types.size()]);\n\t int randnum = 0;\n\t String tmpobj = null;\n int length = typearray.length;\n\t for (int i = 0; i < length; i++) {\n\t\trandnum = numgen.nextInt(length - i);\n\t\ttmpobj = typearray[i];\n\t\ttypearray[i] = typearray[randnum];\n\t\ttypearray[randnum] = tmpobj;\n\t }\n return typearray;\n\t}", "char[] getSuperclassName();", "@Override\n public List<BaiseeClazz> findAllClazzInfo() {\n return claMapper.findAllClazzInfo();\n }" ]
[ "0.6571754", "0.646135", "0.6440412", "0.6440412", "0.6440412", "0.6394533", "0.6388098", "0.63366914", "0.63155025", "0.6248408", "0.6248408", "0.6248408", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6229613", "0.6228505", "0.6228505", "0.6228505", "0.62267995", "0.62267995", "0.62267995", "0.62267995", "0.62267995", "0.62267995", "0.62267995", "0.62267995", "0.62267995", "0.62267995", "0.62267995", "0.62267995", "0.62267995", "0.62267995", "0.6219612", "0.6187473", "0.6167369", "0.61418337", "0.61082554", "0.6098637", "0.6041023", "0.601385", "0.60003054", "0.59870493", "0.59816283", "0.5978252", "0.5930779", "0.5926693", "0.59237885", "0.5901671", "0.5896364", "0.58882177", "0.5887207", "0.5885162", "0.5867933", "0.5822736", "0.5818127", "0.5814099", "0.5776872", "0.576443", "0.5758429", "0.57499415", "0.5740481", "0.5708437", "0.56762964", "0.56731045", "0.56698453", "0.5635123", "0.55995625", "0.55884963", "0.5587548", "0.5584861", "0.5555831", "0.5549832", "0.5549815", "0.55347097", "0.55257237", "0.5511245", "0.55086887", "0.550503", "0.5498923", "0.5496906", "0.5496279", "0.5491994", "0.54697466", "0.5469302", "0.5455147", "0.5453651" ]
0.5514017
89
Test case for SF bug 934528 conversion exception with owl:Thing and owl:Nothing when no reasoner
public void test_sf_934528() { OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); Resource r = (Resource) OWL.Thing.inModel( m ); OntClass thingClass = (OntClass) r.as( OntClass.class ); assertNotNull( thingClass ); r = (Resource) OWL.Nothing.inModel( m ); OntClass nothingClass = (OntClass) r.as( OntClass.class ); assertNotNull( nothingClass ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void test_sf_948995() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM ); // OWL dl\n DatatypeProperty dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n boolean ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertTrue( \"Should have been a conversion exception\", ex );\n \n m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); // OWL full\n dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertFalse( \"Should not have been a conversion exception\", ex );\n }", "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 }", "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\tpublic void takingNullWayTest()\n\t{\n\t\ttry\n\t\t{\n\t\t\tOsmXmlToSQLiteDatabaseConverter converter = new OsmXmlToSQLiteDatabaseConverter(new MapObjectsIdFinderFake());\n\t\t\tconverter.takeWay(null);\n\t\t\tfail();\n\t\t}\n\t\tcatch (IllegalArgumentException ex)\n\t\t{\n\t\t\t// ok\n\t\t}\n\t}", "@Test @SpecAssertion(id = \"432-A1\", section=\"4.3.2\")\n public void testConversion(){\n Assert.fail();\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 }", "@Test(timeout = 4000)\n public void test064() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"B$\");\n Hidden hidden0 = new Hidden(xmlEntityRef0, \"g&Bc\", \"?B9_wYh|0:BI[t\\\",\");\n Double double0 = new Double((-1495.44408));\n // Undeclared exception!\n try { \n hidden0.strike((Object) double0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test078() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]f '8Drr>Uj1==M2\");\n Hidden hidden0 = new Hidden(xmlEntityRef0, \"4wW\", \"java.lang.String@0000000002\");\n // Undeclared exception!\n try { \n hidden0.s();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test164() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n MXSerializer mXSerializer0 = new MXSerializer();\n Hidden hidden0 = new Hidden(xmlEntityRef0, \"java.lang.String@0000000005\", \"/o:%Ab+Af@:#h3VI\");\n // Undeclared exception!\n try { \n hidden0.cite((Object) mXSerializer0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void test_sb_01() {\n OntModel model= ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_RDFS_INF, null);\n \n Resource result= null;\n Resource nullValueForResourceType= null;\n \n result= model.createOntResource( OntResource.class, nullValueForResourceType, \"http://www.somewhere.com/models#SomeResourceName\" );\n assertNotNull( result );\n }", "@Test(timeout = 4000)\n public void test169() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"&!a0Q!<8UDk+%_*<Z'\");\n Radio radio0 = new Radio(xmlEntityRef0, \"bdo\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n radio0.big((Object) \"bdo\");\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void testConvertNull() throws Exception {\n try {\n makeConverter().convert(getExpectedType(), null);\n fail(\"Expected ConversionException\");\n } catch(ConversionException e) {\n // expected\n }\n }", "@Test(timeout = 4000)\n public void test281() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n // Undeclared exception!\n try { \n xmlEntityRef0.dd((Object) \"4_R]T<#2)Q?]R7Ut\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public static void verify(OWLOntology ont) throws OWLOntologyCreationException{\n OWLReasonerFactory reasonerFactory = new ElkReasonerFactory(); // with ELK reasoner\n\t\t\n\t\tLogManager.getLogger(\"org.semanticweb.elk\").setLevel(Level.OFF); // Level.ERROR\n\t\t//LogManager.getLogger(\"org.semanticweb.elk.reasoner.indexing\").setLevel(Level.ERROR);\n\t\t\n\t\t\n\t\tOWLReasoner reasoner = reasonerFactory.createReasoner(ont);\n\t\t\n\t\t\n\t\tboolean consistent = reasoner.isConsistent();\n\t\tSystem.out.println(\"\\n\\nOntology consistency : \" + consistent);\n\n\n\t\t/** Now print out any unsatisfiable classes*/\n\t\t//System.out.println(\"\\nUnsatisfiable classes : \");\n\t\tint i=0;\n\t\tfor (OWLClass cls : ont.getClassesInSignature()) {\n\t\t\tif (!reasoner.isSatisfiable(cls)) {\n\t\t\t\ti++;\n\t\t\t\t//System.out.println(i+\"/. \"+ cls.getIRI().getFragment());\n\t\t\t}\n\t\t}\n\n\n\t\t// Another method for extracting unsatisfiable classes\n\t\t/**\n\t\tSystem.out.println(\"\\nUnsatisfiable classes : \");\n\t\tint j=0;\n\t\tfor(OWLClass cls : reasoner.getUnsatisfiableClasses()){\n\t\t\tif(!insatis.isOWLNothing()){\n\t\t\t\tj++;\n\t\t\tSystem.out.println(j+ \"/. \"+ cls.getIRI().getFragment());\n\t\t\t}\n\t\t}\n\t\t */\n\n\n\t\t// Another method for extracting unsatisfiable classes\n\t\t/**\n\t\tSystem.out.println(\"\\nUnsatisfiable classes : \");\n\t\tNode<OWLClass> bottomNode = reasoner.getUnsatisfiableClasses();\n\t\t// This node contains owl:Nothing and all the classes that are\n\t\t// equivalent to owl:Nothing - i.e. the unsatisfiable classes. We just\n\t\t// want to print out the unsatisfiable classes excluding owl:Nothing,\n\t\t// and we can used a convenience method on the node to get these\n int k=0;\n\t\tfor (OWLClass cls : bottomNode.getEntitiesMinusBottom()) {\n\t\t\tk++;\n\t\t\tSystem.out.println(k+\"/. \"+ cls.getIRI().getFragment());\n\t\t}\n\t\t */\n\n\n\t\t//System.out.println(\"\\nOntology consistency : \" + consistent);\n\t\tSystem.out.println(\"Number of unsatisfiable classes : \" + i);\t\t\n\t\t\n\t\treasoner.dispose();\n\t}", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"&!a0Q!<8UDk+%_*<Z'\");\n Hidden hidden0 = new Hidden(xmlEntityRef0, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n hidden0.label();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test135() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \"java.lang.String@000000005\", \"]f '8Drr>Uj1==M2\");\n Object object0 = new Object();\n // Undeclared exception!\n try { \n checkbox0.h2(object0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test134() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n Hidden hidden0 = new Hidden(xmlEntityRef0, \"java.lang.String@0000000005\", \"/o:%Ab+Af@:#h3VI\");\n // Undeclared exception!\n try { \n hidden0.h3();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test147() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n Boolean boolean0 = new Boolean(\"java.lang.String@0000000005\");\n // Undeclared exception!\n try { \n xmlEntityRef0.em((Object) boolean0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public AnomaliesWrapper test2NF();", "@Test(timeout = 4000)\n public void test166() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \"F\\\"\", \"F\\\"\");\n Checkbox checkbox1 = new Checkbox(checkbox0, \"F\\\"\", \"F\\\"\");\n // Undeclared exception!\n try { \n checkbox1.body();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(expected = OntoGraphException.class)\n public void testEmptyOntology() throws OntoGraphException {\n GraphRequestModel requestModel = createCustomGraphRequestModelWithDiffOntologyErrors(\"test.rdf\", \" \");\n controller.graph(requestModel);\n }", "@Test(expectedExceptions = { IllegalStateException.class })\n\tpublic void testUnableToConvert() {\n\t\tconverter.convertForward(\"bad value\");\n\t}", "public void test_sf_978259() {\n OntModel md = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM );\n OntModel ml = ModelFactory.createOntologyModel( OntModelSpec.OWL_LITE_MEM );\n \n DataRange drd = md.createDataRange( md.createList( new Resource[] {OWL.Thing}) );\n \n assertNotNull( drd );\n \n HasValueRestriction hvrd = md.createHasValueRestriction( null, RDFS.seeAlso, OWL.Thing );\n \n assertNotNull( hvrd );\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\tpublic void testUnknownReasoner() throws Exception {\n\n\t\t// FIXME serialisation d'une preuve obtenue avec un dummy reasoner\n\t\t// quand il y a un input: il faut conserver l'input original.\n\t\timportProofSerializationProofs();\n\n\t\tfinal IPRRoot prFile = getProofRoot(\"unknownReasoner\");\n\t\tfinal IPRProof proof = prFile.getProof(\"unknownReasonerProof\");\n\n\t\tfinal IProofTree proofTree = proof.getProofTree(null);\n\n\t\tassertNotNull(proofTree);\n\n\t\t// ensure that the proof rule is deserialized:\n\t\tfinal IProofTreeNode root = proofTree.getRoot();\n\t\tassertFalse(root.isOpen());\n\t\tfinal IProofRule rule = root.getRule();\n\t\tassertEquals(\"unknown.reasoner.id\", rule.generatedBy().getReasonerID());\n\t\tassertEquals(IConfidence.UNCERTAIN_MAX, rule.getConfidence());\n\n\t\t// ensure that the whole proof tree has UNCERTAIN confidence:\n\t\tassertTrue(proofTree.isClosed());\n\t\tassertEquals(IConfidence.UNCERTAIN_MAX, proofTree.getConfidence());\n\t}", "@Test(expected=NullPointerException.class) @SpecAssertion(id = \"432-A4\", section=\"4.3.2\")\n public void testNullConversion4(){\n MonetaryConversions.getConversion((String)null, ConversionContext.of());\n }", "@Test(timeout = 4000)\n public void test319() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"!\", \"!\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"!\", \"!\");\n // Undeclared exception!\n try { \n checkbox0.em();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test31() throws Throwable {\n // Undeclared exception!\n try { \n EWrapperMsgGenerator.deltaNeutralValidation((-2236), (UnderComp) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"com.ib.client.EWrapperMsgGenerator\", e);\n }\n }", "public void testCtorWithWrongTransferable() {\n try {\n new PasteAssociationAction(new ClassElementsTransfer(new DependencyImpl()), namespace);\n fail(\"InvalidDataContentException is expected.\");\n } catch (InvalidDataContentException idce) {\n // pass\n }\n }", "@Test\n public void test101() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.cite((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(expected = OntoGraphException.class)\n public void testInvalidOntology() throws OntoGraphException {\n GraphRequestModel requestModel = createCustomGraphRequestModelWithDiffOntologyErrors(\"test.rdf\", \n \t\t\"test file contents\");\n controller.graph(requestModel);\n }", "public void visit(OWLAnnotationInstance arg0) throws OWLException {\n\t\t\t\n\t\t}", "@Test(timeout = 4000)\n public void test179() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"!\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n checkbox0.a((Object) checkbox0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test178() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.acronym();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(expected = NoWeightException.class)\n\tpublic void testNoWeightException() throws Exception {\n\t\tnew GraphPoetFactory().parse(\"Edge=<ac,WordNeighborhood,a,c,Yes>\");\n\t}", "@Test(expected=NullPointerException.class) @SpecAssertion(id = \"432-A4\", section=\"4.3.2\")\n public void testNullConversion3(){\n MonetaryConversions.getConversion((CurrencyUnit) null, ConversionContext.of());\n }", "@Test\n public void testOpenGraphAlternateObjectTypes() throws IOException, ExtractionException, RepositoryException {\n assertExtract(\"/html/rdfa/opengraph-music-song-object-type.html\");\n logger.debug(dumpHumanReadableTriples());\n\n Assert.assertEquals(9, getStatementsSize(null, null, null));\n final OGPMusic vOGPMusic = OGPMusic.getInstance();\n assertContains(baseIRI, vOGPMusic.musicDuration, RDFUtils.literal(\"447\"));\n assertContains(baseIRI, vOGPMusic.musicMusician,\n RDFUtils.literal(\"Jono Grant / Tony McGuinness / Ashley Tomberlin\"));\n assertContains(baseIRI, vOGPMusic.musicAlbum, RDFUtils.literal(\"Tri-State\"));\n }", "@Test(timeout = 4000)\n public void test063() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"wheel_ErrorPage\");\n ActionExpression actionExpression0 = new ActionExpression(\"wheel_ErrorPage\");\n // Undeclared exception!\n try { \n xmlEntityRef0.strike((Object) actionExpression0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test075() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"!\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n checkbox0.samp();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test286() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component can be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component can be added only to a TableBlock.\", \"Col component can be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.h2();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(expected=NullPointerException.class) @SpecAssertion(id = \"432-A4\", section=\"4.3.2\")\n public void testNullConversion2(){\n MonetaryConversions.getConversion((String)null);\n }", "@Test(timeout = 4000)\n public void test358() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try { \n xmlEntityRef0.s();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test236() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n // Undeclared exception!\n try { \n xmlEntityRef0.cite((Object) \"java.lang.String@0000000005\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public boolean equivalent(Explanation<OWLAxiom> e1, Explanation<OWLAxiom> e2) throws OWLOntologyCreationException {\n if (e1.equals(e2)) {\n return true;\n }\n\n // check if they have the same size, same entailment types, same numbers of axiom types\n IsoUtil pre = new IsoUtil();\n if (!pre.passesPretest(e1, e2)) {\n \t//System.out.println(\"NOT THE SAME!\");\n return false;\n }\n \n //check the current datatypes used in the justifications. If they don't match, reject this.\n HashSet<OWLDatatype> dataTypes1 = new HashSet<OWLDatatype>();\n HashSet<OWLDatatype> dataTypes2 = new HashSet<OWLDatatype>();\n \n for(OWLAxiom ax:e1.getAxioms())\n {\n \t for(OWLDatatype dt:ax.getDatatypesInSignature())\n {\n \tif(dt.isBuiltIn())\n \t{\n \t\tdataTypes1.add(dt);\n \t}\n }\n }\n for(OWLAxiom ax:e2.getAxioms())\n {\n \t for(OWLDatatype dt:ax.getDatatypesInSignature())\n {\n \tif(dt.isBuiltIn())\n \t{\n \t\tdataTypes2.add(dt);\n \t}\n }\n } \n \n if(!dataTypes1.equals(dataTypes2))\n {\n \treturn false;\n }\n \n //check to see if both justifications are both real or fake w.r.t. reasoner\n /**\n OWLOntologyManager ontoman = OWLManager.createOWLOntologyManager();\n Boolean E1ENT = null;\n OWLReasoner j1 = rf.createReasoner(ontoman.createOntology(e1.getAxioms()));\n\t\tE1ENT = j1.isEntailed(e1.getEntailment());\n\t\tj1.flush();\n\t\tOWLReasoner j2;\n\t Boolean E2ENT = null;\n\t j2 = rf.createReasoner(ontoman.createOntology(e2.getAxioms()));\n\t\tE2ENT = j2.isEntailed(e2.getEntailment());\n\t\tj2.flush();\n\t\tSystem.out.println(e1.getEntailment().toString() + \": \" + E1ENT + \" \" + e2.getEntailment().toString() + \": \" + E2ENT);\n\t\tSystem.out.println(!((E1ENT && E2ENT) || (!E1ENT && !E2ENT)));\n\t\tif(!((E1ENT && E2ENT) || (!E1ENT && !E2ENT))) {\n\t\tSystem.out.println(\"Entailment check failed\");\n\t return false;\t\n\t\t}\n\t\t**/\n\t\t// otherwise do the full check\t\n AxiomTreeBuilder atb = new AxiomTreeBuilder();\n\n AxiomTreeNode et1 = atb.generateAxiomTree(e1.getEntailment());\n AxiomTreeNode et2 = atb.generateAxiomTree(e2.getEntailment());\n AxiomTreeNode jt1 = atb.generateExplanationTree(e1);\n AxiomTreeNode jt2 = atb.generateExplanationTree(e2);\n \n //for(AxiomTreeMapping atm:getMappingCandidates(et1,et2))\n //{\n \t//atm.printMapping();\n //}\n \n List<AxiomTreeMapping> candidates = getMappingCandidates(jt1, jt2);\n //System.out.println(candidates.size());\n /**\n for(AxiomTreeMapping c : candidates) {\n \t System.out.println(c.getVarsForTarget());\n \t System.out.println(c.getVarsForSource());\n \t System.out.println(isCorrectMapping(e1, et1, jt1, c.getVarsForSource(), e2, et2, jt2, c.getVarsForTarget()));\n }\n **/\n \n \n for (AxiomTreeMapping c : candidates) {\n //System.out.println(\"\\n--------------- MAPPING ---------------\\n\");\n if (isCorrectMapping(e1, et1, jt1, c.getVarsForSource(), e2, et2, jt2, c.getVarsForTarget())) {\n //c.printMapping();\n //System.out.println(\"TRUE MAPPING:\");\n //System.out.println(c.getVarsForTarget());\n //System.out.println(c.getVarsForSource());\n \t return true;\n }\n }\n \n //for(AxiomTreeMapping atm:candidates)\n //{\n \t//atm.printMapping();\n //}\n return false;\n }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n Submit submit0 = new Submit(xmlEntityRef0, \"java.lang.String@0000000005\", \"java.lang.String@0000000005\");\n // Undeclared exception!\n try { \n submit0.rawText(\"java.lang.String@0000000005\");\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test295() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"&!a0Q!<8UDk+%_*<Z'\");\n Radio radio0 = new Radio(xmlEntityRef0, \"bdo\", \"&!a0Q!<8UDk+%_*<Z'\");\n MockGregorianCalendar mockGregorianCalendar0 = new MockGregorianCalendar((-2498), (-2498), (-3334), (-1388), 349, (-2976));\n // Undeclared exception!\n try { \n radio0.text(mockGregorianCalendar0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testErroneousObjPropEdgeType() throws IllegalArgumentException {\n\t GraphRequestModel requestModel = createCustomPropertyGraphRequestModel();\n\t requestModel.setObjPropEdgeType(SPACE);\n\t GraphRequestValidator.validateRequest(requestModel);\n\t}", "@Test(timeout = 4000)\n public void test188() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n Hidden hidden0 = new Hidden(xmlEntityRef0, \"/\", \"org.mvel.conversion.CharArrayCH$1\");\n // Undeclared exception!\n try { \n hidden0.getPage();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test37() throws Throwable {\n DecisionStump decisionStump0 = new DecisionStump();\n try {\n String string0 = Evaluation.wekaStaticWrapper((Sourcable) decisionStump0, \"b0\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void shouldUseReasoner() throws Exception {\n // Create our ontology manager in the usual way.\n OWLOntologyManager manager = OWLManager.createOWLOntologyManager();\n OWLOntology ont = load(manager);\n\n //df = manager.getOWLDataFactory();\n // We need to create an instance of OWLReasoner. An OWLReasoner provides\n // the basic query functionality that we need, for example the ability\n // obtain the subclasses of a class etc. To do this we use a reasoner\n // factory. Create a reasoner factory. In this case, we will use HermiT,\n // but we could also use FaCT++ (http://code.google.com/p/factplusplus/)\n // or Pellet(http://clarkparsia.com/pellet) Note that (as of 03 Feb\n // 2010) FaCT++ and Pellet OWL API 3.0.0 compatible libraries are\n // expected to be available in the near future). For now, we'll use\n // HermiT HermiT can be downloaded from http://hermit-reasoner.com Make\n // sure you get the HermiT library and add it to your class path. You\n // can then instantiate the HermiT reasoner factory: Comment out the\n // first line below and uncomment the second line below to instantiate\n // the HermiT reasoner factory. You'll also need to import the\n // org.semanticweb.HermiT.Reasoner package.\n OWLReasonerFactory reasonerFactory = new StructuralReasonerFactory();\n // OWLReasonerFactory reasonerFactory = new Reasoner.ReasonerFactory();\n // We'll now create an instance of an OWLReasoner (the implementation\n // being provided by HermiT as we're using the HermiT reasoner factory).\n // The are two categories of reasoner, Buffering and NonBuffering. In\n // our case, we'll create the buffering reasoner, which is the default\n // kind of reasoner. We'll also attach a progress monitor to the\n // reasoner. To do this we set up a configuration that knows about a\n // progress monitor. Create a console progress monitor. This will print\n // the reasoner progress out to the console.\n // ConsoleProgressMonitor progressMonitor = new\n // ConsoleProgressMonitor();\n // Specify the progress monitor via a configuration. We could also\n // specify other setup parameters in the configuration, and different\n // reasoners may accept their own defined parameters this way.\n // OWLReasonerConfiguration config = new SimpleConfiguration(\n // progressMonitor);\n // Create a reasoner that will reason over our ontology and its imports\n // closure. Pass in the configuration.\n // OWLReasoner reasoner = reasonerFactory.createReasoner(ont, config);\n OWLReasoner reasoner = reasonerFactory.createReasoner(ont);\n // Ask the reasoner to do all the necessary work now\n reasoner.precomputeInferences();\n // We can determine if the ontology is actually consistent (in this\n // case, it should be).\n boolean consistent = reasoner.isConsistent();\n System.out.println(\"Consistent: \" + consistent);\n // We can easily get a list of unsatisfiable classes. (A class is\n // unsatisfiable if it can't possibly have any instances). Note that the\n // getUnsatisfiableClasses method is really just a convenience method\n // for obtaining the classes that are equivalent to owl:Nothing.\n Node<OWLClass> bottomNode = reasoner.getUnsatisfiableClasses();\n // This node contains owl:Nothing and all the classes that are\n // equivalent to owl:Nothing - i.e. the unsatisfiable classes. We just\n // want to print out the unsatisfiable classes excluding owl:Nothing,\n // and we can used a convenience method on the node to get these\n Set<OWLClass> unsatisfiable = bottomNode.getEntitiesMinusBottom();\n if (!unsatisfiable.isEmpty()) {\n System.out.println(\"The following classes are unsatisfiable: \");\n for (OWLClass cls : unsatisfiable) {\n System.out.println(\" \" + cls);\n }\n } else {\n System.out.println(\"There are no unsatisfiable classes\");\n }\n // Now we want to query the reasoner for all descendants of Marsupial.\n // Vegetarians are defined in the ontology to be animals that don't eat\n // animals or parts of animals.\n OWLDataFactory fac = manager.getOWLDataFactory();\n // Get a reference to the vegetarian class so that we can as the\n // reasoner about it. The full IRI of this class happens to be:\n // <http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Marsupials>\n OWLClass marsupials = fac.getOWLClass(IRI.create(\n \"http://protege.stanford.edu/plugins/owl/owl-library/koala.owl#Marsupials\"));\n // Now use the reasoner to obtain the subclasses of Marsupials. We can\n // ask for the direct subclasses or all of the (proper)\n // subclasses. In this case we just want the direct ones\n // (which we specify by the \"true\" flag).\n NodeSet<OWLClass> subClses = reasoner.getSubClasses(marsupials, true);\n // The reasoner returns a NodeSet, which represents a set of Nodes. Each\n // node in the set represents a subclass of Marsupial. A node of\n // classes contains classes, where each class in the node is equivalent.\n // For example, if we asked for the subclasses of some class A and got\n // back a NodeSet containing two nodes {B, C} and {D}, then A would have\n // two proper subclasses. One of these subclasses would be equivalent to\n // the class D, and the other would be the class that is equivalent to\n // class B and class C. In this case, we don't particularly care about\n // the equivalences, so we will flatten this set of sets and print the\n // result\n Set<OWLClass> clses = subClses.getFlattened();\n for (OWLClass cls : clses) {\n System.out.println(\" \" + cls);\n }\n // We can easily\n // retrieve the instances of a class. In this example we'll obtain the\n // instances of the class Marsupials.\n NodeSet<OWLNamedIndividual> individualsNodeSet = reasoner.getInstances(marsupials, false);\n // The reasoner returns a NodeSet again. This time the NodeSet contains\n // individuals. Again, we just want the individuals, so get a flattened\n // set.\n Set<OWLNamedIndividual> individuals = individualsNodeSet.getFlattened();\n for (OWLNamedIndividual ind : individuals) {\n System.out.println(\" \" + ind);\n }\n // Again, it's worth noting that not all of the individuals that are\n // returned were explicitly stated to be marsupials. Finally, we can ask\n // for the property values (property assertions in OWL speak) for a\n // given\n // individual and property.\n // Let's get all properties for all individuals\n for (OWLNamedIndividual i : ont.getIndividualsInSignature()) {\n for (OWLObjectProperty p : ont.getObjectPropertiesInSignature()) {\n NodeSet<OWLNamedIndividual> individualValues = reasoner.getObjectPropertyValues(i, p);\n System.out.println(\"Vazio: \"+individualValues.isEmpty());\n Set<OWLNamedIndividual> values = individualValues.getFlattened();\n System.out.println(\"The property values for \"+p+\" for individual \"+i+\" are: \");\n for (OWLNamedIndividual ind : values) {\n System.out.println(\" \" + ind);\n }\n }\n }\n // Finally, let's print out the class hierarchy.\n Node<OWLClass> topNode = reasoner.getTopClassNode();\n print(topNode, reasoner, 0);\n\n\n }", "@Test(timeout = 4000)\n public void test373() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n xmlEntityRef0.h2((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "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 }", "@Test(timeout = 4000)\n public void test155() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n Submit submit0 = new Submit(xmlEntityRef0, \"\\\"8[P\", \"\\\"8[P\");\n // Undeclared exception!\n try { \n submit0.dfn((Object) null);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test052() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"^k$OoD7cnk\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \"^k$OoD7cnk\", \"input\");\n Hidden hidden0 = new Hidden(checkbox0, \"^k$OoD7cnk\", \"frameset\");\n // Undeclared exception!\n try { \n hidden0.sup();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void checkNotPolymorphicOrUnknown() {\n if (isPolymorphic())\n throw new AnalysisException(\"Unexpected polymorphic value!\");\n if (isUnknown())\n throw new AnalysisException(\"Unexpected 'unknown' value!\");\n }", "public void testType() {\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tInteger).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tReal).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tPersonFQ).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(\"foo\"))).oclIsTypeOf(tOclString).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(true))).oclIsTypeOf(tBoolean).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tReal).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tInteger).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p2))).oclIsTypeOf(tCompany).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(false))).oclIsTypeOf(tAny).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0.0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tObject).not().isTrue() ); // differs\n }", "public void test_ck_02() {\n OntModel vocabModel = ModelFactory.createOntologyModel();\n ObjectProperty p = vocabModel.createObjectProperty(\"p\");\n OntClass A = vocabModel.createClass(\"A\");\n \n OntModel workModel = ModelFactory.createOntologyModel();\n Individual sub = workModel.createIndividual(\"uri1\", A);\n Individual obj = workModel.createIndividual(\"uri2\", A);\n workModel.createStatement(sub, p, obj);\n }", "public void testNegativeScalar() {\n\n /*\n * fixme Boolean converters not implemented at this point value = LocaleConvertUtils.convert(\"foo\", Boolean.TYPE); ...\n *\n * value = LocaleConvertUtils.convert(\"foo\", Boolean.class); ...\n */\n\n try {\n LocaleConvertUtils.convert(\"foo\", Byte.TYPE);\n fail(\"Should have thrown conversion exception (1)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Byte.class);\n fail(\"Should have thrown conversion exception (2)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n /*\n * fixme - not implemented try { value = LocaleConvertUtils.convert(\"org.apache.commons.beanutils2.Undefined\", Class.class);\n * fail(\"Should have thrown conversion exception\"); } catch (ConversionException e) { ; // Expected result }\n */\n\n try {\n LocaleConvertUtils.convert(\"foo\", Double.TYPE);\n fail(\"Should have thrown conversion exception (3)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Double.class);\n fail(\"Should have thrown conversion exception (4)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Float.TYPE);\n fail(\"Should have thrown conversion exception (5)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Float.class);\n fail(\"Should have thrown conversion exception (6)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Integer.TYPE);\n fail(\"Should have thrown conversion exception (7)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Integer.class);\n fail(\"Should have thrown conversion exception (8)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Byte.TYPE);\n fail(\"Should have thrown conversion exception (9)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Long.class);\n fail(\"Should have thrown conversion exception (10)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Short.TYPE);\n fail(\"Should have thrown conversion exception (11)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n try {\n LocaleConvertUtils.convert(\"foo\", Short.class);\n fail(\"Should have thrown conversion exception (12)\");\n } catch (final ConversionException e) {\n // Expected result\n }\n\n }", "@Test(timeout = 4000)\n public void test132() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]f '8Drr>Uj1==M2\");\n Hidden hidden0 = new Hidden(xmlEntityRef0, \"]f '8Drr>Uj1==M2\", \"wheel_ErrorPage\");\n // Undeclared exception!\n try { \n hidden0.h3((Object) \"java.lang.StringBuffer@0000000004\");\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test151() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"(vLoO6y2\\\"Vht&{{\", \"(vLoO6y2\\\"Vht&{{\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"!\", \"(vLoO6y2\\\"Vht&{{\");\n // Undeclared exception!\n try { \n checkbox0.dt((Object) checkbox0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test285() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"z=OF5Ty4t\");\n // Undeclared exception!\n try { \n xmlEntityRef0.small((Object) \"cript\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"wheel.util.WrappedException\");\n // Undeclared exception!\n try { \n xmlEntityRef0.style();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test310() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"Attributes must be given in name, value pairs.\");\n // Undeclared exception!\n try { \n xmlEntityRef0.acronym();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test368() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try { \n xmlEntityRef0.map((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "protected abstract Object convertNonNull(Object o);", "@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}", "@Test\n public void test031() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"u;*]p4T?%S2\");\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.bdo((CharSequence) \"u;*]p4T?%S2\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test47() throws Throwable {\n String string0 = \"0(Hu\";\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer0);\n stringReader0.reset();\n StreamTokenizer streamTokenizer3 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer4 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer5 = new StreamTokenizer(stringReader0);\n SystemInUtil.addInputLine((String) null);\n Integer integer0 = new Integer((-1953));\n jSTerm0.add((Object) integer0);\n // Undeclared exception!\n try { \n jSTerm0.standarizerPredicateForm();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // java.lang.Integer cannot be cast to umd.cs.shop.JSTerm\n //\n verifyException(\"umd.cs.shop.JSPredicateForm\", e);\n }\n }", "public void visit(OWLOntology arg0) throws OWLException {\n\t\t\t\n\t\t}", "public void visit(OWLAnnotationProperty arg0) throws OWLException {\n\t\t\t\n\t\t}", "@Test(timeout = 4000)\n public void test171() throws Throwable {\n Checkbox checkbox0 = new Checkbox((Component) null, \" on the page.\", \":\");\n Checkbox checkbox1 = new Checkbox(checkbox0, (String) null, \"java.lang.String@0000000004\");\n // Undeclared exception!\n try { \n checkbox1.b((Object) \"6\");\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test268() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"0+_/OK]Z5%q-UP hR\");\n // Undeclared exception!\n try { \n xmlEntityRef0.rawText(\"0+_/OK]Z5%q-UP hR\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test325() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"B$\");\n // Undeclared exception!\n try { \n xmlEntityRef0.q((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test113() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"!\", \"java.lang.String@0000000005\");\n Hidden hidden1 = new Hidden(hidden0, \"{7i(tT&i0oG.E#h\", \"{7i(tT&i0oG.E#h\");\n // Undeclared exception!\n try { \n hidden1.img(\"abbr\", \"{7i(tT&i0oG.E#h\");\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test18() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSTerm0.add((Object) \"lc\");\n jSTerm0.isEmpty();\n jSSubstitution0.add((Object) \"lc\");\n JSPredicateForm jSPredicateForm0 = jSTerm0.applySubstitutionPF(jSSubstitution0);\n jSTerm0.add((Object) null);\n String string0 = \"aW$w)\";\n jSPredicateForm0.equals((JSPredicateForm) jSTerm0);\n // Undeclared exception!\n try { \n jSTerm0.applySubstitutionPF(jSSubstitution0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"umd.cs.shop.JSPredicateForm\", e);\n }\n }", "@Test(timeout = 4000)\n public void test341() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"{\");\n // Undeclared exception!\n try { \n xmlEntityRef0.i((Object) \"{\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test296() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \"expected apostrophe (') or quotation mark (\\\") after encoding and not \", \"z:_i>EAQ.Bdq@CL&k?\\\"\");\n // Undeclared exception!\n try { \n checkbox0.h4((Object) \"h3\");\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test367() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"W,eg{\");\n // Undeclared exception!\n try { \n xmlEntityRef0.label();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void mo1972o() throws cf {\r\n }", "@Test\n public void testAssertObjectChangedPropertyWithIgnoredType() {\n // setup\n final TierTwoTypeWithIgnoreProperty tierTwoTypeWithIgnoreProperty = new TierTwoTypeWithIgnoreProperty(\n new IgnoredType());\n final ChangedProperty<IgnoredType> jokerProperty = Property.change(TierTwoTypeWithIgnoreProperty.IGNORED_TYPE,\n new IgnoredType());\n\n // method\n assertObject(EMPTY_STRING, tierTwoTypeWithIgnoreProperty, jokerProperty);\n }", "public boolean testModelordraughting(EIfcfillareastyle type) throws SdaiException;", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"B$\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \"mARxJH5T\", \"nTvx<z&6-B87\");\n // Undeclared exception!\n try { \n checkbox0.ul();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void testTransformWithNullDocument() throws Exception {\n try {\n instance.transform(element, null, caller);\n fail(\"IllegalArgumentException is excepted[\" + suhClassName + \"].\");\n } catch (IllegalArgumentException iae) {\n // pass\n }\n }", "@Test(timeout = 4000)\n public void test336() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]f '8Drr>Uj1==M2\");\n // Undeclared exception!\n try { \n xmlEntityRef0.samp((Object) \"]f '8Drr>Uj1==M2\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test106() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n ElExpression elExpression0 = new ElExpression(\"4_R]T<#2)Q?]R7Ut\");\n // Undeclared exception!\n try { \n xmlEntityRef0.label((Object) elExpression0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n jSTerm0.add((Object) \"\");\n jSSubstitution0.add((Object) jSTerm0);\n JSPredicateForm jSPredicateForm0 = jSTerm0.applySubstitutionPF(jSSubstitution0);\n JSSubstitution jSSubstitution1 = new JSSubstitution();\n JSTerm jSTerm1 = new JSTerm();\n jSTerm1.add((Object) jSPredicateForm0);\n JSJshopVars.exclamation = (-3277);\n jSTerm0.add((Object) jSTerm1);\n JSPredicateForm jSPredicateForm1 = jSTerm0.clonePF();\n JSPredicateForm jSPredicateForm2 = jSPredicateForm0.applySubstitutionPF(jSSubstitution0);\n jSPredicateForm2.addAll((Collection) jSPredicateForm0);\n Object object0 = new Object();\n SystemInUtil.addInputLine(\"\");\n Predicate<String> predicate0 = Predicate.isEqual((Object) \"mI!\");\n Predicate<String> predicate1 = predicate0.negate();\n jSPredicateForm1.removeIf(predicate0);\n Predicate<String> predicate2 = predicate1.negate();\n Predicate<String> predicate3 = predicate1.and(predicate0);\n Predicate.isEqual((Object) \"\");\n predicate2.or(predicate3);\n predicate0.negate();\n JSSubstitution jSSubstitution2 = new JSSubstitution();\n Predicate<Integer> predicate4 = Predicate.isEqual((Object) predicate1);\n jSSubstitution2.removeIf(predicate4);\n // Undeclared exception!\n try { \n jSPredicateForm2.toStr();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // java.lang.String cannot be cast to umd.cs.shop.JSTerm\n //\n verifyException(\"umd.cs.shop.JSPredicateForm\", e);\n }\n }", "@Test(timeout = 4000)\n public void test282() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"Col component can be added only to a TableBlock.\", \"5]<!^oHS\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"5]<!^oHS\", \"Col component can be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.tt();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(expected = IllegalTypeException.class)\n\tpublic void testIllegalType() throws Exception {\n\t\tnew GraphPoetFactory().parse(\"Edge=<ab,Relation,1,a,b,Yes>\");\n\t}", "@Test(timeout = 4000)\n public void test314() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"B$\");\n // Undeclared exception!\n try { \n xmlEntityRef0.ul();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(expected=NullPointerException.class) @SpecAssertion(id = \"432-A4\", section=\"4.3.2\")\n public void testNullConversion1(){\n MonetaryConversions.getConversion((CurrencyUnit)null);\n }", "@Test(timeout = 4000)\n public void test077() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component can be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \".*,r%\", \"Col component can be added only to a TableBlock.\");\n ElExpression elExpression0 = new ElExpression(\"aXLxLx]\");\n // Undeclared exception!\n try { \n checkbox0.s((Object) elExpression0);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test02() throws Throwable {\n JSTerm jSTerm0 = new JSTerm();\n JSSubstitution jSSubstitution0 = new JSSubstitution();\n String string0 = \"\";\n jSTerm0.add((Object) \"\");\n JSSubstitution jSSubstitution1 = new JSSubstitution();\n JSTerm jSTerm1 = new JSTerm();\n jSTerm1.add((Object) jSTerm0);\n int int0 = (-3277);\n JSJshopVars.exclamation = (-3277);\n jSTerm0.add((Object) jSTerm1);\n JSPredicateForm jSPredicateForm0 = jSTerm0.applySubstitutionPF(jSSubstitution0);\n Object object0 = new Object();\n SystemInUtil.addInputLine(\"\");\n Predicate<String> predicate0 = Predicate.isEqual((Object) \"\");\n Predicate<String> predicate1 = predicate0.negate();\n jSTerm0.removeIf(predicate0);\n Predicate<String> predicate2 = predicate1.negate();\n Predicate<String> predicate3 = predicate1.and(predicate0);\n predicate2.or(predicate3);\n predicate0.negate();\n JSSubstitution jSSubstitution2 = new JSSubstitution();\n predicate1.or(predicate2);\n Predicate<Integer> predicate4 = Predicate.isEqual((Object) predicate1);\n jSSubstitution2.removeIf(predicate4);\n // Undeclared exception!\n try { \n jSPredicateForm0.toStr();\n fail(\"Expecting exception: StackOverflowError\");\n \n } catch(StackOverflowError e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void test_sf_927641() {\n String NS = \"http://example.org/test#\";\n OntModel m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n OntClass c0 = m0.createClass( NS + \"C0\" );\n OntClass c1 = m0.createClass( NS + \"C1\" );\n OntClass c2 = m0.createClass( NS + \"C2\" );\n OntClass c3 = m0.createClass( NS + \"C3\" );\n \n c0.addSubClass( c1 );\n c1.addSubClass( c2 );\n c2.addEquivalentClass( c3 );\n \n // now c1 is the direct super-class of c2, even allowing for the equiv with c3\n assertFalse( \"pass 1: c0 should not be a direct super of c2\", c2.hasSuperClass( c0, true ) );\n assertFalse( \"pass 1: c3 should not be a direct super of c2\", c2.hasSuperClass( c3, true ) );\n assertFalse( \"pass 1: c2 should not be a direct super of c2\", c2.hasSuperClass( c2, true ) );\n assertTrue( \"pass 1: c1 should be a direct super of c2\", c2.hasSuperClass( c1, true ) );\n \n // second pass - with inference\n m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RULE_INF );\n c0 = m0.createClass( NS + \"C0\" );\n c1 = m0.createClass( NS + \"C1\" );\n c2 = m0.createClass( NS + \"C2\" );\n c3 = m0.createClass( NS + \"C3\" );\n \n c0.addSubClass( c1 );\n c1.addSubClass( c2 );\n c2.addEquivalentClass( c3 );\n \n // now c1 is the direct super-class of c2, even allowing for the equiv with c3\n assertFalse( \"pass 2: c0 should not be a direct super of c2\", c2.hasSuperClass( c0, true ) );\n assertFalse( \"pass 2: c3 should not be a direct super of c2\", c2.hasSuperClass( c3, true ) );\n assertFalse( \"pass 2: c2 should not be a direct super of c2\", c2.hasSuperClass( c2, true ) );\n assertTrue( \"pass 2: c1 should be a direct super of c2\", c2.hasSuperClass( c1, true ) );\n }", "@Test(timeout = 4000)\n public void test271() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"!x\");\n // Undeclared exception!\n try { \n xmlEntityRef0.wrapSelf();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\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 }", "@Test\n void nullTest() {\n assertNull(sFloat1.toScrabbleInt());\n assertNull(sFloat1.and(sFloat2));\n assertNull(sFloat1.or(sFloat2));\n assertNull(sFloat1.toScrabbleBool());\n assertNull(sFloat1.toScrabbleBinary());\n assertNull(sFloat1.addToString(new ScrabbleString(\"Hello World\")));\n }", "@Test(timeout = 4000)\n public void test249() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n xmlEntityRef0.a((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test36() throws Throwable {\n StringReader stringReader0 = new StringReader(\"0(Hu\");\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer1 = new StreamTokenizer(stringReader0);\n StreamTokenizer streamTokenizer2 = new StreamTokenizer(stringReader0);\n JSTerm jSTerm0 = new JSTerm(streamTokenizer1);\n jSTerm0.add((Object) null);\n // Undeclared exception!\n try { \n jSTerm0.clonePF();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"umd.cs.shop.JSPredicateForm\", e);\n }\n }", "@Test\n void cannotInferType() {\n }", "@Test(timeout = 4000)\n public void test292() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"0+_/OK]Z5%q-UP hR\");\n // Undeclared exception!\n try { \n xmlEntityRef0.code((Object) \"0+_/OK]Z5%q-UP hR\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }" ]
[ "0.6652174", "0.6017963", "0.5914218", "0.5903002", "0.58885825", "0.5886599", "0.58726454", "0.58533806", "0.57744056", "0.5711608", "0.56954247", "0.5693521", "0.5625518", "0.5613341", "0.560807", "0.56044304", "0.56009895", "0.5597732", "0.55951977", "0.55950826", "0.55925554", "0.5582246", "0.55768466", "0.55651116", "0.55630064", "0.5556972", "0.55553156", "0.5522572", "0.55149615", "0.54749084", "0.54720056", "0.54605806", "0.5458357", "0.54461664", "0.544238", "0.54399186", "0.54333806", "0.54330957", "0.54197204", "0.5398119", "0.53972435", "0.53913516", "0.5389052", "0.53712386", "0.53698343", "0.5350463", "0.53477204", "0.53476393", "0.53454435", "0.5342448", "0.5338356", "0.53349954", "0.53330433", "0.5309183", "0.5304557", "0.53039974", "0.5303303", "0.530217", "0.5295858", "0.52946854", "0.5292164", "0.5284925", "0.5280716", "0.52800936", "0.52767974", "0.52753335", "0.52724546", "0.526924", "0.5261306", "0.5244227", "0.5242009", "0.5226288", "0.52188", "0.52139395", "0.5213554", "0.5212822", "0.5207448", "0.5204318", "0.5196895", "0.5196731", "0.51964945", "0.5190346", "0.51890576", "0.518348", "0.5183444", "0.518038", "0.51777804", "0.51739824", "0.51734436", "0.5170918", "0.5163287", "0.5163066", "0.51615506", "0.515755", "0.5157105", "0.515041", "0.5147702", "0.5145181", "0.5141407", "0.51404786" ]
0.66747224
0
Test case for SF bug 937810 NPE from ModelSpec.getDescription()
public void test_sf_937810() throws IllegalAccessException { Field[] specs = OntModelSpec.class.getDeclaredFields(); for (int i = 0; i < specs.length; i++) { if (Modifier.isPublic( specs[i].getModifiers()) && Modifier.isStatic( specs[i].getModifiers()) && specs[i].getType().equals( OntModelSpec.class )) { OntModelSpec s = (OntModelSpec) specs[i].get( null ); assertNotNull( s.getDescription() ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String describe() {\n return null;\n }", "public String getDescription() {\n/* 179 */ return getDescription((String)null);\n/* */ }", "@org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getDescription();", "public String describe() { return new String(\"No description.\"); }", "@Override\n protected String getDescription() {\n return null;\n }", "@Override\n public String getDescription()\n {\n return null;\n }", "@Test\r\n\t@Order(2)\r\n\tvoid testModel() {\r\n\t\trobot.setModel(null);\r\n\t\tassertNotEquals(null, robot.getModel(),\"Model test failed\\nREASON: null model not allowed!\");\r\n\t}", "@Test\r\n public void testGetDescription() {\r\n System.out.println(\"getDescription\");\r\n \r\n String expResult = \"\";\r\n String result = instance.getDescription();\r\n assertEquals(expResult, result);\r\n \r\n \r\n }", "@NotNull\n String getDescription();", "@Test\n public void setDescription() {\n cleanEntity0();\n\n entity0.setDescription(descriptionS);\n assertEquals(descriptionS, ReflectionTestUtils.getField(entity0, \"description\"));\n }", "@Override\r\n\tpublic String getDescription() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getDescription() {\n\t\treturn null;\r\n\t}", "public Object getDescription() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getDescription() {\n\t\treturn null;\n\t}", "@Nullable\n public abstract String getDescription();", "@Test\n void getAndSetDescription() {\n }", "@Test\r\n public void testSetDescription() {\r\n System.out.println(\"setDescription\");\r\n String description = \"\";\r\n \r\n instance.setDescription(description);\r\n assertEquals(description, instance.getDescription());\r\n \r\n }", "public String getDescription()\n/* */ {\n/* 74 */ return this.description;\n/* */ }", "@Override\n public void setTestDescription()\n {\n setTestDescription(\"Invoke perform ProductSpecOperation api by passing\"\n + \" null mor\");\n }", "@Test\n public void getDescription() {\n cleanEntity0();\n\n ReflectionTestUtils.setField(entity0, \"description\", descriptionS);\n assertEquals(entity0.getDescription(), descriptionS);\n }", "public String getDescription()\r\n {\r\n return \"unknow\";\r\n }", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "java.lang.String getDescription();", "public void testSetGetDescriptionElement()\n\t{\n\t\tfInclude.setDescriptionElement(fDescriptionElement);\n\t\tassertEquals(\"The retrieved Description Element object is not that which was set\", \n fDescriptionElement, fInclude.getDescriptionElement());\n\t}", "@Override\n\tpublic String getDescription(ProgramWorkflow object) {\n\t\tif (object.getConcept() != null && object.getConcept().getDescription() != null) {\n\t\t\treturn object.getConcept().getDescription().getDescription();\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "@Test\n public void testGetDescription() {\n System.out.println(\"getDescription\");\n assertEquals(\"Dumb abstract building\", building.getDescription());\n }", "@Nullable\n public abstract String description();", "java.lang.String getDesc();", "String getDescriptionIfNotMet();", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract String getDescription();", "public abstract String getDescription();", "public void testInvalidWorkspaceDescription() {\n \tModelObjectReader reader = new ModelObjectReader();\n \tIPath root = getWorkspace().getRoot().getLocation();\n \tIPath location = root.append(\"ModelObjectWriterTest2.pbs\");\n \n \t/* write the bogus description */\n \ttry {\n \t\tFileWriter writer = new FileWriter(location.toFile());\n \t\twriter.write(getInvalidWorkspaceDescription());\n \t\twriter.close();\n \t} catch (IOException e) {\n \t\tfail(\"1.91\", e);\n \t}\n \n \t/* test read */\n \ttry {\n \t\tFileInputStream input = null;\n \t\ttry {\n \t\t\tinput = new FileInputStream(location.toFile());\n \t\t} catch (FileNotFoundException e) {\n \t\t\tfail(\"1.99\", e);\n \t\t}\n \t\t//on reading invalid values the reader should revert to default values\n \t\tWorkspaceDescription desc2 = (WorkspaceDescription) reader.read(input);\n \t\t//assertion \"1.1\" removed because workspace name can't be invalid\n \t\tassertTrue(\"1.2\", Policy.defaultAutoBuild == desc2.isAutoBuilding());\n \t\tassertTrue(\"1.3\", Policy.defaultDeltaExpiration == desc2.getDeltaExpiration());\n \t\tassertTrue(\"1.4\", Policy.defaultFileStateLongevity == desc2.getFileStateLongevity());\n \t\tassertTrue(\"1.5\", Policy.defaultMaxFileStates == desc2.getMaxFileStates());\n \t\tassertTrue(\"1.6\", Policy.defaultMaxFileStateSize == desc2.getMaxFileStateSize());\n \t\tassertTrue(\"1.7\", Policy.defaultOperationsPerSnapshot == desc2.getOperationsPerSnapshot());\n \t\tassertTrue(\"1.8\", Policy.defaultSnapshots == desc2.isSnapshotEnabled());\n \t} finally {\n \t\t/* remove trash */\n \t\tWorkspace.clear(location.toFile());\n \t}\n }", "@Override\r\n\tpublic String description() {\n\t\treturn null;\r\n\t}", "public void XXXtestEmptyContentDescription() throws Throwable {\n view.setTitle(\"RawIViewPart\");\n verifySettings(\"RawIViewPart\", \"RawIViewPart\", \"\");\n verifyEvents(true, false, true);\n }", "@Override\n public String getDescription() {\n return description;\n }", "@Override\r\n\tpublic String getProblemDescription() {\n\t\treturn null;\r\n\t}", "@Test\n public void testGetDescription() {\n System.out.println(\"getDescription\");\n \n String expResult = \"Description\";\n instance.setDescription(expResult);\n String result = instance.getDescription();\n assertEquals(\"Description not as expected\", expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }", "@Override\n\tpublic String description() {\n\t\treturn null;\n\t}", "public void testWorkspaceDescription() throws Throwable {\n \t\tModelObjectWriter writer = new ModelObjectWriter();\n \t\tWorkspaceDescriptionReader reader = new WorkspaceDescriptionReader();\n \t\tIPath root = getWorkspace().getRoot().getLocation();\n \t\tIPath location = root.append(\"ModelObjectWriterTest.pbs\");\n \n \t\t/* test write */\n \t\tWorkspaceDescription desc = new WorkspaceDescription(\"MyWorkspace\");\n \t\tdesc.setName(\"aName\");\n \t\tdesc.setAutoBuilding(false);\n \t\tdesc.setFileStateLongevity(654321l);\n \t\tdesc.setMaxFileStates(1000);\n \t\tdesc.setMaxFileStateSize(123456789l);\n \n \t\tSafeFileOutputStream output = new SafeFileOutputStream(location.toFile());\n \t\twriter.write(desc, output);\n \t\toutput.close();\n \n \t\t/* test read */\n \t\ttry {\n \t\t\tFileInputStream input = new FileInputStream(location.toFile());\n \t\t\tWorkspaceDescription desc2 = (WorkspaceDescription) reader.read(input);\n \t\t\tassertTrue(\"1.1\", desc.getName().equals(desc2.getName()));\n \t\t\tassertTrue(\"1.2\", desc.isAutoBuilding() == desc2.isAutoBuilding());\n \t\t\tassertTrue(\"1.3\", desc.getDeltaExpiration() == desc2.getDeltaExpiration());\n \t\t\tassertTrue(\"1.4\", desc.getFileStateLongevity() == desc2.getFileStateLongevity());\n \t\t\tassertTrue(\"1.5\", desc.getMaxFileStates() == desc2.getMaxFileStates());\n \t\t\tassertTrue(\"1.6\", desc.getMaxFileStateSize() == desc2.getMaxFileStateSize());\n \t\t\tassertTrue(\"1.7\", desc.getOperationsPerSnapshot() == desc2.getOperationsPerSnapshot());\n \t\t} finally {\n \t\t\t/* remove trash */\n \t\t\tWorkspace.clear(location.toFile());\n \t\t}\n \t}", "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 }", "@Test\n\tpublic void testGetDescription_1()\n\t\tthrows Exception {\n\t\tTreeData fixture = new TreeData((IFile) null, \"\", 1, 1);\n\n\t\tString result = fixture.getDescription();\n\n\t\t// add additional test code here\n\t\tassertEquals(\"\", result);\n\t}", "public synchronized TestDescription getDescription()\n throws Fault {\n if (desc == null) {\n // reconstitute description (probably from file)\n reload();\n }\n return desc;\n }", "@Test(expected = IllegalArgumentException.class)\n public void testConstructorDescriptionNull() {\n PlannedActivity plannedActivity = new PlannedActivity(0,\n new Site(\"factory\", \"area\"), new Typology(\"typology\"),\n null, 0, true, 1, new Procedure(\"name\", \"smp\"), \"workspaceNotes\");\n\n }", "@Test\n public void test132() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \"Col componet can be added only to a TableBlock.\", \"Col componet can be added only to a TableBlock.\");\n Double double0 = new Double(0.0);\n Text text0 = null;\n try {\n text0 = new Text(hidden0, double0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public String getDescription(){ return description; }", "public String getDescription(){return description;}", "public String getDescription(){return description;}", "public String getTestDescription() {\r\n\treturn \"\";\r\n }", "@Override\n public int describeContents()\n {\n return 0;\n }", "@Override\r\n public int describeContents() {\r\n return 0;\r\n }", "@Override\n public int describeContents() { return 0; }", "private void testAccessibleDescription(Component comp, AccessibleContext comp_AC) {\n String desc = comp_AC.getAccessibleDescription();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testAccessibleDescription()> - accessibleDescription=\"+desc);\n \n if (testSettings.AP_accessibleDescription && (desc == null)){\n noDesc.add(comp);\n }\n }", "public String getDescription()\n\t{ //begin vpj-cd e-evolution 30.09.2005\n\t\t//return s_driver.toString();\n try\n\t\t{\n\t\t\tif (s_driver == null)\n\t\t\t\tgetDriver();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t}\n\t\tif (s_driver != null)\n\t\t\treturn s_driver.toString();\n\t\treturn \"No Driver\";\n //end vpj-cd e-evolution 30.09.2005\n\t}", "public String getDescription() { return description; }", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "public void testgetEfoDescriptionByName() {\n EFOServiceImpl impl = new EFOServiceImpl();\n String match = \"An experimental factor in Array Express which are essentially the variable aspects of an experiment design which can be used to describe an experiment, or set of experiments, in an increasingly detailed manner.\";\n assertEquals(match, impl.getEfoDescriptionByName(\"experimental factor\"));\n }", "public String description() {\r\n\t\treturn \"This is the Vancarrier_1st_P_Model description,\" + \"which means it is the first VanCarrier model in a \"\r\n\t\t\t\t+ \"process oriented version.\" + \" \" + \"This model is a service station model located at a \"\r\n\t\t\t\t+ \"container harbour. Conatinertrucks will arrive and \"\r\n\t\t\t\t+ \"require the loading of a container. A Vancarrier (VC) is \"\r\n\t\t\t\t+ \"on duty and will head off to find the required container \"\r\n\t\t\t\t+ \"in the storage. He will then deliver the container to the \"\r\n\t\t\t\t+ \"truck. The truck then leaves the area.\" + \"In case the VC is busy, the truck waits \"\r\n\t\t\t\t+ \"for his turn on the parking-lot.\" + \"If the VC is idle, it waits on his own parking spot for the \"\r\n\t\t\t\t+ \"truck to come.\";\r\n\t}", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }", "@Override\n public int describeContents() {\n return 0;\n }" ]
[ "0.67708546", "0.66372466", "0.6585078", "0.64486724", "0.64480835", "0.64025193", "0.63895804", "0.6344542", "0.6335464", "0.6295764", "0.62891954", "0.62891954", "0.628143", "0.62565076", "0.62565076", "0.62565076", "0.62565076", "0.62565076", "0.62565076", "0.62536615", "0.6249797", "0.62463915", "0.6200221", "0.61928034", "0.61414015", "0.6130153", "0.6121301", "0.6121301", "0.6121301", "0.6121301", "0.6121301", "0.6121301", "0.6121301", "0.6121301", "0.6121301", "0.60946405", "0.6076448", "0.603975", "0.59659016", "0.5961531", "0.5946372", "0.5943389", "0.5943389", "0.5943389", "0.5943389", "0.5943389", "0.5943389", "0.5943389", "0.5943389", "0.5913824", "0.59093434", "0.5889888", "0.5884605", "0.58804226", "0.5874888", "0.58627164", "0.58621293", "0.58482736", "0.58454186", "0.5844177", "0.5832657", "0.583224", "0.58295053", "0.58160394", "0.5814048", "0.5814048", "0.5807858", "0.58057564", "0.5803766", "0.58024365", "0.57994676", "0.5795", "0.5791925", "0.57821417", "0.5777311", "0.5775618", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604", "0.57748604" ]
0.66904575
1
Test case for SF bug 940570 listIndividuals not working with RDFS_INF
public void test_sf_940570() { OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RDFS_INF ); OntClass C = m.createClass( NS + "C" ); Resource a = m.createResource( NS + "a", C ); TestUtil.assertIteratorValues( this, m.listIndividuals(), new Object[] {a} ); OntModel dm = ModelFactory.createOntologyModel( OntModelSpec.DAML_MEM_RULE_INF ); OntClass D = dm.createClass( NS + "D" ); Resource b = dm.createResource( NS + "b", D ); TestUtil.assertIteratorValues( this, dm.listIndividuals(), new Object[] {b} ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 public void testGetAllAtomMapping() throws InvalidSmilesException {\n System.out.println(\"getAllAtomMapping\");\n SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());\n IAtomContainer target = sp.parseSmiles(\"C\\\\C=C/Nc1cccc(c1)N(O)\\\\C=C\\\\C\\\\C=C\\\\C=C/C\");\n IAtomContainer query = sp.parseSmiles(\"Nc1ccccc1\");\n\n VF2lib smsd1 = new VF2lib();\n smsd1.set(query, target);\n smsd1.searchMCS(true);\n assertNotNull(smsd1.getFirstMapping());\n\n assertEquals(4, smsd1.getAllAtomMapping().size());\n }", "public ArrayList<Integer> makeIndividual();", "public List<Individual> getListOfIndividuals(){\n \tList<Individual> individualList = new ArrayList<>();\n\t\tIndividual individualObject = null;\n\t\tMap<String, Object> myMap = null;\n\t\tObject obj = null;\n\t\tJSONObject jsonObject = null;\n\t\tJSONArray jsonArray = null;\n\t\tJSONObject jsonObj = null;\n\t\tJSONParser parser = new JSONParser();\n\t\ttry {\n\t\t\tobj = parser.parse(new FileReader(\"src/main/resources/db.json\"));\n\t\t\tjsonObject = (JSONObject) obj;\n\n\t\t\tjsonArray = (JSONArray) jsonObject.get(\"individuals\");\n\n\t\t\tint length = jsonArray.size();\n\t\t\tfor (int size = 0; size < length; size++) {\n\n\t\t\t\tjsonObj = (JSONObject) jsonArray.get(size);\n\t\t\t\tmyMap = new HashMap<String, Object>();\n\t\t\t\tmyMap.put(\"name\", jsonObj.get(\"name\"));\n\t\t\t\tmyMap.put(\"id\", ((Long) jsonObj.get(\"id\")).intValue());\n\t\t\t\tmyMap.put(\"active\", jsonObj.get(\"active\"));\n\t\t\t\tindividualObject = new Individual(myMap);\n\t\t\t\tindividualList.add(individualObject);\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn individualList;\n }", "@Test\r\n\t\tpublic void readAnExistingRouteFatherList(){\r\n\t\t\tList<RouteFather> routeFathers = routeFatherDAO.read();\r\n\t\t\tAssert.assertTrue(\"it should returns full list\", !routeFathers.isEmpty());\r\n\t\t}", "public abstract java.util.List extractListItems (Object obj, String countProp, String itemProp) \n\t throws SAFSException;", "@Test\n\tpublic void testListOperations() {\n\t\tassertFalse(streetAddresses.contains(s1PlusNine));\n\t\tassertTrue(streetAddresses.stream().anyMatch(s -> comparator.compare(s1PlusNine, s) == 0));\n\t}", "public abstract List get(List oids) throws OIDDoesNotExistException;", "@Test(timeout = 4000)\n public void test21() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n ArrayList<String> arrayList0 = new ArrayList<String>();\n FileInputStream fileInputStream0 = fileUtil0.fetchAccessories(\"bq,4~/{MxS* Ht9k\", arrayList0);\n assertNull(fileInputStream0);\n }", "@Test\n public void testGetAllMapping() throws InvalidSmilesException {\n System.out.println(\"getAllMapping\");\n SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());\n IAtomContainer target = sp.parseSmiles(\"C\\\\C=C/Nc1cccc(c1)N(O)\\\\C=C\\\\C\\\\C=C\\\\C=C/C\");\n IAtomContainer query = sp.parseSmiles(\"Nc1ccccc1\");\n\n VF2lib smsd1 = new VF2lib();\n smsd1.set(query, target);\n smsd1.searchMCS(true);\n assertNotNull(smsd1.getFirstMapping());\n\n assertEquals(4, smsd1.getAllMapping().size());\n }", "public void testListClaim(){\n\t}", "@Test\n public void testGetInfluentialUsers01() {\n System.out.println(\"getInfluentialUsers\");\n\n Set<User> expResult = new HashSet<>();\n expResult.add(new User(\"nick3\", \"[email protected]\"));\n expResult.add(new User(\"nick5\", \"[email protected]\"));\n expResult.add(new User(\"nick8\", \"[email protected]\"));\n\n Set<User> result = sn10.getInfluentialUsers();\n assertEquals(expResult, result);\n }", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList();", "void testCanGetList();", "@DirtiesDatabase\n\t@Test\n\tpublic void testRetrieveByBundleConstituentList() {\n\t\tcreateBundles();\n\t\tcreatePA(\"P1\", \"PA1\", \"PLGUID\", \"CGUID\");\n\t\tcreatePA(\"P1\", \"PA2\", \"PLGUID\", \"C2GUID\");\n\t\t\n\t\t\n\t\tPriceAdjustmentDao dao = getBeanFactory().getBean(\"priceAdjustmentDao\");\n\t\tCollection<String> bcList = new ArrayList<String>();\n\t\tbcList.add(\"CGUID\");\n\t\tbcList.add(\"C2GUID\");\n\t\tCollection<PriceAdjustment> assignments = dao.findByPriceListBundleConstituents(\"PLGUID\", bcList);\n\t\tassertEquals(2, assignments.size());\n\t}", "public void harvest(List<IRI> iris);", "private FeatureCollection<SimpleFeatureType, SimpleFeature> findFeatures( FeatureStore<SimpleFeatureType, SimpleFeature> store, List<String> fidList ) throws SOProcessException {\n \n\n try {\n FidFilter filter = FILTER_FACTORY.createFidFilter();\n filter.addAllFids(fidList);\n \n FeatureCollection<SimpleFeatureType, SimpleFeature> features = store.getFeatures(filter);\n return features;\n \n } catch (IOException e) {\n final String msg = e.getMessage();\n LOGGER.severe(msg);\n throw new SOProcessException(msg);\n }\n }", "@Test(timeout = 4000)\n public void test20() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/A_X-0;;JLT_;1IJDVA.XML\");\n FileSystemHandling.createFolder(evoSuiteFile0);\n ArrayList<Object> arrayList0 = new ArrayList<Object>();\n FileInputStream fileInputStream0 = fileUtil0.fetchAccessories(\"X-0;;JLT_;1iJdvA\", arrayList0);\n assertNull(fileInputStream0);\n }", "@Test\n\tpublic void test() throws IOException, IllegalArgumentException, IllegalAccessException {\n\t\tList<SAMRecord> samarrl= new ArrayList<SAMRecord>();\n\t\tBedRecord bed = new BedRecord();\n\t\tbed.setChrom(\"chr9\");\n\t\tbed.setStart(122669886);\n\t\tbed.setEnd(122672448);\n\t\tbed.setStrand(\"+\");\n\t\tSAMRecordIterator samit = null;\n\t\tFile samfile = new File(\"C:/Users/Fengchao/Desktop/IASearch/mtr42_sorted_F_2.bam\");\n\t\tSAMFileReader samfilereader = new SAMFileReader(samfile);\n\n\t\tsamarrl = QuerySAMUtil.querySam(bed, samfilereader, 0, 0, true, true);\n\n\t\tSystem.out.println(samarrl.size());\n\n\t}", "private Set<String> getSubNetGenes(String organism, String file) {\n\n\t\tSet<String> localSubNetGenes = Sets.newHashSet();\n\t\tDocument doc = openDoc(file);\n\n\t\t// Now I got the doc. So I can traverse the file\n\t\tElement root = doc.getDocumentElement();\n\n\t\tNodeList nodes = root.getChildNodes();\n\n\t\tfor (int i = 0; i < nodes.getLength(); i++) {\n\t\t\tNode node = nodes.item(i);\n\n\t\t\tif (node.getNodeName().equals(\"entry\")) {\n\n\t\t\t\tString localName = null;\n\t\t\t\tString objType = null;\n\n\t\t\t\tNamedNodeMap localAttrs = node.getAttributes();\n\n\t\t\t\tfor (int k = 0; k < localAttrs.getLength(); k++) {\n\n\t\t\t\t\tNode localAt = localAttrs.item(k);\n\n\t\t\t\t\tif (localAt.getNodeName().equals(\"name\")) {\n\t\t\t\t\t\tlocalName = localAt.getNodeValue();\n\t\t\t\t\t} else if (localAt.getNodeName().equals(\"type\")) {\n\t\t\t\t\t\tobjType = localAt.getNodeValue();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tprocessEntry(localSubNetGenes, localName, objType);\n\t\t\t}\n\n\t\t}\n\t\treturn localSubNetGenes;\n\t}", "@Test\r\n public void teamListTooLargeTest(){\r\n int tooBigListSize = 15;\r\n\r\n int expectedResult = extractor.extractXDriversOrTeams(tooBigListSize, \"table.msr_season_team_results\", \"td.msr_team\").size();\r\n\r\n assertEquals(\"expected results = \" + expectedResult, expectedResult, extractor.extractXDriversOrTeams(tooBigListSize, \"table.msr_season_team_results\", \"td.msr_team\").size());\r\n System.out.println(\"\");\r\n }", "java.util.List<pl.stormit.protobuf.UserProtos.User.Interest> \n getInterestsList();", "public abstract String getListItem (Object obj, int i, String itemProp) \n throws SAFSException;", "@Test\n\tpublic void getMissingItemReturnsNull() {\n\t\tfor (ApplicationContext context : AppContextSetup.contextList){\n\t\t\tListDao dao = (ListDao)context.getBean(\"testListDao\");\n\t\t\tT2ReferenceImpl r = new T2ReferenceImpl();\n\t\t\tr.setNamespacePart(\"testNamespace1\");\n\t\t\tr.setLocalPart(\"testLocal1\");\n\t\t\tr.setReferenceType(T2ReferenceType.IdentifiedList);\n\t\t\tr.setDepth(0);\n\t\t\tr.setContainsErrors(false);\n\t\t\tT2ReferenceListImpl newList = new T2ReferenceListImpl();\n\t\t\tnewList.setTypedId(r);\n\t\t\tassertNull(dao.get(r));\n\t\t}\n\t}", "@Test\n public void testGetNearbyFriendsInAgivenDistance02() {\n System.out.println(\"getNearbyFriendsInAgivenDistance\");\n User user = null;\n for (User user1 : sn10.getUsersList()) {\n if (user1.getNickname().equals(\"nick0\")) {\n user = user1;\n }\n }\n Double distance = 70.0;\n HashSet<User> expResult = new HashSet();\n expResult.add(new User(\"nick4\", \"[email protected]\"));\n\n HashSet<User> result = sn10.getNearbyFriendsInAgivenDistance(user, distance);\n assertFalse(expResult.equals(result));\n }", "@Test\n public void testToRouterFilterList_extendedAccessList_vendorStructureId() {\n ExtendedAccessList acl = new ExtendedAccessList(\"name\");\n RouteFilterList rfl = toRouteFilterList(acl, \"file\");\n assertThat(\n rfl.getVendorStructureId(),\n equalTo(\n new VendorStructureId(\n \"file\", AristaStructureType.IPV4_ACCESS_LIST_EXTENDED.getDescription(), \"name\")));\n }", "@Test\n\tpublic void testSearchIteratorDenormalizedFilter(){\n\t\t\n\t\tRegionQueryPart regionQueryPart = new RegionQueryPart();\n\t\tregionQueryPart.setRegion(new String[]{\"AB\",\"bc\"});\n\t\t//allof should be read : give me all the native and ephemere of AB and BC\n\t\tregionQueryPart.setRegionSelector(RegionSelector.ALL_OF);\n\t\t\n\t\tIterator<Map<String,Object>> taxonIt = taxonDAO.searchIteratorDenormalized(-1, null, null, regionQueryPart, NATIVE_EPHEMERE_STATUSES, null, false, null);\n\t\tassertTrue(taxonIt.hasNext());\n\t\t\n\t\tList<String> mockTaxonNameList = extractMockTaxonNameFromMap(taxonIt);\n\t\tassertTrue(mockTaxonNameList.containsAll(Arrays.asList(new String[]{MOCK1_AUTHOR,MOCK3_AUTHOR})));\n\t\tassertFalse(mockTaxonNameList.contains(MOCK2_AUTHOR));\n\t\t\n\t\t//anyof should be read : give me any of the native and ephemere of AB or BC\n\t\tregionQueryPart.setRegionSelector(RegionSelector.ANY_OF);\n\t\ttaxonIt = taxonDAO.searchIteratorDenormalized(-1, null, -1, regionQueryPart, NATIVE_EPHEMERE_STATUSES, null, false, null);\n\t\tassertTrue(extractMockTaxonNameFromMap(taxonIt).containsAll(Arrays.asList(new String[]{MOCK1_AUTHOR,MOCK2_AUTHOR,MOCK3_AUTHOR})));\n\t\t\n\t\t//only_in should be read : give me the native and ephemere that are only native or ephemere in AB or BC\n\t\tregionQueryPart.setRegionSelector(RegionSelector.ONLY_IN);\n\t\ttaxonIt = taxonDAO.searchIteratorDenormalized(-1, null, -1, regionQueryPart, NATIVE_EPHEMERE_STATUSES, null, false, null);\n\t\tmockTaxonNameList = extractMockTaxonNameFromMap(taxonIt);\n\t\tassertTrue(mockTaxonNameList.containsAll(Arrays.asList(new String[]{MOCK3_AUTHOR, MOCK5_AUTHOR})));\n\t\tassertEquals(2, mockTaxonNameList.size());\n\t\t\n\t\t//only_in and setSearchOnlyInCanada should be read : give me the native and ephemere that are only native or ephemere in AB or BC (ignoring Greenland and St-Pierre)\n\t\tregionQueryPart.setRegionSelector(RegionSelector.ONLY_IN);\n\t\tregionQueryPart.setSearchOnlyInCanada(true);\n\t\ttaxonIt = taxonDAO.searchIteratorDenormalized(-1, null, -1, regionQueryPart, NATIVE_EPHEMERE_STATUSES, null, false, null);\n\t\tmockTaxonNameList = extractMockTaxonNameFromMap(taxonIt);\n\t\tassertTrue(mockTaxonNameList.containsAll(Arrays.asList(new String[]{MOCK3_AUTHOR, MOCK4_AUTHOR, MOCK5_AUTHOR, MOCK6_AUTHOR, MOCK7_AUTHOR})));\n\t\tassertEquals(5, mockTaxonNameList.size());\n\t\t\n\t\t//all of, only in and setSearchOnlyInCanada should be read : give me the native,ephemere that are only native or ephemere in AB and BC (ignoring Greenland and St-Pierre status)\n\t\tregionQueryPart.setRegionSelector(RegionSelector.ALL_OF_ONLY_IN);\n\t\tregionQueryPart.setSearchOnlyInCanada(true);\n\t\ttaxonIt = taxonDAO.searchIteratorDenormalized(-1, null, -1, regionQueryPart, NATIVE_EPHEMERE_STATUSES, null, false, null);\n\t\tmockTaxonNameList = extractMockTaxonNameFromMap(taxonIt);\n\t\tassertTrue(mockTaxonNameList.containsAll(Arrays.asList(new String[]{MOCK3_AUTHOR, MOCK4_AUTHOR, MOCK5_AUTHOR})));\n\t\tassertEquals(3, mockTaxonNameList.size());\n\t\t\n\t\t//all of, only in should be read : give me the native,ephemere that are only native or ephemere in AB and BC (including Greenland and St-Pierre status)\n\t\tregionQueryPart.setRegionSelector(RegionSelector.ALL_OF_ONLY_IN);\n\t\tregionQueryPart.setSearchOnlyInCanada(false);\n\t\ttaxonIt = taxonDAO.searchIteratorDenormalized(-1, null, -1, regionQueryPart, NATIVE_EPHEMERE_STATUSES, null, false, null);\n\t\tmockTaxonNameList = extractMockTaxonNameFromMap(taxonIt);\n\t\tassertTrue(mockTaxonNameList.containsAll(Arrays.asList(new String[]{MOCK3_AUTHOR, MOCK5_AUTHOR})));\n\t\tassertEquals(2, mockTaxonNameList.size());\n\t\t\n\t\t//test taxonid filter\n\t\tregionQueryPart.setRegionSelector(RegionSelector.ALL_OF);\n\t\ttaxonIt = taxonDAO.searchIteratorDenormalized(-1, null, 1, regionQueryPart, NATIVE_EPHEMERE_STATUSES, null, false, null);\n\t\tmockTaxonNameList = extractMockTaxonNameFromMap(taxonIt);\n\t\tassertTrue(mockTaxonNameList.containsAll(Arrays.asList(new String[]{MOCK1_AUTHOR})));\n\t}", "@Test\n public void testFindAllStudents() throws Exception {\n List<Students> list = cs.findAllStudents();\n for (Students stu :\n list) {\n System.out.println(stu);\n }\n }", "public Set<Individual> getFiller(Role role, Concept concept, Individual ind) {\n\t\tTList<T> current = this.getRoot();\n\t\tSet<Individual> candidateRoles = new HashSet<>();\n\t\tSet<Individual> candidateInds = new HashSet<>();\n\t\twhile (current != null) {\n\t\t\tAssertion aValue = current.getValue();\n\t\t\tif (aValue instanceof RoleAssertion) {\n\t\t\t\tRoleAssertion ra = (RoleAssertion) aValue;\n\t\t\t\tDLElement el = ra.getElement();\n\t\t\t\tif (role.equals(el) && ind.equals(ra.getIndividualA()))\n\t\t\t\t\tcandidateRoles.add(ra.getIndividualB());\n\t\t\t} else if (aValue instanceof ConceptAssertion) {\n\t\t\t\tif (concept.equals(aValue.getElement()))\n\t\t\t\t\tcandidateInds.add(aValue.getIndividualA());\n\t\t\t}\n\t\t\tcurrent = current.getNext();\n\t\t}\n\t\t//find individuals\n\t\tcandidateInds.retainAll(candidateRoles);\n\t\treturn candidateInds;\n\t}", "@Override\r\n\tpublic List<TraOfficialspecial> findOfficialSpecialList(String specialName,String status,\r\n\t\t\tint beginIndex, int endIndex) {\n\t\treturn officialspecialMapper.findOfficialSpecialList(specialName,status, beginIndex, endIndex);\r\n\t}", "public List<Individual> getListOfActiveIndividuals(){\n List<Individual> individualList = new ArrayList<>();\n\t\tList<Individual> activeIndividualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\n\t\t\tif (individual.isActive()) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tactiveIndividualList.add(individual);\n\n\t\t\t}\n\t\t}\n\n\t\treturn activeIndividualList;\n\n }", "@Test\n public void testSubList() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List expResult = Arrays.asList(1, 7, 7);\n OasisList<Integer> result = (OasisList<Integer>) instance.subList(1, 4);\n\n assertTrue(isEqual(expResult, result));\n\n }", "@Test\n\tpublic void findTypeList() {\n\t}", "public List<Individual> getListOfInactiveIndividuals(){\n\t \tList<Individual> individualList = new ArrayList<>();\n\t\tList<Individual> inactiveIndividualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\n\t\t\tif (!individual.isActive()) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tinactiveIndividualList.add(individual);\n\n\t\t\t}\n\t\t}\n\n\t\treturn inactiveIndividualList;\n }", "@Test\n public void getAllRecipeIngredients_ReturnsList(){\n int returned = testDatabase.addRecipe(testRecipe);\n ArrayList<RecipeIngredient> allIngredients = testDatabase.getAllRecipeIngredients(returned);\n assertNotEquals(\"getAllRecipeIngredients - Non-empty List Returned\", 0, allIngredients.size());\n }", "List<ArtistCommunityInformation> listArtistsPendingLocalAction(\n final ArtistCommunitySelectableIdentity selectedIdentity,\n final int max,\n final int offset) throws CantListArtistsException;", "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 }", "public void test2_updateSingletonList() {\n ArrayList<Participant> dummyList = new ArrayList<>();\n Participant dummy1 = new Participant(\"UpdateDummy1\");\n Participant dummy2 = new Participant(\"UpdateDummy2\");\n Participant dummy3 = new Participant(\"UpdateDummy3\");\n Participant dummy4 = new Participant(\"UpdateDummy4\");\n\n dummyList.add(dummy1);\n dummyList.add(dummy2);\n dummyList.add(dummy3);\n dummyList.add(dummy4);\n\n // add test users into the server\n apt.execute(dummy1, dummy2, dummy3, dummy4);\n\n // attempt to obtain all of these participants within the singleton list\n ParticipantController.updateSingletonList();\n\n for (Participant found : dummyList) {\n if (instance.getParticipantList().contains(found)) {\n assertTrue(true);\n } else {\n assertTrue(\"Not all found\", false);\n }\n }\n\n\n }", "@Test\r\n public void testListAll() {\r\n System.out.println(\"listAll\");\r\n IwRepoDAOMarkLogicImplStud instance = new IwRepoDAOMarkLogicImplStud();\r\n String expResult = \"\";\r\n String result = instance.listAll();\r\n System.out.println(result);\r\n }", "@Test\r\n\tpublic void testContainsAll() {\r\n\t\tDoubleList sample = new DoubleList(new Munitions(2, 3, \"iron\"));\r\n\t\tAssert.assertTrue(list.containsAll(sample));\r\n\t\tsample.add(new Munitions(2, 2, \"iron\"));\r\n\t\tAssert.assertFalse(list.containsAll(sample));\r\n\t}", "public static Vector TEST_LIST(Feature f) {\n\n Vector v = new Vector();\n if (IS_CONTINUOUS(f.type)) {\n if (f.dmax - f.dmin <= 0.0) {\n v = null;\n } else {\n double vmin = f.dmin;\n double vmax = f.dmax;\n double delta = (vmax - vmin) / ((double) (NUMBER_CONTINUOUS_TIES + 1));\n double vcur = vmin + delta;\n int i;\n for (i = 0; i < NUMBER_CONTINUOUS_TIES; i++) {\n v.addElement(new Double(vcur));\n vcur += delta;\n }\n }\n } else if (IS_INTEGER(f.type)) {\n if (f.imax - f.imin <= 0) {\n v = null;\n } else {\n int vmin = f.imin;\n int nvals = f.imax - f.imin;\n int i;\n for (i = 0; i < nvals; i++) {\n v.addElement(new Integer(vmin + i));\n }\n }\n } else if (IS_NOMINAL(f.type)) {\n if (!Discriminator_Tree.RANDOMISE_SPLIT_FINDING_WHEN_TOO_MANY_SPLITS)\n v = Utils.ALL_NON_TRIVIAL_SUBSETS(f.modalities);\n else if (f.modalities.size() <= Discriminator_Tree.MAX_CARD_MODALITIES_BEFORE_RANDOMISATION)\n v = Utils.ALL_NON_TRIVIAL_SUBSETS(f.modalities);\n else\n v =\n Utils.ALL_NON_TRIVIAL_BOUNDED_SUBSETS(\n f.modalities, Discriminator_Tree.MAX_SIZE_FOR_RANDOMISATION);\n if (v.size() == 0) v = null;\n }\n\n return v;\n }", "java.util.List<iet.distributed.telemetry.Feature> \n getFeatureList();", "@Override\r\n\tpublic List<TraOfficialspecial> findBestSpecialList(int beginIndex,int size) {\n\t\treturn officialspecialMapper.findBestSpecialList(beginIndex,size);\r\n\t}", "java.util.List<java.lang.Integer> getListSnIdList();", "@Test\n public void testGetFirstAtomMapping() throws InvalidSmilesException {\n System.out.println(\"getFirstAtomMapping\");\n SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());\n IAtomContainer target = sp.parseSmiles(\"C\\\\C=C/Nc1cccc(c1)N(O)\\\\C=C\\\\C\\\\C=C\\\\C=C/C\");\n IAtomContainer query = sp.parseSmiles(\"Nc1ccccc1\");\n\n VF2lib smsd1 = new VF2lib();\n smsd1.set(query, target);\n smsd1.searchMCS(true);\n assertNotNull(smsd1.getFirstMapping());\n\n Assert.assertEquals(7, smsd1.getFirstAtomMapping().getCount());\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testVowlIndividual() throws IllegalArgumentException {\n\t GraphRequestModel requestModel = new GraphRequestModel(\"test\", \"reasoningFalse\", \"test\", \n\t \t\t\"test file contents\", \"vowl\", \"individual\", false);\n\t GraphRequestValidator.validateRequest(requestModel);\n\t}", "@Test\n public void testLookupStar() throws Exception\n {\n LdapDN dn = new LdapDN( \"cn=test,ou=system\" );\n Entry entry = service.getAdminSession().lookup( dn, new String[]{ \"*\" } );\n \n assertNotNull( entry );\n \n // Check that we don't have any operational attributes :\n // We should have only 3 attributes : objectClass, cn and sn\n assertEquals( 3, entry.size() ); \n \n // Check that all the user attributes are present\n assertEquals( \"test\", entry.get( \"cn\" ).getString() );\n assertEquals( \"sn_test\", entry.get( \"sn\" ).getString() );\n assertTrue( entry.contains( \"objectClass\", \"top\", \"person\" ) );\n }", "public void test_lt_01() {\n OntModel m = ModelFactory.createOntologyModel();\n \n DatatypeProperty p = m.createDatatypeProperty(NS + \"p\");\n OntClass c = m.createClass(NS + \"A\");\n \n Individual i = m.createIndividual(NS + \"i\", c);\n i.addProperty(p, \"testData\");\n \n int count = 0;\n \n for (Iterator j = i.listPropertyValues(p); j.hasNext();) {\n //System.err.println(\"Individual i has p value: \" + j.next());\n j.next();\n count++;\n }\n \n assertEquals(\"i should have one property\", 1, count);\n }", "@Test\r\n\t\tpublic void readANonExistingRouteFatherList(){\r\n\t\t\trouteFatherDAO.delete(this.routeFather);\r\n\t\t\tList<RouteFather> routeFathers = routeFatherDAO.read();\r\n\t\t\tAssert.assertTrue(\"it should returns empty list\", routeFathers.isEmpty());\r\n\t\t}", "@Override\n public List<IntraUserInformation> getAllIntraUsers(String identityPublicKey, int max, int offset) throws CantGetIntraUsersListException {\n try {\n List<IntraUserInformation> intraUserList = new ArrayList<IntraUserInformation>();\n\n\n List<IntraWalletUserActor> actorsList = this.intraWalletUserManager.getAllIntraWalletUsers(identityPublicKey, max, offset);\n\n for (IntraWalletUserActor intraUserActor : actorsList) {\n intraUserList.add(new IntraUserModuleInformation(intraUserActor.getName(),intraUserActor.getPhrase(),intraUserActor.getPublicKey(),intraUserActor.getProfileImage(),intraUserActor.getContactState(),\"\"));\n }\n return intraUserList;\n } catch (CantGetIntraWalletUsersException e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET ALL INTRA USERS FROM LOGGED USER\", e, \"\", \"\");\n } catch (Exception e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET ALL INTRA USERS FROM LOGGED USER\", FermatException.wrapException(e), \"\", \"unknown exception\");\n }\n }", "public interface SearchIndexExcluderList {\n\n\t/**\n\t * Do any required setup on the individual Excluders.\n\t */\n\tvoid startIndexing();\n\n\t/**\n\t * Do any required teardown on the individual Excluders.\n\t */\n\tvoid stopIndexing();\n\n\t/**\n\t * Poll the list of excluders regarding this individual.\n\t *\n\t * If any returns non-null, the individual is excluded. If all return null,\n\t * the individual is not excluded.\n\t */\n\tboolean isExcluded(Individual ind);\n\n}", "public static ExtendedIterator<? extends Resource> listTypes(Resource individual)\n\t{\n\t\tif (individual instanceof OntResource)\n\t\t\treturn ((OntResource)individual).listRDFTypes(false);\n\t\telse\n\t\t\treturn individual.listProperties(RDF.type).mapWith(new Map1<Statement, Resource>() {\n\t\t\t\tpublic Resource map1(Statement statement) {\n\t\t\t\t\treturn statement.getResource();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic Resource apply(Statement t) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t});\n\t}", "public static List<SSBNNode> translateSimpleSSBNNodeListToSSBNNodeList( \r\n\t\t\tList<SimpleSSBNNode> simpleSSBNNodeList, \r\n\t\t\tProbabilisticNetwork pn) throws \r\n\t\t\t SSBNNodeGeneralException, \r\n\t\t\t ImplementationRestrictionException{\r\n\t\t\r\n\t\tList<SSBNNode> listSSBNNodes = new ArrayList<SSBNNode>(); \r\n\t\tcorrespondencyMap = new HashMap<SimpleSSBNNode, SSBNNode>(); \r\n\t\t\r\n\t\tMap<ContextNode, ContextFatherSSBNNode> mapContextNode = \r\n\t\t\t new HashMap<ContextNode, ContextFatherSSBNNode>(); \r\n\t\t\r\n\t\t//1 Create all nodes with its states \r\n\t\t\r\n\t\tfor(SimpleSSBNNode simple: simpleSSBNNodeList){\r\n\t\t\t\r\n\t\t\tSSBNNode ssbnNode = SSBNNode.getInstance(pn, simple.getResidentNode()); \r\n\t\t\tcorrespondencyMap.put(simple, ssbnNode);\r\n\t\t\tlistSSBNNodes.add(ssbnNode); \r\n\t\t\t\r\n\t\t\t//Arguments. \r\n\t\t\tfor(int i = 0; i < simple.getOvArray().length; i++){\r\n\t\t\t\tOVInstance ovInstance = OVInstance.getInstance(\r\n\t\t\t\t\t\tsimple.getOvArray()[i],\tsimple.getEntityArray()[i]); \r\n\t\t\t\tssbnNode.addArgument(ovInstance);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Finding. \r\n\t\t\tif(simple.isFinding()){\r\n\t\t\t\tssbnNode.setValue(simple.getState()); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//Default distribution\r\n\t\t\tif(simple.isDefaultDistribution()){\r\n\t\t\t\tssbnNode.setUsingDefaultCPT(true); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tssbnNode.setPermanent(true); \r\n\t\t\t\r\n\t\t\t//The values of the ordinary variables are different depending in \r\n\t\t\t//which MFrag we are dealing. \r\n\t\t\t\r\n\t\t\t//The key for do the match is the order of the arguments. The order\r\n\t\t\t//should be the same in every MFrags of the node. \r\n\t\t\t\r\n\t\t\t//Lets deal first with Resident MFrag\r\n\r\n\t\t\tOrdinaryVariable[] residentOvArray = \r\n\t\t\t\t\tssbnNode.getResident().getOrdinaryVariableList().toArray(\r\n\t\t\t\t\t\t\tnew OrdinaryVariable[ssbnNode.getResident().getOrdinaryVariableList().size()]\r\n\t\t\t\t\t\t\t); \r\n\t\t\t\r\n\t\t\tList<OVInstance> argumentsForResidentMFrag = new ArrayList<OVInstance>(); \r\n\t\t\tfor(int i = 0; i < residentOvArray.length; i++){\r\n\t\t\t\tOVInstance ovInstance = OVInstance.getInstance(residentOvArray[i], \r\n\t\t\t\t\t\tsimple.getEntityArray()[i]); \r\n\t\t\t\targumentsForResidentMFrag.add(ovInstance); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tssbnNode.addArgumentsForMFrag(\r\n\t\t\t\t\tssbnNode.getResident().getMFrag(), \r\n\t\t\t\t\targumentsForResidentMFrag); \r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// Lets map OVs of every input node pointing to current SSBNNode\r\n\t\t\t\r\n\t\t\tfor(InputNode inputNode: simple.getResidentNode().getInputInstanceFromList()){\r\n\t\t\t\t\r\n\t\t\t\tOrdinaryVariable[] ovArray = \r\n\t\t\t\t\tinputNode.getResidentNodePointer().getOrdinaryVariableArray(); \r\n\t\t\t\t\r\n\t\t\t\tList<OVInstance> argumentsForMFrag = new ArrayList<OVInstance>();\r\n\r\n// OLD CODE\t\t\t\t\r\n//\t\t\t\tfor(int i = 0; i < ovArray.length; i++){\r\n//\t\t\t\t\tOVInstance ovInstance = OVInstance.getInstance(ovArray[i], simple.getEntityArray()[i]); \r\n// argumentsForMFrag.add(ovInstance); \t\r\n//\t\t\t\t}\r\n\r\n// NEW CODE \r\n\t\t\t\tif( ! (simple.getOvArrayForMFrag(inputNode.getMFrag()) == null )){\r\n\t\t\t\t\tfor(int i = 0; i < ovArray.length; i++){\r\n\t\t\t\t\t\tOrdinaryVariable ov = simple.getOvArrayForMFrag(inputNode.getMFrag())[i]; \r\n\t\t\t\t\t\tOVInstance ovInstance = OVInstance.getInstance(ov,simple.getEntityArray()[i]); \t\t\t\t\t\r\n\t\t\t\t\t\targumentsForMFrag.add(ovInstance); \r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n//TODO This is an old bug... when we don't have an input instance of the node, we won't have a MFrag Instance \r\n// for it... what makes the throws one exception. \r\n\t\t\t\t\tfor(int i = 0; i < ovArray.length; i++){\r\n\t\t\t\t\t\tOVInstance ovInstance = OVInstance.getInstance(ovArray[i], simple.getEntityArray()[i]);\r\n\t\t\t\t\t\targumentsForMFrag.add(ovInstance); \t\t\t\t\t\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tssbnNode.addArgumentsForMFrag(\r\n\t\t\t\t\t\tinputNode.getMFrag(), \r\n\t\t\t\t\t\targumentsForMFrag); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Treat the context node father\r\n\t\t\tList<SimpleContextNodeFatherSSBNNode> simpleContextNodeList = \r\n\t\t\t\tsimple.getContextParents(); \r\n\t\t\t\r\n\t\t\tif(simpleContextNodeList.size() > 0){\r\n\t\t\t\tif(simpleContextNodeList.size() > 1){\r\n\t\t\t\t\tthrow new ImplementationRestrictionException(\r\n\t\t\t\t\t\t\tImplementationRestrictionException.MORE_THAN_ONE_CTXT_NODE_SEARCH); \r\n\t\t\t\t}else{\r\n\t\t\t\t\t//We have only one context node father\r\n\t\t\t\t\tContextNode contextNode = simpleContextNodeList.get(0).getContextNode(); \r\n\t\t\t\t\tContextFatherSSBNNode contextFather = mapContextNode.get(contextNode); \r\n\t\t\t\t\tif(contextFather == null){\r\n\t\t\t\t\t\tcontextFather = new ContextFatherSSBNNode(pn, contextNode, new ProbabilisticNode(), \r\n\t\t\t\t\t\t\t\tsimpleContextNodeList.get(0).getOvProblematic(), simple.getMFragInstance().getOVInstanceList());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tList<ILiteralEntityInstance> possibleValueList = \r\n\t\t\t\t\t\t\t\tnew ArrayList<ILiteralEntityInstance>(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(String entity: simpleContextNodeList.get(0).getPossibleValues()){\r\n\t\t\t\t\t\t\tpossibleValueList.add(LiteralEntityInstance.getInstance(\r\n\t\t\t\t\t\t\t\t\tentity, \r\n\t\t\t\t\t\t\t\t\tsimpleContextNodeList.get(0).getOvProblematic().getValueType())); \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(ILiteralEntityInstance lei: possibleValueList){\r\n\t\t\t\t\t\t\tcontextFather.addPossibleValue(lei);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n//\t\t\t\t\t\tcontextFather.setOvProblematic(simpleContextNodeList.get(0).getOvProblematic());\r\n\t\t\t\t\t\tmapContextNode.put(contextNode, contextFather); \r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tssbnNode.setContextFatherSSBNNode(contextFather);\r\n\t\t\t\t\t} catch (InvalidParentException e) {\r\n\t\t\t\t\t\t//This exception don't occur in this case... \r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\tthrow new RuntimeException(e.getMessage()); \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}\r\n\t\t\tif (simple.isNodeInAVirualChain()) {\r\n\t\t\t\t// change the name of chain nodes\r\n\t\t\t\tssbnNode.getProbNode().setName(\"Chain\"+ simple.getStepsForChainNodeToReachMainNode() + \"_\" + ssbnNode.getProbNode().getName());\r\n\t\t\t\tDebug.println(ssbnNode.getProbNode().getName());\r\n\t\t\t}\r\n\t\t\tsimple.setProbNode(ssbnNode.getProbNode());\r\n\t\t}\r\n\t\t\r\n\t\t//Create the parent structure \r\n\t\t\r\n\t\tfor(SimpleSSBNNode simple: simpleSSBNNodeList){\r\n\t\t\t\r\n//\t\t\tif(simple.getParents().size()==0){\r\n//\t\t\t\tif(simple.getChildNodes().size()==0){\r\n//\t\t\t\t\tcontinue; //This node is out of the network. \r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\t\t\t\r\n\t\t\tSSBNNode ssbnNode = correspondencyMap.get(simple); \r\n\t\t\t\r\n\t\t\tfor(SimpleSSBNNode parent: simple.getParents()){\r\n\t\t\t\tSSBNNode parentSSBNNode = correspondencyMap.get(parent); \r\n\t\t\t\tssbnNode.addParent(parentSSBNNode, false); \r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn listSSBNNodes; \r\n\t}", "@Test\n @Transactional\n public void ManyToManyQuery() {\n SysRole role = roleDao.findOne(4l);\n role.getUsers().forEach(u-> System.out.println(u));\n }", "public abstract List<Patient> getAllPatientNode();", "@Test\n public void test5(){\n List<Employee> list= fileEmployee(employees, new MyPredicate<Employee>() {\n @Override\n public boolean test(Employee employee) {\n return employee.getSalary()<=5000;\n }\n });\n for (Employee e : list){\n System.out.println(e);\n }\n }", "List<ArtistCommunityInformation> listWorldArtists(\n ArtistCommunitySelectableIdentity selectedIdentity,\n final int max,\n final int offset) throws CantListArtistsException;", "@Test\n public void testGetFirstMapping() throws InvalidSmilesException {\n System.out.println(\"getFirstMapping\");\n SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());\n IAtomContainer target = sp.parseSmiles(\"C\\\\C=C/Nc1cccc(c1)N(O)\\\\C=C\\\\C\\\\C=C\\\\C=C/C\");\n IAtomContainer query = sp.parseSmiles(\"Nc1ccccc1\");\n\n VF2lib smsd1 = new VF2lib();\n smsd1.set(query, target);\n smsd1.searchMCS(true);\n assertNotNull(smsd1.getFirstMapping());\n\n assertEquals(7, smsd1.getFirstMapping().size());\n }", "public static List<SDSSpeciesListItemDTO> getSDSListItems(boolean hasMatch){\n try{\n String suffix = hasMatch ? \"&guid=isNotNull:guid&sort=guid\" : \"&guid=isNull:guid&sort=rawScientificName\";\n URL url = new URL(Configuration.getInstance().getListToolUrl() + \"/ws/speciesListItems?isSDS=eq:true\" + suffix);\n ObjectMapper mapper = new ObjectMapper();\n mapper.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n URLConnection connection = url.openConnection();\n logger.debug(\"Looking up location using \" + url);\n InputStream inStream = connection.getInputStream();\n\n java.util.List<SDSSpeciesListItemDTO> values = mapper.readValue(\n inStream,\n new TypeReference<List<SDSSpeciesListItemDTO>>(){}\n );\n logger.debug(values);\n return values;\n } catch(Exception e){\n logger.error(\"Unable to get the list items. \", e);\n }\n return null;\n }", "@SuppressWarnings({\n \"static-method\", \"unchecked\"\n })\n private ConceptList findAvailableEditingConcepts(Translation translation,\n PfsParameter pfs, WorkflowService service) throws Exception {\n\n // Cleanse PFS parameter to turn \"concept\" fields into concept refset member\n // fields\n final PfsParameter localPfs =\n pfs == null ? new PfsParameterJpa() : new PfsParameterJpa(pfs);\n if (localPfs.getSortField() != null\n && localPfs.getSortField().equals(\"name\")) {\n localPfs.setSortField(\"conceptName\");\n }\n if (localPfs.getSortField() != null\n && localPfs.getSortField().equals(\"terminologyId\")) {\n localPfs.setSortField(\"conceptId\");\n }\n if (localPfs.getSortField() != null\n && localPfs.getSortField().equals(\"workflowStatus\")) {\n localPfs.setSortField(null);\n }\n\n // Members of the refset\n // That do not have concepts in the translation\n String queryStr = \"select a from ConceptRefsetMemberJpa a, RefsetJpa b \"\n + \"where b.id = :refsetId and a.refset = b \" + \"and a.conceptId NOT IN \"\n + \"(select d.terminologyId from TranslationJpa c, ConceptJpa d \"\n + \" where c.refset = b AND d.translation = c AND c.id = :translationId )\";\n\n List<ConceptRefsetMember> results = null;\n final ConceptListJpa list = new ConceptListJpa();\n int totalCount = 0;\n // No need to use applyPfsToList if there is not a filter\n if (localPfs.getQueryRestriction() == null\n || localPfs.getQueryRestriction().isEmpty()) {\n\n Query ctQuery = ((RootServiceJpa) service).getEntityManager().createQuery(\n \"select count(*) from ConceptRefsetMemberJpa a, RefsetJpa b \"\n + \"where b.id = :refsetId and a.refset = b \"\n + \"and a.conceptId NOT IN \"\n + \"(select d.terminologyId from TranslationJpa c, ConceptJpa d \"\n + \" where c.refset = b AND d.translation = c AND c.id = :translationId )\");\n ctQuery.setParameter(\"refsetId\", translation.getRefset().getId());\n ctQuery.setParameter(\"translationId\", translation.getId());\n\n final Query query =\n ((RootServiceJpa) service).applyPfsToJqlQuery(queryStr, localPfs);\n query.setParameter(\"refsetId\", translation.getRefset().getId());\n query.setParameter(\"translationId\", translation.getId());\n results = query.getResultList();\n totalCount = ((Long) ctQuery.getSingleResult()).intValue();\n }\n\n // Use applyPfsToList if there is a filter\n else {\n\n // Remove query restriction, add it back in later.\n final Query query =\n ((RootServiceJpa) service).applyPfsToJqlQuery(queryStr, null);\n query.setParameter(\"refsetId\", translation.getRefset().getId());\n query.setParameter(\"translationId\", translation.getId());\n int[] totalCt = new int[1];\n results = query.getResultList();\n results = service.applyPfsToList(results, ConceptRefsetMember.class,\n totalCt, localPfs);\n totalCount = totalCt[0];\n }\n\n // Repackage as a concept list\n for (final ConceptRefsetMember member : results) {\n final Concept concept = new ConceptJpa();\n concept.setActive(member.isActive());\n concept.setModuleId(member.getModuleId());\n concept.setTerminologyId(member.getConceptId());\n concept.setName(member.getConceptName());\n list.getObjects().add(concept);\n }\n list.setTotalCount(totalCount);\n\n return list;\n\n }", "public Set<Individual> getFillers(Role role, Individual ind) {\n\t\tTList<T> current = this.getRoot();\n\t\tSet<Individual> roleFillers = new HashSet<>();\n\t\twhile (current != null) {\n\t\t\tAssertion aValue = current.getValue();\n\t\t\tif (aValue instanceof RoleAssertion) {\n\t\t\t\tRoleAssertion ra = (RoleAssertion) aValue;\n\t\t\t\tDLElement el = ra.getElement();\n\t\t\t\tif (role.equals(el) && ind.equals(ra.getIndividualA()))\n\t\t\t\t\troleFillers.add(ra.getIndividualB());\n\t\t\t} \n\t\t\tcurrent = current.getNext();\n\t\t}\n\t\treturn roleFillers;\n\t}", "@Test\n\tpublic void testAddLinkOkMultNtoNArrayList() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\ttstNMAssociationInverse();\n\t}", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n ArrayList<Integer> arrayList0 = new ArrayList<Integer>();\n arrayList0.spliterator();\n fileUtil0.getAccessories(\"\", arrayList0);\n fileUtil0.fetchKeywordSearchFile(\"\", \"\", \"\", \"\");\n fileUtil0.downloadThirdPartySearchFile(\"\", \"net.kencochrane.a4j.util.LoadProperties\", \"\", \"T||]%|~ZG.LC(6mb~A\");\n fileUtil0.fetchKeywordSearchFile(\"\", \"T||]%|~ZG.LC(6mb~A\", (String) null, \"\");\n fileUtil0.getBrowseNodeFile(\"net.kencochrane.a4j.util.LoadProperties\", \"@>-=6JQ%t&fx,L\", \"net.kencochrane.a4j.util.LoadProperties\");\n fileUtil0.fetchBlendedSearchFile(\"AGmeJ)4qdg_/\", \"a_\");\n Integer integer0 = new Integer(7);\n arrayList0.add(integer0);\n fileUtil0.downloadAccessoriesFile(\"3rd_\", arrayList0, \"I~-|SH-#r+.Olx\");\n FileInputStream fileInputStream0 = fileUtil0.fetchGenericSearchFile(\"\", \"\", \"]RHe['l4y{\", \"]RHe['l4y{\", \"I~-|SH-#r+.Olx\", \"\\\"-q6AW$MO[2+kQ/Sl.g\");\n assertNull(fileInputStream0);\n }", "void FindLstn (int boardID, short[] addrlist, short[] results, int limit);", "@Test\n public void testGet() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n Integer expResult = 7;\n Integer result = instance.get(2);\n assertEquals(expResult, result);\n\n }", "ImmutableList<SchemaOrgType> getExampleOfWorkList();", "@Test\n public void testListStorageBinInformation1() throws Exception {\n System.out.println(\"listStorageBinInformation\");\n Long factoryId = 2L;\n List result = FactoryInventoryManagementModule.listStorageBinInformation(factoryId);\n assertFalse(result.isEmpty());\n }", "public void testOneAssociatedObjectNestedSearch1() throws Exception\r\n\t{\r\n\t\tPerson searchObject = new Person();\r\n\t\tIi ii = new Ii();\r\n\t\tii.setExtension(\"1\");\r\n\t\tsearchObject.setId(ii);\r\n\t\tCollection results = getApplicationService().search(\"gov.nih.nci.cacoresdk.domain.onetoone.unidirectional.Person\",searchObject );\r\n\r\n\t\tassertNotNull(results);\r\n\t\tassertEquals(1,results.size());\r\n\t\t\r\n\t\tIterator i = results.iterator();\r\n\t\tPerson result = (Person)i.next();\r\n\t\ttoXML(result);\r\n\t\tPerson result2 = (Person)fromXML(result);\r\n\t\t\r\n\t\tassertNotNull(result2);\r\n\t\tassertNotNull(result2.getId().getExtension()); \r\n\t\tassertEquals(II_ROOT_GLOBAL_CONSTANT_VALUE,result2.getId().getRoot());\r\n\t\tassertNotNull(result2.getName());\r\n\t\t\r\n\t\tAddress address = result2.getLivesAt();\r\n\t\tassertNotNull(address);\r\n\t\tassertNotNull(address.getId());\r\n\t\tassertNotNull(address.getZip());\r\n\t\tassertEquals(\"1\",address.getId().getExtension());\r\n\t}", "OpFList createOpFList();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return GPSSetupImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = GPSSetupImpl.this.getFeatureArray(i);\r\n GPSSetupImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { GPSSetupImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = GPSSetupImpl.this.getFeatureArray(i);\r\n GPSSetupImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return GPSSetupImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "@Test\n public void Scenario2() {\n\n softAssert = new SoftAssert();\n\n Response resp = reqSpec.request().get();\n\n List<List<Number>> allPerc = resp.jsonPath().getList(\"data.regions.generationmix[0].perc\");\n\n LinkedList<String> regions = new LinkedList<>();\n regions.addAll(resp.jsonPath().getList(\"data.regions.shortname[0]\"));\n\n for (List<Number> perc : allPerc) {\n\n String name = regions.pop();\n\n float result = CalculationUtils.sumListElements(perc);\n\n System.out.println(name);\n System.out.println(\"Sum of perc equals: \" + result);\n System.out.println(\"------------\");\n\n softAssert.assertEquals(100.0, result, 0.1);\n }\n\n softAssert.assertAll();\n }", "@Test\n public void testSubList_SubList_Item_Added() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List<Integer> result = (SegmentedOasisList<Integer>) instance.subList(1, 4);\n result.add(8);\n\n List<Integer> expResult = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "private List<Individual<T>> selectIndividuals(Deme<T> deme) {\n return IntStream.range(0, tournamentSize).mapToObj(i -> selRandomOp.select(deme.getIndividuals()))\n .collect(Collectors.toList());\n }", "@Override\n public List<ArrayList<String>> queryInstructor(Token token, int instructorID) {\n // TODO Auto-generated method stub\n return null;\n }", "public void test_ck_03() {\n // part A - surprising reification\n OntModel model1 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM, null);\n OntModel model2 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM_RULE_INF, null);\n \n Individual sub = model1.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n OntProperty pred = model1.createOntProperty(\"http://mytest#\");\n Individual obj = model1.createIndividual(\"http://mytest#i2\", model1.getProfile().CLASS());\n OntProperty probabilityP = model1.createOntProperty(\"http://mytest#prob\");\n \n Statement st = model1.createStatement(sub, pred, obj);\n model1.add(st);\n st.createReifiedStatement().addProperty(probabilityP, 0.9);\n assertTrue(\"st should be reified\", st.isReified());\n \n Statement st2 = model2.createStatement(sub, pred, obj);\n model2.add(st2);\n st2.createReifiedStatement().addProperty(probabilityP, 0.3);\n assertTrue(\"st2 should be reified\", st2.isReified());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP).addProperty(probabilityP, 0.3); //!!!\n // exception\n \n // Part B - exception in remove All\n Individual sub2 = model2.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP); //!!! exception\n \n sub2.addProperty(probabilityP, 0.3);\n sub2.removeAll(probabilityP); //!!! exception\n \n }", "public interface Facility extends WrappedIndividual {\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#hasCFD\n */\n \n /**\n * Gets all property values for the hasCFD property.<p>\n * \n * @returns a collection of values for the hasCFD property.\n */\n Collection<? extends CFD> getHasCFD();\n\n /**\n * Checks if the class has a hasCFD property value.<p>\n * \n * @return true if there is a hasCFD property value.\n */\n boolean hasHasCFD();\n\n /**\n * Adds a hasCFD property value.<p>\n * \n * @param newHasCFD the hasCFD property value to be added\n */\n void addHasCFD(CFD newHasCFD);\n\n /**\n * Removes a hasCFD property value.<p>\n * \n * @param oldHasCFD the hasCFD property value to be removed.\n */\n void removeHasCFD(CFD oldHasCFD);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#hasEnergyCF\n */\n \n /**\n * Gets all property values for the hasEnergyCF property.<p>\n * \n * @returns a collection of values for the hasEnergyCF property.\n */\n Collection<? extends EnergyCF> getHasEnergyCF();\n\n /**\n * Checks if the class has a hasEnergyCF property value.<p>\n * \n * @return true if there is a hasEnergyCF property value.\n */\n boolean hasHasEnergyCF();\n\n /**\n * Adds a hasEnergyCF property value.<p>\n * \n * @param newHasEnergyCF the hasEnergyCF property value to be added\n */\n void addHasEnergyCF(EnergyCF newHasEnergyCF);\n\n /**\n * Removes a hasEnergyCF property value.<p>\n * \n * @param oldHasEnergyCF the hasEnergyCF property value to be removed.\n */\n void removeHasEnergyCF(EnergyCF oldHasEnergyCF);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#host\n */\n \n /**\n * Gets all property values for the host property.<p>\n * \n * @returns a collection of values for the host property.\n */\n Collection<? extends Service> getHost();\n\n /**\n * Checks if the class has a host property value.<p>\n * \n * @return true if there is a host property value.\n */\n boolean hasHost();\n\n /**\n * Adds a host property value.<p>\n * \n * @param newHost the host property value to be added\n */\n void addHost(Service newHost);\n\n /**\n * Removes a host property value.<p>\n * \n * @param oldHost the host property value to be removed.\n */\n void removeHost(Service oldHost);\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}", "SearchResult search(State root, List<State> expanded_list, State goal);", "private void modifyIndividuals(){\n for(AbstractBehaviour behaviour: entityBehaviours){\n JSONObject jsonPop = null;\n GeneticInterface gi = interfaceMap.get(behaviour);\n try {\n jsonPop = gi.receiveNewPopulation();\n } catch (IOException e) {\n e.printStackTrace();\n }\n for(String key: jsonPop.keySet()){\n JSONArray funArray = jsonPop.getJSONObject(key).getJSONArray(\"functions\");\n List<Function> functions = new LinkedList<>();\n for(int a = 0; a <funArray.length(); a++){\n String tree = funArray.getString(a);\n Function functionTree = Node.treeFromString(tree, behaviour.getNumberOfInputs());\n functions.add(functionTree);\n }\n behaviour.setEntityByName(key, functions);\n }\n behaviour.resetEntities();\n }\n }", "int getIndividualStamina();", "private List<ScoredFeature> literalSearch(Literal relationsLiteral,\r\n\t\t\tLiteral addressLiteral, DataStore store) throws DataException {\r\n\r\n\t\tList<FeatureSelection> sels = new ArrayList<FeatureSelection>();\r\n\t\tFeatureSet features = null;\r\n\r\n\t\tString exp = \"\";\r\n\r\n\t\tint i = 0;\r\n\t\t// search features related with the parameters\r\n\t\tfor (Object obj : relationsLiteral) {\r\n\t\t\tRelationsComponent lit = (RelationsComponent) obj;\r\n\t\t\tFeatureSelection selection = ((FeatureStore) store)\r\n\t\t\t\t\t.createFeatureSelection();\r\n\t\t\tFeatureQuery query = ((FeatureStore) store).createFeatureQuery();\r\n\t\t\tString key = lit.getKeyElement().trim();\r\n\t\t\tString chain = getValueAddress(key, addressLiteral);\r\n\r\n\t\t\tString fname = lit.getValue();\r\n\t\t\tif (i == 0) {\r\n\t\t\t\texp = fname + \" like '%\" + chain + \"%'\";\r\n\t\t\t} else {\r\n\t\t\t\texp = exp + \" AND \" + fname + \" like '%\" + chain + \"%'\";\r\n\t\t\t}\r\n\r\n\t\t\tEvaluator eval = manager.createExpresion(exp);\r\n\r\n\t\t\tquery.setFilter(eval);\r\n\t\t\tfeatures = ((FeatureStore) store).getFeatureSet(query);\r\n\t\t\tselection.select(features);\r\n\t\t\tsels.add(selection);\r\n\t\t\tlog.debug(\"Iteration \" + i + \" - Selection : \"\r\n\t\t\t\t\t+ selection.getSelectedCount());\r\n\t\t\ti++;\r\n\t\t}\r\n\t\t// Put scores\r\n\t\tList<ScoredFeature> scores = createLiteralScores(store, sels);\r\n\r\n\t\treturn scores;\r\n\t}", "ArrayList<Feature> getFeatures(String userid, String project)throws Exception;", "public void testLst() {\n System.out.println(\"\");\n EcgCheck chk = EcgCheck.getInstance();\n System.out.println(\" Show TEstlist\");\n\n mail_lst.forEach(m -> {\n System.out.println(\"[\" + new String(chk.sha(m.getBytes())) + \"]\");\n });\n }", "@Test\n public void testToRouterFilterList_standardAccessList_vendorStructureId() {\n StandardAccessList acl = new StandardAccessList(\"name\");\n RouteFilterList rfl = toRouteFilterList(acl, \"file\");\n assertThat(\n rfl.getVendorStructureId(),\n equalTo(\n new VendorStructureId(\n \"file\", AristaStructureType.IP_ACCESS_LIST_STANDARD.getDescription(), \"name\")));\n }", "private List<XmlElementNameAndContents> encodeFeatures(TOP fs, AttributesImpl attrs,\n boolean insideListNode) throws SAXException {\n List<XmlElementNameAndContents> childElements = new ArrayList<>();\n // int heapValue = cds.cas.getHeapValue(addr);\n // int[] feats = cds.tsi.ll_getAppropriateFeatures(heapValue);\n\n String attrValue;\n // boolean isSofa = false;\n // if (sofaTypeCode == heapValue)\n // {\n // // set isSofa flag to apply SofaID mapping and to store sofaNum->xmi:id mapping\n // isSofa = true;\n // }\n for (final FeatureImpl fi : fs._getTypeImpl().getFeatureImpls()) {\n\n if (cds.isFiltering) {\n // skip features that aren't in the target type system\n String fullFeatName = fi.getName();\n if (cds.filterTypeSystem_inner.getFeatureByFullName(fullFeatName) == null) {\n continue;\n }\n }\n\n final String featName = fi.getShortName();\n final int featureValueClass = fi.rangeTypeClass;\n\n switch (featureValueClass) {\n\n case LowLevelCAS.TYPE_CLASS_BYTE:\n case LowLevelCAS.TYPE_CLASS_SHORT:\n case LowLevelCAS.TYPE_CLASS_INT:\n case LowLevelCAS.TYPE_CLASS_LONG:\n case LowLevelCAS.TYPE_CLASS_FLOAT:\n case LowLevelCAS.TYPE_CLASS_DOUBLE:\n case LowLevelCAS.TYPE_CLASS_BOOLEAN:\n attrValue = fs.getFeatureValueAsString(fi);\n break;\n\n case LowLevelCAS.TYPE_CLASS_STRING:\n attrValue = fs.getFeatureValueAsString(fi);\n break;\n\n // Arrays\n case LowLevelCAS.TYPE_CLASS_INTARRAY:\n case LowLevelCAS.TYPE_CLASS_FLOATARRAY:\n case LowLevelCAS.TYPE_CLASS_BOOLEANARRAY:\n case LowLevelCAS.TYPE_CLASS_BYTEARRAY:\n case LowLevelCAS.TYPE_CLASS_SHORTARRAY:\n case LowLevelCAS.TYPE_CLASS_LONGARRAY:\n case LowLevelCAS.TYPE_CLASS_DOUBLEARRAY:\n case LowLevelCAS.TYPE_CLASS_FSARRAY:\n if (cds.isStaticMultiRef(fi)) {\n attrValue = cds.getXmiId(fs.getFeatureValue(fi));\n } else {\n attrValue = arrayToString(fs.getFeatureValue(fi), featureValueClass);\n }\n break;\n\n // special case for StringArrays, which stored values as child elements rather\n // than attributes.\n case LowLevelCAS.TYPE_CLASS_STRINGARRAY:\n StringArray stringArray = (StringArray) fs.getFeatureValue(fi);\n if (cds.isStaticMultiRef(fi)) {\n attrValue = cds.getXmiId(stringArray);\n } else if (stringArray != null && stringArray.size() == 0) {\n attrValue = \"\"; // https://issues.apache.org/jira/browse/UIMA-5558\n } else {\n stringArrayToElementList(featName, (StringArray) fs.getFeatureValue(fi),\n childElements);\n attrValue = null;\n }\n break;\n\n // Lists\n case CasSerializerSupport.TYPE_CLASS_INTLIST:\n case CasSerializerSupport.TYPE_CLASS_FLOATLIST:\n case CasSerializerSupport.TYPE_CLASS_FSLIST:\n TOP startNode = fs.getFeatureValue(fi);\n if (insideListNode || cds.isStaticMultiRef(fi)) {\n // If the feature has multipleReferencesAllowed = true OR if we're already\n // inside another list node (i.e. this is the \"tail\" feature), serialize as a normal\n // FS.\n // Otherwise, serialize as a multi-valued property.\n // if (cds.isStaticMultRef(feats[i]) ||\n // cds.embeddingNotAllowed.contains(featVal) ||\n // insideListNode) {\n\n attrValue = cds.getXmiId(startNode);\n } else {\n attrValue = listToString((CommonList) fs.getFeatureValue(fi));\n }\n break;\n\n // special case for StringLists, which stored values as child elements rather\n // than attributes.\n case CasSerializerSupport.TYPE_CLASS_STRINGLIST:\n if (insideListNode || cds.isStaticMultiRef(fi)) {\n attrValue = cds.getXmiId(fs.getFeatureValue(fi));\n } else {\n // it is not safe to use a space-separated attribute, which would\n // break for strings containing spaces. So use child elements instead.\n StringList stringList = (StringList) fs.getFeatureValue(fi);\n if (stringList == null) {\n attrValue = null;\n } else {\n if (stringList instanceof EmptyStringList) {\n attrValue = \"\";\n } else {\n List<String> listOfStrings = stringList.anyListToStringList(null, cds);\n // if (array.length > 0 && !arrayAndListFSs.put(featVal, featVal)) {\n // reportWarning(\"Warning: multiple references to a ListFS. Reference identity\n // will not be preserved.\");\n // }\n for (String string : listOfStrings) {\n childElements.add(new XmlElementNameAndContents(\n new XmlElementName(\"\", featName, featName), string));\n }\n attrValue = null;\n }\n }\n }\n break;\n\n default: // Anything that's not a primitive type, array, or list.\n attrValue = cds.getXmiId(fs.getFeatureValue(fi));\n break;\n\n } // end of switch\n\n if (attrValue != null && featName != null) {\n addAttribute(attrs, featName, attrValue, \"\");\n }\n } // end of for loop over all features\n\n // add out-of-typesystem features, if any\n if (cds.sharedData != null) {\n OotsElementData oed = cds.sharedData.getOutOfTypeSystemFeatures(fs);\n if (oed != null) {\n // attributes\n Iterator<XmlAttribute> attrIter = oed.attributes.iterator();\n while (attrIter.hasNext()) {\n XmlAttribute attr = attrIter.next();\n addAttribute(workAttrs, attr.name, attr.value);\n }\n // child elements\n childElements.addAll(oed.childElements);\n }\n }\n return childElements;\n }", "@Test\n public void testBatchedInQuery() {\n TestDataCreator creator = new TestDataCreator(getSessionFactory());\n Town town = creator.createTestTown();\n\n int n = 10;\n List<Long> ids = new ArrayList<>(n);\n for (long i=0; i < n; i++) {\n Person savedPerson = creator.createTestPerson(town, \"P\" + i);\n ids.add(savedPerson.getId());\n }\n for (long i=0; i < n; i++) {\n creator.createTestPerson(town, \"P\" + i);\n }\n\n Person person = query.from(Person.class);\n query.where(person.getId()).in(ids, 2);\n\n validate(\"from Person hobj1 where hobj1.id in (:np1)\", ids);\n assertEquals(n, doQueryResult.size());\n }", "IbeisIndividual addIndividual(String name) throws IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException, IndividualNameAlreadyExistsException;", "@Test\r\n public void testGetAllFestivities() {\r\n System.out.println(\"getAllFestivities\");\r\n List<Festivity> result = Database.getAllFestivities();\r\n assertTrue(result.size() > 0 );\r\n }", "@Override\n public List<IntraUserInformation> getIntraUsersWaitingYourAcceptance(String identityPublicKey, int max, int offset) throws CantGetIntraUsersListException {\n List<IntraUserInformation> intraUserList = new ArrayList<IntraUserInformation>();\n try {\n\n\n List<IntraWalletUserActor> actorsList = this.intraWalletUserManager.getWaitingYourAcceptanceIntraWalletUsers(identityPublicKey, max, offset);\n\n for (IntraWalletUserActor intraUserActor : actorsList) {\n intraUserList.add(new IntraUserModuleInformation(intraUserActor.getName(),\"\",intraUserActor.getPublicKey(),intraUserActor.getProfileImage(),intraUserActor.getContactState(),\"\"));\n }\n\n return intraUserList;\n } catch (CantGetIntraWalletUsersException e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET INTRA USER WAITING YOUR ACCEPTANCE\", e, \"\", \"\");\n } catch (Exception e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET INTRA USER WAITING YOUR ACCEPTANCE\", FermatException.wrapException(e), \"\", \"unknown exception\");\n }\n }", "java.util.List<People>\n getFriendListList();", "@Override\n public List<IntraUserInformation> getSuggestionsToContact(int max, int offset) throws CantGetIntraUsersListException {\n\n try {\n\n //verifico la cache para mostrar los que tenia antes y los nuevos\n List<IntraUserInformation> userCacheList = new ArrayList<>();\n try {\n userCacheList = getCacheSuggestionsToContact(max, offset);\n } catch (CantGetIntraUsersListException e) {\n e.printStackTrace();\n }\n\n List<IntraUserInformation> intraUserInformationModuleList = new ArrayList<>();\n\n List<IntraUserInformation> intraUserInformationList = new ArrayList<>();\n intraUserInformationList = intraUserNertwokServiceManager.getIntraUsersSuggestions(max, offset);\n\n\n\n for (IntraUserInformation intraUser : intraUserInformationList) {\n\n //get connection state status\n ConnectionState connectionState = this.intraWalletUserManager.getIntraUsersConnectionStatus(intraUser.getPublicKey());\n\n //return intra user information - if not connected - status return null\n IntraUserInformation intraUserInformation = new IntraUserModuleInformation(intraUser.getName(),intraUser.getPhrase(),intraUser.getPublicKey(),intraUser.getProfileImage(), connectionState,\"Online\");\n intraUserInformationModuleList.add(intraUserInformation);\n }\n\n\n if(intraUserInformationModuleList!=null) {\n if (userCacheList.size() == 0) {\n return intraUserInformationModuleList;\n }\n else {\n if (intraUserInformationModuleList.size() == 0) {\n return userCacheList;\n }\n else {\n for (IntraUserInformation intraUserCache : userCacheList) {\n boolean exist = false;\n for (IntraUserInformation intraUser : intraUserInformationModuleList) {\n if (intraUserCache.getPublicKey().equals(intraUser.getPublicKey())) {\n exist = true;\n break;\n }\n }\n if (!exist)\n intraUserInformationModuleList.add(intraUserCache);\n }\n\n //save cache records\n try {\n saveCacheIntraUsersSuggestions(intraUserInformationModuleList);\n } catch (CantGetIntraUsersListException e) {\n e.printStackTrace();\n }\n\n return intraUserInformationModuleList;\n }\n }\n }\n else {\n return userCacheList;\n }\n\n\n\n }\n catch (ErrorSearchingSuggestionsException e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET SUGGESTIONS TO CONTACT\",e,\"\",\"Error on intra user network service\");\n }\n catch (Exception e) {\n throw new CantGetIntraUsersListException(\"CAN'T GET SUGGESTIONS TO CONTACT\",e,\"\",\"Unknown Error\");\n }\n }", "public Collection getIndividualTypes(OWLIndividual individual, ReasonerTaskListener taskListener) throws DIGReasonerException;", "People getFriendList(int index);", "List<IFeature> getFeatureList();", "@Test(timeout = 4000)\n public void test22() throws Throwable {\n FileUtil fileUtil0 = new FileUtil();\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/A_X-0;;JLT_;1IJDVA.XML\");\n FileSystemHandling.createFolder(evoSuiteFile0);\n ArrayList<Object> arrayList0 = new ArrayList<Object>();\n File file0 = fileUtil0.getAccessories(\"X-0;;JLT_;1iJdvA\", arrayList0);\n assertNotNull(file0);\n assertTrue(file0.canWrite());\n assertEquals(\"A_X-0;;JLT_;1IJDVA.XML\", file0.getName());\n }", "private List<Individual> createBadIndividuals(int generationSize) {\n\t\tIndividualFactory factory = new ArcherFactory();\n\t\tList<Individual> list = new ArrayList<Individual>();\n\t\tfor (int i = 0; i < generationSize; i++) {\n\t\t\tlist.add(factory.createIndividual(getBadCombination()));\n\t\t}\n\t\treturn list;\n\t}", "java.util.List<java.lang.Integer> getOtherIdsList();", "public java.util.List<org.landxml.schema.landXML11.FeatureDocument.Feature> getFeatureList()\r\n {\r\n final class FeatureList extends java.util.AbstractList<org.landxml.schema.landXML11.FeatureDocument.Feature>\r\n {\r\n public org.landxml.schema.landXML11.FeatureDocument.Feature get(int i)\r\n { return IntersectionImpl.this.getFeatureArray(i); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature set(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.setFeatureArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.FeatureDocument.Feature o)\r\n { IntersectionImpl.this.insertNewFeature(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.FeatureDocument.Feature remove(int i)\r\n {\r\n org.landxml.schema.landXML11.FeatureDocument.Feature old = IntersectionImpl.this.getFeatureArray(i);\r\n IntersectionImpl.this.removeFeature(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return IntersectionImpl.this.sizeOfFeatureArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new FeatureList();\r\n }\r\n }", "@Test\r\n\tpublic void TestgetAllFoodItem() {\n\t\tassertNotNull(\"Test if there is valid food list to get food item\", foodList);\r\n\r\n\t\t// the food list is not empty so can view food items.\r\n\t\tfoodList.add(f1);\r\n\t\tC206_CaseStudy.getAllFoodItem(foodList);\r\n\t\tassertFalse(\"Test that if the food list is not empty so can view food\", foodList.isEmpty());\r\n\r\n\t\t// Continue from step 2, test that the size of the food list is 1 and is not\r\n\t\t// empty.\r\n\t\tassertEquals(\"Test that food list size is 1\", 1, foodList.size());\r\n\t\tassertFalse(\"Test that the food list is not empty\", foodList.isEmpty());\r\n\t}", "@Test\n public void testContainsAll_Contains() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }" ]
[ "0.58056194", "0.51906383", "0.5163249", "0.5148693", "0.51171523", "0.50939554", "0.50355893", "0.50344837", "0.50237304", "0.5022655", "0.49765676", "0.4950531", "0.49142542", "0.49142542", "0.48902476", "0.4880998", "0.48671788", "0.48594737", "0.4853692", "0.483634", "0.48277575", "0.48241362", "0.48126054", "0.47954825", "0.47807103", "0.4768773", "0.4768302", "0.47562963", "0.4750856", "0.47465193", "0.4741008", "0.47357184", "0.47347748", "0.47119945", "0.47107935", "0.4707557", "0.46932596", "0.4691753", "0.4688128", "0.46850967", "0.46806785", "0.46790677", "0.46746016", "0.46611965", "0.46531066", "0.46338725", "0.46338195", "0.4625867", "0.46256098", "0.46224257", "0.4621307", "0.46140447", "0.4613415", "0.46039993", "0.46017456", "0.45985103", "0.4594835", "0.4593867", "0.45889986", "0.45870948", "0.45862836", "0.4578844", "0.45774937", "0.45738268", "0.4572868", "0.45716605", "0.4568671", "0.45637137", "0.45597714", "0.4555093", "0.45271143", "0.4520575", "0.45202735", "0.4519832", "0.45169505", "0.45146668", "0.45112845", "0.4511011", "0.45099133", "0.45075724", "0.45063916", "0.45044997", "0.44988078", "0.44986388", "0.44954392", "0.44952977", "0.44952908", "0.44906834", "0.44879407", "0.448775", "0.44869366", "0.44863346", "0.44858384", "0.44856596", "0.44803968", "0.4478868", "0.44781804", "0.4475397", "0.44737077", "0.4472545" ]
0.6795768
0
Test case for SF bug 945436 a xml:lang='' in the dataset causes sring index exception in getLabel()
public void test_sf_945436() { String SOURCE= "<?xml version='1.0'?>" + "<!DOCTYPE owl [" + " <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >" + " <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >" + " <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >" + " <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >" + " <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >" + " <!ENTITY base 'http://jena.hpl.hp.com/test' >" + " ]>" + "<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>" + " <C rdf:ID='x'>" + " <rdfs:label xml:lang=''>a_label</rdfs:label>" + " </C>" + " <owl:Class rdf:ID='C'>" + " </owl:Class>" + "</rdf:RDF>"; OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); m.read( new StringReader( SOURCE ), null ); Individual x = m.getIndividual( "http://jena.hpl.hp.com/test#x" ); assertEquals( "Label on resource x", "a_label", x.getLabel( null) ); assertEquals( "Label on resource x", "a_label", x.getLabel( "" ) ); assertSame( "fr label on resource x", null, x.getLabel( "fr" ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(timeout = 4000)\n public void test106() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n ElExpression elExpression0 = new ElExpression(\"4_R]T<#2)Q?]R7Ut\");\n // Undeclared exception!\n try { \n xmlEntityRef0.label((Object) elExpression0);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test107() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"&!a0Q!<8UDk+%_*<Z'\");\n Hidden hidden0 = new Hidden(xmlEntityRef0, \"&!a0Q!<8UDk+%_*<Z'\", \"&!a0Q!<8UDk+%_*<Z'\");\n // Undeclared exception!\n try { \n hidden0.label();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test367() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"W,eg{\");\n // Undeclared exception!\n try { \n xmlEntityRef0.label();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test080() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"convert\");\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.caption();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Thead component can be added only to a Table.\n //\n }\n }", "@Test\n public void test129() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"convert\");\n Map<String, String> map0 = xmlEntityRef0.getAttributes();\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.dl();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test038() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]<xA(`$wn)1UO=`{)0:\");\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.i();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Override\n protected void loadXMLDescription() {\n\n }", "@Test(expected = IllegalLabelException.class)\n\tpublic void testIllegalLabelException() throws Exception {\n\t\tnew GraphPoetFactory().parse(\"Edge=<ab!,WordNeighborhood,1,a,b,Yes>\");\n\t}", "@Override\n public boolean ignoreLabel(CharSequence labelCandidate) {\n return labelCandidate.toString().toLowerCase(Locale.ROOT).contains(\"data\");\n }", "@Override\n public boolean ignoreLabel(CharSequence labelCandidate) {\n return labelCandidate.toString().toLowerCase(Locale.ROOT).contains(\"data\");\n }", "@Test\n public void containsLanguageTagsCaseInsensitiveTurkish() {\n final Locale defaultLocale = Locale.getDefault();\n try {\n Locale.setDefault(Locale.ROOT);\n final Literal lowerROOT = factory.createLiteral(\"moi\", \"fi\");\n final Literal upperROOT = factory.createLiteral(\"moi\", \"FI\");\n final Literal mixedROOT = factory.createLiteral(\"moi\", \"fI\");\n final IRI exampleROOT = factory.createIRI(\"http://example.com/s1\");\n final IRI greeting = factory.createIRI(\"http://example.com/greeting\");\n dataset.add(null, exampleROOT, greeting, mixedROOT);\n\n final Locale turkish = Locale.forLanguageTag(\"TR\");\n Locale.setDefault(turkish);\n // If the below assertion fails, then the Turkish\n // locale no longer have this peculiarity that\n // we want to test.\n Assume.assumeFalse(\"FI\".toLowerCase().equals(\"fi\"));\n\n // Below is pretty much the same as in\n // containsLanguageTagsCaseInsensitive()\n final Literal lower = factory.createLiteral(\"moi\", \"fi\");\n final Literal upper = factory.createLiteral(\"moi\", \"FI\");\n final Literal mixed = factory.createLiteral(\"moi\", \"fI\");\n\n final IRI exampleTR = factory.createIRI(\"http://example.com/s2\");\n dataset.add(null, exampleTR, greeting, upper);\n assertTrue(dataset.contains(factory.createQuad(null, exampleTR, greeting, upper)));\n assertTrue(dataset.contains(factory.createQuad(null, exampleTR, greeting, upperROOT)));\n assertTrue(dataset.contains(factory.createQuad(null, exampleTR, greeting, lower)));\n assertTrue(dataset.contains(factory.createQuad(null, exampleTR, greeting, lowerROOT)));\n assertTrue(dataset.contains(factory.createQuad(null, exampleTR, greeting, mixed)));\n assertTrue(dataset.contains(factory.createQuad(null, exampleTR, greeting, mixedROOT)));\n assertTrue(dataset.contains(null, exampleTR, null, upper));\n assertTrue(dataset.contains(null, exampleTR, null, upperROOT));\n assertTrue(dataset.contains(null, exampleTR, null, lower));\n assertTrue(dataset.contains(null, exampleTR, null, lowerROOT));\n assertTrue(dataset.contains(null, exampleTR, null, mixed));\n assertTrue(dataset.contains(null, exampleTR, null, mixedROOT));\n\n // What about the triple we added while in ROOT locale?\n assertTrue(dataset.contains(factory.createQuad(null, exampleROOT, greeting, upper)));\n assertTrue(dataset.contains(factory.createQuad(null, exampleROOT, greeting, lower)));\n assertTrue(dataset.contains(factory.createQuad(null, exampleROOT, greeting, mixed)));\n assertTrue(dataset.contains(null, exampleROOT, null, upper));\n assertTrue(dataset.contains(null, exampleROOT, null, lower));\n assertTrue(dataset.contains(null, exampleROOT, null, mixed));\n } finally {\n Locale.setDefault(defaultLocale);\n }\n }", "protected String parseLabel(XmlPullParser xpp) throws XmlPullParserException, IOException {\n return parseText(xpp, \"Label\");\n }", "public CharSequence getLabel() {\n/* 2411 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void verifyTextAndLabels(){\n common.explicitWaitVisibilityElement(\"//*[@id=\\\"content\\\"]/article/h2\");\n\n //Swedish labels\n common.timeoutMilliSeconds(500);\n textAndLabelsSwedish();\n\n //Change to English\n common.selectEnglish();\n\n //English labels\n textAndLabelsEnglish();\n }", "@Test\n public void test091() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n LabeledWord labeledWord0 = new LabeledWord(\"\");\n Label label0 = (Label)errorPage0.s((Object) labeledWord0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(label0._isGeneratedId());\n }", "@Test\n public void test005() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n ElExpression elExpression0 = new ElExpression(\"</featureFactory>\");\n RadioGroup radioGroup0 = new RadioGroup(errorPage0, \"</featureFactory>\", \"</featureFactory>\", (ISelectModel) null, elExpression0);\n Label label0 = (Label)errorPage0.dfn((Object) radioGroup0);\n }", "@Test\n public void test07() throws Throwable {\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\"Jf)%}s\");\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) subCategoryAxis0);\n StandardEntityCollection standardEntityCollection0 = new StandardEntityCollection();\n ChartRenderingInfo chartRenderingInfo0 = new ChartRenderingInfo((EntityCollection) standardEntityCollection0);\n PlotRenderingInfo plotRenderingInfo0 = chartRenderingInfo0.getPlotInfo();\n CategoryTextAnnotation categoryTextAnnotation0 = new CategoryTextAnnotation(\"The renderer has changed and I don't know what to do!\", (Comparable) \"Jf)%}s\", 473.308516391);\n categoryTextAnnotation0.setValue(473.308516391);\n boolean boolean0 = standardEntityCollection0.equals(categoryTextAnnotation0);\n SynthListUI synthListUI0 = new SynthListUI();\n JList<Object> jList0 = null;\n // Undeclared exception!\n try { \n synthListUI0.indexToLocation((JList) null, 0);\n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n assertThrownBy(\"javax.swing.plaf.basic.BasicListUI\", e);\n }\n }", "public String toLanguageTag() {\n/* 1098 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public boolean isLabelProperty(Object element, String property) {\n return false;\n }", "@Test\n public void test073() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Boolean boolean0 = Boolean.FALSE;\n Label label0 = (Label)errorPage0.legend((Object) boolean0);\n }", "@Test\n public void test031() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"u;*]p4T?%S2\");\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.bdo((CharSequence) \"u;*]p4T?%S2\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public AccessibilityNodeInfo getLabelFor() {\n/* 1617 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void setLabelFor(View labeled) {\n/* 1581 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void test020() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"LmHM9{y{68U,null,savored,null,null,null,null,null,null,null,null,null,null,null,null,\", \"LmHM9{y{68U,null,savored,null,null,null,null,null,null,null,null,null,null,null,null,\");\n // Undeclared exception!\n try {\n Component component0 = checkbox0.frame((CharSequence) \"LmHM9{y{68U,null,savored,null,null,null,null,null,null,null,null,null,null,null,null,\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test328() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]f '8Drr>Uj1==M2\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \"]f '8Drr>Uj1==M2\", \":JEiT\");\n // Undeclared exception!\n try { \n checkbox0.li();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test376() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"RL:I(Gq;>k@NkN[\");\n // Undeclared exception!\n try { \n xmlEntityRef0.legend();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test066() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = (Label)errorPage0.tt((Object) \"\");\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n DynamicSelectModel dynamicSelectModel0 = new DynamicSelectModel();\n DynamicSelectModel dynamicSelectModel1 = dynamicSelectModel0.enumeration(\"^_1[g(~fh\");\n // Undeclared exception!\n try { \n dynamicSelectModel1.getLabel(318);\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test\n public void test033() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \"\", \"\");\n String string0 = checkbox0.defaultTagName();\n XmlEntityRef xmlEntityRef0 = (XmlEntityRef)errorPage0.entity(\"input\");\n }", "@Test(timeout = 4000)\n public void test310() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"Attributes must be given in name, value pairs.\");\n // Undeclared exception!\n try { \n xmlEntityRef0.acronym();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test268() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"0+_/OK]Z5%q-UP hR\");\n // Undeclared exception!\n try { \n xmlEntityRef0.rawText(\"0+_/OK]Z5%q-UP hR\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test288() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n // Undeclared exception!\n try { \n xmlEntityRef0.htmlText(\"4_R]T<#2)Q?]R7Ut\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public String getDisplayLanguage() {\n/* 501 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test\n public void containsLanguageTagsCaseInsensitive() {\n final Literal lower = factory.createLiteral(\"Hello there\", \"en-gb\");\n final Literal upper = factory.createLiteral(\"Hello there\", \"EN-GB\");\n final Literal mixed = factory.createLiteral(\"Hello there\", \"en-GB\");\n\n final IRI example1 = factory.createIRI(\"http://example.com/s1\");\n final IRI greeting = factory.createIRI(\"http://example.com/greeting\");\n\n\n dataset.add(null, example1, greeting, upper);\n\n // any kind of Triple should match\n assertTrue(dataset.contains(factory.createQuad(null, example1, greeting, upper)));\n assertTrue(dataset.contains(factory.createQuad(null, example1, greeting, lower)));\n assertTrue(dataset.contains(factory.createQuad(null, example1, greeting, mixed)));\n\n // or as patterns\n assertTrue(dataset.contains(null, null, null, upper));\n assertTrue(dataset.contains(null, null, null, lower));\n assertTrue(dataset.contains(null, null, null, mixed));\n }", "public void setXLabel(String _label);", "@Test(timeout = 4000)\n public void test054() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n // Undeclared exception!\n try { \n xPathLexer0.LA((-1090));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public Builder addUnicodeLocaleAttribute(String attribute) {\n/* 1682 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test104() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"B$\");\n // Undeclared exception!\n try { \n xmlEntityRef0.legend((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Override\n public void setLabel(String arg0)\n {\n \n }", "void method0() {\nprivate static final String ELEMENT_N = \"element_n\";\nprivate static final String ELEMENT_R = \"element_r\";\nprivate static final String ATTRIBUTE_N = \"attribute_n\";\nprivate static final String ATTRIBUTE_R = \"attribute_r\";\nprivate static int ATTIDX_COUNT = 0;\npublic static final int ATTIDX_ABSTRACT = ATTIDX_COUNT++;\npublic static final int ATTIDX_AFORMDEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_BASE = ATTIDX_COUNT++;\npublic static final int ATTIDX_BLOCK = ATTIDX_COUNT++;\npublic static final int ATTIDX_BLOCKDEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_DEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_EFORMDEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_FINAL = ATTIDX_COUNT++;\npublic static final int ATTIDX_FINALDEFAULT = ATTIDX_COUNT++;\npublic static final int ATTIDX_FIXED = ATTIDX_COUNT++;\npublic static final int ATTIDX_FORM = ATTIDX_COUNT++;\npublic static final int ATTIDX_ID = ATTIDX_COUNT++;\npublic static final int ATTIDX_ITEMTYPE = ATTIDX_COUNT++;\npublic static final int ATTIDX_MAXOCCURS = ATTIDX_COUNT++;\npublic static final int ATTIDX_MEMBERTYPES = ATTIDX_COUNT++;\npublic static final int ATTIDX_MINOCCURS = ATTIDX_COUNT++;\npublic static final int ATTIDX_MIXED = ATTIDX_COUNT++;\npublic static final int ATTIDX_NAME = ATTIDX_COUNT++;\npublic static final int ATTIDX_NAMESPACE = ATTIDX_COUNT++;\npublic static final int ATTIDX_NAMESPACE_LIST = ATTIDX_COUNT++;\npublic static final int ATTIDX_NILLABLE = ATTIDX_COUNT++;\npublic static final int ATTIDX_NONSCHEMA = ATTIDX_COUNT++;\npublic static final int ATTIDX_PROCESSCONTENTS = ATTIDX_COUNT++;\npublic static final int ATTIDX_PUBLIC = ATTIDX_COUNT++;\npublic static final int ATTIDX_REF = ATTIDX_COUNT++;\npublic static final int ATTIDX_REFER = ATTIDX_COUNT++;\npublic static final int ATTIDX_SCHEMALOCATION = ATTIDX_COUNT++;\npublic static final int ATTIDX_SOURCE = ATTIDX_COUNT++;\npublic static final int ATTIDX_SUBSGROUP = ATTIDX_COUNT++;\npublic static final int ATTIDX_SYSTEM = ATTIDX_COUNT++;\npublic static final int ATTIDX_TARGETNAMESPACE = ATTIDX_COUNT++;\npublic static final int ATTIDX_TYPE = ATTIDX_COUNT++;\npublic static final int ATTIDX_USE = ATTIDX_COUNT++;\npublic static final int ATTIDX_VALUE = ATTIDX_COUNT++;\npublic static final int ATTIDX_ENUMNSDECLS = ATTIDX_COUNT++;\npublic static final int ATTIDX_VERSION = ATTIDX_COUNT++;\npublic static final int ATTIDX_XML_LANG = ATTIDX_COUNT++;\npublic static final int ATTIDX_XPATH = ATTIDX_COUNT++;\npublic static final int ATTIDX_FROMDEFAULT = ATTIDX_COUNT++;\n//public static final int ATTIDX_OTHERVALUES = ATTIDX_COUNT++; \npublic static final int ATTIDX_ISRETURNED = ATTIDX_COUNT++;\nprivate static final XIntPool fXIntPool = new XIntPool();\n// constants to return \nprivate static final XInt INT_QUALIFIED = fXIntPool.getXInt(SchemaSymbols.FORM_QUALIFIED);\nprivate static final XInt INT_UNQUALIFIED = fXIntPool.getXInt(SchemaSymbols.FORM_UNQUALIFIED);\nprivate static final XInt INT_EMPTY_SET = fXIntPool.getXInt(XSConstants.DERIVATION_NONE);\nprivate static final XInt INT_ANY_STRICT = fXIntPool.getXInt(XSWildcardDecl.PC_STRICT);\nprivate static final XInt INT_ANY_LAX = fXIntPool.getXInt(XSWildcardDecl.PC_LAX);\nprivate static final XInt INT_ANY_SKIP = fXIntPool.getXInt(XSWildcardDecl.PC_SKIP);\nprivate static final XInt INT_ANY_ANY = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_ANY);\nprivate static final XInt INT_ANY_LIST = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_LIST);\nprivate static final XInt INT_ANY_NOT = fXIntPool.getXInt(XSWildcardDecl.NSCONSTRAINT_NOT);\nprivate static final XInt INT_USE_OPTIONAL = fXIntPool.getXInt(SchemaSymbols.USE_OPTIONAL);\nprivate static final XInt INT_USE_REQUIRED = fXIntPool.getXInt(SchemaSymbols.USE_REQUIRED);\nprivate static final XInt INT_USE_PROHIBITED = fXIntPool.getXInt(SchemaSymbols.USE_PROHIBITED);\nprivate static final XInt INT_WS_PRESERVE = fXIntPool.getXInt(XSSimpleType.WS_PRESERVE);\nprivate static final XInt INT_WS_REPLACE = fXIntPool.getXInt(XSSimpleType.WS_REPLACE);\nprivate static final XInt INT_WS_COLLAPSE = fXIntPool.getXInt(XSSimpleType.WS_COLLAPSE);\nprivate static final XInt INT_UNBOUNDED = fXIntPool.getXInt(SchemaSymbols.OCCURRENCE_UNBOUNDED);\n// used to store the map from element name to attribute list \n// for 14 global elements \nprivate static final Hashtable fEleAttrsMapG = new Hashtable(29);\n// for 39 local elememnts \nprivate static final Hashtable fEleAttrsMapL = new Hashtable(79);\n// used to initialize fEleAttrsMap \n// step 1: all possible data types \n// DT_??? >= 0 : validate using a validator, which is initialized staticly \n// DT_??? < 0 : validate directly, which is done in \"validate()\" \nprotected static final int DT_ANYURI = 0;\nprotected static final int DT_ID = 1;\nprotected static final int DT_QNAME = 2;\nprotected static final int DT_STRING = 3;\nprotected static final int DT_TOKEN = 4;\nprotected static final int DT_NCNAME = 5;\nprotected static final int DT_XPATH = 6;\nprotected static final int DT_XPATH1 = 7;\nprotected static final int DT_LANGUAGE = 8;\n// used to store extra datatype validators \nprotected static final int DT_COUNT = DT_LANGUAGE + 1;\nprivate static final XSSimpleType[] fExtraDVs = new XSSimpleType[DT_COUNT];\nprotected static final int DT_BLOCK = -1;\nprotected static final int DT_BLOCK1 = -2;\nprotected static final int DT_FINAL = -3;\nprotected static final int DT_FINAL1 = -4;\nprotected static final int DT_FINAL2 = -5;\nprotected static final int DT_FORM = -6;\nprotected static final int DT_MAXOCCURS = -7;\nprotected static final int DT_MAXOCCURS1 = -8;\nprotected static final int DT_MEMBERTYPES = -9;\nprotected static final int DT_MINOCCURS1 = -10;\nprotected static final int DT_NAMESPACE = -11;\nprotected static final int DT_PROCESSCONTENTS = -12;\nprotected static final int DT_USE = -13;\nprotected static final int DT_WHITESPACE = -14;\nprotected static final int DT_BOOLEAN = -15;\nprotected static final int DT_NONNEGINT = -16;\nprotected static final int DT_POSINT = -17;\n// used to resolver namespace prefixes \nprotected XSDHandler fSchemaHandler = null;\n// used to store symbols. \nprotected SymbolTable fSymbolTable = null;\n// used to store the mapping from processed element to attributes \nprotected Hashtable fNonSchemaAttrs = new Hashtable();\n// temprory vector, used to hold the namespace list \nprotected Vector fNamespaceList = new Vector();\n// whether this attribute appeared in the current element \nprotected boolean[] fSeen = new boolean[ATTIDX_COUNT];\nprivate static boolean[] fSeenTemp = new boolean[ATTIDX_COUNT];\n// the following part implements an attribute-value-array pool. \n// when checkAttribute is called, it calls getAvailableArray to get \n// an array from the pool; when the caller is done with the array, \n// it calls returnAttrArray to return that array to the pool. \n// initial size of the array pool. 10 is big enough \nstatic final int INIT_POOL_SIZE = 10;\n// the incremental size of the array pool \nstatic final int INC_POOL_SIZE = 10;\n// the array pool \nObject[][] fArrayPool = new Object[INIT_POOL_SIZE][ATTIDX_COUNT];\n// used to clear the returned array \n// I think System.arrayCopy is more efficient than setting 35 fields to null \nprivate static Object[] fTempArray = new Object[ATTIDX_COUNT];\n// current position of the array pool (# of arrays not returned) \nint fPoolPos = 0;\n}", "@Test(timeout = 4000)\n public void test035() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n // Undeclared exception!\n try { \n xPathLexer0.setXPath((String) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test173() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"1R^6@7]:\");\n ElExpression elExpression0 = new ElExpression(\"F|WX'\");\n // Undeclared exception!\n try { \n xmlEntityRef0.attribute(\"}mL>mNa\", elExpression0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // No top level component found.\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "@Test(timeout = 4000)\n public void test322() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]1\");\n // Undeclared exception!\n try { \n xmlEntityRef0.fieldset();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Override\n\tboolean applyLabel() {\n\n\t\treturn false;\n\t}", "com.microsoft.schemas.xrm._2011.contracts.Label getLabel();", "public abstract String getLabelText();", "@Test(timeout = 4000)\n public void test304() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"'H,u&*QAP\");\n // Undeclared exception!\n try { \n xmlEntityRef0.encode(\"java.lang.String@0000000005\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.Component\", e);\n }\n }", "public static ULocale forLanguageTag(String languageTag) {\n/* 1207 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void normalizeTu(Element p_tu)\n throws Exception\n {\n // Header default source lang normalized when header is read.\n // Locales read from m_options were normalized by TmxReader.\n\n String lang = p_tu.attributeValue(Tmx.SRCLANG);\n if (lang != null)\n {\n lang = ImportUtil.normalizeLocale(lang);\n p_tu.addAttribute(Tmx.SRCLANG, lang);\n }\n\n // can't use xpath here because xml:lang won't be matched\n List nodes = p_tu.selectNodes(\"./tuv\");\n for (int i = 0, max = nodes.size(); i < max; i++)\n {\n Element elem = (Element)nodes.get(i);\n\n lang = elem.attributeValue(Tmx.LANG);\n lang = ImportUtil.normalizeLocale(lang);\n\n elem.addAttribute(Tmx.LANG, lang);\n }\n }", "@Ignore\r\n @Test\r\n public void testCreateEncodingsLabelBitString2()\r\n {\r\n System.out.println(\"testCreateEncodingsLabelBitString2\");\r\n HuffmanEncoder huffman = new HuffmanEncoder(p2, ensemble2);\r\n HuffmanNode root = huffman.createTree();\r\n EncodingsLabelTextCreator enc = new EncodingsLabelTextCreator(root);\r\n String expResult = \"{ a: 01, b: 00, c: 0 }\"; \r\n String result = enc.getLabelText();\r\n System.out.println(result);\r\n assertEquals(expResult, result);\r\n }", "@Test\n public void removeLanguageTagsCaseInsensitive() {\n final Literal lower = factory.createLiteral(\"Howdy\", \"en-us\");\n final Literal upper = factory.createLiteral(\"Howdy\", \"EN-US\");\n final Literal mixed = factory.createLiteral(\"Howdy\", \"en-US\");\n\n final IRI example1 = factory.createIRI(\"http://example.com/s1\");\n final IRI greeting = factory.createIRI(\"http://example.com/greeting\");\n\n dataset.add(null, example1, greeting, upper);\n\n // Remove should also honor any case\n dataset.remove(null, example1, null, mixed);\n assertFalse(dataset.contains(null, null, greeting, null));\n\n dataset.add(null, example1, greeting, lower);\n dataset.remove(null, example1, null, upper);\n\n // Check with Triple\n dataset.add(factory.createQuad(null, example1, greeting, mixed));\n dataset.remove(factory.createQuad(null, example1, greeting, upper));\n assertFalse(dataset.contains(null, null, greeting, null));\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n xPathLexer0.consume((-2568));\n // Undeclared exception!\n try { \n xPathLexer0.literal();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testErroneousIndDataTextColor() throws IllegalArgumentException {\n\t GraphRequestModel requestModel = createCustomIndividualGraphRequestModel();\n\t requestModel.setDataTextColor(SPACE);\n\t GraphRequestValidator.validateRequest(requestModel);\n\t}", "@Test(timeout = 4000)\n public void test030() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"\");\n // Undeclared exception!\n try { \n xPathLexer0.LA(0);\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test336() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"]f '8Drr>Uj1==M2\");\n // Undeclared exception!\n try { \n xmlEntityRef0.samp((Object) \"]f '8Drr>Uj1==M2\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Override\n public void parseXml(Element ele, LoadContext lc) {\n\n }", "public String createXMLmarkup(String documentId,TextLabels labels) {\n\t// create vector of labels with their start and end positions\n\tVector types = new Vector();\n\tfor(Iterator i=labels.getTypes().iterator(); i.hasNext(); ){\n\t String type = (String)i.next();\n\t for(Span.Looper j=labels.instanceIterator(type, documentId); j.hasNext(); ) {\n\t\tSpan s = j.nextSpan();\n\t\tVector l = new Vector();\n\t\tl.add(type);\n\t\tint st = s.documentSpanStartIndex();\n\t\tInteger start = new Integer(st);\n\t\tint e = st + s.size(); \n\t\tInteger end = new Integer(e);\n\t\tl.add(start);\n\t\tl.add(end);\n\t\tl.add(s);\n\t\ttypes.add(l);\n\t }\n\t}\n\t//Sort Labels so that there are no overlapping labels and longest spans are on outside\n\tVector newTypes = new Vector();\n\tnewTypes.add((Vector)types.get(0));\n\tboolean flag = true;\n\tfor(int x=1; x<types.size(); x++) {\n\t int curStart = ((Integer)(((Vector)types.get(x)).get(1))).intValue();\n\t int curEnd = ((Integer)(((Vector)types.get(x)).get(2))).intValue();\n\t flag = true;\n\t for(int y=0; y<newTypes.size(); y++){\n\t\tint prevStart = ((Integer)(((Vector)newTypes.get(y)).get(1))).intValue();\n\t\t int prevEnd = ((Integer)(((Vector)newTypes.get(y)).get(2))).intValue();\n\t\t if(curStart > prevStart && curStart < prevEnd && curEnd > prevEnd){\n\t\t\tflag = false;\n\t\t\tbreak;\n\t\t }\n\t }\n\t //add type to array if no conflicts in order\n\t if(flag) {\n\t\tboolean flag2 = true;\n\t\tfor(int i=0; i<newTypes.size(); i++){\n\t\t int prevStart = ((Integer)(((Vector)newTypes.get(i)).get(1))).intValue();\n\t\t int prevEnd = ((Integer)(((Vector)newTypes.get(i)).get(2))).intValue();\n\t\t if(curStart < prevStart || (curStart == prevStart && curEnd > prevEnd)) {\n\t\t\tnewTypes.insertElementAt((Vector)types.get(x),i);\n\t\t\tflag2 = false;\n\t\t\tbreak;\n\t\t } \t\t\t\n\t\t}\n\t\tif(flag2)\n\t\t newTypes.add((Vector)types.get(x));\n\t }\n\t}\n\tVector orderedMarkers = new Vector();\n\tVector previousEnd = new Vector();\n\tint la = 0;\n\tInteger high = new Integer(la);\n\tpreviousEnd.add(high);\n\torderedMarkers = createOrderedMarkers(newTypes, orderedMarkers, previousEnd);\n\tfor(int a=0; a<orderedMarkers.size(); a++) {\n\t String t = ((String)(((Vector)orderedMarkers.get(a)).get(0)));\n\t int start = ((Integer)(((Vector)orderedMarkers.get(a)).get(1))).intValue();\n\t //System.out.println(t + \": \" + start);\n\t}\n\t//Embed Labels in TextBase\n\tStringBuffer buf = new StringBuffer(\"\");\n\tString source = labels.getTextBase().documentSpan(documentId).asString();\n\tint currentPos = 0;\n\tfor(int i=0; i<orderedMarkers.size(); i++) { \n\t String t = ((String)(((Vector)orderedMarkers.get(i)).get(0)));\n\t //int pos = ((Integer)(((Vector)orderedMarkers.get(i)).get(1))).intValue();\n\t Span s = ((Span)(((Vector)orderedMarkers.get(i)).get(2)));\n\t int pos;\n\t if(t.startsWith(\"</\")){\n\t\tif (s.documentSpanStartIndex()+s.size() < s.documentSpan().size()){\n\t\t\tpos = s.documentSpan().subSpan( s.documentSpanStartIndex()+s.size(), 1).getTextToken(0).getLo();\t\t\n\t\t}else{\n\t\t pos = s.documentSpan().getTextToken(s.documentSpan().size()-1).getHi();\n\t\t}\n\t } else {\n\t\tif (s.documentSpanStartIndex() < s.documentSpan().size()){\n\t\t\tpos = s.documentSpan().subSpan( s.documentSpanStartIndex(), 1).getTextToken(0).getLo();\n\t\t}else{\n\t\t\tpos = s.documentSpan().getTextToken(s.documentSpan().size()-1).getHi();\n\t\t}\n\t }\n\t if(pos >= 0 && pos > currentPos) {\n\t\tbuf.append( source.substring(currentPos, pos) );\n\t\tcurrentPos = pos;\n\t }\n\t buf.append(t);\n\t}\n\treturn buf.toString();\n\t//return \"Not Yet\";\n }", "@Test(timeout = 4000)\n public void test178() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component ca be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \"Col component ca be added only to a TableBlock.\", \"Col component ca be added only to a TableBlock.\");\n // Undeclared exception!\n try { \n checkbox0.acronym();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n public void test101() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef((String) null);\n // Undeclared exception!\n try {\n Component component0 = xmlEntityRef0.cite((Object) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test\n\tpublic final void testRussianMacronOverI() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException \n\t{\n\t\tassertSingleResult(\"2099904\", fldName, \"istorīi\");\n\t\tassertSingleResult(\"2099904\", fldName, \"istorii\");\n\t\t// i have no idea if these should work, or how it should look here\n//\t\tassertSingleDocWithValue(\"2099904\", fldName, \"istorī\");\n//\t\tassertSingleDocWithValue(\"2099904\", fldName, \"istori\");\n\t}", "@Test(timeout = 4000)\n public void test236() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@0000000005\");\n // Undeclared exception!\n try { \n xmlEntityRef0.cite((Object) \"java.lang.String@0000000005\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "DatasetLabel getLabel();", "@Test(timeout = 4000)\n public void test041() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"B$\");\n Checkbox checkbox0 = new Checkbox(xmlEntityRef0, \"mARxJH5T\", \"nTvx<z&6-B87\");\n // Undeclared exception!\n try { \n checkbox0.ul();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void setLabeledBy(View label) {\n/* 1626 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Test(timeout = 4000)\n public void test103() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"java.lang.String@000000K005\");\n // Undeclared exception!\n try { \n xmlEntityRef0.li();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void testXW404() {\n\n ResourceBundle rbFrance = localizedTextProvider.findResourceBundle(\"com/opensymphony/xwork2/util/XW404\", Locale.FRANCE);\n ResourceBundle rbItaly = localizedTextProvider.findResourceBundle(\"com/opensymphony/xwork2/util/XW404\", Locale.ITALY);\n ResourceBundle rbGermany = localizedTextProvider.findResourceBundle(\"com/opensymphony/xwork2/util/XW404\", Locale.GERMANY);\n\n assertNotNull(rbFrance);\n assertEquals(\"Bonjour\", rbFrance.getString(\"hello\"));\n\n assertNull(rbItaly);\n\n assertNotNull(rbGermany);\n assertEquals(\"Hallo\", rbGermany.getString(\"hello\"));\n }", "@Test\n public void test085() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Checkbox checkbox0 = new Checkbox(errorPage0, \">}\\\"_\", \">}\\\"_\");\n String[] stringArray0 = new String[6];\n Checkbox checkbox1 = (Checkbox)checkbox0.attributes(stringArray0);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertFalse(checkbox1._isGeneratedId());\n }", "@Test\n public void test060() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, (String) null);\n ElExpression elExpression0 = table0.el((String) null);\n Label label0 = (Label)table0.h3((Object) elExpression0);\n }", "@Test\n public void test137() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Table table0 = new Table(errorPage0, (String) null);\n TableBlock tableBlock0 = table0.thead();\n WordLemmaTag wordLemmaTag0 = new WordLemmaTag();\n Block block0 = (Block)table0.label();\n Tag tag0 = new Tag((edu.stanford.nlp.ling.Label) wordLemmaTag0);\n Label label0 = (Label)tableBlock0.h6((Object) tag0);\n // Undeclared exception!\n try {\n Component component0 = block0.thead();\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // Thead component can be added only to a Table.\n //\n }\n }", "@Test\n public void getByAttribute_Existing() {\n assertEquals(1, onPage.getByAttribute(\"lang\", MatchType.EXISTING, null).size());\n assertTrue(onPage.getByAttribute(\"align\", MatchType.EXISTING, \"ol\").isEmpty());\n }", "@Test(timeout = 4000)\n public void test201() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n // Undeclared exception!\n try { \n xmlEntityRef0.head();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test037() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"[Sdf yy*X>HdSr %<}\");\n xPathLexer0.consume((-1189));\n // Undeclared exception!\n try { \n xPathLexer0.or();\n fail(\"Expecting exception: StringIndexOutOfBoundsException\");\n \n } catch(StringIndexOutOfBoundsException e) {\n }\n }", "@Test(timeout = 4000)\n public void test053() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n xPathLexer0.consume((-2013));\n // Undeclared exception!\n try { \n xPathLexer0.and();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public String getLanguage() {\n/* 238 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void testWrongDatasetUrl() {\n\t\tString dataset = \"/jps/data/test/hey\";\n\t\tString target = \"http://localhost:8081/jps/data/test/hey/testE-303load.owl\";\n\t\ttry {\n\t\t\tputE303Load(dataset, target);\n\t\t} catch (JPSRuntimeException e) {\n\t\t\treturn;\n\t\t}\n\t\tassertTrue(\"no exception was thrown\", true);\n\t}", "@Override\n\t\t\tpublic String getLabel() {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\tpublic void setLabel(String label) {\n\t\t\n\t}", "@Test(timeout = 4000)\n public void test00() throws Throwable {\n Discretize discretize0 = new Discretize(\"Y\");\n discretize0.makeBinaryTipText();\n BinarySparseInstance binarySparseInstance0 = new BinarySparseInstance(3337);\n int int0 = 82;\n // Undeclared exception!\n try { \n binarySparseInstance0.isMissing((Attribute) null);\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"weka.core.AbstractInstance\", e);\n }\n }", "@Test(timeout = 4000)\n public void test044() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n xPathLexer0.consume((-863));\n // Undeclared exception!\n try { \n xPathLexer0.mod();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test038() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer();\n xPathLexer0.consume((-2535));\n // Undeclared exception!\n try { \n xPathLexer0.or();\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test281() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"4_R]T<#2)Q?]R7Ut\");\n // Undeclared exception!\n try { \n xmlEntityRef0.dd((Object) \"4_R]T<#2)Q?]R7Ut\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "java.lang.String getLabel();", "@Override\n public boolean isLabelProperty(Object element, String property) {\n return false;\n }", "@Ignore\r\n @Test\r\n public void testCreateEncodingsLabelBitString()\r\n {\r\n System.out.println(\"createEncodingsLabelBitString\");\r\n HuffmanEncoder huffman = new HuffmanEncoder(p, ensemble);\r\n HuffmanNode root = huffman.createTree();\r\n EncodingsLabelTextCreator enc = new EncodingsLabelTextCreator(root);\r\n String expResult = \"{ a: 01, b: 10, c: 11, d: 001, e: 000 }\"; \r\n String result = enc.getLabelText();\r\n System.out.println(result);\r\n assertEquals(expResult, result);\r\n }", "@Test(timeout = 4000)\n public void test299() throws Throwable {\n XmlEntityRef xmlEntityRef0 = new XmlEntityRef(\"{\");\n // Undeclared exception!\n try { \n xmlEntityRef0.span((Object) \"{\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "@Test(timeout = 4000)\n public void test343() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Byte byte0 = new Byte((byte)1);\n Label label0 = new Label(errorPage0, byte0);\n // Undeclared exception!\n try { \n label0.title(\"select\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"wheel.components.StandaloneComponent\", e);\n }\n }", "private void validateTu(Element p_tu)\n throws Exception\n {\n boolean b_found = false;\n\n String tuvLang = null;\n String srcLang = p_tu.attributeValue(Tmx.SRCLANG);\n if (srcLang == null)\n {\n srcLang = m_defaultSrcLang;\n }\n\n // can't use xpath here because xml:lang won't be matched\n List nodes = p_tu.selectNodes(\"./tuv\");\n\n if (nodes.size() < 2)\n {\n throw new Exception(\n \"TU contains less than 2 TUVs (after filtering), ignoring\");\n }\n\n for (int i = 0, max = nodes.size(); i < max; i++)\n {\n Element elem = (Element)nodes.get(i);\n\n tuvLang = elem.attributeValue(Tmx.LANG);\n if (tuvLang.equalsIgnoreCase(srcLang))\n {\n b_found = true;\n break;\n }\n }\n\n if (!b_found)\n {\n throw new Exception(\n \"TU is missing TUV in source language \" + srcLang);\n }\n\n if (!m_importAllSources && !tuvLang.equalsIgnoreCase(m_sourceLocale))\n {\n throw new Exception(\n \"TU has no source TUV in \" + m_sourceLocale + \", ignoring\");\n }\n }", "@Test(timeout = 4000)\n public void test067() throws Throwable {\n Hidden hidden0 = new Hidden((Component) null, \".*,r%\", \"Col component can be added only to a TableBlock.\");\n Checkbox checkbox0 = new Checkbox(hidden0, \".*,r%\", \"Could not evaluate expression \");\n // Undeclared exception!\n try { \n checkbox0.span();\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n }\n }", "public void testFeatureLabelModelFacet() throws Exception {\n\t\tURI genmodelFileName = createURI(\"testFeatureLabelModelFacet.gmfgen\"); //$NON-NLS-1$\n\t\t\n\t\tException caughtGenException = assertOrdinaryLoadModelProblems(genmodelFileName);\n\t\tassertTrue(\"expected diagnostic exception\", caughtGenException != null); //$NON-NLS-1$\t\t\t\t\n\n\t\tassertOnLoadModelMigrationSuccess(genmodelFileName);\n\t\tcheckFeatureLabelModelFacetsMigrated(genmodelFileName);\n\n\t\tURI newUri = temporarySaveMigratedModel(genmodelFileName, \"testFeatureLabelModelFacet\", \"gmfgen\");\n\t\tchangeNsUriToOldOne(newUri, \"gmfgen\", \"http://www.eclipse.org/gmf/2005/GenModel/2.0\");\n\t\t\n\t\tassertOnLoadModelMigrationDidNothing(newUri);\n\t\tcheckFeatureLabelModelFacetsMigrated(newUri);\n\t}", "@Test\n public void getLabel() {\n cleanEntity0();\n\n ReflectionTestUtils.setField(entity0, \"label\", labelS);\n assertEquals(entity0.getLabel(), labelS);\n }", "@Test\n public void test077() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Link link0 = new Link(errorPage0, errorPage0);\n Label label0 = (Label)errorPage0.dt((Object) link0);\n }", "@Test(timeout = 4000)\n public void test28() throws Throwable {\n DynamicSelectModel dynamicSelectModel0 = new DynamicSelectModel();\n DynamicSelectModel dynamicSelectModel1 = dynamicSelectModel0.collection(\"?.6\\\"|`+n8\");\n DynamicSelectModel dynamicSelectModel2 = dynamicSelectModel1.label(\"org.mvel.conversion.IntegerCH$8\");\n // Undeclared exception!\n try { \n dynamicSelectModel2.getLabel(104);\n fail(\"Expecting exception: ClassCastException\");\n \n } catch(ClassCastException e) {\n //\n // java.lang.Integer cannot be cast to java.lang.Boolean\n //\n verifyException(\"org.mvel.MVELInterpretedRuntime\", e);\n }\n }", "@Test(timeout = 4000)\n public void test27() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Label label0 = new Label(errorPage0, errorPage0);\n Component component0 = label0.br();\n DynamicSelectModel dynamicSelectModel0 = component0.selectModel();\n dynamicSelectModel0.enumeration((String) null);\n // Undeclared exception!\n try { \n dynamicSelectModel0.getLabel((-9));\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.mvel.PropertyAccessor\", e);\n }\n }", "@Test\n @JUnitTemporaryDatabase // Relies on specific IDs so we need a fresh database\n public void testImportUtf8() throws Exception {\n createAndFlushServiceTypes();\n createAndFlushCategories();\n \n //Initialize the database\n ModelImporter mi = m_importer;\n String specFile = \"/utf-8.xml\";\n mi.importModelFromResource(new ClassPathResource(specFile));\n \n assertEquals(1, mi.getNodeDao().countAll());\n // \\u00f1 is unicode for n~ \n assertEquals(\"\\u00f1ode2\", mi.getNodeDao().get(1).getLabel());\n }", "@Override\n\tpublic String getLabel() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getLabel() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getLabel() {\n\t\treturn null;\n\t}", "@Test\n\tpublic final void testHardZnak() \n\t\t\tthrows ParserConfigurationException, IOException, SAXException \n\t{\n\t\tassertSingleResult(\"6\", fldName, \"Obʺedinenie\");\n\t\tassertSingleResult(\"6\", fldName, \"Obedinenie\");\n\t\t// i have no idea if these should work, or how it should look here\n//\t\tassertSingleDocWithValue(\"6\", fldName, \"Oъedinenie\");\n//\t\tassertSingleDocWithValue(\"6\", fldName, \"Obъedinenie\");\n\t}", "@Test\n public void test36() throws Throwable {\n SubCategoryAxis subCategoryAxis0 = new SubCategoryAxis(\"Null 'location' for index 0 not permitted.\");\n PiePlot piePlot0 = new PiePlot();\n RectangleInsets rectangleInsets0 = piePlot0.getSimpleLabelOffset();\n subCategoryAxis0.setLabelInsets(rectangleInsets0);\n subCategoryAxis0.setTickMarkOutsideLength(Float.NEGATIVE_INFINITY);\n CombinedDomainCategoryPlot combinedDomainCategoryPlot0 = new CombinedDomainCategoryPlot((CategoryAxis) subCategoryAxis0);\n boolean boolean0 = combinedDomainCategoryPlot0.equals(\"Null 'location' for index 0 not permitted.\");\n }", "@Override\n\tpublic void setLabelText(String label) {\n\t}" ]
[ "0.63235956", "0.6131725", "0.586801", "0.5793364", "0.57810366", "0.5733914", "0.5725221", "0.57140565", "0.5621407", "0.5612729", "0.55543745", "0.54941416", "0.54478735", "0.54120344", "0.541021", "0.53926355", "0.5390178", "0.5386003", "0.53660476", "0.5352013", "0.5346973", "0.5320862", "0.529646", "0.5292028", "0.5282064", "0.52772015", "0.5271091", "0.5249611", "0.52377933", "0.52083105", "0.52075136", "0.5201054", "0.5198778", "0.5197747", "0.51751167", "0.5169244", "0.51642895", "0.5157266", "0.51496005", "0.5141398", "0.5137734", "0.5131244", "0.5130873", "0.5125982", "0.5124591", "0.51236933", "0.5121364", "0.51203996", "0.5119608", "0.5113138", "0.5104487", "0.51013327", "0.51013136", "0.5092882", "0.5085819", "0.50823635", "0.50592613", "0.50588316", "0.50568694", "0.5053721", "0.5053156", "0.5052238", "0.5043813", "0.50434524", "0.5038399", "0.5036895", "0.5034083", "0.5029072", "0.50261104", "0.502576", "0.5023262", "0.50189203", "0.5013679", "0.50081927", "0.5004666", "0.4999345", "0.49992335", "0.49978277", "0.4996698", "0.4995231", "0.49944556", "0.49919707", "0.49861652", "0.4983316", "0.49818894", "0.49815977", "0.4979499", "0.4979089", "0.49738812", "0.49732167", "0.49725923", "0.49714208", "0.4970895", "0.49695906", "0.4964044", "0.4964044", "0.4964044", "0.49570113", "0.49566162", "0.49486503" ]
0.5631078
8
Test case for SF bug 948995 OWL full should allow inverse functional datatype properties
public void test_sf_948995() { OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM ); // OWL dl DatatypeProperty dp = m.createDatatypeProperty( NS + "dp" ); dp.addRDFType( OWL.InverseFunctionalProperty ); boolean ex = false; try { dp.as( InverseFunctionalProperty.class ); } catch (ConversionException e) { ex = true; } assertTrue( "Should have been a conversion exception", ex ); m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); // OWL full dp = m.createDatatypeProperty( NS + "dp" ); dp.addRDFType( OWL.InverseFunctionalProperty ); ex = false; try { dp.as( InverseFunctionalProperty.class ); } catch (ConversionException e) { ex = true; } assertFalse( "Should not have been a conversion exception", ex ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "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 }", "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 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 }", "public void test_sf_934528() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n \n Resource r = (Resource) OWL.Thing.inModel( m );\n OntClass thingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( thingClass );\n \n r = (Resource) OWL.Nothing.inModel( m );\n OntClass nothingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( nothingClass );\n }", "public void test_lt_01() {\n OntModel m = ModelFactory.createOntologyModel();\n \n DatatypeProperty p = m.createDatatypeProperty(NS + \"p\");\n OntClass c = m.createClass(NS + \"A\");\n \n Individual i = m.createIndividual(NS + \"i\", c);\n i.addProperty(p, \"testData\");\n \n int count = 0;\n \n for (Iterator j = i.listPropertyValues(p); j.hasNext();) {\n //System.err.println(\"Individual i has p value: \" + j.next());\n j.next();\n count++;\n }\n \n assertEquals(\"i should have one property\", 1, count);\n }", "public void test_hk_02() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null); // ProfileRegistry.OWL_LANG);\n ontModel.createAllDifferent();\n assertTrue(ontModel.listAllDifferent().hasNext());\n AllDifferent allDifferent = (AllDifferent) ontModel.listAllDifferent().next();\n //allDifferent.setDistinct(ontModel.createList());\n assertFalse(allDifferent.listDistinctMembers().hasNext());\n }", "public void test_ck_02() {\n OntModel vocabModel = ModelFactory.createOntologyModel();\n ObjectProperty p = vocabModel.createObjectProperty(\"p\");\n OntClass A = vocabModel.createClass(\"A\");\n \n OntModel workModel = ModelFactory.createOntologyModel();\n Individual sub = workModel.createIndividual(\"uri1\", A);\n Individual obj = workModel.createIndividual(\"uri2\", A);\n workModel.createStatement(sub, p, obj);\n }", "public void test_hk_03() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n OntProperty property = ontModel.createObjectProperty(\"http://www.aldi.de#property\");\n /* MinCardinalityRestriction testClass = */\n ontModel.createMinCardinalityRestriction(null, property, 42);\n \n }", "public void test_sf_978259() {\n OntModel md = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM );\n OntModel ml = ModelFactory.createOntologyModel( OntModelSpec.OWL_LITE_MEM );\n \n DataRange drd = md.createDataRange( md.createList( new Resource[] {OWL.Thing}) );\n \n assertNotNull( drd );\n \n HasValueRestriction hvrd = md.createHasValueRestriction( null, RDFS.seeAlso, OWL.Thing );\n \n assertNotNull( hvrd );\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 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 }", "public void test_sf_927641() {\n String NS = \"http://example.org/test#\";\n OntModel m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n OntClass c0 = m0.createClass( NS + \"C0\" );\n OntClass c1 = m0.createClass( NS + \"C1\" );\n OntClass c2 = m0.createClass( NS + \"C2\" );\n OntClass c3 = m0.createClass( NS + \"C3\" );\n \n c0.addSubClass( c1 );\n c1.addSubClass( c2 );\n c2.addEquivalentClass( c3 );\n \n // now c1 is the direct super-class of c2, even allowing for the equiv with c3\n assertFalse( \"pass 1: c0 should not be a direct super of c2\", c2.hasSuperClass( c0, true ) );\n assertFalse( \"pass 1: c3 should not be a direct super of c2\", c2.hasSuperClass( c3, true ) );\n assertFalse( \"pass 1: c2 should not be a direct super of c2\", c2.hasSuperClass( c2, true ) );\n assertTrue( \"pass 1: c1 should be a direct super of c2\", c2.hasSuperClass( c1, true ) );\n \n // second pass - with inference\n m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RULE_INF );\n c0 = m0.createClass( NS + \"C0\" );\n c1 = m0.createClass( NS + \"C1\" );\n c2 = m0.createClass( NS + \"C2\" );\n c3 = m0.createClass( NS + \"C3\" );\n \n c0.addSubClass( c1 );\n c1.addSubClass( c2 );\n c2.addEquivalentClass( c3 );\n \n // now c1 is the direct super-class of c2, even allowing for the equiv with c3\n assertFalse( \"pass 2: c0 should not be a direct super of c2\", c2.hasSuperClass( c0, true ) );\n assertFalse( \"pass 2: c3 should not be a direct super of c2\", c2.hasSuperClass( c3, true ) );\n assertFalse( \"pass 2: c2 should not be a direct super of c2\", c2.hasSuperClass( c2, true ) );\n assertTrue( \"pass 2: c1 should be a direct super of c2\", c2.hasSuperClass( c1, true ) );\n }", "public void test_sf_940570() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RDFS_INF );\n OntClass C = m.createClass( NS + \"C\" );\n Resource a = m.createResource( NS + \"a\", C );\n \n TestUtil.assertIteratorValues( this, m.listIndividuals(), new Object[] {a} );\n \n OntModel dm = ModelFactory.createOntologyModel( OntModelSpec.DAML_MEM_RULE_INF );\n OntClass D = dm.createClass( NS + \"D\" );\n Resource b = dm.createResource( NS + \"b\", D );\n \n TestUtil.assertIteratorValues( this, dm.listIndividuals(), new Object[] {b} );\n }", "private static void initDatatypeProperties() {\n OntModel ontologie = ModelFactory.createOntologyModel();\n OntologyFactory.readOntology(ontologyPath, ontologie);\n ontologie.add(ontologie);\n datatypeProperties.addAll(ontologie.listDatatypeProperties().toList());\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 }", "boolean isInverseFunctionalLinkProperty();", "public void test_hk_06() throws Exception {\n OntModel ontModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);\n ontModel.read(\"file:testing/ontology/bugs/test_hk_06/a.owl\");\n \n String NSa = \"http://jena.hpl.hp.com/2003/03/testont/a#\";\n String NSb = \"http://jena.hpl.hp.com/2003/03/testont/b#\";\n \n OntClass A = ontModel.getOntClass(NSa + \"A\");\n assertTrue(\"class A should be in the base model\", ontModel.isInBaseModel(A));\n \n OntClass B = ontModel.getOntClass(NSb + \"B\");\n assertFalse(\"class B should not be in the base model\", ontModel.isInBaseModel(B));\n \n assertTrue(\n \"A rdf:type owl:Class should be in the base model\",\n ontModel.isInBaseModel(ontModel.createStatement(A, RDF.type, OWL.Class)));\n assertFalse(\n \"B rdf:type owl:Class should not be in the base model\",\n ontModel.isInBaseModel(ontModel.createStatement(B, RDF.type, OWL.Class)));\n }", "public void test_sb_01() {\n OntModel model= ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM_RDFS_INF, null);\n \n Resource result= null;\n Resource nullValueForResourceType= null;\n \n result= model.createOntResource( OntResource.class, nullValueForResourceType, \"http://www.somewhere.com/models#SomeResourceName\" );\n assertNotNull( result );\n }", "@Test\n public void testEnumeration() {\n OntModel model = createOntologyModel(OntModelSpec.OWL_MEM);\n OntClass thing = model.createClass(\"http://www.w3.org/2002/07/owl#Thing\");\n EnumeratedClass weekdays = model.createEnumeratedClass(NS + \"weekdays\", null);\n weekdays.addOneOf(thing.createIndividual(NS + \"Monday\"));\n weekdays.addOneOf(thing.createIndividual(NS + \"Tuesday\"));\n weekdays.addOneOf(thing.createIndividual(NS + \"Wednesday\"));\n weekdays.addOneOf(thing.createIndividual(NS + \"Thursday\"));\n weekdays.addOneOf(thing.createIndividual(NS + \"Friday\"));\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n model.write(baos);\n assertThat(baos.toString(), equalTo(expectedEnumeration));\n\n Iterator<?> i = weekdays.listOneOf();\n assertThat(((OntResource) i.next()).getURI(), equalTo(NS + \"Monday\"));\n assertThat(i.next(), not(instanceOf(Individual.class)));\n assertThat(((OntResource) i.next()).getURI(), equalTo(NS + \"Wednesday\"));\n assertThat(((OntResource) i.next()).getURI(), equalTo(NS + \"Thursday\"));\n assertThat(((OntResource) i.next()).getURI(), equalTo(NS + \"Friday\"));\n }", "public void visit(OWLAnnotationProperty arg0) throws OWLException {\n\t\t\t\n\t\t}", "public void test_dn_01() {\n // direct reading for the model method 1\n OntModel m0 = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null );\n m0.read( \"file:testing/ontology/bugs/test_hk_07B.owl\" );\n \n OntProperty p0 = m0.getOntProperty( \"file:testing/ontology/bugs/test_hk_07B.owl#PropB\" );\n int count = 0;\n for (Iterator i = p0.listDomain(); i.hasNext();) {\n count++;\n i.next();\n }\n assertEquals( 3, count );\n \n // repeat test - thus using previously cached model for import\n \n OntModel m1 = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM_RULE_INF, null );\n m1.read( \"file:testing/ontology/bugs/test_hk_07B.owl\" );\n \n OntProperty p1 = m1.getOntProperty( \"file:testing/ontology/bugs/test_hk_07B.owl#PropB\" );\n count = 0;\n for (Iterator i = p1.listDomain(); i.hasNext();) {\n count++;\n i.next();\n }\n assertEquals( 3, count );\n }", "@Test\n\tvoid reverseFlagAttributes() {\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(RIGHT_VENTRICULAR_STRUCTURE, PULMONARY_VALVE_STRUCTURE),\n\t\t\t\tstrings(selectConceptIds(\"*:R \" + FINDING_SITE + \" = <\" + DISORDER)));\n\n\t\t// Using Dot notation\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(RIGHT_VENTRICULAR_STRUCTURE, PULMONARY_VALVE_STRUCTURE),\n\t\t\t\tstrings(selectConceptIds(\"<\" + DISORDER + \".\" + FINDING_SITE)));\n\n\t\t// Dot notation against empty set of concepts\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(),\n\t\t\t\tstrings(selectConceptIds(\"<\" + RIGHT_VENTRICULAR_STRUCTURE + \".\" + LATERALITY)));\n\n\t\t// Select the Finding sites of descendants of Clinical finding\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(RIGHT_VENTRICULAR_STRUCTURE, PULMONARY_VALVE_STRUCTURE, SKIN_STRUCTURE),\n\t\t\t\tstrings(selectConceptIds(\"<\" + CLINICAL_FINDING + \".\" + FINDING_SITE)));\n\n\t\t// Select the just the first two Finding sites of descendants of Clinical finding\n\t\tPageRequest pageRequest = PageRequest.of(0, 2);\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(RIGHT_VENTRICULAR_STRUCTURE, SKIN_STRUCTURE),\n\t\t\t\tstrings(selectConceptIds(\"<\" + CLINICAL_FINDING + \".\" + FINDING_SITE, pageRequest)));\n\n\t\t// Select the second page of Finding sites of descendants of Clinical finding\n\t\tpageRequest = PageRequest.of(1, 2);\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(PULMONARY_VALVE_STRUCTURE),\n\t\t\t\tstrings(selectConceptIds(\"<\" + CLINICAL_FINDING + \".\" + FINDING_SITE, pageRequest)));\n\n\t\t// Select the Laterality of Finding sites of descendants of Clinical finding\n\t\tassertEquals(\n\t\t\t\tSets.newHashSet(RIGHT),\n\t\t\t\tstrings(selectConceptIds(\"<\" + CLINICAL_FINDING + \".\" + FINDING_SITE + \".\" + LATERALITY)));\n\t}", "@Test\n public void testClaimOthPhysFlag() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setOthPhysFlagEnum,\n RdaFissClaim::getOthPhysFlag,\n FissPhysicianFlag.PHYSICIAN_FLAG_NO,\n \"N\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setOthPhysFlagUnrecognized,\n RdaFissClaim::getOthPhysFlag,\n RdaFissClaim.Fields.othPhysFlag,\n 1);\n }", "public interface EHR_Entity extends Data_Entity {\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#agent_id\r\n String getAgent_id();\r\n\r\n RDFProperty getAgent_idProperty();\r\n\r\n boolean hasAgent_id();\r\n\r\n void setAgent_id(String newAgent_id);\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#object_ids\r\n Collection getObject_ids();\r\n\r\n RDFProperty getObject_idsProperty();\r\n\r\n boolean hasObject_ids();\r\n\r\n Iterator listObject_ids();\r\n\r\n void addObject_ids(String newObject_ids);\r\n\r\n void removeObject_ids(String oldObject_ids);\r\n\r\n void setObject_ids(Collection newObject_ids);\r\n\r\n // Property http://www.owl-ontologies.com/unnamed.owl#type\r\n String getType();\r\n\r\n RDFProperty getTypeProperty();\r\n\r\n boolean hasType();\r\n\r\n void setType(String newType);\r\n}", "public void test_ck_03() {\n // part A - surprising reification\n OntModel model1 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM, null);\n OntModel model2 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM_RULE_INF, null);\n \n Individual sub = model1.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n OntProperty pred = model1.createOntProperty(\"http://mytest#\");\n Individual obj = model1.createIndividual(\"http://mytest#i2\", model1.getProfile().CLASS());\n OntProperty probabilityP = model1.createOntProperty(\"http://mytest#prob\");\n \n Statement st = model1.createStatement(sub, pred, obj);\n model1.add(st);\n st.createReifiedStatement().addProperty(probabilityP, 0.9);\n assertTrue(\"st should be reified\", st.isReified());\n \n Statement st2 = model2.createStatement(sub, pred, obj);\n model2.add(st2);\n st2.createReifiedStatement().addProperty(probabilityP, 0.3);\n assertTrue(\"st2 should be reified\", st2.isReified());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP).addProperty(probabilityP, 0.3); //!!!\n // exception\n \n // Part B - exception in remove All\n Individual sub2 = model2.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP); //!!! exception\n \n sub2.addProperty(probabilityP, 0.3);\n sub2.removeAll(probabilityP); //!!! exception\n \n }", "@Test\n\tpublic void testInternalEntityRelatedTypes() {\n\t\tlogger.info(\"Run testInternalEntityRelatedTypes\");\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\n\t\t// Entity1InputType\n\t\tfinal IntrospectionFullType entity1InputType = getFullType(introspection,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(27, entity1InputType.getInputFields().size());\n\n\t\tassertInputField(entity1InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"intAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertInputField(entity1InputType, \"longAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLLong.getName());\n\t\tassertInputField(entity1InputType, \"doubleAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLFloat.getName());\n\t\tassertInputField(entity1InputType, \"stringAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"booleanAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBoolean.getName());\n\t\tassertInputField(entity1InputType, \"bigIntAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBigInteger.getName());\n\t\tassertInputField(entity1InputType, \"bigDecimalAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBigDecimal.getName());\n\t\tassertInputField(entity1InputType, \"bytesAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLByte.getName());\n\t\tassertInputField(entity1InputType, \"shortAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLShort.getName());\n\t\tassertInputField(entity1InputType, \"charAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLChar.getName());\n\t\tassertInputField(entity1InputType, \"dateAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLDate.getName());\n\t\tassertInputField(entity1InputType, \"fileAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLFile.getName());\n\t\tassertInputField(entity1InputType, \"localDateAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLLocalDate.getName());\n\t\tassertInputField(entity1InputType, \"localDateTimeAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLLocalDateTime.getName());\n\t\tassertInputField(entity1InputType, \"instantAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLInstant.getName());\n\n\t\tassertInputField(entity1InputType, \"stringList\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"stringSet\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\n\t\tassertInputField(entity1InputType, \"stringList\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"stringSet\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\n\t\tassertInputField(entity1InputType, \"enumAttr\", IntrospectionTypeKindEnum.ENUM, Enum1.class.getSimpleName());\n\n\t\tassertInputField(entity1InputType, \"enumList\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tEnum1.class);\n\t\tassertInputField(entity1InputType, \"enumSet\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tEnum1.class);\n\n\t\tassertInputField(entity1InputType, \"entity2\" + schemaConfig.getAttributeIdSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"entity3\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"entity4\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\tassertInputField(entity1InputType, \"embeddedData1\", IntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEmbeddedData1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tassertInputField(entity1InputType, \"embeddedData1s\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEmbeddedData1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\n\t\t// Entity1LoadResult\n\t\tfinal IntrospectionFullType entity1LoadResult = getFullType(introspection,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, entity1LoadResult.getFields().size());\n\n\t\tassertField(entity1LoadResult, \"data\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity1.class.getSimpleName());\n\t\tassertField(entity1LoadResult, \"orderBy\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tgetOrderByOutputTypeName());\n\t\tassertField(entity1LoadResult, \"paging\", IntrospectionTypeKindEnum.OBJECT, getPagingOutputTypeName());\n\n\t\t// Entity2InputType\n\t\tfinal IntrospectionFullType entity2InputType = getFullType(introspection,\n\t\t\t\tEntity2.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity2InputType.getInputFields().size());\n\n\t\tassertInputField(entity2InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity2InputType, \"entity1\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\t// Entity2LoadResult\n\t\tfinal IntrospectionFullType entity2LoadResult = getFullType(introspection,\n\t\t\t\tEntity2.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, entity2LoadResult.getFields().size());\n\n\t\tassertField(entity2LoadResult, \"data\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity2.class.getSimpleName());\n\t\tassertField(entity2LoadResult, \"orderBy\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tgetOrderByOutputTypeName());\n\t\tassertField(entity2LoadResult, \"paging\", IntrospectionTypeKindEnum.OBJECT, getPagingOutputTypeName());\n\n\t\t// Entity3InputType\n\t\tfinal IntrospectionFullType entity3InputType = getFullType(introspection,\n\t\t\t\tEntity3.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity3InputType.getInputFields().size());\n\n\t\tassertInputField(entity3InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity3InputType, \"entity1\" + schemaConfig.getAttributeIdSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\t// Entity4InputType\n\t\tfinal IntrospectionFullType entity4InputType = getFullType(introspection,\n\t\t\t\tEntity4.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity4InputType.getInputFields().size());\n\n\t\tassertInputField(entity4InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity4InputType, \"entity1\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t}", "public interface ContinuousStateDatum extends org.cdao.jastor.CharacterStateDatum, com.ibm.adtech.jastor.Thing {\n\t\n\t/**\n\t * The rdf:type for this ontology class\n */\n\tpublic static final Resource TYPE = ResourceFactory.createResource(\"http://localhost/~vivek/cdao.owl#ContinuousStateDatum\");\n\t\n\n\t/**\n\t * The Jena Property for has__Continuous__State \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Continuous_State)</p>\n\t * <br>\n\t * Dublin Core Standard Properties <br>\n\t * \tdescription : This property associates a character-state instance with a state value on a continuous numeric scale.^^http://www.w3.org/2001/XMLSchema#string <br>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Continuous__StateProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Continuous_State\");\n\n\n\t/**\n\t * The Jena Property for belongs__to__Continuous__Character \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#belongs_to_Continuous_Character)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property belongs__to__Continuous__CharacterProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#belongs_to_Continuous_Character\");\n\n\n\t/**\n\t * The Jena Property for has__Annotation \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Annotation)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__AnnotationProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Annotation\");\n\n\n\t/**\n\t * The Jena Property for belongs__to \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#belongs_to)</p>\n\t * <br>\n\t * Dublin Core Standard Properties <br>\n\t * \tdescription : Generic property that links a concept to another concept it is a constituent of. The property is a synonym of part_of. <br>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property belongs__toProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#belongs_to\");\n\n\n\t/**\n\t * The Jena Property for has__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Support__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Support_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Support__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Support_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Float__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Float_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Float__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Float_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Int__Value \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Int_Value)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Int__ValueProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Int_Value\");\n\n\n\t/**\n\t * The Jena Property for has__Uncertainty__Factor \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Uncertainty_Factor)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__Uncertainty__FactorProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Uncertainty_Factor\");\n\n\n\t/**\n\t * The Jena Property for has__Precision \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_Precision)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__PrecisionProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_Precision\");\n\n\n\t/**\n\t * The Jena Property for has__External__Reference \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has_External_Reference)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property has__External__ReferenceProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has_External_Reference\");\n\n\n\t/**\n\t * The Jena Property for connects__to \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#connects_to)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property connects__toProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#connects_to\");\n\n\n\t/**\n\t * The Jena Property for has \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#has)</p>\n\t * <br>\n\t * Dublin Core Standard Properties <br>\n\t * \tdescription : Generic 'has' property. <br>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property hasProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#has\");\n\n\n\t/**\n\t * The Jena Property for part__of \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#part_of)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property part__ofProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#part_of\");\n\n\n\t/**\n\t * The Jena Property for precedes \n\t * <p>(URI: http://localhost/~vivek/cdao.owl#precedes)</p>\n\t * <br> \n\t */\n\tpublic static com.hp.hpl.jena.rdf.model.Property precedesProperty = ResourceFactory.createProperty(\"http://localhost/~vivek/cdao.owl#precedes\");\n\n\n\n\n\t/**\n\t * Get an Iterator the 'has__Continuous__State' property values. This Iteartor\n\t * may be used to remove all such values.\n\t * @return\t\t{@link java.util.Iterator} of {@link org.cdao.jastor.Continuous}\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic java.util.Iterator getHas__Continuous__State() throws com.ibm.adtech.jastor.JastorException;\n\n\t/**\n\t * Adds a value for the 'has__Continuous__State' property\n\t * @param\t\tThe {@link org.cdao.jastor.Continuous} to add\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic void addHas__Continuous__State(org.cdao.jastor.Continuous has__Continuous__State) throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Adds an anonymous value for the 'has__Continuous__State' property\n\t * @return\t\tThe anoymous {@link org.cdao.jastor.Continuous} created\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic org.cdao.jastor.Continuous addHas__Continuous__State() throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * \n\t * The resource argument have rdf:type http://localhost/~vivek/cdao.owl#Continuous. That is, this method\n\t * should not be used as a shortcut for creating new objects in the model.\n\t * @param\t\tThe {@link om.hp.hpl.jena.rdf.model.Resource} to add\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic org.cdao.jastor.Continuous addHas__Continuous__State(com.hp.hpl.jena.rdf.model.Resource resource) throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Removes a value for the 'has__Continuous__State' property. This method should not\n\t * be invoked while iterator through values. In that case, the remove() method of the Iterator\n\t * itself should be used.\n\t * @param\t\tThe {@link org.cdao.jastor.Continuous} to remove\n\t * @see\t\t\t#has__Continuous__StateProperty\n\t */\n\tpublic void removeHas__Continuous__State(org.cdao.jastor.Continuous has__Continuous__State) throws com.ibm.adtech.jastor.JastorException;\n\t\t\n\t/**\n\t * Gets the 'belongs__to__Continuous__Character' property value\n\t * @return\t\t{@link org.cdao.jastor.ContinuousCharacter}\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\n\tpublic org.cdao.jastor.ContinuousCharacter getBelongs__to__Continuous__Character() throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Sets the 'belongs__to__Continuous__Character' property value\n\t * @param\t\t{@link org.cdao.jastor.ContinuousCharacter}\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\n\tpublic void setBelongs__to__Continuous__Character(org.cdao.jastor.ContinuousCharacter belongs__to__Continuous__Character) throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Sets the 'belongs__to__Continuous__Character' property value to an anonymous node\n\t * @return\t\t{@link org.cdao.jastor.ContinuousCharacter}, the created value\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\t\n\tpublic org.cdao.jastor.ContinuousCharacter setBelongs__to__Continuous__Character() throws com.ibm.adtech.jastor.JastorException;\n\t\n\t/**\n\t * Sets the 'belongs__to__Continuous__Character' property value to the given resource\n\t * The resource argument should have rdf:type http://localhost/~vivek/cdao.owl#ContinuousCharacter. That is, this method\n\t * should not be used as a shortcut for creating new objects in the model.\n\t * @param\t\t{@link com.hp.hpl.jena.rdf.model.Resource} must not be be null.\n\t * @return\t\t{@link org.cdao.jastor.ContinuousCharacter}, the newly created value\n\t * @see\t\t\t#belongs__to__Continuous__CharacterProperty\n\t */\n\tpublic org.cdao.jastor.ContinuousCharacter setBelongs__to__Continuous__Character(com.hp.hpl.jena.rdf.model.Resource resource) throws com.ibm.adtech.jastor.JastorException;\n\t\n}", "SWRLRule getOWLRepresentation(RuleForPrinego rule);", "public static State addPropertyToState(Property property, State state, Domain domain) {\n\n\t\tboolean inverseProperty = false;\n\n\t\tint headIn = domain.addConstant(\"property\");\n\t\tTermList paramIn = TermList.NIL;\n\t\tif (property.getValue() != null && !property.getValue().equals(\"\")) {\n\t\t\tString value = property.getValue();\n if ((\"hasObjective\".equals(property.getName()) && \"concept\".equals(property.getMetadata().getType())) //||\n \t//(\"has\".equals(property.getName()) && \"learner\".equals(property.getMetadata().getType()))\n \t) {\n paramIn = new TermList(domain.getTermConstant(domain.addConstant(value)), paramIn);\n inverseProperty = true;\n } else {\n paramIn = new TermList(domain.getTermConstant(domain.addConstant(value)), paramIn);\n }\n\t\t}\n\t\tif (property.getResource()!=null) {\n\t\t\tparamIn = new TermList(domain.getTermConstant(domain.addConstant(property.getResource().getIdentifier())), paramIn);\n\t\t}\n\t\tparamIn = new TermList(domain.getTermConstant(domain.addConstant(property.getName())), paramIn);\n\t\tparamIn = new TermList(domain.getTermConstant(domain.addConstant(property.getMetadata().getIdentifier())), paramIn);\n\n\t\tCollection<Term> arguments = state.getArguments(headIn);\n\t\tif (!arguments.contains(paramIn)) {\n\t\t\tPredicate jShop2Property = new Predicate(headIn, 0, paramIn);\n\t\t\tstate.add(jShop2Property);\n\t\t\tif (inverseProperty){\n\t\t\t\tPredicate invjShop2Property = new Predicate(headIn, 0,\n\t\t\t\t\t\tnew TermList(domain.getTermConstant(domain.addConstant(property.getResource().getIdentifier())),\n\t\t\t\t\t\t\t\tnew TermList(domain.getTermConstant(domain.addConstant(\"inverseHasObjective\")),\n\t\t\t\t\t\t\t\t\t\tnew TermList(domain.getTermConstant(domain.addConstant(property.getMetadata().getIdentifier())), TermList.NIL))));\n\t\t\t\tstate.add(invjShop2Property);\n\t\t\t}\n\t\t}\n\n\t\tif (property.getResource()!=null) {\n\t\t\taddMetadataToState(property.getResource(), state, domain);\n\t\t}\n\n\t\treturn state;\n\t}", "@Override\r\n public Object visit(OWLEquivalentDataPropertiesAxiom axiom) {\n return super.visit(axiom);\r\n }", "public void testType() {\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tInteger).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tReal).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tPersonFQ).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(\"foo\"))).oclIsTypeOf(tOclString).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(true))).oclIsTypeOf(tBoolean).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tReal).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tInteger).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p2))).oclIsTypeOf(tCompany).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(false))).oclIsTypeOf(tAny).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0.0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tObject).not().isTrue() ); // differs\n }", "public interface Facility extends WrappedIndividual {\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#hasCFD\n */\n \n /**\n * Gets all property values for the hasCFD property.<p>\n * \n * @returns a collection of values for the hasCFD property.\n */\n Collection<? extends CFD> getHasCFD();\n\n /**\n * Checks if the class has a hasCFD property value.<p>\n * \n * @return true if there is a hasCFD property value.\n */\n boolean hasHasCFD();\n\n /**\n * Adds a hasCFD property value.<p>\n * \n * @param newHasCFD the hasCFD property value to be added\n */\n void addHasCFD(CFD newHasCFD);\n\n /**\n * Removes a hasCFD property value.<p>\n * \n * @param oldHasCFD the hasCFD property value to be removed.\n */\n void removeHasCFD(CFD oldHasCFD);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#hasEnergyCF\n */\n \n /**\n * Gets all property values for the hasEnergyCF property.<p>\n * \n * @returns a collection of values for the hasEnergyCF property.\n */\n Collection<? extends EnergyCF> getHasEnergyCF();\n\n /**\n * Checks if the class has a hasEnergyCF property value.<p>\n * \n * @return true if there is a hasEnergyCF property value.\n */\n boolean hasHasEnergyCF();\n\n /**\n * Adds a hasEnergyCF property value.<p>\n * \n * @param newHasEnergyCF the hasEnergyCF property value to be added\n */\n void addHasEnergyCF(EnergyCF newHasEnergyCF);\n\n /**\n * Removes a hasEnergyCF property value.<p>\n * \n * @param oldHasEnergyCF the hasEnergyCF property value to be removed.\n */\n void removeHasEnergyCF(EnergyCF oldHasEnergyCF);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/james/ontologies/2015/0/untitled-ontology-15#host\n */\n \n /**\n * Gets all property values for the host property.<p>\n * \n * @returns a collection of values for the host property.\n */\n Collection<? extends Service> getHost();\n\n /**\n * Checks if the class has a host property value.<p>\n * \n * @return true if there is a host property value.\n */\n boolean hasHost();\n\n /**\n * Adds a host property value.<p>\n * \n * @param newHost the host property value to be added\n */\n void addHost(Service newHost);\n\n /**\n * Removes a host property value.<p>\n * \n * @param oldHost the host property value to be removed.\n */\n void removeHost(Service oldHost);\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}", "@Test\n\tpublic void testInvariantsAndTheorems_06_partialTyping() throws Exception {\n\t\tIContextRoot con = createContext(\"ctx\");\n\t\taddCarrierSets(con, \"S1\");\n\t\n\t\tsaveRodinFileOf(con);\n\n\t\tITypeEnvironmentBuilder typeEnvironment = mTypeEnvironment(\"S1=ℙ(S1); V1=S1\",\n\t\t\t\tfactory);\n\t\t\n\t\tIMachineRoot mac = createMachine(\"mac\");\n\t\taddMachineSees(mac, \"ctx\");\n\t\taddVariables(mac, \"V1\");\n\t\taddInvariants(mac, \n\t\t\t\tmakeSList(\"I1\", \"I2\", \"I3\", \"I4\"), \n\t\t\t\tmakeSList(\"V1=V1\", \"V1∈S1\", \"V1∈{V1}\", \"S1 ⊆ {V1}\"),\n\t\t\t\tfalse, false, false, false);\n\t\taddInitialisation(mac, \"V1\");\n\t\n\t\tsaveRodinFileOf(mac);\n\t\t\n\t\trunBuilderCheck(marker(mac.getInvariants()[0], PREDICATE_ATTRIBUTE, 0,\n\t\t\t\t2, TypeUnknownError));\n\t\t\n\t\tISCMachineRoot file = mac.getSCMachineRoot();\n\t\t\n\t\tcontainsInvariants(file, typeEnvironment, \n\t\t\t\tmakeSList(\"I2\", \"I3\", \"I4\"), \n\t\t\t\tmakeSList(\"V1∈S1\", \"V1∈{V1}\", \"S1 ⊆ {V1}\"),\n\t\t\t\tfalse, false, false);\n\t}", "@Ignore\r\n @Test\r\n public void testSetType() {\r\n System.out.println(\"testSetType()\");\r\n Relation instance = new Relation(null, null);\r\n instance.setDirection(Relation.OUT);\r\n instance.setType(\"singer\");\r\n }", "@Test\n public void testOpenGraphAlternateObjectTypes() throws IOException, ExtractionException, RepositoryException {\n assertExtract(\"/html/rdfa/opengraph-music-song-object-type.html\");\n logger.debug(dumpHumanReadableTriples());\n\n Assert.assertEquals(9, getStatementsSize(null, null, null));\n final OGPMusic vOGPMusic = OGPMusic.getInstance();\n assertContains(baseIRI, vOGPMusic.musicDuration, RDFUtils.literal(\"447\"));\n assertContains(baseIRI, vOGPMusic.musicMusician,\n RDFUtils.literal(\"Jono Grant / Tony McGuinness / Ashley Tomberlin\"));\n assertContains(baseIRI, vOGPMusic.musicAlbum, RDFUtils.literal(\"Tri-State\"));\n }", "public interface SimpleRestriction extends SchemaComponent {\n public static final String ENUMERATION_PROPERTY = \"enumerations\";\n public static final String PATTERN_PROPERTY = \"patterns\";\n public static final String MIN_EXCLUSIVE_PROPERTY = \"minExclusives\";\n public static final String MIN_LENGTH_PROPERTY = \"minLengths\";\n public static final String MAX_LENGTH_PROPERTY = \"maxLengths\";\n public static final String FRACTION_DIGITS_PROPERTY = \"fractionDigits\";\n public static final String WHITESPACE_PROPERTY = \"whitespaces\";\n public static final String MAX_INCLUSIVE_PROPERTY = \"maxInclusives\";\n public static final String TOTAL_DIGITS_PROPERTY = \"totalDigits\";\n public static final String LENGTH_PROPERTY = \"lengths\";\n public static final String MIN_INCLUSIVE_PROPERTY = \"minInclusives\";\n public static final String MAX_EXCLUSIVE_PROPERTY = \"maxExclusives\";\n public static final String BASE_PROPERTY = \"base\";\n public static final String INLINETYPE_PROPERTY = \"inlinetype\";\n \n Collection<TotalDigits> getTotalDigits();\n void addTotalDigit(TotalDigits td);\n void removeTotalDigit(TotalDigits td);\n \n Collection<MinExclusive> getMinExclusives();\n void addMinExclusive(MinExclusive me);\n void removeMinExclusive(MinExclusive me);\n \n Collection<MinInclusive> getMinInclusives();\n void addMinInclusive(MinInclusive me);\n void removeMinInclusive(MinInclusive me);\n \n Collection<MinLength> getMinLengths();\n void addMinLength(MinLength ml);\n void removeMinLength(MinLength ml);\n \n Collection<MaxLength> getMaxLengths();\n void addMaxLength(MaxLength ml);\n void removeMaxLength(MaxLength ml);\n \n Collection<Pattern> getPatterns();\n void addPattern(Pattern p);\n void removePattern(Pattern p);\n \n Collection<MaxExclusive> getMaxExclusives();\n void addMaxExclusive(MaxExclusive me);\n void removeMaxExclusive(MaxExclusive me);\n \n Collection<MaxInclusive> getMaxInclusives();\n void addMaxInclusive(MaxInclusive me);\n void removeMaxInclusive(MaxInclusive me);\n \n Collection<Length> getLengths();\n void addLength(Length me);\n void removeLength(Length me);\n \n Collection<Whitespace> getWhitespaces();\n void addWhitespace(Whitespace me);\n void removeWhitespace(Whitespace me);\n \n Collection<FractionDigits> getFractionDigits();\n void addFractionDigits(FractionDigits fd);\n void removeFractionDigits(FractionDigits fd);\n \n Collection<Enumeration> getEnumerations();\n void addEnumeration(Enumeration fd);\n void removeEnumeration(Enumeration fd);\n \n LocalSimpleType getInlineType();\n void setInlineType(LocalSimpleType aSimpleType);\n \n}", "public static void verify(OWLOntology ont) throws OWLOntologyCreationException{\n OWLReasonerFactory reasonerFactory = new ElkReasonerFactory(); // with ELK reasoner\n\t\t\n\t\tLogManager.getLogger(\"org.semanticweb.elk\").setLevel(Level.OFF); // Level.ERROR\n\t\t//LogManager.getLogger(\"org.semanticweb.elk.reasoner.indexing\").setLevel(Level.ERROR);\n\t\t\n\t\t\n\t\tOWLReasoner reasoner = reasonerFactory.createReasoner(ont);\n\t\t\n\t\t\n\t\tboolean consistent = reasoner.isConsistent();\n\t\tSystem.out.println(\"\\n\\nOntology consistency : \" + consistent);\n\n\n\t\t/** Now print out any unsatisfiable classes*/\n\t\t//System.out.println(\"\\nUnsatisfiable classes : \");\n\t\tint i=0;\n\t\tfor (OWLClass cls : ont.getClassesInSignature()) {\n\t\t\tif (!reasoner.isSatisfiable(cls)) {\n\t\t\t\ti++;\n\t\t\t\t//System.out.println(i+\"/. \"+ cls.getIRI().getFragment());\n\t\t\t}\n\t\t}\n\n\n\t\t// Another method for extracting unsatisfiable classes\n\t\t/**\n\t\tSystem.out.println(\"\\nUnsatisfiable classes : \");\n\t\tint j=0;\n\t\tfor(OWLClass cls : reasoner.getUnsatisfiableClasses()){\n\t\t\tif(!insatis.isOWLNothing()){\n\t\t\t\tj++;\n\t\t\tSystem.out.println(j+ \"/. \"+ cls.getIRI().getFragment());\n\t\t\t}\n\t\t}\n\t\t */\n\n\n\t\t// Another method for extracting unsatisfiable classes\n\t\t/**\n\t\tSystem.out.println(\"\\nUnsatisfiable classes : \");\n\t\tNode<OWLClass> bottomNode = reasoner.getUnsatisfiableClasses();\n\t\t// This node contains owl:Nothing and all the classes that are\n\t\t// equivalent to owl:Nothing - i.e. the unsatisfiable classes. We just\n\t\t// want to print out the unsatisfiable classes excluding owl:Nothing,\n\t\t// and we can used a convenience method on the node to get these\n int k=0;\n\t\tfor (OWLClass cls : bottomNode.getEntitiesMinusBottom()) {\n\t\t\tk++;\n\t\t\tSystem.out.println(k+\"/. \"+ cls.getIRI().getFragment());\n\t\t}\n\t\t */\n\n\n\t\t//System.out.println(\"\\nOntology consistency : \" + consistent);\n\t\tSystem.out.println(\"Number of unsatisfiable classes : \" + i);\t\t\n\t\t\n\t\treasoner.dispose();\n\t}", "@rdf(FOAF.SPATIALTHING)\npublic interface SpatialThing extends Thing {\n}", "public interface MyOntologyService {\n\n OWLOntology readMyOntology(OWLOntologyManager ontManager, String owlFilePath);\n\n OWLNamedIndividual applyClassAssertionFromObject(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n Object obj,\n String indName);\n\n void applyObjectPropertyAssertion(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_obj,\n String objectPropertyName,\n OWLNamedIndividual ind_field_obj);\n\n OWLObjectPropertyAssertionAxiom getObjectPropertyAssertionAxiom(\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_subject,\n String propName,\n OWLNamedIndividual ind_object);\n\n void applyDataPropertyAssertion(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_obj,\n String dataPropertyName,\n Object data);\n\n OWLDataPropertyAssertionAxiom getDataPropertyAssertionAxiom(\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_subject,\n String propName,\n Object data);\n\n OWLObjectProperty getObjectProperty(\n String propName,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm);\n\n OWLDataProperty getDataProperty(\n String propName,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm);\n\n OWLNamedIndividual getNamedIndividual(\n String indName,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm);\n\n boolean isObjectPropEntailed(\n PelletReasoner reasoner,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_subject,\n String propName,\n OWLNamedIndividual ind_object);\n\n boolean isDataPropEntailed(\n PelletReasoner reasoner,\n OWLDataFactory dataFactory,\n PrefixOWLOntologyFormat pm,\n OWLNamedIndividual ind_subject,\n String propName,\n Object data);\n\n// void createRuleObjectForTest(\n// OWLOntologyManager ontManager,\n// OWLDataFactory factory,\n// OWLOntology myOntology,\n// PrefixOWLOntologyFormat pm\n// );\n\n // Dilara's method\n //This method is to use OWL API and create rule from our own Rule object.\n SWRLRule getOWLRepresentation(RuleForPrinego rule);\n\n RuleForPrinego SWRLtoRule(SWRLRule swl);\n\n List<SWRLRule> listRules(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm\n );\n\n boolean createRule(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n SWRLRule rule\n );\n\n boolean deleteRule(\n OWLOntologyManager ontManager,\n OWLDataFactory dataFactory,\n OWLOntology myOntology,\n PrefixOWLOntologyFormat pm,\n SWRLRule rule\n );\n\n}", "public void test_sf_937810() throws IllegalAccessException {\n Field[] specs = OntModelSpec.class.getDeclaredFields();\n \n for (int i = 0; i < specs.length; i++) {\n if (Modifier.isPublic( specs[i].getModifiers()) && \n Modifier.isStatic( specs[i].getModifiers()) &&\n specs[i].getType().equals( OntModelSpec.class )) {\n OntModelSpec s = (OntModelSpec) specs[i].get( null );\n assertNotNull( s.getDescription() );\n }\n }\n }", "@Test\n\tpublic void testPropertyIntegralType() {\n\t\tfinal Base base = context.mock(Base.class);\n\t\tcontext.checking(new PropertyEnabledExpectations() {\n\t\t\t{\n\t\t\t\tallowingProperty(base).isValid();\n\t\t\t\twill(returnValue(true));\n\t\t\t}\n\t\t});\n\n\t\tassertTrue(\"Initial value was not set\", base.isValid());\n\t\tbase.setValid(false);\n\t\tassertFalse(\"Value didn't change\", base.isValid());\n\t}", "@Property\n @Report(Reporting.GENERATED)\n public boolean broken_reverse_property(@ForAll List<?> original) {\n return Lists.reverse(original).equals(original);\n }", "public interface Institution extends WrappedIndividual {\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasAddress\n */\n \n /**\n * Gets all property values for the hasAddress property.<p>\n * \n * @returns a collection of values for the hasAddress property.\n */\n Collection<? extends String> getHasAddress();\n\n /**\n * Checks if the class has a hasAddress property value.<p>\n * \n * @return true if there is a hasAddress property value.\n */\n boolean hasHasAddress();\n\n /**\n * Adds a hasAddress property value.<p>\n * \n * @param newHasAddress the hasAddress property value to be added\n */\n void addHasAddress(String newHasAddress);\n\n /**\n * Removes a hasAddress property value.<p>\n * \n * @param oldHasAddress the hasAddress property value to be removed.\n */\n void removeHasAddress(String oldHasAddress);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasCity\n */\n \n /**\n * Gets all property values for the hasCity property.<p>\n * \n * @returns a collection of values for the hasCity property.\n */\n Collection<? extends String> getHasCity();\n\n /**\n * Checks if the class has a hasCity property value.<p>\n * \n * @return true if there is a hasCity property value.\n */\n boolean hasHasCity();\n\n /**\n * Adds a hasCity property value.<p>\n * \n * @param newHasCity the hasCity property value to be added\n */\n void addHasCity(String newHasCity);\n\n /**\n * Removes a hasCity property value.<p>\n * \n * @param oldHasCity the hasCity property value to be removed.\n */\n void removeHasCity(String oldHasCity);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasInstitutionHomePage\n */\n \n /**\n * Gets all property values for the hasInstitutionHomePage property.<p>\n * \n * @returns a collection of values for the hasInstitutionHomePage property.\n */\n Collection<? extends Object> getHasInstitutionHomePage();\n\n /**\n * Checks if the class has a hasInstitutionHomePage property value.<p>\n * \n * @return true if there is a hasInstitutionHomePage property value.\n */\n boolean hasHasInstitutionHomePage();\n\n /**\n * Adds a hasInstitutionHomePage property value.<p>\n * \n * @param newHasInstitutionHomePage the hasInstitutionHomePage property value to be added\n */\n void addHasInstitutionHomePage(Object newHasInstitutionHomePage);\n\n /**\n * Removes a hasInstitutionHomePage property value.<p>\n * \n * @param oldHasInstitutionHomePage the hasInstitutionHomePage property value to be removed.\n */\n void removeHasInstitutionHomePage(Object oldHasInstitutionHomePage);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasInstitutionName\n */\n \n /**\n * Gets all property values for the hasInstitutionName property.<p>\n * \n * @returns a collection of values for the hasInstitutionName property.\n */\n Collection<? extends String> getHasInstitutionName();\n\n /**\n * Checks if the class has a hasInstitutionName property value.<p>\n * \n * @return true if there is a hasInstitutionName property value.\n */\n boolean hasHasInstitutionName();\n\n /**\n * Adds a hasInstitutionName property value.<p>\n * \n * @param newHasInstitutionName the hasInstitutionName property value to be added\n */\n void addHasInstitutionName(String newHasInstitutionName);\n\n /**\n * Removes a hasInstitutionName property value.<p>\n * \n * @param oldHasInstitutionName the hasInstitutionName property value to be removed.\n */\n void removeHasInstitutionName(String oldHasInstitutionName);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasLatitude\n */\n \n /**\n * Gets all property values for the hasLatitude property.<p>\n * \n * @returns a collection of values for the hasLatitude property.\n */\n Collection<? extends Object> getHasLatitude();\n\n /**\n * Checks if the class has a hasLatitude property value.<p>\n * \n * @return true if there is a hasLatitude property value.\n */\n boolean hasHasLatitude();\n\n /**\n * Adds a hasLatitude property value.<p>\n * \n * @param newHasLatitude the hasLatitude property value to be added\n */\n void addHasLatitude(Object newHasLatitude);\n\n /**\n * Removes a hasLatitude property value.<p>\n * \n * @param oldHasLatitude the hasLatitude property value to be removed.\n */\n void removeHasLatitude(Object oldHasLatitude);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasLongitude\n */\n \n /**\n * Gets all property values for the hasLongitude property.<p>\n * \n * @returns a collection of values for the hasLongitude property.\n */\n Collection<? extends Object> getHasLongitude();\n\n /**\n * Checks if the class has a hasLongitude property value.<p>\n * \n * @return true if there is a hasLongitude property value.\n */\n boolean hasHasLongitude();\n\n /**\n * Adds a hasLongitude property value.<p>\n * \n * @param newHasLongitude the hasLongitude property value to be added\n */\n void addHasLongitude(Object newHasLongitude);\n\n /**\n * Removes a hasLongitude property value.<p>\n * \n * @param oldHasLongitude the hasLongitude property value to be removed.\n */\n void removeHasLongitude(Object oldHasLongitude);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasState\n */\n \n /**\n * Gets all property values for the hasState property.<p>\n * \n * @returns a collection of values for the hasState property.\n */\n Collection<? extends String> getHasState();\n\n /**\n * Checks if the class has a hasState property value.<p>\n * \n * @return true if there is a hasState property value.\n */\n boolean hasHasState();\n\n /**\n * Adds a hasState property value.<p>\n * \n * @param newHasState the hasState property value to be added\n */\n void addHasState(String newHasState);\n\n /**\n * Removes a hasState property value.<p>\n * \n * @param oldHasState the hasState property value to be removed.\n */\n void removeHasState(String oldHasState);\n\n\n\n /* ***************************************************\n * Property http://ontology.cybershare.utep.edu/RIM/rim.owl#hasZipCode\n */\n \n /**\n * Gets all property values for the hasZipCode property.<p>\n * \n * @returns a collection of values for the hasZipCode property.\n */\n Collection<? extends String> getHasZipCode();\n\n /**\n * Checks if the class has a hasZipCode property value.<p>\n * \n * @return true if there is a hasZipCode property value.\n */\n boolean hasHasZipCode();\n\n /**\n * Adds a hasZipCode property value.<p>\n * \n * @param newHasZipCode the hasZipCode property value to be added\n */\n void addHasZipCode(String newHasZipCode);\n\n /**\n * Removes a hasZipCode property value.<p>\n * \n * @param oldHasZipCode the hasZipCode property value to be removed.\n */\n void removeHasZipCode(String oldHasZipCode);\n\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}", "public interface ConceptualEntitySingletonInstance extends SingletonInstance {\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model unique=\"false\" required=\"true\"\n\t * @generated\n\t */\n\tConceptualEntity conceptualEntitySingletonClassifier();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model unique=\"false\"\n\t * annotation=\"http://www.eclipse.org/emf/2002/GenModel body='<%org.eclipse.emf.common.util.EList%><<%jpl.imce.oml.specification.ecore.ScalarDataPropertyValue%>> _scalarDataPropertyValues = this.getScalarDataPropertyValues();\\nfinal <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%jpl.imce.oml.specification.ecore.ScalarDataPropertyValue%>, <%java.lang.Boolean%>> _function = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%jpl.imce.oml.specification.ecore.ScalarDataPropertyValue%>, <%java.lang.Boolean%>>()\\n{\\n\\tpublic <%java.lang.Boolean%> apply(final <%jpl.imce.oml.specification.ecore.ScalarDataPropertyValue%> v)\\n\\t{\\n\\t\\tboolean _xblockexpression = false;\\n\\t\\t{\\n\\t\\t\\tfinal <%jpl.imce.oml.specification.ecore.DataRelationshipToScalar%> p = v.getScalarDataProperty();\\n\\t\\t\\tboolean _switchResult = false;\\n\\t\\t\\tboolean _matched = false;\\n\\t\\t\\tif (p instanceof <%jpl.imce.oml.specification.ecore.EntityScalarDataProperty%>)\\n\\t\\t\\t{\\n\\t\\t\\t\\t_matched=true;\\n\\t\\t\\t\\t_switchResult = ((<%jpl.imce.oml.specification.ecore.EntityScalarDataProperty%>)p).isIsIdentityCriteria();\\n\\t\\t\\t}\\n\\t\\t\\tif (!_matched)\\n\\t\\t\\t{\\n\\t\\t\\t\\t_switchResult = false;\\n\\t\\t\\t}\\n\\t\\t\\t_xblockexpression = _switchResult;\\n\\t\\t}\\n\\t\\treturn <%java.lang.Boolean%>.valueOf(_xblockexpression);\\n\\t}\\n};\\n<%java.lang.Iterable%><<%jpl.imce.oml.specification.ecore.ScalarDataPropertyValue%>> _filter = <%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%jpl.imce.oml.specification.ecore.ScalarDataPropertyValue%>>filter(_scalarDataPropertyValues, _function);\\nreturn <%org.eclipse.emf.common.util.ECollections%>.<<%jpl.imce.oml.specification.ecore.ScalarDataPropertyValue%>>asEList(((<%jpl.imce.oml.specification.ecore.ScalarDataPropertyValue%>[])org.eclipse.xtext.xbase.lib.Conversions.unwrapArray(_filter, <%jpl.imce.oml.specification.ecore.ScalarDataPropertyValue%>.class)));'\"\n\t * annotation=\"http://imce.jpl.nasa.gov/oml/Scala code='scalarDataPropertyValues.filter{ v =>\\n\\t v.scalarDataProperty match {\\n\\t case ep: EntityScalarDataProperty =>\\n\\t\\t ep.isIdentityCriteria\\n\\t case _ =>\\n\\t false\\n\\t }}'\"\n\t * annotation=\"http://imce.jpl.nasa.gov/oml/Collection kind='SortedSet'\"\n\t * @generated\n\t */\n\tEList<ScalarDataPropertyValue> identifyingScalarValues();\n\n\t/**\n\t * <!-- begin-user-doc -->\n\t * <!-- end-user-doc -->\n\t * @model unique=\"false\"\n\t * annotation=\"http://www.eclipse.org/emf/2002/GenModel body='<%org.eclipse.emf.common.util.EList%><<%jpl.imce.oml.specification.ecore.StructuredDataPropertyValue%>> _structuredDataPropertyValues = this.getStructuredDataPropertyValues();\\nfinal <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%jpl.imce.oml.specification.ecore.StructuredDataPropertyValue%>, <%java.lang.Boolean%>> _function = new <%org.eclipse.xtext.xbase.lib.Functions.Function1%><<%jpl.imce.oml.specification.ecore.StructuredDataPropertyValue%>, <%java.lang.Boolean%>>()\\n{\\n\\tpublic <%java.lang.Boolean%> apply(final <%jpl.imce.oml.specification.ecore.StructuredDataPropertyValue%> v)\\n\\t{\\n\\t\\tboolean _xblockexpression = false;\\n\\t\\t{\\n\\t\\t\\tfinal <%jpl.imce.oml.specification.ecore.DataRelationshipToStructure%> p = v.getStructuredDataProperty();\\n\\t\\t\\tboolean _switchResult = false;\\n\\t\\t\\tboolean _matched = false;\\n\\t\\t\\tif (p instanceof <%jpl.imce.oml.specification.ecore.EntityStructuredDataProperty%>)\\n\\t\\t\\t{\\n\\t\\t\\t\\t_matched=true;\\n\\t\\t\\t\\t_switchResult = ((<%jpl.imce.oml.specification.ecore.EntityStructuredDataProperty%>)p).isIsIdentityCriteria();\\n\\t\\t\\t}\\n\\t\\t\\tif (!_matched)\\n\\t\\t\\t{\\n\\t\\t\\t\\t_switchResult = false;\\n\\t\\t\\t}\\n\\t\\t\\t_xblockexpression = _switchResult;\\n\\t\\t}\\n\\t\\treturn <%java.lang.Boolean%>.valueOf(_xblockexpression);\\n\\t}\\n};\\n<%java.lang.Iterable%><<%jpl.imce.oml.specification.ecore.StructuredDataPropertyValue%>> _filter = <%org.eclipse.xtext.xbase.lib.IterableExtensions%>.<<%jpl.imce.oml.specification.ecore.StructuredDataPropertyValue%>>filter(_structuredDataPropertyValues, _function);\\nreturn <%org.eclipse.emf.common.util.ECollections%>.<<%jpl.imce.oml.specification.ecore.StructuredDataPropertyValue%>>asEList(((<%jpl.imce.oml.specification.ecore.StructuredDataPropertyValue%>[])org.eclipse.xtext.xbase.lib.Conversions.unwrapArray(_filter, <%jpl.imce.oml.specification.ecore.StructuredDataPropertyValue%>.class)));'\"\n\t * annotation=\"http://imce.jpl.nasa.gov/oml/Scala code='structuredDataPropertyValues.filter{ v =>\\n\\t v.structuredDataProperty match {\\n\\t case ep: EntityStructuredDataProperty =>\\n\\t\\t ep.isIdentityCriteria\\n\\t case _ =>\\n\\t false\\n\\t }}'\"\n\t * annotation=\"http://imce.jpl.nasa.gov/oml/Collection kind='SortedSet'\"\n\t * @generated\n\t */\n\tEList<StructuredDataPropertyValue> identifyingStructuredTuples();\n\n}", "void setNilObjectives();", "public interface CalPropertyAttrib extends IdentifyKingdomProp{\n /**\n * Give list of dominoes according to coordinates in one property for serving high level methods\n * @param coordsInProp coordinates in the property\n * @param dominoDistribution the mapping from coordinates to dominoes\n * @return list of relevant dominoes\n * @throws Exception null detection\n * @author AntonioShen\n */\n List<Domino> giveDominoesInProp(List<Integer[]> coordsInProp, HashMap<Integer[], Domino> dominoDistribution) throws Exception; //Test passed\n\n /**\n * Give terrain type of one property according to coordinates in one property for serving high level methods\n * @param coordsInProp coordinates in the property\n * @param terrainDistribution the mapping from coordinates to terrain types\n * @return the terrain type for the property\n * @throws Exception null detection\n * @author AntonioShen\n */\n TerrainType givePropType(List<Integer[]> coordsInProp, HashMap<Integer[], TerrainType> terrainDistribution) throws Exception; //Test passed\n\n /**\n * Give the property size for serving high level methods\n * @param coordsInProp list of coordinates in the property\n * @return size of the property\n * @throws Exception null detection\n * @author AntonioShen\n */\n int givePropSize(List<Integer[]> coordsInProp) throws Exception; //Test passed\n\n /**\n * Give the total number of crowns in one property for serving high level methods\n * @param coordsInProp list of coordinates in the property\n * @param crownsDistribution the mapping from coordinates to crown numbers\n * @return total number of crowns in the property\n * @throws Exception null detection\n * @author AntonioShen\n */\n int givePropCrownNum(List<Integer[]> coordsInProp, HashMap<Integer[], Integer> crownsDistribution) throws Exception; //Test passed\n\n /**\n * Give the score for one property for serving high level methods\n * @param propSize the size of the property\n * @param crownNum the total crown number of the property\n * @return the score for the property\n * @throws Exception null detection\n * @author AntonioShen\n */\n int givePropScore(int propSize, int crownNum) throws Exception; //Test passed\n\n /**\n * Give the number of properties in one kingdom according to list of lists of coordinates in one kingdom for serving high level methods\n * @param allPropCoords list of lists of coordinates in the kingdom\n * @return the number of properties in the kingdom\n * @throws Exception null detection\n * @author AntonioShen\n */\n int givePropNum(List<List<Integer[]>> allPropCoords) throws Exception;\n}", "public AnomaliesWrapper test2NF();", "@Test\n\tpublic void testCorporateTrainingOfPositiveCostValues() \n\t{\n\t\tTraining GetOrderValue = new CorporateTraining(15, \"Oracle\", 10000, 100); \t//upcasting\n\t\tassertEquals(1000000,GetOrderValue.getOrderValues(),0);\n\t}", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingNonPersistentFields() {\n }", "public boolean testModelordraughting(EIfcfillareastyle type) throws SdaiException;", "public void test_hk_05() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null);\n String ns = \"http://foo.bar/fu#\";\n OntClass a = ontModel.createClass(ns + \"A\");\n OntClass b = ontModel.createClass(ns + \"B\");\n \n int oldCount = getStatementCount(ontModel);\n \n RDFList members = ontModel.createList(new RDFNode[] { a, b });\n IntersectionClass intersectionClass = ontModel.createIntersectionClass(null, members);\n intersectionClass.remove();\n \n assertEquals(\"Before and after statement counts are different\", oldCount, getStatementCount(ontModel));\n }", "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 interface IFlexoOntologyConcept<TA extends TechnologyAdapter<TA>> extends IFlexoOntologyObject<TA> {\n\t/**\n\t * Ontology of Concept.\n\t * \n\t * @return\n\t */\n\tpublic IFlexoOntology<TA> getOntology();\n\n\t/**\n\t * Annotation upon Concept.\n\t * \n\t * @return\n\t */\n\tpublic List<? extends IFlexoOntologyAnnotation> getAnnotations();\n\n\t/**\n\t * Container of Concept.\n\t * \n\t * @return\n\t */\n\tpublic IFlexoOntologyConceptContainer<TA> getContainer();\n\n\t/**\n\t * Association with structural features for Concept.\n\t * \n\t * @return\n\t */\n\tpublic List<? extends IFlexoOntologyFeatureAssociation<TA>> getStructuralFeatureAssociations();\n\n\t/**\n\t * Association with behavioural features for Concept.\n\t * \n\t * @return\n\t */\n\tpublic List<? extends IFlexoOntologyFeatureAssociation<TA>> getBehaviouralFeatureAssociations();\n\n\t/**\n\t * \n\t * Is this a Super Concept of concept.\n\t * \n\t * @return\n\t */\n\tpublic boolean isSuperConceptOf(IFlexoOntologyConcept<TA> concept);\n\n\t/**\n\t * \n\t * Is this a Sub Concept of concept.\n\t * \n\t * @return\n\t */\n\tpublic boolean isSubConceptOf(IFlexoOntologyConcept<TA> concept);\n\n\t/**\n\t * Visitor access.\n\t * \n\t * @param visitor\n\t * @return\n\t * \n\t * @pattern visitor\n\t */\n\tpublic <T> T accept(IFlexoOntologyConceptVisitor<T> visitor);\n\n\t/**\n\t * This equals has a particular semantics (differs from {@link #equals(Object)} method) in the way that it returns true only and only if\n\t * compared objects are representing same concept regarding URI. This does not guarantee that both objects will respond the same way to\n\t * some methods.<br>\n\t * This method returns true if and only if objects are same, or if one of both object redefine the other one (with eventual many levels)\n\t * \n\t * @param o\n\t * @return\n\t */\n\tpublic boolean equalsToConcept(IFlexoOntologyConcept<TA> concept);\n\n\t/**\n\t * Return all properties accessible in the scope of this ontology object, where declared domain is this object\n\t * \n\t * @return\n\t */\n\n}", "public OWLProperty (String iri) {\n\t\tthis.classIRI = iri;\n//\t\tthis.domain = domain;\n//\t\tthis.range = range;\n\t}", "public interface OwlClass extends OwlResource {\n\tenum ALTERNATIVE {\n\t\tCLASS, ENUMERATED\n\t};\n\n\tenum MODALITY {\n\t\tCOMPLETE, PARTIAL\n\t};\n\n\tpublic ALTERNATIVE getAlternative();\n\n\tpublic OwlClassDescription[] getClassDescriptionArray();\n\n\tpublic OwlClassDescription[] getDisjointClassArray();\n\n\tpublic OwlClassDescription[] getEquivalentClassArray();\n\n\tpublic SemanticId[] getIndividualIdArray();\n\n\tpublic MODALITY getModality();\n\n\tpublic OwlClassDescription[] getSubClassOfArray();\n\n}", "public interface TaslyOrderLineQuantityData extends OrderLineQuantityData, PropertyAware\n{\n\t/**<i>Generated managed object type code constant.</i>*/\n\tString _TYPECODE = \"TaslyOrderLineQuantityData\";\n\t\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_CODE = new AttributeType<>(\"express_code\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> EXPRESS_ORDER_ID = new AttributeType<>(\"express_order_id\");\n\t/** <i>Generated constant</i> - Attribute key of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. */\n\tAttributeType<TaslyOrderLineQuantityData, String> REFUNDSTATUS = new AttributeType<>(\"refundstatus\");\n\n\t/** <i>Generated constant</i> - Index of <code>TaslyOrderLineQuantityData</code> type defined at extension <code>oms-tasly-ext-order</code>. */\n\tUniqueIndexSingle<TaslyOrderLineQuantityData, Long> UX_ORDERLINEQUANTITIES_OLQID = new UniqueIndexSingle<>(\"UX_orderLineQuantities_olqId\", TaslyOrderLineQuantityData.class);\n\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递运单号.\n\t * \n\t * @return the express_order_id\n\t */\n\[email protected](max=64)\n\tjava.lang.String getExpress_order_id();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 快递公司代码.\n\t * \n\t * @return the express_code\n\t */\n\[email protected](max=10)\n\tjava.lang.String getExpress_code();\n\t\n\t/**\n\t * <i>Generated method</i> - Getter of the <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>.\n\t * <p/>\n\t * 退款、退货状态.\n\t * \n\t * @return the refundstatus\n\t */\n\[email protected](max=128)\n\tjava.lang.String getRefundstatus();\n\t\n\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_order_id</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递运单号.\n\t *\n\t * @param value the express_order_id\n\t */\n\tvoid setExpress_order_id(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.express_code</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 快递公司代码.\n\t *\n\t * @param value the express_code\n\t */\n\tvoid setExpress_code(final java.lang.String value);\n\t\n\t/**\n\t * <i>Generated method</i> - Setter of <code>TaslyOrderLineQuantityData.refundstatus</code> attribute defined at extension <code>oms-tasly-ext-order</code>. \n\t * <p/>\n\t * 退款、退货状态.\n\t *\n\t * @param value the refundstatus\n\t */\n\tvoid setRefundstatus(final java.lang.String value);\n\t\n}", "@Test\n public void testOpenGraphStructuredProperties() throws IOException, ExtractionException, RepositoryException {\n assertExtract(\"/html/rdfa/opengraph-structured-properties.html\");\n logger.debug(dumpHumanReadableTriples());\n\n Assert.assertEquals(31, getStatementsSize(null, null, null));\n final OGP vOGP = OGP.getInstance();\n assertContains(baseIRI, vOGP.audio, RDFUtils.literal(\"http://example.com/sound.mp3\"));\n assertContains(baseIRI, vOGP.description, RDFUtils\n .literal(\"Sean Connery found fame and fortune as the suave, sophisticated British agent, James Bond.\"));\n assertContains(baseIRI, vOGP.determiner, RDFUtils.literal(\"the\"));\n assertContains(baseIRI, vOGP.locale, RDFUtils.literal(\"en_GB\"));\n assertContains(baseIRI, vOGP.localeAlternate, RDFUtils.literal(\"fr_FR\"));\n assertContains(baseIRI, vOGP.localeAlternate, RDFUtils.literal(\"es_ES\"));\n assertContains(baseIRI, vOGP.siteName, RDFUtils.literal(\"IMDb\"));\n assertContains(baseIRI, vOGP.video, RDFUtils.literal(\"http://example.com/bond/trailer.swf\"));\n }", "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 }", "public static void main(String[] args) throws Exception {\n\t\t\n\n BufferedReader reader = new BufferedReader(new FileReader(\"src/main/resources/example/ontologytemp.owl\"));\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"src/main/resources/example/test.owl\"));\n\t\t\n\t\t\n\t\t/*File owl = new File(\"/Users/user/Dropbox/Thesis/OntopCLIfiles/ontology5.owl\");\n File obda = new File(\"/Users/user/Dropbox/Thesis/OntopCLIfiles/ontology-conf.obda\");\n\t\tString baseUri = \"http://www.semanticweb.org/user/ontologies/\";\n\t\tString jdbcUrl = \"jdbc:mysql://localhost/conference10\";\n\t\tString jdbcUserName = \"root\";\n\t\tString jdbcPassword = \"root\";\n\t\tString jdbcDriverClass = \"com.mysql.jdbc.Driver\";\n\t\t\n\t\tDirectMappingBootstrapper dm = new DirectMappingBootstrapper(baseUri, jdbcUrl, jdbcUserName, jdbcPassword, jdbcDriverClass);\n\t\tOBDAModel model = dm.getModel();\n\t\tOWLOntology onto = dm.getOntology();\n\t\tModelIOManager mng = new ModelIOManager(model);\n\t\tmng.save(obda);\n onto.getOWLOntologyManager().saveOntology(onto,\n new FileDocumentTarget(owl));*/\n\t\t\n\t\t\n\t\t/*\n\t\tXFactoryBufferedImpl factory = new XFactoryBufferedImpl();\t\n\t\t\n\t\tXAttribute attr = factory.createAttributeLiteral(\"concept:name\", \"tracevalue\", null); // create attribute for trace\n\t\tXAttributeMap attrMapTrace = new XAttributeMapImpl(); // create a new map attribute\n\t\tattrMapTrace.put(\"concept:name\", attr);\t// put attribute to the map attribute\n\t\tXTrace xtrace = factory.createTrace(attrMapTrace); // create xtrace\n\t\t\n\t\tXAttributeMap attrMap = new XAttributeMapImpl(); // create a new map attribute\n\t\tattr = factory.createAttributeLiteral(\"key1\", \"value\", null); // create attribute\t\t\n\t\t//attr = factory.createAttributeLiteral(\"key2\", \"value\", null); // create attribute\n\t\tattrMap.put(\"key1\", attr); // put attribute to the map attribute\n\t\t//attrMap.put(\"key2\", attr);\n\t\tXEvent xevent = factory.createEvent(attrMap); // create xevent\n\t\txtrace.insertOrdered(xevent); // insert event in correct order in a trace\n\t\t\n\t\tattrMap = new XAttributeMapImpl(); // create a new map attribute\n\t\tattr = factory.createAttributeLiteral(\"key1\", \"value\", null); // create attribute\t\t\n\t\t//attr = factory.createAttributeLiteral(\"key2\", \"value\", null); // create attribute\n\t\tattrMap.put(\"key1\", attr); // put attribute to the map attribute\n\t\t//attrMap.put(\"key2\", attr);\n\t\tXEvent xevent2 = factory.createEvent(attrMap); // create xevent\n\t\t\n\t\tSystem.out.println(xtrace.contains(xevent2));\n\t\t*/\n\t}", "@Test\n public void testPutToInternal_BinaryDescriptionObject() {\n final var binaryUri = HTTP_BASE_URI + UUID.randomUUID();\n final var binaryDescUri = binaryUri + \"/\" + FCR_METADATA;\n final var descriptionId = FedoraId.create(idTranslator.toInternalId(binaryDescUri));\n final var rdf = \"@prefix dc: <\" + DC.getURI() + \"> .\" +\n \"@prefix dcterms: <\" + DCTerms.getURI() + \"> .\" +\n \"<\" + binaryUri + \"> dc:title 'fancy title' ;\" +\n \" dcterms:isPartOf <\" + binaryDescUri + \"> .\";\n final InputStream requestBodyStream = new ByteArrayInputStream(rdf.getBytes());\n final Resource binaryRes = ResourceFactory.createResource(descriptionId.getFullDescribedId());\n final var translated = httpRdfService.bodyToInternalModel(descriptionId, requestBodyStream, CONTENT_TYPE,\n idTranslator, false);\n assertTrue(translated.contains(binaryRes, DCTerms.isPartOf, binaryRes));\n assertTrue(translated.contains(binaryRes, DC.title, ResourceFactory.createPlainLiteral(\"fancy title\")));\n assertFalse(translated.listSubjects().filterKeep(a -> a.isURIResource() && a.hasURI(descriptionId.getFullId()))\n .hasNext());\n assertFalse(translated.listObjects()\n .filterKeep(a -> a.isURIResource() && a.asResource().getURI().equals(descriptionId.getFullId()))\n .hasNext());\n }", "@Test\n public void testAssertObjectChangedPropertyWithIgnoredType() {\n // setup\n final TierTwoTypeWithIgnoreProperty tierTwoTypeWithIgnoreProperty = new TierTwoTypeWithIgnoreProperty(\n new IgnoredType());\n final ChangedProperty<IgnoredType> jokerProperty = Property.change(TierTwoTypeWithIgnoreProperty.IGNORED_TYPE,\n new IgnoredType());\n\n // method\n assertObject(EMPTY_STRING, tierTwoTypeWithIgnoreProperty, jokerProperty);\n }", "void propertyViolated (Search search);", "private boolean isInNormalForm (OWLDescription cls_left, OWLDescription cls_right) throws OWLException\n\t{\n\t\tif (isConjunction(cls_left) && isPureConjunction(cls_right))\n\t\t\treturn true;\n\t\t\n\t\tif (isPureDisjunction(cls_left) && isConjunction(cls_right))\n\t\t\treturn true;\n\t\t\n\t\tif (isPureConjunction(cls_left) && isPureDisjunction(cls_right))\n\t\t\treturn true;\n\t\t\t\n\t\treturn false;\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 }", "public void test_hk_04() {\n OntModel m = ModelFactory.createOntologyModel();\n m.getDocumentManager().addAltEntry(\n \"http://jena.hpl.hp.com/testing/ontology/relativenames\",\n \"file:testing/ontology/relativenames.rdf\");\n \n m.read(\"http://jena.hpl.hp.com/testing/ontology/relativenames\");\n assertTrue(\n \"#A should be a class\",\n m.getResource(\"http://jena.hpl.hp.com/testing/ontology/relativenames#A\").canAs(OntClass.class));\n assertFalse(\n \"file: #A should not be a class\",\n m.getResource(\"file:testing/ontology/relativenames.rdf#A\").canAs(OntClass.class));\n }", "@Test\n public void testClaimOperPhysFlag() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setOperPhysFlagEnum,\n RdaFissClaim::getOperPhysFlag,\n FissPhysicianFlag.PHYSICIAN_FLAG_NO,\n \"N\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setOperPhysFlagUnrecognized,\n RdaFissClaim::getOperPhysFlag,\n RdaFissClaim.Fields.operPhysFlag,\n 1);\n }", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public interface SKOSNotationProperty extends SKOSDataProperty {\n}", "@PropertyGetter(role = IS_IMPLICIT)\n\tboolean isImplicit();", "@Test\n public void testExplicitDatatypeDeclaration() throws RepositoryException {\n assertExtract(\"/html/rdfa/xmlliteral-datatype-test.html\");\n logger.debug(dumpModelToTurtle());\n\n RepositoryResult<Statement> stmts = conn\n .getStatements(RDFUtils.iri(\"http://dbpedia.org/resource/Albert_Einstein\"), vFOAF.name, null, false);\n Assert.assertTrue(stmts.hasNext());\n Value obj = stmts.next().getObject();\n Assert.assertTrue(obj instanceof Literal);\n Literal lit = (Literal) obj;\n Assert.assertEquals(lit.getDatatype(), RDF.XMLLITERAL);\n Assert.assertEquals(lit.getLabel(),\n \"Albert <strong xmlns=\\\"http://www.w3.org/1999/xhtml\\\" \" + \"xmlns:foaf=\\\"http://xmlns.com/foaf/0.1/\\\" \"\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:xsd=\\\"http://www.w3.org/2001/XMLSchema#\\\">Einstein</strong>\");\n }", "@Test(description = \"positive test to change from multiple types to all types\")\n public void positiveTestChangeToTypeAll()\n throws Exception\n {\n new RelationshipData(this, \"Test\")\n .from().defData(\"type\", new TypeData(this, \"Test1\"))\n .from().defData(\"type\", new TypeData(this, \"Test2\"))\n .create();\n\n new RelationshipData(this, \"Test\")\n .from().defDataAll(\"type\")\n .update(\"\")\n .checkExport();\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFields() {\n }", "@Test\n public void testClaimAttendPhysFlag() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setAttendPhysFlagEnum,\n RdaFissClaim::getAttendPhysFlag,\n FissPhysicianFlag.PHYSICIAN_FLAG_NO,\n \"N\")\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissClaim.Builder::setAttendPhysFlagUnrecognized,\n RdaFissClaim::getAttendPhysFlag,\n RdaFissClaim.Fields.attendPhysFlag,\n 1);\n }", "EDataType getSusceptance();", "@Ignore\r\n @Test\r\n public void testSetDirection() {\r\n System.out.println(\"testSetDirection()\");\r\n Relation instance = new Relation(\"singer\");\r\n instance.setDirection(Relation.OUT);\r\n }", "@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 }", "@Test(expected = IllegalArgumentException.class)\n\tpublic void testVowlIndividual() throws IllegalArgumentException {\n\t GraphRequestModel requestModel = new GraphRequestModel(\"test\", \"reasoningFalse\", \"test\", \n\t \t\t\"test file contents\", \"vowl\", \"individual\", false);\n\t GraphRequestValidator.validateRequest(requestModel);\n\t}", "public interface Activity extends RUP_Core_Elements {\n\n /* ***************************************************\n * Property http://www.semanticweb.org/morningstar/ontologies/2019/9/untitled-ontology-9#hasRecommendation\n */\n \n /**\n * Gets all property values for the hasRecommendation property.<p>\n * \n * @returns a collection of values for the hasRecommendation property.\n */\n Collection<? extends PM_Learning_Material> getHasRecommendation();\n\n /**\n * Checks if the class has a hasRecommendation property value.<p>\n * \n * @return true if there is a hasRecommendation property value.\n */\n boolean hasHasRecommendation();\n\n /**\n * Adds a hasRecommendation property value.<p>\n * \n * @param newHasRecommendation the hasRecommendation property value to be added\n */\n void addHasRecommendation(PM_Learning_Material newHasRecommendation);\n\n /**\n * Removes a hasRecommendation property value.<p>\n * \n * @param oldHasRecommendation the hasRecommendation property value to be removed.\n */\n void removeHasRecommendation(PM_Learning_Material oldHasRecommendation);\n\n\n /* ***************************************************\n * Property http://www.semanticweb.org/morningstar/ontologies/2019/9/untitled-ontology-9#isPerformOf\n */\n \n /**\n * Gets all property values for the isPerformOf property.<p>\n * \n * @returns a collection of values for the isPerformOf property.\n */\n Collection<? extends Role> getIsPerformOf();\n\n /**\n * Checks if the class has a isPerformOf property value.<p>\n * \n * @return true if there is a isPerformOf property value.\n */\n boolean hasIsPerformOf();\n\n /**\n * Adds a isPerformOf property value.<p>\n * \n * @param newIsPerformOf the isPerformOf property value to be added\n */\n void addIsPerformOf(Role newIsPerformOf);\n\n /**\n * Removes a isPerformOf property value.<p>\n * \n * @param oldIsPerformOf the isPerformOf property value to be removed.\n */\n void removeIsPerformOf(Role oldIsPerformOf);\n\n\n /* ***************************************************\n * Common interfaces\n */\n\n OWLNamedIndividual getOwlIndividual();\n\n OWLOntology getOwlOntology();\n\n void delete();\n\n}", "@Test\n public void noReindexIfWeightPropertyAddedOrChanged() throws Exception {\n\n builder.indexRule(\"nt:base\").property(\"fooProp\");\n\n NodeState currentNodeState = builder.build();\n nodeBuilder = currentNodeState.builder();\n\n //Unset the reindex flag first because first build would have set it .\n nodeBuilder.setProperty(REINDEX_PROPERTY_NAME, false);\n builder = new LuceneIndexDefinitionBuilder(nodeBuilder);\n\n // Add the property weight to fooProp - this shouldn't cause reindex flag to set\n builder.indexRule(\"nt:base\").property(\"fooProp\").weight(10);\n\n currentNodeState = builder.build();\n\n assertFalse(currentNodeState.getBoolean(REINDEX_PROPERTY_NAME));\n assertTrue(currentNodeState.getBoolean(PROP_REFRESH_DEFN));\n\n nodeBuilder = currentNodeState.builder();\n nodeBuilder.removeProperty(PROP_REFRESH_DEFN);\n\n // Now change the value for weight on fooProp - this also shouldn't lead to setting of reindex flag\n builder = new LuceneIndexDefinitionBuilder(nodeBuilder);\n\n builder.indexRule(\"nt:base\").property(\"fooProp\").weight(20);\n currentNodeState = builder.build();\n assertFalse(currentNodeState.getBoolean(REINDEX_PROPERTY_NAME));\n assertTrue(currentNodeState.getBoolean(PROP_REFRESH_DEFN));\n\n //Now check for property delete use case\n nodeBuilder = currentNodeState.builder();\n nodeBuilder.removeProperty(PROP_REFRESH_DEFN);\n builder = new LuceneIndexDefinitionBuilder(nodeBuilder);\n builder.indexRule(\"nt:base\").property(\"fooProp\").getBuilderTree().removeProperty(PROP_WEIGHT);\n currentNodeState = builder.build();\n\n assertFalse(currentNodeState.getBoolean(REINDEX_PROPERTY_NAME));\n assertTrue(currentNodeState.getBoolean(PROP_REFRESH_DEFN));\n\n }", "boolean isFunctionalLinkProperty();", "BehavioralFeatureConcept createBehavioralFeatureConcept();", "@Test\n public void testInterimOff() {\n context = new MockServletContext();\n context.setInitParameter(ConfigService.MESHRDF_YEAR, \"2016\");\n context.setInitParameter(ConfigService.MESHRDF_INTERIM, \"false\");\n configService = new ConfigServiceImpl(context);\n\n ValidYears years = configService.getValidYears();\n\n assertThat(years.getCurrent(), equalTo(2016));\n assertThat(years.getInterim(), nullValue());\n }", "@Test(timeout = 4000)\n public void test25() throws Throwable {\n Attribute attribute0 = new Attribute((String) null, (String) null);\n LinkedList<Attribute> linkedList0 = new LinkedList<Attribute>();\n ArrayList<Attribute> arrayList0 = new ArrayList<Attribute>(linkedList0);\n arrayList0.add(attribute0);\n Instances instances0 = new Instances(\"date\", arrayList0, 0);\n Instances instances1 = new Instances(instances0);\n double[] doubleArray0 = new double[1];\n SparseInstance sparseInstance0 = new SparseInstance(1, doubleArray0);\n SparseInstance sparseInstance1 = new SparseInstance((Instance) sparseInstance0);\n instances0.add((Instance) sparseInstance1);\n Discretize discretize0 = new Discretize(\"@attribute\");\n assertFalse(discretize0.getMakeBinary());\n \n discretize0.setMakeBinary(true);\n assertTrue(discretize0.getMakeBinary());\n \n Discretize discretize1 = new Discretize();\n boolean boolean0 = discretize1.setInputFormat(instances1);\n assertFalse(boolean0);\n }", "public void testAssertionsRelsExt() throws Exception{\n pid = PID.getInstance(\"demo:foo\");\n\n String p, o;\n\n p = \"http://purl.org/dc/elements/1.1/title\";\n o = \"The God of Small Things\";\n triples.add(createTriple(pid, p, o, true, null));\n\n try {\n validateAndClear(\"RELS-EXT\");\n fail(\"RELS-EXT Dublin Core assertions not allowed\");\n } catch (ValidationException e) {\n }\n\n // specific model relationships are allowed\n o = \"urn:xyz\";\n p = Constants.MODEL.HAS_SERVICE.uri;\n triples.add(createTriple(pid, p, o, false, null));\n try {\n validateAndClear(\"RELS-EXT\");\n } catch (ValidationException e) {\n fail(\"RELS-EXT Model relationship \" + p + \" should be allowed\");\n }\n\n p = Constants.MODEL.IS_CONTRACTOR_OF.uri;\n triples.add(createTriple(pid, p, o, false, null));\n try {\n validateAndClear(\"RELS-EXT\");\n } catch (ValidationException e) {\n fail(\"RELS-EXT Model relationship \" + p + \" should be allowed\");\n }\n\n p = Constants.MODEL.HAS_MODEL.uri;\n triples.add(createTriple(pid, p, o, false, null));\n try {\n validateAndClear(\"RELS-EXT\");\n } catch (ValidationException e) {\n fail(\"RELS-EXT Model relationship \" + p + \" should be allowed\");\n }\n\n p = Constants.MODEL.IS_DEPLOYMENT_OF.uri;\n triples.add(createTriple(pid, p, o, false, null));\n try {\n validateAndClear(\"RELS-EXT\");\n } catch (ValidationException e) {\n fail(\"RELS-EXT Model relationship \" + p + \" should be allowed\");\n }\n\n\n }", "@Test\r\n public void test() {\r\n Random random = new Random(System.currentTimeMillis());\r\n Adouble val = Adouble.valueOf(10);\r\n validate(val);\r\n validateEqual(val, Adouble.valueOf(val.toDouble()));\r\n Adouble val2 = Adouble.valueOf(random.nextDouble());\r\n validate(val2);\r\n validateEqual(val2, Adouble.valueOf(val2.toDouble()));\r\n validateUnequal(val, val2);\r\n Alist list = new Alist().add(val);\r\n byte[] bytes = Aon.aonBytes(list);\r\n list = Aon.readAon(bytes).toList();\r\n validate(list.get(0));\r\n validateEqual(list.get(0), val);\r\n validateUnequal(list.get(0), val2);\r\n }", "public boolean testOperationtype(EIfcdoorstyle type) throws SdaiException;", "interface Literals {\n\t\t/**\n\t\t * The meta object literal for the '{@link gov.nasa.jpl.imce.oml.oti.provenance.impl.OML2OTIProvenanceImpl <em>OML2OTI Provenance</em>}' class.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see gov.nasa.jpl.imce.oml.oti.provenance.impl.OML2OTIProvenanceImpl\n\t\t * @see gov.nasa.jpl.imce.oml.oti.provenance.impl.ProvenancePackageImpl#getOML2OTIProvenance()\n\t\t * @generated\n\t\t */\n\t\tEClass OML2OTI_PROVENANCE = eINSTANCE.getOML2OTIProvenance();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Oml UUID</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute OML2OTI_PROVENANCE__OML_UUID = eINSTANCE.getOML2OTIProvenance_OmlUUID();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Oml IRI</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute OML2OTI_PROVENANCE__OML_IRI = eINSTANCE.getOML2OTIProvenance_OmlIRI();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Oti ID</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute OML2OTI_PROVENANCE__OTI_ID = eINSTANCE.getOML2OTIProvenance_OtiID();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Oti URL</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute OML2OTI_PROVENANCE__OTI_URL = eINSTANCE.getOML2OTIProvenance_OtiURL();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Oti UUID</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute OML2OTI_PROVENANCE__OTI_UUID = eINSTANCE.getOML2OTIProvenance_OtiUUID();\n\n\t\t/**\n\t\t * The meta object literal for the '<em><b>Explanation</b></em>' attribute feature.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @generated\n\t\t */\n\t\tEAttribute OML2OTI_PROVENANCE__EXPLANATION = eINSTANCE.getOML2OTIProvenance_Explanation();\n\n\t\t/**\n\t\t * The meta object literal for the '<em>UUID</em>' data type.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see java.lang.String\n\t\t * @see gov.nasa.jpl.imce.oml.oti.provenance.impl.ProvenancePackageImpl#getUUID()\n\t\t * @generated\n\t\t */\n\t\tEDataType UUID = eINSTANCE.getUUID();\n\n\t\t/**\n\t\t * The meta object literal for the '<em>OML IRI</em>' data type.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see java.lang.String\n\t\t * @see gov.nasa.jpl.imce.oml.oti.provenance.impl.ProvenancePackageImpl#getOML_IRI()\n\t\t * @generated\n\t\t */\n\t\tEDataType OML_IRI = eINSTANCE.getOML_IRI();\n\n\t\t/**\n\t\t * The meta object literal for the '<em>OTI TOOL SPECIFIC ID</em>' data type.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see java.lang.String\n\t\t * @see gov.nasa.jpl.imce.oml.oti.provenance.impl.ProvenancePackageImpl#getOTI_TOOL_SPECIFIC_ID()\n\t\t * @generated\n\t\t */\n\t\tEDataType OTI_TOOL_SPECIFIC_ID = eINSTANCE.getOTI_TOOL_SPECIFIC_ID();\n\n\t\t/**\n\t\t * The meta object literal for the '<em>OTI TOOL SPECIFIC UUID</em>' data type.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see java.lang.String\n\t\t * @see gov.nasa.jpl.imce.oml.oti.provenance.impl.ProvenancePackageImpl#getOTI_TOOL_SPECIFIC_UUID()\n\t\t * @generated\n\t\t */\n\t\tEDataType OTI_TOOL_SPECIFIC_UUID = eINSTANCE.getOTI_TOOL_SPECIFIC_UUID();\n\n\t\t/**\n\t\t * The meta object literal for the '<em>OTI TOOL SPECIFIC URL</em>' data type.\n\t\t * <!-- begin-user-doc -->\n\t\t * <!-- end-user-doc -->\n\t\t * @see java.lang.String\n\t\t * @see gov.nasa.jpl.imce.oml.oti.provenance.impl.ProvenancePackageImpl#getOTI_TOOL_SPECIFIC_URL()\n\t\t * @generated\n\t\t */\n\t\tEDataType OTI_TOOL_SPECIFIC_URL = eINSTANCE.getOTI_TOOL_SPECIFIC_URL();\n\n\t}", "@Test\n public void convertAFby() {\n DistEventType x = DistEventType.LocalEvent(\"x\", 0);\n DistEventType y = DistEventType.LocalEvent(\"y\", 0);\n\n TemporalInvariantSet synInvs = new TemporalInvariantSet();\n synInvs.add(new AlwaysFollowedInvariant(x, y, \"t\"));\n List<dynoptic.invariants.BinaryInvariant> dynInvs = DynopticMain\n .synInvsToDynInvs(synInvs);\n assertTrue(dynInvs.size() == 1);\n\n BinaryInvariant dInv = dynInvs.iterator().next();\n assertTrue(dInv instanceof AlwaysFollowedBy);\n assertTrue(dInv.getFirst().equals(x));\n assertTrue(dInv.getSecond().equals(y));\n }", "@Test(description = \"positive test to change from multiple types to all types\")\n public void positiveTestChangeToRelationshipAll()\n throws Exception\n {\n new RelationshipData(this, \"Test\")\n .from().defData(\"relationship\", new RelationshipData(this, \"Test1\"))\n .from().defData(\"relationship\", new RelationshipData(this, \"Test2\"))\n .create();\n\n new RelationshipData(this, \"Test\")\n .from().defDataAll(\"relationship\")\n .update(\"\")\n .checkExport();\n }", "public boolean equivalent(Explanation<OWLAxiom> e1, Explanation<OWLAxiom> e2) throws OWLOntologyCreationException {\n if (e1.equals(e2)) {\n return true;\n }\n\n // check if they have the same size, same entailment types, same numbers of axiom types\n IsoUtil pre = new IsoUtil();\n if (!pre.passesPretest(e1, e2)) {\n \t//System.out.println(\"NOT THE SAME!\");\n return false;\n }\n \n //check the current datatypes used in the justifications. If they don't match, reject this.\n HashSet<OWLDatatype> dataTypes1 = new HashSet<OWLDatatype>();\n HashSet<OWLDatatype> dataTypes2 = new HashSet<OWLDatatype>();\n \n for(OWLAxiom ax:e1.getAxioms())\n {\n \t for(OWLDatatype dt:ax.getDatatypesInSignature())\n {\n \tif(dt.isBuiltIn())\n \t{\n \t\tdataTypes1.add(dt);\n \t}\n }\n }\n for(OWLAxiom ax:e2.getAxioms())\n {\n \t for(OWLDatatype dt:ax.getDatatypesInSignature())\n {\n \tif(dt.isBuiltIn())\n \t{\n \t\tdataTypes2.add(dt);\n \t}\n }\n } \n \n if(!dataTypes1.equals(dataTypes2))\n {\n \treturn false;\n }\n \n //check to see if both justifications are both real or fake w.r.t. reasoner\n /**\n OWLOntologyManager ontoman = OWLManager.createOWLOntologyManager();\n Boolean E1ENT = null;\n OWLReasoner j1 = rf.createReasoner(ontoman.createOntology(e1.getAxioms()));\n\t\tE1ENT = j1.isEntailed(e1.getEntailment());\n\t\tj1.flush();\n\t\tOWLReasoner j2;\n\t Boolean E2ENT = null;\n\t j2 = rf.createReasoner(ontoman.createOntology(e2.getAxioms()));\n\t\tE2ENT = j2.isEntailed(e2.getEntailment());\n\t\tj2.flush();\n\t\tSystem.out.println(e1.getEntailment().toString() + \": \" + E1ENT + \" \" + e2.getEntailment().toString() + \": \" + E2ENT);\n\t\tSystem.out.println(!((E1ENT && E2ENT) || (!E1ENT && !E2ENT)));\n\t\tif(!((E1ENT && E2ENT) || (!E1ENT && !E2ENT))) {\n\t\tSystem.out.println(\"Entailment check failed\");\n\t return false;\t\n\t\t}\n\t\t**/\n\t\t// otherwise do the full check\t\n AxiomTreeBuilder atb = new AxiomTreeBuilder();\n\n AxiomTreeNode et1 = atb.generateAxiomTree(e1.getEntailment());\n AxiomTreeNode et2 = atb.generateAxiomTree(e2.getEntailment());\n AxiomTreeNode jt1 = atb.generateExplanationTree(e1);\n AxiomTreeNode jt2 = atb.generateExplanationTree(e2);\n \n //for(AxiomTreeMapping atm:getMappingCandidates(et1,et2))\n //{\n \t//atm.printMapping();\n //}\n \n List<AxiomTreeMapping> candidates = getMappingCandidates(jt1, jt2);\n //System.out.println(candidates.size());\n /**\n for(AxiomTreeMapping c : candidates) {\n \t System.out.println(c.getVarsForTarget());\n \t System.out.println(c.getVarsForSource());\n \t System.out.println(isCorrectMapping(e1, et1, jt1, c.getVarsForSource(), e2, et2, jt2, c.getVarsForTarget()));\n }\n **/\n \n \n for (AxiomTreeMapping c : candidates) {\n //System.out.println(\"\\n--------------- MAPPING ---------------\\n\");\n if (isCorrectMapping(e1, et1, jt1, c.getVarsForSource(), e2, et2, jt2, c.getVarsForTarget())) {\n //c.printMapping();\n //System.out.println(\"TRUE MAPPING:\");\n //System.out.println(c.getVarsForTarget());\n //System.out.println(c.getVarsForSource());\n \t return true;\n }\n }\n \n //for(AxiomTreeMapping atm:candidates)\n //{\n \t//atm.printMapping();\n //}\n return false;\n }", "public void testFields() {\n assertTrue( tInteger.name().isEqualTo(Ocl.getFor(\"Integer\")).isTrue() );\n assertTrue( tOclString.name().isEqualTo(Ocl.getFor(\"String\")).isTrue() );\n assertTrue( tPersonFQ.name().isEqualTo(Ocl.getFor(\"Person\")).isTrue() );\n Ocl.JAVA_CLASS_NAMES=true;\n assertTrue( tPerson1.name().isEqualTo(Ocl.getFor(\"tudresden.ocl.lib.test.Person\")).isTrue() );\n Ocl.JAVA_CLASS_NAMES=false;\n assertTrue( tPersonFQ.attributes().includes(Ocl.getFor(\"isUnemployed\")).isTrue() );\n assertTrue( tPerson1.attributes().includes(Ocl.getFor(\"employer\")).isTrue() );\n assertTrue( tPersonFQ.associationEnds().includes(Ocl.getFor(\"managedCompanies\")).isTrue() );\n assertTrue( tPersonFQ.associationEnds().includes(Ocl.getFor(\"isMarried\")).isTrue() );\n assertTrue( tPersonFQ.operations().includes(Ocl.getFor(\"managedCompanies\")).not().isTrue() );\n assertTrue( tPersonFQ.operations().includes(Ocl.getFor(\"firstName\")).not().isTrue() );\n assertTrue( tPersonFQ.operations().includes(Ocl.getFor(\"getFive\")).isTrue() );\n assertTrue( tInteger.operations().includes(Ocl.getFor(\"add\")).isTrue() );\n }", "@Test // DATAREST-1321\n\tvoid serializesNonStringLookupValues() throws Exception {\n\t\tPersistentProperty<?> property = persistentEntities.getRequiredPersistentEntity(PetOwner.class)\n\t\t\t\t.getRequiredPersistentProperty(\"home\");\n\t\twhen(associations.isLookupType(property)).thenReturn(true);\n\n\t\t// When a Pet is rendered\n\t\tPetOwner owner = new PetOwner();\n\t\towner.home = new Home();\n\n\t\tString result = mapper.writeValueAsString(owner);\n\n\t\t// The it appears as numeric value\n\t\tassertThat(JsonPath.parse(result).read(\"$.home\", Integer.class)) //\n\t\t\t\t.isEqualTo(41);\n\t}", "@Test(description = \"update interface with non type / relationship for existing interface \"\n + \"with all types / relationships\")\n public void updateNon4ExistingAllTypesRelationships()\n throws Exception\n {\n final DataCollection data = new DataCollection(this);\n final InterfaceData inter = data.getInterface(\"TestInterface\")\n .addAllRelationships()\n .addAllTypes();\n data.create();\n\n inter.removeRelationships()\n .removeTypes();\n this.update(inter);\n\n Assert.assertEquals(this.mql(\"print interface '\" + inter.getName() + \"' select type dump\"),\n \"\",\n \"check that no type is defined\");\n Assert.assertEquals(this.mql(\"print interface '\" + inter.getName() + \"' select relationship dump\"),\n \"\",\n \"check that no relationship is defined\");\n }", "public String getOntologyType(){\r\n\t\treturn null;\r\n\t}", "@Override\r\n public OntTestCase[] getTests() {\r\n return new OntTestCase[] {\r\n new OntTestCase( \"Individual.sameAs\", true, false, true, false ) {\r\n /** Note: 6/Nov/2003 - updated to use sameAs not sameIndividualAs, following changes to OWL spec */\r\n @Override\r\n public void ontTest( OntModel m ) throws Exception {\r\n Profile prof = m.getProfile();\r\n OntClass A = m.createClass( NS + \"A\" );\r\n Individual x = m.createIndividual( A );\r\n Individual y = m.createIndividual( A );\r\n Individual z = m.createIndividual( A );\r\n\r\n x.addSameAs( y );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n assertEquals( \"x should be the same as y\", y, x.getSameAs() );\r\n assertTrue( \"x should be the same as y\", x.isSameAs( y ) );\r\n\r\n x.addSameAs( z );\r\n assertEquals( \"Cardinality should be 2\", 2, x.getCardinality( prof.SAME_AS() ) );\r\n iteratorTest( x.listSameAs(), new Object[] {z,y} );\r\n\r\n x.setSameAs( z );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n assertEquals( \"x should be same indiv. as z\", z, x.getSameAs() );\r\n\r\n x.removeSameAs( y );\r\n assertEquals( \"Cardinality should be 1\", 1, x.getCardinality( prof.SAME_AS() ) );\r\n x.removeSameAs( z );\r\n assertEquals( \"Cardinality should be 0\", 0, x.getCardinality( prof.SAME_AS() ) );\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.hasOntClass\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n Individual x = m.createIndividual( A );\r\n\r\n assertTrue( x.hasOntClass( A ) );\r\n assertFalse( x.hasOntClass( B ) );\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.hasOntClass direct\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n A.addSubClass( B );\r\n\r\n Individual x = m.createIndividual( A );\r\n x.addRDFType( B );\r\n\r\n assertTrue( x.hasOntClass( A, false ) );\r\n assertTrue( x.hasOntClass( B, false ) );\r\n\r\n assertTrue( x.hasOntClass( A, false ) );\r\n assertTrue( x.hasOntClass( B, true ) );\r\n\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.hasOntClass string\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n\r\n Individual x = m.createIndividual( A );\r\n\r\n assertTrue( x.hasOntClass( NS + \"A\" ) );\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.getOntClass\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n Individual x = m.createIndividual( A );\r\n\r\n assertEquals( A, x.getOntClass() );\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.getOntClass direct\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n A.addSubClass( B );\r\n\r\n Individual x = m.createIndividual( A );\r\n x.addRDFType( B );\r\n\r\n // should never get A since it's not a direct class\r\n assertEquals( B, x.getOntClass( true ) );\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.listOntClasses\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n A.addSubClass( B );\r\n\r\n Individual x = m.createIndividual( A );\r\n x.addRDFType( B );\r\n\r\n iteratorTest( x.listOntClasses( false ), new Object[] {A,B} );\r\n\r\n // now check the return types\r\n for (Iterator<OntClass> i = x.listOntClasses( false ) ; i.hasNext(); ) {\r\n assertNotNull( i.next() );\r\n }\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.listOntClasses direct\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n A.addSubClass( B );\r\n\r\n Individual x = m.createIndividual( A );\r\n x.addRDFType( B );\r\n\r\n iteratorTest( x.listOntClasses( true ), new Object[] {B} );\r\n\r\n // now check the return types\r\n for (Iterator<OntClass> i = x.listOntClasses( true ) ; i.hasNext(); ) {\r\n assertNotNull( i.next() );\r\n }\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.addOntClass\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n A.addSubClass( B );\r\n\r\n Individual x = m.createIndividual( A );\r\n\r\n iteratorTest( x.listOntClasses( false ), new Object[] {A} );\r\n\r\n // add a class\r\n x.addOntClass( B );\r\n\r\n // test again\r\n iteratorTest( x.listOntClasses( false ), new Object[] {A,B} );\r\n for (Iterator<OntClass> i = x.listOntClasses( false ) ; i.hasNext(); ) {\r\n assertNotNull( i.next() );\r\n }\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.setOntClass\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n A.addSubClass( B );\r\n\r\n Individual x = m.createIndividual( A );\r\n\r\n iteratorTest( x.listOntClasses( false ), new Object[] {A} );\r\n\r\n // replace the class\r\n x.setOntClass( B );\r\n\r\n // test again\r\n iteratorTest( x.listOntClasses( false ), new Object[] {B} );\r\n for (Iterator<OntClass> i = x.listOntClasses( false ) ; i.hasNext(); ) {\r\n assertNotNull( i.next() );\r\n }\r\n }\r\n },\r\n\r\n new OntTestCase( \"Individual.removeOntClass\", true, true, true, true ) {\r\n @Override\r\n protected void ontTest( OntModel m ) throws Exception {\r\n OntClass A = m.createClass( NS + \"A\" );\r\n OntClass B = m.createClass( NS + \"B\" );\r\n\r\n Individual x = m.createIndividual( A );\r\n x.addOntClass( B );\r\n\r\n iteratorTest( x.listOntClasses( false ), new Object[] {A,B} );\r\n\r\n x.removeOntClass( A );\r\n iteratorTest( x.listOntClasses( false ), new Object[] {B} );\r\n\r\n x.removeOntClass( A );\r\n iteratorTest( x.listOntClasses( false ), new Object[] {B} );\r\n\r\n x.removeOntClass( B );\r\n iteratorTest( x.listOntClasses( false ), new Object[] {} );\r\n }\r\n },\r\n };\r\n }", "PropertyRealization createPropertyRealization();", "public void visit(OWLAnnotationInstance arg0) throws OWLException {\n\t\t\t\n\t\t}", "public interface Node extends WrappedIndividual {\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FEMSettingsPAK.owl#hasNodeSettings\r\n */\r\n \r\n /**\r\n * Gets all property values for the hasNodeSettings property.<p>\r\n * \r\n * @returns a collection of values for the hasNodeSettings property.\r\n */\r\n Collection<? extends NodeSettings> getHasNodeSettings();\r\n\r\n /**\r\n * Checks if the class has a hasNodeSettings property value.<p>\r\n * \r\n * @return true if there is a hasNodeSettings property value.\r\n */\r\n boolean hasHasNodeSettings();\r\n\r\n /**\r\n * Adds a hasNodeSettings property value.<p>\r\n * \r\n * @param newHasNodeSettings the hasNodeSettings property value to be added\r\n */\r\n void addHasNodeSettings(NodeSettings newHasNodeSettings);\r\n\r\n /**\r\n * Removes a hasNodeSettings property value.<p>\r\n * \r\n * @param oldHasNodeSettings the hasNodeSettings property value to be removed.\r\n */\r\n void removeHasNodeSettings(NodeSettings oldHasNodeSettings);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#isBoundaryNodeOf\r\n */\r\n \r\n /**\r\n * Gets all property values for the isBoundaryNodeOf property.<p>\r\n * \r\n * @returns a collection of values for the isBoundaryNodeOf property.\r\n */\r\n Collection<? extends Boundary> getIsBoundaryNodeOf();\r\n\r\n /**\r\n * Checks if the class has a isBoundaryNodeOf property value.<p>\r\n * \r\n * @return true if there is a isBoundaryNodeOf property value.\r\n */\r\n boolean hasIsBoundaryNodeOf();\r\n\r\n /**\r\n * Adds a isBoundaryNodeOf property value.<p>\r\n * \r\n * @param newIsBoundaryNodeOf the isBoundaryNodeOf property value to be added\r\n */\r\n void addIsBoundaryNodeOf(Boundary newIsBoundaryNodeOf);\r\n\r\n /**\r\n * Removes a isBoundaryNodeOf property value.<p>\r\n * \r\n * @param oldIsBoundaryNodeOf the isBoundaryNodeOf property value to be removed.\r\n */\r\n void removeIsBoundaryNodeOf(Boundary oldIsBoundaryNodeOf);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#isNodeOf\r\n */\r\n \r\n /**\r\n * Gets all property values for the isNodeOf property.<p>\r\n * \r\n * @returns a collection of values for the isNodeOf property.\r\n */\r\n Collection<? extends Subdomain> getIsNodeOf();\r\n\r\n /**\r\n * Checks if the class has a isNodeOf property value.<p>\r\n * \r\n * @return true if there is a isNodeOf property value.\r\n */\r\n boolean hasIsNodeOf();\r\n\r\n /**\r\n * Adds a isNodeOf property value.<p>\r\n * \r\n * @param newIsNodeOf the isNodeOf property value to be added\r\n */\r\n void addIsNodeOf(Subdomain newIsNodeOf);\r\n\r\n /**\r\n * Removes a isNodeOf property value.<p>\r\n * \r\n * @param oldIsNodeOf the isNodeOf property value to be removed.\r\n */\r\n void removeIsNodeOf(Subdomain oldIsNodeOf);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#isVertexOf\r\n */\r\n \r\n /**\r\n * Gets all property values for the isVertexOf property.<p>\r\n * \r\n * @returns a collection of values for the isVertexOf property.\r\n */\r\n Collection<? extends Subdomain_group> getIsVertexOf();\r\n\r\n /**\r\n * Checks if the class has a isVertexOf property value.<p>\r\n * \r\n * @return true if there is a isVertexOf property value.\r\n */\r\n boolean hasIsVertexOf();\r\n\r\n /**\r\n * Adds a isVertexOf property value.<p>\r\n * \r\n * @param newIsVertexOf the isVertexOf property value to be added\r\n */\r\n void addIsVertexOf(Subdomain_group newIsVertexOf);\r\n\r\n /**\r\n * Removes a isVertexOf property value.<p>\r\n * \r\n * @param oldIsVertexOf the isVertexOf property value to be removed.\r\n */\r\n void removeIsVertexOf(Subdomain_group oldIsVertexOf);\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#hasNodeID\r\n */\r\n \r\n /**\r\n * Gets all property values for the hasNodeID property.<p>\r\n * \r\n * @returns a collection of values for the hasNodeID property.\r\n */\r\n Collection<? extends Integer> getHasNodeID();\r\n\r\n /**\r\n * Checks if the class has a hasNodeID property value.<p>\r\n * \r\n * @return true if there is a hasNodeID property value.\r\n */\r\n boolean hasHasNodeID();\r\n\r\n /**\r\n * Adds a hasNodeID property value.<p>\r\n * \r\n * @param newHasNodeID the hasNodeID property value to be added\r\n */\r\n void addHasNodeID(Integer newHasNodeID);\r\n\r\n /**\r\n * Removes a hasNodeID property value.<p>\r\n * \r\n * @param oldHasNodeID the hasNodeID property value to be removed.\r\n */\r\n void removeHasNodeID(Integer oldHasNodeID);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#hasXCoordinate\r\n */\r\n \r\n /**\r\n * Gets all property values for the hasXCoordinate property.<p>\r\n * \r\n * @returns a collection of values for the hasXCoordinate property.\r\n */\r\n Collection<? extends Object> getHasXCoordinate();\r\n\r\n /**\r\n * Checks if the class has a hasXCoordinate property value.<p>\r\n * \r\n * @return true if there is a hasXCoordinate property value.\r\n */\r\n boolean hasHasXCoordinate();\r\n\r\n /**\r\n * Adds a hasXCoordinate property value.<p>\r\n * \r\n * @param newHasXCoordinate the hasXCoordinate property value to be added\r\n */\r\n void addHasXCoordinate(Object newHasXCoordinate);\r\n\r\n /**\r\n * Removes a hasXCoordinate property value.<p>\r\n * \r\n * @param oldHasXCoordinate the hasXCoordinate property value to be removed.\r\n */\r\n void removeHasXCoordinate(Object oldHasXCoordinate);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#hasYCoordinate\r\n */\r\n \r\n /**\r\n * Gets all property values for the hasYCoordinate property.<p>\r\n * \r\n * @returns a collection of values for the hasYCoordinate property.\r\n */\r\n Collection<? extends Object> getHasYCoordinate();\r\n\r\n /**\r\n * Checks if the class has a hasYCoordinate property value.<p>\r\n * \r\n * @return true if there is a hasYCoordinate property value.\r\n */\r\n boolean hasHasYCoordinate();\r\n\r\n /**\r\n * Adds a hasYCoordinate property value.<p>\r\n * \r\n * @param newHasYCoordinate the hasYCoordinate property value to be added\r\n */\r\n void addHasYCoordinate(Object newHasYCoordinate);\r\n\r\n /**\r\n * Removes a hasYCoordinate property value.<p>\r\n * \r\n * @param oldHasYCoordinate the hasYCoordinate property value to be removed.\r\n */\r\n void removeHasYCoordinate(Object oldHasYCoordinate);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#hasZCoordinate\r\n */\r\n \r\n /**\r\n * Gets all property values for the hasZCoordinate property.<p>\r\n * \r\n * @returns a collection of values for the hasZCoordinate property.\r\n */\r\n Collection<? extends Object> getHasZCoordinate();\r\n\r\n /**\r\n * Checks if the class has a hasZCoordinate property value.<p>\r\n * \r\n * @return true if there is a hasZCoordinate property value.\r\n */\r\n boolean hasHasZCoordinate();\r\n\r\n /**\r\n * Adds a hasZCoordinate property value.<p>\r\n * \r\n * @param newHasZCoordinate the hasZCoordinate property value to be added\r\n */\r\n void addHasZCoordinate(Object newHasZCoordinate);\r\n\r\n /**\r\n * Removes a hasZCoordinate property value.<p>\r\n * \r\n * @param oldHasZCoordinate the hasZCoordinate property value to be removed.\r\n */\r\n void removeHasZCoordinate(Object oldHasZCoordinate);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#isCentralNode\r\n */\r\n \r\n /**\r\n * Gets all property values for the isCentralNode property.<p>\r\n * \r\n * @returns a collection of values for the isCentralNode property.\r\n */\r\n Collection<? extends Boolean> getIsCentralNode();\r\n\r\n /**\r\n * Checks if the class has a isCentralNode property value.<p>\r\n * \r\n * @return true if there is a isCentralNode property value.\r\n */\r\n boolean hasIsCentralNode();\r\n\r\n /**\r\n * Adds a isCentralNode property value.<p>\r\n * \r\n * @param newIsCentralNode the isCentralNode property value to be added\r\n */\r\n void addIsCentralNode(Boolean newIsCentralNode);\r\n\r\n /**\r\n * Removes a isCentralNode property value.<p>\r\n * \r\n * @param oldIsCentralNode the isCentralNode property value to be removed.\r\n */\r\n void removeIsCentralNode(Boolean oldIsCentralNode);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Property http://www.sifemontologies.com/ontologies/FiniteElementModel.owl#isMidNode\r\n */\r\n \r\n /**\r\n * Gets all property values for the isMidNode property.<p>\r\n * \r\n * @returns a collection of values for the isMidNode property.\r\n */\r\n Collection<? extends Boolean> getIsMidNode();\r\n\r\n /**\r\n * Checks if the class has a isMidNode property value.<p>\r\n * \r\n * @return true if there is a isMidNode property value.\r\n */\r\n boolean hasIsMidNode();\r\n\r\n /**\r\n * Adds a isMidNode property value.<p>\r\n * \r\n * @param newIsMidNode the isMidNode property value to be added\r\n */\r\n void addIsMidNode(Boolean newIsMidNode);\r\n\r\n /**\r\n * Removes a isMidNode property value.<p>\r\n * \r\n * @param oldIsMidNode the isMidNode property value to be removed.\r\n */\r\n void removeIsMidNode(Boolean oldIsMidNode);\r\n\r\n\r\n\r\n /* ***************************************************\r\n * Common interfaces\r\n */\r\n\r\n OWLNamedIndividual getOwlIndividual();\r\n\r\n OWLOntology getOwlOntology();\r\n\r\n void delete();\r\n\r\n}", "public Main() {\r\n\t\t\t// TODO Auto-generated constructor stub\r\n\t OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM, null );\r\n\r\n\t // we have a local copy of the wine ontology\r\n/*\t m.getDocumentManager().addAltEntry( \"http://www.w3.org/2001/sw/WebOnt/guide-src/wine\",\r\n\t \"file:testing/reasoners/bugs/wine.owl\" );\r\n\t m.getDocumentManager().addAltEntry( \"http://www.w3.org/2001/sw/WebOnt/guide-src/food\",\r\n\t \"file:testing/reasoners/bugs/food.owl\" );*/\r\n\r\n//\t m.read( \"http://www.w3.org/2001/sw/WebOnt/guide-src/wine\" );\r\n\t m = loadOntModelFromOwlFile(\"C:\\\\Documents and Settings\\\\Administrador\\\\Escritorio\\\\Tesis\\\\Ontologias\\\\turismo2.owl\");\r\n\t ClassHierarchy classh = new ClassHierarchy();\r\n\t classh.showHierarchy2( System.out, m );\r\n\t classh.creoInd(m);\r\n\t classh.showHierarchy( System.out, m );\r\n\t\t}" ]
[ "0.7152424", "0.6365233", "0.6259501", "0.62567806", "0.6230997", "0.620028", "0.6153486", "0.611042", "0.60756814", "0.60049963", "0.59697455", "0.59568834", "0.5950737", "0.592484", "0.58430374", "0.5720488", "0.56007135", "0.5553939", "0.5547216", "0.55458117", "0.5522458", "0.55056375", "0.5467202", "0.54480004", "0.5444926", "0.5407883", "0.5396361", "0.5381292", "0.5367815", "0.53653467", "0.53595144", "0.53379714", "0.5331283", "0.5319689", "0.53160006", "0.53012943", "0.52874416", "0.52867675", "0.5266288", "0.52600026", "0.5256767", "0.52080595", "0.52036494", "0.51650405", "0.5148615", "0.51486003", "0.51477927", "0.51421374", "0.5116186", "0.510422", "0.50924873", "0.50808865", "0.5071307", "0.5064515", "0.50496674", "0.50234985", "0.5019002", "0.50157976", "0.50115114", "0.50100535", "0.50092715", "0.5002216", "0.49917522", "0.49791473", "0.4976899", "0.497037", "0.49628013", "0.49609956", "0.49607334", "0.49596158", "0.4954657", "0.49394011", "0.493835", "0.49228412", "0.49172807", "0.49171507", "0.4915435", "0.49097627", "0.49097443", "0.48922396", "0.48902786", "0.48864657", "0.48861304", "0.48821902", "0.4867854", "0.48662275", "0.48579034", "0.4854899", "0.48458314", "0.4844707", "0.4841623", "0.4840467", "0.4838123", "0.48372325", "0.48360342", "0.48339468", "0.4823126", "0.48209366", "0.48189294", "0.4815871" ]
0.80833876
0
Test case for SF bug 969475 the return value for getInverse() on an ObjectProperty should be an object property
public void test_sf_969475() { String SOURCE= "<?xml version='1.0'?>" + "<!DOCTYPE owl [" + " <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' >" + " <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#' >" + " <!ENTITY xsd 'http://www.w3.org/2001/XMLSchema#' >" + " <!ENTITY owl 'http://www.w3.org/2002/07/owl#' >" + " <!ENTITY dc 'http://purl.org/dc/elements/1.1/' >" + " <!ENTITY base 'http://jena.hpl.hp.com/test' >" + " ]>" + "<rdf:RDF xmlns:owl ='&owl;' xmlns:rdf='&rdf;' xmlns:rdfs='&rdfs;' xmlns:dc='&dc;' xmlns='&base;#' xml:base='&base;'>" + " <owl:ObjectProperty rdf:ID='p0'>" + " <owl:inverseOf>" + " <owl:ObjectProperty rdf:ID='q0' />" + " </owl:inverseOf>" + " </owl:ObjectProperty>" + " <owl:ObjectProperty rdf:ID='p1'>" + " <owl:inverseOf>" + " <owl:ObjectProperty rdf:ID='q1' />" + " </owl:inverseOf>" + " </owl:ObjectProperty>" + "</rdf:RDF>"; OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); m.read( new StringReader( SOURCE ), null ); ObjectProperty p0 = m.getObjectProperty( "http://jena.hpl.hp.com/test#p0"); Object invP0 = p0.getInverseOf(); assertEquals( m.getResource( "http://jena.hpl.hp.com/test#q0"), invP0 ); assertTrue( "Should be an ObjectProperty facet", invP0 instanceof ObjectProperty ); ObjectProperty q1 = m.getObjectProperty( "http://jena.hpl.hp.com/test#q1"); Object invQ1 = q1.getInverse(); assertEquals( m.getResource( "http://jena.hpl.hp.com/test#p1"), invQ1 ); assertTrue( "Should be an ObjectProperty facet", invQ1 instanceof ObjectProperty ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isInverseFunctionalLinkProperty();", "public String getInverseRelationshipName ();", "@Override\n\tpublic void visit(InverseExpression arg0) {\n\n\t}", "@Property\n @Report(Reporting.GENERATED)\n public boolean broken_reverse_property(@ForAll List<?> original) {\n return Lists.reverse(original).equals(original);\n }", "public void test_sf_948995() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM ); // OWL dl\n DatatypeProperty dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n boolean ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertTrue( \"Should have been a conversion exception\", ex );\n \n m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); // OWL full\n dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertFalse( \"Should not have been a conversion exception\", ex );\n }", "public ImmutableBiMap<V, K> inverse() {\n/* 246 */ ImmutableBiMap<V, K> result = this.inverse;\n/* 247 */ return (result == null) ? (this.inverse = new Inverse()) : result;\n/* */ }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingNullReferences() {\n }", "ReferenceProperty createReferenceProperty();", "@Test\n\tpublic void testRemoveViaSetLinkWithInverse() {\n\t\tAddress adr = new Address();\n\t\tadr.getType().setIdGenerator(new IdGeneratorNumeric());\n\t\tAssert.assertEquals(1, ((IdNumeric) adr.getId()).getNumber());\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tPerson jojo = new Person(\"\\\"Johannes\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tadr.addInhabitant(martin);\n\t\tadr.addInhabitant(jojo);\n\n\t\tCollection<Person> persons = new ArrayList<Person>();\n\t\tpersons.add(martin);\n\t\tadr.setInhabitants(persons);\n\n\t\tAssert.assertEquals(1, adr.getInhabitants().size());\n\t\tIterator<?> iter = adr.getInhabitants().iterator();\n\t\tAssert.assertSame(martin, iter.next());\n\t\tAssert.assertSame(adr, martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\n\t\tadr.setInhabitants(new ArrayList<Person>());\n\n\t\tAssert.assertEquals(0, adr.getInhabitants().size());\n\t\tAssert.assertNull(martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\n\t\tadr.setInhabitants(null);\n\n\t\tAssert.assertNull(adr.getInhabitants());\n\t\tAssert.assertNull(martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\t}", "@JSProperty(\"opposite\")\n boolean getOpposite();", "@Test\n\tpublic void testRemoveLinkWithInverse() {\n\t\tAddress adr = new Address();\n\t\tadr.getType().setIdGenerator(new IdGeneratorNumeric());\n\t\tAssert.assertEquals(1, ((IdNumeric) adr.getId()).getNumber());\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tPerson jojo = new Person(\"\\\"Johannes\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tadr.addInhabitant(martin);\n\t\tadr.addInhabitant(jojo);\n\n\t\tadr.removeInhabitant(jojo);\n\n\t\tAssert.assertEquals(1, adr.getInhabitants().size());\n\t\tIterator<?> iter = adr.getInhabitants().iterator();\n\t\tAssert.assertSame(martin, iter.next());\n\t\tAssert.assertSame(adr, martin.getAddress());\n\t\tAssert.assertNull(jojo.getAddress());\n\n\t\t// removing last link via remove link produces\n\t\t// an empty collection but no null value\n\t\tadr.removeInhabitant(martin);\n\n\t\tAssert.assertEquals(0, adr.getInhabitants().size());\n\t\tAssert.assertNull(jojo.getAddress());\n\t\tAssert.assertNull(martin.getAddress());\n\t}", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFields() {\n }", "public String getInverseRelationshipName ()\n\t{\n\t\treturn getRelationshipImpl().getInverseRelationshipName();\n\t}", "public Property<Boolean> independentProperty() {\n\t\tif (independentProperty == null) {\n\t\t\tindependentProperty = new SimpleObjectProperty<Boolean>(this, \"Independent\", false);\n\t\t}\n\t\treturn independentProperty;\n\t}", "@JSProperty(\"reversed\")\n boolean getReversed();", "@NullableDecl\n public K getInverse(@NullableDecl Object obj) {\n int findEntryByValue = findEntryByValue(obj);\n if (findEntryByValue == -1) {\n return null;\n }\n return this.keys[findEntryByValue];\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingObjectsThatAreAlreadyPersistent() {\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingNonPersistentFields() {\n }", "@Test\n public void testInversePrime() {\n final GaloisPrimeField field = new GaloisPrimeField(13);\n final GaloisElement element = field.element(9);\n final GaloisElement inverse = galoisInverse.invert(element);\n Assertions.assertEquals(BigInteger.valueOf(3), inverse.value());\n }", "public boolean isInversed() {\n return isinv != null && isinv.booleanValue();\n }", "@Test\n\tpublic void testSetValueMult1to1OverwriteInverse() {\n\n\t\t// set up\n\t\tPerson martin = new Person(\"\\\"Bl�mel\\\" \\\"Martin\\\" \\\"19641014\\\"\");\n\t\tPerson jojo = new Person(\"\\\"Bl�mel\\\" \\\"Johannes\\\" \\\"19641014\\\"\");\n\t\tTestUser user = new TestUser(\"admin\");\n\t\tuser.setPerson(jojo);\n\t\tAssert.assertSame(jojo, user.getPerson());\n\t\tAssert.assertSame(user, jojo.getUser());\n\t\tAssert.assertNull(martin.getUser());\n\n\t\t// test: relink martin to user (other way round)\n\t\tmartin.setUser(user);\n\t\tAssert.assertSame(martin, user.getPerson());\n\t\tAssert.assertSame(user, martin.getUser());\n\t\tAssert.assertNull(jojo.getUser());\n\t}", "public void testInverseValues()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkValues(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class,\r\n String.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }", "protected ValidationComponent createInverseMappingComponent (\n\t\tfinal RelationshipElement field)\n\t{\n\t\treturn new ValidationComponent ()\n\t\t{\n\t\t\tpublic void validate () throws ModelValidationException\n\t\t\t{\n\t\t\t\tModel model = getModel();\n\t\t\t\tRelationshipElement inverse = \n\t\t\t\t\tfield.getInverseRelationship(model);\n\n\t\t\t\tif ((inverse != null) && !isInverseMapping(field, inverse))\n\t\t\t\t{\n\t\t\t\t\tString fieldName = field.getName();\n\n\t\t\t\t\tthrow new ModelValidationException(\n\t\t\t\t\t\tmodel.getField(getClassName(), fieldName), \n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.inverse_mapping_mismatch\", //NOI18N\n\t\t\t\t\t\tnew Object[]{fieldName, inverse.getName()}));\n\t\t\t\t}\n\t\t\t}\n\t\t\tprivate boolean hasMappingRows (MappingRelationshipElement field2)\n\t\t\t{\n\t\t\t\tif (field2 != null)\n\t\t\t\t{\n\t\t\t\t\tArrayList columns = field2.getColumns();\n\t\t\t\t\t\n\t\t\t\t\treturn ((columns != null) && !columns.isEmpty());\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tprivate boolean isInverseMapping (RelationshipElement jdoField1,\n\t\t\t\tRelationshipElement jdoField2)\n\t\t\t{\n\t\t\t\tMappingRelationshipElement field1 = \n\t\t\t\t\tgetMappingRelationship(jdoField1);\n\t\t\t\tMappingRelationshipElement field2 = \n\t\t\t\t\tgetMappingRelationship(jdoField2);\n\t\t\t\tboolean field1HasMapping = hasMappingRows(field1);\n\t\t\t\tboolean field2HasMapping = hasMappingRows(field2);\n\n\t\t\t\t// if both have rows, they must be exact inverses\n\t\t\t\tif (field1HasMapping && field2HasMapping)\n\t\t\t\t{\n\t\t\t\t\tboolean field1IsJoin = isJoin(field1);\n\n\t\t\t\t\tif (field1IsJoin == isJoin(field2))\n\t\t\t\t\t{\n\t\t\t\t\t\tArrayList pairs1 = field1.getColumns();\n\t\t\t\t\t\tArrayList pairs2 = field2.getColumns();\n\n\t\t\t\t\t\treturn ((!field1IsJoin) ? isInverse(pairs1, pairs2) :\n\t\t\t\t\t\t\t(isInverse(pairs1, \n\t\t\t\t\t\t\tfield2.getAssociatedColumns()) && \n\t\t\t\t\t\t\tisInverse(field1.getAssociatedColumns(), pairs2)));\n\t\t\t\t\t}\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// if neither have rows that's fine\n\t\t\t\treturn (field1HasMapping == field2HasMapping);\n\t\t\t}\n\t\t\tprivate boolean isInverse (ArrayList pairs1, ArrayList pairs2)\n\t\t\t{\n\t\t\t\tint i, size1 = pairs1.size(), size2 = pairs2.size();\n\n\t\t\t\tif (size1 == size2)\n\t\t\t\t{\n\t\t\t\t\tfor (i = 0; i < size1; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tString nextPair = (String)pairs1.get(i);\n\t\t\t\t\t\tString inversePair = (String)pairs2.get(i);\n\t\t\t\t\t\tint semicolonIndex1 = nextPair.indexOf(';');\n\t\t\t\t\t\tint semicolonIndex2 = inversePair.indexOf(';');\n\n\t\t\t\t\t\tif (((semicolonIndex1 == -1) || (semicolonIndex2 == -1))\n\t\t\t\t\t\t\t|| (!nextPair.substring(0, semicolonIndex1).equals(\n\t\t\t\t\t\t\tinversePair.substring(semicolonIndex2 + 1)) || \n\t\t\t\t\t\t\t!nextPair.substring(semicolonIndex1 + 1).equals(\n\t\t\t\t\t\t\tinversePair.substring(0, semicolonIndex2))))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\t}", "PropertyReference createPropertyReference();", "public T caseProperty(Property object) {\r\n\t\treturn null;\r\n\t}", "public RMTransform getTransformInverse() { return getTransform().invert(); }", "public interface ElPropertyValue extends ElPropertyDeploy {\r\n\r\n /**\r\n * Return the Id values for the given bean value.\r\n */\r\n public Object[] getAssocOneIdValues(Object bean);\r\n\r\n /**\r\n * Return the Id expression string.\r\n * <p>\r\n * Typically used to produce id = ? expression strings.\r\n * </p>\r\n */\r\n public String getAssocOneIdExpr(String prefix, String operator);\r\n\r\n /**\r\n * Return the logical id value expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInValueExpr(int size);\r\n \r\n /**\r\n * Return the logical id in expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInExpr(String prefix);\r\n \r\n /**\r\n * Return true if this is an ManyToOne or OneToOne associated bean property.\r\n */\r\n public boolean isAssocId();\r\n\r\n /**\r\n * Return true if any path of this path contains a Associated One or Many.\r\n */\r\n public boolean isAssocProperty();\r\n\r\n /**\r\n * Return true if the property is encrypted via Java.\r\n */\r\n public boolean isLocalEncrypted();\r\n \r\n /**\r\n * Return true if the property is encrypted in the DB.\r\n */\r\n public boolean isDbEncrypted();\r\n\r\n /**\r\n * Return the deploy order for the property.\r\n */\r\n public int getDeployOrder();\r\n \r\n /**\r\n * Return the default StringParser for the scalar property.\r\n */\r\n public StringParser getStringParser();\r\n\r\n /**\r\n * Return the default StringFormatter for the scalar property.\r\n */\r\n public StringFormatter getStringFormatter();\r\n\r\n /**\r\n * Return true if the last type is \"DateTime capable\" - can support\r\n * {@link #parseDateTime(long)}.\r\n */\r\n public boolean isDateTimeCapable();\r\n\r\n /**\r\n * Return the underlying JDBC type or 0 if this is not a scalar type.\r\n */\r\n public int getJdbcType();\r\n \r\n /**\r\n * For DateTime capable scalar types convert the long systemTimeMillis into\r\n * an appropriate java time (Date,Timestamp,Time,Calendar, JODA type etc).\r\n */\r\n public Object parseDateTime(long systemTimeMillis);\r\n\r\n /**\r\n * Return the value from a given entity bean.\r\n */\r\n public Object elGetValue(Object bean);\r\n\r\n /**\r\n * Return the value ensuring objects prior to the top scalar property are\r\n * automatically populated.\r\n */\r\n public Object elGetReference(Object bean);\r\n\r\n /**\r\n * Set a value given a root level bean.\r\n * <p>\r\n * If populate then\r\n * </p>\r\n */\r\n public void elSetValue(Object bean, Object value, boolean populate, boolean reference);\r\n\r\n /**\r\n * Make the owning bean of this property a reference (as in not new/dirty).\r\n */\r\n public void elSetReference(Object bean);\r\n\r\n /**\r\n * Convert the value to the expected type.\r\n * <p>\r\n * Typically useful for converting strings to the appropriate number type\r\n * etc.\r\n * </p>\r\n */\r\n public Object elConvertType(Object value);\r\n}", "protected void addOppositePropertyDescriptor(Object object) {\n itemPropertyDescriptors.add\n (createItemPropertyDescriptor\n (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n getResourceLocator(),\n getString(\"_UI_Reference_opposite_feature\"),\n getString(\"_UI_PropertyDescriptor_description\", \"_UI_Reference_opposite_feature\", \"_UI_Reference_type\"),\n NoSQLSchemaPackage.Literals.REFERENCE__OPPOSITE,\n true,\n false,\n true,\n null,\n null,\n null));\n }", "public T caseReactionProperty(ReactionProperty object) {\r\n\t\treturn null;\r\n\t}", "PropertyRealization createPropertyRealization();", "protected ValidationComponent createInverseFieldComponent (\n\t\tfinal RelationshipElement field)\n\t{\n\t\treturn new ValidationComponent ()\n\t\t{\n\t\t\tpublic void validate () throws ModelValidationException\n\t\t\t{\n\t\t\t\tModel model = getModel();\n\t\t\t\tRelationshipElement inverse = \n\t\t\t\t\tfield.getInverseRelationship(model);\n\t\t\t\tRelationshipElement inverseInverse = ((inverse != null) ? \n\t\t\t\t\tinverse.getInverseRelationship(model) : null);\n\n\t\t\t\tif ((inverse != null) && \n\t\t\t\t\t(!field.equals(inverseInverse) || (inverseInverse == null)))\n\t\t\t\t{\n\t\t\t\t\tString fieldName = field.getName();\n\n\t\t\t\t\tthrow new ModelValidationException(\n\t\t\t\t\t\tmodel.getField(getClassName(), fieldName), \n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.inverse_field_invalid\", //NOI18N\n\t\t\t\t\t\tnew Object[]{fieldName, inverse.getName()}));\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}", "public T caseProperty(Property object) {\n\t\treturn null;\n\t}", "public T caseProperty(Property object) {\n\t\treturn null;\n\t}", "DefinedProperty graphChangeProperty( int propertyKey, Object value );", "@PropertyGetter(role = IS_IMPLICIT)\n\tboolean isImplicit();", "DefinedProperty relChangeProperty( long relId, int propertyKey, Object value );", "public final ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return complexPropertyExpression() {\n ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return retval = new ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxTree IDENTIFIER9 = null;\n ManchesterOWLSyntaxTree ENTITY_REFERENCE10 = null;\n ManchesterOWLSyntaxAutoComplete.complexPropertyExpression_return p = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:190:1:\n // ( ^( INVERSE_OBJECT_PROPERTY_EXPRESSION p=\n // complexPropertyExpression ) | ^(\n // INVERSE_OBJECT_PROPERTY_EXPRESSION IDENTIFIER ) | ^(\n // INVERSE_OBJECT_PROPERTY_EXPRESSION ENTITY_REFERENCE ) )\n int alt9 = 3;\n int LA9_0 = input.LA(1);\n if (LA9_0 == INVERSE_OBJECT_PROPERTY_EXPRESSION) {\n int LA9_1 = input.LA(2);\n if (LA9_1 == DOWN) {\n switch (input.LA(3)) {\n case IDENTIFIER: {\n alt9 = 2;\n }\n break;\n case ENTITY_REFERENCE: {\n alt9 = 3;\n }\n break;\n case INVERSE_OBJECT_PROPERTY_EXPRESSION: {\n alt9 = 1;\n }\n break;\n default:\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 9,\n 2, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 9, 1, input);\n throw nvae;\n }\n } else {\n if (state.backtracking > 0) {\n state.failed = true;\n return retval;\n }\n NoViableAltException nvae = new NoViableAltException(\"\", 9, 0, input);\n throw nvae;\n }\n switch (alt9) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:191:2:\n // ^( INVERSE_OBJECT_PROPERTY_EXPRESSION p=\n // complexPropertyExpression )\n {\n match(input, INVERSE_OBJECT_PROPERTY_EXPRESSION,\n FOLLOW_INVERSE_OBJECT_PROPERTY_EXPRESSION_in_complexPropertyExpression528);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_complexPropertyExpression_in_complexPropertyExpression534);\n p = complexPropertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start).setCompletions(p.node\n .getCompletions());\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:195:4:\n // ^( INVERSE_OBJECT_PROPERTY_EXPRESSION IDENTIFIER )\n {\n match(input, INVERSE_OBJECT_PROPERTY_EXPRESSION,\n FOLLOW_INVERSE_OBJECT_PROPERTY_EXPRESSION_in_complexPropertyExpression544);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n IDENTIFIER9 = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_complexPropertyExpression546);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable().match(\n IDENTIFIER9.getText()));\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:199:4:\n // ^( INVERSE_OBJECT_PROPERTY_EXPRESSION ENTITY_REFERENCE )\n {\n match(input, INVERSE_OBJECT_PROPERTY_EXPRESSION,\n FOLLOW_INVERSE_OBJECT_PROPERTY_EXPRESSION_in_complexPropertyExpression556);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n ENTITY_REFERENCE10 = (ManchesterOWLSyntaxTree) match(input,\n ENTITY_REFERENCE,\n FOLLOW_ENTITY_REFERENCE_in_complexPropertyExpression558);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(getSymbolTable().match(\n ENTITY_REFERENCE10.getText()));\n }\n }\n break;\n }\n if (state.backtracking == 1) {\n retval.node = (ManchesterOWLSyntaxTree) retval.start;\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "@NullableDecl\n public K removeInverse(@NullableDecl Object obj) {\n int smearedHash = Hashing.smearedHash(obj);\n int findEntryByValue = findEntryByValue(obj, smearedHash);\n if (findEntryByValue == -1) {\n return null;\n }\n K k = this.keys[findEntryByValue];\n removeEntryValueHashKnown(findEntryByValue, smearedHash);\n return k;\n }", "@Test\n public void testInverseStressPrime() {\n final GaloisPrimeField field = new GaloisPrimeField(15_485_863);\n final GaloisElement element = field.element(1_000_000);\n final GaloisElement inverse = galoisInverse.invert(element);\n Assertions.assertEquals(BigInteger.valueOf(2_540_812), inverse.value());\n }", "public boolean isAdditiveProperty() {\n\t\treturn false;\n\t}", "public interface Property {\n\n\t/**\n\t * <p>\n\t * Retrieves the name of the property.\n\t * </p>\n\t * \n\t * @return The property's name\n\t */\n\tPropertyName getName();\n\n\t/**\n\t * <p>\n\t * Adds the specified values to the statements of this property.\n\t * </p>\n\t * \n\t * @param value\n\t * The value to be added\n\t * @return A reference to the updated property\n\t */\n\tProperty addValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Adds the specified values to the statements of this property, after\n\t * removing all current values.\n\t * </p>\n\t * \n\t * @param value\n\t * The value to be added\n\t * @return A reference to the updated property\n\t */\n\tProperty clearAndAddValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Removes the specified value from the statements of this property.\n\t * <p>\n\t * \n\t * @param value\n\t * The value to be removed\n\t * @return A reference to the updated property\n\t */\n\tProperty removeValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Modifies a property statement changing its value.\n\t * </p>\n\t * \n\t * @param oldValue\n\t * The value that the property currently has\n\t * @param newValue\n\t * The new value that will replace the actual one\n\t * @return A reference to the updated property\n\t */\n\tProperty changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);\n\n\t/**\n\t * <p>\n\t * Lists all the values associated to this property.\n\t * </p>\n\t * \n\t * @return All values that this property has\n\t */\n\tPropertyValue<?, ?>[] values();\n\n\t/**\n\t * <p>\n\t * Check if the provided value is associated to this property.\n\t * </p>\n\t * \n\t * @param value\n\t * The value to be checked\n\t * @return True if associated, false otherwise\n\t */\n\tboolean hasValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Clones this entity.\n\t * </p>\n\t * \n\t * @return The clone entity\n\t */\n\tProperty clone();\n\n\t/**\n\t * <p>\n\t * Checks if this property extends the provided one.\n\t * </p>\n\t * \n\t * @param other\n\t * Another property to be checked against\n\t * @return True if extends, false otherwise\n\t */\n\tboolean isExtensionOf(Property other);\n\n\t/**\n\t * <p>\n\t * Pattern VISITOR.\n\t * </p>\n\t * \n\t * @param visitor\n\t * The visitor\n\t */\n\tvoid accept(LSAVisitor visitor);\n\n\t/**\n\t * <p>\n\t * Checks if the property is synthetic.\n\t * </p>\n\t * <p>\n\t * Synthetic Properties cannot be modified by a user agent.\n\t * </p>\n\t * \n\t * @return True if synthetic, false otherwise\n\t */\n\tboolean isSynthetic();\n}", "public boolean isIndependent() {\n\t\treturn independentProperty().getValue();\n\t}", "@JSProperty(\"opposite\")\n void setOpposite(boolean value);", "public TriggerAccess not () {\n if (inverse == null) {\n inverse = new TriggerNot(this);\n }\n \n return inverse;\n }", "@Test\n\tpublic void testPropertyInSuper() {\n\t\tfinal Valuable valuable = context.mock(Valuable.class);\n\t\tcontext.checking(new PropertyEnabledExpectations() {\n\t\t\t{\n\t\t\t\tallowingProperty(valuable).getId();\n\t\t\t\twill(returnValue(INITIAL));\n\t\t\t}\n\t\t});\n\n\t\tassertEquals(\"Initial value not set\", INITIAL, valuable.getId());\n\t}", "@Override\n\tProp getProp() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Type inverse() {\n\t\treturn Nothing.INSTANCE;\n\t}", "public void setInverseRelationship (RelationshipElement inverseRelationship,\n\t\tModel model) throws ModelException\n\t{\n\t\tRelationshipElement old = getInverseRelationship(model);\n\n\t\tif ((old != inverseRelationship) || ((inverseRelationship == null) && \n\t\t\t(getInverseRelationshipName() != null)))\n\t\t{\n\t\t\t// clear old inverse which still points to here\n\t\t\tif (old != null)\n\t\t\t{\n\t\t\t\tRelationshipElement oldInverse = \n\t\t\t\t\told.getInverseRelationship(model);\n\n\t\t\t\tif (this.equals(oldInverse))\n\t\t\t\t\told.changeInverseRelationship(null);\n\t\t\t}\n\n\t\t\t// link from here to new inverse\n\t\t\tchangeInverseRelationship(inverseRelationship);\n\n\t\t\t// link from new inverse back to here\n\t\t\tif (inverseRelationship != null)\n\t\t\t\tinverseRelationship.changeInverseRelationship(this);\n\t\t}\n\t}", "Edge inverse() {\n return bond.inverse().edge(u, v);\n }", "@Test\n\tpublic void getOppositeOrderNoOppositeTest() {\n\t\tOrder order = new Order(1, \"C1\", \"b\", \"A\", 10, 5);\n\t\tOrdersStorage storage = new OrdersStorage();\n\t\tstorage.addOrder(new Order(2, \"C1\", \"s\", \"A\", 10, 5));\n\t\tstorage.addOrder(new Order(3, \"C2\", \"b\", \"A\", 10, 5));\n\t\tstorage.addOrder(new Order(4, \"C2\", \"s\", \"B\", 10, 5));\n\t\tstorage.addOrder(new Order(5, \"C2\", \"s\", \"A\", 11, 5));\n\t\tstorage.addOrder(new Order(6, \"C2\", \"s\", \"A\", 10, 6));\n\t\tOrder opposite = ExchangeMain.getOppositeOrder(order, storage);\n\t\tAssert.assertNull(opposite);\n\t}", "public BooleanProperty getOverrideProperty() {\n return overrideProperty;\n }", "@Test\n public void testAssertObjectChangedPropertyWithIgnoredType() {\n // setup\n final TierTwoTypeWithIgnoreProperty tierTwoTypeWithIgnoreProperty = new TierTwoTypeWithIgnoreProperty(\n new IgnoredType());\n final ChangedProperty<IgnoredType> jokerProperty = Property.change(TierTwoTypeWithIgnoreProperty.IGNORED_TYPE,\n new IgnoredType());\n\n // method\n assertObject(EMPTY_STRING, tierTwoTypeWithIgnoreProperty, jokerProperty);\n }", "public static State addPropertyToState(Property property, State state, Domain domain) {\n\n\t\tboolean inverseProperty = false;\n\n\t\tint headIn = domain.addConstant(\"property\");\n\t\tTermList paramIn = TermList.NIL;\n\t\tif (property.getValue() != null && !property.getValue().equals(\"\")) {\n\t\t\tString value = property.getValue();\n if ((\"hasObjective\".equals(property.getName()) && \"concept\".equals(property.getMetadata().getType())) //||\n \t//(\"has\".equals(property.getName()) && \"learner\".equals(property.getMetadata().getType()))\n \t) {\n paramIn = new TermList(domain.getTermConstant(domain.addConstant(value)), paramIn);\n inverseProperty = true;\n } else {\n paramIn = new TermList(domain.getTermConstant(domain.addConstant(value)), paramIn);\n }\n\t\t}\n\t\tif (property.getResource()!=null) {\n\t\t\tparamIn = new TermList(domain.getTermConstant(domain.addConstant(property.getResource().getIdentifier())), paramIn);\n\t\t}\n\t\tparamIn = new TermList(domain.getTermConstant(domain.addConstant(property.getName())), paramIn);\n\t\tparamIn = new TermList(domain.getTermConstant(domain.addConstant(property.getMetadata().getIdentifier())), paramIn);\n\n\t\tCollection<Term> arguments = state.getArguments(headIn);\n\t\tif (!arguments.contains(paramIn)) {\n\t\t\tPredicate jShop2Property = new Predicate(headIn, 0, paramIn);\n\t\t\tstate.add(jShop2Property);\n\t\t\tif (inverseProperty){\n\t\t\t\tPredicate invjShop2Property = new Predicate(headIn, 0,\n\t\t\t\t\t\tnew TermList(domain.getTermConstant(domain.addConstant(property.getResource().getIdentifier())),\n\t\t\t\t\t\t\t\tnew TermList(domain.getTermConstant(domain.addConstant(\"inverseHasObjective\")),\n\t\t\t\t\t\t\t\t\t\tnew TermList(domain.getTermConstant(domain.addConstant(property.getMetadata().getIdentifier())), TermList.NIL))));\n\t\t\t\tstate.add(invjShop2Property);\n\t\t\t}\n\t\t}\n\n\t\tif (property.getResource()!=null) {\n\t\t\taddMetadataToState(property.getResource(), state, domain);\n\t\t}\n\n\t\treturn state;\n\t}", "ObjectProperty<Piece> getPieceProperty();", "public interface TLPropertyOwner extends NamedEntity, TLMemberFieldOwner {\n\n /**\n * Returns the value of the 'elements' field.\n * \n * @return List&lt;TLProperty&gt;\n */\n public List<TLProperty> getElements();\n\n /**\n * Returns the element with the specified name.\n * \n * @param elementName the name of the element to return\n * @return TLPropertyg\n */\n public TLProperty getElement(String elementName);\n\n /**\n * Adds a <code>TLProperty</code> element to the current list.\n * \n * @param element the element value to add\n */\n public void addElement(TLProperty element);\n\n /**\n * Adds a <code>TLProperty</code> element to the current list.\n * \n * @param index the index at which the given element should be added\n * @param element the element value to add\n * @throws IndexOutOfBoundsException thrown if the index is out of range (index &lt; 0 || index &gt; size())\n */\n public void addElement(int index, TLProperty element);\n\n /**\n * Removes the specified <code>TLProperty</code> from the current list.\n * \n * @param element the element value to remove\n */\n public void removeProperty(TLProperty element);\n\n /**\n * Moves this element up by one position in the list. If the element is not owned by this object or it is already at\n * the front of the list, this method has no effect.\n * \n * @param element the element to move\n */\n public void moveUp(TLProperty element);\n\n /**\n * Moves this element down by one position in the list. If the element is not owned by this object or it is already\n * at the end of the list, this method has no effect.\n * \n * @param element the element to move\n */\n public void moveDown(TLProperty element);\n\n /**\n * Sorts the list of elements using the comparator provided.\n * \n * @param comparator the comparator to use when sorting the list\n */\n public void sortElements(Comparator<TLProperty> comparator);\n\n}", "IGLProperty getParent();", "IGLProperty clone();", "@Test\n void testAssertPropertyReflectionEquals_null() {\n testObject.setStringProperty(null);\n assertPropertyReflectionEquals(\"stringProperty\", null, testObject);\n }", "public void testAssertPropertyReflectionEquals_null() {\r\n testObject.setStringProperty(null);\r\n assertPropertyReflectionEquals(\"stringProperty\", null, testObject);\r\n }", "public interface AEntityProperty {\n}", "@Override\n\t\t\tpublic Object getPropertyValue() {\n\t\t\t\treturn null;\n\t\t\t}", "public final MF enableSpeculativePropertyLookupOnObject() {\n \treturn addColumnProperty(ConstantPredicate.truePredicate(), SpeculativeObjectLookUpProperty.INSTANCE);\n\t}", "public void testInverseQueries()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkQuery(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class,\r\n rdbmsVendorID);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }", "public boolean isProperty();", "public ObjectProp getRelationship() {\n return relationship;\n }", "public boolean requiresPropertyOrdering()\n/* */ {\n/* 377 */ return false;\n/* */ }", "public Matrix inverse() {\n\t\tMatrix a = copy();\n\t\tif (a.M != a.N) {\n\t\t\tthrow new RuntimeException(\"This matrix is not square!\");\n\t\t}\n\t\tMatrix i = identity(a.N);\n\t\tMatrix ai = a.augment(i);\n\t\tai = ai.specialrref();\n\t\tMatrix[] split = ai.split(a.N);\n\t\tif (split[0].equals(i)) {\n\t\t\treturn split[1];\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"This matrix is not invertible!\");\n\t\t}\n\t}", "boolean hasProperty2();", "public void testInverseInheritance()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkValueInheritance(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class,\r\n HashMap2ItemChild.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2ItemChild.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }", "public boolean isPureFK() { // derived property\n return !_additionalFK && !_referrerAsOne;\n }", "@JSProperty(\"reversed\")\n void setReversed(boolean value);", "private void makeInverse() {\n if (_map != null) {\n for (Map.Entry<Integer, Integer> e : _map.entrySet()) {\n _inverse.put(e.getValue(), e.getKey());\n }\n }\n }", "public void testAssertPropertyReflectionEquals_notEqualsDifferentValues() {\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", \"xxxxxx\", testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "public Link inverse( final AbstractResource resource )\r\n {\r\n try\r\n {\r\n return new ProducedBy( TaskHelper.narrow( resource ) );\r\n }\r\n catch( Throwable e )\r\n {\r\n throw new SessionRuntimeException( \r\n \"Unexpected error occured while attempting to create an inverse link.\",\r\n e );\r\n }\r\n }", "public void testInverseRemoveItem()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkRemove(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }", "@Test\n public void testEdgeReverse() {\n Edge<Integer, String> target = new Edge<>(1, 2, \"hello\");\n Edge<Integer, String> reverse = target.reverse();\n assertNotNull(reverse);\n assertEquals(Integer.valueOf(2), reverse.getFrom());\n assertEquals(Integer.valueOf(1), reverse.getTo());\n }", "public T pseudoInverse() {\n T ret = createLike();\n ops.pseudoInverse(mat, ret.mat);\n return ret;\n }", "public T caseGetPropertyExpr(GetPropertyExpr object) {\n\t\treturn null;\n\t}", "@Test\n void testAssertPropertyReflectionEquals_equalsPrimitive() {\n assertPropertyReflectionEquals(\"primitiveProperty\", 1L, testObject);\n }", "@Override\n\tProp getp2() {\n\t\treturn null;\n\t}", "@Test\r\n @ConditionalIgnore(condition = IgnoreEqualsNotFire.class)\r\n public void testListValuedObjectPropertyChange() {\r\n ObservableList<String> list = createObservableList(true);\r\n ObjectProperty<ObservableList<String>> property = new SimpleObjectProperty<>(list);\r\n ChangeReport report = new ChangeReport(property);\r\n property.set(createObservableList(true));\r\n assertEquals(\"not supported: \\n list-valued objectProperty must fire on not-same list\", \r\n 1, report.getEventCount());\r\n }", "EReference getModelReference();", "public void testAssertPropertyReflectionEquals_equals() {\r\n assertPropertyReflectionEquals(\"stringProperty\", \"stringValue\", testObject);\r\n }", "public void testInverseKeySet()\r\n throws Exception\r\n {\r\n try\r\n {\r\n SCOMapTests.checkKeySet(pmf,\r\n HashMap2.class,\r\n HashMap2Item.class,\r\n String.class);\r\n }\r\n finally\r\n {\r\n clean(HashMap2.class);\r\n clean(HashMap2Item.class);\r\n }\r\n }", "public void invert() throws NoninvertibleTransform3DException {\r\n\t\tthis.set(getInverse());\r\n\t}", "public void verifyNoMatching(AcProperty e)\n {\n }", "Integer getMyProperty3() {return null;}", "@SuppressWarnings({ \"static-method\", \"nls\" })\n @Test\n public final void testGetProperty()\n {\n TestEasyPropertiesObject object = new TestEasyPropertiesObject();\n Assert.assertEquals(\"1.2.3\", object.getVersion());\n }", "@Test\n void testAssertPropertyReflectionEquals_equals() {\n assertPropertyReflectionEquals(\"stringProperty\", \"stringValue\", testObject);\n }", "public void testAssertPropertyReflectionEquals_equalsPrimitive() {\r\n assertPropertyReflectionEquals(\"primitiveProperty\", 1L, testObject);\r\n }", "public void updateProperty(Inspectable object, InspectableProperty property) {\n\n InspectorInterface inspector = null;\n Enumeration e = inspectors.elements();\n while (e.hasMoreElements()) {\n inspector = (InspectorInterface)e.nextElement();\n if (inspector.getInspectedObject()==object)\n inspector.updateProperty(property);\n }\n\n}", "@Test\n public void testAssertObjectNoGetMethodsType() {\n // setup\n final NoGetMethodsType noGetMethodsType = new NoGetMethodsType(TEST);\n final ChangedProperty<String> jokerProperty = Property.change(NoGetMethodsType.PROPERTY, TEST + TEST);\n\n // method\n assertObject(EMPTY_STRING, noGetMethodsType, jokerProperty);\n }", "@Test\r\n public void testOpposite() {\r\n System.out.println(\"opposite\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Object v2Element = 2;\r\n\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n Vertex v2 = instance.insertVertex(v2Element);\r\n\r\n Object edgeElement = \"A\";\r\n Edge e = instance.insertEdge(v1Element, v2Element, edgeElement);\r\n\r\n Vertex result = instance.opposite(v1, e);\r\n Vertex expectedResult = v2;\r\n assertEquals(expectedResult, result);\r\n\r\n result = instance.opposite(v2, e);\r\n expectedResult = v1;\r\n assertEquals(expectedResult, result);\r\n }", "EStructuralFeature getBoundProperty();", "public void inverse(Projection projection);", "@Test\n void testAssertPropertyReflectionEquals_notEqualsDifferentValues() {\n assertFailing(() ->\n assertPropertyReflectionEquals(\"stringProperty\", \"xxxxxx\", testObject)\n );\n }", "Object getPropertytrue();", "Value getEquivalentPropertyChainHead(int columnIndex);", "private DiffProperty() {\n\t\t// No implementation\n\t}", "@Test\n public void testGetObject() throws java.sql.SQLException {\n // Get the NaturalKey by using the key factory,\n // supplying the appropriate key attributes using\n // test accessor methods. \n com.poesys.db.pk.NaturalPrimaryKey key = \n (com.poesys.db.pk.NaturalPrimaryKey)org.tair.db.locusdetail.LocusdetailFactory.getLocusDetailPrimaryKey(getTestKeyLocusTairObjectId(0));\n assertTrue(\"No key generated from concrete implementation\", key != null);\n \n // Query the object.\n BsLocusDetail object = delegate.getObject(key);\n assertTrue(\"Couldn't get object\", object != null);\n \n // Testing lazy loading of annotation Collection property\n java.util.Collection<org.tair.bs.locusdetail.BsAnnotation> annotation = \n object.getAnnotation();\n assertTrue(\"annotation not lazily loaded\", annotation != null);\n \n // Testing lazy loading of references Collection property\n java.util.Collection<org.tair.bs.locusdetail.BsReference> references = \n object.getReferences();\n assertTrue(\"references not lazily loaded\", references != null);\n }" ]
[ "0.6503424", "0.59724087", "0.58382773", "0.57187545", "0.568958", "0.5520011", "0.55072695", "0.5475193", "0.5466565", "0.546624", "0.54431856", "0.5442426", "0.54395604", "0.5408262", "0.5407834", "0.53924775", "0.5379385", "0.5374767", "0.53687555", "0.53659046", "0.53485984", "0.5334713", "0.53313977", "0.5313486", "0.52777696", "0.52496725", "0.52230024", "0.5211696", "0.52099484", "0.51980966", "0.51742095", "0.51684725", "0.51684725", "0.51618546", "0.5148788", "0.5146452", "0.5145579", "0.5143879", "0.51308846", "0.51120806", "0.51019895", "0.50961125", "0.5082604", "0.5050204", "0.5048648", "0.50344235", "0.5034013", "0.50278026", "0.50249565", "0.5014777", "0.5004125", "0.5002124", "0.5000469", "0.49987423", "0.49864778", "0.49780327", "0.4959598", "0.49455616", "0.4941718", "0.4932638", "0.49321938", "0.49300653", "0.49185443", "0.4917603", "0.49014252", "0.48940518", "0.48914555", "0.48874757", "0.4886583", "0.4884966", "0.4884909", "0.48783356", "0.48715714", "0.4861085", "0.4856171", "0.4855884", "0.48472568", "0.48439127", "0.48379165", "0.48309505", "0.48214278", "0.48174992", "0.48141623", "0.48112735", "0.48110396", "0.4809508", "0.48076528", "0.48075274", "0.48005256", "0.4793959", "0.47933522", "0.479303", "0.47742966", "0.47724465", "0.47696373", "0.47645992", "0.47645733", "0.4764372", "0.4763679", "0.47569194" ]
0.6364157
1
Test case for SF bug 978259 missing supports() checks in OWL DL and Lite profiles
public void test_sf_978259() { OntModel md = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM ); OntModel ml = ModelFactory.createOntologyModel( OntModelSpec.OWL_LITE_MEM ); DataRange drd = md.createDataRange( md.createList( new Resource[] {OWL.Thing}) ); assertNotNull( drd ); HasValueRestriction hvrd = md.createHasValueRestriction( null, RDFS.seeAlso, OWL.Thing ); assertNotNull( hvrd ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void initUnSupportedFeatures();", "boolean supports(Object descriptor);", "@Test\n public void checkIfSupportedTest() {\n assertTrue(EngineController.checkIfSupported(\"getMaxRotateSpeed\"));\n assertTrue(EngineController.checkIfSupported(\"rotate 10 1\"));\n assertTrue(EngineController.checkIfSupported(\"orient\"));\n // check interface, that specific for engine\n assertTrue(EngineController.checkIfSupported(\"getMaxThrust\"));\n assertTrue(EngineController.checkIfSupported(\"getCurrentThrust\"));\n assertTrue(EngineController.checkIfSupported(\"setThrust 333\"));\n }", "boolean isFeatureSupported(String feature);", "boolean hasFeaturesUsed();", "public final void testSupports() {\r\n assertFalse(commandValidator.supports(sampleCommand.getClass()));\r\n assertTrue(commandValidator.supports(sampleValidatableCommand.getClass()));\r\n assertFalse(commandValidator.supports(this.getClass()));\r\n assertTrue(commandValidator.supports(sampleValidatable.getClass()));\r\n }", "@Test\n public void testDescSuportedContext() throws Throwable\n {\n testDescDeployment(\"supported\");\n }", "@Override\r\n\t\tpublic boolean isSupported(String feature, String version)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}", "@Test(timeout = 4000)\n public void test04() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n TechnicalInformation technicalInformation0 = lovinsStemmer0.getTechnicalInformation();\n assertFalse(technicalInformation0.hasAdditional());\n }", "protected abstract boolean isSupportedTestType(Properties prop);", "boolean hasCustomFeatures();", "private boolean isSupported(PlanGraphLiteral literal, int currentLevel) {\n\t\t\n\t\t/* check facts for support*/\n\t\tif (currentLevel > 0)\n\t\t\treturn facts.get(currentLevel).contains(literal);\n\t\t\n\t\t/* if currentLevel = 0, check if literal in initial conditions */\n\t\telse\n\t\t\treturn literal.getInitialLevel() == 0; \n\t}", "public boolean isOnlineLearningSupported();", "@SubL(source = \"cycl/kb-hl-supports.lisp\", position = 33298) \n public static final SubLObject create_sample_invalid_kb_hl_support() {\n return make_kb_hl_support(UNPROVIDED);\n }", "protected abstract boolean checkUnSupportedFeatures(TrafficSelector selector, TrafficTreatment treatment);", "public void test_sf_948995() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_DL_MEM ); // OWL dl\n DatatypeProperty dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n boolean ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertTrue( \"Should have been a conversion exception\", ex );\n \n m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM ); // OWL full\n dp = m.createDatatypeProperty( NS + \"dp\" );\n dp.addRDFType( OWL.InverseFunctionalProperty );\n \n ex = false;\n try {\n dp.as( InverseFunctionalProperty.class );\n }\n catch (ConversionException e) {\n ex = true;\n }\n assertFalse( \"Should not have been a conversion exception\", ex );\n }", "public boolean reasoningSupported() {\r\n return getReadyForUseCount() > 0;\r\n }", "@Test\n public void testFactsPreProcessorHasUnmatchedEnabledListEntry() {\n DroolsRulesServiceFactoryFromFile reader = buildDefaultReader();\n\n EngineConfigDTO engine = new EngineConfigDTO();\n List<String> enabledPreProcessors = new ArrayList<>();\n enabledPreProcessors.add(\"MISSING_PREPROCESSOR\");\n engine.setEnabledPreProcessors(enabledPreProcessors);\n\n List<IFactsPreProcessor> preProcessors = reader.configurePreProcessors(engine, new ArrayList<String>());\n assertEquals(0, preProcessors.size());\n }", "public static boolean isLearnable(IndustrySpecAPI spec)\n {\n return true;\n }", "public long getSupports();", "public boolean isSupported() {\n\t\treturn true;\r\n\t}", "public boolean isKnown();", "public boolean isSpecialization(FeatureModel featureModel) throws OperationNotSupportedException, FMReasoningException {\n\t\tthrow new OperationNotSupportedException(\"Reasoning Operation Not Supported\");\n\t}", "@Override\n public boolean isSupported() {\n return true;\n }", "boolean hasUnknown2();", "boolean hasUnknown2();", "boolean hasUnknown2();", "public boolean isExtension(FeatureModel featureModel) throws OperationNotSupportedException, FMReasoningException {\n\t\tthrow new OperationNotSupportedException(\"Reasoning Operation Not Supported\");\n\t}", "@Override\n public boolean isSupported() {\n return true;\n }", "@Test\n public void testFinalAlternatives() {\n assertTrue(beanManager.getBeans(AlphaAlternative.class).isEmpty());\n // EchoAlternative was removed from the list\n assertTrue(beanManager.getBeans(EchoAlternative.class).isEmpty());\n // CharlieAlternative was enabled\n assertEquals(1, beanManager.getBeans(CharlieAlternative.class).size());\n }", "public void test_sf_940570() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM_RDFS_INF );\n OntClass C = m.createClass( NS + \"C\" );\n Resource a = m.createResource( NS + \"a\", C );\n \n TestUtil.assertIteratorValues( this, m.listIndividuals(), new Object[] {a} );\n \n OntModel dm = ModelFactory.createOntologyModel( OntModelSpec.DAML_MEM_RULE_INF );\n OntClass D = dm.createClass( NS + \"D\" );\n Resource b = dm.createResource( NS + \"b\", D );\n \n TestUtil.assertIteratorValues( this, dm.listIndividuals(), new Object[] {b} );\n }", "public abstract boolean isUsable();", "@Test\n\tpublic void testLopLCSchemeFlavors() \n\t{\n\t\tString id = \"lcFlavors\";\n\t\tassertLCVolLopped(id);\n\t\tassertNoUnloppedLCVol1(id);\n\t\tassertNoUnloppedLCVol2(id);\n\t}", "@Test\n public void testSupports() {\n assertTrue(instance.supports(SpringRestService.class));\n // JAX-RS RestService class\n assertFalse(instance.supports(StandardRestService.class));\n // Default RestService class\n assertFalse(instance.supports(DefaultRestService.class));\n // No annotated RestService class\n assertFalse(instance.supports(RestService.class));\n // null\n assertFalse(instance.supports(null));\n }", "public void setSupports(long supports);", "public void testGetStereotypes() {\n assertEquals(\"Failed to get the stereotypes.\", 0, instance.getStereotypes(InterfaceImpl.class).size());\n }", "@Test\n public void testPermitUpgradeUberNew() {\n assertFalse(underTest.permitCmAndStackUpgrade(\"2.2.0\", \"3.2.0\"));\n\n assertFalse(underTest.permitExtensionUpgrade(\"2.2.0\", \"3.2.0\"));\n }", "@Override\n\tpublic void testCompatibility() {\n\t\tSystem.out.println(\"compatibility test success\");\n\t}", "int countTypedFeatures();", "@Test(timeout = 4000)\n public void test098() throws Throwable {\n boolean boolean0 = DBUtil.available(\"Y'\", \"org.databene.commons.condition.CompositeCondition\", \"relative\", \" connection(s)\");\n assertFalse(boolean0);\n }", "public void checkOdlOpenflowManufacturer2(String x) throws SnmpStatusException;", "@Override\r\n\tpublic boolean OC_supportSub()\r\n\t{\n\t\treturn false;\r\n\t}", "Boolean supportsMultipleExtensions();", "public boolean supports(DataModel model) {\n //this template simply returns true, replace as needed.\n return model.getData() instanceof NWBModel;\n }", "private boolean canAddSupport() {\n\n return uiStateManager.getState().equals(GameUIState.WAVE_IN_PROGRESS)\n || uiStateManager.getState().equals(GameUIState.STANDBY);\n }", "@Override\n\tpublic boolean identifiesOffense() {\n\t\treturn false;\n\t}", "boolean hasUnknown4();", "private void handleFeat() {\n sendMsgToClient(\"211-Extensions supported:\");\n sendMsgToClient(\"211 END\");\n }", "Feature getFeature();", "Feature getFeature();", "@Test @SpecAssertion(id = \"432-A2\", section=\"4.3.2\")\n public void testConversionComparedWithRate(){\n Assert.fail();\n }", "@Test\n\tpublic void testLopDeweySchemeFlavors() \n\t{\n\t\tString id = \"deweyFlavors\";\n\t\tassertDeweyVolLopped(id);\n\t\tassertNoUnloppedDeweyVol1(id);\n\t\tassertNoUnloppedDeweyVol2(id);\n\t}", "@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 }", "@Test\n public void illegalProfile() {\n Properties props = new Properties();\n props.setProperty(DeploymentDescriptorConfiguration.MODULE_NAME, \"com.alipay.dal\");\n\n props.setProperty(DeploymentDescriptorConfiguration.MODULE_PROFILE, \"!\");\n assertThatThrownBy(() -> sofaModuleProfileChecker.acceptModule(SampleDeploymentDescriptor.create(props)))\n .isInstanceOf(IllegalArgumentException.class).hasMessageContaining(\"01-13001\");\n\n props.setProperty(DeploymentDescriptorConfiguration.MODULE_PROFILE, \"!!\");\n assertThatThrownBy(() -> sofaModuleProfileChecker.acceptModule(SampleDeploymentDescriptor.create(props)))\n .isInstanceOf(IllegalArgumentException.class).hasMessageContaining(\"01-13002\");\n }", "public abstract boolean isStandard();", "@Test\n public void testDAM31901002() {\n // in this case, the boolean type is not supported by oracle db.\n // there is separate sql created to be executed for oracle database\n // however, the sql id that for oracle and other db are same.\n testDAM30802001();\n }", "public boolean isEnabled() {\n/* 945 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "private void updatingOptionalFeature(ArrayList<String>\tOnlyInLeft, ArrayList<String>\tOnlyInRight, Model splModel, Model newModel){\r\n//STEP 1 ---------------------------------------------------------------------------------------------\r\n\t\t//Feature optionalFeature = null;\t\t\r\n\t\t//New 02/12/201/\r\n\t\tFeature newModelOptionalFeature = null;\r\n\t\tFeature newVariant = null;\r\n\t\tConstraint constraint = null;\r\n\t\tnewVariant = new Feature(newModel.getId()+\"_Variant\", \"variant\", this.alternativeFeatureGroup.get(0).getId());\r\n\t\tthis.addVariant(newVariant);\r\n\t\t//-New 02/12/201/\r\n\t\t\r\n\t\tif(OnlyInLeft.size()==0){\r\n\t\t}else{\r\n\t\t\tnewModelOptionalFeature= new Feature(\"f\"+(this.optionalFeatures.size()+1) , \"optional\", this.getBase().getName(), OnlyInLeft);\r\n\t\t\tthis.optionalFeatures.add(newModelOptionalFeature);\r\n\t\t\t\r\n\t\t\t//New 02/12/201/\r\n\t\t\tfor(int i = 0; i < this.getVariants().getFeatures().size();i++){\r\n\t\t\t\tFeature variant = this.getVariants().getFeatures().get(i);\r\n\t\t\t\tif(variant==newVariant){\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconstraint = new Constraint(variant.getName(), \"\\u00AC\"+newModelOptionalFeature.getName());\r\n\t\t\t\t\t//addConstraint(constraint);\r\n\t\t\t\t}//if(variant==newVariant){\r\n\t\t\t\t\r\n\t\t\t}//for(int i = 0; i <this.getVariants().getFeatures().size();i++){\t\r\n\t\t\t//-New 02/12/201/\r\n\t\t\tconstraint = new Constraint(newVariant.getName(), newModelOptionalFeature.getName());\r\n\t\t\t//this.constraints.add(constraint);\r\n\t\t\taddConstraint(constraint);\r\n\t\t\t\r\n\t\t\t//System.out.println(\" *** \"+this.constraints.size());\r\n\t\t\t//System.out.println(\" ... \"+constraint.toString());\r\n\t\t\t\r\n\t\t}//if(OnlyInLeft.size()==0){\r\n\r\n//STEP 2 ---------------------------------------------------------------------------------------------\r\n\t\t\r\n\t\tFeature optionalFeature = null;\r\n\t\t\r\n\t\tArrayList<String> elts = MyString.intersection(OnlyInRight, this.getBase().getElements());\r\n\t\tif(elts.size()==0){\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tthis.getBase().setElements(MyString.minus(this.getBase().getElements(), elts));\r\n\t\t\toptionalFeature= new Feature(\"f\"+(this.optionalFeatures.size()+1) , \"optional\", this.getBase().getName(), elts);\r\n\t\t\tthis.optionalFeatures.add(optionalFeature);\r\n\t\t\t\r\n\t\t\t//OnlyInRight = MyString.minus(OnlyInRight, elts);\r\n\t\t\t\r\n\t\t\t//New 03/12/2018\r\n\t\t\t\r\n\t\t\tfor(int i = 0; i < this.getVariants().getFeatures().size();i++){\r\n\t\t\t\tFeature variant = this.getVariants().getFeatures().get(i);\r\n\t\t\t\tif(variant==newVariant){\r\n\t\t\t\t}else{\r\n\t\t\t\t\tconstraint = new Constraint(variant.getName(), optionalFeature.getName());\r\n\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\taddConstraint(constraint);\r\n\t\t\t\t}//if(variant==newVariant){\r\n\t\t\t}//for(int i = 0; i <this.getVariants().getFeatures().size();i++){\r\n\t\t\t\r\n\t\t\tconstraint = new Constraint(newVariant.getName(), \"\\u00AC\" + optionalFeature.getName());\r\n\t\t\t//this.constraints.add(constraint);\r\n\t\t\t//addConstraint(constraint);\r\n\t\t\t//-New 03/12/2018\r\n\t\t\t\r\n\t\t\t//New 03/12/2018\r\n\t\t\t//update parent feature of feature groups\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor(int i = 1; i < this.getAlternativeFeatureGroup().size(); i++){\r\n\t\t\t\tFeatureGroup fg = this.getAlternativeFeatureGroup().get(i);\r\n\t\t\t\t\r\n\t\t\t\tif(fg.getParent().equals(this.getBase().getName())){\r\n\t\t\t\t\t\r\n\t\t\t\t\tString elt = fg.getFeatures().get(0).getElements().get(0); \r\n\t\t\t\t\tString parentElt = splModel.getParent(splModel.getElement(elt)).getId();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(optionalFeature.contains(parentElt)){\r\n\t\t\t\t\t\t//System.out.println(\"%%%%%%%%%%%%% + \"+parentElt);\r\n\t\t\t\t\t\tfg.setParent(optionalFeature.getName());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}//for(int i = 1; i < this.getAlternativeFeatureGroup().size(); i++){\r\n\t\t\t\r\n\t\t\t//-New 03/12/2018\r\n\t\t}//if(elts.size()==0){\r\n\t\t\r\n//STEP 3 ---------------------------------------------------------------------------------------------\r\n\r\n\t\t\r\n\t\tint i = 0;\r\n\t\twhile( i<this.optionalFeatures.size()){ //New 03/12/02018\r\n\t\t\tFeature f = this.optionalFeatures.get(i);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tif(f==newModelOptionalFeature){\r\n\t\t\t}else{\r\n\t\t\t\telts = f.getElements();\r\n\t\t\t\tArrayList<String> elts1 = MyString.intersection(OnlyInRight, elts);\r\n\t\t\t\tif(elts1.size()==0 ){\r\n\t\t\t\t\t//SUP\r\n\t\t\t\t\t//New 03/12/02018\r\n\t\t\t\t\tconstraint = new Constraint(newVariant.getName(), f.getName());\r\n\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\taddConstraint(constraint);\r\n\t\t\t\t\t//-New 03/12/02018\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif( MyString.contains(OnlyInRight, elts) ){\r\n\t\t\t\t\t\t//New 03/12/02018\r\n\t\t\t\t\t\t//OnlyInRight = MyString.minus(OnlyInRight, elts); \r\n\t\t\t\t\t\tconstraint = new Constraint(newVariant.getName(), \"\\u00AC\"+f.getName());\r\n\t\t\t\t\t\t//addConstraint(constraint);\r\n\t\t\t\t\t\t//-New 03/12/02018\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\toptionalFeature= new Feature(\"f\"+(this.optionalFeatures.size()+1) , \"optional\", this.getBase().getName(), elts1);\r\n\t\t\t\t\t\tthis.optionalFeatures.add(optionalFeature);\r\n\t\t\t\t\t\tf.setElements(MyString.minus(elts, elts1));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//OnlyInRight = MyString.minus(OnlyInRight, elts1);\r\n\r\n\t\t\t\t\t\t//New 09-01-2019\r\n\t\t\t\t\t\t//OnlyInRight = elts; \r\n\t\t\t\t\t\t//--------New 09-01-2019\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfor(int j = 0; j < this.getVariants().getFeatures().size(); j++){\r\n\t\t\t\t\t\t\tFeature variant = this.getVariants().getFeatures().get(j);\r\n\t\t\t\t\t\t\tif(variant==newVariant){\r\n\t\t\t\t\t\t\t}else{ \r\n\t\t\t\t\t\t\t\tif(Constraint.contains(this.constraints, variant.getName(), f.getName(), \"implies\") ){\r\n\t\t\t\t\t\t\t\t\tconstraint = new Constraint(variant.getName(), optionalFeature.getName());\r\n\t\t\t\t\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\t\t\t\t\taddConstraint(constraint);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}//if(variant==newVariant){\r\n\t\t\t\t\t\t}//for(int j = 0; j < this.getVariants().getFeatures().size(); j++){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tconstraint = new Constraint(newVariant.getName(), \"\\u00AC\"+optionalFeature.getName());\r\n\t\t\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\t\t\t//addConstraint(constraint);\r\n\t\t\t\t\t\t\tconstraint = new Constraint(newVariant.getName(), f.getName());\r\n\t\t\t\t\t\t\t//this.constraints.add(constraint);\r\n\t\t\t\t\t\t\taddConstraint(constraint);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//-New 03/12/02018\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//New 03/12/2018\r\n\t\t\t\t\t\t\t//update parent feature of feature groups\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\t\r\n\t\t\t\t\t\t\tfor(int j = 1; j < this.getAlternativeFeatureGroup().size(); j++){\r\n\t\t\t\t\t\t\t\tFeatureGroup fg = this.getAlternativeFeatureGroup().get(j);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(fg.getParent().equals(f.getName())){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tString elt = fg.getFeatures().get(0).getElements().get(0); \r\n\t\t\t\t\t\t\t\t\tString parentElt = splModel.getParent(splModel.getElement(elt)).getId();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif(optionalFeature.contains(parentElt)){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tfg.setParent(optionalFeature.getName());\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}//for(int i = 1; i < this.getAlternativeFeatureGroup().size(); i++){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t//-New 03/12/2018\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}//if( MyString.contains(OnlyInRight, f.getElements()) ){\r\n\t\t\t\t}//if( elts1.size()==0 ){\r\n\t\t\t\r\n\t\t\t}//if(f==newModelOptionalFeature){ New 03/12/02018\r\n\t\t\ti++;\r\n\t\t}//while(){\r\n\t\t\r\n\t\r\n\t\t\r\n\t\tthis.updatingAlternativeFeatures(splModel, newModelOptionalFeature, newVariant, OnlyInRight, newModel);\r\n\t}", "private static boolean isFeatureConfigurationWrong(boolean isEnabledInDb, boolean isEnabledAccordingToAwcom) {\n\treturn (isEnabledInDb && !isEnabledAccordingToAwcom);\n }", "@Test\n public void testUpgradeSkill_02() {\n System.out.println(\"upgradeSkill\");\n SkillsList instance = new SkillsList();\n instance.upgradeSkill(\"Java\");\n int result = instance.size();\n assertTrue(result==0);\n }", "boolean has(String capability);", "public boolean getVoiceSearchEnabled() {\n/* 170 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public interface PerceptionConfigurationParametersReadOnly extends StoredPropertySetReadOnly\n{\n default int getL515ThrottlerFrequency()\n {\n return get(l515ThrottlerFrequency);\n }\n\n default int getOusterThrottlerFrequency()\n {\n return get(ousterThrottlerFrequency);\n }\n\n default int getOccupancyGridResolution()\n {\n return get(occupancyGridResolution);\n }\n\n default boolean getRapidRegionsEnabled()\n {\n return get(rapidRegionsEnabled);\n }\n\n default boolean getLoggingEnabled()\n {\n return get(loggingEnabled);\n }\n\n default boolean getPublishColor()\n {\n return get(publishColor);\n }\n\n default boolean getPublishDepth()\n {\n return get(publishDepth);\n }\n\n default boolean getLogColor()\n {\n return get(logColor);\n }\n\n default boolean getLogDepth()\n {\n return get(logDepth);\n }\n\n default boolean getSLAMEnabled()\n {\n return get(slamEnabled);\n }\n\n default boolean getSLAMReset()\n {\n return get(slamReset);\n }\n\n default boolean getSupportSquareEnabled()\n {\n return get(supportSquareEnabled);\n }\n\n default boolean getBoundingBoxFilter()\n {\n return get(boundingBoxFilter);\n }\n\n default boolean getConcaveHullFilters()\n {\n return get(concaveHullFilters);\n }\n\n default boolean getShadowFilter()\n {\n return get(shadowFilter);\n }\n\n default boolean getActiveMapping()\n {\n return get(activeMapping);\n }\n}", "boolean hasUnknown73();", "public void test_sf_934528() {\n OntModel m = ModelFactory.createOntologyModel( OntModelSpec.OWL_MEM );\n \n Resource r = (Resource) OWL.Thing.inModel( m );\n OntClass thingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( thingClass );\n \n r = (Resource) OWL.Nothing.inModel( m );\n OntClass nothingClass = (OntClass) r.as( OntClass.class );\n assertNotNull( nothingClass );\n }", "protected abstract boolean useReasoner();", "boolean hasUnknown71();", "private static final native boolean isSupported()/*-{\n\t\treturn !!(chrome.extension);\n\t}-*/;", "boolean hasUnknown12();", "@Test\n public void testCardCanPlay_WILD() {\n System.out.println(\"cardCanPlay WILD\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.WILD, UnoCardValue.ONE);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.THREE);\n UnoCardColour wildColour = UnoCardColour.BLUE;\n boolean result = utils.cardCanPlay(cardSelection, drawCard, wildColour);\n assertEquals(true, result);\n }", "@Test\n public void testAnnoSuportedContext() throws Throwable\n {\n testAnnoDeployment(SupportedContextResourceAdapter.class);\n }", "public boolean librarianTested() \n {\n return false; \n }", "@Test\n public void testListExtensions() {\n FlumeBuilder.getSinkNames().contains(\"agentSink\");\n FlumeBuilder.getDecoratorNames().contains(\"regex\");\n FlumeBuilder.getSourceNames().contains(\"collectorSource\");\n }", "@Override\n\t\tprotected void loadSpecification(SpecificationContext context) {\n\t\t}", "@Test\r\n\tvoid testGetPlayerSkillsShouldFail() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\tint sru = 99999999;\r\n\t\t\r\n\t\t//Passing\r\n\t\tint standard = ctrl.getSkillRatingByName(sru, \"Standard\");\r\n\t\tint spin= ctrl.getSkillRatingByName(sru, \"Spin\");\r\n\t\tint pop = ctrl.getSkillRatingByName(sru, \"Pop\");\r\n\t\t\r\n\t\t//Tackling\r\n\t\tint front = ctrl.getSkillRatingByName(sru, \"Front\");\r\n\t\tint rear = ctrl.getSkillRatingByName(sru, \"Rear\");\r\n\t\tint side = ctrl.getSkillRatingByName(sru, \"Side\");\r\n\t\tint scrabble = ctrl.getSkillRatingByName(sru, \"Scrabble\");\r\n\t\t\r\n\t\t//Kicking\r\n\t\tint drop = ctrl.getSkillRatingByName(sru, \"Drop\");\r\n\t\tint punt = ctrl.getSkillRatingByName(sru, \"Punt\");\r\n\t\tint grubber = ctrl.getSkillRatingByName(sru, \"Grubber\");\r\n\t\tint goal = ctrl.getSkillRatingByName(sru, \"Goal\");\r\n\t\t\r\n\t\tboolean success = false;\r\n\t\t\r\n\t\tif(standard == 1 && spin == 1 && pop == 1 && front == 1 && rear == 1 && side == 1 \r\n\t\t\t\t&& scrabble == 1 && drop == 1 && punt == 1 && grubber == 1 && goal == 1) {\r\n\t\t\tsuccess = true;\r\n\t\t}\r\n\t\t\r\n\t\tassertTrue(success);\r\n\t}", "boolean isIntroduced();", "@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkPlatform() {\n\t\tboolean flag = oTest.checkPlatform();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn flag;\r\n\t}", "public 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 }", "@Test\n\tpublic void NenHithoelStatsAndKeywordsAreCorrect() throws DecisionResultInvalidException, CardNotFoundException {\n\t\tGenericCardTestHelper scn = GetScenario();\n\n\t\tPhysicalCardImpl site8 = scn.GetFreepsSite(8);\n\n\t\tassertFalse(site8.getBlueprint().isUnique());\n\t\t//assertEquals(Side.FREE_PEOPLE, site8.getBlueprint().getSide());\n\t\t//assertEquals(Culture., card.getBlueprint().getCulture());\n\t\tassertEquals(CardType.SITE, site8.getBlueprint().getCardType());\n\t\t//assertEquals(Race.CREATURE, card.getBlueprint().getRace());\n\t\tassertTrue(scn.HasKeyword(site8, Keyword.RIVER)); // test for keywords as needed\n\t\tassertEquals(7, site8.getBlueprint().getTwilightCost());\n\t\t//assertEquals(, card.getBlueprint().getStrength());\n\t\t//assertEquals(, card.getBlueprint().getVitality());\n\t\t//assertEquals(, card.getBlueprint().getResistance());\n\t\t//assertEquals(Signet., card.getBlueprint().getSignet()); \n\t\tassertEquals(8, site8.getBlueprint().getSiteNumber()); // Change this to getAllyHomeSiteNumbers for allies\n\n\t}", "public boolean testModelordraughting(EIfcfillareastyle type) throws SdaiException;", "boolean hasCompatibilityState();", "protected void skipTestIfScopesNotSupported() {\n\t}", "@Test\n public void noProfile() {\n Properties props = new Properties();\n props.setProperty(DeploymentDescriptorConfiguration.MODULE_NAME, \"com.alipay.dal\");\n assertThat(sofaModuleProfileChecker.acceptModule(SampleDeploymentDescriptor.create(props)))\n .isTrue();\n }", "public void validateRpd22s6()\n {\n // This guideline cannot be automatically tested.\n }", "boolean hasHasAlcoholSpecimanType();", "private void checkUnsupportedPreconditions(PlanGraphStep newStep, int currentLevel) {\n\t\t/* add unsupported preconditions for this step by checking facts of previous level */\n\t\tSet<LPGInconsistency> previousLevelInconsistencies = inconsistencies.get(currentLevel - 1);\n\t\tSet<PlanGraphLiteral> previousLevelFacts = facts.get(currentLevel - 1);\n\t\tfor (PlanGraphLiteral pgLiteral : newStep.getParentNodes()) {\n\t\t\t/* if initial level is 0, satisfied by initial state. No need for inconsistency */\n\t\t\t if (pgLiteral.getInitialLevel() != 0 && !previousLevelFacts.contains(pgLiteral)) { \n\t\t\t\tpreviousLevelInconsistencies.add(new UnsupportedPrecondition(pgLiteral, currentLevel - 1));\n\t\t\t\tinconsistencyCount++;\n\t\t\t}\n\t\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 }", "boolean hasTrainingDataType();", "private boolean isWaterSupported(List<ClassDSLInformation> exannos) {\n\tfor (ClassDSLInformation annos : exannos) {\n\t if (!annos.isWaterSupported()) {\n\t\treturn false;\n\t }\n\t}\n\treturn true;\n }", "public void testJellyCompatibility() {\n try {\n assertTrue(\"SettingChildren class is public\", Modifier.isPublic(SettingChildren.class.getModifiers()));\n assertTrue(\"FileStateProperty class is public\", Modifier.isPublic(FileStateProperty.class.getModifiers()));\n try {\n new FileStateProperty(\"Modules-Layer\").getValue();\n } catch (NullPointerException npe) {}\n } catch (Exception e) {\n throw new AssertionFailedErrorException(\"JellyTools compatibility conflict, please contact QA or any JellyTools developer.\", e);\n }\n }", "@Test\n public void testCardCanPlay_FALSE() {\n System.out.println(\"cardCanPlay FALSE COLOUR\");\n UnoCard cardSelection = new UnoCard(UnoCardColour.RED, UnoCardValue.TWO);\n UnoCard drawCard = new UnoCard(UnoCardColour.BLUE, UnoCardValue.ONE);\n UnoCardColour wildColour = UnoCardColour.BLUE;\n boolean result = utils.cardCanPlay(cardSelection, drawCard, wildColour);\n assertEquals(false, result);\n }", "boolean hasIsSupportComp();", "boolean hasUnknown72();", "@Test(timeout = 4000)\n public void test022() throws Throwable {\n TextDirectoryLoader textDirectoryLoader0 = new TextDirectoryLoader();\n Instances instances0 = textDirectoryLoader0.getStructure();\n Evaluation evaluation0 = new Evaluation(instances0);\n evaluation0.toMatrixString(\"getPreBuiltClassifiers\");\n assertEquals(0.0, evaluation0.SFEntropyGain(), 0.01);\n }", "@Override\n\tpublic boolean test() {\n\t\treturn false;\n\t}", "@Test\n public void isSellableTest() {\n // TODO: test isSellable\n }", "boolean hasUnknown();", "public boolean supportsTableCheck() {\n \t\treturn true;\n \t}", "@Override\n public boolean isSupported() {\n return BITS.BITS_32.toString().equals(osBits);\n }", "@Override\n public boolean isSupported() {\n return BITS.BITS_32.toString().equals(osBits);\n }" ]
[ "0.610839", "0.5882667", "0.56948435", "0.56561226", "0.56503123", "0.56405294", "0.56278765", "0.5584111", "0.554156", "0.5514908", "0.5500957", "0.54867834", "0.54614997", "0.5453212", "0.5436375", "0.541535", "0.5361394", "0.53580606", "0.53499955", "0.5344645", "0.5340864", "0.5322461", "0.5298719", "0.52971333", "0.52680457", "0.52680457", "0.52680457", "0.5266357", "0.5249836", "0.5249544", "0.52274364", "0.5226313", "0.5224555", "0.5195507", "0.51857615", "0.51805663", "0.51487595", "0.5144239", "0.5138133", "0.5132048", "0.5122186", "0.5112213", "0.51023495", "0.51003647", "0.5094338", "0.50850636", "0.5075947", "0.5059023", "0.505067", "0.505067", "0.5046219", "0.5044199", "0.50437784", "0.5042246", "0.5040011", "0.50362015", "0.50326383", "0.50283825", "0.50269526", "0.5017953", "0.5015693", "0.5015096", "0.50147647", "0.50136364", "0.5009795", "0.500301", "0.50021535", "0.5001246", "0.4994587", "0.4991646", "0.4991314", "0.49857724", "0.49846885", "0.49804237", "0.4977256", "0.49726555", "0.49691072", "0.49635205", "0.49633563", "0.49618775", "0.4952682", "0.49511066", "0.49487364", "0.49482056", "0.4944031", "0.49436924", "0.49341288", "0.4932635", "0.492637", "0.49231476", "0.4917714", "0.4914801", "0.49089247", "0.49058133", "0.49036586", "0.49013188", "0.4900738", "0.48997444", "0.48987406", "0.48987406" ]
0.52620775
28
Internal implementation methods ////////////////////////////////
private int getStatementCount(OntModel ontModel) { int count = 0; for (Iterator it = ontModel.listStatements(); it.hasNext(); it.next()) { count++; } return count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n protected void init() {\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\n protected void prot() {\n }", "@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\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n void init() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public void init() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n protected void getExras() {\n }", "@Override\n protected void initData() {\n }", "@Override\n protected void initData() {\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\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\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\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\tpublic void init()\r\n\t{\n\t}", "@Override\n public void init() {}", "private void getStatus() {\n\t\t\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "protected void init() {\n // to override and use this method\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\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\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n public void init() {\n }", "private Rekenhulp()\n\t{\n\t}", "private TestsResultQueueEntry() {\n\t\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void init() {\r\n\t\t// to override\r\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "protected void initialize() {}", "protected void initialize() {}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private void init() {\n\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tprotected void processInit() {\n\r\n\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}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "protected abstract Set method_1559();", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "protected Doodler() {\n\t}" ]
[ "0.62845993", "0.6252478", "0.6222747", "0.61359704", "0.61304694", "0.6078507", "0.6078507", "0.6073275", "0.6061482", "0.6026212", "0.59834045", "0.59834045", "0.59834045", "0.59834045", "0.59834045", "0.59834045", "0.59604263", "0.5921257", "0.5921257", "0.59160393", "0.5892913", "0.5870492", "0.58630013", "0.58550227", "0.5853355", "0.58499825", "0.58257407", "0.5825451", "0.58132976", "0.58084995", "0.5807452", "0.579146", "0.5791388", "0.5790625", "0.5787342", "0.5787342", "0.5786592", "0.578652", "0.57782274", "0.5776513", "0.5767897", "0.5767897", "0.5767897", "0.57588613", "0.57588613", "0.57579136", "0.5755208", "0.5755208", "0.5755208", "0.5755208", "0.5755208", "0.5755208", "0.572653", "0.5724119", "0.5720145", "0.5714472", "0.5709205", "0.5696616", "0.5692219", "0.56902486", "0.5687267", "0.5674761", "0.5666704", "0.5660324", "0.5660324", "0.5660324", "0.5660324", "0.5660324", "0.5658746", "0.5652565", "0.56394833", "0.56391263", "0.56391263", "0.56391096", "0.56354696", "0.56354696", "0.5627292", "0.5624686", "0.5622863", "0.5620777", "0.56188977", "0.56181026", "0.5609083", "0.56087273", "0.56084776", "0.56084776", "0.560687", "0.560687", "0.56028396", "0.55985296", "0.55973685", "0.5590807", "0.5589529", "0.5589529", "0.5582041", "0.55797976", "0.55784094", "0.55764455", "0.5569544", "0.5569544", "0.5569012" ]
0.0
-1
Only used by SettingsXMLopneSaver().
Saver() throws IOException { this(new File(file.getParentFile(), "#" + file.getName() + "#save#")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void saveSettings() {\n\n\t}", "private void saveSettings() {\n SettingsModel settingsModel = new SettingsModel();\n settingsModel.saveState(NJNPStartActivity.this);\n\n File NJNPSettingsDirectory = new File(NJNPConstants.DIRECTORY_PATH + NJNPConstants.SETTINGS_FOLDER);\n NJNPSettingsDirectory.mkdirs();\n\n File file = new File(NJNPSettingsDirectory.getPath(), NJNPConstants.SETTINGS_FILE_NAME);\n\n FileOutputStream fos = null;\n ObjectOutputStream os = null;\n try {\n fos = new FileOutputStream(file);\n os = new ObjectOutputStream(fos);\n os.writeObject(settingsModel);\n os.close();\n fos.close();\n } catch (FileNotFoundException e) {\n Log.e(NJNP_ACTIVITY_TAG, \"File not found exception when saving settings: \" + e.getMessage());\n } catch (IOException e) {\n Log.e(NJNP_ACTIVITY_TAG, \"IO Exception when saving settings: \" + e.getMessage());\n }\n\n }", "public SettingsSaver() {\n set[0] = advModeUnlocked;\n set[1] = LIM_NOTESPERLINE;\n set[2] = LIM_96_MEASURES;\n set[3] = LIM_VOLUME_LINE;\n set[4] = LIM_LOWA;\n set[5] = LIM_HIGHD;\n set[6] = LOW_A_ON;\n set[7] = NEG_TEMPO_FUN;\n set[8] = LIM_TEMPO_GAPS;\n set[9] = RESIZE_WIN;\n set[10] = ADV_MODE;\n }", "private void saveGeneralData() {\n Settings.CRAWL_TIMEOUT = Integer.parseInt(spCrawlTimeout.getValue().toString()) * 1000;\n Settings.RETRY_POLICY = Integer.parseInt(spRetryPolicy.getValue().toString());\n Settings.RECRAWL_TIME = Integer.parseInt(spRecrawlInterval.getValue().toString()) * 3600000;\n Settings.RECRAWL_CHECK_TIME = Integer.parseInt(spRecrawlCheckTime.getValue().toString()) * 60000;\n\n Settings.saveSettings();\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}", "@Override\r\n protected XMLSave createXMLSave() {\r\n prepareSave();\r\n return super.createXMLSave();\r\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 }", "@Override\n\tpublic Element saveToXml(boolean includeConfigState) {\n\t\treturn null;\n\t}", "protected void serializeState() {\n\t\tint ii = 0;\n\t\t\n\t\tfor(GEditorPanel gep : editorPanels) {\n\t\t\tif(gep.getFilePath() != null && gep.getFilePath().length() > 0) {\n\t\t\t\tPreference.PREFERENCES_NODE.put(\"editSession\" + ++ii, gep.getFilePath());\n\t\t\t}\n\t\t}\n\t\t\n\t\tAccessors.INT_ACCESSOR.put(\"numberOfFiles\", ii);\n\t}", "public void saveSettings() {\n try {\n Settings.setDegausserPort((String) this.demagnetizerPort.getSelectedItem());\n Settings.setDegausserDelay(((Number) this.demagDelay.getSelectedItem()).intValue());\n Settings.setDegausserRamp(((Number) this.demagRamp.getSelectedItem()).intValue());\n Settings.setDegausserMaximumField(((Number) this.maximumField.getValue()).doubleValue());\n Settings.setHandlerPort((String) this.handlerPort.getSelectedItem());\n Settings.setHandlerAcceleration(((Number) this.acceleration.getValue()).intValue());\n Settings.setHandlerAxialAFPosition(((Number) this.axialAFPosition.getValue()).intValue());\n Settings.setHandlerBackgroundPosition(((Number) this.backgroundPosition.getValue()).intValue());\n Settings.setHandlerDeceleration(((Number) this.deceleration.getValue()).intValue());\n Settings.setHandlerMeasurementPosition(((Number) this.measurementPosition.getValue()).intValue());\n Settings.setHandlerMeasurementVelocity(((Number) this.measurementVelocity.getValue()).intValue());\n Settings.setHandlerRotation(((Number) this.rotation.getValue()).intValue());\n Settings.setHandlerSampleLoadPosition(((Number) this.sampleLoadPosition.getValue()).intValue());\n Settings.setHandlerTransverseYAFPosition(((Number) this.transverseYAFPosition.getValue()).intValue());\n Settings.setHandlerVelocity(((Number) this.velocity.getValue()).intValue());\n Settings.setHandlerRotationVelocity(((Number) this.rotationVelocity.getValue()).intValue());\n Settings.setHandlerRotationDeceleration(((Number) this.rotationDec.getValue()).intValue());\n Settings.setHandlerRotationAcceleration(((Number) this.rotationAcc.getValue()).intValue());\n\n Settings.setMagnetometerPort((String) this.magnetometerPort.getSelectedItem());\n Settings.setMagnetometerXAxisCalibration(((Number) this.xAxisCalibration.getValue()).doubleValue());\n Settings.setMagnetometerYAxisCalibration(((Number) this.yAxisCalibration.getValue()).doubleValue());\n Settings.setMagnetometerZAxisCalibration(((Number) this.zAxisCalibration.getValue()).doubleValue());\n creator.setVisible(false);\n } catch (Exception e) {\n e.printStackTrace();\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 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 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 }", "private void serializeBeforeOpen() {\r\n sr.save(this.path);\r\n }", "void savePreferences() throws OntimizeJEERuntimeException;", "@Override\n\tpublic void savePruneSetting(PruneSetting pruneSetting) throws Exception {\n\n\t}", "private void saveConfiguration() {\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 }", "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 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 }", "private void xmlSave() {\r\n FileDialog fd = new FileDialog(new Frame(), \r\n \"Save as a jMusic XML file...\", \r\n FileDialog.SAVE);\r\n fd.show();\r\n if (fd.getFile() != null) {\r\n jm.util.Write.xml(score, fd.getDirectory() + fd.getFile());\r\n }\r\n }", "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 }", "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 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 }", "@Override public void saveSettings(Map pProps, Map pSettings) {\n pProps.put(\"$class\", \"com.castorama.searchadmin.adapter.content.impl.CastoramaDocumentAdapter\");\n pProps.put(CDS_PATH, pSettings.get(getSourceTypeInternalName() + PATH));\n pProps.put(PORT, pSettings.get(getSourceTypeInternalName() + PORT));\n pProps.put(HOST_MACHINE, pSettings.get(getSourceTypeInternalName() + HOST_MACHINE));\n }", "public void saveXMLConfig() {\n\n\t\t// Get the Carma namespace\n\t\tNamespace ns = Namespace.getNamespace(\"Carma\",\n\t\t\t\t\"http://www.mmarray.org\");\n\n\t\t// Update NameServers. First remove them all, then add since\n\t\t// the number of them could have changed\n\t\tElement nameserversElement = _root.getChild(\"pdbi\", ns)\n\t\t .getChild(\"nameServers\", ns);\n\t\tnameserversElement.removeChildren(\"nameServer\", ns);\n\n\t\t// Set the new children one at a time\n\t\tfor (int i = 0; i < _nameservers.size(); i++) {\n\t\t\t nameserversElement.addContent( new Element(\"nameServer\", ns).\n\t\t\t addContent(new Element(\"identifier\", ns).\n\t\t\t\t setText((String)_nameservers.get(i))));\n\t\t}\n\n\t\t// Update NameServerPorts. First remove them all, then add since\n\t\t// the number of them could have changed\n\t\tElement nameserverPortsElement = _root.getChild(\"pdbi\", ns)\n\t\t .getChild(\"nameServerPorts\", ns);\n\t\tnameserverPortsElement.removeChildren(\"nameServerPort\", ns);\n\n\t\t// Set the new children one at a time\n\t\tfor (int i = 0; i < _nameserverPorts.size(); i++) {\n\t\t\t nameserverPortsElement.addContent( new Element(\"nameServerPort\",\n\t\t\t ns).\n\t\t\t addContent(new Element(\"pidentifier\", ns).\n\t\t\t\t setText((String)_nameserverPorts.get(i))));\n\t\t}\n\n\t\t// Update obsRecord Event Channel Name\n\t\t_root.getChild(\"server\", ns)\n\t\t .getChild(\"obsRecordEventChannelName\", ns)\n\t\t .setText(_obsRecordEventChannelName);\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 }", "@FXML\n\tprivate void onSaveBtn() {\n\t\tSettings settings = Settings.getSingleton();\n\t\t//Set rule setting\n\t\tif(ruleBox.getValue() == \"Standard\") {\n\t\t\tsettings.setRuleType(RuleType.STANDARD);\n\t\t} else {\n\t\t\tsettings.setRuleType(RuleType.CHALLENGE);\n\t\t}\n\t\t\n\t\t//Set number of walls setting\n\t\tsettings.setWalls(wallBox.getValue());\n\t\t//Set show label\n\t\tsettings.setShowLabels(indicateLabel.isSelected());\n\t\t//Set show ghost trails\n\t\t//settings.setShowTrail(ghostTrail.isSelected());\n\t\t\n\t\t//Set board height and width\n\t\tswitch(boardBox.getValue()) {\n\t\tcase \"7x7\":\n\t\t\tsettings.setBoardHeight(7);\n\t\t\tsettings.setBoardWidth(7);\t\t\t\n\t\t\tbreak;\n\t\tcase \"9x9\":\n\t\t\tsettings.setBoardHeight(9);\n\t\t\tsettings.setBoardWidth(9);\t\t\t\n\t\t\tbreak;\n\t\tcase \"11x11\":\n\t\t\tsettings.setBoardHeight(11);\n\t\t\tsettings.setBoardWidth(11);\t\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tsettings.setBoardHeight(9);\n\t\t\t\tsettings.setBoardWidth(9);\n\t\t\t\tbreak;\n\t\t}\n\t\t//Set tile size\n\t\tsettings.setTileSize(tileBox.getValue());\n\t}", "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 }", "public static void LoadSettingsIntoArray() {\r\n\t\t// Node gameSettings = document.getElementById(\"GameSettings\");\r\n\t\tNodeList settingsNodeList = document.getElementsByTagName(\"Setting\");\r\n\r\n\t\tfor (int i = 0; i < settingsNodeList.getLength(); i++) {\r\n\t\t\tNode node = settingsNodeList.item(i);\r\n\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE) {\r\n\t\t\t\tElement eElement = (Element) node;\r\n\t\t\t\tsettings.add(eElement);\r\n\t\t\t}\r\n\t\t}\r\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 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 }", "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 }", "@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 }", "private void saveProperties()\n {\n PSConfigUtils.saveObjectToFile(m_props, getPropertiesFile());\n }", "@Override\r\n protected void saveStrings() {\r\n \r\n settings.setProperty(\"mfile\" , mfile);\r\n settings.setProperty( \"rmode\", rmode);\r\n settings.setProperty( \"cmap\" , cmap );\r\n settings.setProperty(\"cmapMin\", Double.toString( cmapMin ) ); \r\n settings.setProperty(\"cmapMax\", Double.toString( cmapMax ) ); \r\n \r\n }", "public void savetoxml() throws FileNotFoundException, JAXBException {\n xml_methods.save(player);\n }", "private void saveFieldnameSettingsButtonActionPerformed(ActionEvent e) {\n FieldnameDuplicatePresets fdp = PreferencesManager.getFieldnameDupliatePresets();\n fdp.setFieldname(defaultFieldnamePrefixTextField.getText().trim());\n fdp.setCounterStart((Integer) fieldnameCounterSpinner.getValue());\n fdp.setHorizontalDuplicates((Integer) horizontalDuplicatesSpinner.getValue());\n fdp.setVerticalDuplicates((Integer) verticalDuplicatesSpinner.getValue());\n fdp.setHorizontalSpacing((Integer) horizontalSpacingSpinner.getValue());\n fdp.setVerticalSpacing((Integer) verticalSpacingSpinner.getValue());\n if (tblrButton.isSelected()) {\n fdp.setNamingDirection(FieldnameDuplicatePresets.DIRECTION_TOP_TO_BOTTOM_LEFT_TO_RIGHT);\n } else {\n fdp.setNamingDirection(FieldnameDuplicatePresets.DIRECTION_LEFT_TO_RIGHT_TOP_TO_BOTTOM);\n }\n try {\n PreferencesManager.savePreferences(Main.getXstream());\n Misc.showSuccessMsg(this,\n Localizer.localize(\"Util\", \"CapturePreferencesSavedSuccessfullyMessage\"));\n } catch (IOException e1) {\n Misc.showErrorMsg(this, Localizer.localize(\"Util\", \"ErrorSavingPreferencesMessage\"),\n Localizer.localize(\"Util\", \"ErrorSavingPreferencesTitle\"));\n com.ebstrada.formreturn.manager.util.Misc.printStackTrace(e1);\n return;\n }\n }", "public void saveUserSettings() {\n\t}", "private void createSettingsFile() throws IllegalArgumentException {\r\n\r\n File settingsFile = new File(msAmandaTempFolder, SETTINGS_FILE);\r\n\r\n try {\r\n\r\n BufferedWriter bw = new BufferedWriter(new FileWriter(settingsFile));\r\n\r\n bw.write(\r\n \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\" + System.getProperty(\"line.separator\")\r\n + \"<settings>\" + System.getProperty(\"line.separator\")\r\n + \"\\t<search_settings>\" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<enzyme specificity=\\\"\" + enzymeSpecificity + \"\\\">\" + enzymeName + \"</enzyme>\" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<missed_cleavages>\" + missedCleavages + \"</missed_cleavages>\" + System.getProperty(\"line.separator\")\r\n + modificationsAsString\r\n + \"\\t\\t<instrument>\" + instrument + \"</instrument>\" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<ms1_tol unit=\\\"\" + precursorUnit + \"\\\">\" + precursorMassError + \"</ms1_tol> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<ms2_tol unit=\\\"\" + fragmentUnit + \"\\\">\" + fragmentMassError + \"</ms2_tol> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<max_rank>\" + maxRank + \"</max_rank> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<generate_decoy>\" + generateDecoys + \"</generate_decoy> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<PerformDeisotoping>\" + performDeisotoping + \"</PerformDeisotoping> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MaxNoModifs>\" + maxModifications + \"</MaxNoModifs> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MaxNoDynModifs>\" + maxVariableModifications + \"</MaxNoDynModifs> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MaxNumberModSites>\" + maxModificationSites + \"</MaxNumberModSites> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MaxNumberNeutralLoss>\" + maxNeutralLosses + \"</MaxNumberNeutralLoss> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MaxNumberNeutralLossModifications>\" + maxNeutralLossesPerModification + \"</MaxNumberNeutralLossModifications> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MinimumPepLength>\" + minPeptideLength + \"</MinimumPepLength> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<MaximumPepLength>\" + maxPeptideLength + \"</MaximumPepLength> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<ReportBothBestHitsForTD>\" + reportBothBestHitsForTD + \"</ReportBothBestHitsForTD> \" + System.getProperty(\"line.separator\")\r\n + \"\\t</search_settings> \" + System.getProperty(\"line.separator\")\r\n + System.getProperty(\"line.separator\")\r\n + \"\\t<basic_settings> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<instruments_file>\" + new File(msAmandaFolder, INSTRUMENTS_FILE).getAbsolutePath() + \"</instruments_file> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<unimod_file>\" + new File(msAmandaFolder, UNIMOD_FILE).getAbsolutePath() + \"</unimod_file> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<enzyme_file>\" + new File(msAmandaTempFolder, ENZYMES_FILE).getAbsolutePath() + \"</enzyme_file> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<unimod_obo_file>\" + new File(msAmandaFolder, UNIMOD_OBO_FILE).getAbsolutePath() + \"</unimod_obo_file> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<psims_obo_file>\" + new File(msAmandaFolder, PSI_MS_OBO_FILE).getAbsolutePath() + \"</psims_obo_file> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<monoisotopic>\" + monoisotopic + \"</monoisotopic> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<considered_charges>\" + getChargeRangeAsString() + \"</considered_charges> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<LoadedProteinsAtOnce>\" + maxLoadedProteins + \"</LoadedProteinsAtOnce> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<LoadedSpectraAtOnce>\" + maxLoadedSpectra + \"</LoadedSpectraAtOnce> \" + System.getProperty(\"line.separator\")\r\n + \"\\t\\t<data_folder>\" + msAmandaTempFolder + \"</data_folder> \" + System.getProperty(\"line.separator\")\r\n + \"\\t</basic_settings> \" + System.getProperty(\"line.separator\")\r\n + \"</settings>\"\r\n + System.getProperty(\"line.separator\")\r\n );\r\n\r\n bw.flush();\r\n bw.close();\r\n\r\n } catch (IOException ioe) {\r\n\r\n throw new IllegalArgumentException(\r\n \"Could not create MS Amanda settings file. Unable to write file: '\"\r\n + ioe.getMessage()\r\n + \"'!\"\r\n );\r\n\r\n }\r\n }", "private void saveOtherSetting(GameEngine engine, CustomProperties prop) {\r\n\t\tsuper.saveOtherSetting(engine, prop, \"spf\");\r\n\t\tint playerID = engine.getPlayerID();\r\n\t\tprop.setProperty(\"avalanchevsspf.ojamaCountdown.p\" + playerID, ojamaCountdown[playerID]);\r\n\t\tprop.setProperty(\"avalanchevsspf.dropSet.p\" + playerID, dropSet[playerID]);\r\n\t\tprop.setProperty(\"avalanchevsspf.dropMap.p\" + playerID, dropMap[playerID]);\r\n\t}", "static synchronized void writeSettings(FileExtMismatchSettings settings) throws FileExtMismatchSettingsException {\n try (NbObjectOutputStream out = new NbObjectOutputStream(new FileOutputStream(DEFAULT_SERIALIZED_FILE_PATH))) {\n out.writeObject(settings);\n } catch (IOException ex) {\n throw new FileExtMismatchSettingsException(String.format(\"Failed to write settings to %s\", DEFAULT_SERIALIZED_FILE_PATH), ex);\n }\n }", "@Override\n\tpublic void initSettings() {\n\n\t}", "private void serialize() {\r\n if (newFile) {\r\n this.newFile = this.serializeAs();\r\n } else if (!newFile && !path.equals(\"\")) {\r\n sr.save(this.path);\r\n }\r\n }", "private void saveConfigurationSettings() {\n _settings.setMultipleTargets( _multi.isSelected() );\n if ( _buttons != null && _multi.isSelected() ) {\n TreeSet btns = new TreeSet( new Comparator() {\n public int compare( Object a, Object b ) {\n AbstractButton btna = ( AbstractButton ) a;\n AbstractButton btnb = ( AbstractButton ) b;\n String aname = btna.getText();\n String bname = btnb.getText();\n aname = aname.substring( 0, aname.length() - 1 );\n aname = aname.substring( aname.lastIndexOf( '(' ) + 1 );\n bname = bname.substring( 0, bname.length() - 1 );\n bname = bname.substring( bname.lastIndexOf( '(' ) + 1 );\n int aint = Integer.parseInt( aname );\n int bint = Integer.parseInt( bname );\n if ( aint < bint )\n return -1;\n if ( aint == bint )\n return 0;\n return 1;\n }\n }\n );\n Iterator it = _buttons.iterator();\n while ( it.hasNext() ) {\n AbstractButton btn = ( AbstractButton ) it.next();\n if ( btn.isSelected() )\n btns.add( btn );\n }\n it = btns.iterator();\n ArrayList target_list = new ArrayList();\n while ( it.hasNext() ) {\n String target_name = ( ( AbstractButton ) it.next() ).getActionCommand();\n target_list.add( target_name );\n }\n _settings.setMultipleTargetList( target_list );\n }\n if ( _prefs != null ) {\n try {\n //_settings.save();\n //PREFS.flush();\n _prefs.flush();\n }\n catch ( Exception e ) {\n e.printStackTrace();\n }\n }\n }", "@Override\n public void saveValues() {\n \n }", "public void loadConfig(){\n this.saveDefaultConfig();\n //this.saveConfig();\n\n\n }", "public void save() throws FileNotFoundException, IOException\n {\n settings.store(new FileOutputStream(FILE), \"N3TPD Config File\");\n }", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "private void saveFitex(){\n Element pds = getPDS() ;\n JFileChooser aFileChooser = new JFileChooser();\n aFileChooser.setFileFilter(new MyFileFilterXML());\n if (lastUsedFile != null){\n aFileChooser.setCurrentDirectory(lastUsedFile.getParentFile());\n aFileChooser.setSelectedFile(lastUsedFile);\n }else{\n File file = new File(aFileChooser.getCurrentDirectory(), dataset.getName()+\".xml\");\n aFileChooser.setSelectedFile(file);\n }\n int r = aFileChooser.showSaveDialog(this);\n if (r == JFileChooser.APPROVE_OPTION){\n setCursor(new Cursor(Cursor.WAIT_CURSOR));\n File file = aFileChooser.getSelectedFile();\n if(!MyUtilities.isXMLFile(file)){\n file = MyUtilities.getXMLFile(file);\n }\n lastUsedFile = file;\n OutputStreamWriter fileWriter = null;\n try{\n fileWriter = new OutputStreamWriter(new FileOutputStream(file), \"utf-8\");\n\t\txmlOutputter.output(pds, fileWriter);\n datasetModif = false;\n dataProcessToolPanel.logSaveDataset(dataset);\n }catch (IOException e){\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n displayError(new CopexReturn(getBundleString(\"MSG_ERROR_SAVE\"), false), getBundleString(\"TITLE_DIALOG_ERROR\"));\n }finally{\n if (fileWriter != null){\n try{\n fileWriter.close();\n setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n }catch (IOException e){\n displayError(new CopexReturn(getBundleString(\"MSG_ERROR_SAVE\"), false), getBundleString(\"TITLE_DIALOG_ERROR\"));\n }\n }\n }\n }\n }", "protected AbstractGeneratedPrefsTransform() {\n\t\tsuper(false);\n\t}", "private static void putPreferencesInXml(Element elt, Document doc, Preferences prefs, boolean subTree) throws BackingStoreException {\n Preferences[] kidsCopy = null;\n String[] kidNames = null;\n synchronized (((AbstractPreferences) prefs).lock) {\n if (((AbstractPreferences) prefs).isRemoved()) {\n elt.getParentNode().removeChild(elt);\n return;\n }\n int i;\n String[] keys = prefs.keys();\n Element map = (Element) elt.appendChild(doc.createElement(PolicyMappingsExtension.MAP));\n for (i = 0; i < keys.length; i++) {\n Element entry = (Element) map.appendChild(doc.createElement(\"entry\"));\n entry.setAttribute(\"key\", keys[i]);\n entry.setAttribute(\"value\", prefs.get(keys[i], null));\n }\n if (subTree) {\n kidNames = prefs.childrenNames();\n kidsCopy = new Preferences[kidNames.length];\n for (i = 0; i < kidNames.length; i++) {\n kidsCopy[i] = prefs.node(kidNames[i]);\n }\n }\n }\n }", "private void restoreSettings() {\n PublicationRecognitionStructure prs =\n PreferencesManager.getPublicationRecognitionStructure();\n luminanceThresholdSpinner.setValue(new Integer(prs.getLuminanceCutOff()));\n markThresholdSpinner.setValue(new Integer(prs.getMarkThreshold()));\n fragmentPaddingSpinner.setValue(new Integer(prs.getFragmentPadding()));\n deskewThresholdSpinner.setValue(new Double(prs.getDeskewThreshold()));\n performDeskewCheckBox.setSelected(prs.isPerformDeskew());\n\n // restore the fieldname duplicate presets\n FieldnameDuplicatePresets fdp = PreferencesManager.getFieldnameDupliatePresets();\n defaultFieldnamePrefixTextField.setText(fdp.getFieldname());\n fieldnameCounterSpinner.setValue(fdp.getCounterStart());\n horizontalDuplicatesSpinner.setValue(fdp.getHorizontalDuplicates());\n verticalDuplicatesSpinner.setValue(fdp.getVerticalDuplicates());\n horizontalSpacingSpinner.setValue(fdp.getHorizontalSpacing());\n verticalSpacingSpinner.setValue(fdp.getVerticalSpacing());\n\n if (fdp.getNamingDirection()\n == FieldnameDuplicatePresets.DIRECTION_TOP_TO_BOTTOM_LEFT_TO_RIGHT) {\n lrtbButton.setSelected(false);\n tblrButton.setSelected(true);\n }\n\n if (fdp.getNamingDirection()\n == FieldnameDuplicatePresets.DIRECTION_LEFT_TO_RIGHT_TOP_TO_BOTTOM) {\n tblrButton.setSelected(false);\n lrtbButton.setSelected(true);\n }\n\n }", "void save() {\n File file = new File(main.myPath + \"state.xml\");\n Framework.backup(main.myPath + \"state.xml\");\n Framework.transform(stateDoc, new StreamResult(file), null);\n setDirty(false);\n }", "private void saveOption() {\n SharedPreferences filterSetting = getSharedPreferences(\"filterSetting\",0);\n SharedPreferences.Editor editor = filterSetting.edit();\n editor.putBoolean(\"myMostRecent\",myMostRecentWeekCheckbox.isChecked());\n editor.putBoolean(\"myDisplayAll\",myDisplayAllCheckbox.isChecked());\n editor.putBoolean(\"foMostRecent\",foMostRecentWeekCheckbox.isChecked());\n editor.putBoolean(\"foDisplayAll\",foDisplayAllCheckbox.isChecked());\n editor.putString(\"myReason\",myReasonEditText.getText().toString());\n editor.putString(\"foReason\",foReasonEditText.getText().toString());\n editor.putInt(\"mySpinner\",myEmotionalStateSpinner.getSelectedItemPosition());\n editor.putInt(\"foSpinner\",foEmotionalStateSpinner.getSelectedItemPosition());\n\n editor.commit();\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 }", "@Test\r\n public void testLoadSave() {\r\n Settings expResult = Settings.BEGINNER;\r\n expResult.save();\r\n Settings result = Settings.load();\r\n assertEquals(expResult, result);\r\n\r\n expResult = Settings.EXPERT;\r\n expResult.save();\r\n result = Settings.load();\r\n assertEquals(expResult, result);\r\n\r\n expResult = Settings.INTERMEDIATE;\r\n expResult.save();\r\n result = Settings.load();\r\n assertEquals(expResult, result);\r\n }", "private void restoreProperties() {\n restoreModeAndItemValue();\n restoreStringValue(Variable.DEST_PATH);\n restoreBooleanValue(Variable.MAXTRACKS_ENABLED);\n restoreIntValue(Variable.MAXTRACKS);\n restoreBooleanValue(Variable.MAXSIZE_ENABLED);\n restoreIntValue(Variable.MAXSIZE);\n restoreBooleanValue(Variable.MAXLENGTH_ENABLED);\n restoreIntValue(Variable.MAXLENGTH);\n restoreBooleanValue(Variable.ONE_MEDIA_ENABLED);\n restoreStringValue(Variable.ONE_MEDIA);\n restoreBooleanValue(Variable.CONVERT_MEDIA);\n restoreStringValue(Variable.CONVERT_COMMAND);\n if (StringUtils.isBlank((String) data.get(Variable.CONVERT_COMMAND))) {\n data.put(Variable.CONVERT_COMMAND, \"pacpl\"); // use default value if none set\n // yet\n }\n restoreBooleanValue(Variable.NORMALIZE_FILENAME);\n restoreIntValue(Variable.RATING_LEVEL);\n }", "private void saveSettings() {\n \tLog.i(\"T4Y-Settings\", \"Save mobile settings\");\n \t\n \tmobileSettings.setAllowAutoSynchronization(autoSynchronizationCheckBox.isChecked());\n mobileSettings.setAllowAutoScan(autoScanCheckBox.isChecked());\n mobileSettings.setAllowAutoSMSNotification(autoSMSNotificationCheckBox.isChecked());\n \n \tmainApplication.setMobileSettings(mobileSettings);\n }", "public void save() {\n JAXB.marshal(this, new File(fileName));\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 }", "public static void load()\n throws IOException, ClassNotFoundException {\n FileInputStream f_in = new\n FileInputStream (settingsFile);\n ObjectInputStream o_in = new\n ObjectInputStream(f_in);\n SettingsSaver loaded = (SettingsSaver) o_in.readObject();\n advModeUnlocked = loaded.set[0];\n LIM_NOTESPERLINE = loaded.set[1];\n LIM_96_MEASURES = loaded.set[2];\n LIM_VOLUME_LINE = loaded.set[3];\n LIM_LOWA = loaded.set[4];\n LIM_HIGHD = loaded.set[5];\n LOW_A_ON = loaded.set[6];\n NEG_TEMPO_FUN = loaded.set[7];\n LIM_TEMPO_GAPS = loaded.set[8];\n RESIZE_WIN = loaded.set[9];\n ADV_MODE = loaded.set[10];\n o_in.close();\n f_in.close();\n }", "public void saveMapping() {\n String userHome = System.getProperty(\"user.home\");\n String filePath = userHome + \"/\"+ System.currentTimeMillis() +\"-mapping.xml\";\n XMLExporter exporter = XMLExporter.getInstance();\n File file = new File(filePath);\n try {\n exporter.save(mappings, file);\n Logger.getLogger(MappingAppState.class.getName()).log(Level.INFO, \"Mapping saved as {0}\", filePath);\n } catch (IOException ex) {\n Logger.getLogger(MappingAppState.class.getName()).log(Level.SEVERE, \"Failed to save node!\", ex);\n }\n }", "public boolean saveSettings() {\r\n\t\treturn settings.save();\r\n\t}", "public static void save(){\n\t\tif(GUIReferences.currentFile != null) {\n\t\t\txml.XMLSaver.saveSensorList(GUIReferences.currentFile);\n\t\t\tGUIReferences.saveMenuItem.setEnabled(false);\n\t\t} else {\n\t\t\tsaveAs();\n\t\t}\n\t}", "public Properties storeSettings() {\r\n return mSettings.storeSettings();\r\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 }", "@Override\n\tpublic void posSave() {\n\t\t\n\t}", "@Override\n\tpublic void posSave() {\n\t\t\n\t}", "void save() throws IOException, ParserConfigurationException, TransformerConfigurationException;", "@Override\r\n\t\t\tprotected void saveContext() {\n\t\t\t\t\r\n\t\t\t}", "private void saveValues() {\r\n this.pl_expert.setParam(\"displayNodeDegree\", (String) this.nodeDegreeSpinner.getValue());\r\n this.pl_expert.setParam(\"displayEdges\", (String) this.displayEdgesSpinner.getValue());\r\n this.pl_expert.setParam(\"scale\", (String) this.scaleSpinner.getValue());\r\n this.pl_expert.setParam(\"minWeight\", (String) this.minweightSpinner.getValue());\r\n this.pl_expert.setParam(\"iterations\", (String) this.iterationsSpinner.getValue());\r\n this.pl_expert.setParam(\"mutationParameter\", this.mutationParameter.getSelection().getActionCommand());\r\n this.pl_expert.setParam(\"Update_param\", this.Update_param.getSelection().getActionCommand());\r\n this.pl_expert.setParam(\"vote_value\", (String) this.vote_value.getValue());\r\n this.pl_expert.setParam(\"keep_value\", (String) this.keep_value.getValue());\r\n this.pl_expert.setParam(\"mut_value\", (String) this.mut_value.getValue());\r\n this.pl_expert.setParam(\"only_sub\", new Boolean(this.only_sub.isSelected()).toString());\r\n\r\n this.is_alg_started = false;\r\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 }", "@Override\n public void save() {\n \n }", "private void storeProperties() {\n storeValue(Variable.MODE);\n storeValue(Variable.ITEM);\n storeValue(Variable.DEST_PATH);\n storeValue(Variable.MAXTRACKS_ENABLED);\n storeValue(Variable.MAXTRACKS);\n storeValue(Variable.MAXSIZE_ENABLED);\n storeValue(Variable.MAXSIZE);\n storeValue(Variable.MAXLENGTH_ENABLED);\n storeValue(Variable.MAXLENGTH);\n storeValue(Variable.ONE_MEDIA_ENABLED);\n storeValue(Variable.ONE_MEDIA);\n storeValue(Variable.CONVERT_MEDIA);\n storeValue(Variable.CONVERT_COMMAND);\n storeValue(Variable.NORMALIZE_FILENAME);\n storeValue(Variable.RATING_LEVEL);\n }", "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 }", "@Override\n public boolean save()\n {\n return false;\n }", "@Test\n public void testLoadXMLWithSettings() throws Exception\n {\n File confDir = new File(\"conf\");\n File targetDir = new File(\"target\");\n File testXMLValidationSource = new File(confDir,\n \"testValidateInvalid.xml\");\n File testSavedXML = new File(targetDir, \"testSave.xml\");\n File testSavedFactory = new File(targetDir, \"testSaveFactory.xml\");\n URL dtdFile = getClass().getResource(\"/properties.dtd\");\n final String publicId = \"http://commons.apache.org/test.dtd\";\n\n XMLConfiguration config = new XMLConfiguration(\"testDtd.xml\");\n config.setPublicID(publicId);\n config.save(testSavedXML);\n factory.addProperty(\"xml[@fileName]\", testSavedXML.getAbsolutePath());\n factory.addProperty(\"xml(0)[@validating]\", \"true\");\n factory.addProperty(\"xml(-1)[@fileName]\", testXMLValidationSource\n .getAbsolutePath());\n factory.addProperty(\"xml(1)[@config-optional]\", \"true\");\n factory.addProperty(\"xml(1)[@validating]\", \"true\");\n factory.save(testSavedFactory);\n\n factory = new DefaultConfigurationBuilder();\n factory.setFile(testSavedFactory);\n factory.registerEntityId(publicId, dtdFile);\n factory.clearErrorListeners();\n Configuration c = factory.getConfiguration();\n assertEquals(\"Wrong property value\", \"value1\", c.getString(\"entry(0)\"));\n assertFalse(\"Invalid XML source was loaded\", c\n .containsKey(\"table.name\"));\n\n testSavedXML.delete();\n testSavedFactory.delete();\n }", "private void saveButtonActionPerformed(java.awt.event.ActionEvent evt)\n {\n if (validationIsOK()) {\n \tsaveSettings();\n autosave.saveSettings();\n if (this.autosaveListener != null\n ) {\n \tthis.autosaveListener.reloadSettings();\n }\n dispose();\n }\n }", "private void saveCurrentPreferences() {\n\t\toldUnitType = preferences.getInt(\"displayUnit\", UnitType.FOOTINCH.getId());\n\t\toldPrecision = preferences.getInt(\"precision\", 16);\n\t\toldRounding = preferences.getBoolean(\"roundUp\", true);\n\t\toldDisplayOptions = preferences.getString(\"displayOptions\", context.getString(R.string.displayAutomatic));\n\t}", "private void saveProperties() {\n\n JiveGlobals.setXMLProperty(\"database.defaultProvider.driver\", driver);\n JiveGlobals.setXMLProperty(\"database.defaultProvider.serverURL\", serverURL);\n JiveGlobals.setXMLProperty(\"database.defaultProvider.username\", username);\n JiveGlobals.setXMLProperty(\"database.defaultProvider.password\", password);\n\n JiveGlobals.setXMLProperty(\"database.defaultProvider.minConnections\",\n Integer.toString(minConnections));\n JiveGlobals.setXMLProperty(\"database.defaultProvider.maxConnections\",\n Integer.toString(maxConnections));\n JiveGlobals.setXMLProperty(\"database.defaultProvider.connectionTimeout\",\n Double.toString(connectionTimeout));\n }", "public void savePreferences() {\n\t\ttry\t{\n\t\t\tFile temp = new File(\"dropbox.ini\");\n\t\t\tif (temp.exists()) {\n\t\t\t\tdboxini.load(\"dropbox.ini\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Exception in loading dropbox.ini\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Save window size.\n\t\tPoint sl = getLocationOnScreen();\n\t\tDimension sz = getSize();\n\t\tConfigSection wp = new ConfigSection(\"WindowState\");\n\t\twp.setIntProperty(\"xLoc\",sl.x);\n\t\twp.setIntProperty(\"yLoc\",sl.y);\n\t\twp.setIntProperty(\"width\",sz.width);\n\t\twp.setIntProperty(\"height\",sz.height);\n\t\tdboxini.removeSection(wp.getName());\n\t\tdboxini.addSection(wp);\n\n\t\t// Save ini file to disk.\n\t\ttry {\n\t\t\tdboxini.store(\"dropbox.ini\");\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.out.println(\"Unable to save preferences as dropbox.ini\");\n\t\t}\n\t}", "@Override\n public void save()\n {\n \n }", "public static Map getSaveOptions() {\n\t\tMap saveOptions = new HashMap();\n\t\tsaveOptions.put(XMLResource.OPTION_ENCODING, \"UTF-8\"); //$NON-NLS-1$\n\t\tsaveOptions.put(Resource.OPTION_SAVE_ONLY_IF_CHANGED,\n\t\t\t\tResource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);\n\t\treturn saveOptions;\n\t}", "@Override\n public void closeSettings() {\n \n }", "public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }", "private Settings() {}", "public void saveLayoutToPref() {\n Editor edit = getSharedPreferences(Constants.PREF_NAME_LAYOUTS, 0).edit();\n edit.clear();\n for (int i = 0; i < 4; i++) {\n LayoutItem layoutItem = (LayoutItem) this.mLayoutItems.get(i);\n if (layoutItem.getViewNum() > 0) {\n layoutItem.writeToPref(edit);\n }\n }\n edit.apply();\n }", "private AppSettings() {\n /* =============== UI settings =============== */\n brightnessInNightModeOnly = false;\n fullScreen = false;\n showTitle = true;\n pageInTitle = true;\n pageNumberToastPosition = ToastPosition.Bottom;\n zoomToastPosition = ToastPosition.Bottom;\n showAnimIcon = false;\n linkHighlightColor = 0x80FFFF00;\n searchHighlightColor = 0x3F0000FF;\n currentSearchHighlightColor = 0x7F007F00;\n storeGotoHistory = false;\n storeLinkGotoHistory = false;\n storeOutlineGotoHistory = false;\n storeSearchGotoHistory = false;\n\n /* =============== Tap & Scroll settings =============== */\n tapsEnabled = true;\n scrollHeight = Dips.dpToPx(10);\n touchProcessingDelay = 50;\n animateScrolling = true;\n /* =============== Performance settings =============== */\n\n\t\tpagesInMemory = 2;\n decodingThreadPriority = Thread.NORM_PRIORITY; // 7\n drawThreadPriority = Thread.NORM_PRIORITY; // 6\n\n hwaEnabled = false;\n bitmapSize = 9;// 6-64,7-128,8-256,9-512,10-1024\n bitmapFileringEnabled = false;\n textureReuseEnabled = true;\n useBitmapHack = false;\n useEarlyRecycling = false;\n reloadDuringZoom = false;\n heapPreallocate = 0;// 0-256\n pdfStorageSize = 64;// 16-128\n\n /* =============== DjVU Format-specific settings =============== */\n djvuRenderingMode = 0;// 0-color,1-black,2 color only, 3 mask, 4 backgroud, 5 foreground\n }", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n public void Save() {\n\t \n }", "@Test\n\t@Override\n\tpublic void testSaveURLXml() throws Exception {\n\t}", "public void saveAllNot() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(SW_ALLNOT, allNotifications.isChecked());\n editor.commit();\n }", "private void restore() {\n AppSettings.setInstance(backupConfig);\n }", "@Override\n\tpublic void doSaveAs() {\n\n\t}", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "public void saveState() {\n\t\tFileOutputStream fos = null;\n\t\tObjectOutputStream out = null;\n\t\ttry {\n\t\t\tFile savefile = new File(getServletContext().getRealPath(\"/WEB-INF/\"), SAVED_RECEPTOR_FILE_NAME);\n\t\t\tfos = new FileOutputStream(savefile);\n\t\t\tout = new ObjectOutputStream(fos);\n\t\t\tout.writeObject(pgtMap);\n\t\t\tout.close();\n\t\t} catch (IOException ex) {\n\t\t\tSystem.err.println(\"IO Exception saving proxyTicket cache\");\n\t\t\tex.printStackTrace();\n\t\t} catch (Exception e) { //don't think this is possible, but I'm seeing some goofy behavior, so...\n\t\t\tSystem.err.println(\"Non-IO Exception saving proxyTicket cache\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void saveBeforeRun() {\n if ( _helper != null && _settings.getSaveBeforeRun() )\n _helper.saveBeforeRun();\n }", "static void setNotSaved(){saved=false;}", "@PostLoad\n private void settingsAfterLoad()\n {\n\n productInfo = pis != null && pis.size() > 0;\n\n /* [2] setup transient : type */\n\n boolean clIsTransfer = cluster.getName().equals(R.CLNAME_TRANSFER);\n boolean catransferIsNone = catransfer.getName().equals(R.CANAME_NONE);\n\n Assert.assertEquals(MSG_PREF + \"pivot iff cluster = \" + R.CLNAME_PIVOT,\n pivot, cluster.getName().equals(R.CLNAME_PIVOT));\n\n Assert.assertTrue(MSG_PREF + \"RULE: cl=\" + R.CLNAME_TRANSFER + \" ==> catransfer!=\" + R.CANAME_NONE\n + \"; GOT: \" + cluster + \", \" + catransfer + \"; clIsTransfer=\" + clIsTransfer\n + \" catransferIsNone=\" + catransferIsNone, !clIsTransfer || !catransferIsNone);\n\n if (pivot) type = TTransactionType.pivot;\n else if (clIsTransfer) type = TTransactionType.transfer;\n else type = TTransactionType.simple;\n // TODO TTransactionType.exchange\n\n }" ]
[ "0.6828336", "0.631373", "0.61461097", "0.60595727", "0.605392", "0.60509574", "0.60193217", "0.5959812", "0.59361136", "0.59335303", "0.5915226", "0.5910267", "0.588285", "0.5848074", "0.58368665", "0.582159", "0.58069664", "0.580276", "0.5790048", "0.57819414", "0.57737255", "0.5756145", "0.57411164", "0.5707033", "0.5670131", "0.5663672", "0.565116", "0.563582", "0.56095314", "0.5578431", "0.55673236", "0.5567149", "0.55480266", "0.55456626", "0.55452025", "0.55418265", "0.5539962", "0.55381495", "0.5537481", "0.5517324", "0.5501246", "0.5498919", "0.5491569", "0.54898924", "0.5488926", "0.5485582", "0.5485306", "0.54794014", "0.54768664", "0.5461926", "0.54584", "0.54501", "0.54365075", "0.54310834", "0.54293704", "0.54254496", "0.5422975", "0.5422973", "0.54205424", "0.5406829", "0.5397797", "0.5397009", "0.5395599", "0.5391251", "0.5390173", "0.5380248", "0.5377403", "0.5360707", "0.5360707", "0.53489935", "0.5339847", "0.53281486", "0.5325128", "0.53085685", "0.5308484", "0.530823", "0.52992046", "0.52919596", "0.52895355", "0.5283923", "0.5281799", "0.52817047", "0.5276112", "0.5275466", "0.5275313", "0.52746564", "0.5263206", "0.52582145", "0.5255864", "0.5253788", "0.5253788", "0.5236562", "0.52177", "0.521517", "0.52150315", "0.52117395", "0.5207923", "0.52074456", "0.5201715", "0.5200717", "0.5200186" ]
0.0
-1
A workaround for a restriction of super().
private Saver(File twoStageSaveFile) throws IOException { super(new OutputStreamWriter( new FileOutputStream(twoStageSaveFile) , encoding)); this.twoStageSaveFile = twoStageSaveFile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_ExtendsNotAbstract() {\n super(\"s\"); // needs this if not default ctor;\n }", "@Override\n protected void checkSubclass() {\n }", "@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}", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@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}", "O() { super(null); }", "@Override\n protected void prot() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_6349() {\r\n super.method_6349();\r\n }", "protected ChildType() {/* intentionally empty block */}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void just() {\n\t\t\r\n\t}", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void method_3848() {\r\n super.method_3848();\r\n }", "default boolean isSpecial() { return false; }", "public void method_6191() {\r\n super.method_6191();\r\n }", "protected void checkSubclass() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "protected Problem() {/* intentionally empty block */}", "public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */ }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "public void method_1449() {\r\n super.method_1449();\r\n }", "@Override\n protected Object clone() throws CloneNotSupportedException {\n\n return super.clone();\n }", "@Override\n\tpublic void jugar() {}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic TypeWrapper getSuperClass() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}", "@Override\n public Object clone() {\n return super.clone();\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\r\n\tprotected void parentMethod() {\n\t\tsuper.parentMethod();\r\n\t\tSystem.out.println(\"ChildParentMethod\");\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}", "protected abstract void _extends( ClassOutlineImpl derived, ClassOutlineImpl base );", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public Parent() {\n super();\n }", "protected Span() {/* intentionally empty block */}", "@Override\r\n\tpublic void makeChildcare() {\n\t\t\r\n\t}", "protected ReliedOnView() {}", "public abstract void wrapup();", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void avvia() {\n /** invoca il metodo sovrascritto della superclasse */\n super.avvia();\n }", "@Override\n\tpublic void some() {\n\t\t\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void imprimir() {\n\t\t\n\t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private ExtendedOperations(){}", "protected ValidationException() {\r\n\t\t// hidden\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tpublic void ligar() {\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 }" ]
[ "0.6709019", "0.6701645", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.6505796", "0.65048575", "0.65048575", "0.65048575", "0.6446566", "0.6446566", "0.6446566", "0.6446566", "0.6446566", "0.6446566", "0.6446566", "0.6446566", "0.6446566", "0.6446566", "0.6446566", "0.6446566", "0.6446566", "0.6446566", "0.6436677", "0.6417714", "0.63825774", "0.63825774", "0.63825774", "0.63804257", "0.62501514", "0.61229074", "0.6099919", "0.5992935", "0.5967553", "0.59460795", "0.5897765", "0.5886159", "0.5886159", "0.5886159", "0.58686566", "0.58553237", "0.58536303", "0.5849967", "0.5833559", "0.5827958", "0.5789788", "0.57875854", "0.57875854", "0.57875854", "0.57799035", "0.5776021", "0.577191", "0.5764135", "0.5754285", "0.5746211", "0.5741651", "0.57412696", "0.5726565", "0.5710018", "0.5710018", "0.5705236", "0.5696668", "0.5689568", "0.56870544", "0.5685401", "0.5681247", "0.56805634", "0.5679395", "0.56715024", "0.5651197", "0.56385076", "0.56173086", "0.56072754", "0.5594599", "0.5593745", "0.558563", "0.55838215", "0.55826026", "0.55808586", "0.55768466", "0.5567546", "0.5567546", "0.5545195", "0.5544955", "0.5544955", "0.5544955", "0.5544955", "0.5544955" ]
0.0
-1
Default constructor used when a post request is made
public Branch() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Post() {\n\t\t\n\t}", "public Post(){\n\n }", "public Postoj() {}", "private Request() {}", "private Request() {}", "public HttpPost() {\n super();\n parameters = new HashMap<>();\n }", "public Post() {\n }", "public DefaultNashRequestImpl() {\n\t\t\n\t}", "public Post()\n {\n }", "public DefaultHttpRequest() {\n }", "private Request() {\n initFields();\n }", "public Request(){\n\t\tthis(null, null, null);\n\t}", "public Request() {\n }", "public Request() {\n\n }", "public UBERequest() {\r\n }", "private RequestExecution() {}", "public Http()\n {\n numberOfParameters = -1;\n }", "public RequestDataBuilder post() {\n\t\tRequest request = new Request(urlPattern, RequestMethod.POST);\n\t\tmap.put(request, clazz);\n\t\treturn this;\n\t}", "public HttpPoster(final String url, final String requestData) {\n\t\tsuper(url, HttpMethod.POST, requestData);\n\t}", "public TboFlightSearchRequest() {\n}", "public Request<E, T> buildHttpPost ()\n\t{\n\t\treturn new HttpPostRequest<E, T>(this);\n\t}", "private Response() {}", "private Response() {}", "private Response() {\n initFields();\n }", "private Posts() {\n }", "public LogPoster() {\n\t\t\n\t}", "public ClearRequest() {\n // default constructor\n }", "private Reqbaz() {\n super(\"reqbaz\", null);\n }", "public postDetailsMB() {\n }", "public PostPagoResult() {\n}", "public CalccustoRequest()\r\n\t{\r\n\t}", "public MessageRequest() {\n\t}", "public JwtRequest() {\n\t}", "public AbstractRequestParser()\n {\n super();\n \n //set flag\n this.initialized=false;\n }", "@Override\n\tpublic Response construct() {\n\t\treturn null;\n\t}", "public MedPostTranslator() {}", "public HttpPoster(final URL url, final String requestData) {\n\t\tsuper(url, HttpMethod.POST, requestData);\n\t}", "public RESTWorkItemHandler() {\n\t}", "public JwtRequest()\n\t{\n\t\t\n\t}", "private HttpClient() {\n\t}", "private WebRequest() {\n initFields();\n }", "public AuthorizationRequest() { }", "public BasicResponse() {\n }", "protected HttpResponseImpl() {\n this(200, \"OK\", DEFAULT_CONTENT_TYPE);\n }", "public PickUpCasualtyRequest() {\n\n // empty\n }", "public NewDocumentRequestDto() {\n }", "public JsonHttpChannel(FromJsonHttp defaultConstructor) {\n this.defaultConstructor = defaultConstructor;\n }", "public Response() {\n objectMap = new JSONObject<>();\n }", "public PostRecord() {\n super(PostTable.POST);\n }", "public RPCRequest()\n\t{\n\t\tsuper();\n\t}", "public KorisniciREST() {\n }", "public Response(){\n\t\t// nothing needed\n\t}", "public LatestPost() {\n\t}", "public PostInformationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public RequestDatosUsuario(){\r\n\t\tsuper();\r\n\t}", "public JsonRequestSerializer() {\n this(JNC.GSON);\n }", "public JSONPostUtility(String requestURL)\n throws IOException {\n //call super constructor\n super(requestURL, \"POST\");\n //set the content type\n super.addHeader(\"Content-Type\", \"application/json;charset=\" + super.charset);\n super.addHeader(\"Accept\", \"application/json\");\n }", "public ButtonRequests() {\r\n this(null);\r\n }", "public Payload() {}", "public RequestAttribute() {\n }", "public PostModel(Connection connection) {\n this.connection = connection;\n }", "defaultConstructor(){}", "public PostBuilder() {\n httpClient = HttpClients.createDefault();\n httpPost = new HttpPost(localTesting ? \"http://localhost:8080\" : \"https://netflixstatistixserver.herokuapp.com\");\n attributes = new ArrayList<>();\n }", "private RESTBackend()\n\t\t{\n\t\t\t\n\t\t}", "public Request() {\n this.setRequestId(newRequestId());\n this.setRequestValue(0.0);\n this.date = new Date();\n }", "public RequestValues() {\n //mUserId = userId;\n }", "public RequestOptions() {}", "public GenericHandler() {\n\n }", "public QBXMLRequest() {\n }", "public RestService() {\r\n \r\n }", "public RestServiceClient(IServerResponse iResponse, Object[] values, String[] keys, String url, Activity activity,\n String loadingMessage) {\n this.iResponse = iResponse;\n this.values = values;\n this.keys = keys;\n this.url = url;\n this.activity = activity;\n this.loadingMessage = loadingMessage;\n isLoaderVisible = true;\n this.requestType = AppConstant.HTTP_POST;\n }", "private HTTPSession ()\n\t{\n\t\tthis (null, false, null);\n\t}", "public GetContactRequest()\r\n {\r\n }", "private AutoCompleteGalRequest() {\n this((String) null);\n }", "public QuestionContentRequest() {\n\t\tsuper();\n\t}", "public ChatRequest()\r\n\t{\r\n\t}", "public BoletoPaymentRequest() {\n\n }", "@Test\n public void constructor() {\n\n {\n NodeFullUpdateRequest tested = new NodeFullUpdateRequest();\n Assert.assertNull(tested.getRequest());\n }\n\n {\n FullUpdateRequest request = new FullUpdateRequest();\n NodeFullUpdateRequest tested = new NodeFullUpdateRequest(\"myNode\", request);\n Assert.assertEquals(request, tested.getRequest());\n }\n\n }", "public CompleteMultipartUploadRequest() {}", "public JsonFactory() { this(null); }", "public Payload() {\n\t}", "public API() {}", "private Instantiation(){}", "public JsonField() {\n }", "private SingleObject(){}", "public ApiResponse() {\n }", "public UpdateTrackingResp() {\n }", "protected RestClient() {\n }", "public PostViewBean() {\n }", "private Default()\n {}", "protected Review() {}", "private APIClient() {\n }", "public JsonHttpChannel() {\n this.defaultConstructor = new JsonHttpEventFactory();\n }", "public interface PostRequest {}", "public DataRequest() {\n\t\tfilters = new ArrayList<FilteringRule>();\n\t\tsort_by = new ArrayList<SortingRule>();\n\t}", "public ProfileRequests() {\n }", "public HSRCreateDraftRequestProcessorAction() {\n\t\tlogger.warn(\"***** This constructor is for Test Cases only *****\");\n\t\t\n\t}", "public OreAPI() {\n\t\tthis(DEFAULT_URL, null);\n\t}", "private PredictRequest() {\n\t}", "public SolicitudREST() {\n gson = new Gson();\n sdao= new SolicitudDAO();\n }", "public PostOffice() {\n }" ]
[ "0.73193", "0.7157657", "0.715366", "0.70845634", "0.70845634", "0.70843375", "0.70573425", "0.7001106", "0.6989935", "0.69764775", "0.6887765", "0.68860775", "0.6759417", "0.6735371", "0.651846", "0.6476664", "0.64489543", "0.6445956", "0.6354163", "0.6340268", "0.6337493", "0.6329002", "0.6329002", "0.63241965", "0.6317849", "0.63027215", "0.6290155", "0.6287759", "0.626681", "0.6240118", "0.6218815", "0.6217253", "0.6207995", "0.6200211", "0.6158211", "0.6150282", "0.61490244", "0.6146829", "0.61453855", "0.6138625", "0.6132066", "0.6114399", "0.60962796", "0.6052717", "0.60499865", "0.6049468", "0.6032814", "0.60265213", "0.60197544", "0.60168314", "0.6015583", "0.6009075", "0.59639245", "0.5956792", "0.5939078", "0.5933322", "0.5916353", "0.58982253", "0.58964264", "0.5885201", "0.5883198", "0.58772516", "0.5874821", "0.5865515", "0.58627343", "0.58608145", "0.5860446", "0.5853497", "0.58482355", "0.58477086", "0.58446324", "0.5843051", "0.5839332", "0.5830751", "0.5819884", "0.58179426", "0.5817149", "0.57969385", "0.5793848", "0.5787034", "0.57852507", "0.57808936", "0.5772402", "0.5764925", "0.5764153", "0.5757581", "0.57536405", "0.5750618", "0.5744332", "0.57381916", "0.5736286", "0.573628", "0.57324123", "0.57314926", "0.5731078", "0.5722978", "0.57104284", "0.5709007", "0.57059705", "0.5704299", "0.569854" ]
0.0
-1
create an empty config
public RelativeResourceHandlerConfig getRelativeResourceHandlerConfig() throws FacesException { RelativeResourceHandlerConfig config = new RelativeResourceHandlerConfig(); // parse the standard config file RelativeResourceHandlerConfigParser configParser = new RelativeResourceHandlerConfigParser(); try { configParser.parseClasspathResource(RelativeResourceHandler.CONFIG_FILE, config); } catch (Exception e) { throw new FacesException("Could not parse config file " + RelativeResourceHandler.CONFIG_FILE, e); } return config; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Config() {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}", "public GameConfig createDefaultConfig() {\n\n return null;\n }", "private Config() {\n }", "public MecBasicsConfig()\n {\n\n }", "public abstract CONFIG build();", "@Override\n\tpublic DataConfig createDefaultConfig() {\n\t\treturn new DataConfig();\n\t}", "public Config createConfig(String filename);", "public ConfigExample() {\n }", "private ConfigHelper() {\n //does nothing\n }", "public SimulationConfig() {\r\n\t}", "abstract public Config createConfig(String path);", "public OServerConfiguration() {}", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Configuration createConfiguration();", "@Override\n public AbstractConfiguration getEmptyConfiguration(\n DefaultConfigurationBuilder.ConfigurationDeclaration decl) throws Exception\n {\n throw new Exception(\"Unable to create configuration!\");\n }", "@NonNull\n\t\tConfig build();", "public Config() {\n this(System.getProperties());\n\n }", "private OptimoveConfig() {\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 }", "private GameConfig() {}", "public StorageConfig() {\n }", "@Override\n\tpublic GameConfig createDefaultConfig() {\n\n\t\t// Define the allowed player types\n\t\tArrayList<GamePlayerType> playerTypes = new ArrayList<GamePlayerType>();\n\n\t\tplayerTypes.add(new GamePlayerType(\"human player\") {\n\t\t\tpublic GamePlayer createPlayer(String name) {\n\t\t\t\treturn new GRHumanPlayer(name);\n\t\t\t}});\n\t\tplayerTypes.add(new GamePlayerType(\"Computer Player (easy)\") {\n\t\t\tpublic GamePlayer createPlayer(String name) {\n\t\t\t\treturn new GRComputerPlayer(name);\n\t\t\t}\n\t\t});\n\t\tplayerTypes.add(new GamePlayerType(\"Computer Player (normal)\") {\n\t\t\tpublic GamePlayer createPlayer(String name) {\n\t\t\t\treturn new GRComputerPlayerSmart(name);\n\t\t\t}\n\t\t});\n\n\t\t// Create a game configuration class for SlapJack\n\t\tGameConfig defaultConfig = new GameConfig(playerTypes, 2, 2, \"Gin Rummy\", PORT_NUMBER);\n\n\t\t// Add the default players\n\t\tdefaultConfig.addPlayer(\"Human\", 0);\n\t\tdefaultConfig.addPlayer(\"Computer\", 1);\n\n\t\t// Set the initial information for the remote player\n\t\tdefaultConfig.setRemoteData(\"Guest\", \"\", 1);\n\n\t\t//done!\n\t\treturn defaultConfig;\n\t}", "void init(Config config);", "public PushPluginConfigurationImpl() {\n }", "public Adsconfig() {\n this(\"AdsConfig\", null);\n }", "private void configInit() {\r\n\t\tconfig = pluginInstance.getConfiguration();\r\n\t\tif (!new File(pluginInstance.getDataFolder().getPath() + File.separator + \"config.yml\")\r\n\t\t\t\t.exists()) {\r\n\t\t\tconfig.setProperty(\"reset-deathloc\", true);\r\n\t\t\tconfig.setProperty(\"use-iConomy\", true);\r\n\t\t\tconfig.setProperty(\"creation-price\", 10.0D);\r\n\t\t\tconfig.setProperty(\"deathtp-price\", 50.0D);\r\n\t\t\tconfig.setProperty(\"allow-tp\", true);\r\n\t\t\tconfig.setProperty(\"maxTombStone\", 0);\r\n\t\t\tconfig.setProperty(\"TombKeyword\", \"[Tomb]\");\r\n\t\t\tconfig.setProperty(\"use-tombAsSpawnPoint\", true);\r\n\t\t\tconfig.setProperty(\"cooldownTp\", 5.0D);\r\n\t\t\tconfig.setProperty(\"reset-respawn\", false);\r\n\t\t\tconfig.setProperty(\"maxDeaths\", 0);\r\n\t\t\tconfig.save();\r\n\t\t\tworkerLog.info(\"Config created\");\r\n\t\t}\r\n\t\tconfig.load();\r\n\t}", "public ConfigAction()\n {\n this(null, null, true);\n }", "public ConfigManager() {\n // Nobody here.\n }", "public PanoramaConfig() {\n }", "public synchronized static void initConfig() {\n\t\tMap<CatPawConfigProperty, String> initialValues = new HashMap<CatPawConfigProperty, String>();\n\t\tinitConfig(initialValues);\n\t}", "public Conf() {\n createIfNotExists = false;\n deleteInputOnSuccess = false;\n }", "private void initalConfig() {\n \t\tconfig = new Configuration(new File(getDataFolder(),\"BeardStat.yml\"));\n \t\tconfig.load();\n \t\tconfig.setProperty(\"stats.database.type\", \"mysql\");\n \t\tconfig.setProperty(\"stats.database.host\", \"localhost\");\n \t\tconfig.setProperty(\"stats.database.username\", \"Beardstats\");\n \t\tconfig.setProperty(\"stats.database.password\", \"changeme\");\n \t\tconfig.setProperty(\"stats.database.database\", \"stats\");\n \n \t\tconfig.save();\n \t}", "private ConfigProperties() {\n\n }", "public ConfigProfile buildProfileDefault() {\n this.topics = \"mytopic\";\n this.token = \"mytoken\";\n this.uri = \"https://dummy:8088\";\n this.raw = false;\n this.ack = true;\n this.indexes = \"\";\n this.sourcetypes = \"\";\n this.sources = \"\";\n this.httpKeepAlive = true;\n this.validateCertificates = true;\n this.hasTrustStorePath = true;\n this.trustStorePath = \"./src/test/resources/keystoretest.jks\";\n this.trustStoreType = \"JKS\";\n this.trustStorePassword = \"Notchangeme\";\n this.eventBatchTimeout = 1;\n this.ackPollInterval = 1;\n this.ackPollThreads = 1;\n this.maxHttpConnPerChannel = 1;\n this.totalHecChannels = 1;\n this.socketTimeout = 1;\n this.enrichements = \"ni=hao,hello=world\";\n this.enrichementMap = new HashMap<>();\n this.trackData = true;\n this.maxBatchSize = 1;\n this.numOfThreads = 1;\n this.lineBreaker = \"\\n\";\n return this;\n }", "@Test\n public void DefaultConfig() {\n ConfigHolder configHolder = ConfigHolder.getInstance();\n JWTGenerator jwtGenerator = JWTGenerator.newBuilder()\n .setEnable(true)\n .addKeypairs(Keypair.newBuilder()\n .setPublicCertificatePath(certPath)\n .setUseForSigning(true)\n .buildPartial())\n .build();\n ConfigHolder.load(Config.newBuilder().setJwtGenerator(jwtGenerator).buildPartial());\n Assert.assertTrue(\"JWT Configuration wasn't enabled\",\n configHolder.getConfig().getJwtConfigurationDto().isEnabled());\n Assert.assertEquals(\"Failed to generate single JWKS\", 1, configHolder.getConfig()\n .getBackendJWKSDto().getJwks().getKeys().size());\n }", "private Config()\n {\n try\n {\n // Load settings from file\n load();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "public KafkaConfig() { }", "public ManagedConfiguration createConfiguration() throws SmartFrogException, RemoteException {\n return ManagedConfiguration.createConfiguration(this, true, isClusterRequired(), false);\n }", "public void initialConfig() {\n }", "private AppConfigContent() {}", "public static SPSConfig createSPSConfig() {\n return new SPSConfig();\n }", "void init (Map<String, String> conf) throws ConfigException;", "public AbstractRepositoryImplConfig() {\n\t}", "abstract public Config createConfigFromString(String data);", "public static AppTest create(Config config) {return null;}", "public synchronized static void initConfig() {\n SeLionLogger.getLogger().entering();\n Map<ConfigProperty, String> initialValues = new HashMap<>();\n\n initConfig(initialValues);\n\n SeLionLogger.getLogger().exiting();\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}", "com.google.protobuf.Any getNewConfig();", "protected Configuration() {\r\n }", "private Conf() {\n // empty hidden constructor\n }", "private ProjectConfigurationFactory()\n {}", "private static void initConfig() {\n /*\n * Human IO\n */\n {\n /*\n * Constants\n */\n {\n /*\n * Joysticks\n */\n {\n addToConstants(\"joysticks.left\", 0);\n addToConstants(\"joysticks.right\", 1);\n addToConstants(\"joysticks.operator\", 2);\n }\n\n /*\n * Buttons and axis\n */\n {\n }\n }\n }\n\n /*\n * RobotIO\n */\n {\n /*\n * Constants\n */\n {\n /*\n * Kicker\n */\n addToConstantsA(\"kicker.encoder.distPerPulse\", 360.0 / 1024.0);\n }\n }\n\n /*\n * Chassis\n */\n {\n /*\n * Constants\n */\n {\n }\n\n /*\n * Variables\n */\n {\n }\n }\n\n /*\n * Kicker\n */\n {\n /*\n * Constants\n */\n {\n addToConstants(\"kicker.kick.normal\", 1.75);\n addToConstants(\"kicker.kick.timeout\", 0.75);\n\n addToConstants(\"kicker.shaken.voltage\", -0.3316);\n addToConstants(\"kicker.shaken.tolerance\", 3.0);\n\n addToConstants(\"kicker.zero.voltage\", 0.8);\n addToConstants(\"kicker.zero.duration\", 0.75);\n }\n\n /*\n * Variables\n */\n {\n }\n }\n\n /*\n * Gripper\n */\n {\n /*\n * Constants\n */\n {\n addToConstants(\"gripper.collection.voltage\", 0.82);\n addToConstants(\"gripper.ejection.voltage\", -0.45);\n }\n }\n }", "private void initConfiguration() {\n\t\tseedList = new ArrayList<String>();\n\t\t// TODO: add other initialization here...\n\t}", "public OlcDistProcConfig()\n {\n super();\n }", "private void config() {\n\t}", "public GeneralConfig() {\n super(CyclopsCore._instance, true, \"general\", null, GeneralConfig.class);\n }", "private ConfigurationKeys() {\n // empty constructor.\n }", "void initialize(C config);", "public WorkflowConfiguration() {\n\t\t\n\t}", "private void initConfig() {\n Path walletPath;\n Wallet wallet;\n\n // load a CCP\n Path networkConfigPath; \n \n try {\n \t\n \tif (!isLoadFile) {\n // Load a file system based wallet for managing identities.\n walletPath = Paths.get(\"wallet\");\n wallet = Wallet.createFileSystemWallet(walletPath);\n\n // load a CCP\n networkConfigPath = Paths.get(\"\", \"..\", \"basic-network\", configFile);\n \n builder = Gateway.createBuilder();\n \n \tbuilder.identity(wallet, userId).networkConfig(networkConfigPath).discovery(false);\n \t\n \tisLoadFile = true;\n \t}\n } catch (Exception e) {\n \te.printStackTrace();\n \tthrow new RuntimeException(e);\n }\n\t}", "public GenAmazonS3Config() {\n }", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "Pair<T, U> build() throws IOException, ConfigurationException;", "public static Config createJeruslaemConfig() {\n\t\tConfig config = ConfigUtils.createConfig();\n\n\t\tconfig.network().setInputFile(INPUT_NETWORK);\n\t\tconfig.plans().setInputFile(INPUT_POPULATION);\n\t\tconfig.facilities().setInputFile(INPUT_FACILITES);\n\t\tconfig.households().setInputFile(INPUT_HOUSEHOLDS);\n\n\t\t// modify controler\n\t\tconfig.controler().setWriteEventsInterval(25);\n\t\tconfig.controler().setWritePlansInterval(25);\n\t\tconfig.controler().setEventsFileFormats(EnumSet.of(EventsFileFormat.xml));\n\t\tconfig.controler().setOutputDirectory(OUTPUT_FOLDER + RUN_ID + \"/\");\n\t\tconfig.controler().setOverwriteFileSetting(OverwriteFileSetting.overwriteExistingFiles);\n\t\tconfig.controler().setFirstIteration(0);\n\t\tconfig.controler().setLastIteration(300);\n\t\tconfig.controler().setMobsim(\"qsim\");\n\t\tconfig.controler().setRoutingAlgorithmType(RoutingAlgorithmType.FastAStarLandmarks);\n\t\tconfig.controler().setRunId(RUN_ID);\n\t\t\n\t\t// modify Qsim\n\t\tconfig.qsim().setStartTime(0.0);\n\t\tconfig.qsim().setEndTime(30 * 3600);\n\t\tconfig.qsim().setFlowCapFactor(0.3);\n\t\tconfig.qsim().setStorageCapFactor(Math.pow(0.3, 0.75));\n\t\tconfig.qsim().setNumberOfThreads(12);\n\t\tconfig.qsim().setSnapshotPeriod(1);\n\t\tconfig.qsim().setStuckTime(10);//30,60 or multiply by 60\n\t\tconfig.qsim().setRemoveStuckVehicles(false);\n\t\tconfig.qsim().setTimeStepSize(1);\n\t\tconfig.qsim().setTrafficDynamics(TrafficDynamics.kinematicWaves);// kinematic waves\n\t\tconfig.qsim().setMainModes(Arrays.asList(TransportMode.car));\n\t\tconfig.qsim().setInsertingWaitingVehiclesBeforeDrivingVehicles(true);\n\n\t\t// modify global\n\t\tconfig.global().setCoordinateSystem(\"EPSG:2039\");\n\t\tconfig.global().setNumberOfThreads(16);\n\t\t// ?? random seed?<param name=\"randomSeed\" value=\"4711\" />\n\t\t\n\t\t// Add transit\n\t\tconfig.transit().setUseTransit(true);\n\t\tconfig.transit().setTransitScheduleFile(INPUT_TRANSIT_SCHEDULE);\n\t\tconfig.transit().setVehiclesFile(INPUT_TRANSIT_VEHICLES);\n\t\t\n\n\n//\t\t// Add sub-tour mode choice\n//\t\tconfig.subtourModeChoice()\n//\t\t\t\t.setModes(new String[] { TransportMode.car, TransportMode.pt, TransportMode.walk, TransportMode.bike });\n//\t\t// TODO check that bike is biycle\n//\t\tconfig.subtourModeChoice().setChainBasedModes(new String[] { TransportMode.car });\n//\n\t\t// Add sub-tour mode choice\n\t\tconfig.timeAllocationMutator().setMutationRange(3600);\n\n\t\t// Add strategy\n\t\tconfig.strategy().setMaxAgentPlanMemorySize(5);\n\t\tconfig.strategy().setFractionOfIterationsToDisableInnovation(0.8);\n\n\t\t// Add strategy - plan selector\n\t\tStrategySettings changeExpStrategy = new StrategySettings();\n\t\tchangeExpStrategy.setDisableAfter(-1);\n\t\tchangeExpStrategy.setStrategyName(DefaultPlanStrategiesModule.DefaultSelector.ChangeExpBeta.toString());\n\t\tchangeExpStrategy.setWeight(0.8);\n\t\tconfig.strategy().addStrategySettings(changeExpStrategy);\n\n//\t\t Add strategy - time-mutation\n\t\tStrategySettings timeMutatorStrategy = new StrategySettings();\n\t\ttimeMutatorStrategy\n\t\t\t\t.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.TimeAllocationMutator.toString());\n\t\ttimeMutatorStrategy.setWeight(0.1);\n\t\tconfig.strategy().addStrategySettings(timeMutatorStrategy);\n\n\t\t// Add strategy - re-route\n\t\tStrategySettings reRouteStrategy = new StrategySettings();\n\t\treRouteStrategy.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.ReRoute.toString());\n\t\treRouteStrategy.setWeight(0.1);\n\t\tconfig.strategy().addStrategySettings(reRouteStrategy);\n\n//\t\t Add strategy - Sub-tour strategy\n\t\tStrategySettings subTourModeChoiceStrategy = new StrategySettings();\n\t\tsubTourModeChoiceStrategy\n\t\t\t\t.setStrategyName(DefaultPlanStrategiesModule.DefaultStrategy.SubtourModeChoice.toString());\n\t\tsubTourModeChoiceStrategy.setWeight(0.1);\n\t\tconfig.strategy().addStrategySettings(subTourModeChoiceStrategy);\n\n\t\t// add car Availability after adding attributes to popualtion\n\t\t config.subtourModeChoice().setConsiderCarAvailability(true);\n\n\t\t// add network modes which are simulated on network in future add more modes\n\t\t// config.plansCalcRoute().setNetworkModes(Arrays.asList(TransportMode.car));\n\t\t// config.plansCalcRoute().setInsertingAccessEgressWalk(true);\n\n\t\t// // just a place hodler\n\t\t// ModeRoutingParams taxiModeRoute = new ModeRoutingParams();\n\t\t// taxiModeRoute.setMode(TransportMode.taxi);\n\t\t// taxiModeRoute.setTeleportedModeSpeed(100.0);\n\t\t// config.plansCalcRoute().addModeRoutingParams(taxiModeRoute);\n\n\t\t// global scoring values taken from TLVM model = SF 14\n\t\tconfig.planCalcScore().setEarlyDeparture_utils_hr(0.0);\n\t\tconfig.planCalcScore().setLateArrival_utils_hr(0);\n\t\tconfig.planCalcScore().setMarginalUtilityOfMoney(0.062);\n\t\tconfig.planCalcScore().setPerforming_utils_hr(0.96);\n\t\tconfig.planCalcScore().setUtilityOfLineSwitch(0);\n\t\tconfig.planCalcScore().setMarginalUtlOfWaitingPt_utils_hr(-0.18);\n\n\t\t// car scoring functions from TLVM model = SF 14\n\t\tPlanCalcScoreConfigGroup.ModeParams carCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.car);\n\t\tcarCalcScoreParams.setConstant(-0.562);\n\t\tcarCalcScoreParams.setMode(\"car\");\n\t\tcarCalcScoreParams.setMonetaryDistanceRate(-0.0004);\n\t\tconfig.planCalcScore().addModeParams(carCalcScoreParams);\n\n\t\t// PT scoring functions from TLVM model = SF 14\n\t\tPlanCalcScoreConfigGroup.ModeParams ptCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.pt);\n\t\tptCalcScoreParams.setConstant(-0.124);\n\t\tptCalcScoreParams.setMode(\"pt\");\n\t\tptCalcScoreParams.setMarginalUtilityOfTraveling(-0.18);\n\t\tconfig.planCalcScore().addModeParams(ptCalcScoreParams);\n\n\t\t// Walk scoring functions from TLVM model = SF 14\n\t\tPlanCalcScoreConfigGroup.ModeParams walkCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.walk);\n\t\twalkCalcScoreParams.setMode(\"walk\");\n\t\twalkCalcScoreParams.setMarginalUtilityOfTraveling(-1.14);\n\t\tconfig.planCalcScore().addModeParams(walkCalcScoreParams);\n\n\t\t// TODO get values for Taxi scoring\n\t\t// Taxi scoring functions place holder (taken from car)\n\t\t// PlanCalcScoreConfigGroup.ModeParams TaxiCalcScoreParams = new\n\t\t// PlanCalcScoreConfigGroup.ModeParams(TransportMode.taxi);\n\t\t// TaxiCalcScoreParams.setConstant(-0.562);\n\t\t// TaxiCalcScoreParams.setMode(\"taxi\");\n\t\t// TaxiCalcScoreParams.setMonetaryDistanceRate(-0.0004);\n\t\t// config.planCalcScore().addModeParams(walkCalcScoreParams);\n\n\t\t// TODO add ride as network mode remove from modechoice\n\t\t// Ride scoring functions place holder taken from Berlin MATSim model -\n\t\t// monetaryDistanceRate same as car -0.0004\n\t\tPlanCalcScoreConfigGroup.ModeParams rideCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.ride);\n\t\trideCalcScoreParams.setMode(\"ride\");\n\t\trideCalcScoreParams.setMonetaryDistanceRate(-0.0004);\n\t\tconfig.planCalcScore().addModeParams(rideCalcScoreParams);\n\n\t\t// TODO check with JLM bike - bicyle\n\t\t// bike scoring functions place holder taken from Berlin MATSim model of bicyke\n\t\tPlanCalcScoreConfigGroup.ModeParams bikeCalcScoreParams = new PlanCalcScoreConfigGroup.ModeParams(\n\t\t\t\tTransportMode.bike);\n\t\tbikeCalcScoreParams.setConstant(-1.9);\n\t\tbikeCalcScoreParams.setMode(\"bike\");\n\t\tconfig.planCalcScore().addModeParams(bikeCalcScoreParams);\n\n\t\t// TODO get activities open hours\n\t\tActivityParams home = new ActivityParams(\"home\");\n\t\thome.setTypicalDuration(16 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(home);\n\n\t\tActivityParams work = new ActivityParams(\"work\");\n\t\twork.setOpeningTime(6 * 3600);\n\t\twork.setClosingTime(20 * 3600);\n\t\twork.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(work);\n\n\t\tActivityParams school = new ActivityParams(\"school\");\n\t\tschool.setOpeningTime(8 * 3600);\n\t\tschool.setClosingTime(14 * 3600);\n\t\tschool.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(school);\n\n\t\tActivityParams leisure = new ActivityParams(\"leisure\");\n\t\tleisure.setOpeningTime(9 * 3600);\n\t\tleisure.setClosingTime(24 * 3600);\n\t\tleisure.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(leisure);\n\n\t\tActivityParams other = new ActivityParams(\"other\");\n\t\tother.setTypicalDuration(8 * 60 * 60);\n\t\tconfig.planCalcScore().addActivityParams(other);\n\n\t\treturn config;\n\n\t}", "protected Properties configure0() {\n return EMPTY_PROPERTIES;\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}", "ConfigModel createInstanceOfConfigModel();", "void config(Config config);", "private ConfigReader() {\r\n\t\tsuper();\r\n\t}", "@Test(expectedExceptions = IllegalArgumentException.class)\n public void testCreateConfigElementNoOptions() throws Throwable {\n // construct the service\n constructClientService();\n\n server.enqueue(new MockResponse());\n\n // Invoke operation with null options model (negative test)\n secretsManagerService.createConfigElement(null).execute();\n }", "public void testConfigurationExceptionCtor1_Basic() {\n // check null here.\n assertNotNull(\"Create ConfigurationException failed.\",\n new ConfigurationException(TEST_MESSAGE));\n }", "public void newConfig ()\n {\n Class<?> clazz = group.getRawConfigClasses().get(0);\n try {\n ManagedConfig cfg = (ManagedConfig)PreparedEditable.PREPARER.apply(\n clazz.newInstance());\n if (cfg instanceof DerivedConfig) {\n ((DerivedConfig)cfg).cclass = group.getConfigClass();\n }\n newNode(cfg);\n } catch (Exception e) {\n log.warning(\"Failed to instantiate config [class=\" + clazz + \"].\", e);\n }\n }", "protected Configuration createConfiguration()\r\n/* 76: */ {\r\n/* 77:119 */ this.configuration_d.setNumOfIterations(Integer.parseInt(this.jTextField1.getText()));\r\n/* 78:120 */ this.configuration_d.setPopulationSize(Integer.parseInt(this.popSize_d.getText()));\r\n/* 79:121 */ ((GAConfiguration)this.configuration_d).setCrossoverThreshold(Double.valueOf(this.jTextField2.getText()).doubleValue());\r\n/* 80:122 */ ((GAConfiguration)this.configuration_d).setMutationThreshold(Double.valueOf(this.jTextField3.getText()).doubleValue());\r\n/* 81:123 */ ((GAConfiguration)this.configuration_d).setMethod((String)this.methodList_d.getSelectedItem());\r\n/* 82:124 */ return this.configuration_d;\r\n/* 83: */ }", "public StorageConfiguration() {\n }", "private void setDefaultConfiguration(){\n\t\tthis.setProperty(\"DefaultNodeCapacity\", \"5\");\n\t\tthis.setProperty(\"ReplicaNumber\", \"3\");\n\t\tthis.setProperty(\"JobReattemptTimes\", \"2\");\n\t\tthis.setProperty(\"ReducerCount\", \"3\");\n\t}", "public PipelineConfig() {\n super();\n }", "public void createMiniKdcConf() {\n\t\tconf = MiniKdc.createConf();\n\t}", "public SimpleXMLPipelineConfiguration() {\n configurations = new HashMap();\n }", "Config(InfoHandler info){\n \n this.info = info;\n \n config_list = new ArrayList<>();\n \n File test = new File(config_path);\n \n if(test.exists()){ //plik istnieje\n \n info.mode=1; //wlaczenie trybu dla obslugi pliku konfiguracyjnego\n \n \n //tutaj pobieranie informacji z pliku konfiguracyjnego\n //do ciała funkcji\n \n config_file = new DictReader(config_path,info);\n \n //tutaj dodajemy funkcjonalnosci\n \n config_list.add(config_file.szukaj(\"%imie\"));\n config_list.add(config_file.szukaj(\"%dict_path\"));\n \n config = get_config();\n \n info.mode=0;\n \n is_alive = true;\n }\n else{\n config = new ArrayList<>();\n config_file = new DictReader(config_path,info);\n first_start = 1;\n }\n }", "private void createConfig(File fileName) {\n\t\tthis.getConfig().set(\"Auto-update\", false);\n \n\t\t// setting a String\n\t\tString announcerName = \"&6[&cBroadcast&5Ex&6]&f: \";\n\t\tthis.getConfig().set(\"Announcer Name\", announcerName);\n \n\t\t// setting an int value\n\t\tint Interval = 10;\n\t\tthis.getConfig().set(\"Interval\", Interval);\n \n\t\t// Setting a List of Strings\n\t\t// The List of Strings is first defined in this array\n\t\tList<String> Messages = Arrays.asList(\"Hello World\", \"Powered by BroadcastEx\", \"&dColor codes &fare compatible :)\");\n\t\tthis.getConfig().set(\"Messages\", Messages);\n\t\tthis.saveConfig();\n\t}", "@Override\n public void init() throws Exception {\n config = new Config();\n }", "public E4KTunerConfiguration()\n\t{\n\t\tthis( \"Default\" );\n\t}", "private OspfConfigUtil() {\n\n }", "private ConfigurationObject createObject(String name, String type) throws Exception {\r\n ConfigurationObject object = new DefaultConfigurationObject(name);\r\n object.setPropertyValue(PROPERTY_TYPE, type);\r\n\r\n return object;\r\n }", "public ConfigParserHandler() {\n\t}", "private RelayConfig () {}", "public AntConfiguration(){\n this.channelID1 = new ChannelID(); //initially set all parameters of Channel ID to 0\n this.channelID2 = new ChannelID(); //initially set all parameters of Channel ID to 0\n\n this.channelAssigned1 = new Channel(); //initially do not assign any cha\n this.channelAssigned2 = new Channel(); //initially do not assign any channel\n\n this.channelPeriod = 4; //set to 4Hz by default\n this.level = PowerLevel.NEGTWENTY; //set to -20dB as default\n this.state1 = ChannelState.UNASSIGNED;\n this.state2 = ChannelState.UNASSIGNED;\n\n }", "com.google.protobuf.AnyOrBuilder getNewConfigOrBuilder();", "public abstract Configuration configuration();", "public static YamlConfiguration createConfig(String name) {\r\n if (!name.endsWith(\".yml\")) {\r\n \tname += \".yml\";\r\n }\r\n \r\n if (plugin.getResource(name) != null){\r\n \tplugin.saveResource(name, false);\r\n \treturn getConfig(name);\r\n } else {\r\n \tFile file = new File(plugin.getDataFolder(),name);\r\n if (!file.exists()) {\r\n plugin.getDataFolder().mkdir();\r\n try {\r\n file.createNewFile();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n return YamlConfiguration.loadConfiguration(file);// returns the newly created configuration object.\r\n }\r\n }", "private void setupNoConfigCPoints() {\n for (int i = NUM_DEVICES / 2 + 2; i <= NUM_DEVICES; i++) {\n ConnectPoint connectPoint = new ConnectPoint(\n getDeviceId(i),\n PortNumber.portNumber(1));\n noConfigCPoints.add(connectPoint);\n }\n }", "@Test\n public void initWithDefaultConfiguration() throws Exception {\n WifiApConfigStore store = new WifiApConfigStore(\n mContext, mLooper.getLooper(), mBackupManagerProxy, mFrameworkFacade,\n mApConfigFile.getPath());\n verifyDefaultApConfig(store.getApConfiguration(), TEST_DEFAULT_AP_SSID);\n }", "public Config(Properties props) {\n entries = (Properties)props.clone();\n }", "Map<String, Object> createConfig(VirtualHost vhost, String configtype, Map<String, Object> doc);", "public ConfigMetadataProcessor() {\n }", "private FileObject makeConfigFile(TemplatePair p, NrfConfig configObj){\n ST tmpl_sd = getConfigGroup().getInstanceOf(\"sdk_config\");\n tmpl_sd.add(\"config\", configObj);\n FileObject sdk_config_file = new FileObject();\n sdk_config_file.setSubPath(\"config/\");\n sdk_config_file.setFileName( p.getValue()+\".h\");\n sdk_config_file.setContent(tmpl_sd.render());\n return sdk_config_file;\n }", "public BlobParserConfig() {\n\t\tthis.libraryPath = null;\n\t\tthis.parserClass = null;\n\t}", "public static AmqpTransportConfig create() {\n\t\tfinal AmqpTransportConfig res = new AmqpTransportConfig();\n\t\tres.setBuilder(BUILDER);\n\t\treturn res;\n\t}", "public Completable init() {\n\t\tLocalConfigModel localConfigModel = new LocalConfigModel()\n\t\t\t.setReadOnly(meshOptions.isStartInReadOnly());\n\t\treturn setActiveConfig(localConfigModel).ignoreElement();\n\t}", "@Override\r\n\t\t\tpublic Object construct() {\n\t\t\t\tXMLUtils xml = new XMLUtils();\r\n\t\t\t\tConfigBean cfg = xml.getconfigXML();\r\n\t\t\t\tFile f = new File(cfg.getFilepath());\r\n\t\t\t\tFile fs[];\r\n\t\t\t\tif (f.exists() && f.isFile()) {\r\n\t\t\t\t\tfs = f.getParentFile().listFiles();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tfs = f.listFiles();\r\n\t\t\t\t}\r\n\t\t\t\tif (fs != null) {\r\n\t\t\t\t\tfor (File of : fs) {\r\n\t\t\t\t\t\tif(MainFrame.getInstance().getManual().isSelected()){\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (of.isFile()) {\r\n\t\t\t\t\t\t\tMainFrame.getInstance().getProcess().start(of);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t}", "public NullConfigPathException() {\n }", "public GenLogServerConfig() {\n }" ]
[ "0.6872974", "0.68273354", "0.6672257", "0.66200703", "0.6574466", "0.6571913", "0.65362173", "0.653021", "0.6469782", "0.639636", "0.6386916", "0.6357662", "0.6338481", "0.63177866", "0.6310947", "0.6287323", "0.6209118", "0.6166047", "0.61320287", "0.61239755", "0.6113322", "0.6080386", "0.6071225", "0.6048231", "0.60349536", "0.6032832", "0.6003018", "0.59725237", "0.59684104", "0.59650284", "0.5930296", "0.5913514", "0.5875837", "0.5872009", "0.5869783", "0.58577", "0.58407176", "0.583719", "0.58222896", "0.5821998", "0.5816767", "0.5815224", "0.5814821", "0.5799934", "0.57985646", "0.5786685", "0.57758147", "0.5758828", "0.57411623", "0.5730118", "0.57237643", "0.5688982", "0.568792", "0.5673631", "0.567138", "0.56473243", "0.5638274", "0.5636854", "0.5624316", "0.5624083", "0.56190044", "0.5615938", "0.5615644", "0.56141824", "0.5589124", "0.5580222", "0.5572525", "0.55722755", "0.5565671", "0.55654544", "0.55470806", "0.55468816", "0.55446446", "0.5538547", "0.55321825", "0.55318797", "0.55091494", "0.55065084", "0.54936856", "0.54924446", "0.5489554", "0.54596096", "0.54517734", "0.5437426", "0.54342425", "0.5432692", "0.5430857", "0.54199535", "0.5415959", "0.5405762", "0.5390859", "0.53869957", "0.53857875", "0.5378278", "0.5375829", "0.5371873", "0.5365477", "0.5358349", "0.5354453", "0.5345236", "0.53443533" ]
0.0
-1
ADD BY FJC oyzh has deleted FJC's code since the structure of StdScore was changed.
public void setVolume(int volume) { this.volume = volume; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void saveScore() {\n\t\t\n\t}", "@Override\n\tpublic void saveScore() {\n\n\t}", "@Override\n\tpublic void readScore() {\n\t\t\n\t}", "@Override\n\tpublic void readScore() {\n\t\t\n\t}", "public static void createScore(){\n\t}", "public void addScore(int score);", "@Override\n\tpublic void checkScore() {\n\t\t\n\t}", "@Override\n\tpublic void loadScore() {\n\n\t}", "public void newScore()\n {\n score.clear();\n }", "public void addScore(String name, int score) {\n loadScoreFile();\n scores.add(new Score(name, score));\n updateScoreFile();\n }", "public void updateScore() {\n\n Main.rw.readFile();\n setScore(Main.rw.getStackInfo());\n\n\n }", "private void updateScore() {\n\t\tscoreString.updateString(Integer.toString(score));\n\t}", "public void addScore()\n {\n score += 1;\n }", "@Override\n\tpublic void printScore() {\n\n\t}", "public void setScore(int score) { this.score = score; }", "public void deleteScore() {\n\t\tthis.score = 0;\n\t}", "void addScore() throws ClassNotFoundException, SQLException, ParseException{\n /* \n TODO check if the score in the valid range\n TODO get the last entry and check if not the same\n TODO ADD option to custom the date\n TODO check if score not already in the HT (retrieve the lastElement)\n */\n \n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n if(this.updateValue){\n this.user.modifyScoreValue(this.date, \n Integer.parseInt(scoreField.getText().replaceAll(\"\\\\s+\",\"\")));\n }else{\n Date curr_date = new Date();\n this.user.addScore(dateFormat.format(curr_date).toString(), \n Integer.parseInt(scoreField.getText().replaceAll(\"\\\\s+\",\"\")));\n }\n \n \n }", "public static long addNormalScore(Score score, Context context) {\n ContentValues values = new ContentValues();\n //add the value to key\n values.put(\"pseudo\", score.getPseudo());\n values.put(\"score\", score.getScore());\n //Insert object to BDD with ContentValues\n\n return getDatabase(context).insert(\"NormalScore\", null, values);\n }", "public void addScore(Pair<String, Integer> score) {\n if (!this.list.isPresent()) {\n this.readScores();\n }\n final List<Pair<String, Integer>> list = this.list.get();\n list.add(score);\n this.sortScores(list);\n this.cutScores(list);\n this.list = Optional.of(list);\n\n this.toSave = true;\n }", "public void setScore(int newScore){\n\t\tthis.score = newScore;\n\t}", "public int getScore() {return score;}", "public int getScore() { return score; }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "Float getScore();", "@Override\n public int getScore() {\n return score;\n }", "float getScore();", "float getScore();", "public Score() {\n this.date = new Date();\n this.name = null;\n this.score = 0;\n }", "public void addScore(int score) {\n currentScore += score;\n }", "public void setScore(Float score) {\n this.score = score;\n }", "public ArrayList<Double> updateScores(int score){\n this.students.sort(Comparator.comparingDouble(Student::getScore).reversed());\n ArrayList<Double> scores = new ArrayList<>();\n for (Student s:this.students) {\n if(!s.getPlayer().getComponent(PlayerComponent.class).isDead()) s.setScore(s.getScore() + score);\n if (s.getScore() > this.globalBest) this.globalBest = s.getScore();\n scores.add(s.getScore());\n }\n return scores;\n }", "public void setScore(int score) {this.score = score;}", "public void addOneToScore() {\r\n score++;\r\n }", "public void setScore(String score) {\n\t\tthis.score = score;\n\t}", "@Test\n\tpublic void addScoreTest() {\n\t\tassertEquals(\"80.0 75.0 \", g1.toString());\n\t\tassertEquals(\"64.0 90.0 72.0 \", g2.toString());\n\t\tassertEquals(\"82.0 52.0 92.0 72.0 \", g3.toString());\n\t}", "public void addScore(){\n\n // ong nuoc 1\n if(birdS.getX() == waterPipeS.getX1() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX1() + 50){\n score++;\n bl = false;\n }\n\n //ong nuoc 2\n if(birdS.getX() == waterPipeS.getX2() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX2() + 50){\n score++;\n bl = false;\n }\n\n // ong nuoc 3\n if(birdS.getX() == waterPipeS.getX3() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX3() + 50){\n score++;\n bl = false;\n }\n\n }", "@Override\n\tpublic void inputScore() {\n\n\t}", "private void saveScore() {\n\t\tif (Serializer.deserialize(Main.SCORES_FILE)) {\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tArrayList<Integer> scores = (ArrayList<Integer>) Serializer\n\t\t\t\t\t.getRecovered();\n\n\t\t\tif (this.score > 0) {\n\t\t\t\tscores.add(this.score);\n\n\t\t\t\tSerializer.serialize(Main.SCORES_FILE, scores);\n\t\t\t}\n\t\t}\n\t}", "long getScore();", "long getScore();", "long getScore();", "long getScore();", "public abstract float getScore();", "public void setScore(float score) {\n this.score = score;\n }", "public Score getScore()\r\n { \r\n return theScore;\r\n }", "protected double newCompundScore(double score, double score2) {\n return score + score2;\n }", "public Score(){\n\t\tscore = 0;\n\t\tincrement = 0; //how many points for eating a kibble. Changed to zero here because adjustScoreIncrement's extra points begin at 1 anyway\n\t}", "public void setScore(int score) {\n this.score = score;\n }", "public int getScore(){ return this.score; }", "public void setScore(double score) {\r\n this.score = score;\r\n }", "@Override\n\tpublic int compareTo(Score s) {\n\t\treturn Double.compare(this.score, s.score);\n\t}", "public void addToScore(int score)\n {\n this.score += score;\n }", "public void setScore(int score)\n\t{\n\t\tthis.score=score;\n\t}", "public int getScore ()\r\n {\r\n\treturn score;\r\n }", "public void setScore(Double score) {\n this.score = score;\n }", "public float getScore(){return score;}", "protected void addScoreToLeaderboard() {\n\n\t\tif (onlineLeaderboard) {\n\t\t jsonFunctions = new JSONFunctions();\n\t\t jsonFunctions.setUploadScore(score);\n\t\t \n\t\t Handler handler = new Handler() {\n\t\t\t @Override\n\t\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\t ArrayList<Score> s = (ArrayList<Score>) msg.obj;\n\t\t\t\t globalScores = helper.sortScores(s);\n\t\t\t }\n\t\t };\n\t\t \n\t\t jsonFunctions.setHandler(handler);\n\t\t jsonFunctions\n\t\t\t .execute(\"http://brockcoscbrickbreakerleaderboard.web44.net/\");\n\t\t}\n\t\tsaveHighScore();\n }", "public void setScore(int score)\n {\n this.score = score;\n }", "public void addScore(int s) {\n setScore(getScore() + s);\n }", "public Scores(int score) {\r\n this.score = score;\r\n }", "public void calcScore(int score) {\r\n\t\tif (initFinish)\r\n\t\t\tthis.score += score * this.multy;\r\n\t\t// TODO delete\r\n//\t\tSystem.out.println(\"score: \" + this.score + \"multy: \" + this.multy);\r\n\t}", "void addScore(double score){\n\t\tsumScore+=score;\n\t\tnumScores++;\n\t\taverage = sumScore/numScores;\n\t}", "public void setScore(int score) {\r\n this.score = score;\r\n }", "public void setScore(int score) {\r\n this.score = score;\r\n }", "@Override\r\n\tpublic double getScore() {\n\t\treturn score;\r\n\t}", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(int score) {\n this.score = score;\n }", "public void setScore(Integer score) {\r\n this.score = score;\r\n }", "public void setScore(Integer score) {\n this.score = score;\n }", "public void setScore(Short score) {\n this.score = score;\n }", "public void setScore(int score){\n\t\tthis.score = score;\n\t}", "public final void addScore(int iScore) {\n\t\tscore += iScore;\n\t}", "private void setScore(String score) {\r\n this.score = score;\r\n }", "public void setScore(int paScore) {\n this.score = paScore;\n }", "public void setScore (java.lang.Float score) {\n\t\tthis.score = score;\n\t}", "public void setScore(int score) {\n\t\tthis.score = score;\n\t}", "public int getScore(){\r\n\t\treturn score;\r\n\t}", "public int getScore(){\r\n\t\treturn score;\r\n\t}", "public void changeScore(String score) {\n typeScore(score);\n saveChanges();\n }", "public void addScore(int score, String name){\n for(int i = 0; i < topScores.size(); i++) {\n if(score >= topScores.get(i)){\n topScores.add(i, score);\n topScores.remove(topScores.size()-1);\n if(name.isEmpty()){\n topName.add(i, \"Anonymous\");\n topName.remove(topName.size()-1);\n }else {\n topName.add(i, name);\n topName.remove(topName.size() - 1);\n }\n return;\n }\n }\n }", "public void setScore (java.lang.Integer score) {\r\n\t\tthis.score = score;\r\n\t}", "public void addScore(Double score) {\n this.scoreList.add(score);\n // each time a new score is added, sort it\n Collections.sort(scoreList, Collections.reverseOrder());\n }", "@Test\n public void addScoreTest() {\n assertTrue(enemyGameBoard.getScore() == 0); //Check if initial value of points = 0\n\n enemyGameBoard.addScore(false, false); //Did not hit a ship\n assertTrue(enemyGameBoard.getScore() == 0);\n\n enemyGameBoard.addScore(true, false); //Hit a ship, but the ship did not sink\n assertTrue(enemyGameBoard.getScore() == 1); \n\n enemyGameBoard.addScore(false, false); //Did not hit a ship, so points should stay 1\n assertTrue(enemyGameBoard.getScore() == 1); \n\n enemyGameBoard.addScore(true, true); //Hit a ship, and ship has been sunk\n assertTrue(enemyGameBoard.getScore() == 3);\n\n enemyGameBoard.addScore(false, false); //Did not hit a ship, so points should stay 3 after a ship has been sunk\n assertTrue(enemyGameBoard.getScore() == 3);\n\n enemyGameBoard.addScore(false, true); //Did not hit a ship, but did sunk the ship. This should not add any points to the score\n assertTrue(enemyGameBoard.getScore() == 3);\n }", "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "public void setScore (int newScore)\n {\n this.score = newScore;\n }", "public Score(String name, int score) {\n //set date to current date\n this.date = new Date();\n \n this.score = score;\n this.name = name;\n \n }", "void decreaseScore(){\n\t\tcurrentScore = currentScore - 10;\n\t\tcom.triviagame.Trivia_Game.finalScore = currentScore;\n\t}", "@Override\n\tpublic int compareTo(Score s) {\n\t\treturn totalSecs - s.totalSecs;\n\t}", "@Override\n\tpublic int updateScore(int score) {\n\t\t\n\t\t// decrease the score by this amount:\n\t\tscore -= 50;\n\t\t\n\t\treturn score;\n\t}", "int getScore();", "public void addScore(int n){\n\t\tscore += n;\n\t}", "public void addHighScore(String name, int score){\r\n // TODO: If the provided score is greater than the lowest high score,\r\n // TODO: then replace the lowest score with the new score and then\r\n // TODO: call the sortScores() method.\r\n \t\r\n \t\tscores[Settings.numScores-1]=score;\r\n \t\tnames[Settings.numScores-1]=name;\r\n \t\tsortScores();\r\n \t\t\r\n }", "public int getScore(){return score;}", "public int getScore(){return score;}", "public void rightScored()\n\t{\n\t\tscoreR++;\n\t}", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public Float getScore() {\n return score;\n }", "public int getScore(){\n return this.score;\n }", "public int getScore(){\n\t\treturn score;\n\t}" ]
[ "0.7140929", "0.7098488", "0.6935898", "0.6935898", "0.6902279", "0.68640226", "0.6832157", "0.6745205", "0.6727245", "0.6689802", "0.66592526", "0.66391444", "0.6609736", "0.6589511", "0.65839267", "0.6553135", "0.6538292", "0.65294117", "0.6512081", "0.6501308", "0.64991546", "0.64895463", "0.64838195", "0.64694333", "0.64629555", "0.64607143", "0.64607143", "0.6452914", "0.6450756", "0.6450454", "0.64480495", "0.6408565", "0.6405552", "0.6402599", "0.6402195", "0.6401835", "0.63995147", "0.63937604", "0.639193", "0.639193", "0.639193", "0.639193", "0.63895535", "0.63873535", "0.63800615", "0.6373193", "0.6372602", "0.63718873", "0.6370749", "0.6370398", "0.63698393", "0.6367057", "0.63670206", "0.63631016", "0.6363021", "0.6360048", "0.63592595", "0.63532996", "0.63473344", "0.6338101", "0.6324645", "0.6320629", "0.63177216", "0.63177216", "0.63173735", "0.63102686", "0.63102686", "0.63102686", "0.63102686", "0.63014627", "0.6300375", "0.6293674", "0.6292901", "0.6288265", "0.627425", "0.6269178", "0.6262448", "0.62617993", "0.62513447", "0.62513447", "0.62489945", "0.62486935", "0.6246489", "0.62441355", "0.6241196", "0.62233454", "0.6215015", "0.6212931", "0.62115586", "0.62046313", "0.6202494", "0.6201714", "0.6197235", "0.6197192", "0.61906785", "0.61906785", "0.6182293", "0.6181569", "0.6176822", "0.61728585", "0.6168819" ]
0.0
-1
088 0 5 1 00 100 1 6 1 00 name author 08805100 08805100 08805100 C Dm Em C4 Cadd
public String scoreTo8BitsStringNotes(){ String str = "", placeholder = "00",seperator = " "; for(StdNote tNote : musicTrack.get(0).noteTrack){ str += String.format("%03d",tNote.absolutePosition) + tNote.downFlatSharp + tNote.octave + tNote.dot + placeholder + seperator; //这里要这样写么?? if(tNote.barPoint == 1) str += ','; } return str.trim();//去掉前后空格 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "C2451d mo3408a(C2457e c2457e);", "void mo304a(C0366h c0366h);", "java.lang.String getField1697();", "java.lang.String getField1305();", "java.lang.String getField1128();", "java.lang.String getField1281();", "String mo20731c();", "private static String authorLine()\n {\n return String.format(STR_FORMAT_1 + STR_FORMAT_2, NAME_STR, NAME);\n }", "java.lang.String getField1665();", "java.lang.String getField1696();", "java.lang.String getField1283();", "public void mo1403c() {\n }", "java.lang.String getField1326();", "java.lang.String getField1662();", "void mo303a(C0237a c0237a, String str, String str2, String str3);", "java.lang.String getField1072();", "C8325a mo21498a(String str);", "java.lang.String getField1626();", "java.lang.String getField1328();", "void mo5289a(C5102c c5102c);", "public String toString()\r\n/* 438: */ {\r\n/* 439:522 */ return \"Luffa-\" + (getDigestLength() << 3);\r\n/* 440: */ }", "public void mo55254a() {\n }", "java.lang.String getField1631();", "public void mo97906c() {\n }", "java.lang.String getField1536();", "public String getName() {\n/* 50 */ return \"M\";\n/* */ }", "java.lang.String getField1397();", "java.lang.String getField1627();", "java.lang.String getField1603();", "java.lang.String getField1608();", "java.lang.String getField1658();", "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 }", "java.lang.String getField1322();", "java.lang.String getField1663();", "java.lang.String getField1332();", "String mo7390hn() throws RemoteException;", "java.lang.String getField1320();", "java.lang.String getField1110();", "C12000e mo41087c(String str);", "java.lang.String getField1606();", "public void mo9233aH() {\n }", "void baInfo(String text);", "java.lang.String getField1686();", "java.lang.String getField1629();", "java.lang.String getField1698();", "java.lang.String getField1602();", "java.lang.String getField1323();", "java.lang.String getField1365();", "java.lang.String getField1601();", "java.lang.String getField1321();", "java.lang.String getField1680();", "java.lang.String getField1666();", "void mo5290b(C5102c c5102c);", "java.lang.String getField1197();", "java.lang.String getField1396();", "java.lang.String getField1613();", "java.lang.String getField1316();", "java.lang.String getField1661();", "java.lang.String getField1651();", "java.lang.String getField1628();", "java.lang.String getField1380();", "@Override \n\t public String getDescription() {\n\t \t return \"(*.MXD)\"; \n\t }", "java.lang.String getField1324();", "java.lang.String getField1637();", "java.lang.String getField1683();", "java.lang.String getField1685();", "java.lang.String getField1297();", "java.lang.String getField1657();", "java.lang.String getField1682();", "String mo10312id();", "void mo1582a(String str, C1329do c1329do);", "java.lang.String getField1692();", "java.lang.String getField1394();", "java.lang.String getField1622();", "java.lang.String getField1652();", "java.lang.String getField1694();", "java.lang.String getField1690();", "java.lang.String getField1348();", "java.lang.String getField1327();", "void mo8712a(C9714a c9714a);", "java.lang.String getField1668();", "java.lang.String getField1609();", "java.lang.String getField1667();", "java.lang.String getField1607();", "@kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000T\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\t\\n\\u0002\\b\\u0007\\n\\u0002\\u0010\\u000b\\n\\u0002\\b\\u0005\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0005\\n\\u0002\\u0010 \\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\n\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\bv\\u0018\\u00002\\u00020\\u0001:\\u0004./01J\\b\\u0010,\\u001a\\u00020\\u000fH&J\\b\\u0010-\\u001a\\u00020\\u000fH&R\\u0014\\u0010\\u0002\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0004\\u0010\\u0005R\\u0012\\u0010\\u0006\\u001a\\u00020\\u0007X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\b\\u0010\\tR\\u0014\\u0010\\n\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000b\\u0010\\u0005R\\u0014\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\r\\u0010\\u0005R\\u0012\\u0010\\u000e\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u000e\\u0010\\u0010R\\u0012\\u0010\\u0011\\u001a\\u00020\\u000fX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0011\\u0010\\u0010R\\u0014\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0013\\u0010\\u0005R\\u0014\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u0016\\u0010\\u0017R\\u0014\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001a\\u0010\\u001bR\\u0014\\u0010\\u001c\\u001a\\u0004\\u0018\\u00010\\u001dX\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b\\u001e\\u0010\\u001fR\\u0014\\u0010 \\u001a\\u0004\\u0018\\u00010\\u0003X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b!\\u0010\\u0005R\\u0018\\u0010\\\"\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b$\\u0010%R\\u0014\\u0010&\\u001a\\u0004\\u0018\\u00010\\'X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b(\\u0010)R\\u0018\\u0010*\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030#X\\u00a6\\u0004\\u00a2\\u0006\\u0006\\u001a\\u0004\\b+\\u0010%\\u0082\\u0001\\u000223\\u00a8\\u00064\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent;\", \"Lcom/stripe/android/model/StripeModel;\", \"clientSecret\", \"\", \"getClientSecret\", \"()Ljava/lang/String;\", \"created\", \"\", \"getCreated\", \"()J\", \"description\", \"getDescription\", \"id\", \"getId\", \"isConfirmed\", \"\", \"()Z\", \"isLiveMode\", \"lastErrorMessage\", \"getLastErrorMessage\", \"nextActionData\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"getNextActionData\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"nextActionType\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"getNextActionType\", \"()Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"paymentMethod\", \"Lcom/stripe/android/model/PaymentMethod;\", \"getPaymentMethod\", \"()Lcom/stripe/android/model/PaymentMethod;\", \"paymentMethodId\", \"getPaymentMethodId\", \"paymentMethodTypes\", \"\", \"getPaymentMethodTypes\", \"()Ljava/util/List;\", \"status\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"getStatus\", \"()Lcom/stripe/android/model/StripeIntent$Status;\", \"unactivatedPaymentMethods\", \"getUnactivatedPaymentMethods\", \"requiresAction\", \"requiresConfirmation\", \"NextActionData\", \"NextActionType\", \"Status\", \"Usage\", \"Lcom/stripe/android/model/PaymentIntent;\", \"Lcom/stripe/android/model/SetupIntent;\", \"payments-core_release\"})\npublic abstract interface StripeIntent extends com.stripe.android.model.StripeModel {\n \n /**\n * Unique identifier for the object.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getId();\n \n /**\n * Time at which the object was created. Measured in seconds since the Unix epoch.\n */\n public abstract long getCreated();\n \n /**\n * An arbitrary string attached to the object. Often useful for displaying to users.\n */\n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getDescription();\n \n /**\n * Has the value true if the object exists in live mode or the value false if the object exists\n * in test mode.\n */\n public abstract boolean isLiveMode();\n \n /**\n * The expanded [PaymentMethod] represented by [paymentMethodId].\n */\n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.PaymentMethod getPaymentMethod();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getPaymentMethodId();\n \n /**\n * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getPaymentMethodTypes();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionType getNextActionType();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getClientSecret();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.Status getStatus();\n \n @org.jetbrains.annotations.Nullable()\n public abstract com.stripe.android.model.StripeIntent.NextActionData getNextActionData();\n \n /**\n * Whether confirmation has succeeded and all required actions have been handled.\n */\n public abstract boolean isConfirmed();\n \n @org.jetbrains.annotations.Nullable()\n public abstract java.lang.String getLastErrorMessage();\n \n /**\n * Payment types that have not been activated in livemode, but have been activated in testmode.\n */\n @org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getUnactivatedPaymentMethods();\n \n public abstract boolean requiresAction();\n \n public abstract boolean requiresConfirmation();\n \n /**\n * Type of the next action to perform.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\f\\b\\u0086\\u0001\\u0018\\u0000 \\u000e2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000eB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\r\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"RedirectToUrl\", \"UseStripeSdk\", \"DisplayOxxoDetails\", \"AlipayRedirect\", \"BlikAuthorize\", \"WeChatPayRedirect\", \"Companion\", \"payments-core_release\"})\n public static enum NextActionType {\n /*public static final*/ RedirectToUrl /* = new RedirectToUrl(null) */,\n /*public static final*/ UseStripeSdk /* = new UseStripeSdk(null) */,\n /*public static final*/ DisplayOxxoDetails /* = new DisplayOxxoDetails(null) */,\n /*public static final*/ AlipayRedirect /* = new AlipayRedirect(null) */,\n /*public static final*/ BlikAuthorize /* = new BlikAuthorize(null) */,\n /*public static final*/ WeChatPayRedirect /* = new WeChatPayRedirect(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionType.Companion Companion = null;\n \n NextActionType(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionType$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$NextActionType;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.NextActionType fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * - [The Intent State Machine - Intent statuses](https://stripe.com/docs/payments/intents#intent-statuses)\n * - [PaymentIntent.status API reference](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-status)\n * - [SetupIntent.status API reference](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-status)\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\b\\u0086\\u0001\\u0018\\u0000 \\u000f2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000fB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\nj\\u0002\\b\\u000bj\\u0002\\b\\fj\\u0002\\b\\rj\\u0002\\b\\u000e\\u00a8\\u0006\\u0010\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"Canceled\", \"Processing\", \"RequiresAction\", \"RequiresConfirmation\", \"RequiresPaymentMethod\", \"Succeeded\", \"RequiresCapture\", \"Companion\", \"payments-core_release\"})\n public static enum Status {\n /*public static final*/ Canceled /* = new Canceled(null) */,\n /*public static final*/ Processing /* = new Processing(null) */,\n /*public static final*/ RequiresAction /* = new RequiresAction(null) */,\n /*public static final*/ RequiresConfirmation /* = new RequiresConfirmation(null) */,\n /*public static final*/ RequiresPaymentMethod /* = new RequiresPaymentMethod(null) */,\n /*public static final*/ Succeeded /* = new Succeeded(null) */,\n /*public static final*/ RequiresCapture /* = new RequiresCapture(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Status.Companion Companion = null;\n \n Status(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Status$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Status;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Status fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n /**\n * See [setup_intent.usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) and\n * [Reusing Cards](https://stripe.com/docs/payments/cards/reusing-cards).\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0012\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0010\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\b\\u0086\\u0001\\u0018\\u0000 \\u000b2\\b\\u0012\\u0004\\u0012\\u00020\\u00000\\u0001:\\u0001\\u000bB\\u000f\\b\\u0002\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\b\\u0010\\u0007\\u001a\\u00020\\u0003H\\u0016R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006j\\u0002\\b\\bj\\u0002\\b\\tj\\u0002\\b\\n\\u00a8\\u0006\\f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage;\", \"\", \"code\", \"\", \"(Ljava/lang/String;ILjava/lang/String;)V\", \"getCode\", \"()Ljava/lang/String;\", \"toString\", \"OnSession\", \"OffSession\", \"OneTime\", \"Companion\", \"payments-core_release\"})\n public static enum Usage {\n /*public static final*/ OnSession /* = new OnSession(null) */,\n /*public static final*/ OffSession /* = new OffSession(null) */,\n /*public static final*/ OneTime /* = new OneTime(null) */;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String code = null;\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.Usage.Companion Companion = null;\n \n Usage(java.lang.String code) {\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getCode() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u001a\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0080\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0019\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\b\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0006H\\u0000\\u00a2\\u0006\\u0002\\b\\u0007\\u00a8\\u0006\\b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$Usage$Companion;\", \"\", \"()V\", \"fromCode\", \"Lcom/stripe/android/model/StripeIntent$Usage;\", \"code\", \"\", \"fromCode$payments_core_release\", \"payments-core_release\"})\n public static final class Companion {\n \n private Companion() {\n super();\n }\n \n @org.jetbrains.annotations.Nullable()\n public final com.stripe.android.model.StripeIntent.Usage fromCode$payments_core_release(@org.jetbrains.annotations.Nullable()\n java.lang.String code) {\n return null;\n }\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000&\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0007\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0006\\u0003\\u0004\\u0005\\u0006\\u0007\\bB\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0006\\t\\n\\u000b\\f\\r\\u000e\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"Lcom/stripe/android/model/StripeModel;\", \"()V\", \"AlipayRedirect\", \"BlikAuthorize\", \"DisplayOxxoDetails\", \"RedirectToUrl\", \"SdkData\", \"WeChatPayRedirect\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"payments-core_release\"})\n public static abstract class NextActionData implements com.stripe.android.model.StripeModel {\n \n private NextActionData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\r\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\'\\u0012\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u0012\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0007J\\t\\u0010\\r\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u000e\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u000b\\u0010\\u000f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J+\\u0010\\u0010\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u00052\\n\\b\\u0002\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0013\\u0010\\u0012\\u001a\\u00020\\u00132\\b\\u0010\\u0014\\u001a\\u0004\\u0018\\u00010\\u0015H\\u00d6\\u0003J\\t\\u0010\\u0016\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\t\\u0010\\u0017\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u001b2\\u0006\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\b\\u0010\\tR\\u0013\\u0010\\u0006\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000b\\u00a8\\u0006\\u001d\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$DisplayOxxoDetails;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"expiresAfter\", \"\", \"number\", \"\", \"hostedVoucherUrl\", \"(ILjava/lang/String;Ljava/lang/String;)V\", \"getExpiresAfter\", \"()I\", \"getHostedVoucherUrl\", \"()Ljava/lang/String;\", \"getNumber\", \"component1\", \"component2\", \"component3\", \"copy\", \"describeContents\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DisplayOxxoDetails extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The timestamp after which the OXXO expires.\n */\n private final int expiresAfter = 0;\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String number = null;\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String hostedVoucherUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails copy(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DisplayOxxoDetails() {\n super();\n }\n \n public DisplayOxxoDetails(int expiresAfter, @org.jetbrains.annotations.Nullable()\n java.lang.String number, @org.jetbrains.annotations.Nullable()\n java.lang.String hostedVoucherUrl) {\n super();\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int component1() {\n return 0;\n }\n \n /**\n * The timestamp after which the OXXO expires.\n */\n public final int getExpiresAfter() {\n return 0;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * The OXXO number.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getNumber() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component3() {\n return null;\n }\n \n /**\n * URL of a webpage containing the voucher for this OXXO payment.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getHostedVoucherUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.DisplayOxxoDetails[] newArray(int size) {\n return null;\n }\n }\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\t\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\u0017\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\u0002\\u0010\\u0006J\\t\\u0010\\u000b\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\f\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0003J\\u001f\\u0010\\r\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005H\\u00c6\\u0001J\\t\\u0010\\u000e\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\u0013\\u0010\\u0010\\u001a\\u00020\\u00112\\b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0013H\\u00d6\\u0003J\\t\\u0010\\u0014\\u001a\\u00020\\u000fH\\u00d6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0005H\\u00d6\\u0001J\\u0019\\u0010\\u0016\\u001a\\u00020\\u00172\\u0006\\u0010\\u0018\\u001a\\u00020\\u00192\\u0006\\u0010\\u001a\\u001a\\u00020\\u000fH\\u00d6\\u0001R\\u0013\\u0010\\u0004\\u001a\\u0004\\u0018\\u00010\\u0005\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0007\\u0010\\bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\n\\u00a8\\u0006\\u001b\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$RedirectToUrl;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"url\", \"Landroid/net/Uri;\", \"returnUrl\", \"\", \"(Landroid/net/Uri;Ljava/lang/String;)V\", \"getReturnUrl\", \"()Ljava/lang/String;\", \"getUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class RedirectToUrl extends com.stripe.android.model.StripeIntent.NextActionData {\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri url = null;\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> CREATOR = null;\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl copy(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n /**\n * Contains instructions for authenticating by redirecting your customer to another\n * page or application.\n */\n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public RedirectToUrl(@org.jetbrains.annotations.NotNull()\n android.net.Uri url, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component1() {\n return null;\n }\n \n /**\n * The URL you must redirect your customer to in order to authenticate.\n */\n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getUrl() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n /**\n * If the customer does not exit their browser while authenticating, they will be redirected\n * to this specified URL after completion.\n */\n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.RedirectToUrl[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0004\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0081\\b\\u0018\\u0000 \\\"2\\u00020\\u0001:\\u0001\\\"B#\\b\\u0010\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0006B+\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\b\\u0012\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\tJ\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000b\\u0010\\u0011\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\bH\\u00c6\\u0003J\\u000b\\u0010\\u0013\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J5\\u0010\\u0014\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\b2\\n\\b\\u0002\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0015\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\u0013\\u0010\\u0017\\u001a\\u00020\\u00182\\b\\u0010\\u0019\\u001a\\u0004\\u0018\\u00010\\u001aH\\u00d6\\u0003J\\t\\u0010\\u001b\\u001a\\u00020\\u0016H\\u00d6\\u0001J\\t\\u0010\\u001c\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001d\\u001a\\u00020\\u001e2\\u0006\\u0010\\u001f\\u001a\\u00020 2\\u0006\\u0010!\\u001a\\u00020\\u0016H\\u00d6\\u0001R\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\n\\u0010\\u000bR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\u000bR\\u0013\\u0010\\u0005\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000bR\\u0011\\u0010\\u0004\\u001a\\u00020\\b\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\u000f\\u00a8\\u0006#\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"data\", \"\", \"webViewUrl\", \"returnUrl\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V\", \"authCompleteUrl\", \"Landroid/net/Uri;\", \"(Ljava/lang/String;Ljava/lang/String;Landroid/net/Uri;Ljava/lang/String;)V\", \"getAuthCompleteUrl\", \"()Ljava/lang/String;\", \"getData\", \"getReturnUrl\", \"getWebViewUrl\", \"()Landroid/net/Uri;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"Companion\", \"payments-core_release\"})\n public static final class AlipayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String data = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String authCompleteUrl = null;\n @org.jetbrains.annotations.NotNull()\n private final android.net.Uri webViewUrl = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String returnUrl = null;\n @org.jetbrains.annotations.NotNull()\n private static final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect.Companion Companion = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect copy(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.Nullable()\n java.lang.String authCompleteUrl, @org.jetbrains.annotations.NotNull()\n android.net.Uri webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getAuthCompleteUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final android.net.Uri getWebViewUrl() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getReturnUrl() {\n return null;\n }\n \n public AlipayRedirect(@org.jetbrains.annotations.NotNull()\n java.lang.String data, @org.jetbrains.annotations.NotNull()\n java.lang.String webViewUrl, @org.jetbrains.annotations.Nullable()\n java.lang.String returnUrl) {\n super();\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.AlipayRedirect[] newArray(int size) {\n return null;\n }\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0014\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\b\\u0082\\u0003\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\u0012\\u0010\\u0003\\u001a\\u0004\\u0018\\u00010\\u00042\\u0006\\u0010\\u0005\\u001a\\u00020\\u0004H\\u0002\\u00a8\\u0006\\u0006\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$AlipayRedirect$Companion;\", \"\", \"()V\", \"extractReturnUrl\", \"\", \"data\", \"payments-core_release\"})\n static final class Companion {\n \n private Companion() {\n super();\n }\n \n /**\n * The alipay data string is formatted as query parameters.\n * When authenticate is complete, we make a request to the\n * return_url param, as a hint to the backend to ping Alipay for\n * the updated state\n */\n private final java.lang.String extractReturnUrl(java.lang.String data) {\n return null;\n }\n }\n }\n \n /**\n * When confirming a [PaymentIntent] or [SetupIntent] with the Stripe SDK, the Stripe SDK\n * depends on this property to invoke authentication flows. The shape of the contents is subject\n * to change and is only intended to be used by the Stripe SDK.\n */\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000\\u0016\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\b6\\u0018\\u00002\\u00020\\u0001:\\u0002\\u0003\\u0004B\\u0007\\b\\u0004\\u00a2\\u0006\\u0002\\u0010\\u0002\\u0082\\u0001\\u0002\\u0005\\u0006\\u00a8\\u0006\\u0007\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"Use3DS1\", \"Use3DS2\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"payments-core_release\"})\n public static abstract class SdkData extends com.stripe.android.model.StripeIntent.NextActionData {\n \n private SdkData() {\n super();\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u00004\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u0011\\u001a\\u00020\\u00122\\u0006\\u0010\\u0013\\u001a\\u00020\\u00142\\u0006\\u0010\\u0015\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0016\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS1;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"url\", \"\", \"(Ljava/lang/String;)V\", \"getUrl\", \"()Ljava/lang/String;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class Use3DS1 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String url = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS1(@org.jetbrains.annotations.NotNull()\n java.lang.String url) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getUrl() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS1[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0003\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\r\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0003\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001:\\u0001!B%\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0005\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0011\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0012\\u001a\\u00020\\u0007H\\u00c6\\u0003J1\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0005\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0006\\u001a\\u00020\\u0007H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0006\\u001a\\u00020\\u0007\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\fR\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\fR\\u0011\\u0010\\u0005\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000e\\u0010\\f\\u00a8\\u0006\\\"\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData;\", \"source\", \"\", \"serverName\", \"transactionId\", \"serverEncryption\", \"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;)V\", \"getServerEncryption\", \"()Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"getServerName\", \"()Ljava/lang/String;\", \"getSource\", \"getTransactionId\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"DirectoryServerEncryption\", \"payments-core_release\"})\n public static final class Use3DS2 extends com.stripe.android.model.StripeIntent.NextActionData.SdkData {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String source = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String serverName = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String transactionId = null;\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 copy(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public Use3DS2(@org.jetbrains.annotations.NotNull()\n java.lang.String source, @org.jetbrains.annotations.NotNull()\n java.lang.String serverName, @org.jetbrains.annotations.NotNull()\n java.lang.String transactionId, @org.jetbrains.annotations.NotNull()\n com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption serverEncryption) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getSource() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getServerName() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getTransactionId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption component4() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption getServerEncryption() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2 createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2[] newArray(int size) {\n return null;\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000<\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0010\\u000e\\n\\u0002\\b\\u0002\\n\\u0002\\u0010 \\n\\u0002\\b\\u000e\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0003\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B-\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u0012\\u0006\\u0010\\u0004\\u001a\\u00020\\u0003\\u0012\\f\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u0012\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\u0002\\u0010\\bJ\\t\\u0010\\u000f\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\t\\u0010\\u0010\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u000f\\u0010\\u0011\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006H\\u00c6\\u0003J\\u000b\\u0010\\u0012\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0003J9\\u0010\\u0013\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u00032\\b\\b\\u0002\\u0010\\u0004\\u001a\\u00020\\u00032\\u000e\\b\\u0002\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u00062\\n\\b\\u0002\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003H\\u00c6\\u0001J\\t\\u0010\\u0014\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\u0013\\u0010\\u0016\\u001a\\u00020\\u00172\\b\\u0010\\u0018\\u001a\\u0004\\u0018\\u00010\\u0019H\\u00d6\\u0003J\\t\\u0010\\u001a\\u001a\\u00020\\u0015H\\u00d6\\u0001J\\t\\u0010\\u001b\\u001a\\u00020\\u0003H\\u00d6\\u0001J\\u0019\\u0010\\u001c\\u001a\\u00020\\u001d2\\u0006\\u0010\\u001e\\u001a\\u00020\\u001f2\\u0006\\u0010 \\u001a\\u00020\\u0015H\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\t\\u0010\\nR\\u0011\\u0010\\u0004\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u000b\\u0010\\nR\\u0013\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\f\\u0010\\nR\\u0017\\u0010\\u0005\\u001a\\b\\u0012\\u0004\\u0012\\u00020\\u00030\\u0006\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\r\\u0010\\u000e\\u00a8\\u0006!\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$SdkData$Use3DS2$DirectoryServerEncryption;\", \"Landroid/os/Parcelable;\", \"directoryServerId\", \"\", \"dsCertificateData\", \"rootCertsData\", \"\", \"keyId\", \"(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)V\", \"getDirectoryServerId\", \"()Ljava/lang/String;\", \"getDsCertificateData\", \"getKeyId\", \"getRootCertsData\", \"()Ljava/util/List;\", \"component1\", \"component2\", \"component3\", \"component4\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class DirectoryServerEncryption implements android.os.Parcelable {\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String directoryServerId = null;\n @org.jetbrains.annotations.NotNull()\n private final java.lang.String dsCertificateData = null;\n @org.jetbrains.annotations.NotNull()\n private final java.util.List<java.lang.String> rootCertsData = null;\n @org.jetbrains.annotations.Nullable()\n private final java.lang.String keyId = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption copy(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public DirectoryServerEncryption(@org.jetbrains.annotations.NotNull()\n java.lang.String directoryServerId, @org.jetbrains.annotations.NotNull()\n java.lang.String dsCertificateData, @org.jetbrains.annotations.NotNull()\n java.util.List<java.lang.String> rootCertsData, @org.jetbrains.annotations.Nullable()\n java.lang.String keyId) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDirectoryServerId() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String component2() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.lang.String getDsCertificateData() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> component3() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final java.util.List<java.lang.String> getRootCertsData() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String component4() {\n return null;\n }\n \n @org.jetbrains.annotations.Nullable()\n public final java.lang.String getKeyId() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.SdkData.Use3DS2.DirectoryServerEncryption[] newArray(int size) {\n return null;\n }\n }\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000.\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u00c7\\u0002\\u0018\\u00002\\u00020\\u0001B\\u0007\\b\\u0002\\u00a2\\u0006\\u0002\\u0010\\u0002J\\t\\u0010\\u0003\\u001a\\u00020\\u0004H\\u00d6\\u0001J\\u0013\\u0010\\u0005\\u001a\\u00020\\u00062\\b\\u0010\\u0007\\u001a\\u0004\\u0018\\u00010\\bH\\u0096\\u0002J\\b\\u0010\\t\\u001a\\u00020\\u0004H\\u0016J\\u0019\\u0010\\n\\u001a\\u00020\\u000b2\\u0006\\u0010\\f\\u001a\\u00020\\r2\\u0006\\u0010\\u000e\\u001a\\u00020\\u0004H\\u00d6\\u0001\\u00a8\\u0006\\u000f\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$BlikAuthorize;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"()V\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class BlikAuthorize extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n public static final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize INSTANCE = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> CREATOR = null;\n \n private BlikAuthorize() {\n super();\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.BlikAuthorize[] newArray(int size) {\n return null;\n }\n }\n }\n \n @kotlinx.parcelize.Parcelize()\n @androidx.annotation.RestrictTo(value = {androidx.annotation.RestrictTo.Scope.LIBRARY_GROUP})\n @kotlin.Metadata(mv = {1, 5, 1}, k = 1, d1 = {\"\\u0000:\\n\\u0002\\u0018\\u0002\\n\\u0002\\u0018\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0006\\n\\u0002\\u0010\\b\\n\\u0000\\n\\u0002\\u0010\\u000b\\n\\u0000\\n\\u0002\\u0010\\u0000\\n\\u0002\\b\\u0002\\n\\u0002\\u0010\\u000e\\n\\u0000\\n\\u0002\\u0010\\u0002\\n\\u0000\\n\\u0002\\u0018\\u0002\\n\\u0002\\b\\u0002\\b\\u0087\\b\\u0018\\u00002\\u00020\\u0001B\\r\\u0012\\u0006\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\u0002\\u0010\\u0004J\\t\\u0010\\u0007\\u001a\\u00020\\u0003H\\u00c6\\u0003J\\u0013\\u0010\\b\\u001a\\u00020\\u00002\\b\\b\\u0002\\u0010\\u0002\\u001a\\u00020\\u0003H\\u00c6\\u0001J\\t\\u0010\\t\\u001a\\u00020\\nH\\u00d6\\u0001J\\u0013\\u0010\\u000b\\u001a\\u00020\\f2\\b\\u0010\\r\\u001a\\u0004\\u0018\\u00010\\u000eH\\u00d6\\u0003J\\t\\u0010\\u000f\\u001a\\u00020\\nH\\u00d6\\u0001J\\t\\u0010\\u0010\\u001a\\u00020\\u0011H\\u00d6\\u0001J\\u0019\\u0010\\u0012\\u001a\\u00020\\u00132\\u0006\\u0010\\u0014\\u001a\\u00020\\u00152\\u0006\\u0010\\u0016\\u001a\\u00020\\nH\\u00d6\\u0001R\\u0011\\u0010\\u0002\\u001a\\u00020\\u0003\\u00a2\\u0006\\b\\n\\u0000\\u001a\\u0004\\b\\u0005\\u0010\\u0006\\u00a8\\u0006\\u0017\"}, d2 = {\"Lcom/stripe/android/model/StripeIntent$NextActionData$WeChatPayRedirect;\", \"Lcom/stripe/android/model/StripeIntent$NextActionData;\", \"weChat\", \"Lcom/stripe/android/model/WeChat;\", \"(Lcom/stripe/android/model/WeChat;)V\", \"getWeChat\", \"()Lcom/stripe/android/model/WeChat;\", \"component1\", \"copy\", \"describeContents\", \"\", \"equals\", \"\", \"other\", \"\", \"hashCode\", \"toString\", \"\", \"writeToParcel\", \"\", \"parcel\", \"Landroid/os/Parcel;\", \"flags\", \"payments-core_release\"})\n public static final class WeChatPayRedirect extends com.stripe.android.model.StripeIntent.NextActionData {\n @org.jetbrains.annotations.NotNull()\n private final com.stripe.android.model.WeChat weChat = null;\n public static final android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> CREATOR = null;\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect copy(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n return null;\n }\n \n @java.lang.Override()\n public boolean equals(@org.jetbrains.annotations.Nullable()\n java.lang.Object other) {\n return false;\n }\n \n @java.lang.Override()\n public int hashCode() {\n return 0;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public java.lang.String toString() {\n return null;\n }\n \n public WeChatPayRedirect(@org.jetbrains.annotations.NotNull()\n com.stripe.android.model.WeChat weChat) {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat component1() {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n public final com.stripe.android.model.WeChat getWeChat() {\n return null;\n }\n \n @java.lang.Override()\n public int describeContents() {\n return 0;\n }\n \n @java.lang.Override()\n public void writeToParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel parcel, int flags) {\n }\n \n @kotlin.Metadata(mv = {1, 5, 1}, k = 3)\n public static final class Creator implements android.os.Parcelable.Creator<com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect> {\n \n public Creator() {\n super();\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect createFromParcel(@org.jetbrains.annotations.NotNull()\n android.os.Parcel in) {\n return null;\n }\n \n @org.jetbrains.annotations.NotNull()\n @java.lang.Override()\n public final com.stripe.android.model.StripeIntent.NextActionData.WeChatPayRedirect[] newArray(int size) {\n return null;\n }\n }\n }\n }\n}", "java.lang.String getField1641();", "java.lang.String getField1699();", "java.lang.String getField1329();", "java.lang.String getField1196();", "public String getRemark()\n/* */ {\n/* 255 */ return this.remark;\n/* */ }", "java.lang.String getField1644();", "java.lang.String getField1636();", "java.lang.String getField1126();", "java.lang.String getField1681();", "C15430g mo56154a();" ]
[ "0.63072395", "0.57791543", "0.57195795", "0.5700043", "0.5678305", "0.566649", "0.5663433", "0.56301033", "0.56213635", "0.5616", "0.56061006", "0.55987865", "0.55914664", "0.55899924", "0.55867726", "0.5581711", "0.5573568", "0.55671304", "0.5567055", "0.5566515", "0.5557738", "0.55567384", "0.55385804", "0.5537609", "0.5536208", "0.5534205", "0.55325645", "0.5532549", "0.55299693", "0.5520885", "0.5511606", "0.55105036", "0.55105036", "0.55105036", "0.55105036", "0.55105036", "0.55105036", "0.55105036", "0.5510417", "0.55072373", "0.55032665", "0.5499851", "0.54997677", "0.5496131", "0.54959905", "0.54950774", "0.54922825", "0.5489066", "0.5484687", "0.5483952", "0.5483514", "0.54814804", "0.5481297", "0.54739386", "0.5472755", "0.54716855", "0.5470363", "0.5468839", "0.54646546", "0.54570013", "0.54548246", "0.5452859", "0.54521227", "0.5451821", "0.5444987", "0.54418206", "0.54410756", "0.54396677", "0.5438677", "0.5437747", "0.54372925", "0.5434726", "0.5433252", "0.5432379", "0.5431583", "0.5431152", "0.5427958", "0.541778", "0.5415641", "0.5414878", "0.5414076", "0.54140186", "0.5411518", "0.54100466", "0.5408753", "0.5401792", "0.5399071", "0.53968257", "0.5396498", "0.53947574", "0.53924996", "0.53903806", "0.5389773", "0.5389007", "0.5386389", "0.53843105", "0.5381777", "0.5380831", "0.5379979", "0.537806", "0.53779036" ]
0.0
-1
find coordinae of matching cab
int matchingLandmark(int x, int y) { System.out.println("matching lansg " + x + " " + y); for (int i = 0; i < 50; i++) { if (landmarks[i][0] == x && landmarks[i][1] == y) { return i; } } return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getCrs(TrackPoint p) {\r\n\t\tint crsindex = 0;\r\n\t\tif (coordinateReferenceSystem.length > 1) {\r\n\t\t\tint ls = TransformCoordinates.getLocalProjectionSystem(coordinateReferenceSystem[0]);\r\n\t\t\tProjectedPoint gkbl = TransformCoordinates.wgs84ToLocalsystem(p, ls); // TODO: think / read about what to do if bottom left and top right are not in the same Gau?-Kr?ger stripe?\r\n\t\t\tint wantepsg = gkbl.getEpsgCode();\r\n\t\t\tfor (crsindex = 0; crsindex < coordinateReferenceSystem.length; crsindex++) {\r\n\t\t\t\tif (coordinateReferenceSystem[crsindex] == wantepsg)\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (crsindex >= coordinateReferenceSystem.length) { // not match\r\n\t\t\t\tfor (crsindex = 0; crsindex < coordinateReferenceSystem.length; crsindex++) {\r\n\t\t\t\t\tif (Math.abs(coordinateReferenceSystem[crsindex] - wantepsg) == 1)\r\n\t\t\t\t\t\tbreak; // accept 1 zone deviation\r\n\t\t\t\t}\r\n\t\t\t\tif (crsindex >= coordinateReferenceSystem.length)\r\n\t\t\t\t\tcrsindex = -1;\r\n\r\n\t\t\t}\r\n\t\t\tif (crsindex < 0)\r\n\t\t\t\tthrow new IllegalArgumentException(MyLocale.getMsg(4829, \"getUrlForBoundingBox: Point:\") + \" \" + gkbl.toString() + MyLocale.getMsg(4830, \"no matching Gau?-Kr?ger-Stripe in the EPSG-code list in the .wms\"));\r\n\t\t}\r\n\t\treturn crsindex;\r\n\t}", "int freecabInd(int dest) {\n int index = 0;\n int min = 0;\n int minIndex = 0;\n\n for(int i=0;i<freeCab.length;i++){\n\n int matLandmark = matchingLandmark(freeCab[index][0], freeCab[index][1]);\n\n int dis = distance.dijkstra(adjancy, matLandmark, dest);\n\n if (dis < min) {\n min = dis;\n minIndex = index;\n }\n index++;\n\n }\n\n return minIndex;\n\n }", "static Node findNode(Node root, int a, int b, int c) {\n Node x = getLCA(root, a, b);\n\n // lca of b, c\n Node y = getLCA(root, b, c);\n\n // lca of c, a\n Node z = getLCA(root, c, a);\n\n if (x.data == y.data)\n return z;\n else if (x.data == z.data)\n return y;\n else\n return x;\n }", "private static int getClusterCorrespondance(Integer cl1, Integer cl2,\n HashMap<Integer, HashMap<Integer, Integer>> clusterCorresp, int nextId)\n{\n HashMap<Integer, Integer> map = clusterCorresp.get(cl1);\n if (map == null) {\n map = new HashMap<Integer, Integer>();\n map.put(cl2, nextId);\n clusterCorresp.put(cl1, map);\n return nextId;\n }\n Integer corresp = map.get(cl2);\n if (corresp == null) {\n map.put(cl2, nextId);\n return nextId;\n }\n return corresp.intValue();\n}", "private int indexOfClef(Object c) {\n for (int i = 0; i < nbAssoc; i++)\n if (associations[i].premier().equals(c))\n return i;\n return -1;\n }", "public PVector cohesion (ArrayList<Boid> boids) {\n float neighbordist = 90.0f;\n PVector steer = new PVector(0,0); // Start with empty vector to accumulate all locations\n int count = 0;\n for (Boid other : boids) {\n float d = PVector.dist(location,other.location);\n if ((d > 0) && (d < neighbordist)) {\n steer.add(other.location); // Add location\n count++;\n }\n }\n if (count > 0) {\n steer.div((float)count);\n return seek(steer); // Steer towards the location\n }\n return steer;\n }", "private long census(ConstituentsAddressNode crt) throws P2PDDSQLException {\n\t\tif(DEBUG) System.err.println(\"ConstituentsModel:census: start\");\n\t\tif((crt==null)||(crt.n_data==null)){\n\t\t\tif(DEBUG) System.err.println(\"ConstituentsModel:census: end no ID\");\n\t\t\treturn 0;\n\t\t}\n\t\tlong n_ID = crt.n_data.neighborhoodID;\n\t\tif(DEBUG) System.err.println(\"ConstituentsModel:census: start nID=\"+n_ID);\n\t\tif(n_ID <= 0){\n\t\t\tif(DEBUG) System.err.println(\"ConstituentsModel:census: start nID=\"+n_ID+\" abandon\");\t\t\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t\n\t\tlong result = 0;\n\t\tint neighborhoods[] = {0};\n\t\t\n\t\tif(crt.isColapsed()){\n\t\t\tif(DEBUG) System.err.println(\"ConstituentsModel:census: this is colapsed\");\n\t\t\tresult = censusColapsed(crt, neighborhoods);\n\t\t}else{\n\t\t\tfor(int k=0; k<crt.children.length; k++) {\n\t\t\t\tif(!running){\n\t\t\t\t\tif(DEBUG) System.err.println(\"ConstituentsModel:census: start nID=\"+n_ID+\" abandon request\");\t\t\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\tConstituentsNode child = crt.children[k];\n\t\t\t\tif(child instanceof ConstituentsAddressNode) {\n\t\t\t\t\tresult += census((ConstituentsAddressNode)child);\n\t\t\t\t\tneighborhoods[0]++;\n\t\t\t\t}\n\t\t\t\tif(child instanceof ConstituentsIDNode)\n\t\t\t\t\tresult ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcrt.neighborhoods = neighborhoods[0];\n\t\tcrt.location.inhabitants = (int)result;\n\t\tcrt.location.censusDone = true;\n\t\t\n\t\tannounce(crt);\n\t\t\n\t\tif(DEBUG) System.err.println(\"ConstituentsModel:censusColapsed: start nID=\"+n_ID+\" got=\"+result);\t\t\n\t\treturn result;\n\t}", "public int rechercheCercleProche(ArrayList<Cercle> cercles, PVector positionPointRay) {\n float distance = Main.processing.width;\n int index = -1;\n for (int iteratorCercle = 0 ; iteratorCercle < cercles.size() ; ++iteratorCercle) {\n Cercle c = cercles.get(iteratorCercle);\n float distanceMinimum = PVector.dist(positionPointRay, c.getPositionCentre());\n\n if (distance >= distanceMinimum) {\n //System.out.println(\"distance : \" + distance + \" | Distance Minimum : \" + distanceMinimum);\n distance = distanceMinimum;\n index = iteratorCercle;\n }\n }\n return index;\n }", "private int findCity(City<E> obj){\n\t\tfor(int i = 0; i < graphList.size(); i++){\n\t\t\tif(graphList.get(i).cityEquals(obj)){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"city not found, in graph findCity method\");\n\t\treturn -1;\n\t}", "private EntityCocoon getConsumableCocoon()\n\t{\n\t\tfinal List<Entity> nearbyCocoons = RadixLogic.getAllEntitiesOfTypeWithinDistance(EntityCocoon.class, this, 5);\n\t\tEntityCocoon nearestCocoon = null;\n\t\tdouble lowestDistance = 100D;\n\n\t\tfor (final Entity entity : nearbyCocoons)\n\t\t{\n\t\t\tEntityCocoon cocoon = (EntityCocoon)entity;\n\t\t\tfinal double distanceToCurrentEntity = RadixMath.getDistanceToEntity(this, cocoon);\n\n\t\t\tif (!cocoon.isEaten() && distanceToCurrentEntity < lowestDistance)\n\t\t\t{\n\t\t\t\tlowestDistance = distanceToCurrentEntity;\n\t\t\t\tnearestCocoon = cocoon;\n\t\t\t}\n\t\t}\n\n\t\treturn nearestCocoon;\n\t}", "public ArrayList<Record> near()\n {\n int count = 0;\n ArrayList<Record> closest = new ArrayList<>();\n System.out.println(\"Community Centres that are 5km or less to your location are: \");\n for(Record i: cCentres)\n {\n //latitude and longitude for each centre\n double lat2 = Double.parseDouble(i.getValue(4));\n double lon2 = Double.parseDouble(i.getValue(3));\n ;\n //distance\n double dist = calcDist(lat2, lon2, cCentres);\n if(dist<=5)\n {\n System.out.println(i + \", Distance: \" + dist + \" km\");\n closest.add(i);\n }\n }\n return closest;\n }", "IntPair findPacmansCrossRoad(IntPair pacPosition, Direction.directionType pacDirection)\n {\n IntPair delta = Direction.directionToIntPair(pacDirection);\n if (isCorner(pacPosition.item1, pacPosition.item2)) {\n Direction.directionType newDirection = turnDirection(pacPosition.item1, pacPosition.item2, delta.item1, delta.item2);\n IntPair nd = Direction.directionToIntPair(newDirection);\n return findPacmansCrossRoad(\n new IntPair(pacPosition.item1 + nd.item1, pacPosition.item2 + nd.item2), newDirection);\n }\n\n if (delta.item1 == 0) {\n for (int y = pacPosition.item2; y >= 0 && y < LoadMap.MAPHEIGHTINTILES; y += delta.item2) {\n if (isCrossroad(pacPosition.item1, y)) {\n return new IntPair(pacPosition.item1, y);\n } else if (isCorner(pacPosition.item1, y)) {\n Direction.directionType newDirection = turnDirection(pacPosition.item1, y, delta.item1, delta.item2);\n IntPair nd = Direction.directionToIntPair(newDirection);\n return findPacmansCrossRoad(new IntPair(pacPosition.item1 + nd.item1, y + nd.item2), newDirection);\n }\n }\n } else {\n for (int x = pacPosition.item1; x >= 0 && x < LoadMap.MAPWIDTHINTILES; x += delta.item1) {\n if (isCrossroad(x, pacPosition.item2)) {\n return new IntPair(x, pacPosition.item2);\n } else if (isCorner(x, pacPosition.item2)) {\n Direction.directionType newDirection = turnDirection(x, pacPosition.item2, delta.item1, delta.item2);\n IntPair nd = Direction.directionToIntPair(newDirection);\n return findPacmansCrossRoad(new IntPair(x + nd.item1, pacPosition.item2 + nd.item2), newDirection);\n }\n }\n }\n\n return pacPosition;\n }", "public PVector cohesion (ArrayList<Boid> boids) {\n float neighbordist = 50;\n PVector sum = new PVector(0, 0); // Start with empty vector to accumulate all positions\n int count = 0;\n for (Boid other : boids) {\n float d = PVector.dist(position, other.position);\n if ((d > 0) && (d < neighbordist)) {\n sum.add(other.position); // Add position\n count++;\n }\n }\n if (count > 0) {\n sum.div(count);\n return seek(sum); // Steer towards the position\n } else {\n return new PVector(0, 0);\n }\n }", "private void getCurrentDetectedLipCoordinates(float coor[]) {\n if (coor.length != porc_lipstick_down_highlight_filter_refrence_feature_table.length * 2)\n return;\n\n for (int i = 0; i < porc_lipstick_down_highlight_filter_refrence_feature_table.length; i++) {\n coor[2 * i] = facesFeaturesCoordinates[2 * porc_lipstick_down_highlight_filter_refrence_feature_table[i]];\n coor[2 * i + 1] = facesFeaturesCoordinates[2 * porc_lipstick_down_highlight_filter_refrence_feature_table[i] + 1];\n }\n\n }", "public AlignmentPattern find() throws NotFoundException {\n AlignmentPattern handlePossibleCenter;\n AlignmentPattern handlePossibleCenter2;\n int i = this.startX;\n int i2 = this.height;\n int i3 = this.width + i;\n int i4 = this.startY + (i2 / 2);\n int[] iArr = new int[3];\n for (int i5 = 0; i5 < i2; i5++) {\n int i6 = ((i5 & 1) == 0 ? (i5 + 1) / 2 : -((i5 + 1) / 2)) + i4;\n iArr[0] = 0;\n iArr[1] = 0;\n iArr[2] = 0;\n int i7 = i;\n while (i7 < i3 && !this.image.get(i7, i6)) {\n i7++;\n }\n int i8 = 0;\n while (i7 < i3) {\n if (!this.image.get(i7, i6)) {\n if (i8 == 1) {\n i8++;\n }\n iArr[i8] = iArr[i8] + 1;\n } else if (i8 == 1) {\n iArr[1] = iArr[1] + 1;\n } else if (i8 != 2) {\n i8++;\n iArr[i8] = iArr[i8] + 1;\n } else if (foundPatternCross(iArr) && (handlePossibleCenter2 = handlePossibleCenter(iArr, i6, i7)) != null) {\n return handlePossibleCenter2;\n } else {\n iArr[0] = iArr[2];\n iArr[1] = 1;\n iArr[2] = 0;\n i8 = 1;\n }\n i7++;\n }\n if (foundPatternCross(iArr) && (handlePossibleCenter = handlePossibleCenter(iArr, i6, i3)) != null) {\n return handlePossibleCenter;\n }\n }\n if (!this.possibleCenters.isEmpty()) {\n return this.possibleCenters.get(0);\n }\n throw NotFoundException.getNotFoundInstance();\n }", "int findLCA(int a, int b) {\n int n1 = (depth[a] > depth[b]) ? a : b;\n int n2 = (depth[a] > depth[b]) ? b : a;\n\n int toMove = depth[n1] - depth[n2];\n for (int i = 17; i >= 0; i--) {\n if (lcaSteps[i] <= toMove) {\n n1 = lcaArr[i][n1];\n toMove -= lcaSteps[i];\n }\n }\n\n // Find LCA\n if (n1 == n2) return n1;\n else {\n for (int i = 17; i >= 0; i--) {\n if (lcaArr[i][n1] != lcaArr[i][n2]) {\n n1 = lcaArr[i][n1];\n n2 = lcaArr[i][n2];\n }\n }\n }\n\n return lcaArr[0][n1];\n }", "public int[] findClusterCorrespondence(int[] idx1, int[] idx2) {\n\t\tint n = idx1.length;\n\t\tif (n != idx2.length) {\n\t\t\tSystem.out.println(\"Cluster Utils: findClusterCorrespondence: idx1 and idx2 has to have same number of elements\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// find unique values in idx1 and idx2\n\t\tUniqueResult<Integer> ur_idx1 = utils.findUnique(idx1);\n\t\tUniqueResult<Integer> ur_idx2 = utils.findUnique(idx2);\n\t\tif (ur_idx1.domain.length != ur_idx2.domain.length) {\n\t\t\tSystem.out.println(\"Cluster Utils: findClusterCorrespondence: idx1 and idx2 has different number of clusters\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t// find Jaccard coefficient\n\t\tdouble[][] J = findJaccardIndex(idx1, idx2);\n\t\t\n\t\t// use Hungarian method - use any kind of Hungarian algorithm\n\t\tHungarianAlgorithm h = new HungarianAlgorithm();\n\t\t@SuppressWarnings(\"static-access\")\n\t\tint[][] match = h.hgAlgorithm(J, \"max\");\n\t\t\n\t\t// print match matrix\n\t\tif (verbose) {\n\t\t\tSystem.out.println(\"Hunguarian Cost Matrix\");\n\t\t\tutils.printMatrix(match);\n\t\t}\n\t\t\n\t\t// relabel the idx2\n\t\tif (verbose) System.out.println(\"Class correspondents matrix:\");\n\t\tint[] target = idx1.clone();\n\t\tfor (int i = 0; i < match.length; i++) {\n\t\t\tint idx1_index = ur_idx1.domain[match[i][0]];\n\t\t\tint idx2_index = ur_idx2.domain[match[i][1]];\n\t\t\tif (verbose) System.out.printf(\"%d\\t%d\", idx1_index, idx2_index);\t\t\t\n\t\t\tif (idx1_index != idx2_index) {\n\t\t\t\tif (verbose) System.out.printf(\"\\t(will replace all %d in idx2 by %d)\", idx2_index, idx1_index);\n\t\t\t\tboolean[] index = utils.getIndexByValue(idx2, idx2_index);\n\t\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\t\tif (index[j]) target[j] = idx1_index;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (verbose) System.out.printf(\"\\n\");\n\t\t}\n\t\t\n\t\tif (verbose) {\n\t\t\tint v_tt = 15;\n\t\t\tif (target.length < v_tt) v_tt = target.length;\n\t\t\tSystem.out.printf(\"Printing first %d elements of input and output arrays\\n\", v_tt);\n\t\t\tSystem.out.printf(\"IDX1\\tIDX2\\tFINAL IDX\\n\");\n\t\t\tfor (int i = 0; i < v_tt; i++) System.out.printf(\"%d\\t%d\\t%d\\n\", idx1[i], idx2[i], target[i]);\n\t\t}\n\t\t\n\t\treturn target;\n\t}", "public int contenuto(Casella cas)\n { return contenutoCaselle[cas.riga][cas.colonna]; }", "public void colocarMarcadores(){\n\n if(seeOnMap != 0){\n\n for (int n=0; n<c.getCount(); n++) {\n c.moveToPosition(n);\n Double lat = c.getDouble(c.getColumnIndex(\"lat\"));\n Double lng = c.getDouble(c.getColumnIndex(\"lon\"));\n String name = c.getString(c.getColumnIndex(\"title\"));\n\n map.addMarker(new MarkerOptions().position(new LatLng(lat, lng))\n .title(name));\n }\n }\n }", "private static CIty chaxunjibandi(String jibandi, ArrayList<CIty> citys) {\n\t\tIterator it=citys.iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tCIty c=(CIty)it.next();\r\n\t\t\tif(c.place.equals(jibandi))\r\n\t\t\t\treturn c;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private String getCords() {\n return current.getLocString();\n\n }", "public void findCities() {\r\n\t\tpolygonMap.setCurrentPlayerID(client.getSettler().getID());\r\n\t\tint counter = 0;\r\n\t\tfor (int i = 0; i < island.getNodes().length; i++) {\r\n\t\t\tif (island.getNodes()[i].getBuilding() == Constants.SETTLEMENT\r\n\t\t\t\t\t&& island.getNodes()[i].getOwnerID() == client.getSettler()\r\n\t\t\t\t\t\t\t.getID()) {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, i);\r\n\t\t\t\tcounter++;\r\n\t\t\t} else {\r\n\t\t\t\tpolygonMap.setCityNodes(counter, -1);\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "int getC();", "public Coordenada kingCoordenada(Color c) {\n\t\tif (c == this.getColor()) {\n\t\t\treturn posicion;\n\t\t} else\n\t\t\treturn null;\n\t}", "private static Coord findCoordinate(Coord p0, Coord p1, Coord p2, double r0, double r1, double r2){\r\n\r\n\tdouble x0, y0, x1, y1, x2, y2;\r\n\tx0 = p0.getX(); y0 = p0.getY();\r\n\tx1 = p1.getX(); y1 = p1.getY();\r\n\tx2 = p2.getX(); y2 = p2.getY();\r\n\t//core.Debug.p(\"x0:\" + x0 + \",y0:\" + y0 + \",r0:\" + r0);\r\n\t//core.Debug.p(\"x1:\" + x1 + \",y1:\" + y1 + \",r1:\" + r1);\r\n\t//core.Debug.p(\"x2:\" + x2 + \",y2:\" + y2 + \",r2:\" + r2);\r\n\tdouble a, dx, dy, d, h, rx, ry;\r\n\tdouble point2_x, point2_y;\r\n\r\n\t/* dx and dy are the vertical and horizontal distances between\r\n\t * the circle centers.\r\n\t */\t\r\n\tdx = x1 - x0;\r\n\tdy = y1 - y0;\r\n\r\n\t/* Determine the straight-line distance between the centers. */\r\n\td = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\t/* Check for solvability. */\r\n\tif (d > (r0 + r1)){\r\n\t\t/* no solution. circles do not intersect. */\r\n\t\t//core.Debug.p(\"no solution1\");\r\n\t\treturn null;\r\n\t}\r\n\tif (d < Math.abs(r0 - r1)){\r\n\t\t/* no solution. one circle is contained in the other */\r\n\t\t//core.Debug.p(\"no solution2\");\r\n\t\treturn null;\r\n\t}\r\n\r\n\t/* 'point 2' is the point where the line through the circle\r\n\t * intersection points crosses the line between the circle\r\n\t * centers.\r\n\t */\r\n\r\n\t/* Determine the distance from point 0 to point 2. */\r\n\ta = ((r0*r0) - (r1*r1) + (d*d)) / (2.0 * d) ;\r\n\r\n\t/* Determine the coordinates of point 2. */\r\n\tpoint2_x = x0 + (dx * a/d);\r\n\tpoint2_y = y0 + (dy * a/d);\r\n\r\n\t/* Determine the distance from point 2 to either of the\r\n\t * intersection points.\r\n\t */\t\r\n\th = Math.sqrt((r0*r0) - (a*a));\r\n\r\n\t/* Now determine the offsets of the intersection points from\r\n\t * point 2.\r\n\t */\r\n\trx = -dy * (h/d);\r\n\try = dx * (h/d);\r\n\r\n\t/* Determine the absolute intersection points. */\r\n\tdouble intersectionPoint1_x = point2_x + rx;\r\n\tdouble intersectionPoint2_x = point2_x - rx;\r\n\tdouble intersectionPoint1_y = point2_y + ry;\r\n\tdouble intersectionPoint2_y = point2_y - ry;\r\n\r\n\t/* Lets determine if circle 3 intersects at either of the above intersection points. */\r\n\tdx = intersectionPoint1_x - x2;\r\n\tdy = intersectionPoint1_y - y2;\r\n\tdouble d1 = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\tdx = intersectionPoint2_x - x2;\r\n\tdy = intersectionPoint2_y - y2;\r\n\tdouble d2 = Math.sqrt((dy*dy) + (dx*dx));\r\n\r\n\t//core.Debug.p(\"d1: \" + d1 + \", d2: \" + d2 + \", r2: \" + r2);\r\n\t//core.Debug.p(\"diff1: \" + Math.abs(d1-r2));\r\n\t//core.Debug.p(\"point1: (\" + intersectionPoint1_x + \", \" + intersectionPoint1_y + \")\");\r\n\t//core.Debug.p(\"diff2: \" + Math.abs(d2-r2));\r\n\t//core.Debug.p(\"point2: (\" + intersectionPoint2_x + \", \" + intersectionPoint2_y + \")\");\r\n\r\n\r\n\tif(Math.abs(d1 - r2) < EPSILON) {\r\n\t\t//core.Debug.p(\"point: (\" + intersectionPoint1_x + \", \" + intersectionPoint1_y + \")\");\r\n\t\treturn new Coord(intersectionPoint1_x, intersectionPoint1_y);\r\n\t}\r\n\telse if(Math.abs(d2 - r2) < EPSILON) {\r\n\t\t//core.Debug.p(\"point: (\" + intersectionPoint2_x + \", \" + intersectionPoint2_y + \")\");\r\n\t\treturn new Coord(intersectionPoint2_x, intersectionPoint2_y);}\r\n\telse {\r\n\t\t//core.Debug.p(\"no intersection\");\r\n\t\treturn null;\r\n\t}\r\n}", "private int findCSRC(long[][] levels, long csrc)\n {\n if (levels != null)\n {\n for (int i = 0; i < levels.length; i++)\n {\n if (levels[i][0] == csrc)\n return i;\n }\n }\n return -1;\n }", "void findCogs(File input, int mode, Mappings map){\n int lineNum=0;\n\n BufferedReader reader;\n try {\n Path path =Paths.get(input.getAbsolutePath());\n System.out.println(\"Path: \"+input.getAbsolutePath());\n reader = Files.newBufferedReader(path,ENCODING);\n String line = null;\n while ((line = reader.readLine()) != null) {\n lineNum++;\n \n if(lineNum==1){\n String[] gensize=line.split(\" \");\n String c=gensize[gensize.length-1];\n System.out.println(\"String c COG: \"+c);\n String [] coord=c.split(\"\\\\.\\\\.\");\n System.out.println(\"coord size: \"+coord.length);\n minCoordinate=Integer.parseInt(coord[0]);\n maxCoordinate=Integer.parseInt(coord[1]);\n }\n \n if(lineNum>3){\n String[] st=line.split(\"\\t\");\n String[] coord=st[0].split(\"\\\\..\");\n int x=Integer.parseInt(coord[0]), y=Integer.parseInt(coord[1]);\n\n String cogName=\"\";\n if(mode==0){\n String pattern = \"(^COG)(\\\\d+)(\\\\D+)\";\n \n if(st[7].contains(\",\"))\n st[7]=st[7].split(\",\")[0];\n cogName=st[7].replaceAll(pattern, \"$1$2\");\n }\n else{\n cogName=st[3];\n }\n\n Triplet<Integer,Integer,String> t=new Triplet<Integer,Integer,String>(x,y,cogName);\n cogs.add(t);\n\n if(map.geneOgMapping.containsKey(cogName))\n ancogs.add(t);\n }\n }\n reader.close();\n }catch(IOException ioe)\n {\n System.err.println(\"IOException: \" + ioe.getMessage());\n }\n }", "public void search(Creature c, Area area){\r\n LinkedList<Point> ary = new LinkedList<>();\r\n boolean searchSuccessful = false;\r\n for(int yPlus=-1;yPlus<2;yPlus++){\r\n for(int xPlus=-1;xPlus<2;xPlus++){\r\n if(yPlus!=0&&xPlus!=0){\r\n ary.add(new Point(c.x+xPlus, c.y+yPlus));\r\n if(area.map[c.y+yPlus][c.x+xPlus] instanceof HiddenTile && ((HiddenTile) area.map[c.y+yPlus][c.x+xPlus]).hidden){\r\n ((HiddenTile) area.map[c.y+yPlus][c.x+xPlus]).find(c);\r\n searchSuccessful = true;\r\n }\r\n }\r\n }\r\n }\r\n Main.animator.searchAnimation(ary, searchSuccessful);\r\n }", "private ArrayList<Location> getCandidateLocations(Location origin)\n {\n ArrayList<Location> locs = new ArrayList<>();\n Piece p = getPiece(origin);\n if (p==null)\n return locs;\n switch (p.getType())\n {\n case QUEEN:case ROOK:case BISHOP:\n locs = getLocations();break;\n case KNIGHT:case PAWN:case KING:\n locs = getLocationsWithin(getLocation(p),2);\n }\n return locs;\n }", "private int search(Bitboard board, int posMask, int turn) {\n // if this player doesn't even \"own\" any connected components, they're in bad shape...\n if (!ownerToCCs.containsKey(turn)) {\n return 100;\n }\n\n // perform basic BFS to explore the connected component\n // we're finding distance to an \"owned\" connected component\n int target = ownerToCCs.get(turn);\n int orthogonal, nextMask, altDist;\n int myVisit = 0;\n\n searchQueue.clear();\n prev.clear();\n dist.clear();\n\n searchQueue.add(posMask);\n dist.put(posMask, 0);\n\n while (!searchQueue.isEmpty()) {\n // get next position off of queue\n posMask = searchQueue.poll();\n\n // ignore if visited, invalid location, or opponent owns\n if ((myVisit & posMask) != 0 || !board.isValid(posMask)\n || board.owns(posMask, 1 - turn))\n continue;\n myVisit |= posMask;\n\n // check if it's a target\n if ((target & posMask) != 0) {\n // return distance to posMask\n return dist.get(prev.get(posMask)) + 1;\n }\n\n // continue BFS\n orthogonal = BitMasks.orthogonal.get(posMask);\n while (orthogonal != 0) {\n nextMask = orthogonal & ~(orthogonal - 1);\n orthogonal ^= nextMask;\n\n altDist = dist.get(posMask) + 1;\n if (altDist < dist.getOrDefault(nextMask, Integer.MAX_VALUE)) {\n prev.put(nextMask, posMask);\n dist.put(nextMask, altDist);\n }\n searchQueue.add(nextMask);\n }\n }\n // no path found to a target (the circle is isolated)\n return 100;\n }", "private static CIty chaxunguanjunguo(String guanjunguo, ArrayList<CIty> citys) {\n\t\tIterator it=citys.iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tCIty c=(CIty)it.next();\r\n\t\t\tif(c.winner.equals(guanjunguo))\r\n\t\t\t\treturn c;\r\n\t\t}\r\n\t\treturn null;\r\n\t\t\r\n\t}", "private int searchNeighbours(int[][] neighbourCords, int cellX, int cellY) {\n int neighbours = 0;\n for (int[] offset : neighbourCords) {\n if (getCell(cellX + offset[0], cellY + offset[1]).isAlive()) {\n neighbours++;\n }\n }\n\n return neighbours;\n }", "static int[] connectedCities(int n, int g, int[] originCities, int[] destinationCities) {\n Map<Integer, TreeSet<Integer>> m1 = new HashMap<>();\n\n Map<Integer, TreeSet<Integer>> m2 = new HashMap<>();\n\n for (int i = 0; i <originCities.length ; i++) {\n TreeSet<Integer> s1 = new TreeSet<>();\n int c=originCities[i];\n for (int j = c; j>=1 ; j--) {\n if(c%j==0)\n s1.add(j);\n }\n m1.put(c,s1);\n }\n\n\n for (int i = 0; i <destinationCities.length ; i++) {\n TreeSet<Integer> s1 = new TreeSet<>();\n int c=destinationCities[i];\n for (int j = c/2; j>=1 ; j--) {\n if(c%j==0)\n s1.add(j);\n }\n m2.put(c,s1);\n }\n\n\n int result [] = new int[originCities.length];\n for (int i = 0; i <originCities.length ; i++) {\n\n int max1 =m1.get(originCities[i]).last();\n\n int max2 =m2.get(destinationCities[i]).last();\n if(max1 <=g)\n result[i]=0;\n else if(max2 <=g)\n result[i]=0;\n else{\n TreeSet<Integer> s1 =m1.get(originCities[i]);\n TreeSet<Integer> s2 =m2.get(destinationCities[i]);\n for (Integer x: s1) {\n if(s2.contains(x)) {\n result[i] = 1;\n break;\n }\n\n }\n }\n\n }\n\n return result;\n\n }", "public int contenuto(int r, int c) { return contenutoCaselle[r][c]; }", "public float[] findXY(){\n //Initialize the xy coordinates and the array\n int x = -1;\n int y = -1;\n float[] location = new float[2];\n\n //Find the blank card\n for(int i = 0; i < cardArray.length; i++){\n for(int j = 0; j < cardArray.length; j++){\n if(cardArray[i][j].getCardNum() == 16){\n x = i;\n y = j;\n }\n }\n }\n\n /* For each of the following cases, find the neighbors of the\n blank card. Select only neighbors that are in the incorrect spot so that\n the computer player does not mess up the game. If both are in the correct spot\n choose one to move\n */\n //Case 1: it is in the top left corner, find a neighbor\n if((x == 0) && (y == 0)){\n if(cardArray[x+1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n }\n\n //Case 2: it is in the top right corner, find a neighbor\n if((x == 0) && (y == cardArray.length - 1)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Case 3: It is in the bottom left corner, find a neighbor\n if((x == cardArray.length - 1) && (y == 0)){\n if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n }\n\n //Case 4: It is in the bottom right corner, find a neighbor\n if((x == cardArray.length - 1) && (y == cardArray.length - 1)){\n if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Case 5: It is in the top row, find a neighbor\n if((x == 0) && (y > 0) && ( y < cardArray.length - 1)){\n if(cardArray[x][y + 1].getColor() == 255){\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n else if(cardArray[x][y - 1].getColor() == 255){\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n else{\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n }\n\n //Case 6: It is on the bottom row, find a neighbor\n if((x == cardArray.length - 1) && (y > 0) && (y < cardArray.length- 1)){\n if (cardArray[x][y + 1].getColor() == 255){\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n else if (cardArray[x][y - 1].getColor() == 255){\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n else{\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n }\n\n //Case 7: It is on the left column, find a neighbor\n if((x > 0) && (x < cardArray.length - 1) && (y == 0)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n }\n\n //Case 8: It is on the right column, find a neighbor\n if((x > 0) && (x < cardArray.length - 1) && (y == cardArray.length - 1)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Case 9: It is not an edge or corner, find a neighbor\n if((x > 0) && (x < cardArray.length - 1) && (y > 0) && (y < cardArray.length -1)){\n if(cardArray[x + 1][y].getColor() == 255){\n location[0] = cardArray[x + 1][y].getXVal();\n location[1] = cardArray[x + 1][y].getYVal();\n }\n else if(cardArray[x - 1][y].getColor() == 255){\n location[0] = cardArray[x - 1][y].getXVal();\n location[1] = cardArray[x - 1][y].getYVal();\n }\n else if(cardArray[x][y + 1].getColor() == 255){\n location[0] = cardArray[x][y + 1].getXVal();\n location[1] = cardArray[x][y + 1].getYVal();\n }\n else{\n location[0] = cardArray[x][y - 1].getXVal();\n location[1] = cardArray[x][y - 1].getYVal();\n }\n }\n\n //Return the array containing the xy coordinates of the blank square's neighbor\n return location;\n }", "private MatOfPoint2f findTriangle(Frame frame) {\n\t\t// Get all contours from frame.\n\t\tList<MatOfPoint> contours = frame.sortedContours();\n\t\t\n\t\t// Prepare vehicle and approx holder variable.\n\t\tMatOfPoint2f approx, vehicle = null;\n\t\t\n\t\t// Loop through all the found contours.\n\t\tfor (MatOfPoint contour: contours) {\n\t\t\t// Approximate the contour poly.\n\t\t\tapprox = frame.approximate(contour);\n\t\t\t\n\t\t\t// Check if approximate found and has 3 points.\n\t\t\tif (approx != null && approx.total() == 3) {\n\t\t\t\t// Save approximate and break out.\n\t\t\t\tvehicle = approx;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Return the found vehicle.\n\t\treturn vehicle;\n\t}", "public static ArrayList<XYLocation> findPath2(String CHAR1, String CHAR2,CampusRouteFindingModel campusModel) {\n\t\t ArrayList<XYLocation> retrn = new ArrayList<XYLocation>();\n\t\t graph<String, Float> g = campusModel.getGraph();\n\t\t Map<String, String> idFirst = campusModel.getName();\n\t\t Map<String,String> nameFirst = campusModel.getID();\n\t\t Map<String, XYLocation> locations = campusModel.getLocations();\n\t\t if(!(nameFirst.containsKey(CHAR1))&&(!(idFirst.containsKey(CHAR1)))) { \n\t\t\t if(!(nameFirst.containsKey(CHAR2))&&(!(idFirst.containsKey(CHAR2)))) {\n\t\t\t\t if (CHAR1.equals(CHAR2)) {\n\t\t\t\t\t retrn.add(locations.get(CHAR1));\n\t\t\t\t\t return retrn;\n\t\t\t\t }\n\t\t\t\t retrn.add(locations.get(CHAR1));\n\t\t\t\t retrn.add(locations.get(CHAR2));\n\t\t\t\t return retrn;\n\t\t\t }\n\t\t\t retrn.add(locations.get(CHAR1));\n\t\t\t return retrn;\n\t\t\t}\n\t\t\tif(!(nameFirst.containsKey(CHAR2))&&(!(idFirst.containsKey(CHAR2)))) {\n\t\t\t\tretrn.add(locations.get(CHAR2));\n\t\t\t\treturn retrn;\n\t\t\t}\n\t\tif (nameFirst.containsKey(CHAR1)) {\n\t\t\tCHAR1 = nameFirst.get(CHAR1);\n\t\t}\n\t\tif (nameFirst.containsKey(CHAR2)) {\n\t\t\tCHAR2 = nameFirst.get(CHAR2);\n\t\t}\n\t\tretrn.add(locations.get(CHAR1));\n\t\tif (!(CHAR1.equals(CHAR2))) {\n\t\t\tArrayList<edges<String, Double>> tmp = Dijkstra(CHAR1,CHAR2,g);\n\t\t\tif (tmp==null) {\n\t\t\t\tretrn.add(locations.get(CHAR1));\n\t\t\t\tretrn.add(locations.get(CHAR1));\n\t\t\t\treturn retrn;\n\t\t\t}\n\t\t\tIterator<edges<String, Double>> print = tmp.iterator();\n\t\t\tprint.next();\n\t\t\twhile (print.hasNext()) {\n\t\t\t\tedges<String, Double> temp = print.next();\n\t\t\t\tretrn.add(locations.get(temp.getDest()));\n\t\t\t}\n\t\t}\n\t\treturn retrn;\n\t}", "private ArrayList<ArrayList<Coord>> findCircles() {\n\t\tArrayList<ArrayList<Coord>> circs = new ArrayList<ArrayList<Coord>>();\n\t\twhile(currentLevel.size()>0) {\n\t\t\tcurrentCircle.add(currentLevel.remove(0));\n\t\t\trecurseCircle(currentCircle.get(0));\n\t\t\tArrayList<Coord> adds = new ArrayList<Coord>();\n\t\t\tfor(Coord c:currentCircle){\n\t\t\t\tadds.add(c);\n\t\t\t}\n\t\t\tcircs.add(adds);\n\t\t\tcurrentLevel.removeAll(currentCircle);\n\t\t\tcurrentCircle.clear();\n\t\t}\n\t\treturn circs;\n\t}", "public Vector<City> findPath(City c1, City c2) throws CityNotFoundException, NoPathException {\r\n\t\tif(!isExists(c1)||!isExists(c2)){\r\n\t\t\tthrow new CityNotFoundException(\"city not exists\");\r\n\t\t}\r\n\t\tif(!isExists(c1)&&!isExists(c2)){\r\n\t\t\tthrow new CityNotFoundException(\"city not exists\");\r\n\t\t}\r\n\r\n\r\n\t\tif(map.bfs(c1, c2)==null){\r\n\t\t\tthrow new NoPathException (\"no path found\");\r\n\t\t}\r\n\r\n\r\n\t\treturn map.bfs(c1, c2);\r\n\r\n\r\n\r\n\r\n\t}", "private void setCofR() {\n\t\t\n Vector3f pos_vec = new Vector3f();\n Point3f pos = new Point3f();\n Vector3f dir = new Vector3f();\n\t\tMatrix4f view_mtx = new Matrix4f();\n\t\tMatrix4f nav_mtx = new Matrix4f();\n Point3f cor = new Point3f();\n\t\t\n\t\tnavigationTransform.getTransform(nav_mtx);\n\t\t\n\t\tdata.viewpointTransform.getTransform(view_mtx);\n\t\tview_mtx.get(pos_vec);\n\t\t\n\t\t// the eye point\n\t\tpos.set(pos_vec);\n\t\t\n\t\t// the eye direction\n\t\tdir.x = view_mtx.m02;\n\t\tdir.y = view_mtx.m12;\n\t\tdir.z = view_mtx.m22;\n\t\tdir.negate();\n\t\tdir.normalize();\n\t\t\n\t\t// transform into world space\n\t\tnav_mtx.transform(pos);\n\t\tnav_mtx.transform(dir);\n\t\t\n\t\tArrayList pickResults = new ArrayList();\n\t\tPickRequest pickRequest = new PickRequest();\n\t\tpickRequest.pickGeometryType = PickRequest.PICK_RAY;\n\t\tpickRequest.pickSortType = PickRequest.SORT_ORDERED;\n\t\tpickRequest.pickType = PickRequest.FIND_GENERAL;\n\t\tpickRequest.useGeometry = false;\n\t\tpickRequest.foundPaths = pickResults;\n\t\t\n\t\t// initialize the pick request\n\t\tpickRequest.origin[0] = pos.x;\n\t\tpickRequest.origin[1] = pos.y;\n\t\tpickRequest.origin[2] = pos.z;\n\t\t\n\t\tpickRequest.destination[0] = dir.x;\n\t\tpickRequest.destination[1] = dir.y;\n\t\tpickRequest.destination[2] = dir.z;\n\t\t\n\t\trootGroup.pickSingle(pickRequest);\n\t\t\n\t\tif (pickRequest.pickCount > 0) {\n\t\t\t\n \tPoint3f intersectPoint = new Point3f();\n \tVector3f intersectVector = new Vector3f();\n\t\t\n\t\t\tfloat min_distance = Float.MAX_VALUE;\n\t\t\t// sort through the bounds intersections\n\t\t\tint num_pick = pickResults.size();\n\t\t\tfor (int i = 0; i < num_pick; i++) {\n\t\t\t\t\n\t\t\t\tSceneGraphPath sgp = (SceneGraphPath)pickResults.get(i);\n\t\t\t\tsgp.getTransform(view_mtx);\n\t\t\t\t\n\t\t\t\tShape3D shape = (Shape3D)sgp.getTerminalNode();\n\t\t\t\tVertexGeometry geom = (VertexGeometry)shape.getGeometry();\n\t\t\t\t\n\t\t\t\t//determine if there was an actual geometry intersection\n\t\t\t\tboolean intersect = iutils.rayUnknownGeometry(\n\t\t\t\t\tpos,\n\t\t\t\t\tdir,\n\t\t\t\t\t0,\n\t\t\t\t\tgeom,\n\t\t\t\t\tview_mtx,\n\t\t\t\t\tintersectPoint,\n\t\t\t\t\tfalse);\n\t\t\t\t\n\t\t\t\tif (intersect) {\n\t\t\t\t\tintersectVector.set(\n\t\t\t\t\t\tintersectPoint.x - pos.x,\n\t\t\t\t\t\tintersectPoint.y - pos.y,\n\t\t\t\t\t\tintersectPoint.z - pos.z);\n\n\t\t\t\t\tfloat distance = intersectVector.length();\n\t\t\t\t\tif (distance < min_distance) {\n\t\t\t\t\t\tmin_distance = distance;\n\t\t\t\t\t\tcor.set(intersectPoint);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t\tnav_mtx.invert();\n\t\t\tnav_mtx.transform(cor);\n\t\t}\n\t\tcenterOfRotation.set(cor);\n\t}", "@Override\n\tpublic void getCarrier(String[][] ar){\n\t\tSystem.out.println(\"Carrier found: (\" + C.get(0).x+ \", \" + C.get(0).y + \") \"\n\t\t\t\t+ \"to \" + \"(\" + C.get(C.size()-1).x + \", \" + C.get(C.size()-1).y + \")\");\n\t}", "public void getNeighbors(){\n // North \n if(this.row - this.value>=0){\n this.north = adjacentcyList[((this.row - this.value)*col_size)+col];\n }\n // South\n if(this.row + value<row_size){\n this.south = adjacentcyList[((this.row+this.value)*row_size)+col];\n }\n // East\n if(this.col + this.value<col_size){\n this.east = adjacentcyList[((this.col+this.value)+(this.row)*(col_size))];\n }\n // West\n if(this.col - this.value>=0){\n this.west = adjacentcyList[((this.row*col_size)+(this.col - this.value))];\n }\n }", "public int infectNeighbours(Map map);", "private int getAnchorPosition(Anchor anchor, ArrayList<Tile> word){\n for (int c = 0 ; c < word.size() ; c++){\n if (word.get(c).letter == anchor.anchorTile.letter){\n return c;\n }\n }\n return -1000; //return something ridiculous if not there\n }", "public Conge find( Integer idConge ) ;", "private int goalEntry0ind(int r, int c) {\n if (r == N - 1 && c == N - 1) return 0;\n else return N * r + c + 1;\n }", "private Candidatos calculaCandidatos(Etapa e) {\n if(debug) {\n System.out.println(\"**********************calculaCandidatos\");\n System.out.println(\"e.i: \" + e.i);\n }\n \n Candidatos c = new Candidatos();\n if(e.k <= this.G.numVertices()) {\n //crear un objeto candidato y rellenarlo para esta etapa \n c.i = -1; //no apuntamos a ninguna pos porque en la funcion seleccionaCandidato ya incrementamos este valor\n //buscar el primer vertize sin emparejar\n int size = this.sol.emparejamientos.length;\n \n c.fila = e.i;\n \n //añadimos los candidatos\n c.verticesSinPareja = new ArrayList<>();\n for(int k = 0; k < size; ++k) {\n if(this.sol.emparejamientos[c.fila][k] == 0) {\n if(debug) {\n System.out.print(\" candidato: \" + k+ \" \");\n }\n c.verticesSinPareja.add(k);\n }\n }\n \n }\n else {\n c.verticesSinPareja = new ArrayList<>();\n }\n return c;\n }", "private void loadCrimes(LatLng Loc){\n //create a new instance of parser class. Parser class queries Data.octo.dc.gov for crime data\n mParser = new Parser();\n\n //try and parse data\n try {\n mParser.parse(getResources().getAssets().open(DATA, 0));\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //get the data from the parser and stores in TreeSet\n mCrimesList= mParser.nearestCrimes(Loc.latitude, Loc.longitude, mRadius);\n\n //Loop through and plot crimes\n List<Address> address;\n int i = 1;\n\n //iterate through crimes and querey google to get latitude and longitude of particular addresses\n for(Crime c: mCrimesList){\n try {\n address = mGeocoder.getFromLocationName(c.address ,1,\n mBounds[0], mBounds[1],mBounds[2], mBounds[3]);\n if(address == null || address.size() == 0){\n Log.i(TAG, \"***Crime:\" + c.offense + \" @ \" + c.address + \" NOT PLOTTED\");\n /*Crimes with addresses that can't be found are added to bad crimes list\n to be removed */\n mBadCrimesList.add(c);\n Log.i(TAG, mBadCrimesList.toString());\n if(i<=MAX_CRIMES) {\n continue;\n }else{\n removeBadCrimes();\n return;\n }\n }\n LatLng coor = new LatLng(address.get(0).getLatitude(), address.get(0).getLongitude());\n\n //Create pin\n Marker crime_marker = mMap.addMarker(new MarkerOptions()\n .position(coor));\n\n //this put geofence around crime points. Team decided to comment out to remove clutter\n /*Circle crime_circle = mMap.addCircle(new CircleOptions()\n .center(new LatLng(coor.latitude, coor.longitude))\n .radius(CIRCLE_SIZE)\n .strokeColor(Color.RED)\n .fillColor(RED_COLOR));\n c.circle = crime_circle;*/\n\n\n //crime object gets reference to its own pin\n c.marker = crime_marker;\n if(c.marker == null){\n Log.i(TAG, \"null marker\");\n }\n if(c.circle == null){\n Log.i(TAG, \"null circle\");\n }\n c.Lat = coor.latitude;\n c.Long = coor.longitude;\n\n //start out crime by being invisible\n c.setVisable(false);\n Log.i(TAG, \"Crime:\" + c.offense + \" @ \" + c.address + \" PLOTTED\");\n }catch(IOException e){\n //catch any issue that google throws\n Log.i(TAG, \"I/O EXCEPTION while plotting crime\");\n mBadCrimesList.add(c);\n continue;\n }\n i++;\n if(i > MAX_CRIMES ){\n removeBadCrimes();\n return;\n }\n }\n\n }", "private Cell getBananaTarget() {\n Cell[][] blocks = gameState.map;\n int mostWormInRange = 0;\n Cell chosenCell = null;\n boolean wormAtCenter;\n\n for (int i = currentWorm.position.x - currentWorm.bananaBomb.range; i <= currentWorm.position.x + currentWorm.bananaBomb.range; i++){\n for (int j = currentWorm.position.y - currentWorm.bananaBomb.range; j <= currentWorm.position.y + currentWorm.bananaBomb.range; j++){\n wormAtCenter = false;\n if (isValidCoordinate(i, j)\n && euclideanDistance(i, j, currentWorm.position.x, currentWorm.position.y) <= 5) {\n List<Cell> affectedCells = getBananaAffectedCell(i, j);\n\n int wormInRange = 0;\n for (Cell cell : affectedCells) {\n for (Worm enemyWorm : opponent.worms) {\n if (enemyWorm.position.x == cell.x && enemyWorm.position.y == cell.y\n && enemyWorm.health > 0)\n wormInRange++;\n if (enemyWorm.position.x == i && enemyWorm.position.y == j)\n wormAtCenter = true;\n }\n for (Worm myWorm : player.worms) {\n if (myWorm.position.x == cell.x && myWorm.position.y == cell.y && myWorm.health > 0)\n wormInRange = -5;\n }\n }\n if (wormInRange > mostWormInRange) {\n mostWormInRange = wormInRange;\n chosenCell = blocks[j][i];\n } else if (wormInRange == mostWormInRange && wormAtCenter) {\n chosenCell = blocks[j][i];\n }\n }\n }\n }\n\n return chosenCell;\n }", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "static // Returns LCA if node n1, n2 are present in the given binary tree,\r\n// otherwise return -1\r\nint findLCA(BTNode root, int n1, int n2)\r\n{\n int[] path1 = null, path2 = null;\r\n \r\n // Find paths from root to n1 and root to n1. If either n1 or n2\r\n // is not present, return -1\r\n if ( !findPath(root, path1, n1) || !findPath(root, path2, n2))\r\n return -1;\r\n \r\n /* Compare the paths to get the first different value */\r\n int i;\r\n for (i = 0; i < path1.length && i < path2.length ; i++)\r\n if (path1[i] != path2[i])\r\n break;\r\n return path1[i-1];\r\n}", "private Corners findCorners(ArrayList<MatOfPoint> markers) {\n ArrayList<Point> corners = new ArrayList<>();\n for (MatOfPoint mrk : markers) {\n List<Point> list = mrk.toList();\n mrk.release();\n double sumx = 0, sumy = 0;\n for (Point p : list) {\n sumx += p.x;\n sumy += p.y;\n }\n corners.add(new Point(sumx/list.size(), sumy/list.size()));\n // System.out.println(list.size());\n }\n sortCorners(corners);\n // for (Point p : corners) System.out.println(p.x + \" \" + p.y);\n for (int i = 0; i < corners.size(); i++) {\n corners.get(i).x /= width;\n corners.get(i).y /= height;\n }\n if (corners.size() == 4) {\n return new Corners(corners.get(0), corners.get(1), corners.get(3), corners.get(2));\n }\n return null;\n }", "public static String findPath(String CHAR1, String CHAR2,CampusRouteFindingModel campusModel) {\n\t\t graph<String, Float> g = campusModel.getGraph();\n\t\t Map<String, String> idFirst = campusModel.getName();\n\t\t Map<String,String> nameFirst = campusModel.getID();\n\t\t Map<String, XYLocation> locations = campusModel.getLocations();\n\t\t if(!(nameFirst.containsKey(CHAR1))&&(!(idFirst.containsKey(CHAR1)))) { \n\t\t\t if(!(nameFirst.containsKey(CHAR2))&&(!(idFirst.containsKey(CHAR2)))) {\n\t\t\t\t if (CHAR1.equals(CHAR2)) {\n\t\t\t\t\t return \"Unknown building: [\"+CHAR1+\"]\\n\";\n\t\t\t\t }\n\t\t\t\t return \"Unknown building: [\"+CHAR1+\"]\\n\"+\"Unknown building: [\"+CHAR2+\"]\\n\";\n\t\t\t }\n\t\t\t\treturn \"Unknown building: [\"+CHAR1+\"]\\n\";\n\t\t\t}\n\t\t\tif(!(nameFirst.containsKey(CHAR2))&&(!(idFirst.containsKey(CHAR2)))) {\n\t\t\t\treturn \"Unknown building: [\"+CHAR2+\"]\\n\";\n\t\t\t}\n\t\tif (nameFirst.containsKey(CHAR1)) {\n\t\t\tCHAR1 = nameFirst.get(CHAR1);\n\t\t}\n\t\tif (nameFirst.containsKey(CHAR2)) {\n\t\t\tCHAR2 = nameFirst.get(CHAR2);\n\t\t}\n\t\tString retrn = \"Path from \"+idFirst.get(CHAR1)+\" to \"+idFirst.get(CHAR2)+\":\\n\";\n\t\tdouble fin = 0;\n\t\tString prev = CHAR1;\n\t\tif (Integer.valueOf(CHAR1) > 92) {\n\t\t\tif (Integer.valueOf(CHAR2) > 92) {\n\t\t\t\tif (CHAR1.equals(CHAR2)) {\n\t\t\t\t\t return \"Unknown building: [\"+CHAR1+\"]\\n\";\n\t\t\t\t }\n\t\t\t\treturn \"Unknown building: [\"+CHAR1+\"]\\n\"+\"Unknown building: [\"+CHAR2+\"]\\n\";\n\t\t\t}\n\t\t\treturn \"Unknown building: [\"+CHAR1+\"]\\n\";\n\t\t}\n\t\tif (Integer.valueOf(CHAR2) > 92) {\n\t\t\treturn \"Unknown building: [\"+CHAR2+\"]\\n\";\n\t\t}\n\t\tif (!(CHAR1.equals(CHAR2))) {\n\t\t\tArrayList<edges<String, Double>> tmp = Dijkstra(CHAR1,CHAR2,g);\n\t\t\tif (tmp==null) {\n\t\t\t\treturn \"There is no path from \"+idFirst.get(CHAR1)+\" to \"+idFirst.get(CHAR2)+\".\\n\";\n\t\t\t}\n\t\t\tIterator<edges<String, Double>> print = tmp.iterator();\n\t\t\tprint.next();\n\t\t\twhile (print.hasNext()) {\n\t\t\t\tedges<String, Double> temp = print.next();\n\t\t\t\tString direction = findDirection(locations.get(prev),locations.get(temp.getDest()));\n\t\t\t\tretrn = retrn+\"\\tWalk \"+direction+\" to (\"+ idFirst.get(temp.getDest())+\")\\n\";\n\t\t\t\tprev = temp.getDest();\n\t\t\t\tfin = temp.getLabel();\n\t\t\t}\n\t\t}\n\t\tretrn = retrn+String.format(\"Total distance: %.3f pixel units.\\n\", fin);\n\t\treturn retrn;\n\t}", "static long maximumPeople(long[] p, long[] x, long[] y, long[] r) {\n city[] allCity = new city[n];\n for(int i = 0; i < n; i++)\n allCity[i] = new city(p[i], x[i]);\n Arrays.sort(allCity);\n for(int i = 0; i < m; i++){\n long start = y[i] - r[i];\n long end = y[i] + r[i];\n int startindex = Arrays.binarySearch(allCity, new city(0, start));\n if(startindex < 0)\n startindex = - startindex - 1;\n else{\n long value = allCity[startindex].loc;\n while(true){\n startindex--;\n if(startindex < 0)\n break;\n if(allCity[startindex].loc != value)\n break;\n }\n startindex++;\n }\n int endindex = Arrays.binarySearch(allCity, new city(0, end));\n if(endindex < 0)\n endindex = -endindex - 2;\n else{\n long value = allCity[endindex].loc;\n while(true){\n endindex++;\n if(endindex >= n)\n break;\n if(allCity[endindex].loc != value)\n break;\n }\n endindex--;\n }\n for(int j = startindex; j <= endindex; j++){\n if(j >= n)\n break;\n allCity[j].clouds.add(i);\n }\n }\n int prev = -1;\n long sunny = 0;\n long max = 0;\n long accu = 0;\n for(int i = 0; i < n; i++){\n if(allCity[i].clouds.size() == 0)\n sunny += allCity[i].population;\n if(allCity[i].clouds.size() == 1){\n if(allCity[i].clouds.get(0) == prev){\n accu += allCity[i].population;\n if(accu > max)\n max = accu;\n }\n else {\n accu = allCity[i].population;\n prev = allCity[i].clouds.get(0);\n if(accu > max)\n max = accu;\n }\n }\n }\n return max + sunny;\n }", "private Point calcLocation(String tagID){\t\t\t\n\t\tDate now = new Date();\n\t\tclass referenceDist implements Comparable<referenceDist>{\n\t\t\tString referenceID;\n\t\t\tDouble inverseDistance;\n\t\t\t\n\t\t\tpublic referenceDist(String id, double distance){\n\t\t\t\tthis.referenceID = id;\n\t\t\t\tthis.inverseDistance = new Double(distance);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int compareTo(referenceDist o) {\n\t\t\t\t\n\t\t\t\treturn o.inverseDistance.compareTo(this.inverseDistance);\n\t\t\t}\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tArrayList<referenceDist> referenceList = new ArrayList<referenceDist>();\t\t\n\t\tfor (int i = 0 ; i < (referenceTags.size()); i++){\n\t\t\tString referenceID = referenceTags.get(i);\n\t\t\t//System.err.printf(\"Comparing tag %s with readings: %s\\r\\n\", tagID, tags.get(tagID).toString());\n\t\t\tint distance = tags.get(tagID).calcDiff(tags.get(referenceID));\n\t\t\t//System.err.printf(\"Reference tag %s with readings: %s\\r\\n\", referenceID, tags.get(referenceID).toString());\n\t\t\tdouble power = 0;\n\t\t\tif (distance == 0){\n\t\t\t\tpower = 10;\n\t\t\t} else {\n\t\t\t\tpower = 1.0/distance;\n\t\t\t}\n\t\t\t\n\t\t\treferenceList.add(new referenceDist(referenceID, power));\n\t\t}\n\t\t\n\t\tCollections.sort(referenceList);\n//\t\tIterator<referenceDist> iter = referenceList.iterator();\n//\t\tSystem.out.printf(\"START\\r\\n\");\n//\t\twhile(iter.hasNext()){\n//\t\t\treferenceDist dist = iter.next();\n//\t\t System.out.printf(\"'%s : %s'\", dist.referenceID, dist.inverseDistance.toString());\n//\t\t}\n//\t\tSystem.out.printf(\"\\r\\nEND\\r\\n\");\n\t\tint neighbours = Math.min(maxNeighbours, referenceList.size());\n\t\tdouble total = 0;\n\t\tdouble x = 0;\n\t\tdouble y = 0;\n\t\tdouble diff = 0;\n\t\tfor (int i = 1; i <= neighbours; i++){\n\t\t\ttotal += referenceList.get(i).inverseDistance;\n\t\t}\n\t\tfor (int i = 1; i <= neighbours; i++){\n\t\t\tPoint current = tags.get(referenceList.get(i).referenceID).getLoc();\n\t\t\tx += (referenceList.get(i).inverseDistance / total) * current.getX();\n\t\t\ty += (referenceList.get(i).inverseDistance / total) * current.getY();\n\t\t}\n\t\tif (tagID.equals(\"03BD\")){\n\t\t\tdiff = Math.sqrt(Math.pow((x-345),2) + Math.pow((y-200),2));\n\t\t} else if (tagID.equals(\"03B8\")){\n\t\t\tdiff = Math.sqrt(Math.pow((x-345),2) + Math.pow((y-300),2));\n\t\t} else if (tagID.equals(\"03D3\")){\n\t\t\tdiff = Math.sqrt(Math.pow((x-345),2) + Math.pow((y-400),2));\n\t\t}\n\t\tlog(String.valueOf(diff)+ \"\\r\\n\", tagID+ \"_4.log\");\t\t\n\t\t\t\n\n\t\tPoint location = new Point((int )x, (int)y);\n\t\tlog(String.valueOf(now.getTime()) + \"\\r\\n\", \"time.log\");\t\t\t\n\n\t//\tlog(String.valueOf(now.getTime()) + \": Tag=\"+ tagID + \" x=\" + String.valueOf(x) + \" y=\"+String.valueOf(y)+\"\\r\\n\", \"tagLocationLogfile.log\");\n\t\t\n\t\treturn location;\n\t}", "public static double getJaccard() {\n\t\tdouble match = 0;\n\t\tdouble unmatch = 0;\n\t\tfor(int i = 1;i<=totalGenes;i++) {\n\t\t\tint c1 = actualClusters.get(i);\n\t\t\tint r1 = resultClusters.get(i);\n\t\t\tfor(int j=1;j<=totalGenes;j++) {\n\t\t\t\tint c2 = actualClusters.get(j);\n\t\t\t\tint r2 = resultClusters.get(j);\n\t\t\t\tif(c1 == c2 && r1 == r2)\n\t\t\t\t\tmatch++;\n\t\t\t\telse if( (c1 == c2 && r1 != r2) || (c1 != c2 && r1 == r2))\n\t\t\t\t\tunmatch++;\n\t\t\t}\n\t\t}\n\t\tdouble jacard = match/(match+unmatch);\n\t\treturn jacard;\n\t}", "public Point getCarLocation() {\r\n\r\n SQLiteQueryBuilder builder = new SQLiteQueryBuilder();\r\n builder.setTables(FTS_VIRTUAL_TABLE_CAR);\r\n builder.setProjectionMap(mColumnMapCar);\r\n\r\n Cursor cursor = builder.query(mDatabaseOpenHelper.getReadableDatabase(),\r\n null, null, null, null, null, null);\r\n\r\n if (cursor == null) {\r\n return null;\r\n } else if (!cursor.moveToFirst()) {\r\n cursor.close();\r\n return null;\r\n }\r\n\r\n String point_str = cursor.getString(1);\r\n\r\n point_str = point_str.trim();\r\n String[] coordinates = point_str.split(\",\");\r\n String lon = coordinates[0];\r\n String lat = coordinates[1];\r\n\r\n double flon = Float.valueOf(lon);\r\n double flat = Float.valueOf(lat);\r\n\r\n return (new Point(flon, flat));\r\n }", "public static int[] solution(int[] T) {\n int capital = -1;\n Map<Integer,List<Integer>> con = new HashMap<Integer,List<Integer>>(); //store the connectivity between cities\n for(int i=0;i<T.length;i++){\n if(i==T[i]){\n capital = i;\n }\n //there is a single road path between these cities\n if(!con.containsKey(i)){\n con.put(i, new ArrayList<Integer>());\n }\n if(i!=T[i])\n con.get(i).add(T[i]);\n //we can also go other way round\n if(!con.containsKey(T[i])){\n con.put(T[i], new ArrayList<Integer>());\n }\n if(i!=T[i])\n con.get(T[i]).add(i);\n //System.out.println(\"adding pairs:\"+T[i]+\" and:\"+i);\n \n }\n //for(Integer ii:con.keySet()){\n // System.out.println(\"node \"+ii+\" has neighbors:\"+Arrays.toString(con.get(ii).toArray()));\n //}\n //after initializing the one-road connectivity between the cities, we need to count the\n //number of cities at each distance\n int[] citCount = new int[T.length-1];\n // assume it starts from 0 but has the equivalence to 1 index array, i.e. we store citCount[0] as the no. of cities having 1 dist to capital\n HashSet<Integer> visitedCities = new HashSet<Integer>();\n List<Integer> lastCities = null;\n for(int i=0;i<T.length;i++){\n //last iteration cities\n if(i==0){\n lastCities = con.get(capital);\n citCount[i] = lastCities.size(); //the nodes directly connected to capital city\n visitedCities.addAll(con.get(capital));\n visitedCities.add(capital);\n System.out.println(\"the \"+(i+1)+\" neighbors of \"+capital+\"..are:\"+Arrays.toString(con.get(capital).toArray()));\n }else{\n //get the neighbor of the last cities\n int neighborcount = 0;\n List<Integer> newCities = new ArrayList<Integer>();\n for(Integer ii:lastCities){\n List<Integer> n = con.get(ii);\n for(Integer nn:n){\n if(!visitedCities.contains(nn)){\n neighborcount++;\n newCities.add(nn);\n }\n }\n }\n visitedCities.addAll(lastCities);\n citCount[i] = neighborcount;\n System.out.println(\"the \"+(i+1)+\" neighbors of \"+capital+\"..are:\"+Arrays.toString(newCities.toArray()));\n lastCities.clear();\n lastCities.addAll(newCities);\n //lastCities.removeAll(visitedCities);\n }\n \n }\n \n \n return citCount;\n }", "public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(sum==0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n x = i;\n y = j;\n sum = tmpSum;\n }\n }\n else {\n x = i;\n y = j;\n sum = tmpX + tmpY;\n\n }\n }\n }\n\n }\n }\n return new Position(x,y);\n }", "private void dist2Pos3Beacons()\n {\n //Betrachtung bei 3 Empfaengern\n double dist12 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[1][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[1][1], 2));\n double dist13 = Math.sqrt(Math.pow(posReceiver[0][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[0][1] - posReceiver[2][1], 2));\n double dist23 = Math.sqrt(Math.pow(posReceiver[1][0] - posReceiver[2][0], 2) + Math.pow(posReceiver[1][1] - posReceiver[2][1], 2));\n\n boolean temp12 = Math.abs(radius[0] - radius[1]) > dist12;\n boolean temp23 = Math.abs(radius[1] - radius[2]) > dist23;\n boolean temp13 = Math.abs(radius[0] - radius[2]) > dist13;\n\n //Zwei Kreise innerhalb eines anderen Kreises\n if ((temp12 && temp23) || (temp12 && temp13) || (temp23 && temp13))\n {\n double f0 = (dist12 / radius[0] + dist13 / radius[0]) / 2;\n double f1 = (dist12 / radius[1] + dist23 / radius[1]) / 2;\n double f2 = (dist12 / radius[2] + dist13 / radius[2]) / 2;\n\n radius[0] = radius[0] * f0;\n radius[1] = radius[1] * f1;\n radius[2] = radius[2] * f2;\n }\n //Kreis 2 in Kreis 1\n if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[0] > radius[1]))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[0],radius[1],radius[2]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kreis 1 in Kreis 2\n else if ((Math.abs(radius[0] - radius[1]) > dist12) && (radius[1] > radius[0]))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad =new double[]{radius[1],radius[0],radius[2]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 1\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[0] > radius[2]))//Kreis 3 in 1\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[2],radius[0],radius[1]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 1 in Kreis 3\n else if ((Math.abs(radius[0] - radius[2]) > dist13) && (radius[2] > radius[0]))//Kreis 1 in 3\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad =new double[]{radius[0],radius[2],radius[1]};\n calcCircleInCircle(posRec, rad, dist23);\n }\n //Kreis 3 in Kreis 2\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[1] > radius[2]))//Kreis 3 in 2\n {\n double[][] posRec = new double[][]{{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[2],radius[1],radius[0]};\n calcCircleInCircle(posRec, rad, dist12);\n }\n //Kreis 2 in Kreis 3\n else if ((Math.abs(radius[1] - radius[2]) > dist23) && (radius[2] > radius[1]))//Kreis 2 ind 3\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad =new double[]{radius[1],radius[2],radius[0]};\n calcCircleInCircle(posRec, rad, dist13);\n }\n //Kein Kreis liegt innerhalb eines Anderen\n else\n {\n\n if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double p1[] = new double[2];\t//x\n double p2[] = new double[2];\t//y\n\n double norm12 = norm(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1]);\n // Verbindungspunkte Kreis 1 und 2\n p1[0] = posReceiver[0][0] + (radius[0]/ norm12) * (posReceiver[1][0] - posReceiver[0][0]); //x-P1\n p1[1] = posReceiver[0][1] + (radius[0]/ norm12) * (posReceiver[1][1] - posReceiver[0][1]); //y-P1\n p2[0] = posReceiver[1][0] + (radius[1]/ norm12) * (posReceiver[0][0] - posReceiver[1][0]); //x-P2\n p2[1] = posReceiver[1][1] + (radius[1]/ norm12) * (posReceiver[0][1] - posReceiver[1][1]); //y-P2\n double m12[] = new double[2];\n m12[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m12[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm23 = norm(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1]);\n // Verbindungspunkte Kreis 2 und 3\n p1[0] = posReceiver[1][0] + (radius[1]/ norm23) * (posReceiver[2][0] - posReceiver[1][0]); //x-P1\n p1[1] = posReceiver[1][1] + (radius[1]/ norm23) * (posReceiver[2][1] - posReceiver[1][1]); //y-P1\n p2[0] = posReceiver[2][0] + (radius[2]/ norm23) * (posReceiver[1][0] - posReceiver[2][0]); //x-P2\n p2[1] = posReceiver[2][1] + (radius[2]/ norm23) * (posReceiver[1][1] - posReceiver[2][1]); //y-P2\n double m23[] = new double[2];\n m23[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m23[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n double norm31 = norm(posReceiver[2][0], posReceiver[2][1], posReceiver[0][0], posReceiver[0][1]);\n // Verbindungspunkte Kreis 3 und 1\n p1[0] = posReceiver[2][0] + (radius[2]/ norm31) * (posReceiver[0][0] - posReceiver[2][0]); //x-P1\n p1[1] = posReceiver[2][1] + (radius[2]/ norm31) * (posReceiver[0][1] - posReceiver[2][1]); //y-P1\n p2[0] = posReceiver[0][0] + (radius[0]/ norm31) * (posReceiver[2][0] - posReceiver[0][0]); //x-P2\n p2[1] = posReceiver[0][1] + (radius[0]/ norm31) * (posReceiver[2][1] - posReceiver[0][1]); //y-P2\n double m31[] = new double[2];\n m31[0] = p1[0] + 0.5 * (p2[0] - p1[0]);\t//x\n m31[1] = p1[1] + 0.5 * (p2[1] - p1[1]);\t//y\n\n\n // Norm der drei Punkte berechnen\n double a_p = Math.sqrt((m12[0] * m12[0]) + (m12[1] * m12[1]));\n double b_p = Math.sqrt((m23[0] * m23[0]) + (m23[1] * m23[1]));\n double c_p = Math.sqrt((m31[0] * m31[0]) + (m31[1] * m31[1]));\n\n double denominator = 2 * (((m12[0] * m23[1]) - (m12[1] * m23[0])) + (m23[0] * m31[1] - m23[1] * m31[0]) + (m31[0] * m12[1] - m31[1] * m12[0]));\n xPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*(-m12[1]) + (c_p * c_p - a_p * a_p)* (-m23[1]) + (a_p * a_p - b_p * b_p)*(-m31[1])));\n yPos_func = (1/ denominator)*(((b_p * b_p - c_p * c_p)*m12[0] + (c_p * c_p - a_p * a_p)* m23[0] + (a_p * a_p - b_p * b_p)*m31[0]));\n errRad_func = norm(xPos_func, yPos_func, m12[0], m12[1]);\n\n }\n // Kreis 1 und 3 schneiden sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc2Circle(posRec,rad);\n }\n //Kreis 2 und 3 schneide sich\n else if ((dist12 > (radius[0] + radius[1])) && (dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]},{posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc2Circle(posRec,rad);\n }\n //Kreis 1 und 2 schneiden sich\n else if ((dist13 > (radius[0] + radius[2])) && (dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{{posReceiver[0][0],posReceiver[0][1]},{posReceiver[1][0],posReceiver[1][1]},{posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc2Circle(posRec,rad);\n }\n else if ((dist12 > (radius[0] + radius[1])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]}};\n double[] rad = new double[]{radius[0],radius[1],radius[2]};\n calc1Circle(posRec,rad);\n }\n else if ((dist23 > (radius[1] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[1][0],posReceiver[1][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[0][0],posReceiver[0][1]}};\n double[] rad = new double[]{radius[1],radius[2],radius[0]};\n calc1Circle(posRec,rad);\n }\n else if ((dist13 > (radius[0] + radius[2])))\n {\n double[][] posRec = new double[][]{\n {posReceiver[0][0],posReceiver[0][1]},\n {posReceiver[2][0],posReceiver[2][1]},\n {posReceiver[1][0],posReceiver[1][1]}};\n double[] rad = new double[]{radius[0],radius[2],radius[1]};\n calc1Circle(posRec,rad);\n }\n else\n {\n double x1 = 0, y1 = 0, x2 = 0, y2 = 0, x3 = 0, y3 = 0;\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n //Kreisschnittpunkte\n double pos12[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[1][0], posReceiver[1][1], radius[0], radius[1]);\n double pos23[][] = circlepoints2(posReceiver[1][0], posReceiver[1][1], posReceiver[2][0], posReceiver[2][1], radius[1], radius[2]);\n double pos13[][] = circlepoints2(posReceiver[0][0], posReceiver[0][1], posReceiver[2][0], posReceiver[2][1], radius[0], radius[2]);\n\n if(radius[0] >= norm(pos23[0][0],pos23[0][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[0][0];\n y1 = pos23[0][1];\n }\n else if(radius[0] >= norm(pos23[1][0], pos23[1][1], posReceiver[0][0],posReceiver[0][1]))\n {\n x1 = pos23[1][0];\n y1 = pos23[1][1];\n }\n\n if(radius[1] >= norm(pos13[0][0], pos13[0][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[0][0];\n y2 = pos13[0][1];\n }\n else if(radius[1] >= norm(pos13[1][0], pos13[1][1], posReceiver[1][0],posReceiver[1][1]))\n {\n x2 = pos13[1][0];\n y2 = pos13[1][1];\n }\n\n if(radius[2] >= norm(pos12[0][0], pos12[0][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[0][0];\n y3 = pos12[0][1];\n }\n else if(radius[2] >= norm(pos12[1][0], pos12[1][1], posReceiver[2][0],posReceiver[2][1]))\n {\n x3 = pos12[1][0];\n y3 = pos12[1][1];\n }\n\n double tempD = x1 * y2 + x2 * y3 + x3 * y1 - x1 * y3 - x2 * y1 - x3 * y2;\n\n xPos_func = (0.5*(\n -y1*(y2*y2)\n +y1*(y3*y3)\n -y1*(x2*x2)\n +y1*(x3*x3)\n\n +y2*(y1*y1)\n -y2*(y3*y3)\n +y2*(x1*x1)\n -y2*(x3*x3)\n\n -y3*(y1*y1)\n +y3*(y2*y2)\n -y3*(x1*x1)\n +y3*(x2*x2)\n ))/ tempD;\n\n yPos_func = (0.5*(\n +x1*(x2*x2)\n -x1*(x3*x3)\n +x1*(y2*y2)\n -x1*(y3*y3)\n\n -x2*(x1*x1)\n +x2*(x3*x3)\n -x2*(y1*y1)\n +x2*(y3*y3)\n\n +x3*(x1*x1)\n -x3*(x2*x2)\n +x3*(y1*y1)\n -x3*(y2*y2)\n ))/ tempD;\n\n errRad_func = norm(x1, y1, xPos_func, yPos_func);\n }\n }\n }", "public static String findConcordance(String input) {\n\t\tint index;\n\t\tString output = \"\";\n\t\tArrayList<Integer> position;\n\t\tHashMap<Character, ArrayList<Integer>> concordance = new HashMap<Character, ArrayList<Integer>>();\n\t\t\n\t\t// Make concordance map for each character in the string.\n\t\tfor (index = 0; index < input.length(); index++) {\n\t\t\t// If the character is already present in the map get its present array list.\n\t\t\t// Add the next index value of the character in it.\n\t\t\tif (concordance.containsKey(input.charAt(index))) {\n\t\t\t\tposition = concordance.get(input.charAt(index));\n\t\t\t}\n\t\t\t// Else add the index value of the character in the new array list.\n\t\t\telse {\n\t\t\t\tposition = new ArrayList<Integer>();\n\t\t\t}\n\t\t\tposition.add(index);\n\t\t\tconcordance.put(input.charAt(index), position);\n\t\t}\n\n\t\t// Display the concordance of characters.\n\t\tfor (char value : concordance.keySet()) {\n\t\t\toutput += value + \": \" + concordance.get(value) + \" \";\n\t\t}\n\t\t\n\t\treturn output;\n\t}", "public int distanceToCentral() {\n SubCell central = centralSubCellOf(containingCell());\n return Math.abs(this.x() - central.x())\n + Math.abs(this.y() - central.y());\n }", "public Reason setSinglePositionCombination(Cage cage){\n\t\tif(!isUniqueSum(cage)) return null;\n\t\tif(cage.isSolved()) return null;\n\t\tSet<Integer> possibleNumbers = new TreeSet<>();\n\t\tfor(Location l : cage.getUnsolvedLocations()){\n\t\t\tpossibleNumbers.addAll(grid.getCell(l).getPossibleValues());\n\t\t}\n\t\tList<Combination> combinations = Sums.getSums(cage.getUnsolvedLocations().size(), cage.getRemaining(), possibleNumbers);\n\t\tCombination combination = combinations.get(0);\n\t\tSet<Integer> numbers = combination.getNumbers();\n\t\tfor(int i : numbers){\n\t\t\tint possiblePositions = 0;\n\t\t\tfor(Location l : cage.getUnsolvedLocations()){\n\t\t\t\tif(grid.getCell(l).getPossibleValues().contains(i)) possiblePositions++;\n\t\t\t}\n\t\t\tif(possiblePositions==1){\n\t\t\t\tint value = i;\n\t\t\t\tSudokuCell cell = null;\n\t\t\t\t//find the cell\n\t\t\t\tfor(Location l : cage.getUnsolvedLocations()){\n\t\t\t\t\tif(grid.getCell(l).getPossibleValues().contains(i)) cell = grid.getCell(l);\n\t\t\t\t}\n\t\t\t\tif(!cell.isSolved()){\n\t\t\t\t\tsolveCell(cell, value);\n\t\t\t\t\tString message = \"The \"+cage.getTotal()+\" cage located at \"+cage.getCellLocations().get(0)+\" can only have one combination of numbers \"+\n\t\t\t\t\t\t\tnumbers+\".\\nThere is only one possible location for the value \"+value+\" within this cage.\";\n\t\t\t\t\tReason r = new Reason(message, cell);\n\t\t\t\t\treturn r;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn null;\n\n\t}", "static PT ComputeCircleCenter(PT a, PT b, PT c) {\r\n\t\tb = (a.add(b)).divide(2);\r\n\t\tc = (a.add(c)).divide(2);\r\n\t\treturn ComputeLineIntersection(b, b.add(RotateCW90(a.subtract(b))), c, c.add(RotateCW90(a.subtract(c))));\r\n\t}", "private static Coordinates getCountryCenter(String country) {\n\t\n\t\tCoordinates countryCenter = null;\n\t\tMap<String, Coordinates> countries = CountryUtil.getInstance().getCountries();\n\t\tcountryCenter = countries.get(country);\n\t\treturn countryCenter;\n\t}", "private boolean adjacentCity(int cityR, int cityC) {\n for (int i = 0; i < MAP_LENGTH; i++) {\n for (int j = 0; j < MAP_LENGTH; j++) {\n if (tileMap[i][j] != null) {\n if (tileMap[i][j].getCity() != null) {\n if (((Math.abs(cityR - i)) <= 2) && ((Math.abs(cityC - j)) <= 2)) {\n return true;\n }\n }\n }\n }\n }\n return false;\n }", "public abstract Coordinate resolve(Coordinate c, int frame, double time);", "public Square getStartOrFinish(char c) {\n Square s = null;\n for (Square[] square : squares) {\n for (Square square1 : square) {\n if (square1.getV().getMode() == c) {\n return square1;\n }\n }\n }\n return s;\n }", "private Node findLCA(Node n1, Node n2) {\n\t\tif (n1 == n2) {\n\t\t\treturn n1;\n\t\t}\n\t\treturn findLCA(n1.parent, n2.parent);\n\t}", "private void findPath1(List<Coordinate> path) {\n\n // records the start coordinate in a specific sequence.\n ArrayList<Coordinate> starts = new ArrayList<>();\n // records the end coordinate in a specific sequence.\n ArrayList<Coordinate> ends = new ArrayList<>();\n // records the total cost of the path in a specific sequence.\n ArrayList<Integer> cost = new ArrayList<>();\n\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(o1);\n graph.printPath(d1);\n starts.add(o1);\n ends.add(d1);\n cost.add(graph.getPathCost(d1));\n }\n }\n int index = getMinIndex(cost);\n\n Graph graph = new Graph(getEdge(map));\n graph.dijkstra(starts.get(index));\n graph.printPath(ends.get(index));\n for (Graph.Node node : graph.getPathReference()) {\n path.add(node.coordinate);\n }\n setSuccess(path);\n }", "public JsonNode getDistanceToCentralen(Address address){\n Logger.debug(\"in GetdistfromCent: \"+address.streetName+\", cent: \"+tCentralen.streetName);\n return getPath(address, tCentralen);\n }", "private int exploreCC(Bitboard board, int posMask, int turn) {\n // (this isn't a real queue... but we're not doing shortest path so its fine)\n int queue = posMask;\n int ccSize = 0;\n while (queue != 0) {\n posMask = queue & ~(queue - 1);\n queue ^= posMask;\n\n if ((visited & posMask) != 0)\n continue;\n\n visited |= posMask;\n\n if (!board.isValid(posMask))\n continue;\n\n if (board.owns(posMask, 1 - turn))\n continue;\n else if (board.owns(posMask, turn)) {\n ccSize++;\n }\n\n queue |= BitMasks.orthogonal.get(posMask);\n }\n return ccSize;\n }", "void getCirculation (double effaoa, double thickness_pst, double camber_pst) { \n double beta;\n double th_abs = thickness_pst/100.0; \n xcval = 0.0;\n ycval = camber_pst/50; // was: current_part.camber/25/2\n\n if (current_part.foil == FOIL_CYLINDER || /* get circulation for rotating cylnder */\n current_part.foil == FOIL_BALL) { /* get circulation for rotating ball */\n rval = radius/lconv;\n gamval = 4.0 * Math.PI * Math.PI *spin * rval * rval\n / (velocity/vconv);\n gamval = gamval * spindr;\n ycval = .0001;\n } else {\n rval = th_abs + Math.sqrt((current_part.foil == FOIL_FLAT_PLATE\n ? 0 : th_abs*th_abs)\n + ycval*ycval + 1.0);\n xcval = current_part.foil == FOIL_JOUKOWSKI ? 0 : (1.0 - Math.sqrt(rval*rval - ycval*ycval));\n beta = Math.asin(ycval/rval)/convdr; /* Kutta condition */\n gamval = 2.0*rval*Math.sin((effaoa+beta)*convdr);\n }\n }", "public Vector<ConnectionPoint> findConnectionPoints(LayeredComponent lc) {\n \tVector<ConnectionPoint> result = new Vector<ConnectionPoint>();\n \t\n \tfor (int i = 0; i < layers.size(); i++) {\n \t\tHashSet<String> layer = layers.get(i); \n \t\tfor (String v : layer) {\n \t\t\tfor (int j = 0; j < lc.numberOfLayers(); j++) {\n \t\t\t\tSet<String> anotherLayer = lc.getLayer(j);\n \n \t\t\t\tfor (String v2 : anotherLayer) {\n \t\t\t\t\tif (v.equals(v2))\n \t\t\t\t\t\tresult.add(new ConnectionPoint(v, i, j)); \n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n \t\n \treturn result;\n }", "private long censusColapsed(ConstituentsAddressNode crt, int[]neighborhoods) throws P2PDDSQLException {\n\t\tif(DEBUG) System.err.println(\"ConstituentsModel:censusColapsed: start\");\n\t\tlong result = 0;\n\t\tif((crt==null)||(crt.n_data==null)) return 0;\n\t\tlong n_ID = crt.n_data.neighborhoodID;\n\t\tif(DEBUG) System.err.println(\"ConstituentsModel:censusColapsed: start nID=\"+n_ID);\n\t\tif(n_ID <= 0) return 0;\n\t\t\n\t\tString sql_c =\n\t\t\t\"SELECT \"+table.constituent.neighborhood_ID+\n\t\t\t\" FROM \"+table.constituent.TNAME+\n\t\t\t\" WHERE \"+table.constituent.neighborhood_ID+\"=?;\";\n\t\tArrayList<ArrayList<Object>> c = Application.db.select(sql_c, new String[]{n_ID+\"\"}, DEBUG);\n\t\tresult = c.size();\n\t\t\n\t\t\n\t\tString sql_n =\n\t\t\t\"SELECT \"+table.neighborhood.neighborhood_ID+\n\t\t\t\" FROM \"+table.neighborhood.TNAME+\n\t\t\t\" WHERE \"+table.neighborhood.parent_nID+\"=?;\";\n\t\tArrayList<ArrayList<Object>> n = Application.db.select(sql_n, new String[]{n_ID+\"\"}, DEBUG);\n\t\tneighborhoods[0] += n.size();\n\t\t\n\t\tHashSet<String> visited = new HashSet<String>();\n\t\tvisited.add(\"\"+n_ID);\n\t\tfor(int k=0; k<n.size(); k++) {\n\t\t\tif(!running) return 0;\n\t\t\tresult += censusHiddenNeighborhoods(Util.lval(n.get(k).get(0), -1), visited);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public static void main(String[] args){\n\n System.out.println(\"====Testing CannibalProblem class====\");\n\n CannibalProblem cp = new CannibalProblem(3,3,1,0,0,0); // start: (3,3,1)\n CannibalProblem cp2 = new CannibalProblem(3,3,1,0,0,0); // start (3,2,1)\n System.out.println(cp.startNode);\n System.out.println(cp.startNode.getDepth());\n System.out.println(cp.startNode.hashCode());\n\n System.out.println(cp.startNode.equals(cp.startNode));\n System.out.println(cp.startNode.equals(cp2.startNode));\n\n System.out.println(cp.startNode.goalTest());\n System.out.println(cp.startNode.getSuccessors().get(2).getSuccessors());\n\n }", "private int getNeighbours(Container[][][] buffer) {\n int neighbours = 0;\n if (indexPosition.x + 1 < buffer.length && buffer[(int) indexPosition.x + 1][(int) indexPosition.y][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.x - 1 >= 0 && buffer[(int) indexPosition.x - 1][(int) indexPosition.y][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.y + 1 < buffer[0].length && buffer[(int) indexPosition.x][(int) indexPosition.y + 1][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.y - 1 >= 0 && buffer[(int) indexPosition.x][(int) indexPosition.y - 1][(int) indexPosition.z] != null) {\n neighbours++;\n }\n if (indexPosition.z + 1 < buffer[0][0].length && buffer[(int) indexPosition.x][(int) indexPosition.y][(int) indexPosition.z + 1] != null) {\n neighbours++;\n }\n if (indexPosition.z - 1 >= 0 && buffer[(int) indexPosition.x][(int) indexPosition.y][(int) indexPosition.z - 1] != null) {\n neighbours++;\n }\n return neighbours;\n }", "public PVector cohesion (ArrayList<Shark> sharks) {\n float neighbordist = 50;\n PVector sum = new PVector(0, 0); // Start with empty vector to accumulate all positions\n int count = 0;\n for (Shark other : sharks) {\n float d = PVector.dist(position, other.position);\n if ((d > 0) && (d < neighbordist)) {\n sum.add(other.position); // Add position\n count++;\n }\n }\n if (count > 0) {\n sum.div(count);\n return seek(sum); // Steer towards the position\n } else {\n return new PVector(0, 0);\n }\n }", "Multimap<String, String> intersects(Circle bounds);", "public Id GetNearestNode(Coordinate coord, int cz){\n\t\tfloat distsq = Float.MAX_VALUE;\n\t\tfloat cx = coord.getX();\n\t\tfloat cy = coord.getY();\n\t\tId nearest = null;\n\t\tfor(Node n : listOfNodes){\n\t\t\tif(n == null) continue;\n\t\t\tfloat mx = n.getCoordinate().getX() - cx;\n\t\t\tfloat my = n.getCoordinate().getY() - cy;\n\t\t\tfloat mz = n.getCoordinate().getZ() - cz;\n\t\t\tfloat mydistsq = mx * mx + my * my;\n\t\t\tif(mydistsq < distsq && mz == 0){\n\t\t\t\tdistsq = mydistsq;\n\t\t\t\tnearest = n.getId();\n\t\t\t}\n\t\t}\n\t\treturn nearest;\n\t}", "private int getNeighbours(Cell cell) {\n\n //Get the X, Y co-ordinates of the cell\n int cellX = cell.getXCord();\n int cellY = cell.getYCord();\n\n // Helper variable initially set to check all neighbours.\n int[][] neighbourCords = allCords;\n\n //Checks what location the cell is and which of its neighbours to check\n //This avoids any array out of bounds issues by trying to look outside the grid\n if (cellX == 0 && cellY == 0) {\n neighbourCords = topLeftCords;\n } else if (cellX == this.width - 1 && cellY == this.height - 1) {\n neighbourCords = bottomRightCords;\n } else if (cellX == this.width - 1 && cellY == 0) {\n neighbourCords = topRightCords;\n } else if (cellX == 0 && cellY == this.height - 1) {\n neighbourCords = bottomLeftCords;\n } else if (cellY == 0) {\n neighbourCords = topCords;\n } else if (cellX == 0) {\n neighbourCords = leftCords;\n } else if (cellX == this.width - 1) {\n neighbourCords = rightCords;\n } else if (cellY == this.height - 1) {\n neighbourCords = bottomCords;\n }\n\n // Return the number of neighbours\n return searchNeighbours(neighbourCords, cellX, cellY);\n }", "public String getNearestStreet() {\n String nearestStreet = \"null\";\n CollisionResults results = new CollisionResults();\n float closestDistance = 101f;\n for(float xDir = -1; xDir <= 1; xDir += .1f) {\n for(float yDir = -1; yDir <= 1; yDir += .1f) {\n for(float zDir = -1; zDir <= 1; zDir += .1f) { \n Ray ray = new Ray(loc, new Vector3f(xDir, yDir, zDir));\n world.collideWith(ray, results);\n for (int i = 0; i < results.size(); i++) {\n float dist = results.getCollision(i).getDistance();\n String name = results.getCollision(i).getGeometry().getParent().getName();\n if (name.startsWith(\"R_\") && dist <= 100 && dist < closestDistance) {\n nearestStreet = name;\n closestDistance = dist;\n }\n }\n }\n }\n }\n\n return nearestStreet;\n \n }", "private Feature searchRefCatastral(Feature[] cache,Feature refCatFeature, Comparator comparator)\r\n {\r\n int featureIndex = Arrays.binarySearch(cache, refCatFeature,comparator);\r\n if(featureIndex<0) return null;\r\n return cache[featureIndex];\r\n }", "public int[] getFreeCoordonate(boolean grilleAgent){\n String[][] grilleToFind;\n if(grilleAgent)\n grilleToFind = this.grille;\n else\n grilleToFind = this.grilleObjectif;\n \n \n int[] freeCoordonate = new int[2];\n \n int x;\n int y;\n \n boolean foundFreeCoordinate = false;\n \n while(!foundFreeCoordinate)\n {\n Random r =new Random();\n x = r.nextInt(5);\n y = r.nextInt(5);\n if(grilleToFind[x][y] == \"0\"){\n foundFreeCoordinate = true;\n freeCoordonate[0] = x;\n freeCoordonate[1] = y;\n }\n }\n return freeCoordonate;\n }", "private void findAbdomenCM() {\r\n \r\n if (foundCenterOfMass) return;\r\n int xcm = 0, ycm = 0, pixCount = 0;\r\n for (int idx= 0, y = 0; y < yDim; y++) {\r\n for (int x = 0; x < xDim; x++, idx++) {\r\n if (sliceBuffer[idx] == abdomenTissueLabel) {\r\n xcm += x;\r\n ycm += y;\r\n pixCount++;\r\n }\r\n } // end for (int x = 0; ...)\r\n } // end for (int idx = 0, ...)\r\n \r\n if (pixCount == 0) {\r\n// System.err.println(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n MipavUtil.displayError(\"findAbdomenCM(): No pixels with abdomenTissueLabel in segmented image\");\r\n return;\r\n }\r\n \r\n centerOfMass[0] = (short)(xcm / pixCount);\r\n centerOfMass[1] = (short)(ycm / pixCount);\r\n foundCenterOfMass = true;\r\n }", "static PointDouble incircleCenter(PointDouble p1, PointDouble p2, PointDouble p3) {\n // if points are collinear, triangle is degenerate => no incircle center\n if (collinear(p1, p2, p3)) return null;\n\n // Compute the angle bisectors in l1, l2\n double ratio = dist(p1, p2) / dist(p1, p3);\n PointDouble p = translate(p2, scale(vector(p2, p3), ratio / (1 + ratio)));\n Line l1 = pointsToLine(p1, p);\n\n ratio = dist(p2, p1) / dist(p2, p3);\n p = translate(p1, scale(vector(p1, p3), ratio / (1 + ratio)));\n Line l2 = pointsToLine(p2, p);\n\n // Return the intersection of the bisectors\n return intersection(l1, l2);\n }", "private Address determineCoordinator() {\r\n synchronized(members) {\r\n for(Address member:members) {\r\n if(!local_addr.equals(member)) {\r\n return member;\r\n }\r\n }\r\n }\r\n return null;\r\n }", "private void findCrown() {\n // iterate over all x-positions\n for (int i = 0; i < board.side(); i++) {\n // only extreme elements are relevant\n if (!board.get(i, 0).isEmpty() && !board.get(i, 0).color())\n board.get(i, 0).setCrown();\n if (!board.get(i, board.side() - 1).isEmpty() &&\n board.get(i, board.side() - 1).color())\n board.get(i, board.side() - 1).setCrown();\n }\n }", "public static native void OpenMM_AmoebaMultipoleForce_getCovalentMaps(PointerByReference target, int index, PointerByReference covalentLists);", "private void displayMappingOfCabs(List<BookingRequest> bookingRequestList) {\n\t\t\n\t\tbookingRequestList.forEach(bookingRequest -> {\n\t\t\tCab assignedCab = bookingRequest.getAssignedCab();\n\t\t\tString cabNo = \"Not Assigned\";\n\t\t\tif (assignedCab != null) {\n\t\t\t\tcabNo = assignedCab.getCabNo();\n\t\t\t}\n\t\t\tSystem.out.println(\"Booking Id-\"+ bookingRequest.getBookingId() +\",Cab No-\"+ cabNo +\",Profit-\" +bookingRequest.getProfit());\n\t\t});\n\t}", "private Stack<MapLocation> findPath(State.StateView state)\n {\n Unit.UnitView townhallUnit = state.getUnit(townhallID);\n Unit.UnitView footmanUnit = state.getUnit(footmanID);\n \n MapLocation startLoc = new MapLocation(footmanUnit.getXPosition(), footmanUnit.getYPosition(), null, 0);\n \n MapLocation goalLoc = new MapLocation(townhallUnit.getXPosition(), townhallUnit.getYPosition(), null, 0);\n \n MapLocation footmanLoc = null;\n if(enemyFootmanID != -1) {\n Unit.UnitView enemyFootmanUnit = state.getUnit(enemyFootmanID);\n footmanLoc = new MapLocation(enemyFootmanUnit.getXPosition(), enemyFootmanUnit.getYPosition(), null, 0);\n }\n \n // get resource locations\n List<Integer> resourceIDs = state.getAllResourceIds();\n Set<MapLocation> resourceLocations = new HashSet<MapLocation>();\n for(Integer resourceID : resourceIDs)\n {\n ResourceNode.ResourceView resource = state.getResourceNode(resourceID);\n \n resourceLocations.add(new MapLocation(resource.getXPosition(), resource.getYPosition(), null, 0));\n }\n \n return AstarSearch(startLoc, goalLoc, state.getXExtent(), state.getYExtent(), footmanLoc, resourceLocations);\n }", "public double computeDistance(cluster c1, cluster c2) {\n\t\tdouble closest = 4000;\n\t\tfor (point p1 : c1.getPoints()) {\n\t\t\tfor (point p2 : c2.getPoints()) {\n\t\t\t\tdouble dist = Math.sqrt(Math.pow( (p1.x() - p2.x()) , 2) + Math.pow( (p1.y() - p2.y()) , 2));\n\t\t\t\tif (dist < closest) {\n\t\t\t\t\tclosest = dist;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn closest;\n\t}", "public CollisionInfo searchClosetCollision(List arr, Line l) {\r\n Point closetP = l.closestIntersectionToStartOfLine(((Collidable) arr.get(0)).getCollisionRectangle());\r\n Point tempP;\r\n int counter = 0;\r\n double minDist = closetP.distance(l.start());\r\n double tempDist;\r\n for (int i = 0; i < arr.size(); i++) {\r\n tempP = l.closestIntersectionToStartOfLine(((Collidable) arr.get(i)).getCollisionRectangle());\r\n tempDist = tempP.distance(l.start());\r\n // If the collision object is closet than the prev collision object.\r\n if (minDist > tempDist) {\r\n closetP = tempP;\r\n counter++;\r\n }\r\n }\r\n return new CollisionInfo(closetP, (Collidable) arr.get(counter));\r\n }", "public double calcDist(double lat2, double lon2, ArrayList<Record> cCentres)\n {\n double dist = 0;\n if (lat1==lat2 && lon1==lon2)\n dist = 0;\n else {\n double theta = lon1 - lon2;\n dist = Math.sin(Math.toRadians(lat1)) * Math.sin(Math.toRadians(lat2)) + Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) * Math.cos(Math.toRadians(theta));\n dist = Math.acos(dist);\n dist = Math.toDegrees(dist);\n dist = dist * 60 * 1.1515;\n dist = dist * 1.609344; //km\n }\n return (dist);\n }", "public void findShortestPath() {\r\n\t\t\r\n\t\t//Create a circular array that will store the possible next tiles in the different paths.\r\n\t\tOrderedCircularArray<MapCell> path = new OrderedCircularArray<MapCell>();\r\n\t\t\r\n\t\t//Acquire the starting cell.\r\n\t\tMapCell starting = cityMap.getStart();\r\n\t\t\r\n\t\t//This variable is to be updated continuously with the cell with the shortest distance value in the circular array.\r\n\t\tMapCell current=null;\r\n\t\t\r\n\t\t//This variable is to check if the destination has been reached, which is initially false.\r\n\t\tboolean destination = false;\r\n\t\t\r\n\t\t//Add the starting cell into the circular array, and mark it in the list.\r\n\t\tpath.insert(starting, 0);\r\n\t\t\r\n\t\tstarting.markInList(); \r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\t//As long as the circular array isn't empty, and the destination hasn't been reached, run this loop.\r\n\t\t\twhile(!path.isEmpty()&&!destination) {\r\n\t\t\t\t\r\n\t\t\t\t//Take the cell with the shortest distance out of the circular array, and mark it accordingly.\r\n\t\t\t\tcurrent = path.getSmallest();\r\n\t\t\t\tcurrent.markOutList();\r\n\t\t\t\t\r\n\t\t\t\tMapCell next;\r\n\t\t\t\tint distance;\r\n\t\t\t\t\r\n\t\t\t\tif(current.isDestination()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tdestination = true; //If the current cell is the destination, end the loop.\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\tnext = nextCell(current); //Acquire the next possible neighbour of the current cell.\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Don't run if next is null, meaning there is no other possible neighbour in the path for the current cell.\r\n\t\t\t\t\twhile(next!=null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = current.getDistanceToStart() + 1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//If the distance of the selected neighbouring cell is currently more than 1 more than the current cell's \r\n\t\t\t\t\t\t//distance, update the distance of the neighbouring cell. Then, set the current cell as its predecessor.\r\n\t\t\t\t\t\tif(next.getDistanceToStart()>distance) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tnext.setDistanceToStart(distance);\r\n\t\t\t\t\t\t\tnext.setPredecessor(current);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tdistance = next.getDistanceToStart(); \r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(next.isMarkedInList() && distance<path.getValue(next)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.changeValue(next, distance); //If the neighbouring cell is in the circular array, but with a \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //larger distance value than the new updated distance, change its value.\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else if(!next.isMarkedInList()){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tpath.insert(next, distance); //If the neighbouring cell isn't in the circular array, add it in.\r\n\t\t\t\t\t\t\tnext.markInList();\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tnext = nextCell(current); //Look for the next possible neighbour, if any.\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Catch all the possible exceptions that might be thrown by the method calls. Print the appropriate messages.\r\n\t\t} catch (EmptyListException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidNeighbourIndexException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"The program tried to access an invalid neighbour of a tile.\");\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (InvalidDataItemException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.out.println(\"Path finding execution stopped.\");\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(e.getMessage()+\" Path finding execution has stopped.\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//If a path was found, print the number of tiles in the path.\r\n\t\tif(destination) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Number of tiles in path: \" + (current.getDistanceToStart()+1));\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"No path found.\"); //Otherwise, indicate that a path wasn't found.\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "public Actor getLocation(Location currentLocation, GameMap map) {\n Map<Actor, Location> dinosaursList = new HashMap<>();\n dinosaursList = getAllActors(map);\n Location minimalLocation = null;\n\n for (Map.Entry<Actor, Location> spot: dinosaursList.entrySet()) {\n Actor actor = spot.getValue().getActor();\n int x = spot.getValue().x();\n int y = spot.getValue().y();\n Location there = map.at(x,y);\n if (actor instanceof Dinosaur) {\n if (currentLocation != there) {\n if (minimalLocation == null) {\n minimalLocation = there;\n } else if (super.distance(currentLocation, there) < super.distance(currentLocation, minimalLocation)) {\n minimalLocation = there;\n }\n }\n }\n }\n\n return map.getActorAt(minimalLocation);\n }", "private Vector<Integer> matchCheckPoint(List<Point> a) {\t\t\t\n\t\tVector<Integer> iDS= new Vector<>();\n\t\tfor(Point p :a) {\n\t\t\tif(!getAsphalt(p.x, p.y,this.trk).isIdDefalt()) {\n\t\t\t\tiDS.add(getAsphalt(p.x, p.y,this.trk).getId());\n\t\t\t}\n\t\t}\n\t\treturn iDS;\n\t}", "public Cella cercaCella(int _idToFind) {\n\t\tfor (Cella cell : celle) {\n\t\t\tif (cell.getId() == _idToFind) {\n\t\t\t\treturn cell;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private void clink(int x1, int y1, int x2, int y2) {\n\t\tint cx = x1;\n\t\tint cy = y1;\n\n\t\twhile (cx != x2) {\n\t\t\tif (x1 > x2) {\n\t\t\t\tcx--;\n\t\t\t} else {\n\t\t\t\tcx++;\n\t\t\t}\n\t\t\tif (inRange(cx, cy) == 1)\n\t\t\t\tmap[cx][cy] = 0;\n\t\t}\n\t\twhile (cy != y2) {\n\t\t\tif (y1 > y2) {\n\t\t\t\tcy--;\n\t\t\t} else {\n\t\t\t\tcy++;\n\t\t\t}\n\t\t\tif (inRange(cx, cy) == 1)\n\t\t\t\tmap[cx][cy] = 0;\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tint[][] matrix = { \t{ 1, 1, 0 }, \n\t\t\t\t\t\t\t{ 1, 1, 0 }, \n\t\t\t\t\t\t\t{ 0, 0, 1 } };\n\t\t\n\t\tint[][] matrix1 = { { 1, 1, 0 }, \n\t\t\t\t\t\t\t{ 1, 1, 1 }, \n\t\t\t\t\t\t\t{ 0, 1, 1 } };\n\t\t\n\t\tint[][] matrix2 = { { 1, 1, 1, 1, 1 }, \n\t\t\t\t { 0, 1, 0, 0, 0 }, \n\t\t\t\t { 0, 0, 1, 0, 0 },\n\t\t\t\t { 0, 0, 0, 1, 1 },\n\t\t\t\t { 0, 0, 0, 1, 1 } };\n\t\tSystem.out.println(findCircle(matrix));\n\t\tSystem.out.println(findCircle(matrix1));\n\t\tSystem.out.println(findCircle(matrix2));\n\n\t}" ]
[ "0.6023743", "0.59054726", "0.5834595", "0.57342595", "0.57340133", "0.56455946", "0.5638828", "0.5635655", "0.55921847", "0.555717", "0.55302906", "0.54943645", "0.5478973", "0.54070616", "0.53934187", "0.53534365", "0.5340681", "0.5318282", "0.5312153", "0.52843916", "0.52807456", "0.52650654", "0.5250885", "0.5250071", "0.5247365", "0.5246237", "0.52390295", "0.5228023", "0.52229655", "0.52102274", "0.5208591", "0.51926255", "0.51481193", "0.5133884", "0.51286006", "0.5128494", "0.5126254", "0.5118114", "0.5117764", "0.5102384", "0.5093661", "0.5082127", "0.50767916", "0.5071418", "0.50638103", "0.5057964", "0.50546455", "0.5054517", "0.50521857", "0.50515", "0.50499487", "0.5047356", "0.50410306", "0.50400734", "0.5036954", "0.5025063", "0.5020038", "0.50078344", "0.50004226", "0.50000244", "0.49986774", "0.49949434", "0.49946582", "0.4992625", "0.49793226", "0.49791995", "0.49735802", "0.49715495", "0.49653333", "0.49629328", "0.49578875", "0.49556166", "0.49548298", "0.49530068", "0.49529067", "0.49479854", "0.494781", "0.49446356", "0.49381", "0.49307007", "0.4917363", "0.4908492", "0.4903603", "0.49010718", "0.4898831", "0.48946726", "0.4893503", "0.4884675", "0.48838723", "0.48827115", "0.48801643", "0.48798925", "0.4879178", "0.48768997", "0.48719257", "0.487187", "0.4871063", "0.4870471", "0.4860169", "0.4856461" ]
0.5136489
33
to find the index of free cab which is shortest to the request position
int freecabInd(int dest) { int index = 0; int min = 0; int minIndex = 0; for(int i=0;i<freeCab.length;i++){ int matLandmark = matchingLandmark(freeCab[index][0], freeCab[index][1]); int dis = distance.dijkstra(adjancy, matLandmark, dest); if (dis < min) { min = dis; minIndex = index; } index++; } return minIndex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getMinIndex(List<Integer> cost) {\n int min = cost.get(0);\n int index = 0;\n for (int i = 1; i < cost.size(); i++) {\n if (cost.get(i) < 0) {\n continue;\n }\n if (cost.get(i) < min) {\n min = cost.get(i);\n index = i;\n }\n }\n return index;\n }", "public int getALocationToPlaceBlock(){\n int lruIndex=-1,lruVal=-1;\n for(int i=0;i<this.localCache.length;i++){\n if(!this.localCache[i].isOccupied)// checks if the block is occupied\n return i;\n \n if(lruVal<this.localCache[i].lastUsed){// checks the last used of each block\n lruIndex=i;\n lruVal=this.localCache[i].lastUsed;\n }\n }\n \n return lruIndex;\n }", "private int goalEntry0ind(int r, int c) {\n if (r == N - 1 && c == N - 1) return 0;\n else return N * r + c + 1;\n }", "private int indexOfRequestToServe() {\n // if there is no barrier currently active, avoid the iteration\n if (this.spmdManager.isCurrentBarriersEmpty()) {\n return 0;\n } else { // there is at least one active barrier\n int index = -1;\n boolean isServable = false;\n Iterator it = this.requestQueue.iterator();\n \n // look for the first request in the queue we can serve\n while (!isServable && it.hasNext()) {\n index++;\n MethodCall mc = ((Request) it.next()).getMethodCall();\n \n // FT : mc could be an awaited request\n if (mc == null) {\n return -1;\n }\n isServable = this.spmdManager.checkExecution(mc.getBarrierTags());\n }\n return isServable ? index : (-1);\n }\n }", "private int smallestF(){\r\n int smallest = 100000;\r\n int smallestIndex = 0;\r\n int size = _openSet.size();\r\n for(int i=0;i<size;i++){\r\n int thisF = _map.get_grid(_openSet.get(i)).get_Fnum();\r\n if(thisF < smallest){\r\n smallest = thisF;\r\n smallestIndex = i;\r\n }\r\n }\r\n return smallestIndex;\r\n }", "protected abstract int getBucketIndex(int freeSpace);", "@Override\n public int lowestRequest() {\n int c = Long.numberOfTrailingZeros( get() );\n if ( c == 64 ) {\n c = -1;\n }\n return c;\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 }", "private int getNearestNode(LatLng vic) {\n\t\tint node = 0;\n\t\tfor(int j=0; j<nodeList.size()-1; j++){\n\t\t\tdouble dist1 = getWeight(vic, nodeList.get(node));\n\t\t\tdouble dist2 = getWeight(vic, nodeList.get(j));\n\t\t\tif(dist1 > dist2){\n\t\t\t\tnode = j;\n\t\t\t}\n\t\t}\n\t\treturn node;\n\t}", "private static int indexOfSmallest(int[] a, int start) {\n int minNum = a[start];\n int minIndex = start;\n for(int i=start; i<a.length; i++){\n if(a[i]<minNum){\n minNum = a[i];\n minIndex = i;\n }\n\n }\n return minIndex;\n }", "private int selectSolr()\n {\n //Select the endpoint with the least amount of load\n //The start index is randomized to reduce bias to nodes earlier\n //in the list.\n int minIndex = -1;\n int minOutstanding = Integer.MAX_VALUE;\n int startIndex = ThreadLocalRandom.current().nextInt(outstandingRequests.length());\n int loopEnd = outstandingRequests.length() + startIndex;\n for (int ii = startIndex; ii < loopEnd; ii++)\n {\n int index = ii % outstandingRequests.length();\n int outstanding = outstandingRequests.get(index);\n if (outstanding < minOutstanding)\n {\n minIndex = index;\n minOutstanding = outstanding;\n }\n }\n\n return minIndex;\n }", "public int get() {\n if(smallestFreeIndex == max) {\n return -1;\n }\n int num = smallestFreeIndex;\n bitset.set(smallestFreeIndex);\n //Only scan for the next free bit, from the previously known smallest free index\n smallestFreeIndex = bitset.nextClearBit(smallestFreeIndex);\n return num;\n }", "private int calcIndex(K key) {\n\t\treturn Math.abs(key.hashCode() % capacity);\n\t}", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "int getIndex();", "private int getPos(int key, int index) {\n\t\t// Each bucket contains a list.\n\t\tList<Integer> temp = set[index];\n\t\tif (temp == null) {\n\t\t\treturn -1;\n\t\t}\n\t\t// Iterate all the elements in the bucket to find the target key.\n\t\tfor (int i = 0; i < temp.size(); i++) {\n\t\t\tif (temp.get(i) == key) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "private int procurarIndice(String cpf){\n\t\t\n\t\t//posição = -1 é uma situação impossivel para esse caso, \n\t\t//serve para caso não se encontre um cliente no array.\n\t\tint posicao = -1;\n\t\t\n\t\t//percorrendo o array ate o indice que é o ultimo cliente added\n\t\tfor(int i = 0; i < indice; i++){\n\t\t\t\n\t\t\tif(clientes[i].getCpf().equals(cpf)){\n\t\t\t\tposicao = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn posicao;\n\t}", "protected int findFromIndex(char c) {\r\n int len = fromChars.length;\r\n for(int i = 0; i < len; i++) {\r\n if(fromChars[i] == c) return i;\r\n }\r\n return -1;\r\n }", "public int pickIndex() {\n int len = weightPrefixSum.length;\n\n int idx = random.nextInt(weightPrefixSum[len - 1]) + 1;\n\n int start = 0;\n int end = len - 1;\n while(start <= end){\n int mid = start + (end - start) / 2;\n\n if(weightPrefixSum[mid] == idx){\n return mid;\n }else if(weightPrefixSum[mid] < idx){\n start = mid + 1;\n }else{\n end = mid - 1;\n }\n }\n\n return start;\n\n }", "private int findIndexOfMax(){\n\t\tint value=0;\n\t\tint indexlocation=0;\n\t\tfor(int i=0; i<myFreqs.size();i++){\n\t\t\tif(myFreqs.get(i)>value){\n\t\t\t\tvalue = myFreqs.get(i);\n\t\t\t\tindexlocation =i;\n\t\t\t}\n\t\t}\n\t\treturn indexlocation;\n\t}", "public int\ngetNodeIndexMin();", "public int getBlockIndex(int block){\n for(int i=0;i<localCache.length;i++){\n if(localCache[i].isOccupied && localCache[i].blockID==block)\n return i;\n }\n return -1;\n }", "private static int findIndexOfSmallest(float[] vector) {\n\t\tint index = -1;\n\t\tfloat value = Float.MAX_VALUE;\n\t\tfloat temp;\n\t\tfor (int d=0; d<Constants.ACCEL_DIM; ++d) {\n\t\t\ttemp = vector[d];\n\t\t\tif (temp<0.0f)\n\t\t\t\ttemp = -temp;\n\t\t\t\n\t\t\tif (temp<value) {\n\t\t\t\tvalue = temp;\n\t\t\t\tindex = d;\n\t\t\t}\n\t\t}\n\t\treturn index;\n\t}", "private int minWeight(int dist[], Boolean sptSet[]){\n int min = Integer.MAX_VALUE;\r\n int minIndex = -1;\r\n\r\n for(int n = 0; n< rideCount; n++){\r\n if(!sptSet[n] && dist[n] <= min) {\r\n min = dist[n];\r\n minIndex = n;\r\n }\r\n }\r\n return minIndex;\r\n }", "static int getMinimumCost(int k, Integer[] c) {\n\tArrays.sort(c, Collections.reverseOrder());\n\tint[] num = new int[k];\n\tint total = 0;\n\tfor (int ind = 0; ind < c.length; ind++) {\n\t int v = ind % k;\n\t total += (num[v]++ + 1) * c[ind];\n\t}\n\n\treturn total;\n }", "private int calculateIndexOfClosestPoint(Position[] smoothedPath) {\n double[] distances = new double[smoothedPath.length];\n for (int i = 0/*lastClosestPointIndex*/; i < smoothedPath.length; i++) {\n distances[i] = Functions.Positions.subtract(smoothedPath[i], currentCoord).getMagnitude();\n }\n\n // calculates the index of value in the array with the smallest value and returns that index\n lastClosestPointIndex = Functions.calculateIndexOfSmallestValue(distances);\n return lastClosestPointIndex;\n }", "int gas_station() {\n int sol = 0; // numar minim de opriri\n int fuel = m; // fuel este cantitatea curenta de combustibil din rezervor (a.k.a cat a ramas)\n\n for (int i = 1; i <= n; ++i) {\n fuel -= (dist[i] - dist[i - 1]); // ma deplasez de la locatia anterioara la cea curenta\n // intotdeauna cand ajung intr-o benzinarie ma asigur am suficient\n // combustibil sa ajung la urmatoarea - initial pot sa ajung de la A la dist[1]\n\n // daca nu am ajuns in ultima benziarie\n // verifica daca trebuie sa reincarc (rezervor gol sau cantitate insuficienta pentru a ajunge la benzinaria urmatoare)\n if (i < n && (fuel == 0 || dist[i+1] - dist[i] > fuel)) {\n ++sol;\n fuel = m;\n }\n }\n\n return sol;\n }", "static int minCost(int cost[][], int destinationStation)\n {\n // dist[i] stores minimum cost to reach station i\n // from station 0.\n int minCost[] = new int[destinationStation];\n Arrays.fill(minCost, Integer.MAX_VALUE);\n minCost[0] = 0;\n \n // Go through every station and check if using it\n // as an intermediate station gives better path\n for (int i=0; i < destinationStation; i++)\n { \n \tfor (int j=i+1; j < destinationStation; j++)\n \t{ \n \t\tminCost[j] = Math.min(minCost[i] + cost[i][j], minCost[j]);\n \t}\n }\n return minCost[destinationStation-1];\n }", "public int findLeast() {\r\n\tint cor = 0;\r\n\tint x = 9;\r\n\tfor (int r = 0; r < 9; r++) {\r\n\t for (int c = 0; c < 9; c++) {\r\n\t\tif (!board[r][c].getIsDef()) {\r\n\t\t if (board[r][c].getNumPossible() == 2) {\r\n\t\t\treturn r*10 + c;\r\n\t\t }\r\n\t\t if (board[r][c].getNumPossible() < x) {\r\n\t\t\tcor = r*10 + c;\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t}\r\n\treturn cor;\r\n }", "protected ValuePosition getMinimum() {\n\t\t// Calcule la position et la durée d'exécution de la requête la plus courte dans le tableau des requêtes\n\t\tValuePosition minimum = new ValuePosition();\n\t\tminimum.position = 0;\n\t\tfor(int pos=0; pos<requests.length; pos++) {\n\t\t\tRequest request = requests[pos];\n\t\t\tif(request == null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minimum.value == null || request.getElapsedTime() < minimum.value) {\n\t\t\t\tminimum.position = pos;\n\t\t\t\tminimum.value = request.getElapsedTime();\n\t\t\t}\n\t\t}\n\t\treturn minimum;\n\t}", "private int lowestUnselected() {\n for (int i = 0; i < names.size(); i++) {\n // check to see if index is selected\n int j;\n for (j = 0; j < selections.size(); j++)\n if (selections.get(j) == i)\n break;\n // if no tabs have this index selected, return it\n if (j == selections.size())\n return i;\n }\n\n return -1;\n }", "int funkcjaRynkuGetIndex(float cena)\n\t{\n\t\tArrayList<Point> L1 =listaFunkcjiUzytecznosci.get(0);\n\n\t\tint a=0;\n\t\twhile (cena>L1.get(a).getPrice())\n\t\t{\n\t\t\ta++;\n\t\t}\n\t\t\n\t\tif(a>0)\n\t\t{\n\t\t\ta--;\n\t\t}\n\t\t\n\t\tif (a==L1.size())\n\t\t{\n\t\t\ta--;\t\n\t\t}\n\t\t\n\t\t\n\t\t//getInput(\"funkcjaRynkuGetIndex \"+a+\" cena \"+ cena);\n\t\t\t\n\t\treturn a;\n\t}", "private int findFreeSlot(){\n\t\tfor(int i = 0; i < INVENTORY_SLOTS; i++){\n\t\t\tif(inventoryItems[i] == null){\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "private int getIdx(int elem, int[][] jobs) {\n int start = 0;\n int end = jobs.length - 1;\n\n while (start <= end) {\n int mid = start + (end - start) / 2;\n int cur = jobs[mid][0];\n if (cur >= elem) {\n end = mid - 1;\n } else if (cur < elem) {\n start = mid + 1;\n }\n }\n\n return start;\n }", "private int minDistance(int dist[], boolean sptSet[]) {\n int min = Integer.MAX_VALUE, min_index = -1;\n\n for (int v = 0; v < V; v++)\n if (!sptSet[v] && dist[v] < min) {\n min = dist[v];\n min_index = v;\n }\n\n return min_index;\n }", "private byte getLRChargeIndex() {\n\t\tString lrcType = cbLRC.getText();\n\n\t\t//Check with optionA\n\t\tfor (byte i = 0; i < 3; i++) {\n\t\t\tif (optionA[i].equals(lrcType))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn 0;\n\t}", "static int findMin(double[] pq)\n\t{\n\t\tint ind = -1; \n\t\tfor (int i = 0; i < pq.length; ++i)\n\t\t\tif (pq[i] >= 0 && (ind == -1 || pq[i] < pq[ind]))\n\t\t\t\tind = i;\n\t\treturn ind;\n\t}", "int getStartSearch();", "public int getSmallestSpotNum() {\n if (getNumavailable() >= 1) {\n for (int i = 0; i < spotArr.size(); i++) {\n if (spotArr.get(i).isAvailable()) {\n return i;\n }\n }\n }\n return -1;\n }", "private int locateIndex(K key)\n { \n // // Search until you either find an entry containing key or \n // // pass the point where it should be\n // int index = 0;\n // while ((index < numberOfEntries) && (key.compareTo(dictionary[index].getKey()) > 0))\n // index++;\n // // end while \n // return index;\n \n return binarySearchQ7(0, numberOfEntries - 1, key);\n }", "public int rechercheCercleProche(ArrayList<Cercle> cercles, PVector positionPointRay) {\n float distance = Main.processing.width;\n int index = -1;\n for (int iteratorCercle = 0 ; iteratorCercle < cercles.size() ; ++iteratorCercle) {\n Cercle c = cercles.get(iteratorCercle);\n float distanceMinimum = PVector.dist(positionPointRay, c.getPositionCentre());\n\n if (distance >= distanceMinimum) {\n //System.out.println(\"distance : \" + distance + \" | Distance Minimum : \" + distanceMinimum);\n distance = distanceMinimum;\n index = iteratorCercle;\n }\n }\n return index;\n }", "int getMinAvailable(ClusterSpec clusterSpec);", "public int findExitIndex() {\n for (int i = 0; i < cells.size() ; i++) {\n if (cells.get(i) == CellState.Exit) { // Entrance -> indexEntrance\n return i;\n }\n }\n return -1;\n }", "private static int getMinDistIndex(ArrayList<Double> list, int indexNotInterested) {\n \tdouble newDistMin = Double.MAX_VALUE;\n\t\tint newMinDistIndex = -1;\n\t\t\n\t\tfor(int i = 0; i < list.size(); i++) {\n\t\t\tif(i != indexNotInterested && newDistMin > list.get(i)) {\n\t\t\t\tnewDistMin = list.get(i);\n\t\t\t\tnewMinDistIndex = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn newMinDistIndex;\n }", "public int indexOfBestDecade() {\n\t\tint min = rank.get(0);\n\t\tfor(int index = 1; index < NUM_DECADES; index++) {\n\t\t\tmin = Math.min(min, rank.get(index));\n\t\t}\n\t\treturn min;\n\t}", "public int allocate() {\n int setIndex = this.freeSet.nextSetBit(this.lastIndex);\n if (setIndex<0) { // means none found in trailing part\n setIndex = this.freeSet.nextSetBit(0);\n }\n if (setIndex<0) return -1;\n this.lastIndex = setIndex;\n this.freeSet.clear(setIndex);\n return setIndex + this.loRange;\n }", "private int findBeginIndex(){\n\t\tint begin=Integer.MAX_VALUE;\n\t\tfor(int i=0;i<modelNames.size();i++){\n\t\t\tif(Integer.parseInt(modelNames.get(i).substring(0,8))>=this.date_begin)\n\t\t\t{begin=i;break;}\n\t\t}\n\t\treturn begin;\n\t}", "public int getIndex();", "public int getIndex();", "public int getIndex();", "public abstract long getIndex();", "private int getDistanceIndex(int point) {\n switch (point) {\n case 0:\n return -1; /* no start for point 0 */\n case 1:\n return 0;\n default:\n int n = point - 1;\n return ((n * n) + n) / 2;\n }\n }", "int minDistance(int dist[], Boolean sptSet[]) {\n // Initialize min value\n int min = Integer.MAX_VALUE, min_index=-1;\n\n for (int v = 0; v < V; v++)\n if (sptSet[v] == false && dist[v] <= min) {\n min = dist[v];\n min_index = v;\n }\n\n return min_index;\n }", "static int minJumps(int[] arr){\n int n = arr.length;\n int[] dp = new int[n];\n for(int i = 0; i < n; i++) dp[i] = Integer.MAX_VALUE;\n dp[0] = 0;\n for(int i = 1; i < n; i++){\n //checking from 0 to index i that if there is a shorter path for \n //current position to reach from any of the previous indexes\n //also previous index should not be MAX_VALUE as this will show that\n //we were not able to reach this particular index\n for(int j = 0; j < i; j++){\n if(dp[j] != Integer.MAX_VALUE && arr[j] + j >= i){\n if(dp[j] + 1 < dp[i]){\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n \n if(dp[n - 1] != Integer.MAX_VALUE){\n return dp[n - 1];\n }\n \n return -1;\n }", "public int nextAvailableCluster()\r\n\t{\r\n\t\tfor (int i = 0; i < MAX_CLUSTERS; i++)\r\n\t\t\tif (cluster[i] == false)\r\n\t\t\t\treturn i;\r\n\t\treturn -1;\r\n\t}", "public int findEntranceIndex() {\n for (int i = 0; i < cells.size() ; i++) {\n if (cells.get(i) == CellState.Entrance) { // Entrance -> indexEntrance\n return i;\n }\n }\n return -1;\n }", "public int currentFirstIndexSetRelativeToZero() {\n return calculateIndexRelativeToZero(currentFirstIndexSet());\n }", "public int findBinIndex(Double precursor, Double binSize, Double minMass)\n\t{\n\t\treturn (int)((precursor-minMass)/binSize);\n\t}", "public int findMemory( int size )\n {\n // represents the smallest available freeBlock within out freeBlock list\n // that will accommodate the size of the entry.\n int smallestFreeBlock = poolSize + 1;\n int position = -1;\n freeBlockList.moveToStart();\n freeBlockList.next();\n while ( !freeBlockList.isAtEnd() )\n {\n Object[] keyArray =\n freeBlockList.getCurrentElement().keySet().toArray();\n Integer key = (Integer)keyArray[0];\n\n if ( ( freeBlockList.getCurrentElement().get( key ) < smallestFreeBlock )\n && ( freeBlockList.getCurrentElement().get( key ) >= size ) )\n {\n position = key;\n smallestFreeBlock = freeBlockList.getCurrentElement().get( key );\n }\n freeBlockList.next();\n }\n\n return position;\n\n }", "private static int minimumPosition(int[] a, int from)\n {\n int minPos = from;\n for (int i = from + 1; i < a.length; i++) \n {\n if (a[i] < a[minPos]) { minPos = i; }\n }\n return minPos;\n }", "public double getAbsPosition() {\n double distCM = ToFSerial.get() - startDist;\n //System.out.println(\"Dist in CM \" + distCM);\n\n double distIn = distCM * Constants.k_CMtoIn;\n //System.out.println(\"Dist in In \" + distIn);\n\n return (int) (1000 * distIn); \n\n }", "protected int findNonEmptyPosition() {\n\t\t\twhile (!set.bv[++indice]) {\n\t\t\t}\n\t\t\treturn indice;\n\t\t}", "public int[] findFreePosition(boolean[][] b,Ship ship) {\r\n\t\tint startX = ship.getStartLocation()[0];\r\n\t\tint startY = ship.getStartLocation()[1];\r\n\t\tboolean found = isSpaceAvailable(b, ship);\r\n\t\tif(found) {\r\n\t\t\treturn new int[]{startX,startY};\r\n\t\t}\r\n\r\n\t\t/* Iterate over rows and columns */\r\n\t\tfor(int row = 0; row < b.length;row ++) {\r\n\t\t\tstartY = (startY + 1)%b.length;\r\n\t\t\tship.setStartY(startY);\r\n\t\t\tfor(int col = 0;col < b[row].length;col ++ ) {\r\n\t\t\t\tstartX = (startX + 1)%b[row].length;\r\n\t\t\t\tship.setStartX(startX);\r\n\t\t\t\tfound = isSpaceAvailable(b, ship);\r\n\t\t\t\tif(found) {\r\n\t\t\t\t\treturn new int[]{startX,startY};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t/* Return negatives if available space not found */\r\n\t\treturn new int[]{-1,-1};\t\t\t\r\n\t}", "public int extractMinDistance(int queue[], boolean set[]){\r\n\t\tint min=Integer.MAX_VALUE;\t\r\n\t\tint minIndex=0;\r\n\t\t\r\n\t\tfor(int v=0;v<vertices; v++){\r\n\t\t\tif(set[v] == false && queue[v] <= min){\r\n\t\t\t\tmin=queue[v]; \r\n\t\t\t\tminIndex=v;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn minIndex;\r\n\t}", "public static int getLowestAvailableSpace(ParkingLot parkingLot, List<Ticket> ticketList) {\n List<Integer> occupiedSpaces = new ArrayList<Integer>();\n for (Ticket ticket : ticketList) {\n if (\n ticket.getParkingLotName().equals(parkingLot.getParkingLotName()) &&\n !\"\".equals(ticket.getGateExit())\n ) {\n occupiedSpaces.add(ticket.getParkingSpace());\n }\n }\n\n Collections.sort(occupiedSpaces);\n\n for (int i = 0; i < parkingLot.getCapacity(); i++) {\n int index = occupiedSpaces.indexOf(i);\n if (index != -1) {\n return i;\n }\n }\n\n return -1;\n }", "protected final int findInsertionPoint(final long k) {\n\t\tfinal long key[] = this.key;\n\t\tfinal byte state[] = this.state;\n\t\tfinal int n = key.length;\n\t\t// First of all, we make the key into a positive integer.\n\t\tfinal int k2i = longHash2IntHash(k) & 0x7FFFFFFF;\n\t\t// The primary hash, a.k.a. starting point.\n\t\tint h1 = k2i % n;\n\t\tif (state[h1] == OCCUPIED && !((k) == (key[h1]))) {\n\t\t\t// The secondary hash.\n\t\t\tfinal int h2 = (k2i % (n - 2)) + 1;\n\t\t\tdo\n\t\t\t\th1 = (h1 + h2) % n;\n\t\t\twhile (state[h1] == OCCUPIED && !((k) == (key[h1]))); // There's always a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// FREE entry.\n\t\t}\n\t\tif (state[h1] == FREE)\n\t\t\treturn h1;\n\t\tif (state[h1] == OCCUPIED)\n\t\t\treturn -h1 - 1; // Necessarily, KEY_EQUALS_HASH( k, h, key[ h1 ] ).\n\t\t/* Tables without deletions will never use code beyond this point. */\n\t\tfinal int i = h1; // Remember first available bucket for later.\n\t\t/** See the comments in the documentation of the interface Hash. */\n\t\tif (ASSERTS)\n\t\t\tassert state[h1] == REMOVED;\n\t\tif (!((k) == (key[h1]))) {\n\t\t\t// The secondary hash.\n\t\t\tfinal int h2 = (k2i % (n - 2)) + 1;\n\t\t\tdo\n\t\t\t\th1 = (h1 + h2) % n;\n\t\t\twhile (state[h1] != FREE && !((k) == (key[h1])));\n\t\t}\n\t\treturn state[h1] == OCCUPIED ? -h1 - 1 : i; // In the first case,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// necessarily, KEY_EQUALS_HASH(\n\t\t\t\t\t\t\t\t\t\t\t\t\t// k, h, key[ h1 ] ).\n\t}", "private int getAnchorPosition(Anchor anchor, ArrayList<Tile> word){\n for (int c = 0 ; c < word.size() ; c++){\n if (word.get(c).letter == anchor.anchorTile.letter){\n return c;\n }\n }\n return -1000; //return something ridiculous if not there\n }", "String getFirstIndex();", "private void FindMinZ()\r\n\t{\r\n\t\tminimum_Z=Integer.MAX_VALUE;\r\n\t\tfor(Entry<Integer,Node> entry : FutureUpdateList.entrySet())\r\n\t\t{\r\n\t\t\tNode temp=entry.getValue();\r\n\t\t\tif(temp.z<minimum_Z)\r\n\t\t\t{\r\n\t\t\t\tminimum_Z=temp.z;\r\n\t\t\t\tminimum_X=temp.x;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int getIndex(int start) {\n int left = 0;\r\n int right = bookings.size()-1;\r\n while (left <= right) {\r\n int mid = left + (right-left)/2;\r\n if (bookings.get(mid).start == start) {\r\n return mid;\r\n }\r\n else if (bookings.get(mid).start < start) {\r\n left = mid+1;\r\n }\r\n else {\r\n right = mid-1;\r\n }\r\n }\r\n return right;\r\n }", "private static int getFirst( final Comparable[] c ) {\n\t\tfor ( int i = c.length - 2; i >= 0; --i )\n\t\t\tif ( c[ i ].compareTo( c[ i + 1 ] ) < 0 )\n\t\t\t\treturn i;\n\t\treturn -1;\n\t}", "public int getRequestableBank() \n {\n return -1; \n }", "public int getFree() {\n\t\t\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif(!this.get(i).clientAlive) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t\t\n\t}", "public synchronized int indexOfFriendRequest(FriendRequest req) {\n \t\t// We assume that only the user that can respond to the request has it saved \n \t\tif(!req.getFriendUsername().equals(this.getUsername())) return -1;\n \t\t// Find the given request among ours\n \t\tfor (int i = 0; i < this.getNumberOfFriendRequests(); i++) {\n \t\t\tif(req.getFromUser().equals(this.getFriendRequest(i).getFromUser())) {\n \t\t\t\treturn i;\n \t\t\t}\n \t\t}\n \t\treturn -1;\n \t}", "public int findMin(int[] degree, List<Integer> done) {\n\t\tfor (int i = 0; i < degree.length; i++) {\n\t\t\tif (!done.contains(degree[i]))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn degree.length - 1;\n\n\t}", "public int extractMinimum() {\n \n //O(log_2(w))\n int min = minimum();\n\n if (min == -1) {\n assert(xft.size() == 0);\n return -1;\n }\n \n remove(min);\n \n return min;\n }", "public int linSearch(Comparable c){\n\tfor (int i = 0; i < _size;i++){\n\t if (c.compareTo(_data[i]) == 0){\n\t\treturn i;\n\t }\n\t}\n\treturn -1;\n }", "public int minSeq() {\n lock.lock();\n int globalMin = dones[me];\n\n for(int i=0;i<dones.length;i++) {\n if(dones[i] < globalMin) {\n globalMin = dones[i];\n }\n }\n\n /*\n Iterator<Map.Entry<Integer,Instance<T>>> iter = (Iterator<Map.Entry<Integer,Instance<T>>>)seqMap.entrySet().iterator();\n while(iter.hasNext()) {\n int key = iter.next().getKey();\n if(key <= globalMin && seqMap.get(key).getStatus() == Status.DECIDED) iter.remove();\n }\n */\n lock.unlock();\n return globalMin+1;\n }", "private byte getGSCIndex() {\n\t\tString gscType = cbGSC.getText();\n\n\t\t//Check with optionA\n\t\tfor (byte i = 0; i < 3; i++) {\n\t\t\tif (optionA[i].equals(gscType))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn 0;\n\t}", "int findPath(int from, int f[][]) {\n\t\tfor( int i = 0; i < N; i++ )\n\t\t\tif( f[from][i] > 0 ) return i;\n\t\treturn NONE; \n\t}", "private T getMinUnvisited(){\n if (unvisited.isEmpty()) return null;\n T min = unvisited.get(0);\n for (int i = 1; i < unvisited.size(); i++){\n T temp = unvisited.get(i);\n if (distances[vertexIndex(temp)] < distances[vertexIndex(min)]){\n min = temp;\n }\n }\n return min;\n }", "private int findPos( AnyType x )\n {\n int offset = 1;\n int currentPos = myhash( x );\n \n while( array[ currentPos ] != null &&\n !array[ currentPos ].key.equals( x ) )\n {\n currentPos += offset; // Linear probing.\n if( currentPos >= array.length )\n currentPos -= array.length;\n }\n \n return currentPos;\n }", "private int rightmostDip() {\n for (int i = n - 2; i >= 0; i--) {\n if (index[i] < index[i + 1]) {\n return i;\n }\n }\n return -1;\n }", "private static int findMin(int startPos,int[] x){\n\t\tint result = startPos;\n\t\tfor(int i= startPos;i<x.length;i++){\n\t\t\tif(x[i]<x[result]){\n\t\t\t\tresult = i;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private int BFS() {\n adjList.cleanNodeFields();\n\n //Queue for storing current shortest path\n Queue<Node<Integer, Integer>> q = new LinkedList<>();\n\n //Set source node value to 0\n q.add(adjList.getNode(startNode));\n q.peek().key = 0;\n q.peek().d = 0;\n q.peek().visited = true;\n\n //Helper variables\n LinkedList<Pair<Node<Integer, Integer>, Integer>> neighbors;//Array of pairs <neighborKey, edgeWeight>\n Node<Integer, Integer> neighbor, u;\n long speed = (long) (cellSideLength * 1.20);\n\n while (!isCancelled() && q.size() != 0) {\n u = q.poll();\n\n //Marks node as checked\n checkedNodesGC.fillRect((u.value >> 16) * cellSideLength + 0.5f,\n (u.value & 0x0000FFFF) * cellSideLength + 0.5f,\n (int) cellSideLength - 1, (int) cellSideLength - 1);\n\n //endNode found\n if (u.value == endNode) {\n //Draws shortest path\n Node<Integer, Integer> current = u, prev = u;\n\n while ((current = current.prev) != null) {\n shortestPathGC.strokeLine((prev.value >> 16) * cellSideLength + cellSideLength / 2,\n (prev.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2,\n (current.value >> 16) * cellSideLength + cellSideLength / 2,\n (current.value & 0x0000FFFF) * cellSideLength + cellSideLength / 2);\n prev = current;\n }\n return u.d;\n }\n\n //Wait after checking node\n try {\n Thread.sleep(speed);\n } catch (InterruptedException interrupted) {\n if (isCancelled())\n break;\n }\n\n //Checking Neighbors\n neighbors = adjList.getNeighbors(u.value);\n for (Pair<Node<Integer, Integer>, Integer> neighborKeyValuePair : neighbors) {\n neighbor = neighborKeyValuePair.getKey();\n //Relaxation step\n //Checks if neighbor hasn't been checked, if so the assign the shortest path\n if (!neighbor.visited) {\n //Adds checked neighbor to queue\n neighbor.key = u.d + 1;\n neighbor.d = u.d + 1; //Assign shorter path found to neighbor\n neighbor.prev = u;\n neighbor.visited = true;\n q.add(neighbor);\n }\n }\n }\n return Integer.MAX_VALUE;\n }", "int minKey(float key[], Boolean mstSet[]){\n float min = Float.MAX_VALUE;\n int min_index = -1;\n \n for (int v = 0; v < V; v++)\n if (mstSet[v] == false && key[v] < min) {\n min = key[v];\n min_index = v;\n }\n \n return min_index;\n }", "static int minCost(int cost[][], int srcStation, int destinationStation)\n {\n int minCost[] = new int[destinationStation];\n Arrays.fill(minCost, Integer.MAX_VALUE);\n minCost[srcStation] = 0;\n\n // Go through every station and check if using it\n // as an intermediate station gives better path\n for (int i=srcStation; i < destinationStation; i++)\n {\n for (int j=i+1; j < destinationStation; j++)\n {\n minCost[j] = Math.min(minCost[i] + cost[i][j], minCost[j]);\n }\n }\n return minCost[destinationStation-1];\n }", "protected int index(int hashvalue) {\r\n\t\tint hash=hashvalue& 0x7fffffff;\r\n\t\tint index = this.hashFunc1(hash) * FREE.length;////获取一个整型数值(正整数),用来定位一条数据存储\r\n\t\t// int stepSize = hashFunc2(hash);\r\n\t\tbyte[] cur = new byte[4];\r\n\t\tkeys.position(index);\r\n\t\tkeys.get(cur);\r\n\t\tint storehash=(cur[0] << 24)+ ((cur[1] & 0xFF) << 16)+ ((cur[2] & 0xFF) << 8)+ (cur[3] & 0xFF);\r\n\t\tif (storehash==hash) {\r\n\t\t\treturn index;\r\n\t\t}\r\n\t\tif (Arrays.equals(cur, FREE)) {\r\n\t\t\treturn -1;\r\n\t\t}\r\n\r\n\t\t// NOTE: here it has to be REMOVED or FULL (some user-given value)\r\n\t\tif (Arrays.equals(cur, REMOVED) || storehash!=hash) {\r\n\t\t\t// see Knuth, p. 529\r\n\t\t\tfinal int probe = (1 + (hash % (size - 2))) * FREE.length;\r\n\t\t\tint z = 0;\r\n\t\t\tdo {\r\n\t\t\t\tz++;\r\n\t\t\t\tindex += (probe); // add the step\r\n\t\t\t\tindex %= (size * FREE.length); // for wraparound\r\n\t\t\t\tcur = new byte[FREE.length];\r\n\t\t\t\tkeys.position(index);\r\n\t\t\t\tkeys.get(cur);\r\n\t\t\t\tif (z > size) {\r\n\t\t\t\t\tSDFSLogger.getLog().info(\r\n\t\t\t\t\t\t\t\"entries exhaused size=\" + this.size + \" entries=\"\r\n\t\t\t\t\t\t\t\t\t+ this.entries);\r\n\t\t\t\t\treturn -1;\r\n\t\t\t\t}\r\n\t\t\t} while (!Arrays.equals(cur, FREE)\r\n\t\t\t\t\t&& (Arrays.equals(cur, REMOVED) || storehash!=hash));\r\n\t\t}\r\n\r\n\t\treturn storehash!=hash ? -1 : index;\r\n\t}", "protected final int internalFind(int paramInt)\n/* */ {\n/* 200 */ int i = computeSlot(paramInt);\n/* 201 */ while (this.m_flagTable[i] != false) {\n/* 202 */ if (paramInt == this.m_keyTable[i]) {\n/* 203 */ return i;\n/* */ }\n/* 205 */ i = stepSlot(i);\n/* */ }\n/* 207 */ return -i - 1;\n/* */ }" ]
[ "0.66738516", "0.65594906", "0.6389559", "0.6373197", "0.6095473", "0.59477204", "0.58931834", "0.58853525", "0.5884598", "0.5841047", "0.5824418", "0.58193964", "0.58115804", "0.58087665", "0.58087665", "0.58087665", "0.58087665", "0.58087665", "0.58087665", "0.58087665", "0.58087665", "0.58087665", "0.58087665", "0.58087665", "0.58087665", "0.58087665", "0.5795853", "0.5789272", "0.57742727", "0.5732826", "0.57303303", "0.5708911", "0.56967324", "0.5653986", "0.5652939", "0.5652266", "0.5633089", "0.56304044", "0.5623115", "0.5615532", "0.561295", "0.5605448", "0.5603288", "0.5575623", "0.5573485", "0.5569311", "0.5567211", "0.55635643", "0.55608076", "0.5559592", "0.55432236", "0.5540743", "0.55396205", "0.55170774", "0.55119467", "0.550485", "0.5495489", "0.54921615", "0.549191", "0.549191", "0.549191", "0.54776037", "0.54703647", "0.5469019", "0.5464822", "0.546096", "0.5459649", "0.54592013", "0.5457366", "0.5444886", "0.5440772", "0.5428831", "0.5425008", "0.54173034", "0.5415471", "0.5397594", "0.53971785", "0.53932935", "0.53904206", "0.5384077", "0.53823626", "0.5381551", "0.53769565", "0.5373591", "0.53622305", "0.53599477", "0.535959", "0.53463805", "0.53427404", "0.53367496", "0.5328419", "0.5327344", "0.5325127", "0.531808", "0.5312817", "0.53124195", "0.5306179", "0.53059644", "0.53041226", "0.5300162" ]
0.78415287
0
Creates new bot instance.
public BotPlayer(int ID) { super.setNick("Bot#" + ID); playerID = ID; bestMove = new Field[2]; destinationFields = new ArrayList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Bot newInstance(final String className) throws ClassNotFoundException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t NoSuchMethodException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InstantiationException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalAccessException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalArgumentException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InvocationTargetException{\n\t return (Bot) Class.forName(className).getConstructor().newInstance();\n\t}", "public static void createBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {\n manager\n .channels()\n .createWithResponse(\n \"OneResourceGroupName\",\n \"samplebotname\",\n ChannelName.EMAIL_CHANNEL,\n new BotChannelInner()\n .withLocation(\"global\")\n .withProperties(\n new EmailChannel()\n .withProperties(\n new EmailChannelProperties()\n .withEmailAddress(\"[email protected]\")\n .withPassword(\"pwd\")\n .withIsEnabled(true))),\n Context.NONE);\n }", "ChildBot( String className, String creator, Session bot ) {\n m_bot = bot;\n m_creator = creator;\n m_className = className;\n }", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}", "public static void createAlexaBot(com.azure.resourcemanager.botservice.BotServiceManager manager) {\n manager\n .channels()\n .createWithResponse(\n \"OneResourceGroupName\",\n \"samplebotname\",\n ChannelName.ALEXA_CHANNEL,\n new BotChannelInner()\n .withLocation(\"global\")\n .withProperties(\n new AlexaChannel()\n .withProperties(\n new AlexaChannelProperties().withAlexaSkillId(\"XAlexaSkillIdX\").withIsEnabled(true))),\n Context.NONE);\n }", "public int createBot(Bot bot) {\n final String insertQuery = \"INSERT INTO Bots (company_id, active_time, probability, activity_status) \" +\n \"VALUES (%d, %f, %f, TRUE);\";\n final String selectQuery = \"SELECT * FROM Bots WHERE company_id = %d ORDER BY created_at DESC LIMIT 1;\";\n final String successMessage = \"New bot with id %d has been created\";\n final String errorMessage = \"Error in creating bot for %s\";\n\n // Create the new bot for the specified company\n dbConnector.insertQuery(String.format(Locale.US, insertQuery, bot.getCompany().getCompanyId(), bot.getActiveTime(),\n bot.getProbability()));\n\n // Get the latest bot created for the specified company\n ResultSet verify = dbConnector.selectQuery(String.format(Locale.US, selectQuery, bot.getCompany().getCompanyId()));\n try {\n while (verify.next()) {\n int botId = verify.getInt(\"bot_id\");\n System.out.println(String.format(Locale.US, successMessage, botId));\n return botId;\n }\n } catch (SQLException e) {\n System.out.println(String.format(Locale.US, errorMessage, bot.getCompany().getCompanyId()));\n }\n return -1;\n }", "Instance createInstance();", "void spawnBot( String className, String messager ) {\n spawnBot( className, null, null, messager);\n }", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "void spawnBot( String className, String login, String password, String messager ) {\n CoreData cdata = m_botAction.getCoreData();\n long currentTime;\n\n String rawClassName = className.toLowerCase();\n BotSettings botInfo = cdata.getBotConfig( rawClassName );\n\n if( botInfo == null ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn bot of type \" + className + \". Invalid bot type or missing CFG file.\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn bot of type \" + className + \". Invalid bot type or missing CFG file.\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"That bot type does not exist, or the CFG file for it is missing.\" );\n return;\n }\n\n Integer maxBots = botInfo.getInteger( \"Max Bots\" );\n Integer currentBotCount = m_botTypes.get( rawClassName );\n\n if( maxBots == null ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn bot of type \" + className + \". Invalid settings file. (MaxBots improperly defined)\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn bot of type \" + className + \". Invalid settings file. (MaxBots improperly defined)\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"The CFG file for that bot type is invalid. (MaxBots improperly defined)\" );\n return;\n }\n\n if( login == null && maxBots.intValue() == 0 ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn bot of type \" + className + \". Spawning for this type is disabled on this hub.\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn bot of type \" + className + \". Spawning for this type is disabled on this hub.\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"Bots of this type are currently disabled on this hub. If you are running another hub, please try from it instead.\" );\n return;\n }\n\n if( currentBotCount == null ) {\n currentBotCount = new Integer( 0 );\n m_botTypes.put( rawClassName, currentBotCount );\n }\n\n if( login == null && currentBotCount.intValue() >= maxBots.intValue() ) {\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" tried to spawn a new bot of type \" + className + \". Maximum number already reached (\" + maxBots + \")\" );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader tried to spawn a new bot of type \" + className + \". Maximum number already reached (\" + maxBots + \")\" );\n\n m_botAction.sendSmartPrivateMessage( messager, \"Maximum number of bots of this type (\" + maxBots + \") has been reached.\" );\n return;\n }\n\n String botName, botPassword;\n currentBotCount = new Integer( getFreeBotNumber( botInfo ) );\n\n if( login == null || password == null ) {\n botName = botInfo.getString( \"Name\" + currentBotCount );\n botPassword = botInfo.getString( \"Password\" + currentBotCount );\n } else {\n botName = login;\n botPassword = password;\n }\n\n Session childBot = null;\n\n try {\n // FIXME: KNOWN BUG - sometimes, even when it detects that a class is updated, the loader\n // will load the old copy/cached class. Perhaps Java itself is caching the class on occasion?\n if( m_loader.shouldReload() ) {\n System.out.println( \"Reinstantiating class loader; cached classes are not up to date.\" );\n resetRepository();\n m_loader = m_loader.reinstantiate();\n }\n\n Class<? extends SubspaceBot> roboClass = m_loader.loadClass( \"twcore.bots.\" + rawClassName + \".\" + rawClassName ).asSubclass(SubspaceBot.class);\n String altIP = botInfo.getString(\"AltIP\" + currentBotCount);\n int altPort = botInfo.getInt(\"AltPort\" + currentBotCount);\n String altSysop = botInfo.getString(\"AltSysop\" + currentBotCount);\n\n if(altIP != null && altSysop != null && altPort > 0)\n childBot = new Session( cdata, roboClass, botName, botPassword, currentBotCount.intValue(), m_group, altIP, altPort, altSysop, true);\n else\n childBot = new Session( cdata, roboClass, botName, botPassword, currentBotCount.intValue(), m_group, true);\n } catch( ClassNotFoundException cnfe ) {\n Tools.printLog( \"Class not found: \" + rawClassName + \".class. Reinstall this bot?\" );\n return;\n }\n\n currentTime = System.currentTimeMillis();\n\n if( m_lastSpawnTime + SPAWN_DELAY > currentTime ) {\n m_botAction.sendSmartPrivateMessage( messager, \"Subspace only allows a certain amount of logins in a short time frame. Please be patient while your bot waits to be spawned.\" );\n\n if( m_spawnQueue.isEmpty() == false ) {\n int size = m_spawnQueue.size();\n\n if( size > 1 ) {\n m_botAction.sendSmartPrivateMessage( messager, \"There are currently \" + m_spawnQueue.size() + \" bots in front of yours.\" );\n } else {\n m_botAction.sendSmartPrivateMessage( messager, \"There is only one bot in front of yours.\" );\n }\n } else {\n m_botAction.sendSmartPrivateMessage( messager, \"You are the only person waiting in line. Your bot will log in shortly.\" );\n }\n\n if(messager != null)\n m_botAction.sendChatMessage( 1, messager + \" in queue to spawn bot of type \" + className );\n else\n m_botAction.sendChatMessage( 1, \"AutoLoader in queue to spawn bot of type \" + className );\n }\n\n String creator;\n\n if(messager != null) creator = messager;\n else creator = \"AutoLoader\";\n\n ChildBot newChildBot = new ChildBot( rawClassName, creator, childBot );\n addToBotCount( rawClassName, 1 );\n m_botStable.put( botName, newChildBot );\n m_spawnQueue.add( newChildBot );\n }", "public GameManager(List<String> botNames){\n\t\tdeck = new Deck();\n\t\ttable = new Table();\n\t\tplayers = new ArrayList<Bot>();\n\t\t\n\t\t//create player objects via reflection\n\t\tfor (String botName : botNames){\n\t\t\ttry {\n\t\t\t\tplayers.add(newInstance(botName));\n\t\t\t} catch (ClassNotFoundException | NoSuchMethodException\t| InstantiationException | \n\t\t\t\t\tIllegalAccessException| IllegalArgumentException | InvocationTargetException e) {\n\t\t\t\t\t\tSystem.err.println(\"No such bot class found: \" + botName);\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public UcfServer(UcfBot bot) {\n\n\t\tthis.bot = bot;\n\n\t}", "public void connect() {\n BotConnector newBot = new BotConnector();\n newBot.setEmail(this.email);\n newBot.setAuthenticationKey(key);\n newBot.setBotName(name);\n newBot.setRoom(room);\n //Start Listener Thread\n this.serverListener = new Thread(newBot, \"serverListener\");\n this.serverListener.start();\n }", "public void create(){}", "public void createGame()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyState()\n clientController.startMultiPlayerGame(\"GameLobby\");\n }", "private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n aiManager.start();\n }", "@Override\n\tpublic LightTank create() {\n\t\treturn new LightTank(GameContext.getGameContext());\n\t}", "public DriverForCreateBuilder() {\r\n driverForCreate = new DriverForCreate();\r\n }", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "private static void createInstance() {\n if (mApiInterface == null) {\n synchronized(APIClient.class) {\n if (mApiInterface == null) {\n mApiInterface = buildApiClient();\n }\n }\n }\n }", "Drone createDrone();", "@Override\n public Receive createReceive() {\n return receiveBuilder()\n\n .match(WhoToGreet.class, wtg -> {\n // -> uses the internal state of wtg and modify this internal state (this.greeting)\n this.greeting = \"Who to greet? -> \" + wtg.who;\n\n }).match(Greet.class, x -> {\n // -> send a message to another actor (thread)\n printerActor.tell(new Printer.Greeting(greeting), getSelf());\n\n }).build();\n }", "public JawaBotApp_Poh() {\n JawaBotApp_Poh.instance = this; // TODO: make private, use getInstance only.\n //Thread.dumpStack(); /// Where is this constructor called?\n }", "public static Twitter crearTwitter(){\n \tConfigurationBuilder cb = new ConfigurationBuilder();\n \tcb.setDebugEnabled(true)\n \t .setOAuthConsumerKey(\"WX0FvnWENusasa09R8IVG6FFm\")\n \t .setOAuthConsumerSecret(\"Z6cXLTiqkU6NvlhqEHD7Br3S0jhmtUiLPvOPXCqLcrhQKFMYNr\")\n \t .setOAuthAccessToken(\"509341639-6R41f6i6WUAQn1xfzI8uNbPeyIhQvkMnXYaszNv6\")\n \t .setOAuthAccessTokenSecret(\"We08mCgnLMPXn6zl8UrKwGegac0Z4ksrI0LwhAbBoxp5q\");\n \tTwitterFactory tf = new TwitterFactory(cb.build());\n \treturn tf.getInstance();\n\t}", "Command createCommand();", "public void createTurn() {\n Turn turn = new Turn(this.getOnlinePlayers());\n this.setCurrentTurn(turn);\n }", "SAProcessInstanceBuilder createNewInstance(SProcessInstance processInstance);", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "public static NPC createNPC(){\n\t\treturn new NPC();\n\t}", "void create(T instance) throws IOException;", "Client createNewClient(Client client);", "void create(GameLogic gameLogic);", "public Telefone() {\n\t}", "PlayerBean create(String name);", "public static Twitter createTwitterObject() {\n\t\tOAuth2Token token = createFactory();\n\t\tConfigurationBuilder cb = new ConfigurationBuilder();\n\n\t\tcb.setApplicationOnlyAuthEnabled(true);\n\t\tcb.setOAuthConsumerKey(Secret.cKey);\n\t\tcb.setOAuthConsumerSecret(Secret.cSecret);\n\t\tcb.setOAuth2TokenType(token.getTokenType());\n\t\tcb.setOAuth2AccessToken(token.getAccessToken());\n\n\t\tTwitter twitter = new TwitterFactory(cb.build()).getInstance();\n\t\t\n\t\treturn twitter;\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 abstract DefaultWOWebSocket create(Channel channel);", "@Test\n public void botPlay() {\n Bot.randomBot(0);\n }", "Commands createCommands();", "public ChatbotAppController()\n\t{\n\t\tapplicationView = new ChatbotView(this);\n\t\tbaseFrame = new ChatbotFrame(this);\n\t\tmySillyChatbot = new Chatbot(\"Derf\");\n\t\tstartMessage = \"Welcome to the \" + mySillyChatbot.getName() + \" chatbot. What is your name?\";\n\t\tquitMessage = \"goodbye cruel user :(\";\n\t\tcontentMessages = \"That's really cool I love riding motorcycles too!\";\n\t}", "Guild createGuild(long gameId, String title, String clanPrefix);", "public Telefone() {\n\t\t\n\t}", "public static void createNewLeague()\n\t{\n\t\t//put code to get input from end-user here.\n\t\t//generateFixtures(leagueName, teamAmount, homeAndAway, winPoints, drawPoints, lossPoints, teamNames);\n\t}", "public static Bounty createEntity() {\n Bounty bounty = new Bounty()\n// .status(DEFAULT_STATUS)\n// .issueUrl(DEFAULT_URL)\n .amount(DEFAULT_AMOUNT)\n// .experience(DEFAULT_EXPERIENCE)\n// .commitment(DEFAULT_COMMITMENT)\n// .type(DEFAULT_TYPE)\n// .category(DEFAULT_CATEGORY)\n// .keywords(DEFAULT_KEYWORDS)\n .permission(DEFAULT_PERMISSION)\n .expiryDate(DEFAULT_EXPIRES);\n return bounty;\n }", "public Builder() {}", "public Builder() {}", "public Builder() {}", "public CMObject newInstance();", "BOp createBOp();", "Motivo create(Motivo motivo);", "BotQueue( ThreadGroup group, BotAction botAction ) {\n super( group, \"BotQueue\" );\n repository = new Vector<File>();\n m_group = group;\n m_lastSpawnTime = 0;\n m_botAction = botAction;\n directory = new File( m_botAction.getCoreData().getGeneralSettings().getString( \"Core Location\" ));\n\n int delay = m_botAction.getGeneralSettings().getInt( \"SpawnDelay\" );\n\n if( delay == 0 )\n SPAWN_DELAY = 20000;\n else\n SPAWN_DELAY = delay;\n\n if ( m_botAction.getGeneralSettings().getString( \"Server\" ).equals(\"localhost\") ||\n m_botAction.getGeneralSettings().getString( \"Server\" ).equals(\"127.0.0.1\"))\n SPAWN_DELAY = 100;\n\n resetRepository();\n\n m_botTypes = Collections.synchronizedMap( new HashMap<String, Integer>() );\n m_botStable = Collections.synchronizedMap( new HashMap<String, ChildBot>() );\n m_spawnQueue = Collections.synchronizedList( new LinkedList<ChildBot>() );\n\n m_botTypes.put( \"hubbot\", new Integer( 1 ));\n\n if( repository.size() == 0 ) {\n Tools.printLog( \"There are no bots to load. Did you set the Core Location parameter in setup.cfg improperly?\" );\n } else {\n System.out.println( \"Looking through \" + directory.getAbsolutePath()\n + \" for bots. \" + (repository.size() - 1) + \" child directories.\" );\n System.out.println();\n System.out.println(\"=== Loading bots ... ===\");\n }\n\n m_loader = new AdaptiveClassLoader( repository, getClass().getClassLoader() );\n }", "private void crearObjetos() {\n // crea los botones\n this.btnOK = new CCButton(this.OK);\n this.btnOK.setActionCommand(\"ok\");\n this.btnOK.setToolTipText(\"Confirmar la Operación\");\n \n this.btnCancel = new CCButton(this.CANCEL);\n this.btnCancel.setActionCommand(\"cancel\");\n this.btnCancel.setToolTipText(\"Cancelar la Operación\");\n \n // Agregar los eventos a los botones\n this.btnOK.addActionListener(this);\n this.btnCancel.addActionListener(this);\n }", "public void createAuctionTest(){\n\t\tAuction auc = new Auction(new User(),\"Test Auction Description\",1000l);\n\n\t}", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "private void createNewChat() {\n if (advertisement.getUniqueOwnerID().equals(dataModel.getUserID())) {\n view.showCanNotSendMessageToYourselfToast();\n return;\n }\n\n dataModel.createNewChat(advertisement.getUniqueOwnerID(), advertisement.getOwner(), advertisement.getUniqueID(),\n advertisement.getImageUrl(), chatID -> view.openChat(chatID));\n }", "private MatterAgentClient() {}", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "public CreateRemoteClassic<Msg, Ref> create();", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "public T newInstance();", "public CreateUserCommand() {\n userReceiver = new UserReceiver();\n roleReceiver = new RoleReceiver();\n next = new GetRolesCommand();\n result = new CommandResult();\n }", "private void createNewDriverInstance() {\n String browser = props.getProperty(\"browser\");\n if (browser.equals(\"firefox\")) {\n FirefoxProfile profile = new FirefoxProfile();\n profile.setPreference(\"intl.accept_languages\", language);\n driver = new FirefoxDriver();\n } else if (browser.equals(\"chrome\")) {\n ChromeOptions options = new ChromeOptions();\n options.setBinary(new File(chromeBinary));\n options.addArguments(\"--lang=\" + language);\n driver = new ChromeDriver(options);\n } else {\n System.out.println(\"can't read browser type\");\n }\n }", "public static createNewUser newInstance() {\n createNewUser fragment = new createNewUser();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "private void handleCreateCommand() throws IOException,\r\n ClassNotFoundException,\r\n InstantiationException,\r\n IllegalAccessException {\r\n final String className = (String) m_in.readObject();\r\n Class klass = Class.forName(className, false, m_loader);\r\n final Object instance = klass.newInstance();\r\n final String handle = RemoteProxy.wrapInstance(instance);\r\n m_out.writeObject(handle);\r\n m_out.flush();\r\n }", "public void create() {\n\t\t\n\t}", "public ChatClient() {\n\n }", "public void createNewPlayer()\n\t{\n\t\t// Set up all badges.\n\t\tm_badges = new byte[42];\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tm_badges[i] = 0;\n\t\tm_isMuted = false;\n\t}", "Actor createActor();", "public void newClientBot(ClientBot.TraderUpdateCallback listener){\n clientsPool.execute(new ClientBot(listener));\n }", "public void onCreate() {\n Log.i(TAG, \"MinaClient create\");\r\n\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n\r\n CommandHandle.getInstance().setContext(getApplicationContext());\r\n }", "public static void main(String[] args) {\n try {\n Bot bot = new Bot(TOKEN, PREFIX);\n } catch (LoginException exception) {\n exception.printStackTrace();\n }\n }", "private void createConnection() {\n this.callbacks = getCallbacks();\n\n Properties props = new Properties();\n props.putAll(getTestProps());\n props.putAll(getProps());\n this.connection = Connections.create((ConnectionCallbacks) callbacks, props);\n configureConnection(connection);\n }", "public Chatbot(int seed)\r\n\t{\r\n\t\t// La mercancia es independiente de la personalidad del chatbot.\r\n\t\tmerchandise = \" Escudo Rubi: 1500 flurios \\n Espadon Escarlata: 1750 flurios \\n Tomo de Combustion Espontanea: 1000 flurios \\n Piedra Draconica Celeste: 2500 flurios \\n Pocion de recuperacion: 250 flurios.\\n Si quieres saber algo acerca de algun articulo solo tienes que preguntarlo.\\n\";\r\n\r\n\t\t// Lezalith - Personalidad: Servicial y carismatica.\r\n\t\tif ((seed % 2) == 0)\r\n\t\t{\r\n\t\t\tname = \"Lezalith\";\r\n\r\n\t\t\tgenericGreeting = \"Hola aventurero, en que puedo ayudarte?\";\r\n\t\t\tmorningGreeting = \"El sol despunta y tu preparandote para la batalla. Compra algo para que no tengas problemas a lo largo del dia!\";\r\n\t\t\tafternoonGreeting = \"Buenas tardes aventurero, necesitas equipamiento?\";\r\n\t\t\teveningGreeting = \"Buenas noches aventurero; ya estamos por cerrar, pero siempre puedo atender a una persona mas. Que necesitas?\";\r\n\r\n\t\t\tbuyingResponses = new String[2];\r\n\t\t\tbuyingResponses[0] = \"Conque quieres comprar algo huh? Te mostrare lo que tenemos a disponible:\";\r\n\t\t\tbuyingResponses[1] = \"Excelente, mira estos articulos por favor.\";\r\n\t\r\n\t\t\t\t\r\n\t\t\tarticlesInfo = new String[5];\r\n\r\n\t\t\tarticlesInfo[0] = \"El Escudo Rubi es un escudo emblematico de nuestro pais. Su leyenda se remonta a los origenes de la ciudad de Flur. No entrare en detalles, pero la leyenda cuenta que un viajero repelio una horda completa de esqueletos y que su escudo permanecio inmaculado tras semejante derroche de valentia.\\nEl escudo rubi no esta creado a partir de rubi, contrario a lo que se piensa popularmente, sino de piedra draconica rojiza que se asemeja a los rubies.\\nEsta cualidad le permite repeler incluso las llamaradas de algunas criaturas sin que el portador sufra herida alguna.\";\r\n\t\t\tarticlesInfo[1] = \"El Espadon Escarlata que vendemos aqui es una replica muy precisa del espadon descrito en la leyenda de Ruhium, el Sanguinario. Se cuenta que este hombre, de origenes inciertos, llego un dia a Flur con la intencion de arrasarla tal cual un vil bandido.\\n Pero basto con ver los hermosos prados que rodean la ciudad, y oir el melodico fluir de los riachuelos cercanos para que se esfumara cualquier pensamiento que no fuese vivir y proteger estos lares.\\n Su espadon, una hoja descomunal, que habia adquirido un color escarlata en su hoja por tanta sangre que un dia derramo; se convirtio en un simbolo de quietud y paz mental para nosotros.\";\r\n\t\t\tarticlesInfo[2] = \"El Tomo de Combustion Espontanea es uno de los hechizos basicos que aprenden los estudiantes de la escuela magica de la piromancia. A pesar de ser un hechizo de primerizos, es una herramienta muy util para todo el mundo. Requiere poco poder magico y solo se compone de tres versos, pero su efectividad es aterradora. Consiste en un hechizo capaz de prender en llamas a cualquier objetivo que este en tu campo de vision y en un radio de 15 metros. El objetivo continuara ardiendo hasta que su cuerpo de reduzca a cenizas, pero el fuego se disipara si pierdes al objetivo de vista o si las condiciones ambientales no permitan la combustion.\";\r\n\t\t\tarticlesInfo[3] = \"Los dragones poseen ciertas cualidades especiales que el resto de las especies no. Estas cualidades dependen del dragon, y usualmente puede distinguirseles por el color de las escamas. A medida que los dragones crecen, sus cuerpos producen una cristalizacion de la energia vital que irradia de su cuerpo. Cada cierto tiempo, los dragones expulsan de su cuerpo esta cristalizacion a modo de desecho y es lo que nosotros conocemos por piedra draconica. El color de la piedra coincide con el de las escamas del dragon que sintetizo esa piedra, y la piedra posee las mismas cualidades extraordinarias que este ultimo. En particular, la piedra de dragon celeste es una gema que expulsa un torrente de rayos a voluntad; pero requiere que su portador la cargue con energia magica para desatar su terrible poder.\";\r\n\t\t\tarticlesInfo[4] = \"La vieja y confiable pocion de recuperacion ha sacado de apuros tanto a principiantes como a expertos del mundo de las armas. Esta compuesta de muchos ingredientes regenerativos que apresuran enormemente tu regeneracion natural. \";\r\n\r\n\r\n\t\t\tbuyingArticles = new String[5];\r\n\t\t\tbuyingArticles[0] = \"Compraras un Escudo Rubi? Muy bien, son 1500 flurios. Tus enemigos flaquearan en voluntad al ver que ninguno de sus ataques lograra atravesar tu defensa.\";\r\n\t\t\tbuyingArticles[1] = \"Iras por el Espadon Escarlata, huh? Buena eleccion, son 1750 flurios. Siento lastima por esas pobres bestias que se atrevan a enfrentarte.\";\r\n\t\t\tbuyingArticles[2] = \"Te convencio el Tomo Magico? El precio es de 1000 flurios. Una ganga, no crees?. Tus enemigos no sabran que los hizo arder en llamas.\";\r\n\t\t\tbuyingArticles[3] = \"Son 2500 flurios por la Piedra Draconica. Una vez que logres cargarla, desataras un cataclismo en el campo de batalla. Recuerda usarla con prudencia.\";\r\n\t\t\tbuyingArticles[4] = \"Son 250 flurios por la Pocion. Hay que ser precavidos, verdad?\";\r\n\t\t\r\n\t\t\tnotEnough = \"Al parecer no tiene suficiente dinero. Por favor, trate de comprar algo que pueda permitirse con su dinero\";\r\n\r\n\t\t\tsellingResponse = \"Lo siento, en esta tienda no compramos a nuestros clientes. La tienda vecina se arruino un dia que llego un aventurero con 6 millones de huesos de monstruos. El pobre vendedor tuvo que comprarselos todos, y todo por seguir esa ridicula politica.\";\r\n\r\n\t\t\trumours = new String[3];\r\n\t\t\trumours[0] = \"La expedicion que salio hace unas semanas en busqueda del dragon maligno no ha vuelto aun. Temo que hayan fracasado en su objetivo.\";\r\n\t\t\trumours[1] = \"La caravana que suple mis articulos lleva 4 dias de retraso. Los habran asaltado goblins o algo?.\";\r\n\t\t\trumours[2] = \"La ciudad esta muy ajetreada estos dias. Todos temen un asalto nocturno de parte de los dragones anti-pactianos.\";\r\n\r\n\t\t\tmisheard = new String[3];\r\n\t\t\tmisheard[0] = \"Lo siento, creo que no puedo comprender algunas de las palabras que usas viajero. Podrias reformularme eso que has dicho?\";\r\n\t\t\tmisheard[1] = \"Creo que no he escuchado bien, que has dicho?\";\r\n\t\t\tmisheard[2] = \"Lamento no conocer el lenguaje de un modo tan habil como vos, pero es necesario que te rebajes a mi nivel para que nos entendamos.\\nPodrias describir eso con palabras mas cercanas a mi entendimiento?\";\r\n\r\n\t\t\tfarewell = \"Buena suerte, en realidad no la necesitas porque te has equipado aqui hahaha.\";\r\n\t\t}\r\n\r\n\t\t// Roxane - Personalidad: Agresiva y perezosa.\r\n\r\n\t\telse\r\n\t\t{\r\n\r\n\t\t\tname = \"Roxane\";\r\n\r\n\t\t\tgenericGreeting = \"*suspiro* Hola aventurero, echale el ojo a las existencias y avisame cuando vayas a comprar algo, si?\";\r\n\t\t\tmorningGreeting = \"Buenos dias aventurero. No te sientes somnoliento? Deberias volver a tu cama y dejarme dormir.\";\r\n\t\t\tafternoonGreeting = \"Buenas tardes, date una vuelta por la tienda y llevate algo, quieres?\";\r\n\t\t\teveningGreeting = \"Ya esta oscureciendo. Apresurate en comprar o te dejare dentro.\";\r\n\r\n\t\t\tbuyingResponses = new String[2];\r\n\t\t\tbuyingResponses[0] = \"Esta bien. Puedes escoger cualquier objeto de entre los que aqui se encuentran: \";\r\n\t\t\tbuyingResponses[1] = \"Si quieres comprar tendras que conformarte con lo que tenemos. Hay problemas en las rutas comerciales, asi que no hay mucha variedad.\";\r\n\r\n\t\t\tarticlesInfo = new String[5];\r\n\r\n\t\t\tarticlesInfo[0] = \"El Escudo Rubi que aqui vendemos es una replica exacta del legendario escudo de la famosa epica narrada todas las noches en los bares de Flur. El escudo que portaba el defensor de Flur salvaguardo a nuestro heroe de los infinitos golpes de las furibundas hordas de monstruos que azotaban nuestra ciudad.\\nNo pienses mal de el por ser una replica. Podria ser mejor que el original, pues posee propiedades magicas que lo vuelven aun mas impenetrable para cualquier ataque que desafie la fortaleza de este escudo.\";\r\n\t\t\tarticlesInfo[1] = \"Ruhium, el Sanguinario, blandio una espada como esta hace decadas. Era un hombre temido por todo el mundo que, enamorado de la belleza de nuestra ciudad y la quietud de sus alrededores, hizo de este lugar su hogar y lo defendio de los muchos invasores que asediaron Flur en esa epoca.\\nVer el espadon de Ruhium en batalla, era como ver la hoz de la muerte sesgando las vidas de sus adversarios. Eso no ha cambiado hasta el dia de hoy, pues nuestro Espadon Escarlata no tiene motivos para palidecer ante su modelo: El espadon de Rihium.\";\r\n\t\t\tarticlesInfo[2] = \"Ese tomo es el que estudian los principiantes de la piromancia. Puedes comprarlo si te apetece, pero a tu edad tal vez debas practicarlo en privado. Los estudiantes se reiran de ti si te ven lanzando ese hechizo tan simple. \";\r\n\t\t\tarticlesInfo[3] = \"Mi hermana explica esto con mayor precision, pero en pocas palabras, esta piedra puede almacenar grandes cantidades de energia magica y liberarla en forma de rayos. Se obtiene a partir de la cristalizacion magica del dragon de escamas celestes.\";\r\n\t\t\tarticlesInfo[4] = \"No hay mucho que explicar, verdad? El nombre lo dice todo. Ultimamente hemos vendido muchas de estas a algunos jovenes. Tal vez pueden generar adiccion...\";\r\n\r\n\t\t\tbuyingArticles = new String[5];\r\n\t\t\tbuyingArticles[0] = \"Te llevas el Escudo Rubi? Son 1500 flurios a cambio de una defensa inexpugnable. Una ganga, no?\";\r\n\t\t\tbuyingArticles[1] = \"Compraras el Espadon? Bueno, desde hoy no hay enemigo que pueda resistir tu furia. Pobres bestias. Son 1750 flurios\";\r\n\t\t\tbuyingArticles[2] = \"Quieres iniciarte en el mundo de la magia? Una vez que domines los conocimientos arcanos, bastara una palabra de tus labios para que cualquier enemigo caiga a tus pies. Son 1000 flurios, por favor.\";\r\n\t\t\tbuyingArticles[3] = \"Esa piedra de costara 2500 flurios. No se para que la quieres si no pareces poder cargarla de energia magica. Pero bueno, eres libre de desperdiciar tu dinero.\";\r\n\t\t\tbuyingArticles[4] = \"Son 250 flurios por la pocion. Estoy pensando seriamente en subir el precio de estas cosas, dada la alta demanda ultimamente, asi que compra todas las que puedas ahora que estan baratas.\";\r\n\r\n\t\t\tnotEnough = \"Sin dinero, no hay objeto; asi de simple. Compra otro objeto o vete.\";\r\n\r\n\t\t\tsellingResponse = \"Quieres llevarnos a la bancarrota? No se en que mundo las tiendas podrian comprar toda la basura que traen los aventureros desde afuera de la ciudad.\";\r\n\r\n\t\t\trumours = new String[3];\r\n\t\t\trumours[0] = \"Con el pacto de proteccion mutua entre humanos y dragones roto, ya no hay nada que garantice nuestra seguridad. Es mas, los mismos dragones anti pactianos son una amenaza presente.\";\r\n\t\t\trumours[1] = \"Al parecer, los estudiantes de las escuelas magicas ya no pueden salir al bosque a buscar ingredientes para pociones. Ultimamente las bestias abundan fuera de la ciudad.\";\r\n\t\t\trumours[2] = \"El explorador en jefe del gremio ha organizado una nueva expedicion hacia el pico sagrado. Dicen que un dragon muy sabio vive alli, y podria ayudarnos a entender porque los dragones han deshecho el pacto de proteccion mutua.\";\r\n\r\n\t\t\tmisheard = new String[3];\r\n\t\t\tmisheard[0] = \"Que palabras mas raras utilizas, no te he entendido nada.\";\r\n\t\t\tmisheard[1] = \"Crees que podrias decirme eso en palabras normales?\";\r\n\t\t\tmisheard[2] = \"...\";\r\n\r\n\t\t\tfarewell = \"Adios, aventurero. Sal en silencio por favor, intentare seguir durmiendo.\";\r\n\t\t}\r\n\t}", "public static <T> Builder<T> create(Class<T> clazz, Object... objects) {\n return new Builder<>(clazz, objects);\n }", "Command createCommandWith(CommandCreator creator);", "@Override\n\tpublic IWidgetInstance createInstance(ISocketInstance socket) {\n\t\treturn this;\n\t}", "public void create() {\n if (created)\n return;\n\n PlayerConnection player = getPlayer();\n player.sendPacket(createObjectivePacket(0, objectiveName));\n player.sendPacket(setObjectiveSlot());\n int i = 0;\n while (i < lines.length)\n sendLine(i++);\n\n created = true;\n }", "@Override\n public void create() {\n setScreen(new ServerScreen(\n new RemoteGame(),\n new SocketIoGameServer(HOST, PORT)\n ));\n }", "public static Book createEntity() {\n Book book = new Book()\n .idBook(DEFAULT_ID_BOOK)\n .isbn(DEFAULT_ISBN)\n .title(DEFAULT_TITLE)\n .author(DEFAULT_AUTHOR)\n .year(DEFAULT_YEAR)\n .publisher(DEFAULT_PUBLISHER)\n .url_s(DEFAULT_URL_S)\n .url_m(DEFAULT_URL_M)\n .url_l(DEFAULT_URL_L);\n return book;\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public Client create() {\n RequestProvider provider = RequestProviders.lookup();\n return provider.newClient(this);\n }", "public Chat() {\n }", "public PostBuilder() {\n httpClient = HttpClients.createDefault();\n httpPost = new HttpPost(localTesting ? \"http://localhost:8080\" : \"https://netflixstatistixserver.herokuapp.com\");\n attributes = new ArrayList<>();\n }", "public Conversation() {}", "public Twitter() {\n \n }", "public MetodosTwit() {\r\n\r\n twitter = new TwitterFactory().getInstance();\r\n }", "public Instance() {\n }", "public static void main(String[] args) throws Exception {\n System.setProperty(\"org.eclipse.jetty.LEVEL\", \"DEBUG\");\n\n String botToken = System.getProperty(\"SLACK_BOT_TOKEN\");\n String signingSecret = System.getProperty(\"SLACK_SIGNING_SECRET\");\n String webhookUrl = System.getProperty(\"SLACK_WEBHOOK_URL\");\n\n Properties properties = new Properties();\n properties.load(EdgeBotMain.class.getResourceAsStream(\"/edgebot.properties\"));\n\n String slackBotName = properties.getProperty(\"slackbot.name\");\n String slackBotChannel = properties.getProperty(\"slackbot.channel\");\n\n if (botToken == null || signingSecret == null) {\n System.err.println(\"Missing token or secret\");\n System.exit(1);\n }\n\n Handler fh = new FileHandler(\"/tmp/edgebot.log\");\n Logger.getLogger(\"\").addHandler(fh);\n Logger.getLogger(\"com.metaui\").setLevel(Level.FINEST);\n\n AppConfig config = new AppConfig();\n config.setSingleTeamBotToken(botToken);\n config.setSigningSecret(signingSecret);\n App app = new App(config);\n\n SlackConfig slackConfig = new SlackConfig();\n slackConfig.setProxyUrl(webhookUrl);\n SlackHttpClient client = new SlackHttpClient();\n client.setConfig(slackConfig);\n Slack slack = Slack.getInstance(client);\n SlackQueryHelper queryHelper = new SlackQueryHelperImpl(slack, botToken);\n\n Conversation homeChannel = null;\n\n for (Conversation conversation : queryHelper.getChannels()) {\n if (conversation != null) {\n System.out.println(conversation.getId() + \": \" + conversation.getName());\n\n if (conversation.getName().equals(slackBotChannel)) {\n ConversationsJoinResponse response = slack.methods().conversationsJoin(\n ConversationsJoinRequest.builder().token(botToken).channel(conversation.getId()).build());\n System.out.println(response);\n\n slack.methods().chatPostMessage(ChatPostMessageRequest.builder().token(botToken).\n channel(conversation.getId()).text(\"*\" + slackBotName + \"* is starting up, the time is _\" +\n new Date() + \"_\").build());\n\n homeChannel = conversation;\n }\n }\n }\n\n final Conversation channel = homeChannel;\n final SlackBotCommand cmd = new SlackBotRootCommandImpl();\n app.command(\"/bot\", (req, ctx) -> {\n System.out.println(req);\n return ctx.ack(cmd.execute(new SlackBotContext(slackBotName, slack, queryHelper, botToken, channel),\n new BotCommandContext(req.getPayload().getUserName(),\n req.getPayload().getText().split(\" \"))));\n });\n\n SlackAppServer server = new SlackAppServer(app);\n server.start(); // http://localhost:3000/slack/events\n }", "DynamicInstance createDynamicInstance();", "private void initChatbot(){\n final AIConfiguration config = new AIConfiguration(dialogFlowKey,\n AIConfiguration.SupportedLanguages.English,AIConfiguration.RecognitionEngine.System);\n aiDataService = new AIDataService(getActivity(),config);\n customAIServiceContext = AIServiceContextBuilder.buildFromSessionId(uuid);\n aiRequest = new AIRequest();\n\n }", "public Greetings() {\n }", "public void create(Lobby lobby) {\n for (LobbyPlayer player : lobby.getPlayers()) Firebase.registerListener(\"lobbies/\" + player.getLobbyCode(), onLobbyChange);\n Firebase.setDocument(\"lobbies/\" + lobby.getGameCode(), LobbyDTO.fromModel(lobby));\n }", "public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}", "public IGenScheduleHandler create() throws CreateException, RemoteException;", "public Client() {}", "public static Retrofit create() {\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n return retrofit;\n\n }", "public static <T> Builder<T> create(Class<T> clazz) {\n return new Builder<>(clazz, (Object[]) null);\n }" ]
[ "0.63598627", "0.5949736", "0.5770842", "0.57383114", "0.57077515", "0.5700138", "0.5685626", "0.5661163", "0.56293404", "0.5551168", "0.55034727", "0.54803956", "0.54504406", "0.54355454", "0.54355454", "0.54344785", "0.5429212", "0.5379246", "0.5324176", "0.5309355", "0.5308678", "0.52902424", "0.52694863", "0.5267452", "0.5236041", "0.52350247", "0.5230017", "0.52200586", "0.51851064", "0.51808393", "0.51733446", "0.5137391", "0.51279956", "0.5113133", "0.5108819", "0.5092463", "0.50919497", "0.5070995", "0.50615686", "0.50614643", "0.5033983", "0.5026487", "0.50236607", "0.5007919", "0.5007226", "0.5003246", "0.5002268", "0.49914894", "0.49853036", "0.49853036", "0.49853036", "0.4975514", "0.4968134", "0.49502215", "0.49482727", "0.4947322", "0.4943644", "0.49430728", "0.49400836", "0.49398312", "0.493595", "0.4933839", "0.49322727", "0.4928798", "0.4926057", "0.49156815", "0.4908375", "0.4897486", "0.4896869", "0.48907298", "0.487863", "0.48696643", "0.48692325", "0.48677012", "0.48673758", "0.4858498", "0.48575023", "0.48560494", "0.48547474", "0.48498732", "0.4847539", "0.48465648", "0.48464733", "0.48430884", "0.48427612", "0.48380253", "0.4836061", "0.48106858", "0.4809263", "0.4804154", "0.47959143", "0.47953412", "0.47942287", "0.4792231", "0.47826526", "0.47717077", "0.47698006", "0.47693393", "0.47671127", "0.47643888", "0.47617373" ]
0.0
-1
Server reads message from bot
@Override public String[] read() { String [] message = new String[]{ "MOVE", Integer.toString(bestMove[0].getX()), Integer.toString(bestMove[0].getY()), Integer.toString(bestMove[1].getX()), Integer.toString(bestMove[1].getY()) }; if(!canMove()) { message[0] = "PASS"; } return message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void messageHandler(String read){\n\n try {\n buffer.append(read);\n }catch (MalformedMessageException e){\n System.out.println(\"[CLIENT] The message received is not in XML format.\");\n }\n\n while(!buffer.isEmpty()) {\n if (buffer.getPong()) pong = true;\n else if (buffer.getPing()) send(\"<pong/>\");\n else {\n try {\n clientController.onReceivedMessage(buffer.get());\n } catch (EmptyBufferException e) {\n System.out.println(\"[CLIENT] The buffer is empty!\");\n }\n }\n }\n\n }", "public String receiveMessage(){\n try{\n response = inFromServer.readLine();\n }catch(IOException e){\n System.err.println(\"Caught IOException in inFromServer.readLine(): \" + e.getMessage());\n }\n if(response.equals(\"\\\\quit\")){\n System.out.println(\"Server quit command received.\"); \n return \"SERVERQUIT\";\n }\n System.out.println(response);\n return \"SENT\";\n }", "public void run()\n {\n \n try {\n String Msg = \"\";\n ArrayList<String> tokens=new ArrayList<String>();\n while ((Msg = this.reader.readLine())!=null)\n {\n if(!tokens.isEmpty())\n {\n //not empty,clear.\n tokens.clear();\n\n }\n //check the msg\n System.out.println(\"Inside while, Received msg in client handler:\"+Msg);\n //all the meta datas are separated using :\n tokens.addAll(Constants.tokens(Msg, \":\"));\n //if it's a login request\n if(tokens.contains(Constants.LOGIN_ID))\n {\n this.userID=tokens.get(1);//the 2nd string of this format LOGIN_ID:username:password\n this.password=tokens.get(2);\n this.client_delegate.validate(this);\n }\n //if it's a log out request.\n if(tokens.contains(Constants.LOGOUT_ID))\n {\n this.client_delegate.logout(this);\n }\n //public room message\n if(tokens.contains(Constants.PUBLIC_ROOM))\n {\n \n if(tokens.get(1).contains(\"file\"))\n {\n //there is smiley,but the parts were separated due to the presence of an internal : after word 'file'\n this.client_delegate.sendMessage(tokens.get(1)+\":\"+tokens.get(2));\n }\n else\n {\n //the message is without smiley...\n this.client_delegate.sendMessage(tokens.get(1));\n }\n \n }\n //private message\n if(tokens.contains(Constants.MESSAGE_ID))\n {\n //private message\n if(tokens.get(2).contains(\"file\"))\n {\n //there is smiley,but the parts were separated due to the presence of an internal : after word 'file'\n this.client_delegate.sendMessageFromThisTo(tokens.get(1), tokens.get(2)+\":\"+tokens.get(3), tokens.get(4));\n }\n else\n {\n //the message is without smiley...\n this.client_delegate.sendMessageFromThisTo(tokens.get(1), tokens.get(2), tokens.get(3));\n }\n }\n if(tokens.contains(Constants.FILE))\n {\n this.client_delegate.sendFileTo(tokens.get(1), Integer.parseInt(tokens.get(2)), tokens.get(3));\n }\n \n \n\n }\n } catch (Exception ex) {\n System.out.printf(\"Error parsing message from client:%s.\",this.userID);\n }\n }", "public String readMessage() throws IOException {\n\t\treturn reader.readLine();\n\t}", "public void readMessages() {\n if (!this.isConnectedToClientServer){return;}\n String inputMessage = inputQueue.poll();\n if (inputMessage != null){\n try{\n ClientMessageType messageType = ClientMessageParser.parse(inputMessage);\n if (messageType == ClientMessageType.INCOMING_BALL){\n //parses the message to get a ball, which is then added to the board\n Ball ball = ClientMessageParser.parseIncomingBall(inputMessage);\n board.addBall(ball);\n }\n else if (messageType == ClientMessageType.WALL_INVISIBILITY){\n //parses the messages to find out which boundary to make invisible, and does so\n BoundarySide whichBoundary = ClientMessageParser.parseWallInvisibility(inputMessage, board.neighbors);\n board.makeInvisible(whichBoundary);\n }\n else if (messageType == ClientMessageType.WALL_VISIBILITY){\n //parses the messages to find out which boundary to make visible, and does so\n BoundarySide whichBoundary = ClientMessageParser.parseWallVisibility(inputMessage, board.neighbors);\n board.makeVisible(whichBoundary);\n }\n else if (messageType == ClientMessageType.DISCONNECT_CLIENT){\n disconnectFromClientAndServer();\n }\n } catch (IncorrectFormatException e){\n //don't do anything --> message is not parsed, but play on this board still continues\n }\n }\n }", "@Override\n\tpublic void readMessage(Message message) {\n\t\t\n\t}", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 0:\n\t\t\t\ttv_read.setText(msg.obj.toString());\n\t\t\t\tToast.makeText(N20PINPadControllerActivity.this, \"recv\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "@Override\n public void onMessageReceived(@NotNull MessageReceivedEvent event) {\n String message = event.getMessage().getContentRaw().toLowerCase();\n Commands commands = Main.getBOT().getCommands();\n\n // When message is intended for bob, check it\n if (message.startsWith(\"!bob\")) {\n commands.evaluateCommand(message.replace(\"!bob \", \"\"), event);\n } else if (message.contains(\"#blamekall\")) {\n event.getChannel().sendMessage(\"NO! BE NICE! GO TO NAUGHTY JAIL!\").queue();\n event.getChannel().sendMessage(\"https://tenor.com/view/bonk-gif-18805247\").queue();\n }\n\n }", "private void getMessage() throws Exception {\n\t\tGetTimestamp(\"Getting Message: \");\n\t\tString msg = \"\";\n\t\tString decmsg = \"\";\n\t\tbyte[] result;\n\t\ttry {\n\t\t\tmsg = br.readLine();\n\t\t\tJSONObject RESPONSE = new JSONObject();\n\t\t\tRESPONSE.put(\"payload\", msg);\n\t\t\tSystem.out.println(RESPONSE);\n\t\t\tdecmsg = decrypt(serversharedkey, msg);\n\t\t\tSystem.out.println(\"Decrypted Message from client is \" + decmsg);\n\n\t\t} catch (IOException ex) {\n\t\t\tLogger.getLogger(ServerTCP.class.getName()).log(Level.SEVERE, null, ex);\n\t\t}\n\t\tif (decmsg.equalsIgnoreCase(\"bye\")) {\n\t\t\tSystem.out.println(\"Client has signed out!\");\n\t\t\tcloseConnection();\n\n\t\t} else {\n\t\t\tsendMessage();\n\t\t}\n\n\t}", "static private void readMessage(){\r\n\t\t index = 0;\r\n\t\t code = 0;\r\n\t\t firstParam = \"\";\r\n\t\t secondParam = \"\";\r\n\t\t thirdParam = \"\";\r\n\t\t StringTokenizer st = new StringTokenizer(message, \"_\");\r\n\t\t String c = st.nextToken();\r\n\t\t index = Integer.parseInt(c);\r\n\t\t c = st.nextToken();\r\n\t\t code = Integer.parseInt(c);\r\n\t\t \t\tSystem.out.println(\"ClientMessageReader: il codice del messaggio ricevuto è \"+code);\r\n\t\t \t//\t||(code == Parameters.START_PLAYBACK) \r\n\t\t if((code == Parameters.START_OFF)|| (code == Parameters.FILES_RESPONSE))\r\n\t\t {\r\n\t\t\t firstParam = st.nextToken();\r\n\t\t }\r\n\t\t if(code == Parameters.CONFIRM_REQUEST)\r\n\t\t {\r\n\t\t\t firstParam = st.nextToken();\r\n\t\t\t \t\t\tSystem.out.println(\"CONFIRM_REQUEST firstParam: \"+firstParam);\r\n\t\t }\r\n\t }", "@Override public void handleMessage(Message msg) {\n super.handleMessage(msg);\n byte[] byteArray = (byte[]) msg.obj;\n int length = msg.arg1;\n byte[] resultArray = length == -1 ? byteArray : new byte[length];\n for (int i = 0; i < byteArray.length && i < length; ++i) {\n resultArray[i] = byteArray[i];\n }\n String text = new String(resultArray, StandardCharsets.UTF_8);\n if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_WRITE) {\n Log.i(TAG, \"we just wrote... [\" + length + \"] '\" + text + \"'\");\n// mIncomingMsgs.onNext(text);\n } else if (msg.what == BluetoothTalker.MessageConstants.MESSAGE_READ) {\n Log.i(TAG, \"we just read... [\" + length + \"] '\" + text + \"'\");\n Log.i(TAG, \" >>r \" + Arrays.toString((byte[]) msg.obj));\n mIncomingMsgs.onNext(text);\n sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// mReadTxt.setText(++ri + \"] \" + text);\n// if (mServerBound && mServerService.isConnected()) {\n// mServerService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// } else if (mClientBound && mClientService.isConnected()) {\n// mClientService.sendMsg(\"I heard you : \" + Math.random() + \"!\");\n// }\n// mBluetoothStuff.mTalker.write();\n }\n }", "public void readFromClient() {\n Thread t = new Thread(() -> {\n while (connected) {\n try {\n Message fromClient;\n synchronized (C2SMessages){\n if (C2SMessages.size() > 0){\n fromClient = (Message) C2SMessages.get(0);\n C2SMessages.remove(0);\n if( !(fromClient instanceof PingMessage) ) {\n if (myTurn) {\n answer = fromClient;\n answerReady = true;\n synchronized (lock){\n lock.notifyAll();\n }\n } else {\n send(new WrongTurnMessage());\n }\n }\n }\n if (C2SMessages.isEmpty())\n C2SMessages.wait();\n }\n } catch (NullPointerException | IllegalArgumentException | InterruptedException e) {\n System.out.println(\"[LOCAL-HANDLER] \"+userNickname+\"-local connection closed\");\n closeConnection();\n notifyDisconnection(this);\n break;\n }\n }\n });\n t.start();\n }", "public void receiveMessage() throws IOException {\n String inputLine;\n while (true) {\n inputLine = inputStream.readLine();\n if (inputLine != null && !inputLine.equals(\"\")){\n if (!inputLine.equals(\"Host: closing\")) {\n network.appendMessage(inputLine);\n } else {\n network.appendMessage(\"Server has been closed! Restart the \"\n + \"server!\");\n waitForServer();\n }\n }\n }\n }", "public void processMessage()\n {\n \tif(messageContents.getMessage().containsCommand())\n {\n \tCommand command = new Command(messageContents);\n CommandProcessor commandProcessor = new CommandProcessor(joeBot, command);\n commandProcessor.processCommand();\n }\n else\n {\n Speech speech = new Speech(messageContents);\n SpeechProcessor speechProcessor = new SpeechProcessor(joeBot, speech);\n speechProcessor.processSpeech();\n }\n }", "public synchronized void listen() {\n// synchronized (this) {\n try {\n String input;\n if ((input = in.readLine()) != null) {\n parseCommand(input);\n }\n } catch (IOException ex) {\n Logger.getLogger(ClientIO.class.getName()).log(Level.SEVERE, null, ex);\n }\n// }\n }", "@Override\n public void onMessageReceived(MessageReceivedEvent event) {\n if (event.getAuthor().isBot()) {\n return ;\n }\n\n Parser.parse(event.getMessage().getContentRaw(), event);\n }", "@Override\n public void react(@NotNull ClientConnection client) throws IOException {\n String[] params = message.getHeader().split(\" \");\n if( params.length != getMessagesSize || client.getClientID() == null )\n return ;\n int roomID = Integer.parseInt(params[1]);\n List<String> messages = UserRequests.getMessagesFromRoom(roomID, nMessage);\n if (messages == null) return;\n assert client.getStreamMessage() != null;\n client.getStreamMessage().write(\n new Message(getMessagesType + \" \" + roomID, messages));\n }", "public void receive()\n {\n //Client receives a message: it finds out which type of message is and so it behaves differently\n //CHAT message: prints the message in the area\n //CONNECT message: client can't receive a connect message from the server once it's connected properly\n //DISCONNECT message: client can't receive a disconnect message from the server\n //USER_LIST message: it shows the list of connected users\n try\n {\n String json = inputStream.readLine();\n\n switch (gson.fromJson(json, Message.class).getType())\n {\n case Message.CHAT:\n ChatMessage cmsg = gson.fromJson(json, ChatMessage.class);\n\n if(cmsg.getReceiverClient() == null)\n ChatGUI.getInstance().getChatHistory().append(cmsg.getSenderClient() + \" (TO ALL): \" + cmsg.getText() + \"\\n\");\n else\n ChatGUI.getInstance().getChatHistory().append(cmsg.getSenderClient() + \" (TO YOU): \" + cmsg.getText() + \"\\n\");\n break;\n case Message.CONNECT:\n //Send login nickname and wait for permission to join\n //if message code is 1, nickname is a duplicate and must be changed, then login again\n //(send call is inside button event)\n ConnectMessage comsg = gson.fromJson(json, ConnectMessage.class);\n\n if(comsg.getCode() == 1)\n {\n //Show error\n ChatGUI.getInstance().getLoginErrorLabel().setVisible(true);\n }\n else\n {\n //Save nickname\n nickname = ChatGUI.getInstance().getLoginField().getText();\n\n //Hide this panel and show main panel\n ChatGUI.getInstance().getLoginPanel().setVisible(false);\n ChatGUI.getInstance().getMainPanel().setVisible(true);\n }\n break;\n case Message.USER_LIST:\n UserListMessage umsg2 = gson.fromJson(json, UserListMessage.class);\n fillUserList(umsg2);\n break;\n }\n } \n catch (JsonSyntaxException | IOException e)\n {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }", "@Override\n\tpublic void onMessage(Message message) {\n\t\tSystem.out.println(message.getBody());\n\t}", "private String receiveMsgFromClient() {\n try {\n return inputStream.readUTF();\n } catch (IOException e) {\n System.err.println(\"Client is gone.\");\n System.err.println(e.getMessage());\n running = false;\n return \"\";\n }\n }", "@Override\n public void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception {\n System.err.println(\"来自client的信息:\" + msg);\n Gson gson = new Gson();\n UserInfo userInfo = gson.fromJson(msg, UserInfo.class);\n\n msg = \"用户名:\"+ userInfo.getUsername()+ \" 密码:\" + userInfo.getPassword() + \"----\" + ctx.channel().remoteAddress()+ \"----\" + msg;\n Log.d(\"tag\",msg);\n System.out.println(ctx.channel().id());\n ctx.writeAndFlush(\"1\\n\");\n //ctx.writeAndFlush(\"[\" + ctx.channel().remoteAddress() + \"] \" + msg + '\\n');\n\n }", "private Message readMessage() throws IOException, ClassNotFoundException {\n Message message = (Message) objectInputStream.readObject();\n Message.Command temp = message.getCommand();\n if (temp != Message.Command.GET_RESERVED && temp !=\n Message.Command.GET_AVAILABLE) {\n if (connectionType == Message.Command.REGISTER_CLIENT) {\n connectionLoggerService.add(\"Client - \"\n + socket.getInetAddress().getHostAddress()\n + \" : \"\n + message.toString());\n\n } else if (connectionType == Message.Command.REGISTER_AH) {\n connectionLoggerService.add(\"Auction House - \"\n + socket.getInetAddress().getHostAddress()\n + \" : \"\n + message.toString());\n } else {\n connectionLoggerService.add(\"Unknown - \"\n + socket.getInetAddress().getHostAddress()\n + \" : \"\n + message.toString());\n }\n }\n return message;\n }", "private void handleRead(SelectionKey key) throws IOException {\n\t\t\tSSLSocketChannel ssl_socket_channel = ((SSLClientSession)key.attachment()).getSSLSocketChannel();\n\t\t\tByteBuffer request = ssl_socket_channel.getAppRecvBuffer();\n\t\t\tint count = ssl_socket_channel.read();\n\t\t\t\n\t\t\tif (count < 0) {\n\t\t\t\t\n\t\t\t\tremoveKeyAndSession(key);\n\t\t\t\t\n\t\t\t} else if (request.position() > 0) {\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tString message = new String(request.array(),0,request.position());\n\t\t\t\t\t\n//\t\t\t\t\tOutputHandler.println(\"Server: read \"+message);\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Parse the JSON message\n\t\t\t\t\tJSONObject json = (JSONObject) parser.parse(message);\n\t\t\t\t\t\n\t\t\t\t\t// Process the message\n\t\t\t\t\tprocessNetworkMessage(json, key);\n\t\t\t\t\t\n\t\t\t\t\trequest.clear();\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\tSystem.out.println(\"Invalid message format.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n\tpublic void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n\t\tString receiveData = (String)msg;\n\t\tSystem.out.println(receiveData);\n\t}", "private String readFromClient() throws IOException {\n final String request = inFromClient.readLine();\n return request;\n }", "public void readFromClient() {\n Thread t = new Thread(() -> {\n while (connected) {\n try {\n socket.setSoTimeout(5000);\n String fromClient = socketIn.readLine();\n if (!fromClient.equals(\"\")) {\n if (myTurn) {\n answer = fromClient;\n answerReady = true;\n synchronized (this) {\n notifyAll();\n }\n } else {\n send(wrongTurnMessage);\n System.out.println(\"[SERVER] Wrong turn message\");\n }\n }\n } catch (IOException | NullPointerException | IllegalArgumentException e) {\n System.out.println(\"[SERVER] Client unreachable\");\n //e.printStackTrace();\n notifyDisconnection(this);\n break;\n }\n }\n });\n t.start();\n }", "void ReadChatLog()\r\n {\r\n try{\r\n BufferedReader chatLogReader = new BufferedReader(new FileReader(pda_TCPServerMT.chatLog));\r\n while(chatLogReader.ready())\r\n WriteCypherMessage(chatLogReader.readLine());\r\n\r\n chatLogReader.close();\r\n } catch (Exception e){}\r\n }", "public static String readMessage() throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tSystem.out.print(\"Enter the message :: \");\n\t\tSystem.out.println();\n\t\tString s = br.readLine();\n\t\treturn s;\n\t}", "@Override\n public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n String body = (String) msg;\n System.out.println(body);\n System.out.println(\"第\"+ ++count + \"次收到服务器回应\");\n }", "public void receiveInfoFromServerC() throws IOException\n\t{\n\t\tstatus = fromServer.readInt();\n\n\t\tif (status == PLAYER1WINS)\n\t\t{\t\n\t\t\tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"You've won!\")); \n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == PLAYER2WINS)\n\t\t{\n\t\t\tsetMove(otherToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - Player O has won!\"));\n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == DRAW)\n\t\t{\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - It's a tie!\"));\n\t\t\tsetMove(otherToken);\n\t\t\tcontinueToPlay = false;\n\t\t}\n\t\telse if (status == WAIT)\n\t\t{\n\t\t\tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Other player's turn.\"));\n\t\t\tmyTurn = false; \n\t\t}\n\t\telse if (status == CONTINUE)\n\t\t{\n\t\t\tsetMove(otherToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Your turn.\"));\n\t\t\tmyTurn = true;\n\t\t}\n\t}", "private void handleMessage(Message msg) {\n switch (msg.what) {\n case R.id.clientReady: // 음성인식 준비 가능\n txtResult.setText(\"Connected\");\n writer = new AudioWriterPCM(Environment.getExternalStorageDirectory().getAbsolutePath() + \"/NaverSpeechTest\");\n writer.open(\"Test\");\n break;\n case R.id.audioRecording:\n writer.write((short[]) msg.obj);\n break;\n case R.id.partialResult:\n mResult = (String) (msg.obj);\n mResult += mResult;\n txtResult.setText(mResult);\n break;\n case R.id.finalResult: // 최종 인식 결과\n SpeechRecognitionResult speechRecognitionResult1 = (SpeechRecognitionResult) msg.obj;\n List<String> results1 = speechRecognitionResult1.getResults();\n StringBuilder strBuf1 = new StringBuilder();\n for(String result : results1) {\n strBuf1.append(result);\n //strBuf.append(\"\\n\");\n break;\n }\n mResult = strBuf1.toString();\n txtResult.setText(mResult);\n\n requestChatbot();\n\n break;\n case R.id.recognitionError:\n if (writer != null) {\n writer.close();\n }\n mResult = \"Error code : \" + msg.obj.toString();\n txtResult.setText(mResult);\n btnStart.setText(R.string.str_start);\n btnStart.setEnabled(true);\n break;\n case R.id.clientInactive:\n if (writer != null) {\n writer.close();\n }\n btnStart.setText(R.string.str_start);\n btnStart.setEnabled(true);\n break;\n }\n }", "public void listen() throws IOException, InterruptedException{\n\t\tString response;\n\t\twhile (!serverSoc.isClosed() && (response = fromServer.readLine()) != null){\n\t\t\tif (gui != null){\n\t\t\t\tgui.giveResponse(response);\n\t\t\t}\n\t\t\tSystem.out.println(response);\n\t\t\tbotAction(response);\n\t\t}\n\t\tqueue.add(\"\");\n\t\tgameOver = true;\n\t}", "private void standByForMessages() throws IOException {\n if (reader.readLine() != null) {\n try {\n JSONObject j = (JSONObject) jps.parse(reader.readLine());\n sequence = Integer.valueOf(j.get(\"sequence\").toString());\n String cmd = (String) j.get(\"command\");\n JSONArray parameter = (JSONArray) j.get(\"parameter\");\n cmdHandler(parameter, cmd);\n } catch (ParseException ex) {\n }\n }\n }", "public Message processReadToMessage(Attachment attach){\n Message msg = Message.byteBufferToMsg(attach.buffer);\n System.out.format(\"Client at %s says: %s%n\", attach.clientAddr,\n msg.toString());\n return msg;\n }", "@OnMessage\n\tpublic void handleMessage(String message, Session session) {\n\t\tSystem.out.println(\"Received: \" + message);\n\n\t\ttry{\n\t\t\t// We always expect a single json object - all our commands are routed in via this mechanism, with each command having a different root json object name\n\t\t\tJsonReader jsonReader = Json.createReader(new StringReader(message));\n\t\t\tJsonObject o = jsonReader.readObject();\n\t\t\t\n\t\t\t// Every command should have an auth value on it...\n\t\t\tString auth = o.getString(\"auth\");\n\t\t\t//System.out.println(\"Auth is \" + auth);\n\t\t\tif (!sessionHandler.validAccounts.contains(auth))\n\t\t\t{\n\t\t\t\tsession.getBasicRemote().sendText(\"{\\\"noauth\\\":true}\");\n\t\t\t\tthrow new Exception(\"Invalid auth\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// See what command the client has sent me - the name of the object denotes the command\n\t\t\tJsonObject console = o.getJsonObject(\"console\");\n\t\t\tif (null != console)\n\t\t\t{\n\t\t\t\tConsoleInfo ci = new ConsoleInfo();\n\t\t\t\tci.name = console.getString(\"name\");\n\t\t\t\tsessionHandler.addConsoleInfo(session, ci);\n\t\t\t}\t\t\t\n\t\t\tJsonObject reset = o.getJsonObject(\"reset\");\n\t\t\tif (null != reset)\n\t\t\t{\n\t\t\t\tif (reset.getString(\"type\").equals(\"full\"))\n\t\t\t\t{\n\t\t\t\t\t// Clear out the registered devices\n\t\t\t\t\tDevices.d.removeAll();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tDevices.d.remove(reset.getString(\"number\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\tJsonObject deleteaudio = o.getJsonObject(\"deleteaudio\");\n\t\t\tif (null != deleteaudio)\n\t\t\t{\n\t\t\t\t// remove this audio\n\t\t\t\tAudios.a.remove(deleteaudio.getString(\"name\"));\n\t\t\t}\n\t\t\tJsonObject addaudiofolder = o.getJsonObject(\"addfolder\");\n\t\t\tif (null != addaudiofolder)\n\t\t\t{\n\t\t\t\t// Create a folder on disk\n\t\t String folder = addaudiofolder.getString(\"folder\");\n\t\t String newName = addaudiofolder.getString(\"name\");\n\t\t File uploads = new File(Settings.s.uploadDiskPath + \"/\" + (folder.length()==0?\"\" : folder + \"/\") + newName);\n\t\t // Prevent traversals\n\t\t if (!uploads.getParentFile().toPath().startsWith(new File(Settings.s.uploadDiskPath).toPath()))\n\t\t {\n\t\t \t// Naughty!\n\t\t \tthrow new ServletException(\"Cannot save to \" + uploads.getParentFile().toPath()); \t\n\t\t }\n\t\t // Create the folder if necessary\n\t\t if (!uploads.exists())\n\t\t {\n\t\t \tuploads.mkdirs();\n\t\t }\n\t\t // And tell everyone about it...\n\t\t\t\tAudios.a.add(uploads.toString(), newName, folder, true);\n\t\t\t}\n\t\t\tJsonObject playaudio = o.getJsonObject(\"playaudio\");\n\t\t\tif (null != playaudio)\n\t\t\t{\n\t\t\t\t// Play this audio to the listed devices\n\t\t\t\tString audio = playaudio.getString(\"audio\");\n\t\t\t\tJsonArray devices = playaudio.getJsonArray(\"devices\");\n\t\t\t\tAudio a = Audios.a.get(audio);\n\t\t\t\tif (null != a)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t// TODO - pass the array to Plivo instead of looping here, as I think the play API can take an array...\n\t\t\t\t\tfor (JsonValue device : devices)\n\t\t\t\t\t{\n\t\t\t\t\t\tDevice d = Devices.d.get(device.toString());\n\t\t\t\t\t\t// Is this a folder? If so, pick a random child audio, preferring one that this device has not had\n\t\t\t\t\t\tif (a.isFolder)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ta = Audios.a.getRandomChild(a, d);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// We should be able to handle ringing calls here\n\t\t\t\t\t\tif (null != d)\n\t\t\t\t\t\t\td.MakeCall(a);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tJsonObject patch = o.getJsonObject(\"patch\");\n\t\t\tif (null != patch)\n\t\t\t{\n\t\t\t\t// Connect this active device to an idle device, or connect 2 idle devices together\n\t\t\t\tJsonArray devices = patch.getJsonArray(\"devices\");\n\t\t\t\tDevices.patch(devices.get(0).toString(), devices.get(1).toString());\n\t\t\t}\n\t\t\t\n\t\t\tJsonObject playtext = o.getJsonObject(\"playtext\");\n\t\t\tif (null != playtext)\n\t\t\t{\n\t\t\t\t// As playAudio, but for sms - and the text can be edited in the console and not saved...\n\t\t\t\tString text = playtext.getString(\"text\");\n\t\t\t\tString activetext = playtext.getString(\"activetext\");\n\t\t\t\tText atext = Texts.t.get(activetext);\n\t\t\t\tJsonArray devices = playtext.getJsonArray(\"devices\");\n\t\t\t\tif (!text.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tfor (JsonValue device : devices)\n\t\t\t\t\t{\n\t\t\t\t\t\tDevice d = Devices.d.get(device.toString());\n\t\t\t\t\t\tif (null != d)\n\t\t\t\t\t\t\td.Sms(text, atext);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tJsonObject ignore = o.getJsonObject(\"ignore\");\n\t\t\tif (null != ignore)\n\t\t\t{\n\t\t\t\tJsonArray devices = ignore.getJsonArray(\"devices\");\n\t\t\t\tfor (JsonValue device : devices)\n\t\t\t\t{\n\t\t\t\t\tDevices.hangup(device.toString(),\"failed\",\"Request from console\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tJsonObject deletetext = o.getJsonObject(\"deletetext\");\n\t\t\tif (null != deletetext)\n\t\t\t{\n\t\t\t\tTexts.t.remove(deletetext.getString(\"name\"));\n\t\t\t}\n\t\t\t\n\t\t\tJsonObject savetext = o.getJsonObject(\"savetext\");\n\t\t\tif (null != savetext)\n\t\t\t{\n\t\t\t\tTexts.t.add(savetext.getString(\"label\"),savetext.getString(\"name\"));\n\t\t\t}\n\t\t\t\n\t\t\tJsonObject updatestatus = o.getJsonObject(\"updatestatus\");\n\t\t\tif (null != updatestatus)\n\t\t\t{\n\t\t\t\tDevices.updateStatus();\n\t\t\t}\n\t\t\tJsonObject savedevice = o.getJsonObject(\"savedevice\");\n\t\t\tif (null != savedevice)\n\t\t\t{\n\t\t\t\tDevices.updateName(savedevice.getString(\"number\"), savedevice.getString(\"name\"));\n\t\t\t}\n\t\t\tJsonObject saveprogress = o.getJsonObject(\"saveprogress\");\n\t\t\tif (null != saveprogress)\n\t\t\t{\n\t\t\t\tDevices.updateProgress(saveprogress.getString(\"number\"), saveprogress.getString(\"progress\"));\n\t\t\t}\n\n\t\t\t\n\t\t\tJsonObject setmessagesread = o.getJsonObject(\"setmessagesread\");\n\t\t\tif (null != setmessagesread)\n\t\t\t{\n\t\t\t\tDevices.setMessagesRead(setmessagesread.getString(\"number\"));\n\t\t\t}\n\t\t\tJsonObject savegoal = o.getJsonObject(\"savegoal\");\n\t\t\tif (null != savegoal)\n\t\t\t{\n\t\t\t\tGoals.add(savegoal);\n\t\t\t}\n\t\t\tJsonObject deletegoal = o.getJsonObject(\"deletegoal\");\n\t\t\tif (null != deletegoal)\n\t\t\t{\n\t\t\t\tGoals.remove(deletegoal.getString(\"name\"));\n\t\t\t}\n\t\t\tJsonObject uncue = o.getJsonObject(\"uncue\");\n\t\t\tif (null != uncue)\n\t\t\t{\n\t\t\t\tDevices.uncue(uncue.getString(\"number\"));\n\t\t\t}\n\t\t\tJsonObject register = o.getJsonObject(\"register\");\n\t\t\tif (null != register)\n\t\t\t{\n\t\t\t\tDevices.d.add(register.getString(\"number\"),\"console\");\n\t\t\t}\n\t\t\t\n\t\t\t// IVR commands from the console\t\t\t\n\t\t\tJsonObject saveivrstep = o.getJsonObject(\"saveivrstep\");\n\t\t\tif (null != saveivrstep)\n\t\t\t{\n\t\t\t\tIvrSteps.i.add(saveivrstep).saveToDisk();\n\t\t\t}\n\t\t\tJsonObject deleteivrstep = o.getJsonObject(\"deleteivrstep\");\n\t\t\tif (null != deleteivrstep)\n\t\t\t{\n\t\t\t\tIvrSteps.i.remove(deleteivrstep.getString(\"name\"));\n\t\t\t}\n\t\t\t// System-wide settings\n\t\t\tJsonObject setting = o.getJsonObject(\"setting\");\n\t\t\tif (null != setting)\n\t\t\t{\n\t\t\t\tSwitchboard.s.parseJson(setting);\n\t\t\t\tSwitchboard.s.persist();\n\t\t\t\t\n\t\t\t\t// Tell everyone about this...\n\t\t\t\tsessionHandler.Broadcast(o);\n\t\t\t\t\n\t\t\t\t// And do any heartbeat changes that I need\n\t\t\t\tSwitchboard.s.setupHeartbeat(true);\n\t\t\t}\n\t\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed to parse \" + message + \" with error \" + e.getMessage());\n\t\t}\n\t}", "public void execHandlerRead( Message msg ) {\n\t \t// create valid data bytes\n\t\tbyte[] buffer = (byte[]) msg.obj;\n\t\tint length = (int) msg.arg1;\n\t\tbyte[] bytes = new byte[ length ];\n\t\tfor ( int i=0; i < length; i++ ) {\n\t\t\tbytes[ i ] = buffer[ i ];\n\t\t}\n\t\t// debug\n\t\tString read = buildMsgBytes( \"r \", bytes );\n\t\tlog_d( read );\n\t\taddAndShowTextViewDebug( read );\n\t\tnotifyRead( bytes );\n\t}", "@Override\n public void run() {\n\n startPingTimer();\n String read = \"\";\n\n try {\n while ((read = in.readLine()) != null){\n\n //System.out.println(\"[CLIENT] Received: \" + read);\n messageHandler(read);\n\n }\n closeConnection();\n\n }catch (IOException e){\n\n System.out.println(\"[CLIENT] \" + e.getMessage());\n System.out.println(\"[CLIENT] Connection closed.\");\n\n }\n\n }", "@Override\n\tpublic void run() {\n\t\t\n\t\twhile(connected) {\n\t\t\tif(GameActivity.getInstance() == null)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\ttry {\n\t\t\t\t// Read first 4 bytes (int, messageType) from stream\n\t\t\t\t//in.read(bytes, 0, 4);\n\t\t\t\tint messageType = in.readInt();\n\t\t\t\t//intByteBuffer.clear(); // Clear buffer so we can read from it again\n\t\t\t\t\n\t\t\t\t// Receive appropriate message based on received messageType\n\t\t\t if(messageType == Message.CHARACTERS.value()) {\n\t\t\t\t\treceiveCharacters();\n\t\t\t\t} else if(messageType == Message.ID.value()) {\n\t\t\t\t\treceiveId();\n\t\t\t\t} else {\n\t\t\t\t\tSystem.err.println(\"Received message with unknown id: \" + messageType);\n\t\t\t\t}\n\t\t\t \n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Connection to server lost\");\n\t\t\t\te.printStackTrace();\n\t\t\t\tclose();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@Override\n public void handleMessage(Message msg) {\n Bundle data = msg.getData();\n if (data.containsKey(\"command\")) {\n if (data.getString(\"command\").equalsIgnoreCase(\"get_data\")) {\n mGetDataMessenger = msg.replyTo;\n getData();\n }\n }\n }", "private void receiveAndDispatchMessage() {\n String response = null;\n try {\n while((response = bufferedReader.readLine()) != null) {\n System.out.println(\"received message from server: \" + response);\n String messageKind = \"\";\n if(response.contains(\":\")) {\n messageKind = response.substring(0, response.indexOf(\":\"));\n } else {\n messageKind = response;\n }\n Bundle bundle = new Bundle();\n bundle.putString(\"response\", response);\n switch (messageKind) {\n case ClientMessageKind.SIGNUPDENIED:\n case ClientMessageKind.SIGNUPOK:\n if(resultReceiverMap.keySet().contains(ActivityNames.COMMONSIGNUPACTIVITY)) {\n resultReceiverMap.get(ActivityNames.COMMONSIGNUPACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.SIGNINDENIED:\n case ClientMessageKind.SIGNINOK:\n if(resultReceiverMap.keySet().contains(ActivityNames.COMMONSIGNINACTIVITY)) {\n resultReceiverMap.get(ActivityNames.COMMONSIGNINACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.DRIVERLOC:\n if(resultReceiverMap.keySet().contains(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.PASSENGERLOC:\n if(resultReceiverMap.keySet().contains(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.CHATFROMDRIVER:\n if(resultReceiverMap.keySet().contains(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.CHATFROMPASSENGER:\n if(resultReceiverMap.keySet().contains(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.PASSENGERDEST:\n if(resultReceiverMap.containsKey(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.STARTRIDE:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n } else if(resultReceiverMap.containsKey(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.ENDRIDE:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERENDSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERENDSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.DRIVERCANCEL:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.PASSENGERCANCEL:\n if(resultReceiverMap.containsKey(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.UPDATEPASSENGERPROFILEDENIED:\n case ClientMessageKind.UPDATEPASSENGERPROFILEOKAY:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERUPDATEPROFILEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERUPDATEPROFILEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.UPDATEDRIVERPROFILEDENIED:\n case ClientMessageKind.UPDATEDRIVERPROFILEOKAY:\n if(resultReceiverMap.containsKey(ActivityNames.DRIVERUPDATEPROFILEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERUPDATEPROFILEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.DRIVERREQUESTLOC:\n if(resultReceiverMap.containsKey(ActivityNames.PASSENGERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.PASSENGERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n case ClientMessageKind.PASSENGERREQUESTLOC:\n if(resultReceiverMap.containsKey(ActivityNames.DRIVERSTARTSERVICEACTIVITY)) {\n resultReceiverMap.get(ActivityNames.DRIVERSTARTSERVICEACTIVITY).send(\n ResultCode.RESULTCODE,\n bundle\n );\n }\n break;\n default:\n break;\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void readInput(String msg){\n if(msg.startsWith(\"User:\")){\n msg = msg.substring(msg.indexOf(':') + 1);\n users.add(msg);\n notifyObservers(ObserverEnum.ADD, msg);\n }else if(msg.startsWith(\"Message:\")){\n msg = msg.substring(msg.indexOf(':') + 1);\n notifyObservers(ObserverEnum.MESSAGE, msg);\n }else if(msg.startsWith(\"Disconnect:\")){\n msg = msg.substring(msg.indexOf(':') + 1);\n users.remove(msg);\n notifyObservers(ObserverEnum.REMOVE, msg);\n }else if(msg.startsWith(\"IDisconnect:\")){\n users.clear();\n notifyObservers(ObserverEnum.DISCONNECTED, msg);\n }\n }", "public void processMessage(Chat chat, Message message)\n {\n }", "private common.messages.KVMessage receiveMessage() throws IOException {\r\n\t\t\r\n\t\tint index = 0;\r\n\t\tbyte[] msgBytes = null, tmp = null;\r\n\t\tbyte[] bufferBytes = new byte[BUFFER_SIZE];\r\n\t\t\r\n\t\t/* read first char from stream */\r\n\t\tbyte read = (byte) input.read();\t\r\n\t\tboolean reading = true;\r\n\t\t\r\n//\t\tlogger.info(\"First Char: \" + read);\r\n//\t\tCheck if stream is closed (read returns -1)\r\n//\t\tif (read == -1){\r\n//\t\t\tTextMessage msg = new TextMessage(\"\");\r\n//\t\t\treturn msg;\r\n//\t\t}\r\n\r\n\t\twhile(/*read != 13 && */ read != 10 && read !=-1 && reading) {/* CR, LF, error */\r\n\t\t\t/* if buffer filled, copy to msg array */\r\n\t\t\tif(index == BUFFER_SIZE) {\r\n\t\t\t\tif(msgBytes == null){\r\n\t\t\t\t\ttmp = new byte[BUFFER_SIZE];\r\n\t\t\t\t\tSystem.arraycopy(bufferBytes, 0, tmp, 0, BUFFER_SIZE);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttmp = new byte[msgBytes.length + BUFFER_SIZE];\r\n\t\t\t\t\tSystem.arraycopy(msgBytes, 0, tmp, 0, msgBytes.length);\r\n\t\t\t\t\tSystem.arraycopy(bufferBytes, 0, tmp, msgBytes.length,\r\n\t\t\t\t\t\t\tBUFFER_SIZE);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmsgBytes = tmp;\r\n\t\t\t\tbufferBytes = new byte[BUFFER_SIZE];\r\n\t\t\t\tindex = 0;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\t/* only read valid characters, i.e. letters and constants */\r\n\t\t\tbufferBytes[index] = read;\r\n\t\t\tindex++;\r\n\t\t\t\r\n\t\t\t/* stop reading is DROP_SIZE is reached */\r\n\t\t\tif(msgBytes != null && msgBytes.length + index >= DROP_SIZE) {\r\n\t\t\t\treading = false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/* read next char from stream */\r\n\t\t\tread = (byte) input.read();\r\n\t\t}\r\n\t\t\r\n\t\tif(msgBytes == null){\r\n\t\t\ttmp = new byte[index];\r\n\t\t\tSystem.arraycopy(bufferBytes, 0, tmp, 0, index);\r\n\t\t} else {\r\n\t\t\ttmp = new byte[msgBytes.length + index];\r\n\t\t\tSystem.arraycopy(msgBytes, 0, tmp, 0, msgBytes.length);\r\n\t\t\tSystem.arraycopy(bufferBytes, 0, tmp, msgBytes.length, index);\r\n\t\t}\r\n\t\t\r\n\t\tmsgBytes = tmp;\r\n\t\t\r\n\t\t/* build final String */\r\n\t\tcommon.messages.KVMessage msg = new common.messages.KVAdminMessage(msgBytes);\r\n\t\tlogger.debug(\"RECEIVE \\t<\" \r\n\t\t\t\t+ clientSocket.getInetAddress().getHostAddress() + \":\" \r\n\t\t\t\t+ clientSocket.getPort() + \">: '\" \r\n\t\t\t\t+ msg.getMsg().trim() + \"'\");\r\n\t\treturn msg;\r\n }", "public void handleMessageFromClient(Object msg) {\n\n }", "private static String receiveResponse() {\n String response = null;\n try {\n response = in.readLine();\n } catch (IOException e) {\n System.out.println(\"Error receiving response\");\n }\n\n return response;\n }", "public void communicate() throws IOException{\n\t\tdo{\n\t\t\t//Messages recieved by the client\n\t\t\t\n\t\t\t\n\t\t\t//Messages being sent by the client\t\n\t\t\t//Chat client is reading in data from its own user and from the chat client thread\n//\t\t\t line = console.readLine(); //client msg is read from console environment\n\t\t\t\n\t\t\t//nope \n//\t\t\tScanner scanner = new Scanner(System.in);\n//\t String line = scanner.nextLine();\n//\t System.out.println(line);\n//\t\t\tscanner.close();\n\t\t\t\n\t\t\t//nope\n//\t line = strIn.readUTF();\n//\t\t\tSystem.out.println(\"User said: \"+ line);\n\t\t\t\n\n//\t\t\tnope needs to be a constant stream cant just get client message from client gui\n//\t\t\tline = gui.getLatestMsg();\n\t\t\t\n//\t\t\tnope initial stream is null. read from gui stream\n//\t\t\tByteArrayInputStream bInput = new ByteArrayInputStream(gui.b);\n//\t\t\tline = bInput.toString();\n//\t\t\t\n\t\t\tstrOut.writeUTF(line); // Writes a string to the underlying output stream using modified UTF-8 encoding\n\t\t\tstrOut.flush(); //Forces any buffered output bytes to be written out to the stream.\n\t\t\t\n\t\t}while(!line.equalsIgnoreCase(\"bye\")); //not working. Still listens\n\t}", "public static void getMessage() {\r\n\t\tLog.i(TAG,\r\n\t\t\t\t\"+++ GOT MESSAGE FROM ARDUINO +++\" + getArduinoMessage());\r\n\t\tString[] msgSplit = getArduinoMessage().split(\":\");\r\n\t\tString keyWord = \"\";\r\n\t\tString firstVaule = \"\";\r\n\t\tString secondValue = \"\";\r\n\r\n\t\tif (msgSplit.length > 0) {\r\n\t\t\tkeyWord = msgSplit[1];\r\n\t\t\tfirstVaule = msgSplit[2];\r\n\t\t\tsecondValue = msgSplit[3];\r\n\t\t}\r\n\r\n\t\tif (keyWord.equals(\"xy\")) {\r\n\t\t\tgetTelescopeAltAz(firstVaule, secondValue);\r\n\t\t\tstartTracking();\r\n\t\t}\r\n\t\tif (keyWord.equals(\"xyt\")) {\r\n\t\t\tLog.i(TAG, \"+++ GOT TELESCOPE POSITION \" + firstVaule + \" \"\r\n\t\t\t\t\t+ secondValue);\r\n\t\t\tstar++;\r\n\t\t\tgetTelescopeAltAz(firstVaule, secondValue, star );\r\n\t\t}\r\n\t}", "@Override\n public void run() {\n FILEPREFIX = \".//files\"+serverID + \"//\";\n ClientMessage = (Message) socketRead();\n ServerMessage = getReturnMessage(ClientMessage);\n //System.out.println(\"client\"+ClientMessage.getFrom()+\"message : \"+ClientMessage.getContent());\n File file = new File(FILEPREFIX + ClientMessage.getFileName());\n switch (ClientMessage.getType()){\n case \"enquiry\"://return the list of file\n ServerMessage.setContent(ListAllFile());\n break;\n case \"read\"://read the last line\n System.out.println(ClientMessage.getFrom() + \": Reading...\");\n ServerMessage.setContent(\"Reading: \"+ReadLastLine(file));\n System.out.println(\"Reading \"+ClientMessage.getContent());\n break;\n case \"write\"://write to the end of file\n System.out.println(ClientMessage.getFrom() + \": writing...\");\n try{\n WriteLastLine(file,ClientMessage.getContent());\n }catch (IOException e) {\n System.out.println(\"write error\");\n }\n\n ServerMessage.setContent(\"writing: \"+ReadLastLine(file));\n System.out.println(\"Writing \"+ClientMessage.getContent());\n break;\n default://unknown command\n System.out.println(ClientMessage.getType());\n ServerMessage.setContent(\"Error\");\n System.out.println(ClientMessage.getFrom() + \": Wrong type\");\n break;\n }\n socketWrite(ServerMessage);\n\n try {//close the socket connection\n client.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public synchronized String read() {\n\t\tString message = \"\";\n\n\t\tif(content.size() > 0 )\n\t\t\tmessage = content.get(0);\n\t\tnotify();\n\n\t\treturn message;\n }", "@Override\n public void onMessageReceived(MessageReceivedEvent event) {\n if(event.getAuthor().isBot())\n return;\n\n Message msg = event.getMessage();\n String content = msg.getContentRaw();\n\n if(content.charAt(0) == PREFIX) {\n handleCommand(msg, content.substring(1));\n }\n }", "public void getServerResponse() {\n\t\twhile (true) {\n\t\t\ttheMessage = readObject.readMessage();\n\t\t\tif (theMessage != null) {\n\t\t\t\tSystem.out.println(\"Server response is: \" + theMessage.getChoice());\n\t\t\t\tswitchBoard(theMessage.getChoice(), theMessage);\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected void channelRead0(ChannelHandlerContext ctx, ByteBuf msg) {\n System.out.println(\"Client received: \" + ByteBufUtil.hexDump(msg.readBytes(msg.readableBytes())));\n }", "public String recvMsg() {\n System.out.print(\"Recieving message: \");\n try {\n StringBuilder sb = new StringBuilder();\n String input = reader.readLine();\n \n sb.append(input);\n if(sb != null)\n \tSystem.out.println(sb.toString());\n return sb.toString();\n } catch (IOException e) {\n System.out.println(\"IOException at recvMsg()\");\n } catch (NullPointerException e) {\n System.out.println(\"NullPointerException at recvMsg()\");\n } catch (Exception e) {\n System.out.println(\"Exception at recvMsg(): \" + e.toString());\n }\n\n return null;\n }", "@Override\n public void onMessage(String channel, String message) {\n if (redisHandler.isAuth()) redisHandler.getJedisPool().getResource().auth(redisHandler.getPassword());\n if (!channel.equalsIgnoreCase(redisHandler.getChannel())) return;\n\n executor.execute(() -> {\n String[] strings = message.split(\"///\");\n\n System.out.println(strings[1]);\n System.out.println(strings[0]);\n\n Object jsonObject = null;\n try {\n jsonObject = redisHandler.getGson().fromJson(strings[0], Class.forName(strings[1]));\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n RedisPacket redisPacket = (RedisPacket) jsonObject;\n\n if (redisPacket == null) {\n System.out.println(\"The redis packet received seems to be null!\");\n return;\n }\n\n redisPacket.onReceived();\n });\n }", "void onMessageReceived(Message message);", "@Override\r\n\tpublic void run() {\n\t\tsuper.run();\r\n\t\tString str;\r\n\t\ttry {\r\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\r\n\t\t\t\t\tsocket.getInputStream()));\r\n\r\n\t\t\twhile ((str = reader.readLine()) != null) {\r\n\t\t\t\tString[] msg = str.split(\",\");\r\n\t\t\t\tSystem.out.println(\"The message contents:\" + str);\r\n\t\t\t\twordDisp.setText(msg[0]);\r\n\t\t\t\tSystem.out.println(\"Message[0]\" + msg[0]);\r\n\t\t\t\tmessage.setText(msg[1].toUpperCase());\r\n\t\t\t\tSystem.out.println(\"Message[1]\" + msg[1]);\r\n\t\t\t\tattempts.setText(\"REMAINING: \" + msg[2]);\r\n\t\t\t\tSystem.out.println(\"Message[2]\" + msg[2]);\r\n\t\t\t\tscore.setText(\"SCORE: \" + msg[3]);\r\n\t\t\t\tSystem.out.println(\"Message[3]\" + msg[3]);\r\n\t\t\t}\r\n\t\t\tsocket.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public abstract void messageReceived(String message);", "@Override\n public void onMessageReceived(MessageReceivedEvent event)\n {\n JDA jda = event.getJDA(); //JDA, the core of the api.\n long responseNumber = event.getResponseNumber();//The amount of discord events that JDA has received since the last reconnect.\n\n //Event specific information\n User author = event.getAuthor(); //The user that sent the message\n Message message = event.getMessage(); //The message that was received.\n MessageChannel channel = event.getChannel(); //This is the MessageChannel that the message was sent to.\n // This could be a TextChannel, PrivateChannel, or Group!\n\n String msg = message.getContentDisplay(); //This returns a human readable version of the Message. Similar to\n // what you would see in the client.\n\n boolean bot = author.isBot(); //This boolean is useful to determine if the User that\n // sent the Message is a BOT or not!\n\n if (event.isFromType(ChannelType.TEXT)) //If this message was sent to a Guild TextChannel\n {\n //Because we now know that this message was sent in a Guild, we can do guild specific things\n // Note, if you don't check the ChannelType before using these methods, they might return null due\n // the message possibly not being from a Guild!\n\n Guild guild = event.getGuild(); //The Guild that this message was sent in. (note, in the API, Guilds are Servers)\n TextChannel textChannel = event.getTextChannel(); //The TextChannel that this message was sent to.\n Member member = event.getMember(); //This Member that sent the message. Contains Guild specific information about the User!\n\n String name;\n if (message.isWebhookMessage())\n {\n name = author.getName(); //If this is a Webhook message, then there is no Member associated\n } // with the User, thus we default to the author for name.\n else\n {\n name = member.getEffectiveName(); //This will either use the Member's nickname if they have one,\n } // otherwise it will default to their username. (User#getName())\n\n System.out.printf(\"(%s)[%s]<%s>: %s\\n\", guild.getName(), textChannel.getName(), name, msg);\n }\n else if (event.isFromType(ChannelType.PRIVATE)) //If this message was sent to a PrivateChannel\n {\n //The message was sent in a PrivateChannel.\n //In this example we don't directly use the privateChannel, however, be sure, there are uses for it!\n PrivateChannel privateChannel = event.getPrivateChannel();\n\n System.out.printf(\"[PRIV]<%s>: %s\\n\", author.getName(), msg);\n }\n else if (event.isFromType(ChannelType.GROUP)) //If this message was sent to a Group. This is CLIENT only!\n {\n //The message was sent in a Group. It should be noted that Groups are CLIENT only.\n Group group = event.getGroup();\n String groupName = group.getName() != null ? group.getName() : \"\"; //A group name can be null due to it being unnamed.\n\n System.out.printf(\"[GRP: %s]<%s>: %s\\n\", groupName, author.getName(), msg);\n }\n //calls specific (working) commands to call from command files\n commands.caseratis.Commands.pwing(msg, channel);\n\n commands.katekat.Commands.psing(msg, channel);\n\n commands.lwbuchanan.Commands.pzing(msg, channel);\n\n commands.notahackr.Commands.poing(msg, channel);\n\n commands.redmario.Commands.pxing(msg, channel);\n\n commands.thebriankong.Commands.paing(msg, channel);\n\n commands.thebuttermatrix.Commands.ping(msg, channel);\n commands.thebuttermatrix.Commands.countdown(msg, channel);\n commands.thebuttermatrix.Commands.pid(msg, channel);\n\n commands.raybipse.Master.messageReceived(msg, channel, event);\n }", "@Override\n public void handleTextMessage(WebSocketSession client, TextMessage message) throws IOException {\n System.out.println(\"connecting\");\n String [] parseMessage = message.getPayload().split(\" \",2);\n boolean found = false;\n System.out.println(parseMessage[0]);\n System.out.println(parseMessage[0].equals(\"join\"));\n if (parseMessage[0].equals(\"join\")) {\n System.out.println(\"joinning\");\n for (Room room: rooms) {\n System.out.println(room.name);\n if (room.name.equals(parseMessage[1])) {\n System.out.println(\"room found\");\n room.addClient(client);\n\n found = true;\n }\n }\n if (found == false) {\n System.out.println(\"making new room\");\n Room newRoom = new Room(parseMessage[1], client);\n rooms.add(newRoom);\n }\n TextMessage newMessage;\n String json = \"{\\\"user\\\" : \\\"\" + parseMessage[0] + \"\\\", \\\"message\\\": \\\"\"\n + parseMessage[1] + \"\\\"}\";\n newMessage = new TextMessage(json);\n client.sendMessage(newMessage);\n\n }else{\n for (Room room: rooms) {\n if(room.clientInRoom(client))\n System.out.println(\"send message\");\n room.forwardMessage(message);\n }\n\n\n }\n }", "protected void handleMessage(Message msg) {}", "public String acceptmessage(Socket socket, BufferedReader input) throws IOException {\n\t\tString message = input.readLine();\n\t\treturn message;\n\t}", "@Override\n public void handleTextMessage(WebSocketSession session, TextMessage message) throws IOException{\n Map data = new Gson().fromJson(message.getPayload(),Map.class);\n\n // see what type of message\n final String type = getValueFromMessage(message,\"type\");\n\n switch (type){\n case \"name\":\n // payload from frontend\n String username = getValueFromMessage(message,\"payload\");\n\n log.info(\"receive name: \"+ username);\n\n // build message to json\n TextMessage retJson = setJson(\"name\", \"Hi, \"+username);\n\n session.sendMessage(retJson);\n }\n }", "@Override\n\tpublic void run() {\n\t\tInetSocketAddress remoteAddr = (InetSocketAddress) socket.getRemoteSocketAddress();\n\t\tChatServer.log(\"[server] connected by client[\" + remoteAddr.getAddress().getHostAddress() + \":\" + remoteAddr.getPort());\n\t\t\n\t\ttry {\n\t\t\t//2. 스트림 얻기\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(socket.getInputStream(), \"utf-8\"));\n\t\t PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream() ,\"utf-8\"),true);\n\t\t \n\t\t while(true) {\n\t\t \tString request = reader.readLine();\n\t\t \tSystem.out.println(request);\n\t\t \tif(request == null) {\n\t\t \t\tChatServer.log(\"클라이언트로 부터 연결 끊김\");\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \tString[] tokens = request.split(\":\");\n\t\t \t// Join:둘리 일때 - 0은 Join 1은 둘리\n\t\t \tif(\"join\".equals(tokens[0])) {\n\t\t \t\tnickname = tokens[1]; \n\t\t \t\tdoJoin(nickname + \"님이 입장하였습니다.\", writer);\n\t\t \t}else if(\"message\".equals(tokens[0])) {\n\t\t \t\t\n\t\t \t\tdoMessage(nickname + \":\" + tokens[1] );\n\t\t \t}else if(\"quit\".equals(tokens[0])) {\n\t\t \t\tdoQuit(nickname + \"님이 퇴장하였습니다.\", writer);\n\t\t \t}else {\n\t\t \t\tChatServer.log(\"에러: 알수 없는 요청(\" + tokens[0] + \")\");\n\t\t \t}\n\t\t }\n\t\t\n\t\t} catch (SocketException e) {\n\t\t\tChatServer.log(nickname);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void whileChatting() throws IOException{\n ableToType(true);\n do{\n try{\n message = (String) input.readObject();\n showMessage(\"\\n\" + message);\n }catch(ClassNotFoundException classNotFoundException){\n showMessage(\"Unknown data received!\");\n }\n }while(!message.equals(\"SERVER - END\"));\n }", "@Override\n public void handleMessage(Message msg) {\n System.out.println(\"recibe mensajes ...\");\n System.out.println(msg.obj);\n }", "public void receiveInfoFromServer() throws IOException\n\t{\n\t\tstatus = fromServer.readInt();\n\n\t\tif (status == PLAYER1WINS)\n\t\t{\t\n\t\t\tif (player == PLAYER1) \n\t\t\t{ \tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"You've won!\")); \n\t\t\t} \n\t\t\telse if (player == PLAYER2) { \n\t\t\t\tsetMove(otherToken);\n\t\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - Player X has won!\"));\n\t\t\t}\n\n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == PLAYER2WINS)\n\t\t{\n\n\t\t\tif (player == PLAYER2) \n\t\t\t{ \n\t\t\t\tPlatform.runLater(() -> lblStatus.setText(\"You've won!\")); \n\t\t\t\tsetMove(currentToken);\n\n\t\t\t}\n\t\t\telse if (player == PLAYER1) { \n\t\t\t\tsetMove(otherToken);\n\t\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - Player O has won!\")); \n\t\t\t}\n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == DRAW)\n\t\t{\n\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - It's a tie!\"));\n\t\t\tsetMove(otherToken);\n\t\t\tcontinueToPlay = false;\n\n\t\t}\n\t\telse if (status == WAIT)\n\t\t{\n\n\t\t\tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Other player's turn.\"));\n\t\t\tmyTurn = false; \n\n\t\t}\n\n\t\telse if (status == CONTINUE)\n\t\t{\n\t\t\tsetMove(otherToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Your turn.\"));\n\t\t\tmyTurn = true;\n\t\t}\n\t}", "private void receiveServerMessage() throws IOException {\n mRemoteServerMessage = lengthValueRead(in, ServerMessage.class);\n if (mRemoteServerMessage == null) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Remote server message was not received.\");\n throw new IOException(\"Remote server message was not received.\");\n }\n }", "@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, WsClientMessage msg) throws Exception {\n\t}", "private void readMessagesFromClients() throws IOException {\n String message = inputFromClient.readLine(); // Reads data from client\n if (message != null ) {\n if (!message.equals(\"EXIT\")){ // If client still don't want to disconnect\n writeMessageInDataFile(message); // write his message in the txt database\n for (ServerThread client : activeClients) { // then send his message to all active clients\n if (!client.username.equals(this.username)){\n client.outputFromServer.println(toString() + message);\n }\n }\n System.out.println(this + message); // Displays client message in server console\n }else{\n for (ServerThread client : activeClients) { // Send a message to all other clients to announce the client's disconnection\n if (!client.username.equals(this.username)){\n client.outputFromServer.println( \"\\n\" + username + \" has left the chat.\");\n }\n }\n System.out.println(username + \" has left the chat.\"); // Announce client's disconnection on server\n }\n\n }\n }", "void onMessageRead(byte[] data);", "private void run() throws IOException {\n\n Socket socket = new Socket(\"localhost\", 8678);\n in = new BufferedReader(new InputStreamReader(\n socket.getInputStream()));\n\n // Process all messages from server, according to the protocol.\n\n while (true) {\n String line = in.readLine();\n if (line.startsWith(\"SUBMIT\")) {\n new MessageThread(socket).start();\n }\n else if (line.startsWith(\"NAMEACCEPTED\")) {\n System.out.println(\"Success\");;\n } else if (line.startsWith(\"MESSAGE\")) {\n System.out.println(line);\n }\n }\n }", "void onMessage(String message) throws IOException;", "@Override\n public void execute() {\n if(state.getState()!=1) {\n client.printParseMessage();\n return;\n } else if(inputArgs.length < 1) {\n System.out.println(client.strings.getString(\"manage_command_message\"));\n return;\n }\n try {\n client.setDraftTag(inputArgs[0]);\n channel.send(new ReadRequest(client.getDraftTag()));\n ReadReply reply = (ReadReply) channel.receive();\n if(!reply.lines.isEmpty()) {\n String replyLine = reply.lines.get(reply.lines.size() - 1);\n if(Push.CLOSE_LINE.equals(replyLine)) {\n System.out.println(client.strings.getString(\"manage_close_command_message\"));\n return;\n }\n }\n } catch (IOException | ClassNotFoundException ex) {\n Logger.getLogger(ReadCommand.class.getName())\n .log(Level.SEVERE, null, ex);\n }\n state.setState(2);\n }", "@Override\r\n public void onMessage(MessageEvent message) {\r\n String newMessage = message.getMessage();\r\n String response;\r\n\r\n //split the message on spaces to identify the command\r\n String[] messageArray = newMessage.split(\" \");\r\n \r\n switch (messageArray[0]) {\r\n case \"!command\":\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n if (messageArray.length == 2) {\r\n if (messageArray[1].equals(\"off\")) {\r\n commandsActive = false;\r\n } \r\n if (messageArray[1].equals(\"on\")) {\r\n commandsActive = true;\r\n }\r\n }\r\n }\r\n break;\r\n //command to make a custom command for the bot\r\n case \"!addcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = addCom(messageArray, message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to add commands.\");\r\n }\r\n }\r\n break;\r\n case \"!commands\":\r\n if (commandsActive) {\r\n if (messageArray.length ==1) {\r\n ArrayList<String> commands = manager.getCommands(message.getChannel().getName());\r\n String commandList = \"The custom commands available to everyone for this channel are: \";\r\n while (!commands.isEmpty()) {\r\n commandList += commands.remove(0) + \", \";\r\n }\r\n message.getChannel().send().message(commandList);\r\n }\r\n }\r\n break;\r\n //command to delete a custom command from the bot\r\n case \"!delcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = delCom(messageArray[1], message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to remove commands.\");\r\n }\r\n }\r\n break;\r\n //command to edit a custom command the bot has\r\n case \"!editcom\":\r\n if (commandsActive) {\r\n if (message.getChannel().getOps().contains(message.getUser())) {\r\n response = editCom(messageArray, message.getChannel().getName());\r\n message.getChannel().send().message(response);\r\n } \r\n else {\r\n message.respond(\"You are not allowed to edit commands.\");\r\n }\r\n }\r\n break;\r\n\r\n //default message handling for custom commands\r\n default:\r\n if (commandsActive) {\r\n if (message.getMessage().startsWith(\"!\") && !messageArray[0].equals(\"!permit\")&& !messageArray[0].equals(\"!spam\")) {\r\n customCommands(message);\r\n }\r\n }\r\n break;\r\n }\r\n }", "public abstract void onTextReceived(String message);", "public ITCMessage readMessage() throws IOException;", "public synchronized String[] readChallengerMessage() {\n while ( client1.getChallengerChoice() == null ){\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n return client1.getChallengerChoice();\n }", "public void run(){\n\t\ttry{\n\t\t\t// Get client socket.\n\t\t\tSocket client = server.getClientSocket();\n\t\t\t// Get the inputstream from the socket\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(client.getInputStream()));\n\t\t\tString line;\n\t\t\twhile(true){\n\t\t\t\tif(client.isClosed()){\n\t\t\t\t\tSystem.out.println(\"The client is offline. Chat finished.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tline= reader.readLine();\n\t\t\t\t\tif(line.equals(\"bye\")){\n\t\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t\t\tSystem.out.println(\"Chat finished.\");\n\t\t\t\t\t\tclient.close();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tSystem.out.println(\"Client: \");\n\t\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treader.close();\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void handleMessage(Message message);", "@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, TextWebSocketFrame frame) throws Exception\n\t{\n\t\tci.invoke(frame.text());\n\t}", "@Override\n public void handleMessage(Message message) {}", "@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}", "@Override\n public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {\n\n log.info( ctx.channel().id().asLongText()+\"-> channelRead , msg={}\" , msg.getClass().getName());\n\n ctx.fireChannelRead( msg ) ;\n }", "public void receiveMyMessage(String msg) {\n \t\n final String str = msg;\n \n mHandler.post(new Runnable() {\n @Override\n public void run() {\n // This gets executed on the UI thread so it can safely modify Views\n receivedTextView1.setText(str);\n }\n });\n }", "void message(String response, GameChatEvent cause) throws InterruptedException, IOException;", "public void onMessageReceived(MessageReceivedEvent e) {\n\t\tFunctions funcao = new Functions(e);\n\t\tString message = e.getMessage().getContent();\n\t\tString name = e.getAuthor().getName();\n\t\tString response = \"\";\n\t\tif ((message.startsWith(\"!!!\") || message.startsWith(\"-\")) && !e.getTextChannel().getName().equals(\"commands\")) {\n\t\t//if(e.getMessage().getAuthor().isBot()) {\n\t\t\tfuncao.limparComando();\n\t\t} else if (name.equals(\"Jads1\")) {\n\t\t\tRandom rand = new Random();\n\t\t\tint rng = rand.nextInt(100 + 1);\n\t\t\tif (rng == 9) {\n\t\t\t\tresponse = \"Cala boca, Jads!\";\n\t\t\t\te.getTextChannel().sendMessage(response).queue();\n\t\t\t}\n\t\t} else if (message.equals(\"'flipCoin\")) {\n\t\t\tfuncao.flipCoin();\n\t\t}else if (message.startsWith(\"'ranking\")) {\n\t\t\tfuncao.displayRanking();\n\t\t} else if (message.startsWith(\"'whois\")) {\n\t\t\tfuncao.whoIs();\n\t\t}else if (message.equals(\"'atribuirCargos\") && (e.getMember().getRoles().get(0).getName().equals(e.getGuild().getRoles().get(0).getName()) || e.getMember().getRoles().get(0).getName().equals(e.getGuild().getRoles().get(1).getName()))) {\n\t\t\tfuncao.atribuirCargos();\n\t\t}else if(message.startsWith(\"'setNumEpics \") && (e.getMember().getRoles().get(0).getName().equals(e.getGuild().getRoles().get(0).getName()) || e.getMember().getRoles().get(0).getName().equals(e.getGuild().getRoles().get(1).getName()))) {\n\t\t\tfuncao.setNumEpics();\n\t\t}else if(message.startsWith(\"'setNumRares \") && (e.getMember().getRoles().get(0).getName().equals(e.getGuild().getRoles().get(0).getName()) || e.getMember().getRoles().get(0).getName().equals(e.getGuild().getRoles().get(1).getName()))) {\n\t\t\tfuncao.setNumRares();\n\t\t}\n\t}", "private static String receiveInput(String message) {\n BufferedReader buffyTheVampireSlayer = new BufferedReader(new InputStreamReader(System.in));\n try {\n System.out.printf(\"%s: \", message);\n return buffyTheVampireSlayer.readLine();\n } catch (IOException e) {\n System.out.println(e);\n System.out.println(\"an unexpected error occured\");\n return null;\n }\n }", "@Override\n public void channelRead(ChannelHandlerContext ctx, Object msg) {\n try {\n // The incoming message should have been transformed to a CorfuMsg earlier in the pipeline.\n CorfuMsg m = ((CorfuMsg) msg);\n // We get the handler for this message from the map\n AbstractServer handler = handlerMap.get(m.getMsgType());\n if (handler == null) {\n // The message was unregistered, we are dropping it.\n log.warn(\"Received unregistered message {}, dropping\", m);\n } else {\n if (validateEpoch(m, ctx)) {\n // Route the message to the handler.\n log.trace(\"Message routed to {}: {}\", handler.getClass().getSimpleName(), msg);\n handlerWorkers.submit(() -> handler.handleMessage(m, ctx, this));\n }\n }\n } catch (Exception e) {\n log.error(\"Exception during read!\", e);\n }\n }", "void receiveFromServer(PlayerMessage playerMessage) throws RemoteException;", "private void listen() {\n\t\tString message;\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\tmessage = input.readLine();\n\t\t\t\tif (message == null) continue;\n\n\t\t\t\tif(message.equals(\"disconnect\")){\n\t\t\t\t\tThread t = new Thread(this::disconnect);\n\t\t\t\t\tt.start();\n\t\t\t\t\treturn;\n\t\t\t\t} else if(message.contains(\"PUSH\")) {\n\t\t\t\t\tparseMessage(message);\n\t\t\t\t} else if (message.equals(\"pong\")){\n\t\t\t\t\tponged = true;\n\t\t\t\t} else if(!validResponse) {\n\t\t\t\t\tsynchronized (this) {\n\t\t\t\t\t\tresponse = message;\n\t\t\t\t\t\tvalidResponse = true;\n\t\t\t\t\t\tnotifyAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} catch (IOException e) {\n\t\t\t\tThread t = new Thread(this::disconnect);\n\t\t\t\tt.start();\n\t\t\t\ttry {\n\t\t\t\t\tt.join();\n\t\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tsynchronized (this) {\n\t\t\t\t\tresponse = null;\n\t\t\t\t\tvalidResponse = true;\n\t\t\t\t\tnotifyAll();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public void start() {\n try {\n Socket socket = new Socket(conf.getServerIp(), conf.getServerPort());\n\n java.io.InputStream is = socket.getInputStream();\n BufferedReader reader = new BufferedReader(new java.io.InputStreamReader(is));\n\n readerThread = new MessageReader(reader);\n new Thread(readerThread).start();\n\n java.io.OutputStream os = socket.getOutputStream();\n PrintWriter writer = new PrintWriter(os);\n writerThread = new MessageWriter(writer);\n new Thread(writerThread).start();\n\n while (serverMessages.empty()) {\n //Do nothing\n }\n\n ServerMessage serverMessage = serverMessages.pop();\n if (!serverMessage.getMessageType().equals(ServerMessage.MessageType.HELO)) {\n System.out.println(\"Expecting a HELO message but received: \" + serverMessage.toString());\n } else {\n System.out.println(\"Please fill in your username: \");\n Scanner scanner = new Scanner(System.in);\n String username = scanner.nextLine();\n\n\n ClientMessage heloMessage = new ClientMessage(ClientMessage.MessageType.HELO, username);\n clientMessages.push(heloMessage);\n\n while (serverMessages.empty()) {\n }\n\n\n isConnected = validateServerMessage(heloMessage, serverMessages.pop());\n if (!isConnected) {\n System.out.println(\"Error logging into server\");\n } else {\n System.out.println(\"Successfully connected to server.\");\n System.out.println(\"(Type '/quit' to close connection and stop application.)\");\n System.out.println(\"Type a broadcast message: \");\n nonblockReader = new NonblockingBufferedReader(new BufferedReader(new java.io.InputStreamReader(System.in)));\n\n\n while (isConnected) {\n String line = nonblockReader.readLine();\n if (line != null) {\n ClientMessage clientMessage;\n if (line.equals(\"/quit\")) {\n clientMessage = new ClientMessage(ClientMessage.MessageType.QUIT, username + \" left the server\");\n isConnected = false;\n\n Thread.sleep(500L);\n } else if (line.startsWith(\"/msg\") && line.split(\" \").length > 1) {\n //Split the message first\n String[] splittedline = line.split(\" \");\n String senderUsername = splittedline[1].toLowerCase();\n\n if (!senderUsername.equalsIgnoreCase(username)) {\n line = line.replace(\"/msg \" + splittedline[1] + \" \", \"\");\n\n //Check if we have an encryptionsession with the user or not\n if (encryptionSessionHashMap.containsKey(senderUsername)) {\n //We have an encryptionsession, so we can just send the message\n String encryptedLine = encryptionSessionHashMap.get(senderUsername).encryptMessage(line);\n clientMessage = new ClientMessage(ClientMessage.MessageType.ENCR, senderUsername + \" \" + encryptedLine);\n System.out.println(\"(You -> \" + senderUsername + \"): \" + line);\n } else {\n //We don't have an encryptionsession yet, so we create one\n EncryptionSession encryptionSession = new EncryptionSession();\n encryptionSessionHashMap.put(senderUsername, encryptionSession);\n clientMessage = new ClientMessage(ClientMessage.MessageType.KEYS, senderUsername + \" \" + encryptionSession.getPublicKey());\n savedMessage.put(senderUsername, line);\n }\n } else {\n System.out.println(\"You cannot send a message to yourself\");\n clientMessage = null;\n }\n } else if (line.startsWith(\"/file\") && line.split(\" \").length == 3) {\n //Split the message first\n String[] splitLine = line.split(\" \");\n String senderUsername = splitLine[1].toLowerCase();\n\n if (!senderUsername.equalsIgnoreCase(username)) {\n String fileBase64String = new FileTransfer(splitLine[2], senderUsername).sendFile();\n clientMessage = new ClientMessage(ClientMessage.MessageType.FILE, fileBase64String);\n System.out.println(\"You have send \" + splitLine[2] + \" to \" + senderUsername);\n } else {\n System.out.println(\"You cannot send a file to yourself\");\n clientMessage = null;\n }\n\n } else {\n clientMessage = new ClientMessage(ClientMessage.MessageType.BCST, line);\n System.out.println(line);\n }\n\n if (clientMessage != null) {\n clientMessages.push(clientMessage);\n }\n }\n if (!serverMessages.empty()) {\n ServerMessage received = serverMessages.pop();\n\n\n if (received.getMessageType().equals(ServerMessage.MessageType.BCST)) {\n System.out.println(received.getPayload());\n }\n\n //Check if we received an encrypted message\n else if (received.getMessageType().equals(ServerMessage.MessageType.ENCR)) {\n //Split the message first\n String[] splitMessage = received.getPayload().split(\" \");\n String sender = splitMessage[0].toLowerCase();\n String encryptedMessage = splitMessage[1];\n\n //If we have a session with this user, we can decrypt the message\n if (encryptionSessionHashMap.containsKey(sender)) {\n System.out.println(\"(\" + sender + \" -> You): \" + encryptionSessionHashMap.get(sender).decryptMessage(encryptedMessage));\n }\n }\n\n //If this is the first time, we have to share keys\n else if (received.getMessageType().equals(ServerMessage.MessageType.KEYS)) {\n //Split the message first\n String[] splitMessage = received.getPayload().split(\" \");\n String sender = splitMessage[0].toLowerCase();\n String encryptedKey = splitMessage[1];\n\n //Check if we send the first message or not\n if (encryptionSessionHashMap.containsKey(sender)) {\n encryptionSessionHashMap.get(sender).decryptKey(encryptedKey);\n\n //After saving the aes key, we have to resend our first message\n String msg = savedMessage.get(sender);\n if (msg != null) {\n String encryptedLine = encryptionSessionHashMap.get(sender).encryptMessage(msg);\n ClientMessage responseMessage = new ClientMessage(ClientMessage.MessageType.ENCR, sender + \" \" + encryptedLine);\n clientMessages.push(responseMessage);\n System.out.println(\"(You -> \" + sender + \"): \" + msg);\n savedMessage.remove(sender);\n }\n }\n\n //We send our aes key when we didn't send the message first\n else {\n EncryptionSession encryptionSession = new EncryptionSession();\n encryptionSessionHashMap.put(sender, encryptionSession);\n String aesKey = encryptionSession.encryptKey(encryptedKey);\n\n ClientMessage responseMessage = new ClientMessage(ClientMessage.MessageType.KEYS, sender + \" \" + aesKey);\n clientMessages.push(responseMessage);\n }\n }\n\n //Check if the message is a file\n else if (received.getMessageType().equals(ServerMessage.MessageType.FILE)) {\n String[] splitMessage = received.getPayload().split(\" \");\n String sender = splitMessage[0].toLowerCase();\n String base64String = splitMessage[2];\n\n new FileTransfer(base64String, splitMessage[0], true).readFile();\n System.out.println(\"You have received \" + splitMessage[1] + \" from \" + sender);\n }\n }\n }\n }\n\n disconnect();\n System.out.println(\"Client disconnected!\");\n }\n } catch (IOException e) {\n System.out.println(\"Ouch! Could not connect to server!\");\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void OnMessageReceived(String msg);", "@Override\n protected void managedInputMessage(String message) throws IOException, ClassNotFoundException {\n Message objectResponse;\n try {\n objectResponse = (Message) ois.readObject();\n //System.out.println(\"(\" + ourNode.getName() + \") Object response from \" + connectedNode.getName() + \": \" + objectResponse.getSrc());\n callback.onMessageReceived(objectResponse);\n } catch (Exception e) {\n System.err.println(\"Excepcio en la lectura de l'objecte!\");\n e.printStackTrace();\n }\n }", "void handleMessage(String message){\n\t\tString[] parts = message.split(\" \");\n\t\tboolean prevFor = false;\n//\t\tSystem.out.println(\"parts0 = \" + parts[0]);\n\t\tswitch(parts[0]){\n\t\t\tcase \"#quit\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#quit\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#stop\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#stop\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#close\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#close\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#setport\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#setport\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + parts[1]);\n\t\t\t\tbreak;\n\t\t\tcase \"#getport\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#getport\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#start\":\n\t\t\t\tclient.handleMessageFromClientUI(\"#start\" + \"---\" + client.getUID() + \"---\" + \" \" + \"---\" + \" \");\n\t\t\t\tbreak;\n\t\t\tcase \"#block\":\n\t\t\t\tif(parts.length>1){\n\t\t\t\t\tclient.handleMessageFromClientUI(\"#block\" + \"---\" + client.getUID() + \"---\" + parts[1] + \"---\" + \" \");\t//this sends the info to the server to check if it's a valid user_id\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"You haven't specified a user to block!\");\n\t\t\t\tbreak;\n\t\t\tcase \"#unblock\":\n\t\t\t\tif(parts.length>0){\n\t\t\t\t\tclient.handleMessageFromClientUI(\"#unblock\" + \"---\" + client.getUID() + \"---\" + parts[1] + \"---\" + \" \");\t//this sends the info to the server to check if it's a valid user_id\n\t\t\t\t\t\t\t//this also needs to be sent to server to send to all consoles to update block lists\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"#whoiblock\":\t\t//simply prints out the arraylist of users that i block\n\t\t\t\tif(blockedList.size()>0){\n\t\t\t\t\tSystem.out.print(\"The list of people you block is: \");\n\t\t\t\t\tfor(int i=0;i<blockedList.size();i++){\n\t\t\t\t\t\tSystem.out.print(blockedList.get(i)+\", \");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"You are not blocking any users\");\n\t\t\t\tbreak;\n\t\t\tcase \"#whoblocksme\":\t//simply prints out the arraylist of users that block me\n\t\t\t\tif(whoBlocksMe.size()>0){\n\t\t\t\t\tSystem.out.print(\"The list of people who block me is: \");\n\t\t\t\t\tfor(int i=0;i<whoBlocksMe.size();i++){\n\t\t\t\t\t\tSystem.out.print(whoBlocksMe.get(i)+\", \");\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\telse System.out.println(\"There are no users that are blocking you\");\n\t\t\t\tbreak;\n\t\t\tcase \"#startforwarding\":\n\t\t\t\tprevFor = false;\n\t\t\t\ttry {\n\t\t\t\t\tif(whoIForward.size()>0) {\n\t\t\t\t\t\tfor(int i=0; i<whoIForward.size(); i++){\n\t\t\t\t\t\t\tif(parts[1].equals(whoIForward.get(i))) prevFor = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!prevFor) {\n\t\t\t\t\t\t\twhoIForward.add(parts[1]);\n\t\t\t\t\t\t\tSystem.out.println(\"You are now forwarding to user: \"+parts[1]);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse System.out.println(\"You are already forwarding to that user!\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twhoIForward.add(parts[1]);\n\t\t\t\t\t\tSystem.out.println(\"You are now forwarding all messages to user: \"+parts[1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tSystem.out.println(\"You need to specify a user to forward to!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"cancelforwarding\":\n\t\t\t\tprevFor = false;\n\t\t\t\ttry {\n\t\t\t\t\tif(whoIForward.size()>0){\n\t\t\t\t\t\tfor(int i=0; i<whoIForward.size(); i++){\n\t\t\t\t\t\t\tif(parts[1].equals(whoIForward.get(i))){\n\t\t\t\t\t\t\t\tprevFor = true;\n\t\t\t\t\t\t\t\twhoIForward.remove(i);\n\t\t\t\t\t\t\t\tSystem.out.println(\"You are no longer forwarding to user: \"+parts[1]);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!prevFor){\n\t\t\t\t\t\t\tSystem.out.println(\"You were not forwarding to that user!\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse System.out.println(\"You are not currently forwarding to anyone and connot stop forwarding to this user\");\n\t\t\t\t}\n\t\t\t\tcatch(ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tSystem.out.println(\"You need to specify a user to stop forwarding to!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"#private\":\n\t\t\t\tString[] messageArray = Arrays.copyOfRange(parts, 2, parts.length);\n\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\tfor (String value : messageArray) {\n\t\t\t\t builder.append(value + \" \");\n\t\t\t\t}\n\t\t\t\tString messageToSend = builder.toString();\n\t\t\t\tclient.handleMessageFromClientUI(\"#private\" + \"---\" + client.getUID() + \"---\" + parts[1] + \"---\" + messageToSend);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault: client.handleMessageFromClientUI(\" \" + \"---\" + client.getUID() + \"---\" + \"*\" + \"---\" + message);\n\t\t}\n\t}", "@Override\n public void onGuildMessageReceived(@NotNull GuildMessageReceivedEvent event) {\n if (event.getAuthor().isBot()) { // ignore other bots and ourselves too\n return;\n }\n\n String[] args = event.getMessage().getContentRaw().split(\"\\\\s+\");\n\n if (args[0].startsWith(CommandHandler.prefix)) { // Check if prefix is correct\n Molly.logger.info(\"User \" + event.getAuthor().getName() + \" tried to invoke \" + args[0].substring(1).toLowerCase());\n switch (args[0].substring(1).toLowerCase()) {\n case \"info\":\n new Info(args, event).run();\n break;\n case \"summon\":\n new Summon(args, event).run();\n break;\n case \"ping\":\n new Pong(args, event).run();\n break;\n case \"sad\":\n new Sad(args, event).run();\n break;\n case \"annoy\":\n new Annoy(args, event).run();\n break;\n case \"say\":\n new Say(args, event).run();\n break;\n default:\n event.getChannel().sendMessage(\"I don't know this command. Type ** \" + CommandHandler.prefix + \"info** for a list of all commands.\").queue();\n }\n }\n }", "void onReceive(Message message) throws IOException {\n server.onReceive(message);\n }", "@Override\r\n public void handleMessage(Message msg) {\n }", "private void receiveClientMessage() throws IOException {\n mRemoteClientMessage = lengthValueRead(in, ClientMessage.class);\n \n if (mRemoteClientMessage == null) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Remote client message was not received.\");\n throw new IOException(\"Remote client message not received.\");\n }\n\n if (mRemoteClientMessage.messages == null) {\n setExchangeStatus(Status.ERROR);\n setErrorMessage(\"Remote client messages field was null\");\n throw new IOException(\"Remote client messages field was null\");\n }\n\n mMessagesReceived = mRemoteClientMessage.messages;\n }", "private void parseMessages() {\n\n // Find the first delimiter in the buffer\n int inx = rx_buffer.indexOf(DELIMITER);\n\n // If there is none, exit\n if (inx == -1)\n return;\n\n // Get the complete message\n String s = rx_buffer.substring(0, inx);\n\n // Remove the message from the buffer\n rx_buffer = rx_buffer.substring(inx + 1);\n\n // Send to read handler\n sendToReadHandler(s);\n\n // Look for more complete messages\n parseMessages();\n }", "protected Object readMessage(InputStream inputStream) throws IOException{\n PushbackInputStream pin = (PushbackInputStream)inputStream;\n StringBuffer buf = new StringBuffer();\n \n boolean lineStartsWithPrompt = false;\n while (true){\n int b = pin.read();\n \n if (b < 0){\n if (buf.length() == 0) // Clean disconnection\n return null;\n break;\n }\n \n // End of line\n if (b == '\\n'){\n // FICS uses \\n\\r for an end-of-line marker!?\n // Eat the following '\\r', if there is one\n b = pin.read();\n if ((b > 0) && (b != '\\r'))\n pin.unread(b);\n \n // Ignore all-prompt lines\n if (lineStartsWithPrompt && (buf.length() == 0)){\n lineStartsWithPrompt = false;\n continue;\n }\n else\n break;\n }\n \n buf.append((char)b);\n \n // Filter out the prompt\n if (buf.toString().equals(\"fics% \")){\n buf.setLength(0);\n lineStartsWithPrompt = true;\n }\n }\n \n return buf.toString();\n }", "private Message onMessageReceived(String message, DecentSocket origin) {\n\t\tGson gson = new Gson();\n\t\tJsonObject messageObj = JsonParser.parseString(message).getAsJsonObject();\n\t\t//Timestamp member required for all messages\n\t\tif(messageObj.has(\"timestamp\")) {\n\t\t\tString type = messageObj.get(\"type\").getAsString();\n\t\t\tswitch(type) {\n\t\t\t\tcase \"chat\":\n\t\t\t\t\tchatMessageCallback.apply(gson.fromJson(message, ChatMessage.class), origin);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"peerAsk\":\n\t\t\t\t\treturn onPeerAskMessageReceived(gson.fromJson(message, PeerAskMessage.class), origin);\n\t\t\t\tcase \"peers\":\n\t\t\t\t\treturn onPeersMessageReceived(gson.fromJson(message, PeersMessage.class), origin);\n\t\t\t\tcase \"ping\":\n\t\t\t\t\treturn onPingMessageReceived(gson.fromJson(message, PingMessage.class), origin);\n\t\t\t\tcase \"pong\":\n\t\t\t\t\treturn onPongMessageReceived(gson.fromJson(message, PongMessage.class), origin);\n\t\t\t\tcase \"historyAsk\":\n\t\t\t\t\treturn onHistoryAskMessageReceived(gson.fromJson(message, HistoryAskMessage.class), origin);\n\t\t\t\tcase \"history\":\n\t\t\t\t\treturn onHistoryMessageReceived(gson.fromJson(message, HistoryMessage.class), origin);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}" ]
[ "0.68083644", "0.67547965", "0.67227525", "0.67125314", "0.6669955", "0.6632236", "0.65245366", "0.6522857", "0.6521792", "0.64956796", "0.6337857", "0.63193125", "0.6315533", "0.6312637", "0.6312472", "0.6286723", "0.6283068", "0.6263801", "0.6258521", "0.6247235", "0.6236915", "0.62337106", "0.62202674", "0.6218057", "0.6216536", "0.61836356", "0.61791426", "0.6170582", "0.61676514", "0.61648446", "0.6157193", "0.6152108", "0.614949", "0.6148531", "0.61407495", "0.61340034", "0.61076266", "0.61066085", "0.60971886", "0.6092737", "0.60874426", "0.6082208", "0.6077323", "0.60690475", "0.60518855", "0.6032562", "0.6029056", "0.6019598", "0.60171545", "0.6013965", "0.6006924", "0.60053074", "0.600508", "0.60040766", "0.6001144", "0.59995013", "0.5997253", "0.5981681", "0.5976361", "0.59697515", "0.5961996", "0.596197", "0.59600013", "0.59591055", "0.5954628", "0.5950621", "0.5946879", "0.59462976", "0.59339726", "0.59326917", "0.5929659", "0.5928508", "0.5924236", "0.5923819", "0.5921676", "0.5919681", "0.5918689", "0.59148014", "0.5914595", "0.59142035", "0.5904094", "0.590289", "0.5891656", "0.58915573", "0.5890193", "0.5885222", "0.5880861", "0.58742046", "0.58690894", "0.58686304", "0.5865794", "0.5860813", "0.58563954", "0.5854161", "0.5848418", "0.5848078", "0.5840337", "0.58392256", "0.5834991", "0.5828985", "0.5828274" ]
0.0
-1
Server sends message to the bot
@Override public void sendMessage(String message) { if("YOURMOVE".equals(message)) { makeMove(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void send(String message);", "public void send(Message msg);", "public void sendMessage(String message) {}", "public void sendMessage(String message);", "private void sendMessage(String message){\n\t\ttry{\n\t\t\toutput.writeObject(\"Punk Ass Server: \" + message);\n\t\t\toutput.flush();\n\t\t\tshowMessage(\"\\nPunk Ass Server: \" + message); \n\t\t}catch(IOException ioe){\n\t\t\tchatWindow.append(\"\\n Message not sent, try again or typing something else\");\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic void sendMessage(String message) {\n\t\t\r\n\t}", "void sendMessage(String msg);", "public void sendMessage(String message) {\n\t\tSystem.out.println(\"DEBUG : response sent by server = \" + message);\n\t\tprinter.println(message);\n\t}", "public void sendMessage(String msg, int client) throws Exception{\n \tlastMessageSent = new String(msg);\n \tif(client == Constants.ROBOT){\n \t\trobotHandler.sendMessage(msg);\n \t} else {\n \t\tHumanClientHandler.sendMessage(msg);\n \t}\n }", "public void sendMessage(NetMessage message) {\n ClientDirector.getDataManager().sendMessage(message);\n }", "public void sendMessage(Message msg) {\n network.sendAsync(msg);\n }", "public void action(BotInstance bot, Message message);", "public void sendMessage(String message){\n pw.print(message);\n pw.flush();\n }", "protected void sendMessage(final String message) {\n\n logger.debug(LOG_TAG + \".sendMessage()\");\n\n // send message to client\n printWriter.println(message);\n\n }", "public void sendMessage(String msg) {\n\t\tplayer.sendMessage(msg);\n\t}", "void messageSent();", "public void serverSendMessageToUser(String username, String message) {\r\n \t\tServerCommand serverCommand = new PrivateMessageServerCommand(message, \"server\", username, null);\r\n \r\n \t\tRoMClient userClient = this.clients.getClientByUsername(username);\r\n \r\n \t\tthis.sendCommandToClient(userClient, serverCommand);\r\n \t}", "@Override\r\n\tpublic void sendMessage(String message) {\n\t\tmediator.send(message, this);\r\n\t}", "private void sendMessage(String message){\n PostTask pt = new PostTask();\n pt.execute();\n }", "public void sendMessage(String message) {\n try {\n bos.write(message);\n bos.newLine();\n bos.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void send(String msg) {\n CompletableFuture.runAsync(() -> serverCon.send(msg));\n }", "@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}", "void sendMessage() {\n\n\t}", "@Override\n\tpublic void sendMessage() {\n\t\t\n\t}", "public void sendMessage ( String message ) {\n\t\texecute ( handle -> handle.sendMessage ( message ) );\n\t}", "@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }", "void sendMessage(String message) {\n writer.println(message);\n }", "public void send(String message) {\r\n String command;\r\n if ( !message.startsWith(\"/\") || message.length() == 1 || message.startsWith(\"/ \")) {\r\n command = \"MESG\" + \" \" + message;\r\n } else {\r\n StringTokenizer tokens = new StringTokenizer(message);\r\n command = tokens.nextToken(\"/\").toUpperCase();\r\n if (command.equals(\"MESG\") && tokens.hasMoreTokens()) {\r\n command = command + \" \" + tokens.nextToken(\"\\n\").trim();\r\n } else {\r\n while (tokens.hasMoreTokens()) {\r\n command = command + \" \" + tokens.nextToken(\" \\n\");\r\n }\r\n }\r\n }\r\n if (out != null) {\r\n out.println(command);\r\n } else {\r\n keepGoing = false;\r\n finalize();\r\n }\r\n }", "public void sendMessage(String message) {\n\t\tsocketTextOut.println(message);\n\t\tsocketTextOut.flush();\n\t}", "public void sendMessage(String message){\n\t if (mOut != null && !mOut.checkError()) {\n\t mOut.println(message+\"\\n\");\n\t mOut.flush();\n\t }\n\t }", "public static void sendMessage(String message) {\r\n\t\tbtService.write(message.getBytes());\r\n\t}", "public void sendMessage(String message) {\n\t\tif (!connectionActive()) {\n\t\t\tthrow new IllegalOperationException(\"Cannot send a message if you are not connected to a server!\\n\");\n\t\t}\n\t\tMessage bctMessage = Message.makeBroadcastMessage(userName, message);\n\t\tsocketConnection.print(bctMessage);\n\t}", "private void sendTextMessage(String message) {\n if ( message == null || message.length() < 1 ) {\n return;\n }\n DateFormat localDateFormat = Constant.getServerDateFormat();\n Chat chat = new Chat(0,tournamentID,clubID,receiverID, selfID,self.getDisplayName(),\n Constant.MESSAGE_TYPE_TEXT,message,localDateFormat.format(new Date()));\n RequestAction actionPostChatText = new RequestAction() {\n @Override\n public void actOnPre() {\n et_message.setText(\"\");\n }\n\n @Override\n public void actOnPost(int responseCode, String response) {\n if ( responseCode == 201 ) {\n Log.d(TAG,\"Message sent successfully!\");\n }\n }\n };\n String url;\n if ( tournament != null ) { // tournament chat\n url = UrlHelper.urlChatByTournament(tournament.id,club.id);\n } else if ( club != null ) {// club chat\n url = UrlHelper.urlChatByClub(club.id);\n } else if ( receiver != null ) { // private chat\n url = UrlHelper.urlPrivateChat(receiver.getId());\n } else {\n Toast.makeText(getContext(), \"Unknown error!\", Toast.LENGTH_SHORT).show();\n Log.e(TAG,\"Unspecified chat type.\");\n return;\n }\n RequestHelper.sendPostRequest(url,chat.toJson(),actionPostChatText);\n }", "public void sendTextMessage(String message) {\n\t\ttry {\n\t\t\tJsonPacket requestBodyPacket = new JsonPacket();\n\t\t\trequestBodyPacket.put(\"content\", message);\n\t\t\trequestBodyPacket.put(\"tts\", false);\n\n\t\t\tURL url = new URL(this.channelURL);\n\t\t\tHttpsURLConnection connection = (HttpsURLConnection) url.openConnection();\n\n\t\t\tconnection.setDoOutput(true);\n\t\t\tconnection.setDoInput(true);\n\t\t\tconnection.setRequestMethod(\"POST\");\n\t\t\tconnection.setRequestProperty(\"Authorization\", String.format(\"Bot %s\", this.api.getToken()));\n\t\t\tconnection.setRequestProperty(\"User-Agent\", \"Kiyobot\");\n\t\t\tconnection.setRequestProperty(\"Content-Type\", \"application/json\");\n\n\t\t\tOutputStream outstream = connection.getOutputStream();\n\t\t\toutstream.write(requestBodyPacket.toString().getBytes());\n\t\t\toutstream.flush();\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t\t\tLOGGER.trace(String.format(\"Sent message %s\", reader.readLine()));\n\t\t\treader.close();\n\t\t\toutstream.close();\n\t\t} catch (MalformedURLException mue) {\n\t\t\tLOGGER.error(\"Malformed URL, {},\\n{}\", mue.getMessage(), mue.getStackTrace());\n\t\t} catch (IOException ioe) {\n\t\t\tLOGGER.error(\"An error occurred when trying to connect to the url, {},\\n{}\", ioe.getMessage(), ioe.getStackTrace());\n\t\t}\n\t}", "public void sendMsg(Message msg){\n messagesParser.sendMsg(msg);\n }", "public static void sendMessage(String message) {\n getBwapi().sendText(message);\n }", "@Override\n\tpublic void send(String msg) {\n\t}", "void send(WebhookMessage msg);", "private void sendMessage(String message) {\n\t\tMainstarter.meClient.sendMessage(new MessageSend(message, Mainstarter.meClient));\n\t\ttextInputMessage.clear();\n\t}", "public void sendChat(String message) {\r\n connection.chat(message);\r\n }", "public void sendMessage()\r\n {\r\n MessageScreen messageScreen = new MessageScreen(_lastMessageSent);\r\n pushScreen(messageScreen);\r\n }", "public void sendMessage(ChatMessage msg) {\n try{\n loginOutput.writeObject(msg);\n }\n catch(IOException e){\n display(\"Exception on send message to server: \" + e);\n }\n }", "private void sendMessage() throws Exception {\n\t\tGetTimestamp(\"Sending Message: \");\n\t\tString inputMessage;\n\t\tinputMessage = input.nextLine();\n\t\tString tosend = encrypt(clientkey, inputMessage);\n\t\t\n\t\tJSONObject RESPONSE = new JSONObject();\n\t\tRESPONSE.put(\"payload\",tosend);\n\t\tSystem.out.println(RESPONSE);\n\t\t\n\t\tpw.println(tosend);\n\t\tpw.flush();\n\t\tSystem.out.println(\"Message sent to the client : \" + inputMessage);\n\t\tif (inputMessage.equalsIgnoreCase(\"bye\")) {\n\t\t\tSystem.out.println(\"sending close command\");\n\t\t\tcloseConnection();\n\t\t} else {\n\t\t\tgetMessage();\n\t\t}\n\t}", "public void sendChat(String message) {\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch \"+message);\n\t}", "void sendRequest(String message);", "public void tellServer(String message)\n\t{\n\t\ttoServer.println(message);\n\t\ttoServer.flush();\n\t}", "public void sendMessage(String msg) {\n\n if (msg != null && !msg.isEmpty()) {\n\n RestResponse.BotMessage botMessage = new RestResponse.BotMessage(msg);\n\n RestResponse.BotPayLoad botPayLoad = new RestResponse.BotPayLoad();\n botPayLoad.setMessage(botMessage);\n\n Gson gson = new Gson();\n String jsonPayload = gson.toJson(botPayLoad);\n\n BotRequestPool.getBotRequestStringArrayList().add(jsonPayload);\n }\n\n if (!BotRequestPool.isPoolEmpty()) {\n if (!BotRequestPool.getBotRequestStringArrayList().isEmpty()) {\n ArrayList<String> botRequestStringArrayList = BotRequestPool.getBotRequestStringArrayList();\n int len = botRequestStringArrayList.size();\n for (int i = 0; i < len; i++) {\n String botRequestPayload = botRequestStringArrayList.get(i);\n boolean wasSuccessfullySend = SocketWrapper.getInstance(mContext).sendMessage(botRequestPayload);\n if (wasSuccessfullySend) {\n BotRequestPool.getBotRequestStringArrayList().remove(botRequestPayload);\n i--; //reset the parameter\n len--; //reset the length.\n } else {\n break;//Break the loop, as re-connection would be attempted from sendMessage(...)\n }\n }\n }\n }\n }", "void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Não foi possível enviar a mesagem !!!\");\n\t\t}\n\t}", "public void sendMessage(String message)\n\t\t{\n\t\t\twriter.println(message);\n\t\t\twriter.flush();\n\t\t}", "public void send() {\n\t}", "public void sendChat(String client, String message) {\n\t\t//enqueue(\"PRIVMSG #\"+myself+\" :.w \"+client + \" imGlitch \" + message); //whisper\n\t\tenqueue(\"PRIVMSG #\"+Executable.targetChannel+\" :imGlitch (@\"+client + \") \" + message);\n\t}", "@Override\n\tpublic void SendMessage(String message) {\n\t\t\n\t\ttry\n\t\t{\n\t\tprintWriters.get(clients.get(0)).println(message);\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\n\t}", "@Override\n public void sendMessage(Message m) {\n commSender.sendMessage(m);\n }", "public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }", "void message(String response, GameChatEvent cause) throws InterruptedException, IOException;", "public void sendMessage(ChatMessage msg) {\n\t\ttry {\n\t\t\tsOutput.writeObject(msg);\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tdisplay(\"Exception writing to server: \" + e);\n\t\t}\n\t}", "public void clientToServerChatMessage(String message){\n String chatMessage = message;\n System.out.println(\"chatmessage\" + chatID + \" \" + chatMessage);\n toServer.println(\"chatmessage\" + chatID + \" \" + chatMessage);\n toServer.flush();\n }", "public void sendMessage(String msg) {\n try {\n out.write(msg);\n out.newLine();\n out.flush();\n \n } catch (IOException e) {\n \tshutdown();\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void Send(String message) {\n\t\tgetReceiveArea().append(\"我:\"+message + \"\\n\");\n\t\tgetMediator().sendMessage(getName(), message);\n\t}", "public void sendToServer(Message message){\n\t\ttry {\n\t\t\tSystem.out.println(message._sender+\" to \"+message._receiver+\": \"+message._message);\n\t\t\tFileUtils.writeLineInFile(message._sender+\" to \"+message._receiver+\": \"+message._message, new File(FileUtils.getSettingsProperty(\"path\")+\"/chatlog.txt\"));\n\t\t\t_outputStream.writeObject(message);\n\t\t\t_main._clientMenuController.updateChatlog();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void sendMessage(String message) {\n\t\ttry {\n\t\t\tout.writeUTF(message);\n\t\t\tserver.CommunicationLog.info(\"Sent:\" + message + \" to \" + clientSocket.getInetAddress().toString());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void sendMessage(Message<JsonPayload> message) throws IOException {\n System.out.println(\"Trying to send a message...\");\n outputMessageStream.write(message.getContent().getJson());\n outputMessageStream.newLine();\n outputMessageStream.flush();\n socket.shutdownOutput();\n }", "private void sendMessage(CommandSender p, String msg) {\n\t\tif (p instanceof Player) {\n\t\t\tif (!((Player) p).isOnline()) return;\n\t\t}\n\t\t_.msg(p, GameMode.Sonic, msg);\n\t}", "private static void postMessageAndLog(MessageChannel chan, String message){\n chan.sendMessage(message).queue();\n if(Config.debug){\n System.out.println(\"<\" + Config.bot_name + \"> \" + message);\n }\n }", "private void sendMessage(String content, String room) {\n }", "protected void sendMessage(String msg) {\n message = msg; \n newMessage = true;\n }", "private void sendMessage(String message){\n try{\n output.writeObject(nickname+\" : \" + message);\n output.flush();\n showMessage(\"\\n\"+nickname+\" : \" + message);\n }catch(IOException ioException){\n chatWindow.append(\"\\n Oops! Something went wrong!\");\n }\n }", "Boolean sendMsg(String token, Long chatSessionId, String Content);", "void send();", "public static void Send(Message message)\n\t{\n\t\ttry\n\t\t{\n\t\t\t_sendBuf = toByteArray(message);\n\n\t\t\t//dc message\n\t\t\tif (message.getRecipient().equalsIgnoreCase(\"\") &&\n\t\t\t\tmessage.getMessage().equalsIgnoreCase(\"%BYE%\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent BYE\");\n\t\t\t\t_socket.getOutputStream().write(Message.BYE);\n\t\t\t}\n\t\t\t//lobby message\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent LOBBY\");\n\t\t\t\t_socket.getOutputStream().write(Message.LOBBY);\n\t\t\t}\n\t\t\t//search request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"all\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent SEARCH\");\n\t\t\t\t_socket.getOutputStream().write(Message.SEARCH);\n\t\t\t}\n\t\t\t//answer request\n\t\t\telse if (message.getRecipient().equalsIgnoreCase(\"server\") &&\n\t\t\t\t\t message.getOrigin().equalsIgnoreCase(\"none\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent CHOICE\");\n\t\t\t\t_socket.getOutputStream().write(Message.CHOICE);\n\t\t\t}\n\t\t\t//whisper message\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"sent WHISPER\");\n\t\t\t\t_socket.getOutputStream().write(Message.WHISPER);\n\t\t\t}\n\t\t\t_socket.getOutputStream().write(_sendBuf);\n\t\t\t_socket.getOutputStream().flush();\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic boolean send(String msg) {\n \ttry {\r\n \t\tsendMessage(msg);\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\treturn true;\r\n\t}", "private void sendMessageToClient(String message) {\n try {\n outputStream.writeObject(message);\n outputStream.flush();\n } catch (IOException e) {\n System.out.println(\"Erreur lors de l'envoi du message au client\");\n }\n }", "@Override\n public void send(String message) {\n\n out.println(message);\n out.flush();\n\n }", "public void sendMessageToClient(Object message, String username) {\n\n }", "void send(String message, String uri);", "public void messageSent(Message m) {\n\t\t\r\n\t}", "@OnMessage\r\n\tpublic void onMessage(String message) {\r\n\r\n\t\tSystem.out.println(\"Message from \" + session.getId() + \": \" + message);\r\n\t\tthis.sendClient(\"Message from server: session ID : \" + session.getId()\r\n\t\t\t\t+ \" you sent \" + message);\r\n\t\tEchoServer socket = this.sockets.get(message);\r\n\t\tif (socket != null) {\r\n\t\t\tsocket.sendClient(this.uniqueId + \" send to \" + socket.uniqueId\r\n\t\t\t\t\t+ \" a message\");\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"Invalid Message from \" + session.getId());\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * try { session.getBasicRemote().sendText(\r\n\t\t * \"Message from server: session ID : \" + session.getId() + \" you sent \"\r\n\t\t * + message); } catch (IOException ex) { ex.printStackTrace(); }\r\n\t\t */\r\n\t}", "private void sendMessage(ChatMessage msg) {\n try {\n sOutput.writeObject(msg);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n public void onClick(View v) {\n String msg = ed_msg.getText().toString();\r\n try {\r\n\t\t\t\t\tsend(HOST, PORT, msg.getBytes());\r\n\t\t\t\t\t\r\n\t \tmHandler.sendMessage(mHandler.obtainMessage()); \r\n\t \tcontent =HOST +\":\"+ msg +\"\\n\";\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n }", "public void sendHelloMessage() {\n getSocketController().send(getMessageController().createHelloMessage(\"Сервер\", getUser().getName()));\n }", "public void sendMessageToServer(String message) {\n if (outputStream != null) {\n outputStream.println(message);\n } else {\n System.out.println(\"No OutputStream!\");\n }\n }", "public abstract void sendMessage(String message);", "public void send(Message message) {\r\n channel.writeAndFlush(message);\r\n }", "public boolean Send(String message) {\r\n\t\t\r\n\t\t//Add a new line so it gets entered into the robot console \r\n\t\tmessage = message.concat(\"\\n\");\r\n\t\t\r\n\t\t//Construct ip address of Robot by team number \r\n\t\taddress = this.numberToAddress(NetConsole.window.getTeam());\r\n\t\t\r\n\t\t//deconstruct String into byte array \r\n\t\tbyte[] sendData = message.getBytes();\r\n\t\t\r\n\t\t//deconstruct packet for cleansing\r\n\t\tDatagramPacket packet = null;\r\n\t\t\r\n\t\t//reconstruct packet with default port \r\n\t\tpacket = new DatagramPacket(sendData, sendData.length, address, 6668);\r\n\t\ttry {\r\n\t\t\t//Send all the Packets!\r\n\t\t\tserverSocket.send(packet);\r\n\t\t} catch (IOException e) {\r\n\t\t\tNetConsole.window.error(\"Error Sending Packets\");\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t\t//Just in case we want to know if the proccess was successful\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t\r\n\t}", "public abstract void send(String message) throws IOException;", "public void sendMessage(Message message) {\n if (accepted || !ended || message.type.equals(\"register\") || message.type.equals(\"lobby\")) {\n message.packetNum = packetNum;\n ByteBuffer buffer = ByteBuffer.wrap(SerializationUtils.serialize(message));\n SocketAddress addr = null;\n try {\n addr = client.getLocalAddress();\n log(\"sending [\" + message + \"] to \" + addr);\n client.write(buffer);\n reconciliation.add(message);\n packetNum++;\n } catch (IOException e) {\n error(\"Failed to send message to:\" + addr);\n e.printStackTrace();\n }\n }\n }", "void sendMessage(String msg) {\n\t\ttry {\n\t\t\tout.writeObject(msg);\n\t\t\tout.flush();\n\t\t\tSystem.out.println(\"Sending to server => \" + msg);\n\t\t} catch (IOException ioException) {\n\t\t\tioException.printStackTrace();\n\t\t}\n\t}", "public static void sendToTelegram(String message) {\n bot.execute(new SendMessage(chatId,message));\n }", "public void sendMessage(String message) {\r\n\r\n synchronized (this) {\r\n //count++;\r\n if (mBufferOut != null && !mBufferOut.checkError()) {\r\n Log.i(TAG, \"message: \" + message);\r\n mBufferOut.print(message);\r\n mBufferOut.flush();\r\n }\r\n }\r\n }", "public void sendMessage(String message) {\r\n sendMessageAsByte(message.getBytes());\r\n }", "void messageSent(IMSession session, String messageId);", "public void sendMessage(String str) {\n\t\ttry {\n\t\t\tsession.getRemote().sendString(str);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void sendMessage(String message) {\n if (mApiClient != null && mQuizCastChannel != null) {\n try {\n Cast.CastApi.sendMessage(mApiClient,\n mQuizCastChannel.getNamespace(), message)\n .setResultCallback(new ResultCallback<Status>() {\n @Override\n public void onResult(Status result) {\n if (!result.isSuccess()) {\n Log.e(context.getString(R.string.LOGTAG), \"Sending message failed\");\n }\n }\n });\n } catch (Exception e) {\n Log.e(context.getString(R.string.LOGTAG), \"Exception while sending message\", e);\n }\n } else {\n Log.d(context.getString(R.string.LOGTAG), \"Sent message successfully\");\n Log.d(context.getString(R.string.LOGTAG), message);\n }\n }", "public void sendMessage(String message) {\n\n setChanged();\n notifyObservers(message);\n }", "public synchronized void send(String message) {\n writer.println(message);\n writer.flush();\n }", "private void sendMessage(String text)\n {\n Message msg = mHandler.obtainMessage();\n Bundle bundle = new Bundle();\n bundle.putString(\"text\",text);\n msg.setData(bundle);\n msg.what = 1;\n mHandler.sendMessage(msg);\n }", "private void send (String messageToSend) throws IOException {\n byte[] ba = messageToSend.getBytes();\n \n packetToSend = new DatagramPacket (ba, ba.length, serverIPAddress, PORT);\n \n //Envia el paquete por el socket.\n clientSocket.send(packetToSend);\n }", "private void sendMessage(WeakReference<Messenger> client, int msgCode, int requestCode, String message){\n \tLog.v(TAG,\"sendMessage: The message was: \" + message + \" (\" + msgCode + \")\" + \" requestCode was \" + requestCode);\n try {\n \t\tclient.get().send(Message.obtain(null, msgCode, requestCode, mState.ordinal(), message));\n } catch (RemoteException e) {\n // The client is dead. \n \t\tLog.e(TAG,\"sendMessage: The client is dead. Message was: \" + message + \" (\" + msgCode + \")\");\n } catch (NullPointerException e) {\n // The reply to client is does not exist. \n \t\tLog.e(TAG,\"sendMessage: client was null. Message was: \" + message + \" (\" + msgCode + \")\");\n }\n }", "public void sendMessage(GameMessage message) {\n\t\ttry {\n\t\t\toos.writeObject(message);\n\t\t} catch(Exception e) {\n\t\t\ttable.printMsg(\"Unable to send message to the server. Connection will be terminated.\");\n\t\t\ttable.printMsg(\"Try to Connect again.\");\n\t\t\ttry {\n\t\t\t\tsock.close();\n\t\t\t} catch(Exception ee) {\n\t\t\t\t// doing nothing\n\t\t\t}\n\t\t\tsock = null;\n\t\t\ttable.repaint();\n\t\t\tSystem.out.println(\"Unable to send message to the server.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void sendMessage(String msg) {\n Player player = RegionOwn.server.getPlayer(name);\n if (player != null) {\n player.sendMessage(msg);\n } else if (RegionOwn.pm.isPluginEnabled(\"TextPlayer\")) {\n User user = TextPlayer.findUser(name);\n user.sendText(\"Region Security System\", msg);\n }\n }", "public void broadcastmsg(String msg){\r\n Server.getUsers().forEach((user) -> {\r\n user.sendmsg(msg);\r\n });\r\n }" ]
[ "0.7300937", "0.72518444", "0.7222886", "0.72205454", "0.7171817", "0.7130298", "0.711346", "0.708167", "0.7042152", "0.700116", "0.697788", "0.6944942", "0.6943767", "0.6928294", "0.6901767", "0.68923134", "0.6892191", "0.6885085", "0.68849593", "0.6884278", "0.68798894", "0.68663245", "0.686046", "0.68498135", "0.68472445", "0.68458396", "0.68429375", "0.68215835", "0.68177474", "0.6815962", "0.6813367", "0.6804869", "0.6802383", "0.6782401", "0.67805856", "0.67795163", "0.6772365", "0.6763809", "0.6749187", "0.6748378", "0.6741603", "0.6738784", "0.67378426", "0.673781", "0.67276895", "0.67165804", "0.6697842", "0.66956556", "0.6687951", "0.66674876", "0.6660243", "0.66536367", "0.6647185", "0.66418064", "0.66401935", "0.66374964", "0.66309446", "0.6622713", "0.6609463", "0.66082996", "0.6604497", "0.6592849", "0.65922683", "0.6591087", "0.65904105", "0.6588731", "0.6588003", "0.6579148", "0.65752405", "0.6572613", "0.65644854", "0.65627146", "0.6557592", "0.65416425", "0.65393496", "0.65351534", "0.65343076", "0.6517428", "0.65143096", "0.6509447", "0.6509388", "0.6504054", "0.6498274", "0.649181", "0.6489602", "0.64756304", "0.646788", "0.6467094", "0.64657474", "0.64635956", "0.64620346", "0.6459524", "0.6457229", "0.64433247", "0.64338195", "0.6421769", "0.64176863", "0.64153725", "0.64128387", "0.64030683", "0.6401249" ]
0.0
-1
Bot plays a game. Makes some moves.
public void makeMove() { ArrayList<Field> myFields = new ArrayList<>(); for (Field[] fieldsRow : fields) { for (Field field : fieldsRow) { if(field != null && this.equals(field.getPlayer())) { myFields.add(field); } } } bestMove[0] = myFields.get(0); bestMove[1] = myFields.get(0); Random rand = new Random(); for(Field destination : destinationFields) { if(canMove()) break; destinationField = destination; for (Field origin : myFields) { for(int i = 0; i < origin.getNeighbours().length; ++i) { Field neighbour = origin.getNeighbours()[i]; if(neighbour != null) { if(neighbour.getPlayer() == null) { if(valueOfMove(origin, neighbour) > valueOfMove(bestMove[0], bestMove[1])) { bestMove[0] = origin; bestMove[1] = neighbour; } else if(valueOfMove(origin, neighbour) == valueOfMove(bestMove[0], bestMove[1])) { if(rand.nextBoolean()) { bestMove[0] = origin; bestMove[1] = neighbour; } } } else { Field nextField = neighbour.getNeighbours()[i]; if(nextField != null) { correctJumpPaths(origin,null, origin); } } } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void playTurn()\n {\n try\n {\n XMLHandler.saveGame(game, GAME_CLONE_PATH);\n }\n catch(IOException | JAXBException | SAXException ex)\n {\n // TODO... ConsoleUtils.message(\"An internal save error has occured, terminating current game\");\n gameEnded = true;\n return;\n }\n \n moveCycle();\n \n if (!game.validateGame()) \n {\n IllegalBoardPenalty();\n }\n \n String gameOverMessage = game.isGameOver();\n if (gameOverMessage != null) \n {\n //TODO: ConsoleUtils.message(gameOverMessage);\n gameEnded = true;\n }\n \n game.switchPlayer();\n }", "public final void playGame() {\n\t\tSystem.out.println(\"Welcome to \"+nameOfGame+\"!\");\n\t\tsetup(numberOfPlayers);\n\t\tfor(int i = 0; !isGameOver(); i = (i+1) % numberOfPlayers) {\n\t\t\ttakeTurn(i+1);\n\t\t}\n\t\tfinishGame();\n\t}", "public void play() {\n\n init();\n while (isGameNotFinished()) {\n log.info(\"*** Starting next turn\");\n for (Player player : getPlayers()) {\n executeTurn(player);\n }\n }\n log.info(\"*** Game Finished\");\n }", "public void play() {\r\n\r\n gamestate.startGame();\r\n\r\n while (!quit) {\r\n\r\n if (newGame) {\r\n gamestate.startGame();\r\n turn = 0;\r\n finished = true;\r\n newGame = false;\r\n }\r\n\r\n while (!gamestate.gameOver()) {\r\n\r\n if (newGame) {\r\n break;\r\n }\r\n\r\n turn++;\r\n display.displayBoard();\r\n\r\n if (turn % 2 == 1) {\r\n player1.makeMove(gamestate);\r\n } else {\r\n player2.makeMove(gamestate);\r\n }\r\n\r\n }\r\n\r\n if (finished) {\r\n\r\n display.displayBoard();\r\n\r\n switch (gamestate.getWinner()) {\r\n case Connect4GameState.RED:\r\n System.out.println(\"R wins\");\r\n break;\r\n case Connect4GameState.YELLOW:\r\n System.out.println(\"Y wins\");\r\n break;\r\n default:\r\n System.out.println(\"No one wins\");\r\n }\r\n\r\n finished = false;\r\n\r\n }\r\n\r\n if (display instanceof Connect4ConsoleDisplay) {\r\n quit = true;\r\n }\r\n\r\n }\r\n\r\n }", "public void play() {\n HashSet<Board> positionsPlayed = new HashSet<Board>();\n _board = new Board();\n\n while (true) {\n int playerInd = _board.turn().ordinal();\n Move next;\n if (_playing) {\n if (_board.gameOver()) {\n announceWinner();\n _playing = false;\n continue;\n }\n if (_hasGUI) {\n if (_players[playerInd].type().equals(\"human\")) {\n if (_ready) {\n next = _nextMove;\n } else if (_readyCommand) {\n processCommand(_nextCommand);\n next = null;\n } else {\n continue;\n }\n } else {\n next = _players[playerInd].makeMove();\n }\n } else {\n next = _players[playerInd].makeMove();\n }\n assert !_playing || next != null;\n } else {\n if (_hasGUI) {\n System.out.print(\"\");\n if (_readyCommand) {\n processString(_nextCommand);\n }\n } else {\n getMove();\n }\n next = null;\n }\n if (next != null) {\n assert _board.isLegal(next);\n _board.makeMove(next);\n if (_players[playerInd].type().equals(\"machine\") && !_hasGUI) {\n System.out.println(_players[playerInd].side().abbrev().toUpperCase() + \"::\" + next.toString());\n if (_autoprint) {\n System.out.println(_board.toString2());\n }\n }\n if (_board.gameOver()) {\n announceWinner();\n _playing = false;\n }\n }\n _ready = false;\n }\n }", "public void play() {\r\n int ii = 0;\r\n\r\n System.out.println(\"****************************************************************\");\r\n System.out.println(\"Play game: a move is expressed as \\\"row#,col#\\\", such as \\\"1,2\\\"\");\r\n System.out.println(\"Computer: X Person: O\");\r\n System.out.println(\"****************************************************************\");\r\n while(!isGameEnded()) {\r\n if (ii >= MAX_MOVE_NUMBER) {\r\n\tbreak;\r\n }\r\n\r\n nextMove();\r\n ii++;\r\n }\r\n\r\n if (isPersonWin()) {\r\n System.out.println(\"Person Wins!\");\r\n saveLoseRecord();\r\n }\r\n else if (isComputerWin()) {\r\n System.out.println(\"Computer Wins!\");\r\n }\r\n else {\r\n System.out.println(\"Tie!\");\r\n }\r\n\r\n }", "public void playGame() {\t\t\r\n\t\tthis.printWelcomeMessage();\r\n\r\n\t\t// While the game hasn't finished yet. \r\n\t\twhile (!board.isGameWon()) {\r\n\t\t\tthis.printMoveText(\"What piece would you like to move: \", \"\\n-- PLEASE ENTER A VALID PIECE --\", true);\r\n\t\t\tthis.printSeparator();\r\n\t\t\tthis.printMoveText(\"Where would you like to move this piece: \", \"\\n-- PLEASE ENTER A VALID LOCATION --\",\r\n\t\t\t\t\tfalse);\r\n\t\t\tthis.printSeparator();\r\n\t\t}\r\n\t\tSystem.out.println(board.toString());\r\n\t\tSystem.out.println(\"Level Complete - Congratulations!\");\r\n\t}", "public void play() \n { \n printWelcome();\n\n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n \n boolean finished = false;\n while (! finished) {\n Command command = parser.getCommand();\n finished = processCommand(command);\n if(currentRoom == win)\n {\n finished = true;\n }\n if (timer > 10)\n {\n currentRoom = fail;\n System.out.println(currentRoom.getLongDescription());\n finished = true;\n }\n }\n System.out.println(\"Thank you for playing. Good bye.\");\n }", "public void play()\r\n\t{\r\n \r\n\t\tupdateMessage(\"Starting \" + name + \" between \"+ agent[0].name+ \" and \"+ agent[1].name+\".\");\r\n random = new Random(System.currentTimeMillis());\r\n\t\tint turn = random.nextInt(2);\r\n first=turn;\r\n\t\tint dimension=8;\r\n\t\t//System.out.println(agent[turn].name+ \" makes the first move.\");\r\n\t\t//initialize(false,dimension,dimension);\r\n set(agent[first].role);\r\n agent[0].setAvailable(agent[first].role, dimension);\r\n agent[1].setAvailable(agent[first].role, dimension);\r\n \r\n \r\n\t\t//showGameState();\r\n \r\n\t\twhile(!isFinished())\r\n\t\t{\r\n\t\t\tupdateMessage(agent[turn].name+ \"'s turn. \");\r\n\t\t\tagent[turn].makeMove(this);\r\n agent[(turn+1)%2].off(agent[turn].newx,agent[turn].newy );\r\n agent[(turn+1)%2].setNew((OTHELLO)this);\r\n \r\n \r\n\t\t\tshowGameState();\r\n\t\t\t\r\n\t\t\tturn = (turn+1)%2;\r\n\t\t}\r\n\t\t\r\n // System.out.println(\" final winner role: \"+winner.role+\" agent[0]: \"+agent[0].role+\" agent[1]: \"+agent[1].role);\r\n \r\n\t\t\r\n\t\tif(draw)\t\r\n\t\t\tupdateMessage(\"Game drawn!!\");\r\n else updateMessage(winner.name+ \" wins!!!\");\r\n\t\t\r\n\t}", "public void playGame(Parser p){\n\t\t// until someone wins, loop through turns\n\t\twhile(!Game.gameWon){\n\n\t\t\t// get move from player\n\n\t\t\t// String move = Game.getCurrPlayer().getMove();\n\t\t\tString move = this.network.getMove();\n\t\t\tif(move.length()==2){\n\t\t\t\tmove = p.moveTranslate(move);\n\t\t\t}else{\n\t\t\t\tmove = p.wallTranslate(move);\n\t\t\t}\n\n\t\t\tif(move.isEmpty()){\n\t \tSystem.out.println(\"\\t[Move error]: Move is empty.\");\n\t\t\t\tkickPlayer();\n\t\t\t\tthis.network.kickLastPlayer();\n\t\t\t\tGame.nextTurn();\n\t\t\t\tif(this.checkForWin()){\n\t\t\t\t\tnotifyObservers(ui);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// try to play turn\n\t\t\tif(this.playTurn(move)){\n\t\t\t\tif(this.checkForWin()){\n\t\t\t\t\tplayers.get(curr).clearMoves();\n\t\t\t\t\tnotifyObservers(ui);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tGame.nextTurn();\n\t\t\t}else{\n\t\t\t\tkickPlayer();\n\t\t\t\tthis.network.kickLastPlayer();\n\t\t\t\tGame.nextTurn();\n\t\t\t\tif(this.checkForWin()){\n\t\t\t\t\tplayers.get(curr).clearMoves();\n\t\t\t\t\tnotifyObservers(ui);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tGame.updatePlayer(players.get(curr));\n\t\t\tthis.notifyObservers(this, Game.getBoard());\n\t\t}\n\t}", "public void playGame() {\n\t\t\r\n\t\t\r\n\t\twhile (!theModel.isGameOver()) {\r\n\t\t\tplayRoundOne();\r\n\t\t}\r\n\t\t\r\n\t}", "public void playGame() {\n Command command;\t\t// the last command entered by the user\n\n // some hello words...\n System.out.println();\n printWelcome();\n // repeatedly read commands and execute them until the game is over\n while (!finished) {\n System.out.println();\n System.out.println(currentRoom.longDescription());\n System.out.println();\n command = parser.getCommand();\n processCommand(command);\n }\n // some bye bye words...\n printGoodbye();\n }", "private void playGame() throws IOExceptionFromController {\n for (Player player : players) {\n if (player.getGodCard().hasAlwaysActiveModifier()) game.addModifier(player.getGodCard());\n }\n while (!game.hasWinner()) {\n if (!running.get()) return;\n Player currentPlayer = players.get(game.getActivePlayer());\n for (Card modifier : game.getActiveModifiers()) {\n if (!modifier.hasAlwaysActiveModifier() && modifier.getController().getPlayer().equals(currentPlayer))\n game.removeModifier(modifier);\n }\n\n broadcastGameInfo(\"turnStart\");\n String result = playerControllers.get(game.getActivePlayer()).playTurn();\n switch (result) {\n case \"next\":\n checkWorkers();\n game.nextPlayer();\n break;\n case \"outOfMoves\":\n case \"outOfBuilds\":\n case \"outOfWorkers\":\n eliminatePlayer(currentPlayer, result);\n game.nextPlayer();\n break;\n case \"winConditionAchieved\":\n case \"godConditionAchieved\":\n setWinner(currentPlayer, result);\n break;\n default:\n logError(\"invalid turn\");\n break;\n }\n }\n gameOver();\n }", "public void runGame() {\r\n\t\ttry {\r\n\t\t\thost.startNewGame(width, height, false);\r\n\t\t\tguest.startNewGame(width, height, true);\r\n\t\t\tnotifyStartGame(width, height);\r\n\t\t} catch(Exception e) {return;}\r\n\t\twhile(!game.isGameOver()) {\r\n\t\t\tcurrentPlayer = game.getCurrentPlayer();\r\n\t\t\tMove move;\r\n\t\t\ttry {\r\n\t\t\t\tmove = currentPlayer.getNextMove();\r\n\t\t\t} catch(Exception e) { return ;}\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tif(game.isValidMove(move)) {\r\n\t\t\t\t\tgame.registerMove(move);\r\n\t\t\t\t\thost.registerMove(move);\r\n\t\t\t\t\tguest.registerMove(move);\r\n\t\t\t\t\tnotifyMove(move);\r\n\t\t\t\t}\r\n\t\t\t} catch (IllegalMove e) { }\r\n\t\t\tcatch (Exception e) { return; }\r\n\t\t}\r\n\n\t\ttry {\r\n\t\t\thost.finishGame(game.getResult(host));\r\n\t\t\tguest.finishGame(game.getResult(guest));\r\n\t\t\tnotifyFinishGame(game.getResult(host));\r\n\t\t} catch( Exception e) { return; }\n\t}", "public void play() {\r\n _board = new Board();\r\n _command = new LoaGUI(\"Lines of Action\", this);\r\n\r\n while (true) {\r\n int playerInd = _board.turn().ordinal();\r\n if (_playing) {\r\n if (_board.gameOver()) {\r\n announceWinner();\r\n _playing = false;\r\n continue;\r\n }\r\n Move next = _players[playerInd].makeMove();\r\n System.out.println(\"The move is get\");\r\n if (next != null) {\r\n assert _board.isLegal(next);\r\n _board.makeMove(next);\r\n _command.repaint();\r\n System.out.println(\"Repaint\");\r\n if (_board.gameOver()) {\r\n announceWinner();\r\n _playing = false;\r\n }\r\n }\r\n } else {\r\n try {\r\n Thread.sleep(magic2);\r\n } catch (InterruptedException ex) {\r\n return;\r\n }\r\n }\r\n }\r\n }", "public void playGame()\n\t{\n\t\t// Playing a new round; increase round id\n\t\troundId += 1;\n\n\t\tint diceRoll = 1 + dice.nextInt(6);\n\t\t\n\t\tif(diceRoll <= 3)\n\t\t{\n\t\t\tbranchId = 0;\n\t\t\tresult = 0;\n\t\t\tSystem.out.println(\"Roll = \" + diceRoll + \", result = 0\");\n\t\t\tsendMessage(diceRoll, roundId, branchId, result);\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tbranchId = 1;\n\t\t\tresult = 6;\n\t\t\tSystem.out.println(\"Roll = \" + diceRoll + \", result = 6\");\n\t\t\tsendMessage(diceRoll, roundId, branchId, result);\t\t\t\t\n\t\t}\n\t\t\n\t}", "private void doGameTurn()\n\t{\n\t\tif (!lost && !won)\n\t\t{\n\t\t\trefreshMapAndFrame();\n\t\t\t\n\t\t\tcheckPlayerCondition();\n\t\t\tElementAccess.openExit();\n\t\t\tSystem.out.println(turn);\n\t\t}\n\t\telse if (lost)\n\t\t{\n\t\t\tSound.lost();\n\t\t\trefreshMapAndFrame();\n\n\t\t\tif (playerHasLost())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t}\n\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t\tlost = false;\n\t\t}\n\t\telse if (won)\n\t\t{\n\t\t\tSound.won();\n\t\t\trefreshMapAndFrame();\n\n\t\t\twon = false;\n\t\t\tif (playerNotInLevel())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t}\n\n\t\t\tnextLevel();\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t}\n\t}", "public void play()//Method was given\n { \n createRooms();\n createItems();\n printWelcome();\n \n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n \n finished = false;\n while (! finished)\n {\n Command command = parser.getCommand();\n finished = processCommand(command);\n if (currentRoom == exitRoom)\n {\n finished = true;\n }\n }\n System.out.println(\"Thank you for playing. Goodbye.\");\n }", "private void play() {\r\n\t\tfor (int i = 0; i < players.length; i++) {\r\n\t\t\tPlayer p = players[i];\r\n\t\t\tif (p instanceof ComputerPlayer) {\r\n\t\t\t\tfirstMove[i] = ((ComputerPlayer) p).makeFirstMove(board);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (firstMove[0] != null && firstMoveScores[0] > 0) {\r\n\t\t\tcalcBestFirstMove();\r\n\t\t}\r\n\r\n\t\twhile (!(board.gameOver())) {\r\n\t\t\t/* \tNIET LANGER NODIG GELOOF IK, DIT KAN DE SERVER (ICM EEN TIMER) DOEN\r\n\r\n\t\t\tplayers[(moveNr + startingPlayer) % players.length].makeMove(board);\r\n\t\t\tserver.updateHand(players[(moveNr + startingPlayer) % players.length],\r\n\t\t\t\t\tplayers[(moveNr + startingPlayer) % players.length].updateHand());\r\n\t\t\tmoveNr++;*/\r\n\t\t}\r\n\t}", "public void playGame() throws Exception\n\t{\n\t\tallPlayersDataInput().playGame();\n\t\t\n\t\tgetCurrentPlayer().execBeginOfTurn();\n\t\tinitBeginOfTurn();\n\t\t\n\t\tankhMorporkUI.setVisible(true);\n\t\tThread.sleep(50); // 50ms for the UI to show up\n\t\t\t\n\t\twhile(!isEndGame)\n\t\t{\n\t\t\tPlayer currentPlayer = getCurrentPlayer();\n\t\t\tList<Object> possibleActionsList = new ArrayList<Object>();\n\t\t\tList<Card> unusableCardList = new ArrayList<Card>();\n\t\t\tif(!actionListToExecute.isEmpty())\n\t\t\t{\n\t\t\t\tpossibleActionsList.add(actionListToExecute.get(0));\n\t\t\t}\n\t\t\tfor(Card card : currentPlayer.getCityAreaCardDeck())\n\t\t\t{\n\t\t\t\tif(card.isActive() && card.canExecute(this) && card.isEnabled())\n\t\t\t\t{\n\t\t\t\t\tpossibleActionsList.add(card);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(Card card : currentPlayer.getPlayerCardDeck())\n\t\t\t{\n\t\t\t\tif(card.canBeExecutedTurnBase(canPlayPlayerCard) && card.canExecute(this) && card.isEnabled())\n\t\t\t\t{\n\t\t\t\t\tpossibleActionsList.add(card);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tunusableCardList.add(card);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(possibleActionsList.isEmpty())\n\t\t\t{\n\t\t\t\tnextTurn();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(unusableCardList.size() > 0)\n\t\t\t\t{\n\t\t\t\t\tthis.getSystemDataInput().printMessage(this.getCurrentPlayer().toString() + \": - Unusable player card:\");\n\t\t\t\t\tfor(Card card : unusableCardList)\n\t\t\t\t\t{\n\t\t\t\t\t\tthis.getSystemDataInput().printMessage(this.getCurrentPlayer().toString() + \": - \" + card.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(this.showSaveGame)\n\t\t\t\t{\n\t\t\t\t\tthis.showSaveGame = false;\n\t\t\t\t\tpossibleActionsList.add(new SaveGame());\n\t\t\t\t}\n\t\t\t\tpossibleActionsList.add(new ShowGameStatus());\n\t\t\t\tif(!canPlayPlayerCard && actionListToExecute.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tpossibleActionsList.add(new NextPlayerTurn());\n\t\t\t\t}\n\t\t\t\tObject selection = currentPlayer.getDataInput().askPlayAction(possibleActionsList);\n\t\t\t\tif(selection == null)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\texecuteCardAction(selection);\n\t\t\t}\n\t\t}\n\t}", "public void playTurn(Game game, MessageHandler msgHandler) {\n\t\t\n\t\tif (game.mBoardTiles1.size() == 0) {\n\t\t\t\n\t\t\t// There are no tiles in the board...\n\t\t\t\n\t\t\tif (game.mRoundCount == 0) {\n\t\t\t\t\n\t\t\t\t// This is the first round. We have to play the double 6 tile...\n\t\t\t\t\n\t\t\t\tif (!hasTile(6, 6)) {\n\t\t\t\t\t\n\t\t\t\t\tLog.error(\"Robot has to play double 6 tile, but cannot find it!!!\");\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tDominoTile tile = new DominoTile(6, 6);\n\t\t\t\t\n\t\t\t\tplayTile(msgHandler, tile, 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\t// This is not the first round. Play any of the tiles...\n\t\t\t\t\n\t\t\t\t// First, shuffle the tiles\n\t\t\t\t\n\t\t\t\tlong seed = System.currentTimeMillis();\n\t\t\t\t\n\t\t\t\tRandom random = new Random(seed);\n\t\t\t\t\n\t\t\t\tCollections.shuffle(mTiles, random);\n\t\t\t\t\n\t\t\t\t// Play tile on board side 1\n\t\t\t\t\n\t\t\t\tplayTile(msgHandler, mTiles.get(0), 1);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\tint endNumber1 = game.getEndNumber1();\n\t\t\t\n\t\t\tint endNumber2 = game.getEndNumber2();\n\t\t\t\n\t\t\t\n\t\t\tArrayList<MyPair<DominoTile, Integer>> playableTiles = getPlayableTiles(endNumber1, endNumber2);\n\t\t\t\n\t\t\tif (playableTiles.size() == 0) {\n\t\t\t\t\n\t\t\t\tLog.debug(\"Robot.playTurn() No playableTiles. Robot has to pass...\");\n\t\t\t\t\n\t\t\t\tplayTile(msgHandler, null, 0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\t// Force a robot to play in one side of the board\n\t\t\t\t// If forceSide == 0, the play on any side\n\t\t\t\t\n\t\t\t\tint forceSide = 0;\n\t\t\t\t\n\t\t\t\tboolean tilePlayed = false;\n\t\t\t\t\n\t\t\t\tif (forceSide > 0) {\n\t\t\t\t\t\n\t\t\t\t\t// Force one side...\n\t\t\t\t\t\n\t\t\t\t\tfor(int i=0; i<playableTiles.size(); i++) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (playableTiles.get(i).getValue() == forceSide) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tDominoTile tile = playableTiles.get(i).getKey();\n\t\t\t\t\t\t\tInteger boardSide = playableTiles.get(i).getValue();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tLog.debug(\"Robot.playTurn() Play tile=\"+tile.mNumber1+\"-\"+tile.mNumber2+\n\t\t\t\t\t\t\t\t\t\", boardSide=\"+boardSide);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tplayTile(msgHandler, tile, boardSide);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttilePlayed = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!tilePlayed) {\n\t\t\t\t\t\n\t\t\t\t\t// Play a random tile...\n\t\t\t\t\t\n\t\t\t\t\tlong seed = System.currentTimeMillis();\n\t\t\t\t\t\n\t\t\t\t\tRandom random = new Random(seed);\n\t\t\t\t\t\n\t\t\t\t\tCollections.shuffle(playableTiles, random);\n\t\t\t\t\t\n\t\t\t\t\tDominoTile tile = playableTiles.get(0).getKey();\n\t\t\t\t\tInteger boardSide = playableTiles.get(0).getValue();\n\t\t\t\t\t\n\t\t\t\t\tLog.debug(\"Robot.playTurn() Play tile=\"+tile.mNumber1+\"-\"+tile.mNumber2+\n\t\t\t\t\t\t\t\", boardSide=\"+boardSide);\n\t\t\t\t\t\n\t\t\t\t\tplayTile(msgHandler, tile, boardSide);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void runTheGame() {\n\t\txPlayer.setOpponent(oPlayer);\n\t\toPlayer.setOpponent(xPlayer);\n\t\tboard.display();\n\t\txPlayer.play();\n\t}", "private void moveGame() {\r\n\t\tmoveFireball1();\r\n\t\tmoveFireball2();\r\n\t\tmoveMehran();\r\n\t\tmoveLaser();\r\n\t\tmoveBullet();\r\n\t\tcheckPlayerCollisions();\r\n\t\tcheckForBulletCollisions();\r\n\t\tpause(DELAY);\r\n\t\tcount++;\r\n\t}", "private void playGame() {\n\t\t\n\t\t/* take 1$ from the wallet to play game */\n\t\tsetWallet(-1);\n\t\t\n\t\t/* generate 3 random slots */\n\t\tslot1 = getSlot();\n\t\tslot2 = getSlot();\n\t\tslot3 = getSlot();\n\t\tslotBox1 = getSlotBox(slot1);\n\t\tslotBox2 = getSlotBox(slot2);\n\t\tslotBox3 = getSlotBox(slot3);\n\t\t\n\t\t/* draw slots on the screen and compute result*/\n\t\tadd(slotBox1, 100, 100);\n\t\tadd(slotBox2, 250, 100);\n\t\tadd(slotBox3, 400, 100);\n\t\t\n\t\tString result = gameOutcome(slot1, slot2, slot3);\n\t\ttopText = new GLabel(result);\n\t\tmidText = new GLabel(\"You now have \" + getWallet() + \"$.\");\n\t\tbotText = new GLabel(\"Click to play\");\n\t\ttopText.setFont(\"Serif-24\");\n\t\tmidText.setFont(\"Serif-24\");\n\t\tbotText.setFont(\"Serif-24\");\n\t\tadd(topText, 100, 250);\n\t\tadd(midText, 100, 280);\n\t\tadd(botText, 100, 310);\n\n\t}", "public void play() {\n\n int turn = 1;\n\n while (!isCheckMate()) {\n System.out.println(\"Turn \" + turn++);\n board.print();\n playTurn(whitePlayer);\n board.print();\n playTurn(blackPlayer);\n }\n }", "private void playGame() {\n do {\n new Round(this);\n } while (!winner.isPresent());\n }", "public void startGame() {\n\n // Initialize both players\n players[0] = new Player(\"Paras\", true);\n players[1] = new Player(\"Computer\", false);\n\n // Initialize ChessBoard\n board = new ChessBoard(8);\n movesPlayed = new ArrayList<>();\n\n // Keep playing game until GameStatus is BLACK_WIN or WHITE_WIN\n while (true) {\n\n processTurn(players[0]);\n if (this.status == GameStatus.WHITE_WIN) {\n System.out.println(\"P1 win!\");\n break;\n }\n\n processTurn(players[1]);\n if (this.status == GameStatus.BLACK_WIN) {\n System.out.println(\"P2 win!\");\n break;\n }\n }\n\n }", "private void move() {\n resetUpdate();\n\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.resetGameMessage();\n gameMessage.notify(gameMessage);\n\n\n if( liteGame.isWinner() ) endOfTheGame = true;\n }", "public void play() \n { \n printWelcome();\n\n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n\n boolean finished = false;\n while (! finished) {\n Command command = parser.getCommand();\n finished = processCommand(command);\n }\n System.out.println(\"Thank you for playing. Good bye.\");\n }", "public void playTheGame() {\n\t\tint column;\n\t\ttry {\n\t\t\tboolean gameIsOver = false;\n\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\taConnect4Field.toString());\n\n\t\t\tdo {\n\t\t\t\tfor (int index = 0; index < thePlayers.length; index++) {\n\t\t\t\t\t// thePlayers[index].getView().showOutput(aConnect4Field.toString());\n\t\t\t\t\tif (aConnect4Field.isItaDraw()) {\n\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\"Draw\");\n\t\t\t\t\t\tgameIsOver = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\tthePlayers[index].getName()\n\t\t\t\t\t\t\t\t\t\t+ \" it's Your Turn! play your move\");\n\t\t\t\t\t\tcolumn = thePlayers[index].nextMove();\n\t\t\t\t\t\twhile (!aConnect4Field\n\t\t\t\t\t\t\t\t.checkIfPiecedCanBeDroppedIn(column)) {\n\t\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\t\t\"Invalid Turn Try again\");\n\t\t\t\t\t\t\tcolumn = thePlayers[index].nextMove();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\taConnect4Field.dropPieces(column,\n\t\t\t\t\t\t\t\tthePlayers[index].getGamePiece());\n\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\t\t\t\taConnect4Field.toString());\n\t\t\t\t\t\tif (aConnect4Field.error != \"\") {\n\n\t\t\t\t\t\t\tthePlayers[index].getView().showOutput(\n\t\t\t\t\t\t\t\t\taConnect4Field.error);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (aConnect4Field.didLastMoveWin()) {\n\t\t\t\t\t\t\t\tgameIsOver = true;\n\t\t\t\t\t\t\t\t// all player get to know\n\t\t\t\t\t\t\t\tfor (int count = 0; count < thePlayers.length; count++)\n\t\t\t\t\t\t\t\t\tthePlayers[count].getView().showOutput(\n\t\t\t\t\t\t\t\t\t\t\t\"The winner is: \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ thePlayers[index]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getName());\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} while (!gameIsOver);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "public void playGame() {\n show();\n while (gameStatus) {\n if (canPut(players.get((state.getTurn())))) {\n int choice = -1;\n while (gameStatus) {\n choice = controls.get(state.getTurn()).putCard(currentCard);\n if (validInput(players.get((state.getTurn())), choice)) {\n System.out.println(players.get(state.getTurn()).getCards().get(choice).toString());\n try{Thread.sleep(1000);}catch(InterruptedException ignored){}\n break;\n }\n }\n decide(players.get(state.getTurn()), players.get(state.getTurn()).getCards().get(choice));\n }\n try{Thread.sleep(500);}catch(InterruptedException ignored){}\n checkFinish();\n if (gameStatus) {\n state.nextTurn();\n show();\n }\n }\n }", "public void playConsole(){\n consoleWelcome();\n \n while (! finished) {\n if (gameOver) {\n Logger.Log(\"Your adventure is over...\");\n break;\n }\n Command command = parser.getCommand();\n finished = processCommand(command); \n }\n if (!gameOver) { \n Logger.Log(\"Thank you for playing. Good bye.\");\n }\n }", "public void executeTurn(Game game){\n \tif (turn == 0) {\n \t\t\n \t\tSystem.out.println(game.getCurrentFloor().getFloorDesc());\n\t \tHELPER.insPressEnter();\n\t \tSystem.out.println(\"\\033[2J\");\n\t \tturn++;\n\t \n \t} \n\n // The room that the user is in.\n Room room = game.getCurrentRoom();\n Floor floor = game.getCurrentFloor();\n \n \n// Map.setVisibleRoom(game); //make the room that the is player in visible on the map\n \n if (!help && !map && !list) {\n \tSystem.out.println(Colors.GREEN + floor.getHint() + Colors.RESET);\n \tSystem.out.println(Colors.YELLOW + \"\\n ROOM #\" + room.getDescription()+\" FLOOR: #\" + floor.getFloorNum() + \"\\n\" + Colors.RESET);\n \tAsciiArt.makeArt(game);\n }\n else if (help) { //print what commands are available to the player\n \tSystem.out.println(\"\\n You are in room \" + room.getDescription());\n AsciiArt.getKeys();\n help = false; //set help back to false after executing once\n }\n else if (list) { //print what items the player has collected\n \tInventory.list();\n \tlist = false;\n }\n else if (map) { //print out the map of the rooms that the player has already been to\n \tMap.printMap();\n \tmap = false;\n }\n if (room.getItemInRoom() != null) { //if there is an item in the room\n \tif (room.getItemInRoom().getType().compareTo(\"Enemy\") != 0) { //if the item is NOT an enemy, say what it is\n \t\tSystem.out.println(Colors.CYAN + \"\\n << The \" + room.getItemInRoom().getType() + \" in this room is \" + room.getItemInRoom().getName() + \" >>\\n\" + Colors.RESET);\n \t}\n \telse { //if there IS an enemy in the room, attack the player\n \tif (((Enemy) room.getItemInRoom()).attack()) {\n \t\troom.setItemInRoom(null);\n \t}\n \telse {\n \t\tgame.setCurrentRoom(game.getCurrentFloor().getRooms()[4]);\n \t\troom = game.getCurrentRoom();\n \t\tSystem.out.println(Colors.RESET + \"Now you are back in room \" + room.getDescription() + \"\\n\" + Colors.CYAN);\n \t\tif (room.getItemInRoom() != null) {\n \t \t\tSystem.out.println(Colors.CYAN + \"\\n << The \" + room.getItemInRoom().getType() + \" in this room is \" + room.getItemInRoom().getName() + \" >>\\n\" + Colors.RESET);\n \t \t}\n \t}\n }\n }\n else System.out.println(Colors.YELLOW + \"\\n << There is nothing in this room >>\\n\" + Colors.RESET); //if there are no items in the room\n\n System.out.print(Colors.YELLOW + \" Enter command--> \" + Colors.RESET);\n\n String command = keyboard.nextLine().toLowerCase(); // user's command\n System.out.println(\"\\033[2J\");\n \n\n Room nextRoom = null; // the room we're moving to\n HashMap<String, Room> helper = room.getDirection();\n \n //Get access to list of all commands from CommandSetter class\n CommandSetter listOfCommands = new CommandSetter();\n HashMap<String,String> com = listOfCommands.getList();\n \n \n if (com.containsKey(command)){ \n \t\n \t\n\t \tswitch (com.get(command)) { //based on the command the player has typed, do that\n\t \t\t\n\t\t case \"north\": \n\t\t \t\tnextRoom = helper.get(\"north\");\n\t\t \t\tbreak;\n\t\t \n\t\t case \"south\": \n\t\t \t\tnextRoom = helper.get(\"south\");\n\t\t \t\tbreak;\n\t\t \n\t\t case \"west\": \n\t\t \tnextRoom = helper.get(\"west\");\n\t\t \t\tbreak;\n\t\t \n\t\t case \"east\": \n\t\t \t\tnextRoom = helper.get(\"east\");\n\t\t \t\tbreak;\n\t\t \n\t\t case \"quit\": \n\t\t \t\twinIndicator = false;\n\t\t \t\tnextRoom = room;\n\t\t \t\tgame.finishGame();\n\t\t \t\tbreak;\n\t\t \n\t\t case \"help\":\n\t\t \tnextRoom = new Room(\"Dont Move\");\n\t\t \thelp = true;\n\t\t break;\n\t\t \n\t\t case \"collect\":\n\t\t \tnextRoom = new Room(\"Dont Move\");\n\t\t \troom.pickUpItem();\n\t\t \tbreak;\n\t\t \t\n\t\t case \"list\":\n\t\t \tlist = true;\n\t\t \tnextRoom = new Room(\"Dont Move\");\n\t\t \tbreak;\n\t\t \t\n\t\t case \"map\":\n\t\t \tmap = true;\n\t\t \tnextRoom = new Room(\"Dont Move\");\n\t\t \tbreak;\n\t\t \t\n\t\t case \"open\":\n\t\t \troom.openChest();\n\t\t \n\t\t default:\n\t\t \tnextRoom = new Room(\"Dont Move\");\n\t \t}\n \n }else { //if the player types a command that is not available\n \tSystem.out.println(Colors.CYAN + \"\\n << I do not know how to do this command:\" + command + \" >>\\n\" + Colors.RESET);\n \tnextRoom = new Room(\"Dont Move\");\n }\n if (nextRoom == null) { //if there is no room in the direction they are trying to move\n System.out.println(Colors.CYAN + \"\\n << Oof! I ran into a wall. I cannot move in that direction. >>\\n\" + Colors.RESET);\n \t}\n else if (nextRoom.getDescription().compareTo(\"Dont Move\") != 0) {\n game.setCurrentRoom(nextRoom);\n }\n \n System.out.print(Colors.RESET);\n \n \n }", "public void startGame(){\n\t\tSystem.out.println(\"UNI: nas2180\\n\" +\n\t\t\t\t\"Hello, lets play Rock Paper Scissors Lizard Spock!\\n\");\n\t\tSystem.out.println(\"Rules:\\n Scissors cuts Paper\\n \" +\n\t\t\t\t\"Paper covers Rock\\n \" +\n\t\t\t\t\"Rock crushes Lizard\\n \" +\n\t\t\t\t\"Lizard poisons Spock\\n \" +\n\t\t\t\t\"Spock smashes Scissors\\n \" +\n\t\t\t\t\"Scissors decapitates Lizard\\n \" +\n\t\t\t\t\"Lizard eats Paper\\n \" +\n\t\t\t\t\"Paper disproves Spock\\n \" +\n\t\t\t\t\"Spock vaporizes Rock\\n \" +\n\t\t\t\t\"(and as it always has) Rock crushes Scissors\\n\");\n\t\tthisGame = new GameResult();\n\t\tplayRound();\n\t}", "@Override\r\n\tpublic void makeRandonMove() {\r\n\t\tif (randPlayer.getPlayerNumber() == game.getState().getTurn() && !game.getState().isFinished()) game.execute(randPlayer.requestAction(game.getState()));\r\n\t}", "public void play() \n { \n printWelcome(); \n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n \n boolean finished = false;\n while (! finished && alive == true) {\n checkHealth();\n command = parser.getCommand();\n finished = processCommand(command);\n setPlayerRoom();\n enemyEncounter(); \n checkVictory();\n deathRoom();\n }\n System.out.println(\"Thank you for playing. Good bye.\");\n }", "private void suarez() {\n\t\ttry {\n\t\t\tThread.sleep(5000); // espera, para dar tempo de ver as mensagens iniciais\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint xInit = -10;\n\t\tint yInit = 8;\n\t\tplayerDeafaultPosition = new Vector2D(xInit*selfPerception.getSide().value(), yInit*selfPerception.getSide().value());\n\t\twhile (commander.isActive()) {\n\t\t\t\n\t\t\tupdatePerceptions(); // deixar aqui, no começo do loop, para ler o resultado do 'move'\n\t\t\tswitch (matchPerception.getState()) {\n\t\t\tcase BEFORE_KICK_OFF:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\t\t\t\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase PLAY_ON:\n\t\t\t\t//state = State.FOLLOW;\n\t\t\t\texecuteStateMachine();\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_OFF_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_LEFT: // escanteio time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase CORNER_KICK_RIGHT: // escanteio time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase KICK_IN_LEFT: // lateral time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\tcase KICK_IN_RIGHT: // lateal time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_LEFT: // Tiro livre time esquerdo\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_RIGHT: // Tiro Livre time direito\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase FREE_KICK_FAULT_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase GOAL_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_LEFT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase AFTER_GOAL_RIGHT:\n\t\t\t\tcommander.doMoveBlocking(xInit, yInit);\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_LEFT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.LEFT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase INDIRECT_FREE_KICK_RIGHT:\n\t\t\t\tif (selfPerception.getSide() == EFieldSide.RIGHT) {\n\t\t\t\t\tstate = State.PASSING_BALL;\n\t\t\t\t\texecuteStateMachine();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t}", "public void play()\n { \n printWelcome();\n\n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n\n boolean finished = false;\n while (! finished) {\n Command command = parser.getCommand();\n //System.out.println(command==null);\n String output = processCommand(command);\n finished = (null == output);\n if (!finished)\n { \n System.out.println(output);\n }\n\n }\n System.out.println(\"Thank you for playing. Good bye.\");\n }", "public void playOneTurn() {\n // set running to be true\n this.running = true;\n // create 2 balls and add them to the game using function.\n this.createBalls();\n //create the paddle and place it in the bottom of the screen, middle of line.\n Paddle pad = this.createPaddle();\n //add paddle to game.\n pad.addToGame(this);\n // countdown before turn starts\n this.runner.run(new CountdownAnimation(2, 3, this.sprites));\n // use our runner to run the current animation -- which is one turn of the game\n this.runner.run(this);\n //finally remove pad before the next turn.\n pad.removeFromGame(this);\n }", "private void playGame() {\n drawBricks();\n for (int i = 1; i <= NTURNS; i++) {\n setBallSpeed();\n GOval ball = drawBall();\n paddle = drawPaddle();\n showLabel(\"ROUND \" + i, Color.ORANGE);\n waitForClick();\n playRound(ball);\n }\n showLabel(\"GAME OVER\", Color.BLACK);\n }", "public void play_game()\n {\n\tint r,c;\n\tString action;\n\n\twhile ( _the_board.game_won() == false )\n\t {\n\t\tSystem.out.println( _the_board );\n\n\t\tSystem.out.print(\"col: \");\n\t\tc = _scan.nextInt();\n\t\tSystem.out.print(\"row: \");\n\t\tr = _scan.nextInt();\n\t\tSystem.out.print(\"explore, flag, unflag: \");\n\t\taction = _scan.next();\n\n\t\tif ( action.equals(\"explore\") && \n\t\t _the_board.open_cell(c, r) )\n\t\t {\n\t\t\tSystem.out.println(\"BOOOOOOMMMMM!!!!!!!!!!\");\n\t\t\treturn;\n\t\t }\n\n\t\tif ( action.equals(\"flag\") )\n\t\t _the_board.place_flag(c, r);\n\t\t\n\t\tif ( action.equals(\"unflag\") )\n\t\t _the_board.remove_flag(c, r);\n\t }\n\n\tSystem.out.println(\"You win!!!\");\n }", "public void play() \n { \n printWelcome();\n\n // Enter the main command loop. Here we repeatedly read commands and\n // execute them until the game is over.\n \n boolean finished = false;\n \n while (! finished) \n {\n Command command = parser.getCommand();\n finished = processCommand(command);\n }\n {\n Command command = parser.getCommand();\n finished = processCommand(command);\n if(p.energy == 0)\n finished = true;\n else if(currentRoom.getShortDescription() == \"outside the main entrance of the university\" && i.item1 == true && i.item2 == true)\n finished = true;\n }\n \n \n //game ending decision (victory, defeat, quit)\n \n if(p.energy == 0)\n { \n \n System.out.println(\"You look exhausted, stop or take a breather! You lost...\");\n }\n else if(currentRoom.getShortDescription() == \"outside the main entrance of the university\" && i.item1 == true && i.item2 == true)\n {\n System.out.println(\"Congratulations you won the game !\");\n }\n else\n {\n System.out.println(\"Thank you for playing. Good bye.\");\n }\n }", "public void executePlayGameStrategy(int row, int col) {\n gameStrategy.play(row, col);\n }", "public void play() throws IOException {\n\t\tmakeMove();\n\t\tboard.display();\n\t\tif (board.xWins()) {\n\t\t\tsocketOut.println(\"THE GAME IS OVER: whoever using X is the winner!\");\n\t\t\topponent.socketOut.println(\"THE GAME IS OVER: whoever using X is the winner!\");\n\t\t} else if (board.oWins()) {\n\t\t\tsocketOut.println(\"THE GAME IS OVER: whoever using O is the winner!\");\n\t\t\topponent.socketOut.println(\"THE GAME IS OVER: whoever using O is the winner!\");\n\t\t} else if (board.isFull()) {\n\t\t\tsocketOut.println(\"THE GAME IS OVER: it's a tie, you all lose!!!!!!\");\n\t\t\topponent.socketOut.println(\"THE GAME IS OVER: it's a tie, you all lose!!!!!!\");\n\t\t} else {\n\t\t\topponent.play();\n\t\t}\n\t}", "@Override\r\n\tpublic void makeMove(A action) {\r\n\t\tgame.execute(action);\r\n\t}", "public void startGame() {\n loadPlayersIntoQueueOfTurns();\n nextPlayerInTurn();\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.GameStarted));\n }", "public void makeMove(GameVersion game){\n\t\t\n\t\twhile(!this.inputType.waitForValidUserInput(game)){\n\t\t\ttry {Thread.sleep(500); }catch(InterruptedException e) {}\n\t\t}\n\t\tint userInput = this.inputType.getUserInput(game);\n\t\tgame.board.playChip(userInput, this);\n\t}", "public static void startGame() {\r\n\t\tfor (MovingUnit mu : _players) {\r\n\t\t\t((WinningInterface) mu).startUnit();\r\n\t\t}\r\n\t}", "private static void playersMove() {\r\n\t\tPrint print = new Print(); \r\n\t\tprint.board(game); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Prints the entire gameBoard.\r\n\t\t\r\n\t\tboolean flag = false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//true = Get Gideon's move | false = Get User's move\r\n\t\r\n\t\tArrayList<Integer> moves = MoveGenerator.Gen(flag, gamePieces);\t\t\t\t\t\t\t//returns all the legal moves possible to make by the player.\r\n\t\tPrint.moves(moves);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Prints all the moves returned by the Gen method.\r\n\t\t\r\n\t\tSystem.out.print(\"\\n\\n Enter your move: \");\r\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tScanner kb = new Scanner(System.in);\r\n\t\tString userInput = kb.next();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Captures the players move\r\n\t\t\r\n\t\tboolean moveCheck = CheckUserInput.checkMove(userInput, moves);\t\t\t\t\t\t\t//Checks if the move entered by the player is in the legal move list\r\n\t\t\r\n\t\tString formattedUserInput = null;\r\n\t\t\r\n\t\tif(!moveCheck)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Recall the playersMove() method if the move entered by the user is illegal\r\n\t\t\tplayersMove();\r\n\r\n\t\tformattedUserInput = FormatInput.formatUserMove(userInput);\t\t\t\t\t\t\t//Formatting the user's move to make it as an executable move on the board\r\n\t\t\r\n\t\t//System.out.println(formattedUserInput);\r\n\t\t\r\n\t\tUpdateBoard boardUpdater = new UpdateBoard();\r\n\t\tgame = boardUpdater.playMove(formattedUserInput,game, gamePieces, flag, false, true); //Executing the legal move on the gameBoard\r\n\t\tgamePieces = game.getGamePiecesArray();\t\t\t\t\t\t\t\t\t\t\t\t\t//Getting the updated copy of the Game Pieces Array\r\n\t\tgame.updateGameBoard();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Updating the String copy of the game board (required to print the updated gameBoard)\r\n\t\t\r\n\t\tSystem.out.println(\"\\n ========================\");\r\n\t\tGideonsMove();\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Gideon's turn to make a move\r\n\t\r\n\t}", "public void play() {\n System.out.println(\"Player \" + this.name + \" started to play...\");\n System.out.println(\"Current balance: \" + getTotalAsset());\n\n // roll a dice to move\n int steps = rollDice();\n System.out.println(\"Player diced \" + steps);\n\n // move\n move(steps);\n Land land = Map.getLandbyIndex(position);\n\n // land triggered purchase or opportunity events\n land.trigger();\n\n System.out.println(\"Player \" + this.name + \"has finished.\");\n }", "@Override\n public void executeAction(Game game) {\n game.tryPlaceBomb(this.player.getId());\n game.tryDoMove(this.player.getId(), this.direction);\n }", "public void play() {\n List<String> playersData = getGameInput().getPlayersData();\n for (int id = 0; id < playersData.size() / Constants.DATAENTITY; id++) {\n getHeroes().add(getHeroFactory().getHero(\n playersData.get(id * Constants.DATAENTITY),\n Integer.parseInt(\n playersData.get(\n id * Constants.DATAENTITY\n + Constants.INDEXPOSX)),\n Integer.parseInt(\n playersData.get(\n id * Constants.DATAENTITY\n + Constants.INDEXPOSY)),\n id));\n }\n // We create the angels and add them to angels list.\n List<Integer> numOfAngels = getGameInput().getNumOfAngels();\n List<String> angelsData = getGameInput().getAngelsData();\n for (int i = 0; i < angelsData.size() / Constants.DATAENTITY; i++) {\n getAngels().add(getAngelsFactory().getAngel(\n angelsData.get(i * Constants.DATAENTITY),\n Integer.parseInt(\n angelsData.get(\n i * Constants.DATAENTITY\n + Constants.INDEXPOSX)),\n Integer.parseInt(\n angelsData.get(\n i * Constants.DATAENTITY\n + Constants.INDEXPOSY))));\n }\n\n getUtl().prepareAdmins();\n\n int angelCounter = 0; // To iterate through all angels only once.\n // We start the actual game.\n for (int i = 0; i < getMovements().size(); i++) { // For every round.\n\n getUtl().printRound(i + 1); // We start printing from round 1...\n\n for (int j = 0; j < getHeroes().size(); j++) {\n /* Apply overtime ability if the case and then hero chooses\n * strategy and moves if he is not rooted. Lastly we decrease\n * the amount of rounds that a hero must be affected by. */\n if (!getHeroes().get(j).isDead()) {\n if (getHeroes().get(j).isAffectedByAoT()) {\n getUtl().applyAoT(getHeroes().get(j));\n }\n if (!getHeroes().get(j).isRooted()) {\n getHeroes().get(j).chooseStrategy();\n getHeroes().get(j).move(getMovements().get(i).get(j));\n }\n if (getHeroes().get(j).isAffectedByAoT()) {\n getHeroes().get(j).setAffectedByAoTRounds(\n getHeroes().get(j).getAffectedByAoTRounds()\n - 1);\n }\n }\n }\n\n // Check if there are any players on the same terrain.\n for (int j = 0; j < getHeroes().size(); j++) {\n for (int k = 0; k < getHeroes().size(); k++) {\n if (k == j) {\n continue; // So a hero doesn't fight himself.\n }\n if ((getHeroes().get(j).getPosX()\n == getHeroes().get(k).getPosX())\n && (getHeroes().get(j).getPosY()\n == getHeroes().get(k).getPosY())) {\n // If they are both alive, fight.\n if (!getHeroes().get(j).isDead()\n && !getHeroes().get(k).isDead()) {\n getUtl().fight(getHeroes().get(k),\n getHeroes().get(j), getMap());\n }\n }\n }\n }\n\n // Selecting the angels that appear on round i\n for (int j = 0; j < numOfAngels.get(i); j++) {\n getUtl().spawnAngel(getAngels().get(angelCounter));\n for (int k = 0; k < getHeroes().size(); k++) {\n /* Checking if the selected angel and player k are on the\n * same terrain. */\n if (getAngels().get(angelCounter).getPosX()\n == getHeroes().get(k).getPosX()\n && (getAngels().get(angelCounter).getPosY()\n == getHeroes().get(k).getPosY())) {\n getUtl().affectHeroByAngel(\n getAngels().get(angelCounter),\n getHeroes().get(k));\n }\n }\n angelCounter++;\n }\n\n // When round is complete, everyone can fight again\n for (AbstractHero hero : getHeroes()) {\n hero.setFought(false);\n }\n getUtl().getOutput().add(\"\\n\");\n }\n printResults();\n }", "public void run() {\n System.out.println(\"Starting game!\");\n this.clients[0].startgame();\n this.clients[1].startgame();\n\n this.clients[0].setError(this::error);\n this.clients[1].setError(this::error);\n\n for (int moveNum = 0; !this.board.gameOver(); moveNum = (moveNum + 1) % 2) {\n ChessConnection player = this.clients[moveNum];\n\n player.make_move();\n\n String[] move;\n try {\n move = player.parseCommand();\n }\n catch (NullPointerException e) {\n System.err.println(\"Could not read response from client\");\n error();\n break;\n }\n\n if (!move[0].equals(ChessConnection.MOVE)) {\n if (move[0].equals(ChessConnection.CHOSE)) {\n Piece p = Piece.createPiece(this.board, ChessColor.valueOf(move[2]), move[1], parseInt(move[3]), parseInt(move[4]));\n this.board.chosePiece(p);\n this.clients[0].chose(p);\n this.clients[1].chose(p);\n moveNum++;\n continue;\n }\n\n if (error)\n break;\n\n System.err.printf(\"Invalid Command from client: %s\\n\", move[0]);\n error();\n break;\n }\n\n int startRow = Integer.parseInt(move[1]);\n int startCol = Integer.parseInt(move[2]);\n int row = Integer.parseInt(move[3]);\n int col = Integer.parseInt(move[4]);\n\n try {\n Piece p = this.board.pieceAt(startRow, startCol);\n this.board.movePiece(p, row, col);\n }\n catch (PawnInterrupt e) {\n this.board.choosePiece(e.getPawn());\n this.clients[(moveNum + 1) % 2].choose(e.getPawn().getRow(), e.getPawn().getCol());\n }\n catch (ChessException e) {\n e.printStackTrace();\n error();\n break;\n }\n\n /* No error */\n this.clients[0].move_made(startRow, startCol, row, col);\n this.clients[1].move_made(startRow, startCol, row, col);\n }\n\n if (!error) {\n /* Tell the client if they won or not */\n if (this.board.getWinner() == ChessColor.BLACK) {\n this.clients[0].game_won();\n this.clients[1].game_lost();\n } else if (this.board.getWinner() == ChessColor.WHITE) {\n this.clients[1].game_won();\n this.clients[0].game_lost();\n } else {\n this.clients[0].game_tied();\n this.clients[1].game_tied();\n }\n }\n\n /* parseCommand on each thread should exit because socket closed */\n this.clients[0].close();\n this.clients[1].close();\n }", "private void myTurn()\n\t{\n\t\t\n\t\tif (canPlay())\n\t\t{\n\t\t\tif (isTop())\n\t\t\t{\n\t\t\t\traise();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tequal();\n\t\t\t}\n\t\t}\n\t\ttable.nextPlayer();\n\t\t\n\t}", "public void play() {\n\n showIntro();\n startGame();\n\n }", "public void playMove(int[] move, int side, BoardModel board) {\n\t\tboard.placeOnBoard(move, side);\n\t\t\n\t\t//we kunnen niet getOpponentSide gebruiken, omdat deze ook gebruikt wordt \n\t\t//voor de opponent. Daarom ff zo :)\n\t\tint opponent = 0;\n\t\tif(side == 0) opponent = 1;\n\t\t\n\t\t//nu gaan we alle shit omflippen...\n\t\tfor(int[] surround : surroundingCoordinates(move[0], move[1])) {\n\t\t\t//zo'n aanliggende positie moet van de tegenstander zijn\n\t\t\tif(board.getBoardValue(surround[0], surround[1]) == opponent){\n\t\t\t\t//nu moeten we gaan kijken of we verderop w�l onzelf tegenkomen!\n\t\t\t\t//wat is de relatieve waarde van de aanliggende positie ten opzichte van de geteste positie?\n\t\t\t\tint row_diff = surround[0] - move[0];\n\t\t\t\tint col_diff = surround[1] - move[1];\n\t\t\t\tflipMoves.clear();\n\t\t\t\tif(checkNext((move[0]+row_diff), (move[1]+col_diff), row_diff, col_diff, side, board)){\n\t\t\t\t\tfor(int[] flipMove : flipMoves){\n\t\t\t\t\t\tboard.placeOnBoard(flipMove, side);\n\t\t\t\t\t}\n\t\t\t\t\tflipMoves.clear();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean playGame() {\n\t\tboolean movePlayed = false;\n\t\twhile (!gameOver) {\n\t\t\tSystem.out.println(board);\n\t\t\tmovePlayed = false;\n\t\t\twhile(!movePlayed) {\n\t\t\t\ttry {\n\t\t\t\t\tplayNextTurn();\n\t\t\t\t\tmovePlayed = true;\n\t\t\t\t}\n\t\t\t\tcatch (RuntimeException e) {\n\t\t\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.checkWin = board.checkWin();\n\t\treturn true;\n\t}", "public void play(Player p) {\n\t\tthis.player=p;\n\t\tplayer.setActualRoom(this.currentRoom);\n\t\twhile (!this.isFinished()) {\n\t\t\tthis.currentRoom=p.getActualRoom();\n\t\t\tif (this.GameOver()) {\n\t\t\t\tSystem.out.println(\"You LOOSE !\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (this.isFinished()) {\n\t\t\t\tSystem.out.println(\"You WIN !\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tp.act();\n\t\t}\n\t\tif (this.isFinished()) {\n\t\t\tSystem.out.println(\"You WIN !\");\n\t\t}\n\t\n\t\t\n\t}", "public void performActions(){\n GameInformation gi = this.engine.getGameInformation();\n\n if(gi.getTeam() == 0)\n this.engine.performPlayerAction(\n new MoveAction(src, dst)\n );\n\n }", "public void play() {\n field.draw();\n userTurn();\n if(! field.isFull()) {\n computerTurn();\n }\n }", "public void play() throws FileNotFoundException, IOException, Throwable {\n Time time = new Time();\n initGame();\n printWelcome();\n time.start();\n data.logWrite(System.lineSeparator() + System.lineSeparator() + \" >>> Starting new game <<< \" + System.lineSeparator() + System.lineSeparator());\n\n boolean finished = false;\n\n while (!finished) {\n Command command = parser.getCommand();\n finished = processCommand(command);\n }\n time.stopTime();\n System.out.println(\"Thank you for playing. Good bye.\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game\");\n //added to shutdown\n System.exit(0);\n }", "public static void runGame() {\n Scanner read = new Scanner(System.in);\n Random generator = new Random();\n \n //get username\n String userName = getUserName(read);\n\n //get number of rounds\n int rounds = getRounds(read, userName);\n \n //play the game!\n playGame(read, generator, userName, rounds);\n }", "public void playGame()\t{\n\t\tString topName = \"none\";\n\t\tboolean isOver = false;\n\t\tint winner = -1;\n\t\tString finalMessage = \"\";\n\t\tint turn;\n\t\twhile(isOver==false)\t{\n\t\t\tfor(turn=0;turn<numPlayers;turn++)\t{\n\t\t\t\tif(isOver==false)\t{\n\t\t\t\t\tif(deck1.isEmpty())\t{\n\t\t\t\t\t\tSystem.out.println(\"\\n+++++Deck is empty!\" + \n\t\t\t\t\t\"Pass or Play Card.+++++\\n\");\n\t\t\t\t\t}\n\t\t\t\t\tif(top!=null)\t{\n\t\t\t\t\t\ttopName = top.toString();\n\t\t\t\t\t\tif(top.getValue()==8)\t{\n\t\t\t\t\t\t\ttopName += \"(Nominated as:\" + top.getChosenSuit() + \")\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(hand[turn].getHandOwner() + \"'s Hand\");\n\t\t\t\t\t\tSystem.out.println(\"Top Card is \" + topName);\n\t\t\t\t\t\tplayMove(turn);\n\t\t\t\t\t\tif(Tie())\t{\n\t\t\t\t\t\t\tisOver = true;\n\t\t\t\t\t\t\twinner = -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\t{\n\t\t\t\t\t\t\tswitch(hand[turn].countCards())\t{\n\t\t\t\t\t\t\t\tcase 0: isOver = true;\n\t\t\t\t\t\t\t\t\twinner = turn;\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 1: System.out.println(\"1 card left!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tSystem.out.println(\"\\n--------------\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(isOver)\t{\n\t\t\tif(winner>-1)\t{\n\t\t\t\tfinalMessage = hand[winner].getHandOwner() + \" wins!\";\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tfinalMessage = \"It's a tie!\";\n\t\t\t}\n\t\t\tSystem.out.println(finalMessage);\n\t\t}\n\t}", "private void playTurn(Player player) {\n\n System.out.println(player.toString() + \"'s turn\");\n\n if (!player.getOccupiedSet().isEmpty())\n while(true) {\n Movement move = player.getMove();\n if (validMove(player, move)) {\n move(player, move);\n break;\n }\n }\n }", "public void doNewGame() {\n setGameInProgress(false);\n console(\"New Game\");\n if (gameInProgress() == true) {\n // This should not be possible, but it doens't hurt to check.\n console(\"Finish the current game first!\");\n return;\n }\n\n boardData.setUpGame(); // Set up the pieces.\n currentPlayer = CheckersData.RED; // RED moves first.\n legalMoves = boardData.getLegalMoves(CheckersData.RED); // Get RED's legal moves.\n selectedRow = -1; // RED has not yet selected a piece to move.\n console(\"Red: Make your move.\");\n setGameInProgress(true);\n refreshBoard();\n }", "public void playRound(CuarentaGame game){\n Player human = game.getHumanPlayer();\n Player computer = game.getComputerPlayer();\n Player activePlayer;\n \n for(int i=0; i<10; i++){\n // For now, human player starts always. This isn't quite intended, but not important right now\n if(i%2==0)\n activePlayer = human;\n else\n activePlayer = computer;\n // choose a card to play\n \n // choose next actions\n \n // add points accordingly\n\n // check win condition\n\n }\n\n human.addPoints(calculatePointsFromDiscardPile(game.getHumanPlayer()));\n computer.addPoints(calculatePointsFromDiscardPile(game.getComputerPlayer()));\n }", "public Game startGame(Game game);", "public void playOneTurn() {\r\n //the number of balls in the game\r\n this.ballCounter = new Counter(this.levelInformation.numberOfBalls());\r\n Sleeper sleeper = new Sleeper();\r\n\r\n this.runner = new AnimationRunner(gui, 60, sleeper);\r\n this.paddle.getRectangle().setUpperLeft(new Point(WIDTH_SCREEN / 2 - (this.levelInformation.paddleWidth() / 2),\r\n HI_SCREEN - 40));\r\n //initialize the balls\r\n initializeBall();\r\n\r\n //start the game by counting down\r\n if (this.sprites != null) {\r\n this.runner.run(new CountdownAnimation(2, 4, this.sprites));\r\n }\r\n //run the game\r\n this.running = true;\r\n this.runner.run(this);\r\n\r\n }", "private void playGame (int numberOfSticks,\n String whoPlaysFirst) {\n System.out.println();\n if (whoPlaysFirst.equals(player1.name()))\n game = new Game (player1, player2,\n numberOfSticks);\n else\n game = new Game (player2, player1,\n numberOfSticks);\n initializePlayerController(player1);\n initializePlayerController(player2);\n while (!game.gameOver()) {\n game.play();\n reportPlay(game.previousPlayer());\n }\n reportWinner(game.winner());\n }", "public void playMove(int turn)\t{\n\t\tString command;\n\t\tint index = -1;\n\t\tCard dealt;\n\t\tCard drawn;\n\t\tboolean illegal = false;\n\t\tSystem.out.println(\"\\n\" + hand[turn].toString() + \"\\n\");\n\t\tSystem.out.println(\"Choose a number, or 'd' for draw, or 'p' for pass.\");\n\t\tcommand = input.nextLine();\n\t\trecord[turn] = command;\n\t\tif(command.equalsIgnoreCase(\"d\"))\t{\n\t\t\tdrawn = deck1.deal();\n\t\t\tif(drawn!=null)\t{\n\t\t\t\thand[turn].addCard(drawn);\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.print(\"\\n+++++No cards in deck!\");\n\t\t\t}\n\t\t\tplayMove(turn);\n\t\t}\n\t\telse if(command.equalsIgnoreCase(\"p\"))\t{\n\t\t\tif(deck1.isEmpty() || !hand[turn].playable(top))\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.print(\"\\n+++++Cannot pass!+++++\\n\");\n\t\t\t\tplayMove(turn);\n\t\t\t}\n\t\t}\n\t\telse\t{\n\t\t\tif(isNumber(command))\t{\n\t\t\t\tindex = Integer.parseInt(command);\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.println(\"Invalid Command!\");\n\t\t\t\tplayMove(turn);\n\t\t\t}\n\t\t\tif(index>=0 && index<hand[turn].countCards())\t{\n\t\t\t\tdealt = hand[turn].seekCard(index);\n\t\t\t\tif(top.getValue()!=8)\t{\n\t\t\t\t\tif(top.getSuit().equals(dealt.getSuit()) || \n\t\t\t\t\t\t\ttop.getValue()==dealt.getValue() || \n\t\t\t\t\t\t\tdealt.getValue()==8)\t{\n\t\t\t\t\t\tif(dealt.getValue()==8)\t{\n\t\t\t\t\t\t\tdealt.setSuit(chooseSuit());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\t{\n\t\t\t\t\t\tillegal = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\t{\n\t\t\t\t\tif(dealt.getValue()==8 || \n\t\t\t\t\t\t\ttop.getChosenSuit().equalsIgnoreCase(dealt.getSuit()))\t{\n\t\t\t\t\t\tillegal = false;\n\t\t\t\t\t}\n\t\t\t\t\telse\t{\n\t\t\t\t\t\tillegal = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(illegal)\t{\n\t\t\t\t\tSystem.out.println(\"Illegal Move!\");\n\t\t\t\t\tplayMove(turn);\n\t\t\t\t}\n\t\t\t\telse\t{\n\t\t\t\t\ttop = dealt;\n\t\t\t\t\thand[turn].removeCard(index);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\t{\n\t\t\t\tSystem.out.println(\"Card does not exist!\");\n\t\t\t\tplayMove(turn);\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "@Override\n public void run() {\n if (plugin.getGm().getPlayersInGame().size() < plugin.getAm().getMinPlayers()) {\n plugin.getGm().setCheckStart(true);\n plugin.getServer().getOnlinePlayers().forEach(pl -> pl.setLevel(0));\n GameState.state = GameState.LOBBY;\n cancel();\n return;\n }\n \n plugin.getGm().getPlayersInGame().stream().forEach(players -> {\n plugin.getMsg().sendActionBar(players, \"&a&lEl juego empieza en: \" + count);\n });\n\n switch (count){\n case 30:\n plugin.getMsg().sendBroadcast(\"&7El juego empezará en &c30 &7segundos\");\n break;\n case 5:\n GameState.state = GameState.GAME;\n plugin.getGm().getPlayersInGame().forEach(p -> {\n plugin.getAm().teleport(p);\n TntWars.getPlayer(p).setCleanPlayer(GameMode.SURVIVAL);\n });\n break;\n case 4:\n case 3:\n case 2:\n case 1:\n plugin.getMsg().sendBroadcast(\"&7El juego empezará en &c\" + count + \" &7segundos\");\n plugin.getGm().getPlayersInGame().forEach(p -> p.playSound(p.getLocation(), Sound.NOTE_PLING, 1F, 1F));\n break;\n case 0:\n plugin.getGm().setDañoEnCaida(false);\n\n //Iniciar hilo de la fase de esconder (Ja, still nope)\n new GameTask(plugin).runTaskTimer(plugin, 20, 20);\n cancel();\n break;\n }\n --count; \n }", "public void playTurn() {\r\n\r\n }", "public void play() \n { \n if (!gameLoaded)\n {\n String msg = \"The game has not been loaded\";\n System.out.println(msg);\n SystemLog.getErrorLog().writeToLog(msg);\n SystemLog.saveAllLogs();\n return;\n }\n \n // Setup Timer\n timer = new Timer();\n timer.schedule(timeHolder, 0, 1000);\n \n // Setup user input\n parser = new Parser();\n }", "public boolean playMove(String input_command) {\n // This function will take a command, validates input and calls for a move for a\n // player\n // whoes turn is there.\n String[] inputs = input_command.split(\" \");\n String move = inputs[0];\n PlayerController playerController = getNextPlayer();\n this.playerControllerList.remove(playerController);\n System.out.println(\"\\nPlayer\" + playerController.getPlayerId() + \" choosed:\" + input_command + \" move\");\n System.out.println(\"Before playing move=>\" + getStateOfPlayer(playerController));\n System.out.println(\"Before playing move=> Board State:\" + getStateOfBoard());\n switch (move) {\n case \"STRIKE\":\n this.gameController.strikeMove(playerController);\n break;\n case \"MULTI_STRIKE\":\n // We should take one more input that is count of striked coins\n this.gameController.multiStrikeMove(playerController, Integer.parseInt(inputs[1]));\n break;\n case \"RED_STRIKE\":\n this.gameController.redStrikeMove(playerController);\n break;\n case \"NONE\":\n this.gameController.noneMove(playerController);\n break;\n case \"DEFUNCT_COIN\":\n if(inputs[1].equals(\"BLACK\")){\n this.gameController.defunctCoinMove(playerController, CoinType.BLACK);\n }else if(inputs[1].equals(\"RED\")){\n this.gameController.defunctCoinMove(playerController, CoinType.RED);\n }\n break;\n case \"STRIKER_STRIKE\":\n this.gameController.strikerStrikeMove(playerController);\n break;\n }\n this.playerControllerList.add(playerController);\n System.out.println(\"After playing move=> Board State:\" + getStateOfBoard());\n System.out.println(\"After playing move=>\" + getStateOfPlayer(playerController) + \"\\n\");\n changeTurn();\n PlayerController winner = calculateWinner();\n if (winner != null) {\n System.out.println(\"Winner is:Player\" + winner.getPlayerId() + \" having points:\" + winner.getPoints());\n return false;\n } else {\n if (this.gameController.isBoardEmpty() == true) {\n System.out.println(\"Match is draw\");\n return false;\n }\n }\n return true;\n }", "void playGame() {\n boolean done = false;\n\n printIntro();\n addPlayers();\n\n while (!done && !hasWinner()) {\n for (Player player : list) {\n Card nextCard = draw();\n nextRoll++;\n\n if (nextCard != null) {\n System.out.println(player + \" roll \" + nextCard);\n board.move(player, nextCard);\n } else {\n done = true;\n break;\n }\n }\n }\n if (!hasWinner()) {\n System.out.println(\"No winner\");\n } else {\n System.out.println(determineWinner());\n }\n }", "public GameTypeWrapper playGame();", "public void run() {\n\t\t\n\t\t//* Initializing starting variables ** //\n\t\t\n\t\tturns = NTURNS;\n\t\tstartturn = true; \n\t\tgameover = false;\n\t\t\t\t\n\t\t//* setup game board** //\n\t\t\n\t\tturns--;\n\t\tsetupBricks();\n\t\tsetupPaddle();\n\t\tsetupScoreboard();\n\n\t\t\n\t\n\t\t//* play game** //\n\t\t\t\t\n\t\t\n\t\twhile (turns >= 0) {\n\t\t\t\n\t\t\tif (startturn == true) {\n\t\t\t\t// starttext = new GLabel(\"Click mouse to start turn\", WIDTH / 2, HEIGHT / 2);\n\t\t\t\t// add(starttext);\n\t\t\t\tupdateScoreboard();\n\t\t\t\tplayBall();\n\t\t\t\twaitForClick();\n\t\t\t\tstartturn = false;\n\t\t\t}\n\t\t\t\n\t\t\tcheckWalls();\n\t\t\tcheckCollision();\n\t\t\tmoveBall();\n\t\t\tcheckWin();\n\n\t\t}\n\t\tshowLose();\n\t\t\n\t}", "public void playTheGame() {\n\t\tboolean gameIsOver = false;\n\t\tdo{\n\t\t\tcheckIfPiecedCanBeDroppedIn(column_number);\n\t\t\tdropPieces(column_number,gamePiece);\n\t\t\tif ( didLastMoveWin() ) {\n\t\t\t\tgameIsOver = true;\n\t\t\t}\n\t\t\tSystem.out.println(\"A\"+didLastMoveWin());\n\t\t\tSystem.out.println(\"b\"+gameIsOver);\n\t\t}while(! gameIsOver);\n\t}", "GameState performMove(String guid, String username, int x, int y) throws GameStateException, GamePlayException;", "public void play()\n {\n if(board.getNumberOfDisks() == (board.size()*board.size()))\n {\n playing = false;\n message.setText(\"It is a Tie!\");\n }\n else\n {\n message.setFont(new Font(message.getName(), Font.BOLD, 28));\n int status = board.getStatus();\n if(status == 1)\n {\n errorSound();\n message.setText(\"Outside of boundaries location, try again.\");\n }\n else if(status == 2)\n {\n errorSound();\n message.setText(\"Coordinate already used, try again.\");\n }\n else if (status == 3)\n {\n message.setText(\"Congratulations Player 1, you won!\");\n playWinSound();\n playing = false;\n }\n else if(status == 4)\n {\n message.setText(\"Congratulations Player 2, you won!\");\n playWinSound();\n playing = false;\n }\n else if(status == 0)\n {\n diskAddedsound();\n if(board.getNumberOfDisks() % 2 == 0) {message.setText(\"Player 1 please choose a new position!\");}\n else if (board.getNumberOfDisks() % 2 == 1) {message.setText(\"Player 2 please choose a new position!\");}\n }\n }\n }", "public void playGame()\r\n\t{\r\n\t\tSystem.out.println(\"Welcome to BlackJack! \\n\");\r\n\t\t\r\n\t\t// Boolean value to tell evaluateWin() method when the final win evaluation must be made\r\n\t\tboolean finalCheck = false;\r\n\t\t\r\n\t\tcardDeck.getDeck();\r\n\t\t\r\n\t\tSystem.out.println(\"Dealing cards...\");\r\n\t\t\r\n\t\t// Each player gets 2 cards to start\r\n\t\tplayer1.hit( cardDeck.draw() );\r\n\t\tplayer1.hit( cardDeck.draw() );\r\n\t\tdealer.hit( cardDeck.draw() );\r\n\t\tdealer.hit( cardDeck.draw() );\r\n\t\t\r\n\t\t// displays current cards\r\n\t\tdisplayPlayerCards(PLAYER1_ID);\r\n\t\tdisplayPlayerCards(DEALER_ID);\r\n\t\t\r\n\t\t// checks for win\r\n\t\tevaluateWin(finalCheck);\r\n\t\t\r\n\t\t// begins player1 turns\r\n\t\tplayerTurns();\r\n\t\t\r\n\t\t// begins dealer turns\r\n\t\tdealerTurns();\r\n\t\t\r\n\t\t// instructs evaluateWin to make final victory check\r\n\t\tfinalCheck = true;\r\n\t\tevaluateWin(finalCheck);\r\n\t\t\r\n\t\t// Cleans up objects\r\n\t\tcardDeck.newDeck();\r\n\t\tplayer1.resetHand();\r\n\t\tdealer.resetHand();\r\n\t}", "public void makeRandomMove() {\n\t\ttry{\r\n\t\t\tif (playerId == game.getState().getTurn()){\r\n\t\t\t\tgame.execute(randPlayer.requestAction(game.getState()));\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(IllegalArgumentException e){\r\n\t\t\t\r\n\t\t}\r\n\t}", "public void play(){\n\n gameRounds++;\n mRound = new Round(players);\n mRound.beginRound();\n\n }", "public void startGame() {\n\t\tfor(Chess.RowConfiguration rowConfiguration : Chess.getRowConfigurations()) {\n\t\t\tint row = rowConfiguration.row;\n\t\t\tClass[] pieceClasses = rowConfiguration.pieces;\n\t\t\tChess.Color sideColor = rowConfiguration.sideColor;\n\n\t\t\tfor(int col = 0; col < Chess.NUM_COLS; col++) {\n\t\t\t\taddPiece(pieceClasses[col], sideColor, board.getSpot(row, col));\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.inPlay = true;\n\t\t\n\t\tstartNewTurn();\n\t\t\n\t\tif(eventListener != null) {\n\t\t\teventListener.onGameStarted();\n\t\t}\n\t}", "public Bot startGame(){\n\t\t\n\t\ttable.addObserver(this); //to keep scores.\n\t\ttable.addObserver(players.get(0)); //observer pattern to notify players via events.\n\t\ttable.addObserver(players.get(1));\n\t\ttable.addObserver(players.get(2));\n\t\ttable.addObserver(players.get(3));\n\t\t\n\t\ttable.putInitialCards(deck.getFourCards());\n\t\t\n\t\twhile(!deck.isEmpty()){\n\t\t\t//deal cards\n\t\t\tfor(Bot bot : players){\n\t\t\t\tbot.setHand(deck.getFourCards());\n\t\t\t}\n\t\t\t\n\t\t\t//start playing\n\t\t\tfor(int i = 0 ; i < 4 ; i++){\n\t\t\t\tfor(Bot bot : players){\n\t\t\t\t\tcurrentPlayer = bot;\n\t\t\t\t\tCard cardToThrow = currentPlayer.throwACard();\n//\t\t\t\t\tSystem.out.println(\"Bot \"+ currentPlayer.toString() + \" threw \" + cardToThrow.toString());\n\t\t\t\t\ttable.putOnPile(cardToThrow);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//award last pile winner\n\t\tplayers.get(lastWinnerId).addPoints(Table.calculatePoints(table.getCardsOnPile()));\n\t\tplayers.get(lastWinnerId).addWonCards(table.getCardsOnPile().size());\n//\t\tSystem.out.println(\"Last pile goes to [\"+players.get(lastWinnerId).toString()+\"]\");\n\t\ttable.clearPile();\n\t\t\n\t\t\n\t\t//award most card winner\n\t\tCollections.sort(players, new CompareByWonCardSize()); // sort players by most cards won.\n\t\tplayers.get(3).addPoints(3); // last one has most cards.\n//\t\tSystem.out.println(\"The bot [\"+players.get(3).toString()+\"] won the most cards so it gets bonus 3 points!\");\n\t\t\t\t\n//\t\tSystem.out.println(\"### SCORES ###\");\n\t\tCollections.sort(players, new CompareByPoints()); // sort by points\n\t\t\n\t\tBot winner = players.get(3);\n//\t\tSystem.out.println(\"WINNER IS: \"+ winner);\n\t\t\n\t\treturn winner;\n\t}", "private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\n }", "public void run() {\n board = new Board();\n\n // Initialiseer de game board and\n // print this with empty content\n initGame();\n board.paint();\n\n //speel één maal (spelers spelen om de beurt)\n do {\n playerTurn(currentPlayer);\n board.paint();\n updateGame(currentPlayer);\n\n // game-over ? print een message\n if (currentState == GameState.CROSS_WON) {\n System.out.println(\"'X' won! thanks for playing!\");\n } else if (currentState == GameState.NOUGHT_WON) {\n System.out.println(\"'O' won! thanks for playing!\");\n } else if (currentState == GameState.DRAW) {\n System.out.println(\"It's Draw! thanks for playing!\");\n }\n // andere speler's beurt\n currentPlayer = (currentPlayer == Mark.CROSS) ? Mark.NOUGHT : Mark.CROSS;\n }\n // repeat tot game-over\n while (currentState == GameState.PLAYING);\n\n }", "@Test\n void moveWithinPLAYING() {\n getGame().start();\n assertThat(getGame().isInProgress()).isTrue();\n getGame().move(getPlayer(), Direction.EAST);\n assertThat(getPlayer().isAlive()).isTrue();\n verifyZeroInteractions(observer);\n assertThat(getGame().isInProgress()).isTrue();\n }", "public void startGame() {\n\t\tSystem.out.println(\"************************\");\n\t\tSystem.out.println(\"* Medieval Warriors *\\n* the adventure *\");\n\t\tSystem.out.println(\"************************\");\n\t\tSystem.out.print(\"Enter your name: \");\n\n\t\tthis.playern = new Player(sc.nextLine());\n\t\tSystem.out.println(\"************************\");\n\t\tSystem.out.println(\"Welcome \" + playern.getName() + \" The Warrior\\n\");\n\t\t\n\t\tint input = -1;\n\t\twhile (!wonGame && !lostGame) {\n\t\t\tprintMainMenu();\n\t\t\tSystem.out.print(\"> \");\n\t\t\tinput = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tswitch(input) {\n\t\t\t\tcase 1:\n\t\t\t\t\tgoAdventure();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tgoToTavern();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tgoCharacter();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.println(\"Bye!\");\n\t\t\t\t\tlostGame = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (wonGame) {\n\t\t\tSystem.out.println(\"Congratulations! You won The Game!\");\n\t\t}\n\n\t}", "public void playGame() {\n \t\n \t//Starts up window for graphical display of game\n MainWindow window = new MainWindow();\n window.launchWindow();\n \n boolean playing = true;\n int attacker, defender;\n Attack attack;\n Response response;\n /*\n * Each iteration of this loop is one player's turn.\n */\n while (playing) {\n /*\n * For now we do debug output. Before going ot production we would want to change this,\n * and at least shop showing all secret Ship placement at every turn.\n */\n //printDebugState(0);\n // printDebugState(1);\n\n attacker = currentPlayer;\n defender = otherPlayer(currentPlayer);\n\n \n /*\n * First gather an Attack\n */\n if (isAI[attacker]) { // It is an AI's turn\n attack = players[attacker].makeAttack(playerShips[1]); //makeAttack takes the players Ship array to check and see if it gets a hit\n } else { // It is a human's turnids[1\n attack = consoleGetAttack(attacker);\n }\n\n System.out.println(\"Player \" + currentPlayer +\n \" attacks at (\" + attack.getRow() + \",\" + attack.getColumn() + \")\");\n \n /*\n * Deliver the attack and collect the Response\n */\n if (isAI[defender]) { // The defender is an AI\n response = players[defender].receiveAttack(attack);\n } else { // It is a human's turn\n response = consoleGetResponse(attack, defender);\n }\n\n switch (response.getResult()) {\n case Response.HIT:\n System.out.println(\"It's a HIT!\");\n break;\n case Response.MISS:\n System.out.println(\"It's a MISS!\");\n break;\n case Response.SUNK:\n System.out.println(\"Ship sunk: \" + response.getShipName());\n \n break;\n case Response.ALLSUNK:\n System.out.println(\"Ship sunk: \" + response.getShipName());\n System.out.println(\"Game over; player \" + currentPlayer + \" wins!\");\n playing = false;\n break;\n }\n \n \n /*\n * Return the Response to the Attacker\n */\n if (isAI[currentPlayer]) { // It is an AI's turn\n players[currentPlayer].receiveResponse(response);\n } else { // It is a human's turn\n }\n\n /*\n * Finally update the UI's instance variables\n */\n if (response.getResult() == Response.MISS) {\n grids[currentPlayer].set(attack.getRow(), attack.getColumn(), Grid.MISS);\n } else {\n grids[currentPlayer].set(attack.getRow(), attack.getColumn(), Grid.HIT);\n }\n changeCurrentPlayer();\n } // while (true) -- Continue playing turns until the game ends\n }", "private void promptTurn()\n \t{\n \t\tUserInfo curr;\n\t\tString meow;\n \t\tcurr = players[turnIndex];\n \t\tString[] tokens;\n \t\tint x;\n \t\tint y;\n \t\n// PROTOCOL \t\n \t\tcurr.sendMessage(prtcl.makePacket(\"Please enter a move\", \"message\")); \n\t\tmeow = curr.getMessage();\n\t\ttokens = meow.split(\" \");\n// PROTOCOL\n \t\tx = Integer.parseInt(tokens[0]);\n \t\ty = Integer.parseInt(tokens[1]);\n \t\n \t\t// Should have a method to process the user's input, and provide an error message back to them if necessary. \n \t\tif(game.remove(x, y))\n \t\t{\n \t\t\tplayers[(turnIndex + 1) % 2].sendMessage(prtcl.makePacket(\"Other player took \" + tokens[0] + \" items from row \" + tokens[1] + \".\", \"message\"));\n \t\t\tbroadcast(prtcl.makePacket(game.toString(), \"message\"));\n \t\t\t// This is where the check to see if the game is won occurs. If so, a winner (the person who just moved) is \n \t\t\t// congratulated. \n \t\t\tif(!game.isDone())\n \t\t\t{\n \t\t\t\tturnIndex += 1;\n \t\t\t\tturnIndex %= 2;\n \t\t\t}\n \t\t} else\n \t\t{\n // PROTOCOL\n \t\t\tplayers[turnIndex].sendMessage(prtcl.makePacket(\"Something was wrong with that. Try again.\", \"ERROR\"));\n // PROTOCOL\n \t\t}\t\n \t}", "public void turns() {\n\t\tint temp = 0;\n\t\tthis.startOrder();\n\t\tSystem.out.println(\"_______________________________________________\");\n\t\tfor (Player p : this.playerList) {\n\t\t\ttemp++;\n\t\t\tp.play(this);\n\t\t\t//System.out.println(\"Player \" + temp + \"'s melds: \" + p.getMelds());\n\t\t\tSystem.out.println(\"_______________________________________________\");\n\t\t}\n\t}", "@Override\r\n public void makeMove(Board board) {\n System.out.println(\"Next to Play: \" + SidetoString(switchSide(board.currentSide))); //Prompt information, similar to example script.\r\n System.out.println(PlayertoString());\r\n System.out.println(\"This is probably a good move!\");\r\n Random random = new Random();\r\n List<Move> MovePool = board.getAllValidMovesForPlayers(getSide()); //Get all available Moves.\r\n float StartTime = System.nanoTime();\r\n Move move = MovePool.get(random.nextInt(MovePool.size())); //Get a random Move.\r\n float EndTime = System.nanoTime();\r\n board.processMove(move, getSide()); //Make Move then print out time taken, similar to example script.\r\n System.out.println(\"Move made: \" + board.PieceTypeToString(board.getPieceType(move.sequence.get(move.length - 1).end_row, move.sequence.get(move.length - 1).end_col)) + \": \" + move.toString());\r\n TurnTime = ((EndTime - StartTime) / 1000000000.f);\r\n System.out.format(\"Time taken: %.3f\\n\", TurnTime);\r\n TotalTimeTaken += TurnTime;\r\n TurnTime = 0;\r\n }", "public void advanceGame() {\n\t\tthis.status = Status.Active;\n\t\tthis.currentSuggestion = null;\n\t\tfor(User u : this.players) {\n\t\t\tu.availableActions.remove(ACTION.Wait);\n\t\t\tu.availableActions.remove(ACTION.Disprove);\n\t\t}\n\t\t\n\t\t// Next player can always move\n\t\tUser nextPlayer = null;\n\t\tdo {\n\t\t\tnextPlayer = getFollowingPlayer(this, this.getCurrentPlayer());\n\t\t\tif (nextPlayer.isActive) {\n\t\t\t\tnextPlayer.availableActions.add(ACTION.Move);\n\t\t\t\tif (this.board.getLocation(nextPlayer.character).isRoom) {\n\t\t\t\t\tnextPlayer.availableActions.add(ACTION.Accuse);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrentMove++;\n\t\t} while (!nextPlayer.isActive);\n\t\t\n\t\tif (activeUserCount(this) == 1) {\n\t\t\t// Last player remaining is the winner (by default)\n\t\t\tthis.status = Status.Complete;\n\t\t\tmessages.add(String.format(\"[ %s ] has won the game (by default)!\", nextPlayer.name));\n\t\t}\n\t}", "private void playGame(Board game, Symbols symbol) {\n\n Display board = new Display(); \n Position pos = new Position();\n\n board.setGrid(symbol); \n board.displayGrid();\n\n char turn = Symbols.X.getValue();\n boolean gameOver = false; \n\n while (gameOver != true) {\n game.playerTurn(turn);\n symbol = game.symbolTurn(turn, symbol);\n System.out.println(\" \" + \"(\" + symbol + \")\");\n board.promptInput(game, board, symbol, pos);\n board.executeMove(pos, symbol); \n board.displayGrid(); \n if(game.gameFinished(board, game, turn) == true) {\n gameOver = true; \n }\n\n turn = game.switchTurn(turn); \n }\n }", "@Override\r\n public int playGameLoop() {\r\n return 0;\r\n }", "public void launchTurn() {\n \twhile (getCurrentPlayer() instanceof AbstractIA) {\n \t\tSystem.out.println(\"Some thing happen or nothing\");\n \t\tjouerIA();\n \t\tendTurn();\n \t\t//setCurrentPlayer(getJoueur1());\t\n \t}\n \t\n }", "public void gameUpdate() {\n\t\t\n\t\t// Remember our homeTilePosition at the first frame\n\t\tif (bwapi.getFrameCount() == 1) {\n\t\t\tint cc = BuildManager.getInstance().getNearestUnit(UnitTypes.Terran_Command_Center.ordinal(), 0, 0);\n\t\t\tif (cc == -1) cc = BuildManager.getInstance().getNearestUnit(UnitTypes.Zerg_Hatchery.ordinal(), 0, 0);\n\t\t\tif (cc == -1) cc = BuildManager.getInstance().getNearestUnit(UnitTypes.Protoss_Nexus.ordinal(), 0, 0);\n\t\t\thomePositionX = bwapi.getUnit(cc).getX();\n\t\t\thomePositionY = bwapi.getUnit(cc).getY();\n\t\t\n\t\t\tResourceManager.getInstance().gameStart(bwapi.getMyUnits());\n\t\t}\n\t\t\n\t\t/*\n\t\tif(ResourceManager.getInstance().numWorkers() == 10 && ScoutManager.getInstance().numScouts() == 0) {\n\t\t\tbwapi.printText(\"Assigning a scout\");\n\t\t\tneedsScout();\n\t\t}\n\t\t*/\n\t\t\n\t\tfor (Manager manager : managers.values())\n\t\t\tmanager.gameUpdate();\n\t\t\n\t\t// Draw debug information on screen\n\t\tdrawDebugInfo();\n\n\t\t\n\t\t// Call the act() method every 30 frames\n\t\tif (bwapi.getFrameCount() % 30 == 0) {\n\t\t\tact();\n\t\t}\n\t}", "private static void move() {\r\n\t\ttry {\r\n\t\t\tThread.sleep(timer);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\trunTime += timer;\r\n\t\tif (runTime > stepUp) {\r\n\t\t\ttimer *= 0.9;\r\n\t\t\tstepUp += 5000;\r\n\t\t}\r\n\r\n\t\tupdateSnake(lastMove);\r\n\t\t// updateField();\r\n\r\n\t\tif (score >= 10 && (r.nextInt(40) == 0)) {\r\n\t\t\taddFood(MOUSE);\r\n\t\t}\r\n\t\tif (score >= 30 && (r.nextInt(50) == 0)) {\r\n\t\t\taddFood(POISON);\r\n\t\t}\r\n\t}", "public void playGame() throws InterceptionException, TimeoutException {\n\n\t\tint timer = 0; // counts waiting time in s\n\t\tPoint endTurn = findImageLocation(waitForPictures(Pictures.endTurn));\n\t\tclickCoin();\n\n\t\twhile (checkGameEnd()) {\n\n\t\t\tfor (int i = 0; i < coinTimes; i++) {\n\t\t\t\tclickCoin();\n\t\t\t}\n\n\t\t\tclickAllShop();\n\n\t\t\tclickCoord(endTurn);\n\n\t\t\twait(6000);\n\t\t\ttimer += 9;\n\t\t\tif (timer > 30 * 60) {\n\t\t\t\tthrow new TimeoutException(\"Game lasted longer than 30 mins!\");\n\t\t\t}\n\n\t\t}\n\n\t}", "public void play() {\r\n\t\tif (logger.isDebugEnabled())\r\n\t\t\tlogger.debug(\"Play\");\r\n\t\t\r\n\t\t// Start game\r\n\t\tif (state == GameState.CREATED) {\r\n\t\t\t// Change state\r\n\t\t\tstate = GameState.PLAYING;\r\n\t\t\t\r\n\t\t\t// Start scheduling thread\r\n\t\t\tstart();\r\n\t\t}\r\n\t\t// Resume game\r\n\t\telse if (state == GameState.PAUSED || state == GameState.WAITING_FRAME) {\r\n\t\t\t// Change state\r\n\t\t\tstate = GameState.PLAYING;\r\n\t\t\t\r\n\t\t\t// Wake scheduling thread up\r\n\t\t\twakeUp();\r\n\t\t}\r\n\t}" ]
[ "0.7882032", "0.7750897", "0.7683599", "0.76018745", "0.74930656", "0.7428573", "0.7304277", "0.72801965", "0.71961766", "0.71775925", "0.7169694", "0.7132023", "0.7129813", "0.709345", "0.70650625", "0.7060682", "0.70266", "0.7016351", "0.7012349", "0.69928384", "0.69460136", "0.6939007", "0.6929408", "0.6907037", "0.6903216", "0.6859993", "0.684603", "0.6830736", "0.68267876", "0.6824645", "0.6742929", "0.67260075", "0.66958225", "0.66857374", "0.66721827", "0.66678244", "0.66200227", "0.6603814", "0.6599711", "0.6568397", "0.6565967", "0.65600735", "0.655325", "0.65489113", "0.6544823", "0.65278685", "0.6524696", "0.65226406", "0.65140116", "0.65103817", "0.65077734", "0.6504507", "0.65040565", "0.6491635", "0.6488599", "0.6484499", "0.6473163", "0.6468709", "0.6461467", "0.6454893", "0.64435035", "0.64388263", "0.64231217", "0.6414038", "0.64134157", "0.64115185", "0.6401384", "0.63932264", "0.6385432", "0.63644224", "0.6362361", "0.63500726", "0.63485765", "0.6343812", "0.63384914", "0.63362575", "0.6335327", "0.6332246", "0.6323734", "0.63171154", "0.6304359", "0.6302", "0.6300173", "0.6298606", "0.62913334", "0.6289089", "0.6286811", "0.6274602", "0.626732", "0.6261763", "0.6253318", "0.6250333", "0.6245047", "0.6241276", "0.6231285", "0.6223132", "0.62165624", "0.6211768", "0.62103504", "0.6209651", "0.6205788" ]
0.0
-1
Defines whether player decided to move or not
private boolean canMove() { return !(bestMove[0].getX() == bestMove[1].getX() && bestMove[0].getY() == bestMove[1].getY()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean changeMove();", "void setMoving(boolean isMoving);", "boolean canMove();", "boolean makeMove();", "boolean isMoving();", "private static boolean canMove() {\n return GameManager.getCurrentTurn();\r\n }", "public boolean moveOn() {\n\t\t\n\t}", "public abstract boolean canMove();", "boolean doMove();", "public boolean GetMove();", "private void updatePlayerMovingStatus(){\n // get player's moving status\n if(keyPressed.contains(KeyCode.LEFT)){\n player.setFacing(Direction.LEFT);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.RIGHT)){\n player.setFacing(Direction.RIGHT);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.UP)){\n player.setFacing(Direction.UP);\n player.setIsMoving(true);\n } else if(keyPressed.contains(KeyCode.DOWN)){\n player.setFacing(Direction.DOWN);\n player.setIsMoving(true);\n } else {\n player.setIsMoving(false);\n }\n }", "public boolean canMove()\n {\n return canMove;\n }", "public boolean isMoving() {\n return moving;\n }", "public boolean canMove() {\r\n return (state == State.VULNERABLE || state == State.INVULNERABLE);\r\n\r\n }", "public boolean move();", "public boolean isMoving() {\r\n\t\treturn moving;\r\n\t}", "protected boolean move(int m, boolean player)\n { int status = game.move(m, player);\n if ( status == TicGame.NOMOVE )\n return false;\n repaint();\n if ( status == TicGame.WIN_X ||\n status == TicGame.WIN_O )\n winner(); \n return true;\n }", "@Override\r\n\tpublic boolean canMove() {\r\n\t\treturn false;\r\n\t}", "public boolean setPlayerToMove(Player aNewPlayerToMove)\n {\n boolean wasSet = false;\n if (aNewPlayerToMove != null)\n {\n playerToMove = aNewPlayerToMove;\n wasSet = true;\n }\n return wasSet;\n }", "public abstract boolean attemptMove(Player currentPlayerObj, Coordinate move);", "void move() {\r\n\t\tif (x + xa < 0){\r\n\t\t\txa = mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\telse if (x + xa > game.getWidth() - diameter){\r\n\t\t\txa = -mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\tif (y + ya < 0){\r\n\t\t\tya = mov;\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\telse if (y + ya > game.getHeight() - diameter){\r\n\t\t\tgame.gameOver();\r\n\t\t\tgame.puntuacion++;\r\n\t\t}\r\n\t\tif (colisionPalas()){\r\n\t\t\tya = -mov;\r\n\t\t}\r\n\t\telse if(colisionEstorbos()){\r\n\t\t\tgame.puntuacion+=2;\r\n\t\t}\r\n\t\t\r\n\t\tx = x + xa;\r\n\t\ty = y + ya;\r\n\t}", "public boolean isMoving()\n\t{\n\t\treturn (mode == MotorPort.FORWARD || mode == MotorPort.BACKWARD);\n\t}", "boolean prepareToMove();", "@objid (\"7f09cb7d-1dec-11e2-8cad-001ec947c8cc\")\n public boolean allowsMove() {\n return true;\n }", "public boolean requestMove() {\r\n if (game != null) {\r\n player.getMove();\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public final boolean isMoving() {\r\n\t\treturn moveStart > 0;\r\n\t}", "public boolean canMove() {\n return (Math.abs(getDist())>=50);\n }", "public abstract boolean doComputerMove(Player player);", "public boolean canMove()\n\t{\n\t\tif(delayMove>compareSpeed())\n\t\t{\n\t\t\tdelayMove=0;\n\t\t\treturn true;\n\t\t\t\n\t\t}else\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean move() {\n\t\tint nextDirection;\n\t\tint pacmanX = parent.getPacManX();\n\t\tint pacmanY = parent.getPacManY();\n\t\t\n\t\tint[] directionPriority = new int[4];\n\t\t/** The direction is added to the priority in order to achieve it once the move is chosen */\n\t\tdirectionPriority[0]=(pacmanX-pixelLocationX)*(10)*state+GameCharacter.RIGHT;\n\t\tdirectionPriority[1]=((pacmanX-pixelLocationX)*(-10)*state+GameCharacter.LEFT);\n\t\tdirectionPriority[2]=(pacmanY-pixelLocationY)*(10)*state+GameCharacter.DOWN;\n\t\tdirectionPriority[3]=((pacmanY-pixelLocationY)*(-10)*state+GameCharacter.UP);\n\t\tArrays.sort(directionPriority);\n\t\t\n\t\tint i=3;\n\t\t\n\t\tdo {\n\t\t\tnextDirection = directionPriority[i]%10;\n\t\t\tif (nextDirection < 0) {\n\t\t\t\tnextDirection += 10;\n\t\t\t}\n\t\t\tif(isLegalMove(nextDirection) && (Math.abs(nextDirection-currentDirection) != 2) || i==0) {\n\t\t\t\tsetDirection(nextDirection);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\t\twhile (i>=0);\n\t\treturn super.move();\n\t}", "public void movementStrategy() {\n System.out.println(\"Player has chosen\" + this.playerMovement);\n }", "public void setMoving(boolean isMoving) {\r\n\t\tthis.isMoving = isMoving;\r\n\t}", "public void setMoving(boolean TorF) {\n this.moving = TorF;\n }", "public boolean isMoving() {\n\t\treturn moveProgress > 0;\n\t}", "private boolean isPlayer1Move(int move) {\n return ((move < 5) || (move == 10));\n }", "public boolean isMoving() {\n\t\treturn state.getDirection() != Direction.STATIONARY;\n\t}", "public void setDirectionMove(double direction);", "public void setMoved() {\r\n\t\tmoved = true;\r\n\t}", "void playerMove(State state);", "public void tryMove() {\n if(!currentPlayer.getHasPlayed()){\n if (!currentPlayer.isEmployed()) {\n String destStr = chooseNeighbor();\n\n currentPlayer.moveTo(destStr, getBoardSet(destStr));\n if(currentPlayer.getLocation().getFlipStage() == 0){\n currentPlayer.getLocation().flipSet();\n }\n refreshPlayerPanel();\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"Since you are employed in a role, you cannot move but you can act or rehearse if you have not already\");\n }\n }\n else{ \n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end turn your turn.\");\n }\n view.updateSidePanel(playerArray);\n }", "public boolean isMoving() {\n return this.movementComposer.isMoving();\n }", "public static void move(char dir) {\n if (!canMove()) {\r\n return;\r\n }\r\n //do nothing if is moving\r\n if (isMoving) {\r\n return;\r\n }\r\n //set player to moving\r\n isMoving = true;\r\n String debug = \"a\";\r\n switch (dir) {\r\n case 'r':\r\n if (!GridManager.canMoveRight(new Point(GridManager.getGridX(Player.getX())\r\n , GridManager.getGridY(Player.getY())))) {\r\n isMoving = false;\r\n return;\r\n }\r\n onYAxis = false;\r\n current = getX();\r\n target = current + moveDistance;\r\n forward = true;\r\n debug = \"rechts\";\r\n break;\r\n case 'l':\r\n if (!GridManager.canMoveLeft(new Point(GridManager.getGridX(Player.getX())\r\n , GridManager.getGridY(Player.getY())))) {\r\n isMoving = false;\r\n return;\r\n }\r\n onYAxis = false;\r\n current = getX();\r\n target = current - moveDistance;\r\n forward = false;\r\n debug = \"left\";\r\n break;\r\n case 'u':\r\n if (!GridManager.canMoveTop(new Point(GridManager.getGridX(Player.getX())\r\n , GridManager.getGridY(Player.getY())))) {\r\n isMoving = false;\r\n return;\r\n }\r\n onYAxis = true;\r\n current = getY();\r\n target = current - moveDistance;\r\n forward = false;\r\n debug = \"up\";\r\n break;\r\n case 'd':\r\n if (!GridManager.canMoveDown(new Point(GridManager.getGridX(Player.getX())\r\n , GridManager.getGridY(Player.getY())))) {\r\n isMoving = false;\r\n return;\r\n }\r\n onYAxis = true;\r\n current = getY();\r\n target = current + moveDistance;\r\n forward = true;\r\n debug = \"down\";\r\n break;\r\n }\r\n System.out.println(debug);\r\n }", "public boolean makeMove(GameState gameState);", "public boolean allowMove(Point p, int pos);", "public boolean setMove(boolean movable)\n {\n canMove = movable;\n return true;\n }", "@Override\n\tpublic boolean movable(Entity obj) {\n\t\tif (!(obj instanceof Player)) return false;\n\t\tPlayer player = (Player) obj;\n\t\t\n\t\tint futureX = this.getX();\n\t\tint futureY = this.getY();\n\t\t\n\t\t\n\t\tint playerX = player.getX();\n\t\tint playerY = player.getY();\n\t\t\n\t\tif (playerX == this.getX()) {\n\t\t\t// player moving either up or down\n\t\t\tif (playerY > this.getY()) {\n\t\t\t\t// player moving up so check what's up of boulder\n\t\t\t\tfutureY = this.getY() - 1;\n\t\t\t} else {\n\t\t\t\t// player moving down ''\n\t\t\t\tfutureY = this.getY() + 1;\n\t\t\t}\n\t\t} else if (playerY == this.getY()) {\n\t\t\t// player moving either left or right\n\t\t\tif (playerX > this.getX()) {\n\t\t\t\t// player moving left ''\n\t\t\t\tfutureX = this.getX() - 1;\n\t\t\t} else {\n\t\t\t\t// player moving right ''\n\t\t\t\tfutureX = this.getX() + 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean result = checkMoveable(futureX, futureY);\n\t\treturn result;\n\t}", "public boolean canMove ()\n {\n return ((ActiveAdvancer)_advancer).canMove();\n }", "@Override\r\n\tpublic boolean Movement(Player arg0) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean Movement(Player arg0) {\n\t\treturn false;\r\n\t}", "private boolean canMove() {\n\t\tif (System.currentTimeMillis() - lastTrunTime < 300) {// move time is\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 300ms before\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// last move\n\t\t\treturn false;\n\t\t}\n\t\tboolean status = false;\n\t\tif(stage == 1){\n\t\t\tmap = GameView.map;\n\t\t}else if(stage == 2){\n\t\t\tmap = GameViewStage2.map;\n\t\t}else {\n\t\t\tmap = GameViewStage3.map;\n\t\t}\n\t\tif (direction == UP) {// when tank moves up\n\t\t\tif (centerPoint.getY() - speed >= 0) {\n\t\t\t\tif (map[(centerPoint.getY() - speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() - speed) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == DOWN) {\n\t\t\tif (centerPoint.getY() + tankBmp.getHeight() + speed < screenHeight) {\n\t\t\t\tif (map[(centerPoint.getY() + 2 * UNIT + speed) / UNIT][centerPoint\n\t\t\t\t\t\t.getX() / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + UNIT) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT][(centerPoint.getX() + 2 * UNIT) / UNIT] == 0) {\n\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == LEFT) {\n\n\t\t\tif (centerPoint.getX() - speed >= 0) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX() - speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() - speed) / UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (direction == RIGHT) {\n\t\t\tif (centerPoint.getX() + tankBmp.getWidth() + speed < screenWidth) {\n\t\t\t\tif (map[centerPoint.getY() / UNIT][(centerPoint.getX()\n\t\t\t\t\t\t+ 2 * UNIT + speed)\n\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0\n\t\t\t\t\t\t&& map[(centerPoint.getY() + 2 * UNIT) / UNIT][(centerPoint\n\t\t\t\t\t\t\t\t.getX() + 2 * UNIT + speed)\n\t\t\t\t\t\t\t\t/ UNIT] == 0) {\n\t\t\t\t\tstatus = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (status)\n\t\t\tlastTrunTime = System.currentTimeMillis();\n\t\treturn status;\n\t}", "public boolean isMoveable() {\n\t\treturn _moveable;\n\t}", "public boolean hasMoved(){\n\t\treturn getGame().getCurrentPlayer().hasMoved();\n\t}", "private void moveOrTurn() {\n\t\t// TEMP: look at center of canvas if out of bounds\n\t\tif (!isInCanvas()) {\n\t\t\tlookAt(sens.getXMax() / 2, sens.getYMax() / 2);\n\t\t}\n\n\t\t// if we're not looking at our desired direction, turn towards. Else, move forward\n\t\tif (needToTurn()) {\n\t\t\tturnToDesiredDirection();\n\t\t} else {\n\t\t\tmoveForward(2.0);\n\t\t}\n\n\t\t// move in a random direction every 50 roaming ticks\n\t\tif (tickCount % 100 == 0) {\n\t\t\tgoRandomDirection();\n\t\t}\n\t\ttickCount++;\n\t}", "private void checkMovement() {\n\n if (getYVelocity() < 0) state = PlayerState.JUMPING;\n if (getYVelocity() == 0) /*|| getXVelocity() == 0)*/ state = PlayerState.STANDING;\n if (Keyboard.isKeyDown(Keyboard.KEY_W)) {\n\n if (!falling && !floating()) {\n\n if (getYVelocity() >= 0) {\n this.addY(-72);\n }\n\n }\n }\n\n if (Keyboard.isKeyDown(Keyboard.KEY_A)) {\n this.addX((float) -5);\n state = PlayerState.WALKLEFT;\n }\n if (Keyboard.isKeyDown(Keyboard.KEY_D)) {\n this.addX((float) 5);\n state = PlayerState.WALKRIGHT;\n }\n if (getYVelocity() > 0) state = PlayerState.FALLING;\n }", "private void decideMakeAutomaicMove(){\n\t\t\r\n\t\tif (playerMode != PlayerMode.manual){\r\n\t\t\tif (playerMode == PlayerMode.random) makeRandomMove();\r\n\t\t\telse makeSmartMove();\r\n\t\t}\r\n\t}", "@Override\n public void onMove(boolean absolute) {\n \n }", "private void move(){\n \n currentAnimation = idleDown;\n \n if(playerKeyInput.allKeys[VK_W]){\n int ty = (int) (objectCoordinateY - speed + bounds.y) / 16;\n \n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY -= speed;\n currentAnimation = upWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_S]){\n int ty = (int) (objectCoordinateY + speed + bounds.y + bounds.height) / 16;\n if(!collisionDetection((int) (objectCoordinateX + bounds.x)/16, ty)){\n objectCoordinateY += speed;\n currentAnimation = downWalk;\n }\n } \n \n if(playerKeyInput.allKeys[VK_A]){\n int tx = (int) (objectCoordinateX - speed + bounds.x) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX -= speed;\n currentAnimation = sideWalkLeft;\n }\n } \n \n if(playerKeyInput.allKeys[VK_D]){\n int tx = (int) (objectCoordinateX + speed + bounds.x + bounds.width) / 16;\n if(!collisionDetection(tx, (int) (objectCoordinateY + bounds.y)/16)){\n objectCoordinateX += speed;\n currentAnimation = sideWalkRight;\n }\n } \n \n if(playerKeyInput.allKeys[VK_E]){\n currentAnimation = pickUp;\n } \n }", "public void move() {\n\t\tSystem.out.println(\"Robot Can Move\");\n\t}", "private void think()\n\t{\n\t\tboolean bChange=false;\n\t\tif ((mMoveY+Height)<0)\n\t\t\tbChange=true;\n\t\tif ((mMoveX+Width)<0)\n\t\t\tbChange=true;\n\t\tif ((mMoveY+Height)>500)\n\t\t\tbChange=true;\n\t\tif ((mMoveX+Width)>500)\n\t\t\tbChange=true;\n\t\tif (bChange)\n\t\t{\n\t\t\t//Go in opposite direction\n\t\t\tDirection = Direction+4;\n\t\t\tif (Direction>7)\n\t\t\t\tDirection-=8;\n\t\t\tif (Direction<0)\n\t\t\t\tDirection=0;\n\t\t}\t\t\n\t}", "public boolean move() {\r\n\t\tif (direction == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tint newPosX = this.posX;\r\n\t\tint newPosY = this.posY;\r\n\r\n\t\tswitch (this.direction) {\r\n\t\tcase NORTH:\r\n\t\t\tnewPosY++;\r\n\t\t\tbreak;\r\n\t\tcase WEST:\r\n\t\t\tnewPosX--;\r\n\t\t\tbreak;\r\n\t\tcase SOUTH:\r\n\t\t\tnewPosY--;\r\n\t\t\tbreak;\r\n\t\tcase EAST:\r\n\t\t\tnewPosX++;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tboolean canMoveToNewPosition = tabletop.canMove(newPosX, newPosY);\r\n\t\tif (!canMoveToNewPosition) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tthis.posX = newPosX;\r\n\t\tthis.posY = newPosY;\r\n\r\n\t\treturn true;\r\n\t}", "private void checkMovement()\n {\n if (frames % 600 == 0)\n {\n \n ifAllowedToMove = true;\n \n \n }\n \n }", "public int getMoveMode();", "public boolean isMove(int dir){\n\t if(0> dir && dir > 3){\n\t\tSystem.out.println(\"direction is failed\");\t \n\t\treturn false;\n\t }\n\t if(dir == 0 ){\n\t\tif(0<= (this.y-1) && (this.y-1)<=5)\n\t\t return true;\n\t }else if(dir == 1){\n\t\tif(0<= (this.y+1) && (this.y+1)<=5)\n\t\t return true;\n\t }else if(dir == 2){\n\t\tif(0<= (this.x+1) && (this.x+1)<=5)\n\t\t return true;\n\t }else if(dir == 3){\n\t\tif(0<= (this.x-1) && (this.x-1)<=5)\n\t\t return true;\n\t }\n\t return false;\n\t}", "public boolean canMove() {\n\n\tArrayList<Location> moveLocs = getValid(getLocation());\n\n\tif (isEnd == true) {\n\t return false;\n\t} \n\tif (!moveLocs.isEmpty()) {\n\t \n\t randomSelect(moveLocs);\n\t // selectMoveLocation(moveLocs);\n\t return true;\n\n\t} else {\n\t return false;\n\t}\n }", "void update() {\n if (gameState.states > 1)\n move();\n }", "boolean canMove(Tile t);", "public boolean updatePlayerMove(GameBoard.GameMove move) {\n\t\t\n\t\t\n\t\t/*\n\t\t * move is illegal,return false.\n\t\t */\n\t\tif(move.getRow()>2||move.getRow()<0||move.getColumn()>2||move.getColumn()<0||this.board[move.getRow()][move.getColumn()]!=TicTacTow.BoardSigns.BLANK.getSign()) {\n\t\t\treturn false; \n\t\t}\n\t\telse {\n\t\t/*\n\t\t * legal move,return true.\n\t\t */\n\t\tsetLastMove(move);\n\t\tthis.board[move.getRow()][move.getColumn()]=TicTacTow.BoardSigns.PLAYER.getSign();\n\t\treturn true;\n\t\t}\n\t}", "public boolean canMove(int dir) {\n return true;\n }", "public void setMoved(boolean moved) {\n this.moved = moved;\n }", "public void move() { \n\t\tSystem.out.println(\"MOVING\");\n\t\tswitch(direction) {\n\t\t\tcase NORTH: {\n\t\t\t\tyloc -= ySpeed;\n\t\t\t}\n\t\t\tcase SOUTH: {\n\t\t\t\tyloc+= xSpeed;\n\t\t\t}\n\t\t\tcase EAST: {\n\t\t\t\txloc+= xSpeed;\n\t\t\t}\n\t\t\tcase WEST: {\n\t\t\t\txloc-= xSpeed;\n\t\t\t}\n\t\t\tcase NORTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase NORTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc-=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHEAST: {\n\t\t\t\txloc+=xSpeed;\n\t\t\t\tyloc+=ySpeed;\n\t\t\t}\n\t\t\tcase SOUTHWEST: {\n\t\t\t\txloc-=xSpeed;\n\t\t\t\tyloc+= ySpeed;\n\t\t\t}\n\t\t}\n\t}", "boolean canMoveTo(Vector2d position);", "public void chooseDirection(){\n Player player=board.getPlayer();\n if(player==null) return;\n if (getXCentrer()>board.getPlayer().getXCentrer()){\n setDirection(3);\n }\n else{\n setDirection(1);\n }\n }", "void userMoveRequested(int playerIndex);", "boolean move(Unit unit, Direction direction);", "public void setMove(int move){\n this.move = move;\n }", "@Override\n\tpublic void move() {\n\t\tSystem.out.println(\"Can Move\");\n\t}", "private void move() {\n resetUpdate();\n\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.resetGameMessage();\n gameMessage.notify(gameMessage);\n\n\n if( liteGame.isWinner() ) endOfTheGame = true;\n }", "protected void setMove(int _move)\t\t{\tmove = _move;\t\t}", "private void movement()\n {\n if(gameOverBool==false)\n {\n if(Greenfoot.isKeyDown(\"up\"))\n {\n setLocation(getX(), getY()-6);\n setRotation(2);\n } else if (Greenfoot.isKeyDown(\"down\")){\n setLocation(getX(), getY()+6); \n setRotation(8);\n } else{\n setRotation(5);\n } \n }\n }", "public void setMove(int move) {\n this.move = move;\n }", "public void move(boolean gameDone) {\r\n //prevents moving off edge\r\n if (this.positionX+travel>Main.WIDTH-100) \r\n this.positionX=Main.WIDTH-100;\r\n else if (this.positionX+travel<-40)\r\n this.positionX=-40;\r\n //moves the player during normal circumstances\r\n else if (!gameDone)\r\n this.positionX = this.positionX + this.travel;\r\n //creates slowmo effect once the game finishes\r\n else\r\n this.positionX = this.positionX + (this.travel/4);\r\n }", "public abstract boolean canMove(int originX, int originY, int destX, int destY);", "public void move() {\n\tupdateSwapTime();\n\tupdateAttackTime();\n\n\tif (enemyNear) {\n\t if (moved) {\n\t\tstopMove();\n\t\tmoved = false;\n\t }\n\t} else {\n\t if (!moved) {\n\t\tcontinueMove();\n\t\tmoved = true;\n\t }\n\n\t x += dx;\n\t y += dy;\n\n\t if (x < speed) {\n\t\tx = speed;\n\t\tdx = (-1) * dx;\n\t }\n\n\t if (y < speed) {\n\t\ty = speed;\n\t\tdy = (-1) * dy;\n\t }\n\n\t if (x > MapSize.getSIZE().getWidth() - 40) {\n\t\tx = MapSize.getSIZE().getWidth() - 40;\n\t\tdx = (-1) * dx;\n\t }\n\n\t if (y > MapSize.getSIZE().getHeight() - 40) {\n\t\ty = MapSize.getSIZE().getHeight() - 40;\n\t\tdy = (-1) * dy;\n\t }\n\t}\n }", "@Override\n public void move() {\n switch (direction){\n case SOUTH:\n position.setY(position.getY() + currentSpeed);\n break;\n case NORTH:\n position.setY(position.getY() - currentSpeed);\n break;\n case WEST:\n position.setX(position.getX() - currentSpeed);\n break;\n case EAST:\n position.setX(position.getX() + currentSpeed);\n }\n }", "public boolean isMoveUp() {\n return moveUp;\n }", "boolean moveCharacter(Player player, Location.Direction direction) {\n Location currentLocation = player.getLocation();\r\n //check to see if move is possible\r\n Location destination = currentLocation.compass(direction);\r\n if (destination != null)\r\n {\r\n currentLocation.exit(player);\r\n destination.enter(player);\r\n return true;\r\n }\r\n else{\r\n return false;\r\n } \r\n }", "public boolean moveable() {\n //check reach border\n if (reachBorder()) {\n return false;\n }\n //get the location of the next spot to move to\n //move up\n Point nextLocation = this.getCenterLocation();\n if (direction == 12) {\n nextLocation = new Point(this.getCenterX(),\n this.getCenterY() - speed);\n }\n //move right\n if (direction == 3) {\n nextLocation = new Point(this.getCenterX() + speed,\n this.getCenterY());\n\n }\n //move down\n if (direction == 6) {\n nextLocation = new Point(this.getCenterX(),\n this.getCenterY() + speed);\n\n }\n //move left\n if (direction == 9) {\n nextLocation = new Point(this.getCenterX() - speed,\n this.getCenterY());\n }\n\n // get all objects in a circle of radius tileSize * 2 around the players\n //these objects are those which can possibly colide with the players\n int checkRadius = GameUtility.GameUtility.TILE_SIZE * 2;\n for (GameObject gameObject : GameManager.getGameObjectList()) {\n if (GameUtility.GameUtility.distance(gameObject.getCenterLocation(),\n this.getCenterLocation()) < checkRadius) {\n if ((GameUtility.GameUtility.dectectCollision(\n gameObject.getCenterLocation(),\n nextLocation)) && !(GameUtility.GameUtility.dectectCollision(\n gameObject.getCenterLocation(),\n this.getCenterLocation())) && gameObject.getType() != GameObjectType.POWER_UP && gameObject.getType() != GameObjectType.MONSTER && gameObject.getType() != GameObjectType.PLAYER) {\n return false;\n }\n }\n }\n return true;\n\n }", "public int move () {\n intMoveState = 0;\r\n int pixel1;\r\n int pixel2;\r\n \r\n if (blnUp) {\r\n pixel1 = getPixelRGB (X - 25, Y + 10, \"r\");\r\n pixel2 = getPixelRGB (X + 25, Y + 10, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n Y -= intSpeed;\r\n intMoveState -= 1;\r\n }\r\n }\r\n if (blnDown) {\r\n pixel1 = getPixelRGB (X - 25, Y + 46, \"r\");\r\n pixel2 = getPixelRGB (X + 25, Y + 46, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n Y += intSpeed;\r\n intMoveState += 1;\r\n }\r\n }\r\n if (blnLeft) {\r\n pixel1 = getPixelRGB (X - 30, Y + 15, \"r\");\r\n pixel2 = getPixelRGB (X - 30, Y + 30, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n X -= intSpeed;\r\n intMoveState -= 2;\r\n }\r\n }\r\n if (blnRight) {\r\n pixel1 = getPixelRGB (X + 30, Y + 15, \"r\");\r\n pixel2 = getPixelRGB (X + 30, Y + 30, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n X += intSpeed;\r\n intMoveState += 2;\r\n }\r\n }\r\n \r\n try {\r\n dblAngle = Math.atan2((MouseY - Y),(MouseX - X));\r\n if (dblAngle < - Math.PI/4) {\r\n dblAngle = 2 * Math.PI + dblAngle;\r\n }\r\n }catch (ArithmeticException e) {\r\n if (MouseY < Y) {\r\n dblAngle = 3 * Math.PI/2;\r\n }else {\r\n dblAngle = Math.PI/2;\r\n }\r\n }\r\n degreesAngle = (int) (Math.toDegrees(dblAngle)); \r\n \r\n if(intHealth < 0 && !UserInterface.deathScreenVisible){\r\n UserInterface.deathScreenVisible = true;\r\n deathTime = System.nanoTime();\r\n ClientMain.ssm.sendText(\"player,\" + ClientMain.intPlayerNumber + \",iamdeadlol\");\r\n }\r\n \r\n return getPixelRGB (X, Y + 46, \"g\");\r\n }", "private boolean isThereValidMove() {\n\t\treturn true;\n\t}", "private void intelligentDecideMove() {\n\t\tMonster target=nearestEnemy();\r\n\t\tif(target!=null){\t\t\t\t//FIRST PRIORITY: pursue the target if it can be seen.\r\n\t\t\tswitchStates(PURSUIT);\r\n\t\t\ttargetTile=new Tile(target.currentTile);\r\n\t\t\t//saveMove();\r\n\t\t\tmonster.moveTowards(target);\r\n\t\t}\r\n\t\t\t\r\n\t\telse{\r\n\t\t\ttargetLostResponse();\r\n\t\t\t}\r\n\t}", "public abstract boolean canMove(Board board, Spot from, Spot to);", "public void move(){\n super.move();\n if(getX() >= Main.WIDTH - getWidth() * 1.5) {\n setDirection(-1);\n } else if(getX() <= 50) {\n setDirection(1);\n }\n }", "public void setPieceCanMove(final Boolean theCanItMove) {\n myPieceCanMove = theCanItMove;\n }", "public void setMoveable(boolean moveable) {\n\t\t_moveable = moveable;\n\t}", "public boolean isMoveDown() {\n return moveDown;\n }", "public boolean move(int x, int y, int player) {\n\t\tif (getLocation(x, y) == EMPTY) {\n\t\t\tgrid[x][y] = player;\n\t\t\tsetChanged();\n\t\t\tnotifyObservers();\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "boolean makeMove(int index, Player player);", "public Boolean getMovingState()\r\n\t{\r\n\t\tObject[] result = pParent.status.requestOne(TuxAPIConst.ST_NAME_FLIPPERS_MOTOR_ON);\r\n\t\tif (result[0] == null)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (result[0].equals(\"False\"))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public boolean canEndTurn(){\n\t\treturn moved;\n\n\t}", "public void AskForMove();" ]
[ "0.77205783", "0.75165236", "0.7461292", "0.74598086", "0.7309347", "0.7276388", "0.72487617", "0.7232875", "0.71907514", "0.717491", "0.71612674", "0.7148271", "0.7077771", "0.7076608", "0.7072041", "0.70238537", "0.7023768", "0.6973905", "0.69709283", "0.69458556", "0.6891414", "0.6891314", "0.6888889", "0.68832344", "0.6875972", "0.68647003", "0.685758", "0.68537134", "0.68524027", "0.67837405", "0.6765799", "0.6752469", "0.67512816", "0.67360485", "0.673468", "0.6725981", "0.6682384", "0.66789997", "0.66711456", "0.66590434", "0.66577494", "0.66504234", "0.66491604", "0.6646089", "0.6643099", "0.6639332", "0.6630035", "0.6620109", "0.6620109", "0.6609138", "0.6591629", "0.65522", "0.6550156", "0.65422165", "0.65358645", "0.6530894", "0.6514531", "0.65074956", "0.6502691", "0.65010726", "0.6498588", "0.6496791", "0.6496693", "0.6496133", "0.6491015", "0.648756", "0.6478219", "0.64776385", "0.6475036", "0.64734346", "0.64732677", "0.6469697", "0.6463035", "0.6456624", "0.64542687", "0.64406973", "0.6438358", "0.64376223", "0.64362013", "0.64161026", "0.64125246", "0.64080393", "0.6407826", "0.64044005", "0.6394215", "0.63898635", "0.6342956", "0.6338487", "0.63209677", "0.63204277", "0.63178915", "0.6314673", "0.63136226", "0.62912923", "0.6288672", "0.62879187", "0.62845105", "0.62826145", "0.6279706", "0.62709665" ]
0.6531507
55
Search for jump moves and judge their value.
private void correctJumpPaths(Field origin, Field lastField, Field currentField) { Field [] neighbours = currentField.getNeighbours(); Random random = new Random(); for(int i = 0; i < neighbours.length; ++i) { // jump move validation if((neighbours[i] != null) && (neighbours[i].getPlayer() != null)) { Field nextField = neighbours[i].getNeighbours()[i]; if(nextField != null && !nextField.equals(lastField) && nextField.getPlayer() == null) { if(valueOfMove(origin, nextField) >= valueOfMove(bestMove[0], bestMove[1])) { bestMove[0] = origin; bestMove[1] = nextField; } else if(valueOfMove(origin, nextField) == valueOfMove(bestMove[0], bestMove[1])) { if(random.nextBoolean()) { bestMove[0] = origin; bestMove[1] = nextField; } } //correctJumpPaths(origin, currentField, nextField); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Map<Direction, List<Coordinate>> getPossibleMoves() {\n\n Map<Direction, List<Coordinate>> moves = new HashMap<>();\n\n Coordinate coordinate = this.getCoordinate();\n int row = coordinate.getRow();\n int col = coordinate.getCol();\n\n //Jumps\n List<Coordinate> jumps = new ArrayList<>();\n\n //\n //\n ////\n int tempRow1 = row - 2;\n int tempCol1 = col - 1;\n Coordinate tempCoordinate1 = new Coordinate(tempRow1, tempCol1);\n if (Board.inBounds(tempCoordinate1)) {\n jumps.add(tempCoordinate1);\n }\n\n ////\n //\n //\n int tempRow2 = row + 2;\n int tempCol2 = col - 1;\n Coordinate tempCoordinate2 = new Coordinate(tempRow2, tempCol2);\n if (Board.inBounds(tempCoordinate2)) {\n jumps.add(tempCoordinate2);\n }\n\n //////\n //\n int tempRow3 = row - 1;\n int tempCol3 = col - 2;\n Coordinate tempCoordinate3 = new Coordinate(tempRow3, tempCol3);\n if (Board.inBounds(tempCoordinate3)) {\n jumps.add(tempCoordinate3);\n }\n\n ///////\n //\n int tempRow4 = row - 1;\n int tempCol4 = col + 2;\n Coordinate tempCoordinate4 = new Coordinate(tempRow4, tempCol4);\n if (Board.inBounds(tempCoordinate4)) {\n jumps.add(tempCoordinate4);\n }\n\n ////\n //\n //\n int tempRow5 = row + 2;\n int tempCol5 = col + 1;\n Coordinate tempCoordinate5 = new Coordinate(tempRow5, tempCol5);\n if (Board.inBounds(tempCoordinate5)) {\n jumps.add(tempCoordinate5);\n }\n\n //\n //\n ////\n int tempRow6 = row - 2;\n int tempCol6 = col + 1;\n Coordinate tempCoordinate6 = new Coordinate(tempRow6, tempCol6);\n if (Board.inBounds(tempCoordinate6)) {\n jumps.add(tempCoordinate6);\n }\n\n //\n //////\n int tempRow7 = row + 1;\n int tempCol7 = col - 2;\n Coordinate tempCoordinate7 = new Coordinate(tempRow7, tempCol7);\n if (Board.inBounds(tempCoordinate7)) {\n jumps.add(tempCoordinate7);\n }\n\n //\n //////\n int tempRow8 = row + 1;\n int tempCol8 = col + 2;\n Coordinate tempCoordinate8 = new Coordinate(tempRow8, tempCol8);\n if (Board.inBounds(tempCoordinate8)) {\n jumps.add(tempCoordinate8);\n }\n\n if (!jumps.isEmpty()) {\n moves.put(Direction.Jump, jumps);\n }\n return moves;\n }", "boolean jumpPossible(int k) {\n if (get(k) != _whoseMove) {\n return false;\n }\n for (int i = -2; i <= 2; i += 2) {\n for (int j = -2; j <= 2; j += 2) {\n char nextCol = (char) (col(k) + i);\n char nextRow = (char) (row(k) + j);\n if (k % 2 == 0) {\n if (validSquare(nextCol, nextRow)) {\n int mid = (k + index(nextCol, nextRow)) / 2;\n if (get(nextCol, nextRow)\n == EMPTY && get(mid) == get(k).opposite()) {\n return true;\n }\n }\n } else {\n if (i == 0 || j == 0) {\n if (validSquare(nextCol, nextRow)) {\n int mid = (k + index(nextCol, nextRow)) / 2;\n if (get(nextCol, nextRow)\n == EMPTY && get(mid) == get(k).opposite()) {\n return true;\n }\n }\n }\n }\n }\n }\n return false;\n }", "boolean jumpPossible() {\n for (int k = 0; k <= MAX_INDEX; k += 1) {\n if (jumpPossible(k)) {\n return true;\n }\n }\n return false;\n }", "private void getJumps(ArrayList<Move> moves, int k) {\n if (!jumpPossible(k)) {\n return;\n }\n\n for (int i = -2; i <= 2; i += 2) {\n for (int j = -2; j <= 2; j += 2) {\n char nextCol = (char) (col(k) + i);\n char nextRow = (char) (row(k) + j);\n if (validSquare(nextCol, nextRow)) {\n Move rec = Move.move(col(k),\n row(k), nextCol, nextRow);\n if (checkJump(rec, true)) {\n PieceColor middle = get(nextCol, nextRow);\n set(nextCol, nextRow, get(k));\n ArrayList<Move> record = new ArrayList<>();\n getJumps(record, index(nextCol, nextRow));\n if (record.size() == 0) {\n record.add(null);\n }\n set(nextCol, nextRow, middle);\n for (Move mov : record) {\n Move jump = Move.move(rec, mov);\n moves.add(jump);\n }\n }\n }\n }\n }\n }", "public int getJumpValue() { \n return jumpValue; \n }", "abstract boolean performJump(long value);", "protected abstract T jump(T neighbor, T current, Set<T> goals);", "public boolean attemptMove(Move move, int color) {\n //ArrayList<Move> jumps = canJump(color);\n //make sure the to and from values don't go out of bounds\n if (move.xFrom > 7 || move.yFrom > 7 || move.xTo > 7 || move.yTo > 7 ||\n \tmove.xFrom < 0 || move.yFrom < 0 || move.xTo < 0 || move.yTo < 0 ){\n// System.out.println(\"out of bounds\");\n return false;\n }\n int stateOfFrom = gameState.getStateOfSquare(move.xFrom, move.yFrom);\n int stateOfTo = gameState.getStateOfSquare(move.xTo, move.yTo);\n \n\n //if there in no piece in the \"from\" location return false\n if (stateOfFrom == 0){\n// System.out.println(\"no piece at 'from'\");\n return false;\n }\n \n //if there is a piece in the \"to\" location return false\n if (!(stateOfTo == 0)){\n// System.out.println(\"'to' is not empty\");\n return false;\n }\n \n //if the \"from\" piece is not the correct color return false\n if (!(gameState.getStateOfSquare(move.xFrom, move.yFrom)%2 == color))\n {\n// System.out.println(\"that is not your piece\");\n return false;\n }\n \n //check if the \"from\" piece is moving in the right direction\n \n /*if (jumps.isEmpty() == false) //if there are jumps.\n {\n System.out.println(\"there are jumps\");\n //for every possible jump\n for (int i=0; i<jumps.size(); i++){\n \t//if this move matches a possible jump then it is valid\n \tSystem.out.println(\"is this jump \"+ i + \"?\");\n \tif ((move.xFrom == jumps.get(i).xFrom)&&\n \t\t\t(move.yFrom == jumps.get(i).yFrom)&&\n \t\t\t(move.xTo == jumps.get(i).xTo)&&\n \t\t\t(move.yTo == jumps.get(i).yTo)){\n \t\tSystem.out.println(\"yes\");\n \t\treturn true;\n \t}\n \telse{\n \t\tSystem.out.println(\"there are possible jumps\");\n \t}\n \t\t\n \t\n }\n //return false;\n \n //handle jumps\n }\n */\n //moving diagonally\n else{\n if (move.xTo == move.xFrom + 1 || move.xTo == move.xFrom - 1){\n //if (stateOfFrom >= 3) \n //if piece is king it can move both forward and back\n if (stateOfFrom >= 3 && (move.yTo == move.yFrom + 1 || move.yTo == move.yFrom - 1)){\n \treturn true;\n }\n //red can only move up\n else if(color == 0 && (move.yTo == move.yFrom + 1)){\n \treturn true;\n }\n //black can only move down\n else if(color == 1 && (move.yTo == move.yFrom - 1)){\n \treturn true;\n }\n else{\n// System.out.println(\"wrong way\");\n return false;\n }\n }\n else{\n// System.out.println(\"too far away\");\n return false;\n }\n }\n //return true;\n \n \n }", "boolean jump(int posx, int posy, int prevPiece) {\n\t\tbool = false;\n\t\txdiff = (posx - prevPosX) / 2; \n\t\tydiff = (posy - prevPosY) / 2;\n\t\tif ((xdiff < 2 || xdiff > -2 && ydiff < 2) && prevPiece == 1) {\n\t\t\tSystem.out.println(\"Norm jump 1 \" + prevPiece);\n\t\t\tpieceJumped = Logic.arr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tjumpedComp = Playboard.cArr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tif (curPlayer == 1 && (pieceJumped == 2 || pieceJumped == 4))\n\t\t\t\tbool = true;\n\t\t\telse if (curPlayer == 2 && (pieceJumped == 1 || pieceJumped == 3))\n\t\t\t\tbool = true;\n\t\t\telse\n\t\t\t\tbool = false;\n\t\t} else if ((xdiff < 2 || xdiff > -2 && ydiff < -2) && prevPiece == 2) {\n\t\t\tSystem.out.println(\"Norm jump 2 \" + prevPiece);\n\t\t\tpieceJumped = Logic.arr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tjumpedComp = Playboard.cArr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tif (curPlayer == 2 && (pieceJumped == 1 || pieceJumped == 3))\n\t\t\t\tbool = true;\n\t\t\telse\n\t\t\t\tbool = false;\n\t\t} else if (prevPiece == 3 || prevPiece == 4 && (xdiff < 2 || xdiff > -2 && ydiff < 2 || ydiff > -2)) {\n\t\t\tSystem.out.println(\"King jump \" + prevPiece);\n\t\t\tpieceJumped = Logic.arr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tjumpedComp = Playboard.cArr[prevPosX + xdiff][prevPosY + ydiff];\n\t\t\tif (curPlayer == 1 && (pieceJumped == 2 || pieceJumped == 4)) {\n\t\t\t\tSystem.out.println(curPlayer + \" Player 1 jumping over \" + pieceJumped);\n\t\t\t\tbool = true;\n\t\t\t} else if (curPlayer == 2 && (pieceJumped == 1 || pieceJumped == 3)){\n\t\t\t\tSystem.out.println(curPlayer + \" jumping over \" + pieceJumped);\n\t\t\t\tbool = true;\n\t\t\t} else \n\t\t\t\tbool = false;\n\t\t}\n\t\tjumping = bool;\n\t\treturn bool;\n\t}", "public int jump(int[] nums) {\n if(nums.length==0) return 0;\n int n=nums.length;\n int jumps=0;\n int maxEnding=0;\n int maxDist=0;\n for(int i=0;i<n-1;i++){\n maxDist=Math.max(maxDist,nums[i]+i);\n if(i==maxEnding){\n maxEnding=maxDist;\n jumps++;\n }\n }\n return jumps;\n }", "public int[] findMove(){\n int[] blackCheckerSpots = new int[12];\n int i =0;\n while(mCheckerBoard.indexOf(new Checker(1, false)) != -1){\n int startPosition = mCheckerBoard.indexOf(new Checker(1, false)); //need to override Checker equals method\n Checker current = mCheckerBoard.get(startPosition);\n int[] answer = jumpRight(startPosition, false, current);\n if(answer.length > 1)\n {\n //jumped right downwards\n return answer;\n }\n answer = jumpLeft(startPosition, false, current);\n if(answer.length > 1){\n //jumped left downwards\n return answer;\n }\n answer = moveDiagonalRight(startPosition, false, current);\n if(answer.length > 1){\n //moved diagonal right downwards\n return;\n }\n answer = moveDiagonalLeft(startPosition, false, current);\n if(answer.length > 1){\n //moved diagonal left downwards\n return;\n }\n\n //end of loop\n //these are the ones that need to be set back to black at the end\n current.setIsRed(true);\n blackCheckerSpots[i]=startPosition;\n i++;\n }\n\n for(int j =0; j<blackCheckerSpots.length; j++){\n Checker changed = mCheckerBoard.get(blackCheckerSpots[j]);\n changed.setIsRed(false);\n mCheckerBoard.set(blackCheckerSpots[j], changed);\n }\n\n }", "boolean checkJump(Move mov, boolean allowPartial) {\n if (!mov.isJump()) {\n return false;\n }\n PieceColor compare = get(mov.fromIndex()).opposite();\n PieceColor init = get(mov.fromIndex());\n ArrayList<Integer> record = new ArrayList<>();\n if (allowPartial) {\n return partialJump(mov);\n } else {\n Move rec = mov;\n while (rec != null) {\n PieceColor from = get(rec.fromIndex());\n PieceColor to = get(rec.toIndex());\n record.add(rec.toIndex());\n char mCol = rec.jumpedCol();\n char mRow = rec.jumpedRow();\n if (rec.fromIndex() % 2 == 0) {\n set(rec.fromIndex(), init);\n if (get(mCol, mRow)\n == compare && to == EMPTY) {\n set(rec.fromIndex(), from);\n rec = rec.jumpTail();\n } else {\n set(rec.fromIndex(), from);\n return false;\n }\n } else {\n set(rec.fromIndex(), init);\n if (index(mCol, mRow) % 2 == 0\n && get(mCol, mRow) == compare\n && to == EMPTY) {\n set(rec.fromIndex(), from);\n rec = rec.jumpTail();\n } else {\n set(rec.fromIndex(), from);\n return false;\n }\n }\n }\n for (int i : record) {\n set(i, init);\n }\n if (jumpPossible(record.get(record.size() - 1))) {\n for (int i : record) {\n set(i, EMPTY);\n }\n return false;\n }\n for (int i : record) {\n set(i, EMPTY);\n }\n return true;\n }\n }", "void getMoves(ArrayList<Move> moves) {\n if (gameOver()) {\n return;\n }\n if (jumpPossible()) {\n for (int k = 0; k <= MAX_INDEX; k += 1) {\n getJumps(moves, k);\n }\n } else {\n for (int k = 0; k <= MAX_INDEX; k += 1) {\n getMoves(moves, k);\n }\n }\n }", "public int getJumpCount() {return jumpCount;}", "static int minStepToReachTarget(int knightPos[], int targetPos[], int N) {\n // x and y direction, where a knight can move\n int dx[] = {-2, -1, 1, 2, -2, -1, 1, 2};\n int dy[] = {-1, -2, -2, -1, 1, 2, 2, 1};\n\n // queue for storing states of knight in board\n Queue<Cell> q = new LinkedList<>();\n\n // push starting position of knight with 0 distance\n q.add(new Cell(knightPos[0], knightPos[1], 0));\n\n Cell t;\n int x, y;\n boolean[][] visit = new boolean[N + 1][N + 1];\n\n // loop untill we have one element in queue\n while (!q.isEmpty()) {\n t = q.poll();\n if (visit[t.x][t.y]) \n continue;\n visit[t.x][t.y] = true;\n\n // if current cell is equal to target cell,\n // return its distance\n if (t.x == targetPos[0] && t.y == targetPos[1]) {\n return t.dis;\n }\n\n // loop for all reahable states\n for (int i = 0; i < 8; i++) {\n x = t.x + dx[i];\n y = t.y + dy[i];\n\n // If rechable state is not yet visited and\n // inside board, push that state into queue\n if (isInside(x, y, N) && !visit[x][y]) {\n q.add(new Cell(x, y, t.dis + 1));\n }\n }\n }\n return 0;\n }", "private int minJumps(int[] arr) {\n int n = arr.length;\n if (n == 1) {\n return 0;\n }\n\n //map to hold the values in the array and the indexes where they are located in\n Map<Integer, List<Integer>> map = new HashMap<>();\n\n for (int i = 0; i < arr.length; i++) {\n /*\n method checks if arr[i] exists in the map, if so, we add the current index to the list of indexes where\n arr[i] is present, otherwise we make a new entry for arr[i]\n */\n map.computeIfAbsent(arr[i], v -> new ArrayList<>()).add(i);\n }\n\n //Queue to hold the indexes j we can jump to starting from 0\n Queue<Integer> queue = new LinkedList<>();\n queue.add(0); //add the first index into the queue\n int steps = 0;\n\n while (!queue.isEmpty()) {\n steps++;\n int size = queue.size();\n\n for (int i = 0; i < size; i++) {\n int j = queue.remove(); //the current index\n\n //jump to j + 1\n if (j + 1 < n && map.containsKey(arr[j + 1])) {\n if (j + 1 == n - 1) {\n return steps;\n }\n queue.add(j + 1);\n }\n\n //jump to j - 1\n if (j - 1 >= 0 && map.containsKey(arr[j - 1])) {\n queue.add(j - 1);\n }\n\n //jump to index k --> arr[j] == arr[k]\n if (map.containsKey(arr[j])) {\n //search through the list of indexes where arr[j] is present\n for (int k : map.get(arr[j])) {\n if (k != j) {\n //if one of the indexes is the last index, we've gotten to the end, otherwise we add the index to the queue\n if (k == n - 1) {\n return steps;\n }\n queue.add(k);\n }\n }\n }\n //remove the value of arr[j] from the map to avoid overlap\n map.remove(arr[j]);\n }\n }\n return steps;\n }", "public int jump() {\n if (Ylocation > 475) {\n Ylocation -= Ydir;\n }\n\n return Ylocation;\n }", "private void jump() {\r\n\t\tjumping = true;\r\n\t\tjumpKeyPresses++;\r\n\t\tif (jumpKeyPresses < 12) {\r\n\t\t\tif (jumpKeyPresses == 1)\r\n\t\t\t\tdy = -0.02 * (1 / (0.3 + fatLevel));\r\n\t\t\tdy -= 0.001 * (1 / (0.3 + fatLevel));\r\n\t\t}\r\n\t}", "@Test\n public void isJumpActionLegalFor()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final Agent agentRed = agents.get(0);\n final Agent agentWhite = agents.get(1);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentRed, CheckersPosition.P21,\n CheckersPosition.P17);\n action.doIt();\n }\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentWhite, CheckersPosition.P09,\n CheckersPosition.P14);\n action.doIt();\n }\n {\n final CheckersMoveAction action = new CheckersMoveAction(environment, agentRed, CheckersPosition.P22,\n CheckersPosition.P18);\n action.doIt();\n }\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Agent white can jump his token over a red token to an empty space.\n assertTrue(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P14,\n CheckersPosition.P21));\n\n // Agent white cannot jump his token to an occupied space.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P14,\n CheckersPosition.P23));\n\n // Agent white cannot jump his token to an adjacent empty space.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P10,\n CheckersPosition.P15));\n\n // Agent white cannot jump his own token.\n assertFalse(adjudicator.isJumpActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P08,\n CheckersPosition.P15));\n }", "public int getMaxJump() {return 2;}", "private int jumpCheck(int neighborIndex, String searchTarget, int Level, Message m, SkipGraphNodes nodeSet)\r\n {\r\n Node neighbor = ((Node) mTopologyGenerator.mNodeSet.getNode(neighborIndex));\r\n /*\r\n Checks if the neighborIndex is a valid index (i.e., points to a real Node on nodeSet)\r\n AND is Online.\r\n */\r\n if (neighborIndex != -1 && neighbor.isOnline())\r\n {\r\n /*\r\n Piggybacks the entire lookup table of the Node on the search Message to be used by for example\r\n churn stabilization algorithms\r\n */\r\n piggyBackLookupTable(neighborIndex);\r\n\r\n /*\r\n piggybacks the Node's address itself on the search Message\r\n */\r\n m.piggyback(neighborIndex, mTopologyGenerator.mNodeSet);\r\n\r\n /*\r\n If the search is conducted over the Skip Graph of Nodes, and the common prefix of the neighbor's nameID, and\r\n the search target is greater than the current level, the function returns the common prefix length, which means\r\n that the search could be conducted at a higher level corresponds to the common prefix lengh.\r\n */\r\n if (nodeSet instanceof Nodes)\r\n {\r\n /*\r\n Computes length of common prefix between name ID of neighbor and searchTarget\r\n */\r\n int commonPrefixLength = commonPrefixLength(neighbor.getNameID(), searchTarget);\r\n if (commonPrefixLength > Level)\r\n {\r\n return commonPrefixLength;\r\n }\r\n }\r\n /*\r\n If the search is conducted over the Skip Graph of blocks and transactions, and the neighbor owns a block or transaction with\r\n longer common prefix with respect to the search target than the current level number, the function returns the common prefix length, which means\r\n that the search could be conducted at a higher level, which corresponds to the common prefix lengh.\r\n */\r\n else\r\n {\r\n /*\r\n Finds the index of the most similar owned block to the search target in the neighbor Node\r\n */\r\n int mostSimilarTXBIndex = neighbor.mostSimilarTXB(nodeSet, searchTarget, m, Level);\r\n\r\n /*\r\n Retrieves the name ID of the most similar block/transaction\r\n */\r\n String mostSimilarNameID = nodeSet.getNode(mostSimilarTXBIndex).getNameID();\r\n\r\n /*\r\n Computes the length of common prefix between name ID of the most similar block/transaction and\r\n search target\r\n */\r\n int commonPrefixLength = commonPrefixLength(searchTarget, mostSimilarNameID);\r\n\r\n /*\r\n Returns the common prefix length if it is greater than the current level\r\n */\r\n if (commonPrefixLength > Level)\r\n {\r\n return commonPrefixLength;\r\n }\r\n }\r\n }\r\n return -1;\r\n }", "public boolean isJumping(){\n if (jumpState == 2)\n return true;\n return false;\n\n}", "public void jump() {\n jumped = true;\n teleport = true;\n waste = true;\n }", "public String jump(String s) {\n\t\tif(s.equals(\"JGT\")) {\n\t\t\treturn \"001\";\n\t\t} else if(s.equals(\"JEQ\")) {\n\t\t\treturn \"010\";\n\t\t} else if(s.equals(\"JGE\")) {\n\t\t\treturn \"011\";\n\t\t} else if(s.equals(\"JLT\")) {\n\t\t\treturn \"100\";\n\t\t} else if(s.equals(\"JNE\")) {\n\t\t\treturn \"101\";\n\t\t} else if(s.equals(\"JLE\")) {\n\t\t\treturn \"110\";\n\t\t} else if(s.equals(\"JMP\")) {\n\t\t\treturn \"111\";\n\t\t} else {\n\t\t\treturn \"000\";\n\t\t}\n\t}", "boolean partialJump(Move mov) {\n PieceColor init = get(mov.fromIndex());\n PieceColor to = get(mov.toIndex());\n if (mov.fromIndex() % 2 == 0) {\n return get(mov.jumpedCol(), mov.jumpedRow())\n == init.opposite()\n && to == EMPTY;\n } else {\n return index(mov.jumpedCol(), mov.jumpedRow()) % 2 == 0\n && get(mov.jumpedCol(), mov.jumpedRow())\n == init.opposite()\n && to == EMPTY;\n }\n }", "public int torsoJumpJets() {\n int jump = 0;\n\n for (Mounted mounted : getMisc()) {\n if (mounted.getType().hasFlag(MiscType.F_JUMP_JET) && !mounted.isDestroyed() && !mounted.isBreached() && locationIsTorso(mounted.getLocation())) {\n jump++;\n }\n }\n\n // apply Partial Wing bonus if we have the ability to jump\n if (jump > 0) {\n for (Mounted mount : getMisc()) {\n if (mount.getType().hasFlag(MiscType.F_PARTIAL_WING)) {\n jump += getPartialWingJumpBonus(mount);\n break;\n }\n }\n }\n\n return jump;\n }", "public int moves() {\r\n if (!isSolvable) return -1;\r\n return goal.previousMoves;\r\n }", "private static int getMoveValue(CellData[][] cells, int fromX, int fromY,\n\t\t\tint toX, int toY) {\n\t\tPair<Boolean, Intersection> moveResult = isMoveLegal(cells,\n\t\t\t\tPair.of(fromX, fromY), Pair.of(toX, toY));\n\t\tif (!moveResult.getLeft()) {\n\t\t\tthrow new IllegalArgumentException(\"Illegal move: [\" + fromX + \", \"\n\t\t\t\t\t+ fromY + \"] -> [\" + toX + \", \" + toY + \"]\");\n\t\t}\n\t\tif (moveResult.getRight() != null) {\n\t\t\t// the higher speed, the better\n\t\t\treturn 1000 * (Math.abs(toX - fromX) + Math.abs(fromY - toY));\n\t\t}\n\t\t// this is not a finishing move\n\t\treturn cells[toX][toY].distanceToFinish * (-1000)\n\t\t\t\t+ (Math.abs(toX - fromX) + Math.abs(fromY - toY));\n\t}", "@Test(timeout=2000) public void testMovesToReach(){\r\n GameStateSpace states = new GameStateSpace(this.initial);\r\n // For every target state based on the initial game look at a\r\n // target and calculate the moves to reach it\r\n for(int target=0; target<this.targetGameMoves.size(); target++){\r\n GameAndMoves gm = this.targetGameMoves.get(target);\r\n ZombieTrapGame targetGame = gm.game;\r\n List<String> expectMoves = gm.moves;\r\n List<String> actualMoves = states.movesToReach(targetGame);\r\n StringBuilder sb = new StringBuilder(this.name+\"\\n\");\r\n sb.append(\"TARGET GAME NUMBER \"+target+\"\\n\");\r\n \r\n // Check if the moves are equal to the expectation\r\n if(expectMoves==null && actualMoves==null){\r\n continue;\r\n }\r\n else if(expectMoves !=null && expectMoves.equals(actualMoves)){\r\n continue;\r\n }\r\n else if(expectMoves!=null && actualMoves==null){\r\n sb.append(\"State misidentified as NOT reachable\\n\");\r\n sb.append(String.format(\"Expect sequence: %s\\n\",expectMoves));\r\n sb.append(String.format(\"Actual sequence: %s\\n\",actualMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n sb.append(this.toString());\r\n appendAllStates(states, sb);\r\n fail(sb.toString());\r\n }\r\n\r\n // ALREADY THERE\r\n // If equal length do they produce the correct board: could be\r\n // alternate paths to the same state\r\n ZombieTrapGame game = this.initial.copy();\r\n for(String move : actualMoves){\r\n doShift(game,move);\r\n }\r\n\r\n // ADD THIS CODE to fix a bug in the original test cases\r\n if(expectMoves==null && actualMoves!=null){\r\n sb.append(\"State misidentified as IS reachable\\n\");\r\n sb.append(String.format(\"Expect sequence: %s\\n\",expectMoves));\r\n sb.append(String.format(\"Actual sequence: %s\\n\",actualMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n sb.append(String.format(\"Actual End Game:\\n%s\",game));\r\n sb.append(this.toString());\r\n appendAllStates(states, sb);\r\n fail(sb.toString());\r\n }\r\n\r\n // ALREADY THERE\r\n if(!game.equals(targetGame)){ // Moves don't lead to target state\r\n sb.append(\"Actual move sequence does not lead to target state\\n\");\r\n sb.append(String.format(\"Expect sequence (length %s): %s\\n\",expectMoves.size(),expectMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n sb.append(String.format(\"Actual sequence (length %s): %s\\n\",actualMoves.size(),actualMoves));\r\n sb.append(String.format(\"Actual End Game:\\n%s\",game));\r\n } \r\n // Different path but same length, not an error\r\n else if(actualMoves.size() == expectMoves.size()){\r\n continue;\r\n }\r\n // Check if the moves are longer than the expected\r\n else if(actualMoves.size() > expectMoves.size()){\r\n sb.append(\"Actual move sequence is longer than the expected move sequence\\n\");\r\n sb.append(String.format(\"Expect sequence (length %s): %s\\n\",expectMoves.size(),expectMoves));\r\n sb.append(String.format(\"Actual sequence (length %s): %s\\n\",actualMoves.size(),actualMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n }\r\n // A shorter path!?\r\n else {\r\n sb.append(\"Actual move sequence is SHORTER than the expected move sequence\\n\");\r\n sb.append(\"YOU HAVE DISCOVERED A BUG IN THE TEST CASES: NOTIFY THE COURSE INSTRUCTOR\\n\");\r\n sb.append(String.format(\"Expect sequence (length %s): %s\\n\",expectMoves.size(),expectMoves));\r\n sb.append(String.format(\"Actual sequence (length %s): %s\\n\",actualMoves.size(),actualMoves));\r\n sb.append(String.format(\"Target Game:\\n%s\",targetGame));\r\n }\r\n sb.append(this.toString());\r\n appendAllStates(states, sb);\r\n fail(sb.toString());\r\n }\r\n }", "public void jump() {\n if (this.numJumps < 3) {\n if (this.state.equals(\"onLeftWall\")) {\n this.moveRight();\n this.setSpecialState(\"jumpFromWall\", 180);\n } else if (this.state.equals(\"onRightWall\")) {\n this.moveLeft();\n this.setSpecialState(\"jumpFromWall\", 180);\n }\n this.yVel = this.jumpVel;\n this.numJumps++;\n }\n\n\n }", "public int moves() {\n if (isSolvable())\n return _moves;\n else\n return -1;\n }", "public boolean isWalking(){\n if (jumpState < 2)\n return true;\n else\n return false;\n}", "public MahjongSolitaireMove findMove()\n {\n // MAKE A MOVE TO FILL IN \n MahjongSolitaireMove move = new MahjongSolitaireMove();\n\n // GO THROUGH THE ENTIRE GRID TO FIND A MATCH BETWEEN AVAILABLE TILES\n for (int i = 0; i < gridColumns; i++)\n {\n for (int j = 0; j < gridRows; j++)\n {\n ArrayList<MahjongSolitaireTile> stack1 = tileGrid[i][j];\n if (stack1.size() > 0)\n {\n // GET THE FIRST TILE\n MahjongSolitaireTile testTile1 = stack1.get(stack1.size()-1);\n for (int k = 0; k < gridColumns; k++)\n {\n for (int l = 0; l < gridRows; l++)\n {\n if (!((i == k) && (j == l)))\n { \n ArrayList<MahjongSolitaireTile> stack2 = tileGrid[k][l];\n if (stack2.size() > 0) \n {\n // AND TEST IT AGAINST THE SECOND TILE\n MahjongSolitaireTile testTile2 = stack2.get(stack2.size()-1);\n \n // DO THEY MATCH\n if (testTile1.match(testTile2))\n {\n // YES, FILL IN THE MOVE AND RETURN IT\n move.col1 = i;\n move.row1 = j;\n move.col2 = k;\n move.row2 = l;\n return move;\n }\n }\n }\n }\n }\n }\n }\n }\n // WE'VE SEARCHED THE ENTIRE GRID AND THERE\n // ARE NO POSSIBLE MOVES REMAINING\n return null;\n }", "private Move getBestMove(RaceTrack track, CellData[][] cells,\n\t\t\tPair<Integer, Integer> pos, Pair<Integer, Integer> speed, int depth) {\n\t\tCellData cellData = cells[pos.getLeft()][pos.getRight()];\n\n\t\tMap<Pair<Integer, Integer>, Character> availableMoves = new HashMap<>();\n\t\tint contX = pos.getLeft() + speed.getLeft();\n\t\tint contY = pos.getRight() + speed.getRight();\n\n\t\tPair<Integer, Integer> cont0 = Pair.of(contX, contY);\n\t\tif (cellData.getLegalMoves().contains(cont0)) {\n\t\t\tavailableMoves.put(cont0, '0');\n\t\t}\n\t\tPair<Integer, Integer> contL = Pair.of(contX - 1, contY);\n\t\tif (cellData.getLegalMoves().contains(contL)) {\n\t\t\tavailableMoves.put(contL, 'L');\n\t\t}\n\t\tPair<Integer, Integer> contR = Pair.of(contX + 1, contY);\n\t\tif (cellData.getLegalMoves().contains(contR)) {\n\t\t\tavailableMoves.put(contR, 'R');\n\t\t}\n\t\tPair<Integer, Integer> contU = Pair.of(contX, contY - 1);\n\t\tif (cellData.getLegalMoves().contains(contU)) {\n\t\t\tavailableMoves.put(contU, 'U');\n\t\t}\n\t\tPair<Integer, Integer> contD = Pair.of(contX, contY + 1);\n\t\tif (cellData.getLegalMoves().contains(contD)) {\n\t\t\tavailableMoves.put(contD, 'D');\n\t\t}\n\t\tfinal Map<Pair<Integer, Integer>, Integer> moveMap = new HashMap<>();\n\n\t\tfor (Pair<Integer, Integer> move : availableMoves.keySet()) {\n\t\t\tint moveValue = getMoveValue(cells, pos.getLeft(), pos.getRight(),\n\t\t\t\t\tmove.getLeft(), move.getRight());\n\t\t\tmoveMap.put(move, moveValue);\n\t\t}\n\n\t\tList<Pair<Integer, Integer>> allMoves = new ArrayList<>(\n\t\t\t\tmoveMap.keySet());\n\t\tCollections.sort(allMoves, new Comparator<Pair<Integer, Integer>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Pair<Integer, Integer> o1,\n\t\t\t\t\tPair<Integer, Integer> o2) {\n\t\t\t\treturn Integer.compare(moveMap.get(o2), moveMap.get(o1));\n\t\t\t}\n\t\t});\n\t\tPair<Integer, Integer> bestMove = allMoves.get(0);\n\n\t\tif ((depth == 0) || (moveMap.get(bestMove) > 0)) {\n\t\t\treturn new Move(bestMove, moveMap.get(bestMove),\n\t\t\t\t\tavailableMoves.get(bestMove));\n\t\t}\n\t\tfinal Map<Pair<Integer, Integer>, Integer> newMoveMap = new HashMap<>();\n\t\tfor (Pair<Integer, Integer> move : allMoves) {\n\t\t\tPair<Integer, Integer> newSpeed = Pair.of(\n\t\t\t\t\tmove.getLeft() - pos.getLeft(),\n\t\t\t\t\tmove.getRight() - pos.getRight());\n\t\t\tint moveValue = getBestMove(track, cells, move, newSpeed, depth - 1).value;\n\t\t\tnewMoveMap.put(move, moveValue);\n\t\t}\n\t\tCollections.sort(allMoves, new Comparator<Pair<Integer, Integer>>() {\n\t\t\t@Override\n\t\t\tpublic int compare(Pair<Integer, Integer> o1,\n\t\t\t\t\tPair<Integer, Integer> o2) {\n\t\t\t\treturn Integer.compare(newMoveMap.get(o2), newMoveMap.get(o1));\n\t\t\t}\n\t\t});\n\t\tbestMove = allMoves.get(0);\n\t\treturn new Move(bestMove, moveMap.get(bestMove),\n\t\t\t\tavailableMoves.get(bestMove));\n\t}", "private void getKingJumpPos(Point kingPoint, Orientation or, Movement m, JumpPosition jumpPosit,Color c, boolean b) throws CloneNotSupportedException {\n Point foo = jumpPosit.jumpPosition.get(jumpPosit.jumpPosition.size()-1).to;\n Color oposite = c==Color.black?Color.red:Color.black;\n \n Point soldierPoint , nextPoint;\n for(OrientationMove orM:orientationMoveCombs){\n Point currentPoint = foo;\n for(int i=0;i<8;i++){\n if(i!=0) currentPoint = getXandYgivenOrientation(currentPoint, orM.or,orM.m);\n if( !isValidSquare(currentPoint.x, currentPoint.y)) \n break;\n if( !isEmpty(new Soldier(currentPoint.x, currentPoint.y, Color.white), gamePieces)) \n break;\n //soldierPoint = getXandYgivenOrientation(currentPoint, or,m);\n\n soldierPoint = getXandYgivenOrientation(currentPoint, orM.or,orM.m);\n nextPoint = getXandYgivenOrientation(soldierPoint, orM.or,orM.m);\n Soldier foe = new Soldier(soldierPoint.x, soldierPoint.y, oposite);\n if(isJumpable(soldierPoint, orM.or, orM.m, c , jumpPosit))\n addAllRelevantSquares(jumpPosit, foo, nextPoint, soldierPoint, orM.or, orM.m ,oposite );\n\n\n nextPoint = getXandYgivenOrientation(soldierPoint, or,m);\n if(!isEmpty(soldierPoint, gamePieces, jumpPosit.jumpPosition)\n &&!isEmpty(nextPoint, gamePieces, jumpPosit.jumpPosition)) break; \n }\n }\n \n \n \n //If it is, add it to the movement path\n// if(isJumpable(soldierPoint, or, m, c , jumpPositions)){ \n// addOnlyToTempJumpPositions(foo, getXandYgivenOrientation(soldierPoint, or,m) , soldierPoint ,jumpPosit , or, m);\n// }\n \n }", "public List<Move> validMoves(){\n List<Move> results = new LinkedList<>();\n int kingVal = turn == WHITE ? WHITE_KING : BLACK_KING;\n int kingX = 0, kingY = 0;\n List<Piece> checks = null;\n kingSearch:\n for (int y = 0; y < 8; y++){\n for (int x = 0; x < 8; x++){\n if (board[y][x] == kingVal){\n kingX = x;\n kingY = y;\n checks = inCheck(x,y);\n break kingSearch;\n }\n }\n }\n if (checks.size() > 1){ // must move king\n for (int x = -1; x < 2; x++){\n for (int y = -1; y < 2; y++){\n if (kingX+x >= 0 && kingX + x < 8 && kingY+y >= 0 && kingY+y < 8){\n int val = board[kingY+y][kingX+x];\n if (val == 0 || turn == WHITE && val > WHITE_KING || turn == BLACK && val < BLACK_PAWN){\n // may still be a move into check, must test at end\n results.add(new Move(kingVal, kingX, kingY, kingX+x, kingY+y, val, 0, this));\n }\n }\n }\n }\n } else { // could be in check TODO: split into case of single check and none, identify pin/capture lines\n int queen = turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN;\n int knight = turn == WHITE ? WHITE_KNIGHT : BLACK_KNIGHT;\n int rook = turn == WHITE ? WHITE_ROOK : BLACK_ROOK;\n int bishop = turn == WHITE ? WHITE_BISHOP : BLACK_BISHOP;\n for (int y = 0; y < 8; y++) {\n for (int x = 0; x < 8; x++) {\n int piece = board[y][x];\n if (piece == (turn == WHITE ? WHITE_PAWN : BLACK_PAWN)) { // pawns\n // regular | 2 move\n if (board[y+turn][x] == 0){\n if (y+turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x, y + turn, 0, queen, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, knight, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, rook, this));\n results.add(new Move(piece, x, y, x, y + turn, 0, bishop, this));\n }\n else {\n results.add(new Move(piece, x, y, x, y + turn, 0, 0, this));\n if ((y == (turn == WHITE ? 1 : 6)) && board[y + 2 * turn][x] == 0) { // initial 2 move\n results.add(new Move(piece, x, y, x, y + 2*turn, 0, 0, this));\n }\n }\n }\n // capture\n for (int dx = -1; dx <= 1; dx += 2){\n if (x + dx >= 0 && x + dx < 8) {\n int val = board[y+turn][x+dx];\n if (val > 0 && (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n if (y + turn == 0 || y + turn == 7){ // promotion\n results.add(new Move(piece, x, y, x+dx, y + turn, val, queen, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, knight, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, rook, this));\n results.add(new Move(piece, x, y, x+dx, y + turn, val, bishop, this));\n } else {\n results.add(new Move(piece, x, y, x+dx, y + turn, val, 0, this));\n }\n }\n if (val == 0 && y == (turn == WHITE ? 4 : 3) && x+dx == enPassant){ // en passant\n results.add(new Move(piece, x, y, x+dx, y + turn, 0, 0, this));\n }\n }\n }\n\n } else if (piece == knight) { // knights TODO: lookup table\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -2; dy <= 2; dy += 4){\n if (x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n if (x+dy >= 0 && x + dy < 8 && y + dx >= 0 && y + dx < 8){\n int val = board[y+dx][x+dy];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dy,y+dx,val,0,this));\n }\n }\n }\n }\n } else if (piece == bishop) { // bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == rook) { // rooks\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_QUEEN : BLACK_QUEEN)) { // queens\n // Diagonals - same as bishops\n for (int dx = -1; dx <= 1; dx += 2){\n for (int dy = -1; dy <= 1; dy += 2){\n int i = 1;\n while (x + dx*i >= 0 && x + dx*i < 8 && y + dy*i >= 0 && y + dy*i < 8){\n int val = board[y+dy*i][x+dx*i];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i,y+dy*i,val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n for (int dx = -1; dx <= 1; dx+= 2){\n for (int ax = 0; ax < 2; ax++){\n int i = 1;\n while (ax==0 ? y+dx*i >= 0 && y+dx*i < 8 : x+dx*i >= 0 && x+dx*i < 8){\n int val = board[y+dx*i*(1-ax)][x+dx*i*ax];\n if (val == 0){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n } else {\n if (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN){\n results.add(new Move(piece,x,y,x+dx*i*ax,y+dx*i*(1-ax),val,0,this));\n }\n break;\n }\n i++;\n }\n }\n }\n } else if (piece == (turn == WHITE ? WHITE_KING : BLACK_KING)) { // king\n for (int dx = -1; dx < 2; dx++){\n for (int dy = -1; dy < 2; dy++){\n if ((dx != 0 || dy != 0) && x+dx >= 0 && x + dx < 8 && y + dy >= 0 && y + dy < 8){\n int val = board[y+dy][x+dx];\n if (val == 0 || (turn == WHITE ? val > WHITE_KING : val < BLACK_PAWN)){\n results.add(new Move(piece,x,y,x+dx,y+dy,val,0,this));\n }\n }\n }\n }\n }\n }\n }\n // castle\n if (checks.size() == 0){\n if (turn == WHITE && (castles & 0b11) != 0){//(castles[0] || castles[1])){\n board[0][4] = 0; // remove king to avoid check test collisions with extra king\n if ((castles & WHITE_SHORT) != 0 && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n //if (castles[0] && board[0][5] == 0 && board[0][6] == 0 && inCheck(5,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 6, 0, 0, 0, this));\n }\n if ((castles & WHITE_LONG) != 0 && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 &&\n inCheck(3,0).size() == 0){\n //if (castles[1] && board[0][1] == 0 && board[0][2] == 0 && board[0][3] == 0 && inCheck(3,0).size() == 0){\n results.add(new Move(WHITE_KING, 4, 0, 2, 0, 0, 0, this));\n }\n board[0][4] = WHITE_KING;\n }else if (turn == BLACK && (castles & 0b1100) != 0){//(castles[2] || castles[3])) {\n board[7][4] = 0; // remove king to avoid check test collisions with extra king\n //if (castles[2] && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n if ((castles & BLACK_SHORT) != 0 && board[7][5] == 0 && board[7][6] == 0 && inCheck(5, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 6, 7, 0, 0, this));\n }\n //if (castles[3] && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 && inCheck(3, 7).size() == 0) {\n if ((castles & BLACK_LONG) != 0 && board[7][1] == 0 && board[7][2] == 0 && board[7][3] == 0 &&\n inCheck(3, 7).size() == 0) {\n results.add(new Move(BLACK_KING, 4, 7, 2, 7, 0, 0, this));\n }\n board[7][4] = BLACK_KING;\n }\n }\n }\n List<Move> fullLegal = new LinkedList<>();\n for (Move m : results){\n makeMove(m);\n turn = -turn;\n if (m.piece == WHITE_KING || m.piece == BLACK_KING){\n if (inCheck(m.toX,m.toY).size() == 0){\n fullLegal.add(m);\n }\n }else if (inCheck(kingX,kingY).size() == 0){\n fullLegal.add(m);\n }\n turn = -turn;\n undoMove(m);\n }\n Collections.sort(fullLegal, (o1, o2) -> o2.score - o1.score); // greatest score treated as least so appears first\n return fullLegal;\n }", "public int getJumpCount()\n{\n return jumpCount;\n}", "void simulateMove(CheckersData cur_board, CheckersMove move, int player) {\n\n cur_board.makeMove(move);\n\n /* If the move was a jump, it's possible that the player has another\n jump. Check for legal jumps starting from the square that the player\n just moved to. If there are any, the player must jump. The same\n player continues moving. That means their could be another choice to make.\n */\n if (move.isJump()) {\n CheckersMove[] newMoves;\n newMoves = cur_board.getLegalJumpsFrom(player, move.toRow, move.toCol);\n if (newMoves != null) {\n simulateMove(cur_board, newMoves[0], player);\n }\n \t // we have to keep jumping until we can't! If there is more than one jump\n // we are just going to have to pick the first one. More logic could go here\n }\n return;\n }", "private void compareMove(int next){\n moveBuffer[0] = moveBuffer[1];//moveBuffer[0]=currentLocation,1 is next;\n moveBuffer[1] = next;\n if(moveBuffer[0]==moveBuffer[1]){\n flagbuffer0=0;\n return;\n }\n int currenti=0;int currentj=0;\n for ( int i = 0; i < 3; ++i ) {\n for ( int j = 0; j < 3; ++j ) {\n if ( maze[i][j] == moveBuffer[0] ) {\n currenti=i;\n currentj=j;\n break;// Found the correct i,j - print them or return them or whatever\n }\n }\n }\n int nexti=0;int nextj=0;\n for ( int i = 0; i < 3; ++i ) {\n for ( int j = 0; j < 3; ++j ) {\n if ( maze[i][j] == moveBuffer[1] ) {\n nexti=i;\n nextj=j;\n break;// Found the correct i,j - print them or return them or whatever\n }\n }\n }\n\n if( currenti== nexti){\n if(nextj > currentj && flagbuffer0==0){\n /*uiShowToast(\"Going right\");\n System.out.println(\"Going right\");\n this.sendCarMovement(\"R\");*/\n uiShowToast(\"Going right\");\n this.sendCarMovement(\"R\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\"); flagbuffer0=1;\n }\n else if(nextj < currentj && flagbuffer0==0){\n uiShowToast(\"Going left\");\n this.sendCarMovement(\"L\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\"); flagbuffer0=1;\n }\n else if(flagbuffer0==1){\n this.sendCarMovement(\"U\");\n }\n }\n if( currentj== nextj){\n if(nexti > currenti){\n /*uiShowToast(\"Going down\");\n System.out.println(\"Going down\");\n this.sendCarMovement(\"D\");*/\n uiShowToast(\"Going down\");\n flagbuffer0=0;\n this.sendCarMovement(\"L\");\n try {\n Thread.sleep(1100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\");\n\n }\n else if(nexti < currenti){\n /*uiShowToast(\"Going up\");\n System.out.println(\"Going up\");\n this.sendCarMovement(\"U\");*/\n uiShowToast(\"Going up\");\n flagbuffer0=0;\n this.sendCarMovement(\"U\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\");\n }\n }\n /*if(movebuffer[0]==mvebuffer[1]){\n uiShowToast(\"Going up\");\n this.sendCarMovement(\"U\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\");\n }else{\n\n }\n\n /*\n */\n /* Damon movement code\n if(moveBuffer[1] == 100 && moveBuffer[0] == 200){\n uiShowToast(\"Going left\");\n System.out.println(\"Going left\");\n this.sendCarMovement(\"L\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\");\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }else{\n uiShowToast(\"Going up\");\n //Toast.makeText(getApplicationContext(), \"Going up\", Toast.LENGTH_LONG).show();\n System.out.println(\"Going up\");\n this.sendCarMovement(\"U\");\n try {\n Thread.sleep(2000);//wait 2 sec to next command;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n */\n return;\n }", "@Test\n public void testCanJump() {\n world.add(new Location(2, 2), jumper);\n world.add(new Location(0, 2), rock);\n assertEquals(false, jumper.canJump());\n jumper.turn();\n world.add(new Location(0, 4), flower);\n assertEquals(true, jumper.canJump());\n jumper.jump();\n assertEquals(false, jumper.canJump());\n jumper.turn();\n jumper.turn();\n jumper.turn();\n world.add(new Location(2, 4), jumper2); \n assertEquals(false, jumper.canJump());\n jumper.turn();\n world.add(new Location(2, 2), bug);\n assertEquals(false, jumper.canJump());\n }", "@Override\n\tpublic boolean jump() {\n\t\tboolean rs = super.jump();\n\t\tif(rs == true){\n\t\t}\n\t\treturn rs;\n\t\t\n\t}", "@Override\n ArrayList<Cell> findPossibleMoves(Cell workerPosition) {\n ArrayList<Cell> neighbors = board.getNeighbors(workerPosition);\n ArrayList<Cell> possibleMoves = new ArrayList<Cell>();\n for (Cell cell : neighbors) {\n // + allow movement to cells occupied by opponents, if they can be pushed away\n Cell nextCell;\n int nextX = cell.getPosX() + (cell.getPosX() - workerPosition.getPosX());\n int nextY = cell.getPosY() + (cell.getPosY() - workerPosition.getPosY());\n try {\n nextCell = board.getCell(nextX, nextY);\n } catch (ArrayIndexOutOfBoundsException e) {\n nextCell = null;\n }\n if ((!cell.hasWorker() || (nextCell != null && !nextCell.hasWorker() && !nextCell.isDomed())) &&\n !cell.isDomed() && (cell.getBuildLevel() <= workerPosition.getBuildLevel() + 1))\n possibleMoves.add(cell);\n //\n }\n return findLegalMoves(workerPosition, possibleMoves);\n }", "public abstract void calculateMoves();", "public void Move(){\n for(int i = 0; i < moveList.length; i++){\n playerString = \"\";\n switch(moveList[i]) {\n case 1: {\n //TODO: Visited points to others\n System.out.println(\"Moving up!\");\n //Logic for fitness score might need to be moved\n if(!(game.mazeArray[game.playerPosition.getPlayerY() -1][game.playerPosition.getPlayerX()] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() - 1 + game.playerPosition.getPlayerX()\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 10;\n }\n game.moveUp();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n case 2: {\n System.out.println(\"Moving left!\");\n if(!(game.mazeArray[game.playerPosition.getPlayerY()][game.playerPosition.getPlayerX() -1] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() + game.playerPosition.getPlayerX() -1\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 1;\n }\n game.moveLeft();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n case 3: {\n System.out.println(\"Moving right!\");\n if(!(game.mazeArray[game.playerPosition.getPlayerY()][game.playerPosition.getPlayerX() +1] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() + game.playerPosition.getPlayerX() +1\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 1;\n }\n game.moveRight();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n case 4: {\n System.out.println(\"Moving down!\");\n if(!(game.mazeArray[game.playerPosition.getPlayerY() +1][game.playerPosition.getPlayerX()] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() + 1 + game.playerPosition.getPlayerX()\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n freedomPoints += 1;\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 1;\n }\n game.moveDown();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n default: {\n System.out.println(\"End of line\");\n break;\n //You shouldn't be here mate.\n }\n }\n }\n\n }", "public void doubleJump() {\n\t\tmultipleJump = true;\n\t\tint pieceJumping = arr[prevPosX][prevPosY];\n\t\tLogic.arr[prevPosX][prevPosY] = 0;\n\t\tLogic.arr[prevPosX + (xdiff * 2)][prevPosY + (ydiff * 2)] = 0;\n\t\tLogic.arr[prevPosX + (xdiff * 3)][prevPosY + (ydiff * 3)] = 0;\n\t\tif (prevPosX + (xdiff * 4) == 7 || prevPosX + (xdiff * 4) == 0) {\n\t\t\tif (pieceJumping < 3) // If the piece is a pawn\n\t\t\t\tsetPieceJumpingToArr(pieceJumping + 2); // Make a king\n\t\t\telse\n\t\t\t\tsetPieceJumpingToArr(pieceJumping); // Set the king on row 0 or 7\n\t\t} else\n\t\t\tsetPieceJumpingToArr(pieceJumping); // Set the piece\n\t\tP2P.pieceMoveChanger();\n\t\tfor (int i = 0; i < 8; i++){\n\t\t\tSystem.out.println();\n\t\t\tfor (int j = 0; j < 8; j++)\n\t\t\t\tSystem.out.print(arr[i][j]);\n\t\t}\n\t}", "public void find(int uMove, int cMove)\r\n { \r\n switch (uMove)\r\n {case 1 : //Scissors\r\n switch (cMove)\r\n {case 1: Win=1; //Tie with Scissors\r\n break;\r\n case 2: Win=4; //User wins with Scissors\r\n break;\r\n case 3: Win=9; //Comp wins with Rock\r\n break;\r\n }\r\n break;\r\n case 2 : //Paper\r\n switch (cMove)\r\n {case 1: Win=7; //Comp wins with Scissors\r\n break;\r\n case 2: Win=2; //Tie with Paper\r\n break;\r\n case 3: Win=5; //User wins with Paper\r\n break;\r\n }\r\n break;\r\n case 3 ://Rock\r\n switch (cMove)\r\n {case 1: Win=6; //User wins with Rock\r\n break;\r\n case 2: Win=8; //Comp wins with Paper\r\n break;\r\n case 3: Win=3; //Tie with Rock\r\n break;\r\n }\r\n break;\r\n default: JOptionPane.showMessageDialog(null,\r\n \"Error: Unknown Move Input - WinCalc.find 97\", \r\n \"digiRPS - Error\", \r\n JOptionPane.ERROR_MESSAGE);\r\n break;\r\n }\r\n \r\n //Update boolean trackers for last game result\r\n npcWin=((Win==7) ^ (Win==8) ^ (Win==9));\r\n tie=((Win==1) ^ (Win==2) ^ (Win==3));\r\n }", "public void move(BoardState state) {\n\t move = alphabetaSearch(state, maxDepth);\r\n\r\n\t\t// TEST CASES\r\n\t\t// System.out.println(maxValue(state, maxDepth, 2, -1000, 1000));\r\n\t\t// System.out.println(alphabetaSearch(state, 10));\r\n\r\n\t}", "public boolean jump () {\n\t\t// Velocity first (Symplectic Euler)\n\t\tdata._jumpVel = data._jumpVel - data._timeStep * data._gravity;\n\t\tdata._jumpPos = data._jumpPos + data._jumpVel * data._timeStep;\n\t\tif (data._jumpVel <= -10.5) {\n\t\t\tdata._timeStep = 0.02;\n\t\t\tdata._jumpPos = 0; \n\t\t\tdata._jumpVel = 10; \n\t\t\treturn false; \n\t\t}\n\t\t// Set position\n\t\tthis.setPosition( new Vec2d(this.getMainCharacter().getData().getPosition().x, - 70 * data._jumpPos + 400));\n\t\tthis.getMainCharacter().getData().setPosition(this.getPosition());\n\t\treturn true;\n\t}", "public void setJumpCount(int jumpCount) {this.jumpCount = jumpCount;}", "public abstract String jump();", "public void jumpRun(int bars) {\n }", "public int moves() {\n\t\tif (!isSolvable())\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn result.size() - 1;\n\t}", "@Test\n //test if the jumper can move if it's surrounded by the jumpers\n public void testMove() {\n world.add(new Location(FOUR , FOUR), jumper);\n world.add(new Location(THREE, FOUR), new jumper());\n world.add(new Location(FIVE, FOUR), new jumper());\n world.add(new Location(FOUR, THREE), new jumper());\n world.add(new Location(FOUR, FIVE), new jumper());\n jumper.act();\n assertEquals(new Location(TWO, FOUR), jumper.getLocation());\n }", "public boolean checkForJumping(int roundsInFuture) {\n return (round + roundsInFuture) % Config.ROUNDS_PER_JUMP == 0;\n }", "public boolean jumpMayBeChanged() {\n\t\treturn (subBlocks[1].jump != null || subBlocks[1].jumpMayBeChanged());\n\t}", "public int moves() {\n if (!isSolvable()) {\n return -1;\n } else {\n return minNode.getMove();\n }\n\n }", "public int moves() {\n \tif (!isSolvable) return -1;\n \treturn solutionNode.getMoves();\n }", "public static int[][] getAllBasicJumps(int[][] board, int player) {\r\n\t\t\t\r\n\t\tint[][] moves = new int [0][4];\r\n\t\tint[][] SaveMoves = new int [0][4]; /*save our moves of the soldures*/\r\n\t\tint[][] positions = playerDiscs(board,player);\r\n\t\tint SumAllJump=0; /*varibel ho count all the posible Jumps*/\r\n\t\t\t\r\n\t\tfor(int IPD=0;IPD<positions.length;IPD=IPD+1){/*running on all the solduers*/\r\n\t\t\t/*Building an array with all the move possible for a specific soldier*/\r\n\t\t\tint[][] JumpsPossible = getRestrictedBasicJumps (board,player,positions[IPD][0],positions[IPD][1]); \r\n\t\t\t/*if the move legal enter the move in the arry*/\r\n\t\t\tif (JumpsPossible.length>0){/*If the soldier has jumps legality, From one with jumps by other soldiers*/\t\t\t\t\r\n\t\t\t\tSumAllJump=SumAllJump+JumpsPossible.length;\r\n\t\t\t\tSaveMoves = moves;\r\n\t\t\t\tmoves = new int [SumAllJump][4];\r\n\t\t\t\tif (SumAllJump>1) {\r\n\t\t\t\t\tfor (int idxSAM1=SaveMoves.length-1;idxSAM1>-1;idxSAM1=idxSAM1-1){\r\n\t\t\t\t\t\tfor (int idxSAM2=0;idxSAM2<4;idxSAM2=idxSAM2+1){\r\n\t\t\t\t\t\t\tmoves[idxSAM1][idxSAM2]=SaveMoves[idxSAM1][idxSAM2];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\tfor(int indx=0;indx<JumpsPossible.length;indx=indx+1){\r\n\t\t\t\t\tmoves [moves.length-JumpsPossible.length+indx][0]=JumpsPossible [indx][0];\r\n\t\t\t\t\tmoves [moves.length-JumpsPossible.length+indx][1]=JumpsPossible [indx][1];\r\n\t\t\t\t\tmoves [moves.length-JumpsPossible.length+indx][2]=JumpsPossible [indx][2];\r\n\t\t\t\t\tmoves [moves.length-JumpsPossible.length+indx][3]=JumpsPossible [indx][3];\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\t\r\n\t\treturn moves;\r\n\t}", "private void jump(){\n getField().pandaJumped(this);\n }", "@Override\n\tpublic InternalCoordinate findJump(InternalCoordinate c) {\n\t\treturn null;\n\t}", "public int moves() {\n return isSolvable() ? finalMove.moves : -1;\n }", "public static int minJump(int n) {\n int jumps1=n,jumps2=n,jumps3=n;\n if (n == 1) {\n return 1;\n // return jumps - you don't need to recurse here\n } else {\n // find at what all places you can jump\n jumps1 = minJump(n - 1) + 1;\n if (n % 2 == 0) {\n jumps2 = minJump(n / 2) + 1;\n }\n if (n % 3 == 0) {\n jumps3 = minJump(n / 3) + 1;\n }\n return Math.min(Math.min(jumps1, jumps2), jumps3); // takes jump2 and jump3 only if they are valid\n }\n }", "private void continuousJump(Vector3 position, Move m) {\n if (m.moving)\n position.y += m.jumpForceMoving;\n\t\telse\n position.y += m.jumpForce;\n //Gdx.app.log(TAG, \"continuious jkumpj\");\n\n\t}", "public Move getNextJumps(CheckersSetup setup, checkersSetup.Board board, ArrayList<Move> multiJumpChoices) {\n\t\tMove move = desiredTurn.getMovesFor1Turn().get(numJumpsAlreadyDoneThisTurn);\n\t\t\n\t\t//Testing\n\t\tBasicCheckersAIFunctions.doSanityCheckMakeSureCompMoveIsRealMove(desiredTurn.getMovesFor1Turn().get(numJumpsAlreadyDoneThisTurn), multiJumpChoices);\n\t\t//Testing\n\t\t\n\t\tnumJumpsAlreadyDoneThisTurn++;\n\t\t\n\t\treturn move;\n\t}", "private int[] findNextMove(State s, double[] weights) {\n\t\tboolean[][] newField = new boolean[State.ROWS][State.COLS];\n\t\tint[] newTop = new int[State.COLS];\n\t\tint bestRot = 0;\n\t\tint bestPos = 0;\n\t\tdouble bestValue = -Double.MAX_VALUE;\n\n\t\tint nextPiece = s.getNextPiece();\n\t\tint[][] legalMoves = s.legalMoves();\n\t\tfor (int i = 0; i < legalMoves.length; i++) {\n\t\t\tint rot = legalMoves[i][State.ORIENT];\n\t\t\tint pos = legalMoves[i][State.SLOT];\n\t\t\tint rowsCleared = performMove(s, newField, newTop, nextPiece, rot, pos);\n\t\t\tint holes = 0;\n\t\t\tint bumpiness = 0;\n\t\t\tint maxHeight = 0;\n\t\t\tint minHeight = State.ROWS;\n\n\t\t\tfor (int c = 0; c < State.COLS; ++c) {\n\t\t\t\tboolean blocked = false;\n\t\t\t\t// total height\n\t\t\t\tmaxHeight = Math.max(maxHeight, s.getTop()[c]);\n\t\t\t\tminHeight = Math.min(minHeight, s.getTop()[c]);\n\t\t\t\t// sum of difference of consecutive heights\n\t\t\t\tif (c > 0)\n\t\t\t\t\tbumpiness += (newTop[c] - newTop[c - 1]) * (newTop[c] - newTop[c - 1]);\n\t\t\t\tfor (int r = State.ROWS - 1; r >= 0; --r) {\n\t\t\t\t\tif (newField[r][c]) {\n\t\t\t\t\t\tblocked = true;\n\t\t\t\t\t} else if (!newField[r][c] && blocked) {\n\t\t\t\t\t\t// number of holes\n\t\t\t\t\t\tholes += 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdouble value = calculateValueOfField(weights, maxHeight, minHeight, rowsCleared, holes, bumpiness);\n\t\t\tif (value > bestValue) {\n\t\t\t\tbestValue = value;\n\t\t\t\tbestRot = rot;\n\t\t\t\tbestPos = pos;\n\t\t\t}\n\n\t\t}\n\n\t\treturn new int[] { bestRot, bestPos };\n\n\t}", "public int moves() {\n if (!isSolvable()) return -1;\n return realMoves;\n }", "int increaseScoreThisJump() {\n if (myScoreThisJump == 0) {\n myScoreThisJump++;\n } else {\n myScoreThisJump *= 2;\n }\n return (myScoreThisJump);\n }", "public boolean isJumping() {\n if (steps.size() > 0) {\n boolean jump = false;\n for (MoveStep step : steps) {\n if (step.getType() == MovePath.MoveStepType.START_JUMP) {\n jump = true;\n }\n }\n return jump;\n }\n return false;\n }", "private void checkMovement() {\n\n if (getYVelocity() < 0) state = PlayerState.JUMPING;\n if (getYVelocity() == 0) /*|| getXVelocity() == 0)*/ state = PlayerState.STANDING;\n if (Keyboard.isKeyDown(Keyboard.KEY_W)) {\n\n if (!falling && !floating()) {\n\n if (getYVelocity() >= 0) {\n this.addY(-72);\n }\n\n }\n }\n\n if (Keyboard.isKeyDown(Keyboard.KEY_A)) {\n this.addX((float) -5);\n state = PlayerState.WALKLEFT;\n }\n if (Keyboard.isKeyDown(Keyboard.KEY_D)) {\n this.addX((float) 5);\n state = PlayerState.WALKRIGHT;\n }\n if (getYVelocity() > 0) state = PlayerState.FALLING;\n }", "public void MovesRemainingExists() {\n InsideMovesRemainingExists = 1;\n NoMovesRemaining = 1;\n Beginning:\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n previousX = i;\n previousY = j + 1;\n if ((i + 1) < 9) {\n ValidSwitch(i + 1, j + 1);\n if (NoMovesRemaining == 0) { //checks the candies to the right\n ResetState();\n break Beginning; //breaks the loop\n }\n }\n\n if ((i - 1) >= 0) {\n ValidSwitch(i - 1, j + 1);\n if (NoMovesRemaining == 0) { //checks the candies to the left\n ResetState();\n break Beginning;\n }\n }\n\n if ((j + 1) < 9) {\n ValidSwitch(i, j + 2);\n if (NoMovesRemaining == 0) { //checks the candies on the bottom\n ResetState();\n break Beginning;\n }\n }\n\n if ((j - 1) >= 0) {\n ValidSwitch(i, j);\n if (NoMovesRemaining == 0) { //checks the candies at the top\n ResetState();\n break Beginning;\n }\n }\n }\n\n }\n InsideMovesRemainingExists = 0;\n\n}", "private void jump() {\n\t\t\n\t\t// resets game\n\t\tif (gameOver) {\n\t\t\tbird = new Rectangle(WIDTH/2-10, HEIGHT/2-10, 20, 20);\n\t\t\tcolumns.clear();\n\t\t\tyMotion = 0;\n\t\t\tscore = 0;\n\t\t\t\n\t\t\taddColumn(true);\n\t\t\taddColumn(true);\n\t\t\taddColumn(true);\n\t\t\taddColumn(true);\n\t\t\t\n\t\t\tgameOver = false;\n\t\t}\n\t\t\n\t\t// starts game\n\t\tif (!started) {\n\t\t\tstarted = true;\n\t\t}\n\t\t\n\t\telse if (started && !gameOver) {\n\t\t\tif (yMotion > 0) {\n\t\t\t\tyMotion = 0;\n\t\t\t}\n\t\t\t\n\t\t\tyMotion -= 10;\n\t\t}\n\t\t\n\t}", "public boolean isJumping(){\r\n\t\tif(jumping){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isLegalJump(MoveDirection dir){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\t\tPlayer white = currentGame.getWhitePlayer();\n\t\t\tint whiteCol = curPos.getWhitePosition().getTile().getColumn();\n\t\t\tint whiteRow = curPos.getWhitePosition().getTile().getRow();\n\t\t\tint blackCol = curPos.getBlackPosition().getTile().getColumn();\n\t\t\tint blackRow = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t\tint rChange = 0, cChange = 0;\n\t\t\tif(dir == MoveDirection.North) rChange = -2;\n\t\t\telse if(dir == MoveDirection.South) rChange = 2;\n\t\t\telse if(dir == MoveDirection.East) cChange = 2;\n\t\t\telse if(dir == MoveDirection.West) cChange = -2;\n\t\t\telse return false;\n\t\t\t\n\t\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\t\t\n\t\t\t\t//Moving left or right wall check\n\t\t\t\tif(cChange != 0) {\n\t\t\t\t\tif(blackRow != whiteRow || blackCol != (whiteCol + (cChange / 2) ) ) return false;\n\t\t\t\t\twhiteCol += cChange;\n\t\t\t\t\tif(whiteCol < 1 || whiteCol > 9) return false;\n\t\t\t\t\tfor(WallMove w : QuoridorController.getWalls()) {\n\t\t\t\t\t\tif(w.getWallDirection() == Direction.Vertical) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//If left- check col -1, -2. If right- check col +0, +1\n\t\t\t\t\t\t\tint tmp;\n\t\t\t\t\t\t\tif(cChange < 0) tmp = -2;\n\t\t\t\t\t\t\telse tmp = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint checkCol = (whiteCol -cChange) + tmp;\n\t\t\t\t\t\t\tif((w.getTargetTile().getColumn() == checkCol ||w.getTargetTile().getColumn() == checkCol + 1) && \n\t\t\t\t\t\t\t (w.getTargetTile().getRow() == whiteRow || w.getTargetTile().getRow() == whiteRow - 1)) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Horizontal Wall can't block right/left path\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t//Moving up or down wall check\n\t\t\t\telse if(rChange != 0) {\n\t\t\t\t\tif(blackCol != whiteCol || blackRow != (whiteRow + (rChange / 2) ) ) return false;\n\t\t\t\t\twhiteRow += rChange;\n\t\t\t\t\tif(whiteRow < 1 || whiteRow > 9) return false;\n\t\t\t\t\tfor(WallMove w : QuoridorController.getWalls()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(w.getWallDirection() == Direction.Horizontal) {\n\t\t\t\t\t\t\t//If up- check row -1, -2. If down- check row +0, +1\n\t\t\t\t\t\t\tint tmp;\n\t\t\t\t\t\t\tif(rChange < 0) tmp = -2;\n\t\t\t\t\t\t\telse tmp = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint checkRow = (whiteRow -rChange) + tmp;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif((w.getTargetTile().getRow() == checkRow || w.getTargetTile().getRow() == checkRow + 1)\n\t\t\t\t\t\t\t\t&& (w.getTargetTile().getColumn() == whiteCol || w.getTargetTile().getColumn() == whiteCol - 1)) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Vertical Wall can't block up/down path\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((blackRow == whiteRow) && (blackCol == whiteCol)) return false;\n\t\t\t} else {\n\n\t\t\t\t//Moving left or right wall check\n\t\t\t\tif(cChange != 0) {\n\t\t\t\t\tif(blackRow != whiteRow || whiteCol != (blackCol + (cChange / 2) ) ) return false;\n\t\t\t\t\tblackCol += cChange;\n\t\t\t\t\tif(blackCol < 1 || blackCol > 9) return false;\n\t\t\t\t\tfor(WallMove w : QuoridorController.getWalls()) {\n\t\t\t\t\t\tif(w.getWallDirection() == Direction.Vertical) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//If left- check col -1, -2. If right- check col +0, +1\n\t\t\t\t\t\t\tint tmp;\n\t\t\t\t\t\t\tif(cChange < 0) tmp = -2;\n\t\t\t\t\t\t\telse tmp = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint checkCol = (blackCol -cChange) + tmp;\n\n\t\t\t\t\t\t\tif((w.getTargetTile().getColumn() == checkCol ||w.getTargetTile().getColumn() == checkCol + 1) && \n\t\t\t\t\t\t\t (w.getTargetTile().getRow() == blackRow || w.getTargetTile().getRow() == blackRow - 1)) {\n\t\t\t\t\t\t\t\treturn false;\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//Horizontal Wall can't block right/left path\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t//Moving up or down wall check\n\t\t\t\telse if(rChange != 0) {\n\t\t\t\t\tif(blackCol != whiteCol || whiteRow != (blackRow + (rChange / 2) ) ) return false;\n\t\t\t\t\tblackRow += rChange;\n\t\t\t\t\tif(blackRow < 1 || blackRow > 9) return false;\n\t\t\t\t\tfor(WallMove w : QuoridorController.getWalls()) {\n\t\t\t\t\t\tif(w.getWallDirection() == Direction.Horizontal) {\n\t\t\t\t\t\t\t//If up- check row -1, -2. If down- check row +0, +1\n\t\t\t\t\t\t\tint tmp;\n\t\t\t\t\t\t\tif(rChange < 0) tmp = -2;\n\t\t\t\t\t\t\telse tmp = 0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint checkRow = (blackRow -rChange) + tmp;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif((w.getTargetTile().getRow() == checkRow || w.getTargetTile().getRow() == checkRow + 1)\n\t\t\t\t\t\t\t\t&& (w.getTargetTile().getColumn() == blackCol || w.getTargetTile().getColumn() == blackCol - 1)) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Vertical Wall can't block up/down path\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((blackRow == whiteRow) && (blackCol == whiteCol)) return false;\n\t\t\t}\n\t\t\treturn true;\r\n }", "public int jump(int[] nums) {\n int[] dp = new int[nums.length];\n for(int i=1;i<nums.length;i++) {\n dp[i] = Integer.MAX_VALUE;\n }\n for(int start =0 ; start < nums.length-1 ;start++){\n for(int end=start+1; end<=start+nums[start] && end<nums.length; end++){\n dp[end] = Math.min(dp[end], dp[start]+1);\n }\n }\n return dp[nums.length-1];\n }", "public void performMove() {\n\t\tfor (int x = 0; x <= size-1; x++)\n\t\t\tfor (int y = 0; y <= size-1; y++)\n\t\t\t\tlocalBoard[y][x] = 0;\n\t\t\n\t\t//reset the flag that indicates if a move has been found that decreases the heuristic\n\t\tfoundBetterMove = false;\n\t\t\n\t\t//fill in the appropriate heuristic values\n\t\tpopulateHillValues();\n\t\tArrayList<PotentialMove> myBestList = new ArrayList<PotentialMove>();\n\n\t\t//Find the square with the lowest heuristic value. this should really write the values to an array. \n\t\tint squareDifferential = -1;\n\t\t//String outValue = \"\";\n\t\tfor (int y = 0; y <= size-1; y++) {\n\t\t\tfor (int x = 0; x <= size-1; x++){\n\t\t\t\t//outValue = outValue + localBoard[y][x];\n\t\t\t\tif (squareDifferential < 0) //lowestSquareFound not found yet \n\t\t\t\t{\n\t\t\t\t\tif ((NQueens.queens[x] != y) && //set if the current square isn't already occupied by a queen\n\t\t\t\t\t\t\t(localBoard[NQueens.queens[x]][x] >= localBoard[y][x])) {\n\t\t\t\t\t\tif (localBoard[y][x] == localBoard[NQueens.queens[x]][x])\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) > squareDifferential) { // find the square with the largest differential in value from the queen in the column\n\t\t\t\t\tmyBestList.clear();\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t}\n\t\t\t\telse if (((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) == squareDifferential) && // the differential is equal to the current best differential\n\t\t\t\t\t\t(NQueens.queens[x] != y)) { // and isn't already occupied by a queen\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t}\n\t\t\t\t//else the square is higher, has a queen or isn't marginally better than the current queen's position in the row\n\t\t\t}\n\t\t\t//outValue = outValue + \"\\n\";\n\t\t}\n\t\t//JOptionPane.showMessageDialog(null, outValue);\n\t\t\n\t\tif (myBestList.isEmpty())\n\t\t\treturn;\n\t\t\n\t\tint listSize = myBestList.size();\n\t\tPotentialMove bestMove;\n\t\t\n\t\t//grab the non-Sideways moves first\n\t\tfor (int i = 0; i < listSize; i++) {\n\t\t\tif (!(myBestList.get(i).isSideways)) {\n\t\t\t\tbestMove = myBestList.get(i);\n\t\t\t\tfoundBetterMove = true;\n\t\t\t\tsidewaysMoves = 0;\n\t\t\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (sidewaysMoves > MAXSIDEWAYSMOVES) { // hit MAXSIDEWAYSMOVES consecutive sideways moves, mark as unsolvable\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//all available moves sideways moves, let's select one randomly\n\t\tRandom generator = new Random();\n\t\tint randomElement = generator.nextInt(listSize);\n\t\t\n\t\tbestMove = myBestList.get(randomElement);\n\t\tfoundBetterMove = true;\n\t\tsidewaysMoves++;\n\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t}", "static int minJumps(int[] arr){\n int n = arr.length;\n int[] dp = new int[n];\n for(int i = 0; i < n; i++) dp[i] = Integer.MAX_VALUE;\n dp[0] = 0;\n for(int i = 1; i < n; i++){\n //checking from 0 to index i that if there is a shorter path for \n //current position to reach from any of the previous indexes\n //also previous index should not be MAX_VALUE as this will show that\n //we were not able to reach this particular index\n for(int j = 0; j < i; j++){\n if(dp[j] != Integer.MAX_VALUE && arr[j] + j >= i){\n if(dp[j] + 1 < dp[i]){\n dp[i] = dp[j] + 1;\n }\n }\n }\n }\n \n if(dp[n - 1] != Integer.MAX_VALUE){\n return dp[n - 1];\n }\n \n return -1;\n }", "public static int canJumpII(int[] nums) {\n if (nums == null || nums.length == 0)\n return 0;\n int lastReach = 0;\n int reach = 0;\n int step = 0;\n for (int i = 0; i <= reach && i < nums.length; i++) {\n //when last jump can not read current i, increase the step by 1\n if (i > lastReach) {\n step++;\n lastReach = reach;\n }\n //update the maximal jump\n reach = Math.max(reach, nums[i] + i);\n }\n if (reach < nums.length - 1)\n return 0;\n return step;\n }", "public boolean isJumping() { return isJumping; }", "void doMakeMove(CheckersMove move) {\n\n boardData.makeMove(move, false);\n\n /* If the move was a jump, it's possible that the player has another\n jump. Check for legal jumps starting from the square that the player\n just moved to. If there are any, the player must jump. The same\n player continues moving. */\n \n if (move.isJump()) {\n legalMoves = boardData.getLegalJumpsFrom(currentPlayer, move.toRow, move.toCol);\n if (legalMoves != null) {\n if (currentPlayer == CheckersData.RED) {\n console(\"RED: You must continue jumping.\");\n } else {\n console(\"BLACK: You must continue jumping.\");\n }\n selectedRow = move.toRow; // Since only one piece can be moved, select it.\n selectedCol = move.toCol;\n refreshBoard();\n return;\n }\n }\n\n /* The current player's turn is ended, so change to the other player.\n Get that player's legal moves. If the player has no legal moves,\n then the game ends. */\n if (currentPlayer == CheckersData.RED) {\n currentPlayer = CheckersData.BLACK;\n legalMoves = boardData.getLegalMoves(currentPlayer);\n if (legalMoves == null) {\n gameOver(\"BLACK has no moves. RED wins.\");\n } else if (legalMoves[0].isJump()) {\n console(\"BLACK: Make your move. You must jump.\");\n } else {\n console(\"BLACK: Make your move.\");\n }\n } else {\n currentPlayer = CheckersData.RED;\n legalMoves = boardData.getLegalMoves(currentPlayer);\n if (legalMoves == null) {\n gameOver(\"RED has no moves. BLACK wins.\");\n } else if (legalMoves[0].isJump()) {\n console(\"RED: Make your move. You must jump.\");\n } else {\n console(\"RED: Make your move.\");\n }\n }\n\n /* Set selectedRow = -1 to record that the player has not yet selected\n a piece to move. */\n selectedRow = -1;\n\n /* As a courtesy to the user, if all legal moves use the same piece, then\n select that piece automatically so the user won't have to click on it\n to select it. */\n if (legalMoves != null) {\n boolean sameStartSquare = true;\n for (int i = 1; i < legalMoves.length; i++) {\n if (legalMoves[i].fromRow != legalMoves[0].fromRow\n || legalMoves[i].fromCol != legalMoves[0].fromCol) {\n sameStartSquare = false;\n break;\n }\n }\n if (sameStartSquare) {\n selectedRow = legalMoves[0].fromRow;\n selectedCol = legalMoves[0].fromCol;\n }\n }\n\n /* Make sure the board is redrawn in its new state. */\n refreshBoard();\n\n }", "public String[] search() {\n\t\t\n\t\troot.setScore(0);\n\t\tleaves = 0;\n\t\t\n\t\t/*\n\t\t * Interrupt the think() thread so we can have the updated game tree\n\t\t */\n\t\t\n\t\tString[] move = new String[2];\n\t\t\n\t\t// Find the max or min value for the white or black player respectively\n\t\tfloat val = alphaBeta(root, max_depth, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, player);\n\t\t\n\t\t// Retrieve the move that has the min/max vlaue\n\t\tArrayList<Node> moves = root.getChildren();\n\t\tfor(Node n : moves) {\n\t\t\tif(Float.compare(n.value, val) == 0) {\n\t\t\t\tint[] m = new int[6];\n\t\t\t\tint encodedM = n.move;\n\t\t\t\t\n\t\t\t\t// Decode the move\n\t\t\t\tfor(int i = 0; i < 6; i++) {\n\t\t\t\t\tm[i] = encodedM & 0xf;\n\t\t\t\t\tencodedM >>= 4;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Convert the array into a string array with the format [0] => \"a7-b7\", [1] => \"b5\"\n\t\t\t\tmove[0] = ((char)(m[0] + 97)) + \"\" + (m[1]) + \"-\" + ((char)(m[2] + 97)) + \"\" + (m[3]);\n\t\t\t\tmove[1] = ((char)(m[4] + 97)) + \"\" + (m[5]);\n\t\t\t\t\n\t\t\t\t// Play the move on the AI's g_board, set the root to this node and break out of the loop\n\t\t\t\tg_board.doMove(n.move);\n\t\t\t\t\n\t\t\t\t// Reset the root rather than set it to a branch since we can currently only achieve a depth of 2-ply\n\t\t\t\troot.getChildren().clear();\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(leaves <= 2000) {\n\t\t\tmax_depth++;\n\t\t}\n\t\t\n\t\t/*\n\t\t * Start the think() thread\n\t\t */\n\t\t\n\t\treturn move;\n\t}", "@Override\n\tpublic boolean move() {\n\n\t\tif ((key_state & MyConst.Key.LEFT) == MyConst.Key.LEFT)\n\t\t\tif (x <= 0) {\n\t\t\t\tthis.pos.x = x + (int) (width * 0.25);\n\t\t\t\tthis.x = 0;\n\t\t\t} else {\n\t\t\t\tthis.pos.x -= 5;\n\t\t\t\tthis.x -= 5;\n\t\t\t}\n\t\tif ((key_state & MyConst.Key.RIGHT) == MyConst.Key.RIGHT)\n\t\t\tif (x >= MyConst.GamePan.GAMEPAN_W - MyImages.img_me.getWidth(null)) {\n\t\t\t\tx = MyConst.GamePan.GAMEPAN_W - MyImages.img_me.getWidth(null);\n\t\t\t\tthis.pos.x = x + (int) (width * 0.25);\n\t\t\t} else {\n\t\t\t\tthis.pos.x += 5;\n\t\t\t\tx += 5;\n\t\t\t}\n\t\tif (((key_state & MyConst.Key.UP) == MyConst.Key.UP) && !jump) {\n\t\t\tjump = true;\n\t\t\tSystem.out.println(jump);\n\t\t}\n\n\t\tif ((key_state & MyConst.Key.FIRE) == MyConst.Key.FIRE) {\n\t\t\tSystem.out.println(\"--Fire--\");\n\t\t\tbulletManager.make_bullet(x + width / 2, y);\n\t\t}\n\n\t\t// jump\n\t\tif (jump) {\n\t\t\tSystem.out.println(this.y);\n\t\t\tif (this.y >= jump_interval) {\n\t\t\t\tthis.y -= 5;\n\t\t\t\tthis.pos.y -= 5;\n\t\t\t} else {\n\t\t\t\tjump = false;\n\n\t\t\t}\n\t\t} else if (!jump && (this.y < MyConst.GamePan.GAMEPAN_H - height)) {\n\t\t\tthis.y += 5;\n\t\t\tthis.pos.y += 5;\n\t\t}\n\t\treturn false;\n\t}", "public void signalCheck() {\n if(moves.length == 0){\n setiHaveCheck(false);\n pathToKing = null;\n rangeOfCheck = null;\n }\n for(int i = 0; i < moves.length; i++) {\n Space tmp = Board.fetchSpace(moves[i]);\n if(tmp.getPiece() != null) {\n if(this.getType().charAt(0) != tmp.getPiece().getType().charAt(0) && tmp.getPiece().getType().charAt(1) == 'K') {\n setiHaveCheck(true);\n calcPathToKing(tmp);\n break;\n }\n else {\n setiHaveCheck(false);\n pathToKing = null;\n rangeOfCheck = null;\n }\n }\n else {\n setiHaveCheck(false);\n pathToKing = null;\n rangeOfCheck = null;\n }\n }\n }", "public void visit(JumpStatement jumpStatement) {\n\t}", "public int dFSJumps(Color c, Orientation or, Movement m, JumpPosition jumpPosit, boolean initial) throws CloneNotSupportedException{\n Point foo = jumpPosit.jumpPosition.get(jumpPosit.jumpPosition.size()-1).to;\n //Search if there is a soldier and is jumpble from this position\n Point soldierPoint;\n soldierPoint = getXandYgivenOrientation(foo, or, m);\n //If it is, add it to the movement path\n if(isJumpable(soldierPoint, or, m, c , jumpPosit)){ \n addOnlyToTempJumpPositions(foo, getXandYgivenOrientation(soldierPoint, or,m) , soldierPoint ,jumpPosit , or, m);\n }\n return 0;\n }", "private void updateJump()\n {\n\t\tif(isJumping && jumpKeyDown)\n\t\t{\n\t\t\tif(ySpeed > maxJumpSpeed)\n\t\t\t{\n\t \t\tySpeed -= jumpIncr;\n\t \t\tSystem.out.println(\" Player.updateJump() : \" + ySpeed);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\n \t\t\t\t\"updateJump() --> maximum jump speed reached : \" + ySpeed);\n\t\t\t\tisJumping = false;\n\t\t\t}\n\t\t}\n\t}", "public static boolean move() {\n S.rc.setIndicatorString(2, \"move\");\n if (target == null) {\n System.err.println(\"ERROR: tried to move without target\");\n return false;\n }\n\n // Check if we are close enough.\n int distanceSqToTarget = S.rc.getLocation().distanceSquaredTo(target);\n if (distanceSqToTarget <= thresholdDistanceSq) {\n // Stop bugging.\n start = null;\n S.rc.setIndicatorString(2, \"close enough\");\n return moveCloserToTarget();\n }\n\n if (start == null) {\n // Not currently bugging.\n forward = S.rc.getLocation().directionTo(target);\n S.rc.setIndicatorString(2, \"not buggin\");\n if (moveForwardish()) return true;\n // Start bugging.\n start = S.rc.getLocation();\n forward = forward.rotateRight().rotateRight();\n return move();\n } else {\n // Already bugging.\n // Stop bugging if we got closer to the target than when we started bugging.\n if (distanceSqToTarget < start.distanceSquaredTo(target)) {\n start = null;\n return move();\n }\n\n // Stop bugging if back-left is clear.\n // This means that we must have bugged around something that has since moved.\n if (canMove(forward.rotateLeft().rotateLeft().rotateLeft())) {\n start = null;\n forward = S.rc.getLocation().directionTo(target);\n S.rc.setIndicatorString(2, \"back left clear, forward \" + forward);\n return moveForwardish();\n }\n\n S.rc.setIndicatorString(2, \"scan circle\");\n forward = forward.rotateLeft().rotateLeft();\n // Try moving left, and try every direction in a circle from there.\n for (int i = 0; i < 8; i++) {\n if (moveForwardStrict()) return true;\n forward = forward.rotateRight();\n }\n return false;\n }\n }", "public int minCostWJumps(int st,int sc,int er,int ec,int cost[][]){\n if(st==er&&sc==ec) return cost[st][sc];\n int c=0;\n for(int jump=1;jump+sc<=ec;jump++){\n c=Math.min(c,minCostWJumps(st,sc+jump,er,ec,cost));\n }\n for(int jump=1;jump+st<=er;jump++){\n c=Math.min(c,minCostWJumps(st+jump,sc,er,ec,cost));\n }\n for(int jump=1;jump+sc<=ec&&jump+st<=er;jump++){\n c=Math.min(c,minCostWJumps(st+jump,sc+jump,er,ec,cost));\n }\n return c+cost[st][sc];\n}", "public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }", "public static boolean moveking() //returns false if valid move is there\n{ System.out.println(\"IN FUNCTION MOVE KING.....\");\n flag=0;\n int kx,ky;\n if(q==2)\n {\n kx=p2.ka.kbx; //WHITE KING....\n ky=p2.ka.kby;\n } \nelse\n {\n kx=p1.ka.kax; //BLACK KING....\n\tky=p1.ka.kay;\n }\n//CHECKS WHETHER KING CAN MOVE TO THE 8 adjacent places...\n if(kx-1>=0)\n {\n move2(kx,ky,kx-1,ky);\n \n if(flag==1)\n {\n revert(kx,ky,kx-1,ky);\n return false;\n }\n }\n //r\n if(kx+1<=7)\n { move2(kx,ky,kx+1,ky);\n if(flag==1)\n {revert(kx,ky,kx+1,ky);\n return false;\n \n }\n }\n \n //u\n if(ky-1>=0)\n {\n move2(kx,ky,kx,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx,ky-1);\n return false;\n \n }\n }\n //d\n if(ky+1<=7)\n {\n move2(kx,ky,kx,ky+1);\n \n if(flag==1)\n { revert(kx,ky,kx,ky+1);\n return false;\n \n }\n }\n //lu\n if(kx-1>=0&&ky-1>=0)\n {\n move2(kx,ky,kx-1,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx-1,ky-1);\n return false;\n \n }\n }\n //ld\n if(kx-1>=0&&ky+1<=7)\n {\n move2(kx,ky,kx-1,ky+1);\n \n if(flag==1)\n {revert(kx,ky,kx-1,ky+1);\n return false;\n \n }\n }\n //ru\n if(kx+1<=7&&ky-1>=0)\n {\n move2(kx,ky,kx+1,ky-1);\n \n if(flag==1)\n {revert(kx,ky,kx+1,ky-1);\n return false;\n \n }\n }\n //rd\n if(kx+1<=7&&ky+1<=7)\n {\n move2(kx,ky,kx+1,ky+1);\n \n if(flag==1)\n {revert(kx,ky,kx+1,ky+1);\n return false;\n \n }\n }\n return true; \n }", "@Test\n public void testJump() {\n world.add(new Location(4, 4), jumper);\n assertEquals(new Location(4, 4), jumper.getLocation());\n jumper.jump();\n assertEquals(new Location(2, 4), jumper.getLocation());\n }", "public int moves() {\n\t\tif (goal == null)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn goal.moves;\n\t}", "@Override\r\n\tpublic void move() {\n\t\tPoint target = strategy.search(this.getLocation(), new Point(0,0));\r\n\r\n\t\tint tries = 0;\r\n\t\t\r\n\t\twhile(!state.equals(\"Inactive\") && !game.movement(this, target.x, target.y)){\r\n\t\t\ttarget = strategy.search(new Point(x,y),playerLocation);\r\n\t\t\ttries++;\r\n\t\t\tif(tries > 4) return; // the search strategy has 4 tries to pick a valid location to move to\r\n\t\t}\r\n\t\t\r\n\t\tx = target.x;\r\n\t\ty = target.y;\r\n\r\n\t\tmoveSprite();\r\n\t}", "public void setJumpCount(int count)\n{\n jumpCount = count;\n}", "public void jump() {\n\t\t// if (isBlock_down()) {\n\t\t// setJumpTTL(getMaxJumpTTL());\n\t\t// setBlock_down(false);\n\t\t// }\n\t}", "public void movePeice(MouseEvent e) {\r\n\r\n\t\tint[] id = gameBoard.coordinateToID(e.getX(), e.getY());\r\n\t\t\r\n\t\tSystem.out.println(\"isOppNear: \" + gameBoard.isOpponentNear(id, 1));\r\n\t\t\r\n\t\tif (gameBoard.isIdTurn(id)) {\r\n\t\t\tgameBoard.setFocusedLocation(id);\r\n\r\n\t\t\tArrayList<int[]> jumpingPos = gameBoard.getPositions(true);\r\n\t\t\tif (!jumpingPos.isEmpty()) {\r\n\r\n\t\t\t\t// check if current mouse click id has jumping move if it\r\n\t\t\t\t// doesn't show an warning\r\n\t\t\t\tif (gameBoard.getPossibleMoves(id, true).isEmpty()) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(gameView, \"Must Jump Your Opponent\", \"Must Jump!\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t\t// set focus moves to only jumping moves\r\n\t\t\t\tgameBoard.setMovesOnFocus(gameBoard.getPossibleMoves(id, true));\r\n\t\t\t} else {\r\n\t\t\t\t// normal move - if there is no possible jumping move\r\n\t\t\t\tgameBoard.setMovesOnFocus(gameBoard.getPossibleMoves(id, false));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!gameBoard.getMovesOnFocus().isEmpty()) {\r\n\r\n\t\t\tfor (int[] ID : gameBoard.getMovesOnFocus()) {\r\n\r\n\t\t\t\tif (id[0] == ID[0] && id[1] == ID[1]) {\r\n\t\t\t\t\tsetProperDuration();\r\n\t\t\t\t\ttimer.setStart();\r\n\t\t\t\t\tgameBoard.movePiece(gameBoard.getFocusedLocation(), ID);\r\n\r\n\t\t\t\t\t// check if next if there are jumping moves\r\n\t\t\t\t\t// if so set the timer duration to 1 min\r\n\t\t\t\t\t// gameBoard.removeMovesOnFocus();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// TODO: add logic to restart, etc...\r\n\t\tif (gameBoard.getBlackScore() == 12) {\r\n\t\t\tpopUpWin(\"Black!\");\r\n\t\t} else if (gameBoard.getRedScore() == 12) {\r\n\t\t\tpopUpWin(\"Red!\");\r\n\t\t}\r\n\t}", "private int Win_Move() {\n\t\tfinal int POSSIBLE_WIN = 8;\n\t\tint move = NO_MOVE;\n\t\tif(( gameBoard[TOP_LEFT] + gameBoard[TOP_CENTER] + gameBoard[TOP_RIGHT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[TOP_CENTER] == EMPTY){\n\t\t\t\tmove = TOP_CENTER;\n\t\t\t}else if (gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[CTR_LEFT] + gameBoard[CTR_CENTER] + gameBoard[CTR_RIGHT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[CTR_LEFT] == EMPTY){\n\t\t\t\tmove = CTR_LEFT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[CTR_RIGHT] == EMPTY){\n\t\t\t\tmove = CTR_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[BTM_LEFT] + gameBoard[BTM_CENTER] + gameBoard[BTM_RIGHT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}else if (gameBoard[BTM_CENTER] == EMPTY){\n\t\t\t\tmove = BTM_CENTER;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_LEFT] + gameBoard[BTM_LEFT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[CTR_LEFT] == EMPTY){\n\t\t\t\tmove = CTR_LEFT;\n\t\t\t}else if (gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_CENTER] + gameBoard[CTR_CENTER] + gameBoard[BTM_CENTER]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[TOP_CENTER] == EMPTY){\n\t\t\t\tmove = TOP_CENTER;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_CENTER] == EMPTY){\n\t\t\t\tmove = BTM_CENTER;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_RIGHT] + gameBoard[BTM_RIGHT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}else if (gameBoard[CTR_RIGHT] == EMPTY){\n\t\t\t\tmove = CTR_RIGHT;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_LEFT] + gameBoard[CTR_CENTER] + gameBoard[BTM_RIGHT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[TOP_LEFT] == EMPTY){\n\t\t\t\tmove = TOP_LEFT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_RIGHT] == EMPTY){\n\t\t\t\tmove = BTM_RIGHT;\n\t\t\t}\n\t\t}else if((gameBoard[TOP_RIGHT] + gameBoard[CTR_CENTER] + gameBoard[BTM_LEFT]) == POSSIBLE_WIN){\n\t\t\tif(gameBoard[TOP_RIGHT] == EMPTY){\n\t\t\t\tmove = TOP_RIGHT;\n\t\t\t}else if (gameBoard[CTR_CENTER] == EMPTY){\n\t\t\t\tmove = CTR_CENTER;\n\t\t\t}else if (gameBoard[BTM_LEFT] == EMPTY){\n\t\t\t\tmove = BTM_LEFT;\n\t\t\t}\n\t\t}\n\t\treturn move;\n\t}", "public boolean canJump() {\n\t\treturn false;\n\t}", "private void changeJumps(int breakBCI, int delta) {\n int bci = 0;\n int bc;\n\n // Now, adjust any affected instructions.\n while (bci < bytecodesLength) {\n bc = (bytecodes[bci] & 0xFF);\n\n if (((bc >= opc_ifeq) && (bc <= opc_if_acmpne)) || (bc == opc_ifnull) || (bc == opc_ifnonnull) || (bc == opc_goto)\n || (bc == opc_jsr)) {\n changeJump(bci, bci + 1, true, breakBCI, delta);\n } else {\n switch (bc) {\n case opc_goto_w:\n case opc_jsr_w:\n changeJump(bci, bci + 1, false, breakBCI, delta);\n\n break;\n case opc_tableswitch:\n case opc_lookupswitch: {\n int recPad = getOrigSwitchPadding(bci, (bc != opc_tableswitch));\n int oldPad = (recPad != -1) ? recPad : (align(bci + 1) - (bci + 1));\n\n if (bci > breakBCI) {\n int new_bci = bci + delta;\n int newPad = align(new_bci + 1) - (new_bci + 1);\n\n // Do we need to check the padding?\n if (newPad != oldPad) {\n if (recPad == -1) {\n changes.push(new ChangeSwitchPadding(bci, oldPad, (bc != opc_tableswitch)));\n }\n }\n }\n\n // Then the rest, which depends on the kind of switch.\n if (bc == opc_tableswitch) {\n changeJump(bci, bci + 1 + oldPad, false, breakBCI, delta);\n\n // We cannot use the Bytecode_tableswitch abstraction, since the padding might not be correct.\n int lo = getInt(bci + 1 + oldPad + (4 * 1));\n int hi = getInt(bci + 1 + oldPad + (4 * 2));\n int n = hi - lo + 1;\n\n for (int k = 0; k < n; k++) {\n changeJump(bci, bci + 1 + oldPad + (4 * (k + 3)), false, breakBCI, delta);\n }\n\n // Special next-bci calculation here...\n bci += (1 + oldPad + ((n + 3) * 4));\n\n continue;\n } else {\n changeJump(bci, bci + 1 + oldPad, false, breakBCI, delta);\n\n // We cannot use the Bytecode_lookupswitch abstraction, since the padding might not be correct.\n int npairs = getInt(bci + 1 + oldPad + (4 * 1));\n\n for (int k = 0; k < npairs; k++) {\n changeJump(bci, bci + 1 + oldPad + (4 * (2 + (2 * k) + 1)), false, breakBCI, delta);\n }\n\n // Special next-bci calculation here...\n bci += (1 + oldPad + ((2 + (npairs * 2)) * 4));\n\n continue;\n }\n }\n default:\n break;\n }\n }\n\n bci += opcodeLength(bci);\n }\n }", "public int moves()\n {\n\n if (goalNode!=null && goalNode.board.isGoal()){\n return goalNode.moves;\n }\n return -1;\n }", "public void setJumpState(int n)\n{\n jumpState=n;\n}", "@Override\n public boolean canJump()\n {\n return canJump;\n }" ]
[ "0.6464137", "0.64124614", "0.6292719", "0.62354255", "0.62319225", "0.6173455", "0.61646426", "0.6141445", "0.6019937", "0.60168815", "0.5978496", "0.5971064", "0.5945976", "0.59437186", "0.59330326", "0.591635", "0.5914893", "0.58931893", "0.58862394", "0.5828063", "0.5821112", "0.5804137", "0.58007973", "0.5750646", "0.57483697", "0.57454336", "0.5735051", "0.5704491", "0.56963676", "0.5680069", "0.5679467", "0.56785333", "0.5655868", "0.5642305", "0.56422305", "0.56337243", "0.5622171", "0.5611377", "0.5605973", "0.560381", "0.5587355", "0.5581407", "0.55769205", "0.55698216", "0.5533519", "0.5529194", "0.55248153", "0.551436", "0.5508982", "0.5506873", "0.5498326", "0.5482163", "0.5476404", "0.547463", "0.546459", "0.5457566", "0.5449903", "0.54485726", "0.54372793", "0.54323685", "0.54181546", "0.5415657", "0.5410256", "0.5409672", "0.53998613", "0.5399708", "0.53948414", "0.53915256", "0.53872675", "0.53753465", "0.5373855", "0.53714824", "0.53712887", "0.5370925", "0.5370359", "0.53698134", "0.53541493", "0.53530526", "0.5349239", "0.5346657", "0.53363585", "0.5324161", "0.53241277", "0.5314127", "0.53083307", "0.52920586", "0.5290327", "0.5287297", "0.52857757", "0.5281229", "0.52796984", "0.5272279", "0.5269791", "0.52631974", "0.5262572", "0.5252751", "0.52478474", "0.5240791", "0.5240629", "0.5240248", "0.52376795" ]
0.0
-1
Calculates the value of the move. It is the difference in distance between origin/destination and the field that the pawn is going to.
private int valueOfMove(Field origin, Field destination) { return distance(origin, destinationField) - distance(destination, destinationField); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getMove2Value();", "private static int getMoveValue(CellData[][] cells, int fromX, int fromY,\n\t\t\tint toX, int toY) {\n\t\tPair<Boolean, Intersection> moveResult = isMoveLegal(cells,\n\t\t\t\tPair.of(fromX, fromY), Pair.of(toX, toY));\n\t\tif (!moveResult.getLeft()) {\n\t\t\tthrow new IllegalArgumentException(\"Illegal move: [\" + fromX + \", \"\n\t\t\t\t\t+ fromY + \"] -> [\" + toX + \", \" + toY + \"]\");\n\t\t}\n\t\tif (moveResult.getRight() != null) {\n\t\t\t// the higher speed, the better\n\t\t\treturn 1000 * (Math.abs(toX - fromX) + Math.abs(fromY - toY));\n\t\t}\n\t\t// this is not a finishing move\n\t\treturn cells[toX][toY].distanceToFinish * (-1000)\n\t\t\t\t+ (Math.abs(toX - fromX) + Math.abs(fromY - toY));\n\t}", "private float getPlayerMove() {\r\n\t\treturn 1.0f / 5;\r\n\t}", "int getMove1Value();", "protected int getMove(){\r\n\t\treturn this.move;\r\n\t}", "int getMove3Value();", "public double getDirectionMove();", "public double getDistance(){\n return sensor.getVoltage()*100/2.54 - 12;\n }", "private double getDistance() {\n\t\tfinal double h2 = 86.7;\n\t\t// h1: height of top of camera\n\t\tfinal double h1 = 17.6;\n\n\t\t// a1: angle of camera (relative to chasis)\n\t\tfinal double a1 = 36.175;\n\t\t// a2: angle of target relative to a1\n\t\tfinal double a2 = ty.getDouble(0.0);\n\n\t\t// distance: distance from camera to base of target\n\t\tfinal double distance = ((h2 - h1) / Math.tan(Math.toRadians(a1 + a2)));\n\n\t\tfinal double d = Math.sqrt(Math.pow(h2 - h1, 2) + Math.pow(distance, 2));\n\t\tSmartDashboard.putNumber(\"Py Distance\", d);\n\n\t\treturn (distance);\n\n\t}", "protected long travel() {\n\n return Math.round(((1 / Factory.VERTEX_PER_METER_RATIO) / (this.speed / 3.6)) * 1000);\n }", "protected int getMove() \t\t\t\t{\treturn move;\t\t}", "public float getTimeToMove()\n\t{\n\t\treturn this.timeToMove;\n\t}", "private int distance(Field origin, Field destination) {\n int horizontalLength = Math.abs(destination.getY() - origin.getY());\n int verticalLength = Math.abs(destination.getX() - origin.getX());\n return (horizontalLength + verticalLength)/2;\n }", "public float getDistance()\n {\n return distance_slider.getValue() / DISTANCE_SCALE_FACTOR;\n }", "public int getMove(){\n return this.move;\n }", "private double distance() {\n\t\tdouble dist = 0;\n\t\tdist = Math.sqrt(Math.abs((xOrigin - x) * (xOrigin - x) + (yOrigin - y) * (yOrigin - y)));\n\t\treturn dist;\n\t}", "@Override\n\tpublic double calculateVelocity() {\n\t\tdouble result = distance / time + velocitySame - velocityReverse;\n\t\treturn result;\n\t}", "public double getDistance() {\n\t\t// miles = miles/hr * s / (s/hr)\n\t\treturn (double)speed/10.0 * duration / 3600.0;\n\t}", "public float getTheDistance(){\n\t\t\n\t\tdistance = sonic.getDistance();\n\t\tSystem.out.println(\"value:\"+ distance);\n\t\t//considering the test results we see after 23 cm we see the +1cm precision and below 23cm we see + 5cm range \n\t\tif (distance<=25){\n\t\treturn (distance-7);\n\t\t}\n\t\telse{return (distance-3);}\n\t}", "public double getDistanceToTarget() {\n if (!Config.isVisionInstalled) {\n return 0;\n }\n double distanceToVisionTarget =\n Config.visionDistanceConstant * (Config.fieldVisionTargetHeight-Config.limelightMountingHeight) /\n Math.tan(Math.toRadians(limelight.getTy() + Config.limelightMountingAngle));\n\n //now we can convert the new values into a new distance\n return distanceToVisionTarget;\n }", "public int getMovement() {\n return movement;\n }", "public int moves() {\n return isSolvable() ? finalMove.moves : -1;\n }", "public double getDistance() { \n\t\treturn Math.pow(input.getAverageVoltage(), exp) * mul; \n\t}", "@Override\n\tpublic void calculating() {\n\t\tresult=leftVal-rightVal;\n\t\t\n\t}", "protected float getMovementSpeed() {\r\n\t\tfloat speed = getSpeed();\r\n\t\treturn speed / 17f + (float) Math.pow(Math.sqrt(speed), 1.225f) * 0.985f;\r\n\t}", "@Override\n public void calculateMove() {\n int xa = 0, ya = 0;\n if (steps <= 0) {\n direction = ep.calculateDirection();\n steps = MAX_STEPS;\n }\n if (direction == 0) {\n ya--;\n }\n if (direction == 2) {\n ya++;\n }\n if (direction == 3) {\n xa--;\n }\n if (direction == 1) {\n xa++;\n }\n if (canMove(xa, ya)) {\n steps -= 1 + rest;\n move(xa * speed, ya * speed);\n moving = true;\n } else {\n steps = 0;\n moving = false;\n }\n }", "double getDistance();", "@Override\r\n public double getOriginDistance()\r\n {\r\n double distance=Math.sqrt(\r\n Math.pow(origin.getYCoordinate(), 2)+Math.pow(origin.getYCoordinate(), 2));\r\n return distance;\r\n }", "public float getDistance();", "public float getDistance() {\r\n return distance;\r\n }", "public int getPlayerMoveAmount() {\n return 3;\n }", "public int moves() {\n\t\tif (goal == null)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn goal.moves;\n\t}", "private void calculateMovement() {\r\n \tmovementY = (int)(movementSpeed * Math.sin(Math.toRadians(movementDirection - 90)));\r\n \tmovementX = (int)(movementSpeed * Math.cos(Math.toRadians(movementDirection - 90)));\r\n }", "public int moves()\n {\n\n if (goalNode!=null && goalNode.board.isGoal()){\n return goalNode.moves;\n }\n return -1;\n }", "public float getDistance() {\n return distance;\n }", "public double calcDistance(final Move otherPoint) {\r\n \r\n final double x = this.currentMove.getX();\r\n final double y = this.currentMove.getY();\r\n \r\n final double x2 = otherPoint.getX();\r\n final double y2 = otherPoint.getY();\r\n \r\n final double distx = Math.abs(x2 - x);\r\n final double disty = Math.abs(y2 - y);\r\n \r\n return Math.sqrt((distx * distx) + (disty * disty));\r\n }", "public int moves() {\r\n if (!isSolvable) return -1;\r\n return goal.previousMoves;\r\n }", "public int moves() {\n if (isSolvable())\n return _moves;\n else\n return -1;\n }", "@java.lang.Override public int getMove2Value() {\n return move2_;\n }", "public double getDistance()\n {\n return Math.abs(getDifference());\n }", "public Long calculateDistanceVision() {\n return this.getVision() + lazyPlayboardActor.get().getCarte().getCarte().getValue(this.point).getVisionAdvantage();\n }", "public float getDistance() {\n return distance;\n }", "public void calcDistance() {\n if (DataManager.INSTANCE.getLocation() != null && location.getLength() == 2) {\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n double dLat = Math.toRadians(location.getLatitude() - DataManager.INSTANCE.getLocation().getLatitude()); // deg2rad below\n double dLon = Math.toRadians(location.getLongitude() - DataManager.INSTANCE.getLocation().getLongitude());\n double a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(Math.toRadians(location.getLatitude()))\n * Math.cos(Math.toRadians(location.getLatitude()))\n * Math.sin(dLon / 2)\n * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double d = KM_IN_RADIUS * c; // Distance in km\n distance = (float) d;\n } else distance = null;\n }", "public double getFinalDistance(){\n return valori.get(end_node);\n }", "public double getDistance () {\n return distance;\n }", "@java.lang.Override public int getMove2Value() {\n return move2_;\n }", "@java.lang.Override public int getMove1Value() {\n return move1_;\n }", "public float getDelayMove()\n\t{\n\t\treturn delayMove;\n\t}", "public double getDistance(){\n\t\treturn this.distance;\n\t}", "public int drivenDistance() {\n return (int) Math.round(rightMotor.getTachoCount() / DISTANCE_RATIO);\n }", "@java.lang.Override public int getMove1Value() {\n return move1_;\n }", "public double calcDistance(Planet p){\n\t\treturn(Math.sqrt((this.xxPos-p.xxPos)*(this.xxPos-p.xxPos)\n\t\t\t+(this.yyPos-p.yyPos)*(this.yyPos-p.yyPos)));\n\t}", "public void getDistance() {\n projDistance = 2 * sin(toRadians(launchAngle)) * getVelocity() / 9.8 * cos(toRadians(launchAngle)) * getVelocity();\n }", "public int moves() {\n if (!isSolvable()) return -1;\n return realMoves;\n }", "public int moves() {\n return moves;\n }", "public int moves() {\n return moves;\n }", "public int moves() {\n return moveMin;\n }", "public int moves() {\n if (!isSolvable()) {\n return -1;\n } else {\n return minNode.getMove();\n }\n\n }", "public String getMove() {\n\t\treturn move;\n\t}", "public final float getDistance() {\n return distance;\n }", "public double getmoveDeduction(){\n return moveDeduction;\n }", "private float distanceTo(BasicEvent event) {\n final float dx = event.x - location.x;\n final float dy = event.y - location.y;\n// return Math.abs(dx)+Math.abs(dy);\n return distanceMetric(dx, dy);\n// dx*=dx;\n// dy*=dy;\n// float distance=(float)Math.sqrt(dx+dy);\n// return distance;\n }", "public int moves() {\n return goal == null ? -1 : goal.numMoves;\n }", "public double getTurn() {\n \treturn Math.abs(turn.getX()) > DEADZONE ? turn.getX() : 0;\n }", "public int moves()\n {\n return moves;\n }", "public Direction getMove() {\n\n // If 'count' is >= 3, then reset 'value' for next random direction.\n if (this.count >= 3) {\n this.value = this.generator.nextInt(4); // new value\n this.count = 0; // reset count to 0\n }\n \n ++this.count; // increment count for each call\n if (this.value == 0) {\n return Direction.NORTH;\n }\n else if (this.value == 1) {\n return Direction.SOUTH;\n }\n else if (this.value == 2) {\n return Direction.WEST;\n }\n else { // if value == 3\n return Direction.EAST;\n }\n }", "public double getDistance(){\r\n\t\treturn Math.sqrt(\r\n\t\t\t\t(\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t\t, 2 )\r\n\t )\r\n\t\t\t\t+ (\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterY()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterY()\r\n\t\t\t\t\t, 2 )\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}", "public double getDistance() {\n return distance;\n }", "@Override\n public int calculateBattleValue() {\n return calculateBattleValue(false, false);\n }", "public int getDistance() {\n return distance;\n }", "public int getDistance() {\n return distance;\n }", "public double getDistance() {\r\n return this.distance;\r\n }", "public double getDistance() {\n\t\treturn distance;\n\t}", "public double getDistance() {\n\t\treturn distance;\n\t}", "public int getMovement() {\n return tempUnit.getMovement();\n }", "public double calcDistance(Planet p){\n double sq_dis = (xxPos - p.xxPos) * (xxPos - p.xxPos) + (yyPos - p.yyPos) * (yyPos - p.yyPos);\n double distance = Math.sqrt(sq_dis);\n return distance;\n }", "public static int getCoords()\n\t{\n\t\treturn moveCoords;\n\t}", "public double getMovespeed()\r\n\t{\r\n\t\treturn movespeed;\r\n\t}", "public int getDistance() {\r\n\t\treturn distance;\r\n\t}", "public int getDistance() {\r\n\t\treturn distance;\r\n\t}", "public double getOffset(){\n\t\tdouble percentHeight = networkTableValues.get(\"height\")/cameraHeightPixel;\n\t\t//Get the height of the frame in inches\n\t\tdouble cameraHeightInches = networkTableValues.get(\"height\")/percentHeight;\n\t\t//Get the width of the frame in inches\n\t\tdouble cameraWidthInches = cameraHeightInches*(cameraWidthPixel/cameraHeightPixel);\n\t\t//Get the distanceFromTower from the camera to the goal\n\t\tdistanceFromTower = (cameraWidthInches/2)/Math.tan(cameraFOV*(Math.PI/180));\n\t\t//Get the distanceFromTower from the camera to the base of the tower\n\t\tdouble horizontalDistance = Math.sqrt(Math.pow(distanceFromTower, 2) - Math.pow(towerHeight, 2));\n\t\t//Get offset in inches\n\t\tdouble distanceFromCenterInches = (networkTableValues.get(\"centerX\") / cameraWidthPixel)*cameraWidthInches;\n\t\tdouble offset = Math.atan((distanceFromCenterInches/distanceFromTower)*(180/Math.PI));\n\t\t\n\t\tSystem.out.println(\"OFFSET: \" + offset);\n\t\treturn offset;\n\t}", "public double calcDistance(Planet p){\n\t\t\tdouble dx = this.xxPos - p.xxPos;\n\t\t\tdouble dy = this.yyPos - p.yyPos;\n\t\treturn Math.sqrt(dx*dx + dy*dy);\n\t}", "public int getTurnaround (){\n return finishingTime-arrival_time;\n }", "private void calculateTurn () {\n // Do we need a turn? If not, we're done.\n if (dirOne.opposite() == dirTwo) return;\n /*\n * We need a turn. The coordinates of the turn point will be the x\n * coordinate of the north/south leg and the y coordinate of the\n * east/west leg.\n */\n if (dirOne == Direction.north || dirOne == Direction.south) {\n xTurn = xOne;\n yTurn = yTwo;\n } else {\n xTurn = xTwo;\n yTurn = yOne;\n }\n }", "public Vector3D getDistance()\n\t{\n\t\treturn distance;\n\t}", "private void calculateDirection(){\n\t\tif(waypoints.size() > 0){\n\t\t\tif(getDistanceToWaypoint() <= getSpeed()){\n\t\t\t\tsetPosition(new Vector2(waypoints.remove(0)));\n\t\t\t\tsetCurrentWaypoint(getCurrentWaypoint() + 1);\n\t\t\t}else{\t\t\n\t\t\t\tVector2 target = new Vector2(waypoints.get(0));\n\t\t\t\tVector2 newDirection = new Vector2(target.sub(getPosition())); \n\t\t\t\tsetDirection(newDirection);\n\t\t\t}\n\t\t}else{\n\t\t\tsetDirection(new Vector2(0, 0));\n\t\t}\n\t}", "public double getDistance() {\n return this.distance;\n }", "public double calcDistance(Planet p){\n\t\tdouble dx=-(xxPos-p.xxPos);\n\t\tdouble dy=-(yyPos-p.yyPos);\n\t\treturn Math.sqrt(dx*dx+dy*dy);\n\t}", "public float getPos() {\n return ((spos-xpos))/(sposMax-sposMin);// * ratio;\n }", "public int move(double pX, double pY) {\n\t\t\tdouble eX=this.getX();\n\t\t\tdouble eY=this.getY();\n\t\t\n\t\t\tdouble vX= pX-eX;\n\t\t\tdouble vY= pY-eY;\n\t\t\tdouble len= Math.sqrt(vX*vX+vY*vY);\n\t\t\tvX=(vX/len);\n\t\t\tvY=(vY/len);\n\n\t\t\tthis.setDelta(vX, vY);\n\t\t\tif(Core.checkCollision(this)==true)super.move();\n\t\t return 0;\n\t}", "double compute_lift_pos () {\n return AC_OFFSET_K * this.chord + \n (convert_moments_to_AC_offset ? -1*this.moment/this.lift : 0);\n }", "public double distance(){\n return DistanceTraveled;\n }", "public float getXDest()\n {\n return xDest;\n }", "public double getMovementSpeed() {\n return movementSpeed;\n }", "public int distance() {\n return distance;\n }", "public int getDistance(){\n if (distance == 0) {\n int tourDistance = 0;\n // Loop through our tour's cities\n for (int cityIndex=0; cityIndex < tourSize(); cityIndex++) {\n // Get city we're travelling from\n City fromCity = getCity(cityIndex);\n // City we're travelling to\n City destinationCity;\n // Check we're not on our tour's last city, if we are set our \n // tour's final destination city to our starting city\n if(cityIndex+1 < tourSize()){\n destinationCity = getCity(cityIndex+1);\n }\n else{\n destinationCity = getCity(0);\n }\n // Get the distance between the two cities\n tourDistance += fromCity.distanceTo(destinationCity);\n }\n distance = tourDistance;\n }\n return distance;\n }", "public double calcDistance(Planet p){\n\t\tdouble dx = p.xxPos - this.xxPos;\n\t\tdouble dy = p.yyPos - this.yyPos ;\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\n\t}", "double getDistanceInMiles();", "public double getDragDistanceFromCursorPressedEvent() {\r\n\t\tif ((this.lastChangedEvent != null) && (this.lastPressedEvent != null)) {\r\n\t\t\treturn lastChangedEvent.getPosition().distance(\r\n\t\t\t\t\tlastPressedEvent.getPosition());\r\n\t\t}\r\n\r\n\t\treturn Double.NaN;\r\n\t}", "protected float positionToMovement(int pixels) {\n if (pixels >= SCREEN_MOVE_BORDER_SIZE) return 0;\n\n int offset = Math.min(SCREEN_MOVE_BORDER_SIZE - pixels, SCREEN_DEAD_ZONE);\n return offset * (1f / (SCREEN_MOVE_BORDER_SIZE - SCREEN_DEAD_ZONE)) * BORDER_MOVE_SPEED * eyeOffset.length();\n }" ]
[ "0.67300177", "0.66679186", "0.657394", "0.6477867", "0.6468025", "0.6420551", "0.64123124", "0.6380347", "0.63498986", "0.634226", "0.6315953", "0.62151355", "0.6193713", "0.6176751", "0.6175649", "0.6126212", "0.61222583", "0.61062574", "0.60676163", "0.6066475", "0.602326", "0.5994919", "0.59924996", "0.59597427", "0.59500647", "0.5930907", "0.5909169", "0.59064144", "0.58983994", "0.5891289", "0.5888334", "0.5885836", "0.58855885", "0.5877617", "0.58687353", "0.58647627", "0.5857299", "0.5852549", "0.58511865", "0.5850997", "0.58470917", "0.584109", "0.5837958", "0.58330613", "0.5832883", "0.5830269", "0.58296055", "0.5828453", "0.5811067", "0.5806673", "0.5796188", "0.57881", "0.5786112", "0.5784104", "0.57824016", "0.57824016", "0.5766088", "0.57562894", "0.5749979", "0.57423264", "0.57327497", "0.5724356", "0.57112193", "0.57101196", "0.57078946", "0.5706812", "0.5706161", "0.5701635", "0.5690664", "0.56894714", "0.56894714", "0.5683979", "0.56738555", "0.56738555", "0.56726515", "0.5665414", "0.56478786", "0.5641888", "0.56404465", "0.56404465", "0.56376076", "0.5634964", "0.5625744", "0.56253076", "0.5617749", "0.5612338", "0.5609362", "0.5604371", "0.55963504", "0.55938697", "0.5593209", "0.55920845", "0.5583914", "0.5582092", "0.5581505", "0.5577434", "0.55755776", "0.5573201", "0.5556514", "0.5554011" ]
0.7068331
0
Calculates the shortest distance in simple jumps between two fields.
private int distance(Field origin, Field destination) { int horizontalLength = Math.abs(destination.getY() - origin.getY()); int verticalLength = Math.abs(destination.getX() - origin.getX()); return (horizontalLength + verticalLength)/2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract int shortestPathDistance(String vertLabel1, String vertLabel2);", "public static int editDistance(String s1, String s2) {\n int[] costs = new int[s2.length() + 1];\n for (int i = 0; i <= s1.length(); i++) {\n int lastValue = i;\n for (int j = 0; j <= s2.length(); j++) {\n if (i == 0)\n costs[j] = j;\n else {\n if (j > 0) {\n int newValue = costs[j - 1];\n if (s1.charAt(i - 1) != s2.charAt(j - 1))\n newValue = Math.min(Math.min(newValue, lastValue),\n costs[j]) + 1;\n costs[j - 1] = lastValue;\n lastValue = newValue;\n }\n }\n }\n if (i > 0)\n costs[s2.length()] = lastValue;\n }\n return costs[s2.length()];\n }", "public static int editDistance1(String s1, String s2) {\r\n\t\tMyInteger gmin = new MyInteger(Integer.MAX_VALUE);\r\n\t\tauxDistance1(0, 0, 0, s1, s2, gmin);\r\n\t\treturn gmin.get();\r\n\t}", "public int minDistanceDP(String s1, String s2){\n\t\tint [][] dp = new int [s1.length()+1][s2.length()+1];\n\t\tfor(int i = 0 ; i <= s1.length(); i ++){\n\t\t\tfor(int j = 0; j <= s2.length(); j++){\n\t\t\t\tif (s1.charAt(i) == s2.charAt(j)){\n\t\t\t\t\tdp[i][j] = 1 + dp[i-1][j-1];\n\t\t\t\t}else{\n\t\t\t\t\tdp[i][j] = Math.max(dp[i-1][j], dp[i][j-1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn s1.length() + s2.length() - 2*dp[s1.length()][s2.length()];\n\t}", "private static double get_distance ( String one, String two){\n String temp[] = one.split(\" \");\n double lat1 = Double.parseDouble(temp[0]);\n double long1 = Double.parseDouble(temp[1]);\n\n String temp2[] = two.split(\" \");\n double lat2 = Double.parseDouble(temp2[0]);\n double long2 = Double.parseDouble(temp2[1]);\n\n// Get distance between two lats and two lans\n double latDistance = Math.toRadians(lat1 - lat2);\n double lngDistance = Math.toRadians(long1 - long2);\n\n// Step 1\n double a = (Math.sin ( latDistance / 2 ) * Math.sin (latDistance / 2)) +\n (Math.cos ( Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) )\n * ( Math.sin (lngDistance /2 ) * Math.sin(lngDistance / 2) );\n// Step 2\n double c = ( 2 * (Math.atan2( Math.sqrt(a), Math.sqrt(1-a))));\n// Step 3\n double d = ( EARTH_RADIUS * c );\n return d;\n }", "public int minDistance(String word1, String word2) {\n return word1.length() + word2.length() - 2 * lcs(word1, word2);\n }", "public int getShortestDistance(T vertex1, T vertex2){\n DijkstraShortestPath p = new DijkstraShortestPath(vertex1, vertex2);\n return p.getMinDistance();\n }", "public int shortest(String word1, String word2) {\n List<Integer> first = map.get(word1);\n List<Integer> second = map.get(word2);\n int result = Integer.MAX_VALUE ;\n for(int i = 0, j = 0 ; i < first.size() && j < second.size();)\n result = first.get(i) < second.get(j) ? Math.min(result,second.get(j) - first.get(i++)) : Math.min(result,first.get(i) - second.get(j++)) ;\n return result;\n }", "private void updateDistance(String s1, String s2)\n\t{\n\t\tString name = EdgeUtil.formatEdge(s1, s2);\n\t\tint weightOld = this.listNode.get(s2).getDistanceFromOrigin();\n\t\tint weightNew = this.listNode.get(s1).getDistanceFromOrigin() + this.listEdge.get(name).getWeight();\n\t\t\n\t\tif(weightOld > weightNew) {\n\t\t\tthis.listNode.get(s2).setDistanceFromOrigin(weightNew);\n\t\t\tthis.listNode.get(s2).setPrecedent(s1);\n\t\t}\n\t}", "public int getDistance(String s1, String s2) {\r\n\t\tint score = getSimlarityScore(s1, s2);\r\n\t\tint retVal = INT_MAX;\r\n\t\tif (score != 0) {\r\n\t\t\t//int length = s1.length() + s2.length() - score;\r\n\t\t\tint length = s1.length();\r\n\t\t\tretVal = (int)((1 - (double)score/length) * 100);\r\n\t\t}\r\n\t\t\r\n\t\tif (retVal > alignmentThreshold) {\r\n\t\t\tretVal = INT_MAX;\r\n\t\t}\r\n\t\treturn retVal;\r\n\t}", "private static double getDistance(final WayNodeOSM a, final WayNodeOSM b) {\n \t\tdouble latA = a.getLatitude()/180*Math.PI;\n \t\tdouble latB = b.getLatitude()/180*Math.PI;\n \t\tdouble lonDif = (b.getLongitude() - a.getLongitude())/180*Math.PI;\n \t\treturn (Math.acos((Math.sin(latA) * Math.sin(latB)) + (Math.cos(latA) * Math.cos(latB) * Math.cos(lonDif))) * 6367500);\n \t}", "private int calculateLevenshtein(String lhs, String rhs) {\n\t\tint len0 = lhs.length() + 1; \n\t int len1 = rhs.length() + 1; \n\t \n\t // the array of distances \n\t int[] cost = new int[len0]; \n\t int[] newcost = new int[len0]; \n\t \n\t // initial cost of skipping prefix in String s0 \n\t for (int i = 0; i < len0; i++) cost[i] = i; \n\t \n\t // dynamically computing the array of distances \n\t \n\t // transformation cost for each letter in s1 \n\t for (int j = 1; j < len1; j++) { \n\t // initial cost of skipping prefix in String s1 \n\t newcost[0] = j; \n\t \n\t // transformation cost for each letter in s0 \n\t for(int i = 1; i < len0; i++) { \n\t // matching current letters in both strings \n\t int match = (lhs.charAt(i - 1) == rhs.charAt(j - 1)) ? 0 : 1; \n\t \n\t // computing cost for each transformation \n\t int cost_replace = cost[i - 1] + match; \n\t int cost_insert = cost[i] + 1; \n\t int cost_delete = newcost[i - 1] + 1; \n\t \n\t // keep minimum cost \n\t newcost[i] = Math.min(Math.min(cost_insert, cost_delete), cost_replace);\n\t } \n\t \n\t // swap cost/newcost arrays \n\t int[] swap = cost; cost = newcost; newcost = swap; \n\t } \n\t \n\t // the distance is the cost for transforming all letters in both strings \n\t return cost[len0 - 1]; \n }", "private double getDistance(float x, float y, float x1, float y1) {\n double distanceX = Math.abs(x - x1);\n double distanceY = Math.abs(y - y1);\n return Math.sqrt(distanceX * distanceX + distanceY * distanceY);\n }", "public int minDistance(String word1, String word2) {\n if(word1==null||word1.length()==0){\n return word2==null?0:word2.length();\n }else if(word2==null||word2.length()==0){\n return word1.length();\n }else if(word1.equals(word2)){\n return 0;\n }\n char[] str1 = word1.toCharArray();\n char[] str2 = word2.toCharArray();\n int[] oldl = new int[str2.length+1];\n int[] newl = new int[str2.length+1];\n for(int i=0;i<=str2.length;i++){\n oldl[i]=i;\n }\n for(int i=1;i<=str1.length;i++){\n newl[0]=i;\n for(int j=1;j<=str2.length;j++){\n newl[j]=Math.min(oldl[j]+1,newl[j-1]+1);\n if(str1[i-1]!=str2[j-1]){\n newl[j]=Math.min(oldl[j-1]+1,newl[j]);\n }else{\n newl[j]=Math.min(oldl[j-1],newl[j]);\n }\n }\n for(int k=0;k<=str2.length;k++){\n oldl[k]=newl[k];\n }\n }\n return newl[str2.length];\n }", "Integer distance(PathFindingNode a, PathFindingNode b);", "public abstract double getDistance(T o1, T o2) throws Exception;", "@Override\r\n public Double calcDistance(List<Point> src, List<Point> dst) {\r\n // Local Variables\r\n Double shortestDistance = Double.MAX_VALUE;\r\n Double currentDistance;\r\n\r\n // for each point in source\r\n for (Point p1:src) {\r\n // for each point in destination\r\n for (Point p2:dst) {\r\n // calc distance\r\n currentDistance = p1.distanceFrom(p2);\r\n\r\n // current < shortest -> update\r\n if(currentDistance < shortestDistance ){\r\n shortestDistance = currentDistance;\r\n }\r\n\r\n }\r\n }\r\n\r\n return shortestDistance;\r\n }", "public int minDistance(String word1, String word2) {\n char[] cs1 = word1.toCharArray();\n char[] cs2 = word2.toCharArray();\n int len1 = cs1.length;\n int len2 = cs2.length;\n // if (len1 * len2 == 0) {\n // return Math.max(len1, len2);\n // }\n int[][] min = new int[len1][len2];\n int m = Integer.MAX_VALUE;\n for (int i = 0; i < len1; i++) {\n for (int j = 0; j < len2; j++) {\n m = Integer.MAX_VALUE;\n m = Math.min(getMinDis(min, i, j - 1) + 1, m);\n m = Math.min(getMinDis(min, i - 1, j) + 1, m);\n m = Math.min(getMinDis(min, i - 1, j - 1)\n + (cs1[i] == cs2[j] ? 0 : 1), m);\n min[i][j] = m;\n }\n }\n return getMinDis(min, len1 - 1, len2 - 1);\n }", "public static int editDistance(String s1, String s2){\n int m=s1.length();\n int n=s2.length();\n int[][] dp=new int[m+1][n+1];\n for(int i=0;i<=m;i++){\n dp[i][0]=i;\n }\n for(int j=0;j<=n;j++){\n dp[0][j]=j;\n }\n for(int i=1;i<=m;i++){\n for(int j=1;j<=n;j++){\n if(s1.charAt(m-i)==s2.charAt(n-j)){\n dp[i][j]=dp[i-1][j-1];\n }\n else{\n dp[i][j]=1+Math.min(dp[i-1][j-1],Math.min(dp[i][j-1],dp[i-1][j]));\n }\n }\n \n }\n int res=dp[m][n];\n return res;\n\n\t}", "public static double getDistance( GameObject one, GameObject two )\n {\n double deltaX = getDeltaX( one, two );\n double deltaY = getDeltaY( one, two );\n return Math.sqrt( deltaX * deltaX + deltaY * deltaY );\n }", "private double calculateDistance(Example first, Example second) {\n\t\tdouble distance = 0;\n\t\tfor (Attribute attribute : first.getAttributes()) {\n\t\t\tdouble diff = first.getValue(attribute) - second.getValue(attribute);\n\t\t\tdistance += diff * diff;\n\t\t}\n\t\treturn Math.sqrt(distance);\n\t}", "public int minDistance(String word1, String word2) {\n\n rows = word1.length() + 1;\n cols = word2.length() + 1;\n dp = new int[rows][cols];\n for (int i = 0; i < rows; i++) {\n dp[i][0] = i;\n }\n for (int i = 0; i < cols; i++) {\n dp[0][i] = i;\n }\n\n for (int i = 1; i < rows; i++) {\n for (int j = 1; j < cols; j++) {\n if (word1.charAt(i - 1) == word2.charAt(j - 1)) {\n dp[i][j] = dp[i - 1][j - 1];\n } else {\n dp[i][j] = 1 + Math.min(dp[i - 1][j - 1], Math.min(dp[i][j - 1], dp[i - 1][j]));\n }\n }\n }\n findPath(dp);\n printPath(dp);\n return dp[rows - 1][cols - 1];\n }", "public int minDistance(String word1, String word2) {\n int[][] mem = new int[word1.length() + 1][word2.length() + 1];\n for (int[] row : mem) Arrays.fill(row, -1);\n mem[word1.length()][word2.length()] = 0;\n return minDist(word1, 0, word2, 0, mem);\n }", "public static int sringDistance(String S1, String S2) {\r\n\r\n int m = S1.length(), n = S2.length();\r\n int[] D1;\r\n int[] D2 = new int[n + 1];\r\n\r\n for (int i = 0; i <= n; i++) {\r\n D2[i] = i;\r\n }\r\n\r\n for (int i = 1; i <= m; i++) {\r\n D1 = D2;\r\n D2 = new int[n + 1];\r\n for (int j = 0; j <= n; j++) {\r\n if (j == 0) {\r\n D2[j] = i;\r\n } else {\r\n int cost = (S1.charAt(i - 1) != S2.charAt(j - 1)) ? 1 : 0;\r\n if (D2[j - 1] < D1[j] && D2[j - 1] < D1[j - 1] + cost) {\r\n D2[j] = D2[j - 1] + 1;\r\n } else if (D1[j] < D1[j - 1] + cost) {\r\n D2[j] = D1[j] + 1;\r\n } else {\r\n D2[j] = D1[j - 1] + cost;\r\n }\r\n }\r\n }\r\n }\r\n return D2[n];\r\n }", "public int minDistance(String word1, String word2) {\n if (word1==null && word2==null)\n return 0;\n if (word1==null)\n return word2.length();\n if (word2==null)\n return word1.length();\n\n int len1 = word1.length()+1;\n int len2 = word2.length()+1;\n int[][] dp = new int[len1][len2];\n for (int i=0; i<len1; i++) {\n dp[i][0] = i;\n }\n for (int j=1; j<len2; j++) {\n dp[0][j] = j;\n }\n for (int i=1; i<len1; i++) {\n char ch1 = word1.charAt(i-1);\n for (int j=1; j<len2; j++) {\n char ch2 = word2.charAt(j-1);\n if (ch1 == ch2) {\n dp[i][j] = dp[i-1][j-1];\n } else {\n int change = dp[i-1][j-1]+1;\n int delete = dp[i-1][j]+1;\n int add = dp[i][j-1]+1;\n int best = change > delete ? delete : change;\n best = best > add ? add : best;\n dp[i][j] = best;\n }\n }\n }\n return dp[len1-1][len2-1];\n }", "@Override\n public Double calculateShortestPathFromSource(String from, String to) {\n Node source = graph.getNodeByName(from);\n Node destination = graph.getNodeByName(to);\n source.setDistance(0d);\n Set<Node> settledNodes = new HashSet<>();\n PriorityQueue<Node> unsettledNodes = new PriorityQueue<>(Comparator.comparing(Node::getDistance));\n unsettledNodes.add(source);\n while (unsettledNodes.size() != 0) {\n Node currentNode = unsettledNodes.poll();\n for (Map.Entry<Node, Double> adjacencyPair : currentNode.getAdjacentNodes().entrySet()) {\n Node adjacentNode = adjacencyPair.getKey();\n Double distance = adjacencyPair.getValue();\n if (!settledNodes.contains(adjacentNode)) {\n calculateMinimumDistance(adjacentNode, distance, currentNode);\n unsettledNodes.add(adjacentNode);\n }\n }\n settledNodes.add(currentNode);\n }\n return destination.getDistance() == Double.MAX_VALUE ? -9999d : destination.getDistance();\n }", "public static int editDistance2(String s1, String s2) {\r\n\t\treturn auxDistance2(0, 0, s1, s2);\r\n\t}", "public static int shortestWordDistanceIII(String[] words, String word1, String word2) {\n\t\tint dist = Integer.MAX_VALUE;//words.length;\n\t\tint i1 = -dist; //i1 记录当前最近的word1的位置\n\t\tint i2 = dist;//i2 记录当前最近的word2的位置\n//\t\tint i1 = -1; //i1 记录当前最近的word1的位置\n//\t\tint i2 = -1;//i2 记录当前最近的word2的位置\n\n\t\tfor (int i = 0; i < words.length; i++) {\n\t\t\tif (words[i].equals(word1)) {\n\t\t\t\ti1 = i; //i1 记录当前最近的word1\n\t\t\t}\n\t\t\tif (words[i].equals(word2)) {\n\t\t\t\tif (word1.equals(word2)) {\n\t\t\t\t\ti1 = i2;\n\t\t\t\t}\n\t\t\t\ti2 = i;\n\t\t\t}\n\t\t\tdist = Math.min(dist, Math.abs(i1 - i2));\n\t\t\tprint(\"i1:i2:dist\", i1, i2, dist);\n\t\t}\n\t\treturn (int) dist;\n\t}", "private void findMinimalDistances(City sourceCity) {\n\t\tList<City> adjacentCities = getNeighbors(sourceCity);\r\n\r\n\t\tfor (City target : adjacentCities) {\r\n\t\t\t// Compare the newly calculated tentative transportation cost to the current\r\n\t\t\t// assigned value and assign the smaller one.\r\n\t\t\tif (getShortestDistance(target) > getShortestDistance(sourceCity) + getDistance(sourceCity, target)) {\r\n\t\t\t\tdistance.put(target, getShortestDistance(sourceCity) + getDistance(sourceCity, target));\r\n\t\t\t\t// saves info on what was the city you came from\r\n\t\t\t\tpredecessors.put(target, sourceCity);\r\n\t\t\t\t// add neighbors as unsettled\r\n\t\t\t\tunSettledCities.add(target);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public int minEditDistance(String str1,String str2){\n\n\t \t return minEditDistanceHelper(str1,str1.length(),str2,str2.length());\n\t }", "private double getDistanceInKM(LatLong latLongA, LatLong latLongB)\n {\n double distance = 500;\n\n double lat;\n double dx;\n double dy;\n\n if(latLongA != null && latLongB != null){\n lat = (latLongA.latitude + latLongB.latitude) / 2 * 0.01745;\n dx = 111.3 * Math.cos(lat) * (latLongA.longitude - latLongB.longitude);\n dy = 111.3 * (latLongA.latitude - latLongB.latitude);\n distance = Math.sqrt(dx * dx + dy * dy);\n }\n\n return distance;\n }", "public void shortestRouteDijkstra(){\n int landmark1 = l1.getSelectionModel().getSelectedIndex();\n int landmark2 = l2.getSelectionModel().getSelectedIndex();\n GraphNodeAL<MapPoint> lm1 = landmarkList.get(landmark1);\n GraphNodeAL<MapPoint> lm2 = landmarkList.get(landmark2);\n\n shortestRouteDij(lm1, lm2);\n }", "private Integer getDistance(double lat1, double lon1, double lat2, double lon2) {\n Location locationA = new Location(\"Source\");\n locationA.setLatitude(lat1);\n locationA.setLongitude(lon1);\n Location locationB = new Location(\"Destination\");\n locationB.setLatitude(lat2);\n locationB.setLongitude(lon2);\n distance = Math.round(locationA.distanceTo(locationB));\n return distance;\n }", "private static Double getDistance(Double lng1, Double lat1, Double lng2, Double lat2) {\n double radLat1 = lat1 * RAD;\n double radLat2 = lat2 * RAD;\n double a = radLat1 - radLat2;\n double b = (lng1 - lng2) * RAD;\n double s = 2 * Math.asin(Math.sqrt(\n Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));\n s = s * EARTH_RADIUS;\n s = Math.round(s * 10000) / 10000000.0;\n return s;\n }", "public static int editDistance4(String s1, String s2) {\r\n\t\tint m = s1.length();\r\n\t\tint n = s2.length();\r\n\t\tint[][] mem = new int[m + 1][n + 1];\r\n\t\tfor (int j = 0; j <= n; ++j) \r\n\t\t\tmem[m][j] = n-j;\r\n\t\tfor (int i = 0; i <= m; ++i) \r\n\t\t\tmem[i][n] = m-i;\r\n\r\n\t\tfor (int i = m - 1; i >= 0; --i) {\r\n\t\t\tfor (int j = n - 1; j >= 0; --j) {\r\n\t\t\t\tif (s1.charAt(i) != s2.charAt(j)) {\r\n\t\t\t\t\tint rcost = mem[i + 1][j + 1];\r\n\t\t\t\t\tint icost = mem[i][j + 1];\r\n\t\t\t\t\tint dcost = mem[i + 1][j];\r\n\t\t\t\t\tmem[i][j] = Math.min(dcost, Math.min(rcost, icost)) + 1;\r\n\t\t\t\t} else \r\n\t\t\t\t\tmem[i][j] = mem[i + 1][j + 1];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn mem[0][0];\r\n\t}", "private double distFrom(double lat1, double lng1, double lat2, double lng2) {\n\t\tdouble dist = Math.pow(lat1 - lat2, 2) + Math.pow(lng1 - lng2, 2);\n\n\t\treturn dist;\n\t}", "double getDistance();", "public int shortestWordDistance(String[] words, String word1, String word2) {\n int indexWord1 = -1;\n int indexWord2 = -1;\n boolean flag = word1.equals(word2);\n \n int distance = Integer.MAX_VALUE;\n for (int i = 0; i < words.length; i++) {\n if (words[i].equals(word1)) {\n if(flag){ // 如果两个词相同 则只更新一个index 因为index2之后还会更新一次 相当于排除了之后那个word2的判断\n indexWord1 = indexWord2;\n indexWord2 = i;\n } else {\n indexWord1 = i;\n }\n }\n \n if (words[i].equals(word2)) {\n indexWord2 = i;\n }\n if (indexWord1 >= 0 && indexWord2 >= 0) {\n distance = Math.min(distance, Math.abs(indexWord2 - indexWord1));\n }\n }\n return distance;\n }", "public double shortestPathDist(int src, int dest);", "public static double GetDistance(double lat1, double lon1, double lat2, double lon2) {\n double radLat1 = rad(lat1);\n double radLat2 = rad(lat2);\n double a = radLat1 - radLat2;\n double b = rad(lon1) - rad(lon2);\n double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +\n Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));\n s = s * EARTH_RADIUS;//km\n// Log.e(\"s\", \"s=\" + s);\n return s;\n }", "private static int editDistance(String str1, String str2)\n {\n // if either of the strings is null, distance cannot be computed\n if (str1 == null || str2 == null)\n {\n return -1; // indicates error input\n }\n \n // all values are by default initialized to 0 by JVM\n int[][] distanceTable = new int[str1.length()+1][str2.length()+1];\n \n int numRows = str1.length() + 1;\n int numCols = str2.length() + 1;\n \n for (int m = 0; m < numRows; m++)\n {\n for (int n = 0; n < numCols; n++)\n {\n // if length of str1 is 0, we have no option but to insert all of str2 \n if (m == 0)\n {\n distanceTable[m][n] = n;\n }\n \n // if length of str2 is 0, delete all of str1 of make it match with str2\n else if (n == 0)\n {\n distanceTable[m][n] = m;\n }\n \n /*\n * if last characters of str1 and str2 are equal, compute distance ending at\n * second last characters for both str1 and str2 \n */\n else if (str1.charAt(m-1) == str2.charAt(n-1))\n {\n distanceTable[m][n] = distanceTable[m-1][n-1]; \n }\n \n /*\n * else use minimum of following three cases:\n * delete last character of str1 and check distance: distance(str1, str2, m-1, n)\n * insert last character of str2 into str1 and check distance: distance(str1, str2, m, n-1)\n * replace last char of str1 with last char of str2 and check distance: distance(str1, str2, m-1, n-1) \n */\n else\n {\n distanceTable[m][n] = min (\n 1 + distanceTable[m-1][n],\n 1 + distanceTable[m][n-1],\n 1 + distanceTable[m-1][n-1]\n );\n }\n }\n }\n \n return distanceTable[numRows-1][numCols-1];\n }", "public int distance(String nounA, String nounB)\n {\n if (nounA == null || nounB == null) throw new NullPointerException();\n if (!(isNoun(nounA) && isNoun(nounB))) throw new IllegalArgumentException();\n return shortestPath.length(synsetHash.get(nounA), synsetHash.get(nounB));\n }", "public static int editDistance3(String s1, String s2) {\r\n\t\tint[][] mem = new int[s1.length()][s2.length()];\r\n\t\tfor(int i = 0; i < s1.length(); ++i) \r\n\t\t\tfor(int j = 0; j < s2.length(); ++j) \r\n\t\t\t\tmem[i][j] = -1;\r\n\t\treturn auxDistance3(0, 0, s1, s2, mem);\r\n\t}", "public int minDistance_LCS(String word1, String word2) {\n int N=word1.length(), M=word2.length();\n int[][] dp = new int[N+1][M+1];\n for (int i=1; i<=N; i++) {\n for (int j=1; j<=M; j++) {\n if (word1.charAt(i-1)==word2.charAt(j-1)) {\n dp[i][j]=dp[i-1][j-1]+1;\n } else {\n dp[i][j]=Math.max(dp[i-1][j], dp[i][j-1]);\n }\n }\n }\n return N+M-2*dp[N][M];\n }", "@Override\n\tpublic float getDistance(float[] fv1, float[] fv2) {\n\t\tif(settings.getMetric() == 1){\n\t\t\treturn getL1Distance(fv1, fv2);\n\t\t} else { //metric == 2\n\t\t\treturn getL2Distance(fv1, fv2);\n\t\t}\n\t\t\n\t\t\n\t}", "public static int minDistance(String word1, String word2){\n int m = word1.length(), n = word2.length();\n int[][] dp = new int[m+1][n+1];\n\n for (int i = 0; i <= m; i++){\n dp[i][0] = i;\n }\n for (int i = 0; i <= n; i++){\n dp[0][i] = i;\n }\n\n for (int i = 1; i <= m; i++){\n for (int j = 1; j <= n; j++){\n if (word1.charAt(i-1) == word2.charAt(j-1)){\n dp[i][j] = dp[i-1][j-1];\n }else{\n dp[i][j] = Math.min(dp[i-1][j-1], Math.min(dp[i][j-1], dp[i-1][j])) + 1;\n }\n }\n }\n\n return dp[m][n];\n }", "public int minDistance(String word1, String word2) {\n int N=word1.length(), M=word2.length();\n int[][] dp = new int[N+1][M+1];\n for (int i=0; i<=N; i++) dp[i][0]=i;\n for (int j=0; j<=M; j++) dp[0][j]=j;\n for (int i=1; i<=N; i++) {\n for (int j=1; j<=M; j++) {\n if (word1.charAt(i-1)==word2.charAt(j-1)) {\n dp[i][j]=dp[i-1][j-1];\n } else {\n dp[i][j]=Math.min(dp[i-1][j], dp[i][j-1]) + 1;\n }\n }\n }\n return dp[N][M];\n }", "public static double distance(String s111, String s222){\n\t\t\n\t}", "static Number160 distance(final Number160 id1, final Number160 id2) {\n return id1.xor(id2);\n }", "private int shortestDistance(Vertex dest) {\n Integer d = distance.get(dest);\n if (d==null)\n return Integer.MAX_VALUE;\n return d;\n }", "public static String distance(String x1, String x2){\n\n }", "public double calculateDistance(double latitude1, double longitude1, double latitude2, double longitude2)\n {\n latitude1 = Math.toRadians(latitude1);\n longitude1 = Math.toRadians(longitude1);\n latitude2 = Math.toRadians(latitude2);\n longitude2 = Math.toRadians(longitude2);\n\n double dlon = longitude2 - longitude1;\n double dlat = latitude2 - latitude1;\n\n double a = Math.pow((Math.sin(dlat/2)),2) + Math.cos(latitude1) * Math.cos(latitude2) * Math.pow(Math.sin(dlon/2),2);\n\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n //System.out.println(\"a: \" + a + \";c: \" + c + \";result: \" + (r*c));\n return r * c;\n }", "private static final int weightedLevenshteinDistance(String str1,\n \t\t\tString str2) {\n \t\tint[][] distances = new int[str1.length() + 1][str2.length() + 1];\n \n \t\tfor (int i = 0; i < str1.length() + 1; i++) {\n \t\t\tdistances[i][0] = i;\n \t\t}\n \n \t\tfor (int j = 1; j < str2.length() + 1; j++) {\n \t\t\tdistances[0][j] = j;\n \t\t}\n \n \t\tfor (int i = 1; i < str1.length() + 1; i++) {\n \t\t\tfor (int j = 1; j < str2.length() + 1; j++) {\n \t\t\t\tdistances[i][j] = getKeyDistance(str1.charAt(0), str2.charAt(0))\n \t\t\t\t\t\t+ Math.min(\n \t\t\t\t\t\t\t\tdistances[i - 1][j - 1]\n \t\t\t\t\t\t\t\t\t\t+ (str1.charAt(i - 1) == str2\n \t\t\t\t\t\t\t\t\t\t\t\t.charAt(j - 1) ? 0 : 1), Math\n \t\t\t\t\t\t\t\t\t\t.min(distances[i - 1][j] + 1,\n \t\t\t\t\t\t\t\t\t\t\t\tdistances[i][j - 1] + 1));\n \t\t\t}\n \t\t}\n \n \t\treturn distances[str1.length()][str2.length()];\n \t}", "Execution getClosestDistance();", "public static int getDistanceBetweenStops(Stop s1, Stop s2) {\n return stopDistances.get(new StopPair(s1, s2));\n }", "public int calcDistance(String wordOne, String wordTwo) {\n int [][]table = new int[wordOne.length()][wordTwo.length()];\n for (int i = 0; i < wordOne.length(); ++i) {\n for (int j = 0; j < wordTwo.length(); ++j) {\n table[i][j] = -1;\n }\n }\n\n return calcDistanceRecursive(wordOne.length()-1, wordTwo.length()-1, wordOne.toCharArray(), wordTwo.toCharArray(), table);\n }", "public int shortestPath(Village startVillage, Village targetVillage) {\n// setting the initial point 's minimum distance to zera\n startVillage.setMinDistance(0);\n// accourting to bellman ford if there are n number of dots then n-1 iterations to be done to find the minimum distances of every dot from one initial dot\n int length = this.villageList.size();\n// looping n-1 times\n for (int i = 0; i < length - 1; i++) {\n// looping through all the roads and mark the minimum distances of all the possible points\n for (Road road : roadList) {\n\n\n// if the road is a main road then skip the path\n if (road.getWeight() == 900)\n continue; //why 900 ? : just a random hightest number as a minimum distance and same 900 is used as a mix number\n Village v = road.getStartVertex();\n Village u = road.getTargetVertex();\n// if the newly went path is less than the path it used to be the update the min distance of the reached vertex\n int newLengtha = v.getMinDistance() + road.getWeight();\n if (newLengtha < u.getMinDistance()) {\n u.setMinDistance(newLengtha);\n u.setPreviousVertex(v);\n }\n int newLengthb = u.getMinDistance() + road.getWeight();\n if (newLengthb < v.getMinDistance()) {\n v.setMinDistance(newLengthb);\n v.setPreviousVertex(v);\n }\n }\n }\n// finally return the minimum distance\n return targetVillage.getMinDistance();\n }", "public static double getDistance(GPSPosition first, GPSPosition second) {\n\t\tdouble distance = 0;\n\t\t\n\t\tdouble latitude_distance_in_radians = \n\t\t\t\tMath.toRadians(second.getLatitude() - first.getLatitude());\n\t\tdouble longitude_distance_in_radians = \n\t\t\t\tMath.toRadians(second.getLongitude() - first.getLongitude());\n\t\t// harvesin(d / R) = harvesin(lat1 - lat2) + cos(lat1) * cos(lat2) * harvesin(lng1 - lng2);\n\t\t// harvesin(angle) = sin(angle / 2) ^ 2;\n\t\t// d = 2 * R * arcsin(sqrt(harvesin));\n\t\tdouble harvesin_diff_lat = Math.pow(Math.sin(latitude_distance_in_radians / 2), 2);\n\t\tdouble harvesin_diff_lng = Math.pow(Math.sin(longitude_distance_in_radians / 2), 2);\n\t\tdouble cos_lat1 = Math.cos(Math.toRadians(first.getLatitude()));\n\t\tdouble cos_lat2 = Math.cos(Math.toRadians(second.getLatitude()));\n\t\tdouble harvesin = harvesin_diff_lat + cos_lat1 * cos_lat2 * harvesin_diff_lng;\n\n\t\tdistance = 2 * kEarthRadius * Math.atan2(Math.sqrt(harvesin), Math.sqrt(1 - harvesin));\n\t\treturn distance;\n\t}", "private double oneWayDistance(Shape other, Vector3D direction) {\n // for every vertex in this shape,\n // would it intersect the other shape if moved in direction dir?\n // if so, at what distance? Find the min.\n\n Vector3D d = direction.normalize();\n double[] v = this.getTransformedVertices();\n double tmin = -1;\n\n for (int i = 0; i < v.length; i += 3) {\n Vector3D vertex = new Vector3D(v[i], v[i + 1], v[i + 2]);\n double t = other.rayIntersect(vertex, d, false, null, null);\n tmin = Util.Math.minIfValid(t, tmin);\n }\n\n return tmin;\n }", "public static double getDistance(int x1, int y1, int x2, int y2)\n {\n double dx = x2 - x1;\n double dy = y2 - y1;\n\n // return Math.hypot(x2 - x1, y2 - y1); // Extremely slow\n // return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)); // 20 times faster than hypot\n return Math.sqrt(dx * dx + dy * dy); // 10 times faster then previous line\n }", "public static int shortestDistance( ElementGraph graph, FlowElement lhs, FlowElement rhs )\n {\n return DijkstraShortestPath.findPathBetween( directed( graph ), lhs, rhs ).size();\n }", "public static double getDistance(Node a, Node b) {\n return Math.abs(a.getX() - b.getX()) + Math.abs(a.getY() - b.getY());\n }", "double estimatedDistanceToGoal(Vertex s, Vertex goal);", "public static int minDistanceIteration(String word1, String word2) {\n\n int m = word1.length();\n int n = word2.length();\n\n //op[i][j] 代表word1[0...i-1]与word2[0...j-1]的编辑距离\n int[][] op = new int[m + 1][n + 1];\n\n for (int i = 0; i <= m; i++) {\n op[i][0] = i;\n }\n\n for (int i = 0; i <=n; i++) {\n op[0][i] = i;\n }\n\n for (int i = 1; i <=m; i++) {\n for (int j = 1; j <=n; j++) {\n if (word1.charAt(i-1) == word2.charAt(j-1)) {\n op[i][j] = op[i-1][j-1];\n } else {\n op[i][j] = Math.min(Math.min(op[i-1][j-1], op[i-1][j]), op[i][j-1]) + 1;\n }\n }\n }\n\n return op[m][n];\n }", "@Override\r\n\tpublic double calculateDistance(Object obj1, Object obj2) {\r\n\t\treturn Math.abs(((String)obj1).split(\" \").length - \r\n\t\t\t\t((String)obj1).split(\" \").length);\r\n\t}", "public static void findTheShortestDistance(String[]\tarrayOfWords, String word1, String word2) {\n\t\tHashMap<String, ArrayList<Integer>> wordMap = new HashMap<String, ArrayList<Integer>>();\n\t\t\n\t\t// Add each word to the map\n\t\tfor(int i = 0; i < arrayOfWords.length; ++i) {\n\t\t\t\n\t\t\t// Does this word exist in the map?\n\t\t\tif(wordMap.containsKey(arrayOfWords[i])) {\n\t\t\t\t\n\t\t\t\t// It does, get the value and add to it\n\t\t\t\twordMap.get(arrayOfWords[i]).add(i);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t// It does not, create the first record\n\t\t\t\tArrayList<Integer> firstRecord = new ArrayList<Integer>();\n\t\t\t\tfirstRecord.add(i);\n\t\t\t\twordMap.put(arrayOfWords[i].toLowerCase(), firstRecord);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t// Ensure that there is a record for word1 and word2?\n\t\tif(!wordMap.containsKey(word1.toLowerCase()) || !wordMap.containsKey(word2.toLowerCase())) {\n\t\t\t\n\t\t\tSystem.out.println(\"Specified words don't appear in the provided document.\");\n\t\t\treturn;\n\t\t\t\n\t\t}\n\t\t\n\t\t// Now let's find the closest instance of word2 to word1\n\t\t\n\t\t// Get the locations of word1\n\t\tArrayList<Integer> locationsOfWord1 = wordMap.get(word1.toLowerCase());\n\t\t\n\t\t// Get the locations of word2\n\t\tArrayList<Integer> locationsOfWord2 = wordMap.get(word2.toLowerCase());\n\t\t\n\t\t// Initialize minDistance, cannot be longer than the length of our document\n\t\tint minDistance = arrayOfWords.length;\n\t\tint word1Position = 0, word2Position = 0;\n\t\t\n\t\t// Compare each instance of word1\n\t\tfor(int i : locationsOfWord1) {\n\t\t\t\n\t\t\t// To each instance of word2\n\t\t\tfor(int j : locationsOfWord2) {\n\t\t\t\t\n\t\t\t\t// Get the distance between these two occurrences\n\t\t\t\tint distance = Math.abs(i - j);\n\t\t\t\t\n\t\t\t\t// If our distance is less than minDistance, update minDistance\n\t\t\t\tif(distance < minDistance) {\n\t\t\t\t\t\n\t\t\t\t\t// Set the new distance\n\t\t\t\t\tminDistance = distance;\n\t\t\t\t\tword1Position = i;\n\t\t\t\t\tword2Position = j;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t// We're done, print out the result\n\t\tSystem.out.println(\"\\r\\nThe distance is:\\r\\n\" + minDistance + \" [\" + word1 + \" @ \" + (word1Position + 1) + \"], [\" + word2 + \" @ \" + (word2Position + 1) + \"]\");\n\t\t\n\t}", "public int minDistance(String word1, String word2) {\n int m=word1.length();\n int n=word2.length();\n \n int dp[][]=new int[m+1][n+1];\n \n for(int i=0;i<m+1;i++){\n for(int j=0;j<n+1;j++){\n //if first string is empty then only option is add all chars from second\n if(i==0)\n dp[i][j]=j;\n \n //if second string is empty then only option is remove all chars from 1st\n else if(j==0)\n dp[i][j]=i;\n //do nothing and copy from diagonal ie. ignore \n else if(word1.charAt(i-1)==word2.charAt(j-1))\n dp[i][j]=dp[i-1][j-1];\n else\n {\n //insert , //remove // replace\n dp[i][j]=1+Math.min(dp[i][j-1], Math.min(dp[i-1][j], dp[i-1][j-1]));\n }\n }\n }\n return dp[m][n];\n }", "public abstract double calculateDistance(double[] x1, double[] x2);", "public int getShortestDistance(final Node source, final Node target) {\n return D[source.id][target.id];\n }", "private double findDistance(int[] pos1, int[] pos2) {\n return sqrt((pos1[0]-pos2[0])*(pos1[0]-pos2[0])+\n (pos1[1]-pos2[1])*(pos1[1]-pos2[1]));\n }", "private static int MHDistance(int NODE1, int NODE2) {\n return Math.abs((NODE1 >> 16) - (NODE2 >> 16)) + Math.abs((NODE1 & 0x00FF) - (NODE2 & 0x00FF));\n }", "public static double absoluteDistance(Prototype one, Prototype two)\r\n {\r\n double[] oneInputs = one.getInputs();\r\n double[] twoInputs = two.getInputs();\r\n //int _size = one.numberOfInputs();\r\n double acc = 0.0;\r\n for (int i = 0; i < numberOfInputs; ++i)\r\n {\r\n acc += Math.abs(oneInputs[i] - twoInputs[i]);\r\n }\r\n\r\n return acc;\r\n }", "@Override\n\tpublic double shortestPathDist(int src, int dest) {\n\t\tfor(node_data vertex : dwg.getV()) {\n\t\t\tvertex.setInfo(\"\"+Double.MAX_VALUE);\n\t\t}\n\t\tnode_data start = dwg.getNode(src);\n\t\tstart.setInfo(\"0.0\");\n\t\tQueue<node_data> q = new LinkedBlockingQueue<node_data>();\n\t\tq.add(start);\n\t\twhile(!q.isEmpty()) {\n\t\t\tnode_data v = q.poll();\n\t\t\tCollection<edge_data> edgesV = dwg.getE(v.getKey());\n\t\t\tfor(edge_data edgeV : edgesV) {\n\t\t\t\tdouble newSumPath = Double.parseDouble(v.getInfo()) +edgeV.getWeight();\n\t\t\t\tint keyU = edgeV.getDest();\n\t\t\t\tnode_data u = dwg.getNode(keyU);\n\t\t\t\tif(newSumPath < Double.parseDouble(u.getInfo())) {\n\t\t\t\t\tu.setInfo(\"\"+newSumPath);\n\t\t\t\t\tq.remove(u);\n\t\t\t\t\tq.add(u);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn Double.parseDouble(dwg.getNode(dest).getInfo());\n\t}", "private double getDistance(double initX, double initY, double targetX, double targetY) {\n\t\treturn Math.sqrt(Math.pow((initX - targetX), 2) + Math.pow((initY - targetY), 2));\n\t}", "private double distance(double lat1, double lon1, double lat2, double lon2) {\n double theta = lon1 - lon2;\r\n double dist = Math.sin(deg2rad(lat1)) * Math.sin(deg2rad(lat2)) + Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * Math.cos(deg2rad(theta));\r\n dist = Math.acos(dist);\r\n dist = rad2deg(dist);\r\n dist = dist * 60 * 1.1515;\r\n dist = dist * 1.609344;\r\n return (dist); // return distance in kilometers\r\n }", "static int levenshteinDistance(String x, String y) {\r\n\t\tint[][] dp = new int[x.length() + 1][y.length() + 1];\r\n\r\n\t\tfor (int i = 0; i <= x.length(); i++) {\r\n\t\t\tfor (int j = 0; j <= y.length(); j++) {\r\n\t\t\t\tif (i == 0) {\r\n\t\t\t\t\tdp[i][j] = j;\r\n\t\t\t\t}\r\n\t\t\t\telse if (j == 0) {\r\n\t\t\t\t\tdp[i][j] = i;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tdp[i][j] = min(dp[i - 1][j - 1] \r\n\t\t\t\t\t\t\t+ costOfSubstitution(x.charAt(i - 1), y.charAt(j - 1)), \r\n\t\t\t\t\t\t\tdp[i - 1][j] + 1, \r\n\t\t\t\t\t\t\tdp[i][j - 1] + 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn dp[x.length()][y.length()];\r\n\t}", "public double getMinimumDistance() { return minDistance; }", "private int dist(int city1, int city2){\n\t\treturn this.getGraph().getWeight(city1, city2);\n\t}", "public int getDistance(LifeForm lf1, LifeForm lf2) throws EnvironmentException\r\n\t{\r\n\t\tint lf1Row = getLifeFormRow(lf1); //row of first lifeform\r\n\t\tint lf1Col = getLifeFormCol(lf1); //column of first lifeform\r\n\t\tint lf2Row = getLifeFormRow(lf2); //row of second lifeform\r\n\t\tint lf2Col = getLifeFormCol(lf2); //column of second lifeform\r\n\t\t\r\n\t\t//call getDistance(int row1, int col1, int row2, int col2) with LifeForm coordinates\r\n\t\treturn getDistance(lf1Row, lf1Col, lf2Row, lf2Col);\r\n\t}", "private double dijkstrasAlgo(String source, String dest) {\r\n\r\n\t\tclearAll(); // running time: |V|\r\n\t\tint count = 0; // running time: Constant\r\n\t\tfor (Vertex v : vertexMap.values()) // running time: |V|\r\n\t\t\tif (v.isStatus())\r\n\t\t\t\tcount++;\r\n\r\n\t\tVertex[] queue = new Vertex[count]; // running time: Constant\r\n\t\tVertex start = vertexMap.get(source); // running time: Constant\r\n\t\tstart.dist = 0; // running time: Constant\r\n\t\tstart.prev = null; // running time: Constant\r\n\r\n\t\tint index = 0; // running time: Constant\r\n\t\tfor (Vertex v : vertexMap.values()) { // running time: |V|\r\n\t\t\tif (v.isStatus()) {\r\n\t\t\t\tqueue[index] = v;\r\n\t\t\t\tv.setHandle(index);\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbuildMinHeap(queue, count); // running time: |V|\r\n\r\n\t\twhile (count != 0) { // running time: |V|\r\n\t\t\tVertex min = extractMin(queue, count); // running time: log |V|\r\n\t\t\tcount--; // running time: Constant\r\n\r\n\t\t\tfor (Iterator i = min.adjacent.iterator(); i.hasNext();) { // running time: |E|\r\n\t\t\t\tEdge edge = (Edge) i.next();\r\n\t\t\t\tif (edge.isStatus()) {\r\n\t\t\t\t\tVertex adjVertex = vertexMap.get(edge.getDestination());\r\n\t\t\t\t\tif (adjVertex.dist > (min.dist + edge.getCost()) && adjVertex.isStatus()) {\r\n\t\t\t\t\t\tadjVertex.dist = (min.dist + edge.getCost());\r\n\t\t\t\t\t\tadjVertex.prev = min;\r\n\t\t\t\t\t\tint pos = adjVertex.getHandle();\r\n\t\t\t\t\t\tHeapdecreaseKey(queue, pos, adjVertex); // running time: log |V|\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn vertexMap.get(dest).dist; // running time: Constant\r\n\t}", "public static double distance(double latitude1, double longitude1, double latitude2, double longitude2) {\n\n\t\tdouble a,c,d; // fjern = 1.0\n\t\t\n\t\t// TODO:\n\t\t// OPPGAVE - START\n\t\tdouble phi1 = toRadians(latitude1);\n\t\tdouble phi2 = toRadians(latitude2);\n\t\tdouble dphi1 = toRadians(latitude2 - latitude1);\n\t\tdouble dLamd1 = toRadians(longitude2 - longitude1);\n\t\t\n\t\ta = Math.pow((sin(dphi1/2)),2)+ cos(phi1)*cos(phi2)*Math.pow(sin(dLamd1/2),2);\n\t\tc = 2*atan2(sqrt(a), sqrt((1-a)));\n\t\td = R*c;\n\t\t// OPPGAVE - SLUTT\n\n\t\treturn d;\n\t}", "public float getDistance();", "private double dist(Integer unit1, Integer unit2, StateView newstate) {\n\t\t//Creating two arrays of size 2 to store the position of the 2 units\n\t\tint[] pos1 = new int[2];\n\t\tint[] pos2 = new int[2];\n\t\t//Extracting the positional data\n\t\tpos1[0] = newstate.getUnit(unit1).getXPosition();\n\t\tpos1[1] = newstate.getUnit(unit1).getYPosition();\n\t\tpos2[0] = newstate.getUnit(unit2).getXPosition();\n\t\tpos2[1] = newstate.getUnit(unit2).getYPosition();\n\t\t//Calculating the distance\n\t\tdouble dx = Math.abs(pos1[0] - pos2[0]);\n\t\tdouble dy = Math.abs(pos1[1] - pos2[1]);\n\t\tdouble distance = Math.sqrt(Math.pow(dx, 2.0) + Math.pow(dy, 2.0));\n\t\treturn distance;\n\t}", "@SuppressLint(\"UseValueOf\")\n\tpublic static double distFrom(double lat1, double lng1, double lat2, double lng2) {\n\t double earthRadius = 3958.75;\n\t double dLat = Math.toRadians(lat2-lat1);\n\t double dLng = Math.toRadians(lng2-lng1);\n\t double a = Math.sin(dLat/2) * Math.sin(dLat/2) +\n\t Math.cos(Math.toRadians(lat1)) * Math.cos(Math.toRadians(lat2)) *\n\t Math.sin(dLng/2) * Math.sin(dLng/2);\n\t double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));\n\t double dist = earthRadius * c;\n\n\t int meterConversion = 1609;\n\t \n\t return new Double(dist * meterConversion).doubleValue();\n\t }", "private double Distance(Point first, Point second){ // distance between two points \n\t\treturn Math.sqrt(Math.pow(second.getY()-first.getY(),2) + Math.pow(second.getX()-first.getX(),2));\n\t}", "public int distance(Coord coord1, Coord coord2);", "public static double getGMapTravelTimeMin(Location a, Location b, DbHelper db) throws SQLException, ClassNotFoundException, IllegalAccessException, InstantiationException, GeoCodeApiException {\n\t\tdouble distance = Utility.calculateDistanceKm(a, b, db);\n\t\tif (distance<0)\n\t\t\treturn 0;\n\t\treturn distance/50*60;\n\t}", "public static double distance(Prototype one, Prototype two)\r\n {\r\n return d(one, two);\r\n }", "void calculateDistance()\t{\n\t\t\t\t\t\t\t\t\t\n\t\tfor (String substringOne : setOne)\t{\n\t\t\t\tif (setTwo.contains(substringOne))\n\t\t\t\t\toverlapSubstringCount++;\n\t\t}\t\t\t\t\t\t\t\n\n\t\tsubstringCount = (length1 - q) + (length2 - q) + 2 - overlapSubstringCount; \n\t\tdistance = (double)overlapSubstringCount/(substringCount - overlapSubstringCount);\t\n\t}", "@Override\n\tpublic double shortestPathDist(int src, int dest) {\n\t\tif(src== dest ) return 0;\n\t\tif(this.GA.getNode(src)==null || this.GA.getNode(dest)==null) throw new RuntimeException(\"Wrong input,Missing nodes.\");\n\t\tsetNodes();\n\t\tnode_data temp = this.GA.getNode(src);\n\t\ttemp.setWeight(0);\n\t\tSTPRec(temp, this.GA.getNode(dest));\n\t\tdouble ans = this.GA.getNode(dest).getWeight();\n\t\treturn ans;\n\t}", "private static int editDistance(String a, String b) {\n int m = a.length() + 1, n = b.length() + 1;\n int[] dists = new int[m], newDists = new int[m];\n for (int i = 0; i < m; i++) dists[i] = i;\n for (int j = 1; j < n; j++) {\n newDists[0] = j;\n for (int i = 1; i < m; i++) {\n newDists[i] = Math.min(Math.min(\n dists[i] + 1, // Insert\n newDists[i-1] + 1), // Delete\n dists[i-1] + (a.charAt(i-1) == b.charAt(j-1) ? 0 : 1)); // Replace\n }\n int[] swap = dists; dists = newDists; newDists = swap;\n }\n return dists[m-1];\n }", "public static int shortestDistance(Graph graph, Vertex a, Vertex b) {\n Set<List<Vertex>> listSetVertex=breadthFirstSearch(graph);\n int distance=graph.getVertices().size();\n for(List<Vertex> lv: listSetVertex){\n int aindex=lv.indexOf(a);\n int bindex=lv.indexOf(b);\n if(aindex>=0&&bindex>=0){\n distance=distance>Math.abs(aindex-bindex)?Math.abs(aindex-bindex):distance;\n }\n }\n return distance==graph.getVertices().size()?-1:distance;\n }", "public int distance(String noun1, String noun2) {\n if (!isNoun(noun1) || !isNoun(noun2)) {\n throw new IllegalArgumentException(\"Either noun1 or noun2 is not a wordnet noun\");\n }\n LinkedList<Integer> x = synsetList.get(noun1);\n LinkedList<Integer> y = synsetList.get(noun2);\n return shortestCA.lengthSubset(x, y);\n\n }", "private double distance(double lat1, double lon1, double lat2, double lon2) {\r\n double theta = lon1 - lon2;\r\n double dist = Math.sin(deg2rad(lat1))\r\n * Math.sin(deg2rad(lat2))\r\n + Math.cos(deg2rad(lat1))\r\n * Math.cos(deg2rad(lat2))\r\n * Math.cos(deg2rad(theta));\r\n dist = Math.acos(dist);\r\n dist = rad2deg(dist);\r\n dist = dist * 60 * 1.1515;\r\n return (dist);\r\n }", "public double getDistance(){\r\n\t\treturn Math.sqrt(\r\n\t\t\t\t(\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterX()\r\n\t\t\t\t\t, 2 )\r\n\t )\r\n\t\t\t\t+ (\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterY()\r\n\t\t\t\t\t\t- this.getSecondObject().getCenterY()\r\n\t\t\t\t\t, 2 )\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t}", "public double calculateDistance(MapLocation a, MapLocation b) {\r\n\t\treturn Math.sqrt((double) ( Math.pow((b.x - a.x),2) + Math.pow((b.y - a.y),2) ));\r\n\t}", "private static long getShortestDistance(String origin, String destination) \n\t\tthrows IOException, ParserConfigurationException, SAXException{\n\t\t\t\t\n\t\tURL googleReq = new URL(\"http://maps.google.com/maps/api/directions/xml?origin=\"+origin.replace(\" \", \"+\").replace(\",\", \"\")+\n\t\t\t\t\"&destination=\"+destination.replace(\" \", \"+\").replace(\",\", \"\")+\"&sensor=false\");\n\t\t\n\t\tURLConnection urlConnection = googleReq.openConnection();\n\n\t\tDocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n\t\tDocumentBuilder db = dbf.newDocumentBuilder();\n\n\t\tDocument doc = db.parse(urlConnection.getInputStream());\n\t\ttry{\n\t\t\t/*\n\t\t\t * we write the response to an xml file\n\t\t\t * just for supervision\n\t\t\t */\n\t\t\tSource source = new DOMSource(doc);\n\t\t\tFile file = new File(\"response.xml\");\n\t\t\tResult result = new StreamResult(file);\n\n\t\t\t// Write the DOM document to the file\n\t\t\tTransformer xformer = TransformerFactory.newInstance().newTransformer();\n\t\t\txformer.transform(source, result);\n\t\t} catch (TransformerConfigurationException e) {\n\t\t} catch (TransformerException e) {\n\t\t}\n\n\t\tNode stNode = doc.getElementsByTagName(\"status\").item(0);\n\t\tlong dst = -1;\n\t\tif(stNode.getTextContent().equals(\"OK\")){\n\t\t\t//extract the distance from the response\n\t\t\tNodeList routeLst = doc.getElementsByTagName(\"route\");\n\t\t\t\n\t\t\tfor(int rCtr=0;rCtr<routeLst.getLength();rCtr++){\n\t\t\t\tlong routeDist = 0;\n\t\t\t\tNode route = routeLst.item(rCtr);\n\t\t\t\t\n\t\t\t\tNodeList distLst = ((Element)route).getElementsByTagName(\"distance\");\n\n\t\t\t\tfor(int dCtr=0;dCtr<distLst.getLength();dCtr++){\n\t\t\t\t\tNode distanceNode = distLst.item(dCtr);\n\t\t\t\t\tif(distanceNode.getParentNode().getNodeName().equals(\"leg\")){\n\t\t\t\t\t\tNodeList distChild = ((Element)distanceNode).getElementsByTagName(\"value\");\n\t\t\t\t\t\tfor(int ch=0;ch<distChild.getLength();ch++){\n\t\t\t\t\t\t\tNode tmpChild = distChild.item(ch);\n\t\t\t\t\t\t\t\trouteDist += Long.parseLong(tmpChild.getTextContent());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(routeDist<dst || dst==-1)\n\t\t\t\t\tdst=routeDist;\n\t\t\t} //end route\n\t\t\tSystem.out.println(\"Shortest distance: \"+dst+\" meters\");\n\t\t}\n\t\telse{\n\t\t\tSystem.err.println(\"RESPONSE STATUS NOT OK!\");\t//probably over_query_limit status\n\t\t}\n\t\t\n\t\treturn dst;\n\t}", "public synchronized double getDistance(String from, String to) {\n\t\treturn (new DijkstraShortestPath<String, SumoEdge>(graph, from, to)).getPathLength();\n\t}", "T distance(S from, S to);", "public double calcDistance(GpsCoordinate other)\n\t{\n\t\tdouble lat1 = degToRadian(this.latitude);\n\t\tdouble lng1 = degToRadian(this.longitude);\n\t\tdouble lat2 = degToRadian(other.latitude);\n\t\tdouble lng2 = degToRadian(other.longitude);\n\t\t\n\t\t/*\n\t\t * use haversine Formula to calc the distance\n\t\t * @see: http://en.wikipedia.org/wiki/Haversine_formula\n\t\t */\n\t\tdouble inRootFormula = Math.sqrt(\n\t\t\t\tMath.sin((lat1 - lat2)/2)*Math.sin((lat1 - lat2)/2)+\n\t\t\t\tMath.cos(lat1)*Math.cos(lat2)*Math.sin((lng1-lng2)/2)*Math.sin((lng1-lng2)/2));\n\t\t\n\t\treturn 2* EARTH_RADIUS * Math.asin(inRootFormula);\n\n\t\n\t}", "@Override\n public float distanceAdjacent(int x1, int y1, int x2, int y2) {\n float duration = 0;\n\n if (x1 == x2 || y1 == y2) {\n MapTile.Instance fromTile = getTileData(x1, y1);\n MapTile.Instance toTile = getTileData(x2, y2);\n assert fromTile != null && toTile != null;\n\n Direction move = Direction.get(x2 - x1, y2 - y1);\n\n int fromHeight = fromTile.heightOf(move);\n int toHeight = toTile.heightOf(move.inverse());\n\n // steepness\n float t1inc = (fromHeight - fromTile.getHeight()) / (TILE_SIZE / 2);\n float t2inc = (toHeight - toTile.getHeight()) / (TILE_SIZE / 2);\n\n // actual duration of walking\n float walkSpeedT1 = (1f / hypoLength(t1inc)) * walkSpeed;\n float walkSpeedT2 = (1f / hypoLength(t2inc)) * walkSpeed;\n\n // duration += walkspeed(steepness_1) * dist + walkspeed(steepness_2) * dist\n duration += (walkSpeedT1 + walkSpeedT2) * TILE_SIZE;\n\n // height difference on the sides of the tiles\n float cliffHeight = (toHeight - fromHeight) * TILE_SIZE_Z;\n\n // climbing if more than 'an acceptable height'\n if (cliffHeight > 0) {\n duration += (cliffHeight / climbSpeed);\n }\n\n } else {\n // TODO allow diagonal tracing\n Logger.WARN.print(String.format(\n \"Pathfinding (%s) asked for non-adjacent tiles (%d, %d) (%d, %d)\",\n getClass(), x1, y1, x2, y2\n ));\n\n return Float.POSITIVE_INFINITY;\n }\n\n return duration;\n }" ]
[ "0.644504", "0.64073706", "0.63128346", "0.62722814", "0.61757845", "0.60637796", "0.60524213", "0.6034628", "0.60311896", "0.59855014", "0.59800684", "0.59793067", "0.5952905", "0.59351707", "0.591757", "0.59082645", "0.5905368", "0.5875826", "0.586958", "0.5863358", "0.5857457", "0.5847929", "0.5846848", "0.5846098", "0.58321667", "0.5823488", "0.58221895", "0.58219725", "0.58008283", "0.5796201", "0.57643735", "0.57448995", "0.57291484", "0.57151043", "0.57090753", "0.5703341", "0.5700619", "0.5697607", "0.56879705", "0.5668452", "0.56665766", "0.56509775", "0.56318724", "0.56131136", "0.55978984", "0.55880517", "0.55821425", "0.5577154", "0.5575846", "0.5568311", "0.5556265", "0.5551465", "0.55470324", "0.55334544", "0.55322355", "0.55316544", "0.5528812", "0.55184805", "0.5516975", "0.55000925", "0.5491735", "0.5488903", "0.5487534", "0.5484656", "0.5479847", "0.5475167", "0.5474426", "0.54671746", "0.54604405", "0.545703", "0.5455246", "0.5447571", "0.54471254", "0.54451215", "0.5440645", "0.5437372", "0.54345876", "0.54274696", "0.5422476", "0.5421526", "0.54145885", "0.5410069", "0.5403996", "0.54036206", "0.53977597", "0.5390824", "0.53893965", "0.53873056", "0.53849363", "0.5377765", "0.53735644", "0.537324", "0.53707325", "0.5365661", "0.53638065", "0.53606683", "0.5358297", "0.53442454", "0.5333825", "0.53314185", "0.5324473" ]
0.0
-1
Sets all destination parameters according to a given arm.
public void setDestinationArm(int destinationArm) { switch (destinationArm) { case 0: destinationFields.add(fields[0][12]); for(int i = 1; i < 4; ++i) { for(Field field : fields[i]) { if(field != null) { destinationFields.add(field); } } } case 1: destinationFields.add(fields[4][24]); for(int i = 4; i < 9; ++i) { for(int j = 1; j < 11-i; ++j) { Field field = fields[i][24-j]; if(field != null) { destinationFields.add(field); } } } case 2: destinationFields.add(fields[12][24]); for(int i = 4; i < 9; ++i) { for(int j = 1; j < 11-i; ++j) { Field field = fields[16-i][24-j]; if(field != null) { destinationFields.add(field); } } } case 3: destinationFields.add(fields[16][12]); for(int i = 15; i > 12; --i) { for (Field field : fields[i]) { if(field != null) { destinationFields.add(field); } } } case 4: destinationFields.add(fields[12][0]); for(int i = 4; i < 9; ++i) { for(int j = 1; j < 11-i; ++j) { Field field = fields[16-i][j]; if(field != null) { destinationFields.add(field); } } } case 5: destinationFields.add(fields[4][0]); for(int i = 4; i < 9; ++i) { for(int j = 1; j < 11-i; ++j) { Field field = fields[i][j]; if(field != null) { destinationFields.add(field); } } } } destinationField = destinationFields.get(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setDestination(Locations destination);", "protected void setArmState(int arm) {\r\n if(arm == KSGripperStates.ARM_UP)\r\n armState = arm;\r\n else if(arm == KSGripperStates.ARM_DOWN)\r\n armState = arm;\r\n }", "private void setArmorPoint (int arm)\r\n {\r\n if (arm < 1 || arm >25)\r\n {\r\n armorPoint = 1;\r\n }\r\n else\r\n {\r\n armorPoint = arm;\r\n }\r\n }", "protected void copyParameters( RestParamsPropertyHolder srcParams, RestParamsPropertyHolder destinationParams )\n\t{\n\t\tfor( int i = 0; i < srcParams.size(); i++ )\n\t\t{\n\t\t\tRestParamProperty prop = srcParams.getPropertyAt( i );\n\n\t\t\tdestinationParams.addParameter( prop );\n\n\t\t}\n\t}", "public abstract void setInternal(int head, int ct, int t, int arm, int leg);", "void setParameters() {\n\t\t\n\t}", "private void setArmCount(int armCount) {\n\n\t}", "public void setParameters(Parameters params) {\n Log.e(TAG, \"setParameters()\");\n //params.dump();\n native_setParameters(params.flatten());\n }", "@Override\n\t\tpublic void setParameters(Object[] parameters) {\n\t\t\t\n\t\t}", "protected void initialize() {\n initialPos = Math.abs(Robot.arm.getArmEncoderValue());\n double direction = Math.signum(setpoint - Math.abs(Robot.arm.getArmEncoderValue()));\n Robot.arm.moveArm(direction * RobotMap.ArmConstants.ARM_AUTONOMOUS_MOVEMENT_POWER, 1);\n }", "protected void setParameters(double[] parameters) {\n\tthis.parameters = parameters;\n }", "@Override\n\tpublic void setDestination(int x, int y) {\n\t\t\n\t}", "public final void setParameters(Properties parameters) {\r\n mParameters=parameters;\r\n }", "public void setRoute (JsonObject journey) {\n\t\tsetDate(journey.get(\"date\").getAsString());\n\t\tsetStart(journey.get(\"start\").getAsString());\n\t\tsetDestination(journey.get(\"dest\").getAsString());\n\t setArrivalTime(journey.get(\"arrivalTime\").getAsString());\n\t \t\n\t JsonArray segmentJs = journey.getAsJsonArray(\"segments\");\n\t for (int i = 0; i < segmentJs.size(); i++) {\n\t\t\tSegment segment = new Segment();\n\t\t\tsegment.setSegment(segmentJs.get(i).getAsJsonObject());\n\t\t\tmSegmentList.add(i, segment);\n\t\t}\n\t mSegmentList.trimToSize();\n\t setDepartureTime(segmentJs.get(0).getAsJsonObject());\n\t}", "static void set_ar_dr(FM_OPL OPL, int slot, int v) {\n OPL_CH CH = OPL.P_CH[slot / 2];\n OPL_SLOT SLOT = CH.SLOT[slot & 1];\n int ar = v >> 4;\n int dr = v & 0x0f;\n\n SLOT.AR = ar != 0 ? new IntArray(OPL.AR_TABLE, ar << 2) : new IntArray(RATE_0);\n SLOT.evsa = SLOT.AR.read(SLOT.ksr);\n if (SLOT.evm == ENV_MOD_AR) {\n SLOT.evs = SLOT.evsa;\n }\n\n SLOT.DR = dr != 0 ? new IntArray(OPL.DR_TABLE, dr << 2) : new IntArray(RATE_0);\n SLOT.evsd = SLOT.DR.read(SLOT.ksr);\n if (SLOT.evm == ENV_MOD_DR) {\n SLOT.evs = SLOT.evsd;\n }\n\n }", "protected void setMotorPositions(long lPos, long rPos) {\n leftPosition = lPos;\n rightPosition = rPos;\n }", "void setParameters(List<DeployerParameterTemplate> parameters);", "void setRoute(Shape route);", "public void setValues(RutaParams params){\n this.costo = params.costo;\n this.tiempoVuelo = params.tiempoVuelo;\n this.piloto =encriptar(params.piloto);\n }", "public void set( RpLidarScan scan ) {\n\t\tSystem.arraycopy(scan.quality,0,quality,0,N);\n\t\tSystem.arraycopy(scan.distance,0,distance,0,N);\n\t\tSystem.arraycopy(scan.time,0,time,0,N);\n\t\tSystem.arraycopy(scan.pos_asserv,0,pos_asserv,0,N);\n\t\tused.clear();\n\t\tused.addAll(scan.used);\n\t}", "@Override\r\n\tpublic void setRobot(Robot r) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\trobot = (BasicRobot) r;\r\n\t\t//robot.setMaze(this.mC);\r\n\t\t\r\n\t}", "public void setParameters(MaterialParams mp);", "abstract void setCaptureParameters(int width, int height, int frameRate,\n android.hardware.Camera.Parameters cameraParameters);", "private void setAllParameters(int len) {\n\t\t\tshowUPLMN = new String[len] ;\n\t\t\toriginalUPLMN = new String[len] ;\n\t\t\tstrUorG = new String[len] ;\n\t\t\tpart = new byte[len][];\n\t\t\torder = new int[len];\n\t\t\tfor(int i=0;i<len;i++){\n\t\t\t\t part[i] = new byte[6];\n\t\t\t}\n\t\t}", "public void setParameters(String parameters);", "public static void assign(Object to, Object from) {\n List<Method> getMethods = new ArrayList<>();\n List<Method> setMethods = new ArrayList<>();\n\n for (Method method: from.getClass().getMethods()) {//заполняем getMethods getter-ами\n if(isGetter(method)) {\n getMethods.add(method);\n }\n }\n\n for (Method method: to.getClass().getMethods()) {//заполняем getMethods setter-ами\n if(isSetter(method)) {\n setMethods.add(method);\n }\n }\n\n for (Method setMethod: setMethods) {\n String setMethodName = setMethod.getName().substring(3);\n for (Method getMethod: getMethods) {\n if (setMethodName.equals(getMethod.getName().substring(3)) &&\n CompareTypes(setMethod.getParameterTypes()[0], getMethod.getReturnType())) {\n try {\n setMethod.invoke(to, getMethod.invoke(from));\n } catch (Exception e) {\n System.out.println(e);\n }\n break;\n }\n }\n }\n }", "public ShareRouteParm() {\n\t\t\tname = \"\";\n\t\t\tstart = \"\";\n\t\t\tend = \"\";\n\t\t\troutePoint = \"\";\n\t\t\tavoidPoint = \"\";\n\t\t\tconditionCode = -1;\n\t\t\taviodCondition = -1;\n\t\t\tforbidCondition = -1;\n\t\t\ttarget = -1;\n\t\t\tmapVer = \"\";\n\t\t}", "public void setAngle(double angle) {\n if (!isReset) {\n System.out.println(\"ARM NOT RESETTED. ROBOT WILL NOT MOVE ARM AS PID WILL DESTROY IT.\");\n armMotor.set(ControlMode.PercentOutput, 0);\n return;\n }\n double targetPositionRotations = angle * Const.kArmDeg2Talon4096Unit * Const.kArmGearRatioArm2Encoder;\n System.out.println(\"setting PID setpoint \" + targetPositionRotations);\n armMotor.set(ControlMode.Position, targetPositionRotations);\n }", "public ArmJoint() {\n \t\n \tMotor = new CANTalon(RobotMap.Ports.bucketLifter);\n \tMotor.setFeedbackDevice(FeedbackDevice.CtreMagEncoder_Relative);\n \tMotor.clearStickyFaults();\n \tMotor.setSafetyEnabled(false);\n \tMotor.configNominalOutputVoltage(0, 0);\n \tMotor.configPeakOutputVoltage(12, -12);\n \tMotor.setAllowableClosedLoopErr(10);\n \tMotor.setProfile(0);\n \tMotor.setP(RobotMap.Values.armPidP);\n \tMotor.setI(RobotMap.Values.armPidI);\n \tMotor.setD(RobotMap.Values.armPidD);\n \tMotor.setF(0);\n\n \t//Motor.configEncoderCodesPerRev(1);\n \t//Motor.enableLimitSwitch(true, true);\n \t//Motor.enableBrakeMode(false);\n \t//Motor.enable();\n \t//Motor.changeControlMode(TalonControlMode.PercentVbus);\n \tMotor.enableZeroSensorPositionOnReverseLimit(true);\n \tMotor.set(0);\n \t\n \tLiveWindow.addActuator(\"ArmJoint\", 1, (CANTalon) Motor);\n // Use these to get going:\n // setSetpoint() - Sets where the PID controller should move the system\n // to\n // enable() - Enables the PID controller.\n }", "public void setRoutes(RouteDescriptor[] routes) {\n mRoutes = routes;\n mBundle.putParcelableArray(KEY_ROUTES, RouteDescriptor.toParcelableArray(routes));\n }", "public void setParameters(int m, int r, int n){\n\t\t//Correct for invalid parameters\n\t\tif (m < 1) m = 1;\n\t\tif (r < 0) r = 0; else if (r > m) r = m;\n\t\tif (n < 0) n = 0; else if (n > m) n = m;\n\t\t//Assign parameter values\n\t\tpopulationSize = m;\n\t\ttype1Size = r;\n\t\tsampleSize = n;\n\t\tc = Functions.comb(populationSize, sampleSize);\n\t\tsetDomain(Math.max(0, sampleSize - populationSize + type1Size), Math.min(type1Size, sampleSize), 1, DISCRETE);\n\t}", "public void setSpeeds(float lSpd, float rSpd) {\n \t\tthis.leftMotor.setSpeed(lSpd);\n \t\tthis.rightMotor.setSpeed(rSpd);\n \t\tif (lSpd < 0)\n \t\t\tthis.leftMotor.backward();\n \t\telse\n \t\t\tthis.leftMotor.forward();\n \t\tif (rSpd < 0)\n \t\t\tthis.rightMotor.backward();\n \t\telse\n \t\t\tthis.rightMotor.forward();\n \t}", "public void setParameters(Properties props) {\n\n\t}", "@Override\n\tprotected void setParameterValues() {\n\t}", "private void setSteeringContinuous(double FL, double FR, double BL, double BR) {\n double FLoffset = -1, FRoffset = -1, BLoffset = 2, BRoffset = 2;\n\n FLpid.setSetpoint(FL + FLoffset);\n FRpid.setSetpoint(FR + FRoffset);\n BRpid.setSetpoint(BR + BRoffset);\n BLpid.setSetpoint(BL + BLoffset);\n\n steeringFL.moveAtPercent(FLpid.calculate(FLcoder.getAbsolutePosition()));\n steeringFR.moveAtPercent(FRpid.calculate(FRcoder.getAbsolutePosition()));\n steeringBL.moveAtPercent(BLpid.calculate(BLcoder.getAbsolutePosition()));\n steeringBR.moveAtPercent(BRpid.calculate(BRcoder.getAbsolutePosition()));\n }", "protected void setMotorSpeeds(int lSpeed, int rSpeed) {\n setLeftMotorSpeed(lSpeed);\n setRightMotorSpeed(rSpeed);\n }", "private void setCameraParameters() {\n mParameters = mCameraDevice.getParameters();\n\n// Camera.Size previewSize = getDefaultPreviewSize(mParameters);\n//\n// //获取计算过的摄像头分辨率\n// if(previewSize != null ){\n// mPreviewWidth = previewSize.width;\n// mPreviewHeight = previewSize.height;\n// } else {\n// mPreviewWidth = 480;\n// mPreviewHeight = 480;\n// }\n// mParameters.setPreviewSize(mPreviewWidth, mPreviewHeight);\n// //将获得的Preview Size中的最小边作为视频的大小\n// mVideoWidth = mPreviewWidth > mPreviewHeight ? mPreviewHeight : mPreviewWidth;\n// mVideoHeight = mPreviewWidth > mPreviewHeight ? mPreviewHeight : mPreviewWidth;\n// if(mFFmpegFrameRecorder != null) {\n// mFFmpegFrameRecorder.setImageWidth(mVideoWidth);\n// mFFmpegFrameRecorder.setImageHeight(mVideoHeight);\n// }\n//\n// mParameters.setPreviewFrameRate(mPreviewFrameRate);\n\n List<String> supportedFocusMode = mParameters.getSupportedFocusModes();\n if(isSupported(Camera.Parameters.FOCUS_MODE_AUTO, supportedFocusMode)) {\n mParameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);\n }\n\n\n mCameraDevice.setParameters(mParameters);\n\n // 设置闪光灯,默认关闭\n setVideoFlash(false);\n\n //是否支持打开/关闭闪光灯\n mSettingWindow.setFlashEnabled(isSupportedVideoFlash());\n\n mTBtnFocus.setEnabled(isSupportedFocus());\n\n layoutPreView();\n }", "public void setParameters(IfcGloballyUniqueId GlobalId, IfcOwnerHistory OwnerHistory, IfcLabel Name, IfcText Description, IfcPositiveLengthMeasure LiningDepth, IfcPositiveLengthMeasure LiningThickness, IfcPositiveLengthMeasure ThresholdDepth, IfcPositiveLengthMeasure ThresholdThickness, IfcPositiveLengthMeasure TransomThickness, IfcLengthMeasure TransomOffset, IfcLengthMeasure LiningOffset, IfcLengthMeasure ThresholdOffset, IfcPositiveLengthMeasure CasingThickness, IfcPositiveLengthMeasure CasingDepth, IfcShapeAspect ShapeAspectStyle)\n\t{\n\t\tthis.GlobalId = GlobalId;\n\t\tthis.OwnerHistory = OwnerHistory;\n\t\tthis.Name = Name;\n\t\tthis.Description = Description;\n\t\tthis.LiningDepth = LiningDepth;\n\t\tthis.LiningThickness = LiningThickness;\n\t\tthis.ThresholdDepth = ThresholdDepth;\n\t\tthis.ThresholdThickness = ThresholdThickness;\n\t\tthis.TransomThickness = TransomThickness;\n\t\tthis.TransomOffset = TransomOffset;\n\t\tthis.LiningOffset = LiningOffset;\n\t\tthis.ThresholdOffset = ThresholdOffset;\n\t\tthis.CasingThickness = CasingThickness;\n\t\tthis.CasingDepth = CasingDepth;\n\t\tthis.ShapeAspectStyle = ShapeAspectStyle;\n\t\tresolveInverses();\n\t}", "public void setParameters(Map parameters) {\n super.setParameters(parameters);\n if (parameters != null) {\n _displayURL = (String) parameters.get(PROP_IR_DISPLAY_URL);\n _serverIP = (String) parameters.get(PROP_IR_SERVER_IP);\n _importDir = (String) parameters.get(PROP_IR_COLD_IMPORT);\n _displayMode = (String) parameters.get(PROP_IR_DISPLAY_MODE);\n _urlPrefix = (String) parameters.get(PROP_IR_URL_PREFIX);\n }\n }", "public void setParameters(Object[] parameters) throws IOException {\r\n if (parameters == null)\r\n return;\r\n for (int i = 0; i < parameters.length - 1; i += 2) {\r\n setParameter(parameters[i].toString(), parameters[i + 1]);\r\n }\r\n }", "public AllpassFilter setParams(DataBead paramBead) {\r\n\t\tif (paramBead != null) {\r\n\t\t\tObject o;\r\n\r\n\t\t\tif ((o = paramBead.get(\"delay\")) != null) {\r\n\t\t\t\tif (o instanceof UGen) {\r\n\t\t\t\t\tsetDelay((UGen) o);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetDelay((int) paramBead.getFloat(\"delay\", delay));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif ((o = paramBead.get(\"g\")) != null) {\r\n\t\t\t\tif (o instanceof UGen) {\r\n\t\t\t\t\tsetG((UGen) o);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetG(paramBead.getFloat(\"g\", g));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\treturn this;\r\n\t}", "void setDest(String L);", "@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}", "public ShooterArmPorts(Config config) {\n this(\n config.getInt(\"motor-port\"),\n config.getInt(\"pot-port\")\n );\n }", "public void setParameters(GeoNumeric[] parameters) {\n\t\tthis.parameters = parameters;\n\t\tsettingChanged();\n\t}", "protected void initRecorderParameters() {\n\t\tmMediaRecorder.setCamera(mCamera);\n\t\tmMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);\n\t\tmMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);\n\t\tmMediaRecorder.setVideoEncoder(mVideoEncoder);\n\t\tmMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());\n\t\tmMediaRecorder.setVideoSize(mQuality.resX,mQuality.resY);\n\t\tmMediaRecorder.setVideoFrameRate(mQuality.framerate);\n\t\tmMediaRecorder.setVideoEncodingBitRate(mQuality.bitrate);\n\t\tmMediaRecorder.setOrientationHint(mQuality.orientation);\n\t}", "public void mediaRecorderParameterFetching(MediaRecorder recorder) {\n recorder.setAudioSource(5);\n recorder.setVideoSource(1);\n recorder.setProfile(this.mProfile);\n recorder.setVideoSize(this.mProfile.videoFrameWidth, this.mProfile.videoFrameHeight);\n recorder.setMaxDuration(getOverrodeVideoDuration());\n }", "public void setValues(Parameter[] values) {\n if (values == null || values.length < 4) {\n throw new IllegalArgumentException(\"Invalid values:\" + values);\n }\n if (this.values == null) {\n this.values = new Parameter[values.length];\n }\n int index = 0;\n for (Parameter p : values) {\n this.values[index++] = p;\n }\n validateValues();\n }", "public void setValues(TextureParameter source) {\n if (source.values == null) {\n throw new IllegalArgumentException(\"No texture parameters in source.\");\n }\n values = new Parameter[source.values.length];\n int index = 0;\n for (Parameter p : source.values) {\n if (p == null) {\n throw new IllegalArgumentException(\"Texture parameter value is null, invalid name in source?\");\n }\n values[index++] = p;\n }\n }", "@Override\n public void initialize() {\n arm.setPosition(degrees);\n }", "@Override\r\n\tpublic void setParameters(Map<String, String[]> parameters){\n\t\tthis.parameters=parameters;\r\n\t}", "protected void parametersToCamera(double[] params, PinholeCamera result) {\n \n if (mResidualIntrinsic == null) {\n mResidualIntrinsic = new PinholeCameraIntrinsicParameters();\n }\n mResidualIntrinsic.setSkewness(params[0]);\n mResidualIntrinsic.setHorizontalFocalLength(params[1]);\n mResidualIntrinsic.setVerticalFocalLength(params[2]);\n mResidualIntrinsic.setHorizontalPrincipalPoint(params[3]);\n mResidualIntrinsic.setVerticalPrincipalPoint(params[4]);\n \n if (mResidualRotation == null) {\n mResidualRotation = new Quaternion(params[5], params[6], \n params[7], params[8]);\n } else {\n mResidualRotation.setA(params[5]);\n mResidualRotation.setB(params[6]);\n mResidualRotation.setC(params[7]);\n mResidualRotation.setD(params[8]);\n }\n mResidualRotation.normalize();\n \n if (mResidualCenter == null) {\n mResidualCenter = new InhomogeneousPoint3D(params[9], params[10], \n params[11]);\n } else {\n mResidualCenter.setInhomogeneousCoordinates(params[9], params[10],\n params[11]);\n }\n mResidualCenter.normalize();\n \n result.setIntrinsicAndExtrinsicParameters(mResidualIntrinsic, \n mResidualRotation, mResidualCenter); \n result.normalize();\n }", "void setParameters(Map<String, String[]> parameters);", "private void setParameters(int width, int height, int bitRate) {\n if ((width % 16) != 0 || (height % 16) != 0) {\n Log.w(TAG, \"WARNING: width or height not multiple of 16\");\n }\n mWidth = width;\n mHeight = height;\n mBitRate = bitRate;\n mFrame = new byte[mWidth * mHeight * 3 / 2];\n }", "public static void assign(Object to, Object from) throws InvocationTargetException, IllegalAccessException {\n Class fromClass = from.getClass();\n Class toClass = to.getClass();\n\n ArrayList<Method> getters = getGetters(fromClass.getMethods());\n ArrayList<Method> setters = getSetters(toClass.getMethods());\n for (var f:getters){\n for (var t:setters){\n if (f.getName().substring(3).equals(t.getName().substring(3))\n && f.getReturnType().equals(t.getParameterTypes()[0])){\n Object returnVal = t.invoke(to, f.invoke(from));\n }\n\n }\n }\n\n }", "public static void setTamerAgentParams(TamerAgent agent) {\t\t\n\t\t/*\n\t\t * Set all TamerAgent params here, not in Params class. That way you have\n\t\t * a single location that's specific to this experiment that contains\n\t\t * all of your algorithmic information when it's time for writing.\n\t\t */\n\t\tSystem.out.println(agent.params);\n\t\tagent.param(\"distClass\",\"previousStep\"); //// immediate, previousStep, or uniform\n\t\tagent.param(\"extrapolateFutureRew\",false);\n\t\tagent.param(\"traceDecayFactor\",0.0);\n\t\tagent.param(\"featClass\",\"FeatGen_Tetris\");\n\t\tagent.param(\"modelClass\",\"IncGDLinearModel\"); \n\t\tagent.param(\"modelAddsBiasFeat\",true);\n\t\tagent.param(\"stepSize\",0.000005 / 47); // python code takes input value and divides by number of features // 0.02;\n\t\t\n\t\tagent.param(\"delayWtedIndivRew\",false); \n\t\tagent.param(\"noUpdateWhenNoRew\",false); \n\t\tagent.param(\"selectionMethod\",\"greedy\");\n\t\n\t\tagent.param(\"initModelWSamples\",false);\n\t\tagent.param(\"numBiasingSamples\",0);\n\t\tagent.param(\"biasSampleWt\",0.1);\n\t\tagent.param(\"traceDecayFactor\",0.0);\n\t}", "@Override\n public void setParameters(Object[] params) {\n this.parameters = params != null ? params : new Object[0];\n }", "public void setArmSpeed(double speed) {\n if (frontSwitch.get()) {\n encoder.reset();\n }\n if (armIsOnLimitSwitchOrHardstop(speed)) {\n OI.secondaryController.setRumble(GenericHID.RumbleType.kLeftRumble, 0.2);\n speed = 0;\n } else {\n OI.secondaryController.setRumble(GenericHID.RumbleType.kLeftRumble, 0);\n }\n double feedforward = 0.06 * Math.cos(getArmRadians());\n speed = speed + feedforward;\n //speed = predictiveCurrentLimiting.getVoltage(speed * 12, getRPM()) / 12;\n armMotorOne.set(speed);\n\n armSpeed.setDouble(speed);\n }", "public void setGEM1ERFParams(GEM1ERF erf) {\n // set minimum magnitude\n /*\n * xxr: TODO: !!!type safety!!! apache's Configuration interface handles\n * a similar problem this way: Instead of defining one single method\n * like public void setParameter(String key, Object value) {...} there\n * is one method per type defined: setString(), setDouble(), setInt(),\n * ...\n */\n erf.setParameter(GEM1ERF.MIN_MAG_NAME, config\n .getDouble(ConfigItems.MINIMUM_MAGNITUDE.name()));\n // set time span\n TimeSpan timeSpan = new TimeSpan(TimeSpan.NONE, TimeSpan.YEARS);\n timeSpan.setDuration(config.getDouble(ConfigItems.INVESTIGATION_TIME\n .name()));\n erf.setTimeSpan(timeSpan);\n\n // params for area source\n // set inclusion of area sources in the calculation\n erf.setParameter(GEM1ERF.INCLUDE_AREA_SRC_PARAM_NAME, config\n .getBoolean(ConfigItems.INCLUDE_AREA_SOURCES.name()));\n // set rupture type (\"area source rupture model /\n // area_source_rupture_model / AreaSourceRuptureModel)\n erf.setParameter(GEM1ERF.AREA_SRC_RUP_TYPE_NAME, config\n .getString(ConfigItems.TREAT_AREA_SOURCE_AS.name()));\n // set area discretization\n erf.setParameter(GEM1ERF.AREA_SRC_DISCR_PARAM_NAME, config\n .getDouble(ConfigItems.AREA_SOURCE_DISCRETIZATION.name()));\n // set mag-scaling relationship\n erf\n .setParameter(\n GEM1ERF.AREA_SRC_MAG_SCALING_REL_PARAM_NAME,\n config\n .getString(ConfigItems.AREA_SOURCE_MAGNITUDE_SCALING_RELATIONSHIP\n .name()));\n // params for grid source\n // inclusion of grid sources in the calculation\n erf.setParameter(GEM1ERF.INCLUDE_GRIDDED_SEIS_PARAM_NAME, config\n .getBoolean(ConfigItems.INCLUDE_GRID_SOURCES.name()));\n // rupture model\n erf.setParameter(GEM1ERF.GRIDDED_SEIS_RUP_TYPE_NAME, config\n .getString(ConfigItems.TREAT_GRID_SOURCE_AS.name()));\n // mag-scaling relationship\n erf\n .setParameter(\n GEM1ERF.GRIDDED_SEIS_MAG_SCALING_REL_PARAM_NAME,\n config\n .getString(ConfigItems.AREA_SOURCE_MAGNITUDE_SCALING_RELATIONSHIP\n .name()));\n\n // params for fault source\n // inclusion of fault sources in the calculation\n erf.setParameter(GEM1ERF.INCLUDE_FAULT_SOURCES_PARAM_NAME, config\n .getBoolean(ConfigItems.INCLUDE_FAULT_SOURCE.name()));\n // rupture offset\n erf.setParameter(GEM1ERF.FAULT_RUP_OFFSET_PARAM_NAME, config\n .getDouble(ConfigItems.FAULT_RUPTURE_OFFSET.name()));\n // surface discretization\n erf.setParameter(GEM1ERF.FAULT_DISCR_PARAM_NAME, config\n .getDouble(ConfigItems.FAULT_SURFACE_DISCRETIZATION.name()));\n // mag-scaling relationship\n erf.setParameter(GEM1ERF.FAULT_MAG_SCALING_REL_PARAM_NAME, config\n .getString(ConfigItems.FAULT_MAGNITUDE_SCALING_RELATIONSHIP\n .name()));\n\n // mag-scaling sigma\n erf.setParameter(GEM1ERF.FAULT_SCALING_SIGMA_PARAM_NAME, config\n .getDouble(ConfigItems.FAULT_MAGNITUDE_SCALING_SIGMA.name()));\n // rupture aspect ratio\n erf.setParameter(GEM1ERF.FAULT_RUP_ASPECT_RATIO_PARAM_NAME, config\n .getDouble(ConfigItems.RUPTURE_ASPECT_RATIO.name()));\n // rupture floating type\n erf.setParameter(GEM1ERF.FAULT_FLOATER_TYPE_PARAM_NAME, config\n .getString(ConfigItems.RUPTURE_FLOATING_TYPE.name()));\n\n // params for subduction fault\n // inclusion of fault sources in the calculation\n erf\n .setParameter(\n GEM1ERF.INCLUDE_SUBDUCTION_SOURCES_PARAM_NAME,\n config\n .getBoolean(ConfigItems.INCLUDE_SUBDUCTION_FAULT_SOURCE\n .name()));\n // rupture offset\n erf.setParameter(GEM1ERF.SUB_RUP_OFFSET_PARAM_NAME, config\n .getDouble(ConfigItems.SUBDUCTION_FAULT_RUPTURE_OFFSET.name()));\n // surface discretization\n erf.setParameter(GEM1ERF.SUB_DISCR_PARAM_NAME, config\n .getDouble(ConfigItems.SUBDUCTION_FAULT_SURFACE_DISCRETIZATION\n .name()));\n // mag-scaling relationship\n erf\n .setParameter(\n GEM1ERF.SUB_MAG_SCALING_REL_PARAM_NAME,\n config\n .getString(ConfigItems.SUBDUCTION_FAULT_MAGNITUDE_SCALING_RELATIONSHIP\n .name()));\n // mag-scaling sigma\n erf.setParameter(GEM1ERF.SUB_SCALING_SIGMA_PARAM_NAME, config\n .getDouble(ConfigItems.SUBDUCTION_FAULT_MAGNITUDE_SCALING_SIGMA\n .name()));\n // rupture aspect ratio\n erf.setParameter(GEM1ERF.SUB_RUP_ASPECT_RATIO_PARAM_NAME, config\n .getDouble(ConfigItems.SUBDUCTION_RUPTURE_ASPECT_RATIO.name()));\n // rupture floating type\n erf\n .setParameter(GEM1ERF.SUB_FLOATER_TYPE_PARAM_NAME, config\n .getString(ConfigItems.SUBDUCTION_RUPTURE_FLOATING_TYPE\n .name()));\n\n // update\n erf.updateForecast();\n }", "public void setAlternateRoute(short trainId, TrainRoute r) {\n\t\ttrainRoutes.put(trainId, r);\n\t}", "public void setParameters(Parameters parameters) {\n Assertions.checkNotNull(parameters);\n if (!parametersReference.getAndSet(parameters).equals(parameters)) {\n invalidate();\n }\n }", "void setDropLocations(RouteDTO routeDTO, List<RoutePointDTO> points);", "public void setLinkages() throws JiBXException {\n \n // check if any mappings are defined\n if (m_mappings != null) {\n for (int i = 0; i < m_mappings.size(); i++) {\n Object obj = m_mappings.get(i);\n if (obj instanceof MappingDefinition) {\n ((MappingDefinition)obj).setLinkages();\n }\n }\n }\n }", "public void setParameters(List<ConstraintParameter> parameters) {\n\t\tif (parameters != null) {\n\t\t\tm_parameters = parameters;\n\t\t}\n\t\telse {\n\t\t\tm_parameters = new ArrayList<ConstraintParameter>();\n\t\t}\n\t\t\n\t\t// rebuild the parameter string based on the new list\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor (ConstraintParameter param : m_parameters) {\n\t\t\tsb.append(\" :\").append(param.toString());\n\t\t}\n\t\tm_parameterString = sb.toString();\n\t}", "public void setArmure(Armure armure) {\n\t\tthis.armure = armure;\n\t}", "void setParameters(Map<String, Object> propertyValues);", "@SuppressWarnings(\"ucd\")\n public void setPortRouter(int passedPort, PortRouter aPR) {\n synchronized( thePortRouterMap ){\n thePortRouterMap.put( passedPort, aPR );\n }\n }", "public void setUpperArm(double upperArm) {\n this.upperArm = upperArm;\n }", "public void updateDestination(){\r\n\t\tdestination.update_pc_arrivalFlows(flows);\r\n\t}", "default void setAll(Vec3 pos, Vec2 angles) {\n this.setAll(pos, pos, pos, angles, angles);\n }", "void storeSources(McastRoute route, Set<ConnectPoint> sources);", "private void recalculateAllRoutes() {\n robotModels.parallelStream().forEach(m -> m.recalculateRoute(target, obstacles));\n }", "public void setParamValues(Object[] values);", "public void init(double dst,double timeGoal){\n if(!started) {\n for (int i = 0; i < this.motors.length; i++) {\n //reset the encoder, change the behaviour, calculate position\n //then set the target position and change the mode\n motors[i].setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motors[i].setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n int pos = motors[i].getCurrentPosition() +(int) ((dst) * MAGIC_NUMBER);\n motors[i].setTargetPosition(pos);\n motors[i].setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n }\n runTime.reset();\n this.timeGoal = timeGoal;\n started = true;\n }\n }", "@Override\n\tpublic void setVehicleLoad(int van, int railway, int airplane) {\n\t\tconstantPO.setVanLoad(van);\n\t\tconstantPO.setRailwayLoad(railway);\n\t\tconstantPO.setAirplaneLoad(airplane);\n\t}", "private void setCameraParameters(int updateSet) {\n if (mCameraDevice != null) {\n mParameters = mCameraDevice.getParameters();\n\n if ((updateSet & UPDATE_PARAM_INITIALIZE) != 0) {\n updateCameraParametersInitialize();\n }\n\n\n if ((updateSet & UPDATE_PARAM_PREFERENCE) != 0) {\n updateCameraParametersPreference();\n mIsAutoFocusCallback = false;\n }\n\n if (mParameters != null)\n mCameraDevice.setParameters(mParameters);\n }\n }", "public void assign(Point3D target){\n\t\tthis.x = target.x;\n\t\tthis.y = target.y;\n\t\tthis.z = target.z;\n\t\tthis.w = target.w;\n\t}", "public void setRoute(List route) \n {\n this.route = route;\n }", "public void setTargetPosition2(int position,\n HwDevice[] motorArry)\n throws InterruptedException\n {\n motors.setTargetPosition(position,\n motorArry);\n }", "public JobResourceUpdateParameter withDestinationAccountDetails(List<DestinationAccountDetails> destinationAccountDetails) {\n this.destinationAccountDetails = destinationAccountDetails;\n return this;\n }", "public abstract void assign(ParameterVector pv) throws SolverException;", "public void assignOutputs(Map<String, Object> from, Map<String, Object> to) {\n for (Map.Entry<String, Activity.Parameter> param : activity.getParameters().entrySet()) {\n String paramName = param.getKey();\n Activity.Parameter paramDef = param.getValue();\n\n if ( paramDef.isOutputType() ) {\n String mapping = parameterValues.get(paramName).mapping;\n if ( mapping!=null ) {\n to.put(mapping, from.get(mapping));\n }\n }\n }\n }", "public static final void setAR(float a_r) {\r\n\t\tA_R = a_r;\r\n\t}", "public void setParameters(ParametersBuilder parametersBuilder) {\n setParameters(parametersBuilder.build());\n }", "public void setQueue ( Queue queue )\r\n {\r\n setDestination ( queue );\r\n }", "public void setCardList(ArrayList<DestinationCard> list) {\n destinationCards = list;\n }", "private void configureCamera(int width, int height)\n {\n mCameraId = CAMERA_FACE_BACK;\n ///Configure camera output surfaces\n setupCameraOutputs(mWidth, mHeight);\n }", "public ArmMoveWithPiston(double destAngle, RobotMap.PistonPositions finalPistonPosition) {\n\t\taddSequential(new LogMessage(\"Arm Move,1,started,dest angle,\" + destAngle + \",finalPistonPosition,\" + finalPistonPosition, true));\n\t\t\n\t\taddSequential(new ArmMoveToLegalRange());\n\t\taddSequential(new LogMessage(\"Arm Move,2,in legal range\", true));\n\t\t\n\t\taddParallel(new ArmMoveToEdge(destAngle));\n\t\taddSequential(new ArmPistonSmartRetract(destAngle, finalPistonPosition!=RobotMap.PistonPositions.Retracted));\n\t\taddSequential(new LogMessage(\"Arm Move,3,smart retract done\", true));\n\n//\t\taddParallel(new ArmPistonSmartRetract(destAngle, finalPistonPosition)); // For now, just tell the piston to retract\n\t\t\n\t\tif (finalPistonPosition==RobotMap.PistonPositions.Extended) addParallel(new ArmPistonSmartExtendInDestZone(destAngle));\n\t\taddSequential(new ArmMoveToDestAngle(destAngle));\n\t\taddSequential(new LogMessage(\"Arm Move,4,at dest angle\", true));\t\t\n\t}", "public void setdetailsRoute(String[] details) {\r\n\t\tfor (int i = 0; i < details.length; i++) {\r\n\t\t\tdetailsRoute[i] = details[i];\r\n\t\t}\r\n\t\tsetFlightNumber(detailsRoute[0]);\r\n\t\tsetDepartureTime(Integer.parseInt(detailsRoute[1]));\r\n\t\tsetArrivalTime(Integer.parseInt(detailsRoute[3]));\r\n\t\tcalculateFlightDuration();\r\n\t\tsetPrice(Double.parseDouble(detailsRoute[4]));\r\n\r\n\t}", "public ArmMoveWithPiston(double destAngle, boolean finalPistonPosition) {\n\t\tthis(destAngle, finalPistonPosition ? RobotMap.PistonPositions.Extended : RobotMap.PistonPositions.Retracted);\n\t}", "public void setPatternRGBAll(int r, int g, int b) {\n for (var i = 0; i < (m_ledBuffer.getLength()); i++) {\n m_ledBuffer.setRGB(i, r, g, b);\n }\n m_led.setData(m_ledBuffer);\n }", "public void setParameters(String parameters){\n this.parameters=parameters;\n }", "public void copyConfig()\n {\n if (srcParts == null || dstParts == null)\n {\n logger.error(\"VObjectTreeCopier.copyConfig: null source or destination\");\n return;\n }\n if (hasRootTranslation)\n {\n srcParts[rootTranslationIdx].getTranslation(buf);\n dstParts[rootTranslationIdx].setTranslation(buf);\n }\n if (hasTranslation)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getTranslation(buf);\n dstParts[i].setTranslation(buf);\n }\n }\n if (hasRotation)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getRotation(buf);\n dstParts[i].setRotation(buf);\n }\n }\n if (hasScale)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getScale(buf);\n dstParts[i].setScale(buf);\n }\n }\n if (hasVelocity)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getVelocity(buf);\n dstParts[i].setVelocity(buf);\n }\n }\n if (hasAngularVelocity)\n {\n for (int i = 0; i < srcParts.length; i++)\n {\n srcParts[i].getAngularVelocity(buf);\n dstParts[i].setAngularVelocity(buf);\n }\n }\n\n }", "default void setAll(Vec3 pos, Vec3 prev, Vec3 lastTick, Vec2 angles, Vec2 prevAngles) {\n this.setPos(pos);\n this.setPrevPos(prev);\n this.setLastTickPos(lastTick);\n this.setRotations(angles);\n this.setPrevRotations(prevAngles);\n }", "public static native void OpenMM_AmoebaInPlaneAngleForce_setAngleParameters(PointerByReference target, int index, int particle1, int particle2, int particle3, int particle4, double length, double quadraticK);", "public void setActivePlanarRegion(PlanarRegion planarRegion)\n {\n planarRegionsList.clear();\n\n if (planarRegion != null)\n {\n planarRegionsList.addPlanarRegion(planarRegion);\n }\n else\n {\n yoActivePlanarRegion.clear();\n yoShrunkActivePlanarRegion.clear();\n yoActivePlanarRegionInControlPlane.clear();\n }\n }", "public void setWaypoints(ArrayList<Point3D> newWaypoints)\n {\n targetWaypoints = newWaypoints;\n }", "private void fillParameters(Pconfig report) {\r\n\t\tList<? extends Parameter<?>> parameters = report.getParameters();\r\n\t\tfor (Parameter<?> param : parameters) {\r\n\t\t\tif (param instanceof StringParameter){\r\n\t\t\t\t((StringParameter) param).setValue(\"test string\");\r\n\t\t\t} else if (param instanceof IntegerParameter){\r\n\t\t\t\t((IntegerParameter) param).setValue(13);\r\n\t\t\t} else if (param instanceof DateParameter){\r\n\t\t\t\t((DateParameter) param).setValue(new Date());\r\n\t\t\t} else if (param instanceof BooleanParameter){\r\n\t\t\t\t((BooleanParameter) param).setValue(true);\r\n\t\t\t} else if (param instanceof EntityParameter){\r\n\t\t\t\tEntityParameter eparam = (EntityParameter) param;\r\n\t\t\t\tString type = eparam.getValueType();\r\n\t\t\t\tif (Integer.class.getSimpleName().equals(type)){\r\n\t\t\t\t\teparam.setValue(\"21\");\r\n\t\t\t\t} else if (Long.class.getSimpleName().equals(type)){\r\n\t\t\t\t\teparam.setValue(\"42\");\r\n\t\t\t\t}if (Double.class.getSimpleName().equals(type)){\r\n\t\t\t\t\teparam.setValue(\"9.4\");\r\n\t\t\t\t}if (Boolean.class.getSimpleName().equals(type)){\r\n\t\t\t\t\teparam.setValue(\"false\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void setVehicleCost(double van, double railway, double airplane) {\n\t\tconstantPO.setVanCost(van);\n\t\tconstantPO.setRailwayCost(railway);\n\t\tconstantPO.setAirplaneCost(airplane);\n\t}", "private void initParameters() {\n jobParameters.setSessionSource(getSession(\"source\"));\n jobParameters.setSessionTarget(getSession(\"target\"));\n jobParameters.setAccessDetailsSource(getAccessDetails(\"source\"));\n jobParameters.setAccessDetailsTarget(getAccessDetails(\"target\"));\n jobParameters.setPageSize(Integer.parseInt(MigrationProperties.get(MigrationProperties.PROP_SOURCE_PAGE_SIZE)));\n jobParameters.setQuery(MigrationProperties.get(MigrationProperties.PROP_SOURCE_QUERY));\n jobParameters.setItemList(getFolderStructureItemList());\n jobParameters.setPropertyFilter(getPropertyFilter());\n jobParameters.setReplaceStringInDestinationPath(getReplaceStringArray());\n jobParameters.setNamespacePrefixMap(getNamespacePrefixList());\n jobParameters.setBatchId(getBatchId());\n jobParameters.getStopWatchTotal().start();\n jobParameters.setSuccessAction(MigrationProperties.get(MigrationProperties.PROP_SOURCE_SUCCESS_ACTION));\n jobParameters.setErrorAction(MigrationProperties.get(MigrationProperties.PROP_SOURCE_ERROR_ACTION));\n jobParameters.setSuccessFolder(MigrationProperties.get(MigrationProperties.PROP_SOURCE_SUCCESS_FOLDER) + \"/\" + jobParameters.getBatchId());\n jobParameters.setErrorFolder(MigrationProperties.get(MigrationProperties.PROP_SOURCE_ERROR_FOLDER) + \"/\" + jobParameters.getBatchId());\n jobParameters.setCurrentFolder(getRootFolder());\n jobParameters.setSkipDocuments(Boolean.valueOf(MigrationProperties.get(MigrationProperties.PROP_MIGRATION_COPY_FOLDERS_ONLY)));\n \n }" ]
[ "0.5512566", "0.5480178", "0.53279686", "0.5305018", "0.5294305", "0.51606095", "0.51524717", "0.5138326", "0.5136946", "0.5129984", "0.5127477", "0.5073163", "0.50726116", "0.50575256", "0.5040394", "0.50073546", "0.4932836", "0.4928057", "0.49032462", "0.48950517", "0.48947307", "0.48932606", "0.48902217", "0.48894167", "0.48819914", "0.48723266", "0.48602468", "0.4820165", "0.4792507", "0.47860277", "0.4760039", "0.47408983", "0.47333613", "0.47326982", "0.47234043", "0.4715906", "0.47123203", "0.47115514", "0.47061986", "0.46919864", "0.46896118", "0.46850777", "0.467793", "0.46743324", "0.46716425", "0.4666358", "0.46551812", "0.46501535", "0.46482936", "0.4646347", "0.46358135", "0.4619108", "0.46128556", "0.46113947", "0.46063", "0.4602493", "0.45987663", "0.45894217", "0.45881256", "0.45812657", "0.45796427", "0.457826", "0.45710444", "0.45662403", "0.45606622", "0.4560048", "0.45586398", "0.45528203", "0.45520744", "0.45517352", "0.45480457", "0.45428577", "0.45382804", "0.45335156", "0.4526237", "0.45194277", "0.4518016", "0.4514951", "0.45072958", "0.45051014", "0.45033917", "0.4498193", "0.44913155", "0.44844052", "0.44826472", "0.44823968", "0.44820327", "0.44779733", "0.4475257", "0.4471639", "0.44676006", "0.44675744", "0.44653463", "0.44602376", "0.44591677", "0.44571036", "0.44523436", "0.44509807", "0.4450383", "0.4448585" ]
0.6890084
0
Builds a new representation containing the given string.
public StringRepresentation(String representation) { this.representation = representation; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String build();", "public String build();", "public abstract String construct();", "StringContent createStringContent();", "public abstract Builder zza(String str);", "private static void subBuild(String string, StringBuilder builder) {\r\n\t\tbuilder.append(\"[\");\r\n\t\tbuilder.append(string);\r\n\t\tbuilder.append(\"] \");\r\n\t}", "public String build() {\n\treturn prefixes.toString() + \" \\n CONSTRUCT { \" + variables.toString()\n\t\t+ \" } WHERE { \" + wheres.toString() + \" }\";\n }", "String buildFrom(T t);", "@Override\n\tpublic String build(String input) {\n\t\tString station = input;\n\t\tstation = normalizeStationName(station);\n\n\t\t//build default result\n\t\tJSONObject itemResultJSON = new JSONObject();\n\t\t\tJSON.add(itemResultJSON, InterviewData.INPUT, input);\n\t\t\tJSON.add(itemResultJSON, InterviewData.VALUE, station);\n\t\t\tJSON.add(itemResultJSON, InterviewData.CACHE_ENTRY, (radioStationsMap.containsKey(station))? station : \"\");\n\t\t\t//TODO: we should make a real \"search\" inside the stations map via name parameter and fuzzy matching\n\t\t\n\t\tbuildSuccess = true;\n\t\treturn itemResultJSON.toJSONString();\n\t}", "java.lang.String getBuilder();", "public String build() {\n StringBuilder sb = new StringBuilder();\n\n appendColor(sb);\n sb.append(flagSymbol);\n appendIndentation(sb);\n appendProperty(sb);\n appendValue(sb);\n appendDefaultColor(sb);\n\n return sb.toString();\n }", "public String buildingString() {\r\n\t\twhichBuild = 1 - whichBuild;\r\n\t\tif (whichBuild == 1) {\r\n\r\n\t\t}\r\n\t\treturn \"420 400;10 10 140 60 60 60 10;140 10 240 60 180 60 10;240 10 400 60 320 60 20 ;10 90 120 180 40 90 15;120 90 280 180 160 90 10;280 90 400 180 340 90 10\";\r\n\t}", "public StringSetField build() {\n Objects.requireNonNull(value, StringSetField.class + \": value is missing\");\n return new StringSetFieldImpl(value);\n }", "@Override\n public Data build(String input) {\n return null;\n }", "StringTemplate createStringTemplate();", "public String build() {\n this.message_string = \"{\";\n\n if (this.recipient_id != null) {\n this.message_string += \"\\\"recipient\\\": {\\\"id\\\": \\\"\" + this.recipient_id + \"\\\"},\";\n }\n\n if ((this.message_text != null)\n && !(this.message_text.equals(\"\"))\n && !(this.buttons.isEmpty())) {\n this.message_string += \"\\\"message\\\": {\";\n this.message_string += \"\\\"attachment\\\": {\";\n this.message_string += \"\\\"type\\\": \\\"template\\\",\";\n this.message_string += \"\\\"payload\\\": {\";\n this.message_string += \"\\\"template_type\\\": \\\"button\\\",\";\n this.message_string += \"\\\"text\\\": \\\"\" + this.message_text + \"\\\",\";\n this.message_string += \"\\\"buttons\\\":[\";\n for (int j = 0; j < this.buttons.size(); j++) {\n HashMap<String, String> button = this.buttons.get(j);\n this.message_string += \"{\";\n if (!button.get(\"type\").equals(\"\")) {\n this.message_string += \"\\\"type\\\":\\\"\" + button.get(\"type\") + \"\\\",\";\n }\n if (!button.get(\"title\").equals(\"\")) {\n this.message_string += \"\\\"title\\\":\\\"\" + button.get(\"title\") + \"\\\",\";\n }\n if (!button.get(\"url\").equals(\"\")) {\n this.message_string += \"\\\"url\\\":\\\"\" + button.get(\"url\") + \"\\\",\";\n }\n if (!button.get(\"payload\").equals(\"\")) {\n this.message_string += \"\\\"payload\\\":\\\"\" + button.get(\"payload\") + \"\\\",\";\n }\n if (!button.get(\"webview_height_ratio\").equals(\"\")) {\n this.message_string +=\n \"\\\"webview_height_ratio\\\":\\\"\"\n + button.get(\"webview_height_ratio\")\n + \"\\\",\";\n }\n this.message_string = this.message_string.replaceAll(\",$\", \"\");\n this.message_string += \"},\";\n }\n this.message_string = this.message_string.replaceAll(\",$\", \"\");\n this.message_string += \"]\";\n this.message_string += \"}\";\n this.message_string += \"}\";\n this.message_string += \"}\";\n }\n\n this.message_string = this.message_string.replaceAll(\",$\", \"\");\n\n this.message_string += \"}\";\n\n return this.message_string;\n }", "public CustomFieldStringType build() {\n return new CustomFieldStringTypeImpl();\n }", "public String buildingString2() {\r\n\t\twhichBuild = 1 - whichBuild;\r\n\t\tif (whichBuild == 1) {\r\n\r\n\t\t}\r\n\t\treturn \"400 400;10 10 90 140 70 140 20;90 10 320 70 220 70 10;10 180 100 380 60 180 15;100 180 320 380 200 180 20;320 10 400 380 320 110 25\";\r\n\t}", "public static Value makeStr(String s) {\n Value r = new Value();\n r.str = s;\n return canonicalize(r);\n }", "StringOperation createStringOperation();", "void stringConstruction()\t{\n\n\t\tString symbol = \"#\";\n\t\t\n\t\tfor (int i = 1; i < q - 1; i++)\tsymbol = symbol + \"#\";\n\t\ts1 = symbol + s1 + symbol;\n\t\ts2 = symbol + s2 + symbol;\n\t\tlength1 += (q-1) * 2;\t\t\n\t\tlength2 += (q-1) * 2;\t\t\n\t}", "@Test\n public void testConstructionString()\n {\n String constructed = StateUtils.construct(sensitiveString, externalContext);\n Object object = StateUtils.reconstruct(constructed, externalContext);\n Assertions.assertTrue(object instanceof String);\n String string = (String) object;\n Assertions.assertEquals(string, sensitiveString);\n }", "@Override\n public Object construct(Object... args) {\n CharSequence stringData = (args.length > 0 ? ToString(realm(), args[0]) : \"\");\n ExoticString obj = new ExoticString(realm(), stringData);\n obj.setPrototype(realm().getIntrinsic(Intrinsics.StringPrototype));\n return obj;\n }", "private Element encapsulateString(String sentence){\n return new MyElement(sentence);\n }", "@Override\n public String build() {\n StringBuilder stringBuilder = new StringBuilder();\n\n // Builds the section headers.\n ArrayList<Header> headers = new ArrayList<Header>();\n headers.add(new Header(\"Content-Type\", m_ContentType.getTypeString()));\n headers.add(new Header(\"Content-Transfer-Encoding\", m_TransferEncoding.getKeyWord()));\n stringBuilder.append(Header.buildHeaders(headers)).append(\"\\r\\n\");\n\n // Encodes the body, and appends it\n switch (m_TransferEncoding) {\n case BASE64 -> stringBuilder.append(Base64.getEncoder().encodeToString(m_RawBody.getBytes()));\n case QUOTED_PRINTABLE -> stringBuilder.append(QuotedPrintable.encode(m_RawBody));\n }\n stringBuilder.append(\"\\r\\n\");\n\n // Returns the built body\n return stringBuilder.toString();\n }", "public static String create()\n\t{\n\t\treturn new String(B64Code.encode(createBytes()));\n\t}", "private StringWriter createStringWriter(String str)\n\t{\n\t\treturn new StringWriter((int) (str.length() + (str.length() * 0.1)));\n\t}", "private static Object Stringbuilder() {\n\t\treturn null;\n\t}", "public static PhoneCall generateFromStringRepresentation(String stringRepresentation) {\n List<String> phoneCallFields = Arrays.asList(stringRepresentation.split(Pattern.quote(STRING_FORMAT_DELIMITER)));\n\n int numOfFields = phoneCallFields.size();\n if (numOfFields != 4) {\n String errorMessage = String.format(\"Expected string representation of PhoneCall to contain 4 fields but got %d field(s).\" + System.lineSeparator() +\n \"Following is the expected representation of a Phone call that was expected: caller|callee|start-time|end-time\", numOfFields);\n throw new IllegalStateException(errorMessage);\n }\n\n return PhoneCallBuilder.aPhoneCall()\n .withCaller(phoneCallFields.get(0))\n .withCallee(phoneCallFields.get(1))\n .withStartTime(phoneCallFields.get(2))\n .withEndTime(phoneCallFields.get(3))\n .build();\n }", "private StringBuilder startBuild() {\n StringBuilder strBuilder = new StringBuilder()\n .append(\"CREATE EXTERNAL TABLE IF NOT EXISTS \");\n if (databaseName != null) {\n strBuilder.append(databaseName).append('.');\n }\n strBuilder.append(tableName);\n\n // yeah... schema is not always required.\n if (hiveSchema != null) {\n strBuilder.append(\" \").append(hiveSchema);\n }\n\n if (tableComment != null && !tableComment.isEmpty()) {\n strBuilder.append(\" COMMENT '\")\n .append(tableComment)\n .append(\"'\");\n }\n\n if (partitioning != null && !partitioning.getFields().isEmpty()) {\n strBuilder.append(\" PARTITIONED BY (\");\n for (Map.Entry<String, Partitioning.FieldType> entry : partitioning.getFields().entrySet()) {\n strBuilder = shouldEscapeColumns ?\n strBuilder.append('`').append(entry.getKey()).append('`') : strBuilder.append(entry.getKey());\n strBuilder.append(\" \")\n .append(FieldTypes.toHiveType(entry.getValue()))\n .append(\", \");\n }\n // remove trailing \", \"\n strBuilder.deleteCharAt(strBuilder.length() - 1)\n .deleteCharAt(strBuilder.length() - 1)\n .append(\")\");\n }\n\n if (rowFormat != null) {\n strBuilder.append(\" ROW FORMAT \").append(rowFormat);\n }\n return strBuilder;\n }", "public String buildWithFormats(String inputFormat, String outputFormat) {\n StringBuilder strBuilder = startBuild()\n .append(\" STORED AS INPUTFORMAT '\")\n .append(inputFormat)\n .append(\"' OUTPUTFORMAT '\")\n .append(outputFormat)\n .append(\"'\");\n\n return finishBuild(strBuilder);\n }", "public static String create()\n\t{\n\t\tBASE64Encoder\tencoder = new BASE64Encoder();\n\n\t\treturn encoder.encode(createBytes());\n\t}", "public URIBuilder(final String string) {\n super();\n try {\n digestURI(new URI(string));\n } catch (final URISyntaxException e) {\n throw new RuntimeException(e.getMessage(), e);\n }\n }", "private void serializeString(final String string, final StringBuffer buffer)\n {\n String decoded = Unserializer.decode(string, charset);\n\n buffer.append(\"s:\");\n buffer.append(decoded.length());\n buffer.append(\":\\\"\");\n buffer.append(string);\n buffer.append(\"\\\";\");\n }", "public <T extends org.ros.internal.message.Message> T buildMessage(String typeString) {\n return messageFactory.newFromType(typeString);\n }", "StringExpression createStringExpression();", "public PatternBuilderResult build(String specification) throws PatternBuilderException {\n StringBuilder patternStringBuilder = new StringBuilder();\n Matcher captureTokenMatcher = pattern.matcher(specification);\n List<String> locations = new ArrayList<>();\n\n int charLoc = 0;\n while(captureTokenMatcher.find()) {\n String match = captureTokenMatcher.group(1);\n\n String regexReplacement = genRegex(captureTokenMatcher.end(), match, specification);\n String literalReplacement = escapeLiteralRegexChars(specification.substring(charLoc, captureTokenMatcher.start()));\n\n patternStringBuilder\n .append(literalReplacement)\n .append(regexReplacement);\n\n locations.add(match);\n\n charLoc = captureTokenMatcher.end();\n\n\n }\n\n patternStringBuilder\n .append(escapeLiteralRegexChars(specification.substring(charLoc, specification.length())));\n\n return new PatternBuilderResult(\n compilePattern(patternStringBuilder.toString()),\n ensureUniqueIndex(locations));\n\n }", "private static String parse(final String input) throws IOException {\n\t\tStringBuilder xml = new StringBuilder(\"<veranstaltung>\\n\");\n\t\taddFields(xml, input);\n\t\taddLecturers(xml, input);\n\t\taddDates(xml, input);\n\t\treturn xml.append(\"</veranstaltung>\").toString();\n\t}", "static public String generateAString(String s) {\n String result;\n result = generate(s);\n if (result != null) {\n currentString = result;\n }\n return result;\n }", "@Override\n public String createString() {\n return null;\n }", "public XMLBuilder(String prevContents)\n\t{\n\t\tthis(prevContents, false);\n\t}", "public final TaskHolderBuilder mo93069d(String str) {\n C32569u.m150519b(str, C6969H.m41409d(\"G7B86C615AA22A82CCF0A\"));\n TaskHolderBuilder tVar = this;\n tVar.f72237f = str;\n return tVar;\n }", "public MyStringBuilder2 append(String s)\n\t{\n\t\t\n\t\tif(length == 0) {\n\t\t\t\n\t\t\tfirstC = new CNode(s.charAt(0));\n\t\t\tlength = 1;\n\t\t\tCNode currNode = firstC;\n\t\t\t\n\t\t\tlastC = currNode;\n\t\t\trecursiveAppendString(s, 1);\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\trecursiveAppendString(s, 0);\n\t\t}\n\t\treturn this;\n\t\t\n\t}", "private OMElement createElement(String str) throws XMLStreamException {\n InputStream in = new ByteArrayInputStream(str.getBytes());\n return new StAXOMBuilder(in).getDocumentElement();\n }", "private String makeStringThisLong(String oldString, int length, Character padding) {\n \tString newString = \"\";\n \t\n \tif(oldString.length()>length) {\n \t\tnewString = oldString.substring(0, length);\n \t\n \t}else {\n \t\tnewString = new String(oldString);\n \t\tfor( int i=newString.length(); i<=length; i++ )\n \t\t\tnewString += padding;\n \t}\n \t\n \t\n \treturn newString;\n \t\n }", "@Ponder2op(\"create:\")\n\tpublic HashInspector(String aString) {\n\t\tinitialise(aString);\n\t}", "public GenObfuscatedString() {\n }", "private static String m1475b(String str) {\n return \"<!DOCTYPE html>\\n<html>\\n<head lang=\\\"en\\\">\\n <meta charset=\\\"UTF-8\\\">\\n <title></title>\\n</head>\\n<body style=\\\"margin:0;padding:0;\\\">\\n <script src=\\\"https://z.moatads.com/\" + str + \"/moatad.js\\\" type=\\\"text/javascript\\\"></script>\\n\" + \"</body>\\n\" + \"</html>\";\n }", "public abstract void fromString(String s, String context);", "@Override\n\tprotected IPAddressStringParameters createFromStringParams() {\n\t\treturn new IPAddressStringParameters.Builder().\n\t\t\t\tgetIPv4AddressParametersBuilder().setNetwork(getNetwork()).getParentBuilder().\n\t\t\t\tgetIPv6AddressParametersBuilder().setNetwork(getIPv6Network()).getParentBuilder().toParams();\n\t}", "private static Circuit buildCircuit(String s, int start, int end){\n int middle = findMiddle(s, start, end);\n if (middle == -1)\n return new SingleResistor(Double.parseDouble(s.substring(start, end)));\n else {\n int aStart = findNextComma(s, start, middle)+1;\n int aEnd = s.charAt(middle-1) == ')'?middle-1:middle;\n Circuit a = buildCircuit(s, aStart, aEnd);\n\n int bStart = middle+1;\n int bEnd = s.charAt(end-1) == ')'?end-1:end;\n Circuit b = buildCircuit(s, bStart, bEnd);\n\n if (s.charAt(start+1) == '-')\n return new SeriesNetwork(a, b);\n else\n return new ParallelNetwork(a, b);\n }\n }", "private void createString() {\n\n\t\tString value = String.valueOf(data[currentIndex++]);\n\t\twhile (currentIndex < data.length && data[currentIndex] != '\"') {\n\t\t\tif (data[currentIndex] == '\\\\') {\n\t\t\t\tcurrentIndex++;\n\t\t\t\tif (currentIndex >= data.length) {\n\t\t\t\t\tthrow new LexerException(\n\t\t\t\t\t\t\t\"Invalid escaping in STRING token.\");\n\t\t\t\t}\n\n\t\t\t\tswitch (data[currentIndex]) {\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\\\':\n\t\t\t\t\tvalue += data[currentIndex++];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'n':\n\t\t\t\t\tvalue += '\\n';\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'r':\n\t\t\t\t\tvalue += '\\r';\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 't':\n\t\t\t\t\tvalue += '\\t';\n\t\t\t\t\tcurrentIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new LexerException(\n\t\t\t\t\t\t\t\"Invalid escaping in STRING token.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvalue += data[currentIndex++];\n\t\t\t}\n\t\t}\n\n\t\tif (currentIndex < data.length) {\n\t\t\tvalue += data[currentIndex++];\n\t\t} else {\n\t\t\tthrow new LexerException(\"Missing end: \\\".\");\n\t\t}\n\n\t\ttoken = new Token(TokenType.STRING, value);\n\t}", "public Segment createSegmentFromString(String segmentstring) {\n\n SegmentImpl segment = new SegmentImpl();\n\n String[] chars = segmentstring.split(\"\");\n\n List<String> worldChars = Arrays.asList(chars);\n\n for (String tocken : worldChars) {\n StepImpl step = new StepImpl();\n Overlay over = null;\n\n if (tocken.equals(\"W\")) {\n over = new Sword();\n } else if (tocken.equals(\"M\")) {\n over = new MonsterImpl();\n } else if (tocken.equals(\"P\")){\n over = new Princess();\n }\n\n if (over != null) {\n step.addOverlay(over);\n }\n segment.addStep(step);\n }\n\n return segment;\n }", "public StringContent(String newString)\n {\n content=newString;\n }", "StringValue createStringValue();", "StringValue createStringValue();", "StringValue createStringValue();", "StringValue createStringValue();", "StringBuilder toString(StringBuilder str);", "public SVCustom build(){\n if(this.disks < 1) return new SVCustom();\n SVCustom s = new SVCustom(new Point(100, (int)Math.pow(2, this.disks)*104 - 52));\n int left[] = new int[]{0,1};\n int right[] = new int[]{1,2};\n int bottom[] = new int[]{0,2};\n SierpinskiTriangle t = new SierpinskiTriangle(0,this.disks,this.disks-1, left, right, bottom, buildInitial(this.disks));\n s.setAttribute(\"font-family\", \"Arial\");\n s.addContent(t, \"Triangle\");\n return s;\n }", "private String e19BuildStaffGageString(String s) {\n String tmp1 = null;\n if ((s != null) && (s.length() > 0)) {\n tmp1 = String.format(\"%c%s-%c\", SEP_CHAR, s, SEP_CHAR);\n } else {\n tmp1 = String.format(\"%c-----%c\", SEP_CHAR, SEP_CHAR);\n }\n\n return tmp1;\n }", "public Animal build() {\n\t\t/*\n\t\t * this prevents nullPointerException, because if name is null, we\n\t\t * can't call any methods of the String class with this object and it\n\t\t * will crash our program\n\t\t */\n\t\tif(name==null)\n\t\t\tname=\"\";\n\t\tif(age<0)\n\t\t\tage=0;\n\t\t/*\n\t\t * if you are creating an object of the immutable class, the last thing\n\t\t * you do, is create that object\n\t\t */\n\t\treturn new Animal(name,age);\n\t}", "public String makeString()\n {\n return \"ArcanaDungeonSource\";\n }", "public static Builder fromLocationString(final String location) {\n if (StringUtils.isBlank(location)) {\n throw new IllegalArgumentException(\"Location is null or blank\");\n }\n\n final String[] locationParts = location.split(SEPARATOR);\n if (locationParts.length != 4) {\n throw new IllegalArgumentException(\"Invalid location: \" + location);\n }\n\n return new Builder()\n .group(locationParts[0])\n .artifact(locationParts[1])\n .version(locationParts[2])\n .bundleIdentifier(locationParts[3].replace(\".nar\", \"\"));\n }", "public static SpannableStringBuilder parseString(String string){\n if(string == null){\n throw new IllegalArgumentException(\"String parameter in parseString method must not be null.\");\n }\n List<MetaTag> metaTags = getMetaTags(string);\n SpannableStringBuilder sb = new SpannableStringBuilder();\n BufferedReader reader = null;\n String line;\n try{\n reader = new BufferedReader(new StringReader(string));\n while((line = reader.readLine()) != null){\n //Don't show the MetaTags\n //TODO add formatting and detail support from the MetaTags\n for(String s : getCurvedBracketTags(line)){\n line = line.replace(s, \"\");\n }\n int pos = 0;\n String name;\n MetaTag t;\n List<String> squareBrackets = getSquareBracketTags(line);\n for(String s : squareBrackets){\n int i = line.indexOf(s);\n if(i != -1) {\n //Add spaces to position the Chord correctly\n for (int j = 0; j < i; j++) {\n sb.append(\" \");\n }\n name = s.replace(\"[\", \"\").replace(\"]\", \"\").trim();\n sb.append(name);\n t = getDefineTag(metaTags, name);\n if(t != null){\n sb.setSpan(new ChordSpan(getChordFromDefineTag(t)), sb.length() - name.length(),\n sb.length() + name.length(), 0);\n }\n }\n line = line.replace(s, \"\");\n if(pos + 1 == squareBrackets.size()){\n sb.append(System.getProperty(\"line.separator\"));\n }\n pos++;\n }\n sb.append(line + System.getProperty(\"line.separator\"));\n }\n }catch(Exception e){\n e.printStackTrace();\n }finally {\n try{\n if(reader != null){\n reader.close();\n }\n }catch(Exception e){\n e.printStackTrace();\n }\n }\n return sb;\n }", "public static String createValidContent(final String string) {\n\t\treturn Strings.replace(string, XML_ENTITY_CHARS, XML_ENTITY_REPLACMENTS); //do the replacements for the special XML symbols and return the results\n\t}", "public BEROctetString(byte[] string, int segmentSize)\n {\n this(string, null, segmentSize);\n }", "public String build() {\r\n if (this.isNotEmpty()) {\r\n final StringBuilder sb = new StringBuilder();\r\n\r\n final List<MessageAssertor> messages;\r\n if (this.isPreconditionsNotEmpty()) {\r\n messages = this.preconditions;\r\n } else {\r\n messages = this.messages;\r\n }\r\n\r\n for (final MessageAssertor message : messages) {\r\n sb.append(HelperMessage.getMessage(message));\r\n }\r\n\r\n return sb.toString();\r\n }\r\n return StringUtils.EMPTY;\r\n }", "static ITextData make(final String text) {\r\n\t\treturn new ITextData() {\r\n\r\n\t\t\t/**\r\n\t\t\t * Version number for serialization.\r\n\t\t\t */\r\n\t\t\tprivate static final long serialVersionUID = 2116930322237925265L;\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic String toString() {\r\n\t\t\t\treturn text;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic String getText() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn text;\r\n\t\t\t}\t\t\t\r\n\t\t};\r\n\t}", "public static String create()\n\t{\n\t\tfinal byte[] bytes = getTLS().compute();\n\n\t\treturn new String(B64Code.encode(bytes));\n\t}", "public CreateBuild pretty(String pretty) {\n put(\"pretty\", pretty);\n return this;\n }", "String buildVersion();", "public String makeString()\n\t{\n\t\treturn \"RandomLevelSource\";\n\t}", "private String getStringToCreateDB(String addings) {\n StringBuffer createDBStringBuffer = new StringBuffer();\n createDBStringBuffer\n .append(SQLFormater.CREATE_TABLE)\n .append(\" \")\n .append(tableName)\n .append(\"(\")\n .append(idFieldName)\n .append(\" \")\n .append(DBCreator.INTEGER_TYPE)\n .append(\" \")\n .append(SQLFormater.PRIMARY_KEY);\n mapFieldsTypes.forEach((kField, vType) -> { // add all table's fields\n createDBStringBuffer\n .append(\", \")\n .append(kField)\n .append(\" \")\n .append(vType);\n if(mapFieldsConstraints.containsKey(kField)) { // add constraint for a field\n createDBStringBuffer\n .append(\" \")\n .append(mapFieldsConstraints.get(kField));\n }\n });\n if (addings != null && !addings.isEmpty()) { // add reference\n createDBStringBuffer\n .append(\", \")\n .append(addings);\n }\n createDBStringBuffer.append(\")\");\n return createDBStringBuffer.toString();\n }", "public java.lang.String getBuilder() {\n java.lang.Object ref = builder_;\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 builder_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "Object build();", "public String generate(String input) {\n\t\treturn generate(input, new QRCodeOptions());\n\t}", "public static StringDescriptionWriter stringWriter() {\n return new StringDescriptionWriter();\n }", "public Builder(String shortSwitch) {\n this.shortSwitches = new HashSet<String>();\n this.shortSwitches.add(shortSwitch);\n longSwitches = new HashSet<String>();\n }", "@Test\n void construct_from_string() {\n ComplexMatrix m = complexMatrix(\"1 + i| (2, 0) | i| 3 -6i|| 123 + 34i| i| 2.3E-10i| 0|| 1.234e+100| 1| i| -2i\");\n\n assertEquals(COMPLEX_MATRIX, m);\n\n System.out.println(m.toPrettyString());\n }", "public IPAddressFormatter<I> build() {\n return constructor.create(style, upperCase, withIPv4End, encloseInBrackets);\n }", "private void createString(){\n for(int i=0;i<this.textPalindrome.length;i++){\n this.joinedTextPalindrome=this.joinedTextPalindrome.concat(this.textPalindrome[i]);\n }\n }", "@java.lang.Override\n public java.lang.String getBuilder() {\n java.lang.Object ref = builder_;\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 builder_ = s;\n return s;\n }\n }", "protected static String buildJson(String key, String value) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\\\"\").append(key).append(\"\\\":\\\"\").append(value).append(\"\\\"}\");\n return sb.toString();\n }", "public ST createStringTemplateInternally(CompiledST impl) {\n\t\tST st = createStringTemplate(impl);\n\t\tif (trackCreationEvents && st.debugState != null) {\n\t\t\tst.debugState.newSTEvent = null; // toss it out\n\t\t}\n\t\treturn st;\n\t}", "@Override\n public StringValue toStringBuilder()\n {\n UnicodeBuilderValue sb = new UnicodeBuilderValue();\n\n sb.append(VHelper.noCtx(), this);\n\n return sb;\n }", "@Override\n\t\tpublic Track build() {\n\t\t\treturn of(\n\t\t\t\t_name,\n\t\t\t\t_comment,\n\t\t\t\t_description,\n\t\t\t\t_source,\n\t\t\t\t_links,\n\t\t\t\t_number,\n\t\t\t\t_type,\n\t\t\t\t_extensions,\n\t\t\t\t_segments\n\t\t\t);\n\t\t}", "public String format(String str) {\n return formattedCode.concat(str);\n }", "public BEROctetString(byte[] string)\n {\n this(string, DEFAULT_CHUNK_SIZE);\n }", "@Override\n public Command build() {\n switch (CommandType.fromString(commandName.getEscapedAndStrippedValue())) {\n case ASSIGN:\n return new AssignmentCommand(commandArgs);\n case CAT:\n return new CatCommand(commandArgs);\n case ECHO:\n return new EchoCommand(commandArgs);\n case WC:\n return new WcCommand(commandArgs);\n case PWD:\n return new PwdCommand(commandArgs);\n case GREP:\n return new GrepCommand(commandArgs);\n case EXIT:\n return new ExitCommand(commandArgs);\n default:\n return new OtherCommand(commandName, commandArgs);\n }\n }", "public static String loadOldWorkspaceFromString(String str) {\n \tcontents = new XMLStringWriter(0);\n contents.beginXMLString(\"SLCODEBLOCKS\");\n \n //load pages\n loadPagesFromString(str);\n \n //load block species\n loadSpeciesFromString(str);\n \n //load constraints\n loadConstraintsFromString(str);\n \n //load blocks\n loadBlocksFromString(str);\n //oraganize blocks according to page and translate their \n //coordinates to the right page\n organizeBlocksAndPages();\n \n //get xml by iterating through pages\n constructXML();\n \n contents.endXMLString();\n \n if(DEBUG)\n \tSystem.out.println(contents);\n \n return contents.toString();\n }", "private String finishBuild(StringBuilder strBuilder) {\n if (location != null && !location.isEmpty()) {\n strBuilder.append(\" LOCATION '\")\n .append(location)\n .append(\"'\");\n }\n\n // table properties is never empty because of required cdap properties\n strBuilder.append(\" TBLPROPERTIES \");\n appendMap(strBuilder, tableProperties);\n return strBuilder.toString();\n }", "public final TaskHolderBuilder mo93067b(String str) {\n C32569u.m150519b(str, C6969H.m41409d(\"G6782D81F\"));\n TaskHolderBuilder tVar = this;\n tVar.f72234c = str;\n return tVar;\n }", "public String formatBuild(B build);", "@Test\n public void testAtomString_9() {\n LOGGER.info(\"testAtomString_9\");\n final StringBuilder s = new StringBuilder(\"Hello\");\n AtomString atomString1 = new AtomString(\"Hello\");\n AtomString atomString2 = new AtomString(s);\n assertEquals(atomString1, atomString2);\n final StringBuilder ss = new StringBuilder(atomString1);\n assertEquals(s.toString(), ss.toString());\n }", "static void stringConstruction(String s) {\n\n StringBuilder buildUniq = new StringBuilder();\n boolean[] uniqCheck = new boolean[128];\n\n for (int i = 0; i < s.length(); i++) {\n if (!uniqCheck[s.charAt(i)]) {\n uniqCheck[s.charAt(i)] = true;\n if (uniqCheck[s.charAt(i)]){\n buildUniq.append(s.charAt(i));\n }\n }\n }\n String unique=buildUniq.toString();\n int n = unique.length();\n System.out.println(n);\n }", "public final TaskHolderBuilder mo93068c(String str) {\n C32569u.m150519b(str, C6969H.m41409d(\"G7C91D9\"));\n TaskHolderBuilder tVar = this;\n tVar.f72232a = str;\n return tVar;\n }", "public StringBuffer creat(String text)\r\n {\r\n StringBuffer sbuff= new StringBuffer( text);\r\n return sbuff;\r\n }", "public static Builder<String, String, String> builder(final String name_) {\n\t\treturn new Builder<String, String, String>(name_, String.class, String.class, String.class);\n\t}", "public String create()\n {\n return createHtml();\n }" ]
[ "0.65313506", "0.65313506", "0.63497776", "0.6233297", "0.6193524", "0.5975795", "0.5887681", "0.57910997", "0.57894295", "0.5759762", "0.5712318", "0.569953", "0.5634284", "0.5619986", "0.55705255", "0.5528114", "0.54924226", "0.54868215", "0.54779345", "0.5427088", "0.5402259", "0.5337289", "0.53091925", "0.52969366", "0.52773935", "0.52478874", "0.5247054", "0.52423954", "0.52337927", "0.5202878", "0.5193144", "0.5182706", "0.5144059", "0.5125809", "0.5106332", "0.509606", "0.5085609", "0.5072953", "0.5019407", "0.50191087", "0.50136757", "0.500511", "0.49881357", "0.49870872", "0.49813426", "0.49718812", "0.49712372", "0.4963916", "0.49638015", "0.49493945", "0.49380794", "0.49285465", "0.49076262", "0.49012783", "0.49012426", "0.49012426", "0.49012426", "0.49012426", "0.48978686", "0.4896459", "0.48945108", "0.48898047", "0.48815462", "0.48737073", "0.48704454", "0.48672238", "0.4865191", "0.48392296", "0.48308408", "0.4830381", "0.48244792", "0.48200944", "0.48050487", "0.4796999", "0.4789696", "0.4778777", "0.47732365", "0.47692513", "0.47660258", "0.47440526", "0.4742234", "0.4740054", "0.47334737", "0.4730078", "0.47290537", "0.47271916", "0.47246873", "0.47224516", "0.4722269", "0.4722029", "0.47201192", "0.47119176", "0.4709286", "0.47086594", "0.4707649", "0.4697628", "0.4695955", "0.46885082", "0.46882528", "0.46796355" ]
0.5185582
31
write your code in Java SE 8 recursive?
public static int solution(int[] A) { if( A.length <= 1){ return 0; } int reverseCount = 0; int compareElement = 0; int sequenceStart = A[0]; int i = 0; while(i < A.length){ int firstElement = A[i]; // array has current and next index should be if(i == A.length-1) compareElement = A[i-1]; else compareElement = A[i+1]; if(firstElement == compareElement){ reverseCount++; if(firstElement == 1 ) sequenceStart = 0; }else if(sequenceStart != firstElement){ sequenceStart= firstElement; reverseCount += 2; } i+=2; } return reverseCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\t\tpublic void applyRecursivelyGoal() {\n\t\t\tassertSuccess(\" ;H; ;S; s ⊆ ℤ |- r∈s ↔ s\",\n\t\t\t\t\trm(\"\", ri(\"\", rm(\"2.1\", empty))));\n\t\t}", "public void inOrderTraverseIterative();", "public void inOrderTraverseRecursive();", "static void p(){\n System.out.println(\"My recursion example 1\");\n p();\n }", "protected abstract void traverse();", "public static void main(String[] args){\n LinkedListDeque<String> lld = new LinkedListDeque<>();\n lld.addFirst(\"Hello\");\n lld.addLast(\"Java\");\n lld.addLast(\"!\");\n\n String s0 = lld.getRecursive(0);\n String s1 = lld.getRecursive(1);\n String s2 = lld.getRecursive(2);\n System.out.println(s0 + s1 + s2);\n System.out.println(lld.getRecursive(556));\n //lld.getRecursive(2);\n }", "@Test public void selfRecursive() {\n check(\"declare function local:f($i) { if($i eq 12345) then $i else local:f($i+1) };\" +\n \"local:f(0)\",\n\n 12345,\n\n exists(Util.className(If.class) + '/' + Util.className(StaticFuncCall.class) +\n \"[@tailCall eq 'true']\")\n );\n }", "@Test public void mixedSelfRecursive() {\n check(\"declare function local:inc($i) { $i + 1 };\" +\n \"declare function local:f($i) { if($i eq 12345) then $i \" +\n \"else local:f(local:inc($i)) };\" +\n \"local:f(0)\",\n\n 12345,\n\n exists(Util.className(If.class) + '/' + Util.className(StaticFuncCall.class) +\n \"[@tailCall eq 'true']\")\n );\n }", "void accept(RebaseJavaVisitor v)\n{\n v.preVisit(this);\n if (!v.preVisit2(this)) return;\n\n if (v.visit(this)) {\n for (CompilationUnit cu : getTrees()) {\n\t cu.accept(v);\n }\n }\n\n v.postVisit(this);\n}", "boolean isRecursive();", "void nest();", "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}", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "static void recursive(SootMethod method){\r\n \tvisited.put(method.getSignature(),true);\r\n \tIterator <MethodOrMethodContext> target_1=new Targets(cg.edgesOutOf(method));\r\n \r\n \tif(target_1!=null){\r\n \t\twhile(target_1.hasNext())\r\n \t\t{\r\n \t\t\tSootMethod target_2=(SootMethod)target_1.next();\r\n \t\t\tSystem.out.println(\"\\t\"+ target_2.getSignature().toString());\r\n \t\t\tif(!visited.containsKey(target_2.getSignature()))\r\n \t\t\t\trecursive(target_2);\r\n \t\t}\r\n \t}\r\n \t}", "static long factorialRecurse(int n) {\r\n if (n == 0 || n == 1) {\r\n return 1;\r\n }\r\n return factorialRecurse(n - 1) * n;\r\n }", "@Test\n public void testRecursion() throws Exception {\n//TODO: Test goes here... \n/* \ntry { \n Method method = Solution.getClass().getMethod(\"recursion\", ArrayList<Integer>.class, TreeNode.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/\n }", "boolean hasRecursive();", "void calculating(int depth);", "public static void main(String[] args) {\n\t\trecursion(1,5);\n\t\t\t}", "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}", "public void deepList() throws Exception;", "public static void main(String[] args) {\n\t\tInteger[] arr = new Integer[]{1,5,10,25};\r\n\t\tInteger N = 100;\r\n\t\t\r\n\t\tInteger[] dp = new Integer[N+1];\r\n\t\tCoinChange obj = new CoinChange();\r\n\t\t\r\n\t\tSystem.out.println(obj.recurse(arr,dp,100));\r\n\t}", "private static int recursion(int x) {\n\t\tif(x == 1) return 0;\n\n\t\tif(dp[x] != -1) return dp[x];\n\t\tint result = Integer.MAX_VALUE;\n\n\t\tif(x % 3 == 0) result = Math.min(recursion(x / 3), result);\n\t\tif(x % 2 == 0) result = Math.min(recursion(x >> 1), result);\n\t\tif(x >= 1) result = Math.min(recursion(x - 1), result);\n\n\t\treturn dp[x] = result + 1;\n\t}", "private void level7() {\n }", "private static void recursiveFixedSumPairs(/* determine parameters here */){\r\n\t\t// complete this method\r\n\t\t\r\n\t}", "@Test\n public void withRecursion() {\n assertThat(ReturnKthtoLast.withRecursion(list, 4), is(2));\n }", "private void streamlinedGo(String[] argsList) {\n\t\tstates = alignment.getAminoAcidsAsFitchStates();\n\t\tbaseStates = phylogeny.getFitchStates(states).clone();\n\t\tambiguousAtRoot = 0;\n\t\tancestorAmbiguities = new boolean[baseStates.length];\n\t\t/* Establish how many ancestral states are ambiguous */\n\t\tfor(int i=0;i<baseStates.length;i++){\n\t\t\tHashSet<String> statesSet=baseStates[i];\n\t\t\tif(statesSet.size()>1){\n\t\t\t\tambiguousAtRoot++;\n\t\t\t\tancestorAmbiguities[i] = true;\n\t\t\t}\n\t\t}\n\t\t/* Attempt to resolve the rootnode states */\n\t\tphylogeny.resolveFitchStatesTopnode();\n\t\tphylogeny.resolveFitchStates(phylogeny.states);\n\t\t/* A new PR object used to hold reconstructions */\n\t\tpr = new ParsimonyReconstruction(states, phylogeny);\n\t\t/* Should now be resolved as far as possible.\n\t\t * Compare each taxon to tree root MRCA */\n\t\t//pr.printAncestralComparison();\n\n\t\t/*\n\t\t * Parse the args into lists\n\t\t * Then find the tips and MRCAs of each list. at this point print all branches below\n\t\t * Then walk through the MRCA / lists counting subs\n\t\t */\n\t\tint numberOfClades = argsList.length-2;\t// we'll assume the first two args are alignment and phylogeny respectively, and all the others (we've checked >2) are clades described by tips\n\t\t// Guessed the number of clades, initialise arrays\n\t\tcladeTips = new HashSet[numberOfClades];\n\t\tcladeTipsAsNodes = new HashSet[numberOfClades];\n\t\tMRCAnodes = new TreeNode[numberOfClades];\n\t\tMRCAcladesBranchTotals = new int[numberOfClades];\n\t\tMRCAcladesBranchTotalsTerminal = new int[numberOfClades];\n\t\tMRCAcladesBranchTotalsInternal = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotals = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotalsTerminal = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotalsInternal = new int[numberOfClades];\n\t\tSystem.out.println(\"Assuming \"+numberOfClades+\" separate clades. Parsing clade descriptions...\");\n\t\t// Parse the clade lists\n\t\tfor(int i=2;i<argsList.length;i++){\n\t\t\tString[] taxaTokens = argsList[i].split(\":\");\n\t\t\tcladeTips[i-2] = new HashSet<String>();\n\t\t\tcladeTipsAsNodes[i-2] = new HashSet<TreeNode>();\n\t\t\tfor(String aTaxon:taxaTokens){\n\t\t\t\tcladeTips[i-2].add(aTaxon);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check we've parsed them correctly\n\t\tSystem.out.println(\"Read these taxon lists:\");\n\t\tfor(int i=0;i<cladeTips.length;i++){\n\t\t\tSystem.out.print(\"Clade \"+i);\n\t\t\tfor(String taxon:cladeTips[i]){\n\t\t\t\tSystem.out.print(\" \"+taxon);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t// Find the MRCA node of each clade, and also print all the branches beneath that MRCA node\n\t\tSystem.out.println(\"Searching the tree for the MRCAs of each clade...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\t// Find the tip nodes corresponding to extant taxa\n\t\t\tIterator<String> itr = cladeTips[i].iterator();\n\t\t\twhile(itr.hasNext()){\n\t\t\t\tint nodeIDofTip = phylogeny.getTipNumber(itr.next());\n\t\t\t\tTreeNode tipNode = phylogeny.getNodeByNumberingID(nodeIDofTip);\n\t\t\t\tcladeTipsAsNodes[i].add(tipNode);\n\t\t\t}\n\t\t\t\t\n\t\t\t// Find the ID of the MRCA node\n\t\t\tint nodeIDofMRCA = phylogeny.getNodeNumberingIDContainingTaxa(cladeTips[i]);\n\t\t\tTreeNode cladeNodeMRCA = phylogeny.getNodeByNumberingID(nodeIDofMRCA);\n\t\t\tMRCAnodes[i] = cladeNodeMRCA;\n\n\t\t\t// Print all the branches below MRCA\n\t\t\tSystem.out.println(\"Found the MRCA of clade \"+i+\" (\"+nodeIDofMRCA+\"):\\n\"+cladeNodeMRCA.getContent()+\"\\nPrinting all branches below this node:\");\n\t\t\tMRCAcladesBranchTotals[i] = cladeNodeMRCA.howManyTips();\n\t\t\tfor(TreeBranch branch:cladeNodeMRCA.getBranches()){\n\t\t\t\tSystem.out.println(branch);\n\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(branch.getParentNode().states, branch.getDaughterNode().states, branch.getParentNode().getContent(), branch.getDaughterNode().getContent());\n\t\t\t\tMRCAcladesSubstitutionTotals[i] = substitutions.length;\n\t\t\t\tif(branch.isEndsInTerminalTaxon()){\n\t\t\t\t\tMRCAcladesBranchTotalsTerminal[i]++;\n\t\t\t\t\tMRCAcladesSubstitutionTotalsTerminal[i] = substitutions.length;\n\t\t\t\t}else{\n\t\t\t\t\tMRCAcladesBranchTotalsInternal[i]++;\n\t\t\t\t\tMRCAcladesSubstitutionTotalsInternal[i] = substitutions.length;\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// For each MRCA node and clade tips combination, compare and print substitutions\n\t\tSystem.out.println(\"Comparing ancestral clade MRCA node sequences with extant sequences...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tSystem.out.println(\"Comparing ancestral MRCA sequence for CLADE \"+i+\" against *ALL* clades' terminal taxa...\");\n\t\t\tTreeNode thisMRCA = MRCAnodes[i];\n\t\t\tfor(int j=0;j<cladeTipsAsNodes.length;j++){\n\t\t\t\tSystem.out.println(\"Clade MRCA: \"+i+\" -vs- clade tips: \"+j);\n\t\t\t\tint MRCAtoTipsSubstitutions = 0;\n\t\t\t\tfor(TreeNode someTip:cladeTipsAsNodes[j]){\n\t\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(thisMRCA.states, someTip.states, \"MRCA_clade_\"+i, someTip.getContent());\n\t\t\t\t\tMRCAtoTipsSubstitutions+= substitutions.length;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Substitutions from Clade MRCA: \"+i+\" -vs- clade tips: \"+j+\": \"+MRCAtoTipsSubstitutions);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// All uncorrected pairwise comparisons\n\t\tSystem.out.println(\"Comparing extant sequences directly...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tfor(TreeNode someTip:cladeTipsAsNodes[i]){\n\t\t\t\tfor(int j=0;j<cladeTipsAsNodes.length;j++){\n\t\t\t\t\tSystem.out.println(\"Basis clade: \"+i+\" -vs- clade tips: \"+j);\n\t\t\t\t\tint MRCAtoTipsSubstitutions = 0;\n\t\t\t\t\tfor(TreeNode someOtherTip:cladeTipsAsNodes[j]){\n\t\t\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(someTip.states, someOtherTip.states, someTip.getContent(), someOtherTip.getContent());\n\t\t\t\t\t\tMRCAtoTipsSubstitutions+= substitutions.length;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"Substitutions from Clade MRCA: \"+i+\" -vs- clade tips: \"+j+\": \"+MRCAtoTipsSubstitutions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t// Print a summary of each clade\n\t\tSystem.out.println(\"Summary of clade counts...\");\n\t\tSystem.out.println(\"Clade\\tbranches\\texternal\\tinternal\\t\\tsubstitutions\\texternal\\tinternal\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tSystem.out.println(i\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotals[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotalsTerminal[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotalsInternal[i]+\"\\t\"\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotals[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotalsTerminal[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotalsInternal[i]);\n\t\t}\n\t\tSystem.out.println(\"Done.\");\n\t}", "public static void main(String[] args) {\n\n TreeNode node1 = new TreeNode(1);\n TreeNode node2 = new TreeNode(2);\n TreeNode node3 = new TreeNode(3);\n TreeNode node4 = new TreeNode(4);\n TreeNode node5 = new TreeNode(5);\n TreeNode node6 = new TreeNode(6);\n TreeNode node7 = new TreeNode(7);\n TreeNode node8 = new TreeNode(8);\n node1.right=node3;\n node1.left=node2;\n node2.left=node4;\n node3.right=node5;\n node4.right=node6;\n node6.left=node7;\n node6.right=node8;\n traversalRecursion(node1);\n System.out.println();\n nonRecurInTraverse(node1);\n }", "public static void main(String[] args){\n\t\t\n\t\tfor (int i = 0; i<999999;i++) results.add(0);\t\n\n\t\tsetChain(1L);\n\t\tboolean switcher = true;\n\t\t//while switch=true ... and once chain length is added to, switch = false\n \t\tlong best = 0L;\n\t\tint index=0;\n\t\t\t\n\t\tfor (long j = 1L; j < 1000000L; j++) {\n\n\t\t\tsetCur((int)j);\n\n\t\t\tfindChain(j);//} catch(Exception e){System.out.println(\"stackOverFlow :D\");}\n\t\t\tif (getChain() > best) {best = getChain(); index=getCur();}\n\t\t\t//now store results for later use if we come across that number.\n\t\t\tresults.set(getCur()-1, (int)getChain());\t\n\t\t\tsetChain(1L); //reset\n\t\t\t/* \t\n\t\t\tswitcher=true;\n\t\t\tint i = j;\n\t\t\twhile (switcher) {\n\n\t\t\t\tif (i==1) {//results.add(chainLength); \n\t\t\t\t\tif (chainLength > best) { best=chainLength; index = j;}\n\t\t\t \tchainLength=1; switcher=false;}\n\t\n\t\t\t\telse { i=recurse(i); chainLength++; }\t\n\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n//\t\t }\n\t\t}\n\t\tSystem.out.println(index);\n\t}", "public final void a() {\n /*\n r25 = this;\n r1 = r25\n int r0 = r25.getAndIncrement()\n if (r0 == 0) goto L_0x0009\n return\n L_0x0009:\n java.util.concurrent.atomic.AtomicReference<io.reactivex.internal.operators.flowable.cq$b<T>[]> r2 = r1.e\n java.lang.Object r0 = r2.get()\n io.reactivex.internal.operators.flowable.cq$b[] r0 = (io.reactivex.internal.operators.flowable.cq.b[]) r0\n r3 = 1\n r4 = r0\n r5 = 1\n L_0x0014:\n java.lang.Object r0 = r1.h\n io.reactivex.internal.b.j<T> r6 = r1.j\n if (r6 == 0) goto L_0x0023\n boolean r8 = r6.isEmpty()\n if (r8 == 0) goto L_0x0021\n goto L_0x0023\n L_0x0021:\n r8 = 0\n goto L_0x0024\n L_0x0023:\n r8 = 1\n L_0x0024:\n boolean r0 = r1.a(r0, r8)\n if (r0 == 0) goto L_0x002b\n return\n L_0x002b:\n if (r8 != 0) goto L_0x0156\n int r0 = r4.length\n int r9 = r4.length\n r12 = 0\n r13 = 0\n r14 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n L_0x0036:\n r16 = -9223372036854775808\n if (r12 >= r9) goto L_0x0053\n r7 = r4[r12]\n long r18 = r7.get()\n int r20 = (r18 > r16 ? 1 : (r18 == r16 ? 0 : -1))\n if (r20 == 0) goto L_0x004e\n long r10 = r7.c\n long r10 = r18 - r10\n long r10 = java.lang.Math.min(r14, r10)\n r14 = r10\n goto L_0x0050\n L_0x004e:\n int r13 = r13 + 1\n L_0x0050:\n int r12 = r12 + 1\n goto L_0x0036\n L_0x0053:\n r9 = 1\n if (r0 != r13) goto L_0x0093\n java.lang.Object r0 = r1.h\n java.lang.Object r7 = r6.poll() // Catch:{ all -> 0x005e }\n goto L_0x0075\n L_0x005e:\n r0 = move-exception\n r6 = r0\n io.reactivex.c.b.throwIfFatal(r6)\n java.util.concurrent.atomic.AtomicReference<org.b.d> r0 = r1.g\n java.lang.Object r0 = r0.get()\n org.b.d r0 = (org.b.d) r0\n r0.cancel()\n java.lang.Object r0 = io.reactivex.internal.util.NotificationLite.error(r6)\n r1.h = r0\n r7 = 0\n L_0x0075:\n if (r7 != 0) goto L_0x0079\n r6 = 1\n goto L_0x007a\n L_0x0079:\n r6 = 0\n L_0x007a:\n boolean r0 = r1.a(r0, r6)\n if (r0 == 0) goto L_0x0081\n return\n L_0x0081:\n int r0 = r1.i\n if (r0 == r3) goto L_0x0090\n java.util.concurrent.atomic.AtomicReference<org.b.d> r0 = r1.g\n java.lang.Object r0 = r0.get()\n org.b.d r0 = (org.b.d) r0\n r0.request(r9)\n L_0x0090:\n r6 = 1\n goto L_0x0165\n L_0x0093:\n r0 = r8\n r8 = 0\n L_0x0095:\n long r11 = (long) r8\n int r13 = (r11 > r14 ? 1 : (r11 == r14 ? 0 : -1))\n if (r13 >= 0) goto L_0x0139\n java.lang.Object r0 = r1.h\n java.lang.Object r13 = r6.poll() // Catch:{ all -> 0x00a1 }\n goto L_0x00b8\n L_0x00a1:\n r0 = move-exception\n r13 = r0\n io.reactivex.c.b.throwIfFatal(r13)\n java.util.concurrent.atomic.AtomicReference<org.b.d> r0 = r1.g\n java.lang.Object r0 = r0.get()\n org.b.d r0 = (org.b.d) r0\n r0.cancel()\n java.lang.Object r0 = io.reactivex.internal.util.NotificationLite.error(r13)\n r1.h = r0\n r13 = 0\n L_0x00b8:\n if (r13 != 0) goto L_0x00bc\n r7 = 1\n goto L_0x00bd\n L_0x00bc:\n r7 = 0\n L_0x00bd:\n boolean r0 = r1.a(r0, r7)\n if (r0 == 0) goto L_0x00c4\n return\n L_0x00c4:\n if (r7 != 0) goto L_0x0135\n java.lang.Object r0 = io.reactivex.internal.util.NotificationLite.getValue(r13)\n int r11 = r4.length\n r12 = 0\n r13 = 0\n L_0x00cd:\n if (r12 >= r11) goto L_0x0103\n r3 = r4[r12]\n long r22 = r3.get()\n int r24 = (r22 > r16 ? 1 : (r22 == r16 ? 0 : -1))\n if (r24 == 0) goto L_0x00f1\n r20 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n int r24 = (r22 > r20 ? 1 : (r22 == r20 ? 0 : -1))\n r22 = r6\n r23 = r7\n if (r24 == 0) goto L_0x00eb\n long r6 = r3.c\n long r6 = r6 + r9\n r3.c = r6\n L_0x00eb:\n org.b.c<? super T> r3 = r3.f8109a\n r3.onNext(r0)\n goto L_0x00fb\n L_0x00f1:\n r22 = r6\n r23 = r7\n r20 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n r13 = 1\n L_0x00fb:\n int r12 = r12 + 1\n r6 = r22\n r7 = r23\n r3 = 1\n goto L_0x00cd\n L_0x0103:\n r22 = r6\n r23 = r7\n r20 = 9223372036854775807(0x7fffffffffffffff, double:NaN)\n int r8 = r8 + 1\n java.lang.Object r0 = r2.get()\n io.reactivex.internal.operators.flowable.cq$b[] r0 = (io.reactivex.internal.operators.flowable.cq.b[]) r0\n if (r13 != 0) goto L_0x0120\n if (r0 == r4) goto L_0x0119\n goto L_0x0120\n L_0x0119:\n r6 = r22\n r0 = r23\n r3 = 1\n goto L_0x0095\n L_0x0120:\n if (r8 == 0) goto L_0x0133\n int r3 = r1.i\n r4 = 1\n if (r3 == r4) goto L_0x0133\n java.util.concurrent.atomic.AtomicReference<org.b.d> r3 = r1.g\n java.lang.Object r3 = r3.get()\n org.b.d r3 = (org.b.d) r3\n long r6 = (long) r8\n r3.request(r6)\n L_0x0133:\n r4 = r0\n goto L_0x0165\n L_0x0135:\n r23 = r7\n r0 = r23\n L_0x0139:\n if (r8 == 0) goto L_0x014c\n int r3 = r1.i\n r6 = 1\n if (r3 == r6) goto L_0x014d\n java.util.concurrent.atomic.AtomicReference<org.b.d> r3 = r1.g\n java.lang.Object r3 = r3.get()\n org.b.d r3 = (org.b.d) r3\n r3.request(r11)\n goto L_0x014d\n L_0x014c:\n r6 = 1\n L_0x014d:\n r7 = 0\n int r3 = (r14 > r7 ? 1 : (r14 == r7 ? 0 : -1))\n if (r3 == 0) goto L_0x0157\n if (r0 == 0) goto L_0x0165\n goto L_0x0157\n L_0x0156:\n r6 = 1\n L_0x0157:\n int r0 = -r5\n int r5 = r1.addAndGet(r0)\n if (r5 == 0) goto L_0x0168\n java.lang.Object r0 = r2.get()\n r4 = r0\n io.reactivex.internal.operators.flowable.cq$b[] r4 = (io.reactivex.internal.operators.flowable.cq.b[]) r4\n L_0x0165:\n r3 = 1\n goto L_0x0014\n L_0x0168:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.reactivex.internal.operators.flowable.cq.c.a():void\");\n }", "static String recurse(int j,int p,int s,int steps)\r\n\t{\n\t\tif (steps==0)\r\n\t\t\treturn \"\";\r\n\t\tif (j==J)\r\n\t\t\treturn null;\r\n\t\tif ((J-j-1)*P*S+(P-p-1)*S+S-s<steps)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tint sn=s+1;\r\n\t\tint pn=p+(sn/S);\r\n\t\tint jn=j+(pn/P);\r\n\t\tpn%=P;\r\n\t\tsn%=S;\r\n\t\t\r\n\t\tString sol=recurse(jn,pn,sn,steps);\r\n\t\tif (sol!=null)\r\n\t\t\treturn sol;\r\n\t\t\r\n\t\tif (jp[j][p]<K && js[j][s]<K && ps[p][s]<K)\r\n\t\t{\r\n\t\t\tjp[j][p]++;\r\n\t\t\tjs[j][s]++;\r\n\t\t\tps[p][s]++;\r\n\t\t\tsol=recurse(jn,pn,sn,steps-1);\r\n\t\t\tif (sol!=null)\r\n\t\t\t\treturn \"\"+(j+1)+\" \"+(p+1)+\" \"+(s+1)+\"\\n\"+sol;\r\n\t\t\tjp[j][p]--;\r\n\t\t\tjs[j][s]--;\r\n\t\t\tps[p][s]--;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static long factorialUsingRecursion (int num){\n\n if(num < 0){\n throw new UnsupportedOperationException(Util.NEGATIVE_MESSAGE);\n }\n\n if(num == 0)\n return 1;\n\n return num*factorialUsingRecursion(num-1);\n\n }", "public static void main(String}] args) {\n Node root = new Node(7);\n root.left = new Node(3);\n root.right = new Node(15);\n \n root.left.left = new Node(1);\n root.left.right = new Node(4);\n \n root.right.left = new Node(9);\n root.right.right = new Node(20);\n\n System.out.println(root);\n \n coverToDoublyLL(root);\n \n \n }", "private void level6() {\n }", "boolean findCycleUtil(int i, boolean[] visited, boolean[] recStack, LinkedList<Integer>[] g) {\n if (recStack[i]) {\n return true;\n }\n if (visited[i]) {\n return false;\n }\n visited[i] = true;\n recStack[i] = true;\n for (int c : g[i]) {\n if (findCycleUtil(c, visited, recStack, g)) {\n return true;\n }\n }\n recStack[i] = false;\n return false;\n }", "public static String recursiveMethod(String str) {\n\t\tif (str.length() == 0) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn str.substring(str.length() - 1) + recursiveMethod(str.substring(0, str.length() - 1));\n\t}", "private void dfs(String s, int leftCount, int rightCount, int openCount, int index, StringBuilder sb, Set<String> res) {\n if (index == s.length()) {\n if (leftCount == 0 && rightCount == 0 && openCount == 0) res.add(sb.toString());\n return;\n }\n if (leftCount < 0 || rightCount < 0 || openCount < 0) return;\n int len = sb.length();\n if (s.charAt(index) == '(') {\n dfs(s, leftCount - 1, rightCount, openCount, index + 1, sb, res);\n dfs(s, leftCount, rightCount, openCount + 1, index + 1, sb.append('('), res);\n } else if (s.charAt(index) == ')') {\n dfs(s, leftCount, rightCount - 1, openCount, index + 1, sb, res);\n dfs(s, leftCount, rightCount, openCount - 1, index + 1, sb.append(')'), res);\n } else {\n dfs(s, leftCount, rightCount, openCount, index + 1, sb.append(s.charAt(index)), res);\n }\n sb.setLength(len);\n }", "private static void walkTree(Collection<String> children, Collection<String> list, TypeTree tree) {\n\t if (children != null) {\n\t\tlist.addAll(children);\n\t String[] kids = children.toArray(new String[children.size()]);\n\t\tfor (int i = 0; i< kids.length; i++) {\n\t\t walkTree(tree.classSet(kids[i]), list, tree);\n\t\t}\n\t }\n\t}", "io.dstore.values.BooleanValue getRecursive();", "private static void backtrackHelper(TreeNode current, int targetSum, List<TreeNode> path, List<List<Integer>> allPaths){\n if(current.left == null && current.right == null){\n if(targetSum == current.val){\n List<Integer> tempResultList = new ArrayList<>();\n // for(TreeNode node: path){\n // tempResultList.add(node.val);\n // }\n tempResultList.addAll(path.stream().mapToInt(o -> o.val).boxed().collect(Collectors.toList()));\n tempResultList.add(current.val);\n\n allPaths.add(tempResultList); // avoid reference puzzle\n }\n return;\n }\n\n // loop-recursion (Here only 2 choices, so we donot need loop)\n if(current.left != null){\n path.add(current);\n backtrackHelper(current.left, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n\n if(current.right != null){\n path.add(current);\n backtrackHelper(current.right, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n }", "private static void dfsBribe(int n, List<Integer>[] ch, long[] w) {\n if (ch[n].size() == 0){\n In[n] = w[n];\n OutD[n] = Long.MAX_VALUE;\n OutU[n] = 0;\n }\n //recurrance case: non.leaf, do dfs for all subordinates then calculate In, OutUp & OutDown.\n else{\n for (int c:ch[n])\n dfsBribe(c, ch, w); //running once for each child thereby O(N)\n In[n] = w[n];\n for (int c:ch[n]){ //O(N) running time\n In[n] += OutU[c];\n OutU[n] += Math.min(In[c], OutD[c]);\n OutD[n] += Math.min(In[c], OutD[c]);\n }\n OutD[n] += delta(n, ch); //add delta for no in Children\n }\n\n }", "private static int helper(TreeNode root, TreeNode p, TreeNode q, List<TreeNode> ans) {\n if (root == null)\n return 0;\n int sum = 0;\n if (root.val == p.val || root.val == q.val)\n ++sum;\n int leftSum = helper(root.left, p, q, ans);\n int rightSum = helper(root.right, p, q, ans);\n sum += leftSum + rightSum;\n if (sum == 2 && leftSum < 2 && rightSum < 2)\n ans.add(root);\n return sum;\n }", "public void k()\r\n/* 238: */ {\r\n/* 239:258 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 240:259 */ if (this.a[i] != null) {\r\n/* 241:260 */ this.a[i].a(this.d.o, this.d, i, this.c == i);\r\n/* 242: */ }\r\n/* 243: */ }\r\n/* 244: */ }", "public abstract List<Node> expand();", "public static void main(String[] args) {\n\n Node<Integer> node1 = new Node<>(1);\n Node<Integer> node2 = new Node<>(2);\n Node<Integer> node3 = new Node<>(3);\n Node<Integer> node4 = new Node<>(4);\n\n node1.setLeftChild(node2);\n node1.setRightChild(node3);\n\n node2.setLeftChild(node4);\n\n node3.setLeftChild(new Node<>(5));\n node3.setRightChild(new Node<>(6));\n\n node4.setLeftChild(new Node<>(7));\n node4.setRightChild(new Node<>(8));\n\n traverse(node1);\n }", "ArrayList< LinkedList< Node > > levellist(Node root)\n{\n\t//results contain all the linkedlists containing all the nodes on each level of the tree\n\tArrayList< LinkedList< Node > > results = new ArrayList< LinkedList< Node > > ();\n\t//basic condition for the following built-in calling of recursive\n\tlevellist(root, results, 0);\n\t//because results is used as a parameter in the recursive and then we all need to return the output\n\treturn results;\n}", "public Recusive_Methods(){\n int[][] array = {\n {1,2,3,4},\n {5,6,7,8},\n {9,10,11,12},\n {13,14,15,16},\n {17,18,19,20},\n };\n printer(array,0,0,array[0].length-1,array.length-1,0);\n\n StringReverse(\"this function writes the sentence in reverse\");\n StringReverse(\"selam alp emir bilek ben\");\n\n elfish(\"alpemir\",0,0,0);\n elfish(\"leaf\",0,0,0);\n elfish(\"waffles\",0,0,0);\n }", "private boolean helperDFS(Node current){\n\n if(expandedNode.size() == 999){\n //limit has been reached. jump out of recursion.\n expandedNode.add(current);\n System.out.println(\"No solution found.\");\n printExpanded(expandedNode);\n System.exit(0);\n return false;\n }\n\n boolean b = cycleCheck(current,expandedNode);\n\n if(!b){\n expandedNode.add(current);\n }else{\n return false;\n }\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal reached.\n //expandedNode.add(current);\n solutionPath(current);\n printExpanded(expandedNode);\n System.exit(0);\n }\n\n //Now make the children.\n\n if(!forbidden.contains(current.getDigit().getDigitString())){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 1){\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n }\n return false;\n }", "public void solution() {\n\t\t\n\t}", "@Override \n public boolean shouldTraverse(Traversal traversal, Exp e, Exp parent) {\n return true; \n }", "public static void buildStage2 ()\r\n {\r\n \r\n lgt.findParent(); //4\r\n lgt.findChild(0); //6\r\n lgt.insert(12);\r\n lgt.findParent();\r\n lgt.insert(13);\r\n lgt.findParent();\r\n lgt.insert(14);\r\n \r\n lgt.findRoot();\r\n lgt.findChild(0);//2\r\n lgt.findChild(0);//5\r\n lgt.insert(8);\r\n lgt.findParent();\r\n lgt.insert(9);\r\n lgt.findParent();\r\n lgt.insert(10);\r\n lgt.findParent();\r\n lgt.insert(11);\r\n \r\n }", "private List<TreeNode> helper(int m, int n) {\n\t\t//System.out.println(\"== \" + m + \" \" + n + \"== \");\n\t\tList<TreeNode> result = new ArrayList<TreeNode>();\n\t\tif (m > n) {\n\t\t\t/* MUST add null \n\t\t\t * Cannot do nothing because foreach loop cannot find it if nothing inside \n\t\t\t */\n\t\t\tresult.add(null);\n\t\t} else if (m == n) {\n\t\t\tTreeNode node = new TreeNode(m);\n\t\t\tresult.add(node);\n\t\t} else {\n\t\t\tfor (int i = m; i <= n; i++) {\n\t\t\t\t//System.out.println(\"m, n, i : \" + m + \" \" + n + \" - \" + i);\n\t\t\t\tList<TreeNode> ls = helper(m, i - 1);\n\t\t\t\tList<TreeNode> rs = helper(i + 1, n);\n\t\t\t\t\n\t\t\t\tfor(TreeNode l: ls){\n\t\t\t\t\tfor(TreeNode r: rs){\n\t\t\t\t\t\tTreeNode node = new TreeNode(i);\n\t\t\t\t\t\tnode.left =l;\n\t\t\t\t\t\tnode.right=r;\n\t\t\t\t\t\tresult.add(node);\n\t\t\t\t\t\t//System.out.println(\">>>>>>>\");\n\t\t\t\t\t\t//node.printBFS();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "@Test\n void solvesTestCase() {\n TreeNode root = new TreeNode(3);\n root.left = new TreeNode(9);\n root.right = new TreeNode(20);\n root.right.left = new TreeNode(15);\n root.right.right = new TreeNode(7);\n\n List<List<Integer>> traversal = new ZigZagLevelOrder().zigzagLevelOrder(root);\n assertThat(traversal.size()).isEqualTo(3);\n assertThat(traversal.get(0)).containsExactly(3);\n assertThat(traversal.get(1)).containsExactly(20, 9);\n assertThat(traversal.get(2)).containsExactly(15, 7);\n }", "public int recursive(int n) {\r\n //base case: return n if <= 1\r\n if (n <= 1) {\r\n return n;\r\n }\r\n //else return result of of two previous #s being added to each other\r\n return recursive(n - 1) + recursive(n - 2);\r\n }", "private static int fab_recursive_2(int kth) {\n\n\t\tif (kth == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\tif (kth == 1) {\n\t\t\treturn fab_recursive_2(kth - 1) + 1;\n\t\t}\n\t\treturn fab_recursive_2(kth-1) + fab_recursive_2(kth-2);\n\t}", "@Override\r\n\tpublic Node visitSequential(SequentialContext ctx) {\n\t\treturn super.visitSequential(ctx);\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.out.println(traverse(0,0,5,5));\r\n\t}", "public List<Long> depthTraverse(){\n return depthTraverseGen(null);\n }", "public static void main(String[] args) {\n Util_BinTreeNode<Integer> root = new Util_BinTreeNode<>();\n root.add(8);\n root.add(4); root.add(16);\n root.add(2); root.add(6); root.add(11); root.add(20);\n /*\n Caution. Adding the bellow nodes, causes the java.lang.OutOfMemoryError: GC overhead limit exceeded\n root.add(1); root.add(3); root.add(5); root.add(7);\n root.add(10); root.add(12); root.add(19); root.add(21);\n */\n System.out.println(java.time.LocalTime.now());\n ArrayList<LinkedList<Integer>> aofl = allSequences(root);\n System.out.println(java.time.LocalTime.now());\n\n for (LinkedList<Integer> list : aofl) {\n for (Integer i : list) {\n System.out.print(i + \",\");\n }\n System.out.println(\" \");\n }\n }", "protected int sumRecursive(int a, int b){\n if (b == 0){\n return a;\n } else {\n if (b > 0){\n return sumRecursive(a + 1, b - 1);\n } else {\n return sumRecursive(a - 1, b + 1);\n }\n }\n }", "protected int algo() {\r\n result = algo(root, -2000000000, 2000000000);\r\n\r\n // Nach Terminierung des Algorithmus\r\n lang.nextStep();\r\n setExplain(200, result, 0);\r\n colorNode(root, seenNodeColor);\r\n code.unhighlight(14);\r\n return result;\r\n }", "@Test\r\n\tpublic void test02_fib() {\r\n\t\tRecursiveMethods rm = new RecursiveMethods();\r\n\t\tassertEquals(1, +rm.fib(1));\r\n\t\tassertEquals(1, +rm.fib(2));\r\n\t\tassertEquals(2, +rm.fib(3));\r\n\t\tassertEquals(3, +rm.fib(4));\r\n\t\tassertEquals(5, +rm.fib(5));\r\n\t\tassertEquals(8, +rm.fib(6));\r\n\t}", "protected java.util.List x (java.lang.String r19){\n /*\n r18 = this;\n r0 = r18;\n r2 = r0.K;\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\n r2 = (java.util.List) r2;\n if (r2 == 0) goto L_0x000f;\n L_0x000e:\n return r2;\n L_0x000f:\n r12 = java.util.Collections.emptyList();\n r2 = r18.bp();\n r3 = r18.TaskHandler(r19);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r4 = r2.setDrawable(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n if (r4 != 0) goto L_0x0026;\n L_0x0021:\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0026:\n r13 = r2.getScaledMaximumFlingVelocity(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r14 = new java.io.ByteArrayOutputStream;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r2 = 2048; // 0x800 float:2.87E-42 double:1.0118E-320;\n r14.<creatCallTask>(r2);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13, r14);\t Catch:{ all -> 0x00f2 }\n r2 = r14.toByteArray();\t Catch:{ all -> 0x00f2 }\n r2 = com.duokan.kernel.DkUtils.decodeSimpleDrm(r2);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r4 = \"UTF-8\";\n r3.<creatCallTask>(r2, r4);\t Catch:{ all -> 0x00f2 }\n r2 = new org.json.JSONObject;\t Catch:{ all -> 0x00f2 }\n r2.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n if (r2 != 0) goto L_0x0055;\n L_0x004a:\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0055:\n r3 = \"pictures\";\n r15 = com.duokan.reader.common.getPhysicalYPixels.setDrawable(r2, r3);\t Catch:{ all -> 0x00f2 }\n r16 = new java.util.ArrayList;\t Catch:{ all -> 0x00f2 }\n r2 = r15.length();\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.<creatCallTask>(r2);\t Catch:{ all -> 0x00f2 }\n r2 = 0;\n L_0x0067:\n r3 = r15.length();\t Catch:{ all -> 0x00f2 }\n if (r2 >= r3) goto L_0x00d0;\n L_0x006d:\n r3 = r15.getJSONObject(r2);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_md5\";\n r7 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_url\";\n r6 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_size\";\n r8 = r3.getLong(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"width\";\n r10 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"height\";\n r11 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r4 = \".\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r2);\t Catch:{ all -> 0x00f2 }\n r4 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r17 = \"file:///stuffs/\";\n r0 = r17;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r7);\t Catch:{ all -> 0x00f2 }\n r3 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n r3 = r18;\n r3 = r3.setDrawable(r4, r5, r6, r7, r8, r10, r11);\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.add(r3);\t Catch:{ all -> 0x00f2 }\n r2 = r2 + 1;\n goto L_0x0067;\n L_0x00d0:\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r1 = r16;\n r2.putIfAbsent(r0, r1);\t Catch:{ all -> 0x00f2 }\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\t Catch:{ all -> 0x00f2 }\n r2 = (java.util.List) r2;\t Catch:{ all -> 0x00f2 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n r18.bq();\n goto L_0x000e;\n L_0x00f2:\n r2 = move-exception;\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n throw r2;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n L_0x00fa:\n r2 = move-exception;\n r2 = r12;\n L_0x00fc:\n r18.bq();\n goto L_0x000e;\n L_0x0101:\n r2 = move-exception;\n r18.bq();\n throw r2;\n L_0x0106:\n r3 = move-exception;\n goto L_0x00fc;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.domain.bookshelf.jv.MyContextWrapper(java.lang.String):java.util.List\");\n }", "private int dfsInOrderIterativeSol(TreeNode root, int k) {\n // Corner Case\n if (root == null) {\n return 0;\n }\n\n Stack<TreeNode> stack = new Stack<>();\n TreeNode node = root;\n int countNum = 0;\n\n while (!stack.isEmpty() || node != null) {\n if (node != null) {\n stack.push(node); // just like the recursion\n node = node.left;\n } else {\n TreeNode curNode = stack.pop();\n countNum++;\n if (countNum == k) {\n return curNode.val;\n }\n node = curNode.right;\n }\n }\n return 0;\n\n // // push nodes till the left end\n // while (root != null) {\n // stack.push(root);\n // root = root.left;\n // }\n\n // while (k != 0) {\n // TreeNode curNode = stack.pop();\n // k -= 1;\n // if (k == 0) {\n // return curNode.val;\n // }\n\n // TreeNode rightNode = curNode.right;\n // // push the right node till the left end still!!!\n // while(rightNode != null) {\n // stack.push(rightNode);\n // rightNode = rightNode.left;\n // }\n // }\n\n // return 0; // never hit if k is valid and root is not null\n }", "private void f(java.lang.String r8) {\n /*\n r7 = this;\n r6 = 1;\n r2 = F;\n r7.y = r8;\n r0 = r7.m;\n r0 = r0.entrySet();\n r3 = r0.iterator();\n L_0x000f:\n r0 = r3.hasNext();\n if (r0 == 0) goto L_0x004a;\n L_0x0015:\n r0 = r3.next();\n r0 = (java.util.Map.Entry) r0;\n r1 = r0.getValue();\n r1 = (java.util.List) r1;\n r4 = r1.size();\t Catch:{ RuntimeException -> 0x0077 }\n if (r4 != r6) goto L_0x0043;\n L_0x0027:\n r4 = J;\t Catch:{ RuntimeException -> 0x0079 }\n r5 = 28;\n r4 = r4[r5];\t Catch:{ RuntimeException -> 0x0079 }\n r5 = 0;\n r5 = r1.get(r5);\t Catch:{ RuntimeException -> 0x0079 }\n r4 = r4.equals(r5);\t Catch:{ RuntimeException -> 0x0079 }\n if (r4 == 0) goto L_0x0043;\n L_0x0038:\n r4 = r7.e;\t Catch:{ RuntimeException -> 0x007b }\n r0 = r0.getKey();\t Catch:{ RuntimeException -> 0x007b }\n r4.add(r0);\t Catch:{ RuntimeException -> 0x007b }\n if (r2 == 0) goto L_0x0048;\n L_0x0043:\n r0 = r7.x;\t Catch:{ RuntimeException -> 0x007b }\n r0.addAll(r1);\t Catch:{ RuntimeException -> 0x007b }\n L_0x0048:\n if (r2 == 0) goto L_0x000f;\n L_0x004a:\n r0 = r7.x;\t Catch:{ RuntimeException -> 0x007d }\n r1 = J;\t Catch:{ RuntimeException -> 0x007d }\n r2 = 29;\n r1 = r1[r2];\t Catch:{ RuntimeException -> 0x007d }\n r0 = r0.remove(r1);\t Catch:{ RuntimeException -> 0x007d }\n if (r0 == 0) goto L_0x0065;\n L_0x0058:\n r0 = B;\t Catch:{ RuntimeException -> 0x007d }\n r1 = java.util.logging.Level.WARNING;\t Catch:{ RuntimeException -> 0x007d }\n r2 = J;\t Catch:{ RuntimeException -> 0x007d }\n r3 = 30;\n r2 = r2[r3];\t Catch:{ RuntimeException -> 0x007d }\n r0.log(r1, r2);\t Catch:{ RuntimeException -> 0x007d }\n L_0x0065:\n r1 = r7.G;\n r0 = r7.m;\n r2 = java.lang.Integer.valueOf(r6);\n r0 = r0.get(r2);\n r0 = (java.util.Collection) r0;\n r1.addAll(r0);\n return;\n L_0x0077:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x0079 }\n L_0x0079:\n r0 = move-exception;\n throw r0;\t Catch:{ RuntimeException -> 0x007b }\n L_0x007b:\n r0 = move-exception;\n throw r0;\n L_0x007d:\n r0 = move-exception;\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.e2.f(java.lang.String):void\");\n }", "public static void main(String[] args) throws Exception {\n\t\t// 1.1 Context & examples - rule, recursion difference, O(h)\n\t\t// 1.2 ctor, find, max, min\n\t\t// 1.3 printrange, replaceWithSumOfLarger\n\t\t// 1.4 pairTargetSum (BT vs BST)\n\t\t// 1.4.1 fill arraylist via heapmover, sort (?), and do left right\n\t\t// 1.4.2 fill hashmap via heapmover, and find complements\n\t\t// 1.4.3 traverse and call find on complement from every spot\n\t\t// 1.5 lca (BT vs BST) - place where paths diverge\n\t\t// 1.5.1 rootToNodePaths\n\t\t// Last common element in the two rootToNode arraylists.\n\t\t// 1.5.2 startTime & endtime list -> heapMover [list of pair of\n\t\t// starttime and endtimes]\n\t\t// What? -> Last node with startime smaller than both and endtime larger\n\t\t// than both\n\t\t// How? -> traverse the list of pairs and find last such node\n\t\t// Why? -> Last node ensures the lowest in ancestry\n\t\t// 1.5.3 bst -> first node while going down with value between d1 and d2\n\t\t// 1.6 addNode, removeNode\n\t\t// 1.7 AVL\n\t\t// 1.7.1 Balanced -> O(h) to O(logn)\n\t\t// 1.7.2 Node - height, add & remove\n\t\t// 1.7.3 right rotation, left rotation\n\t\t// 1.7.4 left left, left right, right right, right left\n\n\t\tsolve();\n\t}", "public int a(int r12, androidx.recyclerview.widget.RecyclerView.u r13) {\n /*\n r11 = this;\n e.m.a.g r0 = r11.A\n int r0 = r0.a()\n r1 = 0\n if (r0 != 0) goto L_0x000a\n return r1\n L_0x000a:\n e.m.a.b r0 = e.m.a.b.c(r12)\n int r2 = r11.f8992j\n r3 = 1\n if (r2 == 0) goto L_0x0019\n int r2 = java.lang.Math.abs(r2)\n goto L_0x0088\n L_0x0019:\n int r2 = r11.f8991i\n int r2 = r0.a(r2)\n if (r2 <= 0) goto L_0x0023\n r2 = r3\n goto L_0x0024\n L_0x0023:\n r2 = r1\n L_0x0024:\n e.m.a.b r4 = e.m.a.b.START\n if (r0 != r4) goto L_0x003d\n int r4 = r11.k\n if (r4 != 0) goto L_0x003d\n int r2 = r11.f8991i\n if (r2 != 0) goto L_0x0032\n r2 = r3\n goto L_0x0033\n L_0x0032:\n r2 = r1\n L_0x0033:\n if (r2 == 0) goto L_0x0036\n goto L_0x0055\n L_0x0036:\n int r4 = r11.f8991i\n int r4 = java.lang.Math.abs(r4)\n goto L_0x0075\n L_0x003d:\n e.m.a.b r4 = e.m.a.b.END\n if (r0 != r4) goto L_0x005e\n int r4 = r11.k\n e.m.a.g r5 = r11.A\n int r5 = r5.c()\n int r5 = r5 - r3\n if (r4 != r5) goto L_0x005e\n int r2 = r11.f8991i\n if (r2 != 0) goto L_0x0052\n r2 = r3\n goto L_0x0053\n L_0x0052:\n r2 = r1\n L_0x0053:\n if (r2 == 0) goto L_0x0057\n L_0x0055:\n r4 = r1\n goto L_0x0075\n L_0x0057:\n int r4 = r11.f8991i\n int r4 = java.lang.Math.abs(r4)\n goto L_0x0075\n L_0x005e:\n if (r2 == 0) goto L_0x006a\n int r2 = r11.f8989g\n int r4 = r11.f8991i\n int r4 = java.lang.Math.abs(r4)\n int r2 = r2 - r4\n goto L_0x0073\n L_0x006a:\n int r2 = r11.f8989g\n int r4 = r11.f8991i\n int r4 = java.lang.Math.abs(r4)\n int r2 = r2 + r4\n L_0x0073:\n r4 = r2\n r2 = r1\n L_0x0075:\n e.m.a.c$c r5 = r11.y\n com.yarolegovich.discretescrollview.DiscreteScrollView$d r5 = (com.yarolegovich.discretescrollview.DiscreteScrollView.d) r5\n com.yarolegovich.discretescrollview.DiscreteScrollView r5 = com.yarolegovich.discretescrollview.DiscreteScrollView.this\n boolean r6 = r5.f3982d\n if (r6 == 0) goto L_0x0087\n if (r2 == 0) goto L_0x0083\n r2 = r1\n goto L_0x0084\n L_0x0083:\n r2 = 2\n L_0x0084:\n r5.setOverScrollMode(r2)\n L_0x0087:\n r2 = r4\n L_0x0088:\n if (r2 > 0) goto L_0x008b\n return r1\n L_0x008b:\n int r12 = java.lang.Math.abs(r12)\n int r12 = java.lang.Math.min(r2, r12)\n int r12 = r0.a(r12)\n int r0 = r11.f8991i\n int r0 = r0 + r12\n r11.f8991i = r0\n int r0 = r11.f8992j\n if (r0 == 0) goto L_0x00a3\n int r0 = r0 - r12\n r11.f8992j = r0\n L_0x00a3:\n e.m.a.a$c r0 = r11.n\n int r1 = -r12\n e.m.a.g r2 = r11.A\n r0.a(r1, r2)\n e.m.a.a$c r0 = r11.n\n boolean r0 = r0.a(r11)\n if (r0 == 0) goto L_0x00b6\n r11.a(r13)\n L_0x00b6:\n int r13 = r11.l\n r0 = -1\n if (r13 == r0) goto L_0x00c5\n int r13 = r11.f8991i\n int r1 = r11.f8992j\n int r13 = r13 + r1\n int r13 = java.lang.Math.abs(r13)\n goto L_0x00c7\n L_0x00c5:\n int r13 = r11.f8989g\n L_0x00c7:\n float r13 = (float) r13\n r1 = -1082130432(0xffffffffbf800000, float:-1.0)\n int r2 = r11.f8991i\n float r2 = (float) r2\n float r2 = r2 / r13\n float r13 = java.lang.Math.max(r1, r2)\n r1 = 1065353216(0x3f800000, float:1.0)\n float r13 = java.lang.Math.min(r13, r1)\n float r13 = -r13\n e.m.a.c$c r1 = r11.y\n com.yarolegovich.discretescrollview.DiscreteScrollView$d r1 = (com.yarolegovich.discretescrollview.DiscreteScrollView.d) r1\n com.yarolegovich.discretescrollview.DiscreteScrollView r2 = com.yarolegovich.discretescrollview.DiscreteScrollView.this\n java.util.List<com.yarolegovich.discretescrollview.DiscreteScrollView$c> r2 = r2.f3980b\n boolean r2 = r2.isEmpty()\n if (r2 == 0) goto L_0x00e8\n goto L_0x0133\n L_0x00e8:\n com.yarolegovich.discretescrollview.DiscreteScrollView r2 = com.yarolegovich.discretescrollview.DiscreteScrollView.this\n int r2 = r2.getCurrentItem()\n com.yarolegovich.discretescrollview.DiscreteScrollView r4 = com.yarolegovich.discretescrollview.DiscreteScrollView.this\n e.m.a.c r4 = r4.f3979a\n int r5 = r4.f8991i\n if (r5 != 0) goto L_0x00f9\n int r0 = r4.k\n goto L_0x010a\n L_0x00f9:\n int r6 = r4.l\n if (r6 == r0) goto L_0x00ff\n r0 = r6\n goto L_0x010a\n L_0x00ff:\n int r0 = r4.k\n e.m.a.b r4 = e.m.a.b.c(r5)\n int r3 = r4.a(r3)\n int r0 = r0 + r3\n L_0x010a:\n if (r2 == r0) goto L_0x0133\n com.yarolegovich.discretescrollview.DiscreteScrollView r3 = com.yarolegovich.discretescrollview.DiscreteScrollView.this\n androidx.recyclerview.widget.RecyclerView$d0 r10 = r3.a(r2)\n com.yarolegovich.discretescrollview.DiscreteScrollView r1 = com.yarolegovich.discretescrollview.DiscreteScrollView.this\n androidx.recyclerview.widget.RecyclerView$d0 r1 = r1.a(r0)\n java.util.List<com.yarolegovich.discretescrollview.DiscreteScrollView$c> r3 = r3.f3980b\n java.util.Iterator r3 = r3.iterator()\n L_0x011e:\n boolean r4 = r3.hasNext()\n if (r4 == 0) goto L_0x0133\n java.lang.Object r4 = r3.next()\n com.yarolegovich.discretescrollview.DiscreteScrollView$c r4 = (com.yarolegovich.discretescrollview.DiscreteScrollView.c) r4\n r5 = r13\n r6 = r2\n r7 = r0\n r8 = r10\n r9 = r1\n r4.a(r5, r6, r7, r8, r9)\n goto L_0x011e\n L_0x0133:\n r11.a()\n return r12\n */\n throw new UnsupportedOperationException(\"Method not decompiled: e.m.a.c.a(int, androidx.recyclerview.widget.RecyclerView$u):int\");\n }", "public static void main(String[] args)\n throws Exception\n {\n PrintWriter pen = new PrintWriter(System.out, true);\n BST<String, String> dict =\n new BST<String, String>((left, right) -> left.compareTo(right));\n\n String[] values =\n new String[] { \"gorilla\", \"dingo\", \"chimp\", \"emu\", \"elephant\", \"beta\",\n \"aardvark\", \"chinchilla\", \"yeti\", \"gibbon\", \"horse\",\n \"elephant\", \"duck\", \"emu\" };\n String[] moreValues =\n new String[] { \"gnu\", \"dingo\", \"flying squirrel\", \"iguana\", \"squirrel\",\n \"red squirrel\", \"moose\" };\n\n // Add each element and make sure that it's there.\n for (String value : values)\n {\n addString(pen, dict, value);\n } // for\n\n // A quick printout for fun\n pen.println(\"After setting the first set of values\");\n iterate(pen, dict.iterator());\n\n // Another quick printout for fun\n for (String value : values)\n {\n addString(pen, dict, value);\n } // for\n pen.println(\"After setting the second set of values\");\n iterate(pen, dict.iterator());\n\n // Build iterators that traverse in different ways\n Iterable<String> df_pre_lr =\n dict.values(Traversal.DEPTH_FIRST_PREORDER_LEFT_TO_RIGHT);\n Iterable<String> df_in_lr =\n dict.values(Traversal.DEPTH_FIRST_INORDER_LEFT_TO_RIGHT);\n Iterable<String> df_in_rl =\n dict.values(Traversal.DEPTH_FIRST_INORDER_RIGHT_TO_LEFT);\n Iterable<String> bf_pre_rl =\n dict.values(Traversal.BREADTH_FIRST_PREORDER_RIGHT_TO_LEFT);\n\n // Iterate!\n pen.println(\"Iterating depth-first, preorder, left-to-right\");\n pen.print(\" \");\n iterate(pen, df_pre_lr);\n \n pen.println(\"Iterating depth-first, inorder, left-to-right\");\n pen.print(\" \");\n iterate(pen, df_in_lr);\n \n pen.println(\"Iterating depth-first, inorder, right-to-left\");\n pen.print(\" \");\n iterate(pen, df_in_rl);\n \n pen.println(\"Iterating breadth-first, preorder, right-to-left\");\n pen.print(\" \");\n iterate(pen, bf_pre_rl);\n\n // And we're done\n pen.close();\n }", "private TraverseData traverseOneLevel(TraverseData data) {\n Node<T> currentNode = data.currentNode;\n Node<T> currentNewNode = data.currentNewNode;\n int nextBranch = data.index / data.base;\n\n currentNewNode.set(nextBranch, new Node<>(branchingFactor));\n for (int anotherBranch = 0; anotherBranch < branchingFactor; anotherBranch++) {\n if (anotherBranch == nextBranch) {\n continue;\n }\n currentNewNode.set(anotherBranch, currentNode.get(anotherBranch));\n }\n\n //down\n currentNode = currentNode.get(nextBranch);\n currentNewNode = currentNewNode.get(nextBranch);\n return new TraverseData(currentNode, currentNewNode, data.newRoot, data.index % data.base,\n data.base);\n }", "private int percolateUpLeaf(){\n\t\treturn percolateUp(heap.size()-1);// TODO: A one-line function that calls percolateUp()\n\t}", "public static void main(String[] args) {\n\t\tNode n=new Node(1,null,null,null);\n\t\tNode n2=new Node(2,n,null,null);\n\t\tNode n3=new Node(3,n2,null,null);\n\t\tNode n4=new Node(4,n3,null,null);\n\t\tNode n5=new Node(5,n4,null,null);\n\t\t\n\t\tNode n6=new Node(7,null,null,null);\n\t\tNode n7=new Node(8,null,null,null);\n\t\tNode n8=new Node(9,null,null,null);\n\t\t\n\t\tNode n9=new Node(11,null,null,null);\n\t\tNode n10=new Node(12,null,null,null);\n\t\t\n\t\tn.next=n2;\n\t\tn2.next=n3;\n\t\tn2.prev=n;\n\t\tn3.next=n4;\n\t\tn3.prev=n2;\n\t\tn3.child=n6;\n\t\tn4.next=n5;\n\t\tn4.prev=n3;\n\t\tn5.prev=n4;\n\t\t\n\t\tn6.next=n7;\n\t\tn7.prev=n6;\n\t\tn7.next=n8;\n\t\tn7.child=n9;\n\t\tn8.prev=n7;\n\t\t\n\t\tn9.next=n10;\n\t\tn10.prev=n9;\n\t\t\n\t\tNode h=flatten(n);\n\t}", "int expand();", "@Override\n\tpublic Set<NFAState> eClosure(NFAState s) {\n\t\tSet<NFAState> visited = new TreeSet<NFAState>();\n\t\t//invoke recursive helper\n\t\tvisited = eClosureHelper(s, visited);\n\t\t\n\t\treturn visited;\n\t}", "private boolean dfs(int n, int[] P) { // 0 is empty, 1 is false, 2 is true\n if (P[n] != 0) {\n if (P[n] == 1) {\n return false;\n }\n else {\n return true;\n }\n }\n\n if (n == 1) {\n P[1] = 2;\n //return true;\n }\n else if (n == 2) {\n P[2] = 2;\n //return true;\n }\n else if (n == 3) {\n P[3] = 1;\n //return false;\n }\n else {\n boolean res = dfs(n-2, P) && dfs(n-3, P) || dfs(n-3, P) && dfs(n-4, P);\n P[n] = res ? 2 : 1;\n }\n\n return P[n] == 2;\n\n //P[n] = P[n-2] + P[n-3] == 4 || P[n-3] + P[n-4] == 4 ? 2 : 1;\n //boolean res = dfs(n-2, P) && dfs(n-3, P) || dfs(n-3, P) && dfs(n-4, P);\n //P[n] = res ? 2 : 1;\n //return res;\n }", "abstract void walk();", "@Test\r\n\tpublic void test05_occurrencesOf() {\r\n\t\tRecursiveMethods rm = new RecursiveMethods();\r\n\r\n\t\tassertEquals(0, rm.occurrencesOf(\"\", 'a'));\r\n\t\tassertEquals(1, rm.occurrencesOf(\"a\", 'a'));\r\n\t\tassertEquals(0, rm.occurrencesOf(\"b\", 'a'));\r\n\t\tassertEquals(3, rm.occurrencesOf(\"baaba\", 'a'));\r\n\t\tassertEquals(2, rm.occurrencesOf(\"baaba\", 'b'));\r\n\t\tassertEquals(0, rm.occurrencesOf(\"baaba\", 'c'));\r\n\t}", "private final void asx() {\n /*\n r12 = this;\n r0 = r12.cFE;\n if (r0 == 0) goto L_0x0073;\n L_0x0004:\n r1 = r12.cxs;\n if (r1 == 0) goto L_0x0073;\n L_0x0008:\n r1 = r12.ayL;\n if (r1 != 0) goto L_0x000d;\n L_0x000c:\n goto L_0x0073;\n L_0x000d:\n r2 = 0;\n if (r1 == 0) goto L_0x0027;\n L_0x0010:\n r1 = r1.Km();\n if (r1 == 0) goto L_0x0027;\n L_0x0016:\n r1 = r1.aar();\n if (r1 == 0) goto L_0x0027;\n L_0x001c:\n r3 = r0.getName();\n r1 = r1.get(r3);\n r1 = (java.util.ArrayList) r1;\n goto L_0x0028;\n L_0x0027:\n r1 = r2;\n L_0x0028:\n if (r1 == 0) goto L_0x0051;\n L_0x002a:\n r1 = (java.lang.Iterable) r1;\n r1 = kotlin.collections.u.Z(r1);\n if (r1 == 0) goto L_0x0051;\n L_0x0032:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$1;\n r3.<init>(r12);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.b(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x003f:\n r3 = new com.iqoption.deposit.light.perform.DepositPerformLightFragment$setPresets$items$2;\n r3.<init>(r0);\n r3 = (kotlin.jvm.a.b) r3;\n r1 = kotlin.sequences.n.f(r1, r3);\n if (r1 == 0) goto L_0x0051;\n L_0x004c:\n r1 = kotlin.sequences.n.f(r1);\n goto L_0x0052;\n L_0x0051:\n r1 = r2;\n L_0x0052:\n r3 = r12.asr();\n if (r1 == 0) goto L_0x0059;\n L_0x0058:\n goto L_0x005d;\n L_0x0059:\n r1 = kotlin.collections.m.emptyList();\n L_0x005d:\n r4 = r12.bub;\n if (r4 == 0) goto L_0x006d;\n L_0x0061:\n r5 = 0;\n r6 = 0;\n r7 = 1;\n r8 = 0;\n r9 = 0;\n r10 = 19;\n r11 = 0;\n r2 = com.iqoption.core.util.e.a(r4, r5, r6, r7, r8, r9, r10, r11);\n L_0x006d:\n r3.c(r1, r2);\n r12.d(r0);\n L_0x0073:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.deposit.light.perform.c.asx():void\");\n }", "public void levelOrderTraversalBruteForce(){\n System.out.println(\"levelOrderTraversalBruteForce\");\n\n for(int level = 1; level <=height(); level++){\n printLevel(level);\n }\n System.out.println();\n }", "int solve(int p, int current) {\n int id = getId(p, current);\n if (p >= 0 && memo.containsKey(id)) {\n return memo.get(id);\n }\n List<Integer> adjList = adj.get(current);\n int n = adjList.size();\n if (n == 0) {\n throw new RuntimeException();\n }\n if ((n == 2 && p >= 0) || (n == 1 && p < 0)) {\n // should cut the nodes under current\n int ans = getDepth(p, current) - 1;\n // System.out.println(\"ans(\" + p + \",\" + current + \")=\" + ans);\n memo.put(id, ans);\n return ans;\n }\n if (n == 1) {\n // System.out.println(\"ans(\" + p + \",\" + current + \")=nochild\");\n return 0;\n }\n int ans = Integer.MAX_VALUE;\n\n for (int i = 0; i < n; i++) {\n int a = adjList.get(i);\n if (a == p) {\n continue;\n }\n for (int j = i + 1; j < n; j++) {\n int b = adjList.get(j);\n if (b == p) {\n continue;\n }\n // try a & b combo\n int tmp = solve(current, a);\n tmp += solve(current, b);\n for (int k = 0; k < n; k++) {\n int c = adjList.get(k);\n if (c != a && c != b && c != p) {\n tmp += getDepth(current, c);\n }\n }\n ans = Math.min(ans, tmp);\n }\n }\n memo.put(id, ans);\n // System.out.println(\"ans(\" + p + \",\" + current + \")=\" + ans);\n return ans;\n }", "public static Expression VisitChildren(ExpressionVisitor visitor) { throw Extensions.todo(); }", "private void enumerateAnagramsUnderBagEHelper(String targetDoNotChange,\n\t\t\tString whatsLeft, HashMap<String, Integer> parent,\n\t\t\tSet<Map<String, Integer>> ret, int runningTotal) {\n\t\tif (whatsLeft.length() == 0\n\t\t\t\t&& runningTotal == targetDoNotChange.length()) {\n\t\t\tret.add(parent);\n\t\t\treturn;\n\t\t} else {\n\t\t\tSet<String> toIter = generateSubwords(whatsLeft);\n\t\t\tfor (String subWord : toIter) {\n\t\t\t\t// Do some pruning\n\t\t\t\tif (runningTotal + subWord.length() <= targetDoNotChange\n\t\t\t\t\t\t.length()) {\n\t\t\t\t\tString moveMadeWhatsLeft = null;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmoveMadeWhatsLeft = cutOutSubWord(whatsLeft, subWord);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t\tHashMap<String, Integer> mapCopy = new HashMap<String, Integer>();\n\t\t\t\t\tfor (String s : parent.keySet()) {\n\t\t\t\t\t\tmapCopy.put(s, parent.get(s));\n\t\t\t\t\t}\n\t\t\t\t\t// Make move\n\t\t\t\t\tif (mapCopy.containsKey(subWord)) {\n\t\t\t\t\t\tmapCopy.put(subWord,\n\t\t\t\t\t\t\t\tmapCopy.get(subWord).intValue() + 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmapCopy.put(subWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\tenumerateAnagramsUnderBagEHelper(targetDoNotChange,\n\t\t\t\t\t\t\tmoveMadeWhatsLeft, mapCopy, ret, runningTotal\n\t\t\t\t\t\t\t\t\t+ subWord.length());\n\n\t\t\t\t} else {\n\t\t\t\t\t// Do nothing.. too long PRUNING\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private int helper(List<List<Integer>> res, TreeNode root) {\n if (root == null) return -1;\n int left = helper(res, root.left);\n int right = helper(res, root.right);\n int curr = Math.max(left, right) + 1;\n if (res.size() == curr) res.add(new ArrayList<>());\n res.get(curr).add(root.val);\n return curr;\n }", "static int recursion(int steps, int arrLen, int index, int[][] dp) {\n\n if (steps == 0 && index == 0) {\n return 1;\n }\n\n // extra base condition is index> steps , because we cannot return from there at all.\n if (steps == 0 || index < 0 || index >= arrLen || index > steps) return 0;\n\n if (dp[steps][index] != -1) return dp[steps][index];\n\n int ans = 0;\n\n // we can go either left , right or stay there itself.\n ans = (ans + recursion(steps - 1, arrLen, index, dp)) % MOD;\n ans = (ans + recursion(steps - 1, arrLen, index + 1, dp)) % MOD;\n ans = (ans + recursion(steps - 1, arrLen, index - 1, dp)) % MOD;\n dp[steps][index] = ans % MOD;\n return dp[steps][index];\n }", "@Contract(pure = true)\n @Nullable\n private static TreeElement[] childCallTreeElements(@NotNull Modular modular, Call[] childCalls) {\n TreeElement[] treeElements = null;\n\n if (childCalls != null) {\n Queue<Call> childCallQueue = new ArrayDeque<>(Arrays.asList(childCalls));\n int length = childCalls.length;\n final List<TreeElement> treeElementList = new ArrayList<TreeElement>(length);\n FunctionByNameArity functionByNameArity = new FunctionByNameArity(length, treeElementList, modular);\n MacroByNameArity macroByNameArity = new MacroByNameArity(length, treeElementList, modular);\n Set<Overridable> overridableSet = new HashSet<Overridable>();\n Set<org.elixir_lang.structure_view.element.Use> useSet = new HashSet<org.elixir_lang.structure_view.element.Use>();\n\n while (!childCallQueue.isEmpty()) {\n Call childCall = childCallQueue.remove();\n\n if (childCall instanceof Or) {\n childCallQueue.addAll(orChildCallList((Or) childCall));\n } else if (Callback.is(childCall)) {\n treeElementList.add(new Callback(modular, childCall));\n } else if (Delegation.is(childCall)) {\n functionByNameArity.addDelegationToTreeElementList(childCall);\n } else if (Exception.is(childCall)) {\n functionByNameArity.setException(new Exception(modular, childCall));\n } else if (CallDefinitionClause.isFunction(childCall)) {\n functionByNameArity.addClausesToCallDefinition(childCall);\n } else if (CallDefinitionSpecification.is(childCall)) {\n functionByNameArity.addSpecificationToCallDefinition(childCall);\n } else if (Implementation.is(childCall)) {\n treeElementList.add(new Implementation(modular, childCall));\n } else if (CallDefinitionClause.isMacro(childCall)) {\n macroByNameArity.addClausesToCallDefinition(childCall);\n } else if (Module.is(childCall)) {\n treeElementList.add(new Module(modular, childCall));\n } else if (Overridable.is(childCall)) {\n Overridable overridable = new Overridable(modular, childCall);\n overridableSet.add(overridable);\n treeElementList.add(overridable);\n } else if (Protocol.is(childCall)) {\n treeElementList.add(new Protocol(modular, childCall));\n } else if (org.elixir_lang.structure_view.element.Quote.is(childCall)) {\n treeElementList.add(new Quote(modular, childCall));\n } else if (Structure.is(childCall)) {\n treeElementList.add(new Structure(modular, childCall));\n } else if (Type.is(childCall)) {\n treeElementList.add(Type.fromCall(modular, childCall));\n } else if (org.elixir_lang.structure_view.element.Use.is(childCall)) {\n org.elixir_lang.structure_view.element.Use use = new org.elixir_lang.structure_view.element.Use(modular, childCall);\n useSet.add(use);\n treeElementList.add(use);\n } else if (Unknown.is(childCall)) { // Should always be last since it will match all macro calls\n treeElementList.add(new Unknown(modular, childCall));\n }\n }\n\n for (Overridable overridable : overridableSet) {\n for (TreeElement treeElement : overridable.getChildren()) {\n CallReference callReference = (CallReference) treeElement;\n Integer arity = callReference.arity();\n\n if (arity != null) {\n String name = callReference.name();\n\n CallDefinition function = functionByNameArity.get(pair(name, arity));\n\n if (function != null) {\n function.setOverridable(true);\n }\n }\n }\n }\n\n Collection<TreeElement> useCollection = new HashSet<TreeElement>(useSet.size());\n useCollection.addAll(useSet);\n Collection<TreeElement> nodesFromUses = Used.provideNodesFromChildren(useCollection);\n Map<Pair<String, Integer>, CallDefinition> useFunctionByNameArity = Used.functionByNameArity(nodesFromUses);\n\n for (Map.Entry<Pair<String, Integer>, CallDefinition> useNameArityFunction : useFunctionByNameArity.entrySet()) {\n CallDefinition useFunction = useNameArityFunction.getValue();\n\n if (useFunction.isOverridable()) {\n Pair<String, Integer> useNameArity = useNameArityFunction.getKey();\n\n CallDefinition function = functionByNameArity.get(useNameArity);\n\n if (function != null) {\n function.setOverride(true);\n }\n }\n }\n\n treeElements = treeElementList.toArray(new TreeElement[treeElementList.size()]);\n }\n\n return treeElements;\n }", "public static void main(String[] args) {\n\t\tint[] arr = {7,3,10,12,5,1,9};\n\t\tNode root = null;\n\t\tfor(int n:arr) {\n\t\t\tif(root == null) {\n\t\t\t\troot = new Node(n);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tNode cur = root;\n\t\t\tNode par = null;\n\t\t\twhile(cur != null) {\n\t\t\t\tpar = cur;\n\t\t\t\tif(n < cur.val) cur = cur.left;\n\t\t\t\telse cur = cur.right;\n\t\t\t}\n\t\t\tif(n < par.val) par.left = new Node(n);\n\t\t\telse par.right = new Node(n);\n\t\t\tif(height(root.left) - height(root.right) > 1) {\n\t\t\t\tif(height(root.left.right) > height(root.left.left)) leftRotate(root.left);\n\t\t\t\trightRotate(root);\n\t\t\t}\n\t\t\tif(height(root.right) - height(root.left) > 1) {\n\t\t\t\tif(height(root.right.left) > height(root.right.right)) rightRotate(root.right);\n\t\t\t\tleftRotate(root);\n\t\t\t}\n\t\t}\n\t\t//infixOrder(root);\n//\t\tdel(root,7);\n//\t\tinfixOrder(root);\n\t\t//del(root,5);\n\t\t//del(root,5);\n\t\tinfixOrder(root);\n\t}", "static int introTutorial(int V, int[] arr) {\n// return searchBinaryRecursive(V, arr, 0, arr.length-1);\n return searchBinaryIterative(V, arr, 0, arr.length-1);\n }", "public List<T> wantedNodesIterative(Predicate<T> p) {\n //PART 4 \n if(root == null){\n return null;\n }\n LinkedList<TreeNode<T>> stack = new LinkedList<>();\n stack.add(root);\n \n List<T> wantedNodes =new LinkedList<>();\n TreeNode<T> current;\n \n while(!stack.isEmpty()){\n current = stack.pop();\n if(p.check(current.data)){\n wantedNodes.add(current.data);\n }\n if(current.right != null){\n stack.addFirst(current.right);\n }\n if(current.left != null){\n stack.addFirst(current.left);\n }\n }\n return wantedNodes;\n }", "public static void main(String[] args) {\n version1WhileLoop();\n version1DoWhileLoop();\n version1ForLoop();\n version2ForLoop();\n version3ForLoop();\n }", "private static void iddfs(State curr, int depth) {\n for(int i = 0; i <= depth; i++) {\r\n\r\n if(curr.isGoalState()) \r\n System.out.println(i+\":\"+curr.getOrderedPair()+\" Goal\");//initial is goal state\r\n else\r\n System.out.println(i+\":\"+curr.getOrderedPair());//initial\r\n\r\n curr.close.add(curr);\r\n State currState = curr;\r\n while(!currState.isGoalState()) {\r\n if(currState.depth < i)\r\n curr.buildStack(currState.getSuccessors(currState));\r\n System.out.print(i+\":\");\r\n curr.printHelp(currState, 5);\r\n if(!curr.open.isEmpty()) {\r\n currState = curr.open.get(curr.open.size()-1);\r\n curr.close.add(curr.open.remove(curr.open.size()-1));\r\n } else {\r\n break;\r\n }\r\n }\r\n\r\n if(currState.isGoalState()) {\r\n System.out.println(i+\":\"+currState.getOrderedPair() + \" Goal\");\r\n curr.printPath(currState);\r\n return;\r\n }\r\n curr.open.clear(); curr.close.clear();\r\n }\r\n }", "private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }", "public static void main(String[] args) {\n TreeNode node = new TreeNode();\n node.value = 1;\n node.left = new TreeNode();\n node.left.value = 2;\n node.right = new TreeNode();\n node.right.value = 3;\n node.left.left = new TreeNode();\n node.left.left.value = 4;\n node.left.right = new TreeNode();\n node.left.right.value = 5;\n node.right.left = new TreeNode();\n node.right.left.value = 6;\n node.right.right = new TreeNode();\n node.right.right.value = 7;\n// System.out.println(mirro(node).value);\n// System.out.println(mirro(node).left.value);\n// System.out.println(Arrays.toString(LevelPrintTree.levelPrint(mirro(node))));\n\n recur(node);\n\n }", "private Object asReversedIteration(final List<Object> list, final boolean recursive, final List<Object> disc) {\n Stack<Object> s = new Stack<>();\n disc.add(list);\n outerLoop:\n for (Object m : list) {\n s.push(m);\n\n for (Object e : disc) {\n {\n if (e == m) {\n continue outerLoop;\n }\n }\n }\n if (recursive) {\n if (m instanceof List<?>) {\n asReversedIteration((List<Object>) m, true, disc);\n }\n if (m instanceof Map<?, ?>) {\n asReversedIteration((Map<String, Object>) m, true, disc);\n }\n }\n\n }\n list.clear();\n int size = s.size();\n for (int i = 0; i < size; i++) {\n list.add(s.pop());\n }\n return list;\n }", "public static void main(String[] args) {\n\t\tint arr[] = {1,2,3,4,5,6,};\r\n\t\tTreenode<Integer> root= func(arr,0 , arr.length-1);\r\n\t\tprint(root);\r\n\t}", "private static boolean forLoopParts_2_1(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"forLoopParts_2_1\")) return false;\n forLoopParts_2_1_0(b, l + 1);\n return true;\n }", "static int sum(int n) {\n\t\tif(n==1) \n\t\t\treturn 1;\n\t\treturn n+sum(n-1);\n\t}", "void traverse2() {\n BTNode node = root, prev = null, next;\n while (node != null) {\n if (prev == node.parent) {\n if (node.left != null) {\n next = node.left;\n }\n else if (node.right != null) {\n next = node.right;\n }\n else {\n next = node.parent;\n }\n } else if (prev == node.left) {\n if (node.right != null) {\n next = node.right;\n }\n else {\n next = node.parent;\n }\n } else {\n next = node.parent;\n }\n prev = node;\n node = next;\n }\n }", "private List<Node> compute() {\n\t\t\tgetGraphFromResolvedTree(root);\n\t\t\tdepthFirst(root);\n\t\t\treturn result;\n\t\t}", "@Test\r\n\tpublic void test06_allPositive() {\r\n\t\tRecursiveMethods rm = new RecursiveMethods();\r\n\r\n\t\tint[] a1 = {};\r\n\t\tassertTrue(rm.allPositive(a1));\r\n\t\tint[] a2 = { 1, 2, 3, 4, 5 };\r\n\t\tassertTrue(rm.allPositive(a2));\r\n\t\tint[] a3 = { 1, 2, -3, 4, 5 };\r\n\t\tassertFalse(rm.allPositive(a3));\r\n\t}", "public abstract void bepaalGrootte();" ]
[ "0.58867586", "0.5790049", "0.5755408", "0.565006", "0.5648478", "0.5630098", "0.55922717", "0.55877316", "0.5538595", "0.54680455", "0.5450379", "0.54493964", "0.5440047", "0.5440047", "0.5440047", "0.54159987", "0.5407029", "0.5401046", "0.53561294", "0.5285176", "0.5273899", "0.52701795", "0.52156734", "0.5207823", "0.52024215", "0.51940066", "0.5181486", "0.5165237", "0.51431865", "0.51417816", "0.5136616", "0.51181394", "0.5116041", "0.51026493", "0.50830936", "0.50657874", "0.5056967", "0.5050897", "0.5049614", "0.5042843", "0.50176066", "0.50085056", "0.50049603", "0.5001242", "0.49992085", "0.49953717", "0.49943012", "0.49855247", "0.49817288", "0.49750584", "0.49643004", "0.4954856", "0.49542773", "0.4950804", "0.4945454", "0.49435177", "0.4942072", "0.4928272", "0.4926084", "0.49223265", "0.49155995", "0.4902199", "0.4895741", "0.48888108", "0.48749927", "0.48727205", "0.4868312", "0.48682976", "0.48650452", "0.4862844", "0.4860359", "0.4857112", "0.48520947", "0.4850569", "0.4841115", "0.48401356", "0.48343262", "0.4824825", "0.48220688", "0.48194474", "0.48129913", "0.48113737", "0.48098704", "0.48071808", "0.48069015", "0.48067924", "0.4806377", "0.4804021", "0.48014024", "0.47929505", "0.4792433", "0.47911456", "0.4789419", "0.47851413", "0.47832626", "0.478282", "0.4782101", "0.47799695", "0.47791147", "0.4778491", "0.4774006" ]
0.0
-1
Adds new entity to Team table.
void create(Team team);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t@Transactional(propagation=Propagation.REQUIRED)\r\n\tpublic void add(Team team) {\n\t\tentityManager.createQuery(\"insert into Team(id, name) values (team.id, team.name)\");\r\n\t}", "public void insertTeam(Team t) {\n\t\tEntityManager em = emfactory.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tem.persist(t);\n\t\tem.getTransaction().commit();\n\t\tem.close();\n\t}", "void addMyTeam(Team team) throws HasTeamAlreadyException;", "public static void addTeam(TeamForm tf) {\n Team team;\n\n long id = tf.id;\n\n if (!isTeam(id)) {\n team = new Team(tf.teamName, tf.location, tf.teamType, tf.skillLevel, tf.roster, tf.description, tf.imageUrl);\n team.save();\n }\n else {\n team = getTeam(id);\n team.setTeamName(tf.teamName);\n team.setLocation(tf.location);\n team.setTeamType(tf.teamType);\n team.setSkillLevel(tf.skillLevel);\n team.setRoster(tf.roster);\n team.setDescription(tf.description);\n team.setImageUrl(tf.imageUrl);\n team.setWins(tf.wins);\n team.setLosses(tf.losses);\n team.setPointsFor(tf.pointsFor);\n team.setPointsAgainst(tf.pointsAgainst);\n team.save();\n }\n }", "public void addEntityToTeam(LivingEntity livingEntity, String teamName) {\n getTeam(teamName).addEntry(livingEntity.getUniqueId().toString());\n }", "@WebMethod public Team addTeam(String name) throws TeamAlreadyExists;", "@Test\r\n\tpublic void saveTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeam \r\n\t\tTeam team = new wsdm.domain.Team();\r\n\t\tservice.saveTeam(team);\r\n\t}", "@Override\n @Transactional\n public Team addTeam(Team team) {\n KeyHolder keyHolder = new GeneratedKeyHolder();\n String sql = \"INSERT INTO Team (teamname, userid) VALUES (?, ?)\";\n\n jdbc.update((Connection connection) -> {\n PreparedStatement prep = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n prep.setString(1, team.getName());\n prep.setInt(2, team.getUser().getId());\n return prep;\n }, keyHolder);\n team.setId(keyHolder.getKey().intValue());\n return team;\n }", "@Override\n\tpublic void insertProjectTeam(ProjectTeamBean projectTeamBean) {\n\t\t\n\t}", "Team createTeam();", "public void insertTeam(Team team) {\n\t\ttry {\n\t\t\tStatement statement = null;\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tjava.sql.Date tDate = new java.sql.Date(team.getDateFoundation().getTime());\n\t\t\tString insertTeam_sql = \"INSERT INTO \" + team_table + \" (id, name, coach, city, dateFoundation)\"\n\t\t\t\t\t+ \"VALUES (NULL, '\" + team.getName() + \"' , '\" + team.getCoach() + \"' , '\" + team.getCity()\n\t\t\t\t\t+ \"' , '\" + tDate + \"')\";\n\t\t\tstatement.executeUpdate(insertTeam_sql);\n\t\t} catch (SQLException e) {\n\t\t\tif (e.getErrorCode() == MYSQL_DUPLICATE_PK) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\t\t\t\talert.setHeaderText(\"Duplicity Error\");\n\t\t\t\talert.setContentText(\"This team is already in our database\");\n\t\t\t\talert.showAndWait();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void insertProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}", "int insert(SysTeam record);", "@Test\n @Transactional\n public void createTeamWithExistingId() throws Exception {\n int databaseSizeBeforeCreate = teamRepository.findAll().size();\n\n // Create the Team with an existing ID\n team.setId(1L);\n TeamDTO teamDTO = teamMapper.toDto(team);\n\n // An entity with an existing ID cannot be created, so this API call\n // must fail\n restTeamMockMvc\n .perform(post(\"/api/teams\").contentType(TestUtil.APPLICATION_JSON_UTF8)\n .content(TestUtil.convertObjectToJsonBytes(teamDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Team in the database\n List<Team> teamList = teamRepository.findAll();\n assertThat(teamList).hasSize(databaseSizeBeforeCreate);\n }", "public void addTeam(Team team){\n\t\tthis.teamList.add(team);\n\t}", "public void createTeam(final Map<String, String> dataTable) {\n team.processInformation(dataTable);\n WebDriverHelper.waitUntil(inputTeamName);\n WebDriverHelper.setElement(inputTeamName, team.getName());\n WebDriverHelper.clickElement(dropDownTeamType);\n selectDropDownOptionByName(team.getType());\n WebDriverHelper.setElement(inputTeamDescription, team.getDescription());\n WebDriverHelper.clickElement(btnContinue);\n WebDriverHelper.waitUntil(btnThisLater);\n WebDriverHelper.clickElement(btnThisLater);\n }", "public void newTeam(Team team);", "public void insert(EmployeeEntity entity){\n EmployeeDB.getInstance().insertOrUpdate(entity);\n }", "@Override\r\n\tpublic ResultMessage addTeam(TeamPO oneTeam) {\n\t\treturn teams.addTeam(oneTeam) ;\r\n\t}", "void addEntity(IViewEntity entity);", "public void addEntity(Entity e)\r\n\t{\r\n\t\tentities.add(e);\r\n\t}", "public Team insert(League league, String teamName) {\n StandingDB sdb = new StandingDB();\n TeamDB tdb = new TeamDB();\n String teamID = generateTeamID();\n \n Standing standing = new Standing(teamID);\n \n Team team = new Team(teamID, teamName);\n team.setLeagueID(league);\n \n tdb.insert(team);\n sdb.insert(standing);\n return team;\n }", "public void add(E entity);", "@Override\n\tpublic void addEntity( final Entity _entity )\n\t{\n\t\tif( _entity == null )\n\t\t{\n\t\t\tLogger.println( \"Attempting to add null entity.\", Logger.Verbosity.MAJOR ) ;\n\t\t\treturn ;\n\t\t}\n\n\t\tentitiesToAdd.add( _entity ) ;\n\t}", "@PostMapping(path=\"/add/{id}/team\")\n public @ResponseBody Object assignTeamMember(@PathVariable long id, @RequestParam Team team){\n TeamMember tm = teamMemberRepository.getOne(id);\n tm.setTeam(team); // Retrieving the list of team members and adding new team member\n return teamMemberRepository.saveAndFlush(tm);\n }", "public Team create(TeamDTO teamForm);", "@Override\n public void addMentorToTeam(Id teamId, Mentor mentor) throws AlfredException {\n if (!this.mentorList.contains(mentor.getId())) {\n throw new ModelValidationException(\"Mentor does not exist in mentorList.\");\n }\n Team targetTeam;\n try {\n targetTeam = this.getTeam(teamId);\n } catch (MissingEntityException e) {\n throw e;\n }\n boolean isSuccessful = targetTeam.addMentor(mentor);\n if (!isSuccessful) {\n throw new AlfredModelException(\"Team already has a mentor\");\n }\n }", "public void createTeamMemberEntity(String fName, String lname, String gamertag, int age,\n String gender, String position, String mainChampion) {\n LOGGER.fine(\"Creating TeamMember object\");\n\n TeamMember player = new TeamMember();\n player.setfName(fName);\n player.setlName(lname);\n player.setGamertag(gamertag);\n player.setAge(age);\n Gender genderEnum = Gender.valueOf(gender);\n player.setGender(genderEnum);\n Position positionEnum = Position.valueOf(position);\n player.setPosition(positionEnum);\n player.setMainChampion(mainChampion);\n\n LOGGER.fine(\"Persisting TeamMember object to DB\");\n this.entityManager.persist(player);\n\n }", "@RequestMapping(method=RequestMethod.POST)\n public ResponseEntity<Void> insert(@RequestBody TeamDTO objDto) {\n Team obj = this.teamService.fromDTO(objDto);\n this.teamService.insert(obj);\n URI uri = ServletUriComponentsBuilder.fromCurrentRequest()\n .path(\"/{id}\").buildAndExpand(obj.getId()).toUri();\n return ResponseEntity.created(uri).build();\n }", "@Override\n public void addTeamIdentifier(TeamIdentifier teamIdentifier) {\n }", "@Test\r\n\tpublic void saveTeamTeamplayerses() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamTeamplayerses \r\n\t\tInteger teamId_7 = 0;\r\n\t\tTeamplayers related_teamplayerses = new wsdm.domain.Teamplayers();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamTeamplayerses(teamId_7, related_teamplayerses);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamTeamplayerses\r\n\t}", "public void addEntity(Entity entity) {\n\t\tthis.entities.add(entity);\n\t}", "void addEmployee(Employee emp){\n\t\tEntityManager em = emf.createEntityManager();\n\t\tEntityTransaction tx = em.getTransaction();\n\t\ttx.begin();\n\t\tem.persist(emp);\n\t\ttx.commit();\n\t\tem.close();\n\t}", "@Override\n public void addToModel() {\n for (final Person person : team.observableTeamMembers()) {\n person.setTeam(team);\n }\n\n // Add team to project\n organisation.getTeams().add(team);\n }", "public void cmdAddTeam(User teller, String teamCode) {\n Team team = tournamentService.findTeam(teamCode);\n if (team != null) {\n command.tell(teller, \"A team with name {0} already exists.\", teamCode);\n return;\n }\n try {\n team = tournamentService.createTeam(teamCode);\n } catch (InvalidNameException e) {\n replyError(teller, e);\n return;\n }\n tournamentService.flush();\n command.tell(teller, \"Done. Team {0} has now been created.\", team.getTeamCode());\n command.tell(teller, \"To set the team name, use: \\\"set-team {0} name New York Giants\\\"\", team.getTeamCode());\n cmdShowTeam(teller, team);\n }", "public void addTeams(SoccerTeam team) throws TeamNotFoundException {\n if (teams.contains(team)){\n throw new TeamNotFoundException(\"Team Already added to the Tournament\");\n }\n this.teams.add(team);\n }", "@Override\n public void addParticipantToTeam(Id teamId, Participant participant) throws AlfredException {\n if (!this.participantList.contains(participant.getId())) {\n throw new ModelValidationException(\"Participant does not exist in participantList\");\n }\n Team targetTeam;\n try {\n targetTeam = this.getTeam(teamId);\n } catch (MissingEntityException e) {\n throw e;\n }\n try {\n boolean isSuccessful = targetTeam.addParticipant(participant);\n if (!isSuccessful) {\n throw new AlfredModelException(\"Participant is already present in team\");\n }\n } catch (Exception e) {\n throw new AlfredModelException(e.getMessage());\n }\n }", "public boolean addTeam(T team){\n if (teams.contains(team)){\n System.out.println(\"Cant add team is allready in the league list.\");\n return false;\n }else{\n teams.add(team);\n return true;\n }\n }", "@RequestMapping(value = \"/team/{league}\", method = POST, consumes = MEDIA_JSON)\n @ResponseStatus(CREATED)\n public LobbyTeam createTeamAndEnter(@AuthenticationPrincipal UserSimpleDetails user,\n @PathVariable(\"league\") LobbyLeagueEnum league)\n throws TeamFullException, TeamNotFoundException {\n log.info(\"user {} creates team\", user.getIdentity());\n LobbyTeam team = lobbyService.createTeam(user.getProfileId(), league);\n return lobbyService.enterIntoTeam(user.getProfileId(), team.getId().toString());\n }", "private static void updateRecords() {\n for (Team t: Main.getTeams()){\n //If the team already exists\n if (SqlUtil.doesTeamRecordExist(c,TABLE_NAME,t.getIntValue(Team.NUMBER_KEY))){\n //Update team record\n updateTeamRecord(t);\n } else {\n //Create a new row in database\n addNewTeam(t);\n\n }\n }\n\n }", "@Test\n @Transactional\n public void updateNonExistingTeam() throws Exception {\n int databaseSizeBeforeUpdate = teamRepository.findAll().size();\n\n // Create the Team\n TeamDTO teamDTO = teamMapper.toDto(team);\n\n // If the entity doesn't have an ID, it will be created instead of just\n // being updated\n restTeamMockMvc\n .perform(put(\"/api/teams\").contentType(TestUtil.APPLICATION_JSON_UTF8)\n .content(TestUtil.convertObjectToJsonBytes(teamDTO)))\n .andExpect(status().isCreated());\n\n // Validate the Team in the database\n List<Team> teamList = teamRepository.findAll();\n assertThat(teamList).hasSize(databaseSizeBeforeUpdate + 1);\n }", "public void addEntity(AnnexDetail entity) throws Exception {\n\t\t\n\t}", "public void addEntity(Entity entity)\n\t{\n\t\t\n\t\tif (entity.getClass() == PlayerMP.class)\n\t\t{\n\t\t\t//System.out.println(\"ADDING PLAYER TO PLAYER LIST\");\n\t\t\tplayers.add((PlayerMP)entity);\n\t\t\t//System.out.println(\"World Player Count: \" + players.size());\n\t\t}\n\t\telse\n\t\t{\n\t\t\tentities.add(entity);\n\t\t}\n\t}", "int insert(SmsEmployeeTeam record);", "public void addTeam(final TeamController team) {\r\n\t\tteamList.add(team);\r\n\t}", "int insertSelective(SysTeam record);", "private void saveTournament(Tournament tournament) {\n System.out.println(\"Saving\");\n TournamentEntity entity = new TournamentEntity();\n entity.setId(tournament.getId());\n entity.setWinnerId(tournament.getFightersRemaining().get(0).getId());\n tournamentRepository.save(entity);\n }", "@Override\r\n public void createNewEntity(String entityName) {\n\r\n }", "public void addTeam(Team team) {\n int maxTotalTeamsCurrentlyAllowed = getTotalPlayersInLeague();\n\n // If a team has been created\n if(getTeams().size() != 0) {\n\n float greatestPlayerCount;\n // if the number of players on the largest team is not equal to zero\n if((greatestPlayerCount = (float) getTeamWithMostPlayers().getPlayerCount()) != 0) {\n\n // Get the sum of all the players in the league\n float totalLeaguePlayers = (float) getTotalPlayersInLeague();\n\n // divide the total players in league by number of players in largest team, rounded down\n float totalTeamsAllowedFloat = totalLeaguePlayers / greatestPlayerCount;\n\n // cast into double for Math.floor method\n double totalTeamsAllowedDouble = (double) totalTeamsAllowedFloat;\n\n // cast into integer for comparison\n maxTotalTeamsCurrentlyAllowed = (int) Math.floor(totalTeamsAllowedDouble);\n }\n\n }\n\n // If we're requesting to make more teams than the current max allowed, throw exception\n if (getTeams().size() < maxTotalTeamsCurrentlyAllowed) {\n teams.add(team);\n } else {\n throw new IndexOutOfBoundsException(\"Not enough players for a new team\");\n }\n\n }", "public void addToTile(GameEntity e) {\n\t\t\n\t\tGridTile tile = getTile(e.pos());\n\t\ttile.add(e);\n\t}", "public void addEntity(T entity) {\n\t\t// Remove from needed\n\t\tidTracker.unset(entity.getId());\n\n\t\t// Add to entities\n\t\tentityMap.add(entity);\n\t}", "private void save() {\n Saver.saveTeam(team);\n }", "@Override\n\tpublic void entityAdded(Entity entity)\n\t{\n\t\t\n\t}", "public void create(GameSet entity) {\r\n\t\tgetDatabase().beginTransaction();\r\n\t\ttry {\r\n\t\t\tString sql = \"insert into GAME_SET (\" + GameSet.DbField.ID + \",\" + GameSet.DbField.GAME_ID + \",\" + GameSet.DbField.NAME + \",\" + GameSet.DbField.IMAGE\r\n\t\t\t\t\t+ \") values (?,?,?,?)\";\r\n\t\t\tObject[] params = new Object[4];\r\n\t\t\tparams[0] = entity.getId();\r\n\t\t\tparams[1] = entity.getGame().getId();\r\n\t\t\tparams[2] = entity.getName();\r\n\t\t\tparams[3] = entity.getImageName();\r\n\r\n\t\t\texecSQL(sql, params);\r\n\r\n\t\t\tgetDatabase().setTransactionSuccessful();\r\n\t\t\tentity.setState(DbState.LOADED);\r\n\r\n\t\t} finally {\r\n\t\t\tgetDatabase().endTransaction();\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void saveTeamTswacct() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamTswacct \r\n\t\tInteger teamId_3 = 0;\r\n\t\tTswacct related_tswacct = new wsdm.domain.Tswacct();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamTswacct(teamId_3, related_tswacct);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamTswacct\r\n\t}", "@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}", "public void addNewEntity() {\n Random random = new Random();\n int bound = Aquarium.WIDTH / 10;\n int randX = bound + random.nextInt(Aquarium.WIDTH - (2 * bound));\n int randY = bound + random.nextInt(Aquarium.HEIGHT - (2 * bound));\n Piranha newPiranha = new Piranha(randX, randY);\n piranhas.add(newPiranha);\n }", "@Override\n protected void createEntity() {\n ProjectStatus status = createProjectStatus(5);\n setEntity(status);\n }", "public static Team createEntity(EntityManager em) {\n Team team = new Team().name(DEFAULT_NAME).description(DEFAULT_DESCRIPTION)\n .level(DEFAULT_LEVEL).totalMember(DEFAULT_TOTAL_MEMBER)\n .extraGroupName(DEFAULT_EXTRA_GROUP_NAME)\n .extraGroupDescription(DEFAULT_EXTRA_GROUP_DESCRIPTION)\n .extraGroupTotalMember(DEFAULT_EXTRA_GROUP_TOTAL_MEMBER);\n return team;\n }", "public void addEntity(T... entities) {\r\n\t\tfor (T entity : entities) {\r\n\t\t\t// if entity name is not specified, set the fully qualified class name as the entity name\r\n\t\t\tentity.setEntityName(StringUtils.hasLength(entity.getEntityName()) ? entity.getEntityName() : entity.getClass().getName());\r\n\t\t\tthis.entitiesList.add(entity);\r\n\t\t}\t\t\r\n\t}", "@Test\n @Transactional\n void createLessonTimetableWithExistingId() throws Exception {\n lessonTimetable.setId(1L);\n\n int databaseSizeBeforeCreate = lessonTimetableRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restLessonTimetableMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(lessonTimetable))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the LessonTimetable in the database\n List<LessonTimetable> lessonTimetableList = lessonTimetableRepository.findAll();\n assertThat(lessonTimetableList).hasSize(databaseSizeBeforeCreate);\n }", "@Override\n public void add(Curso entity) {\n Connection c = null;\n PreparedStatement pstmt = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"INSERT INTO curso (nombrecurso, idprofesor, claveprofesor, clavealumno) values (?, ?, ?, ?)\");\n\n pstmt.setString(1, entity.getNombre());\n pstmt.setInt(2, (entity.getIdProfesor() == 0)?4:entity.getIdProfesor() ); //creo que es sin profesor confirmado o algo por el estilo\n pstmt.setString(3, entity.getClaveProfesor());\n pstmt.setString(4, entity.getClaveAlumno());\n \n pstmt.execute();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public team(int teamID, String teamName, String mascot, int games, int wins, int loses) throws SQLException {\n\t\tthis.teamID = teamID;\n\t\tthis.teamName = teamName;\n\t\tthis.mascot = mascot;\n\t\tthis.games = games;\n\t\tthis.wins = wins;\n\t\tthis.loses = loses;\n\t\tconn = DriverManager.getConnection(DB_URL);\n\t\tStatement stmt = conn.createStatement();\n\t\t \n\t\t stmt.executeUpdate(\"INSERT INTO Team VALUES (\" +\n\t this.teamID + \", '\" +\n\t this.teamName + \"', '\" + \n\t this.mascot + \"', \" +\n\t this.games + \", \" +\n\t this.wins + \", \" +\n\t this.loses +\n\t \")\");\n\t\t \n\t\t conn.close();\n\t stmt.close();\n\t}", "@PostConstruct\n protected void initNewEntity() {\n setNewEntity(getService().create());\n }", "@Override\n\tpublic void addEmployee(Employee employee) {\n\t\tem.getTransaction().begin();\n\t\tem.persist(employee);\n\t\tem.getTransaction().commit();\n\t\tSystem.out.println(\"Data Added successfully\");\n\t\tlogger.log(Level.INFO, \"Data Added successfully\");\n\n\t}", "public void createTeam(ActionEvent actionEvent) throws IOException, SQLException {\n if (validCreateInput()) {\n user = DatabaseManager.createTeam(user, teamNameCreateField.getText(), abbrevationCreateField.getText(), chooseCityBoxCreate.getValue().toString(),\n chooseAgeGroupCreate.getValue(), chooseLeagueBoxCreate.getValue().toString(), chooseLeagueTeamBoxCreate.getValue().toString(), createTeamLogoFile);\n\n createPaneClose(actionEvent);\n displayMessage(messagePane, \"Team created\", false);\n }\n }", "Entity createEntity();", "@Transactional void add(E entity);", "@Test\r\n\t public void addAnExistingRouteFather(){\r\n\t\tRouteFather toAdd = new RouteFather();\r\n\t\ttoAdd = routeFatherDAO.create(toAdd);\r\n\t\tAssert.assertNull(toAdd);\r\n\t\t\r\n\t }", "private void addTeam(String teamName, String prefix, String suffix) {\n String trimmedTeamName = trimString(teamName);\n\n // If the team already exists, skip adding it.\n if (teamExist(trimmedTeamName)) return;\n\n // Register the new team\n Team team = scoreboard.registerNewTeam(trimmedTeamName);\n\n // Set the prefix.\n if (prefix != null && !prefix.isEmpty()) {\n team.setPrefix(prefix);\n }\n\n // Set ths suffix.\n if (suffix != null && !suffix.isEmpty()) {\n team.setSuffix(suffix);\n }\n }", "public void insertPlayer(Player player, int idTeam) {\n\t\ttry {\n\t\t\tStatement statement = null;\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tjava.sql.Date pDate = new java.sql.Date(player.getDateOfBirth().getTime());\n\t\t\tString insertPlayer_sql = \"INSERT INTO \" + player_table\n\t\t\t\t\t+ \" (id, idTeam, name, lastname, dateOfBirth, height)\" + \"VALUES (NULL, \" + idTeam + \", '\"\n\t\t\t\t\t+ player.getName() + \"' , '\" + player.getLastname() + \"' , '\" + pDate + \"' , '\" + player.getHeight()\n\t\t\t\t\t+ \"')\";\n\t\t\tstatement.executeUpdate(insertPlayer_sql);\n\t\t} catch (SQLException e) {\n\t\t\tif (e.getErrorCode() == MYSQL_DUPLICATE_PK) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\t\t\t\talert.setHeaderText(\"Duplicity Error\");\n\t\t\t\talert.setContentText(\"This player is already in our database\");\n\t\t\t\talert.showAndWait();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "@Override\n\t@Transactional\n\tpublic void addHello(HelloEntity helloEntity) {\n\t\tSystem.out.println(helloEntity.getName());\n\t\t// entityManager.getTransaction().begin();\n\t\tentityManager.persist(helloEntity);\n\t\tentityManager.flush();\n\t\t// entityManager.getTransaction().commit();\n\t\tSystem.out.println(\"add hello\");\n\t}", "@Override\n\tpublic void addTicketsTourDetail(TicketsTourDetail ticketsTourDetail) {\n\t\tthis.entityManager.persist(ticketsTourDetail);\n\t}", "public EspecieEntity inserta(EspecieEntity entity){\r\n em.persist(entity);\r\n return entity;\r\n }", "public Event createEventAndAddToPet(int petId, Event newEvent) { \n EntityManager em = emf.createEntityManager();\n Pet pet = em.find(Pet.class, petId);\n PetDTO petDTO = new PetDTO(pet);\n Pet newPet = new Pet(petDTO.getId(), petDTO.getName(), petDTO.getSpecies());\n Date date = new Date();\n newPet.setBirth(pet.getBirth());\n newEvent.setPetId(newPet);\n newEvent.setDate(date);\n \n try {\n em.getTransaction().begin();\n em.persist(newEvent);\n em.getTransaction().commit();\n return newEvent;\n } finally {\n em.close();\n }\n \n }", "public void add(Teacher teacher) {\n Session session = sessionFactory.getCurrentSession();\n Transaction transaction = session.beginTransaction();\n session.save(teacher);\n transaction.commit();\n }", "public int addAsEntity(Entity e, int x, int y) {\n e.setMapRelation(new MapEntity_Relation(this, e, x, y));\n System.out.println(e.name_);\n int error_code = this.map_grid_[y][x].addEntity(e);\n System.out.println(e.name_ + \"2\");\n if (error_code == 0) {\n this.entity_list_.put(e.name_, e);\n } else {\n e.setMapRelation(null);\n System.err.println(\"Error in entity list\");\n }\n return error_code;\n }", "@Override\n public void create(T entity) throws SQLException {\n\n this.dao.create(entity);\n\n }", "@Override\n\tpublic void add(Estado es) {\n\t\tEntityManager em = this.emf.createEntityManager();\n\t\ttry {\n\t\t\tem.persist(es);\n\t\t\tem.flush(); // este es un commit? \n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\t\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t}", "void create(E entity);", "public void addEmployee(Employee employee) {\n employeeRepository.save(employee);\n }", "public void Salvar(TarefaEntity tarefaEntity){\n \n\t\tthis.entityManager.getTransaction().begin();\n\t\tthis.entityManager.persist(tarefaEntity);\n\t\tthis.entityManager.getTransaction().commit();\n\t}", "@Override\n public void add(T obj) {\n generateObjIdIfRequired(obj);\n \n //Try to copy when adding so we can prevent unwanted changes\n obj = getCopyOfT(obj);\n \n if (objects.contains(obj)) throw new DBEntityAlreadyExistsException(obj.toString());\n\n objects.add(obj);\n }", "public void addEntityName(String name) {\n if (name != null) {\n this.entityNameSet.add(name);\n }\n }", "public void add(E e) {\n\t\tentities.add(e);\n\t}", "public void add(IApsEntity entity) throws ApsSystemException;", "@Override\r\n\tpublic Trainee addTrainee(Trainee t) {\n\t\treturn dao.addTrainee(t);\r\n\t}", "@Override\n\tpublic EmploieType creer(EmploieType entity) throws InvalideTogetException {\n\t\treturn emploieTypeRepository.save(entity);\n\t}", "public Team update(TeamDTO teamForm) throws TeamNotFoundException;", "@Test\r\n\tpublic void saveTeamLevel() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamLevel \r\n\t\tInteger teamId_8 = 0;\r\n\t\tLevel related_level = new wsdm.domain.Level();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamLevel(teamId_8, related_level);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamLevel\r\n\t}", "public void addEvent() {\n TimetableUserItem event;\n try {\n String description = getDescription();\n String date = getDate();\n String startTime = getStartTime();\n String endTime = getEndTime();\n verifyCorrectTime(startTime, endTime);\n String location = getLocation();\n event = new TimetableUserItem(description, date, startTime, endTime, location);\n verifyNoConflict(event);\n timetable.addEvent(event.getDayOfWeek(), event);\n timetable.addToEvents(event);\n addUI.printEventMessage(event);\n } catch (AddException e) {\n e.printMessage();\n logger.log(Level.WARNING, \"Invalid event created, event has not been added to timetable\");\n }\n }", "public void playerAddedToTeam(ArenaPlayer p, Team t) {\n \t\tif (!t.hasSetName() && t.getPlayers().size() > Defaults.MAX_TEAM_NAME_APPEND){\n \t\t\tt.setDisplayName(TeamUtil.createTeamName(indexOf(t)));\n \t\t}\n \t\tstartTracking(p);\n \t\tarenaInterface.onJoin(p,t);\n \n \t\tPerformTransition.transition(this, MatchState.ONJOIN, p,t, true);\n \t}", "public void spawnEntity(Entity entity)\n\t{\n\t\tif(!entity.isLoadedResources() && !entity.loadResources())\n\t\t{\n\t\t\t//Don't add entity if an error occurs\n\t\t\treturn;\n\t\t}\n\t\tthis.newEntityBuffer.add(entity);\n\t\tLoggingHandler.logger.log(Level.FINE, \"Added entity to spawn queue: \" + entity);\n\t}", "public void add(ProfessionEntity profession) throws SQLException {\n openTransactionSession();\n\n Session session = getSession();\n session.save(profession);\n\n //close session with a transaction\n closeTransactionSession();\n }", "public void add(Object obj) {\r\n\t\tSession session = null;\r\n\t\tTransaction tx = null;\r\n\r\n\t\ttry {\r\n\t\t\tsession = factory.openSession();\r\n\t\t\ttx = session.beginTransaction();\r\n\r\n\t\t\tsession.save(obj);\r\n\t\t\ttx.commit();\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tif (tx != null)\r\n\t\t\t\ttx.rollback();\r\n\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (session != null)\r\n\t\t\t\tsession.close();\r\n\t\t}\r\n\t}", "public Team(String name) {\r\n this.name = name;\r\n team = new ArrayList<Hero>();\r\n }", "@Test\n public void testAddPlayer() {\n System.out.println(\"addPlayer\");\n Player player = new Player(\"New Player\");\n Team team = new Team();\n team.addPlayer(player);\n assertEquals(player, team.getPlayers().get(0));\n }", "public static boolean insert(Team team) throws SQLException\n {\n int ltn = getLongestTeamName();\n\n String update = \"INSERT INTO team (teamId, motto, totalKittiesKlicked) VALUES (?, ?, ?)\";\n PreparedStatement stmt = db.getPreparedStatement(update);\n stmt.setString(1, team.getTeamID());\n stmt.setString(2, team.getMotto());\n stmt.setInt(3, team.getTotalKittiesKlicked());\n db.executeUpdate(stmt);\n\n if (team.getTeamID().length() > ltn)\n {\n awardLongestTeamName(team.getTeamID());\n }\n return false;\n }", "public void insert() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.save(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void addPlayerToTable(Player player){\n\t\tgamePlayers.add(player);\n\t}" ]
[ "0.73873055", "0.738171", "0.7035984", "0.69917905", "0.6957811", "0.6580629", "0.65098727", "0.64657426", "0.6416753", "0.6372632", "0.6359155", "0.63395345", "0.62236995", "0.62019056", "0.6199356", "0.61964065", "0.6092031", "0.6082065", "0.6036818", "0.6024431", "0.60230994", "0.59957534", "0.5910391", "0.5885517", "0.5846843", "0.5840466", "0.58177924", "0.5812848", "0.5800196", "0.5791274", "0.5783138", "0.5779801", "0.5770927", "0.5750276", "0.5748284", "0.5742417", "0.57405734", "0.571374", "0.57043236", "0.5685948", "0.5685337", "0.56798273", "0.5678222", "0.5675387", "0.5648228", "0.56276786", "0.56187385", "0.5605659", "0.5538251", "0.5537665", "0.5537115", "0.5535594", "0.55265844", "0.5516262", "0.5493933", "0.5487865", "0.54796314", "0.547791", "0.5452892", "0.5449613", "0.5442712", "0.54418135", "0.5438845", "0.5433253", "0.54324746", "0.5427912", "0.5421036", "0.5419708", "0.54086137", "0.54076844", "0.5407321", "0.5398615", "0.53952324", "0.5394567", "0.53918636", "0.5391747", "0.5391578", "0.53892565", "0.53892076", "0.53765285", "0.5359767", "0.5356814", "0.53523844", "0.5342706", "0.53323424", "0.5329146", "0.5323593", "0.531826", "0.53150403", "0.5310628", "0.53052294", "0.5287324", "0.52864534", "0.5281075", "0.5280253", "0.5277879", "0.5276756", "0.5274045", "0.5273657", "0.5266988" ]
0.6369858
10
Removes entity from Team table.
void remove(Team team);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void deleteTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeam \r\n\t\tTeam team_1 = new wsdm.domain.Team();\r\n\t\tservice.deleteTeam(team_1);\r\n\t}", "public void deleteTeam(Team team) {\n\t\tEntityManager em = emfactory.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tTypedQuery<Team> deleteTeam = em.createQuery(\"select t from Team t where t.teamId = :selectedId\", Team.class);\n\t\tdeleteTeam.setParameter(\"selectedId\", team.getTeamId());\n\t\tdeleteTeam.setMaxResults(1);\n\t\tTeam toDelete = deleteTeam.getSingleResult();\n\t\tem.remove(toDelete);\n\t\tem.getTransaction().commit();\n\t\tem.close();\n\t}", "@Override\n\tpublic void deleteTeam(ProjectTeamBean projectTeamBean) {\n\t\t\n\t}", "public void removeEntityFromTeam(LivingEntity livingEntity, String teamName) {\n getTeam(teamName).removeEntry(livingEntity.getUniqueId().toString());\n }", "@Override\n\tpublic void deleteProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}", "public void deleteTeamById(UUID id) {\n Optional<Teams> optionalTeam = teamRepo.findById(id);\n if (!optionalTeam.isPresent())\n throw new TeamNotFoundException(\"Team Record with id \" + id + \" is not available\");\n teamRepo.deleteById(id);\n }", "int deleteByPrimaryKey(Integer teamId);", "@Override\n\tpublic void removeEntity(T t) {\n\t\tgetSession().delete(t);\n\t}", "@Override\n public void removeFromDb() {\n }", "@Override\n public boolean deleteTeamById(int id){\n teampokemondao.deleteTeamPokemonByTeam(id);\n typestatdao.deleteTypeStatByTeam(id);\n basestatdao.deleteBaseStatByTeam(id);\n \t String sql = \"DELETE FROM Team WHERE Team.teamid = \" + id;\n return jdbc.update(sql) > 0;\n }", "public void removeEntity(Entity entity){\n entityList.remove(entity);\n }", "void removeEntity(IViewEntity entity);", "void remove(Student entity);", "private void deleteFakeTeam(Player player) {\n\t\tPacketContainer packet = new PacketContainer(PacketType.Play.Server.SCOREBOARD_TEAM);\n\t\tpacket.getStrings().write(0, FakeTeamName);\n\t\tpacket.getIntegers().write(1, 1); // Set remove mode\n\t\t\n\t\ttry {\n\t\t\tProtocolLibrary.getProtocolManager().sendServerPacket(player, packet);\n\t\t} catch (InvocationTargetException e) {\n\t\t\t// Should never happen unless packet changes\n\t\t\tthrow new AssertionError(e);\n\t\t}\n\t}", "abstract protected void removeEntity(Entity entity);", "public void cmdRemoveTeam(User teller, Team team) {\n int playerCount = tournamentService.removeTeam(team);\n tournamentService.flush();\n if (playerCount < 0) {\n command.tell(teller, \"I''m not able to find {0} in the tournament.\", team);\n } else {\n command.tell(teller, \"Done. Team {0} is no longer in the tournament.\", team.getTeamCode());\n command.tell(teller, \"{0} players were also removed.\", playerCount);\n }\n }", "@Test\n\t@Transactional(value = TransactionMode.ROLLBACK)\n\t@UsingDataSet({ \"persona.json\", \"registro.json\", \"administrador.json\", \"cuenta.json\", \"empleado.json\",\n\t\t\t\"familia.json\", \"genero.json\", \"recolector.json\", \"planta.json\" })\n\tpublic void eliminarEmpladoTest() {\n\t\tEmpleado ad = entityManager.find(Empleado.class, \"125\");\n\t\tAssert.assertNotNull(ad);\n\t\tentityManager.remove(ad);\n\t\tAssert.assertNull(\"No se ha eliminado\", entityManager.find(Administrador.class, \"125\"));\n\t}", "public void remove() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.delete(this);\n\t\tsession.getTransaction().commit();\n\t}", "@Override\n\tpublic void remove(EmpType entity) {\n\t\t\n\t}", "public void entityRemoved() {}", "public final void remove(final E entity) {\n getJpaTemplate().remove(entity);\n }", "@RequestMapping(method = RequestMethod.DELETE, value = \"/teams/{id}\")\n public void deleteTeam(@PathVariable Integer id) {\n teamService.deleteTeam(id);\n }", "public int removeEntity(Entity e) {\n Entity removed = this.entity_list_.remove(e.name_);\n if (removed != null) {\n System.out.println(removed.name_ + \" has been removed from the map\");\n } else {\n System.err.println(\"The entity to be removed does not exist in the list of entities\");\n }\n if (this.map_grid_[e.getMapRelation().getMyYCoordinate()][e.getMapRelation().getMyXCoordinate()].getEntity() == e) {\n this.map_grid_[e.getMapRelation().getMyYCoordinate()][e.getMapRelation().getMyXCoordinate()].removeEntity();\n //e.setMapRelation(null);\n //System.gc();\n return 0;\n } else {\n System.err.println(\"The avatar to be removed cannot be found on the map.\");\n System.exit(-88);\n return -1;\n }\n }", "@Override\n\tpublic void remove(Object entity) {\n\t\t\n\t}", "public void removeTeam(Team t) {\r\n Iterator<Match> itr = this.resultsTree.iterator();\r\n while (itr.hasNext()) {\r\n //Match to be removed\r\n if (itr.next().containsTeam(t)) {\r\n itr.remove();\r\n }\r\n }\r\n \r\n //Decremente the number of teams left\r\n Team.nbTeam--;\r\n }", "@Test\r\n\tpublic void deleteTeamTeamplayerses() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeamTeamplayerses \r\n\t\tInteger team_teamId_5 = 0;\r\n\t\tInteger related_teamplayerses_teamPlayersId = 0;\r\n\t\tTeam response = null;\r\n\t\tresponse = service.deleteTeamTeamplayerses(team_teamId_5, related_teamplayerses_teamPlayersId);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteTeamTeamplayerses\r\n\t}", "@Test\r\n\tpublic void deleteTeamGamesForVisitorTeamFk() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeamGamesForVisitorTeamFk \r\n\t\tInteger team_teamId_1 = 0;\r\n\t\tInteger related_gamesforvisitorteamfk_gameId = 0;\r\n\t\tTeam response = null;\r\n\t\tresponse = service.deleteTeamGamesForVisitorTeamFk(team_teamId_1, related_gamesforvisitorteamfk_gameId);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteTeamGamesForVisitorTeamFk\r\n\t}", "public abstract void remove(Class<?> entity, Object paramObject);", "public void delete(String teamID) {\n Team team = get(teamID);\n \n TeamDB tdb = new TeamDB();\n PlayerDB pdb = new PlayerDB();\n GameDB gdb = new GameDB();\n \n ArrayList<String> pids = new ArrayList<>();\n List<String> gids = new ArrayList<>();\n \n List<Player> playerList = team.getPlayerList(); \n \n for (Player p : playerList) \n pids.add(p.getPlayerID());\n \n for (String s : pids) \n pdb.delete(pdb.getByPlayerID(s));\n\n for (Game g : team.getGameList()) \n gids.add(g.getGameID());\n for (Game g : team.getGameList1())\n gids.add(g.getGameID());\n \n team.getGameList().clear();\n team.getGameList1().clear();\n \n for (String s : gids)\n gdb.delete(gdb.get(s));\n \n tdb.delete(team);\n }", "protected void delete(Object entity) {\r\n try {\r\n entityManager.getTransaction().begin();\r\n entityManager.remove(entity);\r\n entityManager.getTransaction().commit();\r\n } catch (Exception e) {\r\n System.err.println(\"Erro ao remover Entidade \" + e.getMessage());\r\n }\r\n }", "private void removeTeam(String teamName) {\n getTeam(teamName).unregister();\n }", "@Override\n\tpublic void delete(EntityManagerFactory emf, Stop entity) {\n\t\t\n\t}", "@Test\r\n\tpublic void deleteTeamTswacct() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeamTswacct \r\n\t\tInteger team_teamId_6 = 0;\r\n\t\tInteger related_tswacct_tswAcctId = 0;\r\n\t\tTeam response = null;\r\n\t\tresponse = service.deleteTeamTswacct(team_teamId_6, related_tswacct_tswAcctId);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteTeamTswacct\r\n\t}", "public void delete(T entity) throws Exception{\n\t\tem.remove(entity);\n\t}", "public void delete(EmployeeEntity entity){\n EmployeeDB.getInstance().delete(entity);\n }", "@Test\r\n\tpublic void deleteTeamLevel() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeamLevel \r\n\t\tInteger team_teamId_7 = 0;\r\n\t\tInteger related_level_levelId = 0;\r\n\t\tTeam response = null;\r\n\t\tresponse = service.deleteTeamLevel(team_teamId_7, related_level_levelId);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteTeamLevel\r\n\t}", "public void deleteTAlgmntSalesTeam(final TAlgmntSalesTeamId tAlgmntSalesTeamId) {\n\t\tLOGGER.info(\"=========== Delete TAlgmntSalesTeam ===========\");\n\t\tfinal TAlgmntSalesTeam tAlgmntSalesTeam = genericDAO.get(clazz, tAlgmntSalesTeamId);\n\t\tgenericDAO.remove(tAlgmntSalesTeam);\n\t}", "@Override\n\tpublic void removeEntityById(String id) {\n\t\tClassMetadata classMetadata = sessionFactory.getClassMetadata(entityType);\n\t\tString idName = classMetadata.getIdentifierPropertyName();\n\t\tString simpleName = entityType.getSimpleName();\n\t\tString hql = \"delete from\" +simpleName+\"e where e.\"+idName+\"=?\";\n\t\tgetQuery(hql, id).executeUpdate();\n\t}", "public void deleteTeam(ActionEvent actionEvent) {}", "public void deleteOrLeaveTeam(MouseEvent mouseEvent) {\n if(getUsernameOfOrganizer().compareTo(teamViewController.getUsernameOfCurrentUser())==0){\n\n try {\n boolean outcome = Update.removeTeam(team.getId());\n if (outcome == true)\n teamViewController.deleteTeamUI(this);\n }catch (DiscoveryException | ServiceUnavailableException s){\n teamViewController.destroy();\n teamViewController.showPopUpOfExplorationMode();\n\n }catch (Exception n) {\n teamViewController.showPopUp(\"There was a problem. Impossible to remove team\");\n }\n\n }else { //if i'm not the organizer just leave team\n\n MemberController me = null;\n for(int i=0; i<membersController.size(); i++) {\n if (membersController.get(i).getUsername().compareTo(getUsernameOfCurrentUser()) == 0) {\n me = membersController.get(i);\n }\n\n }\n //remove from database (blocking UI)\n try {\n boolean outcome = Update.removeMemberFromTeam(getUsernameOfCurrentUser(), getIdTeam());\n\n //since the username is unique we can scroll all the boxMembers until we find a child whose username is the same of this\n if (outcome == true) {\n removeMemberController(me);\n removeMemberFromTeam(getUsernameOfCurrentUser());\n //update UI\n teamViewController.deleteTeamUI(this);\n }\n }catch (DiscoveryException | ServiceUnavailableException s){\n teamViewController.destroy();\n teamViewController.showPopUpOfExplorationMode();\n\n }catch (Exception n) {\n teamViewController.showPopUp(\"There was a problem. Impossible to leave team.\");\n }\n\n }\n }", "@Override\n\tpublic void remove(Post entity) {\n\t\t\n\t}", "@Test\r\n\tpublic void deleteTeamGamesForHomeTeamFk() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeamGamesForHomeTeamFk \r\n\t\tInteger team_teamId_4 = 0;\r\n\t\tInteger related_gamesforhometeamfk_gameId = 0;\r\n\t\tTeam response = null;\r\n\t\tresponse = service.deleteTeamGamesForHomeTeamFk(team_teamId_4, related_gamesforhometeamfk_gameId);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteTeamGamesForHomeTeamFk\r\n\t}", "public String deleteUserDetails() {\n\r\n EntityManager em = CreateEntityManager.getEntityManager();\r\n EntityTransaction etx = em.getTransaction(); \r\n\r\n try { \r\n etx.begin(); \r\n if (golfUserDetails.getUserId() != null) {\r\n em.remove(em.merge(golfUserDetails));\r\n }\r\n etx.commit();\r\n em.close();\r\n } catch (Exception ex) {\r\n System.out.println(\"deleteCourseDetails - remove : Exception : \" + ex.getMessage());\r\n }\r\n \r\n return displayHomePage();\r\n }", "public void remove(T entity) throws DataAccessException;", "public void delete(E entity){\n Object idEntity = HibernateUtil.getIdEntity(entity);\n EntityTransaction entityTransaction = entityManager.getTransaction();\n entityTransaction.begin();\n entityManager.createNativeQuery(\"delete from \" + entity.getClass().getSimpleName().toLowerCase() +\n \" where id = \" + idEntity).executeUpdate();\n entityTransaction.commit();\n }", "void deleteEntityById(Long id);", "int deleteByExample(SysTeamExample example);", "private void removeEntity(int index)\n\t{\n\t\tthis.entities.get(index).onDespawn();\n\t\tthis.spatialHashGrid.remove(this.entities.get(index).getSpatialHashGridHandle());\n\t\t\n\t\tthis.entities.set(index, this.entities.get(this.entities.size() - 1));\n\t\tthis.entities.remove(this.entities.size() - 1);\n\t}", "public void eliminar(Long Id){\r\n EspecieEntity productoEliminar=em.find(EspecieEntity.class, Id);\r\n em.remove(productoEliminar);\r\n }", "void removeConstraintEntity(IViewEntity entity);", "@Test\n void removeTest() {\n Admin anAdmin = new Admin();\n anAdmin.setEmail(\"[email protected]\");\n anAdmin.setName(\"Giovanni\");\n anAdmin.setSurname(\"Gialli\");\n anAdmin.setPassword(\"Ciao1234.\");\n\n try {\n entityManager = factor.createEntityManager();\n entityManager.getTransaction().begin();\n entityManager.persist(anAdmin);\n entityManager.getTransaction().commit();\n } finally {\n entityManager.close();\n }\n adminJpa.remove(anAdmin);\n assertThrows(NoResultException.class, () -> {\n adminJpa.retrieveByEmailPassword(\"[email protected]\", \"Ciao1234.\");\n });\n }", "@Override\n public void deletar(Object pacienteParametro) {\n Paciente paciente;\n paciente = (Paciente) pacienteParametro;\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n em.getTransaction().begin();\n em.remove(em.merge(paciente));\n em.getTransaction().commit();\n em.close();\n factory.close();\n }", "public boolean remove(String id) throws SQLException\n {\n String update = \"DELETE FROM Persons WHERE teamId = ?\";\n PreparedStatement stmt = db.getPreparedStatement(update);\n stmt.setString(1, id);\n db.executeUpdate(stmt);\n\n return false;\n }", "@Test\n\tpublic void testRemoval() {\n\t\tLong id = RedisQuery.nextUniqueId();\n\t\tEntityTest et = new EntityTest(id, \"EntityTestToRemove\");\n\t\tif (RedisQuery.save(et, id)) {\n\t\t\t// Remove the entity\n\t\t\tRedisQuery.remove(et, id);\n\t\t} else {\n\t\t\tthrow new AssertionError(\"Unable to create entity to remove\");\n\t\t}\n\t}", "@Override\n public E delete(final E entity) {\n LOG.info(\"[delete] Start: entity = \" + entity.getClass().getSimpleName());\n entityManager.remove(entity);\n LOG.info(\"[delete] End\");\n return entity;\n }", "public void removePlayerFromTable(Player player){\n\t\tgamePlayers.remove(player);\n\t}", "public void remove(E e) {\n\t\tentities.remove(e);\n\t}", "@Override\r\n public void deleteEntity(String entityName) {\n\r\n }", "public void remove(ProfessionEntity profession) throws SQLException {\n openTransactionSession();\n\n Session session = getSession();\n session.remove(profession);\n\n //close session with a transaction\n closeTransactionSession();\n }", "public RemoveTeamListener(JTable table, GithubManager manager) {\n super(table);\n this.manager = manager;\n }", "public void delete(HrJBorrowcontract entity);", "@Override\n\tpublic void remove(Object obj) throws SQLException {\n\t\tdao.delete(obj);\n\n\t}", "@Observable\n public AbstractBatchAction<T> removeFromRemoveEntities(final T entity) {\n this.removeEntities.remove(entity);\n return this;\n }", "public static boolean clear() throws SQLException\n {\n String update = \"DELETE FROM team\";\n db.executeUpdate(db.getPreparedStatement(update));\n\n return false;\n }", "@GetMapping(\"/deleteTeam/{id}\")\n public String deleteTeam(@Valid @PathVariable (value = \"id\") long id) {\n this.teamService.deleteTeamById(id);\n return \"redirect:/teamPage\";\n }", "public void removeFightsystem( Long fightsystemId )\r\n {\n\r\n }", "@Observable\n public AbstractBatchAction<T> removeFromSaveEntities(final T entity) {\n this.saveEntities.remove(entity);\n return this;\n }", "void delete(Entity entity);", "public void removeByCompanyId(long companyId);", "void entityDestroyed(Entity entity);", "private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }", "private void delete() {\n\t\tConfiguration conf = new Configuration();\n\t\tconf.configure(\"hibernate.cfg.xml\");\n\t\tSessionFactory sf = conf.buildSessionFactory();\n\t\tSession s = sf.openSession();\n\t\ts.beginTransaction();\n\n\t\tQuery query = s.createQuery(\"delete from OldStudent where name='Michael'\");\n\t\tint count = query.executeUpdate();\n\t\tSystem.out.println(\"Number of Rows Deleted in the oldstudent table=\" + count);\n\n\t\ts.getTransaction().commit();\n\t\ts.clear();// s.evict() on all student objects in session\n\t\tsf.close();\n\n\t}", "@Test\n public void testRemove() {\n System.out.println(\"remove\");\n Repositorio repo = new RepositorioImpl();\n Persona persona = new Persona();\n persona.setNombre(\"Ismael\");\n persona.setApellido(\"González\");\n persona.setNumeroDocumento(\"4475199\");\n repo.crear(persona);\n \n Persona personaAEliminar = (Persona) repo.buscar(persona.getId());\n assertNotNull(personaAEliminar);\n \n //eliminacion\n repo.eliminar(personaAEliminar);\n Persona personaEliminada = (Persona) repo.buscar(persona.getId());\n assertNull(personaEliminada);\n }", "public void remove()\n {\n domain.removeParticipant(participant);\n }", "void resetMyTeam(Team team);", "@Override\n\tpublic void delete(FxzfLane entity) {\n\t\t\n\t}", "@Override\r\n\tpublic void delete(Empregado entity) throws Exception {\n\t\tentity.setAtivo(false);\r\n\t\tem.unwrap(Session.class).update(entity);\r\n\t}", "public void removeTeamMember(final Artifact artifact);", "@Test\r\n\tpublic void deleteTeamProgram() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeamProgram \r\n\t\tInteger team_teamId_3 = 0;\r\n\t\tInteger related_program_programId = 0;\r\n\t\tTeam response = null;\r\n\t\tresponse = service.deleteTeamProgram(team_teamId_3, related_program_programId);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteTeamProgram\r\n\t}", "@Override\n public void remove(int id) {\n Venda v;\n\n v = em.find(Venda.class, id);\n em.remove(v);\n// transaction.commit();\n }", "@Test\n\tpublic void testRemoveMentee()\n\t{\n\t\tmentor.removeMentee(mentee);\n\t\tassertThat(mentor.getMentees().size()).isEqualTo(0);\n\t}", "public final void delete() {\n\t\tOllie.delete(this);\n\t\tOllie.removeEntity(this);\n\t\tnotifyChange();\n\t\tid = null;\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 }", "void delete(int entityId);", "public void delete(T entity) {\n\t\tsessionFactory.getCurrentSession().delete(entity);\n\t}", "@Override\n public void removed(Entity e) {\n AI ai = AIm.get(e);\n if (ai.active) {\n ai.active = false;\n startMove = startAction = true;\n groupAiDone= false;\n screen.processTurn();\n // Future note: This transition comes quite abruptly.\n // It would be nice to somehow delay it, but because\n // the entity has just been removed, it won't be\n // processed any more. Perhaps give processTurn()\n // a boolean argument which will pause for a second\n // or so before selecting the new entity and moving\n // the camera on.\n\n }\n }", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "@Override\n public void delete(JavaStudyClub javaStudyClub) {\n entityManager.remove(javaStudyClub);\n }", "void remove(PK id);", "public void deleteDefectEntity(Long id);", "public void removeMentorFromTeam(Id teamId, Mentor mentor) throws AlfredException {\n if (!this.mentorList.contains(mentor.getId())) {\n throw new ModelValidationException(\"Mentor does not exist in mentorList.\");\n }\n\n Team targetTeam;\n try {\n targetTeam = this.getTeam(teamId);\n } catch (MissingEntityException e) {\n throw e;\n }\n boolean isSuccessful = targetTeam.deleteMentor(mentor);\n if (!isSuccessful) {\n throw new AlfredModelException(\"Team does not have this Mentorr\");\n }\n\n }", "@Override\n\tpublic void delete(Translator entity) {\n\t\t\n\t}", "@Override\n\tpublic void eliminar(Seccion seccion) {\n\t\tentity.getTransaction().begin();\n\t\tentity.remove(seccion);\n\t\tentity.getTransaction().commit();\n\t}", "public void delete() throws EntityPersistenceException {\n\n }", "@Override\r\n public void eliminar(final Empleat entitat) throws UtilitatPersistenciaException {\r\n JdbcPreparedDao jdbcDao = new JdbcPreparedDao() {\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n int field=0;\r\n pstm.setInt(++field, entitat.getCodi());\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"delete from Empleat where codi = ?\";\r\n }\r\n };\r\n UtilitatJdbcPlus.executar(con, jdbcDao);\r\n }", "public void elimina(Long id) {\n\n final EntityManager em = getEntityManager();\n\n try {\n\n final EntityTransaction tx = em.getTransaction();\n\n tx.begin();\n\n // Busca un conocido usando su llave primaria.\n\n final Conocido modelo = em.find(Conocido.class, id);\n\n if (modelo != null) {\n\n /* Si la referencia no es nula, significa que el modelo se encontró la\n\n * referencia no es nula y se elimina. */\n\n em.remove(modelo);\n\n }\n\n tx.commit();\n\n } finally {\n\n em.close();\n\n }\n\n }", "public void removeTicket(Ticket ticket) throws DavException;", "public void delete(FacultyBean bean) throws ApplicationException {\n\t\t\tConnection conn = null;\n\t\t\ttry {\n\n\t\t\t\tconn = JDBCDataSource.getConnection();\n\t\t\t\tconn.setAutoCommit(false);\n\t\t\t\tPreparedStatement pstmt = conn.prepareStatement(\"DELETE FROM ST_FACULTY WHERE ID=?\");\n\t\t\t\tpstmt.setLong(1, bean.getId());\n\t\t\t\tpstmt.executeUpdate();\n\t\t\t\tconn.commit();\n\t\t\t} catch (Exception e) {\n\t\t\t//\tlog.error(\"DATABASE EXCEPTION \", e);\n\t\t\t\ttry {\n\t\t\t\t\tconn.rollback();\n\t\t\t\t} catch (Exception ex) {\n\t\t\t\t\tthrow new ApplicationException(\"Exception in Faculty Model rollback\" + ex.getMessage());\n\t\t\t\t}\n\t\t\t\tthrow new ApplicationException(\"Exception in Faculty Model Delete Method\");\n\t\t\t} finally {\n\t\t\t\tJDBCDataSource.closeConnection(conn);\n\t\t\t}\n\t\t//\tlog.debug(\"Faculty Model delete method End\");\n\t\t}", "@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }", "void removeById(Long id) throws DaoException;" ]
[ "0.714651", "0.71201885", "0.68708295", "0.67095155", "0.663773", "0.65598655", "0.6498214", "0.6473926", "0.6433683", "0.6287702", "0.6280389", "0.62679124", "0.62626076", "0.626247", "0.62298423", "0.6160677", "0.6108166", "0.60877347", "0.60636586", "0.60507286", "0.6045371", "0.60413146", "0.59810436", "0.5969056", "0.596438", "0.5940124", "0.59119904", "0.5903222", "0.5885582", "0.58785504", "0.5864962", "0.58608097", "0.5845694", "0.5784977", "0.57801723", "0.57789284", "0.57555497", "0.57521915", "0.5726647", "0.5722724", "0.5682702", "0.56825095", "0.568048", "0.56790996", "0.5672894", "0.5649647", "0.5649573", "0.56494236", "0.5646201", "0.56371385", "0.5624097", "0.56151485", "0.56114584", "0.5609446", "0.5604271", "0.5600652", "0.5599633", "0.5590809", "0.5567861", "0.5566465", "0.55661917", "0.55545753", "0.55463254", "0.55239576", "0.5523077", "0.5521388", "0.55194646", "0.55184495", "0.5517249", "0.5513615", "0.54952145", "0.54933757", "0.54928017", "0.5490014", "0.5487221", "0.5485483", "0.5483719", "0.54830956", "0.5467311", "0.5464849", "0.54524666", "0.5447479", "0.5423261", "0.5416167", "0.5414557", "0.5413523", "0.54130095", "0.5411993", "0.5410447", "0.5408075", "0.54069006", "0.5403908", "0.5402138", "0.5399838", "0.5386826", "0.5384641", "0.5382849", "0.5377791", "0.5373283", "0.53728724" ]
0.72138375
0
Find and return Team by name.
Team findByName(String name);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic TeamPO findTeamByName(String name) {\n\t\treturn teams.findTeamByShortName(name);\r\n\t}", "public Team findTeamFromName(String name) {\r\n Iterator<Team> itr = this.getTeamTreeFromMatchTree().iterator();\r\n Team team;\r\n while (itr.hasNext()){\r\n team = itr.next();\r\n if (team.getName().equals(name)){\r\n return team;\r\n }\r\n }\r\n return null;\r\n }", "public Team getTeamByName(String name) {\n\t\tTeam t = null;\n\t\ttry {\n\t\t\tPreparedStatement statement = null;\n\t\t\tResultSet rs = null;\n\t\t\tString teamRecords_sql = \"SELECT * FROM \" + team_table + \" WHERE name='\" + name + \"'\";\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.prepareStatement(teamRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tList<Player> players = new ArrayList<Player>();\n\t\t\tif (rs.next()) {\n\t\t\t\tplayers = formatPlayers(getPlayersByTeamId(rs.getInt(1)));\n\t\t\t\tt = new Team(players, rs.getString(2), rs.getString(3), rs.getString(4), rs.getDate(5));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "public SoccerTeam getTeam(String teamName) throws TeamNotFoundException {\n\n for (int i = 0; i < this.teams.size(); i++) {\n SoccerTeam team = this.teams.get(i);\n\n if (team.getName().equals(teamName)){\n return team;\n }\n }\n throw new TeamNotFoundException(\"Team that you are searching for is not found\");\n }", "Team findById(Long id);", "private Team getTeam(String teamName) {\n return scoreboard.getTeam(trimString(teamName));\n }", "public Team get(Long id);", "@Override\n\tpublic TeamInfo findById(String id) {\n\t\treturn repository.findOne(id);\n\t}", "public Teams getTeamById(UUID id)\n {\n Optional<Teams> optionalTeam = teamRepo.findById(id);\n if(!optionalTeam.isPresent())\n throw new TeamNotFoundException(\"Team Record with \" + id + \" is not available\");\n return teamRepo.findById(id).get();\n }", "public Team(String name) {\n this.name = name;\n }", "public Match findMatchFromTeamName(String name1, String name2){\r\n Iterator<Match> itr = this.resultsTree.iterator();\r\n Match m;\r\n while (itr.hasNext()) {\r\n m = itr.next();\r\n if (m.getTeam1().getName().equals(name1) \r\n && m.getTeam2().getName().equals(name2)){\r\n return m;\r\n }\r\n }\r\n return null;\r\n }", "Team getMyTeam();", "public static Team getTeam(long id) {\n return find().where().eq(\"id\", id).findUnique();\n }", "public static Team find(String id) throws SQLException\n {\n String query = \"SELECT * FROM team WHERE teamID = ?\";\n PreparedStatement stmt = db.getPreparedStatement(query);\n stmt.setString(1, id);\n Team team = null;\n ResultSet r = db.executeQuery(stmt);\n if (r.next())\n {\n team = new Team(r.getString(\"teamID\"), r.getString(\"motto\"), r.getInt(\"totalKittiesKlicked\"));\n }\n\n return team;\n }", "public Team get(String teamID) {\n TeamDB tdb = new TeamDB();\n return tdb.get(teamID);\n }", "public static int findByName(String teamName) throws DALException {\n\n\t\t\t\t\tConnection cnx = null;\n\t\t\t\t\tPreparedStatement pstmt = null;\n\t\t\t\t\tResultSet rs = null;\n\t\t\t\t\tint idTeam = 0;\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// Connection DB\n\t\t\t\t\t\tcnx = DBConnection.connect();\n\t\t\t\t\t\tpstmt = cnx.prepareStatement(SEARCH_NAME_TEAM);\n\t\t\t\t\t\tpstmt.setString(1, teamName);\n\t\t\t\t\t\trs = pstmt.executeQuery();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (rs.next()) {\n\t\t\t\t\t\t\tidTeam = rs.getInt(\"idTeams\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\tthrow new DALException(\"Problem - search teams By Name - TeamDAO - Request : \"+pstmt+ \" \" + e.getMessage());\n\t\t\t\t\t} finally {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (rs != null)\n\t\t\t\t\t\t\t\trs.close();\n\t\t\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\t\t\tif (cnx != null)\n\t\t\t\t\t\t\t\tcnx.close();\n\t\t\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\t\t\tthrow new DALException(\"Problem - Closing connection - \" + e.getMessage());\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\treturn idTeam;\n\n\t\t\t\t}", "public static Team findById(int id) throws DALException {\n\n\t\t\tConnection cnx = null;\n\t\t\tPreparedStatement pstmt = null;\n\t\t\tResultSet rs = null;\n\t\t\tTeam team = new Team();\n\n\t\t\ttry {\n\t\t\t\t// Connection DB\n\t\t\t\tcnx = DBConnection.connect();\n\t\t\t\tpstmt = cnx.prepareStatement(SEARCH_ID_TEAM);\n\t\t\t\tpstmt.setInt(1, id);\n\t\t\t\trs = pstmt.executeQuery();\n\n\t\t\t\tif (rs.next()) {\n\n\t\t\t\t\tteam.setIdTeam(rs.getInt(\"idTeams\"));\n\t\t\t\t\tteam.setName(rs.getString(\"name\"));\n\t\t\t\t\t\n\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tthrow new DALException(\"Problem - search teams By Id - TeamDAO - Request :\"+ pstmt+ \" Team: \" + team + e.getMessage());\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (rs != null)\n\t\t\t\t\t\trs.close();\n\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\tif (cnx != null)\n\t\t\t\t\t\tcnx.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tthrow new DALException(\"Problem - Closing connection - \" + e.getMessage());\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn team;\n\n\t\t}", "public boolean findTeam(String teamName) throws SQLException {\n\t\tConnection conn = DriverManager.getConnection(\"jdbc:sqlite:users\");\n\t\tStatement stmt = conn.createStatement();\n\t\tString SQL = \"select * from leaguestandings where TeamName = '\" + teamName + \"';\";\n\n\t\tResultSet rset = stmt.executeQuery(SQL);\n\n\t\tif (rset.next()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "TeamDTO findOne(Long id);", "@RequestMapping(method = RequestMethod.GET, value = \"/teamsForUser/{name}\")\n public JSONObject getTeamForUserPage(@PathVariable String name) {\n JSONArray teamJsonArray = getAllTeamsForUserPage();\n JSONObject jsonObject = new JSONObject();\n\n for (int i = 0; i < teamJsonArray.size(); i++) {\n if (teamJsonArray.get(i).toString().contains(name)) {\n return (JSONObject) teamJsonArray.get(i);\n }\n }\n return jsonObject;\n }", "public String getTeam(int id){\r\n\t\treturn teamList.get(id);\r\n\t}", "public Team(String name) {\r\n this.name = name;\r\n team = new ArrayList<Hero>();\r\n }", "public ResultSet getTeamInfo(String teamsname) throws SQLException\n\t{\n\t\t// Create a connection to the database.\n\t\t conn = DriverManager.getConnection(DB_URL);\n\t\t// Create a Statement object for the query.\n\t\tStatement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);\n\t\t// Execute the query.\n\t\tResultSet resultSet = stmt.executeQuery(\"SELECT * FROM Team WHERE teamName = '\" + teamsname + \"'\");\n\t\t\n\t\treturn resultSet;\n\t\n\t}", "public void setTeamName(String name) {\n\t\tteamName = name;\n\t}", "public int getTeamIdByName(String name) {\n\t\tint id = 0;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamIdByNameRecords_sql = \"SELECT id FROM \" + team_table + \" WHERE name='\" + name + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamIdByNameRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tid = rs.getInt(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn id;\n\t}", "public User getPlayer(String name) {\n\t\tUser ret = null;\n\t\tList<User> searchResult = this.players.stream().filter(x->x.name.equals(name)).collect(Collectors.toList());\n\t\tif (!searchResult.isEmpty()) {\n\t\t\tret = searchResult.get(0);\n\t\t}\n\t\treturn ret;\n\t}", "public Team getTeam() {\n Team team = new Team();\n team.setTeamName(this.getTeamNameDataLabel().getText());\n team.setCaptain(this.getCaptainDataLabel().getText());\n if (this.getCoachDataLabel().equals(\"\")) {\n team.setCoach(null);\n } else {\n team.setCoach(this.getCoachDataLabel().getText());\n }\n if (this.getAchievementsDataLabel().equals(\"\")) {\n team.setAchievements(null);\n } else {\n team.setAchievements(this.getAchievementsDataLabel().getText());\n }\n return team;\n }", "List<Team> findTeamsByUserId(UserId userId);", "public String getTeamName() {\r\n return teamName;\r\n }", "public Team selectTeam() {\r\n \r\n String[] list = new String[controller.getTeams().size()];\r\n for (int i = 0; i < controller.getTeams().size(); i++) {\r\n list[i] = controller.getTeams().get(i).getName();\r\n }\r\n\r\n JComboBox cmbOption = new JComboBox(list);\r\n int input = JOptionPane.showOptionDialog(null, cmbOption, \"Select Team that your like Delete\",JOptionPane.DEFAULT_OPTION,JOptionPane.QUESTION_MESSAGE, null, null, null);\r\n if(input==-1){\r\n return null;\r\n }\r\n Team teamAux = controller.searchTeam((String) cmbOption.getSelectedItem());\r\n return teamAux;\r\n }", "@Override\n public Team getTeamById(int id){\n try {\n String sql = \"SELECT * FROM Team WHERE Team.teamid = ?\";\n Team team = jdbc.queryForObject(sql, new TeamMapper(), id);\n team.setUser(getUserFromTeam(team));\n return team;\n }catch(DataAccessException ex){\n return null;\n }\n }", "public String getTeamNameById(int id) {\n\t\tString t = \"\";\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamByIdRecords_sql = \"SELECT name FROM \" + team_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tt = rs.getString(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "public Person find(String name) {\n\t\tfor (Person person : listOfPeople) {\n\t\t\tif(person.getName().contains(name)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null; // only reached if person with name not found by search.\n\t}", "public VwTeams get(int teamId)\n\t{\n\t\tVwTeams [] results = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tresults = dao.findWhereTeamIdEquals(teamId);\t\t\t\n\t\t}\n\t\tcatch (VwTeamsDaoException e)\n\t\t{\n\t\t\tlogger.error(e.getMessage());\n\t\t\t\n\t\t\terror.setCode(Errors.Codes.DB_DAO.getCode());\n\t\t\terror.setWindowTitle(Errors.Codes.DB_DAO.getWindowTitle());\n\t\t\terror.setMessage(Errors.Codes.DB_DAO.getMessage());\n\t\t\t\n\t\t\terror.setExceptionMessage(e.getMessage());\n\t\t\t\n\t\t\tpdr.setError(error);\n\t\t\t\n\t\t\tif (logger.isDebugEnabled())\n\t\t\t\te.printStackTrace();\n\t\t\t\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn results.length == 0 ? null : results[0];\n\t}", "public String getTeamId() {\r\n\t\treturn teamName;\r\n\t}", "SysTeam selectByPrimaryKey(Integer teamId);", "private static Team getTeam(Connection con,Long teamId) {\n\n Team team = null;\n\n String query = SQLConstants.GET_TEAM_BY_TEAM_ID;\n\n try {\n team = new Team();\n //Connection con = JdbcConnection.getConnection();\n PreparedStatement pstmt = con.prepareStatement(query);\n pstmt.setLong(1, teamId);\n\n ResultSet rs = pstmt.executeQuery();\n\n while (rs.next()) {\n team.setId(rs.getLong(\"id\"));\n team.setName(rs.getString(\"name\"));\n team.setDescribe(rs.getString(\"describe\"));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return team;\n\n }", "public String getTeamName() {\n\t\treturn teamName;\n\t}", "public String getTeamName() {\n\t\treturn teamName;\n\t}", "TeamResultWrapper findTeams(String personId,\n String partOfGroupname, int offset, int pageSize);", "public Player getPlayerFromList(String name){\n for (Player player : players){\n if (player.getName().equals(name)){\n return player;\n }\n }\n return null; //This will never happen. Will always be found. Only called from the takeoverTerritory method\n }", "public Individual getIndividualByName(String name) throws ObjectNotFoundException{\n \t\n\t\tList<Individual> individualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter = 0;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\n\t\t\tif (individual.getName().equals(name)) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size == individualList.size() && counter == 0)\n\t\t\tthrow new ObjectNotFoundException(\"individual\", \"name\", name);\n\n\t\treturn individual;\n\n\n }", "public Story findByName(String name) {\n EntityManager entityManager = getEntityManager();\n\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<Story> criteria = criteriaBuilder.createQuery(Story.class);\n Root<Story> root = criteria.from(Story.class);\n\n criteria.select(root);\n criteria.where(criteriaBuilder.equal(root.get(Story_.name), name));\n \n return getSingleResult(entityManager.createQuery(criteria));\n }", "public Team getTeamById(int id, ResultSet rsMatches) {\n\t\tTeam t = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamByIdRecords_sql = \"SELECT * FROM \" + team_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tt = new Team(formatPlayers(getPlayersByTeamId(id)), rs.getString(2), rs.getString(3), rs.getString(4),\n\t\t\t\t\t\trs.getDate(5));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "public String getTeam() {\n return team;\n }", "Object find(String name);", "public static ArrayList<Team> findTeamProject() throws DALException {\n\t\t\tConnection cnx = null;\n\t\t\tPreparedStatement pstmt = null;\n\t\t\tResultSet rs = null;\n\t\t\tArrayList<Team> listTeams = new ArrayList<>();\n\n\t\t\ttry {\n\t\t\t\t// Connection DB\n\t\t\t\tcnx = DBConnection.connect();\n\t\t\t\tpstmt = cnx.prepareStatement(LIST_TEAMS_PROJECTS);\n\t\t\t\trs = pstmt.executeQuery();\n\n\t\t\t\t// For each team\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tTeam team = new Team();\n\t\t\t\t\tteam.setIdTeam(rs.getInt(\"Teams_IdTeams\"));\n\t\t\t\t\tteam.setName(rs.getString(\"Teams_name\"));\n\t\t\t\t\tteam.setIdProject(rs.getInt(\"idProjects\"));\n\t\t\t\t\tteam.setNameProject(rs.getString(\"nameProject\"));\n\t\t\t\t\tlistTeams.add(team);\n\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\n\t\t\t\tthrow new DALException(\"Problem - listTeamHisProject - TeamDAO - Request : \"+ pstmt+ \" \" + e.getMessage());\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (rs != null)\n\t\t\t\t\t\trs.close();\n\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\tif (cnx != null)\n\t\t\t\t\t\tcnx.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tthrow new DALException(\"Problem - Closing connection - \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn listTeams;\n\n\t\t}", "public int getTeamIdByPlayerName(String pName) {\n\t\tint id = 0;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamIdByPlayerNameRecords_sql = \"SELECT idTeam FROM \" + player_table + \" WHERE name='\" + pName + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamIdByPlayerNameRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tid = rs.getInt(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn id;\n\t}", "public Player getTeam(Player player) {\n if (teams.containsKey(player)) {\n return player;\n }\n for (Player p : teams.keySet()) {\n if (teams.get(p).contains(player)) {\n return p;\n }\n }\n return null;\n }", "public Tutor findTutor(final String name) {\n for (Tutor tutor : tutors) {\n if (name.equals(tutor.getName())) {\n return tutor;\n }\n }\n\n return null;\n }", "public Player getPlayerByName(String name){\n for (Player player : players){\n if (name.equals(player.getName())){\n return player;\n }\n }\n return null;\n }", "public Movie findMovie(String name){\n\n Movie find = null ;\n\n for (Movie movie :movies) {\n\n if(movie.getTitle().equals(name)){\n\n find = movie;\n\n }\n\n }\n\n return find;\n\n }", "Road findByName(String toFind, ArrayList<Road> list)\n\t{\n\t\tRoad tmp;\n\t\tIterator<Road> it = list.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\ttmp = it.next();\n\t\t\tif(tmp.getName().equals(toFind))\n\t\t\t{\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Team getTeam() {\n return team;\n }", "@WebMethod public Team addTeam(String name) throws TeamAlreadyExists;", "int getTeam();", "@Override\r\n\tpublic String getTeam() {\n\t\treturn team;\r\n\t}", "public FightTeam team();", "public String getTeam() {\r\n\t\treturn Team;\r\n\t}", "public String getTeam() {\n\t\treturn team;\n\t}", "private boolean teamExist(String teamName) {\n boolean doesExist = false;\n for (Team team : scoreboard.getTeams()) if (team.getName().equals(teamName)) doesExist = true;\n return doesExist;\n }", "public static Team whoWonGameTeam() {\r\n\t\tint highest = Main.winScoreNumb;\r\n\t\tTeam winner = null;\r\n\t\t\r\n\t\t//Winner is team one.\r\n\t\tif (Utils.stringToInt(Main.team1Score) >= highest) {\r\n\t\t\thighest = Utils.stringToInt(Main.team1Score);\r\n\t\t\twinner = Main.teamOne;\r\n\t\t}\r\n\t\t//Winner is team two.\r\n\t\tif (Utils.stringToInt(Main.team2Score) >= highest) {\r\n\t\t\thighest = Utils.stringToInt(Main.team2Score);\r\n\t\t\twinner = Main.teamTwo;\r\n\t\t}\r\n\t\t\r\n\t\treturn winner;\r\n\t}", "Team createTeam();", "private TeamId findWinningTeam(){\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS) {\n return TeamId.TEAM_1;\n }\n else {\n return TeamId.TEAM_2;\n }\n }", "public Team(String name) {\n\t\tthis(name, Color.BLACK);\n\t}", "public Guest getGuest(String name) {\n\t\tString checkName = name.toUpperCase();\n for (Guest guest : guestList) {\n if (guest.getName().toUpperCase().equals(checkName)){\n return guest;\n }\n }\n return null;\n }", "@Override\n\tpublic Teacher findByName(String name) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tString hql=\"from Teacher t where name=?\";\n\t\tQuery query=session.createQuery(hql);\n\t\tquery.setParameter(0, name);\n\t\tList<Teacher> tlist=query.list();\n\t\tTeacher teacher=tlist.get(0);\n\t\treturn teacher;\n\t}", "public <T extends Actor> T findActor(String name) {\n com.guidebee.game.engine.scene.Actor actor = internalGroup.findActor(name);\n if (actor != null) {\n return (T) actor.getUserObject();\n }\n return null;\n\n }", "public Team getTeam() {\r\n\t\treturn team;\r\n\t}", "Person findPerson(String name);", "List<Team> findAll();", "public List<String> getSports(String name){\r\n\t\tList<String> list = new ArrayList<String>();\r\n\t\tConnection conn = DBConnect.getConnection();\r\n\t\tString sql = \"select sports_name from team where delegation_name= '\" + name + \"'\";\r\n\t\ttry {\r\n\t\t\tPreparedStatement pst = conn.prepareStatement(sql);\r\n\t\t\tResultSet rst = pst.executeQuery();\r\n\t\t\twhile(rst.next()) {\r\n\t\t\t\tString team = rst.getString(\"sports_name\");\r\n\t\t\t\tlist.add(team);\r\n\t\t\t}\r\n\t\t\trst.close();\r\n\t\t\tpst.close();\r\n\t\t}catch (SQLException e) {\r\n\t\t\t// TODO: handle exception\r\n e.printStackTrace();\t\t\t\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "Optional<Timeline> findByName(String name);", "public static Team getSecondPlace() {\n\t\tif (matches != null && matches.length > 0 && matches[0] != null)\n\t\t\treturn matches[0].getLoser();\n\t\treturn null;\n\t}", "public Player getPlayerinTable(String name) {\r\n for (Player player : this.players) {\r\n if (player.getName().equals(name)) {\r\n return player;\r\n }\r\n }\r\n return null;\r\n }", "Season findByName(String name);", "@Given(\"^I navigate to team page \\\"([^\\\"]*)\\\"$\")\n public void navigate_to_teamPage(String nameTeam){\n addNewTeam = mainPage.clickNewTeam();\n teamPage = addNewTeam.createTeam(nameTeam);\n }", "public void setTeamName(String teamName) {\r\n this.teamName = teamName;\r\n }", "@GET\n @Path(\"Current/Team/{teamId}\")\n public Response getTeamByCurrentUser(@PathParam(\"teamId\") Long teamId) {\n Response r = Response.noContent().build();\n User currentUser = userFacade.getCurrentUser();\n final Collection<Game> playedGames = gameFacade.findRegisteredGames(currentUser.getId());\n for (Game g : playedGames) {\n Collection<Team> teams = g.getTeams();\n for (Team t : teams) {\n if (teamId.equals(t.getId())) {\n for (Player p : t.getPlayers()) {\n if (p.getUserId().equals(currentUser.getId())) {\n r = Response.ok().entity(t).build();\n }\n }\n }\n }\n }\n return r;\n }", "@Override\n\tpublic List<ProjectTeamBean> selectProjectTeamName(String word) {\n\t\treturn null;\n\t}", "TeamMember(String _name, String _title) {\r\n this.name = _name;\r\n this.title = _title;\r\n }", "SmsEmployeeTeam selectByPrimaryKey(String id);", "TeamResultWrapper findTeamsByMember(String personId,\n String partOfGroupname, int offset, int pageSize);", "@Override\n public String getTeam(){\n return this.team;\n }", "Match getTeam1LooserOfMatch();", "public Team getTeam() throws PlayerHasNoTeamException {\r\n\t\tif (team == null) {\r\n\t\t\tthrow new PlayerHasNoTeamException(this);\r\n\t\t}\r\n\t\treturn team;\r\n\t}", "public Campus fetchByname(java.lang.String name);", "TeamResultWrapper findAllTeams(String personId, int offset,\n int pageSize);", "@RequestMapping(\"/teams/{id}\")\n public ArrayList<Team> readTeam(@PathVariable Integer id) {\n return teamService.getTeam(id);\n }", "Expertise findByName(String name);", "public User getUserFromTeam(Team team){\n String sql = \"SELECT * FROM trainer tr INNER JOIN Team T ON tr.userid = T.userid WHERE T.teamid = ?\";\n User user = jdbc.queryForObject(sql, new UserDaoImpl.UserMapper(), team.getId());\n System.out.print(user);\n return user;\n }", "public String nodeTeam(String id)\n\t{\n\t\treturn getNode(id).team;\n\t}", "@RequestMapping(value = \"/{id}\", method=RequestMethod.GET)\n public ResponseEntity<?> findById(@PathVariable final Integer id) {\n Team team = this.teamService.findById(id);\n return ResponseEntity.ok().body(team);\n }", "public String getHomeTeam();", "public static List<Team> getTeams() {\n return find().all();\n }", "public User findUserName(String name)\n\t\t{\n\t\t\tfor (int i = 0; i < users.size(); i++)\n\t\t\t{\n\t\t\t\tif (name.equals(users.get(i).getUsername()))\n\t\t\t\t{\n\t\t\t\t\treturn users.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "private static Project findProject(String name) {\r\n \t\tfor (Project project : ProjectPlugin.getPlugin().getProjectRegistry().getProjects()) {\r\n \t\t\tif (project.getName().equals(name)) {\r\n \t\t\t\treturn project;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn null;\r\n \t}", "UserGroup findByNameIgnoreCase(String companyId, String name);", "public Team insert(League league, String teamName) {\n StandingDB sdb = new StandingDB();\n TeamDB tdb = new TeamDB();\n String teamID = generateTeamID();\n \n Standing standing = new Standing(teamID);\n \n Team team = new Team(teamID, teamName);\n team.setLeagueID(league);\n \n tdb.insert(team);\n sdb.insert(standing);\n return team;\n }", "public int getTeam() {\n return team_;\n }" ]
[ "0.8358751", "0.8064203", "0.7966975", "0.76864696", "0.754009", "0.74579203", "0.7346206", "0.70153224", "0.6996715", "0.69926363", "0.6985463", "0.69177026", "0.6894896", "0.68685466", "0.68503046", "0.67440164", "0.67360574", "0.6668795", "0.6568165", "0.65599084", "0.6539097", "0.63351214", "0.6328255", "0.63107467", "0.6305925", "0.62806165", "0.6271741", "0.6266306", "0.6265482", "0.62394804", "0.61998534", "0.6179026", "0.6158262", "0.61299753", "0.6125236", "0.6121999", "0.6084864", "0.6077307", "0.6077307", "0.60600203", "0.6011437", "0.59982556", "0.5975958", "0.59689444", "0.59635335", "0.59626096", "0.5960275", "0.59599984", "0.5958782", "0.5948984", "0.59354895", "0.5919594", "0.5918549", "0.5915242", "0.5912745", "0.59113824", "0.59085745", "0.58938086", "0.587913", "0.58624107", "0.5852062", "0.58517414", "0.5846308", "0.5828392", "0.5828301", "0.5826142", "0.5818318", "0.58168244", "0.58142984", "0.5812458", "0.5810088", "0.5809955", "0.5787547", "0.5784249", "0.5778817", "0.5751583", "0.5737578", "0.57350564", "0.5732356", "0.57200956", "0.57120574", "0.5703799", "0.57014114", "0.57000834", "0.56983346", "0.56620836", "0.5654597", "0.56545943", "0.56306016", "0.56223446", "0.5618322", "0.56157494", "0.5597918", "0.5597384", "0.5595789", "0.5583954", "0.55823046", "0.5573954", "0.5571747", "0.55507225" ]
0.87953717
0
Find and return Team by id.
Team findById(Long id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Team get(Long id);", "@Override\n\tpublic TeamInfo findById(String id) {\n\t\treturn repository.findOne(id);\n\t}", "public Teams getTeamById(UUID id)\n {\n Optional<Teams> optionalTeam = teamRepo.findById(id);\n if(!optionalTeam.isPresent())\n throw new TeamNotFoundException(\"Team Record with \" + id + \" is not available\");\n return teamRepo.findById(id).get();\n }", "public static Team getTeam(long id) {\n return find().where().eq(\"id\", id).findUnique();\n }", "public static Team findById(int id) throws DALException {\n\n\t\t\tConnection cnx = null;\n\t\t\tPreparedStatement pstmt = null;\n\t\t\tResultSet rs = null;\n\t\t\tTeam team = new Team();\n\n\t\t\ttry {\n\t\t\t\t// Connection DB\n\t\t\t\tcnx = DBConnection.connect();\n\t\t\t\tpstmt = cnx.prepareStatement(SEARCH_ID_TEAM);\n\t\t\t\tpstmt.setInt(1, id);\n\t\t\t\trs = pstmt.executeQuery();\n\n\t\t\t\tif (rs.next()) {\n\n\t\t\t\t\tteam.setIdTeam(rs.getInt(\"idTeams\"));\n\t\t\t\t\tteam.setName(rs.getString(\"name\"));\n\t\t\t\t\t\n\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tthrow new DALException(\"Problem - search teams By Id - TeamDAO - Request :\"+ pstmt+ \" Team: \" + team + e.getMessage());\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (rs != null)\n\t\t\t\t\t\trs.close();\n\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\tif (cnx != null)\n\t\t\t\t\t\tcnx.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tthrow new DALException(\"Problem - Closing connection - \" + e.getMessage());\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn team;\n\n\t\t}", "public static Team find(String id) throws SQLException\n {\n String query = \"SELECT * FROM team WHERE teamID = ?\";\n PreparedStatement stmt = db.getPreparedStatement(query);\n stmt.setString(1, id);\n Team team = null;\n ResultSet r = db.executeQuery(stmt);\n if (r.next())\n {\n team = new Team(r.getString(\"teamID\"), r.getString(\"motto\"), r.getInt(\"totalKittiesKlicked\"));\n }\n\n return team;\n }", "@Override\n public Team getTeamById(int id){\n try {\n String sql = \"SELECT * FROM Team WHERE Team.teamid = ?\";\n Team team = jdbc.queryForObject(sql, new TeamMapper(), id);\n team.setUser(getUserFromTeam(team));\n return team;\n }catch(DataAccessException ex){\n return null;\n }\n }", "TeamDTO findOne(Long id);", "@RequestMapping(value = \"/{id}\", method=RequestMethod.GET)\n public ResponseEntity<?> findById(@PathVariable final Integer id) {\n Team team = this.teamService.findById(id);\n return ResponseEntity.ok().body(team);\n }", "public String getTeam(int id){\r\n\t\treturn teamList.get(id);\r\n\t}", "Team findByName(String name);", "@RequestMapping(\"/teams/{id}\")\n public ArrayList<Team> readTeam(@PathVariable Integer id) {\n return teamService.getTeam(id);\n }", "public Team getTeamById(int id, ResultSet rsMatches) {\n\t\tTeam t = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamByIdRecords_sql = \"SELECT * FROM \" + team_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tt = new Team(formatPlayers(getPlayersByTeamId(id)), rs.getString(2), rs.getString(3), rs.getString(4),\n\t\t\t\t\t\trs.getDate(5));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "public Team get(String teamID) {\n TeamDB tdb = new TeamDB();\n return tdb.get(teamID);\n }", "public VwTeams get(int teamId)\n\t{\n\t\tVwTeams [] results = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tresults = dao.findWhereTeamIdEquals(teamId);\t\t\t\n\t\t}\n\t\tcatch (VwTeamsDaoException e)\n\t\t{\n\t\t\tlogger.error(e.getMessage());\n\t\t\t\n\t\t\terror.setCode(Errors.Codes.DB_DAO.getCode());\n\t\t\terror.setWindowTitle(Errors.Codes.DB_DAO.getWindowTitle());\n\t\t\terror.setMessage(Errors.Codes.DB_DAO.getMessage());\n\t\t\t\n\t\t\terror.setExceptionMessage(e.getMessage());\n\t\t\t\n\t\t\tpdr.setError(error);\n\t\t\t\n\t\t\tif (logger.isDebugEnabled())\n\t\t\t\te.printStackTrace();\n\t\t\t\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn results.length == 0 ? null : results[0];\n\t}", "SysTeam selectByPrimaryKey(Integer teamId);", "public PlayerGame find(Long id) {\n return playerGames.stream()\n .filter(p -> p.getId().equals(id))\n .findFirst()\n .orElse(null);\n }", "private static Team getTeam(Connection con,Long teamId) {\n\n Team team = null;\n\n String query = SQLConstants.GET_TEAM_BY_TEAM_ID;\n\n try {\n team = new Team();\n //Connection con = JdbcConnection.getConnection();\n PreparedStatement pstmt = con.prepareStatement(query);\n pstmt.setLong(1, teamId);\n\n ResultSet rs = pstmt.executeQuery();\n\n while (rs.next()) {\n team.setId(rs.getLong(\"id\"));\n team.setName(rs.getString(\"name\"));\n team.setDescribe(rs.getString(\"describe\"));\n }\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return team;\n\n }", "@GetMapping(path=\"{id}\")\n public @ResponseBody TeamMember getTeamMember(@PathVariable long id){\n return teamMemberRepository.getOne(id);\n }", "SmsEmployeeTeam selectByPrimaryKey(String id);", "List<Team> findTeamsByUserId(UserId userId);", "public String getTeamNameById(int id) {\n\t\tString t = \"\";\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamByIdRecords_sql = \"SELECT name FROM \" + team_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tt = rs.getString(1);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "public String nodeTeam(String id)\n\t{\n\t\treturn getNode(id).team;\n\t}", "Team getMyTeam();", "@Override\r\n\tpublic TeamPO findTeamByName(String name) {\n\t\treturn teams.findTeamByShortName(name);\r\n\t}", "@GET\n @Path(\"Current/Team/{teamId}\")\n public Response getTeamByCurrentUser(@PathParam(\"teamId\") Long teamId) {\n Response r = Response.noContent().build();\n User currentUser = userFacade.getCurrentUser();\n final Collection<Game> playedGames = gameFacade.findRegisteredGames(currentUser.getId());\n for (Game g : playedGames) {\n Collection<Team> teams = g.getTeams();\n for (Team t : teams) {\n if (teamId.equals(t.getId())) {\n for (Player p : t.getPlayers()) {\n if (p.getUserId().equals(currentUser.getId())) {\n r = Response.ok().entity(t).build();\n }\n }\n }\n }\n }\n return r;\n }", "public int getTeamId() {\n return teamId;\n }", "public Match getMatchById(int id) {\n\t\tMatch m = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString matchByIdRecords_sql = \"SELECT * FROM \" + match_table + \" WHERE id='\" + id + \"'\";\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(matchByIdRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tm = new Match(getTeamById(rs.getInt(2), getMatchesByTeamId(rs.getInt(2))),\n\t\t\t\t\t\tgetTeamById(rs.getInt(3), getMatchesByTeamId(rs.getInt(3))), getStatsById(id), rs.getDate(4),\n\t\t\t\t\t\trs.getString(5));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn m;\n\t}", "AceEntity findEntity (String id) {\n\t\tfor (int i=0; i<entities.size(); i++) {\n\t\t\tAceEntity entity = (AceEntity) entities.get(i);\n\t\t\tif (entity.id.equals(id)) {\n\t\t\t\treturn entity;\n\t\t\t}\n\t\t}\n\t\tSystem.err.println (\"*** unable to find entity with id \" + id);\n\t\treturn null;\n\t}", "public ModelGame findGameById () {\n Scanner input = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Enter the ID of the game you wish to return:\");\n int id = input.nextInt(); // Read user input of id\n for (ModelGame game : this.allGames) {\n if (game.getGameId() == id) {\n return game;\n }\n }\n return null;\n }", "public String getTeamId() {\n\t\treturn teamId;\n\t}", "public String getTeamId() {\n\t\treturn teamId;\n\t}", "public int getTeamId() {\n\t\treturn teamId;\n\t}", "public Individual getIndividualById(Integer id) throws ObjectNotFoundException{\n \tList<Individual> individualList = new ArrayList<>();\n\t\tindividualList = (new TeamsJsonReader()).getListOfIndividuals();\n\t\tIndividual individual = null;\n\t\tint size, counter = 0;\n\t\tfor (size = 0; size < individualList.size(); size++) {\n\t\t\tcounter = 0;\n\n\t\t\tindividual = individualList.get(size);\n\t\t\tif (individual.getId().compareTo(id) == 0) {\n\t\t\t\tcounter = 1;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (size == individualList.size() && counter == 0)\n\t\t\tthrow new ObjectNotFoundException(\"individual\", \"id\", id.toString());\n\n\t\treturn individual;\n\n }", "public TAlgmntSalesTeam findTAlgmntSalesTeamById(final TAlgmntSalesTeamId tAlgmntSalesTeamId) {\n\t\tLOGGER.info(\"find TAlgmntSalesTeam instance with TAlgmntSalesTeamId: \" + tAlgmntSalesTeamId);\n\t\treturn genericDAO.get(clazz, tAlgmntSalesTeamId);\n\t}", "private User findById(String id) {\n User result = new NullUserOfDB();\n for (User user : this.users) {\n if (user.getId().equals(id)) {\n result = user;\n break;\n }\n }\n return result;\n }", "public SoccerTeam getTeam(String teamName) throws TeamNotFoundException {\n\n for (int i = 0; i < this.teams.size(); i++) {\n SoccerTeam team = this.teams.get(i);\n\n if (team.getName().equals(teamName)){\n return team;\n }\n }\n throw new TeamNotFoundException(\"Team that you are searching for is not found\");\n }", "private static Person findPersonById(int id) {\n Person personReturn = null;\n\n for (Person person : persons) {\n if (id == person.getId()) {\n personReturn = person;\n }\n }\n\n return personReturn;\n }", "public Team getTeamByName(String name) {\n\t\tTeam t = null;\n\t\ttry {\n\t\t\tPreparedStatement statement = null;\n\t\t\tResultSet rs = null;\n\t\t\tString teamRecords_sql = \"SELECT * FROM \" + team_table + \" WHERE name='\" + name + \"'\";\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.prepareStatement(teamRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t\tList<Player> players = new ArrayList<Player>();\n\t\t\tif (rs.next()) {\n\t\t\t\tplayers = formatPlayers(getPlayersByTeamId(rs.getInt(1)));\n\t\t\t\tt = new Team(players, rs.getString(2), rs.getString(3), rs.getString(4), rs.getDate(5));\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn t;\n\t}", "public T find(int id) {\n\t \treturn getEntityManager().find(getEntityClass(), id);\n\t }", "public Project findById(Integer id) {\n Session session = SessionManager.getSessionFactory().openSession();\n //The find method returns the object with the provided id\n Project project = session.find(Project.class, id);\n session.close();\n return project;\n }", "public Team findTeamFromName(String name) {\r\n Iterator<Team> itr = this.getTeamTreeFromMatchTree().iterator();\r\n Team team;\r\n while (itr.hasNext()){\r\n team = itr.next();\r\n if (team.getName().equals(name)){\r\n return team;\r\n }\r\n }\r\n return null;\r\n }", "@Override\n\tpublic Employee findById(int id) {\n\t\tList<Employee> employeeList= \n\t\tlistEmployee().stream().filter((e -> e.getId()==id)).collect(Collectors.toList());\n\t\t\n\t\treturn (Employee)employeeList.get(0);\n\t}", "public User findById ( int id) {\n\t\t return users.stream().filter( user -> user.getId().equals(id)).findAny().orElse(null);\n\t}", "public T findById(final String id)\n\t{\n\t\treturn em.find(entityClass, id);\n\t}", "@Override\n\tpublic Langues find(int id) {\n\t\tLangues langue = new Langues();\n\t\tString query = \"SELECT * FROM langues WHERE ID = ? \";\n\t\ttry {\n\t\t\tjava.sql.PreparedStatement statement = this.connect.prepareStatement(query);\n\t\t\tstatement.setInt(1, id);\n\t\t\tResultSet result = statement.executeQuery();\n\n\t\t\tif (result.first()) {\n\t\t\t\t\n\t\t\t\tlangue = new Langues(id, result.getString(\"Langue\"),result.getString(\"Iso6391\"));\n\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn langue;\n\t}", "public T findById(int id) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet rs = null;\n\t\tString query = createSelectQuery(\"id\");\n\t\ttry {\n\t\t\tconnection = ConnectionFactory.createCon();\n\t\t\tst = connection.prepareStatement(query);\n\t\t\tst.setInt(1, id);\n\t\t\trs = st.executeQuery();\n\t\t\t\n\t\t\treturn createObjects(rs).get(0);\n\t\t}catch(SQLException e) {\n\t\t\tLOGGER.fine(type.getName() + \"DAO:findBy\" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "public Film find(int id) {\n\t\t\n\t\tString codeFilm = null;\n\t\tString nomFilm = null;\n\t\tFilm film = new Film();\n\t\t\n\t\ttry {\n\t\t\tResultSet result = Connection.selectFrom(\"SELECT codeFilm, nomFilm \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"FROM film \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"WHERE idFilm=\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+id\n\t\t\t\t\t\t\t\t\t\t\t\t\t+\";\");\n\t\t\t\n\t\t\twhile(result.next())\n\t\t\t{\n\t\t\t\tcodeFilm = result.getString(\"codeFilm\");\n\t\t\t\tnomFilm = result.getString(\"nomFilm\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\tfilm = new Film(id,codeFilm,nomFilm);\n\t\tConnection.close();\n\t\treturn film;\n\t}", "public void deleteTeamById(UUID id) {\n Optional<Teams> optionalTeam = teamRepo.findById(id);\n if (!optionalTeam.isPresent())\n throw new TeamNotFoundException(\"Team Record with id \" + id + \" is not available\");\n teamRepo.deleteById(id);\n }", "public List<Team> getTeamByMentorId(Id mentorId) throws MissingEntityException {\n List<Team> teams = this.teamList.getSpecificTypedList();\n List<Team> results = new ArrayList<>();\n for (Team t : teams) {\n Optional<Mentor> mentor = t.getMentor();\n if (mentor.isPresent()) {\n if (mentor.get().getId().equals(mentorId)) {\n results.add(t);\n }\n }\n }\n if (results.size() == 0) {\n throw new MissingEntityException(\"Team with said participant cannot be found.\");\n }\n return results;\n }", "public Teams updateTeamById(UUID id,Teams teams)\n {\n Optional<Teams> optionalTeam = teamRepo.findById(id);\n if (!optionalTeam.isPresent())\n throw new TeamNotFoundException(\"Team Record with id \" + id + \" is not available\");\n teams.setTeamId(id);\n return teamRepo.save(teams);\n }", "public Student find(int id) {\n\n\t\tfor (int i = 0; i < studentList.size(); i++) {\n\t\t\tif (studentList.get(i).getId() == id) {\n\t\t\t\treturn studentList.get(i);\n\n\t\t\t}\n\n\t\t}\n\t\treturn null;\n\n\t}", "public static boolean isTeam(long id) {\n Team team = getTeam(id);\n return !(team == null);\n }", "public Set<Sportive> filterByTeamId(int id){\n Iterable<Sportive> materials = repo.findAll();\n return StreamSupport.stream(materials.spliterator(), false).filter(sportive -> sportive.getTeamId()==id).collect(Collectors.toSet());\n }", "public User findUser(int id)\n\t\t{\n\t\t\tfor (int i = 0; i < users.size(); i++)\n\t\t\t{\n\t\t\t\tif (id == (users.get(i).getId()))\n\t\t\t\t{\n\t\t\t\t\treturn users.get(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "public int getTeamID() {\n\t\treturn teamID;\n\t}", "public Ticket getTicketById(int id) {\r\n\t\tfor (Iterator<Ticket> iter = ticketList.iterator(); iter.hasNext(); ) {\r\n\t\t\tTicket ticket = iter.next();\r\n\t\t\tif (ticket.getTicketId() == id) {\r\n\t\t\t\treturn ticket;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t\t\r\n\t}", "private Staff findById(String id) throws Exception{\n if(StringUtils.isBlank(id) || StringUtils.equalsIgnoreCase(id, \"0\"))\n throw new Exception(\"Invalid staff id\");\n\n try{\n Staff staff = this.em.find(Staff.class, Integer.parseInt(id));\n if(staff == null)\n throw new Exception(\"Staff not found\");\n else\n return staff;\n\n }catch (IllegalArgumentException ex){\n throw new Exception(\"Provide a valid staff entity or primary key\");\n }\n }", "public String getTeamId() {\r\n\t\treturn teamName;\r\n\t}", "public User getUserFromTeam(Team team){\n String sql = \"SELECT * FROM trainer tr INNER JOIN Team T ON tr.userid = T.userid WHERE T.teamid = ?\";\n User user = jdbc.queryForObject(sql, new UserDaoImpl.UserMapper(), team.getId());\n System.out.print(user);\n return user;\n }", "public Vacuna findById(Long id) {\n\t\tVacuna vacuna = vacunaRepository.findById(id).orElseThrow(() -> new RuntimeException(\"La vacuna no existe...\"));\n\t\treturn vacuna;\n\t}", "int getTeam();", "@Override\n\tpublic Eleve findById(int id) {\n\t\treturn map.get(id);\n\t}", "public Playlist findById(String id) {\n\n if (id == null || id.equalsIgnoreCase(\"\")) {\n return null;\n }\n\n String sql = \"SELECT * FROM Playlists WHERE ID=?\";\n Playlist playlist = null;\n Connection connection = DatabaseConnection.getDatabaseConnection();\n\n try {\n ///Use PreparedStatement to insert \"id\" for \"?\" in sql string.\n PreparedStatement pStatement = connection.prepareStatement(sql);\n pStatement.setString(1, id);\n\n ResultSet resultSet = pStatement.executeQuery();\n if (resultSet.next()) {\n playlist = processRow(resultSet);\n }\n } catch (SQLException ex) {\n System.out.println(\"PlaylistDAO - findById Exception: \" + ex);\n }\n DatabaseConnection.closeConnection(connection);\n return playlist;\n }", "public Voto find(int id ) { \n\t\treturn em.find(Voto.class, id);\n\t}", "public void setTeamId(int value) {\n this.teamId = value;\n }", "@SneakyThrows\n @Override\n public DeveloperSkill findByID(Long id) {\n return null; //parse.get(Math.toIntExact(id));\n }", "public Team getTeam() {\n return team;\n }", "public User findUser(int id) {\n for (int i = 0; i < allUsers.size(); i++) {\n if (allUsers.get(i).getId() == id) {\n return allUsers.get(i);\n }\n }\n return null;\n }", "@Override\n\tpublic Optional<Translator> findById(UUID id) {\n\t\treturn findById(id);\n\t}", "@Override\n public TournamentEntity getOldTournament(String id) {\n return tournamentRepository.findById(id)\n .orElseThrow(TournamentNotFoundException::new);\n }", "public Pessoa find(Long id){\n\t\treturn db.findOne(id);\n\t}", "public Optional<Flight> findFlight(Long id) throws DaoException {\n DataSource dataSource = DataSourceFactory.getInstance().getDataSource();\n Optional<Flight> value;\n try (Connection connection = dataSource.getConnection()) {\n connection.setAutoCommit(false);\n DaoFactory daoFactory = DaoFactory.getDaoFactory(connection);\n FlightDao flightDao = daoFactory.createFlightDao();\n value = flightDao.findById(id);\n if (!value.isPresent()) {\n connection.rollback();\n throw new DaoException(ExceptionMessage.getMessage(ExceptionMessage.FLIGHT_NOT_FOUND_ERROR));\n }\n connection.commit();\n } catch (SQLException e) {\n throw new DaoException(e.getMessage());\n }\n return value;\n }", "public T findById(int id)\n {\n Connection connection = null;\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n String query = createSelectQuery(\"id\");\n try\n {\n connection = ConnectionFactory.getConnection();\n statement = connection.prepareStatement(query);\n statement.setInt(1,id);\n resultSet = statement.executeQuery();\n\n return createObjects(resultSet).get(0);\n }catch (SQLException e)\n {\n LOGGER.log(Level.WARNING,type.getName() + \"DAO:findById\"+ e.getMessage());\n }finally {\n ConnectionFactory.close(resultSet);\n ConnectionFactory.close(statement);\n ConnectionFactory.close(connection);\n }\n return null;\n }", "@GetMapping(\"/showTeam/{id}\")\n\tpublic String showTeamPage(@PathVariable(\"id\") Long teamId, Model model) {\n\t\tTeam team=teamService.findOne(teamId);\n\t\t//Today's date\n\t\tmodel.addAttribute(\"today\", new Date());\n\t\tmodel.addAttribute(\"team\", team);\n\t\treturn \"showTeamPage.jsp\";\n\t}", "@Override\r\n\tpublic StnLooseMt findOne(int id) {\n\t\treturn stnLooseMtRepository.findOne(id);\r\n\t}", "@Override\n\tpublic Employee findById(int id) {\n\t\tSession currentSession = entityManager.unwrap(Session.class);\n\t\t\n\t\t// create a query to get an employee based on Id\n\t\tQuery<Employee> theQuery = currentSession.createQuery(\"from Employee e where e.id =: id\" , Employee.class);\n\t\ttheQuery.setParameter(\"id\", id);\n\t\tEmployee employee = theQuery.getSingleResult();\n\t\treturn employee;\n\t}", "public Individual getIndividual(int id){\n for(Individual individual : individuals){\n if(individual.getId() == id){\n return individual;\n }\n }\n return null;\n }", "public Team selectTeam() {\r\n \r\n String[] list = new String[controller.getTeams().size()];\r\n for (int i = 0; i < controller.getTeams().size(); i++) {\r\n list[i] = controller.getTeams().get(i).getName();\r\n }\r\n\r\n JComboBox cmbOption = new JComboBox(list);\r\n int input = JOptionPane.showOptionDialog(null, cmbOption, \"Select Team that your like Delete\",JOptionPane.DEFAULT_OPTION,JOptionPane.QUESTION_MESSAGE, null, null, null);\r\n if(input==-1){\r\n return null;\r\n }\r\n Team teamAux = controller.searchTeam((String) cmbOption.getSelectedItem());\r\n return teamAux;\r\n }", "Optional<T> find(long id);", "public MemberPo findMember(final String id);", "public static Member findById(int id){\n setConnection();\n \n Member member = null;\n \n try{\n Statement statement = con.createStatement();\n \n //Query statement\n String query = \"SELECT * FROM member WHERE id = ?\";\n\n //Create mysql prepared statement\n PreparedStatement preparedStatement = con.prepareStatement(query);\n preparedStatement.setInt(1, id);\n \n //Execute the prepared statement\n if(preparedStatement.execute()){\n ResultSet result = preparedStatement.getResultSet();\n \n result.next();\n \n int memberId = result.getInt(1);\n String name = result.getString(2);\n String email = result.getString(3);\n String phone = result.getString(4);\n String address = result.getString(5);\n String dob = result.getString(6);\n \n member = new Member(memberId, name, email, phone, address, dob);\n }\n \n con.close();\n } catch (SQLException e){\n System.out.println(e.getMessage());\n }\n \n return member;\n }", "@GetMapping(\"/players/{id}\")\r\n public ModelAndView getSingleTeamPage(ModelAndView modelAndView,\r\n @PathVariable Integer id) {\r\n modelAndView.setViewName(\"single-player\");\r\n\r\n Player player = playerService.findPlayerById(id);\r\n\r\n List<Player> teammates = playerService.findAllPlayersByTeam(player.getTeam());\r\n teammates.remove(player);\r\n\r\n List<Match> upcomingMatches = matchService.getFiveLastUpcomingMatchesByTeam(player.getTeam());\r\n List<EndedMatch> endedMatches = matchService.get10LastEndedMatchesByTeam(player.getTeam());\r\n\r\n if (upcomingMatches.size() == 0) {\r\n modelAndView.addObject(\"isUpcomingMatchesEmpty\", true);\r\n modelAndView.addObject(\"noUpcomingMatchesYet\", \"No upcoming matches yet\");\r\n } else {\r\n modelAndView.addObject(\"teamsUpcomingMatches\", upcomingMatches);\r\n }\r\n\r\n if (endedMatches.size() == 0) {\r\n modelAndView.addObject(\"isEndedMatchesEmpty\", true);\r\n modelAndView.addObject(\"noEndedMatchesYet\", \"The team didn't play a single match\");\r\n } else {\r\n modelAndView.addObject(\"teamsEndedMatches\", endedMatches);\r\n }\r\n\r\n modelAndView.addObject(\"player\", player);\r\n modelAndView.addObject(\"teammates\", teammates);\r\n modelAndView.addObject(\"players\", playerService.getFiveFirstPlayers());\r\n modelAndView.addObject(\"teams\", teamService.getFiveFirstTeams());\r\n modelAndView.addObject(\"matches\", matchService.getAllMatchesNotEnded());\r\n modelAndView.addObject(\"endedMatches\", matchService.getFiveLastEndedMatches());\r\n\r\n return modelAndView;\r\n }", "@Override\r\n\tpublic Person findbyid(int id) {\n\t\tQuery query=em.createQuery(\"Select p from Person p where p.id= \"+id);\r\n\t\tPerson p=(Person) query.getSingleResult();\r\n\t\treturn p;\r\n\t\r\n\t}", "public User getUserFromID(String id) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"_id\", new ObjectId(id));\r\n\r\n // Loops over users found matching the details, returning the first one\r\n for (User user : users.find(query, User.class)) {\r\n return user;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }", "public Tour getTourById(String id) throws ServiceException {\n return tourRepository.findById(Long.parseLong(id)).orElseThrow(() -> new ServiceException(\"Cant find tour by id: \" + id));\n }", "@Override\n public Tournament tournamentStatus(String id) {\n return Optional.ofNullable(tournamentCache.get(id))\n .orElseThrow(TournamentNotFoundException::new);\n }", "public Member getMemberById(int id) {\n\t\tfor (Iterator<Member> it = db.iterator(); it.hasNext(); ) {\n\t\t\tMember m = it.next();\n\t\t\tif (m.getId() == id) {\n\t\t\t\treturn m;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Transactional(readOnly = true)\n public Optional<Game> findOne(Long id) {\n log.debug(\"Request to get Game : {}\", id);\n return gameRepository.findById(id);\n }", "public Timesheet find(int id) {\n\t return em.find(Timesheet.class, id);\n\t }", "@Override\n\tpublic List<String> getTeamNames(Integer id) {\n\t\treturn null;\n\t}", "@ApiOperation(value = \"Find a movie by id\", notes = \"Find a movie by id\")\n @ApiResponses(value = {\n @ApiResponse(code = 200, message = \"Success\", response = MovieDto.class),\n @ApiResponse(code = 400, message = \"Bad request\"),\n @ApiResponse(code = 404, message = \"Not found\"),\n })\n @CrossOrigin\n @GetMapping(value = \"/find/{id}\", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)\n public ResponseEntity findById(\n @ApiParam(value = \"A movie id\", defaultValue = \"2503\", required = true)\n @PathVariable(name = \"id\") Integer id) {\n MovieDto movie = movieService.findById(id);\n return new ResponseEntity<>(movie, HttpStatus.OK);\n }", "@Override\n\tpublic Person findPersonById(long id){\n\t\tQuery q = em.createQuery(\"SELECT p FROM Person p WHERE p.id = :id\");\n\t\tq.setParameter(\"id\", id);\n\t\t\n\t\tList<Person> persons = q.getResultList();\n\t\t\n\t\tif(persons.size() == 1)\n\t\t\treturn persons.get(0);\n\t\telse return null;\n\t}", "@Override\n public T findById(Long id) {\n return manager.find(elementClass, id);\n }", "public Joueur find(String id)\n\t{\n\t\tfor(Joueur j : ListJoueur)\n\t\t{\n\t\t\tif(id.equals(j.getClefId()))\n\t\t\t\treturn j;\n\t\t}\n\t\treturn null;\n\t}", "public SportDTO resolveFromObjectIdFull(String id){\n SportDTO sportDTO = null;\n try {\n SportEntity sportEntity = departmentRepository.getSportByLeagueId(id);\n sportDTO = resolverMapper.map(sportEntity, SportDTO.class);\n } catch (InvalidInputDataException e) {\n logger.error(\"Invalid ID input given: \", e);\n } catch (DataAccessException e) {\n logger.warn(\"Not data could be obtained for the given league ID \" + id, e);\n } catch (MappingException e){\n logger.fatal(\"Mapping from entity to domain failed\", e);\n }\n return sportDTO == null ? new SportDTO(): sportDTO;\n }", "@Override\r\n\tpublic LookMast findOne(int id) {\n\t\treturn lookMastRepository.findOne(id);\r\n\t}", "public List<Team> getTeamByParticipantId(Id participantId) throws MissingEntityException {\n List<Team> teams = this.teamList.getSpecificTypedList();\n List<Team> results = new ArrayList<>();\n for (Team t : teams) {\n for (Participant p : t.getParticipants()) {\n if (p.getId().equals(participantId)) {\n results.add(t);\n }\n }\n }\n if (results.size() == 0) {\n throw new MissingEntityException(\"Team with said participant cannot be found.\");\n }\n return results;\n }", "public Ticket getTicket(String id);", "@Override\n public Player getPlayerById(long id) {\n Player player=entityManager.find(Player.class,id);\n return player;\n }" ]
[ "0.89555395", "0.8646454", "0.8621022", "0.86071646", "0.82415175", "0.8120568", "0.80171704", "0.7941846", "0.77423304", "0.76871663", "0.7331012", "0.7301277", "0.7202841", "0.7139312", "0.6941993", "0.6929879", "0.69214267", "0.6890302", "0.67385566", "0.67286843", "0.66330546", "0.66176224", "0.6614936", "0.65682983", "0.6555405", "0.6528184", "0.6440158", "0.63372576", "0.63353306", "0.6298881", "0.6296473", "0.6296473", "0.6293166", "0.6261851", "0.62321186", "0.6231433", "0.62247753", "0.6213276", "0.6202961", "0.61786157", "0.61450917", "0.6140867", "0.6122257", "0.612204", "0.6102258", "0.6099881", "0.6098676", "0.60976547", "0.6086482", "0.6045105", "0.60392874", "0.6029248", "0.6025799", "0.60167235", "0.5998627", "0.5988418", "0.5958544", "0.5953154", "0.5938555", "0.5928813", "0.592644", "0.5923596", "0.59074765", "0.590407", "0.58959645", "0.58942217", "0.5882707", "0.5879333", "0.5878385", "0.58737534", "0.58721656", "0.58696485", "0.5867266", "0.5861817", "0.58567053", "0.58459806", "0.5844314", "0.5843933", "0.58416766", "0.5841542", "0.5840435", "0.5840041", "0.5839654", "0.5828857", "0.5826412", "0.5823567", "0.582118", "0.5821016", "0.58169436", "0.5815328", "0.5813505", "0.5813186", "0.5811926", "0.5808528", "0.5805498", "0.5803106", "0.5803017", "0.5801547", "0.58002996", "0.5799367" ]
0.86186564
3
Find and return all Teams.
List<Team> findAll();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Team> getTeams() {\n return find().all();\n }", "@Override\n\tpublic List<TeamInfo> findAll() {\n\t\treturn repository.findAll();\n\t}", "@Override\r\n\tpublic ArrayList<TeamPO> getAllTeams() {\n\t\treturn teams.getAllTeams() ;\r\n\t}", "public List<Team> getAllTeams() { \r\n\t\t\tif(teams==null)\t{\r\n\t\t\t\tteams=dao.listTeams(); //LIST\t\t\t\r\n\t\t\tfor(Team atemp:teams){\t\t\tthis.mapTeam.put(atemp.getTeam(), atemp);\t\t}\r\n\t\t\t\t}\r\n\t\t\treturn teams;\r\n\t\t}", "@Test\r\n\tpublic void findAllTeams() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: findAllTeams \r\n\t\tInteger startResult = 0;\r\n\t\tInteger maxRows = 0;\r\n\t\tList<Team> response = null;\r\n\t\tresponse = service.findAllTeams(startResult, maxRows);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: findAllTeams\r\n\t}", "TeamResultWrapper findAllTeams(String personId, int offset,\n int pageSize);", "@WebMethod public List<Team> getAllTeams();", "public static List<String> getAllTeams() throws URISyntaxException, IOException {\n HttpClient httpClient = HttpClientBuilder.create().build();\n URIBuilder uriBuilder = new URIBuilder();\n //http://api.football-data.org/v2/teams/\n uriBuilder.setScheme(\"http\").setHost(\"api.football-data.org\").setPath(\"v2/teams/\");\n HttpGet httpGet = new HttpGet(uriBuilder.build());\n httpGet.setHeader(\"X-Auth-Token\",\"7cf82ca9d95e498793ac0d3179e1ec9f\");\n httpGet.setHeader(\"Accept\",\"application/json\");\n HttpResponse response = httpClient.execute(httpGet);\n ObjectMapper objectMapper = new ObjectMapper();\n TeamsPojo pojo = objectMapper.readValue(response.getEntity().getContent(),TeamsPojo.class);\n List<String> willBeReturned = new ArrayList<>();\n List<Teams> teams = pojo.getTeams();\n for (int i =0 ; i<teams.size();i++){\n willBeReturned.add(teams.get(i).getName());\n }\n\n\n return willBeReturned;\n }", "public ArrayList<Team> getList(){\n\t\treturn this.teams;\n\t}", "public List<Team> getAll() {\n TeamDB tdb = new TeamDB();\n List<Team> teams = tdb.getAll();\n for (Team t : teams) {\n String teamName = t.getTeamName();\n teamName = teamName.replace(\"'\", \"\\\\\\'\");\n t.setTeamName(teamName);\n System.out.println(t.getTeamName());\n }\n return teams;\n }", "List<Team> findTeamsByUserId(UserId userId);", "@Override\r\n\tpublic List<String> getAllTeam() {\n\t\treturn dao.getAllTeam();\r\n\t}", "public LinkedList<SoccerTeam> getTeams() {\n return this.teams;\n }", "public List<Team> getListOfTeams(){\n \tMap<String, Object> myMap = new HashMap<String, Object>();\n\t\tJSONObject jsonobj = null;\n\t\tList<Team> team = new ArrayList<>();\n\t\tTeamsJsonReader reader = new TeamsJsonReader();\n\t\tJSONParser parser = new JSONParser();\n\t\tObject obj = null;\n\n\t\ttry {\n\t\t\tobj = parser.parse(new FileReader(\"src/main/resources/db.json\"));\n\t\t\tJSONObject jsonObject = (JSONObject) obj;\n\t\t\tJSONArray jsonarr = (JSONArray) jsonObject.get(\"teams\");\n\t\t\tfor (int size = 0; size < jsonarr.size(); size++) {\n\t\t\t\tList<Individual> individualList = new ArrayList<>();\n\t\t\t\tjsonobj = (JSONObject) jsonarr.get(size);\n\t\t\t\tmyMap.put(\"name\", jsonobj.get(\"name\"));\n\t\t\t\tmyMap.put(\"id\", ((Long) jsonobj.get(\"id\")).intValue());\n\t\t\t\tJSONArray memberArray = (JSONArray) jsonobj.get(\"members\");\n\n\t\t\t\tfor (int index = 0; index < memberArray.size(); index++) {\n\n\t\t\t\t\tindividualList.add(reader.getIndividualById(((Long) memberArray.get(index)).intValue()));\n\n\t\t\t\t}\n\t\t\t\tmyMap.put(\"members\", individualList);\n\t\t\t\t\n\t\t\t\tteam.add(new Team(myMap));\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn team;\n }", "@RequestMapping(method=RequestMethod.GET)\n public ResponseEntity<List<TeamDTO>> findAll() {\n List<Team> list = this.teamService.findAll();\n List<TeamDTO> listDto = list.stream().map(obj -> new TeamDTO(obj)).collect(Collectors.toList());\n\n return ResponseEntity.ok().body(listDto);\n }", "TeamResultWrapper findTeams(String personId,\n String partOfGroupname, int offset, int pageSize);", "@GetMapping(\"/leaderboard\")\n @Timed\n @PermitAll\n public ResponseEntity<Leaderboard> getAllTeams() {\n log.debug(\"REST request to get a leaderboard\");\n\n return ResponseEntity.ok().body(this.leaderboardService.findAll());\n }", "@Override\n\tpublic HashSet<String> getTeams() {\n return new HashSet<String>();\n\t}", "public PageResult<Team> getAll() {\n\t\t\n\t\treturn null;\n\t}", "List<Team> getTeamsFromApi(List<Long> teamIds);", "public void printTeamsInLeague(){\n for (T i : teams){\n System.out.println(i.getTeamName());\n }\n }", "@GET\n @Path(\"Current/Team\")\n public Response findTeamsByCurrentUser() {\n Response r = Response.noContent().build();\n Collection<Team> teamsToReturn = new ArrayList<>();\n User currentUser = userFacade.getCurrentUser();\n final List<Player> players = currentUser.getPlayers();\n for (Player p : players) {\n teamsToReturn.add(p.getTeam());\n }\n if (!teamsToReturn.isEmpty()) {\n r = Response.ok().entity(teamsToReturn).build();\n }\n\n return r;\n }", "public ArrayList<CollegeFootballTeam> getTeamList();", "public static ArrayList<Team> findTeamProject() throws DALException {\n\t\t\tConnection cnx = null;\n\t\t\tPreparedStatement pstmt = null;\n\t\t\tResultSet rs = null;\n\t\t\tArrayList<Team> listTeams = new ArrayList<>();\n\n\t\t\ttry {\n\t\t\t\t// Connection DB\n\t\t\t\tcnx = DBConnection.connect();\n\t\t\t\tpstmt = cnx.prepareStatement(LIST_TEAMS_PROJECTS);\n\t\t\t\trs = pstmt.executeQuery();\n\n\t\t\t\t// For each team\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tTeam team = new Team();\n\t\t\t\t\tteam.setIdTeam(rs.getInt(\"Teams_IdTeams\"));\n\t\t\t\t\tteam.setName(rs.getString(\"Teams_name\"));\n\t\t\t\t\tteam.setIdProject(rs.getInt(\"idProjects\"));\n\t\t\t\t\tteam.setNameProject(rs.getString(\"nameProject\"));\n\t\t\t\t\tlistTeams.add(team);\n\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\n\t\t\t\tthrow new DALException(\"Problem - listTeamHisProject - TeamDAO - Request : \"+ pstmt+ \" \" + e.getMessage());\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (rs != null)\n\t\t\t\t\t\trs.close();\n\t\t\t\t\tif (pstmt != null)\n\t\t\t\t\t\tpstmt.close();\n\t\t\t\t\tif (cnx != null)\n\t\t\t\t\t\tcnx.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\tthrow new DALException(\"Problem - Closing connection - \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn listTeams;\n\n\t\t}", "public ResultSet getTeams() throws SQLException {\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamRecords_sql = \"SELECT * FROM \" + team_table;\n\t\tconnection = connector.getConnection();\n\t\tstatement = connection.prepareStatement(teamRecords_sql);\n\t\trs = statement.executeQuery();\n\t\treturn rs;\n\t}", "public List<TicketSite> getTicketSitesOfATeam(String teamId);", "@RequestMapping(method = RequestMethod.GET, value = \"/teamsForUser\")\n public JSONArray getAllTeamsForUserPage() {\n return teamService.getAllTeamsForUser();\n }", "public ArrayList<Team> getTeamList(){\n\t\treturn this.teamList;\n\t}", "public List<Hero> getTeam() {\r\n return team;\r\n }", "public List<Match> getAllMatch() {\n return matchRepository.selectAllMatchesFromDatabase();\n }", "TeamResultWrapper findAllTeamsByMember(String personId, int offset,\n int pageSize);", "public ArrayList<CollegeFootballTeam> getTeamList()\r\n\t{\r\n\t\treturn teams;\r\n\t}", "public Teams getTeamById(UUID id)\n {\n Optional<Teams> optionalTeam = teamRepo.findById(id);\n if(!optionalTeam.isPresent())\n throw new TeamNotFoundException(\"Team Record with \" + id + \" is not available\");\n return teamRepo.findById(id).get();\n }", "public List<Team> getAllByLeague(League leagueID) {\n TeamDB tdb = new TeamDB();\n List<Team> teams = tdb.getAllByLeague(leagueID);\n for (Team t : teams) {\n String teamName = t.getTeamName();\n teamName = teamName.replace(\"'\", \"\\\\\\'\");\n t.setTeamName(teamName);\n System.out.println(t.getTeamName());\n }\n return teams;\n }", "public Team get(Long id);", "public List<Match> listAllMatch() {\n\t\treturn matchDao.list(\"from Match\");\r\n\t}", "private void fetchTeams() {\n String url = Teams.TEAMS_URL;\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.GET, url, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(final JSONObject response) {\n Gson gson = new Gson();\n //Deserialize\n mTeams = gson.fromJson(response.toString(), Teams.class);\n for (Team team : mTeams.getTeams()) {\n //Add each team to the nav drawer with the appropriate icon\n mNavigationView.getMenu().add(team.getName()).setIcon(Utils.getDrawableForTeam(team));\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(final VolleyError error) {\n error.printStackTrace();\n }\n });\n //Singleton instance of Volley as per the documentation\n RequestQueue.getInstance(this).addToRequestQueue(request);\n }", "@RequestMapping(\"/teams/{id}\")\n public ArrayList<Team> readTeam(@PathVariable Integer id) {\n return teamService.getTeam(id);\n }", "public JSONObject getCompetitionTeams() {\r\n\t\t\r\n\t\tString api = this.url + \"competition/\" + idCompetition + \"/teams\";\r\n\t\tJSONObject jo = null;\r\n\t\tString line = \"\";\r\n\t\tString dataFilter = \"\";\r\n\t\ttry{\r\n\t\t\tHttpURLConnection openConnection = (HttpURLConnection) new URL(api).openConnection();\r\n\t\t\topenConnection.setRequestProperty(\"X-Auth-Token\", token);\r\n\t\t\tInputStream in = openConnection.getInputStream();\r\n\r\n\t\t\tInputStreamReader input = new InputStreamReader( in );\r\n\t\t\tBufferedReader buf = new BufferedReader( input );\r\n\t\t\t\r\n\t\t\twhile ( ( line = buf.readLine() ) != null ) {\r\n\t\t\t\tdataFilter += line;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tin.close();\r\n\t\t\tjo = (JSONObject) JSONValue.parseWithException(dataFilter);\r\n\t\t}\r\n\t\tcatch(ParseException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcatch (IOException e ) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn jo;\r\n\t}", "public List<Team> getAllOrdered() {\n TeamDB tdb = new TeamDB();\n return tdb.getAllOrdered();\n }", "public List<Team> getTeamByParticipantId(Id participantId) throws MissingEntityException {\n List<Team> teams = this.teamList.getSpecificTypedList();\n List<Team> results = new ArrayList<>();\n for (Team t : teams) {\n for (Participant p : t.getParticipants()) {\n if (p.getId().equals(participantId)) {\n results.add(t);\n }\n }\n }\n if (results.size() == 0) {\n throw new MissingEntityException(\"Team with said participant cannot be found.\");\n }\n return results;\n }", "public List<StaffMember> getTeamMembers(){\n\t\tSet<StaffMember> team = teamleader.getDirectSubordinates();\n\t\tStaffMemberIterator iterator = new StaffMemberIterator(team);\n\t\tList<StaffMember> listOfMembers = iterator.listOfStaffMember;\n\t\tlistOfMembers.add(teamleader);\n\t\tCollections.sort(listOfMembers);\n\t\treturn listOfMembers;\n\t}", "Team findById(Long id);", "public List<VwTeams> getByEvent(int eventId)\n\t{\n\t\tList<VwTeams> results = new ArrayList<VwTeams>();\n\t\tVwTeams[] array = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tarray = dao.findWhereEventIdEquals(eventId);\n\t\t\t\n\t\t\tresults = Arrays.asList(array);\n\t\t}\n\t\tcatch (VwTeamsDaoException e)\n\t\t{\n\t\t\tlogger.error(e.getMessage());\n\t\t\t\n\t\t\terror.setCode(Errors.Codes.DB_DAO.getCode());\n\t\t\terror.setWindowTitle(Errors.Codes.DB_DAO.getWindowTitle());\n\t\t\terror.setMessage(Errors.Codes.DB_DAO.getMessage());\n\t\t\t\n\t\t\terror.setExceptionMessage(e.getMessage());\n\t\t\t\n\t\t\tpdr.setError(error);\n\t\t\t\n\t\t\tif (logger.isDebugEnabled())\n\t\t\t\te.printStackTrace();\n\t\t\t\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn results;\n\t}", "@Override\n public List<Team> getTeamsOfUser(int userid){\n\t\tfinal String select_teams_of_user = \"SELECT * FROM Team WHERE userid = ?\";\n\t\tList<Team> teams = jdbc.query(select_teams_of_user, new TeamMapper(), userid);\n\t\taddUsertoTeams(teams);\n\t\treturn teams;\n\t}", "public List<Team> getTeamByMentorId(Id mentorId) throws MissingEntityException {\n List<Team> teams = this.teamList.getSpecificTypedList();\n List<Team> results = new ArrayList<>();\n for (Team t : teams) {\n Optional<Mentor> mentor = t.getMentor();\n if (mentor.isPresent()) {\n if (mentor.get().getId().equals(mentorId)) {\n results.add(t);\n }\n }\n }\n if (results.size() == 0) {\n throw new MissingEntityException(\"Team with said participant cannot be found.\");\n }\n return results;\n }", "public ArrayList<Team> populateDefaultTeams() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tArrayList<Team> result = new ArrayList<Team>();\t// holds the resulting list of teams\n\n\t\tString query; \t\t\t\t\t\t\t\t\t// holds query string\n\t\tPreparedStatement stmt; \t\t\t\t\t\t// holds Prepared Statement to execute on the database\n\t\tResultSet rs; \t\t\t\t\t\t\t\t\t// holds the result from the database\n\t\t\n\t\ttry {\n\t\t\n\t\t\t// concatenate select query\n\t\t\tquery = \"SELECT * FROM \" + tableDefaultTeams + \" WHERE \" + columnTeamGender + \" = \" + \"?;\";\n\t\n\t\t\t// initialize the prepare statement, execute it, and\n\t\t\t// store the result\n\t\t\tstmt = conn.prepareStatement(query);\n\t\t\tstmt.setString(1, \"F\");\t\t// TODO: REMOVE HARDCODED GENDER IN SPRINT 2\n\t\t\trs = stmt.executeQuery();\n\t\t\t\n\t\t\twhile (rs.next()) {\n\t\t\t\tTeam team = new Team();\n\t\t\t\t// store the result from the database in the team object\n\t\t\t\tteam.setTeamId(rs.getInt(columnTeamId));\n\t\t\t\tteam.setName(rs.getString(columnTeamName));\n\t\t\t\tteam.setAddress(rs.getString(columnTeamAdress));\n\t\t\t\tteam.setCity(rs.getString(columnTeamCity));\n\t\t\t\tteam.setState(rs.getString(columnTeamState));\n\t\t\t\tteam.setZip(rs.getString(columnTeamZip));\n\t\t\t\tteam.setGender(rs.getString(columnTeamGender));\n\t\t\t\tteam.setLat(rs.getString(columnTeamLat));\n\t\t\t\tteam.setLng(rs.getString(columnTeamLng));\n\t\t\t\tresult.add(team);\n\t\t\t}\n\t\t\n\t\t} catch (SQLException sqle) {\n\t\t\tSystem.out.println(sqle.getMessage());\n\t\t}\n\t\t\n\t\t// return the list of teams\n\t\treturn result;\n\t\t\n\t}", "private void populateTeams() {\n\n // TODO: Can't get teams assigned to judges for now. Instead, getting all teams in an event\n AsyncHttpClient client = new AsyncHttpClient();\n client.addHeader(\"Authorization\", \"Token token=\" + this.user.getToken().getAccess_token());\n client.get(LoginActivity.API_ROOT + \"events/\" + currEvent.getId() + \"/teams\",\n new BaseJsonHttpResponseHandler<Team[]>() {\n @Override\n public void onSuccess(int statusCode, Header[] headers, String rawJsonResponse,\n Team[] response) {\n teams_lv = (ListView) findViewById(R.id.teams_lv);\n teamsArr = response;\n\n // \"All\" will be the default category\n displayedTeams = teamsArr;\n\n // Make an \"empty\" Event in the case that there are no Events.\n if (teamsArr.length == 0) {\n teamsArr = new Team[1];\n teamsArr[0] = new Team(-1, -1, \"(No teams. Please see an admin for help.)\",\n null);\n teams_lv.setAdapter(new TeamAdapter(SelectionActivity.this,\n teamsArr));\n } else {\n teams_lv.setAdapter(new TeamAdapter(SelectionActivity.this,\n teamsArr));\n teams_lv.setOnItemClickListener(new TeamClickListener());\n }\n Log.d(\"GET TEAMS\", \"success\");\n }\n\n @Override\n public void onFailure(int statusCode, Header[] headers, Throwable error,\n String rawJsonData, Team[] errorResponse) {\n Log.d(\"GET TEAMS\", \"failure\");\n }\n\n @Override\n protected Team[] parseResponse(String rawJsonData, boolean isFailure)\n throws Throwable {\n\n if (!isFailure) {\n // Need to extract array from the first/outer JSON object\n JSONArray teamsJSONArr = new JSONObject(rawJsonData)\n .getJSONArray(\"event_teams\");\n return new Gson().fromJson(teamsJSONArr.toString(), Team[].class);\n } else return null;\n }\n });\n }", "public List<Team> getAllTeamsBySeason(Season s) { \r\n\t\t\tif(teamsBySeason==null)\t{\r\n\t\t\t\tteamsBySeason=dao.listTeamsforSeason(s); //LIST\t\t\r\n\t\t\tfor(Team atemp:teamsBySeason){ this.mapTeamBySeason.put(atemp.getTeam(), atemp);}\r\n\t\t\t}\r\n\t\t\treturn teamsBySeason;\r\n\t\t}", "List<Team> findByIds(List<Long> teamIds);", "@Override\n\tpublic List<ProjectTeamBean> listProjectTeam() {\n\t\treturn null;\n\t}", "@Test\r\n\tpublic void loadTeams() {\r\n\t\tSet<Team> response = null;\r\n\t\tresponse = service.loadTeams();\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: loadTeams\r\n\t}", "public ResultSet getTeamNames() {\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString teamNamesRecords_sql = \"SELECT name FROM \" + team_table;\n\t\tconnection = connector.getConnection();\n\t\ttry {\n\t\t\tstatement = connection.prepareStatement(teamNamesRecords_sql);\n\t\t\trs = statement.executeQuery();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn rs;\n\t}", "TeamResultWrapper findTeamsByMember(String personId,\n String partOfGroupname, int offset, int pageSize);", "@GetMapping (Constants.PATH_FETCH_TEAM_INFO)\n public ResponseEntity<ApiResponse> fetchTeams(Authentication authentication) {\n return ResponseEntity.ok(enterpriseService.getLoggedInUserTeams(Utility.getUserFromAuthentication(authentication)));\n }", "private void getTeams() {\n if(progressDialog!=null && progressDialog.isShowing()){\n progressDialog.dismiss();\n }\n progressDialog = new ProgressDialog(getContext());\n progressDialog.setCancelable(true);\n if(getArguments()!=null) {\n progressDialog.setMessage(\"Fetching Match Schedules\");\n }\n else {\n progressDialog.setMessage(\"Processing\");\n }\n progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progressDialog.setProgress(0);\n progressDialog.show();\n db.collection(\"teams\").get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\n @Override\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\n if (task.isSuccessful()) {\n for (QueryDocumentSnapshot document : task.getResult()) {\n JSONObject object = new JSONObject(document.getData());\n try {\n teamsObject.put(document.getId(), object);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n if(getArguments()!=null) {\n if (dataBundle.getString(\"from\").equals(\"league Features\")) {\n getSchedules();\n }\n else if(dataBundle.getString(\"from\").equals(\"TM-matches\")){\n getTeamSchedules();\n }\n }\n else {\n getSchedules();\n }\n } else {\n Toast.makeText(context, task.getException().getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "public Set<Player> getParticipants() { //TODO: not sure the validation needs to happend here\n\t\t// Run through the results and make sure all players have been pushed into the participants set.\n\t\tfor ( Result result : results ) {\n\t\t\tparticipants.add(result.getWinner());\n\t\t\tparticipants.add(result.getLoser());\n\t\t}\n\n\t\treturn participants;\n\t}", "private void getTeam() {\n Set<Integer> set = getRandomNumberSet();\n // clear new team list each time to allow for serial clicks on \"Generate New Random Team\"\n team.clear();\n for (Integer i : set) {\n getPokemon(i);\n }\n }", "Team getMyTeam();", "public static ResponseDataObject<MatchEntity> getListLiveMatches()\n {\n ResponseDataObject responseDataObject = new ResponseDataObject();\n List<MatchEntity> listLiveMatches = new ArrayList<>();\n\n // Load Document\n Document document = null;\n try\n {\n document = HTMLRequestManager.getData(REQUEST_URL);\n\n // Set Response Code\n if(document != null && document.hasText())\n {\n // Response OK\n responseDataObject.setResponseCode(ResponseDataObject.RESPONSE_CODE_OK);\n } else\n {\n // Response Failed\n responseDataObject.setResponseCode(ResponseDataObject.RESPONSE_CODE_FAILED_GETTING_DOCUMENT);\n }\n\n }\n catch (IOException e)\n {\n LogUtil.e(TAG, e.getMessage(), e);\n\n // Response Falied\n responseDataObject.setResponseCode(ResponseDataObject.RESPONSE_CODE_FAILED_GETTING_DOCUMENT);\n }\n\n\n // Parse Data\n if(responseDataObject.isOk())\n {\n responseDataObject.setListObjectsResponse(parseLiveMatchDocumentToListMatches(document));\n }\n\n return responseDataObject;\n }", "public interface TeamService {\n Teams getAllTeams();\n Team getTeamById(int id);\n Teams getSelectedTeams(int[] teamList);\n}", "@Override\n\tpublic List<String> getTeamNames(Integer id) {\n\t\treturn null;\n\t}", "public List<Match> getAllMatches() {\n\t\treturn matchers.stream()\n\t\t\t\t.flatMap(m -> m.getMatches().stream())\n\t\t\t\t.distinct()\n\t\t\t\t.collect(Collectors.toList());\n\t}", "@Test\n @Transactional\n public void getAllTeams() throws Exception {\n // Initialize the database\n teamRepository.saveAndFlush(team);\n\n // Get all the teamList\n restTeamMockMvc.perform(get(\"/api/teams?sort=id,desc\")).andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(team.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].name\").value(hasItem(DEFAULT_NAME.toString())))\n .andExpect(jsonPath(\"$.[*].description\")\n .value(hasItem(DEFAULT_DESCRIPTION.toString())))\n .andExpect(jsonPath(\"$.[*].level\").value(hasItem(DEFAULT_LEVEL)))\n .andExpect(jsonPath(\"$.[*].totalMember\").value(hasItem(DEFAULT_TOTAL_MEMBER)))\n .andExpect(jsonPath(\"$.[*].extraGroupName\")\n .value(hasItem(DEFAULT_EXTRA_GROUP_NAME.toString())))\n .andExpect(jsonPath(\"$.[*].extraGroupDescription\")\n .value(hasItem(DEFAULT_EXTRA_GROUP_DESCRIPTION.toString())))\n .andExpect(jsonPath(\"$.[*].extraGroupTotalMember\")\n .value(hasItem(DEFAULT_EXTRA_GROUP_TOTAL_MEMBER)));\n }", "public Teams() {\n initComponents();\n }", "public List<VwTeams> browse(String[] params)\n\t{\n\t\tList<VwTeams> results\t= new ArrayList<VwTeams>();\n\t\tVwTeams[] array\t\t\t= null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif (params == null)\n\t\t\t{\n\t\t\t\tarray = dao.findAll();\n\t\t\t}\n\t\t\telse \n\t\t\t{\t\t\t\t\n\t\t\t\t//like filter\n\t\t\t\tparams[0] = GeneralUtils.addLikeFormat(params[0]);\n\t\t\t\t\n\t\t\t\tString sql = \"\";\n\t\t\t\t\n\t\t\t\tsql = \"\tteam_name LIKE ? \";\n\t\t\t\tsql += \"\t\tevent_id = ? \";\n\t\t\t\t\t\t\t\t\n\t\t\t\tarray = dao.findByDynamicWhere(sql, params);\n\t\t\t}\n\t\t\t\n\t\t\t// convert array to list\n\t\t\tresults = Arrays.asList(array);\n\t\t}\n\t\tcatch (VwTeamsDaoException e)\n\t\t{\n\t\t\tlogger.error(e.getMessage());\n\t\t\t\n\t\t\terror.setCode(Errors.Codes.DB_DAO.getCode());\n\t\t\terror.setWindowTitle(Errors.Codes.DB_DAO.getWindowTitle());\n\t\t\terror.setMessage(Errors.Codes.DB_DAO.getMessage());\n\t\t\t\n\t\t\terror.setExceptionMessage(e.getMessage());\n\t\t\t\n\t\t\tpdr.setError(error);\n\t\t\t\n\t\t\tif (logger.isDebugEnabled())\n\t\t\t\te.printStackTrace();\n\t\t\t\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn results;\n\t}", "Collection<MatchmakingManager> getManagers();", "public ArrayList<CollegeFootballTeam> rankTeams();", "public Person[] getTeamOf(Person actor);", "List<GameResult> getAllResults();", "@SuppressWarnings(\"unchecked\")\n private List createTeamList() {\n\n ArrayList result = new ArrayList();\n for( int i = 0 ; i < leagues_array.size() ; ++i ) {\n /* each group need each HashMap-Here for each group we have 3 subgroups */\n ArrayList secList = new ArrayList();\n for( int n = 0 ; n < SplashScreen.full_teams_array.get(i).size() ; n++ ) {\n HashMap child = new HashMap();\n child.put( \"Team\", SplashScreen.full_teams_array.get(i).get(n) );\n boolean favorite_found = false;\n for(int j=0; j<SplashScreen.new_favorites_array.size(); j++) {\n if(SplashScreen.full_teams_array.get(i).get(n).toString().equals(SplashScreen.new_favorites_array.get(j)[1]) &&\n leagues_array.get(i).equals(SplashScreen.new_favorites_array.get(j)[0]) ) {\n favorite_found = true;\n }\n }\n if(favorite_found) { child.put( \"Favorite\", \"1\" ); }\n else { child.put( \"Favorite\", \"0\" ); }/*\n if(SplashScreen.full_teams_array.get(i).get(n).toString().equals(favorite_team) &&\n leagues_array.get(i).equals(favorite_league) ) {\n child.put( \"Favorite\", \"1\" );\n } else {\n }\n child.put( \"Favorite\", \"0\" );/*\n }*/\n secList.add( child );\n }\n result.add( secList );\n }\n return result;\n }", "public static Team getTeam(long id) {\n return find().where().eq(\"id\", id).findUnique();\n }", "@GET\n @Path(\"Current/Team/{teamId}\")\n public Response getTeamByCurrentUser(@PathParam(\"teamId\") Long teamId) {\n Response r = Response.noContent().build();\n User currentUser = userFacade.getCurrentUser();\n final Collection<Game> playedGames = gameFacade.findRegisteredGames(currentUser.getId());\n for (Game g : playedGames) {\n Collection<Team> teams = g.getTeams();\n for (Team t : teams) {\n if (teamId.equals(t.getId())) {\n for (Player p : t.getPlayers()) {\n if (p.getUserId().equals(currentUser.getId())) {\n r = Response.ok().entity(t).build();\n }\n }\n }\n }\n }\n return r;\n }", "public Team getTeam() {\n return team;\n }", "List<GameResult> getAllGameResults();", "public List<Player> getAllPlayers() {\r\n // TODO fix actual order of players in the List.\r\n\r\n List<Player> players = new ArrayList<>();\r\n players.addAll(teamRed.getPlayers());\r\n players.addAll(teamBlue.getPlayers());\r\n\r\n return players;\r\n }", "Team findByName(String name);", "public List<TAlgmntSalesTeam> findTAlgmntSalesTeams(final SearchFilter<TAlgmntSalesTeam> searchFilter) {\n\t\tLOGGER.info(\"=========== Find TAlgmntSalesTeams ===========\");\n\n\t\tfinal PaginationInfo paginationInfo = searchFilter.getPaginationInfo();\n\t\tfinal OperatorInfo operatorInfo = searchFilter.getOperatorInfo();\n\n\t\tfinal TAlgmntSalesTeam tAlgmntSalesTeam = searchFilter.getEntityClass();\n\t\tfinal int maxresult = paginationInfo.getMaxRows();\n\t\tfinal int index = paginationInfo.getStartIndex();\n\t\t//int maxresult = 3;\n\t\t//int index=0;\n\t\tfinal LogicalOperatorEnum logOpEnum = operatorInfo.getLogicalOperator();\n\n\t\tfinal JPAQuery jpaQuery = new JPAQuery(\"tAlgmntSalesTeamentity\", tAlgmntSalesTeam);\n\n\t\tif (tAlgmntSalesTeam.getTSalesTeam() == null) {\n\t\t\tjpaQuery.bind(TSALESTEAM, new TSalesTeam());\n\t\t} else {\n\t\t\tLOGGER.info(\"tSalesTeam {}\" + tAlgmntSalesTeam.getTSalesTeam());\n\n\t\t\tjpaQuery.bind(TSALESTEAM, tAlgmntSalesTeam.getTSalesTeam());\n\t\t}\n\n\t\tif (tAlgmntSalesTeam.getTAlgmnt() == null) {\n\t\t\tjpaQuery.bind(TALGMNT, new TAlgmnt());\n\t\t} else {\n\t\t\tLOGGER.info(\"tAlgmnt {}\" + tAlgmntSalesTeam.getTAlgmnt());\n\n\t\t\tjpaQuery.bind(TALGMNT, tAlgmntSalesTeam.getTAlgmnt());\n\t\t}\n\t\tjpaQuery.setJPAql(JPAQL);\n\t\tjpaQuery.setRestrictionExpressionStrings(RESTRICTIONS);\n\t\tjpaQuery.setLogicalOperatorEnum(logOpEnum);\n\t\treturn genericDAO.findEntities(jpaQuery, index, maxresult);\n\t}", "public static ArrayList<Match> allMatches(String season){\n PremierLeagueManager.loadingData();\n\n // getting the clubs with the filtered matches by season\n guiSeasonFilteredClubs = getGuiSeasonFilteredClubs(season);\n\n // getting the matches filtered by season\n ArrayList<Match> matchesDisplayed = getMatchesForSeason(guiSeasonFilteredClubs);\n\n return matchesDisplayed;\n }", "public ArrayList<Entity> getPlayers() {\n ArrayList<Entity> players = new ArrayList<>();\n students.forEach(student -> players.add(student.getPlayer()));\n return players;\n }", "@Override\r\n\tpublic List<Teacher> findallTeachers() throws Exception {\n\t\ttry {\r\n\t\t\treturn this.dao.findallTeachers();\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t}", "List<Player> findAllPlayers();", "@Override\n public void onResponse(String response) {\n listTeams(response);\n\n }", "public Set<Sportive> filterByTeamId(int id){\n Iterable<Sportive> materials = repo.findAll();\n return StreamSupport.stream(materials.spliterator(), false).filter(sportive -> sportive.getTeamId()==id).collect(Collectors.toSet());\n }", "public ResultSet getMatchesByTeamId(int teamId) throws SQLException {\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\tString matchesByTeamRecords_sql = \"SELECT * FROM \" + match_table + \" WHERE idHome='\" + teamId + \"' OR idAway='\"\n\t\t\t\t+ teamId + \"'\";\n\t\tconnection = connector.getConnection();\n\t\tstatement = connection.prepareStatement(matchesByTeamRecords_sql);\n\t\trs = statement.executeQuery();\n\t\treturn rs;\n\t}", "@Override\n\tpublic List<ProjectTeamBean> selectProjectTeamList() {\n\t\treturn null;\n\t}", "public List<TAlgmntSalesTeam> getTAlgmntSalesTeamsByTSalesTeam(final SearchFilter<TSalesTeam> searchFilter) {\n\n\t\tfinal PaginationInfo paginationInfo = searchFilter.getPaginationInfo();\n\t\tfinal TSalesTeam tSalesTeam = searchFilter.getEntityClass();\n\t\tList<Object> tSalesTeamList = new ArrayList<Object>();\n\t\ttSalesTeamList.add(searchFilter.getEntityClass());\n\t\tfinal int maxresult = paginationInfo.getMaxRows();\n\t\tfinal int index = paginationInfo.getStartIndex();\n\n\t\treturn genericDAO.findEntitiesByNamedQueryMultiCond(\"FindTAlgmntSalesTeamByTSalesTeam\", tSalesTeamList, index, maxresult);\n\t}", "public String getStatsOfTeams(){\n\n String res = \"\";\n\n if (teams.size() <= 0){\n return \"No team registered in tournament\";\n }\n\n for(int num=0; num<teams.size(); num++)\n {\n SoccerTeam team = teams.get(num);\n res += team.toString() + \"\\n\";\n }\n return res;\n }", "public List<Match> listMatches(int id_s) {\r\n\t\tString sql = \"SELECT * FROM matches WHERE Season=?\" ;\r\n\t\t\r\n\t\tList<Match> result = new ArrayList<>() ;\r\n\t\t\r\n\t\tConnection conn = DBConnect.getConnection();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tPreparedStatement st = conn.prepareStatement(sql);\r\n\t\t\tst.setInt(1, id_s);\r\n\r\n\t\t\tResultSet rs = st.executeQuery();\r\n\r\n\t\t\t\r\n\t\t\twhile(rs.next()) {\r\n\t\t\t\tLocalDate input = rs.getDate(\"Date\").toLocalDate() ;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tresult.add( new Match(rs.getInt(\"match_id\"), seasonMap.get(rs.getInt(\"Season\")), \r\n\t\t\t\t\t\trs.getString(\"Div\"), input, teamMap.get(rs.getString(\"HomeTeam\")), \r\n\t\t\t\t\t\tteamMap.get(rs.getString(\"AwayTeam\")),rs.getInt(\"FTHG\"), \r\n\t\t\t\t\t\trs.getInt(\"FTAG\"), rs.getString(\"FTR\")) ) ;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tconn.close();\r\n\t\t\treturn result ;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null ;\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic Iterator<Team> iterator() {\n\t\t\t\treturn null;\n\t\t\t}", "List<SportActivity> findAll();", "private List<Team> extractTeamNamesFromFixtures(List<Fixture> fixtures) {\r\n\r\n\t\tList<Team> teams = new ArrayList<>();\r\n\r\n\t\tfor (Fixture fixture : fixtures) {\r\n\r\n\t\t\tOptional<Team> homeTeam = teams.stream().filter(t -> t.getName().equals(fixture.getHomeTeamName()))\r\n\t\t\t\t\t.findAny();\r\n\r\n\t\t\tif (!homeTeam.isPresent()) {\r\n\t\t\t\tTeam teamToAdd = new Team();\r\n\t\t\t\tteamToAdd.setName(fixture.getHomeTeamName());\r\n\t\t\t\tteamToAdd.setResourceId(((Number) fixture.getHomeTeamResourceId()).longValue());\r\n\t\t\t\tteamToAdd.setLogo(fixture.getHomeTeamBadge());\r\n\r\n\t\t\t\tteams.add(teamToAdd);\r\n\t\t\t}\r\n\r\n\t\t\tOptional<Team> awayTeam = teams.stream().filter(t -> t.getName().equals(fixture.getAwayTeamName()))\r\n\t\t\t\t\t.findAny();\r\n\r\n\t\t\tif (!awayTeam.isPresent()) {\r\n\t\t\t\tTeam teamToAdd = new Team();\r\n\t\t\t\tteamToAdd.setName(fixture.getAwayTeamName());\r\n\t\t\t\tteamToAdd.setResourceId(((Number) fixture.getAwayTeamResourceId()).longValue());\r\n\t\t\t\tteamToAdd.setLogo(fixture.getAwayTeamBadge());\r\n\r\n\t\t\t\tteams.add(teamToAdd);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn teams;\r\n\t}", "@Test\r\n\tpublic void findAllGames() {\r\n\t\t// DO: JUnit - Populate test inputs for operation: findAllGames \r\n\t\tInteger startResult = 0;\r\n\t\tInteger maxRows = 0;\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tList<Game> response = null;\r\n\t\tTswacct tswacct = null;\r\n\t\tresponse = service.findAllGames4tsw(tswacct, startResult, maxRows);\r\n\t\t// DO: JUnit - Add assertions to test outputs of operation: findAllGames\r\n\t}", "public String[] getAvailableTeams() {\n\n int team1 = 0;\n int team2 = 0;\n if (activePlayers > 0) {\n for (int i = 0; i < activePlayers; i++) {\n if (players[i].getTeam() == teams[0]) {\n team1++;\n continue;\n }\n team2++;\n }\n\n String[] team = new String[2];\n if ((activePlayers == numMaxPlayers - 1) && (team1 == 0 || team2 == 0)) {\n if (team1 == 0) {\n team[0] = teams[0].toString();\n return team;\n }\n team[0] = teams[1].toString();\n return team;\n }\n }\n return new String[]{teams[0].toString(), teams[1].toString(), null};\n }", "public List<Meeting> getMeetings(int projectId);", "List<ChallengeTo> findAllChallenges();", "@Override\r\n\tpublic TeamPO findTeamByName(String name) {\n\t\treturn teams.findTeamByShortName(name);\r\n\t}", "public List<String> getTeamMembers() {\r\n\t\treturn teamMembers;\r\n\t}", "public void getTeams(ServiceHandler sh) {\n String jsonStr = sh.makeServiceCall(url, ServiceHandler.GET);\n\n Log.d(\"Response: \", \"> \" + jsonStr);\n\n if (jsonStr != null) {\n try {\n JSONObject jsonObj = new JSONObject(jsonStr);\n\n // Getting JSON Array node\n jsonArray = jsonObj.getJSONArray(TAG_TABLE_TEAMS);\n resultList = new ArrayList<String>();\n\n // looping through All results\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject c = jsonArray.getJSONObject(i);\n\n String teamName = c.getString(TAG_TEAMNAME);\n String teamColor = c.getString(TAG_TEAMCOLOR);\n\n\n resultList.add(teamName);\n resultList.add(teamColor);\n\n\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n } else {\n Log.e(\"ServiceHandler\", \"Couldn't get any data from the url\");\n }\n }", "public ArrayList<Student> getTeamListFromTeamId(int teamId){\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tHashMap<String, ArrayList<String>> map = MySQLConnector.executeMySQL(\"select\", \"SELECT * FROM `is480-matching`.users inner join `is480-matching`.students on users.id=students.id WHERE students.team_id = \" + teamId);\r\n\t\tSet<String> keySet = map.keySet();\r\n\t\tIterator<String> iterator = keySet.iterator();\r\n\t\t\r\n\t\twhile (iterator.hasNext()){\r\n\t\t\tString key = iterator.next();\r\n\t\t\tArrayList<String> array = map.get(key);\t\r\n\t\t\tint id \t\t\t\t= Integer.parseInt(array.get(0));\r\n\t\t\tString username \t= array.get(1);\r\n\t\t\tString fullName \t= array.get(2);\r\n\t\t\tString contactNum \t= array.get(3);\r\n\t\t\tString email \t\t= array.get(4);\r\n\t\t\tString type\t\t\t= array.get(5);\r\n\t\t\tString secondMajor \t= array.get(7);\r\n\t\t\tint role \t\t\t= Integer.parseInt(array.get(8));\r\n\t\t\tint teamid \t\t\t= Integer.parseInt(array.get(9));\r\n\t\t\tint prefRole \t\t= Integer.parseInt(array.get(10));\r\n\t\t\t\r\n\t\t\tStudent student = new Student(id, username, fullName, contactNum, email, type, secondMajor, role, teamid, prefRole);\r\n\t\t\tstudents.add(student);\r\n\t\t}\r\n\t\t\r\n\t\tCollections.sort(students, new Comparator<Student>() {\r\n\t @Override public int compare(Student s1, Student s2) {\r\n\t \treturn s1.getRole() - s2.getRole();\r\n\t }\r\n\t\t});\r\n\t\t\r\n\t\t\r\n\t\treturn students;\r\n\t}" ]
[ "0.7540103", "0.7030998", "0.70124114", "0.6967293", "0.6897498", "0.6757091", "0.67497635", "0.6696436", "0.66950595", "0.6679333", "0.66632086", "0.6651767", "0.6521972", "0.6381139", "0.637556", "0.6337917", "0.6315982", "0.6315762", "0.6313158", "0.62722087", "0.6247913", "0.6229781", "0.6197826", "0.6149989", "0.61402476", "0.61390823", "0.613283", "0.6078199", "0.6072717", "0.60235816", "0.5978975", "0.59635", "0.59359837", "0.5930069", "0.59140795", "0.58475727", "0.58454996", "0.582576", "0.582526", "0.58148366", "0.58054405", "0.57578975", "0.574203", "0.5718282", "0.57026255", "0.56481737", "0.5638022", "0.56284744", "0.56274533", "0.5622235", "0.5610679", "0.55944306", "0.5572046", "0.5571738", "0.55655104", "0.55174756", "0.55145216", "0.54919803", "0.54903424", "0.54867953", "0.5462676", "0.54446906", "0.54272926", "0.5423755", "0.5423519", "0.5408794", "0.5397613", "0.539714", "0.5395766", "0.5384316", "0.5372432", "0.53695345", "0.5360089", "0.53577757", "0.5344577", "0.5327206", "0.53246635", "0.5324005", "0.5313202", "0.53105015", "0.53045076", "0.52943575", "0.52858883", "0.5285489", "0.5285011", "0.5281094", "0.52789193", "0.5278143", "0.5277", "0.5276839", "0.52745515", "0.52442175", "0.523267", "0.5232567", "0.5230096", "0.5228566", "0.5227462", "0.5207246", "0.52005506", "0.5186577" ]
0.67726016
5
Update team in database.
void update(Team team);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Team update(TeamDTO teamForm) throws TeamNotFoundException;", "@Override\n @Transactional\n public boolean updateTeam(Team team) {\n String sql = \"UPDATE Team SET teamname = ? WHERE teamid = ?\";\n return jdbc.update(sql, team.getName(), team.getId()) > 0;\n }", "private static void updateRecords() {\n for (Team t: Main.getTeams()){\n //If the team already exists\n if (SqlUtil.doesTeamRecordExist(c,TABLE_NAME,t.getIntValue(Team.NUMBER_KEY))){\n //Update team record\n updateTeamRecord(t);\n } else {\n //Create a new row in database\n addNewTeam(t);\n\n }\n }\n\n }", "@Override\n\tpublic void updateTeam(ProjectTeamBean projectTeamBean) {\n\t\t\n\t}", "@Override\r\n\tpublic ResultMessage updateTeam(TeamPO oneTeam) {\n\t\treturn teams.updateTeam(oneTeam);\r\n\t}", "int updateByPrimaryKey(SysTeam record);", "@Override\n\tpublic void updateProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}", "@Test\n @Transactional\n public void updateNonExistingTeam() throws Exception {\n int databaseSizeBeforeUpdate = teamRepository.findAll().size();\n\n // Create the Team\n TeamDTO teamDTO = teamMapper.toDto(team);\n\n // If the entity doesn't have an ID, it will be created instead of just\n // being updated\n restTeamMockMvc\n .perform(put(\"/api/teams\").contentType(TestUtil.APPLICATION_JSON_UTF8)\n .content(TestUtil.convertObjectToJsonBytes(teamDTO)))\n .andExpect(status().isCreated());\n\n // Validate the Team in the database\n List<Team> teamList = teamRepository.findAll();\n assertThat(teamList).hasSize(databaseSizeBeforeUpdate + 1);\n }", "public boolean updateTeam(Team t, int id) {\n\t\tboolean update = false;\n\t\ttry {\n\t\t\tPreparedStatement statement = null;\n\t\t\tjava.sql.Date tDate = new java.sql.Date(t.getDateFoundation().getTime());\n\t\t\tString updateRecords_sql = \"UPDATE \" + team_table + \" SET name='\" + t.getName() + \"', coach='\"\n\t\t\t\t\t+ t.getCoach() + \"', city='\" + t.getCity() + \"', dateFoundation='\" + tDate + \"' WHERE id='\" + id\n\t\t\t\t\t+ \"'\";\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.prepareStatement(updateRecords_sql);\n\t\t\tstatement.executeUpdate();\n\t\t\tupdate = true;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn update;\n\t}", "@Test\r\n\tpublic void saveTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeam \r\n\t\tTeam team = new wsdm.domain.Team();\r\n\t\tservice.saveTeam(team);\r\n\t}", "private void save() {\n Saver.saveTeam(team);\n }", "public void update(String teamID, String teamName, League league, List<Player> playerList, List<Game> gameList, List<Game> gameList1) {\n TeamDB tdb = new TeamDB();\n Team team = get(teamID);\n \n League oldLeague = team.getLeagueID();\n if (!oldLeague.getLeagueID().equals(league.getLeagueID())) {\n oldLeague.getTeamList().remove(team);\n LeagueDB ldb = new LeagueDB();\n ldb.update(oldLeague);\n }\n \n team.setTeamName(teamName);\n team.setPlayerList(playerList);\n team.setLeagueID(league);\n tdb.update(team);\n }", "int updateByPrimaryKeySelective(SysTeam record);", "@Override\n public void updateTeam(Id teamId, Team updatedTeam) throws AlfredException {\n this.teamList.update(teamId, updatedTeam);\n }", "int updateByPrimaryKey(SmsEmployeeTeam record);", "public void updateUserTeam() {\n\t\tUser user = users.get(userTurn);\n\t\tSystem.out.println(user.getName());\n\t\tSystem.out.println(tmpTeam.size());\n\t\tUserTeam roundTeam = new UserTeam();\n\t\troundTeam.putAll(tmpTeam.getPlayers());\n\t\tSystem.out.println(roundNumber);\n\t\tSystem.out.println(roundTeam.size());\n\t\tSystem.out.println(\"dfdfdfd\");\n\t\tuser.setUserTeam(roundTeam, roundNumber);\n\t\tSystem.out.println(\"dfdfdfd\");\n\t\ttmpTeam = new UserTeam();\n\t}", "@Override\n\tpublic void updateTeam(String name, SuperHuman superHuman) {\n\n\t}", "public Teams updateTeamById(UUID id,Teams teams)\n {\n Optional<Teams> optionalTeam = teamRepo.findById(id);\n if (!optionalTeam.isPresent())\n throw new TeamNotFoundException(\"Team Record with id \" + id + \" is not available\");\n teams.setTeamId(id);\n return teamRepo.save(teams);\n }", "public void updateTeam(int team, GameData gameData) {\n currentTeam = gameData.getTeamDataList().get(team);\n passButton.setVisible(false);\n answerField.setText(\"\");\n //if the current team is this client\n if (team == teamIndex) {\n AppearanceSettings.setEnabled(true, submitAnswerButton, answerField);\n announcementsLabel.setText(\"It's your turn to try to answer the question!\");\n }\n //if the current team is an opponent\n else {\n AppearanceSettings.setEnabled(false, submitAnswerButton, answerField);\n announcementsLabel.setText(\"It's \" + currentTeam.getTeamName() + \"'s turn to try to answer the question.\");\n }\n //mark down that this team has had a chance to answer\n teamHasAnswered.replace(team, true);\n hadSecondChance = false;\n teamLabel.setText(currentTeam.getTeamName());\n }", "public void insertTeam(Team t) {\n\t\tEntityManager em = emfactory.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tem.persist(t);\n\t\tem.getTransaction().commit();\n\t\tem.close();\n\t}", "public void setTeam(Team team) {\r\n\t\tthis.team = team;\r\n\t}", "public TAlgmntSalesTeam updateTAlgmntSalesTeam(final TAlgmntSalesTeam tAlgmntSalesTeam) {\n\t\tLOGGER.info(\"=========== Update TAlgmntSalesTeam ===========\");\n\t\treturn genericDAO.update(tAlgmntSalesTeam);\n\t}", "public void setTeamId(int value) {\n this.teamId = value;\n }", "int updateByPrimaryKeySelective(SmsEmployeeTeam record);", "public void insertTeam(Team team) {\n\t\ttry {\n\t\t\tStatement statement = null;\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.createStatement();\n\t\t\tjava.sql.Date tDate = new java.sql.Date(team.getDateFoundation().getTime());\n\t\t\tString insertTeam_sql = \"INSERT INTO \" + team_table + \" (id, name, coach, city, dateFoundation)\"\n\t\t\t\t\t+ \"VALUES (NULL, '\" + team.getName() + \"' , '\" + team.getCoach() + \"' , '\" + team.getCity()\n\t\t\t\t\t+ \"' , '\" + tDate + \"')\";\n\t\t\tstatement.executeUpdate(insertTeam_sql);\n\t\t} catch (SQLException e) {\n\t\t\tif (e.getErrorCode() == MYSQL_DUPLICATE_PK) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\t\t\t\talert.setHeaderText(\"Duplicity Error\");\n\t\t\t\talert.setContentText(\"This team is already in our database\");\n\t\t\t\talert.showAndWait();\n\t\t\t} else {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "public void setTeam(String team) {\r\n\t\tTeam = team;\r\n\t}", "@Test\n public void toggleTeamStates() {\n Team team = new Team(\"Crvena Zvezda\");\n\n // TODO: open persistence context and create transaction\n\n // TODO: move team to managed state\n\n // TODO: assert that the team is managed (check if contained in session)\n\n // TODO: commit and close persistence context\n\n // TODO: fetch from DB as managed entity\n\n // TODO: assert entity is managed\n\n // TODO: remove entity from session and assert not managed\n\n // TODO: commit and close\n }", "public void setWins(String teamName, int wins)\n\t throws SQLException\n\t \t\t{\n\t\t // Create a connection to the database.\n\t\t conn = DriverManager.getConnection(DB_URL);\n\n\t\t// Create a Statement object for the query.\n\t\tStatement stmt = conn.createStatement();\n\n\t\t// Execute the update.\n\t\tstmt.executeUpdate(\"UPDATE Team \" +\n\t \"SET wins = \" +\n\t wins +\n\t \" WHERE teamName = '\" +\n\t teamName + \"'\");\n\n\t\t// Close the Connection and Statement objects.\n\t\tconn.close();\n\t\tstmt.close();\n\t\t}", "@PostMapping(path=\"/add/{id}/team\")\n public @ResponseBody Object assignTeamMember(@PathVariable long id, @RequestParam Team team){\n TeamMember tm = teamMemberRepository.getOne(id);\n tm.setTeam(team); // Retrieving the list of team members and adding new team member\n return teamMemberRepository.saveAndFlush(tm);\n }", "private static void updateTeamRecord(Team t) {\n ArrayList<Object> records = new ArrayList<>();\n //Get existing team data\n ResultSet teamSet = SqlUtil.getTeamRecord(c, TABLE_NAME, t.getIntValue(Team.NUMBER_KEY));\n try {\n ArrayList<String> matches;\n if (teamSet != null) {\n matches = new ArrayList<>(Arrays.asList(SqlUtil.getArrayFromString(teamSet.getString(\"match_nums\"))));\n } else {\n Main.sendError(\"Cannoy read team data: \" + t.getValue(Team.NUMBER_KEY),false);\n return;\n }\n for (String m: matches) {\n //If the match number already exists\n System.out.println(m);\n if (t.getStringValue(Team.MATCH_KEY).equalsIgnoreCase(m.trim())) {\n return;\n }\n }\n records.add(t.getIntValue(Team.NUMBER_KEY));\n records.add(t.getValue(Team.COLOR_KEY));\n records.add(1+teamSet.getInt(\"num_matches\"));\n matches.add(t.getStringValue(Team.MATCH_KEY));\n records.add(matches.toArray(new String[matches.size()]));\n for(Element e: Main.getElements()){\n switch (e.getType()){\n\n case SEGMENTED_CONTROL:\n for (int i = 0; i<e.getArguments().length;i++){\n if (t.getStringValue(e.getKeys()[0]).equalsIgnoreCase(e.getArguments()[i])){\n records.add(1+teamSet.getInt(e.getColumnValues()[i]));\n } else {\n records.add(teamSet.getInt(e.getColumnValues()[i]));\n }\n }\n break;\n case TEXTFIELD:\n if (e.getArguments()[0].equalsIgnoreCase(\"number\")) {\n records.add(t.getIntValue(e.getKeys()[0]) + teamSet.getInt(e.getColumnValues()[0]));\n\n } else if (e.getArguments()[0].equalsIgnoreCase(\"decimal\")){\n records.add(t.getDoubleValue(e.getKeys()[0]) + teamSet.getInt(e.getColumnValues()[0]));\n }\n break;\n case STEPPER:\n records.add(t.getIntValue(e.getKeys()[0]) + teamSet.getInt(e.getColumnValues()[0]));\n break;\n case LABEL:\n break;\n case SWITCH:\n for (int i = 0; i<e.getKeys().length;i++){\n if (t.getStringValue(e.getKeys()[i]).equalsIgnoreCase(\"yes\")){\n records.add(1 + teamSet.getInt(e.getColumnValues()[i*2]));\n records.add(teamSet.getInt(e.getColumnValues()[i*2+1]));\n } else {\n records.add(teamSet.getInt(e.getColumnValues()[i*2]));\n records.add(1 + teamSet.getInt(e.getColumnValues()[i*2+1]));\n }\n }\n break;\n case SPACE:\n break;\n case SLIDER:\n records.add(t.getDoubleValue(e.getKeys()[0]) + teamSet.getDouble(e.getColumnValues()[0]));\n break;\n }\n }\n double total = 0.0;\n\n for (Equation e: Main.getEquations()){\n double value = e.evaluate(t) + teamSet.getDouble(e.getColumnValue());\n records.add(value);\n total +=value;\n }\n\n records.add(total);\n\n SqlUtil.updateTeamRecord(c,TABLE_NAME, records.toArray(new Object[records.size()]),t.getStringValue(Team.NUMBER_KEY));\n\n } catch (SQLException e) {\n Main.sendError(\"Problem updating team records\", false, e);\n } catch (NullPointerException e){\n Main.sendError(\"Cannot read team data for team \" + t.getValue(Team.NUMBER_KEY),false,e);\n }\n }", "public void setTeam(String team) {\n\t\tthis.team = team;\n\t}", "void addMyTeam(Team team) throws HasTeamAlreadyException;", "@Test(dependsOnMethods = {\"testAddTeam\"})\n\tpublic void testUpdateTeam() {\n\t}", "@Override\n\tpublic TeamInfo saveOrUpdate(TeamInfo teamInfo) {\n\t\treturn repository.save(teamInfo);\n\t}", "public void setGamesPlayed(String teamName, int games)\n\t throws SQLException\n\t \t\t{\n\t\t // Create a connection to the database.\n\t\t conn = DriverManager.getConnection(DB_URL);\n\n\t\t// Create a Statement object for the query.\n\t\tStatement stmt = conn.createStatement();\n\n\t\t// Execute the update.\n\t\tstmt.executeUpdate(\"UPDATE Team \" +\n\t \"SET games = \" +\n\t games +\n\t \" WHERE teamName = '\" +\n\t teamName + \"'\");\n\n\t\t// Close the Connection and Statement objects.\n\t\tconn.close();\n\t\tstmt.close();\n\t\t}", "Team findById(Long id);", "private void updateDB() {\n }", "public void newTeam(Team team);", "@Override\n\tpublic void setTeam(int i) {\n\t\t\n\t}", "@Override\r\n\t@Transactional(propagation=Propagation.REQUIRED)\r\n\tpublic void add(Team team) {\n\t\tentityManager.createQuery(\"insert into Team(id, name) values (team.id, team.name)\");\r\n\t}", "public void updateStudent(int id,int teamId, String role){\r\n\t\t\r\n\t\tMySQLConnector.executeMySQL(\"update\", \"UPDATE `is480-matching`.`students` SET `team_id`=\" + teamId + \" WHERE `id`=\" + id );\r\n\t\tMySQLConnector.executeMySQL(\"update\", \"UPDATE `is480-matching`.`students` SET `role_id`=\" + Integer.parseInt(role) + \" WHERE `id`=\" + id);\r\n\t\t//fix this statement.\r\n\t}", "@Override\n @Transactional\n public Team addTeam(Team team) {\n KeyHolder keyHolder = new GeneratedKeyHolder();\n String sql = \"INSERT INTO Team (teamname, userid) VALUES (?, ?)\";\n\n jdbc.update((Connection connection) -> {\n PreparedStatement prep = connection.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS);\n prep.setString(1, team.getName());\n prep.setInt(2, team.getUser().getId());\n return prep;\n }, keyHolder);\n team.setId(keyHolder.getKey().intValue());\n return team;\n }", "private static void LessonDAOUpdate() {\n PersonDAO personDAO = new PersonDAOImpl();\n\n Person person = personDAO.getPersonById(7);\n person.setFirstName(\"Teddy\");\n\n if(personDAO.updatePerson(person)) {\n System.out.println(\"Person Update Success!\");\n } else {\n System.out.println(\"Person Update Fail!\");\n }\n }", "@Override\n public boolean deleteTeamById(int id){\n teampokemondao.deleteTeamPokemonByTeam(id);\n typestatdao.deleteTypeStatByTeam(id);\n basestatdao.deleteBaseStatByTeam(id);\n \t String sql = \"DELETE FROM Team WHERE Team.teamid = \" + id;\n return jdbc.update(sql) > 0;\n }", "public void setTeam(String team) {\n\t\tthis.teamOfPlayer = team;\n\t}", "@Test\r\n\tpublic void saveTeamTeamplayerses() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamTeamplayerses \r\n\t\tInteger teamId_7 = 0;\r\n\t\tTeamplayers related_teamplayerses = new wsdm.domain.Teamplayers();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamTeamplayerses(teamId_7, related_teamplayerses);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamTeamplayerses\r\n\t}", "public boolean updatePlayer(Player p, int idTeam, int id) {\n\t\tboolean update = false;\n\t\ttry {\n\t\t\tPreparedStatement statement = null;\n\t\t\tjava.sql.Date newDate = new java.sql.Date(p.getDateOfBirth().getTime());\n\t\t\tString updateRecords_sql = \"UPDATE \" + player_table + \" SET idTeam='\" + idTeam + \"', name='\" + p.getName()\n\t\t\t\t\t+ \"', lastname='\" + p.getLastname() + \"', dateOfBirth='\" + newDate + \"', height='\" + p.getHeight()\n\t\t\t\t\t+ \"' WHERE id=\" + id;\n\t\t\tconnection = connector.getConnection();\n\t\t\tstatement = connection.prepareStatement(updateRecords_sql);\n\t\t\tstatement.executeUpdate();\n\t\t\tupdate = true;\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn update;\n\t}", "public static void addTeam(TeamForm tf) {\n Team team;\n\n long id = tf.id;\n\n if (!isTeam(id)) {\n team = new Team(tf.teamName, tf.location, tf.teamType, tf.skillLevel, tf.roster, tf.description, tf.imageUrl);\n team.save();\n }\n else {\n team = getTeam(id);\n team.setTeamName(tf.teamName);\n team.setLocation(tf.location);\n team.setTeamType(tf.teamType);\n team.setSkillLevel(tf.skillLevel);\n team.setRoster(tf.roster);\n team.setDescription(tf.description);\n team.setImageUrl(tf.imageUrl);\n team.setWins(tf.wins);\n team.setLosses(tf.losses);\n team.setPointsFor(tf.pointsFor);\n team.setPointsAgainst(tf.pointsAgainst);\n team.save();\n }\n }", "@Test\r\n\tpublic void saveTeamGamesForVisitorTeamFk() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamGamesForVisitorTeamFk \r\n\t\tInteger teamId_4 = 0;\r\n\t\tGame related_gamesforvisitorteamfk = new wsdm.domain.Game();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamGamesForVisitorTeamFk(teamId_4, related_gamesforvisitorteamfk);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamGamesForVisitorTeamFk\r\n\t}", "private static void switchTeam(BrowserWindow bw, String team) {\n\t\tRepeat rpt = Repeat.findRepeatByIdEndsWith(bw, \"repeat\");\n\t\trpt.clickRow(team);\n\t}", "@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\tpublic void deleteTeam() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeam \r\n\t\tTeam team_1 = new wsdm.domain.Team();\r\n\t\tservice.deleteTeam(team_1);\r\n\t}", "public void nodeTeam(String id, String team)\n\t{\n\t\tgetNode(id).team = team;\n\t}", "public void setTeams(Collection<Team> teams) {\r\n this.teams = teams;\r\n }", "@RequestMapping(value = \"/invite/profile/{profileId}/team/{teamId}\", method = PUT)\n public LobbyTeam inviteToTeam(@AuthenticationPrincipal UserSimpleDetails user,\n @PathVariable(\"teamId\") String teamId,\n @PathVariable(\"profileId\") String profileId)\n throws TeamNotFoundException {\n log.info(\"user {} invites profile {} into team {}\", user.getIdentity(), profileId, teamId);\n return lobbyService.inviteToTeam(profileId, teamId);\n }", "public void deleteTeam(Team team) {\n\t\tEntityManager em = emfactory.createEntityManager();\n\t\tem.getTransaction().begin();\n\t\tTypedQuery<Team> deleteTeam = em.createQuery(\"select t from Team t where t.teamId = :selectedId\", Team.class);\n\t\tdeleteTeam.setParameter(\"selectedId\", team.getTeamId());\n\t\tdeleteTeam.setMaxResults(1);\n\t\tTeam toDelete = deleteTeam.getSingleResult();\n\t\tem.remove(toDelete);\n\t\tem.getTransaction().commit();\n\t\tem.close();\n\t}", "public void updateTeamTables() {\n ArrayList<Player> tempTeam = new ArrayList<>();\n ArrayList<Player> tempTaxi = new ArrayList<>();\n teamTable.getItems().clear();\n for (Team tt : dataManager.getDraft().getFantasyTeams()) {\n if (tt.getTeamName().equals(selectTeam.getSelectionModel().getSelectedItem())) {\n tempTeam = tt.getTeamList();\n tempTaxi = tt.getTaxiList();\n }\n }\n teamTable = resetTeamTable(tempTeam);\n teamTaxiTable = resetTaxiTable(tempTaxi);\n \n teamTable.getSortOrder().add(posCol);\n posCol.setComparator(positionCompare);\n posCol.setSortType(SortType.ASCENDING);\n posCol.setSortable(true);\n posCol.setSortable(false);\n }", "@Test\r\n\tpublic void saveTeamTswacct() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamTswacct \r\n\t\tInteger teamId_3 = 0;\r\n\t\tTswacct related_tswacct = new wsdm.domain.Tswacct();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamTswacct(teamId_3, related_tswacct);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamTswacct\r\n\t}", "public static void updateArchitect(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects \" +\r\n \" SET architect_name = ?, architect_tel = ?, architect_email = ?, architect_address = ?\" +\r\n \"WHERE project_num = \" +projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setString(1, NewProject.architect_name);\r\n pstmt.setString(2, NewProject.architect_tel);\r\n pstmt.setString(3, NewProject.architect_email);\r\n pstmt.setString(4, NewProject.architect_address);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void update(Teacher o) throws SQLException {\n\t\t\r\n\t}", "SysTeam selectByPrimaryKey(Integer teamId);", "@PostMapping(\"/saveTeam\")\n public String saveTeam(@Valid @ModelAttribute(\"team\") Team team) {\n teamService.saveTeam(team);\n return \"redirect:/showFormForUpdateTeam/\"+team.getId();\n }", "void update(EmployeeDetail detail) throws DBException;", "public void setTeamName(String teamName) {\r\n this.teamName = teamName;\r\n }", "@Test\r\n public void testUpdate() {\r\n System.out.println(\"update\");\r\n Festivity object = new Festivity();\r\n object.setStart(Calendar.getInstance().getTime());\r\n object.setEnd(Calendar.getInstance().getTime());\r\n object.setName(\"Test Fest 2\");\r\n object.setPlace(\"Howards\");\r\n boolean expResult = true;\r\n boolean result = Database.update(object);\r\n assertEquals(expResult, result);\r\n \r\n }", "static public void set_team_data(String league){\n\n\t\tEdit_row_window.attrs = new String[]{\"team name:\", \"rating:\", \"release year:\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct p.id, p.name, p.links_to_player, p.birth_year \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_\"+league+\"_players p, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_\"+league+\"_player_team pt \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where pt.player_id=p.id and pt.team_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by links_to_player desc \";\n\t\t\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct p.id, p.name, p.links_to_player, p.birth_year \" +\n\t\t\t\t\" from curr_\"+league+\"_players p \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"player name\", \"rating\", \"birth year\"};\n\t\tEdit_row_window.label_min_parameter=\"min. birth year:\";\n\t\tEdit_row_window.linked_category_name = \"PLAYERS\";\n\t}", "public void updateBoard(BoardDto dto) {\n\r\n\t\ttry {\r\n\t\t\t//DataSource(커넥션풀)에서 DB와 미리 연결된 Connection 객체를 얻어온다.\r\n\t\t\tcon = ds.getConnection();\r\n\t\t\t\r\n\t\t\t// dto에 있는 데이터를 DB에 수정\r\n\t\t\tString sql = \"update Board set name =?, email =?, subject =?, content =? where num = ?\";\r\n\t\t\t\r\n\t\t\tpstmt = con.prepareStatement(sql);\r\n\t\t\tpstmt.setString(1, dto.getName());\r\n\t\t\tpstmt.setString(2, dto.getEmail());\r\n\t\t\tpstmt.setString(3, dto.getSubject());\r\n\t\t\tpstmt.setString(4, dto.getContent());\r\n\t\t\tpstmt.setInt(5, dto.getNum());\r\n\t\t\t\r\n\t\t\tpstmt.executeUpdate();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.out.println(\"BoardDao클래스의 updateBoard() 메서드의 오류 : \" + e);\r\n\t\t} finally {\r\n\t\t\tfreeResource();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public static void setTeam(UserTeam team) {\n\t\tgame.setTmpTeam(team);\n\t\tint i=0;\n\t\tfor (Iterator<FootballPlayer> iterator = team.getPlayers().values().iterator(); iterator\n\t\t\t\t.hasNext();) {\n\t\t\tFootballPlayer player = iterator.next();\n\t\t\tnamesLabels.get(i).setText(game.getLastName(player.getName()));\n\t\t\tshirtLabels.get(i).setIcon(MainGui.getShirt(player.getTeamName()));\n\t\t\tbuttonArray[i].setText(\"X\");\n\t\t\ti++;\n\t\t}\n\t}", "Team createTeam();", "public int getTeamId() {\n return teamId;\n }", "public void setTeamName(String name) {\n\t\tteamName = name;\n\t}", "void resetMyTeam(Team team);", "public void dyupdate(DYBoardDTO dto) {\n\t\tDBConn dbconn = DBConn.getDB();\n\t\tConnection conn=null;\n\t\t\n\t\ttry {\n\t\t\tconn=dbconn.getConn();\n\t\t\tconn.setAutoCommit(false);\n\t\t\t\n\t\t\tDYBoardDAO dao = DYBoardDAO.getdao();\n\t\t\tdao.dyupdate(conn, dto);\n\t\t\t\n\t\t\tconn.commit();\n\t\t}catch(NamingException | SQLException e) {\n\t\t\tSystem.out.println(e);\n\t\t\ttry {conn.rollback();}catch(SQLException e2) {}\n\t\t}finally {\n\t\t\tif(conn!=null)try {conn.close();}catch(SQLException e) {}\n\t\t}\n\t\t\n\t}", "public void setTeamId(int teamId) {\n\t\tthis.teamId = teamId;\n\t}", "public Builder setTeam(int value) {\n bitField0_ |= 0x00000004;\n team_ = value;\n onChanged();\n return this;\n }", "void setWinningTeam(TeamId winner) {\n winningTeam.set(winner);\n }", "public void updateAirForceTeam(Collection<Unit> airunits) {\n\t\t\n\t\t// remove airunit of invalid team \n\t\tList<Integer> invalidUnitIds = new ArrayList<>();\n\t\t\n\t\tfor (Integer airunitId : airForceTeamMap.keySet()) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tif (!UnitUtils.isCompleteValidUnit(airunit)) {\n\t\t\t\tinvalidUnitIds.add(airunitId);\n\t\t\t} else if (airForceTeamMap.get(airunitId).leaderUnit == null) {\n\t\t\t\tinvalidUnitIds.add(airunitId);\n\t\t\t}\n\t\t}\n\t\tfor (Integer invalidUnitId : invalidUnitIds) {\n\t\t\tairForceTeamMap.remove(invalidUnitId);\n\t\t}\n\t\t\n\t\t// new team\n\t\tfor (Unit airunit : airunits) {\n\t\t\tAirForceTeam teamOfAirunit = airForceTeamMap.get(airunit.getID());\n\t\t\tif (teamOfAirunit == null) {\n\t\t\t\tairForceTeamMap.put(airunit.getID(), new AirForceTeam(airunit));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// 리더의 위치를 비교하여 합칠 그룹인지 체크한다.\n\t\t// - 클로킹모드 상태가 다른 그룹은 합치지 않는다.\n\t\t// - 수리 상태의 그룹은 합치지 않는다.\n\t\tList<AirForceTeam> airForceTeamList = new ArrayList<>(new HashSet<>(airForceTeamMap.values()));\n\t\tMap<Integer, Integer> airForceTeamMergeMap = new HashMap<>(); // key:merge될 그룹 leaderID, value:merge할 그룹 leaderID\n\t\t\n\t\tint mergeDistance = AIR_FORCE_TEAM_MERGE_DISTANCE;\n\t\tif (InfoUtils.enemyRace() == Race.Terran) {\n\t\t\tmergeDistance += 120;\n\t\t}\n\t\tfor (int i = 0; i < airForceTeamList.size(); i++) {\n\t\t\tAirForceTeam airForceTeam = airForceTeamList.get(i);\n\t\t\tif (airForceTeam.repairCenter != null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tboolean cloakingMode = airForceTeam.cloakingMode;\n\t\t\tfor (int j = i + 1; j < airForceTeamList.size(); j++) {\n\t\t\t\tAirForceTeam compareForceUnit = airForceTeamList.get(j);\n\t\t\t\tif (compareForceUnit.repairCenter != null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (cloakingMode != compareForceUnit.cloakingMode) { // 클로킹상태가 다른 레이쓰부대는 합쳐질 수 없다.\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tUnit airForceLeader = airForceTeam.leaderUnit;\n\t\t\t\tUnit compareForceLeader = compareForceUnit.leaderUnit;\n\t\t\t\tif (airForceLeader.getID() == compareForceLeader.getID()) {\n//\t\t\t\t\tSystem.out.println(\"no sense. the same id = \" + airForceLeader.getID());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (airForceLeader.getDistance(compareForceLeader) <= mergeDistance) {\n\t\t\t\t\tairForceTeamMergeMap.put(compareForceLeader.getID(), airForceLeader.getID());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// 합쳐지는 에어포스팀의 airForceTeamMap을 재설정한다.\n\t\tfor (Unit airunit : airunits) {\n\t\t\tInteger fromForceUnitLeaderId = airForceTeamMap.get(airunit.getID()).leaderUnit.getID();\n\t\t\tInteger toForceUnitLeaderId = airForceTeamMergeMap.get(fromForceUnitLeaderId);\n\t\t\tif (toForceUnitLeaderId != null) {\n\t\t\t\tairForceTeamMap.put(airunit.getID(), airForceTeamMap.get(toForceUnitLeaderId));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// team 멤버 세팅\n\t\tSet<AirForceTeam> airForceTeamSet = new HashSet<>(airForceTeamMap.values());\n\t\tfor (AirForceTeam airForceTeam : airForceTeamSet) {\n\t\t\tairForceTeam.memberList.clear();\n\t\t}\n\t\t\n\t\tList<Integer> needRepairAirunitList = new ArrayList<>(); // 치료가 필요한 유닛\n\t\tMap<Integer, Unit> airunitRepairCenterMap = new HashMap<>(); // 치료받을 커맨드센터\n\t\tList<Integer> uncloakedAirunitList = new ArrayList<>(); // 언클락 유닛\n\t\t\n\t\tfor (Integer airunitId : airForceTeamMap.keySet()) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tif (airunit.getHitPoints() <= 50) { // repair hit points\n\t\t\t\tAirForceTeam repairTeam = airForceTeamMap.get(airunitId);\n\t\t\t\tif (repairTeam == null || repairTeam.repairCenter == null) {\n\t\t\t\t\tUnit repairCenter = UnitUtils.getClosestActivatedCommandCenter(airunit.getPosition());\n\t\t\t\t\tif (repairCenter != null) {\n\t\t\t\t\t\tneedRepairAirunitList.add(airunitId);\n\t\t\t\t\t\tairunitRepairCenterMap.put(airunitId, repairCenter);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tAirForceTeam airForceTeam = airForceTeamMap.get(airunit.getID());\n\t\t\tif (airForceTeam.cloakingMode && (airunit.getType() != UnitType.Terran_Wraith || airunit.getEnergy() < 15)) {\n\t\t\t\tuncloakedAirunitList.add(airunitId);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tairForceTeam.memberList.add(airunit);\n\t\t}\n\t\t\n\t\t// create separated team for no energy airunit\n\t\tfor (Integer airunitId : uncloakedAirunitList) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tAirForceTeam uncloackedForceTeam = new AirForceTeam(airunit);\n\t\t\tuncloackedForceTeam.memberList.add(airunit);\n\t\t\t\n\t\t\tairForceTeamMap.put(airunitId, uncloackedForceTeam);\n\t\t}\n\t\t\n\t\t// create repair airforce team\n\t\tfor (Integer airunitId : needRepairAirunitList) {\n\t\t\tUnit airunit = MyBotModule.Broodwar.getUnit(airunitId);\n\t\t\tAirForceTeam needRepairTeam = new AirForceTeam(airunit);\n\t\t\tneedRepairTeam.memberList.add(airunit);\n\t\t\tneedRepairTeam.repairCenter = airunitRepairCenterMap.get(airunit.getID());\n\t\t\t\n\t\t\tairForceTeamMap.put(airunitId, needRepairTeam);\n\t\t}\n\t\t\n\t\t// etc (changing leader, finishing repair, achievement) \n\t\tSet<AirForceTeam> reorganizedSet = new HashSet<>(airForceTeamMap.values());\n\t\tachievementEffectiveFrame = 0;\n\t\tfor (AirForceTeam airForceTeam : reorganizedSet) {\n\t\t\t// leader 교체\n\t\t\tUnit newLeader = UnitUtils.getClosestUnitToPosition(airForceTeam.memberList, airForceTeam.getTargetPosition());\n\t\t\tairForceTeam.leaderUnit = newLeader;\n\t\t\t\n\t\t\t// repair 완료처리\n\t\t\tif (airForceTeam.repairCenter != null) {\n\t\t\t\tif (!UnitUtils.isValidUnit(airForceTeam.repairCenter) || WorkerManager.Instance().getWorkerData().getNumAssignedWorkers(airForceTeam.repairCenter) < 3) {\n\t\t\t\t\tUnit repairCenter = UnitUtils.getClosestActivatedCommandCenter(airForceTeam.leaderUnit.getPosition());\n\t\t\t\t\tif (repairCenter != null) {\n\t\t\t\t\t\tairForceTeam.repairCenter = repairCenter;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tboolean repairComplete = true;\n\t\t\t\tfor (Unit airunit : airForceTeam.memberList) {\n\t\t\t\t\tif (airunit.getHitPoints() < airunit.getType().maxHitPoints() * 0.95) { // repair complete hit points\n\t\t\t\t\t\trepairComplete = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (repairComplete) {\n\t\t\t\t\tairForceTeam.repairCenter = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// achievement\n\t\t\tint achievement = airForceTeam.achievement();\n\t\t\taccumulatedAchievement += achievement;\n\t\t\tachievementEffectiveFrame = achievementEffectiveFrame + airForceTeam.killedEffectiveFrame * 100 - airForceTeam.damagedEffectiveFrame;\n\t\t}\n\t}", "public void testUpdate() throws Exception {\n EntityManager manager = this.getEntityManager();\n EntityTransaction transaction = manager.getTransaction();\n\n if (transaction.isActive() == false) {\n transaction.begin();\n }\n\n Technology t = new Technology();\n t.setDescription(\"tech\");\n t.setName(\"name1\");\n t.setStatus(Status.ACTIVE);\n\n manager.persist(t);\n transaction.commit();\n\n t.setDescription(\"upate tech\");\n t.setName(\"name2\");\n t.setStatus(Status.APPROVED);\n\n Technology ret = manager.find(Technology.class, t.getId());\n assertEquals(\"Equal is expected.\", \"upate tech\", ret.getDescription());\n assertEquals(\"Equal is expected.\", \"name2\", ret.getName());\n assertEquals(\"Equal is expected.\", Status.APPROVED, ret.getStatus());\n }", "int updateByExample(@Param(\"record\") SysTeam record, @Param(\"example\") SysTeamExample example);", "public void update(ScahaDatabase _db) throws SQLException {\n\t\t// Lets update the person here.\r\n\t\t//\r\n\t\tsuper.update(_db);\r\n\t\t\r\n\t\t//\r\n\t\t// now.. we have to update the pertinat parts of the player table \r\n\t\t// to add the player extension data..\r\n\t\t\r\n\t\t// \r\n\t\t// is it an object that is not in the database yet..\r\n\t\t//\r\n\t\t//\r\n\t\tCallableStatement cs = _db.prepareCall(\"call scaha.updateManager(?,?,?,?)\");\r\n\t\t\r\n\t\t//LOGGER.info(\"HERE IS THE PERSON ID for manager:\" + super.ID);\r\n\t\t//LOGGER.info(\"HERE IS THE manager ID for manager:\" + this.ID);\r\n\t\t\r\n\t\tint i = 1;\r\n\t\tcs.registerOutParameter(1, java.sql.Types.INTEGER);\r\n\t\tcs.setInt(i++, this.ID);\r\n\t\tcs.setInt(i++, super.ID);\r\n\t\tcs.setInt(i++,1);\r\n\t\tcs.setString(i++,null);\r\n\t\tcs.execute();\r\n\t\t\t\t\r\n\t\t//\r\n\t\t// Update the new ID from the database...\r\n\t\t//\r\n\t\tthis.ID = cs.getInt(1);\r\n\t\tcs.close();\r\n\t\t//LOGGER.info(\"HERE IS THE New Manager ID:\" + this.ID);\r\n\t\t\r\n\t}", "public void updateTeamFromResults(Match m){\r\n \r\n //Update team1\r\n m.getTeam1().setGoalsFor(m.getTeam1().getGoalsFor() + m.getScore1());\r\n m.getTeam1().setGoalsAgainst(m.getTeam1().getGoalsAgainst() + m.getScore2());\r\n \r\n //Update team2\r\n m.getTeam2().setGoalsFor(m.getTeam2().getGoalsFor() + m.getScore2());\r\n m.getTeam2().setGoalsAgainst(m.getTeam2().getGoalsAgainst() + m.getScore1());\r\n \r\n //Add points\r\n if (m.getScore1() < m.getScore2()){\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 3);\r\n m.getTeam1().setMatchLost(m.getTeam1().getMatchLost() + 1);\r\n m.getTeam2().setMatchWon(m.getTeam2().getMatchWon() + 1);\r\n }\r\n else if (m.getScore1() > m.getScore2()){\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 3);\r\n m.getTeam2().setMatchLost(m.getTeam2().getMatchLost() + 1);\r\n m.getTeam1().setMatchWon(m.getTeam1().getMatchWon() + 1);\r\n }\r\n else {\r\n m.getTeam1().setPoints(m.getTeam1().getPoints() + 1);\r\n m.getTeam2().setPoints(m.getTeam2().getPoints() + 1);\r\n m.getTeam1().setMatchDrawn(m.getTeam1().getMatchDrawn() + 1);\r\n m.getTeam2().setMatchDrawn(m.getTeam2().getMatchDrawn() + 1);\r\n }\r\n \r\n //Update the rankings\r\n this.updateTeamRank();\r\n }", "public static void updateDb(GameDto game) throws PictionnaryDbException {\n try {\n java.sql.Connection connexion = DBManager.getConnection();\n\n java.sql.PreparedStatement update;\n update = connexion.prepareStatement(\"Update Game set \"\n + \" gdrawer = ?,\"\n + \" gpartner = ?,\"\n + \" gstarttime = ?,\"\n + \" gendtime = ?,\"\n + \" gstopplayer = ?\"\n + \" where gid= ?\");\n update.setInt(1, game.getDrawer());\n update.setInt(2, game.getPartner());\n\n if (game.getStartTime() == null) {\n update.setNull(3, Types.TIMESTAMP);\n } else {\n update.setTimestamp(3, game.getStartTime());\n }\n\n if (game.getEndTime() == null) {\n update.setNull(4, Types.TIMESTAMP);\n } else {\n update.setTimestamp(4, game.getEndTime());\n }\n\n update.setInt(5, game.getStopPlayer());\n update.setInt(6, game.getId());\n int a = update.executeUpdate();\n } catch (Exception ex) {\n throw new PictionnaryDbException(\"Game, modification impossible:\\n\" + ex.getMessage());\n }\n }", "@WebMethod public Team addTeam(String name) throws TeamAlreadyExists;", "public void teamChange() {\n if (teamCombobox.getValue().getTeamLogo() != null) {\n teamPhoto.setImage(teamCombobox.getValue().getTeamLogo().getImage());\n }\n teamCode.setText(\"Team code : \" + teamCombobox.getValue().getTeamCode());\n }", "Team findByName(String name);", "public void setTeamId(String teamId) {\r\n\t\tthis.teamName = teamId;\r\n\t}", "void resetMyTeam();", "public void setTeamNo(int teamNo) {\r\n\t\tthis.teamNo = teamNo;\r\n\t}", "private void addUsertoTeams(List<Team> teams) {\n \tfor(Team team: teams) {\n \t\tteam.setUser(getUserFromTeam(team));\n \t}\n }", "public static void updateContractor(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects\" +\r\n \" SET contract_name = ?, contract_tel = ?, contract_email = ?, contract_address = ?\" +\r\n \"WHERE project_num = \" +projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setString(1, NewProject.contract_name);\r\n pstmt.setString(2, NewProject.contract_tel);\r\n pstmt.setString(3, NewProject.contract_email);\r\n pstmt.setString(4, NewProject.contract_address);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public boolean upd(MrnWoatlas5 woatlas5) {\n return db.update (TABLE, createColVals(woatlas5), createWhere());\n }", "public team(int teamID, String teamName, String mascot, int games, int wins, int loses) throws SQLException {\n\t\tthis.teamID = teamID;\n\t\tthis.teamName = teamName;\n\t\tthis.mascot = mascot;\n\t\tthis.games = games;\n\t\tthis.wins = wins;\n\t\tthis.loses = loses;\n\t\tconn = DriverManager.getConnection(DB_URL);\n\t\tStatement stmt = conn.createStatement();\n\t\t \n\t\t stmt.executeUpdate(\"INSERT INTO Team VALUES (\" +\n\t this.teamID + \", '\" +\n\t this.teamName + \"', '\" + \n\t this.mascot + \"', \" +\n\t this.games + \", \" +\n\t this.wins + \", \" +\n\t this.loses +\n\t \")\");\n\t\t \n\t\t conn.close();\n\t stmt.close();\n\t}", "@Override\n public void update(ArrayList<League> leagues) {\n\n }", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "public void update(Triplet t) throws DAOException;", "public static void saveTeamNames() {\r\n\t\tMain.team1 = Main.teamOne.name;\r\n\t\tMain.team2 = Main.teamTwo.name;\r\n\t}", "public void createTeam(final Map<String, String> dataTable) {\n team.processInformation(dataTable);\n WebDriverHelper.waitUntil(inputTeamName);\n WebDriverHelper.setElement(inputTeamName, team.getName());\n WebDriverHelper.clickElement(dropDownTeamType);\n selectDropDownOptionByName(team.getType());\n WebDriverHelper.setElement(inputTeamDescription, team.getDescription());\n WebDriverHelper.clickElement(btnContinue);\n WebDriverHelper.waitUntil(btnThisLater);\n WebDriverHelper.clickElement(btnThisLater);\n }", "@Test\r\n\tpublic void saveTeamProgram() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: saveTeamProgram \r\n\t\tInteger teamId_1 = 0;\r\n\t\tProgram related_program = new wsdm.domain.Program();\r\n\t\tTeam response = null;\r\n\t\tresponse = service.saveTeamProgram(teamId_1, related_program);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: saveTeamProgram\r\n\t}", "public void update(String playerID, User user, Team team, Position position) {\n PlayerDB pdb = new PlayerDB();\n Player player = getByPlayerID(playerID);\n \n Team oldTeam = player.getTeamID();\n if (!oldTeam.getTeamID().equals(team.getTeamID())){\n oldTeam.getPlayerList().remove(player);\n TeamDB tdb = new TeamDB();\n tdb.update(oldTeam);\n }\n \n player.setUserID(user);\n player.setTeamID(team);\n player.setPosition(position);\n \n pdb.update(player);\n }", "public void setLoses(String teamName, int loses)\n\t throws SQLException\n\t \t\t{\n\t\t // Create a connection to the database.\n\t\t conn = DriverManager.getConnection(DB_URL);\n\n\t\t// Create a Statement object for the query.\n\t\tStatement stmt = conn.createStatement();\n\n\t\t// Execute the update.\n\t\tstmt.executeUpdate(\"UPDATE Team \" +\n\t \"SET loses = \" +\n\t loses +\n\t \" WHERE teamName = '\" +\n\t teamName + \"'\");\n\n\t\t// Close the Connection and Statement objects.\n\t\tconn.close();\n\t\tstmt.close();\n\t\t}" ]
[ "0.74666274", "0.72788066", "0.7157154", "0.7138274", "0.70316446", "0.69923913", "0.6708385", "0.6598317", "0.65836096", "0.6531948", "0.65234864", "0.6437243", "0.63924664", "0.6385156", "0.6382326", "0.63175064", "0.62504613", "0.6232968", "0.6211431", "0.6161564", "0.6097859", "0.60572296", "0.60386914", "0.6002176", "0.5988208", "0.5965029", "0.5927311", "0.5912962", "0.5881402", "0.5876112", "0.58303046", "0.58248883", "0.5822922", "0.5820002", "0.58123714", "0.57792914", "0.5778007", "0.57412916", "0.5738801", "0.57373613", "0.5735249", "0.57263696", "0.5723068", "0.5685275", "0.56600034", "0.5622904", "0.5610967", "0.5602508", "0.5596908", "0.55922705", "0.55809855", "0.5572841", "0.5562915", "0.5560635", "0.55526817", "0.55402577", "0.5527378", "0.5523048", "0.5508371", "0.54871905", "0.54807097", "0.5478043", "0.5477349", "0.5476588", "0.54597616", "0.54586667", "0.5451792", "0.5448943", "0.54455453", "0.5438899", "0.5436492", "0.54331976", "0.54303765", "0.54289365", "0.54113317", "0.5401409", "0.5395227", "0.5394776", "0.5387266", "0.53837377", "0.537618", "0.53733665", "0.5370102", "0.5355751", "0.5350162", "0.5341191", "0.53363407", "0.5335698", "0.5328363", "0.53241026", "0.5318487", "0.5314835", "0.53146863", "0.5309306", "0.5306717", "0.53008324", "0.5299966", "0.5290179", "0.5286827", "0.5284248" ]
0.72502136
2
Las siguientes variables estan definidas como estaticas en la clase Datum: Datum DatumED50 = Datum(6378388D, 6356911.94612795); Datum DatumWGS84 = Datum(6378137D, 6356752.31424518); UTM:
public Coordenada (Datum _d, double x, double y, double z, byte _zona, boolean _hemisferio_N) { d = _d; X = x; Y = y; Z = z; // Altura ortometrica, sobre NMMA zona = _zona; zona_ori = _zona; hemisferio_N = _hemisferio_N; GenerarCoordenadasGeograficas(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Datum() {\n this.tag = 1;\n this.monat = 1;\n this.jahr = 1;\n }", "public Datum(Datum datum) {\n this.tag = datum.tag;\n this.monat = datum.monat;\n this.jahr = datum.jahr;\n }", "public Datum(Datum d) {\n this.dan = d.dan;\n this.mesec = d.mesec;\n this.godina = d.godina;\n }", "public Datum(int jahr, int monat) {\n this.tag = 1;\n this.monat = monat;\n this.jahr = jahr;\n }", "public static void main (String[] args)\r\n {\n Coordenada utm = new Coordenada(new Datum(6378388D, 6356911.94612795),\r\n\t\t\t 481742, 4770800, 700, (byte)29, true);\r\n //System.out.println(\"lon=\"+utm.getLon()+\" lat=\"+utm.getLat());\r\n //System.out.println(utm.getGrados(utm.getLon())+\"¦ \"+utm.getMinutos(utm.getLon())+\"' \"+utm.getSegundos(utm.getLon())+\"\\\" \"+utm.getGrados(utm.getLat())+\"¦ \"+utm.getMinutos(utm.getLat())+\"' \"+utm.getSegundos(utm.getLat())+\"\\\"\");\r\n @SuppressWarnings(\"unused\")\r\n Coordenada res;\r\n res = utm.CambioDeDatum(new Datum(6378137D, 6356752.31424518));\r\n\r\n //System.out.println(\"Coordenadas en Datum destino: X=\"+res.X+\" Y=\"+res.Y);\r\n //System.out.println(\"lon=\"+res.getLon()+\" lat=\"+res.getLat());\r\n //System.out.println(res.getGrados(res.getLon())+\"¦ \"+res.getMinutos(res.getLon())+\"' \"+res.getSegundos(res.getLon())+\"\\\" \"+res.getGrados(res.getLat())+\"¦ \"+res.getMinutos(res.getLat())+\"' \"+res.getSegundos(res.getLat())+\"\\\"\");\r\n\t\t\t\t \r\n }", "public Datum(int jahr, int monat, int tag) {\n this.tag = tag;\n this.monat = monat;\n this.jahr = jahr;\n }", "public Datum(int jahr) {\n this.tag = 1;\n this.monat = 1;\n this.jahr = jahr;\n }", "public EvmUnitData(Date date, double pv, double ev, double ac, double bac) {\n\t\tthis.date = date;\n\t\tthis.pv = pv;\n\t\tthis.ev = ev;\n\t\tthis.ac = ac;\n\t\tthis.bac = bac;\n\t\tthis.cv = ev - ac;\n\t\tthis.sv = ev - pv;\n\t\tif (ac != 0) {\n\t\t\tthis.cpi = ev / ac;\n\t\t} else {\n\t\t\tthis.cpi = 1;\n\t\t}\n\t\tif (pv != 0) {\n\t\t\tthis.spi = ev / pv;\n\t\t} else {\n\t\t\tthis.spi = 1;\n\t\t}\n\t\tif (this.cpi != 0) {\n\t\t\tthis.eac = ac + (bac - ev) / this.cpi;\n\t\t} else {\n\t\t\tthis.eac = bac;\n\t\t}\n\t\tthis.etc = this.eac - ac;\n\t}", "public Datum() {\n id = idGen.incrementAndGet();\n parentDatumID = null;\n }", "public DataPoint(String newDate, int newSiteId,\n double newX, double newY, double newZ,\n double newA, double newB, double newC)\n {\n date = newDate;\n siteId = newSiteId;\n x = newX;\n y = newY;\n z = newZ;\n a = newA;\n b = newB;\n c = newC;\n }", "public SensorData(String date, String sensorId, String type, Double value) {\n\t\tthis.date = date;\n\t\tthis.sensorId = sensorId;\n\t\tthis.type = type;\n\t\tthis.value = value;\n\t}", "public SimpleGeometricObject() {\r\n this.dateCreated = new java.util.Date();\r\n }", "public interface GeoData{\r\n /**\r\n * Most geodata sets contain features for which there is no data, or the data is missing.<br>\r\n * In these cases a specific value is often used to represent these special cases.<p>\r\n * The static final value MISSING is the default value used by GeoDatas to represent\r\n * these cases.\r\n * @see #setMissingValueCode\r\n * @see #getMissingValueCode\r\n */\r\n public static final double MISSING = Double.NaN;\r\n\r\n\t\t/** \r\n\t\t * All geodata have a type - this is particularly important when\r\n\t\t * interfacing with other data sources/formats.\r\n\t\t * @see #setDataType\r\n\t\t * @see #getDataType\r\n\t\t */\r\n\t\tpublic static final int CHARACTER = 0;\r\n\t\tpublic static final int INTEGER = 1;\r\n\t\tpublic static final int FLOATING = 2;\r\n \r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n * @author James Macgill JM\r\n * @return String The name associated with this GeoData.\r\n */\r\n String getName();\r\n /**\r\n * All GeoData objects can have a name associated with them.<br>\r\n * Typicaly the name will match the Column heading from which the data came from.<br>\r\n * Names can be important when the GeoData is used in thematic maps as this is the\r\n * name that will be placed in the key by default.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param name_ The name to be associated with this GeoData.\r\n */\r\n void setName(String name_);\r\n \r\n \r\n /**\r\n * looks up and matches a value to the specifed feature id.<br>\r\n * Used for example by shaders to obtain vaules for thematic mapping.<br>\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature id to retreve a value for.\r\n * @return double The value for the specified id, if no id matches the one given then the value specifed by setMissingValue should be returned.\r\n * @see #setMissingValue\r\n */\r\n double getValue(int id);\r\n \r\n /**\r\n * Looks up and retreves a string for the specifed feature id.<br>\r\n * Used for example by the ToolTip feature in Themes to provide tool tip text for each feature.\r\n *\r\n * @author James Macgill JM\r\n * @param id An int specifying the feature to retreve the text for.\r\n * @return String A piece of text for the chosen feature id. If no id matches then an empty string should be returned \" \"\r\n */\r\n String getText(int id);\r\n \r\n /**\r\n * In order to allow systems to iterate through all of the data contained within the GeoData object this\r\n * method provides a list of all of the IDs which have associated values stored.\r\n *\r\n * @author James Macgill JM\r\n * @return Enumeration An enumeration of all of the IDs which can then be iterated through.\r\n */\r\n Enumeration getIds();\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * By default that value is set to MISSING, however this behavoir can be changed by calling this method with a new value.<br>\r\n * \r\n * @see #getMissingValueCode\r\n * @author James Macgill JM\r\n * @param mv A double containing the new value to represent missing data.\r\n */\r\n public void setMissingValueCode(double mv);\r\n \r\n /**\r\n * Not all posible ids will have a value stored in the GeoData object, so when a call is made to getValue with an id that is\r\n * not stored a special value is returned to signify that a value for this id is missing.<br>\r\n * A call to this method will return the current code in use to represent that situation.<br>\r\n *\r\n * @see #setMissingValueCode\r\n * @author James Macgill JM\r\n * @return double The current value representing missing data.\r\n */ \r\n public double getMissingValueCode();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The largest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMax();\r\n \r\n /**\r\n * A quick statistic relating to the values stored in the GeoData object.<br>\r\n * \r\n * @author James Macgill JM\r\n * @return double The smallest value currently stored in this GeoData. The missingValueCode is not included in this test.\r\n */\r\n double getMin();\r\n \r\n /**\r\n * The total number of stored id/value pairs stored in this GeoData.\r\n * @author James Macgill JM\r\n * @return int The number of values stored in this GeoData.\r\n */\r\n int getSize();\r\n \r\n /**\r\n * The total number of stored values stored in this GeoData which equal the missing value code.\r\n * @author James Macgill JM\r\n * @return int The number of missing values stored in this GeoData.\r\n */\r\n int getMissingCount();\r\n\r\n\t\t/** \r\n\t\t * Gets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.CHARACTER</li> \r\n\t\t * <li>Integer - GeoData.INTEGER</li>\r\n\t\t * <li>Double - GeoData.FLOATING</li></ul>\r\n\t\t */\r\n\t\t int getDataType();\r\n\t\t/** \r\n\t\t * Sets the type of data stored in the geodata<br>\r\n\t\t * <ul><li>String - GeoData.character</li> \r\n\t\t * <li>Integer - GeoData.integer</li>\r\n\t\t * <li>Double - GeoData.float</li></ul>\r\n\t\t */\r\n\t\t void setDataType(int type );\r\n}", "public Data() {\n\t\tCalendar now = new GregorianCalendar();\n\t\tthis.anno = now.get(Calendar.YEAR);\n\t\tthis.giorno = now.get(Calendar.DAY_OF_MONTH);\n\t\tthis.mese = Data.MESI[now.get(Calendar.MONTH)];\n\t}", "@SuppressWarnings(\"static-access\")\n\tprivate void initData() {\n\t\tstartDate = startDate.now();\n\t\tendDate = endDate.now();\n\t}", "void setDatumArray(Datum[] paramArrayOfDatum)\n/* */ {\n/* 979 */ if (paramArrayOfDatum == null) {\n/* 980 */ setNullArray();\n/* */ }\n/* */ else {\n/* 983 */ this.length = paramArrayOfDatum.length;\n/* 984 */ this.elements = null;\n/* 985 */ this.datums = ((Datum[])paramArrayOfDatum.clone());\n/* 986 */ this.pickled = null;\n/* 987 */ this.pickledCorrect = false;\n/* */ }\n/* */ }", "Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}", "public GeometricObject() {\n dateCreated = new java.util.Date();\n }", "private DPoint m2833m() {\r\n IPoint iPoint = new IPoint();\r\n this.f1769m.mo353a(this.f1761e.latitude, this.f1761e.longitude, iPoint);\r\n IPoint iPoint2 = new IPoint();\r\n this.f1769m.mo353a(this.f1762f.latitude, this.f1762f.longitude, iPoint2);\r\n IPoint iPoint3 = new IPoint();\r\n this.f1769m.mo353a(this.f1763g.latitude, this.f1763g.longitude, iPoint3);\r\n double d = (double) iPoint.f3639x;\r\n double d2 = (double) iPoint.f3640y;\r\n double d3 = (double) iPoint2.f3639x;\r\n double d4 = (double) iPoint2.f3640y;\r\n double d5 = (double) iPoint3.f3639x;\r\n double d6 = (double) iPoint3.f3640y;\r\n double d7 = (((d6 - d2) * ((((d4 * d4) - (d2 * d2)) + (d3 * d3)) - (d * d))) + ((d4 - d2) * ((((d2 * d2) - (d6 * d6)) + (d * d)) - (d5 * d5)))) / (((2.0d * (d3 - d)) * (d6 - d2)) - ((2.0d * (d5 - d)) * (d4 - d2)));\r\n double d8 = (((d5 - d) * ((((d3 * d3) - (d * d)) + (d4 * d4)) - (d2 * d2))) + ((d3 - d) * ((((d * d) - (d5 * d5)) + (d2 * d2)) - (d6 * d6)))) / (((2.0d * (d4 - d2)) * (d5 - d)) - ((2.0d * (d6 - d2)) * (d3 - d)));\r\n this.f1773q = Math.sqrt(((d - d7) * (d - d7)) + ((d2 - d8) * (d2 - d8)));\r\n this.f1774r = m2830a(d7, d8, d, d2);\r\n d = m2830a(d7, d8, d3, d4);\r\n this.f1775s = m2830a(d7, d8, d5, d6);\r\n if (this.f1774r < this.f1775s) {\r\n if (d <= this.f1774r || d >= this.f1775s) {\r\n this.f1775s -= 6.283185307179586d;\r\n }\r\n } else if (d <= this.f1775s || d >= this.f1774r) {\r\n this.f1775s += 6.283185307179586d;\r\n }\r\n return new DPoint(d7, d8);\r\n }", "public abstract Double getDataValue();", "Date getDataIns();", "static double calc_Egs_of_struct(double dens,int i_lat) {\n\t\tdouble A12, A6, U;\n\t\t\n\t\t/* unit of distance is the 1st NN seperation */\n\t\tif( i_lat == 0 ) { \n\t\t\tA12 = 12.132293768711; A6 = 14.454897093822; /* hcp */\n\t\t} else { \n\t\t\tA12 = 12.131880196191; A6 = 14.453920885450; /* fcc */\n\t\t}\n\t\tU = 2.0*( Math.pow(dens,4.0)*A12 - Math.pow(dens,2.0)*A6 );\n\t\t\n\t\treturn(U);\n\t}", "Report.LocationOuterClass.WGS84 getWgs84();", "protected Map<String, T> getDatumCache() {\n\t\treturn datumCache;\n\t}", "@Test\r\n public void getDateValue() throws Exception {\r\n assertEquals(dt1,point1.getDateValue());\r\n assertEquals(dt2,point2.getDateValue());\r\n assertEquals(dt3,point3.getDateValue());\r\n assertEquals(dt4,point4.getDateValue());\r\n }", "public MbCoordDpto() {\r\n \r\n }", "public Geotemporal() {\n }", "protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}", "public Datum toDatum(Connection paramConnection, String paramString)\n/* */ throws SQLException\n/* */ {\n/* 237 */ if (!this.pickledCorrect)\n/* */ {\n/* */ \n/* */ \n/* 241 */ this.pickled = new ARRAY(ArrayDescriptor.createDescriptor(paramString, paramConnection), paramConnection, getDatumArray(paramConnection));\n/* */ \n/* 243 */ this.pickledCorrect = true;\n/* */ }\n/* 245 */ return this.pickled;\n/* */ }", "private void m2248a(double d, String str) {\n this.f2954c = d;\n this.f2955d = (long) d;\n this.f2953b = str;\n this.f2952a = ValueType.doubleValue;\n }", "public abstract double getCarbon();", "public static Double m5905d(JSONObject jSONObject, String str) {\n return C1546i.m5896a(jSONObject, str, null);\n }", "public SimpleDataPointImpl(DataSet dataSet){\n\t\tvalues = new HashMap<String, Double>();\n\t\tmDataSet = dataSet;\n\t}", "@Override\n\tpublic DataType dataType() {\n\n\t\treturn new StructType().\n\t\t\t\t// add(\"device_distr\",\n\t\t\t\t// DataTypes.createArrayType(DataTypes.createMapType(DataTypes.StringType,\n\t\t\t\t// DataTypes.FloatType, true)))\n\t\tadd(\"device_distribution\", DataTypes.StringType).add(\"time_spent\", DataTypes.LongType).add(\"video_start\",\n\t\t\t\tDataTypes.LongType);\n\n\t}", "private XYDataset createDataset(String WellID, String lang) {\n final TimeSeries eur = createEURTimeSeries(WellID, lang);\n final TimeSeriesCollection dataset = new TimeSeriesCollection();\n dataset.addSeries(eur);\n return dataset;\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Anfangsdatum: \" + this.get_Datum() \n\t\t\t\t+ \", Thema: \" + this.get_thema() \n\t\t\t\t+ \", Art: Theoriestunde\";\n\t}", "public abstract StringDt getUnitsElement();", "public double getAsMJD()\n {\n return (itsValue - DUTC.get(itsValue) * 1000000l) / 86400000000.0;\n }", "Datty getDatty();", "public double dateToJava2D(Date date, Rectangle2D area, RectangleEdge edge) {\n/* 832 */ double value = date.getTime();\n/* 833 */ return valueToJava2D(value, area, edge);\n/* */ }", "public final Date getDat() {\n return this.dat;\n }", "public void setUserData(double latitude, double longitude, int month, int day, int year, double timezone, int hour, int minutes)\n\t{\n\t\tuserLat = latitude;\n\t\tuserLong = longitude;\n\t\tuserYear = year;\n\t\tuserMonth = month;\n\t\t//********************************************\n\t\t//find local time of the user in decimal form\n\t\t//********************************************\n\t\t//Note hour must be in military time\n\t\tdouble temp = (double)minutes / 60.0;\n\t\tuserLocalTime = hour + temp;\n\t\t\n\t\t//******************************************\n\t\t//find GMT time of the user in decimal form\n\t\t//******************************************\n\t\tdouble userGMT = userLocalTime - timezone;\n\t\tif(userGMT > 24.0)\n\t\t\tuserGMT -= 24.0;\n\t\tif(userGMT < 0.0)\n\t\t\tuserGMT += 24.0;\n\t\t\n\t\t\n\t\t//*****************************************\n\t\t//find the Julian Date based on user input\n\t\t//*****************************************\n\t\tif(month < 3) //adjust date if in Jan or Feb\n\t\t{\n\t\t\tyear -= 1;\n\t\t\tmonth += 12;\n\t\t}\n\t\tuserDecimalDay = (double)day + (userGMT / 24.0);\n\t\tint tempA = (int)(year/100);\n\t\tint tempB = 2 - tempA + (int)(tempA/4);\n\t\tuserJulianDate = (int)(365.25 * year) + (int)(30.6001 * (month + 1)) + userDecimalDay + 1720994.5 + tempB;\n\t\tuserDecimalYear = year + (((30.6001 * (month + 1)) + userDecimalDay)/365.25);\n\t\t//*****************************\n\t\t//adjust star map data to user\n\t\t//*****************************\n\t\tadjustStarData();\n\t\tadjustMessierData();\n\t\tadjustSunAndMoonData(); \n\t\tcreatePlanets();\n\t\tadjustPlanetData();\t\n\t}", "public double getBaseMtmUsd() {\r\n return baseMtmUsd;\r\n }", "String getSensorDataPoint();", "public DateTime() {\n setCharacteristic(null);\n setYear(1582);\n setMonth(0);\n setDay(1);\n setHours(0);\n setMinutes(0);\n setSeconds(0);\n }", "@Test\n public void testPulkovo1995GKZone18N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone18N());\n }", "public TableModelMedicionTemporal(float[][] datos, String[] encabezado) {\r\n\r\n\t\tcolumnNames = encabezado;\r\n\t\tthis.datos = datos;\r\n\t}", "public LightData (String dataTypeName, Float dataPoint, float max, float min, boolean nightMode){\n\n this.numberOfDataPoints = 1;\n this.dataTypeName = dataTypeName;\n this.max = max;\n this.min = min;\n this.nightMode = nightMode;\n\n dataPoints.add(dataPoint);\n scaledDataPoints.add(scale(dataPoint));\n\n }", "java.lang.String getField1970();", "public java.util.Map<java.lang.String, java.lang.Double> libor12M()\n\t{\n\t\treturn _libor12M;\n\t}", "public ucar.nc2.units.DateUnit getTimeUnits();", "public Date getDatumOpladen() {\n if (datumOpladen != null) {\n return (Date) datumOpladen.clone();\n }\n return null;\n }", "private static void writeDimesnions() throws IOException {\r\n\t\tDate date = new Date();\r\n\t\t bw.write( \"<> a owl:Ontology ; \\n\"\r\n\t\t \t+ \" rdfs:label \\\"GeoKnow Spatical Data Qaluty DataCube Knowledge Base\\\" ;\\n\"\r\n\t\t \t+ \" dc:description \\\"This knowledgebase contains 3 different DataCubes with different dimensions and measures.\\\" .\\n\\n\"\r\n\t//-----------------------Dataset----------------------------\r\n\t\t \t+ \"#\\n #Data Set \\n # \\n\"\r\n\t\t \t+ \"<http://www.geoknow.eu/dataset/ds1> a qb:DataSet ;\\n\"\r\n\t\t\t+ \"\t dcterms:publisher \\\"AKSW, GeoKnow\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:label \\\" Dataset Class Coverage\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:comment \\\"Dataset Class Coverage\\\" ; \\n\"\r\n\t\t\t+ \"\t qb:structure <http://www.geoknow.eu/data-cube/dsd1> ;\\n\"\r\n\t\t\t+ \"\t dcterms:date \\\"\"+date+\"\\\". \\n\\n\"\r\n\t\t \t+ \"<http://www.geoknow.eu/dataset/ds2> a qb:DataSet ;\\n\"\r\n\t\t\t+ \"\t dcterms:publisher \\\"AKSW, GeoKnow\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:label \\\"Dataset Weighted Class Coverage\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:comment \\\"Dataset Weighted Class Coverage\\\" ; \\n\"\r\n\t\t\t+ \"\t qb:structure <http://www.geoknow.eu/data-cube/dsd2> ;\\n\"\r\n\t\t\t+ \"\t dcterms:date \\\"\"+date+\"\\\". \\n\\n\"\t\t\r\n\t\t \t+ \"<http://www.geoknow.eu/dataset/ds3> a qb:DataSet ;\\n\"\r\n\t\t\t+ \"\t dcterms:publisher \\\"AKSW, GeoKnow\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:label \\\"Dataset Structuredness\\\" ; \\n\"\r\n\t\t\t+ \"\t rdfs:comment \\\"Dataset Structuredness\\\" ; \\n\"\r\n\t\t\t+ \"\t qb:structure <http://www.geoknow.eu/data-cube/dsd3> ;\\n\"\r\n\t\t\t+ \"\t dcterms:date \\\"\"+date+\"\\\". \\n\\n\"\t\r\n //-----------------Data Cube 1 Structure Definitions-----------------------------------------\r\n\t\t\t+ \"# \\n# Data Structure Definitions \\n # \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd1> a qb:DataStructureDefinition ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"A Data Structure Definition\\\"@en ;\\n\"\r\n\t\t\t+ \" rdfs:comment \\\"A Data Structure Definition for DataCube1\\\" ;\\n\"\r\n\t\t\t+ \" qb:component <http://www.geoknow.eu/data-cube/dsd1/c1>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd1/c2>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd1/c3> . \\n\\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd2> a qb:DataStructureDefinition ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"A Data Structure Definition\\\"@en ;\\n\"\r\n\t\t\t+ \" rdfs:comment \\\"A Data Structure Definition for DataCube2\\\" ;\\n\"\r\n\t\t\t+ \" qb:component <http://www.geoknow.eu/data-cube/dsd2/c1>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd2/c2>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd2/c3> . \\n\\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd3> a qb:DataStructureDefinition ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"A Data Structure Definition\\\"@en ;\\n\"\r\n\t\t\t+ \" rdfs:comment \\\"A Data Structure Definition for DataCube3\\\" ;\\n\"\r\n\t\t\t+ \" qb:component <http://www.geoknow.eu/data-cube/dsd3/c1>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd3/c2>, \\n\"\r\n\t\t\t+ \" <http://www.geoknow.eu/data-cube/dsd3/c3> . \\n\\n\"\r\n\t\r\n\t//-----------------------Component Specifications-------------------------------------------------------------------\r\n\t\t\t+ \" # \\n #Componenet Specifications\\n #\\n \"\t\t\r\n\t\t\t//-------------DataCube1------------------------------------\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd1/c1> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Class \\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:Class . \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd1/c2> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Time Stamp\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:TimeStamp . \\n\"\t\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd1/c3> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Coverage\\\" ;\\n\"\r\n\t\t\t+ \" qb:measure sdmx-measure:Coverage . \\n\\n\"\t\t\t\t\r\n\t\t\t//-------------DataCube2------------------------------------\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd2/c1> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Class\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:Class . \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd2/c2> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Time Stamp\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:TimeStamp . \\n\"\t\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd2/c3> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Weighted Coverage\\\" ;\\n\"\r\n\t\t\t+ \" qb:measure sdmx-measure:WeightedCoverage . \\n\\n\"\t\r\n\t\t\t//-------------DataCube3------------------------------------\t\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd3/c1> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Dataset\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:Dataset . \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd3/c2> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Time Stamp\\\" ;\\n\"\r\n\t\t\t+ \" qb:dimension gk-dim:TimeStamp . \\n\"\r\n\t\t\t+ \"<http://www.geoknow.eu/data-cube/dsd3/c3> a qb:ComponentSpecification ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Component Specification of Structuredness\\\" ;\\n\"\r\n\t\t\t+ \" qb:measure sdmx-measure:Structuredness . \\n\\n\"\t\t\t\t\r\n\t//-----------------------Dimensions, Unit and Measure ---------------------------------------------------------\t\t\r\n\t\t\t+ \"### \\n ## Dimensions, Unit, and Measure\\n##\\n\"\r\n\t\t\t+ \"gk-dim:Class a qb:DimensionProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Class of a dataset\\\"@en .\\n\"\r\n\t\t\t+ \"gk-dim:TimeStamp a qb:DimensionProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Time Stamp\\\"@en .\\n\"\r\n\t\t\t+ \"gk-dim:Dataset a qb:DimensionProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Dataset name\\\"@en .\\n\"\r\n\t\t\t+ \"sdmx-measure:Coverage a qb:MeasureProperty ; \\n\"\t\r\n\t\t\t+ \" rdfs:label \\\"Class Coverage\\\"@en .\\n\"\r\n\t\t\t+ \"sdmx-measure:WeightedCoverage a qb:MeasureProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Class Weighted Coverage\\\"@en .\\n\"\r\n\t\t\t+ \"sdmx-measure:Structuredness a qb:DimensionProperty ; \\n\"\r\n\t\t\t+ \" rdfs:label \\\"Dataset Structuredness\\\"@en .\\n\\n\"\r\n\t\t\t\t );\r\n\t\t\r\n\t}", "public CityDailyWeather(String city, int startYear, int endYear, int stationID){\n\t\tthis.city = city;\n\t\tthis.startYear = startYear;\n\t\tthis.endYear = endYear;\n\t\tthis.stationID = stationID;\n\t}", "public MetalNode(int date1){\n date = date1;\n }", "public Stat (double[] d){\r\n\t\t//create real copy (not shallow copy) of d\r\n\t\tdata = new double[d.length];\r\n\t\t\r\n\t\t//fill with d values\r\n\t\tfor (int i = 0; i < d.length; i++){\r\n\t\t\tdata[i] = d[i];\r\n\t\t}\r\n\t}", "public Date getGioBatDau();", "@Test\n public void testPulkovo19953DegreeGKZone64() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone64());\n }", "public Datum toDatum(oracle.jdbc.OracleConnection paramOracleConnection, String paramString)\n/* */ throws SQLException\n/* */ {\n/* 253 */ return toDatum(paramOracleConnection, paramString);\n/* */ }", "public DoubleMatrixDataset() {\r\n }", "private Data[] getDoubles(double value, int npoints, int nattributes)\n\t{\n\t\tData[] data = new Data[npoints];\n\t\tfor (int i = 0; i < npoints; i++)\n\t\t\tdata[i] = nattributes == 1 ? new DataDouble(value)\n\t\t: new DataArrayOfDoubles(new double[] { value, value });\n\t\t\treturn data;\n\t}", "public Date getMeasurementTimestamp() {\r\n return measurementTimestamp;\r\n }", "public WeatherData (Long sunset, Long sunrise, int weatherCode, String cityName, int temperature) {\n sunsetTime = sunset;\n sunriseTime = sunrise;\n weather = weatherCode;\n city = cityName;\n temp = temperature;\n }", "public UnivariateStatsData() {\n super();\n }", "public void setCoordinateur(Coordinateur monCoordinateur) {\n\t\t\n\t}", "@Test\n public void testPulkovo19953DegreeGKZone59() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone59());\n }", "public Timestamp getDateTrx() \n{\nreturn (Timestamp)get_Value(\"DateTrx\");\n}", "Datum(int idx, String txt /*, int votes /*, String comment*/,int uid) {\n mIndex = idx;\n mText = txt;\n //mVotes = votes;\n //mComment = comment;\n mUid = uid;\n }", "public java.util.Map<java.lang.String, java.lang.Double> libor1M()\n\t{\n\t\treturn _libor1M;\n\t}", "@Test\n public void testPulkovo19953DegreeGKZone63() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone63());\n }", "java.lang.String getField1984();", "public FlexData() {\n entryCollectionList = null;\n entryCollectionMap = null;\n type = Type.UNKNOWN;\n standardDateFormat = \"yyyy-MM-dd\"; // DB2-Datum\n\t}", "private void setDailyValues(){\n //set updateTime\n SimpleDateFormat t = new SimpleDateFormat(\"h:mm:ss a\");\n updatedTime = \"Last updated: \" + t.format(new Date(System.currentTimeMillis()));\n \n //set maxTemp and minTemp\n maxTemp = Integer.toString(weather.getMaxTemp());\n minTemp = Integer.toString(weather.getMinTemp());\n \n //set sunriseTime and sunsetTime\n SimpleDateFormat sr = new SimpleDateFormat(\"h:mm a\");\n sunriseTime = sr.format(new Date(weather.getSunrise()*1000));\n SimpleDateFormat ss = new SimpleDateFormat(\"h:mm a\");\n sunsetTime = sr.format(new Date(weather.getSunset()*1000));\n }", "public java.util.Map<java.lang.String, java.lang.Double> libor6M()\n\t{\n\t\treturn _libor6M;\n\t}", "public abstract void setDate(Timestamp uneDate);", "@Test\n public void testPulkovo1995GKZone5N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone5N());\n }", "@Test\n public void testPulkovo1995GKZone4N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone4N());\n }", "@Test\n public void testPulkovo19953DegreeGKCM174E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM174E());\n }", "public MeasureData(Tuple tuple) {\n mtype = tuple.getStringByField(StormUtils.STORM.FIELDS.MEASURE_TYPE);\n caseid = tuple.getStringByField(StormUtils.STORM.FIELDS.CASE_ID);\n mid = tuple.getIntegerByField(StormUtils.STORM.FIELDS.MEASURE_ID);\n mvalue = tuple.getDoubleByField(StormUtils.STORM.FIELDS.MEASURE_VALUE);\n }", "public Double getDz();", "public DataDTO(final String theName, final Double theValue) {\r\n this.name = theName;\r\n this.value = new Float(theValue);\r\n }", "@Test\n public void testPulkovo19953DegreeGKZone54() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone54());\n }", "@Test\n public void testPulkovo19953DegreeGKCM63E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM63E());\n }", "public SingleValueGeoPointFieldData(String fieldName, int[] ordinals, double[] lat, double[] lon) {\n\t\tsuper(fieldName, lat, lon);\n\t\tthis.ordinals = ordinals;\n\t}", "public void setBaseMtmUsd(double value) {\r\n this.baseMtmUsd = value;\r\n }", "public void dorbdb6_(INTEGER M1,INTEGER M2,INTEGER N,double[] X1,INTEGER INCX1,double[] X2,INTEGER INCX2,double[] Q1,INTEGER LDQ1,double[] Q2,INTEGER LDQ2,double[] WORK,INTEGER LWORK,INTEGER INFO);", "@Test\n public void testPulkovo1995GKZone25N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone25N());\n }", "public Coordinate (double longitude, double latitude) {\n this.longitude = new BigDecimal(longitude);\n this.latitude = new BigDecimal(latitude);\n }", "double getEDouble();", "public DTV(DTU dtu) {\n super(0);\n this.A00 = dtu;\n }", "@Test\n public void testPulkovo1995GKZone23N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone23N());\n }", "@Test\n public void testPulkovo19953DegreeGKCM126E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM126E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone39() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone39());\n }", "public DCU() {\r\n meters = new ArrayList<Meter>();\r\n id = \"unknown\";\r\n }", "@Test\n public void testPulkovo19953DegreeGKCM174W() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM174W());\n }", "@Test\n public void testPulkovo19953DegreeGKCM54E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM54E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone62() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone62());\n }", "public double getLoZ() {\r\n\treturn fieldLoZ;\r\n}", "@Test\n public void testPulkovo19953DegreeGKZone25() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone25());\n }", "@Test\n public void testPulkovo1995GKZone15N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone15N());\n }" ]
[ "0.71406245", "0.6667765", "0.63393617", "0.59873694", "0.5973272", "0.59194416", "0.580447", "0.55413026", "0.5456279", "0.53017956", "0.5300688", "0.525645", "0.52516234", "0.52393764", "0.51570326", "0.515365", "0.5149092", "0.5143257", "0.51345855", "0.5127496", "0.5125294", "0.5079249", "0.5056129", "0.50557387", "0.5054959", "0.5043362", "0.5024551", "0.4996461", "0.4951255", "0.49511853", "0.4946807", "0.49425033", "0.48916858", "0.48889205", "0.4886421", "0.48835394", "0.4882978", "0.4882054", "0.48785692", "0.48591518", "0.48532042", "0.4834477", "0.4831895", "0.4829937", "0.48117825", "0.48114347", "0.48058194", "0.48046964", "0.47853997", "0.47815767", "0.47785515", "0.47652507", "0.47638145", "0.47634715", "0.47602323", "0.47511804", "0.47253975", "0.47234896", "0.47166696", "0.470811", "0.47006476", "0.46998322", "0.4698236", "0.4689551", "0.46885222", "0.46850616", "0.46812204", "0.46713498", "0.4669226", "0.46652317", "0.46647415", "0.46579325", "0.46569648", "0.465597", "0.46520013", "0.46488488", "0.46454582", "0.4644149", "0.46406886", "0.4636023", "0.4634086", "0.46334186", "0.46309203", "0.46292868", "0.46258348", "0.46243548", "0.46233585", "0.4617925", "0.46008235", "0.4600445", "0.45995256", "0.45981964", "0.4592914", "0.45902857", "0.4589089", "0.45888507", "0.4587064", "0.45858613", "0.4584381", "0.45826307" ]
0.5783787
7
Decimos si es hemisferio NORTE de acuerdo a lo dicho al definir la coordenada UTM:
boolean EsHemisferioNorte() { return hemisferio_N; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void verificaCoordenada() {\r\n\t\tif (X < 0) {\r\n\t\t\tX = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tX = X % Const.TAMANHO;\r\n\t\t}\r\n\r\n\t\tif (Y < 0) {\r\n\t\t\tY = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tY = Y % Const.TAMANHO;\r\n\t\t}\r\n\t}", "boolean EsHemisferioSur()\r\n {\r\n if (getLat() < 29.46)\r\n return true;\r\n else\r\n return false;\r\n }", "boolean hasLongitude();", "boolean hasLongitude();", "boolean hasHasLongitude();", "@Test\n public void testFind_West_cross_boundary() {\n\n double lat1 = 0.0;\n double lon1 = -170.0;\n double lat2 = 0.0;\n double lon2 = 170.0;\n double expResult = Math.toRadians(270);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "@Test\n public void testPulkovo19953DegreeGKZone59() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone59());\n }", "@Test\n public void testPulkovo19953DegreeGKZone63() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone63());\n }", "@Test\n public void testFind_East_cross_boundary() {\n\n double lat1 = 0.0;\n double lon1 = 170.0;\n double lat2 = 0.0;\n double lon2 = -170.0;\n double expResult = Math.toRadians(90);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "@Test\n public void testFind_South() {\n\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = -10.0;\n double lon2 = 0.0;\n double expResult = Math.toRadians(180);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "@Test\n public void testFind_West() {\n\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = 0.0;\n double lon2 = -10.0;\n double expResult = Math.toRadians(270);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "@Test\n public void testPulkovo19953DegreeGKZone60() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone60());\n }", "@Test\n public void testPulkovo19953DegreeGKZone64() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone64());\n }", "@Test\n public void testPulkovo19953DegreeGKZone25() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone25());\n }", "@Test\n public void testPulkovo19953DegreeGKZone62() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone62());\n }", "@Test\n public void testPulkovo19953DegreeGKZone29() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone29());\n }", "@Test\n public void testPulkovo19953DegreeGKZone61() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone61());\n }", "@Test\n public void testPulkovo19953DegreeGKZone35() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone35());\n }", "@Test\n public void testPulkovo19953DegreeGKZone31() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone31());\n }", "@Test\n public void testPulkovo19953DegreeGKZone36() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone36());\n }", "@Test\n public void testPulkovo19953DegreeGKZone27() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone27());\n }", "@Test\n public void testPulkovo19953DegreeGKZone56() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone56());\n }", "@Test\n public void testPulkovo19953DegreeGKZone39() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone39());\n }", "@Test\n public void testPulkovo19953DegreeGKZone34() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone34());\n }", "@Test\n public void testFind_North() {\n\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = 10.0;\n double lon2 = 0.0;\n double expResult = Math.toRadians(0);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "@Test\n public void testPulkovo19953DegreeGKZone23() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone23());\n }", "@Test\n public void testPulkovo19953DegreeGKZone55() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone55());\n }", "@Test\n public void testPulkovo19953DegreeGKZone11() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone11());\n }", "@Test\n public void testPulkovo19953DegreeGKZone30() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone30());\n }", "@Test\n public void testPulkovo19953DegreeGKZone12() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone12());\n }", "@Test\n public void testPulkovo19953DegreeGKZone18() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone18());\n }", "@Test\n public void testPulkovo19953DegreeGKZone13() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone13());\n }", "@Test\n public void testPulkovo19953DegreeGKZone26() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone26());\n }", "@Test\n public void testPulkovo19953DegreeGKZone40() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone40());\n }", "@Test\n public void testPulkovo19953DegreeGKZone15() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone15());\n }", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "@Test\n public void testPulkovo19953DegreeGKZone33() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone33());\n }", "private float calcTrueNorth(float magNorth) {\n if (isMissingForegroundPermissions() || mGeofield == null) {\n return -1;\n }\n return (magNorth + mGeofield.getDeclination()) % 360;\n }", "@Test\n public void testPulkovo19953DegreeGKZone54() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone54());\n }", "@Test\n public void testPulkovo19953DegreeGKZone52() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone52());\n }", "@Test\n public void testPulkovo19953DegreeGKZone9() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone9());\n }", "@Test\n public void testPulkovo19953DegreeGKZone22() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone22());\n }", "int getLngE6();", "int getLngE6();", "@Test\n public void testPulkovo19953DegreeGKZone45() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone45());\n }", "@Test\n public void testPulkovo19953DegreeGKZone43() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone43());\n }", "@Test\n public void testPulkovo19953DegreeGKZone7() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone7());\n }", "@Test\n public void testPulkovo19953DegreeGKZone58() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone58());\n }", "@Test\n public void testPulkovo19953DegreeGKZone8() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone8());\n }", "@Test\n public void testPulkovo19953DegreeGKZone10() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone10());\n }", "@Test\n public void testPulkovo19953DegreeGKZone16() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone16());\n }", "@Test\n public void testPulkovo19953DegreeGKZone41() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone41());\n }", "boolean isSet(Coordinates coord, double horizon, long time)throws AstrometryException;", "@Test\n public void testPulkovo19953DegreeGKZone57() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone57());\n }", "@Test\n public void testPulkovo19953DegreeGKZone20() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone20());\n }", "@Test\n public void testPulkovo19953DegreeGKZone32() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone32());\n }", "@Test\n public void testPulkovo19953DegreeGKZone37() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone37());\n }", "@Test\n public void testPulkovo19953DegreeGKZone17() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone17());\n }", "@Test\n public void testFind_East() {\n\n double lat1 = 0.0;\n double lon1 = 0.0;\n double lat2 = 0.0;\n double lon2 = 10.0;\n double expResult = Math.toRadians(90);\n double result = Azimuth.find(lat1, lon1, lat2, lon2);\n assertEquals(expResult, result, 0.0);\n }", "@Test\n public void testPulkovo19953DegreeGKZone46() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone46());\n }", "@Test\n public void testPulkovo19953DegreeGKZone53() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone53());\n }", "@Test\n public void testPulkovo19953DegreeGKZone51() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone51());\n }", "@Test\n public void testPulkovo19953DegreeGKZone49() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone49());\n }", "@Test\n public void testPulkovo19953DegreeGKZone24() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone24());\n }", "@Test\n public void testPulkovo19953DegreeGKZone21() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone21());\n }", "@Test\n public void testPulkovo19953DegreeGKZone47() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone47());\n }", "@Test\n public void testPulkovo19953DegreeGKZone48() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone48());\n }", "boolean isRisen(Coordinates coord, double horizon, long ttime) throws AstrometryException;", "@Test\n public void testPulkovo19953DegreeGKZone38() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone38());\n }", "@Test\n public void testPulkovo19953DegreeGKZone28() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone28());\n }", "@Test\n public void testPulkovo1995GKZone25() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone25());\n }", "@Test\n public void testPulkovo19953DegreeGKZone14() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone14());\n }", "@Test\n public void testPulkovo19953DegreeGKZone50() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone50());\n }", "@Test\n public void testPulkovo19953DegreeGKZone42() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone42());\n }", "@Test\n public void testPulkovo1995GKZone31() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone31());\n }", "boolean hasHasLatitude();", "@Test\n public void testPulkovo19953DegreeGKZone19() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone19());\n }", "@Test\n public void testPulkovo19953DegreeGKZone44() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone44());\n }", "private void checkPointLon(){\n double glon = Double.parseDouble(point_lon);\n if(glon > 180.0){\n double glon360 = glon % 360.0;\n //west\n if(glon360 > 180.0){\n point_lon = Double.toString(glon360-360.0);\n //System.out.println(point_lon);\n //east\n }else{\n point_lon = Double.toString(glon360);\n //System.out.println(point_lon);\n }\n }\n if(glon < -180.0){\n double glon360 = glon % 360.0;\n //east\n if(glon360 < -180.0){\n point_lon = Double.toString(glon360+360.0);\n //west\n }else{\n point_lon = Double.toString(glon360);\n }\n }\n }", "@Test\n public void testPulkovo1995GKZone29() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone29());\n }", "public static void main (String[] args)\r\n {\n Coordenada utm = new Coordenada(new Datum(6378388D, 6356911.94612795),\r\n\t\t\t 481742, 4770800, 700, (byte)29, true);\r\n //System.out.println(\"lon=\"+utm.getLon()+\" lat=\"+utm.getLat());\r\n //System.out.println(utm.getGrados(utm.getLon())+\"¦ \"+utm.getMinutos(utm.getLon())+\"' \"+utm.getSegundos(utm.getLon())+\"\\\" \"+utm.getGrados(utm.getLat())+\"¦ \"+utm.getMinutos(utm.getLat())+\"' \"+utm.getSegundos(utm.getLat())+\"\\\"\");\r\n @SuppressWarnings(\"unused\")\r\n Coordenada res;\r\n res = utm.CambioDeDatum(new Datum(6378137D, 6356752.31424518));\r\n\r\n //System.out.println(\"Coordenadas en Datum destino: X=\"+res.X+\" Y=\"+res.Y);\r\n //System.out.println(\"lon=\"+res.getLon()+\" lat=\"+res.getLat());\r\n //System.out.println(res.getGrados(res.getLon())+\"¦ \"+res.getMinutos(res.getLon())+\"' \"+res.getSegundos(res.getLon())+\"\\\" \"+res.getGrados(res.getLat())+\"¦ \"+res.getMinutos(res.getLat())+\"' \"+res.getSegundos(res.getLat())+\"\\\"\");\r\n\t\t\t\t \r\n }", "public void coord_to_horizon( Calendar utc, String ra_in, String dec_in, double lat_in, double lon_in )\r\n {\n\r\n \tCoordConverter myConverter = new CoordConverter();\r\n \t\r\n \tdouble ra = myConverter.RAString2Double(ra_in);\r\n \tdouble dec = myConverter.DecString2Double(dec_in);\r\n \t\r\n \tdouble lat = lat_in;//dms2real( Integer.parseInt(lat_str[0]), Double.parseDouble(lat_str[1]) );\r\n double lon = lon_in;//dms2real( Integer.parseInt(lon_str[0]), Double.parseDouble(lon_str[1]) );\r\n\r\n // compute hour angle in degrees\r\n double ha = GetSiderealTime( utc, lon ) - ra;\r\n if (ha < 0) ha = ha + 360;\r\n\r\n // convert degrees to radians\r\n ha = ha*Math.PI/180;\r\n dec = dec*Math.PI/180;\r\n lat = lat*Math.PI/180;\r\n\r\n // compute altitude in radians\r\n double sin_alt = Math.sin(dec)*Math.sin(lat) + Math.cos(dec)*Math.cos(lat)*Math.cos(ha);\r\n double alt = Math.asin(sin_alt);\r\n \r\n // compute azimuth in radians\r\n // divide by zero error at poles or if alt = 90 deg\r\n double cos_az = (Math.sin(dec) - Math.sin(alt)*Math.sin(lat))/(Math.cos(alt)*Math.cos(lat));\r\n double az = Math.acos(cos_az);\r\n\r\n // convert radians to degrees\r\n hrz_altitude = alt*180/Math.PI;\r\n hrz_azimuth = az*180/Math.PI;\r\n\r\n // choose hemisphere\r\n if (Math.sin(ha) > 0)\r\n hrz_azimuth = 360 - hrz_azimuth;\r\n }", "public int getLon();", "@Test\n public void testPulkovo1995GKZone30() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone30());\n }", "@Test\n public void testPulkovo1995GKZone12() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone12());\n }", "int getLatE6();", "int getLatE6();", "@Test\n public void testPulkovo1995GKZone18() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone18());\n }", "@Test\n public void testPulkovo1995GKZone23() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone23());\n }", "@Test\n\tpublic void eastSWC()\t\n\t{\n\t\tData d = new Data();\n\t\td.set(20, 43);\n\t\td.set(22, 54);\n\t\td.set(26, 33);\n\t\td.set(28, 76);\n\t\td.set(30, 87);\n\t\td.set(1, 44);\n\t\td.set(2, 55);\n\t\td.set(3, 66);\n\t\td.set(4, 77);\n\t\td.set(5, 88);\n\t\td.set(19, 99);\n\t\tArrayList<Coordinate> test_arr = d.shieldWallCapture(99);\n\t\tassertTrue(10==test_arr.get(0).getX() && 7==test_arr.get(0).getY()\n\t\t\t&& 10==test_arr.get(1).getX() && 6==test_arr.get(1).getY()\n\t\t\t&& 10==test_arr.get(2).getX() && 5==test_arr.get(2).getY()\n\t\t\t&& 10==test_arr.get(3).getX() && 4==test_arr.get(3).getY()\n\t\t\t&& 10==test_arr.get(4).getX() && 3==test_arr.get(4).getY());\n\t}", "@Test\n public void testPulkovo1995GKZone27() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone27());\n }", "@Test\n public void testPulkovo1995GKZone11() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone11());\n }", "@Test\n public void testPulkovo1995GKZone15() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone15());\n }", "@Test\n public void testPulkovo1995GKZone5() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone5());\n }", "@Test\n public void testPulkovo1995GKZone25N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone25N());\n }", "@Test\n public void testPulkovo1995GKZone26() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone26());\n }", "@Test\n public void testPulkovo1995GKZone31N() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone31N());\n }", "@Test\n public void testPulkovo1995GKZone13() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone13());\n }", "@Test\n public void testPulkovo1995GKZone9() {\n testToWGS84AndBack(PROJ.getPulkovo1995GKZone9());\n }", "public double getTopRightLat() {\r\n return topRightLat;\r\n }", "boolean hasLatitude();" ]
[ "0.61698794", "0.61256224", "0.61053175", "0.61053175", "0.6074363", "0.60386246", "0.6015028", "0.5986668", "0.5930123", "0.59266305", "0.59230316", "0.58980423", "0.5897007", "0.58704287", "0.5856878", "0.58305526", "0.5820925", "0.58102375", "0.5809194", "0.58014584", "0.5785816", "0.5784264", "0.5777797", "0.57751185", "0.5774269", "0.57729197", "0.57702976", "0.5768783", "0.57617724", "0.5761763", "0.5758933", "0.57578", "0.5757429", "0.5751952", "0.574859", "0.5747759", "0.57471097", "0.57393444", "0.57345855", "0.57280254", "0.57256955", "0.5724251", "0.5723414", "0.5723414", "0.57182264", "0.5717854", "0.57105315", "0.57050234", "0.5700653", "0.5695029", "0.56919473", "0.5687055", "0.5684604", "0.56807464", "0.5678473", "0.56754375", "0.5675379", "0.5667809", "0.5659076", "0.5654034", "0.56500703", "0.56477517", "0.5647113", "0.56383353", "0.56288445", "0.56131893", "0.559594", "0.5593143", "0.55905896", "0.559024", "0.5579893", "0.55765736", "0.55742294", "0.5569964", "0.5565917", "0.55607533", "0.5556124", "0.55516416", "0.5547952", "0.55360407", "0.5528689", "0.5526475", "0.5520008", "0.55199164", "0.5511215", "0.5510648", "0.5510648", "0.5496676", "0.54901284", "0.5489076", "0.5487615", "0.5487501", "0.54865104", "0.5485109", "0.5482438", "0.5481201", "0.5474324", "0.5466896", "0.5466856", "0.54655147", "0.5465095" ]
0.0
-1
Decimos si es hemisferio SUR teniendo en cuenta la latitud de las Canarias: Esto es un error porque las Canarias estan en el hemisferio Norte !!!
boolean EsHemisferioSur() { if (getLat() < 29.46) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasHasLatitude();", "@Test\n public void testPulkovo19953DegreeGKZone59() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone59());\n }", "boolean hasHasLongitude();", "@Test\n public void testPulkovo19953DegreeGKZone47() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone47());\n }", "@Test\n public void testPulkovo19953DegreeGKZone26() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone26());\n }", "@Test\n public void testPulkovo19953DegreeGKZone56() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone56());\n }", "@Test\n public void testPulkovo19953DegreeGKZone36() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone36());\n }", "boolean hasLatitude();", "boolean hasLatitude();", "@Test\n public void testPulkovo19953DegreeGKZone15() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone15());\n }", "@Test\n public void testPulkovo19953DegreeGKZone60() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone60());\n }", "@Test\n public void testPulkovo19953DegreeGKZone62() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone62());\n }", "@Test\n public void testPulkovo19953DegreeGKZone27() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone27());\n }", "@Test\n public void testPulkovo19953DegreeGKZone12() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone12());\n }", "@Test\n public void testPulkovo19953DegreeGKZone55() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone55());\n }", "@Test\n public void testPulkovo19953DegreeGKCM120E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM120E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone37() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone37());\n }", "@Test\n public void testPulkovo19953DegreeGKZone33() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone33());\n }", "@Test\n public void testPulkovo19953DegreeGKCM72E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM72E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone57() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone57());\n }", "@Test\n public void testPulkovo19953DegreeGKZone52() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone52());\n }", "@Test\n public void testPulkovo19953DegreeGKZone22() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone22());\n }", "@Test\n public void testPulkovo19953DegreeGKZone34() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone34());\n }", "@Test\n public void testPulkovo19953DegreeGKZone35() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone35());\n }", "@Test\n public void testPulkovo19953DegreeGKCM180E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM180E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone63() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone63());\n }", "@Test\n public void testPulkovo19953DegreeGKCM108E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM108E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone25() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone25());\n }", "@Test\n public void testPulkovo19953DegreeGKCM126E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM126E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone54() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone54());\n }", "@Test\n public void testPulkovo19953DegreeGKCM174E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM174E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM117E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM117E());\n }", "public void verificaCoordenada() {\r\n\t\tif (X < 0) {\r\n\t\t\tX = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tX = X % Const.TAMANHO;\r\n\t\t}\r\n\r\n\t\tif (Y < 0) {\r\n\t\t\tY = Const.TAMANHO - 1;\r\n\t\t} else {\r\n\t\t\tY = Y % Const.TAMANHO;\r\n\t\t}\r\n\t}", "@Test\n public void testPulkovo19953DegreeGKZone45() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone45());\n }", "@Test\n public void testPulkovo19953DegreeGKZone32() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone32());\n }", "@Test\n public void testPulkovo19953DegreeGKZone61() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone61());\n }", "@Test\n public void testPulkovo19953DegreeGKZone58() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone58());\n }", "@Test\n public void testPulkovo19953DegreeGKCM159E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM159E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM33E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM33E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM27E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM27E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone46() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone46());\n }", "private void checkPointLon(){\n double glon = Double.parseDouble(point_lon);\n if(glon > 180.0){\n double glon360 = glon % 360.0;\n //west\n if(glon360 > 180.0){\n point_lon = Double.toString(glon360-360.0);\n //System.out.println(point_lon);\n //east\n }else{\n point_lon = Double.toString(glon360);\n //System.out.println(point_lon);\n }\n }\n if(glon < -180.0){\n double glon360 = glon % 360.0;\n //east\n if(glon360 < -180.0){\n point_lon = Double.toString(glon360+360.0);\n //west\n }else{\n point_lon = Double.toString(glon360);\n }\n }\n }", "@Test\n public void testPulkovo19953DegreeGKZone13() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone13());\n }", "boolean hasLongitude();", "boolean hasLongitude();", "@Test\n public void testPulkovo19953DegreeGKCM162E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM162E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone29() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone29());\n }", "@Test\n public void testPulkovo19953DegreeGKCM141E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM141E());\n }", "boolean hasCoordInfo();", "@Test\n public void testPulkovo19953DegreeGKCM171E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM171E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone16() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone16());\n }", "@Test\n public void testPulkovo19953DegreeGKCM168E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM168E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM36E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM36E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM135E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM135E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone40() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone40());\n }", "@Test\n public void testPulkovo19953DegreeGKCM165E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM165E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone44() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone44());\n }", "@Test\n public void testPulkovo19953DegreeGKCM66E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM66E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM111E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM111E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone11() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone11());\n }", "@Test\n public void testPulkovo19953DegreeGKCM60E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM60E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM24E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM24E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM132E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM132E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM147E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM147E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM123E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM123E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone23() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone23());\n }", "@Test\n public void testPulkovo19953DegreeGKZone51() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone51());\n }", "@Test\n public void testPulkovo19953DegreeGKCM51E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM51E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM78E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM78E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone39() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone39());\n }", "@Test\n public void testPulkovo19953DegreeGKZone50() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone50());\n }", "@Test\n public void testPulkovo19953DegreeGKZone31() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone31());\n }", "@Test\n public void testPulkovo19953DegreeGKCM30E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM30E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone7() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone7());\n }", "@Test\n public void testPulkovo19953DegreeGKCM69E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM69E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM177E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM177E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM63E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM63E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM144E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM144E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM57E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM57E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone20() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone20());\n }", "@Test\n public void testPulkovo19953DegreeGKZone53() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone53());\n }", "@Test\n public void testPulkovo19953DegreeGKCM129E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM129E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone18() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone18());\n }", "@Test\n public void testPulkovo19953DegreeGKCM99E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM99E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM54E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM54E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM105E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM105E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone43() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone43());\n }", "@Test\n public void testPulkovo19953DegreeGKCM156E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM156E());\n }", "int getLngE6();", "int getLngE6();", "@Test\n public void testPulkovo19953DegreeGKZone28() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone28());\n }", "@Test\n public void testPulkovo19953DegreeGKCM81E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM81E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone49() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone49());\n }", "@Test\n public void testPulkovo19953DegreeGKZone64() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone64());\n }", "@Test\n public void testPulkovo19953DegreeGKCM114E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM114E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM96E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM96E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM21E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM21E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone21() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone21());\n }", "@Test\n public void testPulkovo19953DegreeGKZone14() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone14());\n }", "@Test\n public void testPulkovo19953DegreeGKZone41() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone41());\n }" ]
[ "0.56486654", "0.55035514", "0.54973", "0.5486427", "0.54863423", "0.54863113", "0.54840356", "0.54768115", "0.54768115", "0.54766107", "0.54758763", "0.54737467", "0.54661316", "0.5462527", "0.5455284", "0.5453501", "0.5453444", "0.5449378", "0.5448796", "0.54375964", "0.5437587", "0.54363716", "0.54340553", "0.5433151", "0.54296476", "0.54295295", "0.54247475", "0.5424548", "0.5422225", "0.5418606", "0.54162484", "0.5414293", "0.5407647", "0.5404487", "0.54028076", "0.54010373", "0.54009223", "0.53980625", "0.5395238", "0.5395225", "0.5395156", "0.5394672", "0.5393985", "0.53924656", "0.53924656", "0.5391865", "0.53916556", "0.53890705", "0.53887475", "0.5385222", "0.5385147", "0.53827155", "0.53811795", "0.5381027", "0.53804517", "0.53783077", "0.5378064", "0.53779113", "0.53771067", "0.5375166", "0.53751224", "0.5374878", "0.5372046", "0.53702843", "0.53695893", "0.53679276", "0.5366717", "0.5363314", "0.5362014", "0.53600293", "0.5359575", "0.53592163", "0.5357528", "0.53534544", "0.53530854", "0.53521085", "0.53512186", "0.5347786", "0.534668", "0.534637", "0.53456664", "0.53440905", "0.53427607", "0.5341029", "0.53393036", "0.5338224", "0.5336245", "0.53350145", "0.5334161", "0.5334161", "0.5330698", "0.53297424", "0.53292567", "0.53264993", "0.5326255", "0.5324948", "0.5323719", "0.53230965", "0.5321584", "0.5320513" ]
0.70339656
0
System.out.println("Inicio..."); Coordenada utm = new Coordenada(new Datum(6378388, 6356911.946130), 435157.59, 4815453.64, 0, (byte)30, true); Coordenada utm = new Coordenada(new Datum(6378388, 6356911.946130), 448500759, 4377580.93, 0, (byte)30, true); System.out.println("UTM a geograficas: x="+utm.X+" y="+utm.Y); utm.GenerarCoordenadasGeograficas(); System.out.println("latitud="+utm.latitud+" longitud="+utm.longitud); Coordenada geo = new Coordenada(new Datum(6378388.00, 6356911.946130), utm.longitud, utm.latitud, 0); geo.GenerarCoordenadasUTM(); System.out.println("X="+geo.X+" Y="+geo.Y+" Z="+geo.Z+" zona="+geo.zona+ " hemisferio Norte="+geo.hemisferio_N); / // De WGS84 a ED50: Coordenada utm = new Coordenada(new Datum(6378137D, 6356752.31424518), 448500.79, 4377580.93, 771.46, (byte)30, true); Coordenada res; res = utm.CambioDeDatum(new Datum(6378388D, 6356911.94612795)); De ED50 a WGS84:
public static void main (String[] args) { Coordenada utm = new Coordenada(new Datum(6378388D, 6356911.94612795), 481742, 4770800, 700, (byte)29, true); //System.out.println("lon="+utm.getLon()+" lat="+utm.getLat()); //System.out.println(utm.getGrados(utm.getLon())+"¦ "+utm.getMinutos(utm.getLon())+"' "+utm.getSegundos(utm.getLon())+"\" "+utm.getGrados(utm.getLat())+"¦ "+utm.getMinutos(utm.getLat())+"' "+utm.getSegundos(utm.getLat())+"\""); @SuppressWarnings("unused") Coordenada res; res = utm.CambioDeDatum(new Datum(6378137D, 6356752.31424518)); //System.out.println("Coordenadas en Datum destino: X="+res.X+" Y="+res.Y); //System.out.println("lon="+res.getLon()+" lat="+res.getLat()); //System.out.println(res.getGrados(res.getLon())+"¦ "+res.getMinutos(res.getLon())+"' "+res.getSegundos(res.getLon())+"\" "+res.getGrados(res.getLat())+"¦ "+res.getMinutos(res.getLat())+"' "+res.getSegundos(res.getLat())+"\""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Coordenada (Datum _d, double x, double y, double z,\r\n\t\t byte _zona, boolean _hemisferio_N)\r\n {\r\n d = _d;\r\n X = x;\r\n Y = y;\r\n Z = z; // Altura ortometrica, sobre NMMA\r\n zona = _zona;\r\n zona_ori = _zona;\r\n hemisferio_N = _hemisferio_N;\r\n GenerarCoordenadasGeograficas();\r\n }", "@Test\n public void testConvertCoordToPixel() throws Exception {\n System.out.println(\"convertCoordToPixel\");\n double x = 800;\n double y = 500;\n double lat = -71.320920;\n double lon = 46.759400;\n Utils instance = new Utils();\n Coordonnee coord = new Coordonnee(-71.320920,46.759400);\n assertEquals(\"test latitude\",x,instance.convertCoordToPixel(coord).getLat(),0);\n assertEquals(\"test longitude\",y,instance.convertCoordToPixel(coord).getLon(),0);\n }", "@Test\n public void testConvertPixelToCoord() throws Exception {\n System.out.println(\"convertPixelToCoord\");\n double x = 800;\n double y = 500;\n double lat = -71.320920;\n double lon = 46.759400;\n Utils instance = new Utils();\n Coordonnee result = instance.convertPixelToCoord(x, y);\n assertEquals(\"test latitude\",lat,result.getLat(),0);\n assertEquals(\"test longitude\",lon,result.getLon(),0);\n }", "private DPoint m2833m() {\r\n IPoint iPoint = new IPoint();\r\n this.f1769m.mo353a(this.f1761e.latitude, this.f1761e.longitude, iPoint);\r\n IPoint iPoint2 = new IPoint();\r\n this.f1769m.mo353a(this.f1762f.latitude, this.f1762f.longitude, iPoint2);\r\n IPoint iPoint3 = new IPoint();\r\n this.f1769m.mo353a(this.f1763g.latitude, this.f1763g.longitude, iPoint3);\r\n double d = (double) iPoint.f3639x;\r\n double d2 = (double) iPoint.f3640y;\r\n double d3 = (double) iPoint2.f3639x;\r\n double d4 = (double) iPoint2.f3640y;\r\n double d5 = (double) iPoint3.f3639x;\r\n double d6 = (double) iPoint3.f3640y;\r\n double d7 = (((d6 - d2) * ((((d4 * d4) - (d2 * d2)) + (d3 * d3)) - (d * d))) + ((d4 - d2) * ((((d2 * d2) - (d6 * d6)) + (d * d)) - (d5 * d5)))) / (((2.0d * (d3 - d)) * (d6 - d2)) - ((2.0d * (d5 - d)) * (d4 - d2)));\r\n double d8 = (((d5 - d) * ((((d3 * d3) - (d * d)) + (d4 * d4)) - (d2 * d2))) + ((d3 - d) * ((((d * d) - (d5 * d5)) + (d2 * d2)) - (d6 * d6)))) / (((2.0d * (d4 - d2)) * (d5 - d)) - ((2.0d * (d6 - d2)) * (d3 - d)));\r\n this.f1773q = Math.sqrt(((d - d7) * (d - d7)) + ((d2 - d8) * (d2 - d8)));\r\n this.f1774r = m2830a(d7, d8, d, d2);\r\n d = m2830a(d7, d8, d3, d4);\r\n this.f1775s = m2830a(d7, d8, d5, d6);\r\n if (this.f1774r < this.f1775s) {\r\n if (d <= this.f1774r || d >= this.f1775s) {\r\n this.f1775s -= 6.283185307179586d;\r\n }\r\n } else if (d <= this.f1775s || d >= this.f1774r) {\r\n this.f1775s += 6.283185307179586d;\r\n }\r\n return new DPoint(d7, d8);\r\n }", "private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }", "@Test\n public void testPulkovo19953DegreeGKZone62() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone62());\n }", "@Test\n public void testPulkovo19953DegreeGKZone59() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone59());\n }", "@Test\n public void testPulkovo19953DegreeGKZone56() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone56());\n }", "@Test\n public void testPulkovo19953DegreeGKZone63() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone63());\n }", "void MontaValores(){\r\n // 0;0;-23,3154166666667;-51,1447783333333;0 // Extrai os valores e coloca no objetos\r\n // Dis;Dir;Lat;Long;Velocidade\r\n // Quebra de Rota lat=-999.999 long=-999.999 ==> Marca ...\r\n \r\n int ind=0;\r\n NMEAS=NMEA.replace(\",\" , \".\");\r\n \r\n //1)\r\n dists=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind));\r\n Distancia=Double.valueOf(dists);\r\n ind=ind+dists.length()+1;\r\n \r\n //2)\r\n dirs=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Direcao=Double.valueOf(dirs);\r\n ind=ind+dirs.length()+1;\r\n \r\n //3)\r\n lats=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Lat=Double.valueOf(lats);\r\n ind=ind+lats.length()+1;\r\n \r\n //4)\r\n longs=NMEAS.substring(ind,NMEAS.indexOf(\";\",ind+1));\r\n Long=Double.valueOf(longs);\r\n ind=ind+longs.length()+1;\r\n \r\n //5)\r\n vels=NMEAS.substring(ind,NMEAS.length());\r\n // Transforma de Knots para Km/h\r\n Velocidade=Double.valueOf(vels)/100*1.15152*1.60934;\r\n vels=String.valueOf(Velocidade);\r\n ind=ind+vels.length()+1;\r\n \r\n }", "@Test\n public void testPulkovo19953DegreeGKZone64() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone64());\n }", "@Test\n public void testPulkovo19953DegreeGKCM159E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM159E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM63E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM63E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone52() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone52());\n }", "@Test\n public void testPulkovo19953DegreeGKZone36() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone36());\n }", "@Test\n public void testPulkovo19953DegreeGKCM129E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM129E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone54() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone54());\n }", "@Test\n public void testPulkovo19953DegreeGKZone26() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone26());\n }", "@Test\n public void testPulkovo19953DegreeGKZone34() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone34());\n }", "@Test\n public void testPulkovo19953DegreeGKCM126E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM126E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone35() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone35());\n }", "@Test\n public void testPulkovo19953DegreeGKCM69E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM69E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone39() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone39());\n }", "@Test\n public void testPulkovo19953DegreeGKZone43() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone43());\n }", "@Test\n public void testPulkovo19953DegreeGKZone61() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone61());\n }", "@Test\n public void testPulkovo19953DegreeGKCM144E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM144E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM66E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM66E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM174E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM174E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone60() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone60());\n }", "@Test\n public void testPulkovo19953DegreeGKZone25() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone25());\n }", "@Test\n public void testPulkovo19953DegreeGKCM72E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM72E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone22() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone22());\n }", "@Test\n public void testPulkovo19953DegreeGKCM162E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM162E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM147E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM147E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone23() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone23());\n }", "@Test\n public void testPulkovo19953DegreeGKZone15() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone15());\n }", "@Test\n public void testPulkovo19953DegreeGKCM123E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM123E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone29() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone29());\n }", "@Test\n public void testPulkovo19953DegreeGKCM108E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM108E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM117E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM117E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone12() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone12());\n }", "@Test\n public void testPulkovo19953DegreeGKZone57() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone57());\n }", "@Test\n public void testPulkovo19953DegreeGKCM168E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM168E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone58() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone58());\n }", "@Test\n public void testPulkovo19953DegreeGKZone27() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone27());\n }", "@Test\n public void testPulkovo19953DegreeGKCM135E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM135E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM54E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM54E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM96E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM96E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM36E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM36E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM156E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM156E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone13() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone13());\n }", "@Test\n public void testPulkovo19953DegreeGKZone49() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone49());\n }", "@Test\n public void testPulkovo19953DegreeGKZone46() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone46());\n }", "@Test\n public void testPulkovo19953DegreeGKCM132E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM132E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM39E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM39E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone14() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone14());\n }", "@Test\n public void testPulkovo19953DegreeGKCM105E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM105E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM114E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM114E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM177E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM177E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM30E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM30E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM78E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM78E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone40() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone40());\n }", "@Test\n public void testPulkovo19953DegreeGKZone55() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone55());\n }", "@Test\n public void testPulkovo19953DegreeGKCM57E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM57E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM153E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM153E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM120E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM120E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM60E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM60E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM99E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM99E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone33() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone33());\n }", "@Test\n public void testPulkovo19953DegreeGKCM27E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM27E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM51E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM51E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone37() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone37());\n }", "@Test\n public void testPulkovo19953DegreeGKCM138E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM138E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone31() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone31());\n }", "@Test\n public void testPulkovo19953DegreeGKZone10() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone10());\n }", "@Test\n public void testPulkovo19953DegreeGKCM141E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM141E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM165E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM165E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone20() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone20());\n }", "@Test\n public void testPulkovo19953DegreeGKCM75E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM75E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM150E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM150E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM171E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM171E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone11() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone11());\n }", "@Test\n public void testPulkovo19953DegreeGKZone45() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone45());\n }", "@Test\n public void testPulkovo19953DegreeGKCM180E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM180E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone51() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone51());\n }", "@Test\n public void testPulkovo19953DegreeGKCM102E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM102E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM45E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM45E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone41() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone41());\n }", "@Test\n public void testPulkovo19953DegreeGKZone48() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone48());\n }", "@Test\n public void testPulkovo19953DegreeGKCM33E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM33E());\n }", "@Test\n public void testPulkovo19953DegreeGKZone16() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone16());\n }", "@Test\n public void testPulkovo19953DegreeGKZone18() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone18());\n }", "@Test\n public void testPulkovo19953DegreeGKZone47() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone47());\n }", "@Test\n public void testPulkovo19953DegreeGKZone42() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone42());\n }", "public Coordenada() {\n }", "@Test\n public void testPulkovo19953DegreeGKZone9() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKZone9());\n }", "@Test\n public void testPulkovo19953DegreeGKCM21E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM21E());\n }", "@Test\n public void testPulkovo19953DegreeGKCM81E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM81E());\n }", "public MbCoordDpto() {\r\n \r\n }", "@Test\n public void testPulkovo19953DegreeGKCM42E() {\n testToWGS84AndBack(PROJ.getPulkovo19953DegreeGKCM42E());\n }" ]
[ "0.6937738", "0.6497548", "0.64515364", "0.6197519", "0.6173302", "0.614245", "0.61329377", "0.6096343", "0.609454", "0.6089048", "0.6088626", "0.6085112", "0.60821664", "0.6063271", "0.60596496", "0.60515046", "0.6045809", "0.6043715", "0.6034559", "0.6034193", "0.60336906", "0.6030574", "0.6026934", "0.6026305", "0.60257846", "0.6025078", "0.6024556", "0.6021769", "0.6020971", "0.6018362", "0.60156304", "0.60138685", "0.6011261", "0.601075", "0.60098034", "0.60092974", "0.60081166", "0.60071826", "0.60068876", "0.6000498", "0.59980536", "0.5997814", "0.59967947", "0.59931433", "0.5990698", "0.59892744", "0.59892595", "0.59889305", "0.5986261", "0.5986215", "0.5985494", "0.59830415", "0.5982498", "0.5974326", "0.5971888", "0.5970401", "0.59695625", "0.59672487", "0.59663504", "0.59646887", "0.5964617", "0.5960571", "0.59598804", "0.59551805", "0.59551454", "0.5953329", "0.59524", "0.59511", "0.5948538", "0.5947971", "0.5947861", "0.5946894", "0.5943691", "0.59431344", "0.5941839", "0.59412646", "0.59408045", "0.5940703", "0.59388494", "0.5938502", "0.59384626", "0.5937064", "0.5934374", "0.59330684", "0.5931952", "0.5931257", "0.5928251", "0.59281796", "0.5926218", "0.59260416", "0.59215856", "0.59181875", "0.5918013", "0.5915719", "0.59107614", "0.59097075", "0.590282", "0.5896036", "0.5895918", "0.5895714" ]
0.8784624
0