repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
stephenc/java-iso-tools
iso9660-vfs-impl/src/main/java/com/github/stephenc/javaisotools/vfs/provider/iso/IsoFileObject.java
IsoFileObject.setIsoEntry
void setIsoEntry(final Iso9660FileEntry entry) { if (null != this.entry) { throw new RuntimeException("Cannot change the underlying entry once it has been set"); } if (null == entry) { throw new IllegalArgumentException("'entry' cannot be null"); } this.e...
java
void setIsoEntry(final Iso9660FileEntry entry) { if (null != this.entry) { throw new RuntimeException("Cannot change the underlying entry once it has been set"); } if (null == entry) { throw new IllegalArgumentException("'entry' cannot be null"); } this.e...
[ "void", "setIsoEntry", "(", "final", "Iso9660FileEntry", "entry", ")", "{", "if", "(", "null", "!=", "this", ".", "entry", ")", "{", "throw", "new", "RuntimeException", "(", "\"Cannot change the underlying entry once it has been set\"", ")", ";", "}", "if", "(", ...
Sets the Iso9660FileEntry that backs this FileObject. This method is package-private because IsoFileSystem pre-creates some directory entries when building the file index, and it needs to set the backing entry after the fact.
[ "Sets", "the", "Iso9660FileEntry", "that", "backs", "this", "FileObject", ".", "This", "method", "is", "package", "-", "private", "because", "IsoFileSystem", "pre", "-", "creates", "some", "directory", "entries", "when", "building", "the", "file", "index", "and"...
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/iso9660-vfs-impl/src/main/java/com/github/stephenc/javaisotools/vfs/provider/iso/IsoFileObject.java#L61-L71
train
stephenc/java-iso-tools
iso9660-vfs-impl/src/main/java/com/github/stephenc/javaisotools/vfs/provider/iso/IsoFileSystem.java
IsoFileSystem.doCloseCommunicationLink
protected void doCloseCommunicationLink() { if (null != this.fileSystem && !this.fileSystem.isClosed()) { try { this.fileSystem.close(); } catch (IOException ex) { VfsLog.warn(getLogger(), log, "vfs.provider.iso/close-is...
java
protected void doCloseCommunicationLink() { if (null != this.fileSystem && !this.fileSystem.isClosed()) { try { this.fileSystem.close(); } catch (IOException ex) { VfsLog.warn(getLogger(), log, "vfs.provider.iso/close-is...
[ "protected", "void", "doCloseCommunicationLink", "(", ")", "{", "if", "(", "null", "!=", "this", ".", "fileSystem", "&&", "!", "this", ".", "fileSystem", ".", "isClosed", "(", ")", ")", "{", "try", "{", "this", ".", "fileSystem", ".", "close", "(", ")"...
Closes the underlying .iso file.
[ "Closes", "the", "underlying", ".", "iso", "file", "." ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/iso9660-vfs-impl/src/main/java/com/github/stephenc/javaisotools/vfs/provider/iso/IsoFileSystem.java#L146-L156
train
stephenc/java-iso-tools
iso9660-writer/src/main/java/com/github/stephenc/javaisotools/iso9660/ISO9660Directory.java
ISO9660Directory.unsortedIterator
public Iterator<ISO9660Directory> unsortedIterator() { if (unsortedIterator == null) { unsortedIterator = new ISO9660DirectoryIterator(this, false); } unsortedIterator.reset(); return unsortedIterator; }
java
public Iterator<ISO9660Directory> unsortedIterator() { if (unsortedIterator == null) { unsortedIterator = new ISO9660DirectoryIterator(this, false); } unsortedIterator.reset(); return unsortedIterator; }
[ "public", "Iterator", "<", "ISO9660Directory", ">", "unsortedIterator", "(", ")", "{", "if", "(", "unsortedIterator", "==", "null", ")", "{", "unsortedIterator", "=", "new", "ISO9660DirectoryIterator", "(", "this", ",", "false", ")", ";", "}", "unsortedIterator"...
Returns a directory iterator to traverse the directory hierarchy using a recursive method @return Iterator
[ "Returns", "a", "directory", "iterator", "to", "traverse", "the", "directory", "hierarchy", "using", "a", "recursive", "method" ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/iso9660-writer/src/main/java/com/github/stephenc/javaisotools/iso9660/ISO9660Directory.java#L532-L538
train
stephenc/java-iso-tools
loop-fs-spi/src/main/java/com/github/stephenc/javaisotools/loopfs/spi/AbstractBlockFileSystem.java
AbstractBlockFileSystem.readBlock
protected final boolean readBlock(final long block, final byte[] buffer) throws IOException { final int bytesRead = readData(block * this.blockSize, buffer, 0, this.blockSize); if (bytesRead <= 0) { return false; } if (this.blockSize != bytesRead) { throw new IO...
java
protected final boolean readBlock(final long block, final byte[] buffer) throws IOException { final int bytesRead = readData(block * this.blockSize, buffer, 0, this.blockSize); if (bytesRead <= 0) { return false; } if (this.blockSize != bytesRead) { throw new IO...
[ "protected", "final", "boolean", "readBlock", "(", "final", "long", "block", ",", "final", "byte", "[", "]", "buffer", ")", "throws", "IOException", "{", "final", "int", "bytesRead", "=", "readData", "(", "block", "*", "this", ".", "blockSize", ",", "buffe...
Read the data for the specified block into the specified buffer. @return if the block was actually read @throws IOException if the number of bytes read into the buffer was less than the expected number (i.e. the block size)
[ "Read", "the", "data", "for", "the", "specified", "block", "into", "the", "specified", "buffer", "." ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/loop-fs-spi/src/main/java/com/github/stephenc/javaisotools/loopfs/spi/AbstractBlockFileSystem.java#L89-L101
train
stephenc/java-iso-tools
loop-fs-spi/src/main/java/com/github/stephenc/javaisotools/loopfs/spi/AbstractBlockFileSystem.java
AbstractBlockFileSystem.readData
protected final synchronized int readData(final long startPos, final byte[] buffer, final int offset, final int len) throws IOException { seek(startPos); return read(buffer, offset, len); }
java
protected final synchronized int readData(final long startPos, final byte[] buffer, final int offset, final int len) throws IOException { seek(startPos); return read(buffer, offset, len); }
[ "protected", "final", "synchronized", "int", "readData", "(", "final", "long", "startPos", ",", "final", "byte", "[", "]", "buffer", ",", "final", "int", "offset", ",", "final", "int", "len", ")", "throws", "IOException", "{", "seek", "(", "startPos", ")",...
Read file data, starting at the specified position. @return the number of bytes read into the buffer
[ "Read", "file", "data", "starting", "at", "the", "specified", "position", "." ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/loop-fs-spi/src/main/java/com/github/stephenc/javaisotools/loopfs/spi/AbstractBlockFileSystem.java#L108-L113
train
stephenc/java-iso-tools
iso9660-writer/src/main/java/com/github/stephenc/javaisotools/iso9660/ISO9660File.java
ISO9660File.setVersion
public void setVersion(int version) throws HandlerException { if (version < 1 || version > ISO9660Constants.MAX_FILE_VERSION) { throw new HandlerException("Invalid file version: " + version); } this.version = version; if (parent != null) { parent.forceSort(); ...
java
public void setVersion(int version) throws HandlerException { if (version < 1 || version > ISO9660Constants.MAX_FILE_VERSION) { throw new HandlerException("Invalid file version: " + version); } this.version = version; if (parent != null) { parent.forceSort(); ...
[ "public", "void", "setVersion", "(", "int", "version", ")", "throws", "HandlerException", "{", "if", "(", "version", "<", "1", "||", "version", ">", "ISO9660Constants", ".", "MAX_FILE_VERSION", ")", "{", "throw", "new", "HandlerException", "(", "\"Invalid file v...
Set file version @param version File version @throws HandlerException Invalid file version
[ "Set", "file", "version" ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/iso9660-writer/src/main/java/com/github/stephenc/javaisotools/iso9660/ISO9660File.java#L248-L257
train
stephenc/java-iso-tools
loop-fs-spi/src/main/java/com/github/stephenc/javaisotools/loopfs/util/LittleEndian.java
LittleEndian.getUInt32
public static long getUInt32(byte[] src, int offset) { final long v0 = src[offset] & 0xFF; final long v1 = src[offset + 1] & 0xFF; final long v2 = src[offset + 2] & 0xFF; final long v3 = src[offset + 3] & 0xFF; return ((v3 << 24) | (v2 << 16) | (v1 << 8) | v0); }
java
public static long getUInt32(byte[] src, int offset) { final long v0 = src[offset] & 0xFF; final long v1 = src[offset + 1] & 0xFF; final long v2 = src[offset + 2] & 0xFF; final long v3 = src[offset + 3] & 0xFF; return ((v3 << 24) | (v2 << 16) | (v1 << 8) | v0); }
[ "public", "static", "long", "getUInt32", "(", "byte", "[", "]", "src", ",", "int", "offset", ")", "{", "final", "long", "v0", "=", "src", "[", "offset", "]", "&", "0xFF", ";", "final", "long", "v1", "=", "src", "[", "offset", "+", "1", "]", "&", ...
Gets a 32-bit unsigned integer from the given byte array at the given offset.
[ "Gets", "a", "32", "-", "bit", "unsigned", "integer", "from", "the", "given", "byte", "array", "at", "the", "given", "offset", "." ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/loop-fs-spi/src/main/java/com/github/stephenc/javaisotools/loopfs/util/LittleEndian.java#L53-L59
train
stephenc/java-iso-tools
iso9660-writer/src/main/java/com/github/stephenc/javaisotools/rockridge/impl/RockRidgeConfig.java
RockRidgeConfig.addModeForPattern
public void addModeForPattern(String pattern, Integer mode) { System.out.println(String.format("*** Recording pattern \"%s\" with mode %o", pattern, mode)); patternToModeMap.put(pattern, mode); }
java
public void addModeForPattern(String pattern, Integer mode) { System.out.println(String.format("*** Recording pattern \"%s\" with mode %o", pattern, mode)); patternToModeMap.put(pattern, mode); }
[ "public", "void", "addModeForPattern", "(", "String", "pattern", ",", "Integer", "mode", ")", "{", "System", ".", "out", ".", "println", "(", "String", ".", "format", "(", "\"*** Recording pattern \\\"%s\\\" with mode %o\"", ",", "pattern", ",", "mode", ")", ")"...
Add a new mode for a specific file pattern. @param pattern the pattern to be matched @param mode the POSIX file mode for matching filenames
[ "Add", "a", "new", "mode", "for", "a", "specific", "file", "pattern", "." ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/iso9660-writer/src/main/java/com/github/stephenc/javaisotools/rockridge/impl/RockRidgeConfig.java#L95-L98
train
stephenc/java-iso-tools
loop-fs-iso-impl/src/main/java/com/github/stephenc/javaisotools/loopfs/iso9660/Util.java
Util.getDChars
public static String getDChars(byte[] block, int pos, int length) { return new String(block, pos - 1, length).trim(); }
java
public static String getDChars(byte[] block, int pos, int length) { return new String(block, pos - 1, length).trim(); }
[ "public", "static", "String", "getDChars", "(", "byte", "[", "]", "block", ",", "int", "pos", ",", "int", "length", ")", "{", "return", "new", "String", "(", "block", ",", "pos", "-", "1", ",", "length", ")", ".", "trim", "(", ")", ";", "}" ]
Gets a string of d-characters. See section 7.4.1.
[ "Gets", "a", "string", "of", "d", "-", "characters", ".", "See", "section", "7", ".", "4", ".", "1", "." ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/loop-fs-iso-impl/src/main/java/com/github/stephenc/javaisotools/loopfs/iso9660/Util.java#L97-L99
train
stephenc/java-iso-tools
iso9660-writer/src/main/java/com/github/stephenc/javaisotools/iso9660/ISO9660RootDirectory.java
ISO9660RootDirectory.setMovedDirectoryStore
public void setMovedDirectoryStore() { if (movedDirectoriesStore == null) { movedDirectoriesStore = new ISO9660Directory(MOVED_DIRECTORIES_STORE_NAME); addDirectory(movedDirectoriesStore); // Force iterator recreation sortedIterator = null; } }
java
public void setMovedDirectoryStore() { if (movedDirectoriesStore == null) { movedDirectoriesStore = new ISO9660Directory(MOVED_DIRECTORIES_STORE_NAME); addDirectory(movedDirectoriesStore); // Force iterator recreation sortedIterator = null; } }
[ "public", "void", "setMovedDirectoryStore", "(", ")", "{", "if", "(", "movedDirectoriesStore", "==", "null", ")", "{", "movedDirectoriesStore", "=", "new", "ISO9660Directory", "(", "MOVED_DIRECTORIES_STORE_NAME", ")", ";", "addDirectory", "(", "movedDirectoriesStore", ...
Create and Add Moved Directories Store to Directory Hierarchy
[ "Create", "and", "Add", "Moved", "Directories", "Store", "to", "Directory", "Hierarchy" ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/iso9660-writer/src/main/java/com/github/stephenc/javaisotools/iso9660/ISO9660RootDirectory.java#L44-L51
train
stephenc/java-iso-tools
iso9660-writer/src/main/java/com/github/stephenc/javaisotools/joliet/impl/JolietConfig.java
JolietConfig.setUCS2Level
public void setUCS2Level(int level) throws ConfigException { if (level != 1 && level != 2 && level != 3) { throw new ConfigException(this, "Invalid UCS-2 level: " + level); } this.ucs2_level = level; }
java
public void setUCS2Level(int level) throws ConfigException { if (level != 1 && level != 2 && level != 3) { throw new ConfigException(this, "Invalid UCS-2 level: " + level); } this.ucs2_level = level; }
[ "public", "void", "setUCS2Level", "(", "int", "level", ")", "throws", "ConfigException", "{", "if", "(", "level", "!=", "1", "&&", "level", "!=", "2", "&&", "level", "!=", "3", ")", "{", "throw", "new", "ConfigException", "(", "this", ",", "\"Invalid UCS...
Set UCS-2 Level @param level 1, 2 or 3 @throws ConfigException Invalid UCS-2 level @see http://www.nada.kth.se/i18n/ucs/unicode-iso10646-oview.html
[ "Set", "UCS", "-", "2", "Level" ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/iso9660-writer/src/main/java/com/github/stephenc/javaisotools/joliet/impl/JolietConfig.java#L64-L69
train
stephenc/java-iso-tools
iso9660-writer/src/main/java/com/github/stephenc/javaisotools/iso9660/impl/ISO9660Config.java
ISO9660Config.allowASCII
public void allowASCII(boolean allow) { this.allowASCII = allow; ISO9660NamingConventions.FORCE_ISO9660_CHARSET = !allow; if (allow) { System.out.println("Warning: Allowing the full ASCII character set breaks ISO 9660 conformance."); } }
java
public void allowASCII(boolean allow) { this.allowASCII = allow; ISO9660NamingConventions.FORCE_ISO9660_CHARSET = !allow; if (allow) { System.out.println("Warning: Allowing the full ASCII character set breaks ISO 9660 conformance."); } }
[ "public", "void", "allowASCII", "(", "boolean", "allow", ")", "{", "this", ".", "allowASCII", "=", "allow", ";", "ISO9660NamingConventions", ".", "FORCE_ISO9660_CHARSET", "=", "!", "allow", ";", "if", "(", "allow", ")", "{", "System", ".", "out", ".", "pri...
Allow ASCII for filenames and other strings @param allow Whether to allow the ASCII character set for filenames and other strings
[ "Allow", "ASCII", "for", "filenames", "and", "other", "strings" ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/iso9660-writer/src/main/java/com/github/stephenc/javaisotools/iso9660/impl/ISO9660Config.java#L73-L79
train
stephenc/java-iso-tools
loop-fs-iso-impl/src/main/java/com/github/stephenc/javaisotools/loopfs/iso9660/Iso9660VolumeDescriptorSet.java
Iso9660VolumeDescriptorSet.deserializePrimary
private void deserializePrimary(byte[] descriptor) throws IOException { // according to the spec, some ISO 9660 file systems can contain multiple identical primary // volume descriptors if (this.hasPrimary) { return; } validateBlockSize(descriptor); if (!thi...
java
private void deserializePrimary(byte[] descriptor) throws IOException { // according to the spec, some ISO 9660 file systems can contain multiple identical primary // volume descriptors if (this.hasPrimary) { return; } validateBlockSize(descriptor); if (!thi...
[ "private", "void", "deserializePrimary", "(", "byte", "[", "]", "descriptor", ")", "throws", "IOException", "{", "// according to the spec, some ISO 9660 file systems can contain multiple identical primary", "// volume descriptors", "if", "(", "this", ".", "hasPrimary", ")", ...
Read the fields of a primary volume descriptor. @param descriptor the descriptor bytes @throws IOException
[ "Read", "the", "fields", "of", "a", "primary", "volume", "descriptor", "." ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/loop-fs-iso-impl/src/main/java/com/github/stephenc/javaisotools/loopfs/iso9660/Iso9660VolumeDescriptorSet.java#L121-L155
train
stephenc/java-iso-tools
loop-fs-iso-impl/src/main/java/com/github/stephenc/javaisotools/loopfs/iso9660/Iso9660VolumeDescriptorSet.java
Iso9660VolumeDescriptorSet.deserializeSupplementary
private void deserializeSupplementary(byte[] descriptor) throws IOException { // for now, only recognize one supplementary descriptor if (this.hasSupplementary) { return; } validateBlockSize(descriptor); String escapeSequences = Util.getDChars(descriptor, 89, 32); ...
java
private void deserializeSupplementary(byte[] descriptor) throws IOException { // for now, only recognize one supplementary descriptor if (this.hasSupplementary) { return; } validateBlockSize(descriptor); String escapeSequences = Util.getDChars(descriptor, 89, 32); ...
[ "private", "void", "deserializeSupplementary", "(", "byte", "[", "]", "descriptor", ")", "throws", "IOException", "{", "// for now, only recognize one supplementary descriptor", "if", "(", "this", ".", "hasSupplementary", ")", "{", "return", ";", "}", "validateBlockSize...
The supplementary descriptor sets the character encoding and may override the common descriptor information. @param descriptor the descriptor bytes @throws IOException
[ "The", "supplementary", "descriptor", "sets", "the", "character", "encoding", "and", "may", "override", "the", "common", "descriptor", "information", "." ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/loop-fs-iso-impl/src/main/java/com/github/stephenc/javaisotools/loopfs/iso9660/Iso9660VolumeDescriptorSet.java#L164-L186
train
stephenc/java-iso-tools
loop-fs-iso-impl/src/main/java/com/github/stephenc/javaisotools/loopfs/iso9660/Iso9660VolumeDescriptorSet.java
Iso9660VolumeDescriptorSet.deserializeCommon
private void deserializeCommon(byte[] descriptor) throws IOException { this.systemIdentifier = Util.getAChars(descriptor, 9, 32, this.encoding); this.volumeIdentifier = Util.getDChars(descriptor, 41, 32, this.encoding); this.volumeSetIdentifier = Util.getDChars(descriptor, 191, 128, this.encodin...
java
private void deserializeCommon(byte[] descriptor) throws IOException { this.systemIdentifier = Util.getAChars(descriptor, 9, 32, this.encoding); this.volumeIdentifier = Util.getDChars(descriptor, 41, 32, this.encoding); this.volumeSetIdentifier = Util.getDChars(descriptor, 191, 128, this.encodin...
[ "private", "void", "deserializeCommon", "(", "byte", "[", "]", "descriptor", ")", "throws", "IOException", "{", "this", ".", "systemIdentifier", "=", "Util", ".", "getAChars", "(", "descriptor", ",", "9", ",", "32", ",", "this", ".", "encoding", ")", ";", ...
Read the information common to primary and secondary volume descriptors. @param descriptor the volume descriptor bytes @throws IOException
[ "Read", "the", "information", "common", "to", "primary", "and", "secondary", "volume", "descriptors", "." ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/loop-fs-iso-impl/src/main/java/com/github/stephenc/javaisotools/loopfs/iso9660/Iso9660VolumeDescriptorSet.java#L194-L199
train
stephenc/java-iso-tools
loop-fs-iso-impl/src/main/java/com/github/stephenc/javaisotools/loopfs/iso9660/Iso9660VolumeDescriptorSet.java
Iso9660VolumeDescriptorSet.validateBlockSize
private void validateBlockSize(byte[] descriptor) throws IOException { int blockSize = Util.getUInt16Both(descriptor, 129); if (blockSize != Constants.DEFAULT_BLOCK_SIZE) { throw new LoopFileSystemException("Invalid block size: " + blockSize); } }
java
private void validateBlockSize(byte[] descriptor) throws IOException { int blockSize = Util.getUInt16Both(descriptor, 129); if (blockSize != Constants.DEFAULT_BLOCK_SIZE) { throw new LoopFileSystemException("Invalid block size: " + blockSize); } }
[ "private", "void", "validateBlockSize", "(", "byte", "[", "]", "descriptor", ")", "throws", "IOException", "{", "int", "blockSize", "=", "Util", ".", "getUInt16Both", "(", "descriptor", ",", "129", ")", ";", "if", "(", "blockSize", "!=", "Constants", ".", ...
Check that the block size is what we expect. @param descriptor the descriptor bytes @throws IOException
[ "Check", "that", "the", "block", "size", "is", "what", "we", "expect", "." ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/loop-fs-iso-impl/src/main/java/com/github/stephenc/javaisotools/loopfs/iso9660/Iso9660VolumeDescriptorSet.java#L207-L212
train
stephenc/java-iso-tools
loop-fs-iso-impl/src/main/java/com/github/stephenc/javaisotools/loopfs/iso9660/Iso9660VolumeDescriptorSet.java
Iso9660VolumeDescriptorSet.getEncoding
private String getEncoding(String escapeSequences) { String encoding = null; if (escapeSequences.equals("%/@")) { // UCS-2 level 1 encoding = "UTF-16BE"; } else if (escapeSequences.equals("%/C")) { // UCS-2 level 2 encoding = "UTF-16BE"; }...
java
private String getEncoding(String escapeSequences) { String encoding = null; if (escapeSequences.equals("%/@")) { // UCS-2 level 1 encoding = "UTF-16BE"; } else if (escapeSequences.equals("%/C")) { // UCS-2 level 2 encoding = "UTF-16BE"; }...
[ "private", "String", "getEncoding", "(", "String", "escapeSequences", ")", "{", "String", "encoding", "=", "null", ";", "if", "(", "escapeSequences", ".", "equals", "(", "\"%/@\"", ")", ")", "{", "// UCS-2 level 1", "encoding", "=", "\"UTF-16BE\"", ";", "}", ...
Derive an encoding name from the given escape sequences. @param escapeSequences @return
[ "Derive", "an", "encoding", "name", "from", "the", "given", "escape", "sequences", "." ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/loop-fs-iso-impl/src/main/java/com/github/stephenc/javaisotools/loopfs/iso9660/Iso9660VolumeDescriptorSet.java#L220-L235
train
stephenc/java-iso-tools
examples/archive/src/main/java/com/github/stephenc/javaisotools/examples/archive/IsoCreation.java
IsoCreation.finalizeDisc
public void finalizeDisc(File isoPath) { ISOImageFileHandler handler = null; try { handler = new ISOImageFileHandler(isoPath); } catch (FileNotFoundException e) { e.printStackTrace(); } try { CreateISO iso = new CreateISO(handler, root); ...
java
public void finalizeDisc(File isoPath) { ISOImageFileHandler handler = null; try { handler = new ISOImageFileHandler(isoPath); } catch (FileNotFoundException e) { e.printStackTrace(); } try { CreateISO iso = new CreateISO(handler, root); ...
[ "public", "void", "finalizeDisc", "(", "File", "isoPath", ")", "{", "ISOImageFileHandler", "handler", "=", "null", ";", "try", "{", "handler", "=", "new", "ISOImageFileHandler", "(", "isoPath", ")", ";", "}", "catch", "(", "FileNotFoundException", "e", ")", ...
Close out the disc. @param isoPath
[ "Close", "out", "the", "disc", "." ]
828c50b02eb311a14dde0dab43462a0d0c9dfb06
https://github.com/stephenc/java-iso-tools/blob/828c50b02eb311a14dde0dab43462a0d0c9dfb06/examples/archive/src/main/java/com/github/stephenc/javaisotools/examples/archive/IsoCreation.java#L93-L111
train
bluejoe2008/elfinder-2.x-servlet
src/main/java/cn/bluejoe/elfinder/controller/MultipleUploadItems.java
MultipleUploadItems.items
public List<FileItemStream> items(String fieldName) { List<FileItemStream> filteredItems = new ArrayList<FileItemStream>(); for (FileItemStream fis : _items) { if (fis.getFieldName().equals(fieldName)) filteredItems.add(fis); } return filteredItems; }
java
public List<FileItemStream> items(String fieldName) { List<FileItemStream> filteredItems = new ArrayList<FileItemStream>(); for (FileItemStream fis : _items) { if (fis.getFieldName().equals(fieldName)) filteredItems.add(fis); } return filteredItems; }
[ "public", "List", "<", "FileItemStream", ">", "items", "(", "String", "fieldName", ")", "{", "List", "<", "FileItemStream", ">", "filteredItems", "=", "new", "ArrayList", "<", "FileItemStream", ">", "(", ")", ";", "for", "(", "FileItemStream", "fis", ":", ...
find items with given form field name @param fieldName @return
[ "find", "items", "with", "given", "form", "field", "name" ]
83caa5c8ccb05a4139c87babb1b37b73248db9da
https://github.com/bluejoe2008/elfinder-2.x-servlet/blob/83caa5c8ccb05a4139c87babb1b37b73248db9da/src/main/java/cn/bluejoe/elfinder/controller/MultipleUploadItems.java#L40-L48
train
bluejoe2008/elfinder-2.x-servlet
src/main/java/cn/bluejoe/elfinder/util/FsItemFilterUtils.java
FsItemFilterUtils.createMimeFilter
public static FsItemFilter createMimeFilter(final String[] mimeFilters) { if (mimeFilters == null || mimeFilters.length == 0) return FILTER_ALL; return new FsItemFilter() { @Override public boolean accepts(FsItemEx item) { String mimeType = item.getMimeType().toUpperCase(); for ...
java
public static FsItemFilter createMimeFilter(final String[] mimeFilters) { if (mimeFilters == null || mimeFilters.length == 0) return FILTER_ALL; return new FsItemFilter() { @Override public boolean accepts(FsItemEx item) { String mimeType = item.getMimeType().toUpperCase(); for ...
[ "public", "static", "FsItemFilter", "createMimeFilter", "(", "final", "String", "[", "]", "mimeFilters", ")", "{", "if", "(", "mimeFilters", "==", "null", "||", "mimeFilters", ".", "length", "==", "0", ")", "return", "FILTER_ALL", ";", "return", "new", "FsIt...
returns a FsItemFilter according to given mimeFilters @param mimeFilters An array of MIME types, if <code>null</code> no filtering is done @return A filter that only accepts the supplied MIME types.
[ "returns", "a", "FsItemFilter", "according", "to", "given", "mimeFilters" ]
83caa5c8ccb05a4139c87babb1b37b73248db9da
https://github.com/bluejoe2008/elfinder-2.x-servlet/blob/83caa5c8ccb05a4139c87babb1b37b73248db9da/src/main/java/cn/bluejoe/elfinder/util/FsItemFilterUtils.java#L62-L83
train
bluejoe2008/elfinder-2.x-servlet
src/main/java/cn/bluejoe/elfinder/servlet/ConnectorServlet.java
ConnectorServlet.createCommandExecutorFactory
protected CommandExecutorFactory createCommandExecutorFactory( ServletConfig config) { DefaultCommandExecutorFactory defaultCommandExecutorFactory = new DefaultCommandExecutorFactory(); defaultCommandExecutorFactory .setClassNamePattern("cn.bluejoe.elfinder.controller.executors.%sCommandExecutor"); ...
java
protected CommandExecutorFactory createCommandExecutorFactory( ServletConfig config) { DefaultCommandExecutorFactory defaultCommandExecutorFactory = new DefaultCommandExecutorFactory(); defaultCommandExecutorFactory .setClassNamePattern("cn.bluejoe.elfinder.controller.executors.%sCommandExecutor"); ...
[ "protected", "CommandExecutorFactory", "createCommandExecutorFactory", "(", "ServletConfig", "config", ")", "{", "DefaultCommandExecutorFactory", "defaultCommandExecutorFactory", "=", "new", "DefaultCommandExecutorFactory", "(", ")", ";", "defaultCommandExecutorFactory", ".", "se...
create a command executor factory @param config @return
[ "create", "a", "command", "executor", "factory" ]
83caa5c8ccb05a4139c87babb1b37b73248db9da
https://github.com/bluejoe2008/elfinder-2.x-servlet/blob/83caa5c8ccb05a4139c87babb1b37b73248db9da/src/main/java/cn/bluejoe/elfinder/servlet/ConnectorServlet.java#L42-L51
train
bluejoe2008/elfinder-2.x-servlet
src/main/java/cn/bluejoe/elfinder/servlet/ConnectorServlet.java
ConnectorServlet.createConnectorController
protected ConnectorController createConnectorController(ServletConfig config) { ConnectorController connectorController = new ConnectorController(); connectorController .setCommandExecutorFactory(createCommandExecutorFactory(config)); connectorController.setFsServiceFactory(createServiceFactory(config...
java
protected ConnectorController createConnectorController(ServletConfig config) { ConnectorController connectorController = new ConnectorController(); connectorController .setCommandExecutorFactory(createCommandExecutorFactory(config)); connectorController.setFsServiceFactory(createServiceFactory(config...
[ "protected", "ConnectorController", "createConnectorController", "(", "ServletConfig", "config", ")", "{", "ConnectorController", "connectorController", "=", "new", "ConnectorController", "(", ")", ";", "connectorController", ".", "setCommandExecutorFactory", "(", "createComm...
create a connector controller @param config @return
[ "create", "a", "connector", "controller" ]
83caa5c8ccb05a4139c87babb1b37b73248db9da
https://github.com/bluejoe2008/elfinder-2.x-servlet/blob/83caa5c8ccb05a4139c87babb1b37b73248db9da/src/main/java/cn/bluejoe/elfinder/servlet/ConnectorServlet.java#L59-L68
train
bluejoe2008/elfinder-2.x-servlet
src/main/java/cn/bluejoe/elfinder/servlet/ConnectorServlet.java
ConnectorServlet.createServiceFactory
protected StaticFsServiceFactory createServiceFactory(ServletConfig config) { StaticFsServiceFactory staticFsServiceFactory = new StaticFsServiceFactory(); DefaultFsService fsService = createFsService(); staticFsServiceFactory.setFsService(fsService); return staticFsServiceFactory; }
java
protected StaticFsServiceFactory createServiceFactory(ServletConfig config) { StaticFsServiceFactory staticFsServiceFactory = new StaticFsServiceFactory(); DefaultFsService fsService = createFsService(); staticFsServiceFactory.setFsService(fsService); return staticFsServiceFactory; }
[ "protected", "StaticFsServiceFactory", "createServiceFactory", "(", "ServletConfig", "config", ")", "{", "StaticFsServiceFactory", "staticFsServiceFactory", "=", "new", "StaticFsServiceFactory", "(", ")", ";", "DefaultFsService", "fsService", "=", "createFsService", "(", ")...
create a service factory @param config @return
[ "create", "a", "service", "factory" ]
83caa5c8ccb05a4139c87babb1b37b73248db9da
https://github.com/bluejoe2008/elfinder-2.x-servlet/blob/83caa5c8ccb05a4139c87babb1b37b73248db9da/src/main/java/cn/bluejoe/elfinder/servlet/ConnectorServlet.java#L102-L109
train
bluejoe2008/elfinder-2.x-servlet
src/main/java/cn/bluejoe/elfinder/impl/DefaultFsService.java
DefaultFsService.findRecursively
private Collection<FsItemEx> findRecursively(FsItemFilter filter, FsItem root) { List<FsItemEx> results = new ArrayList<FsItemEx>(); FsVolume vol = root.getVolume(); for (FsItem child : vol.listChildren(root)) { if (vol.isFolder(child)) { results.addAll(findRecursively(filter, child)); } els...
java
private Collection<FsItemEx> findRecursively(FsItemFilter filter, FsItem root) { List<FsItemEx> results = new ArrayList<FsItemEx>(); FsVolume vol = root.getVolume(); for (FsItem child : vol.listChildren(root)) { if (vol.isFolder(child)) { results.addAll(findRecursively(filter, child)); } els...
[ "private", "Collection", "<", "FsItemEx", ">", "findRecursively", "(", "FsItemFilter", "filter", ",", "FsItem", "root", ")", "{", "List", "<", "FsItemEx", ">", "results", "=", "new", "ArrayList", "<", "FsItemEx", ">", "(", ")", ";", "FsVolume", "vol", "=",...
find files recursively in specific folder @param filter The filter to apply to select files. @param root The location in the hierarchy to search from. @return A collection of files that match the filter and have the root as a parent.
[ "find", "files", "recursively", "in", "specific", "folder" ]
83caa5c8ccb05a4139c87babb1b37b73248db9da
https://github.com/bluejoe2008/elfinder-2.x-servlet/blob/83caa5c8ccb05a4139c87babb1b37b73248db9da/src/main/java/cn/bluejoe/elfinder/impl/DefaultFsService.java#L66-L86
train
Cosium/spring-data-jpa-entity-graph
src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/support/QueryHintsUtils.java
QueryHintsUtils.removeEntityGraphs
static void removeEntityGraphs(Map<String, Object> queryHints) { if (queryHints == null) { return; } queryHints.remove(EntityGraph.EntityGraphType.FETCH.getKey()); queryHints.remove(EntityGraph.EntityGraphType.LOAD.getKey()); }
java
static void removeEntityGraphs(Map<String, Object> queryHints) { if (queryHints == null) { return; } queryHints.remove(EntityGraph.EntityGraphType.FETCH.getKey()); queryHints.remove(EntityGraph.EntityGraphType.LOAD.getKey()); }
[ "static", "void", "removeEntityGraphs", "(", "Map", "<", "String", ",", "Object", ">", "queryHints", ")", "{", "if", "(", "queryHints", "==", "null", ")", "{", "return", ";", "}", "queryHints", ".", "remove", "(", "EntityGraph", ".", "EntityGraphType", "."...
Remove all EntityGraph pre existing in the QueryHints @param queryHints
[ "Remove", "all", "EntityGraph", "pre", "existing", "in", "the", "QueryHints" ]
b5f2f6acfcbac535d3cac90bd88fefd1b8cd6a7f
https://github.com/Cosium/spring-data-jpa-entity-graph/blob/b5f2f6acfcbac535d3cac90bd88fefd1b8cd6a7f/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/support/QueryHintsUtils.java#L30-L36
train
Cosium/spring-data-jpa-entity-graph
src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/support/RepositoryEntityManagerEntityGraphInjector.java
RepositoryEntityManagerEntityGraphInjector.proxy
static EntityManager proxy(EntityManager entityManager) { ProxyFactory proxyFactory = new ProxyFactory(entityManager); proxyFactory.addAdvice(new RepositoryEntityManagerEntityGraphInjector()); return (EntityManager) proxyFactory.getProxy(); }
java
static EntityManager proxy(EntityManager entityManager) { ProxyFactory proxyFactory = new ProxyFactory(entityManager); proxyFactory.addAdvice(new RepositoryEntityManagerEntityGraphInjector()); return (EntityManager) proxyFactory.getProxy(); }
[ "static", "EntityManager", "proxy", "(", "EntityManager", "entityManager", ")", "{", "ProxyFactory", "proxyFactory", "=", "new", "ProxyFactory", "(", "entityManager", ")", ";", "proxyFactory", ".", "addAdvice", "(", "new", "RepositoryEntityManagerEntityGraphInjector", "...
Builds a proxy on entity manager which is aware of methods that can make use of query hints. @param entityManager The entity manager to proxy @return The proxied entity manager
[ "Builds", "a", "proxy", "on", "entity", "manager", "which", "is", "aware", "of", "methods", "that", "can", "make", "use", "of", "query", "hints", "." ]
b5f2f6acfcbac535d3cac90bd88fefd1b8cd6a7f
https://github.com/Cosium/spring-data-jpa-entity-graph/blob/b5f2f6acfcbac535d3cac90bd88fefd1b8cd6a7f/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/support/RepositoryEntityManagerEntityGraphInjector.java#L45-L49
train
Cosium/spring-data-jpa-entity-graph
src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/support/RepositoryEntityManagerEntityGraphInjector.java
RepositoryEntityManagerEntityGraphInjector.addEntityGraphToFindMethodQueryHints
private void addEntityGraphToFindMethodQueryHints( EntityGraphBean entityGraphCandidate, MethodInvocation invocation) { LOG.trace("Trying to push the EntityGraph candidate to the query hints find method"); Map<String, Object> queryProperties = null; int index = 0; for (Object argument : invocatio...
java
private void addEntityGraphToFindMethodQueryHints( EntityGraphBean entityGraphCandidate, MethodInvocation invocation) { LOG.trace("Trying to push the EntityGraph candidate to the query hints find method"); Map<String, Object> queryProperties = null; int index = 0; for (Object argument : invocatio...
[ "private", "void", "addEntityGraphToFindMethodQueryHints", "(", "EntityGraphBean", "entityGraphCandidate", ",", "MethodInvocation", "invocation", ")", "{", "LOG", ".", "trace", "(", "\"Trying to push the EntityGraph candidate to the query hints find method\"", ")", ";", "Map", ...
Push the current entity graph to the find method query hints. @param entityGraphCandidate The EntityGraph to set @param invocation The invocation of the find method
[ "Push", "the", "current", "entity", "graph", "to", "the", "find", "method", "query", "hints", "." ]
b5f2f6acfcbac535d3cac90bd88fefd1b8cd6a7f
https://github.com/Cosium/spring-data-jpa-entity-graph/blob/b5f2f6acfcbac535d3cac90bd88fefd1b8cd6a7f/src/main/java/com/cosium/spring/data/jpa/entity/graph/repository/support/RepositoryEntityManagerEntityGraphInjector.java#L94-L123
train
SeanRoy/lambda-maven-plugin
src/main/java/com/github/seanroy/plugins/DeleteLambdaMojo.java
DeleteLambdaMojo.execute
public void execute() throws MojoExecutionException { super.execute(); try { lambdaFunctions.forEach(context -> { try { deleteTriggers.andThen(deleteFunction).apply( context.withFunctionArn(lambdaClient.getFunction(new GetFuncti...
java
public void execute() throws MojoExecutionException { super.execute(); try { lambdaFunctions.forEach(context -> { try { deleteTriggers.andThen(deleteFunction).apply( context.withFunctionArn(lambdaClient.getFunction(new GetFuncti...
[ "public", "void", "execute", "(", ")", "throws", "MojoExecutionException", "{", "super", ".", "execute", "(", ")", ";", "try", "{", "lambdaFunctions", ".", "forEach", "(", "context", "->", "{", "try", "{", "deleteTriggers", ".", "andThen", "(", "deleteFuncti...
The entry point into the AWS lambda function.
[ "The", "entry", "point", "into", "the", "AWS", "lambda", "function", "." ]
7959db46f8ea9f100da6a31962de81fe57ac3015
https://github.com/SeanRoy/lambda-maven-plugin/blob/7959db46f8ea9f100da6a31962de81fe57ac3015/src/main/java/com/github/seanroy/plugins/DeleteLambdaMojo.java#L32-L47
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/QueryPersistor.java
QueryPersistor.storeAs
public void storeAs(String queryName) { QueryRecorder.queryCompleted(this.query); QueryMemento qm = this.createMemento(); IDBAccess dbAccess = ((IIntDomainAccess)this.domainAccess).getInternalDomainAccess().getDBAccess(); String qLabel = ((IIntDomainAccess)this.domainAccess).getInternalDomainAccess().getDomainL...
java
public void storeAs(String queryName) { QueryRecorder.queryCompleted(this.query); QueryMemento qm = this.createMemento(); IDBAccess dbAccess = ((IIntDomainAccess)this.domainAccess).getInternalDomainAccess().getDBAccess(); String qLabel = ((IIntDomainAccess)this.domainAccess).getInternalDomainAccess().getDomainL...
[ "public", "void", "storeAs", "(", "String", "queryName", ")", "{", "QueryRecorder", ".", "queryCompleted", "(", "this", ".", "query", ")", ";", "QueryMemento", "qm", "=", "this", ".", "createMemento", "(", ")", ";", "IDBAccess", "dbAccess", "=", "(", "(", ...
Store the query with the domain model under the given name. @param queryName
[ "Store", "the", "query", "with", "the", "domain", "model", "under", "the", "given", "name", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/QueryPersistor.java#L88-L110
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/QueryPersistor.java
QueryPersistor.augment
public QueryPersistor augment(DomainObjectMatch<?> domainObjectMatch, String as) { if (this.augmentations == null) this.augmentations = new HashMap<DomainObjectMatch<?>, String>(); this.augmentations.put(domainObjectMatch, as); return this; }
java
public QueryPersistor augment(DomainObjectMatch<?> domainObjectMatch, String as) { if (this.augmentations == null) this.augmentations = new HashMap<DomainObjectMatch<?>, String>(); this.augmentations.put(domainObjectMatch, as); return this; }
[ "public", "QueryPersistor", "augment", "(", "DomainObjectMatch", "<", "?", ">", "domainObjectMatch", ",", "String", "as", ")", "{", "if", "(", "this", ".", "augmentations", "==", "null", ")", "this", ".", "augmentations", "=", "new", "HashMap", "<", "DomainO...
Give a name to a DomainObjectMatch for better readability in a Java-DSL like string representation @param domainObjectMatch @param as @return
[ "Give", "a", "name", "to", "a", "DomainObjectMatch", "for", "better", "readability", "in", "a", "Java", "-", "DSL", "like", "string", "representation" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/QueryPersistor.java#L118-L123
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java
AbstractDomainQuery.createMatchFrom
@SuppressWarnings("unchecked") public <T> DomainObjectMatch<T> createMatchFrom(DomainObjectMatch<T> domainObjectMatch) { DomainObjectMatch<T> ret; FromPreviousQueryExpression pqe; DomainObjectMatch<?> match; DomainObjectMatch<?> delegate = APIAccess.getDelegate(domainObjectMatch); if (delegate != null) { // ...
java
@SuppressWarnings("unchecked") public <T> DomainObjectMatch<T> createMatchFrom(DomainObjectMatch<T> domainObjectMatch) { DomainObjectMatch<T> ret; FromPreviousQueryExpression pqe; DomainObjectMatch<?> match; DomainObjectMatch<?> delegate = APIAccess.getDelegate(domainObjectMatch); if (delegate != null) { // ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "DomainObjectMatch", "<", "T", ">", "createMatchFrom", "(", "DomainObjectMatch", "<", "T", ">", "domainObjectMatch", ")", "{", "DomainObjectMatch", "<", "T", ">", "ret", ";", "FromPre...
Create a match from a DomainObjectMatch specified in the context of another query @param domainObjectMatch a match specified in the context of another query @return a DomainObjectMatch
[ "Create", "a", "match", "from", "a", "DomainObjectMatch", "specified", "in", "the", "context", "of", "another", "query" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java#L92-L120
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java
AbstractDomainQuery.createMatchFor
@SuppressWarnings("unchecked") public <T> DomainObjectMatch<T> createMatchFor(T domainObject) { DomainObjectMatch<T> ret; if (domainObject.getClass().equals(DomainObject.class)) { // generic model List<DomainObject> source = new ArrayList<DomainObject>(); source.add((DomainObject) domainObject); String ty...
java
@SuppressWarnings("unchecked") public <T> DomainObjectMatch<T> createMatchFor(T domainObject) { DomainObjectMatch<T> ret; if (domainObject.getClass().equals(DomainObject.class)) { // generic model List<DomainObject> source = new ArrayList<DomainObject>(); source.add((DomainObject) domainObject); String ty...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "DomainObjectMatch", "<", "T", ">", "createMatchFor", "(", "T", "domainObject", ")", "{", "DomainObjectMatch", "<", "T", ">", "ret", ";", "if", "(", "domainObject", ".", "getClass",...
Create a match for a domain object which was retrieved by another query @param domainObject a domain object which was retrieved by another query @return a DomainObjectMatch
[ "Create", "a", "match", "for", "a", "domain", "object", "which", "was", "retrieved", "by", "another", "query" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java#L127-L145
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java
AbstractDomainQuery.BR_OPEN
public TerminalResult BR_OPEN() { ConcatenateExpression ce = new ConcatenateExpression(Concatenator.BR_OPEN); this.astObjectsContainer.addAstObject(ce); TerminalResult ret = APIAccess.createTerminalResult(ce); QueryRecorder.recordInvocation(this, "BR_OPEN", ret); return ret; }
java
public TerminalResult BR_OPEN() { ConcatenateExpression ce = new ConcatenateExpression(Concatenator.BR_OPEN); this.astObjectsContainer.addAstObject(ce); TerminalResult ret = APIAccess.createTerminalResult(ce); QueryRecorder.recordInvocation(this, "BR_OPEN", ret); return ret; }
[ "public", "TerminalResult", "BR_OPEN", "(", ")", "{", "ConcatenateExpression", "ce", "=", "new", "ConcatenateExpression", "(", "Concatenator", ".", "BR_OPEN", ")", ";", "this", ".", "astObjectsContainer", ".", "addAstObject", "(", "ce", ")", ";", "TerminalResult",...
Open a block, encapsulating predicate expressions
[ "Open", "a", "block", "encapsulating", "predicate", "expressions" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java#L244-L250
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java
AbstractDomainQuery.ORDER
public Order ORDER(DomainObjectMatch<?> toOrder) { DomainObjectMatch<?> delegate = APIAccess.getDelegate(toOrder); DomainObjectMatch<?> match = delegate != null ? delegate : toOrder; OrderExpression oe = this.queryExecutor.getOrderFor(match); Order ret = APIAccess.createOrder(oe); QueryRecorder.recordInvocati...
java
public Order ORDER(DomainObjectMatch<?> toOrder) { DomainObjectMatch<?> delegate = APIAccess.getDelegate(toOrder); DomainObjectMatch<?> match = delegate != null ? delegate : toOrder; OrderExpression oe = this.queryExecutor.getOrderFor(match); Order ret = APIAccess.createOrder(oe); QueryRecorder.recordInvocati...
[ "public", "Order", "ORDER", "(", "DomainObjectMatch", "<", "?", ">", "toOrder", ")", "{", "DomainObjectMatch", "<", "?", ">", "delegate", "=", "APIAccess", ".", "getDelegate", "(", "toOrder", ")", ";", "DomainObjectMatch", "<", "?", ">", "match", "=", "del...
Define an order on a set of domain objects which are specified by a DomainObjectMatch in the context of the domain query. @param toOrder the DomainObjectMatch specifying the set of domain objects which should be ordered @return
[ "Define", "an", "order", "on", "a", "set", "of", "domain", "objects", "which", "are", "specified", "by", "a", "DomainObjectMatch", "in", "the", "context", "of", "the", "domain", "query", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java#L270-L277
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java
AbstractDomainQuery.TRAVERSE_FROM
public Traverse TRAVERSE_FROM(DomainObjectMatch<?> start) { DomainObjectMatch<?> delegate = APIAccess.getDelegate(start); DomainObjectMatch<?> match = delegate != null ? delegate : start; TraversalExpression te = new TraversalExpression(match, this.queryExecutor); this.queryExecutor.addAstObject(te); Traverse...
java
public Traverse TRAVERSE_FROM(DomainObjectMatch<?> start) { DomainObjectMatch<?> delegate = APIAccess.getDelegate(start); DomainObjectMatch<?> match = delegate != null ? delegate : start; TraversalExpression te = new TraversalExpression(match, this.queryExecutor); this.queryExecutor.addAstObject(te); Traverse...
[ "public", "Traverse", "TRAVERSE_FROM", "(", "DomainObjectMatch", "<", "?", ">", "start", ")", "{", "DomainObjectMatch", "<", "?", ">", "delegate", "=", "APIAccess", ".", "getDelegate", "(", "start", ")", ";", "DomainObjectMatch", "<", "?", ">", "match", "=",...
Start traversing the graph of domain objects. @param start a DomainObjectMatch form where to start the traversal. @return
[ "Start", "traversing", "the", "graph", "of", "domain", "objects", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java#L284-L292
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java
AbstractDomainQuery.SELECT_FROM
public <T> Select<T> SELECT_FROM(DomainObjectMatch<T> start) { DomainObjectMatch<?> delegate = APIAccess.getDelegate(start); DomainObjectMatch<?> match = delegate != null ? delegate : start; SelectExpression<T> se = new SelectExpression<T>(APIAccess.getDomainObjectType(start), match, this.getIntAccess()); t...
java
public <T> Select<T> SELECT_FROM(DomainObjectMatch<T> start) { DomainObjectMatch<?> delegate = APIAccess.getDelegate(start); DomainObjectMatch<?> match = delegate != null ? delegate : start; SelectExpression<T> se = new SelectExpression<T>(APIAccess.getDomainObjectType(start), match, this.getIntAccess()); t...
[ "public", "<", "T", ">", "Select", "<", "T", ">", "SELECT_FROM", "(", "DomainObjectMatch", "<", "T", ">", "start", ")", "{", "DomainObjectMatch", "<", "?", ">", "delegate", "=", "APIAccess", ".", "getDelegate", "(", "start", ")", ";", "DomainObjectMatch", ...
Select domain objects out of a set of other domain objects. @param start with a DomainObjectMatch representing the initial set. @return
[ "Select", "domain", "objects", "out", "of", "a", "set", "of", "other", "domain", "objects", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java#L299-L309
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java
AbstractDomainQuery.COLLECT
public Collect COLLECT(JcProperty attribute) { CollectExpression ce = new CollectExpression(attribute, this.getIntAccess()); Collect coll = APIAccess.createCollect(ce); this.queryExecutor.addAstObject(ce); QueryRecorder.recordInvocation(this, "COLLECT", coll, QueryRecorder.placeHolder(attribute)); return coll...
java
public Collect COLLECT(JcProperty attribute) { CollectExpression ce = new CollectExpression(attribute, this.getIntAccess()); Collect coll = APIAccess.createCollect(ce); this.queryExecutor.addAstObject(ce); QueryRecorder.recordInvocation(this, "COLLECT", coll, QueryRecorder.placeHolder(attribute)); return coll...
[ "public", "Collect", "COLLECT", "(", "JcProperty", "attribute", ")", "{", "CollectExpression", "ce", "=", "new", "CollectExpression", "(", "attribute", ",", "this", ".", "getIntAccess", "(", ")", ")", ";", "Collect", "coll", "=", "APIAccess", ".", "createColle...
Collect the specified attribute from all objects in a DomainObjectMatch @param attribute @return
[ "Collect", "the", "specified", "attribute", "from", "all", "objects", "in", "a", "DomainObjectMatch" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java#L334-L340
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java
AbstractDomainQuery.INTERSECTION
@SuppressWarnings("unchecked") public <T> DomainObjectMatch<T> INTERSECTION(DomainObjectMatch<T>... set) { DomainObjectMatch<T> ret = this.union_Intersection(false, set); Object[] placeHolders = new Object[set.length]; DomainObjectMatch<?> delegate; DomainObjectMatch<?> match; for (int i = 0; i < set.length;...
java
@SuppressWarnings("unchecked") public <T> DomainObjectMatch<T> INTERSECTION(DomainObjectMatch<T>... set) { DomainObjectMatch<T> ret = this.union_Intersection(false, set); Object[] placeHolders = new Object[set.length]; DomainObjectMatch<?> delegate; DomainObjectMatch<?> match; for (int i = 0; i < set.length;...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "DomainObjectMatch", "<", "T", ">", "INTERSECTION", "(", "DomainObjectMatch", "<", "T", ">", "...", "set", ")", "{", "DomainObjectMatch", "<", "T", ">", "ret", "=", "this", ".", ...
Build the intersection of the specified sets @param set @return
[ "Build", "the", "intersection", "of", "the", "specified", "sets" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java#L369-L384
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java
AbstractDomainQuery.execute
public DomainQueryResult execute() { DomainQueryResult ret = new DomainQueryResult(this); Object so = this.queryExecutor.getMappingInfo().getInternalDomainAccess().getSyncObject(); if (so != null) { synchronized (so) { this.queryExecutor.execute(); } } else this.queryExecutor.execute(); return re...
java
public DomainQueryResult execute() { DomainQueryResult ret = new DomainQueryResult(this); Object so = this.queryExecutor.getMappingInfo().getInternalDomainAccess().getSyncObject(); if (so != null) { synchronized (so) { this.queryExecutor.execute(); } } else this.queryExecutor.execute(); return re...
[ "public", "DomainQueryResult", "execute", "(", ")", "{", "DomainQueryResult", "ret", "=", "new", "DomainQueryResult", "(", "this", ")", ";", "Object", "so", "=", "this", ".", "queryExecutor", ".", "getMappingInfo", "(", ")", ".", "getInternalDomainAccess", "(", ...
Execute the domain query @return a DomainQueryResult
[ "Execute", "the", "domain", "query" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java#L390-L400
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java
AbstractDomainQuery.executeCount
public CountQueryResult executeCount() { CountQueryResult ret = new CountQueryResult(this); Object so = this.queryExecutor.getMappingInfo().getInternalDomainAccess().getSyncObject(); if (so != null) { synchronized (so) { this.queryExecutor.executeCount(); } } else this.queryExecutor.executeCount();...
java
public CountQueryResult executeCount() { CountQueryResult ret = new CountQueryResult(this); Object so = this.queryExecutor.getMappingInfo().getInternalDomainAccess().getSyncObject(); if (so != null) { synchronized (so) { this.queryExecutor.executeCount(); } } else this.queryExecutor.executeCount();...
[ "public", "CountQueryResult", "executeCount", "(", ")", "{", "CountQueryResult", "ret", "=", "new", "CountQueryResult", "(", "this", ")", ";", "Object", "so", "=", "this", ".", "queryExecutor", ".", "getMappingInfo", "(", ")", ".", "getInternalDomainAccess", "("...
Retrieve the count for every DomainObjectMatch of the query in order to support pagination @return a CountQueryResult
[ "Retrieve", "the", "count", "for", "every", "DomainObjectMatch", "of", "the", "query", "in", "order", "to", "support", "pagination" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/AbstractDomainQuery.java#L407-L417
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/internal/JSONConverter.java
JSONConverter.toJSON
public String toJSON(RecordedQuery query) { StringWriter sw = new StringWriter(); JsonGenerator generator; if (this.prettyFormat != Format.NONE) { JsonGeneratorFactory gf = JSONWriter.getPrettyGeneratorFactory(); generator = gf.createGenerator(sw); } else generator = Json.createGenerator(sw); gene...
java
public String toJSON(RecordedQuery query) { StringWriter sw = new StringWriter(); JsonGenerator generator; if (this.prettyFormat != Format.NONE) { JsonGeneratorFactory gf = JSONWriter.getPrettyGeneratorFactory(); generator = gf.createGenerator(sw); } else generator = Json.createGenerator(sw); gene...
[ "public", "String", "toJSON", "(", "RecordedQuery", "query", ")", "{", "StringWriter", "sw", "=", "new", "StringWriter", "(", ")", ";", "JsonGenerator", "generator", ";", "if", "(", "this", ".", "prettyFormat", "!=", "Format", ".", "NONE", ")", "{", "JsonG...
Answer a JSON representation of a recorded query @param query @return
[ "Answer", "a", "JSON", "representation", "of", "a", "recorded", "query" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/internal/JSONConverter.java#L87-L102
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/internal/JSONConverter.java
JSONConverter.fromJSON
public RecordedQuery fromJSON(String json) { RecordedQuery ret = new RecordedQuery(false); StringReader sr = new StringReader(json); JsonReader reader = Json.createReader(sr); JsonObject jsonResult = reader.readObject(); ret.setGeneric(jsonResult.getBoolean(GENERIC)); JsonArray augmentations = jsonResult...
java
public RecordedQuery fromJSON(String json) { RecordedQuery ret = new RecordedQuery(false); StringReader sr = new StringReader(json); JsonReader reader = Json.createReader(sr); JsonObject jsonResult = reader.readObject(); ret.setGeneric(jsonResult.getBoolean(GENERIC)); JsonArray augmentations = jsonResult...
[ "public", "RecordedQuery", "fromJSON", "(", "String", "json", ")", "{", "RecordedQuery", "ret", "=", "new", "RecordedQuery", "(", "false", ")", ";", "StringReader", "sr", "=", "new", "StringReader", "(", "json", ")", ";", "JsonReader", "reader", "=", "Json",...
Build a recorded query from it's JSON representation @param json @return
[ "Build", "a", "recorded", "query", "from", "it", "s", "JSON", "representation" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/internal/JSONConverter.java#L109-L134
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/graph/GrPropertyContainer.java
GrPropertyContainer.getProperty
public GrProperty getProperty(String propertyName) { for (GrProperty prop : getProperties()) { if (prop.getName().equals(propertyName)) return prop; } return null; }
java
public GrProperty getProperty(String propertyName) { for (GrProperty prop : getProperties()) { if (prop.getName().equals(propertyName)) return prop; } return null; }
[ "public", "GrProperty", "getProperty", "(", "String", "propertyName", ")", "{", "for", "(", "GrProperty", "prop", ":", "getProperties", "(", ")", ")", "{", "if", "(", "prop", ".", "getName", "(", ")", ".", "equals", "(", "propertyName", ")", ")", "return...
return a property @param propertyName @return a GrProperty
[ "return", "a", "property" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/graph/GrPropertyContainer.java#L59-L65
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/graph/GrPropertyContainer.java
GrPropertyContainer.addProperty
public GrProperty addProperty(String name, Object value) { GrProperty prop = GrAccess.createProperty(name); prop.setValue(value); return getPropertiesContainer().addElement(prop); }
java
public GrProperty addProperty(String name, Object value) { GrProperty prop = GrAccess.createProperty(name); prop.setValue(value); return getPropertiesContainer().addElement(prop); }
[ "public", "GrProperty", "addProperty", "(", "String", "name", ",", "Object", "value", ")", "{", "GrProperty", "prop", "=", "GrAccess", ".", "createProperty", "(", "name", ")", ";", "prop", ".", "setValue", "(", "value", ")", ";", "return", "getPropertiesCont...
add a new property, throw a RuntimeException if the property already exists @param name of the property @param value of the property @return the added property
[ "add", "a", "new", "property", "throw", "a", "RuntimeException", "if", "the", "property", "already", "exists" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/graph/GrPropertyContainer.java#L73-L77
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/CountQueryResult.java
CountQueryResult.countOf
public long countOf(DomainObjectMatch<?> match) { long ret; Object so = InternalAccess.getQueryExecutor(this.domainQuery).getMappingInfo() .getInternalDomainAccess().getSyncObject(); if (so != null) { synchronized (so) { ret = intCountOf(match); } } else ret = intCountOf(match); return ret; ...
java
public long countOf(DomainObjectMatch<?> match) { long ret; Object so = InternalAccess.getQueryExecutor(this.domainQuery).getMappingInfo() .getInternalDomainAccess().getSyncObject(); if (so != null) { synchronized (so) { ret = intCountOf(match); } } else ret = intCountOf(match); return ret; ...
[ "public", "long", "countOf", "(", "DomainObjectMatch", "<", "?", ">", "match", ")", "{", "long", "ret", ";", "Object", "so", "=", "InternalAccess", ".", "getQueryExecutor", "(", "this", ".", "domainQuery", ")", ".", "getMappingInfo", "(", ")", ".", "getInt...
Answer the number of domain objects @param match @return the number of domain objects
[ "Answer", "the", "number", "of", "domain", "objects" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/CountQueryResult.java#L37-L48
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/util/Util.java
Util.writePretty
public static String writePretty(JsonObject jsonObject) { JsonWriterFactory factory = createPrettyWriterFactory(); StringWriter sw = new StringWriter(); JsonWriter writer = factory.createWriter(sw); writer.writeObject(jsonObject); String ret = sw.toString(); writer.close(); return ret; }
java
public static String writePretty(JsonObject jsonObject) { JsonWriterFactory factory = createPrettyWriterFactory(); StringWriter sw = new StringWriter(); JsonWriter writer = factory.createWriter(sw); writer.writeObject(jsonObject); String ret = sw.toString(); writer.close(); return ret; }
[ "public", "static", "String", "writePretty", "(", "JsonObject", "jsonObject", ")", "{", "JsonWriterFactory", "factory", "=", "createPrettyWriterFactory", "(", ")", ";", "StringWriter", "sw", "=", "new", "StringWriter", "(", ")", ";", "JsonWriter", "writer", "=", ...
write a JsonObject formatted in a pretty way into a String @param jsonObject @return a String containing the JSON
[ "write", "a", "JsonObject", "formatted", "in", "a", "pretty", "way", "into", "a", "String" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/util/Util.java#L49-L57
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/util/Util.java
Util.printQuery
public static void printQuery(JcQuery query, QueryToObserve toObserve, Format format) { boolean titlePrinted = false; ContentToObserve tob = QueriesPrintObserver.contentToObserve(toObserve); if (tob == ContentToObserve.CYPHER || tob == ContentToObserve.CYPHER_JSON) { titlePrinted = true; QueriesPrintObserve...
java
public static void printQuery(JcQuery query, QueryToObserve toObserve, Format format) { boolean titlePrinted = false; ContentToObserve tob = QueriesPrintObserver.contentToObserve(toObserve); if (tob == ContentToObserve.CYPHER || tob == ContentToObserve.CYPHER_JSON) { titlePrinted = true; QueriesPrintObserve...
[ "public", "static", "void", "printQuery", "(", "JcQuery", "query", ",", "QueryToObserve", "toObserve", ",", "Format", "format", ")", "{", "boolean", "titlePrinted", "=", "false", ";", "ContentToObserve", "tob", "=", "QueriesPrintObserver", ".", "contentToObserve", ...
map to CYPHER statements and map to JSON, print the mapping results to System.out @param queries @param toObserve @param format
[ "map", "to", "CYPHER", "statements", "and", "map", "to", "JSON", "print", "the", "mapping", "results", "to", "System", ".", "out" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/util/Util.java#L72-L95
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/util/Util.java
Util.printQueries
public static void printQueries(List<JcQuery> queries, QueryToObserve toObserve, Format format) { boolean titlePrinted = false; ContentToObserve tob = QueriesPrintObserver.contentToObserve(toObserve); if (tob == ContentToObserve.CYPHER || tob == ContentToObserve.CYPHER_JSON) { titlePrinted = true; QueriesPr...
java
public static void printQueries(List<JcQuery> queries, QueryToObserve toObserve, Format format) { boolean titlePrinted = false; ContentToObserve tob = QueriesPrintObserver.contentToObserve(toObserve); if (tob == ContentToObserve.CYPHER || tob == ContentToObserve.CYPHER_JSON) { titlePrinted = true; QueriesPr...
[ "public", "static", "void", "printQueries", "(", "List", "<", "JcQuery", ">", "queries", ",", "QueryToObserve", "toObserve", ",", "Format", "format", ")", "{", "boolean", "titlePrinted", "=", "false", ";", "ContentToObserve", "tob", "=", "QueriesPrintObserver", ...
map to CYPHER statements and map to JSON, print the mapping results to the output streams configured in QueriesPrintObserver @param queries @param toObserve @param format
[ "map", "to", "CYPHER", "statements", "and", "map", "to", "JSON", "print", "the", "mapping", "results", "to", "the", "output", "streams", "configured", "in", "QueriesPrintObserver" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/util/Util.java#L104-L129
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/DomainInformation.java
DomainInformation.availableDomains
public static List<String> availableDomains(IDBAccess dbAccess) { List<GrNode> resultList = loadAllDomainInfoNodes(dbAccess); List<String> domains = new ArrayList<String>(); for (GrNode rNode : resultList) { domains.add(rNode.getProperty(DomainInfoNameProperty).getValue().toString()); } return domain...
java
public static List<String> availableDomains(IDBAccess dbAccess) { List<GrNode> resultList = loadAllDomainInfoNodes(dbAccess); List<String> domains = new ArrayList<String>(); for (GrNode rNode : resultList) { domains.add(rNode.getProperty(DomainInfoNameProperty).getValue().toString()); } return domain...
[ "public", "static", "List", "<", "String", ">", "availableDomains", "(", "IDBAccess", "dbAccess", ")", "{", "List", "<", "GrNode", ">", "resultList", "=", "loadAllDomainInfoNodes", "(", "dbAccess", ")", ";", "List", "<", "String", ">", "domains", "=", "new",...
answer the names of available domains. @param dbAccess @return a list of names of available domains in the graph database accessed through dbAccess.
[ "answer", "the", "names", "of", "available", "domains", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/DomainInformation.java#L63-L70
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/DomainInformation.java
DomainInformation.getDomainObjectTypes
public List<DomainObjectType> getDomainObjectTypes() { List<DomainObjectType> resultList = new ArrayList<DomainObjectType>(); GrNode infoNode = loadDomainInfoNode(); GrProperty prop = infoNode.getProperty(DomainInfoLabel2ClassProperty); if (prop != null) { @SuppressWarnings("unchecked") List<String>...
java
public List<DomainObjectType> getDomainObjectTypes() { List<DomainObjectType> resultList = new ArrayList<DomainObjectType>(); GrNode infoNode = loadDomainInfoNode(); GrProperty prop = infoNode.getProperty(DomainInfoLabel2ClassProperty); if (prop != null) { @SuppressWarnings("unchecked") List<String>...
[ "public", "List", "<", "DomainObjectType", ">", "getDomainObjectTypes", "(", ")", "{", "List", "<", "DomainObjectType", ">", "resultList", "=", "new", "ArrayList", "<", "DomainObjectType", ">", "(", ")", ";", "GrNode", "infoNode", "=", "loadDomainInfoNode", "(",...
answer a list of DomainObjectTypes stored in the domain graph @return a list of DomainObjectTypes
[ "answer", "a", "list", "of", "DomainObjectTypes", "stored", "in", "the", "domain", "graph" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/DomainInformation.java#L87-L100
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/DomainInformation.java
DomainInformation.getDomainObjectTypeNames
public List<String> getDomainObjectTypeNames() { List<DomainObjectType> types = getDomainObjectTypes(); List<String> typeNames = new ArrayList<String>(types.size()); for (DomainObjectType typ : types) { typeNames.add(typ.getTypeName()); } return typeNames; }
java
public List<String> getDomainObjectTypeNames() { List<DomainObjectType> types = getDomainObjectTypes(); List<String> typeNames = new ArrayList<String>(types.size()); for (DomainObjectType typ : types) { typeNames.add(typ.getTypeName()); } return typeNames; }
[ "public", "List", "<", "String", ">", "getDomainObjectTypeNames", "(", ")", "{", "List", "<", "DomainObjectType", ">", "types", "=", "getDomainObjectTypes", "(", ")", ";", "List", "<", "String", ">", "typeNames", "=", "new", "ArrayList", "<", "String", ">", ...
answer a list of names of DomainObjectTypes stored in the domain graph @return a list of DomainObjectTypes
[ "answer", "a", "list", "of", "names", "of", "DomainObjectTypes", "stored", "in", "the", "domain", "graph" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/DomainInformation.java#L106-L113
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/graph/PersistableItemsContainer.java
PersistableItemsContainer.addElement
public T addElement(T element) { // make sure that elements are initialized getElements(); if (!containsElement(this.elements, element)) { this.elements.add(element); element.addChangeListener(this.elementChangeListener); element.notifyState(); return element; } throw new RuntimeException...
java
public T addElement(T element) { // make sure that elements are initialized getElements(); if (!containsElement(this.elements, element)) { this.elements.add(element); element.addChangeListener(this.elementChangeListener); element.notifyState(); return element; } throw new RuntimeException...
[ "public", "T", "addElement", "(", "T", "element", ")", "{", "// make sure that elements are initialized\r", "getElements", "(", ")", ";", "if", "(", "!", "containsElement", "(", "this", ".", "elements", ",", "element", ")", ")", "{", "this", ".", "elements", ...
add a new element, throw a RuntimeException if the element already exists @param element @return the added element
[ "add", "a", "new", "element", "throw", "a", "RuntimeException", "if", "the", "element", "already", "exists" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/graph/PersistableItemsContainer.java#L105-L115
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/graph/PersistableItemsContainer.java
PersistableItemsContainer.checkForElementStates
private SyncState checkForElementStates(SyncState... states) { if (this.elements != null) { for (T elem : this.elements) { for (SyncState state : states) { if (elem.getSyncState() != state) return elem.getSyncState(); } } } return null; }
java
private SyncState checkForElementStates(SyncState... states) { if (this.elements != null) { for (T elem : this.elements) { for (SyncState state : states) { if (elem.getSyncState() != state) return elem.getSyncState(); } } } return null; }
[ "private", "SyncState", "checkForElementStates", "(", "SyncState", "...", "states", ")", "{", "if", "(", "this", ".", "elements", "!=", "null", ")", "{", "for", "(", "T", "elem", ":", "this", ".", "elements", ")", "{", "for", "(", "SyncState", "state", ...
check all elements, if their state is one of the given states @param states to check against @return null, if all elements have a state out of the requested states, else return the first element state that differs
[ "check", "all", "elements", "if", "their", "state", "is", "one", "of", "the", "given", "states" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/graph/PersistableItemsContainer.java#L130-L140
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/genericmodel/DomainObject.java
DomainObject.addListFieldValue
public void addListFieldValue(String fieldName, Object value) { Object val = value; if (value instanceof DomainObject) val = ((DomainObject)value).getRawObject(); Object lst = getFieldValue(fieldName, true); // internal DOField fld = getDomainObjectType().getFieldByName(fieldName); String ctn = f...
java
public void addListFieldValue(String fieldName, Object value) { Object val = value; if (value instanceof DomainObject) val = ((DomainObject)value).getRawObject(); Object lst = getFieldValue(fieldName, true); // internal DOField fld = getDomainObjectType().getFieldByName(fieldName); String ctn = f...
[ "public", "void", "addListFieldValue", "(", "String", "fieldName", ",", "Object", "value", ")", "{", "Object", "val", "=", "value", ";", "if", "(", "value", "instanceof", "DomainObject", ")", "val", "=", "(", "(", "DomainObject", ")", "value", ")", ".", ...
Add a value to a list or array field @param fieldName @param value
[ "Add", "a", "value", "to", "a", "list", "or", "array", "field" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/genericmodel/DomainObject.java#L76-L111
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/genericmodel/DomainObject.java
DomainObject.getListFieldValue
public Object getListFieldValue(String fieldName, int index) { Object ret = null; Object val = getFieldValue(fieldName, true); // internal if (val instanceof List<?>) { List<?> list = (List<?>)val; Object cval = list.get(index); DomainObject gdo = getForRawObject(cval); if (gdo != null) re...
java
public Object getListFieldValue(String fieldName, int index) { Object ret = null; Object val = getFieldValue(fieldName, true); // internal if (val instanceof List<?>) { List<?> list = (List<?>)val; Object cval = list.get(index); DomainObject gdo = getForRawObject(cval); if (gdo != null) re...
[ "public", "Object", "getListFieldValue", "(", "String", "fieldName", ",", "int", "index", ")", "{", "Object", "ret", "=", "null", ";", "Object", "val", "=", "getFieldValue", "(", "fieldName", ",", "true", ")", ";", "// internal\r", "if", "(", "val", "insta...
if the field is a list or array, answer the value at the given index. @param fieldName @param index @return
[ "if", "the", "field", "is", "a", "list", "or", "array", "answer", "the", "value", "at", "the", "given", "index", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/genericmodel/DomainObject.java#L190-L215
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/genericmodel/DomainObject.java
DomainObject.getIndexOfValue
public int getIndexOfValue(String fieldName, Object value) { int ret = -1; Object val = value; if (value instanceof DomainObject) val = ((DomainObject)value).getRawObject(); Object lst = getFieldValue(fieldName, true); // internal if (lst instanceof List<?>) { List<?> list = (List<?>)lst; for...
java
public int getIndexOfValue(String fieldName, Object value) { int ret = -1; Object val = value; if (value instanceof DomainObject) val = ((DomainObject)value).getRawObject(); Object lst = getFieldValue(fieldName, true); // internal if (lst instanceof List<?>) { List<?> list = (List<?>)lst; for...
[ "public", "int", "getIndexOfValue", "(", "String", "fieldName", ",", "Object", "value", ")", "{", "int", "ret", "=", "-", "1", ";", "Object", "val", "=", "value", ";", "if", "(", "value", "instanceof", "DomainObject", ")", "val", "=", "(", "(", "Domain...
Returns the index of the first occurrence of the specified value in the list field, or -1 if the list field does not contain the value. @param fieldName @param value @return
[ "Returns", "the", "index", "of", "the", "first", "occurrence", "of", "the", "specified", "value", "in", "the", "list", "field", "or", "-", "1", "if", "the", "list", "field", "does", "not", "contain", "the", "value", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/genericmodel/DomainObject.java#L224-L255
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/genericmodel/DomainObject.java
DomainObject.clearListField
public void clearListField(String fieldName) { Object val = getFieldValue(fieldName, true); // internal if (val instanceof List<?>) ((List<?>)val).clear(); else if (val != null && val.getClass().isArray()) { DOField fld = getDomainObjectType().getFieldByName(fieldName); String ctn = fld.getComponen...
java
public void clearListField(String fieldName) { Object val = getFieldValue(fieldName, true); // internal if (val instanceof List<?>) ((List<?>)val).clear(); else if (val != null && val.getClass().isArray()) { DOField fld = getDomainObjectType().getFieldByName(fieldName); String ctn = fld.getComponen...
[ "public", "void", "clearListField", "(", "String", "fieldName", ")", "{", "Object", "val", "=", "getFieldValue", "(", "fieldName", ",", "true", ")", ";", "// internal\r", "if", "(", "val", "instanceof", "List", "<", "?", ">", ")", "(", "(", "List", "<", ...
Removes all of the elements from the list field. @param fieldName
[ "Removes", "all", "of", "the", "elements", "from", "the", "list", "field", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/genericmodel/DomainObject.java#L261-L281
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/genericmodel/DomainObject.java
DomainObject.getListFieldLength
public int getListFieldLength(String fieldName) { int ret = -1; Object val = getFieldValue(fieldName, true); // internal if (val instanceof List<?>) ret = ((List<?>)val).size(); else if (val != null && val.getClass().isArray()) { ret = Array.getLength(val); } else { if (!getDomainObjectType()...
java
public int getListFieldLength(String fieldName) { int ret = -1; Object val = getFieldValue(fieldName, true); // internal if (val instanceof List<?>) ret = ((List<?>)val).size(); else if (val != null && val.getClass().isArray()) { ret = Array.getLength(val); } else { if (!getDomainObjectType()...
[ "public", "int", "getListFieldLength", "(", "String", "fieldName", ")", "{", "int", "ret", "=", "-", "1", ";", "Object", "val", "=", "getFieldValue", "(", "fieldName", ",", "true", ")", ";", "// internal\r", "if", "(", "val", "instanceof", "List", "<", "...
Answer the length of a list field @param fieldName @return
[ "Answer", "the", "length", "of", "a", "list", "field" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/genericmodel/DomainObject.java#L325-L339
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/api/Select.java
Select.ELEMENTS
@SuppressWarnings("unchecked") public DomainObjectMatch<T> ELEMENTS(TerminalResult... where) { DomainObjectMatch<T> ret; // all where expressions have already been added to the astObjects list // of the SelectExpression SelectExpression<T> se = this.getSelectExpression(); // create match for the true typ...
java
@SuppressWarnings("unchecked") public DomainObjectMatch<T> ELEMENTS(TerminalResult... where) { DomainObjectMatch<T> ret; // all where expressions have already been added to the astObjects list // of the SelectExpression SelectExpression<T> se = this.getSelectExpression(); // create match for the true typ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "DomainObjectMatch", "<", "T", ">", "ELEMENTS", "(", "TerminalResult", "...", "where", ")", "{", "DomainObjectMatch", "<", "T", ">", "ret", ";", "// all where expressions have already been added to the astObj...
Specify one or more predicate expressions to constrain the set of domain objects @param where one or more predicate expressions
[ "Specify", "one", "or", "more", "predicate", "expressions", "to", "constrain", "the", "set", "of", "domain", "objects" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/api/Select.java#L48-L99
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/query/result/util/ResultHandler.java
ResultHandler.checkLockingError
private JcError checkLockingError(List<JcQueryResult> results, boolean hasCreateQuery, List<ElemId2Query> elemIds2Query) { JcError error = null; if (this.lockingStrategy == Locking.OPTIMISTIC) { JcNumber lockV = new JcNumber("lockV"); JcNumber nSum = new JcNumber("sum"); int to = hasCreateQuery ? results.s...
java
private JcError checkLockingError(List<JcQueryResult> results, boolean hasCreateQuery, List<ElemId2Query> elemIds2Query) { JcError error = null; if (this.lockingStrategy == Locking.OPTIMISTIC) { JcNumber lockV = new JcNumber("lockV"); JcNumber nSum = new JcNumber("sum"); int to = hasCreateQuery ? results.s...
[ "private", "JcError", "checkLockingError", "(", "List", "<", "JcQueryResult", ">", "results", ",", "boolean", "hasCreateQuery", ",", "List", "<", "ElemId2Query", ">", "elemIds2Query", ")", "{", "JcError", "error", "=", "null", ";", "if", "(", "this", ".", "l...
in case of error return the element's id, or if not available return -2 in case of change or -3 in case of delete, in case of ok return -1 @param results @param hasCreateQuery @param elemIds2Query @return
[ "in", "case", "of", "error", "return", "the", "element", "s", "id", "or", "if", "not", "available", "return", "-", "2", "in", "case", "of", "change", "or", "-", "3", "in", "case", "of", "delete", "in", "case", "of", "ok", "return", "-", "1" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/query/result/util/ResultHandler.java#L609-L648
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/internal/RecordedQuery.java
RecordedQuery.getCreateParameter
Parameter getCreateParameter(String name) { if (this.parameters == null) this.parameters = new HashMap<String, Parameter>(); Parameter param = this.parameters.get(name); if (param == null) { param = new Parameter(name); this.parameters.put(name, param); } return param; }
java
Parameter getCreateParameter(String name) { if (this.parameters == null) this.parameters = new HashMap<String, Parameter>(); Parameter param = this.parameters.get(name); if (param == null) { param = new Parameter(name); this.parameters.put(name, param); } return param; }
[ "Parameter", "getCreateParameter", "(", "String", "name", ")", "{", "if", "(", "this", ".", "parameters", "==", "null", ")", "this", ".", "parameters", "=", "new", "HashMap", "<", "String", ",", "Parameter", ">", "(", ")", ";", "Parameter", "param", "=",...
Get or create, if not exists, a query parameter. @param name of the parameter @return a query parameter
[ "Get", "or", "create", "if", "not", "exists", "a", "query", "parameter", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/internal/RecordedQuery.java#L106-L115
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/facade/JSONDBFacade.java
JSONDBFacade.getDomains
public String getDomains() { StringWriter sw = new StringWriter(); JsonGenerator generator; if (this.prettyFormat != Format.NONE) { JsonGeneratorFactory gf = JSONWriter.getPrettyGeneratorFactory(); generator = gf.createGenerator(sw); } else generator = Json.createGenerator(sw); generator.writeStar...
java
public String getDomains() { StringWriter sw = new StringWriter(); JsonGenerator generator; if (this.prettyFormat != Format.NONE) { JsonGeneratorFactory gf = JSONWriter.getPrettyGeneratorFactory(); generator = gf.createGenerator(sw); } else generator = Json.createGenerator(sw); generator.writeStar...
[ "public", "String", "getDomains", "(", ")", "{", "StringWriter", "sw", "=", "new", "StringWriter", "(", ")", ";", "JsonGenerator", "generator", ";", "if", "(", "this", ".", "prettyFormat", "!=", "Format", ".", "NONE", ")", "{", "JsonGeneratorFactory", "gf", ...
Answer a JSON representation of the available domains in the database @return
[ "Answer", "a", "JSON", "representation", "of", "the", "available", "domains", "in", "the", "database" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/facade/JSONDBFacade.java#L48-L66
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/mapping/CompoundObjectType.java
CompoundObjectType.getTypes
public List<Class<?>> getTypes(boolean noAbstractTypes) { List<Class<?>> typeList = new ArrayList<Class<?>>(); this.addType(typeList, noAbstractTypes); return typeList; }
java
public List<Class<?>> getTypes(boolean noAbstractTypes) { List<Class<?>> typeList = new ArrayList<Class<?>>(); this.addType(typeList, noAbstractTypes); return typeList; }
[ "public", "List", "<", "Class", "<", "?", ">", ">", "getTypes", "(", "boolean", "noAbstractTypes", ")", "{", "List", "<", "Class", "<", "?", ">", ">", "typeList", "=", "new", "ArrayList", "<", "Class", "<", "?", ">", ">", "(", ")", ";", "this", "...
Answer a list of types of this CompoundObjectType. @param noAbstractTypes if true, no abstract types and no interfaces are answered, else all types of the CompoundObjectType are answered. @return a list of java Classes
[ "Answer", "a", "list", "of", "types", "of", "this", "CompoundObjectType", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/mapping/CompoundObjectType.java#L73-L77
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/query/JcQueryResult.java
JcQueryResult.resultMapListOf
public LiteralMapList resultMapListOf(JcPrimitive... key) { List<List<?>> results = new ArrayList<List<?>>(); LiteralMapList ret = new LiteralMapList(); int size = -1; ResultHandler.includeNullValues.set(Boolean.TRUE); try { for (JcPrimitive k : key) { List<?> r = this.resultOf(k); if (size == -1) ...
java
public LiteralMapList resultMapListOf(JcPrimitive... key) { List<List<?>> results = new ArrayList<List<?>>(); LiteralMapList ret = new LiteralMapList(); int size = -1; ResultHandler.includeNullValues.set(Boolean.TRUE); try { for (JcPrimitive k : key) { List<?> r = this.resultOf(k); if (size == -1) ...
[ "public", "LiteralMapList", "resultMapListOf", "(", "JcPrimitive", "...", "key", ")", "{", "List", "<", "List", "<", "?", ">", ">", "results", "=", "new", "ArrayList", "<", "List", "<", "?", ">", ">", "(", ")", ";", "LiteralMapList", "ret", "=", "new",...
answer a list of literal maps containing result values for the given keys @param key a variable number of keys which are used to calculate result-values to fill the resulting maps @return a list of LiteralMap(s)
[ "answer", "a", "list", "of", "literal", "maps", "containing", "result", "values", "for", "the", "given", "keys" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/query/JcQueryResult.java#L119-L144
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/mapping/FieldMapping.java
FieldMapping.getComponentType
protected Class<?> getComponentType(GrNode rNode) { // do nothing in this implementation except for primitive arrays // overwritten by subclasses Class<?> compType; if (this.getFieldType().isArray() && (compType = this.getFieldType().getComponentType()).isPrimitive()) { return compType; } return null; }
java
protected Class<?> getComponentType(GrNode rNode) { // do nothing in this implementation except for primitive arrays // overwritten by subclasses Class<?> compType; if (this.getFieldType().isArray() && (compType = this.getFieldType().getComponentType()).isPrimitive()) { return compType; } return null; }
[ "protected", "Class", "<", "?", ">", "getComponentType", "(", "GrNode", "rNode", ")", "{", "// do nothing in this implementation except for primitive arrays", "// overwritten by subclasses", "Class", "<", "?", ">", "compType", ";", "if", "(", "this", ".", "getFieldType"...
only called when to check for a concrete simple component type @return
[ "only", "called", "when", "to", "check", "for", "a", "concrete", "simple", "component", "type" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/mapping/FieldMapping.java#L311-L319
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/graph/GrNode.java
GrNode.getLabel
public GrLabel getLabel(String labelName) { for (GrLabel lab : getLabels()) { if (lab.getName().equals(labelName)) return lab; } return null; }
java
public GrLabel getLabel(String labelName) { for (GrLabel lab : getLabels()) { if (lab.getName().equals(labelName)) return lab; } return null; }
[ "public", "GrLabel", "getLabel", "(", "String", "labelName", ")", "{", "for", "(", "GrLabel", "lab", ":", "getLabels", "(", ")", ")", "{", "if", "(", "lab", ".", "getName", "(", ")", ".", "equals", "(", "labelName", ")", ")", "return", "lab", ";", ...
return a label @param labelName @return a GrLabel
[ "return", "a", "label" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/graph/GrNode.java#L44-L50
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/graph/GrNode.java
GrNode.addLabel
public GrLabel addLabel(String name) { GrLabel lab = GrAccess.createLabel(name); return getLabelsContainer().addElement(lab); }
java
public GrLabel addLabel(String name) { GrLabel lab = GrAccess.createLabel(name); return getLabelsContainer().addElement(lab); }
[ "public", "GrLabel", "addLabel", "(", "String", "name", ")", "{", "GrLabel", "lab", "=", "GrAccess", ".", "createLabel", "(", "name", ")", ";", "return", "getLabelsContainer", "(", ")", ".", "addElement", "(", "lab", ")", ";", "}" ]
add a new label, throw a RuntimeException if the label already exists @param name of the label @return the added label
[ "add", "a", "new", "label", "throw", "a", "RuntimeException", "if", "the", "label", "already", "exists" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/graph/GrNode.java#L57-L60
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/api/TraversalStep.java
TraversalStep.FORTH
public TraversalStep FORTH(String attributeName) { TraversalExpression te = (TraversalExpression)this.astObject; te.step(attributeName, 0); TraversalStep ret = new TraversalStep(te); QueryRecorder.recordInvocation(this, "FORTH", ret, QueryRecorder.literal(attributeName)); return ret; }
java
public TraversalStep FORTH(String attributeName) { TraversalExpression te = (TraversalExpression)this.astObject; te.step(attributeName, 0); TraversalStep ret = new TraversalStep(te); QueryRecorder.recordInvocation(this, "FORTH", ret, QueryRecorder.literal(attributeName)); return ret; }
[ "public", "TraversalStep", "FORTH", "(", "String", "attributeName", ")", "{", "TraversalExpression", "te", "=", "(", "TraversalExpression", ")", "this", ".", "astObject", ";", "te", ".", "step", "(", "attributeName", ",", "0", ")", ";", "TraversalStep", "ret",...
Traverse forward via an attribute @param attributeName @return
[ "Traverse", "forward", "via", "an", "attribute" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/api/TraversalStep.java#L36-L42
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/api/TraversalStep.java
TraversalStep.TO
public <T> DomainObjectMatch<T> TO(Class<T> domainObjectType) { TraversalExpression te = (TraversalExpression)this.astObject; DomainObjectMatch<T> ret =APIAccess.createDomainObjectMatch(domainObjectType, te.getQueryExecutor().getDomainObjectMatches().size(), te.getQueryExecutor().getMappingInfo()); te.get...
java
public <T> DomainObjectMatch<T> TO(Class<T> domainObjectType) { TraversalExpression te = (TraversalExpression)this.astObject; DomainObjectMatch<T> ret =APIAccess.createDomainObjectMatch(domainObjectType, te.getQueryExecutor().getDomainObjectMatches().size(), te.getQueryExecutor().getMappingInfo()); te.get...
[ "public", "<", "T", ">", "DomainObjectMatch", "<", "T", ">", "TO", "(", "Class", "<", "T", ">", "domainObjectType", ")", "{", "TraversalExpression", "te", "=", "(", "TraversalExpression", ")", "this", ".", "astObject", ";", "DomainObjectMatch", "<", "T", "...
End the traversal of the domain object graph matching a specific type of domain objects @param domainObjectType @return a DomainObjectMatch
[ "End", "the", "traversal", "of", "the", "domain", "object", "graph", "matching", "a", "specific", "type", "of", "domain", "objects" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/api/TraversalStep.java#L80-L89
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/graph/PersistableItem.java
PersistableItem.remove
public void remove() { SyncState oldState = this.syncState; if (this.syncState == SyncState.NEW || this.syncState == SyncState.NEW_REMOVED) this.syncState = SyncState.NEW_REMOVED; else this.syncState = SyncState.REMOVED; if (oldState != this.syncState) fireChanged(oldState, this.syncState); }
java
public void remove() { SyncState oldState = this.syncState; if (this.syncState == SyncState.NEW || this.syncState == SyncState.NEW_REMOVED) this.syncState = SyncState.NEW_REMOVED; else this.syncState = SyncState.REMOVED; if (oldState != this.syncState) fireChanged(oldState, this.syncState); }
[ "public", "void", "remove", "(", ")", "{", "SyncState", "oldState", "=", "this", ".", "syncState", ";", "if", "(", "this", ".", "syncState", "==", "SyncState", ".", "NEW", "||", "this", ".", "syncState", "==", "SyncState", ".", "NEW_REMOVED", ")", "this"...
removes this item
[ "removes", "this", "item" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/graph/PersistableItem.java#L32-L40
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/api/DomainObjectMatch.java
DomainObjectMatch.atttribute
public JcProperty atttribute(String name) { if (this.delegate != null) return this.delegate.atttribute(name); JcProperty ret = checkField_getJcVal(name, JcProperty.class); QueryRecorder.recordInvocationReplace(this, ret, "atttribute"); return ret; }
java
public JcProperty atttribute(String name) { if (this.delegate != null) return this.delegate.atttribute(name); JcProperty ret = checkField_getJcVal(name, JcProperty.class); QueryRecorder.recordInvocationReplace(this, ret, "atttribute"); return ret; }
[ "public", "JcProperty", "atttribute", "(", "String", "name", ")", "{", "if", "(", "this", ".", "delegate", "!=", "null", ")", "return", "this", ".", "delegate", ".", "atttribute", "(", "name", ")", ";", "JcProperty", "ret", "=", "checkField_getJcVal", "(",...
Access an attribute, don't rely on a specific attribute type @param name the attribute name @return
[ "Access", "an", "attribute", "don", "t", "rely", "on", "a", "specific", "attribute", "type" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/api/DomainObjectMatch.java#L118-L124
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/api/DomainObjectMatch.java
DomainObjectMatch.stringAtttribute
public JcString stringAtttribute(String name) { if (this.delegate != null) return this.delegate.stringAtttribute(name); JcString ret = checkField_getJcVal(name, JcString.class); QueryRecorder.recordInvocationReplace(this, ret, "stringAtttribute"); return ret; }
java
public JcString stringAtttribute(String name) { if (this.delegate != null) return this.delegate.stringAtttribute(name); JcString ret = checkField_getJcVal(name, JcString.class); QueryRecorder.recordInvocationReplace(this, ret, "stringAtttribute"); return ret; }
[ "public", "JcString", "stringAtttribute", "(", "String", "name", ")", "{", "if", "(", "this", ".", "delegate", "!=", "null", ")", "return", "this", ".", "delegate", ".", "stringAtttribute", "(", "name", ")", ";", "JcString", "ret", "=", "checkField_getJcVal"...
Access a string attribute @param name the attribute name @return a JcString
[ "Access", "a", "string", "attribute" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/api/DomainObjectMatch.java#L131-L137
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/api/DomainObjectMatch.java
DomainObjectMatch.numberAtttribute
public JcNumber numberAtttribute(String name) { if (this.delegate != null) return this.delegate.numberAtttribute(name); JcNumber ret = checkField_getJcVal(name, JcNumber.class); QueryRecorder.recordInvocationReplace(this, ret, "numberAtttribute"); return ret; }
java
public JcNumber numberAtttribute(String name) { if (this.delegate != null) return this.delegate.numberAtttribute(name); JcNumber ret = checkField_getJcVal(name, JcNumber.class); QueryRecorder.recordInvocationReplace(this, ret, "numberAtttribute"); return ret; }
[ "public", "JcNumber", "numberAtttribute", "(", "String", "name", ")", "{", "if", "(", "this", ".", "delegate", "!=", "null", ")", "return", "this", ".", "delegate", ".", "numberAtttribute", "(", "name", ")", ";", "JcNumber", "ret", "=", "checkField_getJcVal"...
Access a number attribute @param name the attribute name @return a JcNumber
[ "Access", "a", "number", "attribute" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/api/DomainObjectMatch.java#L144-L150
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/api/DomainObjectMatch.java
DomainObjectMatch.booleanAtttribute
public JcBoolean booleanAtttribute(String name) { if (this.delegate != null) return this.delegate.booleanAtttribute(name); JcBoolean ret = checkField_getJcVal(name, JcBoolean.class); QueryRecorder.recordInvocationReplace(this, ret, "booleanAtttribute"); return ret; }
java
public JcBoolean booleanAtttribute(String name) { if (this.delegate != null) return this.delegate.booleanAtttribute(name); JcBoolean ret = checkField_getJcVal(name, JcBoolean.class); QueryRecorder.recordInvocationReplace(this, ret, "booleanAtttribute"); return ret; }
[ "public", "JcBoolean", "booleanAtttribute", "(", "String", "name", ")", "{", "if", "(", "this", ".", "delegate", "!=", "null", ")", "return", "this", ".", "delegate", ".", "booleanAtttribute", "(", "name", ")", ";", "JcBoolean", "ret", "=", "checkField_getJc...
Access a boolean attribute @param name the attribute name @return a JcBoolean
[ "Access", "a", "boolean", "attribute" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/api/DomainObjectMatch.java#L157-L163
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/api/DomainObjectMatch.java
DomainObjectMatch.collectionAtttribute
public JcCollection collectionAtttribute(String name) { if (this.delegate != null) return this.delegate.collectionAtttribute(name); JcCollection ret = checkField_getJcVal(name, JcCollection.class); QueryRecorder.recordInvocationReplace(this, ret, "collectionAtttribute"); return ret; }
java
public JcCollection collectionAtttribute(String name) { if (this.delegate != null) return this.delegate.collectionAtttribute(name); JcCollection ret = checkField_getJcVal(name, JcCollection.class); QueryRecorder.recordInvocationReplace(this, ret, "collectionAtttribute"); return ret; }
[ "public", "JcCollection", "collectionAtttribute", "(", "String", "name", ")", "{", "if", "(", "this", ".", "delegate", "!=", "null", ")", "return", "this", ".", "delegate", ".", "collectionAtttribute", "(", "name", ")", ";", "JcCollection", "ret", "=", "chec...
Access a collection attribute @param name the attribute name @return a JcCollection
[ "Access", "a", "collection", "attribute" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/api/DomainObjectMatch.java#L170-L176
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/DomainAccessFactory.java
DomainAccessFactory.createDomainAccess
public static IDomainAccess createDomainAccess(IDBAccess dbAccess, String domainName) { return IDomainAccessFactory.INSTANCE.createDomainAccess(dbAccess, domainName); }
java
public static IDomainAccess createDomainAccess(IDBAccess dbAccess, String domainName) { return IDomainAccessFactory.INSTANCE.createDomainAccess(dbAccess, domainName); }
[ "public", "static", "IDomainAccess", "createDomainAccess", "(", "IDBAccess", "dbAccess", ",", "String", "domainName", ")", "{", "return", "IDomainAccessFactory", ".", "INSTANCE", ".", "createDomainAccess", "(", "dbAccess", ",", "domainName", ")", ";", "}" ]
Create a domain accessor. @param dbAccess the graph database connection @param domainName @return
[ "Create", "a", "domain", "accessor", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/DomainAccessFactory.java#L34-L36
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/DomainAccessFactory.java
DomainAccessFactory.createGenericDomainAccess
public static IGenericDomainAccess createGenericDomainAccess(IDBAccess dbAccess, String domainName, DomainLabelUse domainLabelUse) { return IDomainAccessFactory.INSTANCE.createGenericDomainAccess(dbAccess, domainName, domainLabelUse); }
java
public static IGenericDomainAccess createGenericDomainAccess(IDBAccess dbAccess, String domainName, DomainLabelUse domainLabelUse) { return IDomainAccessFactory.INSTANCE.createGenericDomainAccess(dbAccess, domainName, domainLabelUse); }
[ "public", "static", "IGenericDomainAccess", "createGenericDomainAccess", "(", "IDBAccess", "dbAccess", ",", "String", "domainName", ",", "DomainLabelUse", "domainLabelUse", ")", "{", "return", "IDomainAccessFactory", ".", "INSTANCE", ".", "createGenericDomainAccess", "(", ...
Create a domain accessor which works with a generic domain model. @param dbAccess the graph database connection @param domainName @param domainLabelUse --<b>Note:</b> Consistency may be corrupted, if you change domainLabelUse on different creations of DomainAccess to the same domain. @return
[ "Create", "a", "domain", "accessor", "which", "works", "with", "a", "generic", "domain", "model", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/DomainAccessFactory.java#L69-L72
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/api/Order.java
Order.BY
public OrderDirection BY(String attributeName) { OrderBy ob = this.orderExpression.getCreateOrderCriteriaFor(attributeName); OrderDirection ret = new OrderDirection(ob); QueryRecorder.recordInvocation(this, "BY", ret, QueryRecorder.literal(attributeName)); return ret; }
java
public OrderDirection BY(String attributeName) { OrderBy ob = this.orderExpression.getCreateOrderCriteriaFor(attributeName); OrderDirection ret = new OrderDirection(ob); QueryRecorder.recordInvocation(this, "BY", ret, QueryRecorder.literal(attributeName)); return ret; }
[ "public", "OrderDirection", "BY", "(", "String", "attributeName", ")", "{", "OrderBy", "ob", "=", "this", ".", "orderExpression", ".", "getCreateOrderCriteriaFor", "(", "attributeName", ")", ";", "OrderDirection", "ret", "=", "new", "OrderDirection", "(", "ob", ...
Specify the attribute to be used for sorting @param attributeName @return
[ "Specify", "the", "attribute", "to", "be", "used", "for", "sorting" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/api/Order.java#L37-L42
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/facade/JSONDomainFacade.java
JSONDomainFacade.getDomainName
public String getDomainName() { DomainModel model = ((IIntDomainAccess)this.domainAccess).getInternalDomainAccess().getDomainModel(); StringWriter sw = new StringWriter(); JsonGenerator generator; if (this.prettyFormat != Format.NONE) { JsonGeneratorFactory gf = JSONWriter.getPrettyGeneratorFactory(); gen...
java
public String getDomainName() { DomainModel model = ((IIntDomainAccess)this.domainAccess).getInternalDomainAccess().getDomainModel(); StringWriter sw = new StringWriter(); JsonGenerator generator; if (this.prettyFormat != Format.NONE) { JsonGeneratorFactory gf = JSONWriter.getPrettyGeneratorFactory(); gen...
[ "public", "String", "getDomainName", "(", ")", "{", "DomainModel", "model", "=", "(", "(", "IIntDomainAccess", ")", "this", ".", "domainAccess", ")", ".", "getInternalDomainAccess", "(", ")", ".", "getDomainModel", "(", ")", ";", "StringWriter", "sw", "=", "...
Answer a JSON object containing the domain name @return
[ "Answer", "a", "JSON", "object", "containing", "the", "domain", "name" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/facade/JSONDomainFacade.java#L78-L94
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/graph/Graph.java
Graph.create
public static Graph create(IDBAccess dbAccess) { ResultHandler rh = new ResultHandler(dbAccess); Graph ret = rh.getGraph(); ret.setSyncState(SyncState.NEW); return ret; }
java
public static Graph create(IDBAccess dbAccess) { ResultHandler rh = new ResultHandler(dbAccess); Graph ret = rh.getGraph(); ret.setSyncState(SyncState.NEW); return ret; }
[ "public", "static", "Graph", "create", "(", "IDBAccess", "dbAccess", ")", "{", "ResultHandler", "rh", "=", "new", "ResultHandler", "(", "dbAccess", ")", ";", "Graph", "ret", "=", "rh", ".", "getGraph", "(", ")", ";", "ret", ".", "setSyncState", "(", "Syn...
create an empty graph @param dbAccess the database on which to perform updates of the graph @return the empty graph model
[ "create", "an", "empty", "graph" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/graph/Graph.java#L45-L50
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/graph/Graph.java
Graph.createRelation
public GrRelation createRelation(String type, GrNode startNode, GrNode endNode) { return this.resultHandler.getLocalElements().createRelation(type, startNode, endNode); }
java
public GrRelation createRelation(String type, GrNode startNode, GrNode endNode) { return this.resultHandler.getLocalElements().createRelation(type, startNode, endNode); }
[ "public", "GrRelation", "createRelation", "(", "String", "type", ",", "GrNode", "startNode", ",", "GrNode", "endNode", ")", "{", "return", "this", ".", "resultHandler", ".", "getLocalElements", "(", ")", ".", "createRelation", "(", "type", ",", "startNode", ",...
create a relation in the graph @param type @param startNode @param endNode @return a GrRelation
[ "create", "a", "relation", "in", "the", "graph" ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/graph/Graph.java#L77-L79
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/internal/RecordedQueryPlayer.java
RecordedQueryPlayer.replayQuery
public DomainQuery replayQuery(RecordedQuery recordedQuery, IDomainAccess domainAccess) { Boolean br_old = null; DomainQuery query; try { if (!Settings.TEST_MODE) { br_old = QueryRecorder.blockRecording.get(); if (this.createNew) QueryRecorder.blockRecording.set(Boolean.FALSE); else Query...
java
public DomainQuery replayQuery(RecordedQuery recordedQuery, IDomainAccess domainAccess) { Boolean br_old = null; DomainQuery query; try { if (!Settings.TEST_MODE) { br_old = QueryRecorder.blockRecording.get(); if (this.createNew) QueryRecorder.blockRecording.set(Boolean.FALSE); else Query...
[ "public", "DomainQuery", "replayQuery", "(", "RecordedQuery", "recordedQuery", ",", "IDomainAccess", "domainAccess", ")", "{", "Boolean", "br_old", "=", "null", ";", "DomainQuery", "query", ";", "try", "{", "if", "(", "!", "Settings", ".", "TEST_MODE", ")", "{...
Create a domain query from a recorded query. @param recordedQuery @param domainAccess @return
[ "Create", "a", "domain", "query", "from", "a", "recorded", "query", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/internal/RecordedQueryPlayer.java#L64-L99
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domainquery/internal/RecordedQueryPlayer.java
RecordedQueryPlayer.replayGenericQuery
public GDomainQuery replayGenericQuery(RecordedQuery recordedQuery, IGenericDomainAccess domainAccess) { Boolean br_old = null; GDomainQuery query; try { if (!Settings.TEST_MODE) { br_old = QueryRecorder.blockRecording.get(); if (this.createNew) QueryRecorder.blockRecording.set(Boolean.FALSE); ...
java
public GDomainQuery replayGenericQuery(RecordedQuery recordedQuery, IGenericDomainAccess domainAccess) { Boolean br_old = null; GDomainQuery query; try { if (!Settings.TEST_MODE) { br_old = QueryRecorder.blockRecording.get(); if (this.createNew) QueryRecorder.blockRecording.set(Boolean.FALSE); ...
[ "public", "GDomainQuery", "replayGenericQuery", "(", "RecordedQuery", "recordedQuery", ",", "IGenericDomainAccess", "domainAccess", ")", "{", "Boolean", "br_old", "=", "null", ";", "GDomainQuery", "query", ";", "try", "{", "if", "(", "!", "Settings", ".", "TEST_MO...
Create a generic domain query from a recorded query. @param recordedQuery @param domainAccess @return
[ "Create", "a", "generic", "domain", "query", "from", "a", "recorded", "query", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domainquery/internal/RecordedQueryPlayer.java#L107-L133
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/mapping/MappingUtil.java
MappingUtil.fromType
public static JcPrimitive fromType(Class<?> type, String name) { // TODO what about dates and arrays if (type.equals(String.class)) return new JcString(name); else if (type.equals(Number.class)) return new JcNumber(name); else if (type.equals(Boolean.class)) return new JcBoolean(name); return null; ...
java
public static JcPrimitive fromType(Class<?> type, String name) { // TODO what about dates and arrays if (type.equals(String.class)) return new JcString(name); else if (type.equals(Number.class)) return new JcNumber(name); else if (type.equals(Boolean.class)) return new JcBoolean(name); return null; ...
[ "public", "static", "JcPrimitive", "fromType", "(", "Class", "<", "?", ">", "type", ",", "String", "name", ")", "{", "// TODO what about dates and arrays", "if", "(", "type", ".", "equals", "(", "String", ".", "class", ")", ")", "return", "new", "JcString", ...
Answer an appropriate instance of a JcPrimitive for the given simple-type and name. E.g. given a type java.lang.String, a JcString instance will be returned. @param type @param name @return
[ "Answer", "an", "appropriate", "instance", "of", "a", "JcPrimitive", "for", "the", "given", "simple", "-", "type", "and", "name", ".", "E", ".", "g", ".", "given", "a", "type", "java", ".", "lang", ".", "String", "a", "JcString", "instance", "will", "b...
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/mapping/MappingUtil.java#L234-L243
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/mapping/MappingUtil.java
MappingUtil.getEnumValues
public static Object[] getEnumValues(Class<? extends Enum<?>> clazz) { Object[] enums=clazz.getEnumConstants(); if (enums == null) { Method[] mthds = clazz.getDeclaredMethods(); Method mthd = null; for (Method mth : mthds) { if (mth.getName().equals("values")) { mthd = mth; break; } } ...
java
public static Object[] getEnumValues(Class<? extends Enum<?>> clazz) { Object[] enums=clazz.getEnumConstants(); if (enums == null) { Method[] mthds = clazz.getDeclaredMethods(); Method mthd = null; for (Method mth : mthds) { if (mth.getName().equals("values")) { mthd = mth; break; } } ...
[ "public", "static", "Object", "[", "]", "getEnumValues", "(", "Class", "<", "?", "extends", "Enum", "<", "?", ">", ">", "clazz", ")", "{", "Object", "[", "]", "enums", "=", "clazz", ".", "getEnumConstants", "(", ")", ";", "if", "(", "enums", "==", ...
finds enum values in normal enum classes and in dynamically created ones. @param clazz @return
[ "finds", "enum", "values", "in", "normal", "enum", "classes", "and", "in", "dynamically", "created", "ones", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/mapping/MappingUtil.java#L250-L269
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/genericmodel/DOType.java
DOType.getDeclaredFieldNames
public List<String> getDeclaredFieldNames() { if (this.declaredFieldNames == null) { this.declaredFieldNames = new ArrayList<String>(this.declaredFields.size()); for (DOField f : this.declaredFields) { this.declaredFieldNames.add(f.getName()); } } return this.declaredFieldNames; }
java
public List<String> getDeclaredFieldNames() { if (this.declaredFieldNames == null) { this.declaredFieldNames = new ArrayList<String>(this.declaredFields.size()); for (DOField f : this.declaredFields) { this.declaredFieldNames.add(f.getName()); } } return this.declaredFieldNames; }
[ "public", "List", "<", "String", ">", "getDeclaredFieldNames", "(", ")", "{", "if", "(", "this", ".", "declaredFieldNames", "==", "null", ")", "{", "this", ".", "declaredFieldNames", "=", "new", "ArrayList", "<", "String", ">", "(", "this", ".", "declaredF...
Answer a list of all field names declared by this type. @return
[ "Answer", "a", "list", "of", "all", "field", "names", "declared", "by", "this", "type", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/genericmodel/DOType.java#L100-L108
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/genericmodel/DOType.java
DOType.getFieldNames
public List<String> getFieldNames() { List<String> ret = new ArrayList<String>(); DOType typ = this; while(typ != null) { ret.addAll(typ.getDeclaredFieldNames()); typ = typ.getSuperType(); } return ret; }
java
public List<String> getFieldNames() { List<String> ret = new ArrayList<String>(); DOType typ = this; while(typ != null) { ret.addAll(typ.getDeclaredFieldNames()); typ = typ.getSuperType(); } return ret; }
[ "public", "List", "<", "String", ">", "getFieldNames", "(", ")", "{", "List", "<", "String", ">", "ret", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "DOType", "typ", "=", "this", ";", "while", "(", "typ", "!=", "null", ")", "{", "...
Answer a list of all field names declared by this type and all it's super types. @return
[ "Answer", "a", "list", "of", "all", "field", "names", "declared", "by", "this", "type", "and", "all", "it", "s", "super", "types", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/genericmodel/DOType.java#L114-L122
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/genericmodel/DOType.java
DOType.getEnumValue
public Object getEnumValue(String name) { if (this.kind != Kind.ENUM) throw new RuntimeException("getEnumValue(..) can only be called on an enum"); Object[] vals = getEnumValues(); if (vals != null) { for (Object val : vals) { if (((Enum<?>)val).name().equals(name)) return val; } } return nu...
java
public Object getEnumValue(String name) { if (this.kind != Kind.ENUM) throw new RuntimeException("getEnumValue(..) can only be called on an enum"); Object[] vals = getEnumValues(); if (vals != null) { for (Object val : vals) { if (((Enum<?>)val).name().equals(name)) return val; } } return nu...
[ "public", "Object", "getEnumValue", "(", "String", "name", ")", "{", "if", "(", "this", ".", "kind", "!=", "Kind", ".", "ENUM", ")", "throw", "new", "RuntimeException", "(", "\"getEnumValue(..) can only be called on an enum\"", ")", ";", "Object", "[", "]", "v...
Answer an enum value with the given name. @param name @return
[ "Answer", "an", "enum", "value", "with", "the", "given", "name", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/genericmodel/DOType.java#L182-L193
train
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/domain/genericmodel/DOType.java
DOType.getEnumValues
@SuppressWarnings("unchecked") public Object[] getEnumValues() { if (this.kind != Kind.ENUM) throw new RuntimeException("getEnumValues() can only be called on an enum"); try { return MappingUtil.getEnumValues((Class<? extends Enum<?>>) getRawType()); } catch (ClassNotFoundException e) { throw new Runtim...
java
@SuppressWarnings("unchecked") public Object[] getEnumValues() { if (this.kind != Kind.ENUM) throw new RuntimeException("getEnumValues() can only be called on an enum"); try { return MappingUtil.getEnumValues((Class<? extends Enum<?>>) getRawType()); } catch (ClassNotFoundException e) { throw new Runtim...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "Object", "[", "]", "getEnumValues", "(", ")", "{", "if", "(", "this", ".", "kind", "!=", "Kind", ".", "ENUM", ")", "throw", "new", "RuntimeException", "(", "\"getEnumValues() can only be called on an...
Answer the list of enum values of this enum. @return
[ "Answer", "the", "list", "of", "enum", "values", "of", "this", "enum", "." ]
0f36914b4d6993a004cc235bb18dd3e02a59d253
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/domain/genericmodel/DOType.java#L199-L208
train
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Utils.findInputStreamForResource
@Nullable public static InputStream findInputStreamForResource(@Nonnull final ZipFile zipFile, @Nonnull final String resourcePath) throws IOException { final ZipEntry entry = zipFile.getEntry(resourcePath); InputStream result = null; if (entry != null && !entry.isDirectory()) { result = zipFile.ge...
java
@Nullable public static InputStream findInputStreamForResource(@Nonnull final ZipFile zipFile, @Nonnull final String resourcePath) throws IOException { final ZipEntry entry = zipFile.getEntry(resourcePath); InputStream result = null; if (entry != null && !entry.isDirectory()) { result = zipFile.ge...
[ "@", "Nullable", "public", "static", "InputStream", "findInputStreamForResource", "(", "@", "Nonnull", "final", "ZipFile", "zipFile", ",", "@", "Nonnull", "final", "String", "resourcePath", ")", "throws", "IOException", "{", "final", "ZipEntry", "entry", "=", "zip...
Get input stream for resource in zip file. @param zipFile zip file @param resourcePath path to resource @return input stream for resource or null if not found or directory @throws IOException if there is any transport error
[ "Get", "input", "stream", "for", "resource", "in", "zip", "file", "." ]
997493d23556a25354372b6419a64a0fbd0ac6ba
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java#L99-L110
train
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Utils.toByteArray
@Nullable public static byte[] toByteArray(@Nonnull final ZipFile zipFile, @Nonnull final String path) throws IOException { final InputStream in = findInputStreamForResource(zipFile, path); byte[] result = null; if (in != null) { try { result = IOUtils.toByteArray(in); } finally { ...
java
@Nullable public static byte[] toByteArray(@Nonnull final ZipFile zipFile, @Nonnull final String path) throws IOException { final InputStream in = findInputStreamForResource(zipFile, path); byte[] result = null; if (in != null) { try { result = IOUtils.toByteArray(in); } finally { ...
[ "@", "Nullable", "public", "static", "byte", "[", "]", "toByteArray", "(", "@", "Nonnull", "final", "ZipFile", "zipFile", ",", "@", "Nonnull", "final", "String", "path", ")", "throws", "IOException", "{", "final", "InputStream", "in", "=", "findInputStreamForR...
Read who;e zip item into byte array. @param zipFile zip file @param path path to resource @return byte array or null if not found @throws IOException thrown if there is any transport error
[ "Read", "who", ";", "e", "zip", "item", "into", "byte", "array", "." ]
997493d23556a25354372b6419a64a0fbd0ac6ba
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java#L120-L135
train
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Utils.loadXmlDocument
@Nonnull public static Document loadXmlDocument(@Nonnull final InputStream inStream, @Nullable final String charset, final boolean autoClose) throws SAXException, IOException, ParserConfigurationException { final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { factory.setFe...
java
@Nonnull public static Document loadXmlDocument(@Nonnull final InputStream inStream, @Nullable final String charset, final boolean autoClose) throws SAXException, IOException, ParserConfigurationException { final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { factory.setFe...
[ "@", "Nonnull", "public", "static", "Document", "loadXmlDocument", "(", "@", "Nonnull", "final", "InputStream", "inStream", ",", "@", "Nullable", "final", "String", "charset", ",", "final", "boolean", "autoClose", ")", "throws", "SAXException", ",", "IOException",...
Load and parse XML document from input stream. @param inStream stream to read document @param autoClose true if stream must be closed, false otherwise @return parsed document @throws IOException @throws ParserConfigurationException @throws SAXException @since 1.4.0
[ "Load", "and", "parse", "XML", "document", "from", "input", "stream", "." ]
997493d23556a25354372b6419a64a0fbd0ac6ba
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java#L160-L199
train
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Utils.findFirstElement
@Nullable public static Element findFirstElement(@Nonnull final Element node, @Nonnull final String elementName) { Element result = null; for (final Element l : Utils.findDirectChildrenForName(node, elementName)) { result = l; break; } return result; }
java
@Nullable public static Element findFirstElement(@Nonnull final Element node, @Nonnull final String elementName) { Element result = null; for (final Element l : Utils.findDirectChildrenForName(node, elementName)) { result = l; break; } return result; }
[ "@", "Nullable", "public", "static", "Element", "findFirstElement", "(", "@", "Nonnull", "final", "Element", "node", ",", "@", "Nonnull", "final", "String", "elementName", ")", "{", "Element", "result", "=", "null", ";", "for", "(", "final", "Element", "l", ...
Get first direct child for name. @param node element to find children @param elementName name of child element @return found first child or null if not found @since 1.4.0
[ "Get", "first", "direct", "child", "for", "name", "." ]
997493d23556a25354372b6419a64a0fbd0ac6ba
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java#L209-L217
train
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Utils.findDirectChildrenForName
@Nonnull @MustNotContainNull public static List<Element> findDirectChildrenForName(@Nonnull final Element element, @Nonnull final String childElementname) { final List<Element> resultList = new ArrayList<Element>(); final NodeList list = element.getChildNodes(); for (int i = 0; i < list.getLength(); i++...
java
@Nonnull @MustNotContainNull public static List<Element> findDirectChildrenForName(@Nonnull final Element element, @Nonnull final String childElementname) { final List<Element> resultList = new ArrayList<Element>(); final NodeList list = element.getChildNodes(); for (int i = 0; i < list.getLength(); i++...
[ "@", "Nonnull", "@", "MustNotContainNull", "public", "static", "List", "<", "Element", ">", "findDirectChildrenForName", "(", "@", "Nonnull", "final", "Element", "element", ",", "@", "Nonnull", "final", "String", "childElementname", ")", "{", "final", "List", "<...
Find all direct children with defined name. @param element parent element @param childElementname child element name @return list of found elements @since 1.4.0
[ "Find", "all", "direct", "children", "with", "defined", "name", "." ]
997493d23556a25354372b6419a64a0fbd0ac6ba
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java#L227-L239
train
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Utils.getMaxImageSize
public static int getMaxImageSize() { int result = MAX_IMAGE_SIDE_SIZE_IN_PIXELS; try { final String defined = System.getProperty(PROPERTY_MAX_EMBEDDED_IMAGE_SIDE_SIZE); if (defined != null) { LOGGER.info("Detected redefined max size for embedded image side : " + defined); //NOI18N r...
java
public static int getMaxImageSize() { int result = MAX_IMAGE_SIDE_SIZE_IN_PIXELS; try { final String defined = System.getProperty(PROPERTY_MAX_EMBEDDED_IMAGE_SIDE_SIZE); if (defined != null) { LOGGER.info("Detected redefined max size for embedded image side : " + defined); //NOI18N r...
[ "public", "static", "int", "getMaxImageSize", "(", ")", "{", "int", "result", "=", "MAX_IMAGE_SIDE_SIZE_IN_PIXELS", ";", "try", "{", "final", "String", "defined", "=", "System", ".", "getProperty", "(", "PROPERTY_MAX_EMBEDDED_IMAGE_SIDE_SIZE", ")", ";", "if", "(",...
Get max image size. @return max image size @see #MAX_IMAGE_SIDE_SIZE_IN_PIXELS @see #PROPERTY_MAX_EMBEDDED_IMAGE_SIDE_SIZE
[ "Get", "max", "image", "size", "." ]
997493d23556a25354372b6419a64a0fbd0ac6ba
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java#L258-L270
train
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Utils.rescaleImageAndEncodeAsBase64
@Nullable public static String rescaleImageAndEncodeAsBase64(@Nonnull final InputStream in, final int maxSize) throws IOException { final Image image = ImageIO.read(in); String result = null; if (image != null) { result = rescaleImageAndEncodeAsBase64(image, maxSize); } return result; }
java
@Nullable public static String rescaleImageAndEncodeAsBase64(@Nonnull final InputStream in, final int maxSize) throws IOException { final Image image = ImageIO.read(in); String result = null; if (image != null) { result = rescaleImageAndEncodeAsBase64(image, maxSize); } return result; }
[ "@", "Nullable", "public", "static", "String", "rescaleImageAndEncodeAsBase64", "(", "@", "Nonnull", "final", "InputStream", "in", ",", "final", "int", "maxSize", ")", "throws", "IOException", "{", "final", "Image", "image", "=", "ImageIO", ".", "read", "(", "...
Load and encode image into Base64. @param in stream to read image @param maxSize max size of image, if less or zero then don't rescale @return null if it was impossible to load image for its format, loaded prepared image @throws IOException if any error during conversion or loading @since 1.4.0
[ "Load", "and", "encode", "image", "into", "Base64", "." ]
997493d23556a25354372b6419a64a0fbd0ac6ba
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java#L282-L290
train
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Utils.rescaleImageAndEncodeAsBase64
@Nonnull public static String rescaleImageAndEncodeAsBase64(@Nonnull final File file, final int maxSize) throws IOException { final Image image = ImageIO.read(file); if (image == null) { throw new IllegalArgumentException("Can't load image file : " + file); //NOI18N } return rescaleImageAndEncod...
java
@Nonnull public static String rescaleImageAndEncodeAsBase64(@Nonnull final File file, final int maxSize) throws IOException { final Image image = ImageIO.read(file); if (image == null) { throw new IllegalArgumentException("Can't load image file : " + file); //NOI18N } return rescaleImageAndEncod...
[ "@", "Nonnull", "public", "static", "String", "rescaleImageAndEncodeAsBase64", "(", "@", "Nonnull", "final", "File", "file", ",", "final", "int", "maxSize", ")", "throws", "IOException", "{", "final", "Image", "image", "=", "ImageIO", ".", "read", "(", "file",...
Load and encode image into Base64 from file. @param file image file @param maxSize max size of image, if less or zero then don't rescale @return image @throws IOException if any error during conversion or loading @since 1.4.0
[ "Load", "and", "encode", "image", "into", "Base64", "from", "file", "." ]
997493d23556a25354372b6419a64a0fbd0ac6ba
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java#L301-L308
train
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Utils.getDefaultRenderQialityForOs
@Nonnull public static RenderQuality getDefaultRenderQialityForOs() { RenderQuality result = RenderQuality.DEFAULT; if (SystemUtils.IS_OS_MAC || SystemUtils.IS_OS_WINDOWS) { result = RenderQuality.QUALITY; } return result; }
java
@Nonnull public static RenderQuality getDefaultRenderQialityForOs() { RenderQuality result = RenderQuality.DEFAULT; if (SystemUtils.IS_OS_MAC || SystemUtils.IS_OS_WINDOWS) { result = RenderQuality.QUALITY; } return result; }
[ "@", "Nonnull", "public", "static", "RenderQuality", "getDefaultRenderQialityForOs", "(", ")", "{", "RenderQuality", "result", "=", "RenderQuality", ".", "DEFAULT", ";", "if", "(", "SystemUtils", ".", "IS_OS_MAC", "||", "SystemUtils", ".", "IS_OS_WINDOWS", ")", "{...
Get default render quality for host OS. @return the render quality for host OS, must not be null @since 1.4.5
[ "Get", "default", "render", "quality", "for", "host", "OS", "." ]
997493d23556a25354372b6419a64a0fbd0ac6ba
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java#L315-L322
train
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/print/MMDPrintOptions.java
MMDPrintOptions.setScaleType
@Nonnull public MMDPrintOptions setScaleType(@Nonnull final ScaleType scaleOption) { this.scaleOption = Assertions.assertNotNull(scaleOption); return this; }
java
@Nonnull public MMDPrintOptions setScaleType(@Nonnull final ScaleType scaleOption) { this.scaleOption = Assertions.assertNotNull(scaleOption); return this; }
[ "@", "Nonnull", "public", "MMDPrintOptions", "setScaleType", "(", "@", "Nonnull", "final", "ScaleType", "scaleOption", ")", "{", "this", ".", "scaleOption", "=", "Assertions", ".", "assertNotNull", "(", "scaleOption", ")", ";", "return", "this", ";", "}" ]
Set the selected scale option. @param scaleOption option, must not be null @return this instance
[ "Set", "the", "selected", "scale", "option", "." ]
997493d23556a25354372b6419a64a0fbd0ac6ba
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/print/MMDPrintOptions.java#L130-L134
train
raydac/netbeans-mmd-plugin
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/MindMapPanel.java
MindMapPanel.getSessionObject
@Nullable public <T> T getSessionObject(@Nonnull final String key, @Nonnull final Class<T> klazz, @Nullable final T def) { this.lock(); try { T result = klazz.cast(this.sessionObjects.get(key)); return result == null ? def : result; } finally { this.unlock(); } }
java
@Nullable public <T> T getSessionObject(@Nonnull final String key, @Nonnull final Class<T> klazz, @Nullable final T def) { this.lock(); try { T result = klazz.cast(this.sessionObjects.get(key)); return result == null ? def : result; } finally { this.unlock(); } }
[ "@", "Nullable", "public", "<", "T", ">", "T", "getSessionObject", "(", "@", "Nonnull", "final", "String", "key", ",", "@", "Nonnull", "final", "Class", "<", "T", ">", "klazz", ",", "@", "Nullable", "final", "T", "def", ")", "{", "this", ".", "lock",...
Get saved session object. Object is presented and saved only for the current panel and only in memory. @param <T> type of object @param key key of object, must not be null @param klazz object type, must not be null @param def default value will be returned as result if object not presented, can be null @return null if...
[ "Get", "saved", "session", "object", ".", "Object", "is", "presented", "and", "saved", "only", "for", "the", "current", "panel", "and", "only", "in", "memory", "." ]
997493d23556a25354372b6419a64a0fbd0ac6ba
https://github.com/raydac/netbeans-mmd-plugin/blob/997493d23556a25354372b6419a64a0fbd0ac6ba/mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/MindMapPanel.java#L1264-L1273
train