id
int32
0
165k
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
23,700
banq/jdonframework
src/main/java/com/jdon/util/jdom/XMLFilterBase.java
XMLFilterBase.emptyElement
public void emptyElement (String uri, String localName) throws SAXException { emptyElement(uri, localName, "", EMPTY_ATTS); }
java
public void emptyElement (String uri, String localName) throws SAXException { emptyElement(uri, localName, "", EMPTY_ATTS); }
[ "public", "void", "emptyElement", "(", "String", "uri", ",", "String", "localName", ")", "throws", "SAXException", "{", "emptyElement", "(", "uri", ",", "localName", ",", "\"\"", ",", "EMPTY_ATTS", ")", ";", "}" ]
Add an empty element without a qname or attributes. <p>This method will supply an empty string for the qname and an empty attribute list. It invokes {@link #emptyElement(String, String, String, Attributes)} directly.</p> @param uri The element's Namespace URI. @param localName The element's local name. @exception or...
[ "Add", "an", "empty", "element", "without", "a", "qname", "or", "attributes", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLFilterBase.java#L303-L307
23,701
banq/jdonframework
src/main/java/com/jdon/util/jdom/XMLFilterBase.java
XMLFilterBase.dataElement
public void dataElement (String uri, String localName, String qName, Attributes atts, String content) throws SAXException { startElement(uri, localName, qName, atts); characters(content); endElement(uri, localName, qName); ...
java
public void dataElement (String uri, String localName, String qName, Attributes atts, String content) throws SAXException { startElement(uri, localName, qName, atts); characters(content); endElement(uri, localName, qName); ...
[ "public", "void", "dataElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ",", "Attributes", "atts", ",", "String", "content", ")", "throws", "SAXException", "{", "startElement", "(", "uri", ",", "localName", ",", "qName", ",...
Add an element with character data content. <p>This is a convenience method to add a complete element with character data content, including the start tag and end tag.</p> <p>This method invokes {@link @see org.xml.sax.ContentHandler#startElement}, followed by {@link #characters(String)}, followed by {@link @see org....
[ "Add", "an", "element", "with", "character", "data", "content", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLFilterBase.java#L377-L385
23,702
banq/jdonframework
src/main/java/com/jdon/util/jdom/XMLFilterBase.java
XMLFilterBase.dataElement
public void dataElement (String uri, String localName, String content) throws SAXException { dataElement(uri, localName, "", EMPTY_ATTS, content); }
java
public void dataElement (String uri, String localName, String content) throws SAXException { dataElement(uri, localName, "", EMPTY_ATTS, content); }
[ "public", "void", "dataElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "content", ")", "throws", "SAXException", "{", "dataElement", "(", "uri", ",", "localName", ",", "\"\"", ",", "EMPTY_ATTS", ",", "content", ")", ";", "}" ]
Add an element with character data content but no qname or attributes. <p>This is a convenience method to add a complete element with character data content, including the start tag and end tag. This method provides an empty string for the qname and an empty attribute list. It invokes {@link #dataElement(String, Stri...
[ "Add", "an", "element", "with", "character", "data", "content", "but", "no", "qname", "or", "attributes", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLFilterBase.java#L407-L411
23,703
banq/jdonframework
src/main/java/com/jdon/util/jdom/XMLFilterBase.java
XMLFilterBase.dataElement
public void dataElement (String localName, Attributes atts, String content) throws SAXException { dataElement("", localName, "", atts, content); }
java
public void dataElement (String localName, Attributes atts, String content) throws SAXException { dataElement("", localName, "", atts, content); }
[ "public", "void", "dataElement", "(", "String", "localName", ",", "Attributes", "atts", ",", "String", "content", ")", "throws", "SAXException", "{", "dataElement", "(", "\"\"", ",", "localName", ",", "\"\"", ",", "atts", ",", "content", ")", ";", "}" ]
Add an element with character data content but no Namespace URI or qname. <p>This is a convenience method to add a complete element with character data content, including the start tag and end tag. The method provides an empty string for the Namespace URI, and empty string for the qualified name. It invokes {@link #d...
[ "Add", "an", "element", "with", "character", "data", "content", "but", "no", "Namespace", "URI", "or", "qname", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLFilterBase.java#L433-L437
23,704
banq/jdonframework
src/main/java/com/jdon/util/jdom/XMLFilterBase.java
XMLFilterBase.characters
public void characters (String data) throws SAXException { char ch[] = data.toCharArray(); characters(ch, 0, ch.length); }
java
public void characters (String data) throws SAXException { char ch[] = data.toCharArray(); characters(ch, 0, ch.length); }
[ "public", "void", "characters", "(", "String", "data", ")", "throws", "SAXException", "{", "char", "ch", "[", "]", "=", "data", ".", "toCharArray", "(", ")", ";", "characters", "(", "ch", ",", "0", ",", "ch", ".", "length", ")", ";", "}" ]
Add a string of character data, with XML escaping. <p>This is a convenience method that takes an XML String, converts it to a character array, then invokes {@link @see org.xml.sax.ContentHandler#characters}.</p> @param data The character data. @exception org.xml.sax.SAXException If a filter further down the chain rai...
[ "Add", "a", "string", "of", "character", "data", "with", "XML", "escaping", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLFilterBase.java#L479-L484
23,705
banq/jdonframework
src/main/java/com/jdon/util/jdom/XMLFilterBase.java
XMLFilterBase.installLexicalHandler
private void installLexicalHandler () { XMLReader parent = getParent(); if (parent == null) { throw new NullPointerException("No parent for filter"); } // try to register for lexical events for (int i = 0; i < LEXICAL_HANDLER_NAMES.length; i++) { ...
java
private void installLexicalHandler () { XMLReader parent = getParent(); if (parent == null) { throw new NullPointerException("No parent for filter"); } // try to register for lexical events for (int i = 0; i < LEXICAL_HANDLER_NAMES.length; i++) { ...
[ "private", "void", "installLexicalHandler", "(", ")", "{", "XMLReader", "parent", "=", "getParent", "(", ")", ";", "if", "(", "parent", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"No parent for filter\"", ")", ";", "}", "// try to r...
Installs lexical handler before a parse. <p>Before every parse, check whether the parent is non-null, and re-register the filter for the lexical events.</p>
[ "Installs", "lexical", "handler", "before", "a", "parse", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/jdom/XMLFilterBase.java#L733-L752
23,706
banq/jdonframework
src/main/java/com/jdon/container/factory/ContainerBuilderFactory.java
ContainerBuilderFactory.createContainerBuilder
public synchronized ContainerRegistryBuilder createContainerBuilder(AppContextWrapper context) { containerLoaderAnnotation.startScan(context); ContainerFactory containerFactory = new ContainerFactory(); ContainerWrapper cw = containerFactory.create(containerLoaderAnnotation.getConfigInfo()); ContainerCo...
java
public synchronized ContainerRegistryBuilder createContainerBuilder(AppContextWrapper context) { containerLoaderAnnotation.startScan(context); ContainerFactory containerFactory = new ContainerFactory(); ContainerWrapper cw = containerFactory.create(containerLoaderAnnotation.getConfigInfo()); ContainerCo...
[ "public", "synchronized", "ContainerRegistryBuilder", "createContainerBuilder", "(", "AppContextWrapper", "context", ")", "{", "containerLoaderAnnotation", ".", "startScan", "(", "context", ")", ";", "ContainerFactory", "containerFactory", "=", "new", "ContainerFactory", "(...
the main method in this class, read all components include interceptors from Xml configure file. create a micro container instance. and then returen a ContainerBuilder instance @param context @return
[ "the", "main", "method", "in", "this", "class", "read", "all", "components", "include", "interceptors", "from", "Xml", "configure", "file", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/factory/ContainerBuilderFactory.java#L53-L63
23,707
banq/jdonframework
JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/io/LazyUtil.java
LazyUtil.getHibernateClass
private static Class < ? > getHibernateClass() { Class < ? > cl = null; try { cl = Class.forName(HIBERNATE_CLASS); } catch (ClassNotFoundException e) { // in this case jar which contain // Hibernate class not found } return cl; }
java
private static Class < ? > getHibernateClass() { Class < ? > cl = null; try { cl = Class.forName(HIBERNATE_CLASS); } catch (ClassNotFoundException e) { // in this case jar which contain // Hibernate class not found } return cl; }
[ "private", "static", "Class", "<", "?", ">", "getHibernateClass", "(", ")", "{", "Class", "<", "?", ">", "cl", "=", "null", ";", "try", "{", "cl", "=", "Class", ".", "forName", "(", "HIBERNATE_CLASS", ")", ";", "}", "catch", "(", "ClassNotFoundExceptio...
Return Hibernate class instance @return Hibernate class instance if it exist
[ "Return", "Hibernate", "class", "instance" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/io/LazyUtil.java#L43-L53
23,708
banq/jdonframework
JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/io/LazyUtil.java
LazyUtil.getInitializeMethod
private static Method getInitializeMethod(Class< ? > cl) { Method method = null; try { method = cl.getDeclaredMethod(IS_INITIALIZED, new Class[]{Object.class}); } catch (NoSuchMethodException e) { //in this case 'isInitialized' method can't be null } ...
java
private static Method getInitializeMethod(Class< ? > cl) { Method method = null; try { method = cl.getDeclaredMethod(IS_INITIALIZED, new Class[]{Object.class}); } catch (NoSuchMethodException e) { //in this case 'isInitialized' method can't be null } ...
[ "private", "static", "Method", "getInitializeMethod", "(", "Class", "<", "?", ">", "cl", ")", "{", "Method", "method", "=", "null", ";", "try", "{", "method", "=", "cl", ".", "getDeclaredMethod", "(", "IS_INITIALIZED", ",", "new", "Class", "[", "]", "{",...
Return "isInitialized" Hibernate static method @param cl - "Hibernate" class instance @return "isInitialized" Hibernate static method
[ "Return", "isInitialized", "Hibernate", "static", "method" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/io/LazyUtil.java#L60-L69
23,709
banq/jdonframework
JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/io/LazyUtil.java
LazyUtil.checkInitialize
private static boolean checkInitialize(Method method, Object obj) { boolean isInitialized = true; try { isInitialized = (Boolean) method.invoke(null, new Object[] {obj}); } catch (IllegalArgumentException e) { // do nothing } catch (IllegalAccessException...
java
private static boolean checkInitialize(Method method, Object obj) { boolean isInitialized = true; try { isInitialized = (Boolean) method.invoke(null, new Object[] {obj}); } catch (IllegalArgumentException e) { // do nothing } catch (IllegalAccessException...
[ "private", "static", "boolean", "checkInitialize", "(", "Method", "method", ",", "Object", "obj", ")", "{", "boolean", "isInitialized", "=", "true", ";", "try", "{", "isInitialized", "=", "(", "Boolean", ")", "method", ".", "invoke", "(", "null", ",", "new...
Check is current property was initialized @param method - hibernate static method, which check is initilized property @param obj - object which need for lazy check @return boolean value
[ "Check", "is", "current", "property", "was", "initialized" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/io/LazyUtil.java#L78-L91
23,710
banq/jdonframework
JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/io/LazyUtil.java
LazyUtil.isPropertyInitialized
public static boolean isPropertyInitialized(Object object) { Class < ? > cl = getHibernateClass(); if (cl == null) { return true; } Method method = getInitializeMethod(cl); return checkInitialize(method, object); }
java
public static boolean isPropertyInitialized(Object object) { Class < ? > cl = getHibernateClass(); if (cl == null) { return true; } Method method = getInitializeMethod(cl); return checkInitialize(method, object); }
[ "public", "static", "boolean", "isPropertyInitialized", "(", "Object", "object", ")", "{", "Class", "<", "?", ">", "cl", "=", "getHibernateClass", "(", ")", ";", "if", "(", "cl", "==", "null", ")", "{", "return", "true", ";", "}", "Method", "method", "...
Check is current object was initialized @param object - object, which need check @return boolean value
[ "Check", "is", "current", "object", "was", "initialized" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/hessian/io/LazyUtil.java#L98-L107
23,711
banq/jdonframework
src/main/java/com/jdon/container/builder/DefaultContainerBuilder.java
DefaultContainerBuilder.registerAppRoot
public void registerAppRoot(String configureFileName) throws Exception { try { AppConfigureCollection existedAppConfigureFiles = (AppConfigureCollection) containerWrapper.lookup(AppConfigureCollection.NAME); if (existedAppConfigureFiles == null) { xmlcontainerRegistry.registerAppRoot(); existedAppC...
java
public void registerAppRoot(String configureFileName) throws Exception { try { AppConfigureCollection existedAppConfigureFiles = (AppConfigureCollection) containerWrapper.lookup(AppConfigureCollection.NAME); if (existedAppConfigureFiles == null) { xmlcontainerRegistry.registerAppRoot(); existedAppC...
[ "public", "void", "registerAppRoot", "(", "String", "configureFileName", ")", "throws", "Exception", "{", "try", "{", "AppConfigureCollection", "existedAppConfigureFiles", "=", "(", "AppConfigureCollection", ")", "containerWrapper", ".", "lookup", "(", "AppConfigureCollec...
if there are xml configure then add new ones; if not, register it; @param configList Collection the configure collection for jdonframework.xml
[ "if", "there", "are", "xml", "configure", "then", "add", "new", "ones", ";", "if", "not", "register", "it", ";" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/builder/DefaultContainerBuilder.java#L77-L92
23,712
banq/jdonframework
src/main/java/com/jdon/container/builder/DefaultContainerBuilder.java
DefaultContainerBuilder.registerComponents
public void registerComponents() throws Exception { Debug.logVerbose("[JdonFramework] note: registe all basic components in container.xml size=" + basicComponents.size(), module); try { Iterator iter = basicComponents.iterator(); while (iter.hasNext()) { String name = (String) iter.next(); Compo...
java
public void registerComponents() throws Exception { Debug.logVerbose("[JdonFramework] note: registe all basic components in container.xml size=" + basicComponents.size(), module); try { Iterator iter = basicComponents.iterator(); while (iter.hasNext()) { String name = (String) iter.next(); Compo...
[ "public", "void", "registerComponents", "(", ")", "throws", "Exception", "{", "Debug", ".", "logVerbose", "(", "\"[JdonFramework] note: registe all basic components in container.xml size=\"", "+", "basicComponents", ".", "size", "(", ")", ",", "module", ")", ";", "try",...
register all basic components in container.xml
[ "register", "all", "basic", "components", "in", "container", ".", "xml" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/builder/DefaultContainerBuilder.java#L97-L111
23,713
banq/jdonframework
src/main/java/com/jdon/container/builder/DefaultContainerBuilder.java
DefaultContainerBuilder.registerAspectComponents
public void registerAspectComponents() throws Exception { Debug.logVerbose("[JdonFramework] note: registe aspect components ", module); try { InterceptorsChain existedInterceptorsChain = (InterceptorsChain) containerWrapper.lookup(ComponentKeys.INTERCEPTOR_CHAIN); Iterator iter = aspectConfigComponents....
java
public void registerAspectComponents() throws Exception { Debug.logVerbose("[JdonFramework] note: registe aspect components ", module); try { InterceptorsChain existedInterceptorsChain = (InterceptorsChain) containerWrapper.lookup(ComponentKeys.INTERCEPTOR_CHAIN); Iterator iter = aspectConfigComponents....
[ "public", "void", "registerAspectComponents", "(", ")", "throws", "Exception", "{", "Debug", ".", "logVerbose", "(", "\"[JdonFramework] note: registe aspect components \"", ",", "module", ")", ";", "try", "{", "InterceptorsChain", "existedInterceptorsChain", "=", "(", "...
register all apsect components in aspect.xml
[ "register", "all", "apsect", "components", "in", "aspect", ".", "xml" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/builder/DefaultContainerBuilder.java#L116-L137
23,714
banq/jdonframework
src/main/java/com/jdon/util/FileUtil.java
FileUtil.createFile
public static void createFile(String output, String content) throws Exception { OutputStreamWriter fw = null; PrintWriter out = null; try { if (ENCODING == null) ENCODING = PropsUtil.ENCODING; fw = new OutputStreamWriter(new FileOutputStream(output), ENCODING); out = new PrintWriter(fw); ...
java
public static void createFile(String output, String content) throws Exception { OutputStreamWriter fw = null; PrintWriter out = null; try { if (ENCODING == null) ENCODING = PropsUtil.ENCODING; fw = new OutputStreamWriter(new FileOutputStream(output), ENCODING); out = new PrintWriter(fw); ...
[ "public", "static", "void", "createFile", "(", "String", "output", ",", "String", "content", ")", "throws", "Exception", "{", "OutputStreamWriter", "fw", "=", "null", ";", "PrintWriter", "out", "=", "null", ";", "try", "{", "if", "(", "ENCODING", "==", "nu...
write the content to a file; @param output @param content @throws Exception
[ "write", "the", "content", "to", "a", "file", ";" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/FileUtil.java#L38-L57
23,715
banq/jdonframework
src/main/java/com/jdon/util/FileUtil.java
FileUtil.readFile
public static String readFile(String input) throws Exception { char[] buffer = new char[4096]; int len = 0; StringBuilder content = new StringBuilder(4096); if (ENCODING == null) ENCODING = PropsUtil.ENCODING; InputStreamReader fr = null; BufferedReader br = null; try { fr = new InputStre...
java
public static String readFile(String input) throws Exception { char[] buffer = new char[4096]; int len = 0; StringBuilder content = new StringBuilder(4096); if (ENCODING == null) ENCODING = PropsUtil.ENCODING; InputStreamReader fr = null; BufferedReader br = null; try { fr = new InputStre...
[ "public", "static", "String", "readFile", "(", "String", "input", ")", "throws", "Exception", "{", "char", "[", "]", "buffer", "=", "new", "char", "[", "4096", "]", ";", "int", "len", "=", "0", ";", "StringBuilder", "content", "=", "new", "StringBuilder"...
read the content from a file; @param output @param content @throws Exception
[ "read", "the", "content", "from", "a", "file", ";" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/FileUtil.java#L66-L90
23,716
banq/jdonframework
src/main/java/com/jdon/util/FileUtil.java
FileUtil.move
public static void move(String input, String output) throws Exception { File inputFile = new File(input); File outputFile = new File(output); try { inputFile.renameTo(outputFile); } catch (Exception ex) { throw new Exception("Can not mv" + input + " to " + output + ex.getMessage()); } }
java
public static void move(String input, String output) throws Exception { File inputFile = new File(input); File outputFile = new File(output); try { inputFile.renameTo(outputFile); } catch (Exception ex) { throw new Exception("Can not mv" + input + " to " + output + ex.getMessage()); } }
[ "public", "static", "void", "move", "(", "String", "input", ",", "String", "output", ")", "throws", "Exception", "{", "File", "inputFile", "=", "new", "File", "(", "input", ")", ";", "File", "outputFile", "=", "new", "File", "(", "output", ")", ";", "t...
This class moves an input file to output file @param String input file to move from @param String output file
[ "This", "class", "moves", "an", "input", "file", "to", "output", "file" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/FileUtil.java#L101-L109
23,717
banq/jdonframework
src/main/java/com/jdon/util/FileUtil.java
FileUtil.copy
public static boolean copy(String input, String output) throws Exception { int BUFSIZE = 65536; FileInputStream fis = new FileInputStream(input); FileOutputStream fos = new FileOutputStream(output); try { int s; byte[] buf = new byte[BUFSIZE]; while ((s = fis.read(buf)) > -1) { fos.write(...
java
public static boolean copy(String input, String output) throws Exception { int BUFSIZE = 65536; FileInputStream fis = new FileInputStream(input); FileOutputStream fos = new FileOutputStream(output); try { int s; byte[] buf = new byte[BUFSIZE]; while ((s = fis.read(buf)) > -1) { fos.write(...
[ "public", "static", "boolean", "copy", "(", "String", "input", ",", "String", "output", ")", "throws", "Exception", "{", "int", "BUFSIZE", "=", "65536", ";", "FileInputStream", "fis", "=", "new", "FileInputStream", "(", "input", ")", ";", "FileOutputStream", ...
This class copies an input file to output file @param String input file to copy from @param String output file
[ "This", "class", "copies", "an", "input", "file", "to", "output", "file" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/FileUtil.java#L119-L138
23,718
banq/jdonframework
src/main/java/com/jdon/util/FileUtil.java
FileUtil.CopyDir
public static void CopyDir(String sourcedir, String destdir) throws Exception { File dest = new File(destdir); File source = new File(sourcedir); String[] files = source.list(); try { makehome(destdir); } catch (Exception ex) { throw new Exception("CopyDir:" + ex.getMessage()); } for (i...
java
public static void CopyDir(String sourcedir, String destdir) throws Exception { File dest = new File(destdir); File source = new File(sourcedir); String[] files = source.list(); try { makehome(destdir); } catch (Exception ex) { throw new Exception("CopyDir:" + ex.getMessage()); } for (i...
[ "public", "static", "void", "CopyDir", "(", "String", "sourcedir", ",", "String", "destdir", ")", "throws", "Exception", "{", "File", "dest", "=", "new", "File", "(", "destdir", ")", ";", "File", "source", "=", "new", "File", "(", "sourcedir", ")", ";", ...
This class copies an input files of a directory to another directory not include subdir @param String sourcedir the directory to copy from such as:/home/bqlr/images @param String destdir the target directory
[ "This", "class", "copies", "an", "input", "files", "of", "a", "directory", "to", "another", "directory", "not", "include", "subdir" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/FileUtil.java#L166-L189
23,719
banq/jdonframework
src/main/java/com/jdon/util/FileUtil.java
FileUtil.recursiveRemoveDir
public static void recursiveRemoveDir(File directory) throws Exception { if (!directory.exists()) throw new IOException(directory.toString() + " do not exist!"); String[] filelist = directory.list(); File tmpFile = null; for (int i = 0; i < filelist.length; i++) { tmpFile = new File(directory.getA...
java
public static void recursiveRemoveDir(File directory) throws Exception { if (!directory.exists()) throw new IOException(directory.toString() + " do not exist!"); String[] filelist = directory.list(); File tmpFile = null; for (int i = 0; i < filelist.length; i++) { tmpFile = new File(directory.getA...
[ "public", "static", "void", "recursiveRemoveDir", "(", "File", "directory", ")", "throws", "Exception", "{", "if", "(", "!", "directory", ".", "exists", "(", ")", ")", "throw", "new", "IOException", "(", "directory", ".", "toString", "(", ")", "+", "\" do ...
This class del a directory recursively,that means delete all files and directorys. @param File directory the directory that will be deleted.
[ "This", "class", "del", "a", "directory", "recursively", "that", "means", "delete", "all", "files", "and", "directorys", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/FileUtil.java#L198-L223
23,720
banq/jdonframework
src/main/java/com/jdon/container/access/UserTargetMetaDefFactory.java
UserTargetMetaDefFactory.createTargetMetaRequest
public void createTargetMetaRequest(TargetMetaDef targetMetaDef, ContextHolder holder) { ContainerWrapper containerWrapper = servletContainerFinder.findContainer(holder.getAppContextHolder()); // get HttpSessionVisitorFactoryImp VisitorFactory visitorFactory = (VisitorFactory) containerWrapper.lookup(Component...
java
public void createTargetMetaRequest(TargetMetaDef targetMetaDef, ContextHolder holder) { ContainerWrapper containerWrapper = servletContainerFinder.findContainer(holder.getAppContextHolder()); // get HttpSessionVisitorFactoryImp VisitorFactory visitorFactory = (VisitorFactory) containerWrapper.lookup(Component...
[ "public", "void", "createTargetMetaRequest", "(", "TargetMetaDef", "targetMetaDef", ",", "ContextHolder", "holder", ")", "{", "ContainerWrapper", "containerWrapper", "=", "servletContainerFinder", ".", "findContainer", "(", "holder", ".", "getAppContextHolder", "(", ")", ...
create a targetMetaRequest instance. @param containerWrapper @param targetMetaDef @param request @return
[ "create", "a", "targetMetaRequest", "instance", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/access/UserTargetMetaDefFactory.java#L60-L68
23,721
banq/jdonframework
src/main/java/com/jdon/domain/message/DomainMessage.java
DomainMessage.getEventResult
public Object getEventResult() { Object result = eventResultCache.get(); if (result != null) { return result; } if (eventResultHandler != null) { result = eventResultHandler.get(); if (result != null){ if (!eventResultCache.compareAndSet(null, result)){ result = eventResultCache.get...
java
public Object getEventResult() { Object result = eventResultCache.get(); if (result != null) { return result; } if (eventResultHandler != null) { result = eventResultHandler.get(); if (result != null){ if (!eventResultCache.compareAndSet(null, result)){ result = eventResultCache.get...
[ "public", "Object", "getEventResult", "(", ")", "{", "Object", "result", "=", "eventResultCache", ".", "get", "(", ")", ";", "if", "(", "result", "!=", "null", ")", "{", "return", "result", ";", "}", "if", "(", "eventResultHandler", "!=", "null", ")", ...
get a Event Result until time out value @return Event Result
[ "get", "a", "Event", "Result", "until", "time", "out", "value" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/domain/message/DomainMessage.java#L73-L88
23,722
banq/jdonframework
src/main/java/com/jdon/container/visitor/ComponentOriginalVisitor.java
ComponentOriginalVisitor.visit
public Object visit() { Object o = null; try { ContainerWrapper containerWrapper = containerCallback.getContainerWrapper(); TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest(); Debug.logVerbose("[JdonFramework] ComponentOriginalVisitor active:" + targetMetaRequest.get...
java
public Object visit() { Object o = null; try { ContainerWrapper containerWrapper = containerCallback.getContainerWrapper(); TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest(); Debug.logVerbose("[JdonFramework] ComponentOriginalVisitor active:" + targetMetaRequest.get...
[ "public", "Object", "visit", "(", ")", "{", "Object", "o", "=", "null", ";", "try", "{", "ContainerWrapper", "containerWrapper", "=", "containerCallback", ".", "getContainerWrapper", "(", ")", ";", "TargetMetaRequest", "targetMetaRequest", "=", "targetMetaRequestsHo...
find the visitable component from container, and execute it's accept method, the return result is the tager service object.
[ "find", "the", "visitable", "component", "from", "container", "and", "execute", "it", "s", "accept", "method", "the", "return", "result", "is", "the", "tager", "service", "object", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/visitor/ComponentOriginalVisitor.java#L55-L68
23,723
banq/jdonframework
JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/handler/HandlerMethodMetaArgsFactory.java
HandlerMethodMetaArgsFactory.createinitMethod
public MethodMetaArgs createinitMethod(HandlerMetaDef handlerMetaDef, EventModel em) { String p_methodName = handlerMetaDef.getInitMethod(); if (p_methodName == null) return null; return createCRUDMethodMetaArgs(p_methodName, em); }
java
public MethodMetaArgs createinitMethod(HandlerMetaDef handlerMetaDef, EventModel em) { String p_methodName = handlerMetaDef.getInitMethod(); if (p_methodName == null) return null; return createCRUDMethodMetaArgs(p_methodName, em); }
[ "public", "MethodMetaArgs", "createinitMethod", "(", "HandlerMetaDef", "handlerMetaDef", ",", "EventModel", "em", ")", "{", "String", "p_methodName", "=", "handlerMetaDef", ".", "getInitMethod", "(", ")", ";", "if", "(", "p_methodName", "==", "null", ")", "return"...
create init method @param handlerMetaDef @return MethodMetaArgs instance
[ "create", "init", "method" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/handler/HandlerMethodMetaArgsFactory.java#L46-L51
23,724
banq/jdonframework
JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/handler/HandlerMethodMetaArgsFactory.java
HandlerMethodMetaArgsFactory.createGetMethod
public MethodMetaArgs createGetMethod(HandlerMetaDef handlerMetaDef, Object keyValue) { String p_methodName = handlerMetaDef.getFindMethod(); if (p_methodName == null) { Debug.logError("[JdonFramework] not configure the findMethod parameter: <getMethod name=XXXXX /> ", module); } if (keyValue == null)...
java
public MethodMetaArgs createGetMethod(HandlerMetaDef handlerMetaDef, Object keyValue) { String p_methodName = handlerMetaDef.getFindMethod(); if (p_methodName == null) { Debug.logError("[JdonFramework] not configure the findMethod parameter: <getMethod name=XXXXX /> ", module); } if (keyValue == null)...
[ "public", "MethodMetaArgs", "createGetMethod", "(", "HandlerMetaDef", "handlerMetaDef", ",", "Object", "keyValue", ")", "{", "String", "p_methodName", "=", "handlerMetaDef", ".", "getFindMethod", "(", ")", ";", "if", "(", "p_methodName", "==", "null", ")", "{", ...
create find method the service's find method parameter type must be String type @param handlerMetaDef @param keyValue @return MethodMetaArgs instance
[ "create", "find", "method", "the", "service", "s", "find", "method", "parameter", "type", "must", "be", "String", "type" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/model/handler/HandlerMethodMetaArgsFactory.java#L61-L72
23,725
banq/jdonframework
src/main/java/com/jdon/aop/interceptor/SessionContextInterceptor.java
SessionContextInterceptor.setSessionContext
private void setSessionContext(Object targetObject, TargetMetaRequest targetMetaRequest) { if (isSessionContextAcceptables.contains(targetMetaRequest.getTargetMetaDef().getName())) { SessionContextAcceptable myResult = (SessionContextAcceptable) targetObject; SessionContext sessionContext = targetMetaRequest...
java
private void setSessionContext(Object targetObject, TargetMetaRequest targetMetaRequest) { if (isSessionContextAcceptables.contains(targetMetaRequest.getTargetMetaDef().getName())) { SessionContextAcceptable myResult = (SessionContextAcceptable) targetObject; SessionContext sessionContext = targetMetaRequest...
[ "private", "void", "setSessionContext", "(", "Object", "targetObject", ",", "TargetMetaRequest", "targetMetaRequest", ")", "{", "if", "(", "isSessionContextAcceptables", ".", "contains", "(", "targetMetaRequest", ".", "getTargetMetaDef", "(", ")", ".", "getName", "(",...
WebServiceAccessorImp create sessionContext and save infomation into it
[ "WebServiceAccessorImp", "create", "sessionContext", "and", "save", "infomation", "into", "it" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/aop/interceptor/SessionContextInterceptor.java#L137-L153
23,726
banq/jdonframework
JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/http/HttpClient.java
HttpClient.invoke
public Object invoke(TargetMetaDef targetMetaDef, Method m, Object[] args) throws Throwable { Object result = null; getThreadLock(); int currentRequestNb = requestNb++; Debug.logVerbose("[JdonFramework]Start remote call " + currentRequestNb + " " + m.getName(), module); // 准备参数 HttpRequest reque...
java
public Object invoke(TargetMetaDef targetMetaDef, Method m, Object[] args) throws Throwable { Object result = null; getThreadLock(); int currentRequestNb = requestNb++; Debug.logVerbose("[JdonFramework]Start remote call " + currentRequestNb + " " + m.getName(), module); // 准备参数 HttpRequest reque...
[ "public", "Object", "invoke", "(", "TargetMetaDef", "targetMetaDef", ",", "Method", "m", ",", "Object", "[", "]", "args", ")", "throws", "Throwable", "{", "Object", "result", "=", "null", ";", "getThreadLock", "(", ")", ";", "int", "currentRequestNb", "=", ...
Invokes EJB service
[ "Invokes", "EJB", "service" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/http/HttpClient.java#L78-L102
23,727
banq/jdonframework
JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/http/HttpClient.java
HttpClient.invokeHttp
public Object invokeHttp(HttpRequest request, Object[] args) throws Throwable { HttpResponse httpResponse; try { HttpConnectionHelper httpConnectionHelper = new HttpConnectionHelper(); HttpURLConnection httpURLConnection; if (httpServerParam.isDebug()) {// 调试方式无需安全验证 // 连接服务器 Debug.logVerb...
java
public Object invokeHttp(HttpRequest request, Object[] args) throws Throwable { HttpResponse httpResponse; try { HttpConnectionHelper httpConnectionHelper = new HttpConnectionHelper(); HttpURLConnection httpURLConnection; if (httpServerParam.isDebug()) {// 调试方式无需安全验证 // 连接服务器 Debug.logVerb...
[ "public", "Object", "invokeHttp", "(", "HttpRequest", "request", ",", "Object", "[", "]", "args", ")", "throws", "Throwable", "{", "HttpResponse", "httpResponse", ";", "try", "{", "HttpConnectionHelper", "httpConnectionHelper", "=", "new", "HttpConnectionHelper", "(...
Performs the http call.
[ "Performs", "the", "http", "call", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/http/HttpClient.java#L107-L154
23,728
banq/jdonframework
JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/http/HttpClient.java
HttpClient.getThreadLock
private synchronized void getThreadLock() { while (sessionId == null && curUsedThread > 1) { try { Debug.logVerbose("No session. Only one thread is authorized. Waiting ...", module); wait(); } catch (InterruptedException e) { e.printStackTrace(); } } while (curUsedThread >= maxThre...
java
private synchronized void getThreadLock() { while (sessionId == null && curUsedThread > 1) { try { Debug.logVerbose("No session. Only one thread is authorized. Waiting ...", module); wait(); } catch (InterruptedException e) { e.printStackTrace(); } } while (curUsedThread >= maxThre...
[ "private", "synchronized", "void", "getThreadLock", "(", ")", "{", "while", "(", "sessionId", "==", "null", "&&", "curUsedThread", ">", "1", ")", "{", "try", "{", "Debug", ".", "logVerbose", "(", "\"No session. Only one thread is authorized. Waiting ...\"", ",", "...
This method is used to limit the concurrent http call to the max fixed by maxThreadCount and to wait the end of the first call that will return the session id.
[ "This", "method", "is", "used", "to", "limit", "the", "concurrent", "http", "call", "to", "the", "max", "fixed", "by", "maxThreadCount", "and", "to", "wait", "the", "end", "of", "the", "first", "call", "that", "will", "return", "the", "session", "id", "....
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-remote/src/main/java/com/jdon/bussinessproxy/remote/http/HttpClient.java#L231-L250
23,729
banq/jdonframework
src/main/java/com/jdon/aop/reflection/MethodConstructor.java
MethodConstructor.createMethod
public Method createMethod(TargetServiceFactory targetServiceFactory) { Method method = null; Debug.logVerbose("[JdonFramework] enter create the Method " , module); try { TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest(); if (targetMe...
java
public Method createMethod(TargetServiceFactory targetServiceFactory) { Method method = null; Debug.logVerbose("[JdonFramework] enter create the Method " , module); try { TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest(); if (targetMe...
[ "public", "Method", "createMethod", "(", "TargetServiceFactory", "targetServiceFactory", ")", "{", "Method", "method", "=", "null", ";", "Debug", ".", "logVerbose", "(", "\"[JdonFramework] enter create the Method \"", ",", "module", ")", ";", "try", "{", "TargetMetaRe...
ejb's method creating must at first get service's EJB Object; pojo's method creating can only need service's class. @param targetServiceFactory @param targetMetaRequest @param methodMetaArgs @return
[ "ejb", "s", "method", "creating", "must", "at", "first", "get", "service", "s", "EJB", "Object", ";", "pojo", "s", "method", "creating", "can", "only", "need", "service", "s", "class", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/aop/reflection/MethodConstructor.java#L60-L77
23,730
banq/jdonframework
src/main/java/com/jdon/aop/reflection/MethodConstructor.java
MethodConstructor.createPojoMethod
public Method createPojoMethod() { Method method = null; TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest(); TargetMetaDef targetMetaDef = targetMetaRequest.getTargetMetaDef(); MethodMetaArgs methodMetaArgs = targetMetaRequest.getMethodMetaArgs(); ...
java
public Method createPojoMethod() { Method method = null; TargetMetaRequest targetMetaRequest = targetMetaRequestsHolder.getTargetMetaRequest(); TargetMetaDef targetMetaDef = targetMetaRequest.getTargetMetaDef(); MethodMetaArgs methodMetaArgs = targetMetaRequest.getMethodMetaArgs(); ...
[ "public", "Method", "createPojoMethod", "(", ")", "{", "Method", "method", "=", "null", ";", "TargetMetaRequest", "targetMetaRequest", "=", "targetMetaRequestsHolder", ".", "getTargetMetaRequest", "(", ")", ";", "TargetMetaDef", "targetMetaDef", "=", "targetMetaRequest"...
create a method object by its meta definition @param targetMetaDef @param cw @param methodMetaArgs
[ "create", "a", "method", "object", "by", "its", "meta", "definition" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/aop/reflection/MethodConstructor.java#L86-L110
23,731
banq/jdonframework
src/main/java/com/jdon/aop/reflection/MethodConstructor.java
MethodConstructor.createObjectMethod
public Method createObjectMethod(Object ownerClass, MethodMetaArgs methodMetaArgs) { Method m = null; try { m = ownerClass.getClass().getMethod(methodMetaArgs.getMethodName(), methodMetaArgs.getParamTypes()); } catch (NoSu...
java
public Method createObjectMethod(Object ownerClass, MethodMetaArgs methodMetaArgs) { Method m = null; try { m = ownerClass.getClass().getMethod(methodMetaArgs.getMethodName(), methodMetaArgs.getParamTypes()); } catch (NoSu...
[ "public", "Method", "createObjectMethod", "(", "Object", "ownerClass", ",", "MethodMetaArgs", "methodMetaArgs", ")", "{", "Method", "m", "=", "null", ";", "try", "{", "m", "=", "ownerClass", ".", "getClass", "(", ")", ".", "getMethod", "(", "methodMetaArgs", ...
create a method object by target Object @param ownerClass @param methodMetaArgs @return
[ "create", "a", "method", "object", "by", "target", "Object" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/aop/reflection/MethodConstructor.java#L118-L131
23,732
banq/jdonframework
src/main/java/com/jdon/aop/reflection/MethodConstructor.java
MethodConstructor.createObjectMethod
public Method createObjectMethod(Object ownerClass, String methodName, Class[] paramTypes) { Method m = null; try { m = ownerClass.getClass().getMethod(methodName, paramTypes); } catch (NoSuchMethodException nsme) { String errS = " NoSuchMethod:" + metho...
java
public Method createObjectMethod(Object ownerClass, String methodName, Class[] paramTypes) { Method m = null; try { m = ownerClass.getClass().getMethod(methodName, paramTypes); } catch (NoSuchMethodException nsme) { String errS = " NoSuchMethod:" + metho...
[ "public", "Method", "createObjectMethod", "(", "Object", "ownerClass", ",", "String", "methodName", ",", "Class", "[", "]", "paramTypes", ")", "{", "Method", "m", "=", "null", ";", "try", "{", "m", "=", "ownerClass", ".", "getClass", "(", ")", ".", "getM...
create a method object @param ownerClass @param methodName @param paramTypes @return
[ "create", "a", "method", "object" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/aop/reflection/MethodConstructor.java#L140-L153
23,733
banq/jdonframework
src/main/java/com/jdon/util/FileLocator.java
FileLocator.getConfPathXmlStream
public InputStream getConfPathXmlStream(String filePathName){ int i = filePathName.lastIndexOf(".xml"); String name = filePathName.substring(0, i); name = name.replace('.', '/'); name += ".xml"; return getConfStream(name); }
java
public InputStream getConfPathXmlStream(String filePathName){ int i = filePathName.lastIndexOf(".xml"); String name = filePathName.substring(0, i); name = name.replace('.', '/'); name += ".xml"; return getConfStream(name); }
[ "public", "InputStream", "getConfPathXmlStream", "(", "String", "filePathName", ")", "{", "int", "i", "=", "filePathName", ".", "lastIndexOf", "(", "\".xml\"", ")", ";", "String", "name", "=", "filePathName", ".", "substring", "(", "0", ",", "i", ")", ";", ...
same as getConfPathXmlFile @param filePathName @return the InputStream intance
[ "same", "as", "getConfPathXmlFile" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/FileLocator.java#L48-L54
23,734
banq/jdonframework
src/main/java/com/jdon/util/MultiHashMap.java
MultiHashMap.put
public Object put(Object key,Object subKey,Object value){ HashMap a = (HashMap)super.get(key); if(a==null){ a = new HashMap(); super.put(key,a); } return a.put(subKey,value); }
java
public Object put(Object key,Object subKey,Object value){ HashMap a = (HashMap)super.get(key); if(a==null){ a = new HashMap(); super.put(key,a); } return a.put(subKey,value); }
[ "public", "Object", "put", "(", "Object", "key", ",", "Object", "subKey", ",", "Object", "value", ")", "{", "HashMap", "a", "=", "(", "HashMap", ")", "super", ".", "get", "(", "key", ")", ";", "if", "(", "a", "==", "null", ")", "{", "a", "=", "...
Associates the specified value with the specified key and subKey in this map. If the map previously contained a mapping for this key and subKey , the old value is replaced. @param key Is a Primary key. @param subKey with which the specified value is to be associated. @param value to be associated with the specified ke...
[ "Associates", "the", "specified", "value", "with", "the", "specified", "key", "and", "subKey", "in", "this", "map", ".", "If", "the", "map", "previously", "contained", "a", "mapping", "for", "this", "key", "and", "subKey", "the", "old", "value", "is", "rep...
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/MultiHashMap.java#L33-L40
23,735
banq/jdonframework
src/main/java/com/jdon/util/MultiHashMap.java
MultiHashMap.get
public Object get(Object key,Object subKey){ HashMap a = (HashMap)super.get(key); if(a!=null){ Object b=a.get(subKey); return b; } return null; }
java
public Object get(Object key,Object subKey){ HashMap a = (HashMap)super.get(key); if(a!=null){ Object b=a.get(subKey); return b; } return null; }
[ "public", "Object", "get", "(", "Object", "key", ",", "Object", "subKey", ")", "{", "HashMap", "a", "=", "(", "HashMap", ")", "super", ".", "get", "(", "key", ")", ";", "if", "(", "a", "!=", "null", ")", "{", "Object", "b", "=", "a", ".", "get"...
Returns the value to which this map maps the specified key and subKey. Returns null if the map contains no mapping for this key and subKey. A return value of null does not necessarily indicate that the map contains no mapping for the key and subKey; it's also possible that the map explicitly maps the key to null. The c...
[ "Returns", "the", "value", "to", "which", "this", "map", "maps", "the", "specified", "key", "and", "subKey", ".", "Returns", "null", "if", "the", "map", "contains", "no", "mapping", "for", "this", "key", "and", "subKey", ".", "A", "return", "value", "of"...
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/MultiHashMap.java#L51-L58
23,736
banq/jdonframework
src/main/java/com/jdon/container/startup/ContainerSetupScript.java
ContainerSetupScript.initialized
public void initialized(AppContextWrapper context) { ContainerRegistryBuilder cb = (ContainerRegistryBuilder) context.getAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME); if (cb != null) return; try { synchronized (context) { cb = containerBuilderContext.createContainerBuilde...
java
public void initialized(AppContextWrapper context) { ContainerRegistryBuilder cb = (ContainerRegistryBuilder) context.getAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME); if (cb != null) return; try { synchronized (context) { cb = containerBuilderContext.createContainerBuilde...
[ "public", "void", "initialized", "(", "AppContextWrapper", "context", ")", "{", "ContainerRegistryBuilder", "cb", "=", "(", "ContainerRegistryBuilder", ")", "context", ".", "getAttribute", "(", "ContainerRegistryBuilder", ".", "APPLICATION_CONTEXT_ATTRIBUTE_NAME", ")", ";...
Initialize application container @param context ServletContext
[ "Initialize", "application", "container" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/startup/ContainerSetupScript.java#L45-L58
23,737
banq/jdonframework
src/main/java/com/jdon/container/startup/ContainerSetupScript.java
ContainerSetupScript.prepare
public synchronized void prepare(String configureFileName, AppContextWrapper context) { ContainerRegistryBuilder cb; try { cb = (ContainerRegistryBuilder) context.getAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME); if (cb == null) { initialized(context); cb = (ContainerReg...
java
public synchronized void prepare(String configureFileName, AppContextWrapper context) { ContainerRegistryBuilder cb; try { cb = (ContainerRegistryBuilder) context.getAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME); if (cb == null) { initialized(context); cb = (ContainerReg...
[ "public", "synchronized", "void", "prepare", "(", "String", "configureFileName", ",", "AppContextWrapper", "context", ")", "{", "ContainerRegistryBuilder", "cb", ";", "try", "{", "cb", "=", "(", "ContainerRegistryBuilder", ")", "context", ".", "getAttribute", "(", ...
prepare to the applicaition xml Configure for container; @param configList Collection @param context ServletContext
[ "prepare", "to", "the", "applicaition", "xml", "Configure", "for", "container", ";" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/startup/ContainerSetupScript.java#L68-L81
23,738
banq/jdonframework
src/main/java/com/jdon/container/startup/ContainerSetupScript.java
ContainerSetupScript.startup
public synchronized void startup(AppContextWrapper context) { ContainerRegistryBuilder cb; try { cb = (ContainerRegistryBuilder) context.getAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME); if (cb == null) { Debug.logError("[JdonFramework] at first call prepare method"); re...
java
public synchronized void startup(AppContextWrapper context) { ContainerRegistryBuilder cb; try { cb = (ContainerRegistryBuilder) context.getAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME); if (cb == null) { Debug.logError("[JdonFramework] at first call prepare method"); re...
[ "public", "synchronized", "void", "startup", "(", "AppContextWrapper", "context", ")", "{", "ContainerRegistryBuilder", "cb", ";", "try", "{", "cb", "=", "(", "ContainerRegistryBuilder", ")", "context", ".", "getAttribute", "(", "ContainerRegistryBuilder", ".", "APP...
startup Application container @param configList Collection @param context ServletContext
[ "startup", "Application", "container" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/startup/ContainerSetupScript.java#L92-L107
23,739
banq/jdonframework
src/main/java/com/jdon/container/startup/ContainerSetupScript.java
ContainerSetupScript.destroyed
public synchronized void destroyed(AppContextWrapper context) { try { ContainerRegistryBuilder cb = (ContainerRegistryBuilder) context .getAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME); if (cb != null) { ContainerDirector cd = new ContainerDirector(cb); cd.shutdown();...
java
public synchronized void destroyed(AppContextWrapper context) { try { ContainerRegistryBuilder cb = (ContainerRegistryBuilder) context .getAttribute(ContainerRegistryBuilder.APPLICATION_CONTEXT_ATTRIBUTE_NAME); if (cb != null) { ContainerDirector cd = new ContainerDirector(cb); cd.shutdown();...
[ "public", "synchronized", "void", "destroyed", "(", "AppContextWrapper", "context", ")", "{", "try", "{", "ContainerRegistryBuilder", "cb", "=", "(", "ContainerRegistryBuilder", ")", "context", ".", "getAttribute", "(", "ContainerRegistryBuilder", ".", "APPLICATION_CONT...
desroy Application container @param context ServletContext
[ "desroy", "Application", "container" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/startup/ContainerSetupScript.java#L115-L131
23,740
banq/jdonframework
src/main/java/com/jdon/util/ObjectStreamUtil.java
ObjectStreamUtil.objectToBytes
public static byte[] objectToBytes(Object object) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream os = new ObjectOutputStream(baos); os.writeObject(object); return baos.toByteArray(); }
java
public static byte[] objectToBytes(Object object) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream os = new ObjectOutputStream(baos); os.writeObject(object); return baos.toByteArray(); }
[ "public", "static", "byte", "[", "]", "objectToBytes", "(", "Object", "object", ")", "throws", "IOException", "{", "ByteArrayOutputStream", "baos", "=", "new", "ByteArrayOutputStream", "(", ")", ";", "ObjectOutputStream", "os", "=", "new", "ObjectOutputStream", "(...
Converts a serializable object to a byte array.
[ "Converts", "a", "serializable", "object", "to", "a", "byte", "array", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/ObjectStreamUtil.java#L10-L15
23,741
banq/jdonframework
src/main/java/com/jdon/util/ObjectStreamUtil.java
ObjectStreamUtil.bytesToObject
public static Object bytesToObject(byte[] bytes) throws IOException, ClassNotFoundException { ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream is = new ObjectInputStream(bais); return is.readObject(); }
java
public static Object bytesToObject(byte[] bytes) throws IOException, ClassNotFoundException { ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream is = new ObjectInputStream(bais); return is.readObject(); }
[ "public", "static", "Object", "bytesToObject", "(", "byte", "[", "]", "bytes", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "ByteArrayInputStream", "bais", "=", "new", "ByteArrayInputStream", "(", "bytes", ")", ";", "ObjectInputStream", "is", ...
Converts a byte array to a serializable object.
[ "Converts", "a", "byte", "array", "to", "a", "serializable", "object", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/ObjectStreamUtil.java#L20-L25
23,742
banq/jdonframework
JdonAccessory/jdon-struts1x/src/main/java/com/jdon/controller/config/XmlPojoServiceParser.java
XmlPojoServiceParser.parsePOJOServiceConfig
private void parsePOJOServiceConfig(Element pojoService, Map<String, TargetMetaDef> mps) throws Exception { String name = pojoService.getAttributeValue("name"); String className = pojoService.getAttributeValue("class"); Debug.logVerbose("[JdonFramework] pojoService/component name=" + name + " class=" ...
java
private void parsePOJOServiceConfig(Element pojoService, Map<String, TargetMetaDef> mps) throws Exception { String name = pojoService.getAttributeValue("name"); String className = pojoService.getAttributeValue("class"); Debug.logVerbose("[JdonFramework] pojoService/component name=" + name + " class=" ...
[ "private", "void", "parsePOJOServiceConfig", "(", "Element", "pojoService", ",", "Map", "<", "String", ",", "TargetMetaDef", ">", "mps", ")", "throws", "Exception", "{", "String", "name", "=", "pojoService", ".", "getAttributeValue", "(", "\"name\"", ")", ";", ...
parse POJOService Config @param pojoService Element @param mps Map @throws Exception
[ "parse", "POJOService", "Config" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/controller/config/XmlPojoServiceParser.java#L62-L97
23,743
banq/jdonframework
JdonAccessory/jdon-struts1x/src/main/java/com/jdon/servicelocator/web/ServiceLocator.java
ServiceLocator.getLocalHome
public EJBLocalHome getLocalHome(String jndiHomeName) throws ServiceLocatorException { Debug.logVerbose("[JdonFramework] -- > getLocalHome.... ", module); EJBLocalHome home = null; try { if (cache.containsKey(jndiHomeName)) { home = (EJBLocalHome) cache.get(jndiHomeName); } ...
java
public EJBLocalHome getLocalHome(String jndiHomeName) throws ServiceLocatorException { Debug.logVerbose("[JdonFramework] -- > getLocalHome.... ", module); EJBLocalHome home = null; try { if (cache.containsKey(jndiHomeName)) { home = (EJBLocalHome) cache.get(jndiHomeName); } ...
[ "public", "EJBLocalHome", "getLocalHome", "(", "String", "jndiHomeName", ")", "throws", "ServiceLocatorException", "{", "Debug", ".", "logVerbose", "(", "\"[JdonFramework] -- > getLocalHome.... \"", ",", "module", ")", ";", "EJBLocalHome", "home", "=", "null", ";", "t...
will get the ejb Local home factory. If this ejb home factory has already been clients need to cast to the type of EJBHome they desire @return the EJB Home corresponding to the homeName
[ "will", "get", "the", "ejb", "Local", "home", "factory", ".", "If", "this", "ejb", "home", "factory", "has", "already", "been", "clients", "need", "to", "cast", "to", "the", "type", "of", "EJBHome", "they", "desire" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-struts1x/src/main/java/com/jdon/servicelocator/web/ServiceLocator.java#L67-L85
23,744
banq/jdonframework
JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/model/query/block/BlockStrategy.java
BlockStrategy.locate
public Block locate(String sqlquery, Collection queryParams, Object locateId) { int blockSize = getBlockLength(); Block block = null; int index = -1; int prevBlockStart = Integer.MIN_VALUE; int nextBlockStart = Integer.MIN_VALUE; int start = 0; Debug.logVerbose("[JdonFramework]try to locate a blo...
java
public Block locate(String sqlquery, Collection queryParams, Object locateId) { int blockSize = getBlockLength(); Block block = null; int index = -1; int prevBlockStart = Integer.MIN_VALUE; int nextBlockStart = Integer.MIN_VALUE; int start = 0; Debug.logVerbose("[JdonFramework]try to locate a blo...
[ "public", "Block", "locate", "(", "String", "sqlquery", ",", "Collection", "queryParams", ",", "Object", "locateId", ")", "{", "int", "blockSize", "=", "getBlockLength", "(", ")", ";", "Block", "block", "=", "null", ";", "int", "index", "=", "-", "1", ";...
looking for the primary be equals to locateId in the result for the sql sentence. @param sqlquery @param queryParams @param locateId @return if not locate, return null;
[ "looking", "for", "the", "primary", "be", "equals", "to", "locateId", "in", "the", "result", "for", "the", "sql", "sentence", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/model/query/block/BlockStrategy.java#L63-L133
23,745
banq/jdonframework
JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/model/query/block/BlockStrategy.java
BlockStrategy.getBlock
private Block getBlock(QueryConditonDatakey qcdk) { Block clientBlock = new Block(qcdk.getStart(), qcdk.getCount()); if (clientBlock.getCount() > this.blockLength) clientBlock.setCount(this.blockLength); // create dataBlock get DataBase or cache; List list = getBlockKeys(qcdk); Block dataBlock = ne...
java
private Block getBlock(QueryConditonDatakey qcdk) { Block clientBlock = new Block(qcdk.getStart(), qcdk.getCount()); if (clientBlock.getCount() > this.blockLength) clientBlock.setCount(this.blockLength); // create dataBlock get DataBase or cache; List list = getBlockKeys(qcdk); Block dataBlock = ne...
[ "private", "Block", "getBlock", "(", "QueryConditonDatakey", "qcdk", ")", "{", "Block", "clientBlock", "=", "new", "Block", "(", "qcdk", ".", "getStart", "(", ")", ",", "qcdk", ".", "getCount", "(", ")", ")", ";", "if", "(", "clientBlock", ".", "getCount...
get the current block being avaliable to the query condition @param qcdk @return
[ "get", "the", "current", "block", "being", "avaliable", "to", "the", "query", "condition" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/model/query/block/BlockStrategy.java#L167-L217
23,746
banq/jdonframework
JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/model/query/block/BlockStrategy.java
BlockStrategy.getBlockKeys
private List getBlockKeys(QueryConditonDatakey qcdk) { List keys = blockCacheManager.getBlockKeysFromCache(qcdk); if ((keys == null)) { keys = blockQueryJDBC.fetchDatas(qcdk); if (keys != null && keys.size() != 0) blockCacheManager.saveBlockKeys(qcdk, keys); } Debug.logVerbose("[JdonFramework] ...
java
private List getBlockKeys(QueryConditonDatakey qcdk) { List keys = blockCacheManager.getBlockKeysFromCache(qcdk); if ((keys == null)) { keys = blockQueryJDBC.fetchDatas(qcdk); if (keys != null && keys.size() != 0) blockCacheManager.saveBlockKeys(qcdk, keys); } Debug.logVerbose("[JdonFramework] ...
[ "private", "List", "getBlockKeys", "(", "QueryConditonDatakey", "qcdk", ")", "{", "List", "keys", "=", "blockCacheManager", ".", "getBlockKeysFromCache", "(", "qcdk", ")", ";", "if", "(", "(", "keys", "==", "null", ")", ")", "{", "keys", "=", "blockQueryJDBC...
get a Block that begin at the start @param qcdk QueryConditonDatakey @return return the collection fit for start value and count value.
[ "get", "a", "Block", "that", "begin", "at", "the", "start" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/model/query/block/BlockStrategy.java#L226-L235
23,747
banq/jdonframework
src/main/java/com/jdon/controller/context/web/RequestWrapperFactory.java
RequestWrapperFactory.create
public static RequestWrapper create(HttpServletRequest request) { HttpSession session = request.getSession(); AppContextWrapper acw = new ServletContextWrapper(session.getServletContext()); SessionWrapper sw = new HttpSessionWrapper(session); ContextHolder contextHolder = new ContextHolder(acw, sw); ...
java
public static RequestWrapper create(HttpServletRequest request) { HttpSession session = request.getSession(); AppContextWrapper acw = new ServletContextWrapper(session.getServletContext()); SessionWrapper sw = new HttpSessionWrapper(session); ContextHolder contextHolder = new ContextHolder(acw, sw); ...
[ "public", "static", "RequestWrapper", "create", "(", "HttpServletRequest", "request", ")", "{", "HttpSession", "session", "=", "request", ".", "getSession", "(", ")", ";", "AppContextWrapper", "acw", "=", "new", "ServletContextWrapper", "(", "session", ".", "getSe...
create a HttpServletRequestWrapper with session supports. this method will create HttpSession. @param request @return
[ "create", "a", "HttpServletRequestWrapper", "with", "session", "supports", ".", "this", "method", "will", "create", "HttpSession", "." ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/controller/context/web/RequestWrapperFactory.java#L35-L43
23,748
banq/jdonframework
JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/model/query/JdbcUtil.java
JdbcUtil.setQueryParams
public void setQueryParams(Collection queryParams, PreparedStatement ps) throws Exception { if ((queryParams == null) || (queryParams.size() == 0)) return; int i = 1; Object key = null; Iterator iter = queryParams.iterator(); while (iter.hasNext()) { key = iter.next(); if (key != null) { ...
java
public void setQueryParams(Collection queryParams, PreparedStatement ps) throws Exception { if ((queryParams == null) || (queryParams.size() == 0)) return; int i = 1; Object key = null; Iterator iter = queryParams.iterator(); while (iter.hasNext()) { key = iter.next(); if (key != null) { ...
[ "public", "void", "setQueryParams", "(", "Collection", "queryParams", ",", "PreparedStatement", "ps", ")", "throws", "Exception", "{", "if", "(", "(", "queryParams", "==", "null", ")", "||", "(", "queryParams", ".", "size", "(", ")", "==", "0", ")", ")", ...
queryParam type only support String Integer Float or Long Double Bye Short if you need operate other types, you must use JDBC directly!
[ "queryParam", "type", "only", "support", "String", "Integer", "Float", "or", "Long", "Double", "Bye", "Short", "if", "you", "need", "operate", "other", "types", "you", "must", "use", "JDBC", "directly!" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/model/query/JdbcUtil.java#L43-L62
23,749
banq/jdonframework
JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/model/query/JdbcUtil.java
JdbcUtil.extract
public List extract(ResultSet rs) throws Exception { ResultSetMetaData meta = rs.getMetaData(); int count = meta.getColumnCount(); List ret = new ArrayList(); while (rs.next()) { Map map = new LinkedHashMap(count); for (int i = 1; i <= count; i++) { map.put(meta.getColumnName(i), rs.getObject(i...
java
public List extract(ResultSet rs) throws Exception { ResultSetMetaData meta = rs.getMetaData(); int count = meta.getColumnCount(); List ret = new ArrayList(); while (rs.next()) { Map map = new LinkedHashMap(count); for (int i = 1; i <= count; i++) { map.put(meta.getColumnName(i), rs.getObject(i...
[ "public", "List", "extract", "(", "ResultSet", "rs", ")", "throws", "Exception", "{", "ResultSetMetaData", "meta", "=", "rs", ".", "getMetaData", "(", ")", ";", "int", "count", "=", "meta", ".", "getColumnCount", "(", ")", ";", "List", "ret", "=", "new",...
return a List in the List, every object is a map, by database column name, we can get the its result from map @param rs ResultSet @return List @throws Exception
[ "return", "a", "List", "in", "the", "List", "every", "object", "is", "a", "map", "by", "database", "column", "name", "we", "can", "get", "the", "its", "result", "from", "map" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/JdonAccessory/jdon-hibernate3x/src/main/java/com/jdon/model/query/JdbcUtil.java#L104-L116
23,750
banq/jdonframework
src/main/java/com/jdon/aop/AopClient.java
AopClient.invoke
public Object invoke(TargetMetaRequest targetMetaRequest, Method method, Object[] args) throws Throwable { targetMetaRequestsHolder.setTargetMetaRequest(targetMetaRequest); Debug.logVerbose( "[JdonFramework] enter AOP invoker2 for:" + targetMetaRequest.getTargetMetaDef().getClassName() + " method:" + method....
java
public Object invoke(TargetMetaRequest targetMetaRequest, Method method, Object[] args) throws Throwable { targetMetaRequestsHolder.setTargetMetaRequest(targetMetaRequest); Debug.logVerbose( "[JdonFramework] enter AOP invoker2 for:" + targetMetaRequest.getTargetMetaDef().getClassName() + " method:" + method....
[ "public", "Object", "invoke", "(", "TargetMetaRequest", "targetMetaRequest", ",", "Method", "method", ",", "Object", "[", "]", "args", ")", "throws", "Throwable", "{", "targetMetaRequestsHolder", ".", "setTargetMetaRequest", "(", "targetMetaRequest", ")", ";", "Debu...
dynamic proxy active this method when client call userService.xxxmethod @param targetMetaRequest @param method @param args @return @throws Throwable
[ "dynamic", "proxy", "active", "this", "method", "when", "client", "call", "userService", ".", "xxxmethod" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/aop/AopClient.java#L101-L124
23,751
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/refactor/rename/Rename.java
Rename.label
@Procedure(mode = Mode.WRITE) @Description("apoc.refactor.rename.label(oldLabel, newLabel, [nodes]) | rename a label from 'oldLabel' to 'newLabel' for all nodes. If 'nodes' is provided renaming is applied to this set only") public Stream<BatchAndTotalResultWithInfo> label(@Name("oldLabel") String oldLabel, @Name("new...
java
@Procedure(mode = Mode.WRITE) @Description("apoc.refactor.rename.label(oldLabel, newLabel, [nodes]) | rename a label from 'oldLabel' to 'newLabel' for all nodes. If 'nodes' is provided renaming is applied to this set only") public Stream<BatchAndTotalResultWithInfo> label(@Name("oldLabel") String oldLabel, @Name("new...
[ "@", "Procedure", "(", "mode", "=", "Mode", ".", "WRITE", ")", "@", "Description", "(", "\"apoc.refactor.rename.label(oldLabel, newLabel, [nodes]) | rename a label from 'oldLabel' to 'newLabel' for all nodes. If 'nodes' is provided renaming is applied to this set only\"", ")", "public", ...
Rename the Label of a node by creating a new one and deleting the old.
[ "Rename", "the", "Label", "of", "a", "node", "by", "creating", "a", "new", "one", "and", "deleting", "the", "old", "." ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/refactor/rename/Rename.java#L35-L42
23,752
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/refactor/rename/Rename.java
Rename.type
@Procedure(mode = Mode.WRITE) @Description("apoc.refactor.rename.type(oldType, newType, [rels]) | rename all relationships with type 'oldType' to 'newType'. If 'rels' is provided renaming is applied to this set only") public Stream<BatchAndTotalResultWithInfo> type(@Name("oldType") String oldType, @Name("newType") St...
java
@Procedure(mode = Mode.WRITE) @Description("apoc.refactor.rename.type(oldType, newType, [rels]) | rename all relationships with type 'oldType' to 'newType'. If 'rels' is provided renaming is applied to this set only") public Stream<BatchAndTotalResultWithInfo> type(@Name("oldType") String oldType, @Name("newType") St...
[ "@", "Procedure", "(", "mode", "=", "Mode", ".", "WRITE", ")", "@", "Description", "(", "\"apoc.refactor.rename.type(oldType, newType, [rels]) | rename all relationships with type 'oldType' to 'newType'. If 'rels' is provided renaming is applied to this set only\"", ")", "public", "Str...
Rename the Relationship Type by creating a new one and deleting the old.
[ "Rename", "the", "Relationship", "Type", "by", "creating", "a", "new", "one", "and", "deleting", "the", "old", "." ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/refactor/rename/Rename.java#L47-L54
23,753
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/refactor/rename/Rename.java
Rename.nodeProperty
@Procedure(mode = Mode.WRITE) @Description("apoc.refactor.rename.nodeProperty(oldName, newName, [nodes]) | rename all node's property from 'oldName' to 'newName'. If 'nodes' is provided renaming is applied to this set only") public Stream<BatchAndTotalResultWithInfo> nodeProperty(@Name("oldName") String oldName, @Nam...
java
@Procedure(mode = Mode.WRITE) @Description("apoc.refactor.rename.nodeProperty(oldName, newName, [nodes]) | rename all node's property from 'oldName' to 'newName'. If 'nodes' is provided renaming is applied to this set only") public Stream<BatchAndTotalResultWithInfo> nodeProperty(@Name("oldName") String oldName, @Nam...
[ "@", "Procedure", "(", "mode", "=", "Mode", ".", "WRITE", ")", "@", "Description", "(", "\"apoc.refactor.rename.nodeProperty(oldName, newName, [nodes]) | rename all node's property from 'oldName' to 'newName'. If 'nodes' is provided renaming is applied to this set only\"", ")", "public",...
Rename property of a node by creating a new one and deleting the old.
[ "Rename", "property", "of", "a", "node", "by", "creating", "a", "new", "one", "and", "deleting", "the", "old", "." ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/refactor/rename/Rename.java#L59-L66
23,754
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/meta/Meta.java
Meta.data
@Procedure @Description("apoc.meta.data({config}) - examines a subset of the graph to provide a tabular meta information") public Stream<MetaResult> data(@Name(value = "config",defaultValue = "{}") Map<String,Object> config) { MetaConfig metaConfig = new MetaConfig(config); return collectMetaDa...
java
@Procedure @Description("apoc.meta.data({config}) - examines a subset of the graph to provide a tabular meta information") public Stream<MetaResult> data(@Name(value = "config",defaultValue = "{}") Map<String,Object> config) { MetaConfig metaConfig = new MetaConfig(config); return collectMetaDa...
[ "@", "Procedure", "@", "Description", "(", "\"apoc.meta.data({config}) - examines a subset of the graph to provide a tabular meta information\"", ")", "public", "Stream", "<", "MetaResult", ">", "data", "(", "@", "Name", "(", "value", "=", "\"config\"", ",", "defaultValue"...
todo put index sizes for indexed properties
[ "todo", "put", "index", "sizes", "for", "indexed", "properties" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/meta/Meta.java#L408-L413
23,755
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/algorithms/Algorithm.java
Algorithm.growArray
private static int [] growArray(int[] array, float growFactor) { int currentSize = array.length; int newArray[] = new int[(int)(currentSize * growFactor)]; System.arraycopy(array, 0, newArray, 0, currentSize); return newArray; }
java
private static int [] growArray(int[] array, float growFactor) { int currentSize = array.length; int newArray[] = new int[(int)(currentSize * growFactor)]; System.arraycopy(array, 0, newArray, 0, currentSize); return newArray; }
[ "private", "static", "int", "[", "]", "growArray", "(", "int", "[", "]", "array", ",", "float", "growFactor", ")", "{", "int", "currentSize", "=", "array", ".", "length", ";", "int", "newArray", "[", "]", "=", "new", "int", "[", "(", "int", ")", "(...
Not doing it right now because of the complications of the interface.
[ "Not", "doing", "it", "right", "now", "because", "of", "the", "complications", "of", "the", "interface", "." ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/algorithms/Algorithm.java#L119-L124
23,756
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/schema/Schemas.java
Schemas.indexExists
private Boolean indexExists(String labelName, List<String> propertyNames) { Schema schema = db.schema(); for (IndexDefinition indexDefinition : Iterables.asList(schema.getIndexes(Label.label(labelName)))) { List<String> properties = Iterables.asList(indexDefinition.getPropertyKeys()); ...
java
private Boolean indexExists(String labelName, List<String> propertyNames) { Schema schema = db.schema(); for (IndexDefinition indexDefinition : Iterables.asList(schema.getIndexes(Label.label(labelName)))) { List<String> properties = Iterables.asList(indexDefinition.getPropertyKeys()); ...
[ "private", "Boolean", "indexExists", "(", "String", "labelName", ",", "List", "<", "String", ">", "propertyNames", ")", "{", "Schema", "schema", "=", "db", ".", "schema", "(", ")", ";", "for", "(", "IndexDefinition", "indexDefinition", ":", "Iterables", ".",...
Checks if an index exists for a given label and a list of properties This method checks for index on nodes @param labelName @param propertyNames @return true if the index exists otherwise it returns false
[ "Checks", "if", "an", "index", "exists", "for", "a", "given", "label", "and", "a", "list", "of", "properties", "This", "method", "checks", "for", "index", "on", "nodes" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/schema/Schemas.java#L210-L222
23,757
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/schema/Schemas.java
Schemas.constraintsExists
private Boolean constraintsExists(String labelName, List<String> propertyNames) { Schema schema = db.schema(); for (ConstraintDefinition constraintDefinition : Iterables.asList(schema.getConstraints(Label.label(labelName)))) { List<String> properties = Iterables.asList(constraintDefinition....
java
private Boolean constraintsExists(String labelName, List<String> propertyNames) { Schema schema = db.schema(); for (ConstraintDefinition constraintDefinition : Iterables.asList(schema.getConstraints(Label.label(labelName)))) { List<String> properties = Iterables.asList(constraintDefinition....
[ "private", "Boolean", "constraintsExists", "(", "String", "labelName", ",", "List", "<", "String", ">", "propertyNames", ")", "{", "Schema", "schema", "=", "db", ".", "schema", "(", ")", ";", "for", "(", "ConstraintDefinition", "constraintDefinition", ":", "It...
Checks if a constraint exists for a given label and a list of properties This method checks for constraints on node @param labelName @param propertyNames @return true if the constraint exists otherwise it returns false
[ "Checks", "if", "a", "constraint", "exists", "for", "a", "given", "label", "and", "a", "list", "of", "properties", "This", "method", "checks", "for", "constraints", "on", "node" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/schema/Schemas.java#L232-L244
23,758
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/schema/Schemas.java
Schemas.constraintsExistsForRelationship
private Boolean constraintsExistsForRelationship(String type, List<String> propertyNames) { Schema schema = db.schema(); for (ConstraintDefinition constraintDefinition : Iterables.asList(schema.getConstraints(RelationshipType.withName(type)))) { List<String> properties = Iterables.asList(co...
java
private Boolean constraintsExistsForRelationship(String type, List<String> propertyNames) { Schema schema = db.schema(); for (ConstraintDefinition constraintDefinition : Iterables.asList(schema.getConstraints(RelationshipType.withName(type)))) { List<String> properties = Iterables.asList(co...
[ "private", "Boolean", "constraintsExistsForRelationship", "(", "String", "type", ",", "List", "<", "String", ">", "propertyNames", ")", "{", "Schema", "schema", "=", "db", ".", "schema", "(", ")", ";", "for", "(", "ConstraintDefinition", "constraintDefinition", ...
Checks if a constraint exists for a given type and a list of properties This method checks for constraints on relationships @param type @param propertyNames @return true if the constraint exists otherwise it returns false
[ "Checks", "if", "a", "constraint", "exists", "for", "a", "given", "type", "and", "a", "list", "of", "properties", "This", "method", "checks", "for", "constraints", "on", "relationships" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/schema/Schemas.java#L254-L266
23,759
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/schema/Schemas.java
Schemas.constraintsForRelationship
private Stream<ConstraintRelationshipInfo> constraintsForRelationship(Map<String,Object> config) { Schema schema = db.schema(); SchemaConfig schemaConfig = new SchemaConfig(config); Set<String> includeRelationships = schemaConfig.getRelationships(); Set<String> excludeRelationships = sc...
java
private Stream<ConstraintRelationshipInfo> constraintsForRelationship(Map<String,Object> config) { Schema schema = db.schema(); SchemaConfig schemaConfig = new SchemaConfig(config); Set<String> includeRelationships = schemaConfig.getRelationships(); Set<String> excludeRelationships = sc...
[ "private", "Stream", "<", "ConstraintRelationshipInfo", ">", "constraintsForRelationship", "(", "Map", "<", "String", ",", "Object", ">", "config", ")", "{", "Schema", "schema", "=", "db", ".", "schema", "(", ")", ";", "SchemaConfig", "schemaConfig", "=", "new...
Collects constraints for relationships @return
[ "Collects", "constraints", "for", "relationships" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/schema/Schemas.java#L345-L377
23,760
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/schema/Schemas.java
Schemas.nodeInfoFromConstraintDescriptor
private IndexConstraintNodeInfo nodeInfoFromConstraintDescriptor(ConstraintDescriptor constraintDescriptor, TokenNameLookup tokens) { String labelName = tokens.labelGetName(constraintDescriptor.schema().keyId()); List<String> properties = new ArrayList<>(); Arrays.stream(constraintDescriptor.sc...
java
private IndexConstraintNodeInfo nodeInfoFromConstraintDescriptor(ConstraintDescriptor constraintDescriptor, TokenNameLookup tokens) { String labelName = tokens.labelGetName(constraintDescriptor.schema().keyId()); List<String> properties = new ArrayList<>(); Arrays.stream(constraintDescriptor.sc...
[ "private", "IndexConstraintNodeInfo", "nodeInfoFromConstraintDescriptor", "(", "ConstraintDescriptor", "constraintDescriptor", ",", "TokenNameLookup", "tokens", ")", "{", "String", "labelName", "=", "tokens", ".", "labelGetName", "(", "constraintDescriptor", ".", "schema", ...
ConstraintInfo info from ConstraintDescriptor @param constraintDescriptor @param tokens @return
[ "ConstraintInfo", "info", "from", "ConstraintDescriptor" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/schema/Schemas.java#L386-L403
23,761
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/schema/Schemas.java
Schemas.nodeInfoFromIndexDefinition
private IndexConstraintNodeInfo nodeInfoFromIndexDefinition(IndexReference indexReference, SchemaRead schemaRead, TokenNameLookup tokens){ int[] labelIds = indexReference.schema().getEntityTokenIds(); if (labelIds.length != 1) throw new IllegalStateException("Index with more than one label"); St...
java
private IndexConstraintNodeInfo nodeInfoFromIndexDefinition(IndexReference indexReference, SchemaRead schemaRead, TokenNameLookup tokens){ int[] labelIds = indexReference.schema().getEntityTokenIds(); if (labelIds.length != 1) throw new IllegalStateException("Index with more than one label"); St...
[ "private", "IndexConstraintNodeInfo", "nodeInfoFromIndexDefinition", "(", "IndexReference", "indexReference", ",", "SchemaRead", "schemaRead", ",", "TokenNameLookup", "tokens", ")", "{", "int", "[", "]", "labelIds", "=", "indexReference", ".", "schema", "(", ")", ".",...
Index info from IndexDefinition @param indexReference @param schemaRead @param tokens @return
[ "Index", "info", "from", "IndexDefinition" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/schema/Schemas.java#L413-L446
23,762
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/schema/Schemas.java
Schemas.relationshipInfoFromConstraintDefinition
private ConstraintRelationshipInfo relationshipInfoFromConstraintDefinition(ConstraintDefinition constraintDefinition) { return new ConstraintRelationshipInfo( String.format("CONSTRAINT %s", constraintDefinition.toString()), constraintDefinition.getConstraintType().name(), ...
java
private ConstraintRelationshipInfo relationshipInfoFromConstraintDefinition(ConstraintDefinition constraintDefinition) { return new ConstraintRelationshipInfo( String.format("CONSTRAINT %s", constraintDefinition.toString()), constraintDefinition.getConstraintType().name(), ...
[ "private", "ConstraintRelationshipInfo", "relationshipInfoFromConstraintDefinition", "(", "ConstraintDefinition", "constraintDefinition", ")", "{", "return", "new", "ConstraintRelationshipInfo", "(", "String", ".", "format", "(", "\"CONSTRAINT %s\"", ",", "constraintDefinition", ...
Constraint info from ConstraintDefinition for relationships @param constraintDefinition @return
[ "Constraint", "info", "from", "ConstraintDefinition", "for", "relationships" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/schema/Schemas.java#L454-L461
23,763
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/temporal/TemporalProcedures.java
TemporalProcedures.format
@UserFunction( "apoc.temporal.format" ) @Description( "apoc.temporal.format(input, format) | Format a temporal value" ) public String format( @Name( "temporal" ) Object input, @Name( value = "format", defaultValue = "yyyy-MM-dd") String format ) { try { DateTimeF...
java
@UserFunction( "apoc.temporal.format" ) @Description( "apoc.temporal.format(input, format) | Format a temporal value" ) public String format( @Name( "temporal" ) Object input, @Name( value = "format", defaultValue = "yyyy-MM-dd") String format ) { try { DateTimeF...
[ "@", "UserFunction", "(", "\"apoc.temporal.format\"", ")", "@", "Description", "(", "\"apoc.temporal.format(input, format) | Format a temporal value\"", ")", "public", "String", "format", "(", "@", "Name", "(", "\"temporal\"", ")", "Object", "input", ",", "@", "Name", ...
Format a temporal value to a String @param input Any temporal type @param format A valid DateTime format pattern (ie yyyy-MM-dd'T'HH:mm:ss.SSSS) @return
[ "Format", "a", "temporal", "value", "to", "a", "String" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/temporal/TemporalProcedures.java#L22-L52
23,764
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/temporal/TemporalProcedures.java
TemporalProcedures.formatDuration
@UserFunction( "apoc.temporal.formatDuration" ) @Description( "apoc.temporal.formatDuration(input, format) | Format a Duration" ) public String formatDuration( @Name("input") Object input, @Name("format") String format ) { try { LocalDateTime midnight = LocalDateT...
java
@UserFunction( "apoc.temporal.formatDuration" ) @Description( "apoc.temporal.formatDuration(input, format) | Format a Duration" ) public String formatDuration( @Name("input") Object input, @Name("format") String format ) { try { LocalDateTime midnight = LocalDateT...
[ "@", "UserFunction", "(", "\"apoc.temporal.formatDuration\"", ")", "@", "Description", "(", "\"apoc.temporal.formatDuration(input, format) | Format a Duration\"", ")", "public", "String", "formatDuration", "(", "@", "Name", "(", "\"input\"", ")", "Object", "input", ",", "...
Convert a Duration into a LocalTime and format the value as a String @param input @param format @return
[ "Convert", "a", "Duration", "into", "a", "LocalTime", "and", "format", "the", "value", "as", "a", "String" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/temporal/TemporalProcedures.java#L61-L80
23,765
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/couchbase/CouchbaseConnection.java
CouchbaseConnection.getMajorVersion
protected int getMajorVersion() { return this.cluster.authenticate(this.passwordAuthenticator).clusterManager().info(5,TimeUnit.SECONDS).getMinVersion().major(); }
java
protected int getMajorVersion() { return this.cluster.authenticate(this.passwordAuthenticator).clusterManager().info(5,TimeUnit.SECONDS).getMinVersion().major(); }
[ "protected", "int", "getMajorVersion", "(", ")", "{", "return", "this", ".", "cluster", ".", "authenticate", "(", "this", ".", "passwordAuthenticator", ")", ".", "clusterManager", "(", ")", ".", "info", "(", "5", ",", "TimeUnit", ".", "SECONDS", ")", ".", ...
Get the major version of Couchbase server, that is 4.x or 5.x @return
[ "Get", "the", "major", "version", "of", "Couchbase", "server", "that", "is", "4", ".", "x", "or", "5", ".", "x" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/couchbase/CouchbaseConnection.java#L88-L90
23,766
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/couchbase/CouchbaseConnection.java
CouchbaseConnection.executeStatement
public List<JsonObject> executeStatement(String statement) { SimpleN1qlQuery query = N1qlQuery.simple(statement); return executeQuery(query); }
java
public List<JsonObject> executeStatement(String statement) { SimpleN1qlQuery query = N1qlQuery.simple(statement); return executeQuery(query); }
[ "public", "List", "<", "JsonObject", ">", "executeStatement", "(", "String", "statement", ")", "{", "SimpleN1qlQuery", "query", "=", "N1qlQuery", ".", "simple", "(", "statement", ")", ";", "return", "executeQuery", "(", "query", ")", ";", "}" ]
Executes a plain un-parameterized N1QL kernelTransaction. @param statement the raw kernelTransaction string to execute @return the list of {@link JsonObject}s retrieved by this query @see N1qlQuery#simple(Statement)
[ "Executes", "a", "plain", "un", "-", "parameterized", "N1QL", "kernelTransaction", "." ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/couchbase/CouchbaseConnection.java#L208-L211
23,767
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/couchbase/CouchbaseConnection.java
CouchbaseConnection.executeParametrizedStatement
public List<JsonObject> executeParametrizedStatement(String statement, List<Object> parameters) { JsonArray positionalParams = JsonArray.from(parameters); ParameterizedN1qlQuery query = N1qlQuery.parameterized(statement, positionalParams); return executeQuery(query); }
java
public List<JsonObject> executeParametrizedStatement(String statement, List<Object> parameters) { JsonArray positionalParams = JsonArray.from(parameters); ParameterizedN1qlQuery query = N1qlQuery.parameterized(statement, positionalParams); return executeQuery(query); }
[ "public", "List", "<", "JsonObject", ">", "executeParametrizedStatement", "(", "String", "statement", ",", "List", "<", "Object", ">", "parameters", ")", "{", "JsonArray", "positionalParams", "=", "JsonArray", ".", "from", "(", "parameters", ")", ";", "Parameter...
Executes a N1QL kernelTransaction with positional parameters. @param statement the raw kernelTransaction string to execute (containing positional placeholders: $1, $2, ...) @param parameters the values for the positional placeholders in kernelTransaction @return the list of {@link JsonObject}s retrieved by this query...
[ "Executes", "a", "N1QL", "kernelTransaction", "with", "positional", "parameters", "." ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/couchbase/CouchbaseConnection.java#L222-L226
23,768
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/couchbase/CouchbaseConnection.java
CouchbaseConnection.executeParametrizedStatement
public List<JsonObject> executeParametrizedStatement(String statement, List<String> parameterNames, List<Object> parameterValues) { JsonObject namedParams = JsonObject.create(); for (int param = 0; param < parameterNames.size(); param++) { ...
java
public List<JsonObject> executeParametrizedStatement(String statement, List<String> parameterNames, List<Object> parameterValues) { JsonObject namedParams = JsonObject.create(); for (int param = 0; param < parameterNames.size(); param++) { ...
[ "public", "List", "<", "JsonObject", ">", "executeParametrizedStatement", "(", "String", "statement", ",", "List", "<", "String", ">", "parameterNames", ",", "List", "<", "Object", ">", "parameterValues", ")", "{", "JsonObject", "namedParams", "=", "JsonObject", ...
Executes a N1QL kernelTransaction with named parameters. @param statement the raw kernelTransaction string to execute (containing named placeholders: $param1, $param2, ...) @param parameterNames the placeholders' names in kernelTransaction @param parameterValues the values for the named placeholders in kernelTr...
[ "Executes", "a", "N1QL", "kernelTransaction", "with", "named", "parameters", "." ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/couchbase/CouchbaseConnection.java#L238-L246
23,769
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/generate/relationship/ErdosRenyiRelationshipGenerator.java
ErdosRenyiRelationshipGenerator.doGenerateEdgesWithOmitList
private List<Pair<Integer, Integer>> doGenerateEdgesWithOmitList() { final int numberOfNodes = getConfiguration().getNumberOfNodes(); final int numberOfEdges = getConfiguration().getNumberOfEdges(); final long maxEdges = numberOfNodes * (numberOfNodes - 1) / 2; final List<Pair<Integer, ...
java
private List<Pair<Integer, Integer>> doGenerateEdgesWithOmitList() { final int numberOfNodes = getConfiguration().getNumberOfNodes(); final int numberOfEdges = getConfiguration().getNumberOfEdges(); final long maxEdges = numberOfNodes * (numberOfNodes - 1) / 2; final List<Pair<Integer, ...
[ "private", "List", "<", "Pair", "<", "Integer", ",", "Integer", ">", ">", "doGenerateEdgesWithOmitList", "(", ")", "{", "final", "int", "numberOfNodes", "=", "getConfiguration", "(", ")", ".", "getNumberOfNodes", "(", ")", ";", "final", "int", "numberOfEdges",...
Improved implementation of Erdos-Renyi generator based on bijection from edge labels to edge realisations. Works very well for large number of nodes, but is slow with increasing number of edges. Best for denser networks, with a clear giant component. @return edge list
[ "Improved", "implementation", "of", "Erdos", "-", "Renyi", "generator", "based", "on", "bijection", "from", "edge", "labels", "to", "edge", "realisations", ".", "Works", "very", "well", "for", "large", "number", "of", "nodes", "but", "is", "slow", "with", "i...
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/generate/relationship/ErdosRenyiRelationshipGenerator.java#L87-L99
23,770
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/generate/relationship/ErdosRenyiRelationshipGenerator.java
ErdosRenyiRelationshipGenerator.indexToEdgeBijection
private Pair<Integer, Integer> indexToEdgeBijection(long index) { long i = (long) Math.ceil((Math.sqrt(1 + 8 * (index + 1)) - 1) / 2); long diff = index + 1 - (i * (i - 1)) / 2; return Pair.of((int) i, (int) diff - 1); }
java
private Pair<Integer, Integer> indexToEdgeBijection(long index) { long i = (long) Math.ceil((Math.sqrt(1 + 8 * (index + 1)) - 1) / 2); long diff = index + 1 - (i * (i - 1)) / 2; return Pair.of((int) i, (int) diff - 1); }
[ "private", "Pair", "<", "Integer", ",", "Integer", ">", "indexToEdgeBijection", "(", "long", "index", ")", "{", "long", "i", "=", "(", "long", ")", "Math", ".", "ceil", "(", "(", "Math", ".", "sqrt", "(", "1", "+", "8", "*", "(", "index", "+", "1...
Maps an index in a hypothetical list of all edges to the actual edge. @param index index @return an edge based on its unique label
[ "Maps", "an", "index", "in", "a", "hypothetical", "list", "of", "all", "edges", "to", "the", "actual", "edge", "." ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/generate/relationship/ErdosRenyiRelationshipGenerator.java#L107-L112
23,771
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/util/Util.java
Util.transactionIsTerminated
public static boolean transactionIsTerminated(TerminationGuard db) { try { db.check(); return false; } catch (TransactionGuardException | TransactionTerminatedException | NotInTransactionException tge) { return true; } }
java
public static boolean transactionIsTerminated(TerminationGuard db) { try { db.check(); return false; } catch (TransactionGuardException | TransactionTerminatedException | NotInTransactionException tge) { return true; } }
[ "public", "static", "boolean", "transactionIsTerminated", "(", "TerminationGuard", "db", ")", "{", "try", "{", "db", ".", "check", "(", ")", ";", "return", "false", ";", "}", "catch", "(", "TransactionGuardException", "|", "TransactionTerminatedException", "|", ...
Given a context related to the procedure invocation this method checks if the transaction is terminated in some way @param db @return
[ "Given", "a", "context", "related", "to", "the", "procedure", "invocation", "this", "method", "checks", "if", "the", "transaction", "is", "terminated", "in", "some", "way" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/util/Util.java#L635-L642
23,772
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/load/Xml.java
Xml.handleTypeAndAttributes
private void handleTypeAndAttributes(Node node, Map<String, Object> elementMap) { // Set type if (node.getLocalName() != null) { elementMap.put("_type", node.getLocalName()); } // Set the attributes if (node.getAttributes() != null) { NamedNodeMap attribu...
java
private void handleTypeAndAttributes(Node node, Map<String, Object> elementMap) { // Set type if (node.getLocalName() != null) { elementMap.put("_type", node.getLocalName()); } // Set the attributes if (node.getAttributes() != null) { NamedNodeMap attribu...
[ "private", "void", "handleTypeAndAttributes", "(", "Node", "node", ",", "Map", "<", "String", ",", "Object", ">", "elementMap", ")", "{", "// Set type", "if", "(", "node", ".", "getLocalName", "(", ")", "!=", "null", ")", "{", "elementMap", ".", "put", "...
Collects type and attributes for the node @param node @param elementMap
[ "Collects", "type", "and", "attributes", "for", "the", "node" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/load/Xml.java#L267-L281
23,773
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/load/Xml.java
Xml.handleTextNode
private void handleTextNode(Node node, Map<String, Object> elementMap) { Object text = ""; int nodeType = node.getNodeType(); switch (nodeType) { case Node.TEXT_NODE: text = normalizeText(node.getNodeValue()); break; case Node.CDATA_SECTION...
java
private void handleTextNode(Node node, Map<String, Object> elementMap) { Object text = ""; int nodeType = node.getNodeType(); switch (nodeType) { case Node.TEXT_NODE: text = normalizeText(node.getNodeValue()); break; case Node.CDATA_SECTION...
[ "private", "void", "handleTextNode", "(", "Node", "node", ",", "Map", "<", "String", ",", "Object", ">", "elementMap", ")", "{", "Object", "text", "=", "\"\"", ";", "int", "nodeType", "=", "node", ".", "getNodeType", "(", ")", ";", "switch", "(", "node...
Handle TEXT nodes and CDATA nodes @param node @param elementMap
[ "Handle", "TEXT", "nodes", "and", "CDATA", "nodes" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/load/Xml.java#L289-L313
23,774
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/load/Xml.java
Xml.normalizeText
private String normalizeText(String text) { String[] tokens = StringUtils.split(text, "\n"); for (int i = 0; i < tokens.length; i++) { tokens[i] = tokens[i].trim(); } return StringUtils.join(tokens, " ").trim(); }
java
private String normalizeText(String text) { String[] tokens = StringUtils.split(text, "\n"); for (int i = 0; i < tokens.length; i++) { tokens[i] = tokens[i].trim(); } return StringUtils.join(tokens, " ").trim(); }
[ "private", "String", "normalizeText", "(", "String", "text", ")", "{", "String", "[", "]", "tokens", "=", "StringUtils", ".", "split", "(", "text", ",", "\"\\n\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "tokens", ".", "length", ...
Remove trailing whitespaces and new line characters @param text @return
[ "Remove", "trailing", "whitespaces", "and", "new", "line", "characters" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/load/Xml.java#L321-L328
23,775
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/export/csv/CsvHeaderFields.java
CsvHeaderFields.processHeader
public static List<CsvHeaderField> processHeader(final String header, final char delimiter, final char quotationCharacter) { final String separatorRegex = Pattern.quote(String.valueOf(delimiter)); final List<String> attributes = Arrays.asList(header.split(separatorRegex)); final List<CsvHeaderF...
java
public static List<CsvHeaderField> processHeader(final String header, final char delimiter, final char quotationCharacter) { final String separatorRegex = Pattern.quote(String.valueOf(delimiter)); final List<String> attributes = Arrays.asList(header.split(separatorRegex)); final List<CsvHeaderF...
[ "public", "static", "List", "<", "CsvHeaderField", ">", "processHeader", "(", "final", "String", "header", ",", "final", "char", "delimiter", ",", "final", "char", "quotationCharacter", ")", "{", "final", "String", "separatorRegex", "=", "Pattern", ".", "quote",...
Processes CSV header. Works for both nodes and relationships. @param header @param delimiter @param quotationCharacter @return
[ "Processes", "CSV", "header", ".", "Works", "for", "both", "nodes", "and", "relationships", "." ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/export/csv/CsvHeaderFields.java#L19-L29
23,776
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/path/NodeEvaluators.java
NodeEvaluators.endAndTerminatorNodeEvaluator
public static Evaluator endAndTerminatorNodeEvaluator(List<Node> endNodes, List<Node> terminatorNodes) { Evaluator endNodeEvaluator = null; Evaluator terminatorNodeEvaluator = null; if (!endNodes.isEmpty()) { Node[] nodes = endNodes.toArray(new Node[endNodes.size()]); en...
java
public static Evaluator endAndTerminatorNodeEvaluator(List<Node> endNodes, List<Node> terminatorNodes) { Evaluator endNodeEvaluator = null; Evaluator terminatorNodeEvaluator = null; if (!endNodes.isEmpty()) { Node[] nodes = endNodes.toArray(new Node[endNodes.size()]); en...
[ "public", "static", "Evaluator", "endAndTerminatorNodeEvaluator", "(", "List", "<", "Node", ">", "endNodes", ",", "List", "<", "Node", ">", "terminatorNodes", ")", "{", "Evaluator", "endNodeEvaluator", "=", "null", ";", "Evaluator", "terminatorNodeEvaluator", "=", ...
Returns an evaluator which handles end nodes and terminator nodes Returns null if both lists are empty
[ "Returns", "an", "evaluator", "which", "handles", "end", "nodes", "and", "terminator", "nodes", "Returns", "null", "if", "both", "lists", "are", "empty" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/path/NodeEvaluators.java#L24-L43
23,777
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/CoreGraphAlgorithms.java
CoreGraphAlgorithms.interleaveBits
private static int interleaveBits(int odd, int even) { int val = 0; // Replaced this line with the improved code provided by Tuska // int n = Math.max(Integer.highestOneBit(odd), Integer.highestOneBit(even)); int max = Math.max(odd, even); int n = 0; while (max > 0) { ...
java
private static int interleaveBits(int odd, int even) { int val = 0; // Replaced this line with the improved code provided by Tuska // int n = Math.max(Integer.highestOneBit(odd), Integer.highestOneBit(even)); int max = Math.max(odd, even); int n = 0; while (max > 0) { ...
[ "private", "static", "int", "interleaveBits", "(", "int", "odd", ",", "int", "even", ")", "{", "int", "val", "=", "0", ";", "// Replaced this line with the improved code provided by Tuska", "// int n = Math.max(Integer.highestOneBit(odd), Integer.highestOneBit(even));", "int", ...
Interleave the bits from two input integer values @param odd integer holding bit values for odd bit positions @param even integer holding bit values for even bit positions @return the integer that results from interleaving the input bits @todo: I'm sure there's a more elegant way of doing this !
[ "Interleave", "the", "bits", "from", "two", "input", "integer", "values" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/CoreGraphAlgorithms.java#L90-L109
23,778
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/CoreGraphAlgorithms.java
CoreGraphAlgorithms.init
public CoreGraphAlgorithms init(String label, String rel) { TokenRead token = ktx.tokenRead(); int labelId = token.nodeLabel(label); int relTypeId = token.relationshipType(rel); loadNodes(labelId, relTypeId); loadRels(labelId, relTypeId); return this; }
java
public CoreGraphAlgorithms init(String label, String rel) { TokenRead token = ktx.tokenRead(); int labelId = token.nodeLabel(label); int relTypeId = token.relationshipType(rel); loadNodes(labelId, relTypeId); loadRels(labelId, relTypeId); return this; }
[ "public", "CoreGraphAlgorithms", "init", "(", "String", "label", ",", "String", "rel", ")", "{", "TokenRead", "token", "=", "ktx", ".", "tokenRead", "(", ")", ";", "int", "labelId", "=", "token", ".", "nodeLabel", "(", "label", ")", ";", "int", "relTypeI...
keep threads with open worker-tx for reads
[ "keep", "threads", "with", "open", "worker", "-", "tx", "for", "reads" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/CoreGraphAlgorithms.java#L541-L548
23,779
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/algorithms/Chunks.java
Chunks.withDefault
public Chunks withDefault(int defaultValue) { this.defaultValue = defaultValue; if (defaultValue != 0) { for (int[] chunk : chunks) { Arrays.fill(chunk, defaultValue); } } return this; }
java
public Chunks withDefault(int defaultValue) { this.defaultValue = defaultValue; if (defaultValue != 0) { for (int[] chunk : chunks) { Arrays.fill(chunk, defaultValue); } } return this; }
[ "public", "Chunks", "withDefault", "(", "int", "defaultValue", ")", "{", "this", ".", "defaultValue", "=", "defaultValue", ";", "if", "(", "defaultValue", "!=", "0", ")", "{", "for", "(", "int", "[", "]", "chunk", ":", "chunks", ")", "{", "Arrays", "."...
call directly after construction, todo move to constructor or static factory
[ "call", "directly", "after", "construction", "todo", "move", "to", "constructor", "or", "static", "factory" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/algorithms/Chunks.java#L48-L56
23,780
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/algorithms/Chunks.java
Chunks.set
void set(int index, int value) { int chunk = assertSpace(index); chunks[chunk][index & mask] = value; }
java
void set(int index, int value) { int chunk = assertSpace(index); chunks[chunk][index & mask] = value; }
[ "void", "set", "(", "int", "index", ",", "int", "value", ")", "{", "int", "chunk", "=", "assertSpace", "(", "index", ")", ";", "chunks", "[", "chunk", "]", "[", "index", "&", "mask", "]", "=", "value", ";", "}" ]
Sets a value an grows chunks dynamically if exceeding size or missing chunk encountered
[ "Sets", "a", "value", "an", "grows", "chunks", "dynamically", "if", "exceeding", "size", "or", "missing", "chunk", "encountered" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/algorithms/Chunks.java#L61-L64
23,781
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/algorithms/Chunks.java
Chunks.newChunk
private int[] newChunk() { if (defaultValue==0) return new int[chunkSize]; if (baseChunk==null) { baseChunk = new int[chunkSize]; Arrays.fill(baseChunk,defaultValue); } return baseChunk.clone(); }
java
private int[] newChunk() { if (defaultValue==0) return new int[chunkSize]; if (baseChunk==null) { baseChunk = new int[chunkSize]; Arrays.fill(baseChunk,defaultValue); } return baseChunk.clone(); }
[ "private", "int", "[", "]", "newChunk", "(", ")", "{", "if", "(", "defaultValue", "==", "0", ")", "return", "new", "int", "[", "chunkSize", "]", ";", "if", "(", "baseChunk", "==", "null", ")", "{", "baseChunk", "=", "new", "int", "[", "chunkSize", ...
todo use pool
[ "todo", "use", "pool" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/algorithms/Chunks.java#L122-L130
23,782
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/algorithms/Chunks.java
Chunks.sumUp
public void sumUp() { int offset=0; int tmp=0; for (int i = 0; i < numChunks; i++) { int[] chunk = chunks[i]; if (chunk==null) throw new IllegalStateException("Chunks are not continous, null fragement at offset "+i); for (int j = 0; j < chunkSize; j++) { ...
java
public void sumUp() { int offset=0; int tmp=0; for (int i = 0; i < numChunks; i++) { int[] chunk = chunks[i]; if (chunk==null) throw new IllegalStateException("Chunks are not continous, null fragement at offset "+i); for (int j = 0; j < chunkSize; j++) { ...
[ "public", "void", "sumUp", "(", ")", "{", "int", "offset", "=", "0", ";", "int", "tmp", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "numChunks", ";", "i", "++", ")", "{", "int", "[", "]", "chunk", "=", "chunks", "[", "i"...
special operation implemented inline to compute and store sum up until here
[ "special", "operation", "implemented", "inline", "to", "compute", "and", "store", "sum", "up", "until", "here" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/algorithms/Chunks.java#L135-L147
23,783
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/algorithms/Chunks.java
Chunks.add
public void add(Chunks c) { assert c.chunkBits == chunkBits; assert c.defaultValue == defaultValue; int[][] oChunks = c.chunks; if (c.numChunks > numChunks) growTo(c.numChunks-1); for (int i = 0; i < oChunks.length; i++) { int[] oChunk = oChunks[i]; if (o...
java
public void add(Chunks c) { assert c.chunkBits == chunkBits; assert c.defaultValue == defaultValue; int[][] oChunks = c.chunks; if (c.numChunks > numChunks) growTo(c.numChunks-1); for (int i = 0; i < oChunks.length; i++) { int[] oChunk = oChunks[i]; if (o...
[ "public", "void", "add", "(", "Chunks", "c", ")", "{", "assert", "c", ".", "chunkBits", "==", "chunkBits", ";", "assert", "c", ".", "defaultValue", "==", "defaultValue", ";", "int", "[", "]", "[", "]", "oChunks", "=", "c", ".", "chunks", ";", "if", ...
adds values from another Chunks to the current one missing chunks are cloned over @param c other Chunks
[ "adds", "values", "from", "another", "Chunks", "to", "the", "current", "one", "missing", "chunks", "are", "cloned", "over" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/algorithms/Chunks.java#L154-L174
23,784
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/algorithms/Chunks.java
Chunks.mergeAllChunks
public int[] mergeAllChunks() { int[] merged = new int[chunkSize*numChunks]; int filledChunks = Math.min(numChunks,getFilledChunks()+1); for (int i = 0; i < filledChunks ; i++) { if (chunks[i]!=null) { System.arraycopy(chunks[i],0,merged,i*chunkSize,chunkSize); ...
java
public int[] mergeAllChunks() { int[] merged = new int[chunkSize*numChunks]; int filledChunks = Math.min(numChunks,getFilledChunks()+1); for (int i = 0; i < filledChunks ; i++) { if (chunks[i]!=null) { System.arraycopy(chunks[i],0,merged,i*chunkSize,chunkSize); ...
[ "public", "int", "[", "]", "mergeAllChunks", "(", ")", "{", "int", "[", "]", "merged", "=", "new", "int", "[", "chunkSize", "*", "numChunks", "]", ";", "int", "filledChunks", "=", "Math", ".", "min", "(", "numChunks", ",", "getFilledChunks", "(", ")", ...
turn this chunked array into a regular int-array, mostly for compatibility also copying unused space at the end filled with default value
[ "turn", "this", "chunked", "array", "into", "a", "regular", "int", "-", "array", "mostly", "for", "compatibility", "also", "copying", "unused", "space", "at", "the", "end", "filled", "with", "default", "value" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/algorithms/Chunks.java#L198-L208
23,785
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/algorithms/Chunks.java
Chunks.mergeChunks
public int[] mergeChunks() { int filledChunks = getFilledChunks(); int[] merged = new int[size()]; for (int i = 0; i < filledChunks ; i++) { if (chunks[i]!=null) { System.arraycopy(chunks[i], 0, merged, i * chunkSize, chunkSize); } } int re...
java
public int[] mergeChunks() { int filledChunks = getFilledChunks(); int[] merged = new int[size()]; for (int i = 0; i < filledChunks ; i++) { if (chunks[i]!=null) { System.arraycopy(chunks[i], 0, merged, i * chunkSize, chunkSize); } } int re...
[ "public", "int", "[", "]", "mergeChunks", "(", ")", "{", "int", "filledChunks", "=", "getFilledChunks", "(", ")", ";", "int", "[", "]", "merged", "=", "new", "int", "[", "size", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<...
turn this chunked array into a regular int-array, mostly for compatibility cuts off unused space at the end
[ "turn", "this", "chunked", "array", "into", "a", "regular", "int", "-", "array", "mostly", "for", "compatibility", "cuts", "off", "unused", "space", "at", "the", "end" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/algorithms/Chunks.java#L214-L227
23,786
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/generate/utils/WeightedReservoirSampler.java
WeightedReservoirSampler.randomIndexChoice
public int randomIndexChoice(List<Integer> weights) { int result = 0, index; double maxKey = 0.0; double u, key; int weight; for (ListIterator<Integer> it = weights.listIterator(); it.hasNext(); ) { index = it.nextIndex(); weight = it.next(); ...
java
public int randomIndexChoice(List<Integer> weights) { int result = 0, index; double maxKey = 0.0; double u, key; int weight; for (ListIterator<Integer> it = weights.listIterator(); it.hasNext(); ) { index = it.nextIndex(); weight = it.next(); ...
[ "public", "int", "randomIndexChoice", "(", "List", "<", "Integer", ">", "weights", ")", "{", "int", "result", "=", "0", ",", "index", ";", "double", "maxKey", "=", "0.0", ";", "double", "u", ",", "key", ";", "int", "weight", ";", "for", "(", "ListIte...
Returns an integer at random, weighted according to its index @param weights weights to sample from @return index chosen according to the weight supplied
[ "Returns", "an", "integer", "at", "random", "weighted", "according", "to", "its", "index" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/generate/utils/WeightedReservoirSampler.java#L31-L50
23,787
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/algo/Cover.java
Cover.coverNodes
public static Stream<Relationship> coverNodes(Collection<Node> nodes) { return nodes.stream() .flatMap(n -> StreamSupport.stream(n.getRelationships(Direction.OUTGOING) .spliterator(),false) .filter(r -> nodes...
java
public static Stream<Relationship> coverNodes(Collection<Node> nodes) { return nodes.stream() .flatMap(n -> StreamSupport.stream(n.getRelationships(Direction.OUTGOING) .spliterator(),false) .filter(r -> nodes...
[ "public", "static", "Stream", "<", "Relationship", ">", "coverNodes", "(", "Collection", "<", "Node", ">", "nodes", ")", "{", "return", "nodes", ".", "stream", "(", ")", ".", "flatMap", "(", "n", "->", "StreamSupport", ".", "stream", "(", "n", ".", "ge...
non-parallelized utility method for use by other procedures
[ "non", "-", "parallelized", "utility", "method", "for", "use", "by", "other", "procedures" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/algo/Cover.java#L43-L49
23,788
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/index/IndexUpdateTransactionEventHandler.java
IndexUpdateTransactionEventHandler.initIndexConfiguration
private synchronized Map<String, Map<String, Collection<Index<Node>>>> initIndexConfiguration() { Map<String, Map<String, Collection<Index<Node>>>> indexesByLabelAndProperty = new HashMap<>(); try (Transaction tx = graphDatabaseService.beginTx() ) { final IndexManager indexManager = graphDa...
java
private synchronized Map<String, Map<String, Collection<Index<Node>>>> initIndexConfiguration() { Map<String, Map<String, Collection<Index<Node>>>> indexesByLabelAndProperty = new HashMap<>(); try (Transaction tx = graphDatabaseService.beginTx() ) { final IndexManager indexManager = graphDa...
[ "private", "synchronized", "Map", "<", "String", ",", "Map", "<", "String", ",", "Collection", "<", "Index", "<", "Node", ">", ">", ">", ">", "initIndexConfiguration", "(", ")", "{", "Map", "<", "String", ",", "Map", "<", "String", ",", "Collection", "...
might be run from a scheduler, so we need to make sure we have a transaction
[ "might", "be", "run", "from", "a", "scheduler", "so", "we", "need", "to", "make", "sure", "we", "have", "a", "transaction" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/index/IndexUpdateTransactionEventHandler.java#L223-L247
23,789
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/index/IndexUpdateTransactionEventHandler.java
IndexUpdateTransactionEventHandler.forceTxRollover
public synchronized void forceTxRollover() { if (async) { try { forceTxRolloverFlag = false; indexCommandQueue.put(FORCE_TX_ROLLOVER); while (!forceTxRolloverFlag) { Thread.sleep(5); } } catch (Interrupte...
java
public synchronized void forceTxRollover() { if (async) { try { forceTxRolloverFlag = false; indexCommandQueue.put(FORCE_TX_ROLLOVER); while (!forceTxRolloverFlag) { Thread.sleep(5); } } catch (Interrupte...
[ "public", "synchronized", "void", "forceTxRollover", "(", ")", "{", "if", "(", "async", ")", "{", "try", "{", "forceTxRolloverFlag", "=", "false", ";", "indexCommandQueue", ".", "put", "(", "FORCE_TX_ROLLOVER", ")", ";", "while", "(", "!", "forceTxRolloverFlag...
to be used from unit tests to ensure a tx rollover has happenend
[ "to", "be", "used", "from", "unit", "tests", "to", "ensure", "a", "tx", "rollover", "has", "happenend" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/index/IndexUpdateTransactionEventHandler.java#L372-L385
23,790
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/periodic/Periodic.java
Periodic.iterate
@Procedure(mode = Mode.WRITE) @Description("apoc.periodic.iterate('statement returning items', 'statement per item', {batchSize:1000,iterateList:true,parallel:false,params:{},concurrency:50,retries:0}) YIELD batches, total - run the second statement for each item returned by the first statement. Returns number of b...
java
@Procedure(mode = Mode.WRITE) @Description("apoc.periodic.iterate('statement returning items', 'statement per item', {batchSize:1000,iterateList:true,parallel:false,params:{},concurrency:50,retries:0}) YIELD batches, total - run the second statement for each item returned by the first statement. Returns number of b...
[ "@", "Procedure", "(", "mode", "=", "Mode", ".", "WRITE", ")", "@", "Description", "(", "\"apoc.periodic.iterate('statement returning items', 'statement per item', {batchSize:1000,iterateList:true,parallel:false,params:{},concurrency:50,retries:0}) YIELD batches, total - run the second state...
invoke cypherAction in batched transactions being feeded from cypherIteration running in main thread @param cypherIterate @param cypherAction
[ "invoke", "cypherAction", "in", "batched", "transactions", "being", "feeded", "from", "cypherIteration", "running", "in", "main", "thread" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/periodic/Periodic.java#L259-L280
23,791
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/mongodb/MongoDBColl.java
MongoDBColl.documentToPackableMap
private Map<String, Object> documentToPackableMap(Map<String, Object> document) { if (compatibleValues) { try { return jsonMapper.readValue(jsonMapper.writeValueAsBytes(document), new TypeReference<Map<String, Object>>() { }); } catch (Exception e) { ...
java
private Map<String, Object> documentToPackableMap(Map<String, Object> document) { if (compatibleValues) { try { return jsonMapper.readValue(jsonMapper.writeValueAsBytes(document), new TypeReference<Map<String, Object>>() { }); } catch (Exception e) { ...
[ "private", "Map", "<", "String", ",", "Object", ">", "documentToPackableMap", "(", "Map", "<", "String", ",", "Object", ">", "document", ")", "{", "if", "(", "compatibleValues", ")", "{", "try", "{", "return", "jsonMapper", ".", "readValue", "(", "jsonMapp...
It translates a MongoDB document into a Map where the "_id" field is not an ObjectId but a simple String representation of it @param document @return
[ "It", "translates", "a", "MongoDB", "document", "into", "a", "Map", "where", "the", "_id", "field", "is", "not", "an", "ObjectId", "but", "a", "simple", "String", "representation", "of", "it" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/mongodb/MongoDBColl.java#L67-L93
23,792
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/es/ElasticSearch.java
ElasticSearch.getQueryUrl
protected String getQueryUrl(String hostOrKey, String index, String type, String id, Object query) { return getElasticSearchUrl(hostOrKey) + formatQueryUrl(index, type, id, query); }
java
protected String getQueryUrl(String hostOrKey, String index, String type, String id, Object query) { return getElasticSearchUrl(hostOrKey) + formatQueryUrl(index, type, id, query); }
[ "protected", "String", "getQueryUrl", "(", "String", "hostOrKey", ",", "String", "index", ",", "String", "type", ",", "String", "id", ",", "Object", "query", ")", "{", "return", "getElasticSearchUrl", "(", "hostOrKey", ")", "+", "formatQueryUrl", "(", "index",...
Get the full Elasticsearch url @param hostOrKey @param index @param type @param id @param query @return
[ "Get", "the", "full", "Elasticsearch", "url" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/es/ElasticSearch.java#L51-L53
23,793
neo4j-contrib/neo4j-apoc-procedures
src/main/java/apoc/nodes/Nodes.java
Nodes.getDegreeSafe
private int getDegreeSafe(Node node, RelationshipType relType, Direction direction) { if (relType == null) { return node.getDegree(direction); } return node.getDegree(relType, direction); }
java
private int getDegreeSafe(Node node, RelationshipType relType, Direction direction) { if (relType == null) { return node.getDegree(direction); } return node.getDegree(relType, direction); }
[ "private", "int", "getDegreeSafe", "(", "Node", "node", ",", "RelationshipType", "relType", ",", "Direction", "direction", ")", "{", "if", "(", "relType", "==", "null", ")", "{", "return", "node", ".", "getDegree", "(", "direction", ")", ";", "}", "return"...
works in cases when relType is null
[ "works", "in", "cases", "when", "relType", "is", "null" ]
e8386975d1c512c0e4388a1a61f5496121c04f86
https://github.com/neo4j-contrib/neo4j-apoc-procedures/blob/e8386975d1c512c0e4388a1a61f5496121c04f86/src/main/java/apoc/nodes/Nodes.java#L498-L504
23,794
square/wire
wire-java-generator/src/main/java/com/squareup/wire/java/JavaGenerator.java
JavaGenerator.sanitizeJavadoc
static String sanitizeJavadoc(String documentation) { // Remove trailing whitespace on each line. documentation = documentation.replaceAll("[^\\S\n]+\n", "\n"); documentation = documentation.replaceAll("\\s+$", ""); documentation = documentation.replaceAll("\\*/", "&#42;/"); // Rewrite '@see <url>' ...
java
static String sanitizeJavadoc(String documentation) { // Remove trailing whitespace on each line. documentation = documentation.replaceAll("[^\\S\n]+\n", "\n"); documentation = documentation.replaceAll("\\s+$", ""); documentation = documentation.replaceAll("\\*/", "&#42;/"); // Rewrite '@see <url>' ...
[ "static", "String", "sanitizeJavadoc", "(", "String", "documentation", ")", "{", "// Remove trailing whitespace on each line.", "documentation", "=", "documentation", ".", "replaceAll", "(", "\"[^\\\\S\\n]+\\n\"", ",", "\"\\n\"", ")", ";", "documentation", "=", "documenta...
A grab-bag of fixes for things that can go wrong when converting to javadoc.
[ "A", "grab", "-", "bag", "of", "fixes", "for", "things", "that", "can", "go", "wrong", "when", "converting", "to", "javadoc", "." ]
4a9a00dfadfc14d6a0780b85810418f9cbc78a49
https://github.com/square/wire/blob/4a9a00dfadfc14d6a0780b85810418f9cbc78a49/wire-java-generator/src/main/java/com/squareup/wire/java/JavaGenerator.java#L362-L371
23,795
square/wire
wire-schema/src/main/java/com/squareup/wire/schema/Options.java
Options.union
@SuppressWarnings("unchecked") private Object union(Linker linker, Object a, Object b) { if (a instanceof List) { return union((List<?>) a, (List<?>) b); } else if (a instanceof Map) { return union(linker, (Map<ProtoMember, Object>) a, (Map<ProtoMember, Object>) b); } else { linker.addEr...
java
@SuppressWarnings("unchecked") private Object union(Linker linker, Object a, Object b) { if (a instanceof List) { return union((List<?>) a, (List<?>) b); } else if (a instanceof Map) { return union(linker, (Map<ProtoMember, Object>) a, (Map<ProtoMember, Object>) b); } else { linker.addEr...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "Object", "union", "(", "Linker", "linker", ",", "Object", "a", ",", "Object", "b", ")", "{", "if", "(", "a", "instanceof", "List", ")", "{", "return", "union", "(", "(", "List", "<", "?", ...
Combine values for the same key, resolving conflicts based on their type.
[ "Combine", "values", "for", "the", "same", "key", "resolving", "conflicts", "based", "on", "their", "type", "." ]
4a9a00dfadfc14d6a0780b85810418f9cbc78a49
https://github.com/square/wire/blob/4a9a00dfadfc14d6a0780b85810418f9cbc78a49/wire-schema/src/main/java/com/squareup/wire/schema/Options.java#L238-L248
23,796
square/wire
wire-schema/src/main/java/com/squareup/wire/schema/SchemaLoader.java
SchemaLoader.loadDescriptorProto
private ProtoFile loadDescriptorProto() throws IOException { InputStream resourceAsStream = SchemaLoader.class.getResourceAsStream("/" + DESCRIPTOR_PROTO); try (BufferedSource buffer = Okio.buffer(Okio.source(resourceAsStream))) { String data = buffer.readUtf8(); Location location = Location.get("",...
java
private ProtoFile loadDescriptorProto() throws IOException { InputStream resourceAsStream = SchemaLoader.class.getResourceAsStream("/" + DESCRIPTOR_PROTO); try (BufferedSource buffer = Okio.buffer(Okio.source(resourceAsStream))) { String data = buffer.readUtf8(); Location location = Location.get("",...
[ "private", "ProtoFile", "loadDescriptorProto", "(", ")", "throws", "IOException", "{", "InputStream", "resourceAsStream", "=", "SchemaLoader", ".", "class", ".", "getResourceAsStream", "(", "\"/\"", "+", "DESCRIPTOR_PROTO", ")", ";", "try", "(", "BufferedSource", "b...
Returns Google's protobuf descriptor, which defines standard options like default, deprecated, and java_package. If the user has provided their own version of the descriptor proto, that is preferred.
[ "Returns", "Google", "s", "protobuf", "descriptor", "which", "defines", "standard", "options", "like", "default", "deprecated", "and", "java_package", ".", "If", "the", "user", "has", "provided", "their", "own", "version", "of", "the", "descriptor", "proto", "th...
4a9a00dfadfc14d6a0780b85810418f9cbc78a49
https://github.com/square/wire/blob/4a9a00dfadfc14d6a0780b85810418f9cbc78a49/wire-schema/src/main/java/com/squareup/wire/schema/SchemaLoader.java#L175-L183
23,797
square/wire
wire-schema/src/main/java/com/squareup/wire/schema/internal/parser/SyntaxReader.java
SyntaxReader.readString
public String readString() { skipWhitespace(true); char c = peekChar(); return c == '"' || c == '\'' ? readQuotedString() : readWord(); }
java
public String readString() { skipWhitespace(true); char c = peekChar(); return c == '"' || c == '\'' ? readQuotedString() : readWord(); }
[ "public", "String", "readString", "(", ")", "{", "skipWhitespace", "(", "true", ")", ";", "char", "c", "=", "peekChar", "(", ")", ";", "return", "c", "==", "'", "'", "||", "c", "==", "'", "'", "?", "readQuotedString", "(", ")", ":", "readWord", "("...
Reads a quoted or unquoted string and returns it.
[ "Reads", "a", "quoted", "or", "unquoted", "string", "and", "returns", "it", "." ]
4a9a00dfadfc14d6a0780b85810418f9cbc78a49
https://github.com/square/wire/blob/4a9a00dfadfc14d6a0780b85810418f9cbc78a49/wire-schema/src/main/java/com/squareup/wire/schema/internal/parser/SyntaxReader.java#L79-L83
23,798
square/wire
wire-schema/src/main/java/com/squareup/wire/schema/internal/parser/SyntaxReader.java
SyntaxReader.readWord
public String readWord() { skipWhitespace(true); int start = pos; while (pos < data.length) { char c = data[pos]; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || (c == '_') || (c == '-') || (c == '.')) { ...
java
public String readWord() { skipWhitespace(true); int start = pos; while (pos < data.length) { char c = data[pos]; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || (c == '_') || (c == '-') || (c == '.')) { ...
[ "public", "String", "readWord", "(", ")", "{", "skipWhitespace", "(", "true", ")", ";", "int", "start", "=", "pos", ";", "while", "(", "pos", "<", "data", ".", "length", ")", "{", "char", "c", "=", "data", "[", "pos", "]", ";", "if", "(", "(", ...
Reads a non-empty word and returns it.
[ "Reads", "a", "non", "-", "empty", "word", "and", "returns", "it", "." ]
4a9a00dfadfc14d6a0780b85810418f9cbc78a49
https://github.com/square/wire/blob/4a9a00dfadfc14d6a0780b85810418f9cbc78a49/wire-schema/src/main/java/com/squareup/wire/schema/internal/parser/SyntaxReader.java#L191-L211
23,799
square/wire
wire-schema/src/main/java/com/squareup/wire/schema/internal/parser/SyntaxReader.java
SyntaxReader.readComment
private String readComment() { if (pos == data.length || data[pos] != '/') throw new AssertionError(); pos++; int commentType = pos < data.length ? data[pos++] : -1; if (commentType == '*') { StringBuilder result = new StringBuilder(); boolean startOfLine = true; for (; pos + 1 < data...
java
private String readComment() { if (pos == data.length || data[pos] != '/') throw new AssertionError(); pos++; int commentType = pos < data.length ? data[pos++] : -1; if (commentType == '*') { StringBuilder result = new StringBuilder(); boolean startOfLine = true; for (; pos + 1 < data...
[ "private", "String", "readComment", "(", ")", "{", "if", "(", "pos", "==", "data", ".", "length", "||", "data", "[", "pos", "]", "!=", "'", "'", ")", "throw", "new", "AssertionError", "(", ")", ";", "pos", "++", ";", "int", "commentType", "=", "pos...
Reads a comment and returns its body.
[ "Reads", "a", "comment", "and", "returns", "its", "body", "." ]
4a9a00dfadfc14d6a0780b85810418f9cbc78a49
https://github.com/square/wire/blob/4a9a00dfadfc14d6a0780b85810418f9cbc78a49/wire-schema/src/main/java/com/squareup/wire/schema/internal/parser/SyntaxReader.java#L246-L293